@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.
- package/package.json +17 -17
- package/src/lib/activity/ai-activity-actions.d.ts +4 -3
- package/src/lib/activity/ai-activity-actions.js +4 -0
- package/src/lib/activity/ai-activity-actions.js.map +1 -1
- package/src/lib/assets/site-styles/beauty.webp +0 -0
- package/src/lib/assets/site-styles/blog.webp +0 -0
- package/src/lib/assets/site-styles/business.webp +0 -0
- package/src/lib/assets/site-styles/coming-soon.webp +0 -0
- package/src/lib/assets/site-styles/education.webp +0 -0
- package/src/lib/assets/site-styles/events.webp +0 -0
- package/src/lib/assets/site-styles/fitness.webp +0 -0
- package/src/lib/assets/site-styles/landing.webp +0 -0
- package/src/lib/assets/site-styles/music.webp +0 -0
- package/src/lib/assets/site-styles/nonprofit.webp +0 -0
- package/src/lib/assets/site-styles/personal.webp +0 -0
- package/src/lib/assets/site-styles/photography.webp +0 -0
- package/src/lib/assets/site-styles/portfolio.webp +0 -0
- package/src/lib/assets/site-styles/professional.webp +0 -0
- package/src/lib/assets/site-styles/realestate.webp +0 -0
- package/src/lib/assets/site-styles/restaurant.webp +0 -0
- package/src/lib/assets/site-styles/store.webp +0 -0
- package/src/lib/assets/site-styles/studio.webp +0 -0
- package/src/lib/assets/site-styles/trades.webp +0 -0
- package/src/lib/assets/site-styles/wellness.webp +0 -0
- package/src/lib/assets/site-styles/yoga.webp +0 -0
- package/src/lib/components/ai-credits-card.component.d.ts +4 -3
- package/src/lib/components/ai-credits-card.component.js +15 -15
- package/src/lib/components/ai-credits-card.component.js.map +1 -1
- package/src/lib/components/ai-job-input-form.component.d.ts +36 -0
- package/src/lib/components/ai-job-input-form.component.js +100 -0
- package/src/lib/components/ai-job-input-form.component.js.map +1 -0
- package/src/lib/components/ai-job-requests.d.ts +4 -0
- package/src/lib/components/ai-job-requests.js +4 -0
- package/src/lib/components/ai-job-requests.js.map +1 -1
- package/src/lib/components/ai-site-build-page.component.js +18 -0
- package/src/lib/components/ai-site-build-page.component.js.map +1 -1
- package/src/lib/components/ai-site-import-job.component.d.ts +41 -0
- package/src/lib/components/ai-site-import-job.component.js +707 -0
- package/src/lib/components/ai-site-import-job.component.js.map +1 -0
- package/src/lib/components/ai-site-import-start.component.d.ts +64 -0
- package/src/lib/components/ai-site-import-start.component.js +335 -0
- package/src/lib/components/ai-site-import-start.component.js.map +1 -0
- package/src/lib/components/ai-site-ownership-proof.component.d.ts +42 -0
- package/src/lib/components/ai-site-ownership-proof.component.js +353 -0
- package/src/lib/components/ai-site-ownership-proof.component.js.map +1 -0
- package/src/lib/components/ai-site-start-card.component.d.ts +1 -1
- package/src/lib/components/ai-site-start-card.component.js +261 -119
- package/src/lib/components/ai-site-start-card.component.js.map +1 -1
- package/src/lib/components/ai-site-start-steps.component.d.ts +43 -2
- package/src/lib/components/ai-site-start-steps.component.js +651 -15
- package/src/lib/components/ai-site-start-steps.component.js.map +1 -1
- package/src/lib/components/ai-site-start-tracking.d.ts +10 -0
- package/src/lib/components/ai-site-start-tracking.js +14 -0
- package/src/lib/components/ai-site-start-tracking.js.map +1 -1
- package/src/lib/components/ai-site-style-previews.js +26 -22
- package/src/lib/components/ai-site-style-previews.js.map +1 -1
- package/src/lib/components/ai-upsell-dialog.component.d.ts +7 -5
- package/src/lib/components/ai-upsell-dialog.component.js +8 -6
- package/src/lib/components/ai-upsell-dialog.component.js.map +1 -1
- package/src/lib/components/assist-build-card.component.js +11 -1
- package/src/lib/components/assist-build-card.component.js.map +1 -1
- package/src/lib/components/assist-jobs-drawer.component.js +9 -1
- package/src/lib/components/assist-jobs-drawer.component.js.map +1 -1
- package/src/lib/components/assist-panel.component.js +8 -4
- package/src/lib/components/assist-panel.component.js.map +1 -1
- package/src/lib/components/staff-org-ai-card.component.js +4 -7
- package/src/lib/components/staff-org-ai-card.component.js.map +1 -1
- package/src/lib/declarations.d.ts +2 -2
- package/src/lib/declarations.js +9 -5
- package/src/lib/declarations.js.map +1 -1
- package/src/lib/jobs/ai-build-capabilities.js +3 -1
- package/src/lib/jobs/ai-build-capabilities.js.map +1 -1
- package/src/lib/jobs/ai-business-profile-prefill.d.ts +1 -1
- package/src/lib/jobs/ai-business-profile-prefill.js +14 -3
- package/src/lib/jobs/ai-business-profile-prefill.js.map +1 -1
- package/src/lib/jobs/ai-job-build-step.js +5 -3
- package/src/lib/jobs/ai-job-build-step.js.map +1 -1
- package/src/lib/jobs/ai-job-drafts.d.ts +14 -0
- package/src/lib/jobs/ai-job-drafts.js +24 -0
- package/src/lib/jobs/ai-job-drafts.js.map +1 -1
- package/src/lib/jobs/ai-job-form-step.d.ts +15 -1
- package/src/lib/jobs/ai-job-form-step.js +75 -8
- package/src/lib/jobs/ai-job-form-step.js.map +1 -1
- package/src/lib/jobs/ai-job-import-step.d.ts +136 -0
- package/src/lib/jobs/ai-job-import-step.js +809 -0
- package/src/lib/jobs/ai-job-import-step.js.map +1 -0
- package/src/lib/jobs/ai-job-page-language.d.ts +52 -1
- package/src/lib/jobs/ai-job-page-language.js +99 -5
- package/src/lib/jobs/ai-job-page-language.js.map +1 -1
- package/src/lib/jobs/ai-job-page-step.d.ts +19 -2
- package/src/lib/jobs/ai-job-page-step.js +42 -18
- package/src/lib/jobs/ai-job-page-step.js.map +1 -1
- package/src/lib/jobs/ai-job-plan-step.d.ts +25 -2
- package/src/lib/jobs/ai-job-plan-step.js +103 -29
- package/src/lib/jobs/ai-job-plan-step.js.map +1 -1
- package/src/lib/jobs/ai-job-settings-step.js +4 -3
- package/src/lib/jobs/ai-job-settings-step.js.map +1 -1
- package/src/lib/jobs/ai-job-site-datasets.d.ts +27 -0
- package/src/lib/jobs/ai-job-site-datasets.js +140 -14
- package/src/lib/jobs/ai-job-site-datasets.js.map +1 -1
- package/src/lib/jobs/ai-job-site-look.js +18 -5
- package/src/lib/jobs/ai-job-site-look.js.map +1 -1
- package/src/lib/jobs/ai-job-site-step.d.ts +16 -1
- package/src/lib/jobs/ai-job-site-step.js +95 -22
- package/src/lib/jobs/ai-job-site-step.js.map +1 -1
- package/src/lib/jobs/ai-job-text-step.d.ts +15 -1
- package/src/lib/jobs/ai-job-text-step.js.map +1 -1
- package/src/lib/jobs/ai-job-tracking-step.d.ts +14 -3
- package/src/lib/jobs/ai-job-tracking-step.js +28 -5
- package/src/lib/jobs/ai-job-tracking-step.js.map +1 -1
- package/src/lib/jobs/ai-jobs.d.ts +13 -1
- package/src/lib/jobs/ai-jobs.js +77 -10
- package/src/lib/jobs/ai-jobs.js.map +1 -1
- package/src/lib/jobs/ai-layout-owner-photos.d.ts +16 -1
- package/src/lib/jobs/ai-layout-owner-photos.js +47 -0
- package/src/lib/jobs/ai-layout-owner-photos.js.map +1 -1
- package/src/lib/jobs/ai-layout-stock-photos.d.ts +27 -2
- package/src/lib/jobs/ai-layout-stock-photos.js +190 -19
- package/src/lib/jobs/ai-layout-stock-photos.js.map +1 -1
- package/src/lib/jobs/ai-site-inspiration-signals.d.ts +98 -0
- package/src/lib/jobs/ai-site-inspiration-signals.js +585 -0
- package/src/lib/jobs/ai-site-inspiration-signals.js.map +1 -0
- package/src/lib/jobs/ai-site-inspiration.d.ts +157 -0
- package/src/lib/jobs/ai-site-inspiration.js +346 -0
- package/src/lib/jobs/ai-site-inspiration.js.map +1 -0
- package/src/lib/jobs/ai-site-publish.d.ts +26 -1
- package/src/lib/jobs/ai-site-publish.js +162 -13
- package/src/lib/jobs/ai-site-publish.js.map +1 -1
- package/src/lib/jobs/ai-theme-brand-inputs.d.ts +77 -3
- package/src/lib/jobs/ai-theme-brand-inputs.js +135 -31
- package/src/lib/jobs/ai-theme-brand-inputs.js.map +1 -1
- package/src/lib/jobs/fixtures/ai-candle-shop-free-plan-recording.d.ts +97 -0
- package/src/lib/jobs/fixtures/ai-candle-shop-free-plan-recording.js +137 -0
- package/src/lib/jobs/fixtures/ai-candle-shop-free-plan-recording.js.map +1 -0
- package/src/lib/jobs/fixtures/ai-site-inspiration-pages.d.ts +38 -0
- package/src/lib/jobs/fixtures/ai-site-inspiration-pages.js +103 -0
- package/src/lib/jobs/fixtures/ai-site-inspiration-pages.js.map +1 -0
- package/src/lib/jobs/fixtures/ai-stock-photo-agl3988-recordings.d.ts +25 -0
- package/src/lib/jobs/fixtures/ai-stock-photo-agl3988-recordings.js +174 -0
- package/src/lib/jobs/fixtures/ai-stock-photo-agl3988-recordings.js.map +1 -0
- package/src/lib/layout-language/ai-layout-compiler.d.ts +1 -1
- package/src/lib/layout-language/ai-layout-compiler.js +438 -25
- package/src/lib/layout-language/ai-layout-compiler.js.map +1 -1
- package/src/lib/layout-language/ai-layout-contact.d.ts +57 -0
- package/src/lib/layout-language/ai-layout-contact.js +137 -0
- package/src/lib/layout-language/ai-layout-contact.js.map +1 -0
- package/src/lib/layout-language/ai-layout-copy.d.ts +12 -0
- package/src/lib/layout-language/ai-layout-copy.js +34 -2
- package/src/lib/layout-language/ai-layout-copy.js.map +1 -1
- package/src/lib/layout-language/ai-layout-design.d.ts +65 -8
- package/src/lib/layout-language/ai-layout-design.js +411 -97
- package/src/lib/layout-language/ai-layout-design.js.map +1 -1
- package/src/lib/layout-language/ai-layout-frame.js +23 -0
- package/src/lib/layout-language/ai-layout-frame.js.map +1 -1
- package/src/lib/layout-language/ai-layout-labels.d.ts +2 -0
- package/src/lib/layout-language/ai-layout-labels.js +12 -6
- package/src/lib/layout-language/ai-layout-labels.js.map +1 -1
- package/src/lib/layout-language/ai-layout-language.d.ts +3 -2
- package/src/lib/layout-language/ai-layout-language.js +4 -3
- package/src/lib/layout-language/ai-layout-language.js.map +1 -1
- package/src/lib/layout-language/ai-layout-links.d.ts +13 -0
- package/src/lib/layout-language/ai-layout-links.js +30 -0
- package/src/lib/layout-language/ai-layout-links.js.map +1 -1
- package/src/lib/layout-language/ai-layout-pictures.d.ts +49 -6
- package/src/lib/layout-language/ai-layout-pictures.js +145 -22
- package/src/lib/layout-language/ai-layout-pictures.js.map +1 -1
- package/src/lib/model/ai-build-job.d.ts +16 -1
- package/src/lib/model/ai-build-job.js +40 -0
- package/src/lib/model/ai-build-job.js.map +1 -1
- package/src/lib/model/ai-credit-estimate.d.ts +20 -0
- package/src/lib/model/ai-credit-estimate.js +13 -0
- package/src/lib/model/ai-credit-estimate.js.map +1 -1
- package/src/lib/model/ai-job-activity.d.ts +2 -2
- package/src/lib/model/ai-job-activity.js +6 -4
- package/src/lib/model/ai-job-activity.js.map +1 -1
- package/src/lib/model/ai-job-input.d.ts +33 -0
- package/src/lib/model/ai-job-input.js +59 -0
- package/src/lib/model/ai-job-input.js.map +1 -0
- package/src/lib/model/ai-job-notice.d.ts +4 -0
- package/src/lib/model/ai-job-notice.js +28 -4
- package/src/lib/model/ai-job-notice.js.map +1 -1
- package/src/lib/model/ai-jobs.types.d.ts +69 -3
- package/src/lib/model/ai-jobs.types.js +2 -1
- package/src/lib/model/ai-jobs.types.js.map +1 -1
- package/src/lib/model/ai-site-details.d.ts +122 -0
- package/src/lib/model/ai-site-details.js +300 -0
- package/src/lib/model/ai-site-details.js.map +1 -0
- package/src/lib/model/ai-site-entity.d.ts +181 -0
- package/src/lib/model/ai-site-entity.js +390 -0
- package/src/lib/model/ai-site-entity.js.map +1 -0
- package/src/lib/model/ai-site-import-view.d.ts +130 -0
- package/src/lib/model/ai-site-import-view.js +182 -0
- package/src/lib/model/ai-site-import-view.js.map +1 -0
- package/src/lib/model/ai-site-import.d.ts +302 -0
- package/src/lib/model/ai-site-import.js +526 -0
- package/src/lib/model/ai-site-import.js.map +1 -0
- package/src/lib/model/ai-site-inspiration.d.ts +72 -0
- package/src/lib/model/ai-site-inspiration.js +109 -0
- package/src/lib/model/ai-site-inspiration.js.map +1 -0
- package/src/lib/model/ai-site-job.d.ts +13 -1
- package/src/lib/model/ai-site-job.js +15 -2
- package/src/lib/model/ai-site-job.js.map +1 -1
- package/src/lib/model/ai-site-kinds.js +109 -21
- package/src/lib/model/ai-site-kinds.js.map +1 -1
- package/src/lib/model/ai-site-look.d.ts +10 -0
- package/src/lib/model/ai-site-look.js +24 -0
- package/src/lib/model/ai-site-look.js.map +1 -1
- package/src/lib/model/ai-site-start-seo.d.ts +19 -5
- package/src/lib/model/ai-site-start-seo.js +25 -7
- package/src/lib/model/ai-site-start-seo.js.map +1 -1
- package/src/lib/model/ai-site-start-steps.d.ts +9 -3
- package/src/lib/model/ai-site-start-steps.js +67 -5
- package/src/lib/model/ai-site-start-steps.js.map +1 -1
- package/src/lib/model/ai-site-start.d.ts +81 -4
- package/src/lib/model/ai-site-start.js +207 -13
- package/src/lib/model/ai-site-start.js.map +1 -1
- package/src/lib/model/ai-upsell-copy.js +4 -1
- package/src/lib/model/ai-upsell-copy.js.map +1 -1
- package/src/lib/plan-entitlements.d.ts +4 -3
- package/src/lib/plan-entitlements.js +3 -8
- package/src/lib/plan-entitlements.js.map +1 -1
- package/src/lib/runtime/ai-dataset-generation.d.ts +8 -1
- package/src/lib/runtime/ai-dataset-generation.js +12 -2
- package/src/lib/runtime/ai-dataset-generation.js.map +1 -1
- package/src/lib/runtime/ai-doctrine-validators.d.ts +26 -33
- package/src/lib/runtime/ai-doctrine-validators.js +54 -44
- package/src/lib/runtime/ai-doctrine-validators.js.map +1 -1
- package/src/lib/runtime/ai-doctrine.js +1 -1
- package/src/lib/runtime/ai-doctrine.js.map +1 -1
- package/src/lib/runtime/ai-node-tree.d.ts +7 -0
- package/src/lib/runtime/ai-node-tree.js +9 -1
- package/src/lib/runtime/ai-node-tree.js.map +1 -1
- package/src/lib/server/ai-create-route.d.ts +1 -1
- package/src/lib/server/ai-create-route.js +3 -4
- package/src/lib/server/ai-create-route.js.map +1 -1
- package/src/lib/server/ai-jobs-resume.js +27 -3
- package/src/lib/server/ai-jobs-resume.js.map +1 -1
- package/src/lib/server/ai-jobs-route.js +18 -0
- package/src/lib/server/ai-jobs-route.js.map +1 -1
- package/src/lib/server/ai-site-import-route.d.ts +89 -0
- package/src/lib/server/ai-site-import-route.js +356 -0
- package/src/lib/server/ai-site-import-route.js.map +1 -0
- package/src/lib/server.js +14 -0
- package/src/lib/server.js.map +1 -1
- package/src/lib/site-import/fixtures/site-import-crawl-recordings.d.ts +45 -0
- package/src/lib/site-import/fixtures/site-import-crawl-recordings.js +313 -0
- package/src/lib/site-import/fixtures/site-import-crawl-recordings.js.map +1 -0
- package/src/lib/site-import/fixtures/site-import-wave-recordings.d.ts +50 -0
- package/src/lib/site-import/fixtures/site-import-wave-recordings.js +217 -0
- package/src/lib/site-import/fixtures/site-import-wave-recordings.js.map +1 -0
- package/src/lib/site-import/site-import-crawl.d.ts +163 -0
- package/src/lib/site-import/site-import-crawl.js +467 -0
- package/src/lib/site-import/site-import-crawl.js.map +1 -0
- package/src/lib/site-import/site-import-flag.d.ts +23 -0
- package/src/lib/site-import/site-import-flag.js +23 -0
- package/src/lib/site-import/site-import-flag.js.map +1 -0
- package/src/lib/site-import/site-import-html.d.ts +94 -0
- package/src/lib/site-import/site-import-html.js +462 -0
- package/src/lib/site-import/site-import-html.js.map +1 -0
- package/src/lib/site-import/site-import-images.d.ts +54 -0
- package/src/lib/site-import/site-import-images.js +204 -0
- package/src/lib/site-import/site-import-images.js.map +1 -0
- package/src/lib/site-import/site-import-page.d.ts +48 -0
- package/src/lib/site-import/site-import-page.js +150 -0
- package/src/lib/site-import/site-import-page.js.map +1 -0
- package/src/lib/site-import/site-import-review.d.ts +40 -0
- package/src/lib/site-import/site-import-review.js +149 -0
- package/src/lib/site-import/site-import-review.js.map +1 -0
- package/src/lib/site-import/site-import-robots.d.ts +52 -0
- package/src/lib/site-import/site-import-robots.js +126 -0
- package/src/lib/site-import/site-import-robots.js.map +1 -0
- package/src/lib/usage/assist-credits.d.ts +4 -4
- package/src/lib/usage/assist-credits.js +4 -4
- package/src/lib/usage/assist-credits.js.map +1 -1
- package/src/lib/usage/staff-org-ai-view.js +6 -3
- package/src/lib/usage/staff-org-ai-view.js.map +1 -1
- package/src/lib/usage/staff-org-ai.d.ts +4 -2
- package/src/lib/usage/staff-org-ai.js +7 -7
- package/src/lib/usage/staff-org-ai.js.map +1 -1
- package/src/lib/usage/staff-org-usage-ai.js +2 -2
- 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 {
|
|
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(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
117
|
-
|
|
116
|
+
height: '100%',
|
|
117
|
+
p: {
|
|
118
|
+
xs: 3,
|
|
119
|
+
sm: 4
|
|
120
|
+
}
|
|
118
121
|
},
|
|
119
|
-
children:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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,
|
|
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 = (
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
629
|
-
const
|
|
630
|
-
const
|
|
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: '
|
|
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 =
|
|
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
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
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__*/
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
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(
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
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
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
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
|
|
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
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
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
|
})
|