@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublishSheet.js","sources":["../../../../src/features/webbuilder/components/PublishSheet.tsx"],"sourcesContent":["/**\n * Publish a build: the web PublishControls dialog on a sheet. The person\n * picks the site's name (`<name>.pages.dev`), the host starts the deploy, and\n * the live address arrives later on a chat post - so the sheet says\n * \"Publishing…\" until the build carries it, then shows it with Open / Share.\n */\nimport React, { useEffect, useState } from 'react';\nimport { Linking, Share, StyleSheet, Text, TextInput, View } from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { displayHost, isValidPublishSlug, publishSlug } from '../buildFragments';\nimport type { WebBuilderBuild, WebBuilderPublishResult } from '../types';\nimport type { WebBuilderTheme } from '../webbuilderTheme';\nimport { PrimaryButton, SecondaryButton, Sheet } from './ui';\n\nexport function PublishSheet({\n visible,\n build,\n publishing,\n onPublish,\n onClose,\n theme,\n}: {\n visible: boolean;\n build: WebBuilderBuild | null;\n /** A deploy is running on this site (started here, or seen on the chat). */\n publishing: boolean;\n onPublish?: (build: WebBuilderBuild, projectName: string) => Promise<WebBuilderPublishResult>;\n onClose: () => void;\n theme: WebBuilderTheme;\n}) {\n const [name, setName] = useState('');\n const [starting, setStarting] = useState(false);\n const [error, setError] = useState<string | null>(null);\n\n useEffect(() => {\n if (!visible || !build) return;\n setName((prev) => prev || publishSlug(build.title));\n setError(null);\n }, [visible, build]);\n\n const live = build?.liveUrl ?? null;\n const valid = isValidPublishSlug(name);\n\n const publish = async () => {\n if (!build || !onPublish || !valid) return;\n setStarting(true);\n setError(null);\n try {\n const result = await onPublish(build, name);\n if (!result.ok) setError(result.message || \"Publishing didn't start. Try again.\");\n } catch {\n setError(\"Publishing didn't start. Check your connection and try again.\");\n } finally {\n setStarting(false);\n }\n };\n\n let body: React.ReactNode;\n if (!build?.sandboxId) {\n body = (\n <Text style={[styles.note, { color: theme.muted }]}>\n There is nothing to publish yet. Build the site first, then publish it here.\n </Text>\n );\n } else if (publishing && !starting) {\n body = (\n <View style={styles.block} testID=\"webbuilder-publishing\">\n <PrimaryButton label=\"Publishing…\" onPress={() => undefined} theme={theme} busy />\n <Text style={[styles.note, { color: theme.muted }]}>\n This takes a minute or two. You can keep editing; the address appears here when it is live.\n </Text>\n </View>\n );\n } else {\n body = (\n <View style={styles.block}>\n {live ? (\n <View style={[styles.liveCard, { backgroundColor: theme.goodSoft }]} testID=\"webbuilder-live\">\n <MaterialCommunityIcons name=\"earth\" size={20} color={theme.good} />\n <Text style={[styles.liveHost, { color: theme.good }]} numberOfLines={1}>\n {displayHost(live)}\n </Text>\n </View>\n ) : null}\n {live ? (\n <View style={styles.row}>\n <SecondaryButton\n label=\"Open\"\n icon=\"open-in-new\"\n onPress={() => {\n Linking.openURL(live).catch(() => undefined);\n }}\n theme={theme}\n />\n <SecondaryButton\n label=\"Share\"\n icon=\"share-variant-outline\"\n onPress={() => {\n Share.share({ message: live, url: live }).catch(() => undefined);\n }}\n theme={theme}\n />\n </View>\n ) : null}\n <Text style={[styles.label, { color: theme.muted }]}>\n {live ? 'Publish the latest version' : 'Site address'}\n </Text>\n <View\n style={[\n styles.field,\n { backgroundColor: theme.chip, borderColor: valid ? theme.border : theme.crit },\n ]}\n >\n <TextInput\n value={name}\n onChangeText={(text) =>\n setName(\n text\n .toLowerCase()\n .replace(/[^a-z0-9-]/g, '')\n .slice(0, 58),\n )\n }\n autoCapitalize=\"none\"\n autoCorrect={false}\n placeholder=\"my-site\"\n placeholderTextColor={theme.faint}\n style={[styles.input, { color: theme.ink }]}\n accessibilityLabel=\"Site name\"\n testID=\"webbuilder-publish-name\"\n />\n <Text style={[styles.suffix, { color: theme.muted }]}>.pages.dev</Text>\n </View>\n {!valid && name ? (\n <Text style={[styles.help, { color: theme.crit }]}>\n Letters, numbers and dashes; it cannot start or end with a dash.\n </Text>\n ) : null}\n {error ? <Text style={[styles.help, { color: theme.crit }]}>{error}</Text> : null}\n <PrimaryButton\n label={live ? 'Publish update' : 'Publish'}\n icon=\"rocket-launch-outline\"\n onPress={() => {\n publish().catch(() => undefined);\n }}\n theme={theme}\n busy={starting}\n disabled={!valid || !onPublish}\n testID=\"webbuilder-publish-submit\"\n />\n </View>\n );\n }\n\n return (\n <Sheet visible={visible} title=\"Publish\" onClose={onClose} theme={theme} testID=\"webbuilder-publish-sheet\">\n {body}\n </Sheet>\n );\n}\n\nconst styles = StyleSheet.create({\n block: { gap: 12, paddingTop: 4 },\n row: { flexDirection: 'row', gap: 10 },\n liveCard: { flexDirection: 'row', alignItems: 'center', gap: 10, padding: 14, borderRadius: 12 },\n liveHost: { flex: 1, fontSize: 15, fontWeight: '700' },\n label: { fontSize: 13, fontWeight: '600', marginTop: 4 },\n field: {\n flexDirection: 'row',\n alignItems: 'center',\n borderRadius: 12,\n borderWidth: StyleSheet.hairlineWidth,\n paddingHorizontal: 14,\n minHeight: 48,\n },\n input: { flex: 1, fontSize: 16, paddingVertical: 10 },\n suffix: { fontSize: 15 },\n help: { fontSize: 13 },\n note: { fontSize: 14, lineHeight: 20, paddingVertical: 8 },\n});\n"],"names":[],"mappings":"wVAaO,SAAS,YAAa,CAAA;AAAA,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A,GACnB;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,QAAU,EAAA;AAAA,GACZ;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,EAAA;AAAA,IACZ,eAAiB,EAAA;AAAA;AAErB,CAAC,CAAA"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';import {useState,useEffect}from'react';import {StyleSheet,View,Text,TextInput}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {isValidLookUrl}from'../studioCatalog.js';import {Sheet,PrimaryButton}from'./ui.js';function SiteScoreSheet({
|
|
2
|
+
visible,
|
|
3
|
+
onClose,
|
|
4
|
+
onCheck,
|
|
5
|
+
blocked,
|
|
6
|
+
theme
|
|
7
|
+
}) {
|
|
8
|
+
const [url, setUrl] = useState("");
|
|
9
|
+
const [error, setError] = useState(null);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (visible) setError(null);
|
|
12
|
+
}, [visible]);
|
|
13
|
+
const check = () => {
|
|
14
|
+
const value = /^https?:\/\//i.test(url.trim()) ? url.trim() : `https://${url.trim()}`;
|
|
15
|
+
if (!isValidLookUrl(value)) {
|
|
16
|
+
setError("Enter a full address, like https://example.com.");
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (blocked) {
|
|
20
|
+
setError(blocked);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
onCheck(value);
|
|
24
|
+
setUrl("");
|
|
25
|
+
};
|
|
26
|
+
return /* @__PURE__ */ jsx(Sheet, { visible, title: "Site score", onClose, theme, testID: "webbuilder-score-sheet", children: /* @__PURE__ */ jsxs(View, { style: styles.body, children: [
|
|
27
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.intro, {
|
|
28
|
+
color: theme.muted
|
|
29
|
+
}], children: "Speed, accessibility and SEO as one number, with the fixes that raise it most." }),
|
|
30
|
+
/* @__PURE__ */ jsxs(View, { style: [styles.field, {
|
|
31
|
+
backgroundColor: theme.chip,
|
|
32
|
+
borderColor: error ? theme.crit : "transparent"
|
|
33
|
+
}], children: [
|
|
34
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "web", size: 18, color: theme.muted }),
|
|
35
|
+
/* @__PURE__ */ jsx(TextInput, { value: url, onChangeText: (text) => {
|
|
36
|
+
setUrl(text);
|
|
37
|
+
if (error) setError(null);
|
|
38
|
+
}, onSubmitEditing: check, placeholder: "https://your-site.com", placeholderTextColor: theme.faint, autoCapitalize: "none", autoCorrect: false, keyboardType: "url", autoFocus: true, style: [styles.input, {
|
|
39
|
+
color: theme.ink
|
|
40
|
+
}], accessibilityLabel: "Site address", testID: "webbuilder-score-url" })
|
|
41
|
+
] }),
|
|
42
|
+
error ? /* @__PURE__ */ jsx(Text, { style: [styles.error, {
|
|
43
|
+
color: theme.crit
|
|
44
|
+
}], children: error }) : null,
|
|
45
|
+
/* @__PURE__ */ jsx(PrimaryButton, { label: "Check site", icon: "speedometer", onPress: check, theme, disabled: !url.trim(), testID: "webbuilder-score-check" })
|
|
46
|
+
] }) });
|
|
47
|
+
}
|
|
48
|
+
const styles = StyleSheet.create({
|
|
49
|
+
body: {
|
|
50
|
+
gap: 12,
|
|
51
|
+
paddingTop: 4
|
|
52
|
+
},
|
|
53
|
+
intro: {
|
|
54
|
+
fontSize: 14,
|
|
55
|
+
lineHeight: 20
|
|
56
|
+
},
|
|
57
|
+
field: {
|
|
58
|
+
flexDirection: "row",
|
|
59
|
+
alignItems: "center",
|
|
60
|
+
gap: 8,
|
|
61
|
+
borderRadius: 12,
|
|
62
|
+
borderWidth: 1,
|
|
63
|
+
paddingHorizontal: 12
|
|
64
|
+
},
|
|
65
|
+
input: {
|
|
66
|
+
flex: 1,
|
|
67
|
+
fontSize: 16,
|
|
68
|
+
paddingVertical: 12
|
|
69
|
+
},
|
|
70
|
+
error: {
|
|
71
|
+
fontSize: 13
|
|
72
|
+
}
|
|
73
|
+
});export{SiteScoreSheet};//# sourceMappingURL=SiteScoreSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteScoreSheet.js","sources":["../../../../src/features/webbuilder/components/SiteScoreSheet.tsx"],"sourcesContent":["/**\n * Site score - the web studio's \"Check a site before you share it\": an address\n * in, one score for speed, accessibility and SEO out, with the fixes that would\n * raise it. The agent runs the check and answers in a new project's chat.\n */\nimport React, { useEffect, useState } from 'react';\nimport { StyleSheet, Text, TextInput, View } from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { isValidLookUrl } from '../studioCatalog';\nimport type { WebBuilderTheme } from '../webbuilderTheme';\nimport { PrimaryButton, Sheet } from './ui';\n\nexport function SiteScoreSheet({\n visible,\n onClose,\n onCheck,\n blocked,\n theme,\n}: {\n visible: boolean;\n onClose: () => void;\n onCheck: (url: string) => void;\n /** Why a check cannot start now, or null. */\n blocked: string | null;\n theme: WebBuilderTheme;\n}) {\n const [url, setUrl] = useState('');\n const [error, setError] = useState<string | null>(null);\n useEffect(() => {\n if (visible) setError(null);\n }, [visible]);\n\n const check = () => {\n const value = /^https?:\\/\\//i.test(url.trim()) ? url.trim() : `https://${url.trim()}`;\n if (!isValidLookUrl(value)) {\n setError('Enter a full address, like https://example.com.');\n return;\n }\n if (blocked) {\n setError(blocked);\n return;\n }\n onCheck(value);\n setUrl('');\n };\n\n return (\n <Sheet visible={visible} title=\"Site score\" onClose={onClose} theme={theme} testID=\"webbuilder-score-sheet\">\n <View style={styles.body}>\n <Text style={[styles.intro, { color: theme.muted }]}>\n Speed, accessibility and SEO as one number, with the fixes that raise it most.\n </Text>\n <View\n style={[\n styles.field,\n { backgroundColor: theme.chip, borderColor: error ? theme.crit : 'transparent' },\n ]}\n >\n <MaterialCommunityIcons name=\"web\" size={18} color={theme.muted} />\n <TextInput\n value={url}\n onChangeText={(text) => {\n setUrl(text);\n if (error) setError(null);\n }}\n onSubmitEditing={check}\n placeholder=\"https://your-site.com\"\n placeholderTextColor={theme.faint}\n autoCapitalize=\"none\"\n autoCorrect={false}\n keyboardType=\"url\"\n autoFocus\n style={[styles.input, { color: theme.ink }]}\n accessibilityLabel=\"Site address\"\n testID=\"webbuilder-score-url\"\n />\n </View>\n {error ? <Text style={[styles.error, { color: theme.crit }]}>{error}</Text> : null}\n <PrimaryButton\n label=\"Check site\"\n icon=\"speedometer\"\n onPress={check}\n theme={theme}\n disabled={!url.trim()}\n testID=\"webbuilder-score-check\"\n />\n </View>\n </Sheet>\n );\n}\n\nconst styles = StyleSheet.create({\n body: { gap: 12, paddingTop: 4 },\n intro: { fontSize: 14, lineHeight: 20 },\n field: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n borderRadius: 12,\n borderWidth: 1,\n paddingHorizontal: 12,\n },\n input: { flex: 1, fontSize: 16, paddingVertical: 12 },\n error: { fontSize: 13 },\n});\n"],"names":[],"mappings":"6RAWO,SAAS,cAAe,CAAA;AAAA,EAC7B,OAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAOG,EAAA;AACD,EAAA,MAAM,CAAC,GAAA,EAAK,MAAM,CAAA,GAAI,SAAS,EAAE,CAAA;AACjC,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAI,SAAwB,IAAI,CAAA;AACtD,EAAA,SAAA,CAAU,MAAM;AACd,IAAI,IAAA,OAAA,WAAkB,IAAI,CAAA;AAAA,GAC5B,EAAG,CAAC,OAAO,CAAC,CAAA;AACZ,EAAA,MAAM,QAAQ,MAAM;AAClB,IAAA,MAAM,KAAQ,GAAA,eAAA,CAAgB,IAAK,CAAA,GAAA,CAAI,IAAK,EAAC,CAAI,GAAA,GAAA,CAAI,IAAK,EAAA,GAAI,CAAW,QAAA,EAAA,GAAA,CAAI,MAAM,CAAA,CAAA;AACnF,IAAI,IAAA,C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AA;AAEd,CAAC,CAAA"}
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import {useRef,useState}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,STUDIO_CHIPS,STUDIO_CHIP_GLYPH,STUDIO_STEPS,brandSummary,hostLabel}from'../studioCatalog.js';import {Composer}from'./Composer.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 GUTTER = 16;
|
|
18
|
+
const HERO_PAD = 18;
|
|
19
|
+
function ShapeRow({
|
|
20
|
+
icon,
|
|
21
|
+
tint,
|
|
22
|
+
tintSoft,
|
|
23
|
+
eyebrow,
|
|
24
|
+
title,
|
|
25
|
+
detail,
|
|
26
|
+
onPress,
|
|
27
|
+
theme,
|
|
28
|
+
trailing,
|
|
29
|
+
last = false,
|
|
30
|
+
testID
|
|
31
|
+
}) {
|
|
32
|
+
return /* @__PURE__ */ jsxs(Tap, { onPress, accessibilityRole: "button", accessibilityLabel: `${title}. ${detail}`, style: [styles.shape, !last && {
|
|
33
|
+
borderBottomColor: theme.border,
|
|
34
|
+
borderBottomWidth: StyleSheet.hairlineWidth
|
|
35
|
+
}], pressedStyle: DIM, testID, children: [
|
|
36
|
+
/* @__PURE__ */ jsx(View, { style: [styles.shapeIcon, {
|
|
37
|
+
backgroundColor: tintSoft
|
|
38
|
+
}], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: icon, size: 21, color: tint }) }),
|
|
39
|
+
/* @__PURE__ */ jsxs(View, { style: styles.shapeText, children: [
|
|
40
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.shapeEyebrow, {
|
|
41
|
+
color: tint
|
|
42
|
+
}], children: eyebrow }),
|
|
43
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.shapeTitle, {
|
|
44
|
+
color: theme.ink
|
|
45
|
+
}], numberOfLines: 1, children: title }),
|
|
46
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.shapeDetail, {
|
|
47
|
+
color: theme.muted
|
|
48
|
+
}], numberOfLines: 1, children: detail }),
|
|
49
|
+
trailing
|
|
50
|
+
] }),
|
|
51
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "chevron-right", size: 20, color: theme.faint })
|
|
52
|
+
] });
|
|
53
|
+
}
|
|
54
|
+
function StudioHome({
|
|
55
|
+
draft,
|
|
56
|
+
onDraft,
|
|
57
|
+
template,
|
|
58
|
+
onClearTemplate,
|
|
59
|
+
onBrowseTemplates,
|
|
60
|
+
brand,
|
|
61
|
+
onBrand,
|
|
62
|
+
onSiteScore,
|
|
63
|
+
onStart,
|
|
64
|
+
connecting,
|
|
65
|
+
startNotice,
|
|
66
|
+
theme,
|
|
67
|
+
bottomInset
|
|
68
|
+
}) {
|
|
69
|
+
const inputRef = useRef(null);
|
|
70
|
+
const scrollRef = useRef(null);
|
|
71
|
+
const [lookUrl, setLookUrl] = useState("");
|
|
72
|
+
const [lookOpen, setLookOpen] = useState(false);
|
|
73
|
+
const [notice, setNotice] = useState(null);
|
|
74
|
+
const referenceUrl = isValidLookUrl(lookUrl) ? lookUrl.trim() : void 0;
|
|
75
|
+
const lookInvalid = lookUrl.trim().length > 0 && !referenceUrl;
|
|
76
|
+
const hasBrief = !isBareSeed(draft) || Boolean(template);
|
|
77
|
+
const start = () => {
|
|
78
|
+
var _a;
|
|
79
|
+
setNotice(null);
|
|
80
|
+
if (!hasBrief) {
|
|
81
|
+
setNotice("Say a little more: what is it, and who is it for?");
|
|
82
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (lookInvalid) {
|
|
86
|
+
setNotice("The look-alike site needs a full https address, like https://stripe.com.");
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
onStart(__spreadValues({
|
|
90
|
+
brief: draft.trim(),
|
|
91
|
+
template
|
|
92
|
+
}, referenceUrl ? {
|
|
93
|
+
referenceUrl
|
|
94
|
+
} : {}));
|
|
95
|
+
setLookUrl("");
|
|
96
|
+
setLookOpen(false);
|
|
97
|
+
};
|
|
98
|
+
const shownNotice = notice || startNotice;
|
|
99
|
+
return /* @__PURE__ */ jsxs(ScrollView, { ref: scrollRef, style: styles.fill, contentContainerStyle: [styles.content, {
|
|
100
|
+
paddingBottom: bottomInset + 24
|
|
101
|
+
}], keyboardShouldPersistTaps: "handled", testID: "webbuilder-home", children: [
|
|
102
|
+
/* @__PURE__ */ jsxs(View, { style: [styles.hero, {
|
|
103
|
+
backgroundColor: theme.hero,
|
|
104
|
+
borderColor: theme.accentBorder
|
|
105
|
+
}], children: [
|
|
106
|
+
/* @__PURE__ */ jsxs(View, { style: styles.heroHead, children: [
|
|
107
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.eyebrow, {
|
|
108
|
+
color: theme.accent
|
|
109
|
+
}], children: "WEBSITE STUDIO" }),
|
|
110
|
+
/* @__PURE__ */ jsxs(Text, { style: [styles.title, {
|
|
111
|
+
color: theme.ink
|
|
112
|
+
}], children: [
|
|
113
|
+
"What do you want to ",
|
|
114
|
+
/* @__PURE__ */ jsx(Text, { style: {
|
|
115
|
+
color: theme.accent
|
|
116
|
+
}, children: "build" }),
|
|
117
|
+
" today?"
|
|
118
|
+
] })
|
|
119
|
+
] }),
|
|
120
|
+
/* @__PURE__ */ jsx(Composer, { ref: inputRef, value: draft, onChangeText: (text) => {
|
|
121
|
+
onDraft(text);
|
|
122
|
+
if (notice) setNotice(null);
|
|
123
|
+
}, onSubmit: start, template, onTemplate: onBrowseTemplates, onClearTemplate, lookUrl, onLookUrl: setLookUrl, lookInvalid, lookOpen, onLookOpen: setLookOpen, brand, onBrand, connecting, canSubmit: hasBrief, theme }),
|
|
124
|
+
shownNotice ? /* @__PURE__ */ jsxs(View, { style: [styles.notice, {
|
|
125
|
+
backgroundColor: theme.critSoft
|
|
126
|
+
}], accessibilityLiveRegion: "polite", children: [
|
|
127
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "alert-circle-outline", size: 16, color: theme.crit }),
|
|
128
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.noticeText, {
|
|
129
|
+
color: theme.crit
|
|
130
|
+
}], children: shownNotice })
|
|
131
|
+
] }) : null,
|
|
132
|
+
/* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, keyboardShouldPersistTaps: "handled", style: styles.chipsBleed, contentContainerStyle: styles.chips, children: STUDIO_CHIPS.map((chip) => /* @__PURE__ */ jsxs(Tap, { onPress: () => {
|
|
133
|
+
onDraft(chip.seed);
|
|
134
|
+
setNotice(null);
|
|
135
|
+
setTimeout(() => {
|
|
136
|
+
var _a;
|
|
137
|
+
return (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
138
|
+
}, 50);
|
|
139
|
+
}, accessibilityRole: "button", accessibilityLabel: `Start a ${chip.label.toLowerCase()}`, style: [styles.chip, {
|
|
140
|
+
borderColor: theme.accentBorder,
|
|
141
|
+
backgroundColor: theme.card
|
|
142
|
+
}], pressedStyle: DIM, testID: `webbuilder-chip-${chip.id}`, children: [
|
|
143
|
+
/* @__PURE__ */ jsx(MaterialCommunityIcons, { name: STUDIO_CHIP_GLYPH[chip.icon], size: 15, color: theme.accent }),
|
|
144
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.chipLabel, {
|
|
145
|
+
color: theme.ink
|
|
146
|
+
}], children: chip.label })
|
|
147
|
+
] }, chip.id)) })
|
|
148
|
+
] }),
|
|
149
|
+
/* @__PURE__ */ jsxs(View, { style: styles.section, children: [
|
|
150
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.sectionTitle, {
|
|
151
|
+
color: theme.ink
|
|
152
|
+
}], children: "How it works" }),
|
|
153
|
+
/* @__PURE__ */ jsx(View, { style: [styles.panel, {
|
|
154
|
+
backgroundColor: theme.card,
|
|
155
|
+
borderColor: theme.border
|
|
156
|
+
}], children: STUDIO_STEPS.map((step, index) => /* @__PURE__ */ jsxs(View, { style: styles.step, children: [
|
|
157
|
+
/* @__PURE__ */ jsxs(View, { style: styles.stepRail, children: [
|
|
158
|
+
/* @__PURE__ */ jsx(View, { style: [styles.stepBadge, {
|
|
159
|
+
backgroundColor: theme.accent
|
|
160
|
+
}], children: /* @__PURE__ */ jsx(Text, { style: [styles.stepN, {
|
|
161
|
+
color: theme.accentInk
|
|
162
|
+
}], children: step.n }) }),
|
|
163
|
+
index < STUDIO_STEPS.length - 1 ? /* @__PURE__ */ jsx(View, { style: [styles.stepLine, {
|
|
164
|
+
backgroundColor: theme.accentBorder
|
|
165
|
+
}] }) : null
|
|
166
|
+
] }),
|
|
167
|
+
/* @__PURE__ */ jsxs(View, { style: styles.stepText, children: [
|
|
168
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.stepTitle, {
|
|
169
|
+
color: theme.ink
|
|
170
|
+
}], children: step.title }),
|
|
171
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.stepDetail, {
|
|
172
|
+
color: theme.muted
|
|
173
|
+
}], children: step.detail })
|
|
174
|
+
] })
|
|
175
|
+
] }, step.n)) })
|
|
176
|
+
] }),
|
|
177
|
+
/* @__PURE__ */ jsxs(View, { style: styles.section, children: [
|
|
178
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.sectionTitle, {
|
|
179
|
+
color: theme.ink
|
|
180
|
+
}], children: "Make it yours" }),
|
|
181
|
+
/* @__PURE__ */ jsxs(View, { style: [styles.panel, styles.panelFlush, {
|
|
182
|
+
backgroundColor: theme.card,
|
|
183
|
+
borderColor: theme.border
|
|
184
|
+
}], children: [
|
|
185
|
+
/* @__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) : "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.map((c) => /* @__PURE__ */ jsx(View, { style: [styles.swatch, {
|
|
186
|
+
backgroundColor: c,
|
|
187
|
+
borderColor: theme.border
|
|
188
|
+
}] }, c)) }) : void 0, testID: "webbuilder-brand-card" }),
|
|
189
|
+
/* @__PURE__ */ jsx(ShapeRow, { icon: "web", tint: theme.info, tintSoft: theme.infoSoft, eyebrow: "LOOK LIKE", title: referenceUrl ? hostLabel(referenceUrl) : "A site you love", detail: "Its layout and style, your content", onPress: () => {
|
|
190
|
+
var _a;
|
|
191
|
+
setLookOpen(true);
|
|
192
|
+
(_a = scrollRef.current) == null ? void 0 : _a.scrollTo({
|
|
193
|
+
y: 0,
|
|
194
|
+
animated: true
|
|
195
|
+
});
|
|
196
|
+
}, theme, testID: "webbuilder-look-card" }),
|
|
197
|
+
/* @__PURE__ */ jsx(ShapeRow, { icon: "speedometer", tint: theme.good, tintSoft: theme.goodSoft, eyebrow: "SITE SCORE", title: "Check a site before you share it", detail: "Speed, accessibility, SEO: one number", onPress: onSiteScore, theme, last: true, testID: "webbuilder-score-card" })
|
|
198
|
+
] })
|
|
199
|
+
] })
|
|
200
|
+
] });
|
|
201
|
+
}
|
|
202
|
+
const styles = StyleSheet.create({
|
|
203
|
+
fill: {
|
|
204
|
+
flex: 1
|
|
205
|
+
},
|
|
206
|
+
content: {
|
|
207
|
+
paddingHorizontal: GUTTER,
|
|
208
|
+
paddingTop: 4,
|
|
209
|
+
gap: 24
|
|
210
|
+
},
|
|
211
|
+
hero: {
|
|
212
|
+
borderRadius: 26,
|
|
213
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
214
|
+
paddingTop: 22,
|
|
215
|
+
paddingHorizontal: HERO_PAD,
|
|
216
|
+
paddingBottom: 16,
|
|
217
|
+
gap: 16,
|
|
218
|
+
overflow: "hidden"
|
|
219
|
+
},
|
|
220
|
+
heroHead: {
|
|
221
|
+
gap: 8
|
|
222
|
+
},
|
|
223
|
+
eyebrow: {
|
|
224
|
+
fontSize: 11,
|
|
225
|
+
fontWeight: "800",
|
|
226
|
+
letterSpacing: 1.8
|
|
227
|
+
},
|
|
228
|
+
title: {
|
|
229
|
+
fontSize: 27,
|
|
230
|
+
lineHeight: 32,
|
|
231
|
+
fontWeight: "800",
|
|
232
|
+
letterSpacing: -0.7
|
|
233
|
+
},
|
|
234
|
+
notice: {
|
|
235
|
+
flexDirection: "row",
|
|
236
|
+
alignItems: "flex-start",
|
|
237
|
+
gap: 8,
|
|
238
|
+
borderRadius: 12,
|
|
239
|
+
paddingHorizontal: 12,
|
|
240
|
+
paddingVertical: 10,
|
|
241
|
+
marginTop: -4
|
|
242
|
+
},
|
|
243
|
+
noticeText: {
|
|
244
|
+
flex: 1,
|
|
245
|
+
fontSize: 13,
|
|
246
|
+
lineHeight: 18,
|
|
247
|
+
fontWeight: "500"
|
|
248
|
+
},
|
|
249
|
+
chipsBleed: {
|
|
250
|
+
marginHorizontal: -18
|
|
251
|
+
},
|
|
252
|
+
chips: {
|
|
253
|
+
gap: 8,
|
|
254
|
+
paddingHorizontal: HERO_PAD
|
|
255
|
+
},
|
|
256
|
+
chip: {
|
|
257
|
+
flexDirection: "row",
|
|
258
|
+
alignItems: "center",
|
|
259
|
+
gap: 6,
|
|
260
|
+
height: 38,
|
|
261
|
+
paddingHorizontal: 14,
|
|
262
|
+
borderRadius: 19,
|
|
263
|
+
borderWidth: StyleSheet.hairlineWidth
|
|
264
|
+
},
|
|
265
|
+
chipLabel: {
|
|
266
|
+
fontSize: 14,
|
|
267
|
+
fontWeight: "600"
|
|
268
|
+
},
|
|
269
|
+
section: {
|
|
270
|
+
gap: 10
|
|
271
|
+
},
|
|
272
|
+
sectionTitle: {
|
|
273
|
+
fontSize: 18,
|
|
274
|
+
fontWeight: "700",
|
|
275
|
+
letterSpacing: -0.3,
|
|
276
|
+
paddingHorizontal: 4
|
|
277
|
+
},
|
|
278
|
+
panel: {
|
|
279
|
+
borderRadius: 20,
|
|
280
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
281
|
+
paddingHorizontal: 16,
|
|
282
|
+
paddingTop: 16
|
|
283
|
+
},
|
|
284
|
+
panelFlush: {
|
|
285
|
+
paddingTop: 0
|
|
286
|
+
},
|
|
287
|
+
step: {
|
|
288
|
+
flexDirection: "row",
|
|
289
|
+
gap: 14
|
|
290
|
+
},
|
|
291
|
+
stepRail: {
|
|
292
|
+
alignItems: "center",
|
|
293
|
+
width: 26
|
|
294
|
+
},
|
|
295
|
+
stepBadge: {
|
|
296
|
+
width: 26,
|
|
297
|
+
height: 26,
|
|
298
|
+
borderRadius: 13,
|
|
299
|
+
alignItems: "center",
|
|
300
|
+
justifyContent: "center"
|
|
301
|
+
},
|
|
302
|
+
stepN: {
|
|
303
|
+
fontSize: 13,
|
|
304
|
+
fontWeight: "800"
|
|
305
|
+
},
|
|
306
|
+
stepLine: {
|
|
307
|
+
width: 2,
|
|
308
|
+
flex: 1,
|
|
309
|
+
marginVertical: 4,
|
|
310
|
+
borderRadius: 1
|
|
311
|
+
},
|
|
312
|
+
stepText: {
|
|
313
|
+
flex: 1,
|
|
314
|
+
paddingBottom: 16,
|
|
315
|
+
gap: 2
|
|
316
|
+
},
|
|
317
|
+
stepTitle: {
|
|
318
|
+
fontSize: 15,
|
|
319
|
+
fontWeight: "700",
|
|
320
|
+
lineHeight: 26
|
|
321
|
+
},
|
|
322
|
+
stepDetail: {
|
|
323
|
+
fontSize: 14,
|
|
324
|
+
lineHeight: 19
|
|
325
|
+
},
|
|
326
|
+
shape: {
|
|
327
|
+
flexDirection: "row",
|
|
328
|
+
alignItems: "center",
|
|
329
|
+
gap: 14,
|
|
330
|
+
paddingVertical: 14
|
|
331
|
+
},
|
|
332
|
+
shapeIcon: {
|
|
333
|
+
width: 44,
|
|
334
|
+
height: 44,
|
|
335
|
+
borderRadius: 13,
|
|
336
|
+
alignItems: "center",
|
|
337
|
+
justifyContent: "center"
|
|
338
|
+
},
|
|
339
|
+
shapeText: {
|
|
340
|
+
flex: 1
|
|
341
|
+
},
|
|
342
|
+
shapeEyebrow: {
|
|
343
|
+
fontSize: 10,
|
|
344
|
+
fontWeight: "800",
|
|
345
|
+
letterSpacing: 1.3
|
|
346
|
+
},
|
|
347
|
+
shapeTitle: {
|
|
348
|
+
fontSize: 16,
|
|
349
|
+
fontWeight: "700",
|
|
350
|
+
marginTop: 2
|
|
351
|
+
},
|
|
352
|
+
shapeDetail: {
|
|
353
|
+
fontSize: 13,
|
|
354
|
+
marginTop: 1
|
|
355
|
+
},
|
|
356
|
+
swatches: {
|
|
357
|
+
flexDirection: "row",
|
|
358
|
+
gap: 4,
|
|
359
|
+
marginTop: 6
|
|
360
|
+
},
|
|
361
|
+
swatch: {
|
|
362
|
+
width: 14,
|
|
363
|
+
height: 14,
|
|
364
|
+
borderRadius: 4,
|
|
365
|
+
borderWidth: StyleSheet.hairlineWidth
|
|
366
|
+
}
|
|
367
|
+
});export{StudioHome};//# sourceMappingURL=StudioHome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StudioHome.js","sources":["../../../../src/features/webbuilder/components/StudioHome.tsx"],"sourcesContent":["/**\n * Web Builder home - the web StudioHome on a phone, in the app's colours: the\n * \"Website studio\" hero (the question, the prompt box, the quick starts), how\n * it works, then the three ways to shape a build (Brand kit, A site you love,\n * Site score). Templates open from the prompt box; projects have their own tab.\n */\nimport React, { useRef, useState } from 'react';\nimport { ScrollView, StyleSheet, Text, TextInput, View } from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { DIM, Tap } from '../../inbox/components/Tap';\nimport {\n brandSummary,\n hostLabel,\n isBareSeed,\n isValidLookUrl,\n STUDIO_CHIP_GLYPH,\n STUDIO_CHIPS,\n STUDIO_STEPS,\n type BrandKit,\n} from '../studioCatalog';\nimport type { WebBuilderTemplate } from '../workflow';\nimport type { WebBuilderTheme } from '../webbuilderTheme';\nimport { Composer } from './Composer';\nimport type { IconName } from './ui';\n\nconst GUTTER = 16;\nconst HERO_PAD = 18;\n\nexport interface StudioStart {\n brief: string;\n template: WebBuilderTemplate | null;\n referenceUrl?: string;\n}\n\nfunction ShapeRow({\n icon,\n tint,\n tintSoft,\n eyebrow,\n title,\n detail,\n onPress,\n theme,\n trailing,\n last = false,\n testID,\n}: {\n icon: IconName;\n tint: string;\n tintSoft: string;\n eyebrow: string;\n title: string;\n detail: string;\n onPress: () => void;\n theme: WebBuilderTheme;\n trailing?: React.ReactNode;\n last?: boolean;\n testID?: string;\n}) {\n return (\n <Tap\n onPress={onPress}\n accessibilityRole=\"button\"\n accessibilityLabel={`${title}. ${detail}`}\n style={[\n styles.shape,\n !last && { borderBottomColor: theme.border, borderBottomWidth: StyleSheet.hairlineWidth },\n ]}\n pressedStyle={DIM}\n testID={testID}\n >\n <View style={[styles.shapeIcon, { backgroundColor: tintSoft }]}>\n <MaterialCommunityIcons name={icon} size={21} color={tint} />\n </View>\n <View style={styles.shapeText}>\n <Text style={[styles.shapeEyebrow, { color: tint }]}>{eyebrow}</Text>\n <Text style={[styles.shapeTitle, { color: theme.ink }]} numberOfLines={1}>\n {title}\n </Text>\n <Text style={[styles.shapeDetail, { color: theme.muted }]} numberOfLines={1}>\n {detail}\n </Text>\n {trailing}\n </View>\n <MaterialCommunityIcons name=\"chevron-right\" size={20} color={theme.faint} />\n </Tap>\n );\n}\n\nexport function StudioHome({\n draft,\n onDraft,\n template,\n onClearTemplate,\n onBrowseTemplates,\n brand,\n onBrand,\n onSiteScore,\n onStart,\n connecting,\n startNotice,\n theme,\n bottomInset,\n}: {\n draft: string;\n onDraft: (text: string) => void;\n template: WebBuilderTemplate | null;\n onClearTemplate: () => void;\n onBrowseTemplates: () => void;\n brand: BrandKit | null;\n onBrand: () => void;\n onSiteScore: () => void;\n onStart: (start: StudioStart) => void;\n /** The builder is still connecting, or null. */\n connecting: string | null;\n /** Why the last Start did not go out, or null. */\n startNotice: string | null;\n theme: WebBuilderTheme;\n /** Room for the floating tab bar. */\n bottomInset: number;\n}) {\n const inputRef = useRef<TextInput>(null);\n const scrollRef = useRef<ScrollView>(null);\n const [lookUrl, setLookUrl] = useState('');\n const [lookOpen, setLookOpen] = useState(false);\n const [notice, setNotice] = useState<string | null>(null);\n const referenceUrl = isValidLookUrl(lookUrl) ? lookUrl.trim() : undefined;\n const lookInvalid = lookUrl.trim().length > 0 && !referenceUrl;\n const hasBrief = !isBareSeed(draft) || Boolean(template);\n\n const start = () => {\n setNotice(null);\n if (!hasBrief) {\n setNotice('Say a little more: what is it, and who is it for?');\n inputRef.current?.focus();\n return;\n }\n if (lookInvalid) {\n setNotice('The look-alike site needs a full https address, like https://stripe.com.');\n return;\n }\n onStart({ brief: draft.trim(), template, ...(referenceUrl ? { referenceUrl } : {}) });\n setLookUrl('');\n setLookOpen(false);\n };\n\n const shownNotice = notice || startNotice;\n\n return (\n <ScrollView\n ref={scrollRef}\n style={styles.fill}\n contentContainerStyle={[styles.content, { paddingBottom: bottomInset + 24 }]}\n keyboardShouldPersistTaps=\"handled\"\n testID=\"webbuilder-home\"\n >\n {/* Website studio */}\n <View style={[styles.hero, { backgroundColor: theme.hero, borderColor: theme.accentBorder }]}>\n <View style={styles.heroHead}>\n <Text style={[styles.eyebrow, { color: theme.accent }]}>WEBSITE STUDIO</Text>\n <Text style={[styles.title, { color: theme.ink }]}>\n What do you want to <Text style={{ color: theme.accent }}>build</Text> today?\n </Text>\n </View>\n <Composer\n ref={inputRef}\n value={draft}\n onChangeText={(text) => {\n onDraft(text);\n if (notice) setNotice(null);\n }}\n onSubmit={start}\n template={template}\n onTemplate={onBrowseTemplates}\n onClearTemplate={onClearTemplate}\n lookUrl={lookUrl}\n onLookUrl={setLookUrl}\n lookInvalid={lookInvalid}\n lookOpen={lookOpen}\n onLookOpen={setLookOpen}\n brand={brand}\n onBrand={onBrand}\n connecting={connecting}\n canSubmit={hasBrief}\n theme={theme}\n />\n {shownNotice ? (\n <View style={[styles.notice, { backgroundColor: theme.critSoft }]} accessibilityLiveRegion=\"polite\">\n <MaterialCommunityIcons name=\"alert-circle-outline\" size={16} color={theme.crit} />\n <Text style={[styles.noticeText, { color: theme.crit }]}>{shownNotice}</Text>\n </View>\n ) : null}\n <ScrollView\n horizontal\n showsHorizontalScrollIndicator={false}\n keyboardShouldPersistTaps=\"handled\"\n style={styles.chipsBleed}\n contentContainerStyle={styles.chips}\n >\n {STUDIO_CHIPS.map((chip) => (\n <Tap\n key={chip.id}\n onPress={() => {\n onDraft(chip.seed);\n setNotice(null);\n setTimeout(() => inputRef.current?.focus(), 50);\n }}\n accessibilityRole=\"button\"\n accessibilityLabel={`Start a ${chip.label.toLowerCase()}`}\n style={[styles.chip, { borderColor: theme.accentBorder, backgroundColor: theme.card }]}\n pressedStyle={DIM}\n testID={`webbuilder-chip-${chip.id}`}\n >\n <MaterialCommunityIcons\n name={STUDIO_CHIP_GLYPH[chip.icon] as IconName}\n size={15}\n color={theme.accent}\n />\n <Text style={[styles.chipLabel, { color: theme.ink }]}>{chip.label}</Text>\n </Tap>\n ))}\n </ScrollView>\n </View>\n\n {/* How it works */}\n <View style={styles.section}>\n <Text style={[styles.sectionTitle, { color: theme.ink }]}>How it works</Text>\n <View style={[styles.panel, { backgroundColor: theme.card, borderColor: theme.border }]}>\n {STUDIO_STEPS.map((step, index) => (\n <View key={step.n} style={styles.step}>\n <View style={styles.stepRail}>\n <View style={[styles.stepBadge, { backgroundColor: theme.accent }]}>\n <Text style={[styles.stepN, { color: theme.accentInk }]}>{step.n}</Text>\n </View>\n {index < STUDIO_STEPS.length - 1 ? (\n <View style={[styles.stepLine, { backgroundColor: theme.accentBorder }]} />\n ) : null}\n </View>\n <View style={styles.stepText}>\n <Text style={[styles.stepTitle, { color: theme.ink }]}>{step.title}</Text>\n <Text style={[styles.stepDetail, { color: theme.muted }]}>{step.detail}</Text>\n </View>\n </View>\n ))}\n </View>\n </View>\n\n {/* Shape the build */}\n <View style={styles.section}>\n <Text style={[styles.sectionTitle, { color: theme.ink }]}>Make it yours</Text>\n <View\n style={[\n styles.panel,\n styles.panelFlush,\n { backgroundColor: theme.card, borderColor: theme.border },\n ]}\n >\n <ShapeRow\n icon={brand ? 'palette-swatch-variant' : 'plus'}\n tint={theme.accent}\n tintSoft={theme.accentSoft}\n eyebrow=\"BRAND KIT\"\n title={brand ? brand.name || 'Your brand' : 'Set up your brand'}\n detail={brand ? brandSummary(brand) : 'Colours, fonts and voice for every build'}\n onPress={onBrand}\n theme={theme}\n trailing={\n brand?.colors.length ? (\n <View style={styles.swatches}>\n {brand.colors.map((c) => (\n <View\n key={c}\n style={[styles.swatch, { backgroundColor: c, borderColor: theme.border }]}\n />\n ))}\n </View>\n ) : undefined\n }\n testID=\"webbuilder-brand-card\"\n />\n <ShapeRow\n icon=\"web\"\n tint={theme.info}\n tintSoft={theme.infoSoft}\n eyebrow=\"LOOK LIKE\"\n title={referenceUrl ? hostLabel(referenceUrl) : 'A site you love'}\n detail=\"Its layout and style, your content\"\n onPress={() => {\n setLookOpen(true);\n scrollRef.current?.scrollTo({ y: 0, animated: true });\n }}\n theme={theme}\n testID=\"webbuilder-look-card\"\n />\n <ShapeRow\n icon=\"speedometer\"\n tint={theme.good}\n tintSoft={theme.goodSoft}\n eyebrow=\"SITE SCORE\"\n title=\"Check a site before you share it\"\n detail=\"Speed, accessibility, SEO: one number\"\n onPress={onSiteScore}\n theme={theme}\n last\n testID=\"webbuilder-score-card\"\n />\n </View>\n </View>\n </ScrollView>\n );\n}\n\nconst styles = StyleSheet.create({\n fill: { flex: 1 },\n content: { paddingHorizontal: GUTTER, paddingTop: 4, gap: 24 },\n hero: {\n borderRadius: 26,\n borderWidth: StyleSheet.hairlineWidth,\n paddingTop: 22,\n paddingHorizontal: HERO_PAD,\n paddingBottom: 16,\n gap: 16,\n overflow: 'hidden',\n },\n heroHead: { gap: 8 },\n eyebrow: { fontSize: 11, fontWeight: '800', letterSpacing: 1.8 },\n title: { fontSize: 27, lineHeight: 32, fontWeight: '800', letterSpacing: -0.7 },\n notice: {\n flexDirection: 'row',\n alignItems: 'flex-start',\n gap: 8,\n borderRadius: 12,\n paddingHorizontal: 12,\n paddingVertical: 10,\n marginTop: -4,\n },\n noticeText: { flex: 1, fontSize: 13, lineHeight: 18, fontWeight: '500' },\n chipsBleed: { marginHorizontal: -HERO_PAD },\n chips: { gap: 8, paddingHorizontal: HERO_PAD },\n chip: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 6,\n height: 38,\n paddingHorizontal: 14,\n borderRadius: 19,\n borderWidth: StyleSheet.hairlineWidth,\n },\n chipLabel: { fontSize: 14, fontWeight: '600' },\n section: { gap: 10 },\n sectionTitle: { fontSize: 18, fontWeight: '700', letterSpacing: -0.3, paddingHorizontal: 4 },\n panel: { borderRadius: 20, borderWidth: StyleSheet.hairlineWidth, paddingHorizontal: 16, paddingTop: 16 },\n panelFlush: { paddingTop: 0 },\n step: { flexDirection: 'row', gap: 14 },\n stepRail: { alignItems: 'center', width: 26 },\n stepBadge: { width: 26, height: 26, borderRadius: 13, alignItems: 'center', justifyContent: 'center' },\n stepN: { fontSize: 13, fontWeight: '800' },\n stepLine: { width: 2, flex: 1, marginVertical: 4, borderRadius: 1 },\n stepText: { flex: 1, paddingBottom: 16, gap: 2 },\n stepTitle: { fontSize: 15, fontWeight: '700', lineHeight: 26 },\n stepDetail: { fontSize: 14, lineHeight: 19 },\n shape: { flexDirection: 'row', alignItems: 'center', gap: 14, paddingVertical: 14 },\n shapeIcon: { width: 44, height: 44, borderRadius: 13, alignItems: 'center', justifyContent: 'center' },\n shapeText: { flex: 1 },\n shapeEyebrow: { fontSize: 10, fontWeight: '800', letterSpacing: 1.3 },\n shapeTitle: { fontSize: 16, fontWeight: '700', marginTop: 2 },\n shapeDetail: { fontSize: 13, marginTop: 1 },\n swatches: { flexDirection: 'row', gap: 4, marginTop: 6 },\n swatch: { width: 14, height: 14, borderRadius: 4, borderWidth: StyleSheet.hairlineWidth },\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAeA,MAAM,MAAS,GAAA,EAAA;AACf,MAAM,QAAW,GAAA,EAAA;AAMjB,SAAS,QAAS,CAAA;AAAA,EAChB,IAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAO,GAAA,KAAA;AAAA,EACP;AACF,CAYG,EAAA;AACD,EAAA,4BAAQ,GAAI,EAAA,EAAA,OAAA,EAAkB,iBAAkB,EAAA,QAAA,EAAS,oBAAoB,CAAG,EAAA,KAAK,CAAK,EAAA,EAAA,MAAM,IAAI,KAAO,EAAA,CAAC,MAAO,CAAA,KAAA,EAAO,CAAC,IAAQ,IAAA;AAAA,IACjI,mBAAmB,KAAM,CAAA,MAAA;AAAA,IACzB,mBAAmB,UAAW,CAAA;AAAA,GAC/B,CAAA,EAAG,YAAc,EAAA,GAAA,EAAK,MACb,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,IAAK,EAAA,EAA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ACV,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA;AAAA,GACd;AAAA,EACA,KAAO,EAAA;AAAA,IACL,aAAe,EAAA,KAAA;AAAA,IACf,UAAY,EAAA,QAAA;AAAA,IACZ,GAAK,EAAA,EAAA;AAAA,IACL,eAAiB,EAAA;AAAA,GACnB;AAAA,EACA,SAAW,EAAA;AAAA,IACT,KAAO,EAAA,EAAA;AAAA,IACP,MAAQ,EAAA,EAAA;AAAA,IACR,YAAc,EAAA,EAAA;AAAA,IACd,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA;AAAA,GAClB;AAAA,EACA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA;AAAA,GACR;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,KAAA;AAAA,IACZ,aAAe,EAAA;AAAA,GACjB;AAAA,EACA,UAAY,EAAA;AAAA,IACV,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,KAAA;AAAA,IACZ,SAAW,EAAA;AAAA,GACb;AAAA,EACA,WAAa,EAAA;AAAA,IACX,QAAU,EAAA,EAAA;AAAA,IACV,SAAW,EAAA;AAAA,GACb;AAAA,EACA,QAAU,EAAA;AAAA,IACR,aAAe,EAAA,KAAA;AAAA,IACf,GAAK,EAAA,CAAA;AAAA,IACL,SAAW,EAAA;AAAA,GACb;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,KAAO,EAAA,EAAA;AAAA,IACP,MAAQ,EAAA,EAAA;AAAA,IACR,YAAc,EAAA,CAAA;AAAA,IACd,aAAa,UAAW,CAAA;AAAA;AAE5B,CAAC,CAAA"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';import {useState}from'react';import {StyleSheet,View,Image,Text}from'react-native';import {MaterialCommunityIcons}from'@expo/vector-icons';import {Tap,DIM}from'../../inbox/components/Tap.js';function TemplateCover({
|
|
2
|
+
uri,
|
|
3
|
+
theme,
|
|
4
|
+
style
|
|
5
|
+
}) {
|
|
6
|
+
const [failed, setFailed] = useState(false);
|
|
7
|
+
return /* @__PURE__ */ jsx(View, { style: [styles.cover, {
|
|
8
|
+
backgroundColor: theme.chip
|
|
9
|
+
}, style], children: uri && !failed ? /* @__PURE__ */ jsx(Image, { source: {
|
|
10
|
+
uri
|
|
11
|
+
}, style: StyleSheet.absoluteFill, resizeMode: "cover", onError: () => setFailed(true), accessibilityIgnoresInvertColors: true }) : /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "page-layout-body", size: 26, color: theme.faint }) });
|
|
12
|
+
}
|
|
13
|
+
function TemplateCard({
|
|
14
|
+
template,
|
|
15
|
+
onPress,
|
|
16
|
+
theme,
|
|
17
|
+
width,
|
|
18
|
+
selected = false
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ jsxs(Tap, { onPress, accessibilityRole: "button", accessibilityState: {
|
|
21
|
+
selected
|
|
22
|
+
}, accessibilityLabel: `Use template ${template.title}`, style: [styles.card, {
|
|
23
|
+
width
|
|
24
|
+
}], pressedStyle: DIM, testID: `webbuilder-template-${template.id}`, children: [
|
|
25
|
+
/* @__PURE__ */ jsxs(View, { style: [styles.frame, {
|
|
26
|
+
borderColor: selected ? theme.accent : theme.border
|
|
27
|
+
}], children: [
|
|
28
|
+
/* @__PURE__ */ jsx(TemplateCover, { uri: template.cover, theme }),
|
|
29
|
+
selected ? /* @__PURE__ */ jsx(View, { style: [styles.check, {
|
|
30
|
+
backgroundColor: theme.accent
|
|
31
|
+
}], children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "check", size: 14, color: theme.accentInk }) }) : null
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.title, {
|
|
34
|
+
color: theme.ink
|
|
35
|
+
}], numberOfLines: 1, children: template.title }),
|
|
36
|
+
template.category ? /* @__PURE__ */ jsx(Text, { style: [styles.meta, {
|
|
37
|
+
color: theme.muted
|
|
38
|
+
}], numberOfLines: 1, children: template.category }) : null
|
|
39
|
+
] });
|
|
40
|
+
}
|
|
41
|
+
const styles = StyleSheet.create({
|
|
42
|
+
card: {
|
|
43
|
+
gap: 4
|
|
44
|
+
},
|
|
45
|
+
frame: {
|
|
46
|
+
borderRadius: 14,
|
|
47
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
48
|
+
overflow: "hidden",
|
|
49
|
+
marginBottom: 6
|
|
50
|
+
},
|
|
51
|
+
cover: {
|
|
52
|
+
aspectRatio: 16 / 10,
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
justifyContent: "center"
|
|
55
|
+
},
|
|
56
|
+
check: {
|
|
57
|
+
position: "absolute",
|
|
58
|
+
top: 8,
|
|
59
|
+
right: 8,
|
|
60
|
+
width: 22,
|
|
61
|
+
height: 22,
|
|
62
|
+
borderRadius: 11,
|
|
63
|
+
alignItems: "center",
|
|
64
|
+
justifyContent: "center"
|
|
65
|
+
},
|
|
66
|
+
title: {
|
|
67
|
+
fontSize: 14,
|
|
68
|
+
fontWeight: "600"
|
|
69
|
+
},
|
|
70
|
+
meta: {
|
|
71
|
+
fontSize: 12
|
|
72
|
+
}
|
|
73
|
+
});export{TemplateCard,TemplateCover};//# sourceMappingURL=TemplateCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TemplateCard.js","sources":["../../../../src/features/webbuilder/components/TemplateCard.tsx"],"sourcesContent":["/**\n * One starter template: its cover, name and category - the web StudioSidebar\n * card. Tapping it hands the template to the composer (the web \"Use template\").\n */\nimport React, { useState } from 'react';\nimport { Image, StyleSheet, Text, View, type StyleProp, type ViewStyle } from 'react-native';\nimport { MaterialCommunityIcons } from '@expo/vector-icons';\nimport { DIM, Tap } from '../../inbox/components/Tap';\nimport type { WebBuilderTemplate } from '../workflow';\nimport type { WebBuilderTheme } from '../webbuilderTheme';\n\nexport function TemplateCover({\n uri,\n theme,\n style,\n}: {\n uri?: string | null;\n theme: WebBuilderTheme;\n style?: StyleProp<ViewStyle>;\n}) {\n const [failed, setFailed] = useState(false);\n return (\n <View style={[styles.cover, { backgroundColor: theme.chip }, style]}>\n {uri && !failed ? (\n <Image\n source={{ uri }}\n style={StyleSheet.absoluteFill}\n resizeMode=\"cover\"\n onError={() => setFailed(true)}\n accessibilityIgnoresInvertColors\n />\n ) : (\n <MaterialCommunityIcons name=\"page-layout-body\" size={26} color={theme.faint} />\n )}\n </View>\n );\n}\n\nexport function TemplateCard({\n template,\n onPress,\n theme,\n width,\n selected = false,\n}: {\n template: WebBuilderTemplate;\n onPress: () => void;\n theme: WebBuilderTheme;\n width: number;\n selected?: boolean;\n}) {\n return (\n <Tap\n onPress={onPress}\n accessibilityRole=\"button\"\n accessibilityState={{ selected }}\n accessibilityLabel={`Use template ${template.title}`}\n style={[styles.card, { width }]}\n pressedStyle={DIM}\n testID={`webbuilder-template-${template.id}`}\n >\n <View style={[styles.frame, { borderColor: selected ? theme.accent : theme.border }]}>\n <TemplateCover uri={template.cover} theme={theme} />\n {selected ? (\n <View style={[styles.check, { backgroundColor: theme.accent }]}>\n <MaterialCommunityIcons name=\"check\" size={14} color={theme.accentInk} />\n </View>\n ) : null}\n </View>\n <Text style={[styles.title, { color: theme.ink }]} numberOfLines={1}>\n {template.title}\n </Text>\n {template.category ? (\n <Text style={[styles.meta, { color: theme.muted }]} numberOfLines={1}>\n {template.category}\n </Text>\n ) : null}\n </Tap>\n );\n}\n\nconst styles = StyleSheet.create({\n card: { gap: 4 },\n frame: { borderRadius: 14, borderWidth: StyleSheet.hairlineWidth, overflow: 'hidden', marginBottom: 6 },\n cover: { aspectRatio: 16 / 10, alignItems: 'center', justifyContent: 'center' },\n check: {\n position: 'absolute',\n top: 8,\n right: 8,\n width: 22,\n height: 22,\n borderRadius: 11,\n alignItems: 'center',\n justifyContent: 'center',\n },\n title: { fontSize: 14, fontWeight: '600' },\n meta: { fontSize: 12 },\n});\n"],"names":[],"mappings":"wOAUO,SAAS,aAAc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