@aglyn/plugins-ai 1.0.0-beta.270 → 1.0.0-beta.272

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 (281) hide show
  1. package/package.json +17 -17
  2. package/src/lib/activity/ai-activity-actions.d.ts +4 -3
  3. package/src/lib/activity/ai-activity-actions.js +4 -0
  4. package/src/lib/activity/ai-activity-actions.js.map +1 -1
  5. package/src/lib/assets/site-styles/beauty.webp +0 -0
  6. package/src/lib/assets/site-styles/blog.webp +0 -0
  7. package/src/lib/assets/site-styles/business.webp +0 -0
  8. package/src/lib/assets/site-styles/coming-soon.webp +0 -0
  9. package/src/lib/assets/site-styles/education.webp +0 -0
  10. package/src/lib/assets/site-styles/events.webp +0 -0
  11. package/src/lib/assets/site-styles/fitness.webp +0 -0
  12. package/src/lib/assets/site-styles/landing.webp +0 -0
  13. package/src/lib/assets/site-styles/music.webp +0 -0
  14. package/src/lib/assets/site-styles/nonprofit.webp +0 -0
  15. package/src/lib/assets/site-styles/personal.webp +0 -0
  16. package/src/lib/assets/site-styles/photography.webp +0 -0
  17. package/src/lib/assets/site-styles/portfolio.webp +0 -0
  18. package/src/lib/assets/site-styles/professional.webp +0 -0
  19. package/src/lib/assets/site-styles/realestate.webp +0 -0
  20. package/src/lib/assets/site-styles/restaurant.webp +0 -0
  21. package/src/lib/assets/site-styles/store.webp +0 -0
  22. package/src/lib/assets/site-styles/studio.webp +0 -0
  23. package/src/lib/assets/site-styles/trades.webp +0 -0
  24. package/src/lib/assets/site-styles/wellness.webp +0 -0
  25. package/src/lib/assets/site-styles/yoga.webp +0 -0
  26. package/src/lib/components/ai-credits-card.component.d.ts +4 -3
  27. package/src/lib/components/ai-credits-card.component.js +15 -15
  28. package/src/lib/components/ai-credits-card.component.js.map +1 -1
  29. package/src/lib/components/ai-job-input-form.component.d.ts +36 -0
  30. package/src/lib/components/ai-job-input-form.component.js +100 -0
  31. package/src/lib/components/ai-job-input-form.component.js.map +1 -0
  32. package/src/lib/components/ai-job-requests.d.ts +4 -0
  33. package/src/lib/components/ai-job-requests.js +4 -0
  34. package/src/lib/components/ai-job-requests.js.map +1 -1
  35. package/src/lib/components/ai-site-build-page.component.js +18 -0
  36. package/src/lib/components/ai-site-build-page.component.js.map +1 -1
  37. package/src/lib/components/ai-site-import-job.component.d.ts +41 -0
  38. package/src/lib/components/ai-site-import-job.component.js +707 -0
  39. package/src/lib/components/ai-site-import-job.component.js.map +1 -0
  40. package/src/lib/components/ai-site-import-start.component.d.ts +64 -0
  41. package/src/lib/components/ai-site-import-start.component.js +335 -0
  42. package/src/lib/components/ai-site-import-start.component.js.map +1 -0
  43. package/src/lib/components/ai-site-ownership-proof.component.d.ts +42 -0
  44. package/src/lib/components/ai-site-ownership-proof.component.js +353 -0
  45. package/src/lib/components/ai-site-ownership-proof.component.js.map +1 -0
  46. package/src/lib/components/ai-site-start-card.component.d.ts +1 -1
  47. package/src/lib/components/ai-site-start-card.component.js +261 -119
  48. package/src/lib/components/ai-site-start-card.component.js.map +1 -1
  49. package/src/lib/components/ai-site-start-steps.component.d.ts +43 -2
  50. package/src/lib/components/ai-site-start-steps.component.js +651 -15
  51. package/src/lib/components/ai-site-start-steps.component.js.map +1 -1
  52. package/src/lib/components/ai-site-start-tracking.d.ts +10 -0
  53. package/src/lib/components/ai-site-start-tracking.js +14 -0
  54. package/src/lib/components/ai-site-start-tracking.js.map +1 -1
  55. package/src/lib/components/ai-site-style-previews.js +26 -22
  56. package/src/lib/components/ai-site-style-previews.js.map +1 -1
  57. package/src/lib/components/ai-upsell-dialog.component.d.ts +7 -5
  58. package/src/lib/components/ai-upsell-dialog.component.js +8 -6
  59. package/src/lib/components/ai-upsell-dialog.component.js.map +1 -1
  60. package/src/lib/components/assist-build-card.component.js +11 -1
  61. package/src/lib/components/assist-build-card.component.js.map +1 -1
  62. package/src/lib/components/assist-jobs-drawer.component.js +9 -1
  63. package/src/lib/components/assist-jobs-drawer.component.js.map +1 -1
  64. package/src/lib/components/assist-panel.component.js +8 -4
  65. package/src/lib/components/assist-panel.component.js.map +1 -1
  66. package/src/lib/components/staff-org-ai-card.component.js +4 -7
  67. package/src/lib/components/staff-org-ai-card.component.js.map +1 -1
  68. package/src/lib/declarations.d.ts +2 -2
  69. package/src/lib/declarations.js +9 -5
  70. package/src/lib/declarations.js.map +1 -1
  71. package/src/lib/jobs/ai-build-capabilities.js +3 -1
  72. package/src/lib/jobs/ai-build-capabilities.js.map +1 -1
  73. package/src/lib/jobs/ai-business-profile-prefill.d.ts +1 -1
  74. package/src/lib/jobs/ai-business-profile-prefill.js +14 -3
  75. package/src/lib/jobs/ai-business-profile-prefill.js.map +1 -1
  76. package/src/lib/jobs/ai-job-build-step.js +5 -3
  77. package/src/lib/jobs/ai-job-build-step.js.map +1 -1
  78. package/src/lib/jobs/ai-job-drafts.d.ts +14 -0
  79. package/src/lib/jobs/ai-job-drafts.js +24 -0
  80. package/src/lib/jobs/ai-job-drafts.js.map +1 -1
  81. package/src/lib/jobs/ai-job-form-step.d.ts +15 -1
  82. package/src/lib/jobs/ai-job-form-step.js +75 -8
  83. package/src/lib/jobs/ai-job-form-step.js.map +1 -1
  84. package/src/lib/jobs/ai-job-import-step.d.ts +136 -0
  85. package/src/lib/jobs/ai-job-import-step.js +809 -0
  86. package/src/lib/jobs/ai-job-import-step.js.map +1 -0
  87. package/src/lib/jobs/ai-job-page-language.d.ts +52 -1
  88. package/src/lib/jobs/ai-job-page-language.js +99 -5
  89. package/src/lib/jobs/ai-job-page-language.js.map +1 -1
  90. package/src/lib/jobs/ai-job-page-step.d.ts +19 -2
  91. package/src/lib/jobs/ai-job-page-step.js +42 -18
  92. package/src/lib/jobs/ai-job-page-step.js.map +1 -1
  93. package/src/lib/jobs/ai-job-plan-step.d.ts +25 -2
  94. package/src/lib/jobs/ai-job-plan-step.js +103 -29
  95. package/src/lib/jobs/ai-job-plan-step.js.map +1 -1
  96. package/src/lib/jobs/ai-job-settings-step.js +4 -3
  97. package/src/lib/jobs/ai-job-settings-step.js.map +1 -1
  98. package/src/lib/jobs/ai-job-site-datasets.d.ts +27 -0
  99. package/src/lib/jobs/ai-job-site-datasets.js +140 -14
  100. package/src/lib/jobs/ai-job-site-datasets.js.map +1 -1
  101. package/src/lib/jobs/ai-job-site-look.js +18 -5
  102. package/src/lib/jobs/ai-job-site-look.js.map +1 -1
  103. package/src/lib/jobs/ai-job-site-step.d.ts +16 -1
  104. package/src/lib/jobs/ai-job-site-step.js +95 -22
  105. package/src/lib/jobs/ai-job-site-step.js.map +1 -1
  106. package/src/lib/jobs/ai-job-text-step.d.ts +15 -1
  107. package/src/lib/jobs/ai-job-text-step.js.map +1 -1
  108. package/src/lib/jobs/ai-job-tracking-step.d.ts +14 -3
  109. package/src/lib/jobs/ai-job-tracking-step.js +28 -5
  110. package/src/lib/jobs/ai-job-tracking-step.js.map +1 -1
  111. package/src/lib/jobs/ai-jobs.d.ts +13 -1
  112. package/src/lib/jobs/ai-jobs.js +77 -10
  113. package/src/lib/jobs/ai-jobs.js.map +1 -1
  114. package/src/lib/jobs/ai-layout-owner-photos.d.ts +16 -1
  115. package/src/lib/jobs/ai-layout-owner-photos.js +47 -0
  116. package/src/lib/jobs/ai-layout-owner-photos.js.map +1 -1
  117. package/src/lib/jobs/ai-layout-stock-photos.d.ts +27 -2
  118. package/src/lib/jobs/ai-layout-stock-photos.js +190 -19
  119. package/src/lib/jobs/ai-layout-stock-photos.js.map +1 -1
  120. package/src/lib/jobs/ai-site-inspiration-signals.d.ts +98 -0
  121. package/src/lib/jobs/ai-site-inspiration-signals.js +585 -0
  122. package/src/lib/jobs/ai-site-inspiration-signals.js.map +1 -0
  123. package/src/lib/jobs/ai-site-inspiration.d.ts +157 -0
  124. package/src/lib/jobs/ai-site-inspiration.js +346 -0
  125. package/src/lib/jobs/ai-site-inspiration.js.map +1 -0
  126. package/src/lib/jobs/ai-site-publish.d.ts +26 -1
  127. package/src/lib/jobs/ai-site-publish.js +162 -13
  128. package/src/lib/jobs/ai-site-publish.js.map +1 -1
  129. package/src/lib/jobs/ai-theme-brand-inputs.d.ts +77 -3
  130. package/src/lib/jobs/ai-theme-brand-inputs.js +135 -31
  131. package/src/lib/jobs/ai-theme-brand-inputs.js.map +1 -1
  132. package/src/lib/jobs/fixtures/ai-candle-shop-free-plan-recording.d.ts +97 -0
  133. package/src/lib/jobs/fixtures/ai-candle-shop-free-plan-recording.js +137 -0
  134. package/src/lib/jobs/fixtures/ai-candle-shop-free-plan-recording.js.map +1 -0
  135. package/src/lib/jobs/fixtures/ai-site-inspiration-pages.d.ts +38 -0
  136. package/src/lib/jobs/fixtures/ai-site-inspiration-pages.js +103 -0
  137. package/src/lib/jobs/fixtures/ai-site-inspiration-pages.js.map +1 -0
  138. package/src/lib/jobs/fixtures/ai-stock-photo-agl3988-recordings.d.ts +25 -0
  139. package/src/lib/jobs/fixtures/ai-stock-photo-agl3988-recordings.js +174 -0
  140. package/src/lib/jobs/fixtures/ai-stock-photo-agl3988-recordings.js.map +1 -0
  141. package/src/lib/layout-language/ai-layout-compiler.d.ts +1 -1
  142. package/src/lib/layout-language/ai-layout-compiler.js +438 -25
  143. package/src/lib/layout-language/ai-layout-compiler.js.map +1 -1
  144. package/src/lib/layout-language/ai-layout-contact.d.ts +57 -0
  145. package/src/lib/layout-language/ai-layout-contact.js +137 -0
  146. package/src/lib/layout-language/ai-layout-contact.js.map +1 -0
  147. package/src/lib/layout-language/ai-layout-copy.d.ts +12 -0
  148. package/src/lib/layout-language/ai-layout-copy.js +34 -2
  149. package/src/lib/layout-language/ai-layout-copy.js.map +1 -1
  150. package/src/lib/layout-language/ai-layout-design.d.ts +65 -8
  151. package/src/lib/layout-language/ai-layout-design.js +411 -97
  152. package/src/lib/layout-language/ai-layout-design.js.map +1 -1
  153. package/src/lib/layout-language/ai-layout-frame.js +23 -0
  154. package/src/lib/layout-language/ai-layout-frame.js.map +1 -1
  155. package/src/lib/layout-language/ai-layout-labels.d.ts +2 -0
  156. package/src/lib/layout-language/ai-layout-labels.js +12 -6
  157. package/src/lib/layout-language/ai-layout-labels.js.map +1 -1
  158. package/src/lib/layout-language/ai-layout-language.d.ts +3 -2
  159. package/src/lib/layout-language/ai-layout-language.js +4 -3
  160. package/src/lib/layout-language/ai-layout-language.js.map +1 -1
  161. package/src/lib/layout-language/ai-layout-links.d.ts +13 -0
  162. package/src/lib/layout-language/ai-layout-links.js +30 -0
  163. package/src/lib/layout-language/ai-layout-links.js.map +1 -1
  164. package/src/lib/layout-language/ai-layout-pictures.d.ts +49 -6
  165. package/src/lib/layout-language/ai-layout-pictures.js +145 -22
  166. package/src/lib/layout-language/ai-layout-pictures.js.map +1 -1
  167. package/src/lib/model/ai-build-job.d.ts +16 -1
  168. package/src/lib/model/ai-build-job.js +40 -0
  169. package/src/lib/model/ai-build-job.js.map +1 -1
  170. package/src/lib/model/ai-credit-estimate.d.ts +20 -0
  171. package/src/lib/model/ai-credit-estimate.js +13 -0
  172. package/src/lib/model/ai-credit-estimate.js.map +1 -1
  173. package/src/lib/model/ai-job-activity.d.ts +2 -2
  174. package/src/lib/model/ai-job-activity.js +6 -4
  175. package/src/lib/model/ai-job-activity.js.map +1 -1
  176. package/src/lib/model/ai-job-input.d.ts +33 -0
  177. package/src/lib/model/ai-job-input.js +59 -0
  178. package/src/lib/model/ai-job-input.js.map +1 -0
  179. package/src/lib/model/ai-job-notice.d.ts +4 -0
  180. package/src/lib/model/ai-job-notice.js +28 -4
  181. package/src/lib/model/ai-job-notice.js.map +1 -1
  182. package/src/lib/model/ai-jobs.types.d.ts +69 -3
  183. package/src/lib/model/ai-jobs.types.js +2 -1
  184. package/src/lib/model/ai-jobs.types.js.map +1 -1
  185. package/src/lib/model/ai-site-details.d.ts +122 -0
  186. package/src/lib/model/ai-site-details.js +300 -0
  187. package/src/lib/model/ai-site-details.js.map +1 -0
  188. package/src/lib/model/ai-site-entity.d.ts +181 -0
  189. package/src/lib/model/ai-site-entity.js +390 -0
  190. package/src/lib/model/ai-site-entity.js.map +1 -0
  191. package/src/lib/model/ai-site-import-view.d.ts +130 -0
  192. package/src/lib/model/ai-site-import-view.js +182 -0
  193. package/src/lib/model/ai-site-import-view.js.map +1 -0
  194. package/src/lib/model/ai-site-import.d.ts +302 -0
  195. package/src/lib/model/ai-site-import.js +526 -0
  196. package/src/lib/model/ai-site-import.js.map +1 -0
  197. package/src/lib/model/ai-site-inspiration.d.ts +72 -0
  198. package/src/lib/model/ai-site-inspiration.js +109 -0
  199. package/src/lib/model/ai-site-inspiration.js.map +1 -0
  200. package/src/lib/model/ai-site-job.d.ts +13 -1
  201. package/src/lib/model/ai-site-job.js +15 -2
  202. package/src/lib/model/ai-site-job.js.map +1 -1
  203. package/src/lib/model/ai-site-kinds.js +109 -21
  204. package/src/lib/model/ai-site-kinds.js.map +1 -1
  205. package/src/lib/model/ai-site-look.d.ts +10 -0
  206. package/src/lib/model/ai-site-look.js +24 -0
  207. package/src/lib/model/ai-site-look.js.map +1 -1
  208. package/src/lib/model/ai-site-start-seo.d.ts +19 -5
  209. package/src/lib/model/ai-site-start-seo.js +25 -7
  210. package/src/lib/model/ai-site-start-seo.js.map +1 -1
  211. package/src/lib/model/ai-site-start-steps.d.ts +9 -3
  212. package/src/lib/model/ai-site-start-steps.js +67 -5
  213. package/src/lib/model/ai-site-start-steps.js.map +1 -1
  214. package/src/lib/model/ai-site-start.d.ts +81 -4
  215. package/src/lib/model/ai-site-start.js +207 -13
  216. package/src/lib/model/ai-site-start.js.map +1 -1
  217. package/src/lib/model/ai-upsell-copy.js +4 -1
  218. package/src/lib/model/ai-upsell-copy.js.map +1 -1
  219. package/src/lib/plan-entitlements.d.ts +4 -3
  220. package/src/lib/plan-entitlements.js +3 -8
  221. package/src/lib/plan-entitlements.js.map +1 -1
  222. package/src/lib/runtime/ai-dataset-generation.d.ts +8 -1
  223. package/src/lib/runtime/ai-dataset-generation.js +12 -2
  224. package/src/lib/runtime/ai-dataset-generation.js.map +1 -1
  225. package/src/lib/runtime/ai-doctrine-validators.d.ts +26 -33
  226. package/src/lib/runtime/ai-doctrine-validators.js +54 -44
  227. package/src/lib/runtime/ai-doctrine-validators.js.map +1 -1
  228. package/src/lib/runtime/ai-doctrine.js +1 -1
  229. package/src/lib/runtime/ai-doctrine.js.map +1 -1
  230. package/src/lib/runtime/ai-node-tree.d.ts +7 -0
  231. package/src/lib/runtime/ai-node-tree.js +9 -1
  232. package/src/lib/runtime/ai-node-tree.js.map +1 -1
  233. package/src/lib/server/ai-create-route.d.ts +1 -1
  234. package/src/lib/server/ai-create-route.js +3 -4
  235. package/src/lib/server/ai-create-route.js.map +1 -1
  236. package/src/lib/server/ai-jobs-resume.js +27 -3
  237. package/src/lib/server/ai-jobs-resume.js.map +1 -1
  238. package/src/lib/server/ai-jobs-route.js +18 -0
  239. package/src/lib/server/ai-jobs-route.js.map +1 -1
  240. package/src/lib/server/ai-site-import-route.d.ts +89 -0
  241. package/src/lib/server/ai-site-import-route.js +356 -0
  242. package/src/lib/server/ai-site-import-route.js.map +1 -0
  243. package/src/lib/server.js +14 -0
  244. package/src/lib/server.js.map +1 -1
  245. package/src/lib/site-import/fixtures/site-import-crawl-recordings.d.ts +45 -0
  246. package/src/lib/site-import/fixtures/site-import-crawl-recordings.js +313 -0
  247. package/src/lib/site-import/fixtures/site-import-crawl-recordings.js.map +1 -0
  248. package/src/lib/site-import/fixtures/site-import-wave-recordings.d.ts +50 -0
  249. package/src/lib/site-import/fixtures/site-import-wave-recordings.js +217 -0
  250. package/src/lib/site-import/fixtures/site-import-wave-recordings.js.map +1 -0
  251. package/src/lib/site-import/site-import-crawl.d.ts +163 -0
  252. package/src/lib/site-import/site-import-crawl.js +467 -0
  253. package/src/lib/site-import/site-import-crawl.js.map +1 -0
  254. package/src/lib/site-import/site-import-flag.d.ts +23 -0
  255. package/src/lib/site-import/site-import-flag.js +23 -0
  256. package/src/lib/site-import/site-import-flag.js.map +1 -0
  257. package/src/lib/site-import/site-import-html.d.ts +94 -0
  258. package/src/lib/site-import/site-import-html.js +462 -0
  259. package/src/lib/site-import/site-import-html.js.map +1 -0
  260. package/src/lib/site-import/site-import-images.d.ts +54 -0
  261. package/src/lib/site-import/site-import-images.js +204 -0
  262. package/src/lib/site-import/site-import-images.js.map +1 -0
  263. package/src/lib/site-import/site-import-page.d.ts +48 -0
  264. package/src/lib/site-import/site-import-page.js +150 -0
  265. package/src/lib/site-import/site-import-page.js.map +1 -0
  266. package/src/lib/site-import/site-import-review.d.ts +40 -0
  267. package/src/lib/site-import/site-import-review.js +149 -0
  268. package/src/lib/site-import/site-import-review.js.map +1 -0
  269. package/src/lib/site-import/site-import-robots.d.ts +52 -0
  270. package/src/lib/site-import/site-import-robots.js +126 -0
  271. package/src/lib/site-import/site-import-robots.js.map +1 -0
  272. package/src/lib/usage/assist-credits.d.ts +4 -4
  273. package/src/lib/usage/assist-credits.js +4 -4
  274. package/src/lib/usage/assist-credits.js.map +1 -1
  275. package/src/lib/usage/staff-org-ai-view.js +6 -3
  276. package/src/lib/usage/staff-org-ai-view.js.map +1 -1
  277. package/src/lib/usage/staff-org-ai.d.ts +4 -2
  278. package/src/lib/usage/staff-org-ai.js +7 -7
  279. package/src/lib/usage/staff-org-ai.js.map +1 -1
  280. package/src/lib/usage/staff-org-usage-ai.js +2 -2
  281. package/src/lib/usage/staff-org-usage-ai.js.map +1 -1
