@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
@@ -15,17 +15,23 @@
15
15
  * limitations under the License.
16
16
  */ 'use client';
17
17
  import { _ as _extends } from "@swc/helpers/_/_extends";
18
+ import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
18
19
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
20
  import { pluginDocsHelp } from "@aglyn/aglyn/app-utils/docs-help";
20
- import { mdiBookOpenPageVariant, mdiBriefcaseOutline, mdiCalendarHeart, mdiCreation, mdiHandHeart, mdiScaleBalance, mdiShopping, mdiSilverwareForkKnife, mdiViewGridOutline, mdiWrench } from "@aglyn/shared-data-mdi";
21
- import { HelpTip } from "@aglyn/shared-ui-jsx";
21
+ import { mdiBookOpenPageVariant, mdiBriefcaseOutline, mdiCalendarHeart, mdiCheck, mdiChevronDown, mdiCreation, mdiHandHeart, mdiScaleBalance, mdiShopping, mdiSilverwareForkKnife, mdiViewGridOutline, mdiWrench } from "@aglyn/shared-data-mdi";
22
+ import { HelpTip, MdiIcon } from "@aglyn/shared-ui-jsx";
22
23
  import { OptionCardGrid } from "@aglyn/shared-ui-jsx/components/option-card-grid.component";
23
- import { Box, Divider, LinearProgress, List, ListItemButton, MenuItem, Stack, Step, StepButton, StepLabel, Stepper, TextField, Typography } from "@mui/material";
24
- import { Fragment, useId } from "react";
24
+ import { BlockedControl } from "@aglyn/shared-ui-jsx/components/blocked-control.component";
25
+ import { PrerequisiteNotice } from "@aglyn/shared-ui-jsx/components/prerequisite-notice.component";
26
+ import { OpeningHoursPicker } from "@aglyn/shared-ui-jsx/components/weekly-hours-picker.component";
27
+ import { Accordion, AccordionDetails, AccordionSummary, Box, Divider, LinearProgress, List, ListItemButton, MenuItem, Stack, Step, StepButton, StepLabel, Stepper, TextField, Tooltip, Typography } from "@mui/material";
28
+ import { Fragment, useId, useState } from "react";
29
+ import { aiSiteHoursSentence, aiSiteServiceAreas, aiSiteSocialLinks } from "../model/ai-site-details.js";
25
30
  import { AI_SITE_FREE_PAGES_NOTE, AI_SITE_SUBMISSION_CHOICES } from "../model/ai-site-job.js";
26
31
  import { AI_SITE_KINDS } from "../model/ai-site-kinds.js";
27
- import { AI_SITE_START_TYPES, aiSiteStartKind } from "../model/ai-site-start.js";
28
- import { AI_SITE_START_STEP_LABELS, AI_SITE_START_STEPS, aiSiteStartStepIndex } from "../model/ai-site-start-steps.js";
32
+ import { AI_SITE_INSPIRATION_LIMITS, AI_SITE_INSPIRATION_MAX, AI_SITE_INSPIRATION_PAID_NOTE, aiSiteInspirationHost } from "../model/ai-site-inspiration.js";
33
+ import { AI_SITE_START_TYPES, aiSiteStartInspirationTyped, aiSiteStartKind } from "../model/ai-site-start.js";
34
+ import { AI_SITE_START_MORE_FIELDS, AI_SITE_START_STEP_LABELS, AI_SITE_START_STEPS, aiSiteStartStepIndex } from "../model/ai-site-start-steps.js";
29
35
  import { aiSiteStylePreview } from "./ai-site-style-previews.js";
