@adminide-stack/yantra-mobile 12.0.194-alpha.0 → 12.0.194-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bridge/handlers/NavigationBridgeHandler.js +6 -9
- package/lib/bridge/handlers/NavigationBridgeHandler.js.map +1 -1
- package/lib/components/BrandBar/BrandBarBackground.js +27 -0
- package/lib/components/BrandBar/BrandBarBackground.js.map +1 -0
- package/lib/components/BrandBar/MenuToggle.js +73 -0
- package/lib/components/BrandBar/MenuToggle.js.map +1 -0
- package/lib/components/CustomDrawer.js +6 -6
- package/lib/components/CustomDrawer.js.map +1 -1
- package/lib/components/GatewayConnector/GatewayConnector.js +3 -2
- package/lib/components/GatewayConnector/GatewayConnector.js.map +1 -1
- package/lib/components/GatewayToolbarButtonMobile.js +12 -2
- package/lib/components/GatewayToolbarButtonMobile.js.map +1 -1
- package/lib/components/NavigationHeader/HeaderChip.js +76 -0
- package/lib/components/NavigationHeader/HeaderChip.js.map +1 -0
- package/lib/components/NavigationHeader/HeaderSkillsButton.js +4 -3
- package/lib/components/NavigationHeader/HeaderSkillsButton.js.map +1 -1
- package/lib/components/NavigationHeader/HeaderTasksButton.js +4 -3
- package/lib/components/NavigationHeader/HeaderTasksButton.js.map +1 -1
- package/lib/components/NavigationHeader/NavigationHeader.js +96 -41
- package/lib/components/NavigationHeader/NavigationHeader.js.map +1 -1
- package/lib/components/YantraTopBar/YantraTopBar.js +98 -0
- package/lib/components/YantraTopBar/YantraTopBar.js.map +1 -0
- package/lib/compute.js +18 -25
- package/lib/compute.js.map +1 -1
- package/lib/features/apps/AppsCatalog.js +7 -4
- package/lib/features/apps/AppsCatalog.js.map +1 -1
- package/lib/features/apps/MarketplaceGallery.js +6 -3
- package/lib/features/apps/MarketplaceGallery.js.map +1 -1
- package/lib/features/apps/nativeSurfaceTwin.js +1 -1
- package/lib/features/apps/nativeSurfaceTwin.js.map +1 -1
- package/lib/features/apps/useMarketplaceApps.js +6 -2
- package/lib/features/apps/useMarketplaceApps.js.map +1 -1
- package/lib/features/attachments/useImageAttachments.js +44 -1
- package/lib/features/attachments/useImageAttachments.js.map +1 -1
- package/lib/features/credits/FreeCreditsPhoneStepHost.js +67 -0
- package/lib/features/credits/FreeCreditsPhoneStepHost.js.map +1 -0
- package/lib/features/credits/freeCredits.js +52 -13
- package/lib/features/credits/freeCredits.js.map +1 -1
- package/lib/features/credits/freeCreditsPhoneStep.js +55 -0
- package/lib/features/credits/freeCreditsPhoneStep.js.map +1 -0
- package/lib/features/credits/useFreeCredits.js +29 -3
- package/lib/features/credits/useFreeCredits.js.map +1 -1
- package/lib/features/links/openInApp.js +3 -6
- package/lib/features/links/openInApp.js.map +1 -1
- package/lib/features/webbuilder/WebBuilderExperience.js +88 -28
- package/lib/features/webbuilder/WebBuilderExperience.js.map +1 -1
- package/lib/features/webbuilder/appPreview.js +70 -0
- package/lib/features/webbuilder/appPreview.js.map +1 -0
- package/lib/features/webbuilder/buildFragments.js +33 -12
- package/lib/features/webbuilder/buildFragments.js.map +1 -1
- package/lib/features/webbuilder/components/AppPhoneSheet.js +127 -0
- package/lib/features/webbuilder/components/AppPhoneSheet.js.map +1 -0
- package/lib/features/webbuilder/components/BottomTabs.js +32 -21
- package/lib/features/webbuilder/components/BottomTabs.js.map +1 -1
- package/lib/features/webbuilder/components/Composer.js +144 -47
- package/lib/features/webbuilder/components/Composer.js.map +1 -1
- package/lib/features/webbuilder/components/PreviewFrame.js +1 -1
- package/lib/features/webbuilder/components/PreviewFrame.js.map +1 -1
- package/lib/features/webbuilder/components/PreviewScreen.js +9 -4
- package/lib/features/webbuilder/components/PreviewScreen.js.map +1 -1
- package/lib/features/webbuilder/components/ProjectSheets.js +76 -22
- package/lib/features/webbuilder/components/ProjectSheets.js.map +1 -1
- package/lib/features/webbuilder/components/ProjectsScreen.js +30 -12
- package/lib/features/webbuilder/components/ProjectsScreen.js.map +1 -1
- package/lib/features/webbuilder/components/PublishSheet.js +2 -2
- package/lib/features/webbuilder/components/PublishSheet.js.map +1 -1
- package/lib/features/webbuilder/components/SiteUploadSheet.js +17 -2
- package/lib/features/webbuilder/components/SiteUploadSheet.js.map +1 -1
- package/lib/features/webbuilder/components/SocialExportPicker.js +253 -0
- package/lib/features/webbuilder/components/SocialExportPicker.js.map +1 -0
- package/lib/features/webbuilder/components/StudioHome.js +300 -185
- package/lib/features/webbuilder/components/StudioHome.js.map +1 -1
- package/lib/features/webbuilder/components/TemplateCard.js +13 -5
- package/lib/features/webbuilder/components/TemplateCard.js.map +1 -1
- package/lib/features/webbuilder/connectorTemplates.js +3 -2
- package/lib/features/webbuilder/connectorTemplates.js.map +1 -1
- package/lib/features/webbuilder/liveSiteDelete.js +58 -0
- package/lib/features/webbuilder/liveSiteDelete.js.map +1 -0
- package/lib/features/webbuilder/publishTools.js +3 -1
- package/lib/features/webbuilder/publishTools.js.map +1 -1
- package/lib/features/webbuilder/socialExportFile.js +84 -0
- package/lib/features/webbuilder/socialExportFile.js.map +1 -0
- package/lib/features/webbuilder/stepLabels.js +7 -7
- package/lib/features/webbuilder/stepLabels.js.map +1 -1
- package/lib/features/webbuilder/thumbSources.js +17 -3
- package/lib/features/webbuilder/thumbSources.js.map +1 -1
- package/lib/features/webbuilder/useVoiceTyping.js +169 -0
- package/lib/features/webbuilder/useVoiceTyping.js.map +1 -0
- package/lib/features/webbuilder/web/chat/connectRequest.js +17 -0
- package/lib/features/webbuilder/web/chat/connectRequest.js.map +1 -0
- package/lib/features/webbuilder/web/notify/turnDone.js +20 -0
- package/lib/features/webbuilder/web/notify/turnDone.js.map +1 -0
- package/lib/features/webbuilder/web/project/coverRequest.js +22 -0
- package/lib/features/webbuilder/web/project/coverRequest.js.map +1 -0
- package/lib/features/webbuilder/web/project/deleteFlow.js +57 -0
- package/lib/features/webbuilder/web/project/deleteFlow.js.map +1 -0
- package/lib/features/webbuilder/web/publish/siteAddress.js +5 -1
- package/lib/features/webbuilder/web/publish/siteAddress.js.map +1 -1
- package/lib/features/webbuilder/web/upload/sitePhotos.js +2 -2
- package/lib/features/webbuilder/web/upload/sitePhotos.js.map +1 -1
- package/lib/features/webbuilder/web/upload/socialExport.js +191 -0
- package/lib/features/webbuilder/web/upload/socialExport.js.map +1 -0
- package/lib/features/webbuilder/web/upload/zipRandomAccess.js +64 -0
- package/lib/features/webbuilder/web/upload/zipRandomAccess.js.map +1 -0
- package/lib/features/webbuilder/web/webServices.js +27 -3
- package/lib/features/webbuilder/web/webServices.js.map +1 -1
- package/lib/hooks/useHeaderProfile.js +25 -0
- package/lib/hooks/useHeaderProfile.js.map +1 -0
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/routes.json +21 -29
- package/lib/screens/Account/AccountSheets.js +140 -74
- package/lib/screens/Account/AccountSheets.js.map +1 -1
- package/lib/screens/Account/index.js +3 -3
- package/lib/screens/Account/index.js.map +1 -1
- package/lib/screens/Apps/index.js +1 -1
- package/lib/screens/Apps/index.js.map +1 -1
- package/lib/screens/ChatHistory/index.js +1 -1
- package/lib/screens/ChatHistory/index.js.map +1 -1
- package/lib/screens/ExpensesNative/index.js +3 -3
- package/lib/screens/ExpensesNative/index.js.map +1 -1
- package/lib/screens/Home/HomeScreen.js +11 -0
- package/lib/screens/Home/HomeScreen.js.map +1 -1
- package/lib/screens/Home/components/ChatHistoryLanding.js +3 -2
- package/lib/screens/Home/components/ChatHistoryLanding.js.map +1 -1
- package/lib/screens/WebBuilderNative/index.js +3 -2
- package/lib/screens/WebBuilderNative/index.js.map +1 -1
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js +2 -2
- package/lib/screens/WebBuilderNative/useWebBuilderHost.js.map +1 -1
- package/lib/utils/drawerRoutes.js +13 -0
- package/lib/utils/drawerRoutes.js.map +1 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {jsxs,jsx
|
|
1
|
+
import {jsxs,Fragment,jsx}from'react/jsx-runtime';import {useRef,useState,useMemo}from'react';import {StyleSheet,ScrollView,View,Text}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap,DIM}from'../../inbox/components/Tap.js';import {isValidLookUrl,isBareSeed,hostLabel,STUDIO_CHIPS,STUDIO_CHIP_GLYPH,brandSummary,STUDIO_STEPS}from'../studioCatalog.js';import {Composer}from'./Composer.js';import {ReferenceModeChoice}from'./ReferenceModeChoice.js';import {defaultReferenceMode}from'../web/chat/referenceMode.js';import {useTemplateSuggestions,TemplateSuggestions}from'./TemplateSuggestions.js';import {TemplateCover}from'./TemplateCard.js';import {TemplatePreviewSheet}from'./TemplatePreviewSheet.js';import {templatesForMode,templateName,templateCategoryLabel}from'../templateCatalog.js';import {hueFor}from'../thumbSources.js';var __defProp = Object.defineProperty;
|
|
2
2
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
3
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
4
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -15,12 +15,9 @@ var __spreadValues = (a, b) => {
|
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
17
|
const GUTTER = 16;
|
|
18
|
-
const HERO_PAD = 18;
|
|
19
18
|
function ShapeRow({
|
|
20
19
|
icon,
|
|
21
20
|
tint,
|
|
22
|
-
tintSoft,
|
|
23
|
-
eyebrow,
|
|
24
21
|
title,
|
|
25
22
|
detail,
|
|
26
23
|
onPress,
|
|
@@ -29,28 +26,87 @@ function ShapeRow({
|
|
|
29
26
|
last = false,
|
|
30
27
|
testID
|
|
31
28
|
}) {
|
|
32
|
-
return /* @__PURE__ */ jsxs(Tap, { onPress, accessibilityRole: "button", accessibilityLabel: `${title}. ${detail}`, style:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
29
|
+
return /* @__PURE__ */ jsxs(Tap, { onPress, accessibilityRole: "button", accessibilityLabel: `${title}. ${detail}`, style: styles.row, pressedStyle: {
|
|
30
|
+
backgroundColor: theme.chip
|
|
31
|
+
}, testID, children: [
|
|
32
|
+
/* @__PURE__ */ jsx(View, { style: [styles.rowIcon, {
|
|
33
|
+
backgroundColor: tint
|
|
34
|
+
}], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: icon, size: 18, color: "#fff" }) }),
|
|
35
|
+
/* @__PURE__ */ jsxs(View, { style: [styles.rowBody, !last && {
|
|
36
|
+
borderBottomColor: theme.border,
|
|
37
|
+
borderBottomWidth: StyleSheet.hairlineWidth
|
|
38
|
+
}], children: [
|
|
39
|
+
/* @__PURE__ */ jsxs(View, { style: styles.rowText, children: [
|
|
40
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.rowTitle, {
|
|
41
|
+
color: theme.ink
|
|
42
|
+
}], numberOfLines: 1, children: title }),
|
|
43
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.rowDetail, {
|
|
44
|
+
color: theme.muted
|
|
45
|
+
}], numberOfLines: 1, children: detail })
|
|
46
|
+
] }),
|
|
47
|
+
trailing,
|
|
48
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "chevron-right", size: 20, color: theme.faint })
|
|
49
|
+
] })
|
|
50
|
+
] });
|
|
51
|
+
}
|
|
52
|
+
function SectionHead({
|
|
53
|
+
title,
|
|
54
|
+
action,
|
|
55
|
+
onAction,
|
|
56
|
+
theme
|
|
57
|
+
}) {
|
|
58
|
+
return /* @__PURE__ */ jsxs(View, { style: styles.sectionHead, children: [
|
|
59
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.sectionTitle, {
|
|
60
|
+
color: theme.ink
|
|
61
|
+
}], accessibilityRole: "header", children: title }),
|
|
62
|
+
action && onAction ? /* @__PURE__ */ jsx(Tap, { onPress: onAction, accessibilityRole: "button", hitSlop: 10, pressedStyle: DIM, children: /* @__PURE__ */ jsx(Text, { style: [styles.sectionAction, {
|
|
63
|
+
color: theme.accent
|
|
64
|
+
}], children: action }) }) : null
|
|
65
|
+
] });
|
|
66
|
+
}
|
|
67
|
+
function Group({
|
|
68
|
+
title,
|
|
69
|
+
theme,
|
|
70
|
+
children
|
|
71
|
+
}) {
|
|
72
|
+
return /* @__PURE__ */ jsxs(View, { style: styles.group, children: [
|
|
73
|
+
/* @__PURE__ */ jsx(SectionHead, { title, theme }),
|
|
74
|
+
/* @__PURE__ */ jsx(View, { style: [styles.groupBody, {
|
|
75
|
+
backgroundColor: theme.card,
|
|
76
|
+
borderColor: theme.border
|
|
77
|
+
}], children })
|
|
78
|
+
] });
|
|
79
|
+
}
|
|
80
|
+
function TemplateArt({
|
|
81
|
+
name
|
|
82
|
+
}) {
|
|
83
|
+
const hue = hueFor(name);
|
|
84
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles.art, {
|
|
85
|
+
backgroundColor: `hsl(${hue}, 60%, 94%)`
|
|
86
|
+
}], testID: "webbuilder-template-art", children: [
|
|
87
|
+
/* @__PURE__ */ jsx(View, { style: styles.artBar, children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx(View, { style: [styles.artDot, {
|
|
88
|
+
backgroundColor: `hsla(${hue}, 30%, 40%, 0.35)`
|
|
89
|
+
}] }, i)) }),
|
|
90
|
+
/* @__PURE__ */ jsxs(View, { style: styles.artHero, children: [
|
|
91
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.artName, {
|
|
92
|
+
color: `hsl(${hue}, 55%, 28%)`
|
|
93
|
+
}], numberOfLines: 2, children: name }),
|
|
94
|
+
/* @__PURE__ */ jsx(View, { style: [styles.artButton, {
|
|
95
|
+
backgroundColor: `hsl(${hue}, 65%, 50%)`
|
|
96
|
+
}] })
|
|
50
97
|
] }),
|
|
51
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ jsxs(View, { style: styles.artBlocks, children: [
|
|
99
|
+
/* @__PURE__ */ jsx(View, { style: [styles.artBlock, {
|
|
100
|
+
backgroundColor: `hsla(${hue}, 50%, 50%, 0.16)`
|
|
101
|
+
}] }),
|
|
102
|
+
/* @__PURE__ */ jsx(View, { style: [styles.artBlock, {
|
|
103
|
+
backgroundColor: `hsla(${hue}, 50%, 50%, 0.16)`
|
|
104
|
+
}] })
|
|
105
|
+
] })
|
|
52
106
|
] });
|
|
53
107
|
}
|
|
108
|
+
const HOME_TEMPLATES = 10;
|
|
109
|
+
const TEMPLATE_CARD_W = 168;
|
|
54
110
|
function StudioHome({
|
|
55
111
|
draft,
|
|
56
112
|
onDraft,
|
|
@@ -113,26 +169,19 @@ function StudioHome({
|
|
|
113
169
|
setGraphics("pictures");
|
|
114
170
|
};
|
|
115
171
|
const shownNotice = notice || startNotice;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
/* @__PURE__ */ jsxs(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
/* @__PURE__ */ jsx(Text, { style: [styles.eyebrow, {
|
|
125
|
-
color: theme.accent
|
|
126
|
-
}], children: "WEBSITE STUDIO" }),
|
|
127
|
-
/* @__PURE__ */ jsxs(Text, { style: [styles.title, {
|
|
172
|
+
const featured = useMemo(() => templatesForMode([...templates != null ? templates : []], "site").sort((a, b) => Number(Boolean(b.cover)) - Number(Boolean(a.cover))).slice(0, HOME_TEMPLATES), [templates]);
|
|
173
|
+
const [previewing, setPreviewing] = useState(null);
|
|
174
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
175
|
+
/* @__PURE__ */ jsxs(ScrollView, { ref: scrollRef, style: styles.fill, contentContainerStyle: [styles.content, {
|
|
176
|
+
paddingBottom: bottomInset + 24
|
|
177
|
+
}], keyboardShouldPersistTaps: "handled", testID: "webbuilder-home", children: [
|
|
178
|
+
/* @__PURE__ */ jsxs(View, { style: styles.head, children: [
|
|
179
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.title, {
|
|
128
180
|
color: theme.ink
|
|
129
|
-
}], children:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}, children: "build" }),
|
|
134
|
-
" today?"
|
|
135
|
-
] })
|
|
181
|
+
}], accessibilityRole: "header", children: "What do you want to build?" }),
|
|
182
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.subtitle, {
|
|
183
|
+
color: theme.muted
|
|
184
|
+
}], children: "Describe it, and the AI builds a site you can change by asking." })
|
|
136
185
|
] }),
|
|
137
186
|
/* @__PURE__ */ jsx(Composer, { ref: inputRef, value: draft, onChangeText: (text) => {
|
|
138
187
|
onDraft(text);
|
|
@@ -157,10 +206,10 @@ function StudioHome({
|
|
|
157
206
|
"Built for ",
|
|
158
207
|
/* @__PURE__ */ jsx(Text, { style: {
|
|
159
208
|
color: theme.ink,
|
|
160
|
-
fontWeight: "
|
|
209
|
+
fontWeight: "600"
|
|
161
210
|
}, children: brand.name })
|
|
162
211
|
] }),
|
|
163
|
-
/* @__PURE__ */ jsx(Tap, { onPress: () => onBrandOffChange(true), accessibilityRole: "button", accessibilityLabel: "Leave the brand kit off this site", hitSlop: 10, pressedStyle: DIM, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "close", size: 16, color: theme.
|
|
212
|
+
/* @__PURE__ */ jsx(Tap, { onPress: () => onBrandOffChange(true), accessibilityRole: "button", accessibilityLabel: "Leave the brand kit off this site", hitSlop: 10, pressedStyle: DIM, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "close-circle", size: 16, color: theme.faint }) })
|
|
164
213
|
] }) }) : null,
|
|
165
214
|
shownNotice ? /* @__PURE__ */ jsxs(View, { style: [styles.notice, {
|
|
166
215
|
backgroundColor: theme.critSoft
|
|
@@ -178,56 +227,34 @@ function StudioHome({
|
|
|
178
227
|
return (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
179
228
|
}, 50);
|
|
180
229
|
}, accessibilityRole: "button", accessibilityLabel: `Start a ${chip.label.toLowerCase()}`, style: [styles.chip, {
|
|
181
|
-
|
|
182
|
-
|
|
230
|
+
backgroundColor: theme.card,
|
|
231
|
+
borderColor: theme.border
|
|
183
232
|
}], pressedStyle: DIM, testID: `webbuilder-chip-${chip.id}`, children: [
|
|
184
|
-
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: STUDIO_CHIP_GLYPH[chip.icon], size:
|
|
233
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: STUDIO_CHIP_GLYPH[chip.icon], size: 16, color: theme.accent }),
|
|
185
234
|
/* @__PURE__ */ jsx(Text, { style: [styles.chipLabel, {
|
|
186
235
|
color: theme.ink
|
|
187
236
|
}], children: chip.label })
|
|
188
|
-
] }, chip.id)) })
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
borderColor: theme.border
|
|
197
|
-
}], children: STUDIO_STEPS.map((step, index) => /* @__PURE__ */ jsxs(View, { style: styles.step, children: [
|
|
198
|
-
/* @__PURE__ */ jsxs(View, { style: styles.stepRail, children: [
|
|
199
|
-
/* @__PURE__ */ jsx(View, { style: [styles.stepBadge, {
|
|
200
|
-
backgroundColor: theme.accent
|
|
201
|
-
}], children: /* @__PURE__ */ jsx(Text, { style: [styles.stepN, {
|
|
202
|
-
color: theme.accentInk
|
|
203
|
-
}], children: step.n }) }),
|
|
204
|
-
index < STUDIO_STEPS.length - 1 ? /* @__PURE__ */ jsx(View, { style: [styles.stepLine, {
|
|
205
|
-
backgroundColor: theme.accentBorder
|
|
206
|
-
}] }) : null
|
|
207
|
-
] }),
|
|
208
|
-
/* @__PURE__ */ jsxs(View, { style: styles.stepText, children: [
|
|
209
|
-
/* @__PURE__ */ jsx(Text, { style: [styles.stepTitle, {
|
|
237
|
+
] }, chip.id)) }),
|
|
238
|
+
featured.length && onUseTemplate ? /* @__PURE__ */ jsxs(View, { style: styles.group, children: [
|
|
239
|
+
/* @__PURE__ */ jsx(SectionHead, { title: "Start from a template", action: "See all", onAction: onBrowseTemplates, theme }),
|
|
240
|
+
/* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, style: styles.chipsBleed, contentContainerStyle: styles.templates, decelerationRate: "fast", snapToInterval: TEMPLATE_CARD_W + 12, snapToAlignment: "start", children: featured.map((t) => /* @__PURE__ */ jsxs(Tap, { onPress: () => setPreviewing(t), accessibilityRole: "button", accessibilityLabel: `Preview ${templateName(t)}`, pressedStyle: DIM, style: styles.templateCard, testID: `webbuilder-home-template-${t.id}`, children: [
|
|
241
|
+
/* @__PURE__ */ jsx(View, { style: [styles.templateCover, {
|
|
242
|
+
borderColor: theme.border
|
|
243
|
+
}], children: t.cover ? /* @__PURE__ */ jsx(TemplateCover, { uri: t.cover, theme, style: styles.templateCoverFill }) : /* @__PURE__ */ jsx(TemplateArt, { name: templateName(t) }) }),
|
|
244
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.templateName, {
|
|
210
245
|
color: theme.ink
|
|
211
|
-
}], children:
|
|
212
|
-
/* @__PURE__ */ jsx(Text, { style: [styles.
|
|
246
|
+
}], numberOfLines: 1, children: templateName(t) }),
|
|
247
|
+
t.category ? /* @__PURE__ */ jsx(Text, { style: [styles.templateMeta, {
|
|
213
248
|
color: theme.muted
|
|
214
|
-
}], children:
|
|
215
|
-
] })
|
|
216
|
-
] }
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
/* @__PURE__ */ jsx(Text, { style: [styles.sectionTitle, {
|
|
220
|
-
color: theme.ink
|
|
221
|
-
}], children: "Make it yours" }),
|
|
222
|
-
/* @__PURE__ */ jsxs(View, { style: [styles.panel, styles.panelFlush, {
|
|
223
|
-
backgroundColor: theme.card,
|
|
224
|
-
borderColor: theme.border
|
|
225
|
-
}], children: [
|
|
226
|
-
/* @__PURE__ */ jsx(ShapeRow, { icon: brand ? "palette-swatch-variant" : "plus", tint: theme.accent, tintSoft: theme.accentSoft, eyebrow: "BRAND KIT", title: brand ? brand.name || "Your brand" : "Set up your brand", detail: brand ? brandSummary(brand) : "Colors, fonts and voice for every build", onPress: onBrand, theme, trailing: (brand == null ? void 0 : brand.colors.length) ? /* @__PURE__ */ jsx(View, { style: styles.swatches, children: brand.colors.map((c) => /* @__PURE__ */ jsx(View, { style: [styles.swatch, {
|
|
249
|
+
}], numberOfLines: 1, children: templateCategoryLabel(t.category) }) : null
|
|
250
|
+
] }, t.id)) })
|
|
251
|
+
] }) : null,
|
|
252
|
+
/* @__PURE__ */ jsxs(Group, { title: "Make it yours", theme, children: [
|
|
253
|
+
/* @__PURE__ */ jsx(ShapeRow, { icon: brand ? "palette-swatch-variant" : "palette-outline", tint: theme.accent, title: "Brand kit", detail: brand ? `${brand.name || "Your brand"} \xB7 ${brandSummary(brand)}` : "Colours, fonts and voice for every build", onPress: onBrand, theme, trailing: (brand == null ? void 0 : brand.colors.length) ? /* @__PURE__ */ jsx(View, { style: styles.swatches, children: brand.colors.slice(0, 3).map((c) => /* @__PURE__ */ jsx(View, { style: [styles.swatch, {
|
|
227
254
|
backgroundColor: c,
|
|
228
|
-
borderColor: theme.
|
|
255
|
+
borderColor: theme.card
|
|
229
256
|
}] }, c)) }) : void 0, testID: "webbuilder-brand-card" }),
|
|
230
|
-
/* @__PURE__ */ jsx(ShapeRow, { icon: "web", tint:
|
|
257
|
+
/* @__PURE__ */ jsx(ShapeRow, { icon: "web", tint: LOOK_TINT, title: referenceUrl ? `Look like ${hostLabel(referenceUrl)}` : "Look like a site you love", detail: "Its layout and style, your content", onPress: () => {
|
|
231
258
|
var _a;
|
|
232
259
|
setLookOpen(true);
|
|
233
260
|
(_a = scrollRef.current) == null ? void 0 : _a.scrollTo({
|
|
@@ -235,11 +262,36 @@ function StudioHome({
|
|
|
235
262
|
animated: true
|
|
236
263
|
});
|
|
237
264
|
}, theme, testID: "webbuilder-look-card" }),
|
|
238
|
-
/* @__PURE__ */ jsx(ShapeRow, { icon: "speedometer", tint:
|
|
265
|
+
/* @__PURE__ */ jsx(ShapeRow, { icon: "speedometer", tint: SCORE_TINT, title: "Site score", detail: "Speed, accessibility and SEO before you share", onPress: onSiteScore, theme, last: true, testID: "webbuilder-score-card" })
|
|
266
|
+
] }),
|
|
267
|
+
/* @__PURE__ */ jsxs(View, { style: styles.group, children: [
|
|
268
|
+
/* @__PURE__ */ jsx(SectionHead, { title: "How it works", theme }),
|
|
269
|
+
/* @__PURE__ */ jsx(View, { style: [styles.steps, {
|
|
270
|
+
backgroundColor: theme.card,
|
|
271
|
+
borderColor: theme.border
|
|
272
|
+
}], children: STUDIO_STEPS.map((step) => /* @__PURE__ */ jsxs(View, { style: styles.stepCell, accessible: true, accessibilityLabel: `${step.n}. ${step.title}. ${step.detail}`, children: [
|
|
273
|
+
/* @__PURE__ */ jsx(View, { style: [styles.stepBadge, {
|
|
274
|
+
backgroundColor: theme.accentSoft
|
|
275
|
+
}], children: /* @__PURE__ */ jsx(Text, { style: [styles.stepN, {
|
|
276
|
+
color: theme.accent
|
|
277
|
+
}], children: step.n }) }),
|
|
278
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.stepTitle, {
|
|
279
|
+
color: theme.ink
|
|
280
|
+
}], numberOfLines: 2, children: step.title }),
|
|
281
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.stepDetail, {
|
|
282
|
+
color: theme.muted
|
|
283
|
+
}], numberOfLines: 3, children: step.detail })
|
|
284
|
+
] }, step.n)) })
|
|
239
285
|
] })
|
|
240
|
-
] })
|
|
286
|
+
] }),
|
|
287
|
+
onUseTemplate ? /* @__PURE__ */ jsx(TemplatePreviewSheet, { template: previewing, onUse: (t) => {
|
|
288
|
+
setPreviewing(null);
|
|
289
|
+
onUseTemplate(t, isBareSeed(draft) ? "" : draft.trim());
|
|
290
|
+
}, onClose: () => setPreviewing(null), theme }) : null
|
|
241
291
|
] });
|
|
242
292
|
}
|
|
293
|
+
const LOOK_TINT = "#0a84ff";
|
|
294
|
+
const SCORE_TINT = "#30a46c";
|
|
243
295
|
const styles = StyleSheet.create({
|
|
244
296
|
fill: {
|
|
245
297
|
flex: 1
|
|
@@ -247,30 +299,22 @@ const styles = StyleSheet.create({
|
|
|
247
299
|
content: {
|
|
248
300
|
paddingHorizontal: GUTTER,
|
|
249
301
|
paddingTop: 4,
|
|
250
|
-
gap:
|
|
251
|
-
},
|
|
252
|
-
hero: {
|
|
253
|
-
borderRadius: 26,
|
|
254
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
255
|
-
paddingTop: 22,
|
|
256
|
-
paddingHorizontal: HERO_PAD,
|
|
257
|
-
paddingBottom: 16,
|
|
258
|
-
gap: 16,
|
|
259
|
-
overflow: "hidden"
|
|
260
|
-
},
|
|
261
|
-
heroHead: {
|
|
262
|
-
gap: 8
|
|
302
|
+
gap: 14
|
|
263
303
|
},
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
304
|
+
head: {
|
|
305
|
+
gap: 6,
|
|
306
|
+
paddingHorizontal: 4,
|
|
307
|
+
marginBottom: 6
|
|
268
308
|
},
|
|
269
309
|
title: {
|
|
270
|
-
fontSize:
|
|
271
|
-
lineHeight:
|
|
272
|
-
fontWeight: "
|
|
273
|
-
letterSpacing: -0.
|
|
310
|
+
fontSize: 28,
|
|
311
|
+
lineHeight: 34,
|
|
312
|
+
fontWeight: "700",
|
|
313
|
+
letterSpacing: -0.4
|
|
314
|
+
},
|
|
315
|
+
subtitle: {
|
|
316
|
+
fontSize: 15,
|
|
317
|
+
lineHeight: 20
|
|
274
318
|
},
|
|
275
319
|
notice: {
|
|
276
320
|
flexDirection: "row",
|
|
@@ -278,8 +322,7 @@ const styles = StyleSheet.create({
|
|
|
278
322
|
gap: 8,
|
|
279
323
|
borderRadius: 12,
|
|
280
324
|
paddingHorizontal: 12,
|
|
281
|
-
paddingVertical: 10
|
|
282
|
-
marginTop: -4
|
|
325
|
+
paddingVertical: 10
|
|
283
326
|
},
|
|
284
327
|
noticeText: {
|
|
285
328
|
flex: 1,
|
|
@@ -288,33 +331,30 @@ const styles = StyleSheet.create({
|
|
|
288
331
|
fontWeight: "500"
|
|
289
332
|
},
|
|
290
333
|
chipsBleed: {
|
|
291
|
-
marginHorizontal: -
|
|
334
|
+
marginHorizontal: -16
|
|
292
335
|
},
|
|
293
336
|
chips: {
|
|
294
337
|
gap: 8,
|
|
295
|
-
paddingHorizontal:
|
|
338
|
+
paddingHorizontal: GUTTER
|
|
296
339
|
},
|
|
297
340
|
chip: {
|
|
298
341
|
flexDirection: "row",
|
|
299
342
|
alignItems: "center",
|
|
300
343
|
gap: 6,
|
|
301
|
-
height:
|
|
344
|
+
height: 36,
|
|
302
345
|
paddingHorizontal: 14,
|
|
303
|
-
borderRadius:
|
|
346
|
+
borderRadius: 18,
|
|
304
347
|
borderWidth: StyleSheet.hairlineWidth
|
|
305
348
|
},
|
|
306
349
|
chipLabel: {
|
|
307
|
-
fontSize:
|
|
308
|
-
fontWeight: "
|
|
309
|
-
},
|
|
310
|
-
section: {
|
|
311
|
-
gap: 10
|
|
350
|
+
fontSize: 15,
|
|
351
|
+
fontWeight: "500"
|
|
312
352
|
},
|
|
313
353
|
brandChip: {
|
|
314
354
|
flexDirection: "row",
|
|
315
355
|
alignItems: "center",
|
|
316
|
-
gap:
|
|
317
|
-
paddingHorizontal:
|
|
356
|
+
gap: 6,
|
|
357
|
+
paddingHorizontal: 4
|
|
318
358
|
},
|
|
319
359
|
brandChipText: {
|
|
320
360
|
fontSize: 13
|
|
@@ -323,99 +363,174 @@ const styles = StyleSheet.create({
|
|
|
323
363
|
fontSize: 13,
|
|
324
364
|
fontWeight: "600"
|
|
325
365
|
},
|
|
366
|
+
group: {
|
|
367
|
+
gap: 10,
|
|
368
|
+
marginTop: 14
|
|
369
|
+
},
|
|
370
|
+
sectionHead: {
|
|
371
|
+
flexDirection: "row",
|
|
372
|
+
alignItems: "baseline",
|
|
373
|
+
justifyContent: "space-between",
|
|
374
|
+
paddingHorizontal: 4
|
|
375
|
+
},
|
|
326
376
|
sectionTitle: {
|
|
327
|
-
fontSize:
|
|
377
|
+
fontSize: 20,
|
|
378
|
+
lineHeight: 25,
|
|
328
379
|
fontWeight: "700",
|
|
329
|
-
letterSpacing: -0.3
|
|
330
|
-
paddingHorizontal: 4
|
|
380
|
+
letterSpacing: -0.3
|
|
331
381
|
},
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
paddingHorizontal: 16,
|
|
336
|
-
paddingTop: 16
|
|
382
|
+
sectionAction: {
|
|
383
|
+
fontSize: 15,
|
|
384
|
+
fontWeight: "500"
|
|
337
385
|
},
|
|
338
|
-
|
|
339
|
-
|
|
386
|
+
groupBody: {
|
|
387
|
+
borderRadius: 12,
|
|
388
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
389
|
+
overflow: "hidden"
|
|
340
390
|
},
|
|
341
|
-
|
|
391
|
+
row: {
|
|
342
392
|
flexDirection: "row",
|
|
343
|
-
gap: 14
|
|
344
|
-
},
|
|
345
|
-
stepRail: {
|
|
346
393
|
alignItems: "center",
|
|
347
|
-
|
|
394
|
+
paddingLeft: 14,
|
|
395
|
+
gap: 12
|
|
348
396
|
},
|
|
349
|
-
|
|
350
|
-
width:
|
|
351
|
-
height:
|
|
352
|
-
borderRadius:
|
|
397
|
+
rowIcon: {
|
|
398
|
+
width: 30,
|
|
399
|
+
height: 30,
|
|
400
|
+
borderRadius: 7,
|
|
353
401
|
alignItems: "center",
|
|
354
402
|
justifyContent: "center"
|
|
355
403
|
},
|
|
356
|
-
|
|
357
|
-
fontSize: 13,
|
|
358
|
-
fontWeight: "800"
|
|
359
|
-
},
|
|
360
|
-
stepLine: {
|
|
361
|
-
width: 2,
|
|
404
|
+
rowBody: {
|
|
362
405
|
flex: 1,
|
|
363
|
-
|
|
364
|
-
|
|
406
|
+
flexDirection: "row",
|
|
407
|
+
alignItems: "center",
|
|
408
|
+
gap: 8,
|
|
409
|
+
minHeight: 58,
|
|
410
|
+
paddingVertical: 10,
|
|
411
|
+
paddingRight: 12
|
|
365
412
|
},
|
|
366
|
-
|
|
413
|
+
rowText: {
|
|
367
414
|
flex: 1,
|
|
368
|
-
paddingBottom: 16,
|
|
369
415
|
gap: 2
|
|
370
416
|
},
|
|
371
|
-
|
|
372
|
-
fontSize:
|
|
373
|
-
fontWeight: "
|
|
374
|
-
lineHeight: 26
|
|
417
|
+
rowTitle: {
|
|
418
|
+
fontSize: 16,
|
|
419
|
+
fontWeight: "500"
|
|
375
420
|
},
|
|
376
|
-
|
|
421
|
+
rowDetail: {
|
|
422
|
+
fontSize: 13,
|
|
423
|
+
lineHeight: 17
|
|
424
|
+
},
|
|
425
|
+
templates: {
|
|
426
|
+
gap: 12,
|
|
427
|
+
paddingHorizontal: GUTTER
|
|
428
|
+
},
|
|
429
|
+
templateCard: {
|
|
430
|
+
width: TEMPLATE_CARD_W,
|
|
431
|
+
gap: 2
|
|
432
|
+
},
|
|
433
|
+
templateCover: {
|
|
434
|
+
width: TEMPLATE_CARD_W,
|
|
435
|
+
aspectRatio: 1.45,
|
|
436
|
+
borderRadius: 12,
|
|
437
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
438
|
+
overflow: "hidden",
|
|
439
|
+
marginBottom: 6
|
|
440
|
+
},
|
|
441
|
+
templateCoverFill: {
|
|
442
|
+
flex: 1,
|
|
443
|
+
aspectRatio: void 0
|
|
444
|
+
},
|
|
445
|
+
templateName: {
|
|
377
446
|
fontSize: 14,
|
|
378
|
-
|
|
447
|
+
fontWeight: "600"
|
|
448
|
+
},
|
|
449
|
+
art: {
|
|
450
|
+
flex: 1,
|
|
451
|
+
padding: 10,
|
|
452
|
+
gap: 8
|
|
379
453
|
},
|
|
380
|
-
|
|
454
|
+
artBar: {
|
|
381
455
|
flexDirection: "row",
|
|
382
|
-
|
|
383
|
-
gap: 14,
|
|
384
|
-
paddingVertical: 14
|
|
456
|
+
gap: 4
|
|
385
457
|
},
|
|
386
|
-
|
|
387
|
-
width:
|
|
388
|
-
height:
|
|
389
|
-
borderRadius:
|
|
390
|
-
alignItems: "center",
|
|
391
|
-
justifyContent: "center"
|
|
458
|
+
artDot: {
|
|
459
|
+
width: 6,
|
|
460
|
+
height: 6,
|
|
461
|
+
borderRadius: 3
|
|
392
462
|
},
|
|
393
|
-
|
|
394
|
-
flex: 1
|
|
463
|
+
artHero: {
|
|
464
|
+
flex: 1,
|
|
465
|
+
justifyContent: "center",
|
|
466
|
+
gap: 8
|
|
395
467
|
},
|
|
396
|
-
|
|
397
|
-
fontSize:
|
|
468
|
+
artName: {
|
|
469
|
+
fontSize: 17,
|
|
470
|
+
lineHeight: 20,
|
|
398
471
|
fontWeight: "800",
|
|
399
|
-
letterSpacing:
|
|
472
|
+
letterSpacing: -0.3
|
|
400
473
|
},
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
474
|
+
artButton: {
|
|
475
|
+
width: 44,
|
|
476
|
+
height: 10,
|
|
477
|
+
borderRadius: 5
|
|
405
478
|
},
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
479
|
+
artBlocks: {
|
|
480
|
+
flexDirection: "row",
|
|
481
|
+
gap: 6
|
|
409
482
|
},
|
|
410
|
-
|
|
483
|
+
artBlock: {
|
|
484
|
+
flex: 1,
|
|
485
|
+
height: 16,
|
|
486
|
+
borderRadius: 4
|
|
487
|
+
},
|
|
488
|
+
templateMeta: {
|
|
489
|
+
fontSize: 12
|
|
490
|
+
},
|
|
491
|
+
steps: {
|
|
411
492
|
flexDirection: "row",
|
|
493
|
+
borderRadius: 12,
|
|
494
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
495
|
+
paddingVertical: 14,
|
|
496
|
+
paddingHorizontal: 6
|
|
497
|
+
},
|
|
498
|
+
stepCell: {
|
|
499
|
+
flex: 1,
|
|
500
|
+
alignItems: "center",
|
|
412
501
|
gap: 4,
|
|
413
|
-
|
|
502
|
+
paddingHorizontal: 4
|
|
503
|
+
},
|
|
504
|
+
stepBadge: {
|
|
505
|
+
width: 28,
|
|
506
|
+
height: 28,
|
|
507
|
+
borderRadius: 14,
|
|
508
|
+
alignItems: "center",
|
|
509
|
+
justifyContent: "center",
|
|
510
|
+
marginBottom: 2
|
|
511
|
+
},
|
|
512
|
+
stepN: {
|
|
513
|
+
fontSize: 14,
|
|
514
|
+
fontWeight: "700"
|
|
515
|
+
},
|
|
516
|
+
stepTitle: {
|
|
517
|
+
fontSize: 13,
|
|
518
|
+
fontWeight: "600",
|
|
519
|
+
textAlign: "center"
|
|
520
|
+
},
|
|
521
|
+
stepDetail: {
|
|
522
|
+
fontSize: 11,
|
|
523
|
+
lineHeight: 14,
|
|
524
|
+
textAlign: "center"
|
|
525
|
+
},
|
|
526
|
+
swatches: {
|
|
527
|
+
flexDirection: "row"
|
|
414
528
|
},
|
|
415
529
|
swatch: {
|
|
416
|
-
width:
|
|
417
|
-
height:
|
|
418
|
-
borderRadius:
|
|
419
|
-
borderWidth:
|
|
530
|
+
width: 16,
|
|
531
|
+
height: 16,
|
|
532
|
+
borderRadius: 8,
|
|
533
|
+
borderWidth: 1.5,
|
|
534
|
+
marginLeft: -5
|
|
420
535
|
}
|
|
421
536
|
});export{StudioHome};//# sourceMappingURL=StudioHome.js.map
|