@adminide-stack/yantra-mobile 12.0.108 → 12.0.109-alpha.0
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,147 @@
|
|
|
1
|
+
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 STUDIO_CHIPS = [{
|
|
18
|
+
id: "landing",
|
|
19
|
+
label: "Landing page",
|
|
20
|
+
icon: "landing",
|
|
21
|
+
seed: "A landing page for "
|
|
22
|
+
}, {
|
|
23
|
+
id: "store",
|
|
24
|
+
label: "Online store",
|
|
25
|
+
icon: "store",
|
|
26
|
+
seed: "An online store that sells "
|
|
27
|
+
}, {
|
|
28
|
+
id: "portfolio",
|
|
29
|
+
label: "Portfolio",
|
|
30
|
+
icon: "portfolio",
|
|
31
|
+
seed: "A portfolio site for "
|
|
32
|
+
}, {
|
|
33
|
+
id: "booking",
|
|
34
|
+
label: "Booking app",
|
|
35
|
+
icon: "booking",
|
|
36
|
+
seed: "A booking app where customers can book "
|
|
37
|
+
}, {
|
|
38
|
+
id: "dashboard",
|
|
39
|
+
label: "Dashboard",
|
|
40
|
+
icon: "dashboard",
|
|
41
|
+
seed: "A dashboard that tracks "
|
|
42
|
+
}, {
|
|
43
|
+
id: "blog",
|
|
44
|
+
label: "Blog",
|
|
45
|
+
icon: "blog",
|
|
46
|
+
seed: "A blog about "
|
|
47
|
+
}];
|
|
48
|
+
const STUDIO_CHIP_GLYPH = {
|
|
49
|
+
landing: "page-layout-header",
|
|
50
|
+
store: "shopping-outline",
|
|
51
|
+
portfolio: "briefcase-outline",
|
|
52
|
+
booking: "calendar-check-outline",
|
|
53
|
+
dashboard: "chart-bar",
|
|
54
|
+
blog: "newspaper-variant-outline"
|
|
55
|
+
};
|
|
56
|
+
const STUDIO_STEPS = [{
|
|
57
|
+
n: 1,
|
|
58
|
+
title: "Describe",
|
|
59
|
+
detail: "What it is and who it is for"
|
|
60
|
+
}, {
|
|
61
|
+
n: 2,
|
|
62
|
+
title: "Pick a look",
|
|
63
|
+
detail: "Your brand kit or a site you like"
|
|
64
|
+
}, {
|
|
65
|
+
n: 3,
|
|
66
|
+
title: "Build",
|
|
67
|
+
detail: "Ask the agent for any change"
|
|
68
|
+
}, {
|
|
69
|
+
n: 4,
|
|
70
|
+
title: "Check & publish",
|
|
71
|
+
detail: "Site score, then live in one tap"
|
|
72
|
+
}];
|
|
73
|
+
const STUDIO_BRIEF_MAX = 4e3;
|
|
74
|
+
function isBareSeed(text) {
|
|
75
|
+
const t = text.trim();
|
|
76
|
+
if (!t) return true;
|
|
77
|
+
return STUDIO_CHIPS.some((c) => c.seed.trim() === t);
|
|
78
|
+
}
|
|
79
|
+
function isValidLookUrl(value) {
|
|
80
|
+
return /^https:\/\/[^\s/$.?#][^\s]*\.[^\s]{2,}$/i.test(value.trim());
|
|
81
|
+
}
|
|
82
|
+
function hostLabel(url) {
|
|
83
|
+
const match = /^https?:\/\/([^/?#]+)/i.exec((url != null ? url : "").trim());
|
|
84
|
+
return match ? match[1].replace(/^www\./, "") : (url != null ? url : "").trim();
|
|
85
|
+
}
|
|
86
|
+
const BRAND_MAX_COLORS = 6;
|
|
87
|
+
const BRAND_MAX_FONTS = 3;
|
|
88
|
+
const clip = (s, n) => s.length > n ? s.slice(0, n) : s;
|
|
89
|
+
const oneLine = (value, max) => clip(String(value != null ? value : "").replace(/\s+/g, " ").trim(), max);
|
|
90
|
+
function normalizeHex(raw) {
|
|
91
|
+
const value = String(raw != null ? raw : "").trim().replace(/^#/, "").toLowerCase();
|
|
92
|
+
if (/^[0-9a-f]{6}$/.test(value)) return `#${value}`;
|
|
93
|
+
if (/^[0-9a-f]{3}$/.test(value)) return `#${value.replace(/(.)/g, "$1$1")}`;
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
function sanitizeBrandKit(raw) {
|
|
97
|
+
if (!raw || typeof raw !== "object") return null;
|
|
98
|
+
const r = raw;
|
|
99
|
+
const name = oneLine(r.name, 80);
|
|
100
|
+
const colors = Array.from(new Set((Array.isArray(r.colors) ? r.colors : []).map(normalizeHex).filter((c) => Boolean(c)))).slice(0, BRAND_MAX_COLORS);
|
|
101
|
+
const fonts = Array.from(new Set((Array.isArray(r.fonts) ? r.fonts : []).map((f) => clip(String(f != null ? f : "").replace(/["'<>;{}]/g, "").trim(), 60)).filter(Boolean))).slice(0, BRAND_MAX_FONTS);
|
|
102
|
+
if (!name && !colors.length) return null;
|
|
103
|
+
const voice = oneLine(r.voice, 120);
|
|
104
|
+
const description = oneLine(r.description, 240);
|
|
105
|
+
return __spreadValues(__spreadValues(__spreadValues({
|
|
106
|
+
name,
|
|
107
|
+
colors,
|
|
108
|
+
fonts
|
|
109
|
+
}, voice ? {
|
|
110
|
+
voice
|
|
111
|
+
} : {}), description ? {
|
|
112
|
+
description
|
|
113
|
+
} : {}), typeof r.updatedAt === "string" ? {
|
|
114
|
+
updatedAt: r.updatedAt
|
|
115
|
+
} : {});
|
|
116
|
+
}
|
|
117
|
+
function brandSummary(kit) {
|
|
118
|
+
const parts = [`${kit.colors.length} colour${kit.colors.length === 1 ? "" : "s"}`];
|
|
119
|
+
if (kit.fonts.length) parts.push(kit.fonts[0]);
|
|
120
|
+
if (kit.voice) parts.push(kit.voice);
|
|
121
|
+
return parts.join(" \xB7 ");
|
|
122
|
+
}
|
|
123
|
+
function brandBriefBlock(kit) {
|
|
124
|
+
if (!kit) return null;
|
|
125
|
+
const lines = ["Brand kit (follow it):"];
|
|
126
|
+
if (kit.name) lines.push(`- Brand name: ${kit.name}`);
|
|
127
|
+
if (kit.description) lines.push(`- About: ${kit.description}`);
|
|
128
|
+
if (kit.colors.length) {
|
|
129
|
+
const [primary, ...rest] = kit.colors;
|
|
130
|
+
lines.push(`- Colours: primary ${primary}${rest.length ? `; also ${rest.join(", ")}` : ""}`);
|
|
131
|
+
}
|
|
132
|
+
if (kit.fonts.length) lines.push(`- Fonts: ${kit.fonts.join(", ")}`);
|
|
133
|
+
if (kit.voice) lines.push(`- Voice: ${kit.voice}`);
|
|
134
|
+
return lines.length > 1 ? lines.join("\n") : null;
|
|
135
|
+
}
|
|
136
|
+
function studioTurnText(opts) {
|
|
137
|
+
const brief = opts.brief.trim();
|
|
138
|
+
const parts = [/^build\b/i.test(brief) ? brief : `Build me: ${brief}`];
|
|
139
|
+
if (opts.brandBlock) parts.push(opts.brandBlock);
|
|
140
|
+
if (opts.referenceUrl) {
|
|
141
|
+
parts.push(`Make it look and feel like ${opts.referenceUrl} (layout, colours, type - not its content).`);
|
|
142
|
+
}
|
|
143
|
+
return parts.join("\n\n").slice(0, STUDIO_BRIEF_MAX);
|
|
144
|
+
}
|
|
145
|
+
function siteScoreTurn(url) {
|
|
146
|
+
return `Check ${url.trim()} before I share it: score its speed, accessibility and SEO as one number out of 100, then list the fixes that would raise it most.`;
|
|
147
|
+
}export{BRAND_MAX_COLORS,BRAND_MAX_FONTS,STUDIO_BRIEF_MAX,STUDIO_CHIPS,STUDIO_CHIP_GLYPH,STUDIO_STEPS,brandBriefBlock,brandSummary,hostLabel,isBareSeed,isValidLookUrl,normalizeHex,sanitizeBrandKit,siteScoreTurn,studioTurnText};//# sourceMappingURL=studioCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"studioCatalog.js","sources":["../../../src/features/webbuilder/studioCatalog.ts"],"sourcesContent":["/**\n * The studio home's content and the text a studio Start sends - the native\n * twin of the web surface's `studio/studioCatalog.ts` and `studio/brandKit.ts`\n * (same chips and seeds, same steps, same `Build me:` turn and brand block),\n * so a site started on the phone is briefed exactly like one started on the\n * web. Pure: the screens and jest both use it.\n */\n\nexport type StudioChipIcon = 'landing' | 'store' | 'portfolio' | 'booking' | 'dashboard' | 'blog';\n\nexport interface StudioChip {\n id: string;\n label: string;\n icon: StudioChipIcon;\n /** Brief scaffold put in the hero input; the person finishes the sentence. */\n seed: string;\n}\n\nexport const STUDIO_CHIPS: readonly StudioChip[] = [\n { id: 'landing', label: 'Landing page', icon: 'landing', seed: 'A landing page for ' },\n { id: 'store', label: 'Online store', icon: 'store', seed: 'An online store that sells ' },\n { id: 'portfolio', label: 'Portfolio', icon: 'portfolio', seed: 'A portfolio site for ' },\n { id: 'booking', label: 'Booking app', icon: 'booking', seed: 'A booking app where customers can book ' },\n { id: 'dashboard', label: 'Dashboard', icon: 'dashboard', seed: 'A dashboard that tracks ' },\n { id: 'blog', label: 'Blog', icon: 'blog', seed: 'A blog about ' },\n];\n\n/** The chip glyphs (MaterialCommunityIcons) closest to the web's lucide icons. */\nexport const STUDIO_CHIP_GLYPH: Record<StudioChipIcon, string> = {\n landing: 'page-layout-header',\n store: 'shopping-outline',\n portfolio: 'briefcase-outline',\n booking: 'calendar-check-outline',\n dashboard: 'chart-bar',\n blog: 'newspaper-variant-outline',\n};\n\nexport interface StudioStep {\n n: number;\n title: string;\n detail: string;\n}\n\nexport const STUDIO_STEPS: readonly StudioStep[] = [\n { n: 1, title: 'Describe', detail: 'What it is and who it is for' },\n { n: 2, title: 'Pick a look', detail: 'Your brand kit or a site you like' },\n { n: 3, title: 'Build', detail: 'Ask the agent for any change' },\n { n: 4, title: 'Check & publish', detail: 'Site score, then live in one tap' },\n];\n\nexport const STUDIO_BRIEF_MAX = 4000;\n\n/** True when the input is still only a chip seed (nothing the person typed). */\nexport function isBareSeed(text: string): boolean {\n const t = text.trim();\n if (!t) return true;\n return STUDIO_CHIPS.some((c) => c.seed.trim() === t);\n}\n\n/** A look-alike site must be a full https address. */\nexport function isValidLookUrl(value: string): boolean {\n return /^https:\\/\\/[^\\s/$.?#][^\\s]*\\.[^\\s]{2,}$/i.test(value.trim());\n}\n\n/** \"stripe.com\" from a URL, for chips and card subtitles. */\nexport function hostLabel(url: string | null | undefined): string {\n const match = /^https?:\\/\\/([^/?#]+)/i.exec((url ?? '').trim());\n return match ? match[1].replace(/^www\\./, '') : (url ?? '').trim();\n}\n\n// ── Brand kit ──────────────────────────────────────────────────────────────\n\nexport interface BrandKit {\n name: string;\n /** #rrggbb, primary first. */\n colors: string[];\n fonts: string[];\n /** Tone of voice, e.g. \"friendly, plain-spoken\". */\n voice?: string;\n description?: string;\n updatedAt?: string;\n}\n\nexport const BRAND_MAX_COLORS = 6;\nexport const BRAND_MAX_FONTS = 3;\n\nconst clip = (s: string, n: number) => (s.length > n ? s.slice(0, n) : s);\nconst oneLine = (value: unknown, max: number) =>\n clip(\n String(value ?? '')\n .replace(/\\s+/g, ' ')\n .trim(),\n max,\n );\n\n/** `#abc` / `abc` / `#AABBCC` -> `#aabbcc`; anything else -> null. */\nexport function normalizeHex(raw: unknown): string | null {\n const value = String(raw ?? '')\n .trim()\n .replace(/^#/, '')\n .toLowerCase();\n if (/^[0-9a-f]{6}$/.test(value)) return `#${value}`;\n if (/^[0-9a-f]{3}$/.test(value)) return `#${value.replace(/(.)/g, '$1$1')}`;\n return null;\n}\n\n/** A kit worth keeping (a name or a colour), with every field cleaned - or null. */\nexport function sanitizeBrandKit(raw: unknown): BrandKit | null {\n if (!raw || typeof raw !== 'object') return null;\n const r = raw as Record<string, unknown>;\n const name = oneLine(r.name, 80);\n const colors = Array.from(\n new Set((Array.isArray(r.colors) ? r.colors : []).map(normalizeHex).filter((c): c is string => Boolean(c))),\n ).slice(0, BRAND_MAX_COLORS);\n const fonts = Array.from(\n new Set(\n (Array.isArray(r.fonts) ? r.fonts : [])\n .map((f) =>\n clip(\n String(f ?? '')\n .replace(/[\"'<>;{}]/g, '')\n .trim(),\n 60,\n ),\n )\n .filter(Boolean),\n ),\n ).slice(0, BRAND_MAX_FONTS);\n if (!name && !colors.length) return null;\n const voice = oneLine(r.voice, 120);\n const description = oneLine(r.description, 240);\n return {\n name,\n colors,\n fonts,\n ...(voice ? { voice } : {}),\n ...(description ? { description } : {}),\n ...(typeof r.updatedAt === 'string' ? { updatedAt: r.updatedAt } : {}),\n };\n}\n\n/** \"3 colours · Inter · friendly\" for the home card. */\nexport function brandSummary(kit: BrandKit): string {\n const parts = [`${kit.colors.length} colour${kit.colors.length === 1 ? '' : 's'}`];\n if (kit.fonts.length) parts.push(kit.fonts[0]);\n if (kit.voice) parts.push(kit.voice);\n return parts.join(' · ');\n}\n\n/** The block added to a new build's brief - the web `brandBriefBlock`. */\nexport function brandBriefBlock(kit: BrandKit | null | undefined): string | null {\n if (!kit) return null;\n const lines = ['Brand kit (follow it):'];\n if (kit.name) lines.push(`- Brand name: ${kit.name}`);\n if (kit.description) lines.push(`- About: ${kit.description}`);\n if (kit.colors.length) {\n const [primary, ...rest] = kit.colors;\n lines.push(`- Colours: primary ${primary}${rest.length ? `; also ${rest.join(', ')}` : ''}`);\n }\n if (kit.fonts.length) lines.push(`- Fonts: ${kit.fonts.join(', ')}`);\n if (kit.voice) lines.push(`- Voice: ${kit.voice}`);\n return lines.length > 1 ? lines.join('\\n') : null;\n}\n\n/**\n * The turn text for a studio Start: the brief, then the brand block, then the\n * look-alike site - the web `studioTurnText`.\n */\nexport function studioTurnText(opts: {\n brief: string;\n brandBlock?: string | null;\n referenceUrl?: string | null;\n}): string {\n const brief = opts.brief.trim();\n const parts = [/^build\\b/i.test(brief) ? brief : `Build me: ${brief}`];\n if (opts.brandBlock) parts.push(opts.brandBlock);\n if (opts.referenceUrl) {\n parts.push(`Make it look and feel like ${opts.referenceUrl} (layout, colours, type - not its content).`);\n }\n return parts.join('\\n\\n').slice(0, STUDIO_BRIEF_MAX);\n}\n\n/** The ask a Site score sends the agent: the web card's promise, one score for speed, accessibility and SEO. */\nexport function siteScoreTurn(url: string): string {\n return `Check ${url.trim()} before I share it: score its speed, accessibility and SEO as one number out of 100, then list the fixes that would raise it most.`;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgBO,MAAM,eAAsC,CAAC;AAAA,EAClD,EAAI,EAAA,SAAA;AAAA,EACJ,KAAO,EAAA,cAAA;AAAA,EACP,IAAM,EAAA,SAAA;AAAA,EACN,IAAM,EAAA;AACR,CAAG,EAAA;AAAA,EACD,EAAI,EAAA,OAAA;AAAA,EACJ,KAAO,EAAA,cAAA;AAAA,EACP,IAAM,EAAA,OAAA;AAAA,EACN,IAAM,EAAA;AACR,CAAG,EAAA;AAAA,EACD,EAAI,EAAA,WAAA;AAAA,EACJ,KAAO,EAAA,WAAA;AAAA,EACP,IAAM,EAAA,WAAA;AAAA,EACN,IAAM,EAAA;AACR,CAAG,EAAA;AAAA,EACD,EAAI,EAAA,SAAA;AAAA,EACJ,KAAO,EAAA,aAAA;AAAA,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42 @@
|
|
|
1
|
+
function webbuilderAgentSuggestions(hasBuild, siteTitle) {
|
|
2
|
+
if (!hasBuild) {
|
|
3
|
+
return [{
|
|
4
|
+
id: "landing",
|
|
5
|
+
label: "Landing page",
|
|
6
|
+
prompt: "A landing page with a hero, features, pricing and a sign-up form."
|
|
7
|
+
}, {
|
|
8
|
+
id: "store",
|
|
9
|
+
label: "Online store",
|
|
10
|
+
prompt: "An online store with a product grid, product pages and a cart."
|
|
11
|
+
}, {
|
|
12
|
+
id: "portfolio",
|
|
13
|
+
label: "Portfolio",
|
|
14
|
+
prompt: "A portfolio with an about section, selected work and a contact form."
|
|
15
|
+
}];
|
|
16
|
+
}
|
|
17
|
+
const name = siteTitle ? ` on ${siteTitle}` : "";
|
|
18
|
+
return [{
|
|
19
|
+
id: "mobile",
|
|
20
|
+
label: "Make it great on phones",
|
|
21
|
+
prompt: `Make every page${name} look great on phones.`
|
|
22
|
+
}, {
|
|
23
|
+
id: "colors",
|
|
24
|
+
label: "New color scheme",
|
|
25
|
+
prompt: "Give the site a fresh, modern color scheme."
|
|
26
|
+
}, {
|
|
27
|
+
id: "section",
|
|
28
|
+
label: "Add a section",
|
|
29
|
+
prompt: "Add a testimonials section above the footer."
|
|
30
|
+
}, {
|
|
31
|
+
id: "fix",
|
|
32
|
+
label: "Fix what is broken",
|
|
33
|
+
prompt: "Check the site for errors and fix anything broken."
|
|
34
|
+
}];
|
|
35
|
+
}
|
|
36
|
+
function wakePreviewPrompt(build) {
|
|
37
|
+
if (!(build == null ? void 0 : build.previewUrl) && !(build == null ? void 0 : build.sandboxId)) {
|
|
38
|
+
return "The live preview is not responding. Restart the dev server for this site so the preview loads again.";
|
|
39
|
+
}
|
|
40
|
+
const parts = [`The live preview of this site${build.title ? ` ("${build.title}")` : ""} is not responding`, build.previewUrl ? ` at ${build.previewUrl}` : "", build.sandboxId ? ` (sandbox ${build.sandboxId})` : "", ". Reconnect that sandbox and restart its dev server. If the sandbox no longer exists, recreate the site in a new sandbox from its latest saved version, then send me the new preview link."];
|
|
41
|
+
return parts.join("");
|
|
42
|
+
}export{wakePreviewPrompt,webbuilderAgentSuggestions};//# sourceMappingURL=webbuilderPrompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webbuilderPrompts.js","sources":["../../../src/features/webbuilder/webbuilderPrompts.ts"],"sourcesContent":["/**\n * Follow-ups for the Web Builder agent: the first asks of a site with nothing\n * built yet, and the edits people make most after a first build.\n */\nimport type { AgentChatSuggestion } from '../agent-chat';\n\nexport function webbuilderAgentSuggestions(hasBuild: boolean, siteTitle: string | null): AgentChatSuggestion[] {\n if (!hasBuild) {\n return [\n {\n id: 'landing',\n label: 'Landing page',\n prompt: 'A landing page with a hero, features, pricing and a sign-up form.',\n },\n {\n id: 'store',\n label: 'Online store',\n prompt: 'An online store with a product grid, product pages and a cart.',\n },\n {\n id: 'portfolio',\n label: 'Portfolio',\n prompt: 'A portfolio with an about section, selected work and a contact form.',\n },\n ];\n }\n const name = siteTitle ? ` on ${siteTitle}` : '';\n return [\n { id: 'mobile', label: 'Make it great on phones', prompt: `Make every page${name} look great on phones.` },\n { id: 'colors', label: 'New color scheme', prompt: 'Give the site a fresh, modern color scheme.' },\n { id: 'section', label: 'Add a section', prompt: 'Add a testimonials section above the footer.' },\n { id: 'fix', label: 'Fix what is broken', prompt: 'Check the site for errors and fix anything broken.' },\n ];\n}\n\n/**\n * Sent when the preview does not answer: the sandbox slept or was reclaimed (E2B\n * sandboxes live about an hour). It names the build so the agent restarts THIS\n * site - without it the agent has no sandbox to look for.\n */\nexport function wakePreviewPrompt(\n build: { previewUrl: string | null; sandboxId: string | null; title?: string } | null,\n): string {\n if (!build?.previewUrl && !build?.sandboxId) {\n return 'The live preview is not responding. Restart the dev server for this site so the preview loads again.';\n }\n const parts = [\n `The live preview of this site${build.title ? ` (\"${build.title}\")` : ''} is not responding`,\n build.previewUrl ? ` at ${build.previewUrl}` : '',\n build.sandboxId ? ` (sandbox ${build.sandboxId})` : '',\n '. Reconnect that sandbox and restart its dev server. If the sandbox no longer exists, recreate the site in a new sandbox from its latest saved version, then send me the new preview link.',\n ];\n return parts.join('');\n}\n"],"names":[],"mappings":"AAKgB,SAAA,0BAAA,CAA2B,UAAmB,SAAiD,EAAA;AAC7G,EAAA,IAAI,CAAC,QAAU,EAAA;AACb,IAAA,OAAO,CAAC;AAAA,MACN,EAAI,EAAA,SAAA;AAAA,MACJ,KAAO,EAAA,cAAA;AAAA,MACP,MAAQ,EAAA;AAAA,KACP,EAAA;AAAA,MACD,EAAI,EAAA,OAAA;AAAA,MACJ,KAAO,EAAA,cAAA;AAAA,MACP,MAAQ,EAAA;AAAA,KACP,EAAA;AAAA,MACD,EAAI,EAAA,WAAA;AAAA,MACJ,KAAO,EAAA,WAAA;AAAA,MACP,MAAQ,EAAA;AAAA,KACT,CAAA;AAAA;AAEH,EAAA,MAAM,IAAO,GAAA,SAAA,GAAY,CAAO,IAAA,EAAA,SAAS,CAAK,CAAA,GAAA,EAAA;AAC9C,EAAA,OAAO,CAAC;AAAA,IACN,EAAI,EAAA,QAAA;AAAA,IACJ,KAAO,EAAA,yBAAA;AAAA,IACP,MAAA,EAAQ,kBAAkB,IAAI,CAAA,sBAAA;AAAA,GAC7B,EAAA;AAAA,IACD,EAAI,EAAA,QAAA;AAAA,IACJ,KAAO,EAAA,kBAAA;AAAA,IACP,MAAQ,EAAA;AAAA,GACP,EAAA;AAAA,IACD,EAAI,EAAA,SAAA;AAAA,IACJ,KAAO,EAAA,eAAA;AAAA,IACP,MAAQ,EAAA;AAAA,GACP,EAAA;AAAA,IACD,EAAI,EAAA,KAAA;AAAA,IACJ,KAAO,EAAA,oBAAA;AAAA,IACP,MAAQ,EAAA;AAAA,GACT,CAAA;AACH;AAOO,SAAS,kBAAkB,KAIhB,EAAA;AAChB,EAAA,IAAI,EAAC,KAAA,IAAA,IAAA,GAAA,MAAA,GAAA,KAAA,CAAO,UAAc,CAAA,IAAA,EAAC,+BAAO,SAAW,CAAA,EAAA;AAC3C,IAAO,OAAA,sGAAA;AAAA;AAET,EAAM,MAAA,KAAA,GAAQ,CAAC,CAAA,6BAAA,EAAgC,KAAM,CAAA,KAAA,GAAQ,MAAM,KAAM,CAAA,KAAK,CAAO,EAAA,CAAA,GAAA,EAAE,CAAsB,kBAAA,CAAA,EAAA,KAAA,CAAM,aAAa,CAAO,IAAA,EAAA,KAAA,CAAM,UAAU,CAAA,CAAA,GAAK,EAAI,EAAA,KAAA,CAAM,SAAY,GAAA,CAAA,UAAA,EAAa,KAAM,CAAA,SAAS,CAAM,CAAA,CAAA,GAAA,EAAA,EAAI,4LAA4L,CAAA;AACpZ,EAAO,OAAA,KAAA,CAAM,KAAK,EAAE,CAAA;AACtB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {mobileColors}from'../../theme/mobileTokens.js';function webbuilderTheme(isDark) {
|
|
2
|
+
const app = mobileColors(isDark);
|
|
3
|
+
if (isDark) {
|
|
4
|
+
return {
|
|
5
|
+
isDark: true,
|
|
6
|
+
screen: app.bg,
|
|
7
|
+
card: app.surface,
|
|
8
|
+
chip: app.surfaceMuted,
|
|
9
|
+
border: app.border,
|
|
10
|
+
ink: app.text,
|
|
11
|
+
muted: app.textMuted,
|
|
12
|
+
faint: "#64748b",
|
|
13
|
+
accent: app.primary,
|
|
14
|
+
accentInk: "#0f172a",
|
|
15
|
+
accentSoft: app.primarySoft,
|
|
16
|
+
accentBorder: app.primaryBorder,
|
|
17
|
+
hero: "rgba(234,88,12,0.12)",
|
|
18
|
+
good: app.successText,
|
|
19
|
+
goodSoft: app.successSoft,
|
|
20
|
+
warn: app.warningText,
|
|
21
|
+
warnSoft: app.warningSoft,
|
|
22
|
+
crit: app.dangerText,
|
|
23
|
+
critSoft: app.dangerSoft,
|
|
24
|
+
info: "#93c5fd",
|
|
25
|
+
infoSoft: "rgba(59,130,246,0.16)",
|
|
26
|
+
stage: "#0b1220",
|
|
27
|
+
code: "#0b1220",
|
|
28
|
+
codeInk: "#e2e8f0",
|
|
29
|
+
backdrop: "rgba(0,0,0,0.6)",
|
|
30
|
+
toast: app.text,
|
|
31
|
+
toastInk: app.bg
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
isDark: false,
|
|
36
|
+
screen: "#fafaf9",
|
|
37
|
+
card: app.surface,
|
|
38
|
+
chip: "#f4f4f5",
|
|
39
|
+
border: "#ececec",
|
|
40
|
+
ink: app.text,
|
|
41
|
+
muted: app.textMuted,
|
|
42
|
+
faint: "#94a3b8",
|
|
43
|
+
accent: app.primary,
|
|
44
|
+
accentInk: "#ffffff",
|
|
45
|
+
accentSoft: app.primarySoft,
|
|
46
|
+
accentBorder: app.primaryBorder,
|
|
47
|
+
hero: "#fff4ec",
|
|
48
|
+
good: app.successText,
|
|
49
|
+
goodSoft: app.successSoft,
|
|
50
|
+
warn: app.warningText,
|
|
51
|
+
warnSoft: app.warningSoft,
|
|
52
|
+
crit: app.dangerText,
|
|
53
|
+
critSoft: app.dangerSoft,
|
|
54
|
+
info: "#2563eb",
|
|
55
|
+
infoSoft: "#eef4ff",
|
|
56
|
+
stage: "#f1f1f0",
|
|
57
|
+
code: "#0f172a",
|
|
58
|
+
codeInk: "#e2e8f0",
|
|
59
|
+
backdrop: "rgba(15,23,42,0.42)",
|
|
60
|
+
toast: app.text,
|
|
61
|
+
toastInk: "#ffffff"
|
|
62
|
+
};
|
|
63
|
+
}export{webbuilderTheme};//# sourceMappingURL=webbuilderTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webbuilderTheme.js","sources":["../../../src/features/webbuilder/webbuilderTheme.ts"],"sourcesContent":["/**\n * Web Builder visual tokens, taken from the app's own palette\n * (`theme/mobileTokens` - the Yantra orange the web studio wears too), so the\n * builder reads as part of the app in light and dark. The roles beyond the\n * app palette (the studio hero's warm wash, the preview stage, the code pane)\n * are derived from it.\n */\nimport { mobileColors } from '../../theme/mobileTokens';\n\nexport type WebBuilderTheme = {\n isDark: boolean;\n screen: string;\n /** Raised cards, sheets, the toolbar. */\n card: string;\n /** Inputs, chips, pressed rows, skeleton blocks. */\n chip: string;\n border: string;\n ink: string;\n muted: string;\n faint: string;\n accent: string;\n accentInk: string;\n accentSoft: string;\n /** Border of an accent-tinted surface. */\n accentBorder: string;\n /** The studio hero's warm wash (web `from-primary/10` gradient). */\n hero: string;\n good: string;\n goodSoft: string;\n warn: string;\n warnSoft: string;\n crit: string;\n critSoft: string;\n /** The web studio's \"Look like\" blue. */\n info: string;\n infoSoft: string;\n /** Behind the preview frame. */\n stage: string;\n /** The code view. */\n code: string;\n codeInk: string;\n backdrop: string;\n toast: string;\n toastInk: string;\n};\n\nexport function webbuilderTheme(isDark: boolean): WebBuilderTheme {\n const app = mobileColors(isDark);\n if (isDark) {\n return {\n isDark: true,\n screen: app.bg,\n card: app.surface,\n chip: app.surfaceMuted,\n border: app.border,\n ink: app.text,\n muted: app.textMuted,\n faint: '#64748b',\n accent: app.primary,\n accentInk: '#0f172a',\n accentSoft: app.primarySoft,\n accentBorder: app.primaryBorder,\n hero: 'rgba(234,88,12,0.12)',\n good: app.successText,\n goodSoft: app.successSoft,\n warn: app.warningText,\n warnSoft: app.warningSoft,\n crit: app.dangerText,\n critSoft: app.dangerSoft,\n info: '#93c5fd',\n infoSoft: 'rgba(59,130,246,0.16)',\n stage: '#0b1220',\n code: '#0b1220',\n codeInk: '#e2e8f0',\n backdrop: 'rgba(0,0,0,0.6)',\n toast: app.text,\n toastInk: app.bg,\n };\n }\n return {\n isDark: false,\n screen: '#fafaf9',\n card: app.surface,\n chip: '#f4f4f5',\n border: '#ececec',\n ink: app.text,\n muted: app.textMuted,\n faint: '#94a3b8',\n accent: app.primary,\n accentInk: '#ffffff',\n accentSoft: app.primarySoft,\n accentBorder: app.primaryBorder,\n hero: '#fff4ec',\n good: app.successText,\n goodSoft: app.successSoft,\n warn: app.warningText,\n warnSoft: app.warningSoft,\n crit: app.dangerText,\n critSoft: app.dangerSoft,\n info: '#2563eb',\n infoSoft: '#eef4ff',\n stage: '#f1f1f0',\n code: '#0f172a',\n codeInk: '#e2e8f0',\n backdrop: 'rgba(15,23,42,0.42)',\n toast: app.text,\n toastInk: '#ffffff',\n };\n}\n"],"names":[],"mappings":"uDA4CO,SAAS,gBAAgB,MAAkC,EAAA;AAChE,EAAM,MAAA,GAAA,GAAM,aAAa,MAAM,CAAA;AAC/B,EAAA,IAAI,MAAQ,EAAA;AACV,IAAO,OAAA;AAAA,MACL,MAAQ,EAAA,IAAA;AAAA,MACR,QAAQ,GAAI,CAAA,EAAA;AAAA,MACZ,MAAM,GAAI,CAAA,OAAA;AAAA,MACV,MAAM,GAAI,CAAA,YAAA;AAAA,MACV,QAAQ,GAAI,CAAA,MAAA;AAAA,MACZ,KAAK,GAAI,CAAA,IAAA;AAAA,MACT,OAAO,GAAI,CAAA,SAAA;AAAA,MACX,KAAO,EAAA,SAAA;AAAA,MACP,QAAQ,GAAI,CAAA,OAAA;AAAA,MACZ,SAAW,EAAA,SAAA;AAAA,MACX,YAAY,GAAI,CAAA,WAAA;AAAA,MAChB,cAAc,GAAI,CAAA,aAAA;AAAA,MAClB,IAAM,EAAA,sBAAA;AAAA,MACN,MAAM,GAAI,CAAA,WAAA;AAAA,MACV,UAAU,GAAI,CAAA,WAAA;AAAA,MACd,MAAM,GAAI,CAAA,WAAA;AAAA,MACV,UAAU,GAAI,CAAA,WAAA;AAAA,MACd,MAAM,GAAI,CAAA,UAAA;AAAA,MACV,UAAU,GAAI,CAAA,UAAA;AAAA,MACd,IAAM,EAAA,SAAA;AAAA,MACN,QAAU,EAAA,uBAAA;AAAA,MACV,KAAO,EAAA,SAAA;AAAA,MACP,IAAM,EAAA,SAAA;AAAA,MACN,OAAS,EAAA,SAAA;AAAA,MACT,QAAU,EAAA,iBAAA;AAAA,MACV,OAAO,GAAI,CAAA,IAAA;AAAA,MACX,UAAU,GAAI,CAAA;AAAA,KAChB;AAAA;AAEF,EAAO,OAA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