create-ailk 0.39.0 → 0.40.1

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 (203) hide show
  1. package/component-catalog.json +1 -1
  2. package/component-catalog.md +1 -1
  3. package/dist/add-route.js +15 -0
  4. package/dist/body-heading.d.ts +2 -1
  5. package/dist/body-heading.js +31 -3
  6. package/dist/module-architecture.js +0 -3
  7. package/dist/remove-module.js +13 -4
  8. package/dist/routes.d.ts +7 -0
  9. package/dist/routes.js +1 -1
  10. package/dist/site-roster.js +7 -1
  11. package/dist/surfaces.d.ts +2 -0
  12. package/dist/surfaces.js +59 -172
  13. package/package.json +3 -3
  14. package/templates/apps/web/CLAUDE.md +19 -2
  15. package/templates/apps/web/__tests__/__mocks__/next-intl-server.ts +3 -2
  16. package/templates/apps/web/__tests__/__mocks__/next-intl.ts +3 -2
  17. package/templates/apps/web/app/[locale]/layout.tsx +42 -25
  18. package/templates/apps/web/app/api/revalidate/__tests__/route.test.ts +56 -1
  19. package/templates/apps/web/app/api/revalidate/route.ts +45 -4
  20. package/templates/apps/web/app/llms.txt/__tests__/site-listing.test.ts +53 -0
  21. package/templates/apps/web/app/llms.txt/route.ts +5 -2
  22. package/templates/apps/web/i18n/request.ts +5 -1
  23. package/templates/apps/web/jest.config.cjs +6 -0
  24. package/templates/apps/web/lib/__tests__/deck-page.test.ts +9 -0
  25. package/templates/apps/web/lib/__tests__/hub-site-config.test.ts +239 -0
  26. package/templates/apps/web/lib/__tests__/in-page-magnet-self-request.test.ts +1 -1
  27. package/templates/apps/web/lib/__tests__/in-page-magnet.test.ts +2 -2
  28. package/templates/apps/web/lib/__tests__/pricing-page.test.ts +1 -1
  29. package/templates/apps/web/lib/__tests__/profile-back-link.test.ts +58 -0
  30. package/templates/apps/web/lib/__tests__/served-pages.test.ts +163 -20
  31. package/templates/apps/web/lib/__tests__/site-brand.test.ts +77 -0
  32. package/templates/apps/web/{app/[locale]/contact → lib}/__tests__/site-contact-lines.test.ts +64 -0
  33. package/templates/apps/web/lib/__tests__/site-identity-feature-list.test.ts +115 -3
  34. package/templates/apps/web/lib/__tests__/structured-data.test.tsx +17 -4
  35. package/templates/apps/web/lib/hub-site-config.ts +151 -0
  36. package/templates/apps/web/lib/in-page-magnet.ts +2 -2
  37. package/templates/apps/web/lib/pricing-page.ts +3 -3
  38. package/templates/apps/web/lib/profile-back-link.ts +49 -12
  39. package/templates/apps/web/lib/served-pages.ts +144 -39
  40. package/templates/apps/web/lib/site-brand.tsx +66 -0
  41. package/templates/apps/web/{app/[locale]/contact → lib}/site-contact-email.ts +25 -5
  42. package/templates/apps/web/{app/[locale]/contact → lib}/site-contact-lines.ts +21 -5
  43. package/templates/apps/web/lib/site-header.ts +1 -1
  44. package/templates/apps/web/lib/site-identity.ts +38 -2
  45. package/templates/apps/web/messages/en.json +3 -119
  46. package/templates/apps/web/next.config.mjs +7 -0
  47. package/templates/apps/web/package.json +1 -0
  48. package/templates/apps/web/site-pages.config.tsx +85 -0
  49. package/templates/tools/body-heading.ts +30 -3
  50. package/versions.json +50 -49
  51. package/templates/apps/web/app/[locale]/(authed)/leads/__tests__/page.test.tsx +0 -205
  52. package/templates/apps/web/app/[locale]/(authed)/leads/components/LeadsTable.tsx +0 -137
  53. package/templates/apps/web/app/[locale]/(authed)/leads/page.tsx +0 -122
  54. package/templates/apps/web/app/[locale]/(authed)/waitlist/components/ForbiddenState.tsx +0 -24
  55. package/templates/apps/web/app/[locale]/(authed)/waitlist/format.ts +0 -111
  56. package/templates/apps/web/app/[locale]/[slug]/[detail]/__tests__/page.test.tsx +0 -402
  57. package/templates/apps/web/app/[locale]/[slug]/[detail]/page.tsx +0 -143
  58. package/templates/apps/web/app/[locale]/[slug]/__tests__/page.test.tsx +0 -148
  59. package/templates/apps/web/app/[locale]/[slug]/page.tsx +0 -109
  60. package/templates/apps/web/app/[locale]/about/[slug]/page.tsx +0 -46
  61. package/templates/apps/web/app/[locale]/about/__tests__/about-routes.test.tsx +0 -353
  62. package/templates/apps/web/app/[locale]/about/page.tsx +0 -122
  63. package/templates/apps/web/app/[locale]/alternatives/__tests__/page.test.tsx +0 -161
  64. package/templates/apps/web/app/[locale]/alternatives/page.tsx +0 -112
  65. package/templates/apps/web/app/[locale]/careers/[slug]/[action]/page.tsx +0 -244
  66. package/templates/apps/web/app/[locale]/careers/[slug]/apply.actions.ts +0 -325
  67. package/templates/apps/web/app/[locale]/careers/[slug]/job-application-form.ts +0 -120
  68. package/templates/apps/web/app/[locale]/careers/[slug]/page.tsx +0 -73
  69. package/templates/apps/web/app/[locale]/careers/__tests__/apply.actions.test.ts +0 -497
  70. package/templates/apps/web/app/[locale]/careers/__tests__/careers-hub.test.tsx +0 -172
  71. package/templates/apps/web/app/[locale]/careers/__tests__/careers-set.test.tsx +0 -153
  72. package/templates/apps/web/app/[locale]/careers/__tests__/job-application-form.test.ts +0 -141
  73. package/templates/apps/web/app/[locale]/careers/__tests__/job-apply-page.test.tsx +0 -546
  74. package/templates/apps/web/app/[locale]/careers/__tests__/page-renderer-migration.test.tsx +0 -189
  75. package/templates/apps/web/app/[locale]/careers/page.tsx +0 -165
  76. package/templates/apps/web/app/[locale]/case-studies/[slug]/page.tsx +0 -49
  77. package/templates/apps/web/app/[locale]/case-studies/__tests__/hub-children.test.tsx +0 -65
  78. package/templates/apps/web/app/[locale]/case-studies/__tests__/page-renderer-migration.test.tsx +0 -125
  79. package/templates/apps/web/app/[locale]/case-studies/page.tsx +0 -49
  80. package/templates/apps/web/app/[locale]/clients/__tests__/page-renderer-migration.test.tsx +0 -85
  81. package/templates/apps/web/app/[locale]/clients/page.tsx +0 -47
  82. package/templates/apps/web/app/[locale]/contact/ConversationalIntakeWrapper.tsx +0 -249
  83. package/templates/apps/web/app/[locale]/contact/__tests__/ConversationalIntakeWrapper.test.tsx +0 -400
  84. package/templates/apps/web/app/[locale]/contact/__tests__/contact-form-magnet.test.ts +0 -138
  85. package/templates/apps/web/app/[locale]/contact/__tests__/contact-form-text.test.ts +0 -49
  86. package/templates/apps/web/app/[locale]/contact/__tests__/contact-magnet-page.test.tsx +0 -494
  87. package/templates/apps/web/app/[locale]/contact/__tests__/contact.actions.test.ts +0 -1122
  88. package/templates/apps/web/app/[locale]/contact/__tests__/intake-analytics.test.ts +0 -51
  89. package/templates/apps/web/app/[locale]/contact/__tests__/page-renderer-migration.test.tsx +0 -319
  90. package/templates/apps/web/app/[locale]/contact/contact-form-magnet.ts +0 -77
  91. package/templates/apps/web/app/[locale]/contact/contact-form-text.ts +0 -52
  92. package/templates/apps/web/app/[locale]/contact/contact.actions.ts +0 -403
  93. package/templates/apps/web/app/[locale]/contact/intake-analytics.ts +0 -49
  94. package/templates/apps/web/app/[locale]/contact/intake-script.ts +0 -92
  95. package/templates/apps/web/app/[locale]/contact/page.tsx +0 -267
  96. package/templates/apps/web/app/[locale]/courses/[slug]/page.tsx +0 -50
  97. package/templates/apps/web/app/[locale]/courses/__tests__/hub-children.test.tsx +0 -32
  98. package/templates/apps/web/app/[locale]/courses/__tests__/page-renderer-migration.test.tsx +0 -123
  99. package/templates/apps/web/app/[locale]/courses/page.tsx +0 -49
  100. package/templates/apps/web/app/[locale]/events/[slug]/page.tsx +0 -57
  101. package/templates/apps/web/app/[locale]/events/__tests__/hub-children.test.tsx +0 -32
  102. package/templates/apps/web/app/[locale]/events/__tests__/page-renderer-migration.test.tsx +0 -164
  103. package/templates/apps/web/app/[locale]/events/__tests__/program-event.test.tsx +0 -120
  104. package/templates/apps/web/app/[locale]/events/page.tsx +0 -60
  105. package/templates/apps/web/app/[locale]/faq/page.tsx +0 -54
  106. package/templates/apps/web/app/[locale]/features/[slug]/page.tsx +0 -54
  107. package/templates/apps/web/app/[locale]/features/__tests__/hub-children.test.tsx +0 -32
  108. package/templates/apps/web/app/[locale]/features/page.tsx +0 -50
  109. package/templates/apps/web/app/[locale]/for/[slug]/page.tsx +0 -54
  110. package/templates/apps/web/app/[locale]/for/__tests__/hub-children.test.tsx +0 -32
  111. package/templates/apps/web/app/[locale]/for/__tests__/page-renderer-migration.test.tsx +0 -90
  112. package/templates/apps/web/app/[locale]/for/page.tsx +0 -51
  113. package/templates/apps/web/app/[locale]/glossary/page.tsx +0 -53
  114. package/templates/apps/web/app/[locale]/how-to/[slug]/page.tsx +0 -50
  115. package/templates/apps/web/app/[locale]/how-to/__tests__/page-renderer-migration.test.tsx +0 -78
  116. package/templates/apps/web/app/[locale]/how-to/page.tsx +0 -50
  117. package/templates/apps/web/app/[locale]/integrations/[slug]/page.tsx +0 -54
  118. package/templates/apps/web/app/[locale]/integrations/__tests__/hub-children.test.tsx +0 -38
  119. package/templates/apps/web/app/[locale]/integrations/__tests__/page-renderer-migration.test.tsx +0 -141
  120. package/templates/apps/web/app/[locale]/integrations/page.tsx +0 -49
  121. package/templates/apps/web/app/[locale]/launch-service/page.tsx +0 -44
  122. package/templates/apps/web/app/[locale]/newsletter/__tests__/page.test.tsx +0 -236
  123. package/templates/apps/web/app/[locale]/newsletter/page.tsx +0 -179
  124. package/templates/apps/web/app/[locale]/page.tsx +0 -147
  125. package/templates/apps/web/app/[locale]/partners/[slug]/page.tsx +0 -45
  126. package/templates/apps/web/app/[locale]/partners/__tests__/hub-children.test.tsx +0 -32
  127. package/templates/apps/web/app/[locale]/partners/__tests__/page-renderer-migration.test.tsx +0 -125
  128. package/templates/apps/web/app/[locale]/partners/page.tsx +0 -49
  129. package/templates/apps/web/app/[locale]/portfolio/[slug]/page.tsx +0 -46
  130. package/templates/apps/web/app/[locale]/portfolio/__tests__/hub-children.test.tsx +0 -38
  131. package/templates/apps/web/app/[locale]/portfolio/page.tsx +0 -50
  132. package/templates/apps/web/app/[locale]/pricing/[slug]/__tests__/page.test.tsx +0 -324
  133. package/templates/apps/web/app/[locale]/pricing/[slug]/page.tsx +0 -87
  134. package/templates/apps/web/app/[locale]/pricing/__tests__/__snapshots__/unconnected.test.tsx.snap +0 -7
  135. package/templates/apps/web/app/[locale]/pricing/__tests__/offerings.test.tsx +0 -605
  136. package/templates/apps/web/app/[locale]/pricing/__tests__/page.test.tsx +0 -219
  137. package/templates/apps/web/app/[locale]/pricing/__tests__/pricing-pages.test.tsx +0 -215
  138. package/templates/apps/web/app/[locale]/pricing/__tests__/unconnected.test.tsx +0 -282
  139. package/templates/apps/web/app/[locale]/pricing/page.tsx +0 -120
  140. package/templates/apps/web/app/[locale]/privacy/page.tsx +0 -40
  141. package/templates/apps/web/app/[locale]/products/[slug]/page.tsx +0 -50
  142. package/templates/apps/web/app/[locale]/products/__tests__/hub-children.test.tsx +0 -32
  143. package/templates/apps/web/app/[locale]/products/__tests__/page-renderer-migration.test.tsx +0 -141
  144. package/templates/apps/web/app/[locale]/products/page.tsx +0 -49
  145. package/templates/apps/web/app/[locale]/projects/[slug]/page.tsx +0 -37
  146. package/templates/apps/web/app/[locale]/projects/__tests__/hub-children.test.tsx +0 -32
  147. package/templates/apps/web/app/[locale]/projects/__tests__/page-renderer-migration.test.tsx +0 -157
  148. package/templates/apps/web/app/[locale]/projects/page.tsx +0 -49
  149. package/templates/apps/web/app/[locale]/purchase-policy/page.tsx +0 -49
  150. package/templates/apps/web/app/[locale]/resources/[slug]/page.tsx +0 -54
  151. package/templates/apps/web/app/[locale]/resources/__tests__/hub-children.test.tsx +0 -38
  152. package/templates/apps/web/app/[locale]/resources/__tests__/page-renderer-migration.test.tsx +0 -151
  153. package/templates/apps/web/app/[locale]/resources/page.tsx +0 -49
  154. package/templates/apps/web/app/[locale]/services/[slug]/[child]/page.tsx +0 -68
  155. package/templates/apps/web/app/[locale]/services/[slug]/page.tsx +0 -88
  156. package/templates/apps/web/app/[locale]/services/__tests__/hub-children.test.tsx +0 -158
  157. package/templates/apps/web/app/[locale]/services/__tests__/page-renderer-migration.test.tsx +0 -187
  158. package/templates/apps/web/app/[locale]/services/__tests__/service-detail-sections.test.tsx +0 -224
  159. package/templates/apps/web/app/[locale]/services/__tests__/service-families.test.tsx +0 -368
  160. package/templates/apps/web/app/[locale]/services/page.tsx +0 -71
  161. package/templates/apps/web/app/[locale]/software/[slug]/page.tsx +0 -49
  162. package/templates/apps/web/app/[locale]/software/__tests__/page-renderer-migration.test.tsx +0 -81
  163. package/templates/apps/web/app/[locale]/software/page.tsx +0 -49
  164. package/templates/apps/web/app/[locale]/team/[slug]/page.tsx +0 -45
  165. package/templates/apps/web/app/[locale]/team/__tests__/hub-children.test.tsx +0 -32
  166. package/templates/apps/web/app/[locale]/team/__tests__/team-routes.test.tsx +0 -161
  167. package/templates/apps/web/app/[locale]/team/page.tsx +0 -50
  168. package/templates/apps/web/app/[locale]/tech-articles/[slug]/page.tsx +0 -54
  169. package/templates/apps/web/app/[locale]/tech-articles/__tests__/page-renderer-migration.test.tsx +0 -82
  170. package/templates/apps/web/app/[locale]/tech-articles/page.tsx +0 -49
  171. package/templates/apps/web/app/[locale]/templates/[slug]/__tests__/page.test.tsx +0 -203
  172. package/templates/apps/web/app/[locale]/templates/[slug]/page.tsx +0 -81
  173. package/templates/apps/web/app/[locale]/templates/__tests__/page.test.tsx +0 -237
  174. package/templates/apps/web/app/[locale]/templates/page.tsx +0 -114
  175. package/templates/apps/web/app/[locale]/terms/page.tsx +0 -40
  176. package/templates/apps/web/app/[locale]/testimonials/__tests__/page-renderer-migration.test.tsx +0 -85
  177. package/templates/apps/web/app/[locale]/testimonials/page.tsx +0 -51
  178. package/templates/apps/web/app/[locale]/thanks/[slug]/__tests__/page.test.tsx +0 -136
  179. package/templates/apps/web/app/[locale]/thanks/[slug]/page.tsx +0 -39
  180. package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe-rsc-boundary.test.tsx +0 -226
  181. package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe.test.tsx +0 -217
  182. package/templates/apps/web/app/[locale]/unsubscribe/page.tsx +0 -106
  183. package/templates/apps/web/app/[locale]/unsubscribe/unsubscribe-button.tsx +0 -94
  184. package/templates/apps/web/app/[locale]/unsubscribe/unsubscribe.actions.ts +0 -55
  185. package/templates/apps/web/app/[locale]/vs/[slug]/__tests__/page.test.tsx +0 -100
  186. package/templates/apps/web/app/[locale]/vs/[slug]/page.tsx +0 -60
  187. package/templates/apps/web/app/[locale]/whitepapers/[slug]/page.tsx +0 -54
  188. package/templates/apps/web/app/[locale]/whitepapers/__tests__/page-renderer-migration.test.tsx +0 -82
  189. package/templates/apps/web/app/[locale]/whitepapers/page.tsx +0 -49
  190. package/templates/apps/web/app/[locale]/working-agreement/__tests__/page.test.tsx +0 -63
  191. package/templates/apps/web/app/[locale]/working-agreement/page.tsx +0 -41
  192. package/templates/apps/web/lib/__tests__/hub-children.fixtures.ts +0 -279
  193. package/templates/apps/web/lib/__tests__/route-family.test.ts +0 -57
  194. package/templates/apps/web/lib/__tests__/service-listing.test.ts +0 -111
  195. package/templates/apps/web/lib/__tests__/template-listing.test.ts +0 -158
  196. package/templates/apps/web/lib/hub-children.tsx +0 -351
  197. package/templates/apps/web/lib/meet-placeholder.ts +0 -5
  198. package/templates/apps/web/lib/posting-title.ts +0 -39
  199. package/templates/apps/web/lib/route-family.ts +0 -69
  200. package/templates/apps/web/lib/service-listing.ts +0 -89
  201. package/templates/apps/web/lib/template-listing.ts +0 -169
  202. package/templates/apps/web/src/lib/__tests__/lead-write.test.ts +0 -187
  203. package/templates/apps/web/src/lib/lead-write.ts +0 -90