@@ -19,9 +19,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
19
  import { lockdownRefusalText, parseLockdownRefusal, PLATFORM_BRAND_NAME } from "@aglyn/aglyn";
20
20
  import { trackEvent } from "@aglyn/aglyn/app-utils/analytics-events";
21
21
  import { ICON_VARIANT_CLOSE } from "@aglyn/shared-data-enums";
22
- import { mdiCreation, mdiPageLayoutHeaderFooter } from "@aglyn/shared-data-mdi";
22
+ import { mdiCreation, mdiPageLayoutHeaderFooter, mdiWebSync } from "@aglyn/shared-data-mdi";
23
23
  import { pluginDocsHelp } from "@aglyn/aglyn/app-utils/docs-help";
24
24
  import { HelpTip, MdiIcon } from "@aglyn/shared-ui-jsx";
25
+ import BlockedControl from "@aglyn/shared-ui-jsx/components/blocked-control.component";
26
+ import { PrerequisiteNotice } from "@aglyn/shared-ui-jsx/components/prerequisite-notice.component";
25
27
  import { authorizedFetch } from "@aglyn/shared-util-http/authorized-token";
26
28
  import { useUser } from "@aglyn/tenant-feature-instance";
27
29
  import { Alert, AppBar, Box, Button, Card, CardActionArea, Chip, CircularProgress, Container, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, IconButton, Stack, Toolbar, Typography, useMediaQuery } from "@mui/material";