30
36
  /**
31
37
  * The guided start's question steps (AGL-3898), one decision each. Each step
@@ -52,7 +58,7 @@ import { aiSiteStylePreview } from "./ai-site-style-previews.js";
52
58
  }),
53
59
  details: pluginDocsHelp('aiStart', {
54
60
  anchor: '#details',
55
- excerpt: 'Where contact form messages go, how many pages to write, and on paid plans whether to draft a welcome email. All can be changed later.'
61
+ excerpt: 'Your phone number and email, which your pages show, where contact form messages go, how many pages to write, and on paid plans whether to draft a welcome email. All can be changed later.'
56
62
  })
57
63
  };
58
64
  /** The icon on each kind-of-site card: the icon of the style that answer picks. */ const START_TYPE_ICONS = {
@@ -210,12 +216,12 @@ import { aiSiteStylePreview } from "./ai-site-style-previews.js";
210
216
  * Step: the style, from cards that show it. "Pick for me" leaves the kind
211
217
  * unset, which is what the single form's unpicked state was: the kind the
212
218
  * first answer suggests is the one used, and the card says which.
213
- */ export function StyleStep({ answers, answer, tracker }) {
219
+ */ export function StyleStep({ answers, answer, tracker, errors, fieldRef, inspiration }) {
214
220
  var _answers_kind;
215
221
  const suggested = aiSiteStartKind(_extends({}, answers, {
216
222
  kind: null
217
223
  }));
218
- return /*#__PURE__*/ _jsx(OptionCardGrid, {
224
+ const cards = /*#__PURE__*/ _jsx(OptionCardGrid, {
219
225
  label: "Style of site",
220
226
  "data-start-area": "style-cards",
221
227
  columns: {
@@ -249,13 +255,165 @@ import { aiSiteStylePreview } from "./ai-site-style-previews.js";
249
255
  tracker.fieldPicked('kind');
250
256
  }
251
257
  });
258
+ if (!inspiration) return cards;
259
+ return /*#__PURE__*/ _jsxs(Stack, {
260
+ spacing: 4,
261
+ children: [
262
+ cards,
263
+ /*#__PURE__*/ _jsx(InspirationFields, {
264
+ answers: answers,
265
+ answer: answer,
266
+ tracker: tracker,
267
+ errors: errors,
268
+ fieldRef: fieldRef,
269
+ offer: inspiration
270
+ })
271
+ ]
272
+ });
273
+ }
274
+ /** Why a Free workspace's second and third site fields are locked. */ export const AI_SITE_INSPIRATION_LOCKED_REASON = `A Free workspace names ${AI_SITE_INSPIRATION_LIMITS.free} site you like. Paid plans name up to ${AI_SITE_INSPIRATION_MAX}.`;
275
+ /**
276
+ * Sites I like (AGL-3975): up to three addresses under the style cards. A
277
+ * Free workspace's fields past its one are shown disabled with the reason
278
+ * and an upgrade link, never hidden, so the person sees what a paid plan adds.
279
+ */ function InspirationFields({ answers, answer, tracker, errors, fieldRef, offer }) {
280
+ var _answers_inspiration;
281
+ const values = (_answers_inspiration = answers.inspiration) != null ? _answers_inspiration : [];
282
+ const change = (index, value)=>{
283
+ const next = Array.from({
284
+ length: offer.limit
285
+ }, (_, at)=>{
286
+ var _values_at;
287
+ return (_values_at = values[at]) != null ? _values_at : '';
288
+ });
289
+ next[index] = value;
290
+ answer({
291
+ inspiration: next
292
+ });
293
+ tracker.fieldChanged('inspiration');
294
+ };
295
+ return /*#__PURE__*/ _jsxs(Stack, {
296
+ spacing: 1.5,
297
+ "data-start-area": "field-inspiration",
298
+ children: [
299
+ /*#__PURE__*/ _jsx(Typography, {
300
+ variant: "overline",
301
+ color: "text.secondary",
302
+ component: "h2",
303
+ children: 'Sites you like (optional)'
304
+ }),
305
+ /*#__PURE__*/ _jsx(Typography, {
306
+ variant: "body2",
307
+ color: "text.secondary",
308
+ children: 'We take only how they are laid out and styled: the order of sections, colors, type, buttons and motion. Never their words, photos or logos, so your site stays your own.'
309
+ }),
310
+ Array.from({
311
+ length: AI_SITE_INSPIRATION_MAX
312
+ }, (_, index)=>{
313
+ var _values_index;
314
+ const locked = index >= offer.limit;
315
+ const field = /*#__PURE__*/ _jsx(TextField, _extends({
316
+ fullWidth: true,
317
+ type: "url",
318
+ inputMode: "url",
319
+ label: `Site ${index + 1}`,
320
+ placeholder: "https://example.com",
321
+ value: locked ? '' : (_values_index = values[index]) != null ? _values_index : '',
322
+ onChange: (event)=>change(index, event.target.value),
323
+ onBlur: ()=>tracker.fieldLeft('inspiration')
324
+ }, index === 0 ? {
325
+ inputRef: fieldRef('inspiration')
326
+ } : {}, {
327
+ error: index === 0 && Boolean(errors.inspiration)
328
+ }, index === 0 && errors.inspiration ? {
329
+ helperText: errors.inspiration.message
330
+ } : {}));
331
+ return locked ? /*#__PURE__*/ _jsx(BlockedControl, {
332
+ blocked: true,
333
+ reason: AI_SITE_INSPIRATION_LOCKED_REASON,
334
+ fullWidth: true,
335
+ children: field
336
+ }, index) : /*#__PURE__*/ _jsx(Box, {
337
+ children: field
338
+ }, index);
339
+ }),
340
+ offer.limit < AI_SITE_INSPIRATION_MAX && /*#__PURE__*/ _jsx(PrerequisiteNotice, _extends({}, offer.upgradeHref ? {
341
+ href: offer.upgradeHref
342
+ } : {}, {
343
+ actionLabel: "Upgrade",
344
+ children: AI_SITE_INSPIRATION_PAID_NOTE
345
+ }))
346
+ ]
347
+ });
252
348
  }
253
349
  /** Step: where leads go, how many pages, and on a paid plan the welcome email. */ export function DetailsStep({ answers, answer, tracker, errors, fieldRef, freeTaste, band }) {
254
- var _ref, _ref1;
255
- var _errors_submissions, _errors_pages;
350
+ var _ref, _ref1, _ref2, _ref3;
351
+ var _errors_phone, _errors_email, _errors_submissions, _errors_pages;
256
352
  return /*#__PURE__*/ _jsxs(Stack, {
257
353
  spacing: 3,
258
354
  children: [
355
+ /*#__PURE__*/ _jsxs(Stack, {
356
+ direction: {
357
+ xs: 'column',
358
+ sm: 'row'
359
+ },
360
+ spacing: 2,
361
+ children: [
362
+ /*#__PURE__*/ _jsx(Box, {
363
+ "data-start-area": "field-phone",
364
+ sx: {
365
+ flex: 1
366
+ },
367
+ children: /*#__PURE__*/ _jsx(TextField, _extends({
368
+ fullWidth: true,
369
+ type: "tel",
370
+ inputRef: fieldRef('phone'),
371
+ label: "Business phone",
372
+ placeholder: "(512) 555-0142",
373
+ autoComplete: "tel",
374
+ value: answers.phone,
375
+ onChange: (event)=>{
376
+ answer({
377
+ phone: event.target.value
378
+ });
379
+ tracker.fieldChanged('phone');
380
+ }
381
+ }, typed(tracker, 'phone'), {
382
+ error: Boolean(errors.phone),
383
+ helperText: (_ref = (_errors_phone = errors.phone) == null ? void 0 : _errors_phone.message) != null ? _ref : 'Optional. Shown on your site so customers can call.',
384
+ slotProps: {
385
+ htmlInput: {
386
+ inputMode: 'tel'
387
+ }
388
+ }
389
+ }))
390
+ }),
391
+ /*#__PURE__*/ _jsx(Box, {
392
+ "data-start-area": "field-email",
393
+ sx: {
394
+ flex: 1
395
+ },
396
+ children: /*#__PURE__*/ _jsx(TextField, _extends({
397
+ fullWidth: true,
398
+ type: "email",
399
+ inputRef: fieldRef('email'),
400
+ label: "Business email",
401
+ placeholder: "hello@yourbusiness.com",
402
+ autoComplete: "email",
403
+ value: answers.email,
404
+ onChange: (event)=>{
405
+ answer({
406
+ email: event.target.value
407
+ });
408
+ tracker.fieldChanged('email');
409
+ }
410
+ }, typed(tracker, 'email'), {
411
+ error: Boolean(errors.email),
412
+ helperText: (_ref1 = (_errors_email = errors.email) == null ? void 0 : _errors_email.message) != null ? _ref1 : 'Optional. Shown on your site so customers can write.'
413
+ }))
414
+ })
415
+ ]
416
+ }),
259
417
  /*#__PURE__*/ _jsx(Box, {
260
418
  "data-start-area": "field-submissions",
261
419
  children: /*#__PURE__*/ _jsx(TextField, {
@@ -271,7 +429,7 @@ import { aiSiteStylePreview } from "./ai-site-style-previews.js";
271
429
  tracker.fieldPicked('submissions');
272
430
  },
273
431
  error: Boolean(errors.submissions),
274
- helperText: (_ref = (_errors_submissions = errors.submissions) == null ? void 0 : _errors_submissions.message) != null ? _ref : 'You can change this on the form itself afterwards.',
432
+ helperText: (_ref2 = (_errors_submissions = errors.submissions) == null ? void 0 : _errors_submissions.message) != null ? _ref2 : 'You can change this on the form itself afterwards.',
275
433
  children: AI_SITE_SUBMISSION_CHOICES.map((option)=>/*#__PURE__*/ _jsx(MenuItem, {
276
434
  value: option.id,
277
435
  children: `${option.label} — ${option.blurb}`
@@ -303,7 +461,7 @@ import { aiSiteStylePreview } from "./ai-site-style-previews.js";
303
461
  tracker.fieldPicked('pages');
304
462
  },
305
463
  error: Boolean(errors.pages),
306
- helperText: (_ref1 = (_errors_pages = errors.pages) == null ? void 0 : _errors_pages.message) != null ? _ref1 : freeTaste ? AI_SITE_FREE_PAGES_NOTE : undefined,
464
+ helperText: (_ref3 = (_errors_pages = errors.pages) == null ? void 0 : _errors_pages.message) != null ? _ref3 : freeTaste ? AI_SITE_FREE_PAGES_NOTE : undefined,
307
465
  children: Array.from({
308
466
  length: band.max - band.min + 1
309
467
  }, (_, index)=>band.min + index).map((count)=>/*#__PURE__*/ _jsx(MenuItem, {
@@ -345,6 +503,474 @@ import { aiSiteStylePreview } from "./ai-site-style-previews.js";
345
503
  ]
346
504
  });
347
505
  }
506
+ /**
507
+ * The brand colors "More details" offers on the Style step (AGL-3979), by
508
+ * name: picking one makes it the site's primary color, held to contrast by
509
+ * the look like any brand color; none leaves the style to choose. Picked,
510
+ * never typed: a color code is not something a site owner should need.
511
+ */ export const AI_SITE_START_BRAND_COLORS = [
512
+ {
513
+ label: 'Red',
514
+ hex: '#c62828'
515
+ },
516
+ {
517
+ label: 'Orange',
518
+ hex: '#e65100'
519
+ },
520
+ {
521
+ label: 'Gold',
522
+ hex: '#b28704'
523
+ },
524
+ {
525
+ label: 'Green',
526
+ hex: '#2e7d32'
527
+ },
528
+ {
529
+ label: 'Teal',
530
+ hex: '#00796b'
531
+ },
532
+ {
533
+ label: 'Blue',
534
+ hex: '#1565c0'
535
+ },
536
+ {
537
+ label: 'Navy',
538
+ hex: '#1a237e'
539
+ },
540
+ {
541
+ label: 'Purple',
542
+ hex: '#6a1b9a'
543
+ },
544
+ {
545
+ label: 'Pink',
546
+ hex: '#ad1457'
547
+ },
548
+ {
549
+ label: 'Brown',
550
+ hex: '#5d4037'
551
+ },
552
+ {
553
+ label: 'Charcoal',
554
+ hex: '#37474f'
555
+ }
556
+ ];
557
+ /** The price ranges offered, as a search listing writes them. */ const PRICE_RANGES = [
558
+ {
559
+ value: '$',
560
+ label: '$ — budget'
561
+ },
562
+ {
563
+ value: '$$',
564
+ label: '$$ — moderate'
565
+ },
566
+ {
567
+ value: '$$$',
568
+ label: '$$$ — premium'
569
+ },
570
+ {
571
+ value: '$$$$',
572
+ label: '$$$$ — luxury'
573
+ }
574
+ ];
575
+ /** What each step's "More details" says it holds, under its title. */ const MORE_SUMMARY = {
576
+ kind: 'Optional: a tagline and the year you started',
577
+ audience: 'Optional: areas you serve, price range and languages',
578
+ style: 'Optional: your brand color',
579
+ details: 'Optional: address, opening hours and social profiles'
580
+ };
581
+ /** A typed extra's field. */ function ExtraText({ field, answers, answer, tracker, errors, fieldRef, label, placeholder, helper, autoComplete = 'off', multiline = false, inputMode }) {
582
+ var _ref;
583
+ const error = errors[field];
584
+ return /*#__PURE__*/ _jsx(Box, {
585
+ "data-start-area": `field-${field}`,
586
+ sx: {
587
+ flex: 1,
588
+ minWidth: 0
589
+ },
590
+ children: /*#__PURE__*/ _jsx(TextField, _extends({
591
+ fullWidth: true,
592
+ inputRef: fieldRef(field),
593
+ label: label,
594
+ placeholder: placeholder,
595
+ autoComplete: autoComplete,
596
+ multiline: multiline,
597
+ minRows: multiline ? 2 : undefined,
598
+ value: answers[field],
599
+ onChange: (event)=>{
600
+ answer({
601
+ [field]: event.target.value
602
+ });
603
+ tracker.fieldChanged(field);
604
+ }
605
+ }, typed(tracker, field), {
606
+ error: Boolean(error),
607
+ helperText: (_ref = error == null ? void 0 : error.message) != null ? _ref : helper,
608
+ slotProps: inputMode ? {
609
+ htmlInput: {
610
+ inputMode
611
+ }
612
+ } : undefined
613
+ }))
614
+ });
615
+ }
616
+ /** The price range, picked from how search results show one. */ function PriceRangeField({ answers, answer, tracker, errors, fieldRef }) {
617
+ var _ref;
618
+ var _errors_priceRange;
619
+ const own = answers.priceRange && !PRICE_RANGES.some((option)=>option.value === answers.priceRange);
620
+ const options = own ? [
621
+ ...PRICE_RANGES,
622
+ {
623
+ value: answers.priceRange,
624
+ label: answers.priceRange
625
+ }
626
+ ] : PRICE_RANGES;
627
+ return /*#__PURE__*/ _jsx(Box, {
628
+ "data-start-area": "field-priceRange",
629
+ sx: {
630
+ flex: 1,
631
+ minWidth: 0
632
+ },
633
+ children: /*#__PURE__*/ _jsxs(TextField, {
634
+ select: true,
635
+ fullWidth: true,
636
+ inputRef: fieldRef('priceRange'),
637
+ label: "Price range",
638
+ value: answers.priceRange,
639
+ onChange: (event)=>{
640
+ answer({
641
+ priceRange: event.target.value
642
+ });
643
+ tracker.fieldPicked('priceRange');
644
+ },
645
+ error: Boolean(errors.priceRange),
646
+ helperText: (_ref = (_errors_priceRange = errors.priceRange) == null ? void 0 : _errors_priceRange.message) != null ? _ref : 'How your prices compare, as search results show it.',
647
+ children: [
648
+ /*#__PURE__*/ _jsx(MenuItem, {
649
+ value: "",
650
+ children: 'Not said'
651
+ }),
652
+ options.map((option)=>/*#__PURE__*/ _jsx(MenuItem, {
653
+ value: option.value,
654
+ children: option.label
655
+ }, option.value))
656
+ ]
657
+ })
658
+ });
659
+ }
660
+ /** The brand color, picked from named swatches. */ function BrandField({ answers, answer, tracker }) {
661
+ const labelId = useId();
662
+ return /*#__PURE__*/ _jsxs(Stack, {
663
+ spacing: 1,
664
+ "data-start-area": "field-brand",
665
+ children: [
666
+ /*#__PURE__*/ _jsx(Typography, {
667
+ variant: "body2",
668
+ color: "text.secondary",
669
+ id: labelId,
670
+ children: 'Brand color'
671
+ }),
672
+ /*#__PURE__*/ _jsx(Stack, {
673
+ direction: "row",
674
+ role: "radiogroup",
675
+ "aria-labelledby": labelId,
676
+ sx: {
677
+ flexWrap: 'wrap',
678
+ gap: 1
679
+ },
680
+ children: [
681
+ {
682
+ label: 'Let the style choose',
683
+ hex: ''
684
+ },
685
+ ...AI_SITE_START_BRAND_COLORS
686
+ ].map((color)=>{
687
+ const picked = (answers.brand || '') === color.hex;
688
+ return /*#__PURE__*/ _jsx(Tooltip, {
689
+ title: color.label,
690
+ children: /*#__PURE__*/ _jsx(Box, {
691
+ component: "button",
692
+ type: "button",
693
+ role: "radio",
694
+ "aria-checked": picked,
695
+ "aria-label": color.label,
696
+ onClick: ()=>{
697
+ answer({
698
+ brand: color.hex
699
+ });
700
+ tracker.fieldPicked('brand');
701
+ },
702
+ sx: {
703
+ width: 36,
704
+ height: 36,
705
+ p: 0,
706
+ borderRadius: '50%',
707
+ border: 2,
708
+ borderColor: picked ? 'text.primary' : 'divider',
709
+ bgcolor: color.hex || 'background.paper',
710
+ color: color.hex ? 'common.white' : 'text.secondary',
711
+ display: 'inline-flex',
712
+ alignItems: 'center',
713
+ justifyContent: 'center',
714
+ cursor: 'pointer'
715
+ },
716
+ children: picked ? /*#__PURE__*/ _jsx(MdiIcon, {
717
+ path: mdiCheck.path,
718
+ fontSize: "small"
719
+ }) : null
720
+ })
721
+ }, color.label);
722
+ })
723
+ }),
724
+ /*#__PURE__*/ _jsx(Typography, {
725
+ variant: "caption",
726
+ color: "text.secondary",
727
+ children: 'Picked, it is your site’s main color, kept readable everywhere it is used.'
728
+ })
729
+ ]
730
+ });
731
+ }
732
+ /** The opening hours, picked a day at a time: the same editor as Setup → SEO. */ function HoursField({ answers, answer, tracker, errors }) {
733
+ var _ref;
734
+ var _errors_hours;
735
+ return /*#__PURE__*/ _jsx(Box, {
736
+ "data-start-area": "field-hours",
737
+ children: /*#__PURE__*/ _jsx(OpeningHoursPicker, {
738
+ label: "Opening hours",
739
+ value: answers.hours,
740
+ onChange: (hours)=>{
741
+ answer({
742
+ hours
743
+ });
744
+ tracker.fieldPicked('hours');
745
+ },
746
+ helperText: (_ref = (_errors_hours = errors.hours) == null ? void 0 : _errors_hours.message) != null ? _ref : 'Leave every day closed if you work by appointment.'
747
+ })
748
+ });
749
+ }
750
+ /** One extra's field, as "More details" draws it. */ function ExtraField(_0) {
751
+ let { field } = _0, props = _object_without_properties_loose(_0, [
752
+ "field"
753
+ ]);
754
+ switch(field){
755
+ case 'tagline':
756
+ return /*#__PURE__*/ _jsx(ExtraText, _extends({}, props, {
757
+ field: field,
758
+ label: "Tagline",
759
+ placeholder: "Calm, gentle grooming your dog will love",
760
+ helper: "A short line about the business, in your words."
761
+ }));
762
+ case 'founded':
763
+ return /*#__PURE__*/ _jsx(ExtraText, _extends({}, props, {
764
+ field: field,
765
+ label: "Year founded",
766
+ placeholder: "2015",
767
+ inputMode: "numeric"
768
+ }));
769
+ case 'serviceArea':
770
+ return /*#__PURE__*/ _jsx(ExtraText, _extends({}, props, {
771
+ field: field,
772
+ label: "Areas you serve",
773
+ placeholder: 'Austin\nRound Rock',
774
+ helper: "Cities, towns or neighborhoods, one a line.",
775
+ multiline: true
776
+ }));
777
+ case 'priceRange':
778
+ return /*#__PURE__*/ _jsx(PriceRangeField, _extends({}, props));
779
+ case 'languages':
780
+ return /*#__PURE__*/ _jsx(ExtraText, _extends({}, props, {
781
+ field: field,
782
+ label: "Languages you serve customers in",
783
+ placeholder: "English, Spanish"
784
+ }));
785
+ case 'brand':
786
+ return /*#__PURE__*/ _jsx(BrandField, _extends({}, props));
787
+ case 'street':
788
+ return /*#__PURE__*/ _jsx(ExtraText, _extends({}, props, {
789
+ field: field,
790
+ label: "Street address",
791
+ placeholder: "214 Main Street",
792
+ autoComplete: "street-address"
793
+ }));
794
+ case 'city':
795
+ return /*#__PURE__*/ _jsx(ExtraText, _extends({}, props, {
796
+ field: field,
797
+ label: "City or town",
798
+ placeholder: "Austin",
799
+ autoComplete: "address-level2"
800
+ }));
801
+ case 'region':
802
+ return /*#__PURE__*/ _jsx(ExtraText, _extends({}, props, {
803
+ field: field,
804
+ label: "State or region",
805
+ placeholder: "TX",
806
+ autoComplete: "address-level1"
807
+ }));
808
+ case 'postalCode':
809
+ return /*#__PURE__*/ _jsx(ExtraText, _extends({}, props, {
810
+ field: field,
811
+ label: "ZIP or postal code",
812
+ placeholder: "78701",
813
+ autoComplete: "postal-code"
814
+ }));
815
+ case 'country':
816
+ return /*#__PURE__*/ _jsx(ExtraText, _extends({}, props, {
817
+ field: field,
818
+ label: "Country",
819
+ placeholder: "United States",
820
+ autoComplete: "country-name"
821
+ }));
822
+ case 'hours':
823
+ return /*#__PURE__*/ _jsx(HoursField, _extends({}, props));
824
+ case 'social':
825
+ return /*#__PURE__*/ _jsx(ExtraText, _extends({}, props, {
826
+ field: field,
827
+ label: "Social profiles",
828
+ placeholder: "instagram.com/yourbusiness",
829
+ helper: "One link a line. Your site links them, and its search listing names them as yours.",
830
+ multiline: true,
831
+ inputMode: "url"
832
+ }));
833
+ default:
834
+ return null;
835
+ }
836
+ }
837
+ /** Fields "More details" draws side by side. */ const PAIRS = [
838
+ [
839
+ 'tagline',
840
+ 'founded'
841
+ ],
842
+ [
843
+ 'priceRange',
844
+ 'languages'
845
+ ],
846
+ [
847
+ 'city',
848
+ 'region'
849
+ ],
850
+ [
851
+ 'postalCode',
852
+ 'country'
853
+ ]
854
+ ];
855
+ /**
856
+ * A step's "More details" (AGL-3979): a collapsed section of optional extras
857
+ * that fit the step, so a person who wants the site to say more can, and one
858
+ * who does not never has to open it. Open from the start where something in
859
+ * it is already filled in (a start reopened on its answers), and opened by a
860
+ * Next refused on one of its fields.
861
+ */ export function MoreDetails(_0) {
862
+ let { step } = _0, props = _object_without_properties_loose(_0, [
863
+ "step"
864
+ ]);
865
+ const fields = AI_SITE_START_MORE_FIELDS[step];
866
+ const { answers, errors, tracker } = props;
867
+ const [open, setOpen] = useState(()=>fields.some((field)=>{
868
+ var _answers_field;
869
+ return ((_answers_field = answers[field]) != null ? _answers_field : '').trim() !== '';
870
+ }));
871
+ if (!fields.length) return null;
872
+ const expanded = open || fields.some((field)=>errors[field]);
873
+ const rows = [];
874
+ for (const field of fields){
875
+ if (rows.some((row)=>row.includes(field))) continue;
876
+ const pair = PAIRS.find((entry)=>entry[0] === field && fields.includes(entry[1]));
877
+ rows.push(pair != null ? pair : [
878
+ field
879
+ ]);
880
+ }
881
+ return /*#__PURE__*/ _jsxs(Accordion, {
882
+ disableGutters: true,
883
+ variant: "outlined",
884
+ // The same outlined, rounded section as the build page's plan.
885
+ sx: {
886
+ borderRadius: 2,
887
+ '&::before': {
888
+ display: 'none'
889
+ }
890
+ },
891
+ expanded: expanded,
892
+ onChange: (_, next)=>{
893
+ setOpen(next);
894
+ if (next) tracker.moreDetails();
895
+ },
896
+ "data-start-area": "more-details",
897
+ children: [
898
+ /*#__PURE__*/ _jsx(AccordionSummary, {
899
+ expandIcon: /*#__PURE__*/ _jsx(MdiIcon, {
900
+ path: mdiChevronDown.path
901
+ }),
902
+ children: /*#__PURE__*/ _jsxs(Stack, {
903
+ spacing: 0.25,
904
+ children: [
905
+ /*#__PURE__*/ _jsx(Typography, {
906
+ variant: "subtitle2",
907
+ component: "span",
908
+ children: 'More details'
909
+ }),
910
+ /*#__PURE__*/ _jsx(Typography, {
911
+ variant: "body2",
912
+ color: "text.secondary",
913
+ component: "span",
914
+ children: MORE_SUMMARY[step]
915
+ })
916
+ ]
917
+ })
918
+ }),
919
+ /*#__PURE__*/ _jsx(AccordionDetails, {
920
+ children: /*#__PURE__*/ _jsx(Stack, {
921
+ spacing: 2.5,
922
+ children: rows.map((row)=>row.length > 1 ? /*#__PURE__*/ _jsx(Stack, {
923
+ direction: {
924
+ xs: 'column',
925
+ sm: 'row'
926
+ },
927
+ spacing: 2,
928
+ children: row.map((field)=>/*#__PURE__*/ _jsx(ExtraField, _extends({
929
+ field: field
930
+ }, props), field))
931
+ }, row.join('-')) : /*#__PURE__*/ _jsx(ExtraField, _extends({
932
+ field: row[0]
933
+ }, props), row[0]))
934
+ })
935
+ })
936
+ ]
937
+ });
938
+ }
939
+ /** The extras on the review, each as a person reads it, with the step that asks it. */ export function aiSiteStartExtraRows(answers) {
940
+ var _ref, _aiSiteSocialLinks;
941
+ const rows = [];
942
+ const add = (label, value, step)=>{
943
+ if (value.trim()) rows.push({
944
+ label,
945
+ value: value.trim(),
946
+ step
947
+ });
948
+ };
949
+ add('Phone', answers.phone, 'details');
950
+ add('Email', answers.email, 'details');
951
+ add('Tagline', answers.tagline, 'kind');
952
+ add('Year founded', answers.founded, 'kind');
953
+ add('Areas you serve', aiSiteServiceAreas(answers.serviceArea).join(', '), 'audience');
954
+ add('Price range', answers.priceRange, 'audience');
955
+ add('Languages', answers.languages, 'audience');
956
+ const brand = AI_SITE_START_BRAND_COLORS.find((color)=>color.hex === answers.brand);
957
+ add('Brand color', (_ref = brand == null ? void 0 : brand.label) != null ? _ref : answers.brand, 'style');
958
+ const regional = [
959
+ answers.region,
960
+ answers.postalCode
961
+ ].map((part)=>part.trim()).filter(Boolean).join(' ');
962
+ const address = [
963
+ answers.street,
964
+ answers.city,
965
+ regional,
966
+ answers.country
967
+ ].map((part)=>part.trim()).filter(Boolean).join(', ');
968
+ add('Address', address, 'details');
969
+ add('Opening hours', aiSiteHoursSentence(answers.hours), 'details');
970
+ const links = (_aiSiteSocialLinks = aiSiteSocialLinks(answers.social)) != null ? _aiSiteSocialLinks : [];
971
+ add('Social profiles', links.map((link)=>link.replace(/^https:\/\//, '')).join(', '), 'details');
972
+ return rows;
973
+ }
348
974
  /**
349
975
  * One answer on the review, as one button back to the step that asks it. The
350
976
  * whole row is the target, not only "Edit" at its end: people clicked the
@@ -405,8 +1031,9 @@ import { aiSiteStylePreview } from "./ai-site-style-previews.js";
405
1031
  ]
406
1032
  });
407
1033
  }
408
- /** Step: every answer, each with Edit, before "Plan my site". */ export function ReviewStep({ answers, freeTaste, onEdit, children }) {
1034
+ /** Step: every answer, each with Edit, before "Plan my site". */ export function ReviewStep({ answers, freeTaste, onEdit, children, inspiration = false }) {
409
1035
  var _ref;
1036
+ const liked = aiSiteStartInspirationTyped(answers);
410
1037
  const kind = aiSiteStartKind(answers);
411
1038
  const submissions = AI_SITE_SUBMISSION_CHOICES.find((option)=>option.id === answers.submissions);
412
1039
  const rows = [
@@ -425,6 +1052,13 @@ import { aiSiteStylePreview } from "./ai-site-style-previews.js";
425
1052
  value: answers.kind ? kind.label : `${kind.label}, picked for you`,
426
1053
  step: 'style'
427
1054
  },
1055
+ ...inspiration ? [
1056
+ {
1057
+ label: 'Sites you like',
1058
+ value: liked.length ? liked.map(aiSiteInspirationHost).join(', ') : 'None',
1059
+ step: 'style'
1060
+ }
1061
+ ] : [],
428
1062
  {
429
1063
  label: 'Form submissions',
430
1064
  value: (_ref = submissions == null ? void 0 : submissions.label) != null ? _ref : answers.submissions,
@@ -441,7 +1075,9 @@ import { aiSiteStylePreview } from "./ai-site-style-previews.js";
441
1075
  value: answers.welcomeEmail ? 'Draft one' : 'No',
442
1076
  step: 'details'
443
1077
  }
444
- ]
1078
+ ],
1079
+ // Everything "More details" and the contact fields were given (AGL-3979), each with Edit.
1080
+ ...aiSiteStartExtraRows(answers)
445
1081
  ];
446
1082
  return /*#__PURE__*/ _jsxs(Stack, {
447
1083
  spacing: 3,