@@ -1,324 +0,0 @@
1
- /**
2
- * /pricing/<offering> (#10044 D7, AC-5) — one offering's pricing page.
3
- *
4
- * A temporary content root carries `_site.mdx` (the contact email) and
5
- * `en/Pricing/website-rebuild.mdx`, whose `plans` names `growth` and
6
- * `seo-audit` and whose sections carry a written plans section and a written
7
- * add-ons section. The real content adapter, page renderer, mapper and
8
- * Pricing section run; `global.fetch` answers the shown-offerings route.
9
- * The page shares one read for 15 seconds, so every case moves `Date.now`.
10
- */
11
- import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
12
- import { tmpdir } from "node:os";
13
- import { join } from "node:path";
14
-
15
- import { act, render, screen, within } from "@testing-library/react";
16
- import { validateBlock } from "@working-theory/schema-validator";
17
- import {
18
- workspaceShownSetSchema,
19
- type OfferingsPrice,
20
- type OfferingsProduct,
21
- } from "@working-theory/validation";
22
-
23
- const mockNotFound = jest.fn(() => {
24
- throw new Error("NEXT_NOT_FOUND");
25
- });
26
-
27
- jest.mock("next/navigation", () => ({
28
- __esModule: true,
29
- notFound: () => mockNotFound(),
30
- redirect: jest.fn(),
31
- }));
32
-
33
- import OfferingPricingPage, { dynamic, generateMetadata } from "../page";
34
-
35
- // #10704 — a fixture suite: its content is shaped for the mdx source, whatever the site serves from.
36
- process.env.CONTENT_ADAPTER = "mdx";
37
-
38
- const SLUG = "website-rebuild";
39
- const SITE_EMAIL = "hello@example.com";
40
-
41
- const PAGE = `---
42
- type: "Pricing"
43
- slug: "${SLUG}"
44
- title: "Website Rebuild"
45
- description: "What a website rebuild costs."
46
- plans: ["growth", "seo-audit"]
47
- sections:
48
- [
49
- { "id": "hero", "type": "hero", "data": { "headline": "Rebuild your site", "variant": "default" } },
50
- {
51
- "id": "plans",
52
- "type": "pricing",
53
- "data": {
54
- "variant": "three-tiers-with-toggle",
55
- "billingToggle": false,
56
- "plans": [
57
- { "key": "growth", "name": "Written Growth", "price": { "custom": "$4,900" }, "features": ["Ten pages"], "cta": { "label": "Talk to us", "href": "/contact" } }
58
- ]
59
- }
60
- },
61
- {
62
- "id": "addons",
63
- "type": "pricing",
64
- "data": {
65
- "variant": "addons",
66
- "plans": [],
67
- "addons": [{ "name": "Written extra page", "price": "$150", "features": [] }]
68
- }
69
- },
70
- { "id": "faq", "type": "faq", "data": { "headline": "Questions", "items": [{ "question": "How long?", "answer": "Six weeks." }] } }
71
- ]
72
- ---
73
- `;
74
-
75
- const contentRoot = mkdtempSync(join(tmpdir(), "ailk-10044-"));
76
- const priorContentRoot = process.env.AILK_CONTENT_ROOT;
77
-
78
- beforeAll(() => {
79
- Element.prototype.scrollIntoView = jest.fn();
80
- mkdirSync(join(contentRoot, "en", "Pricing"), { recursive: true });
81
- writeFileSync(join(contentRoot, "en", "Pricing", `${SLUG}.mdx`), PAGE);
82
- writeFileSync(
83
- join(contentRoot, "_site.mdx"),
84
- `---\nsiteName: Example\ncontactEmail: ${SITE_EMAIL}\n---\n`,
85
- );
86
- process.env.AILK_CONTENT_ROOT = contentRoot;
87
- });
88
-
89
- afterAll(() => {
90
- if (priorContentRoot === undefined) delete process.env.AILK_CONTENT_ROOT;
91
- else process.env.AILK_CONTENT_ROOT = priorContentRoot;
92
- rmSync(contentRoot, { recursive: true, force: true });
93
- });
94
-
95
- // ── The shown set ────────────────────────────────────────────────────────────
96
-
97
- const INTERVAL = { monthly: "month", yearly: "year", once: null } as const;
98
-
99
- function price(
100
- plan: string,
101
- period: OfferingsPrice["period"],
102
- amount: number,
103
- ): OfferingsPrice {
104
- return {
105
- priceId: `price_${plan.replace(/-/g, "")}${period}`,
106
- lookupKey: `${plan}_${period}`,
107
- plan,
108
- period,
109
- interval: INTERVAL[period],
110
- amount,
111
- currency: "usd",
112
- };
113
- }
114
-
115
- function product(
116
- plan: string,
117
- ailkGroup: OfferingsProduct["ailkGroup"],
118
- name: string,
119
- prices: OfferingsPrice[],
120
- ): OfferingsProduct {
121
- return {
122
- productId: `prod_${plan.replace(/-/g, "")}`,
123
- plan,
124
- name,
125
- description: null,
126
- marketingFeatures: [],
127
- unitLabel: null,
128
- note: null,
129
- termsNote: null,
130
- ailkGroup,
131
- ailkOrder: null,
132
- prices,
133
- recommended: false,
134
- };
135
- }
136
-
137
- function wireSet(list: OfferingsProduct[]) {
138
- const {
139
- workspaceId: _w,
140
- organizationId: _o,
141
- ...wire
142
- } = workspaceShownSetSchema.parse({
143
- workspaceId: "wksp_01890a5d-ac96-774b-bcce-b302099a8057",
144
- organizationId: "org_01890a5d-ac96-774b-bcce-b302099a8058",
145
- productIds: list.map((o) => o.productId),
146
- recommended: { plan: null, addon: null },
147
- offerings: list,
148
- state: "current",
149
- snapshotAt: "2026-10-27T00:00:00.000Z",
150
- });
151
- return wire;
152
- }
153
-
154
- const GROWTH = product("growth", "plan", "Growth", [
155
- price("growth", "monthly", 4900),
156
- ]);
157
- const SCALE = product("scale", "plan", "Scale", [
158
- price("scale", "monthly", 9900),
159
- ]);
160
- const SEO_AUDIT = product("seo-audit", "addon", "SEO audit", [
161
- price("seo-audit", "monthly", 1500),
162
- ]);
163
-
164
- type Answer = { status: number; body: unknown };
165
-
166
- function shown(list: OfferingsProduct[]): Answer {
167
- return {
168
- status: 200,
169
- body: { ok: true, data: { status: "shown", shownSet: wireSet(list) } },
170
- };
171
- }
172
-
173
- const UNCONNECTED: Answer = {
174
- status: 200,
175
- body: { ok: true, data: { status: "unconnected" } },
176
- };
177
-
178
- let answer: Answer = UNCONNECTED;
179
-
180
- const fetchMock: jest.Mock = jest.fn(async () => ({
181
- ok: answer.status >= 200 && answer.status < 300,
182
- status: answer.status,
183
- json: async () => answer.body,
184
- }));
185
-
186
- let clock = Date.now();
187
-
188
- beforeEach(() => {
189
- clock += 16_000;
190
- jest.spyOn(Date, "now").mockImplementation(() => clock);
191
- global.fetch = fetchMock;
192
- fetchMock.mockClear();
193
- mockNotFound.mockClear();
194
- answer = UNCONNECTED;
195
- });
196
-
197
- afterEach(() => {
198
- jest.restoreAllMocks();
199
- });
200
-
201
- async function renderOffering(
202
- slug: string = SLUG,
203
- search: Record<string, string> = {},
204
- ): Promise<HTMLElement> {
205
- const element = await OfferingPricingPage({
206
- params: Promise.resolve({ locale: "en", slug }),
207
- searchParams: Promise.resolve(search),
208
- });
209
- let container: HTMLElement | undefined;
210
- await act(async () => {
211
- ({ container } = render(element));
212
- });
213
- return container!;
214
- }
215
-
216
- function tierCards(): HTMLElement[] {
217
- return screen.queryAllByTestId("pricing-tier-card");
218
- }
219
-
220
- function checkoutLinks(): string[] {
221
- return screen
222
- .queryAllByRole("link")
223
- .map((link) => link.getAttribute("href") ?? "")
224
- .filter((href) => href.includes("/api/offerings/checkout/"));
225
- }
226
-
227
- /** Every JSON-LD node on the page, `@graph` flattened. */
228
- function jsonLdNodes(container: HTMLElement): Array<Record<string, unknown>> {
229
- const script = container.querySelector('script[type="application/ld+json"]');
230
- if (!script) return [];
231
- const doc = JSON.parse(script.textContent ?? "") as Record<string, unknown>;
232
- const graph = doc["@graph"];
233
- return Array.isArray(graph)
234
- ? (graph as Array<Record<string, unknown>>)
235
- : [doc];
236
- }
237
-
238
- describe("/pricing/<offering> (#10044 AC-5)", () => {
239
- it("renders its written plans and add-ons when Stripe is not connected", async () => {
240
- await renderOffering();
241
-
242
- expect(screen.getByText("Written Growth")).not.toBeNull();
243
- expect(screen.getByText("$4,900")).not.toBeNull();
244
- expect(screen.getByText("Written extra page")).not.toBeNull();
245
- expect(screen.getByText("How long?")).not.toBeNull();
246
- expect(checkoutLinks()).toEqual([]);
247
- });
248
-
249
- it("renders only its own plans' Stripe cards when connected", async () => {
250
- answer = shown([GROWTH, SCALE, SEO_AUDIT]);
251
- await renderOffering();
252
-
253
- expect(tierCards()).toHaveLength(1);
254
- expect(within(tierCards()[0]!).getByText("Growth")).not.toBeNull();
255
- expect(screen.queryByText("Scale")).toBeNull();
256
- expect(screen.getByText("SEO audit")).not.toBeNull();
257
- expect(screen.queryByText("Written Growth")).toBeNull();
258
- expect(screen.queryByText("Written extra page")).toBeNull();
259
- const links = checkoutLinks();
260
- expect(links.length).toBeGreaterThanOrEqual(2);
261
- for (const href of links) {
262
- expect(href.startsWith("/api/offerings/checkout/")).toBe(true);
263
- }
264
- expect(links.some((href) => href.includes("scale"))).toBe(false);
265
- });
266
-
267
- it.each([
268
- ["a shown set carrying none of its plans", shown([SCALE])],
269
- ["a 500", { status: 500, body: { ok: false, error: "internal_error" } }],
270
- ])("renders the contact email for %s", async (_label, failure) => {
271
- answer = failure;
272
- await renderOffering();
273
-
274
- const fallback = screen.getByTestId("contact-fallback");
275
- expect(fallback.textContent).toContain(SITE_EMAIL);
276
- expect(tierCards()).toHaveLength(0);
277
- expect(screen.queryByText("Written Growth")).toBeNull();
278
- expect(checkoutLinks()).toEqual([]);
279
- });
280
-
281
- it("marks the Growth card recommended for ?plan=growth", async () => {
282
- answer = shown([GROWTH, SCALE, SEO_AUDIT]);
283
- await renderOffering(SLUG, { plan: "growth" });
284
-
285
- const card = tierCards()[0]!;
286
- expect(within(card).getByText("Growth")).not.toBeNull();
287
- expect(within(card).getByText("Recommended for you")).not.toBeNull();
288
- });
289
-
290
- it("emits a WebPage named for the page and a BreadcrumbList ending at /pricing/<slug>", async () => {
291
- const container = await renderOffering();
292
- const nodes = jsonLdNodes(container);
293
-
294
- const webPage = nodes.find((node) => node["@type"] === "WebPage");
295
- expect(webPage?.["name"]).toBe("Website Rebuild");
296
- expect(validateBlock(webPage as never, "Pricing")).toEqual(
297
- expect.objectContaining({ valid: true }),
298
- );
299
- const crumbs = nodes.find((node) => node["@type"] === "BreadcrumbList");
300
- const items = crumbs?.["itemListElement"] as Array<Record<string, unknown>>;
301
- expect(String(items[items.length - 1]!["item"])).toMatch(
302
- new RegExp(`/pricing/${SLUG}$`),
303
- );
304
- });
305
-
306
- it("gives a canonical ending /pricing/<slug> and renders per request", async () => {
307
- const metadata = await generateMetadata({
308
- params: Promise.resolve({ locale: "en", slug: SLUG }),
309
- });
310
-
311
- expect(String(metadata.alternates?.canonical)).toMatch(
312
- new RegExp(`/pricing/${SLUG}$`),
313
- );
314
- expect(dynamic).toBe("force-dynamic");
315
- });
316
-
317
- it("answers 404 for the hub's own slug and an unknown slug", async () => {
318
- await expect(renderOffering("pricing")).rejects.toThrow("NEXT_NOT_FOUND");
319
- await expect(renderOffering("no-such-offering")).rejects.toThrow(
320
- "NEXT_NOT_FOUND",
321
- );
322
- expect(fetchMock).not.toHaveBeenCalled();
323
- });
324
- });
@@ -1,87 +0,0 @@
1
- // One offering's pricing page (#10044 D7) — /pricing/<offering>, a `Pricing`
2
- // content file (`content/<locale>/Pricing/<offering>.mdx`) added with
3
- // add-page and listed by the /pricing hub. It renders its own sections — its
4
- // plans, add-ons, FAQ and call to action — in one of three states, the
5
- // /pricing rules (lib/pricing-page.ts, #8927):
6
- // - unconnected — its written prices, `?plan=` moving the recommendation;
7
- // - a current shown set — the Stripe cards of the plans its `plans`
8
- // frontmatter names in place of its written `pricing` sections;
9
- // - anything else, or none of its plans shown — the contact email there.
10
- //
11
- // The hub's own file (slug `pricing`) is /pricing, never /pricing/pricing.
12
- // Unknown slugs 404 through renderPage's detail branch (no
13
- // `translationsNamespace` is passed, #7537).
14
- //
15
- // Stripe text reaches markup only as React text and JSON-LD only through
16
- // renderPage's serializer (T4).
17
- import type {
18
- getMdxSource as defaultGetMdxSource,
19
- getPageSections as defaultGetPageSections,
20
- } from "@working-theory/page-renderer";
21
- import {
22
- getPageSections as loadPageSections,
23
- renderPage,
24
- renderPageMetadata,
25
- } from "@working-theory/page-renderer";
26
- import type { Metadata } from "next";
27
- import { notFound } from "next/navigation";
28
- import type { ReactElement } from "react";
29
-
30
- import {
31
- pagePlans,
32
- PRICING_HUB_SLUG,
33
- pricingSections,
34
- pricingSectionSlots,
35
- } from "../../../../lib/pricing-page";
36
-
37
- // Never prerendered; the Offerings read behind it is shared per instance (#8927 D2).
38
- export const dynamic = "force-dynamic";
39
-
40
- interface Props {
41
- params: Promise<{ locale: string; slug: string }>;
42
- searchParams?: Promise<Record<string, string | string[] | undefined>>;
43
- getMdxSource?: typeof defaultGetMdxSource;
44
- getPageSections?: typeof defaultGetPageSections;
45
- }
46
-
47
- type Section = Awaited<ReturnType<typeof defaultGetPageSections>>[number];
48
-
49
- export async function generateMetadata({
50
- params,
51
- }: Pick<Props, "params">): Promise<Metadata> {
52
- const { locale, slug } = await params;
53
- return renderPageMetadata({ type: "Pricing", slug, locale });
54
- }
55
-
56
- export default async function Page({
57
- params,
58
- searchParams,
59
- getMdxSource,
60
- getPageSections,
61
- }: Props): Promise<ReactElement> {
62
- const { locale, slug } = await params;
63
- if (slug === PRICING_HUB_SLUG) {
64
- notFound();
65
- }
66
- const search = (await searchParams) ?? {};
67
- const plan = Array.isArray(search.plan) ? search.plan[0] : search.plan;
68
- const loadSections = getPageSections ?? loadPageSections;
69
-
70
- /** The page's sections in its Offerings state; runs only when it exists. */
71
- async function withPricing(frontmatter: unknown): Promise<Section[]> {
72
- return pricingSections(await loadSections(frontmatter), {
73
- plans: pagePlans(frontmatter),
74
- plan,
75
- locale,
76
- });
77
- }
78
-
79
- return renderPage({
80
- type: "Pricing",
81
- slug,
82
- locale,
83
- getPageSections: withPricing,
84
- sectionSlots: await pricingSectionSlots(locale),
85
- ...(getMdxSource !== undefined && { getMdxSource }),
86
- });
87
- }
@@ -1,7 +0,0 @@
1
- // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
-
3
- exports[`/pricing on an unconnected site is today's page (#8927 AC-4) renders today's DI page for ?plan=BASIC 1`] = `"<script type="application/ld+json" data-testid="json-ld">{"@context":"https://schema.org","@graph":[{"@context":"https://schema.org","@type":"WebPage","inLanguage":"en","name":"Pricing","description":"Plans for every stage."},{"@context":"https://schema.org","@type":"Offer","name":"Basic","price":"29","priceCurrency":"USD"},{"@context":"https://schema.org","@type":"Offer","name":"Business","price":"79","priceCurrency":"USD"},{"@context":"https://schema.org","@type":"Offer","name":"Agency","price":"199","priceCurrency":"USD"},{"@context":"https://schema.org","@type":"AggregateOffer","priceCurrency":"USD","lowPrice":"29","highPrice":"199","offerCount":3}]}</script><main id="main"><div class="mx-auto w-full max-w-container-xl px-4 md:px-6 lg:px-8 py-section"><h1 class="text-heading-1 lg:text-display-sm font-display text-fg hero-type-display">Pricing</h1><p data-testid="pricing-description" class="mt-block-tight text-lead">Plans for every stage.</p></div><div class="ailk-section-renderer" data-testid="section-renderer"><span id="section-plans" class="ailk-section-anchor" aria-hidden="true" data-testid="section-anchor"></span><section class="py-section bg-(--color-bg)" data-testid="pricing" data-section="pricing"><div class="mx-auto w-full max-w-container-xl px-4 md:px-6 lg:px-8"><span hidden="" data-testid="pricing-recommended-anchor"></span><div class="grid gap-grid md:grid-cols-2 lg:grid-cols-3 mt-10 items-stretch pricing-card-row-grid" data-testid="pricing-grid" data-separation="gapped"><div class="ailk-pricing-tier-card pricing-card-subgrid" data-testid="pricing-tier-card" aria-current="true"><div class="pricing-card-subgrid-body"><div class="h-full rounded-card p-card pricing-card-subgrid border-thin border-(--color-brand) bg-(--color-surface-raised)" data-testid="card"><div class="row-start-1 flex flex-wrap items-center gap-2 justify-between"><h3 class="text-heading-3 font-display text-fg text-2xl font-normal">Basic</h3><div class="group inline-flex items-center border-hairline rounded-full transition-colors focus-visible:outline-none bg-(--color-brand) border-transparent text-(--color-fg-on-brand) hover:bg-(--color-brand)/90 focus-visible:bg-(--color-brand)/90 ps-2 pe-2 py-0.5 text-body-sm" data-testid="tier-badge">Recommended for you</div></div><div class="row-start-3 mt-6"><h4 class="text-heading-4 font-display text-fg text-4xl font-medium tracking-tight">$29</h4><span class="text-body font-body leading-normal text-fg mt-1 text-body-sm text-(--color-text-muted)">/month</span></div><div class="row-start-5 mt-6"><a class="inline-flex items-center justify-center gap-2 font-medium motion-safe:transition motion-safe:duration-(--button-hover-duration) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&amp;>svg]:shrink-0 bg-(--color-brand) text-(--color-fg-on-brand) not-disabled:hover:bg-(--button-hover-bg) not-disabled:hover:text-(--button-hover-fg) not-disabled:hover:outline not-disabled:hover:outline-1 not-disabled:hover:-outline-offset-1 not-disabled:hover:outline-(--button-hover-border) not-disabled:hover:opacity-(--button-hover-opacity) not-disabled:hover:transform-(--button-hover-transform) not-disabled:hover:shadow-(--button-hover-shadow) not-disabled:active:opacity-80 rounded-control px-control-x min-h-(--control-height-big) w-full" href="/checkout/basic" data-testid="tier-cta">Choose Basic</a></div><ul class="row-start-6 mt-block-loose space-y-3" role="list"><li class="flex items-start gap-2"><span data-testid="feature-check-circle" class="mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full check-badge"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check size-[var(--icon-size-xs)] check-glyph" aria-label="Included" role="img"><path d="M20 6 9 17l-5-5"></path></svg></span><span class="text-body font-body leading-normal text-fg text-body-sm text-(--color-fg)">One site</span></li></ul></div></div></div><div class="ailk-pricing-tier-card pricing-card-subgrid" data-testid="pricing-tier-card"><div class="pricing-card-subgrid-body"><div class="h-full rounded-card p-card pricing-card-subgrid border-hairline border-(--color-border) bg-(--color-surface-raised)" data-testid="card"><div class="row-start-1 flex flex-wrap items-center gap-2 justify-between"><h3 class="text-heading-3 font-display text-fg text-2xl font-normal">Business</h3></div><div class="row-start-3 mt-6"><h4 class="text-heading-4 font-display text-fg text-4xl font-medium tracking-tight">$79</h4><span class="text-body font-body leading-normal text-fg mt-1 text-body-sm text-(--color-text-muted)">/month</span></div><div class="row-start-5 mt-6"><a class="inline-flex items-center justify-center gap-2 font-medium motion-safe:transition motion-safe:duration-(--button-hover-duration) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&amp;>svg]:shrink-0 border-hairline border-(--color-border) text-(--color-fg) bg-transparent not-disabled:hover:bg-(--button-hover-quiet-bg) not-disabled:hover:text-(--button-hover-quiet-fg) not-disabled:hover:opacity-(--button-hover-opacity) not-disabled:hover:transform-(--button-hover-transform) not-disabled:hover:shadow-(--button-hover-shadow) not-disabled:active:bg-gray-200 not-disabled:active:text-(--color-fg) rounded-control px-control-x min-h-(--control-height-big) w-full" href="/checkout/business" data-testid="tier-cta">Choose Business</a></div><ul class="row-start-6 mt-block-loose space-y-3" role="list"><li class="flex items-start gap-2"><span data-testid="feature-check-circle" class="mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full check-badge"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check size-[var(--icon-size-xs)] check-glyph" aria-label="Included" role="img"><path d="M20 6 9 17l-5-5"></path></svg></span><span class="text-body font-body leading-normal text-fg text-body-sm text-(--color-fg)">Three sites</span></li></ul></div></div></div><div class="ailk-pricing-tier-card pricing-card-subgrid" data-testid="pricing-tier-card"><div class="pricing-card-subgrid-body"><div class="h-full rounded-card p-card pricing-card-subgrid border-hairline border-(--color-border) bg-(--color-surface-raised)" data-testid="card"><div class="row-start-1 flex flex-wrap items-center gap-2 justify-between"><h3 class="text-heading-3 font-display text-fg text-2xl font-normal">Agency</h3></div><div class="row-start-3 mt-6"><h4 class="text-heading-4 font-display text-fg text-4xl font-medium tracking-tight">$199</h4><span class="text-body font-body leading-normal text-fg mt-1 text-body-sm text-(--color-text-muted)">/month</span></div><div class="row-start-5 mt-6"><a class="inline-flex items-center justify-center gap-2 font-medium motion-safe:transition motion-safe:duration-(--button-hover-duration) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&amp;>svg]:shrink-0 border-hairline border-(--color-border) text-(--color-fg) bg-transparent not-disabled:hover:bg-(--button-hover-quiet-bg) not-disabled:hover:text-(--button-hover-quiet-fg) not-disabled:hover:opacity-(--button-hover-opacity) not-disabled:hover:transform-(--button-hover-transform) not-disabled:hover:shadow-(--button-hover-shadow) not-disabled:active:bg-gray-200 not-disabled:active:text-(--color-fg) rounded-control px-control-x min-h-(--control-height-big) w-full" href="/checkout/agency" data-testid="tier-cta">Choose Agency</a></div><ul class="row-start-6 mt-block-loose space-y-3" role="list"><li class="flex items-start gap-2"><span data-testid="feature-check-circle" class="mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full check-badge"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check size-[var(--icon-size-xs)] check-glyph" aria-label="Included" role="img"><path d="M20 6 9 17l-5-5"></path></svg></span><span class="text-body font-body leading-normal text-fg text-body-sm text-(--color-fg)">Unlimited sites</span></li></ul></div></div></div></div></div></section></div></main>"`;
4
-
5
- exports[`/pricing on an unconnected site is today's page (#8927 AC-4) renders today's DI page for ?plan=agency 1`] = `"<script type="application/ld+json" data-testid="json-ld">{"@context":"https://schema.org","@graph":[{"@context":"https://schema.org","@type":"WebPage","inLanguage":"en","name":"Pricing","description":"Plans for every stage."},{"@context":"https://schema.org","@type":"Offer","name":"Basic","price":"29","priceCurrency":"USD"},{"@context":"https://schema.org","@type":"Offer","name":"Business","price":"79","priceCurrency":"USD"},{"@context":"https://schema.org","@type":"Offer","name":"Agency","price":"199","priceCurrency":"USD"},{"@context":"https://schema.org","@type":"AggregateOffer","priceCurrency":"USD","lowPrice":"29","highPrice":"199","offerCount":3}]}</script><main id="main"><div class="mx-auto w-full max-w-container-xl px-4 md:px-6 lg:px-8 py-section"><h1 class="text-heading-1 lg:text-display-sm font-display text-fg hero-type-display">Pricing</h1><p data-testid="pricing-description" class="mt-block-tight text-lead">Plans for every stage.</p></div><div class="ailk-section-renderer" data-testid="section-renderer"><span id="section-plans" class="ailk-section-anchor" aria-hidden="true" data-testid="section-anchor"></span><section class="py-section bg-(--color-bg)" data-testid="pricing" data-section="pricing"><div class="mx-auto w-full max-w-container-xl px-4 md:px-6 lg:px-8"><span hidden="" data-testid="pricing-recommended-anchor"></span><div class="grid gap-grid md:grid-cols-2 lg:grid-cols-3 mt-10 items-stretch pricing-card-row-grid" data-testid="pricing-grid" data-separation="gapped"><div class="ailk-pricing-tier-card pricing-card-subgrid" data-testid="pricing-tier-card"><div class="pricing-card-subgrid-body"><div class="h-full rounded-card p-card pricing-card-subgrid border-hairline border-(--color-border) bg-(--color-surface-raised)" data-testid="card"><div class="row-start-1 flex flex-wrap items-center gap-2 justify-between"><h3 class="text-heading-3 font-display text-fg text-2xl font-normal">Basic</h3></div><div class="row-start-3 mt-6"><h4 class="text-heading-4 font-display text-fg text-4xl font-medium tracking-tight">$29</h4><span class="text-body font-body leading-normal text-fg mt-1 text-body-sm text-(--color-text-muted)">/month</span></div><div class="row-start-5 mt-6"><a class="inline-flex items-center justify-center gap-2 font-medium motion-safe:transition motion-safe:duration-(--button-hover-duration) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&amp;>svg]:shrink-0 border-hairline border-(--color-border) text-(--color-fg) bg-transparent not-disabled:hover:bg-(--button-hover-quiet-bg) not-disabled:hover:text-(--button-hover-quiet-fg) not-disabled:hover:opacity-(--button-hover-opacity) not-disabled:hover:transform-(--button-hover-transform) not-disabled:hover:shadow-(--button-hover-shadow) not-disabled:active:bg-gray-200 not-disabled:active:text-(--color-fg) rounded-control px-control-x min-h-(--control-height-big) w-full" href="/checkout/basic" data-testid="tier-cta">Choose Basic</a></div><ul class="row-start-6 mt-block-loose space-y-3" role="list"><li class="flex items-start gap-2"><span data-testid="feature-check-circle" class="mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full check-badge"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check size-[var(--icon-size-xs)] check-glyph" aria-label="Included" role="img"><path d="M20 6 9 17l-5-5"></path></svg></span><span class="text-body font-body leading-normal text-fg text-body-sm text-(--color-fg)">One site</span></li></ul></div></div></div><div class="ailk-pricing-tier-card pricing-card-subgrid" data-testid="pricing-tier-card"><div class="pricing-card-subgrid-body"><div class="h-full rounded-card p-card pricing-card-subgrid border-hairline border-(--color-border) bg-(--color-surface-raised)" data-testid="card"><div class="row-start-1 flex flex-wrap items-center gap-2 justify-between"><h3 class="text-heading-3 font-display text-fg text-2xl font-normal">Business</h3></div><div class="row-start-3 mt-6"><h4 class="text-heading-4 font-display text-fg text-4xl font-medium tracking-tight">$79</h4><span class="text-body font-body leading-normal text-fg mt-1 text-body-sm text-(--color-text-muted)">/month</span></div><div class="row-start-5 mt-6"><a class="inline-flex items-center justify-center gap-2 font-medium motion-safe:transition motion-safe:duration-(--button-hover-duration) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&amp;>svg]:shrink-0 border-hairline border-(--color-border) text-(--color-fg) bg-transparent not-disabled:hover:bg-(--button-hover-quiet-bg) not-disabled:hover:text-(--button-hover-quiet-fg) not-disabled:hover:opacity-(--button-hover-opacity) not-disabled:hover:transform-(--button-hover-transform) not-disabled:hover:shadow-(--button-hover-shadow) not-disabled:active:bg-gray-200 not-disabled:active:text-(--color-fg) rounded-control px-control-x min-h-(--control-height-big) w-full" href="/checkout/business" data-testid="tier-cta">Choose Business</a></div><ul class="row-start-6 mt-block-loose space-y-3" role="list"><li class="flex items-start gap-2"><span data-testid="feature-check-circle" class="mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full check-badge"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check size-[var(--icon-size-xs)] check-glyph" aria-label="Included" role="img"><path d="M20 6 9 17l-5-5"></path></svg></span><span class="text-body font-body leading-normal text-fg text-body-sm text-(--color-fg)">Three sites</span></li></ul></div></div></div><div class="ailk-pricing-tier-card pricing-card-subgrid" data-testid="pricing-tier-card" aria-current="true"><div class="pricing-card-subgrid-body"><div class="h-full rounded-card p-card pricing-card-subgrid border-thin border-(--color-brand) bg-(--color-surface-raised)" data-testid="card"><div class="row-start-1 flex flex-wrap items-center gap-2 justify-between"><h3 class="text-heading-3 font-display text-fg text-2xl font-normal">Agency</h3><div class="group inline-flex items-center border-hairline rounded-full transition-colors focus-visible:outline-none bg-(--color-brand) border-transparent text-(--color-fg-on-brand) hover:bg-(--color-brand)/90 focus-visible:bg-(--color-brand)/90 ps-2 pe-2 py-0.5 text-body-sm" data-testid="tier-badge">Recommended for you</div></div><div class="row-start-3 mt-6"><h4 class="text-heading-4 font-display text-fg text-4xl font-medium tracking-tight">$199</h4><span class="text-body font-body leading-normal text-fg mt-1 text-body-sm text-(--color-text-muted)">/month</span></div><div class="row-start-5 mt-6"><a class="inline-flex items-center justify-center gap-2 font-medium motion-safe:transition motion-safe:duration-(--button-hover-duration) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&amp;>svg]:shrink-0 bg-(--color-brand) text-(--color-fg-on-brand) not-disabled:hover:bg-(--button-hover-bg) not-disabled:hover:text-(--button-hover-fg) not-disabled:hover:outline not-disabled:hover:outline-1 not-disabled:hover:-outline-offset-1 not-disabled:hover:outline-(--button-hover-border) not-disabled:hover:opacity-(--button-hover-opacity) not-disabled:hover:transform-(--button-hover-transform) not-disabled:hover:shadow-(--button-hover-shadow) not-disabled:active:opacity-80 rounded-control px-control-x min-h-(--control-height-big) w-full" href="/checkout/agency" data-testid="tier-cta">Choose Agency</a></div><ul class="row-start-6 mt-block-loose space-y-3" role="list"><li class="flex items-start gap-2"><span data-testid="feature-check-circle" class="mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full check-badge"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check size-[var(--icon-size-xs)] check-glyph" aria-label="Included" role="img"><path d="M20 6 9 17l-5-5"></path></svg></span><span class="text-body font-body leading-normal text-fg text-body-sm text-(--color-fg)">Unlimited sites</span></li></ul></div></div></div></div></div></section></div></main>"`;
6
-
7
- exports[`/pricing on an unconnected site is today's page (#8927 AC-4) renders today's DI page for no plan 1`] = `"<script type="application/ld+json" data-testid="json-ld">{"@context":"https://schema.org","@graph":[{"@context":"https://schema.org","@type":"WebPage","inLanguage":"en","name":"Pricing","description":"Plans for every stage."},{"@context":"https://schema.org","@type":"Offer","name":"Basic","price":"29","priceCurrency":"USD"},{"@context":"https://schema.org","@type":"Offer","name":"Business","price":"79","priceCurrency":"USD"},{"@context":"https://schema.org","@type":"Offer","name":"Agency","price":"199","priceCurrency":"USD"},{"@context":"https://schema.org","@type":"AggregateOffer","priceCurrency":"USD","lowPrice":"29","highPrice":"199","offerCount":3}]}</script><main id="main"><div class="mx-auto w-full max-w-container-xl px-4 md:px-6 lg:px-8 py-section"><h1 class="text-heading-1 lg:text-display-sm font-display text-fg hero-type-display">Pricing</h1><p data-testid="pricing-description" class="mt-block-tight text-lead">Plans for every stage.</p></div><div class="ailk-section-renderer" data-testid="section-renderer"><span id="section-plans" class="ailk-section-anchor" aria-hidden="true" data-testid="section-anchor"></span><section class="py-section bg-(--color-bg)" data-testid="pricing" data-section="pricing"><div class="mx-auto w-full max-w-container-xl px-4 md:px-6 lg:px-8"><div class="grid gap-grid md:grid-cols-2 lg:grid-cols-3 mt-10 items-stretch pricing-card-row-grid" data-testid="pricing-grid" data-separation="gapped"><div class="ailk-pricing-tier-card pricing-card-subgrid" data-testid="pricing-tier-card"><div class="pricing-card-subgrid-body"><div class="h-full rounded-card p-card pricing-card-subgrid border-hairline border-(--color-border) bg-(--color-surface-raised)" data-testid="card"><div class="row-start-1 flex flex-wrap items-center gap-2 justify-between"><h3 class="text-heading-3 font-display text-fg text-2xl font-normal">Basic</h3></div><div class="row-start-3 mt-6"><h4 class="text-heading-4 font-display text-fg text-4xl font-medium tracking-tight">$29</h4><span class="text-body font-body leading-normal text-fg mt-1 text-body-sm text-(--color-text-muted)">/month</span></div><div class="row-start-5 mt-6"><a class="inline-flex items-center justify-center gap-2 font-medium motion-safe:transition motion-safe:duration-(--button-hover-duration) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&amp;>svg]:shrink-0 border-hairline border-(--color-border) text-(--color-fg) bg-transparent not-disabled:hover:bg-(--button-hover-quiet-bg) not-disabled:hover:text-(--button-hover-quiet-fg) not-disabled:hover:opacity-(--button-hover-opacity) not-disabled:hover:transform-(--button-hover-transform) not-disabled:hover:shadow-(--button-hover-shadow) not-disabled:active:bg-gray-200 not-disabled:active:text-(--color-fg) rounded-control px-control-x min-h-(--control-height-big) w-full" href="/checkout/basic" data-testid="tier-cta">Choose Basic</a></div><ul class="row-start-6 mt-block-loose space-y-3" role="list"><li class="flex items-start gap-2"><span data-testid="feature-check-circle" class="mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full check-badge"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check size-[var(--icon-size-xs)] check-glyph" aria-label="Included" role="img"><path d="M20 6 9 17l-5-5"></path></svg></span><span class="text-body font-body leading-normal text-fg text-body-sm text-(--color-fg)">One site</span></li></ul></div></div></div><div class="ailk-pricing-tier-card pricing-card-subgrid" data-testid="pricing-tier-card" aria-current="true"><div class="pricing-card-subgrid-body"><div class="h-full rounded-card p-card pricing-card-subgrid border-thin border-(--color-brand) bg-(--color-surface-raised)" data-testid="card"><div class="row-start-1 flex flex-wrap items-center gap-2 justify-between"><h3 class="text-heading-3 font-display text-fg text-2xl font-normal">Business</h3><div class="group inline-flex items-center border-hairline rounded-full transition-colors focus-visible:outline-none bg-(--color-brand) border-transparent text-(--color-fg-on-brand) hover:bg-(--color-brand)/90 focus-visible:bg-(--color-brand)/90 ps-2 pe-2 py-0.5 text-body-sm" data-testid="tier-badge">Recommended</div></div><div class="row-start-3 mt-6"><h4 class="text-heading-4 font-display text-fg text-4xl font-medium tracking-tight">$79</h4><span class="text-body font-body leading-normal text-fg mt-1 text-body-sm text-(--color-text-muted)">/month</span></div><div class="row-start-5 mt-6"><a class="inline-flex items-center justify-center gap-2 font-medium motion-safe:transition motion-safe:duration-(--button-hover-duration) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&amp;>svg]:shrink-0 bg-(--color-brand) text-(--color-fg-on-brand) not-disabled:hover:bg-(--button-hover-bg) not-disabled:hover:text-(--button-hover-fg) not-disabled:hover:outline not-disabled:hover:outline-1 not-disabled:hover:-outline-offset-1 not-disabled:hover:outline-(--button-hover-border) not-disabled:hover:opacity-(--button-hover-opacity) not-disabled:hover:transform-(--button-hover-transform) not-disabled:hover:shadow-(--button-hover-shadow) not-disabled:active:opacity-80 rounded-control px-control-x min-h-(--control-height-big) w-full" href="/checkout/business" data-testid="tier-cta">Choose Business</a></div><ul class="row-start-6 mt-block-loose space-y-3" role="list"><li class="flex items-start gap-2"><span data-testid="feature-check-circle" class="mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full check-badge"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check size-[var(--icon-size-xs)] check-glyph" aria-label="Included" role="img"><path d="M20 6 9 17l-5-5"></path></svg></span><span class="text-body font-body leading-normal text-fg text-body-sm text-(--color-fg)">Three sites</span></li></ul></div></div></div><div class="ailk-pricing-tier-card pricing-card-subgrid" data-testid="pricing-tier-card"><div class="pricing-card-subgrid-body"><div class="h-full rounded-card p-card pricing-card-subgrid border-hairline border-(--color-border) bg-(--color-surface-raised)" data-testid="card"><div class="row-start-1 flex flex-wrap items-center gap-2 justify-between"><h3 class="text-heading-3 font-display text-fg text-2xl font-normal">Agency</h3></div><div class="row-start-3 mt-6"><h4 class="text-heading-4 font-display text-fg text-4xl font-medium tracking-tight">$199</h4><span class="text-body font-body leading-normal text-fg mt-1 text-body-sm text-(--color-text-muted)">/month</span></div><div class="row-start-5 mt-6"><a class="inline-flex items-center justify-center gap-2 font-medium motion-safe:transition motion-safe:duration-(--button-hover-duration) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&amp;>svg]:shrink-0 border-hairline border-(--color-border) text-(--color-fg) bg-transparent not-disabled:hover:bg-(--button-hover-quiet-bg) not-disabled:hover:text-(--button-hover-quiet-fg) not-disabled:hover:opacity-(--button-hover-opacity) not-disabled:hover:transform-(--button-hover-transform) not-disabled:hover:shadow-(--button-hover-shadow) not-disabled:active:bg-gray-200 not-disabled:active:text-(--color-fg) rounded-control px-control-x min-h-(--control-height-big) w-full" href="/checkout/agency" data-testid="tier-cta">Choose Agency</a></div><ul class="row-start-6 mt-block-loose space-y-3" role="list"><li class="flex items-start gap-2"><span data-testid="feature-check-circle" class="mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full check-badge"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check size-[var(--icon-size-xs)] check-glyph" aria-label="Included" role="img"><path d="M20 6 9 17l-5-5"></path></svg></span><span class="text-body font-body leading-normal text-fg text-body-sm text-(--color-fg)">Unlimited sites</span></li></ul></div></div></div></div></div></section></div></main>"`;