@adminide-stack/yantra-mobile 12.0.108 → 12.0.109
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/lib/compute.js +57 -1
- package/lib/compute.js.map +1 -1
- package/lib/config/env-config.js +8 -0
- package/lib/config/env-config.js.map +1 -1
- package/lib/features/apps/AppsCatalog.js +10 -0
- package/lib/features/apps/AppsCatalog.js.map +1 -1
- package/lib/features/apps/appArt.js +2 -1
- package/lib/features/apps/appArt.js.map +1 -1
- package/lib/features/apps/mobileAppCatalog.js +11 -0
- package/lib/features/apps/mobileAppCatalog.js.map +1 -1
- package/lib/features/apps/nativeAppHandoff.js +2 -1
- package/lib/features/apps/nativeAppHandoff.js.map +1 -1
- package/lib/features/health/healthSyncStore.js +7 -1
- package/lib/features/health/healthSyncStore.js.map +1 -1
- package/lib/features/messaging/useChatViewer.js +3 -2
- package/lib/features/messaging/useChatViewer.js.map +1 -1
- package/lib/features/webbuilder/WebBuilderExperience.js +474 -0
- package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -0
- package/lib/features/webbuilder/brandKitStorage.js +69 -0
- package/lib/features/webbuilder/brandKitStorage.js.map +1 -0
- package/lib/features/webbuilder/buildFragments.js +360 -0
- package/lib/features/webbuilder/buildFragments.js.map +1 -0
- package/lib/features/webbuilder/components/BottomTabs.js +65 -0
- package/lib/features/webbuilder/components/BottomTabs.js.map +1 -0
- package/lib/features/webbuilder/components/BrandKitSheet.js +197 -0
- package/lib/features/webbuilder/components/BrandKitSheet.js.map +1 -0
- package/lib/features/webbuilder/components/CodeView.js +99 -0
- package/lib/features/webbuilder/components/CodeView.js.map +1 -0
- package/lib/features/webbuilder/components/Composer.js +217 -0
- package/lib/features/webbuilder/components/Composer.js.map +1 -0
- package/lib/features/webbuilder/components/PreviewFrame.js +72 -0
- package/lib/features/webbuilder/components/PreviewFrame.js.map +1 -0
- package/lib/features/webbuilder/components/PreviewPlaceholder.js +107 -0
- package/lib/features/webbuilder/components/PreviewPlaceholder.js.map +1 -0
- package/lib/features/webbuilder/components/PreviewScreen.js +200 -0
- package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -0
- package/lib/features/webbuilder/components/ProjectChat.js +580 -0
- package/lib/features/webbuilder/components/ProjectChat.js.map +1 -0
- package/lib/features/webbuilder/components/ProjectsScreen.js +339 -0
- package/lib/features/webbuilder/components/ProjectsScreen.js.map +1 -0
- package/lib/features/webbuilder/components/PublishSheet.js +143 -0
- package/lib/features/webbuilder/components/PublishSheet.js.map +1 -0
- package/lib/features/webbuilder/components/SiteScoreSheet.js +73 -0
- package/lib/features/webbuilder/components/SiteScoreSheet.js.map +1 -0
- package/lib/features/webbuilder/components/StudioHome.js +367 -0
- package/lib/features/webbuilder/components/StudioHome.js.map +1 -0
- package/lib/features/webbuilder/components/TemplateCard.js +73 -0
- package/lib/features/webbuilder/components/TemplateCard.js.map +1 -0
- package/lib/features/webbuilder/components/TemplatesSheet.js +178 -0
- package/lib/features/webbuilder/components/TemplatesSheet.js.map +1 -0
- package/lib/features/webbuilder/components/VersionsSheet.js +57 -0
- package/lib/features/webbuilder/components/VersionsSheet.js.map +1 -0
- package/lib/features/webbuilder/components/ui.js +291 -0
- package/lib/features/webbuilder/components/ui.js.map +1 -0
- package/lib/features/webbuilder/nativeWebBuilderRegistry.js +15 -0
- package/lib/features/webbuilder/nativeWebBuilderRegistry.js.map +1 -0
- package/lib/features/webbuilder/studioCatalog.js +147 -0
- package/lib/features/webbuilder/studioCatalog.js.map +1 -0
- package/lib/features/webbuilder/webbuilderPrompts.js +42 -0
- package/lib/features/webbuilder/webbuilderPrompts.js.map +1 -0
- package/lib/features/webbuilder/webbuilderTheme.js +63 -0
- package/lib/features/webbuilder/webbuilderTheme.js.map +1 -0
- package/lib/features/webbuilder/workflow.js +540 -0
- package/lib/features/webbuilder/workflow.js.map +1 -0
- package/lib/hooks/useChatApi.js +7 -2
- package/lib/hooks/useChatApi.js.map +1 -1
- package/lib/hooks/useChatStream.js +1 -1
- package/lib/hooks/useChatStream.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/routes.json +106 -0
- package/lib/screens/WebBuilderNative/index.js +71 -0
- package/lib/screens/WebBuilderNative/index.js.map +1 -0
- package/lib/screens/WebBuilderNative/useCodeAssistantCatalog.js +45 -0
- package/lib/screens/WebBuilderNative/useCodeAssistantCatalog.js.map +1 -0
- package/lib/screens/WebBuilderNative/useWebBuilderGallery.js +125 -0
- package/lib/screens/WebBuilderNative/useWebBuilderGallery.js.map +1 -0
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js +408 -0
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js.map +1 -0
- package/lib/screens/WebBuilderNative/webbuilderTransport.js +88 -0
- package/lib/screens/WebBuilderNative/webbuilderTransport.js.map +1 -0
- package/package.json +4 -4
|
@@ -8,6 +8,7 @@ import {useEffect,useMemo}from'react';import {useSelector,useDispatch}from'react
|
|
|
8
8
|
function useChatViewer() {
|
|
9
9
|
var _a, _b;
|
|
10
10
|
const authUser = useSelector(userSelector);
|
|
11
|
+
const rehydrated = useSelector((state) => state._persist ? Boolean(state._persist.rehydrated) : true);
|
|
11
12
|
const dispatch = useDispatch();
|
|
12
13
|
const storedUserId = (authUser == null ? void 0 : authUser.id) || null;
|
|
13
14
|
const auth0Id = (authUser == null ? void 0 : authUser.authUserId) || null;
|
|
@@ -15,7 +16,7 @@ function useChatViewer() {
|
|
|
15
16
|
variables: {
|
|
16
17
|
auth0Id
|
|
17
18
|
},
|
|
18
|
-
skip: Boolean(storedUserId) || !auth0Id,
|
|
19
|
+
skip: !rehydrated || Boolean(storedUserId) || !auth0Id,
|
|
19
20
|
fetchPolicy: "network-only"
|
|
20
21
|
});
|
|
21
22
|
const recoveredUserId = ((_b = (_a = account.data) == null ? void 0 : _a.currentUser) == null ? void 0 : _b.id) || null;
|
|
@@ -37,7 +38,7 @@ function useChatViewer() {
|
|
|
37
38
|
phoneE164: membership.phoneE164,
|
|
38
39
|
registrationStatus
|
|
39
40
|
} : null, [userId, displayName, avatarUrl, membership.phoneE164, registrationStatus]);
|
|
40
|
-
const ready = Boolean(authUser) && !membership.loading && !account.loading;
|
|
41
|
+
const ready = Boolean(authUser) && rehydrated && !membership.loading && !account.loading;
|
|
41
42
|
const accountError = !auth0Id ? "You are signed out. Sign in again to use Chat." : account.error ? `Could not load your account: ${account.error.message}` : "Could not load your account.";
|
|
42
43
|
const error = membership.error || (!viewer && ready ? accountError : null);
|
|
43
44
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatViewer.js","sources":["../../../src/features/messaging/useChatViewer.ts"],"sourcesContent":["import { useEffect, useMemo } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { gql, useQuery } from '@apollo/client';\nimport type { IUserState } from '@adminide-stack/core';\nimport { Store, setUserAccountDetails, userSelector } from '@adminide-stack/user-auth0-client';\nimport { pickAuthPicture, pickPrimaryDisplayName } from '../../utils/authUserDisplay';\nimport type { ChatViewer, ChatRegistrationStatus } from './chatHost';\nimport { useYantraChatMembership } from './useYantraChatMembership';\nimport { YANTRA_CHAT_ORG_SLUG } from './yantraChatOrg';\n\nexport interface ChatViewerState {\n viewer: ChatViewer | null;\n error: string | null;\n ready: boolean;\n needsRegistration: boolean;\n membershipLoading: boolean;\n registerForChat: (phoneE164: string) => Promise<string>;\n refreshMembership: () => Promise<void>;\n}\n\n/**\n * The account id for the signed-in Auth0 user. The Login screen stores it in `user.id`, and the\n * store is persisted - so a session restored without it (an older build, or a lookup that failed\n * at login) keeps `id: ''` for good. Chat asks the server instead of failing.\n */\nconst VIEWER_ACCOUNT_QUERY = gql`\n query ChatViewerAccount($auth0Id: String!) {\n currentUser(auth0Id: $auth0Id) {\n id\n }\n }\n`;\n\nexport function useChatViewer(): ChatViewerState {\n const authUser = useSelector<Store.Auth, IUserState>(userSelector);\n const dispatch = useDispatch();\n const storedUserId = authUser?.id || null;\n const auth0Id = (authUser as { authUserId?: string | null } | undefined)?.authUserId || null;\n\n const account = useQuery<{ currentUser?: { id?: string | null } | null }>(VIEWER_ACCOUNT_QUERY, {\n variables: { auth0Id },\n skip: Boolean(storedUserId) || !auth0Id,\n fetchPolicy: 'network-only',\n });\n const recoveredUserId = account.data?.currentUser?.id || null;\n\n // Repair the store, so every screen reading `user.id` (not only Chat) gets the account.\n useEffect(() => {\n if (!storedUserId && recoveredUserId) dispatch(setUserAccountDetails({ id: recoveredUserId }));\n }, [storedUserId, recoveredUserId, dispatch]);\n\n const userId = storedUserId || recoveredUserId;\n const displayName = useMemo(() => pickPrimaryDisplayName(authUser), [authUser]);\n const avatarUrl = useMemo(() => pickAuthPicture(authUser), [authUser]);\n\n const membership = useYantraChatMembership(userId, displayName);\n\n const registrationStatus: ChatRegistrationStatus = membership.phoneE164\n ? 'registered'\n : membership.loading\n ? 'registering'\n : 'not-registered';\n\n const viewer = useMemo<ChatViewer | null>(\n () =>\n userId\n ? {\n userId,\n displayName,\n avatarUrl,\n orgName: YANTRA_CHAT_ORG_SLUG,\n phoneE164: membership.phoneE164,\n registrationStatus,\n }\n : null,\n [userId, displayName, avatarUrl, membership.phoneE164, registrationStatus],\n );\n\n const ready = Boolean(authUser) && !membership.loading && !account.loading;\n\n const accountError = !auth0Id\n ? 'You are signed out. Sign in again to use Chat.'\n : account.error\n ? `Could not load your account: ${account.error.message}`\n : 'Could not load your account.';\n const error = membership.error || (!viewer && ready ? accountError : null);\n\n return {\n viewer,\n error,\n ready,\n needsRegistration: membership.needsRegistration,\n membershipLoading: membership.loading,\n registerForChat: membership.register,\n refreshMembership: membership.refresh,\n };\n}\n"],"names":[],"mappings":"2aAwBA,MAAM,oBAAuB,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOtB,SAAS,aAAiC,GAAA;AA/BjD,EAAA,IAAA,EAAA,EAAA,EAAA;AAgCE,EAAM,MAAA,QAAA,GAAW,YAAoC,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"useChatViewer.js","sources":["../../../src/features/messaging/useChatViewer.ts"],"sourcesContent":["import { useEffect, useMemo } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { gql, useQuery } from '@apollo/client';\nimport type { IUserState } from '@adminide-stack/core';\nimport { Store, setUserAccountDetails, userSelector } from '@adminide-stack/user-auth0-client';\nimport { pickAuthPicture, pickPrimaryDisplayName } from '../../utils/authUserDisplay';\nimport type { ChatViewer, ChatRegistrationStatus } from './chatHost';\nimport { useYantraChatMembership } from './useYantraChatMembership';\nimport { YANTRA_CHAT_ORG_SLUG } from './yantraChatOrg';\n\nexport interface ChatViewerState {\n viewer: ChatViewer | null;\n error: string | null;\n ready: boolean;\n needsRegistration: boolean;\n membershipLoading: boolean;\n registerForChat: (phoneE164: string) => Promise<string>;\n refreshMembership: () => Promise<void>;\n}\n\n/**\n * The account id for the signed-in Auth0 user. The Login screen stores it in `user.id`, and the\n * store is persisted - so a session restored without it (an older build, or a lookup that failed\n * at login) keeps `id: ''` for good. Chat asks the server instead of failing.\n */\nconst VIEWER_ACCOUNT_QUERY = gql`\n query ChatViewerAccount($auth0Id: String!) {\n currentUser(auth0Id: $auth0Id) {\n id\n }\n }\n`;\n\nexport function useChatViewer(): ChatViewerState {\n const authUser = useSelector<Store.Auth, IUserState>(userSelector);\n // The store is restored from disk after launch (redux-persist, no gate in front of the UI):\n // until then `user` is the empty initial state, which must not read as \"no account\".\n const rehydrated = useSelector((state: { _persist?: { rehydrated?: boolean } }) =>\n state._persist ? Boolean(state._persist.rehydrated) : true,\n );\n const dispatch = useDispatch();\n const storedUserId = authUser?.id || null;\n const auth0Id = (authUser as { authUserId?: string | null } | undefined)?.authUserId || null;\n\n const account = useQuery<{ currentUser?: { id?: string | null } | null }>(VIEWER_ACCOUNT_QUERY, {\n variables: { auth0Id },\n skip: !rehydrated || Boolean(storedUserId) || !auth0Id,\n fetchPolicy: 'network-only',\n });\n const recoveredUserId = account.data?.currentUser?.id || null;\n\n // Repair the store, so every screen reading `user.id` (not only Chat) gets the account.\n useEffect(() => {\n if (!storedUserId && recoveredUserId) dispatch(setUserAccountDetails({ id: recoveredUserId }));\n }, [storedUserId, recoveredUserId, dispatch]);\n\n const userId = storedUserId || recoveredUserId;\n const displayName = useMemo(() => pickPrimaryDisplayName(authUser), [authUser]);\n const avatarUrl = useMemo(() => pickAuthPicture(authUser), [authUser]);\n\n const membership = useYantraChatMembership(userId, displayName);\n\n const registrationStatus: ChatRegistrationStatus = membership.phoneE164\n ? 'registered'\n : membership.loading\n ? 'registering'\n : 'not-registered';\n\n const viewer = useMemo<ChatViewer | null>(\n () =>\n userId\n ? {\n userId,\n displayName,\n avatarUrl,\n orgName: YANTRA_CHAT_ORG_SLUG,\n phoneE164: membership.phoneE164,\n registrationStatus,\n }\n : null,\n [userId, displayName, avatarUrl, membership.phoneE164, registrationStatus],\n );\n\n const ready = Boolean(authUser) && rehydrated && !membership.loading && !account.loading;\n\n const accountError = !auth0Id\n ? 'You are signed out. Sign in again to use Chat.'\n : account.error\n ? `Could not load your account: ${account.error.message}`\n : 'Could not load your account.';\n const error = membership.error || (!viewer && ready ? accountError : null);\n\n return {\n viewer,\n error,\n ready,\n needsRegistration: membership.needsRegistration,\n membershipLoading: membership.loading,\n registerForChat: membership.register,\n refreshMembership: membership.refresh,\n };\n}\n"],"names":[],"mappings":"2aAwBA,MAAM,oBAAuB,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOtB,SAAS,aAAiC,GAAA;AA/BjD,EAAA,IAAA,EAAA,EAAA,EAAA;AAgCE,EAAM,MAAA,QAAA,GAAW,YAAoC,YAAY,CAAA;AAGjE,EAAM,MAAA,UAAA,GAAa,WAAY,CAAA,CAAC,KAI1B,KAAA,KAAA,CAAM,QAAW,GAAA,OAAA,CAAQ,KAAM,CAAA,QAAA,CAAS,UAAU,CAAA,GAAI,IAAI,CAAA;AAChE,EAAA,MAAM,WAAW,WAAY,EAAA;AAC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,IACA,SAAA;AAAA,IACA,OAAS,EAAA,oBAAA;AAAA,IACT,WAAW,UAAW,CAAA,SAAA;AAAA,IACtB;AAAA,GACF,GAAI,MAAM,CAAC,MAAA,EAAQ,aAAa,SAAW,EAAA,UAAA,CAAW,SAAW,EAAA,kBAAkB,CAAC,CAAA;AACpF,EAAM,MAAA,KAAA,GAAQ,QAAQ,QAAQ,CAAA,IAAK,cAAc,CAAC,UAAA,CAAW,OAAW,IAAA,CAAC,OAAQ,CAAA,OAAA;AACjF,EAAM,MAAA,YAAA,GAAe,CAAC,OAAA,GAAU,gDAAmD,GAAA,OAAA,CAAQ,QAAQ,CAAgC,6BAAA,EAAA,OAAA,CAAQ,KAAM,CAAA,OAAO,CAAK,CAAA,GAAA,8BAAA;AAC7J,EAAA,MAAM,QAAQ,UAAW,CAAA,KAAA,KAAU,CAAC,MAAA,IAAU,QAAQ,YAAe,GAAA,IAAA,CAAA;AACrE,EAAO,OAAA;AAAA,IACL,MAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,mBAAmB,UAAW,CAAA,iBAAA;AAAA,IAC9B,mBAAmB,UAAW,CAAA,OAAA;AAAA,IAC9B,iBAAiB,UAAW,CAAA,QAAA;AAAA,IAC5B,mBAAmB,UAAW,CAAA;AAAA,GAChC;AACF"}
|
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useMemo,useState,useCallback,useRef,useEffect}from'react';import {StyleSheet,Keyboard,BackHandler,View,Text,Share,Platform,ActionSheetIOS,Alert,Linking}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {GestureHandlerRootView}from'react-native-gesture-handler';import {useSafeInsets}from'../canvas/withRemoteSafeArea.js';import {useAppTheme}from'../../theme/AppThemeProvider.js';import {Tap,DIM}from'../inbox/components/Tap.js';import {isBareSeed,studioTurnText,brandBriefBlock,siteScoreTurn}from'./studioCatalog.js';import {useBrandKit}from'./brandKitStorage.js';import {wakePreviewPrompt}from'./webbuilderPrompts.js';import {webbuilderTheme}from'./webbuilderTheme.js';import {BrandKitSheet}from'./components/BrandKitSheet.js';import {CodeView}from'./components/CodeView.js';import {ProjectChat}from'./components/ProjectChat.js';import {PreviewScreen}from'./components/PreviewScreen.js';import {PublishSheet}from'./components/PublishSheet.js';import {BOTTOM_TABS_SPACE,BottomTabs}from'./components/BottomTabs.js';import {SiteScoreSheet}from'./components/SiteScoreSheet.js';import {ProjectsScreen}from'./components/ProjectsScreen.js';import {TemplatesSheet}from'./components/TemplatesSheet.js';import {StudioHome}from'./components/StudioHome.js';import {VersionsSheet}from'./components/VersionsSheet.js';import {IconButton,Toast}from'./components/ui.js';var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
const TOAST_MS = 2400;
|
|
18
|
+
const PUBLISH_WATCH_MS = 10 * 60 * 1e3;
|
|
19
|
+
function WebBuilderExperience({
|
|
20
|
+
isDark: hostIsDark,
|
|
21
|
+
onExit,
|
|
22
|
+
projects,
|
|
23
|
+
projectsLoading = false,
|
|
24
|
+
projectsError = null,
|
|
25
|
+
onRefreshProjects,
|
|
26
|
+
projectsHasMore = false,
|
|
27
|
+
onLoadMoreProjects,
|
|
28
|
+
templates,
|
|
29
|
+
templatesLoading = false,
|
|
30
|
+
templatesError = null,
|
|
31
|
+
onReloadTemplates,
|
|
32
|
+
startBlocked = null,
|
|
33
|
+
startNotice = null,
|
|
34
|
+
activeChannelId,
|
|
35
|
+
onOpenProject,
|
|
36
|
+
onCloseProject,
|
|
37
|
+
onStartProject,
|
|
38
|
+
builds,
|
|
39
|
+
buildsLoading = false,
|
|
40
|
+
building = null,
|
|
41
|
+
publishing: publishingOnChat = false,
|
|
42
|
+
hostChat,
|
|
43
|
+
onPublish,
|
|
44
|
+
onResumePreview,
|
|
45
|
+
initialAgentSeed = null
|
|
46
|
+
}) {
|
|
47
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
48
|
+
const appTheme = useAppTheme();
|
|
49
|
+
const isDark = hostIsDark != null ? hostIsDark : appTheme.isDark;
|
|
50
|
+
const theme = useMemo(() => webbuilderTheme(isDark), [isDark]);
|
|
51
|
+
const insets = useSafeInsets();
|
|
52
|
+
const project = useMemo(() => {
|
|
53
|
+
var _a2;
|
|
54
|
+
return (_a2 = projects.find((p) => p.channelId === activeChannelId)) != null ? _a2 : null;
|
|
55
|
+
}, [projects, activeChannelId]);
|
|
56
|
+
const [draft, setDraft] = useState("");
|
|
57
|
+
const [template, setTemplate] = useState(null);
|
|
58
|
+
const [templatesOpen, setTemplatesOpen] = useState(false);
|
|
59
|
+
const [scoreOpen, setScoreOpen] = useState(false);
|
|
60
|
+
const [homeTab, setHomeTab] = useState("create");
|
|
61
|
+
const {
|
|
62
|
+
brand,
|
|
63
|
+
saveBrand
|
|
64
|
+
} = useBrandKit();
|
|
65
|
+
const [brandOpen, setBrandOpen] = useState(false);
|
|
66
|
+
const pickTemplate = useCallback((picked) => {
|
|
67
|
+
setTemplate(picked);
|
|
68
|
+
setTemplatesOpen(false);
|
|
69
|
+
setHomeTab("create");
|
|
70
|
+
setDraft((prev) => isBareSeed(prev) && picked.chatPrompt ? picked.chatPrompt : prev);
|
|
71
|
+
}, []);
|
|
72
|
+
const startSite = useCallback((start, files) => {
|
|
73
|
+
const brief = start.brief.trim() || (start.template ? start.template.chatPrompt || start.template.title : "");
|
|
74
|
+
if (!brief && !(files == null ? void 0 : files.length)) return;
|
|
75
|
+
onStartProject(__spreadValues(__spreadValues({
|
|
76
|
+
text: studioTurnText({
|
|
77
|
+
brief,
|
|
78
|
+
brandBlock: brandBriefBlock(brand),
|
|
79
|
+
referenceUrl: start.referenceUrl
|
|
80
|
+
}),
|
|
81
|
+
template: start.template
|
|
82
|
+
}, start.referenceUrl ? {
|
|
83
|
+
referenceUrl: start.referenceUrl
|
|
84
|
+
} : {}), (files == null ? void 0 : files.length) ? {
|
|
85
|
+
attachments: files
|
|
86
|
+
} : {}));
|
|
87
|
+
setDraft("");
|
|
88
|
+
setTemplate(null);
|
|
89
|
+
}, [onStartProject, brand]);
|
|
90
|
+
const handedOff = useRef(false);
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
if (handedOff.current || !initialAgentSeed || startBlocked) return;
|
|
93
|
+
handedOff.current = true;
|
|
94
|
+
startSite({
|
|
95
|
+
brief: initialAgentSeed.text,
|
|
96
|
+
template: null
|
|
97
|
+
}, initialAgentSeed.files);
|
|
98
|
+
}, [initialAgentSeed, startBlocked, startSite]);
|
|
99
|
+
const [selectedKey, setSelectedKey] = useState(null);
|
|
100
|
+
useEffect(() => setSelectedKey(null), [activeChannelId]);
|
|
101
|
+
const latest = (_a = builds[0]) != null ? _a : null;
|
|
102
|
+
const build = useMemo(() => {
|
|
103
|
+
var _a2;
|
|
104
|
+
return selectedKey ? (_a2 = builds.find((b) => b.key === selectedKey)) != null ? _a2 : latest : latest;
|
|
105
|
+
}, [builds, selectedKey, latest]);
|
|
106
|
+
const siteTitle = (project == null ? void 0 : project.title) || (build == null ? void 0 : build.title) || null;
|
|
107
|
+
const [previewNonce, setPreviewNonce] = useState(0);
|
|
108
|
+
const seenBuildAt = useRef({
|
|
109
|
+
key: null,
|
|
110
|
+
at: 0
|
|
111
|
+
});
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
var _a2, _b2;
|
|
114
|
+
const key = (_a2 = build == null ? void 0 : build.key) != null ? _a2 : null;
|
|
115
|
+
const at = (_b2 = build == null ? void 0 : build.updatedAt) != null ? _b2 : 0;
|
|
116
|
+
const seen = seenBuildAt.current;
|
|
117
|
+
if (key && key === seen.key && at > seen.at) setPreviewNonce((n) => n + 1);
|
|
118
|
+
seenBuildAt.current = {
|
|
119
|
+
key,
|
|
120
|
+
at
|
|
121
|
+
};
|
|
122
|
+
}, [build == null ? void 0 : build.key, build == null ? void 0 : build.updatedAt]);
|
|
123
|
+
const [toast, setToast] = useState(null);
|
|
124
|
+
const toastTimer = useRef(null);
|
|
125
|
+
const showToast = useCallback((message) => {
|
|
126
|
+
if (toastTimer.current) clearTimeout(toastTimer.current);
|
|
127
|
+
setToast(message);
|
|
128
|
+
toastTimer.current = setTimeout(() => setToast(null), TOAST_MS);
|
|
129
|
+
}, []);
|
|
130
|
+
useEffect(() => () => toastTimer.current ? clearTimeout(toastTimer.current) : void 0, []);
|
|
131
|
+
const [mode, setMode] = useState("chat");
|
|
132
|
+
useEffect(() => setMode("chat"), [activeChannelId]);
|
|
133
|
+
const sendToAgent = useCallback((text, files) => {
|
|
134
|
+
const words = text.trim();
|
|
135
|
+
if (!words || !hostChat) return;
|
|
136
|
+
const turn = build || /^build\b/i.test(words) ? words : `Build me: ${words}`;
|
|
137
|
+
hostChat.send(turn, files, build);
|
|
138
|
+
setMode("chat");
|
|
139
|
+
}, [hostChat, build]);
|
|
140
|
+
const openChat = useCallback(() => {
|
|
141
|
+
Keyboard.dismiss();
|
|
142
|
+
setMode("chat");
|
|
143
|
+
}, []);
|
|
144
|
+
const [waking, setWaking] = useState(false);
|
|
145
|
+
const wokenFor = useRef(null);
|
|
146
|
+
useEffect(() => {
|
|
147
|
+
wokenFor.current = null;
|
|
148
|
+
}, [build == null ? void 0 : build.key]);
|
|
149
|
+
const wakePreview = useCallback(() => {
|
|
150
|
+
if (!build || waking || wokenFor.current === build.key) return;
|
|
151
|
+
wokenFor.current = build.key;
|
|
152
|
+
setWaking(true);
|
|
153
|
+
const resume = onResumePreview ? onResumePreview(build) : Promise.resolve("failed");
|
|
154
|
+
resume.catch(() => "failed").then((outcome) => {
|
|
155
|
+
if (outcome === "ok") setPreviewNonce((n) => n + 1);
|
|
156
|
+
else hostChat == null ? void 0 : hostChat.send(wakePreviewPrompt(build), void 0, build);
|
|
157
|
+
}).finally(() => setWaking(false));
|
|
158
|
+
}, [build, waking, onResumePreview, hostChat]);
|
|
159
|
+
const [publishOpen, setPublishOpen] = useState(false);
|
|
160
|
+
const [versionsOpen, setVersionsOpen] = useState(false);
|
|
161
|
+
const [publishStarted, setPublishStarted] = useState(null);
|
|
162
|
+
useEffect(() => setPublishStarted(null), [activeChannelId]);
|
|
163
|
+
useEffect(() => {
|
|
164
|
+
if (!publishStarted) return;
|
|
165
|
+
const target = builds.find((b) => b.key === publishStarted.key);
|
|
166
|
+
if ((target == null ? void 0 : target.liveUrl) && target.liveUrl !== publishStarted.live) {
|
|
167
|
+
setPublishStarted(null);
|
|
168
|
+
showToast("Your site is live");
|
|
169
|
+
}
|
|
170
|
+
}, [builds, publishStarted, showToast]);
|
|
171
|
+
const publishing = publishingOnChat || Boolean(publishStarted && Date.now() - publishStarted.at < PUBLISH_WATCH_MS);
|
|
172
|
+
const publish = useCallback(async (target, projectName) => {
|
|
173
|
+
if (!onPublish) return {
|
|
174
|
+
ok: false,
|
|
175
|
+
message: "Publishing is not available here."
|
|
176
|
+
};
|
|
177
|
+
const result = await onPublish(target, projectName);
|
|
178
|
+
if (result.ok) {
|
|
179
|
+
setPublishStarted({
|
|
180
|
+
key: target.key,
|
|
181
|
+
live: target.liveUrl,
|
|
182
|
+
at: Date.now()
|
|
183
|
+
});
|
|
184
|
+
showToast("Publishing started");
|
|
185
|
+
}
|
|
186
|
+
return result;
|
|
187
|
+
}, [onPublish, showToast]);
|
|
188
|
+
const back = useCallback(() => {
|
|
189
|
+
if (activeChannelId && mode !== "chat") {
|
|
190
|
+
setMode("chat");
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (activeChannelId) {
|
|
194
|
+
onCloseProject();
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
if (homeTab === "projects") {
|
|
198
|
+
setHomeTab("create");
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
onExit();
|
|
202
|
+
}, [mode, activeChannelId, homeTab, onCloseProject, onExit]);
|
|
203
|
+
useEffect(() => {
|
|
204
|
+
const sub = BackHandler.addEventListener("hardwareBackPress", () => {
|
|
205
|
+
back();
|
|
206
|
+
return true;
|
|
207
|
+
});
|
|
208
|
+
return () => sub.remove();
|
|
209
|
+
}, [back]);
|
|
210
|
+
const live = (_c = (_b = build == null ? void 0 : build.liveUrl) != null ? _b : project == null ? void 0 : project.liveUrl) != null ? _c : null;
|
|
211
|
+
let statusText = "New";
|
|
212
|
+
let statusTone = theme.muted;
|
|
213
|
+
if (building || (hostChat == null ? void 0 : hostChat.busy)) {
|
|
214
|
+
statusText = "Working\u2026";
|
|
215
|
+
statusTone = theme.accent;
|
|
216
|
+
} else if (live) {
|
|
217
|
+
statusText = "Live";
|
|
218
|
+
statusTone = theme.good;
|
|
219
|
+
} else if (build) {
|
|
220
|
+
statusText = "Not published";
|
|
221
|
+
}
|
|
222
|
+
const floating = {
|
|
223
|
+
backgroundColor: theme.card,
|
|
224
|
+
borderColor: theme.border,
|
|
225
|
+
shadowColor: theme.isDark ? "#000" : "#1c1917"
|
|
226
|
+
};
|
|
227
|
+
let publishLabel = "Publish";
|
|
228
|
+
if (publishing) publishLabel = "Publishing\u2026";
|
|
229
|
+
const shareUrl = live || (build == null ? void 0 : build.previewUrl) || null;
|
|
230
|
+
const shareSite = () => {
|
|
231
|
+
if (shareUrl) Share.share({
|
|
232
|
+
message: shareUrl,
|
|
233
|
+
url: shareUrl
|
|
234
|
+
}).catch(() => void 0);
|
|
235
|
+
};
|
|
236
|
+
const openMore = () => {
|
|
237
|
+
const actions = [];
|
|
238
|
+
if (mode !== "chat") actions.push({
|
|
239
|
+
label: "Back to the chat",
|
|
240
|
+
run: () => setMode("chat")
|
|
241
|
+
});
|
|
242
|
+
if ((build == null ? void 0 : build.previewUrl) && mode !== "preview") {
|
|
243
|
+
actions.push({
|
|
244
|
+
label: "Open preview",
|
|
245
|
+
run: () => setMode("preview")
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
if ((build == null ? void 0 : build.files) && mode !== "code") actions.push({
|
|
249
|
+
label: "View code",
|
|
250
|
+
run: () => setMode("code")
|
|
251
|
+
});
|
|
252
|
+
if (builds.length > 1) actions.push({
|
|
253
|
+
label: "Versions",
|
|
254
|
+
run: () => setVersionsOpen(true)
|
|
255
|
+
});
|
|
256
|
+
if (build == null ? void 0 : build.sandboxId) {
|
|
257
|
+
actions.push({
|
|
258
|
+
label: live ? "Publish an update" : "Publish",
|
|
259
|
+
run: () => setPublishOpen(true)
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
if (build == null ? void 0 : build.previewUrl) {
|
|
263
|
+
const url = live || build.previewUrl;
|
|
264
|
+
actions.push({
|
|
265
|
+
label: "Open in browser",
|
|
266
|
+
run: () => Linking.openURL(url).catch(() => void 0)
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
if (!actions.length) return;
|
|
270
|
+
if (Platform.OS === "ios") {
|
|
271
|
+
ActionSheetIOS.showActionSheetWithOptions({
|
|
272
|
+
options: [...actions.map((a) => a.label), "Cancel"],
|
|
273
|
+
cancelButtonIndex: actions.length
|
|
274
|
+
}, (index) => {
|
|
275
|
+
var _a2;
|
|
276
|
+
return (_a2 = actions[index]) == null ? void 0 : _a2.run();
|
|
277
|
+
});
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
Alert.alert(siteTitle || "Project", void 0, [...actions.map((a) => ({
|
|
281
|
+
text: a.label,
|
|
282
|
+
onPress: a.run
|
|
283
|
+
})), {
|
|
284
|
+
text: "Cancel",
|
|
285
|
+
style: "cancel"
|
|
286
|
+
}]);
|
|
287
|
+
};
|
|
288
|
+
return /* @__PURE__ */ jsxs(GestureHandlerRootView, { style: [styles.fill, {
|
|
289
|
+
backgroundColor: theme.screen
|
|
290
|
+
}], children: [
|
|
291
|
+
activeChannelId ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
292
|
+
/* @__PURE__ */ jsxs(View, { style: [styles.projectHead, {
|
|
293
|
+
paddingTop: insets.top + 6
|
|
294
|
+
}], children: [
|
|
295
|
+
/* @__PURE__ */ jsx(Tap, { onPress: back, accessibilityRole: "button", accessibilityLabel: mode === "chat" ? "Back to Web Builder" : "Back to the chat", style: [styles.roundBtn, floating], pressedStyle: DIM, testID: "webbuilder-back", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "chevron-left", size: 28, color: theme.ink }) }),
|
|
296
|
+
mode === "chat" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
297
|
+
/* @__PURE__ */ jsxs(View, { style: [styles.titlePill, floating], children: [
|
|
298
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.pillTitle, {
|
|
299
|
+
color: theme.ink
|
|
300
|
+
}], numberOfLines: 1, children: siteTitle || "New app" }),
|
|
301
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.pillStatus, {
|
|
302
|
+
color: statusTone
|
|
303
|
+
}], numberOfLines: 1, children: statusText })
|
|
304
|
+
] }),
|
|
305
|
+
/* @__PURE__ */ jsx(View, { style: styles.headSpacer }),
|
|
306
|
+
/* @__PURE__ */ jsxs(View, { style: [styles.actionPill, floating], children: [
|
|
307
|
+
/* @__PURE__ */ jsx(Tap, { onPress: shareSite, disabled: !shareUrl, accessibilityRole: "button", accessibilityLabel: "Share", style: [styles.pillBtn, !shareUrl && styles.disabled], pressedStyle: DIM, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "share-outline", size: 24, color: theme.ink }) }),
|
|
308
|
+
/* @__PURE__ */ jsx(Tap, { onPress: openMore, accessibilityRole: "button", accessibilityLabel: "More", style: styles.pillBtn, pressedStyle: DIM, testID: "webbuilder-more", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "dots-horizontal", size: 24, color: theme.ink }) })
|
|
309
|
+
] })
|
|
310
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
311
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.centerTitle, {
|
|
312
|
+
color: theme.ink
|
|
313
|
+
}], numberOfLines: 1, children: mode === "code" ? "Code" : siteTitle || "Preview" }),
|
|
314
|
+
/* @__PURE__ */ jsxs(View, { style: [styles.actionPill, floating], children: [
|
|
315
|
+
/* @__PURE__ */ jsx(Tap, { onPress: shareSite, disabled: !shareUrl, accessibilityRole: "button", accessibilityLabel: "Share", style: [styles.pillBtn, !shareUrl && styles.disabled], pressedStyle: DIM, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "share-outline", size: 24, color: theme.ink }) }),
|
|
316
|
+
/* @__PURE__ */ jsx(Tap, { onPress: openMore, accessibilityRole: "button", accessibilityLabel: "More", style: styles.pillBtn, pressedStyle: DIM, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "dots-horizontal", size: 24, color: theme.ink }) })
|
|
317
|
+
] })
|
|
318
|
+
] })
|
|
319
|
+
] }),
|
|
320
|
+
mode === "chat" ? /* @__PURE__ */ jsx(ProjectChat, { messages: (_d = hostChat == null ? void 0 : hostChat.messages) != null ? _d : [], streaming: (_e = hostChat == null ? void 0 : hostChat.streaming) != null ? _e : null, busy: Boolean(hostChat == null ? void 0 : hostChat.busy), error: (_f = hostChat == null ? void 0 : hostChat.error) != null ? _f : null, connected: Boolean(hostChat == null ? void 0 : hostChat.connected), building, build, siteTitle: siteTitle || "Your site", onSend: (text) => sendToAgent(text), onOpenPreview: () => setMode("preview"), onPublish: () => setPublishOpen(true), theme, bottomInset: insets.bottom }) : null,
|
|
321
|
+
mode === "preview" ? /* @__PURE__ */ jsx(PreviewScreen, { build, building, loading: buildsLoading, previewNonce, onReload: () => setPreviewNonce((n) => n + 1), onHome: () => setPreviewNonce((n) => n + 1), onWake: wakePreview, waking: waking || Boolean(hostChat == null ? void 0 : hostChat.busy), onPublish: () => setPublishOpen(true), publishLabel, error: (_g = hostChat == null ? void 0 : hostChat.error) != null ? _g : null, theme, bottomInset: insets.bottom }) : null,
|
|
322
|
+
mode === "code" ? /* @__PURE__ */ jsx(View, { style: [styles.fill, {
|
|
323
|
+
backgroundColor: theme.card,
|
|
324
|
+
paddingBottom: insets.bottom
|
|
325
|
+
}], children: /* @__PURE__ */ jsx(CodeView, { files: (_h = build == null ? void 0 : build.files) != null ? _h : null, theme, onAsk: openChat }) }) : null
|
|
326
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
327
|
+
/* @__PURE__ */ jsx(View, { style: [styles.header, styles.headerBare, {
|
|
328
|
+
paddingTop: insets.top + 4,
|
|
329
|
+
borderBottomColor: "transparent"
|
|
330
|
+
}], children: /* @__PURE__ */ jsx(IconButton, { icon: "arrow-left", label: "Leave Web Builder", onPress: back, theme, testID: "webbuilder-back" }) }),
|
|
331
|
+
/* @__PURE__ */ jsx(View, { style: styles.fill, children: homeTab === "create" ? /* @__PURE__ */ jsx(StudioHome, { draft, onDraft: setDraft, template, onClearTemplate: () => setTemplate(null), onBrowseTemplates: () => setTemplatesOpen(true), brand, onBrand: () => setBrandOpen(true), onSiteScore: () => setScoreOpen(true), onStart: startSite, connecting: startBlocked, startNotice, theme, bottomInset: BOTTOM_TABS_SPACE + insets.bottom }) : /* @__PURE__ */ jsx(ProjectsScreen, { projects, loading: projectsLoading, error: projectsError, hasMore: projectsHasMore, onRefresh: onRefreshProjects, onLoadMore: onLoadMoreProjects, onOpen: (p) => onOpenProject(p.channelId), onNewProject: () => setHomeTab("create"), topInset: 4, bottomInset: BOTTOM_TABS_SPACE + insets.bottom, theme }) }),
|
|
332
|
+
/* @__PURE__ */ jsx(BottomTabs, { tab: homeTab, onTab: setHomeTab, theme, bottomInset: insets.bottom })
|
|
333
|
+
] }),
|
|
334
|
+
/* @__PURE__ */ jsx(TemplatesSheet, { visible: templatesOpen, onClose: () => setTemplatesOpen(false), templates, loading: templatesLoading, error: templatesError, onReload: onReloadTemplates, selectedId: (_i = template == null ? void 0 : template.id) != null ? _i : null, onPick: pickTemplate, theme }),
|
|
335
|
+
/* @__PURE__ */ jsx(SiteScoreSheet, { visible: scoreOpen, onClose: () => setScoreOpen(false), blocked: startBlocked, onCheck: (url) => {
|
|
336
|
+
setScoreOpen(false);
|
|
337
|
+
onStartProject({
|
|
338
|
+
text: siteScoreTurn(url),
|
|
339
|
+
template: null,
|
|
340
|
+
agent: true
|
|
341
|
+
});
|
|
342
|
+
}, theme }),
|
|
343
|
+
/* @__PURE__ */ jsx(BrandKitSheet, { visible: brandOpen, brand, onSave: saveBrand, onClose: () => setBrandOpen(false), theme }),
|
|
344
|
+
/* @__PURE__ */ jsx(PublishSheet, { visible: publishOpen, build, publishing, onPublish: onPublish ? publish : void 0, onClose: () => setPublishOpen(false), theme }),
|
|
345
|
+
/* @__PURE__ */ jsx(VersionsSheet, { visible: versionsOpen, builds, selectedKey, onSelect: (picked) => {
|
|
346
|
+
setSelectedKey(picked.key === (latest == null ? void 0 : latest.key) ? null : picked.key);
|
|
347
|
+
setVersionsOpen(false);
|
|
348
|
+
}, onClose: () => setVersionsOpen(false), theme }),
|
|
349
|
+
/* @__PURE__ */ jsx(Toast, { message: toast, theme, bottom: insets.bottom + 80 })
|
|
350
|
+
] });
|
|
351
|
+
}
|
|
352
|
+
const styles = StyleSheet.create({
|
|
353
|
+
fill: {
|
|
354
|
+
flex: 1
|
|
355
|
+
},
|
|
356
|
+
header: {
|
|
357
|
+
flexDirection: "row",
|
|
358
|
+
alignItems: "center",
|
|
359
|
+
gap: 6,
|
|
360
|
+
paddingHorizontal: 8,
|
|
361
|
+
paddingBottom: 8,
|
|
362
|
+
borderBottomWidth: StyleSheet.hairlineWidth
|
|
363
|
+
},
|
|
364
|
+
headerBare: {
|
|
365
|
+
paddingBottom: 0
|
|
366
|
+
},
|
|
367
|
+
projectHead: {
|
|
368
|
+
flexDirection: "row",
|
|
369
|
+
alignItems: "center",
|
|
370
|
+
gap: 10,
|
|
371
|
+
paddingHorizontal: 14,
|
|
372
|
+
paddingBottom: 10
|
|
373
|
+
},
|
|
374
|
+
roundBtn: {
|
|
375
|
+
width: 52,
|
|
376
|
+
height: 52,
|
|
377
|
+
borderRadius: 26,
|
|
378
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
379
|
+
alignItems: "center",
|
|
380
|
+
justifyContent: "center",
|
|
381
|
+
shadowOpacity: 0.08,
|
|
382
|
+
shadowRadius: 12,
|
|
383
|
+
shadowOffset: {
|
|
384
|
+
width: 0,
|
|
385
|
+
height: 4
|
|
386
|
+
},
|
|
387
|
+
elevation: 3
|
|
388
|
+
},
|
|
389
|
+
titlePill: {
|
|
390
|
+
flexShrink: 1,
|
|
391
|
+
maxWidth: "58%",
|
|
392
|
+
height: 52,
|
|
393
|
+
paddingHorizontal: 18,
|
|
394
|
+
borderRadius: 26,
|
|
395
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
396
|
+
justifyContent: "center",
|
|
397
|
+
shadowOpacity: 0.08,
|
|
398
|
+
shadowRadius: 12,
|
|
399
|
+
shadowOffset: {
|
|
400
|
+
width: 0,
|
|
401
|
+
height: 4
|
|
402
|
+
},
|
|
403
|
+
elevation: 3
|
|
404
|
+
},
|
|
405
|
+
pillTitle: {
|
|
406
|
+
fontSize: 16,
|
|
407
|
+
fontWeight: "700",
|
|
408
|
+
letterSpacing: -0.2
|
|
409
|
+
},
|
|
410
|
+
pillStatus: {
|
|
411
|
+
fontSize: 12,
|
|
412
|
+
fontWeight: "600",
|
|
413
|
+
marginTop: 1
|
|
414
|
+
},
|
|
415
|
+
headSpacer: {
|
|
416
|
+
flex: 1
|
|
417
|
+
},
|
|
418
|
+
actionPill: {
|
|
419
|
+
flexDirection: "row",
|
|
420
|
+
alignItems: "center",
|
|
421
|
+
height: 52,
|
|
422
|
+
paddingHorizontal: 8,
|
|
423
|
+
borderRadius: 26,
|
|
424
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
425
|
+
shadowOpacity: 0.08,
|
|
426
|
+
shadowRadius: 12,
|
|
427
|
+
shadowOffset: {
|
|
428
|
+
width: 0,
|
|
429
|
+
height: 4
|
|
430
|
+
},
|
|
431
|
+
elevation: 3
|
|
432
|
+
},
|
|
433
|
+
pillBtn: {
|
|
434
|
+
width: 42,
|
|
435
|
+
height: 42,
|
|
436
|
+
borderRadius: 21,
|
|
437
|
+
alignItems: "center",
|
|
438
|
+
justifyContent: "center"
|
|
439
|
+
},
|
|
440
|
+
centerTitle: {
|
|
441
|
+
flex: 1,
|
|
442
|
+
textAlign: "center",
|
|
443
|
+
fontSize: 18,
|
|
444
|
+
fontWeight: "700"
|
|
445
|
+
},
|
|
446
|
+
headerText: {
|
|
447
|
+
flex: 1,
|
|
448
|
+
flexDirection: "row",
|
|
449
|
+
alignItems: "center",
|
|
450
|
+
gap: 8,
|
|
451
|
+
minWidth: 0
|
|
452
|
+
},
|
|
453
|
+
headerTitle: {
|
|
454
|
+
flexShrink: 1,
|
|
455
|
+
fontSize: 17,
|
|
456
|
+
fontWeight: "700",
|
|
457
|
+
letterSpacing: -0.2
|
|
458
|
+
},
|
|
459
|
+
publish: {
|
|
460
|
+
minHeight: 34,
|
|
461
|
+
paddingHorizontal: 16,
|
|
462
|
+
borderRadius: 17,
|
|
463
|
+
alignItems: "center",
|
|
464
|
+
justifyContent: "center",
|
|
465
|
+
marginRight: 4
|
|
466
|
+
},
|
|
467
|
+
publishLabel: {
|
|
468
|
+
fontSize: 14,
|
|
469
|
+
fontWeight: "700"
|
|
470
|
+
},
|
|
471
|
+
disabled: {
|
|
472
|
+
opacity: 0.35
|
|
473
|
+
}
|
|
474
|
+
});export{WebBuilderExperience,WebBuilderExperience as default};//# sourceMappingURL=WebBuilderExperience.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebBuilderExperience.js","sources":["../../../src/features/webbuilder/WebBuilderExperience.tsx"],"sourcesContent":["/**\n * Native Web Builder: describe a site (or start from a template) and the build\n * workflow makes it; watch the live preview, ask for changes, step through\n * versions and publish - on the same builds as the web Web Builder, so a site\n * started on the phone opens on the web and the other way round.\n *\n * Native twin of the web surface (aicode-stack `surfaces/webbuilder`): the\n * studio home and its composer, Templates (the web sidebar, a sheet here),\n * Projects (the web's Your builds, a bottom tab), the open build with Preview / Code /\n * History and Publish, and the Agent pane. The host screen owns what needs\n * the app's data stack (the session, the build workflow, the chats, publish,\n * navigation) and passes it in as props; this component renders.\n */\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n ActionSheetIOS,\n Alert,\n BackHandler,\n Keyboard,\n Linking,\n Platform,\n Share,\n StyleSheet,\n Text,\n View,\n} from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { GestureHandlerRootView } from 'react-native-gesture-handler';\nimport { useSafeInsets } from '../canvas/withRemoteSafeArea';\nimport { useAppTheme } from '../../theme/AppThemeProvider';\nimport type { MessageAttachment } from '../../hooks/useChatStream';\nimport { DIM, Tap } from '../inbox/components/Tap';\nimport { brandBriefBlock, isBareSeed, siteScoreTurn, studioTurnText } from './studioCatalog';\nimport { useBrandKit } from './brandKitStorage';\nimport { wakePreviewPrompt } from './webbuilderPrompts';\nimport { webbuilderTheme } from './webbuilderTheme';\nimport type { WebBuilderHostChat } from './hostChat';\nimport type {\n WebBuilderBuild,\n WebBuilderBuilding,\n WebBuilderProject,\n WebBuilderPublishResult,\n WebBuilderStartRequest,\n} from './types';\nimport type { WebBuilderTemplate } from './workflow';\nimport { BrandKitSheet } from './components/BrandKitSheet';\nimport { CodeView } from './components/CodeView';\nimport { ProjectChat } from './components/ProjectChat';\nimport { PreviewScreen } from './components/PreviewScreen';\nimport { PublishSheet } from './components/PublishSheet';\nimport { BOTTOM_TABS_SPACE, BottomTabs, type HomeTab } from './components/BottomTabs';\nimport { SiteScoreSheet } from './components/SiteScoreSheet';\nimport { ProjectsScreen } from './components/ProjectsScreen';\nimport { TemplatesSheet } from './components/TemplatesSheet';\nimport { StudioHome, type StudioStart } from './components/StudioHome';\nimport { VersionsSheet } from './components/VersionsSheet';\nimport { IconButton, Toast } from './components/ui';\n\nexport interface WebBuilderExperienceProps {\n /**\n * The app's light/dark choice, from the host. A lazily loaded experience can\n * end up with its own copy of the theme context and miss the in-app setting,\n * so the host's answer wins; the context is only the fallback.\n */\n isDark?: boolean;\n /** Leaves Web Builder. */\n onExit: () => void;\n /** Your builds, newest first. */\n projects: WebBuilderProject[];\n projectsLoading?: boolean;\n projectsError?: string | null;\n onRefreshProjects?: () => void;\n /** More builds exist past the ones loaded (the web gallery pages 10 at a time). */\n projectsHasMore?: boolean;\n onLoadMoreProjects?: () => void;\n /** The workspace's starter templates (marketplace Code Assistant cards). */\n templates: WebBuilderTemplate[];\n templatesLoading?: boolean;\n templatesError?: string | null;\n onReloadTemplates?: () => void;\n /** A connection still coming up: the composer waits (and says so), or null. */\n startBlocked?: string | null;\n /** Why the last Start did not go out, in one sentence, or null. */\n startNotice?: string | null;\n /** The site open on screen (its chat), or null on the home screen. */\n activeChannelId: string | null;\n onOpenProject: (channelId: string) => void;\n onCloseProject: () => void;\n /** Starts a new site; the host runs the build workflow and opens it. */\n onStartProject: (request: WebBuilderStartRequest) => void;\n /** The open site's builds, newest first. */\n builds: WebBuilderBuild[];\n buildsLoading?: boolean;\n /** A turn running on the open site. */\n building?: WebBuilderBuilding | null;\n /** The chat shows a publish still running on the open site. */\n publishing?: boolean;\n /** The open site's agent conversation. */\n hostChat?: WebBuilderHostChat;\n onPublish?: (build: WebBuilderBuild, projectName: string) => Promise<WebBuilderPublishResult>;\n /** Wake a sleeping preview without the agent; 'gone' when the sandbox was reclaimed. */\n onResumePreview?: (build: WebBuilderBuild) => Promise<'ok' | 'gone' | 'failed'>;\n /** A brain-routed hand-off: the person's words, which start a new site. */\n initialAgentSeed?: { text: string; files?: MessageAttachment[] } | null;\n}\n\nconst TOAST_MS = 2_400;\n/** A publish that never reported back stops reading as running after this long. */\nconst PUBLISH_WATCH_MS = 10 * 60 * 1000;\n\nexport function WebBuilderExperience({\n isDark: hostIsDark,\n onExit,\n projects,\n projectsLoading = false,\n projectsError = null,\n onRefreshProjects,\n projectsHasMore = false,\n onLoadMoreProjects,\n templates,\n templatesLoading = false,\n templatesError = null,\n onReloadTemplates,\n startBlocked = null,\n startNotice = null,\n activeChannelId,\n onOpenProject,\n onCloseProject,\n onStartProject,\n builds,\n buildsLoading = false,\n building = null,\n publishing: publishingOnChat = false,\n hostChat,\n onPublish,\n onResumePreview,\n initialAgentSeed = null,\n}: WebBuilderExperienceProps) {\n const appTheme = useAppTheme();\n const isDark = hostIsDark ?? appTheme.isDark;\n const theme = useMemo(() => webbuilderTheme(isDark), [isDark]);\n const insets = useSafeInsets();\n\n const project = useMemo(\n () => projects.find((p) => p.channelId === activeChannelId) ?? null,\n [projects, activeChannelId],\n );\n\n // ── Studio: the composer's draft, template and brand ──────────────────\n const [draft, setDraft] = useState('');\n const [template, setTemplate] = useState<WebBuilderTemplate | null>(null);\n const [templatesOpen, setTemplatesOpen] = useState(false);\n const [scoreOpen, setScoreOpen] = useState(false);\n const [homeTab, setHomeTab] = useState<HomeTab>('create');\n const { brand, saveBrand } = useBrandKit();\n const [brandOpen, setBrandOpen] = useState(false);\n\n const pickTemplate = useCallback((picked: WebBuilderTemplate) => {\n setTemplate(picked);\n setTemplatesOpen(false);\n setHomeTab('create');\n // The web hands a picked card to the composer: its starter prompt when the box is empty.\n setDraft((prev) => (isBareSeed(prev) && picked.chatPrompt ? picked.chatPrompt : prev));\n }, []);\n\n const startSite = useCallback(\n (start: StudioStart, files?: MessageAttachment[]) => {\n const brief =\n start.brief.trim() || (start.template ? start.template.chatPrompt || start.template.title : '');\n if (!brief && !files?.length) return;\n onStartProject({\n text: studioTurnText({ brief, brandBlock: brandBriefBlock(brand), referenceUrl: start.referenceUrl }),\n template: start.template,\n ...(start.referenceUrl ? { referenceUrl: start.referenceUrl } : {}),\n ...(files?.length ? { attachments: files } : {}),\n });\n setDraft('');\n setTemplate(null);\n },\n [onStartProject, brand],\n );\n\n // A hand-off starts its site as soon as a build can start.\n const handedOff = useRef(false);\n useEffect(() => {\n if (handedOff.current || !initialAgentSeed || startBlocked) return;\n handedOff.current = true;\n startSite({ brief: initialAgentSeed.text, template: null }, initialAgentSeed.files);\n }, [initialAgentSeed, startBlocked, startSite]);\n\n // ── The build on screen ────────────────────────────────────────────────\n const [selectedKey, setSelectedKey] = useState<string | null>(null);\n useEffect(() => setSelectedKey(null), [activeChannelId]);\n const latest = builds[0] ?? null;\n const build = useMemo(\n () => (selectedKey ? (builds.find((b) => b.key === selectedKey) ?? latest) : latest),\n [builds, selectedKey, latest],\n );\n // The site's resolved name (the web title rules) wins over a build's raw title.\n const siteTitle = project?.title || build?.title || null;\n\n // A new build of the same sandbox (an edit) re-fetches the preview.\n const [previewNonce, setPreviewNonce] = useState(0);\n const seenBuildAt = useRef<{ key: string | null; at: number }>({ key: null, at: 0 });\n useEffect(() => {\n const key = build?.key ?? null;\n const at = build?.updatedAt ?? 0;\n const seen = seenBuildAt.current;\n if (key && key === seen.key && at > seen.at) setPreviewNonce((n) => n + 1);\n seenBuildAt.current = { key, at };\n }, [build?.key, build?.updatedAt]);\n\n // ── Toast ──────────────────────────────────────────────────────────────\n const [toast, setToast] = useState<string | null>(null);\n const toastTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n const showToast = useCallback((message: string) => {\n if (toastTimer.current) clearTimeout(toastTimer.current);\n setToast(message);\n toastTimer.current = setTimeout(() => setToast(null), TOAST_MS);\n }, []);\n useEffect(() => () => (toastTimer.current ? clearTimeout(toastTimer.current) : undefined), []);\n\n // ── The project's chat (Manus-style: the conversation leads, the site is a tap away) ──\n const [mode, setMode] = useState<'chat' | 'preview' | 'code'>('chat');\n useEffect(() => setMode('chat'), [activeChannelId]);\n const sendToAgent = useCallback(\n (text: string, files?: MessageAttachment[]) => {\n const words = text.trim();\n if (!words || !hostChat) return;\n // The first ask in a site with nothing built yet is the brief (web `studioTurnText`).\n const turn = build || /^build\\b/i.test(words) ? words : `Build me: ${words}`;\n hostChat.send(turn, files, build);\n setMode('chat');\n },\n [hostChat, build],\n );\n const openChat = useCallback(() => {\n Keyboard.dismiss();\n setMode('chat');\n }, []);\n // A preview that does not answer is woken quietly, the way the web's ensurePreview\n // does it; only a sandbox that is gone needs the agent to rebuild the site.\n const [waking, setWaking] = useState(false);\n const wokenFor = useRef<string | null>(null);\n useEffect(() => {\n wokenFor.current = null;\n }, [build?.key]);\n const wakePreview = useCallback(() => {\n if (!build || waking || wokenFor.current === build.key) return;\n wokenFor.current = build.key;\n setWaking(true);\n const resume = onResumePreview ? onResumePreview(build) : Promise.resolve<'failed'>('failed');\n resume\n .catch(() => 'failed' as const)\n .then((outcome) => {\n if (outcome === 'ok') setPreviewNonce((n) => n + 1);\n // Stay where the person is; the agent's restore shows in the chat.\n else hostChat?.send(wakePreviewPrompt(build), undefined, build);\n })\n .finally(() => setWaking(false));\n }, [build, waking, onResumePreview, hostChat]);\n\n // ── Publish ────────────────────────────────────────────────────────────\n const [publishOpen, setPublishOpen] = useState(false);\n const [versionsOpen, setVersionsOpen] = useState(false);\n const [publishStarted, setPublishStarted] = useState<{ key: string; live: string | null; at: number } | null>(null);\n useEffect(() => setPublishStarted(null), [activeChannelId]);\n useEffect(() => {\n if (!publishStarted) return;\n const target = builds.find((b) => b.key === publishStarted.key);\n if (target?.liveUrl && target.liveUrl !== publishStarted.live) {\n setPublishStarted(null);\n showToast('Your site is live');\n }\n }, [builds, publishStarted, showToast]);\n const publishing = publishingOnChat || Boolean(publishStarted && Date.now() - publishStarted.at < PUBLISH_WATCH_MS);\n const publish = useCallback(\n async (target: WebBuilderBuild, projectName: string): Promise<WebBuilderPublishResult> => {\n if (!onPublish) return { ok: false, message: 'Publishing is not available here.' };\n const result = await onPublish(target, projectName);\n if (result.ok) {\n setPublishStarted({ key: target.key, live: target.liveUrl, at: Date.now() });\n showToast('Publishing started');\n }\n return result;\n },\n [onPublish, showToast],\n );\n\n // ── Back ───────────────────────────────────────────────────────────────\n const back = useCallback(() => {\n if (activeChannelId && mode !== 'chat') {\n setMode('chat');\n return;\n }\n if (activeChannelId) {\n onCloseProject();\n return;\n }\n if (homeTab === 'projects') {\n setHomeTab('create');\n return;\n }\n onExit();\n }, [mode, activeChannelId, homeTab, onCloseProject, onExit]);\n useEffect(() => {\n const sub = BackHandler.addEventListener('hardwareBackPress', () => {\n back();\n return true;\n });\n return () => sub.remove();\n }, [back]);\n\n const live = build?.liveUrl ?? project?.liveUrl ?? null;\n let statusText = 'New';\n let statusTone = theme.muted;\n if (building || hostChat?.busy) {\n statusText = 'Working…';\n statusTone = theme.accent;\n } else if (live) {\n statusText = 'Live';\n statusTone = theme.good;\n } else if (build) {\n statusText = 'Not published';\n }\n const floating = {\n backgroundColor: theme.card,\n borderColor: theme.border,\n shadowColor: theme.isDark ? '#000' : '#1c1917',\n };\n let publishLabel = 'Publish';\n if (publishing) publishLabel = 'Publishing…';\n const shareUrl = live || build?.previewUrl || null;\n const shareSite = () => {\n if (shareUrl) Share.share({ message: shareUrl, url: shareUrl }).catch(() => undefined);\n };\n const openMore = () => {\n const actions: Array<{ label: string; run: () => void; destructive?: boolean }> = [];\n if (mode !== 'chat') actions.push({ label: 'Back to the chat', run: () => setMode('chat') });\n if (build?.previewUrl && mode !== 'preview') {\n actions.push({ label: 'Open preview', run: () => setMode('preview') });\n }\n if (build?.files && mode !== 'code') actions.push({ label: 'View code', run: () => setMode('code') });\n if (builds.length > 1) actions.push({ label: 'Versions', run: () => setVersionsOpen(true) });\n if (build?.sandboxId) {\n actions.push({ label: live ? 'Publish an update' : 'Publish', run: () => setPublishOpen(true) });\n }\n if (build?.previewUrl) {\n const url = live || build.previewUrl;\n actions.push({ label: 'Open in browser', run: () => Linking.openURL(url).catch(() => undefined) });\n }\n if (!actions.length) return;\n if (Platform.OS === 'ios') {\n ActionSheetIOS.showActionSheetWithOptions(\n { options: [...actions.map((a) => a.label), 'Cancel'], cancelButtonIndex: actions.length },\n (index) => actions[index]?.run(),\n );\n return;\n }\n Alert.alert(siteTitle || 'Project', undefined, [\n ...actions.map((a) => ({ text: a.label, onPress: a.run })),\n { text: 'Cancel', style: 'cancel' as const },\n ]);\n };\n\n return (\n <GestureHandlerRootView style={[styles.fill, { backgroundColor: theme.screen }]}>\n {activeChannelId ? (\n <>\n {/* Manus-style: a floating back, the project in a pill, actions on the right. */}\n <View style={[styles.projectHead, { paddingTop: insets.top + 6 }]}>\n <Tap\n onPress={back}\n accessibilityRole=\"button\"\n accessibilityLabel={mode === 'chat' ? 'Back to Web Builder' : 'Back to the chat'}\n style={[styles.roundBtn, floating]}\n pressedStyle={DIM}\n testID=\"webbuilder-back\"\n >\n <MaterialCommunityIcons name=\"chevron-left\" size={28} color={theme.ink} />\n </Tap>\n {mode === 'chat' ? (\n <>\n <View style={[styles.titlePill, floating]}>\n <Text style={[styles.pillTitle, { color: theme.ink }]} numberOfLines={1}>\n {siteTitle || 'New app'}\n </Text>\n <Text style={[styles.pillStatus, { color: statusTone }]} numberOfLines={1}>\n {statusText}\n </Text>\n </View>\n <View style={styles.headSpacer} />\n <View style={[styles.actionPill, floating]}>\n <Tap\n onPress={shareSite}\n disabled={!shareUrl}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Share\"\n style={[styles.pillBtn, !shareUrl && styles.disabled]}\n pressedStyle={DIM}\n >\n <MaterialCommunityIcons name=\"share-outline\" size={24} color={theme.ink} />\n </Tap>\n <Tap\n onPress={openMore}\n accessibilityRole=\"button\"\n accessibilityLabel=\"More\"\n style={styles.pillBtn}\n pressedStyle={DIM}\n testID=\"webbuilder-more\"\n >\n <MaterialCommunityIcons name=\"dots-horizontal\" size={24} color={theme.ink} />\n </Tap>\n </View>\n </>\n ) : (\n <>\n <Text style={[styles.centerTitle, { color: theme.ink }]} numberOfLines={1}>\n {mode === 'code' ? 'Code' : siteTitle || 'Preview'}\n </Text>\n <View style={[styles.actionPill, floating]}>\n <Tap\n onPress={shareSite}\n disabled={!shareUrl}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Share\"\n style={[styles.pillBtn, !shareUrl && styles.disabled]}\n pressedStyle={DIM}\n >\n <MaterialCommunityIcons name=\"share-outline\" size={24} color={theme.ink} />\n </Tap>\n <Tap\n onPress={openMore}\n accessibilityRole=\"button\"\n accessibilityLabel=\"More\"\n style={styles.pillBtn}\n pressedStyle={DIM}\n >\n <MaterialCommunityIcons name=\"dots-horizontal\" size={24} color={theme.ink} />\n </Tap>\n </View>\n </>\n )}\n </View>\n {mode === 'chat' ? (\n <ProjectChat\n messages={hostChat?.messages ?? []}\n streaming={hostChat?.streaming ?? null}\n busy={Boolean(hostChat?.busy)}\n error={hostChat?.error ?? null}\n connected={Boolean(hostChat?.connected)}\n building={building}\n build={build}\n siteTitle={siteTitle || 'Your site'}\n onSend={(text) => sendToAgent(text)}\n onOpenPreview={() => setMode('preview')}\n onPublish={() => setPublishOpen(true)}\n theme={theme}\n bottomInset={insets.bottom}\n />\n ) : null}\n {mode === 'preview' ? (\n <PreviewScreen\n build={build}\n building={building}\n loading={buildsLoading}\n previewNonce={previewNonce}\n onReload={() => setPreviewNonce((n) => n + 1)}\n onHome={() => setPreviewNonce((n) => n + 1)}\n onWake={wakePreview}\n waking={waking || Boolean(hostChat?.busy)}\n onPublish={() => setPublishOpen(true)}\n publishLabel={publishLabel}\n error={hostChat?.error ?? null}\n theme={theme}\n bottomInset={insets.bottom}\n />\n ) : null}\n {mode === 'code' ? (\n <View style={[styles.fill, { backgroundColor: theme.card, paddingBottom: insets.bottom }]}>\n <CodeView files={build?.files ?? null} theme={theme} onAsk={openChat} />\n </View>\n ) : null}\n </>\n ) : (\n <>\n <View\n style={[\n styles.header,\n styles.headerBare,\n { paddingTop: insets.top + 4, borderBottomColor: 'transparent' },\n ]}\n >\n <IconButton\n icon=\"arrow-left\"\n label=\"Leave Web Builder\"\n onPress={back}\n theme={theme}\n testID=\"webbuilder-back\"\n />\n </View>\n <View style={styles.fill}>\n {homeTab === 'create' ? (\n <StudioHome\n draft={draft}\n onDraft={setDraft}\n template={template}\n onClearTemplate={() => setTemplate(null)}\n onBrowseTemplates={() => setTemplatesOpen(true)}\n brand={brand}\n onBrand={() => setBrandOpen(true)}\n onSiteScore={() => setScoreOpen(true)}\n onStart={startSite}\n connecting={startBlocked}\n startNotice={startNotice}\n theme={theme}\n bottomInset={BOTTOM_TABS_SPACE + insets.bottom}\n />\n ) : (\n <ProjectsScreen\n projects={projects}\n loading={projectsLoading}\n error={projectsError}\n hasMore={projectsHasMore}\n onRefresh={onRefreshProjects}\n onLoadMore={onLoadMoreProjects}\n onOpen={(p) => onOpenProject(p.channelId)}\n onNewProject={() => setHomeTab('create')}\n topInset={4}\n bottomInset={BOTTOM_TABS_SPACE + insets.bottom}\n theme={theme}\n />\n )}\n </View>\n <BottomTabs tab={homeTab} onTab={setHomeTab} theme={theme} bottomInset={insets.bottom} />\n </>\n )}\n\n <TemplatesSheet\n visible={templatesOpen}\n onClose={() => setTemplatesOpen(false)}\n templates={templates}\n loading={templatesLoading}\n error={templatesError}\n onReload={onReloadTemplates}\n selectedId={template?.id ?? null}\n onPick={pickTemplate}\n theme={theme}\n />\n <SiteScoreSheet\n visible={scoreOpen}\n onClose={() => setScoreOpen(false)}\n blocked={startBlocked}\n onCheck={(url) => {\n setScoreOpen(false);\n onStartProject({ text: siteScoreTurn(url), template: null, agent: true });\n }}\n theme={theme}\n />\n <BrandKitSheet\n visible={brandOpen}\n brand={brand}\n onSave={saveBrand}\n onClose={() => setBrandOpen(false)}\n theme={theme}\n />\n <PublishSheet\n visible={publishOpen}\n build={build}\n publishing={publishing}\n onPublish={onPublish ? publish : undefined}\n onClose={() => setPublishOpen(false)}\n theme={theme}\n />\n <VersionsSheet\n visible={versionsOpen}\n builds={builds}\n selectedKey={selectedKey}\n onSelect={(picked) => {\n setSelectedKey(picked.key === latest?.key ? null : picked.key);\n setVersionsOpen(false);\n }}\n onClose={() => setVersionsOpen(false)}\n theme={theme}\n />\n\n <Toast message={toast} theme={theme} bottom={insets.bottom + 80} />\n </GestureHandlerRootView>\n );\n}\n\nexport default WebBuilderExperience;\n\nconst styles = StyleSheet.create({\n fill: { flex: 1 },\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 6,\n paddingHorizontal: 8,\n paddingBottom: 8,\n borderBottomWidth: StyleSheet.hairlineWidth,\n },\n headerBare: { paddingBottom: 0 },\n projectHead: { flexDirection: 'row', alignItems: 'center', gap: 10, paddingHorizontal: 14, paddingBottom: 10 },\n roundBtn: {\n width: 52,\n height: 52,\n borderRadius: 26,\n borderWidth: StyleSheet.hairlineWidth,\n alignItems: 'center',\n justifyContent: 'center',\n shadowOpacity: 0.08,\n shadowRadius: 12,\n shadowOffset: { width: 0, height: 4 },\n elevation: 3,\n },\n titlePill: {\n flexShrink: 1,\n maxWidth: '58%',\n height: 52,\n paddingHorizontal: 18,\n borderRadius: 26,\n borderWidth: StyleSheet.hairlineWidth,\n justifyContent: 'center',\n shadowOpacity: 0.08,\n shadowRadius: 12,\n shadowOffset: { width: 0, height: 4 },\n elevation: 3,\n },\n pillTitle: { fontSize: 16, fontWeight: '700', letterSpacing: -0.2 },\n pillStatus: { fontSize: 12, fontWeight: '600', marginTop: 1 },\n headSpacer: { flex: 1 },\n actionPill: {\n flexDirection: 'row',\n alignItems: 'center',\n height: 52,\n paddingHorizontal: 8,\n borderRadius: 26,\n borderWidth: StyleSheet.hairlineWidth,\n shadowOpacity: 0.08,\n shadowRadius: 12,\n shadowOffset: { width: 0, height: 4 },\n elevation: 3,\n },\n pillBtn: { width: 42, height: 42, borderRadius: 21, alignItems: 'center', justifyContent: 'center' },\n centerTitle: { flex: 1, textAlign: 'center', fontSize: 18, fontWeight: '700' },\n headerText: { flex: 1, flexDirection: 'row', alignItems: 'center', gap: 8, minWidth: 0 },\n headerTitle: { flexShrink: 1, fontSize: 17, fontWeight: '700', letterSpacing: -0.2 },\n publish: {\n minHeight: 34,\n paddingHorizontal: 16,\n borderRadius: 17,\n alignItems: 'center',\n justifyContent: 'center',\n marginRight: 4,\n },\n publishLabel: { fontSize: 14, fontWeight: '700' },\n disabled: { opacity: 0.35 },\n});\n"],"names":["_a","_b"],"mappings":";;;;;;;;;;;;;;;;AA0FA,MAAM,QAAW,GAAA,IAAA;AAEjB,MAAM,gBAAA,GAAmB,KAAK,EAAK,GAAA,GAAA;AAC5B,SAAS,oBAAqB,CAAA;AAAA,EACnC,MAAQ,EAAA,UAAA;AAAA,EACR,MAAA;AAAA,EACA,QAAA;AAAA,EACA,eAAkB,GAAA,KAAA;AAAA,EAClB,aAAgB,GAAA,IAAA;AAAA,EAChB,iBAAA;AAAA,EACA,eAAkB,GAAA,KAAA;AAAA,EAClB,kBAAA;AAAA,EACA,SAAA;AAAA,EACA,gBAAmB,GAAA,KAAA;AAAA,EACnB,cAAiB,GAAA,IAAA;AAAA,EACjB,iBAAA;AAAA,EACA,YAAe,GAAA,IAAA;AAAA,EACf,WAAc,GAAA,IAAA;AAAA,EACd,eAAA;AAAA,EACA,aAAA;AAAA,EACA,cAAA;AAAA,EACA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,aAAgB,GAAA,KAAA;AAAA,EAChB,QAAW,GAAA,IAAA;AAAA,EACX,YAAY,gBAAmB,GAAA,KAAA;AAAA,EAC/B,QAAA;AAAA,EACA,SAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAmB,GAAA;AACrB,CAA8B,EAAA;AAxH9B,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,E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