@@ -32,17 +34,20 @@ import { AI_JOB_AUTO_CONFIRM_INPUT, AI_SITE_FREE_PAGES, aiFreeCreditsNoneLeftTex
32
34
  import { FREE_AI_TASTE_CREDITS_PER_MONTH } from "../plan-entitlements.js";
33
35
  import { AI_CREDITS_CONFIRM_CODE, aiCreditRangeText } from "../model/ai-credit-estimate.js";
34
36
  import { AiCreditsPromptNotice } from "./ai-credits-prompt.component.js";
35
- import { AI_SITE_START_ANSWERS, aiSiteStartBrief, aiSiteStartInputs, aiSiteStartRefusal } from "../model/ai-site-start.js";
36
- import { aiSiteStartFieldErrors, aiSiteStartFirstInvalidStep, aiSiteStartNextStep, aiSiteStartPreviousStep, aiSiteStartStepErrors, aiSiteStartStepIndex, AI_SITE_START_STEP_FIELDS } from "../model/ai-site-start-steps.js";
37
+ import { AI_SITE_START_ANSWERS, aiSiteStartAnswersFromClientBuild, aiSiteStartBrief, aiSiteStartClientBrief, aiSiteStartClientInputs, aiSiteStartClientNote, aiSiteStartExtrasGiven, aiSiteStartInputs, aiSiteStartRefusal } from "../model/ai-site-start.js";
38
+ import { aiSiteInspirationLimit } from "../model/ai-site-inspiration.js";
39
+ import { aiSiteStartFieldErrors, aiSiteStartFirstInvalidStep, aiSiteStartNextStep, aiSiteStartPreviousStep, aiSiteStartStepErrors, aiSiteStartStepIndex, AI_SITE_START_STEPS, AI_SITE_START_STEP_FIELDS } from "../model/ai-site-start-steps.js";
37
40
  import { aiSiteKindOfInputs } from "../model/ai-site-kinds.js";
38
41
  import { aiSiteStartClickOf, useAiSiteStartTracking } from "./ai-site-start-tracking.js";
39
- import { AudienceStep, DetailsStep, KindStep, ReviewStep, StartProgress, StepHelp, StyleStep } from "./ai-site-start-steps.component.js";
42
+ import { AudienceStep, DetailsStep, KindStep, MoreDetails, ReviewStep, StartProgress, StepHelp, StyleStep } from "./ai-site-start-steps.component.js";
40
43
  import { AiJobFollow } from "./ai-job-follow.component.js";
41
44
  import { AiModelSelector } from "./ai-model-selector.component.js";
42
45
  import { useAiModelChoice } from "./use-ai-model-choice.js";
43
46
  import { aiCreditsBillingHref, aiSiteBuildHref } from "./ai-job-links.js";
44
47
  import { publishAiJob } from "./ai-jobs-store.js";
45
48
  import { clearAiSiteStartAnswers, readAiSiteStartAnswers } from "../model/ai-site-start-handoff.js";
49
+ import { AiSiteImportStart } from "./ai-site-import-start.component.js";
50
+ import { aiSiteImportOfferOf } from "../model/ai-site-import-view.js";
46
51
  /** Labels the dialog for a reader, from its own heading. */ const TITLE_ID = 'ai-site-start-title';
47
52
  /**
48
53
  * The takeover's surface, for its paper, its bar and its footer alike: the
@@ -71,7 +76,7 @@ import { clearAiSiteStartAnswers, readAiSiteStartAnswers } from "../model/ai-sit
71
76
  /**
72
77
  * One way to start, as a card the whole of which is the button. Its accessible
73
78
  * name is its title; its description describes it.
74
- */ function ChoiceCard({ accent, icon, iconId, title, description, busy = false, onChoose, children }) {
79
+ */ function ChoiceCard({ accent, icon, iconId, title, description, busy = false, blocked = null, onChoose, children }) {
75
80
  const id = useId();
76
81
  return /*#__PURE__*/ _jsx(Card, {
77
82
  variant: "outlined",
@@ -97,52 +102,57 @@ import { clearAiSiteStartAnswers, readAiSiteStartAnswers } from "../model/ai-sit
97
102
  }
98
103
  }
99
104
  }),
100
- children: /*#__PURE__*/ _jsx(CardActionArea, {
101
- onClick: onChoose,
102
- disabled: busy,
103
- "aria-labelledby": `${id}-title`,
104
- "aria-describedby": `${id}-description`,
105
- "aria-busy": busy || undefined,
106
- sx: {
107
- height: '100%',
108
- p: {
109
- xs: 3,
110
- sm: 4
111
- }
112
- },
113
- children: /*#__PURE__*/ _jsxs(Stack, {
114
- spacing: 2,
105
+ children: /*#__PURE__*/ _jsx(BlockedControl, {
106
+ blocked: Boolean(blocked),
107
+ reason: blocked != null ? blocked : '',
108
+ fullWidth: true,
109
+ children: /*#__PURE__*/ _jsx(CardActionArea, {
110
+ onClick: onChoose,
111
+ disabled: busy,
112
+ "aria-labelledby": `${id}-title`,
113
+ "aria-describedby": `${id}-description`,
114
+ "aria-busy": busy || undefined,
115
115
  sx: {
116
- alignItems: 'center',
117
- textAlign: 'center'
116
+ height: '100%',
117
+ p: {
118
+ xs: 3,
119
+ sm: 4
120
+ }
118
121
  },
119
- children: [
120
- /*#__PURE__*/ _jsx(IconBadge, {
121
- accent: accent,
122
- children: busy ? /*#__PURE__*/ _jsx(CircularProgress, {
123
- size: "1em",
124
- color: accent,
125
- "aria-label": `${title}…`
126
- }) : /*#__PURE__*/ _jsx(MdiIcon, {
127
- path: icon,
128
- "data-icon": iconId,
129
- "aria-hidden": true
130
- })
131
- }),
132
- /*#__PURE__*/ _jsx(Typography, {
133
- id: `${id}-title`,
134
- variant: "h6",
135
- component: "h2",
136
- children: title
137
- }),
138
- /*#__PURE__*/ _jsx(Typography, {
139
- id: `${id}-description`,
140
- variant: "body2",
141
- color: "text.secondary",
142
- children: description
143
- }),
144
- children
145
- ]
122
+ children: /*#__PURE__*/ _jsxs(Stack, {
123
+ spacing: 2,
124
+ sx: {
125
+ alignItems: 'center',
126
+ textAlign: 'center'
127
+ },
128
+ children: [
129
+ /*#__PURE__*/ _jsx(IconBadge, {
130
+ accent: accent,
131
+ children: busy ? /*#__PURE__*/ _jsx(CircularProgress, {
132
+ size: "1em",
133
+ color: accent,
134
+ "aria-label": `${title}…`
135
+ }) : /*#__PURE__*/ _jsx(MdiIcon, {
136
+ path: icon,
137
+ "data-icon": iconId,
138
+ "aria-hidden": true
139
+ })
140
+ }),
141
+ /*#__PURE__*/ _jsx(Typography, {
142
+ id: `${id}-title`,
143
+ variant: "h6",
144
+ component: "h2",
145
+ children: title
146
+ }),
147
+ /*#__PURE__*/ _jsx(Typography, {
148
+ id: `${id}-description`,
149
+ variant: "body2",
150
+ color: "text.secondary",
151
+ children: description
152
+ }),
153
+ children
154
+ ]
155
+ })
146
156
  })
147
157
  })
148
158
  });
@@ -192,8 +202,8 @@ function SectionLabel({ children, help }) {
192
202
  * held, and only the review turns them into the job, through the same
193
203
  * `aiSiteStartBrief` and `aiSiteStartInputs`. Each step is reported as a
194
204
  * funnel, with where people struggle (`ai-site-start-tracking.ts`).
195
- */ export function AiSiteStartCard({ hostId, orgId, orgSlug, host, startBlank, leave, pendingSite, initialAnswers = null }) {
196
- var _ref, _ref1, _ref2, _aiFreeSitePrompt;
205
+ */ export function AiSiteStartCard({ hostId, orgId, orgSlug, host, startBlank, leave, pendingSite, clientBuild, initialAnswers = null }) {
206
+ var _ref, _ref1, _ref2, _ref3, _aiFreeSitePrompt;
197
207
  var _aiSiteKindOfInputs, _modelChoice_options_options_find, _modelChoice_options;
198
208
  const { data: user } = useUser();
199
209
  const router = useRouter();
@@ -208,11 +218,21 @@ function SectionLabel({ children, help }) {
208
218
  // the site does not exist yet. It opens on the first question, where the
209
219
  // site's name and address are asked, with every answer after it filled in.
210
220
  const [handedOff] = useState(()=>pendingSite && !initialAnswers ? readAiSiteStartAnswers() : null);
221
+ // A site staff are building for a client (AGL-3958): the intake answered
222
+ // the questions already, so the start opens on the review with them, and
223
+ // stays on this screen once it has started. Read once, like a reopened start.
224
+ const [clientAnswers] = useState(()=>clientBuild && !initialAnswers ? aiSiteStartAnswersFromClientBuild(clientBuild.intake) : null);
225
+ const [clientIntake] = useState(()=>{
226
+ var _ref;
227
+ return (_ref = clientBuild == null ? void 0 : clientBuild.intake) != null ? _ref : null;
228
+ });
229
+ const clientBuildRef = useRef(clientBuild);
230
+ clientBuildRef.current = clientBuild;
211
231
  // Read once: a start reopened on its answers stays one while it is open.
212
- const reopened = useRef(initialAnswers !== null || handedOff !== null);
232
+ const reopened = useRef(initialAnswers !== null || handedOff !== null || clientAnswers !== null);
213
233
  // A start reopened on its answers opens on the review, every answer there to change.
214
- const [step, setStep] = useState(initialAnswers ? 'review' : 'choose');
215
- const [answers, setAnswers] = useState((_ref1 = initialAnswers != null ? initialAnswers : handedOff) != null ? _ref1 : AI_SITE_START_ANSWERS);
234
+ const [step, setStep] = useState(initialAnswers || clientAnswers ? 'review' : 'choose');
235
+ const [answers, setAnswers] = useState((_ref1 = (_ref2 = initialAnswers != null ? initialAnswers : clientAnswers) != null ? _ref2 : handedOff) != null ? _ref1 : AI_SITE_START_ANSWERS);
216
236
  // The steps whose reasons not to go forward are shown: the ones Next was refused on.
217
237
  const [checked, setChecked] = useState(()=>new Set());
218
238
  // A step opened from the review's Edit goes back to the review on Next.
@@ -232,6 +252,9 @@ function SectionLabel({ children, help }) {
232
252
  /** The site job "Plan my site" started, as the create door answered with it. */ const [started, setStarted] = useState(null);
233
253
  // The Free taste's page band (AGL-3594), read off the verdict request.
234
254
  const [freeTaste, setFreeTaste] = useState(false);
255
+ // Whether the Style step asks for the sites the person likes (AGL-3975),
256
+ // read off the same verdict request: `release_ai_site_inspiration`.
257
+ const [siteInspiration, setSiteInspiration] = useState(false);
235
258
  // What the Free workspace has left this month (AGL-3660), as the same read
236
259
  // the create door refuses on: the less of its own band and its owner's
237
260
  // allowance across their Free workspaces. `null` when the route said none.
@@ -249,16 +272,24 @@ function SectionLabel({ children, help }) {
249
272
  const creating = Boolean(pendingSite) && !(pendingSite == null ? void 0 : pendingSite.created);
250
273
  // The funnel (AGL-3898): each step drawn, left and abandoned, and where people struggle.
251
274
  const tracker = useAiSiteStartTracking(step, verdict === 'ready');
275
+ // "Bring my site" (AGL-3976): asked of its own door, absent while its flag
276
+ // is off, drawn disabled with the reason where the workspace can change it.
277
+ const [importAvailability, setImportAvailability] = useState({
278
+ state: 'checking'
279
+ });
280
+ const [importing, setImporting] = useState(false);
252
281
  useEffect(()=>{
253
282
  if (!orgId || !uid) return;
254
283
  let active = true;
255
284
  void (async ()=>{
256
285
  try {
257
- const response = await authorizedFetch(userRef.current, `/api/ai/jobs?orgId=${encodeURIComponent(orgId)}&limit=1`);
286
+ const response = await authorizedFetch(userRef.current, // `siteImport=1`: whether "Bring my site" is offered here (AGL-3976), on the same read.
287
+ `/api/ai/jobs?orgId=${encodeURIComponent(orgId)}&limit=1&siteImport=1`);
258
288
  const payload = response.ok ? await response.json().catch(()=>null) : null;
259
289
  if (active) {
260
290
  var // "Create site" shows its own dialog when this one will not draw.
261
- _pendingRef_current;
291
+ _pendingRef_current, _clientBuildRef_current_ready, _clientBuildRef_current;
292
+ setSiteInspiration((payload == null ? void 0 : payload.siteInspiration) === true);
262
293
  if ((payload == null ? void 0 : payload.freeTaste) === true) {
263
294
  setFreeTaste(true);
264
295
  const credits = payload == null ? void 0 : payload.freeCredits;
@@ -270,14 +301,17 @@ function SectionLabel({ children, help }) {
270
301
  }));
271
302
  }
272
303
  const shown = response.status !== 404 && response.status !== 403;
304
+ setImportAvailability(aiSiteImportOfferOf(payload == null ? void 0 : payload.siteImport));
273
305
  setVerdict(shown ? 'ready' : 'hidden');
274
306
  (_pendingRef_current = pendingRef.current) == null ? void 0 : _pendingRef_current.ready(shown);
307
+ (_clientBuildRef_current = clientBuildRef.current) == null ? void 0 : (_clientBuildRef_current_ready = _clientBuildRef_current.ready) == null ? void 0 : _clientBuildRef_current_ready.call(_clientBuildRef_current, shown);
275
308
  }
276
309
  } catch (unused) {
277
310
  if (active) {
278
- var _pendingRef_current1;
311
+ var _pendingRef_current1, _clientBuildRef_current_ready1, _clientBuildRef_current1;
279
312
  setVerdict('hidden');
280
313
  (_pendingRef_current1 = pendingRef.current) == null ? void 0 : _pendingRef_current1.ready(false);
314
+ (_clientBuildRef_current1 = clientBuildRef.current) == null ? void 0 : (_clientBuildRef_current_ready1 = _clientBuildRef_current1.ready) == null ? void 0 : _clientBuildRef_current_ready1.call(_clientBuildRef_current1, false);
281
315
  }
282
316
  }
283
317
  })();
@@ -301,7 +335,7 @@ function SectionLabel({ children, help }) {
301
335
  answers.pages
302
336
  ]);
303
337
  // A store's first products and a blog's first posts are part of the start (AGL-3676, AGL-3798).
304
- const siteKind = (_ref2 = (_aiSiteKindOfInputs = aiSiteKindOfInputs(aiSiteStartInputs(answers))) == null ? void 0 : _aiSiteKindOfInputs.id) != null ? _ref2 : null;
338
+ const siteKind = (_ref3 = (_aiSiteKindOfInputs = aiSiteKindOfInputs(aiSiteStartInputs(answers))) == null ? void 0 : _aiSiteKindOfInputs.id) != null ? _ref3 : null;
305
339
  const prompt = freeTaste ? (_aiFreeSitePrompt = aiFreeSitePrompt(freeCredits, answers.pages, {
306
340
  siteKind
307
341
  })) != null ? _aiFreeSitePrompt : serverPrompt : null;
@@ -359,10 +393,20 @@ function SectionLabel({ children, help }) {
359
393
  orgId,
360
394
  hostId: siteId,
361
395
  kind: 'site',
362
- brief: aiSiteStartBrief(asked),
396
+ // A client build's intake rides along (AGL-3958): the name and
397
+ // towns as the inputs the questions leave empty (the towns only
398
+ // while no address is given, AGL-3995), and how to reach the
399
+ // business, its hours and the owner's words in the brief.
400
+ brief: [
401
+ aiSiteStartBrief(asked),
402
+ clientIntake ? aiSiteStartClientBrief(clientIntake) : ''
403
+ ].filter(Boolean).join(' '),
363
404
  // The guided start confirms its own plan (AGL-3594): the build
364
405
  // follows the plan with no approval to make.
365
- inputs: _extends({}, aiSiteStartInputs(asked), {
406
+ // The sites they like go only while the start asks for them (AGL-3975).
407
+ inputs: _extends({}, aiSiteStartInputs(siteInspiration ? asked : _extends({}, asked, {
408
+ inspiration: []
409
+ })), clientIntake ? aiSiteStartClientInputs(clientIntake, asked) : {}, {
366
410
  [AI_JOB_AUTO_CONFIRM_INPUT]: true
367
411
  })
368
412
  }, pickedModel ? {
@@ -422,9 +466,27 @@ function SectionLabel({ children, help }) {
422
466
  publishAiJob(created);
423
467
  // A removed start's answers have been used (AGL-3936).
424
468
  clearAiSiteStartAnswers();
469
+ // Which optional details the site was asked for with (AGL-3979), by id only.
470
+ tracker.detailsGiven(aiSiteStartExtrasGiven(asked).map((field)=>{
471
+ var _AI_SITE_START_STEPS_find;
472
+ return {
473
+ field,
474
+ step: (_AI_SITE_START_STEPS_find = AI_SITE_START_STEPS.find((at)=>AI_SITE_START_STEP_FIELDS[at].includes(field))) != null ? _AI_SITE_START_STEPS_find : 'details'
475
+ };
476
+ }));
425
477
  // The funnel's last step: the site is started, and nothing after is leaving it.
426
478
  tracker.complete();
427
479
  tracker.finish();
480
+ // A client build follows its job here, on the build's own screen, which
481
+ // goes on to send the owner the preview (AGL-3958).
482
+ if (clientIntake) {
483
+ var _clientBuildRef_current_onStarted, _clientBuildRef_current;
484
+ (_clientBuildRef_current = clientBuildRef.current) == null ? void 0 : (_clientBuildRef_current_onStarted = _clientBuildRef_current.onStarted) == null ? void 0 : _clientBuildRef_current_onStarted.call(_clientBuildRef_current, {
485
+ id: created.id
486
+ });
487
+ setStarted(created);
488
+ return;
489
+ }
428
490
  // Where the next step is (AGL-3594): the site's "Building your site"
429
491
  // page for this job. The zone closes without the starter first, so the
430
492
  // setup page does not ask again behind it.
@@ -456,7 +518,9 @@ function SectionLabel({ children, help }) {
456
518
  pickedModel,
457
519
  pendingSite,
458
520
  siteKind,
459
- tracker
521
+ tracker,
522
+ clientIntake,
523
+ siteInspiration
460
524
  ]);
461
525
  // The zone's `startBlank`. Before the site exists it creates it with the
462
526
  // starter, and answers `false` when it could not — most often a name or
@@ -487,6 +551,19 @@ function SectionLabel({ children, help }) {
487
551
  runStartBlank,
488
552
  tracker
489
553
  ]);
554
+ const chooseImport = useCallback(()=>{
555
+ if (importAvailability.state !== 'ready') return;
556
+ if (pendingSite && !pendingSite.created && !pendingSite.check()) return;
557
+ trackEvent('site_start_choice', {
558
+ choice: 'import'
559
+ });
560
+ tracker.complete();
561
+ setImporting(true);
562
+ }, [
563
+ importAvailability.state,
564
+ pendingSite,
565
+ tracker
566
+ ]);
490
567
  const chooseAi = useCallback(()=>{
491
568
  if (pendingSite && !pendingSite.created && !pendingSite.check()) return;
492
569
  trackEvent('site_start_choice', {
@@ -585,7 +662,7 @@ function SectionLabel({ children, help }) {
585
662
  const dismissTo = creating && !started ? leave != null ? leave : runStartBlank : exit;
586
663
  // Anything the person typed or picked, which a dismissal must not discard
587
664
  // silently (AGL-3660). After a job starts there is nothing left to lose.
588
- const drafted = !started && Boolean(answers.siteType.trim() || answers.audience.trim() || answers.kind !== null || creating && (pendingSite == null ? void 0 : pendingSite.dirty));
665
+ const drafted = !started && Boolean(answers.siteType.trim() || answers.audience.trim() || answers.kind !== null || aiSiteStartExtrasGiven(answers).length > 0 || creating && (pendingSite == null ? void 0 : pendingSite.dirty));
589
666
  // Escape and the close control: a dismissal, never a choice. Escape that
590
667
  // bubbled here through React from a portal outside this dialog's own DOM is
591
668
  // a nested menu's, already handled there, and is not this dialog's to act on.
@@ -625,9 +702,11 @@ function SectionLabel({ children, help }) {
625
702
  // A Free start quotes what is LEFT (AGL-3660), shared across the owner's
626
703
  // Free workspaces — never the month's whole allowance as if none were spent.
627
704
  const estimateText = freeTaste ? freeCredits ? `${aiCreditRangeText(estimate)}. You have ${freeCredits.left.toLocaleString('en-US')} of your ${freeCredits.total.toLocaleString('en-US')} free AI credits left this month, until ${aiFreeCreditsResetLabel(freeCredits.resetsOn)}` : `${aiCreditRangeText(estimate)}, of the ${FREE_AI_TASTE_CREDITS_PER_MONTH} AI credits you get free each month` : `${aiCreditRangeText(estimate)}, estimated`;
628
- const choosing = step === 'choose' && !started;
629
- const reviewing = step === 'review' && !started;
630
- const asking = step !== 'choose' && !started;
705
+ // The card is drawn wherever the workspace could use it, disabled where it cannot yet.
706
+ const showsImport = importAvailability.state === 'ready' || importAvailability.state === 'blocked';
707
+ const choosing = step === 'choose' && !started && !importing;
708
+ const reviewing = step === 'review' && !started && !importing;
709
+ const asking = step !== 'choose' && !started && !importing;
631
710
  // Each answer's reason not to go forward, shown on a step once Next was refused there.
632
711
  const fieldErrors = aiSiteStartFieldErrors(answers, {
633
712
  freeTaste
@@ -664,14 +743,17 @@ function SectionLabel({ children, help }) {
664
743
  },
665
744
  details: {
666
745
  title: 'A few details',
667
- lede: 'Where messages go, how many pages, and what else to draft. All can be changed later.'
746
+ lede: 'How customers reach you, where messages go, how many pages, and what else to draft. All can be changed later.'
668
747
  },
669
748
  review: {
670
749
  title: 'Review your site',
671
750
  lede: started ? `${PLATFORM_BRAND_NAME} AI is on it.` : `${PLATFORM_BRAND_NAME} AI plans and writes your pages from these answers, then publishes your site.`
672
751
  }
673
752
  };
674
- const heading = HEADINGS[step];
753
+ const heading = importing ? {
754
+ title: 'Bring my site',
755
+ lede: `Bring the website you have now into ${PLATFORM_BRAND_NAME}: its pages, words and photos. First, prove it is yours.`
756
+ } : HEADINGS[step];
675
757
  // Enter in a text answer is Next. A select, a card or a button keeps its own Enter.
676
758
  const onStepKeyDown = (event)=>{
677
759
  if (event.key !== 'Enter' || event.nativeEvent.isComposing || !asking || reviewing) return;
@@ -774,7 +856,7 @@ function SectionLabel({ children, help }) {
774
856
  width: '100%',
775
857
  mx: 'auto'
776
858
  },
777
- children: /*#__PURE__*/ _jsx(StartProgress, {
859
+ children: importing ? null : /*#__PURE__*/ _jsx(StartProgress, {
778
860
  step: step,
779
861
  compact: compact,
780
862
  onStep: started ? undefined : goBackTo
@@ -810,7 +892,7 @@ function SectionLabel({ children, help }) {
810
892
  sx: {
811
893
  float: 'right'
812
894
  }
813
- }, START_HELP.choose)) : /*#__PURE__*/ _jsx(StepHelp, {
895
+ }, START_HELP.choose)) : importing ? null : /*#__PURE__*/ _jsx(StepHelp, {
814
896
  step: step
815
897
  }),
816
898
  heading.lede
@@ -845,46 +927,84 @@ function SectionLabel({ children, help }) {
845
927
  pendingSite.fields
846
928
  ]
847
929
  }) : null,
848
- choosing ? /*#__PURE__*/ _jsxs(Box, {
849
- "data-start-area": "choose-cards",
850
- sx: {
851
- display: 'grid',
852
- gridTemplateColumns: {
853
- xs: '1fr',
854
- sm: '1fr 1fr'
855
- },
856
- gap: 3
857
- },
930
+ importing && orgId ? /*#__PURE__*/ _jsx(AiSiteImportStart, {
931
+ orgId: orgId,
932
+ orgSlug: orgSlug,
933
+ hostId: hostId,
934
+ host: host,
935
+ user: user,
936
+ pendingSite: pendingSite,
937
+ onBack: ()=>setImporting(false),
938
+ leave: leave
939
+ }) : choosing ? /*#__PURE__*/ _jsxs(Stack, {
940
+ spacing: 2,
858
941
  children: [
859
- /*#__PURE__*/ _jsx(ChoiceCard, {
860
- accent: "secondary",
861
- icon: mdiPageLayoutHeaderFooter.path,
862
- iconId: "page-layout-header-footer",
863
- title: "Start from the starter site",
864
- description: "A ready-made home page with a header, footer and contact form you can edit.",
865
- busy: startingStarter,
866
- onChoose: chooseStarter
867
- }),
868
- /*#__PURE__*/ _jsxs(ChoiceCard, {
869
- accent: "primary",
870
- icon: mdiCreation.path,
871
- iconId: "creation",
872
- title: "Start with AI",
873
- description: `Answer a few questions and ${PLATFORM_BRAND_NAME} AI plans your pages.`,
874
- onChoose: chooseAi,
942
+ /*#__PURE__*/ _jsxs(Box, {
943
+ "data-start-area": "choose-cards",
944
+ sx: {
945
+ display: 'grid',
946
+ gridTemplateColumns: showsImport ? {
947
+ xs: '1fr',
948
+ sm: '1fr 1fr',
949
+ md: '1fr 1fr 1fr'
950
+ } : {
951
+ xs: '1fr',
952
+ sm: '1fr 1fr'
953
+ },
954
+ gap: 3
955
+ },
875
956
  children: [
876
- /*#__PURE__*/ _jsx(Chip, {
877
- size: "small",
878
- color: "primary",
879
- label: "Recommended"
957
+ /*#__PURE__*/ _jsx(ChoiceCard, {
958
+ accent: "secondary",
959
+ icon: mdiPageLayoutHeaderFooter.path,
960
+ iconId: "page-layout-header-footer",
961
+ title: "Start from the starter site",
962
+ description: "A ready-made home page with a header, footer and contact form you can edit.",
963
+ busy: startingStarter,
964
+ onChoose: chooseStarter
965
+ }),
966
+ /*#__PURE__*/ _jsxs(ChoiceCard, {
967
+ accent: "primary",
968
+ icon: mdiCreation.path,
969
+ iconId: "creation",
970
+ title: "Start with AI",
971
+ description: `Answer a few questions and ${PLATFORM_BRAND_NAME} AI plans your pages.`,
972
+ onChoose: chooseAi,
973
+ children: [
974
+ /*#__PURE__*/ _jsx(Chip, {
975
+ size: "small",
976
+ color: "primary",
977
+ label: "Recommended"
978
+ }),
979
+ freeTaste && /*#__PURE__*/ _jsx(Typography, {
980
+ variant: "caption",
981
+ color: "text.secondary",
982
+ children: `Up to ${AI_SITE_FREE_PAGES.max} pages on the Free plan`
983
+ })
984
+ ]
880
985
  }),
881
- freeTaste && /*#__PURE__*/ _jsx(Typography, {
882
- variant: "caption",
883
- color: "text.secondary",
884
- children: `Up to ${AI_SITE_FREE_PAGES.max} pages on the Free plan`
986
+ showsImport && /*#__PURE__*/ _jsx(ChoiceCard, {
987
+ accent: "secondary",
988
+ icon: mdiWebSync.path,
989
+ iconId: "web-sync",
990
+ title: "Bring my site",
991
+ description: `Bring the website you have now into ${PLATFORM_BRAND_NAME}: its pages, words and photos, rewritten in your new design.`,
992
+ blocked: importAvailability.state === 'blocked' ? importAvailability.message : null,
993
+ onChoose: chooseImport,
994
+ children: importAvailability.state === 'blocked' && importAvailability.reason === 'plan' ? /*#__PURE__*/ _jsx(Chip, {
995
+ size: "small",
996
+ variant: "outlined",
997
+ label: "Paid plans"
998
+ }) : null
885
999
  })
886
1000
  ]
887
- })
1001
+ }),
1002
+ importAvailability.state === 'blocked' ? /*#__PURE__*/ _jsx(PrerequisiteNotice, _extends({}, importAvailability.reason === 'plan' && orgSlug ? {
1003
+ href: aiCreditsBillingHref(orgSlug),
1004
+ actionLabel: 'Upgrade'
1005
+ } : {}, {
1006
+ children: importAvailability.message
1007
+ })) : null
888
1008
  ]
889
1009
  }) : started && orgId ? /*#__PURE__*/ _jsx(Card, {
890
1010
  variant: "outlined",
@@ -909,28 +1029,50 @@ function SectionLabel({ children, help }) {
909
1029
  children: [
910
1030
  step === 'kind' && /*#__PURE__*/ _jsx(KindStep, _extends({}, stepProps)),
911
1031
  step === 'audience' && /*#__PURE__*/ _jsx(AudienceStep, _extends({}, stepProps)),
912
- step === 'style' && /*#__PURE__*/ _jsx(StyleStep, _extends({}, stepProps)),
1032
+ step === 'style' && /*#__PURE__*/ _jsx(StyleStep, _extends({}, stepProps, {
1033
+ inspiration: siteInspiration ? {
1034
+ limit: aiSiteInspirationLimit(freeTaste),
1035
+ upgradeHref: orgSlug ? aiCreditsBillingHref(orgSlug) : null
1036
+ } : null
1037
+ })),
913
1038
  step === 'details' && /*#__PURE__*/ _jsx(DetailsStep, _extends({}, stepProps, {
914
1039
  freeTaste: freeTaste,
915
1040
  band: band
916
1041
  })),
917
- step === 'review' && /*#__PURE__*/ _jsx(ReviewStep, {
1042
+ step !== 'review' && /*#__PURE__*/ _jsx(Box, {
1043
+ sx: {
1044
+ mt: 3
1045
+ },
1046
+ children: /*#__PURE__*/ _jsx(MoreDetails, _extends({
1047
+ step: step
1048
+ }, stepProps), step)
1049
+ }),
1050
+ step === 'review' && /*#__PURE__*/ _jsxs(ReviewStep, {
918
1051
  answers: answers,
919
1052
  freeTaste: freeTaste,
920
1053
  onEdit: edit,
921
- children: !noneLeft && prompt && /*#__PURE__*/ _jsx(AiCreditsPromptNotice, {
922
- prompt: prompt,
923
- noun: "site",
924
- orgSlug: orgSlug,
925
- busy: busy,
926
- onBuildWhatFits: ()=>void plan({
927
- creditsConfirmed: true
928
- }),
929
- onSmaller: ()=>void plan({
930
- creditsConfirmed: true,
931
- pages: 1
932
- })
933
- })
1054
+ inspiration: siteInspiration,
1055
+ children: [
1056
+ clientIntake && /*#__PURE__*/ _jsx(Alert, {
1057
+ severity: "info",
1058
+ variant: "outlined",
1059
+ "data-start-area": "client-intake",
1060
+ children: aiSiteStartClientNote(clientIntake)
1061
+ }),
1062
+ !noneLeft && prompt && /*#__PURE__*/ _jsx(AiCreditsPromptNotice, {
1063
+ prompt: prompt,
1064
+ noun: "site",
1065
+ orgSlug: orgSlug,
1066
+ busy: busy,
1067
+ onBuildWhatFits: ()=>void plan({
1068
+ creditsConfirmed: true
1069
+ }),
1070
+ onSmaller: ()=>void plan({
1071
+ creditsConfirmed: true,
1072
+ pages: 1
1073
+ })
1074
+ })
1075
+ ]
934
1076
  })
935
1077
  ]
936
1078
  })