@nuvler/cli 0.1.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/README.md +25 -0
- package/dist/api/client.js +84 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/theme-context.js +190 -0
- package/dist/api/theme-context.js.map +1 -0
- package/dist/api/theme-registry.js +77 -0
- package/dist/api/theme-registry.js.map +1 -0
- package/dist/commands/theme/build.js +116 -0
- package/dist/commands/theme/build.js.map +1 -0
- package/dist/commands/theme/create.js +92 -0
- package/dist/commands/theme/create.js.map +1 -0
- package/dist/commands/theme/dev.js +46 -0
- package/dist/commands/theme/dev.js.map +1 -0
- package/dist/commands/theme/pack.js +75 -0
- package/dist/commands/theme/pack.js.map +1 -0
- package/dist/commands/theme/publish.js +37 -0
- package/dist/commands/theme/publish.js.map +1 -0
- package/dist/commands/theme/validate.js +15 -0
- package/dist/commands/theme/validate.js.map +1 -0
- package/dist/index.js +144 -0
- package/dist/index.js.map +1 -0
- package/dist/nuvler.js +7553 -0
- package/dist/nuvler.js.map +1 -0
- package/dist/preview/launcher.js +104 -0
- package/dist/preview/launcher.js.map +1 -0
- package/dist/theme/artifact-policy.js +119 -0
- package/dist/theme/artifact-policy.js.map +1 -0
- package/dist/theme/artifact.js +39 -0
- package/dist/theme/artifact.js.map +1 -0
- package/dist/theme/project.js +71 -0
- package/dist/theme/project.js.map +1 -0
- package/package.json +44 -0
- package/preview-host/index.html +13 -0
- package/preview-host/package.json +23 -0
- package/preview-host/src/app/globals.css +16 -0
- package/preview-host/src/fallback-context.json +53 -0
- package/preview-host/src/main.tsx +145 -0
- package/preview-host/src/virtual-modules.d.ts +11 -0
- package/preview-host/tsconfig.json +28 -0
- package/preview-host/vendor/theme-runtime/default-theme.tsx +577 -0
- package/preview-host/vendor/theme-runtime/index.ts +25 -0
- package/preview-host/vite.config.ts +125 -0
- package/templates/starter-theme/.env.example +3 -0
- package/templates/starter-theme/README.md +100 -0
- package/templates/starter-theme/gitignore.template +9 -0
- package/templates/starter-theme/nuvler.theme.json +10 -0
- package/templates/starter-theme/package.json +29 -0
- package/templates/starter-theme/src/definition.tsx +54 -0
- package/templates/starter-theme/src/styles.d.ts +1 -0
- package/templates/starter-theme/src/theme.css +21 -0
- package/templates/starter-theme/src/theme.tsx +34 -0
- package/templates/starter-theme/tsconfig.json +17 -0
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
import { useEffect, useMemo, useRef, useState, type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
import type {
|
|
3
|
+
ThemeCategory,
|
|
4
|
+
ThemeContext,
|
|
5
|
+
ThemeHomeSection,
|
|
6
|
+
ThemeHomeSectionType,
|
|
7
|
+
ThemeEditorialItem,
|
|
8
|
+
ThemeProduct,
|
|
9
|
+
ThemeSiteColors,
|
|
10
|
+
} from "@nuvler/theme-sdk";
|
|
11
|
+
import type { DefaultThemeProps, ThemeRuntimeAdapters } from "./index.js";
|
|
12
|
+
import type { ThemeRoute } from "./index.js";
|
|
13
|
+
|
|
14
|
+
const fallbackColors: ThemeSiteColors = {
|
|
15
|
+
primary: "#176b3a",
|
|
16
|
+
secondary: "#d99b31",
|
|
17
|
+
background: "#f7f7f2",
|
|
18
|
+
text: "#18221b",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const template = {
|
|
22
|
+
announcement: "Soluções, conteúdo e atendimento para o seu negócio",
|
|
23
|
+
footerTagline: "Soluções, conteúdo e atendimento próximo para aproximar sua marca das pessoas.",
|
|
24
|
+
footerNote: "Conteúdo e atendimento que geram confiança",
|
|
25
|
+
benefits: [
|
|
26
|
+
{ title: "Soluções sob medida", description: "Serviços pensados para o seu momento" },
|
|
27
|
+
{ title: "Conteúdo relevante", description: "Informação para ajudar nas decisões" },
|
|
28
|
+
{ title: "Atendimento próximo", description: "Fale diretamente com a empresa" },
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const fallbackCatalog = {
|
|
33
|
+
showDescription: true,
|
|
34
|
+
showCategory: true,
|
|
35
|
+
desktopColumns: 3 as const,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
function dataString(data: Record<string, unknown>, field: string, fallback = ""): string {
|
|
39
|
+
const value = data[field];
|
|
40
|
+
return typeof value === "string" && value.trim() ? value.trim() : fallback;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function dataLimit(data: Record<string, unknown>): number {
|
|
44
|
+
const value = Number(data.limit);
|
|
45
|
+
return Number.isInteger(value) ? Math.min(12, Math.max(1, value)) : 6;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function plainText(value: string): string {
|
|
49
|
+
return value
|
|
50
|
+
.replace(/<(script|style)\b[^>]*>[\s\S]*?<\/\1>/gi, " ")
|
|
51
|
+
.replace(/<[^>]+>/g, " ")
|
|
52
|
+
.replace(/\s+/g, " ")
|
|
53
|
+
.trim();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function moduleLinks(context: ThemeContext): Array<{ label: string; href: string }> {
|
|
57
|
+
return [
|
|
58
|
+
...(context.site.modules.includes("BLOG") ? [{ label: "Blog", href: "/blog" }] : []),
|
|
59
|
+
...(context.site.modules.includes("SERVICES") ? [{ label: "Serviços", href: "/servicos" }] : []),
|
|
60
|
+
...(context.site.modules.includes("CASES") ? [{ label: "Cases", href: "/cases" }] : []),
|
|
61
|
+
...context.navigation.pages.slice(0, 6).map((page) => ({
|
|
62
|
+
label: page.title,
|
|
63
|
+
href: `/${page.slug}`,
|
|
64
|
+
})),
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function categoryUrl(path: string[]): string {
|
|
69
|
+
return `/categoria/${path.map(encodeURIComponent).join("/")}`;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function CategoryTree({
|
|
73
|
+
categories,
|
|
74
|
+
adapters,
|
|
75
|
+
path = [],
|
|
76
|
+
depth = 0,
|
|
77
|
+
}: {
|
|
78
|
+
categories: ThemeCategory[];
|
|
79
|
+
adapters: ThemeRuntimeAdapters;
|
|
80
|
+
path?: string[];
|
|
81
|
+
depth?: number;
|
|
82
|
+
}) {
|
|
83
|
+
const { Link } = adapters;
|
|
84
|
+
return categories.map((category) => {
|
|
85
|
+
const currentPath = [...path, category.slug];
|
|
86
|
+
return (
|
|
87
|
+
<div className="category-nav-tree-node" data-depth={depth} key={currentPath.join("/")}>
|
|
88
|
+
<Link href={categoryUrl(currentPath)}>
|
|
89
|
+
{depth > 0 && <span className="category-tree-branch" aria-hidden="true" />}
|
|
90
|
+
<span>{category.name}</span>
|
|
91
|
+
</Link>
|
|
92
|
+
{category.children.length > 0 && (
|
|
93
|
+
<CategoryTree
|
|
94
|
+
adapters={adapters}
|
|
95
|
+
categories={category.children}
|
|
96
|
+
depth={depth + 1}
|
|
97
|
+
path={currentPath}
|
|
98
|
+
/>
|
|
99
|
+
)}
|
|
100
|
+
</div>
|
|
101
|
+
);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function displayPrice(product: ThemeProduct): string | null {
|
|
106
|
+
const price = product.promotionalPrice ?? product.price;
|
|
107
|
+
return typeof price === "number"
|
|
108
|
+
? new Intl.NumberFormat("pt-BR", { style: "currency", currency: "BRL" }).format(price)
|
|
109
|
+
: null;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function SmartSearch({ adapters }: { adapters: ThemeRuntimeAdapters }) {
|
|
113
|
+
const { Link, Image } = adapters;
|
|
114
|
+
const [value, setValue] = useState("");
|
|
115
|
+
const [results, setResults] = useState<ThemeProduct[]>([]);
|
|
116
|
+
const [loading, setLoading] = useState(false);
|
|
117
|
+
const [open, setOpen] = useState(false);
|
|
118
|
+
const root = useRef<HTMLDivElement>(null);
|
|
119
|
+
|
|
120
|
+
useEffect(() => {
|
|
121
|
+
const query = value.trim();
|
|
122
|
+
if (query.length < 2 || !adapters.searchProducts) return;
|
|
123
|
+
let active = true;
|
|
124
|
+
const timer = window.setTimeout(() => {
|
|
125
|
+
setLoading(true);
|
|
126
|
+
void adapters.searchProducts?.(query)
|
|
127
|
+
.then((items) => { if (active) { setResults(items.slice(0, 5)); setOpen(true); } })
|
|
128
|
+
.finally(() => { if (active) setLoading(false); });
|
|
129
|
+
}, 280);
|
|
130
|
+
return () => { active = false; window.clearTimeout(timer); };
|
|
131
|
+
}, [adapters, value]);
|
|
132
|
+
|
|
133
|
+
useEffect(() => {
|
|
134
|
+
const close = (event: PointerEvent) => {
|
|
135
|
+
if (!root.current?.contains(event.target as Node)) setOpen(false);
|
|
136
|
+
};
|
|
137
|
+
document.addEventListener("pointerdown", close);
|
|
138
|
+
return () => document.removeEventListener("pointerdown", close);
|
|
139
|
+
}, []);
|
|
140
|
+
|
|
141
|
+
return <div className="header-search-shell" ref={root}>
|
|
142
|
+
<form className="header-search" action="/produtos">
|
|
143
|
+
<input name="busca" type="search" placeholder="O que você está procurando?" autoComplete="off" value={value} onChange={(event) => { const next = event.target.value; setValue(next); if (next.trim().length < 2) { setOpen(false); setResults([]); } }} onFocus={() => value.trim().length >= 2 && setOpen(true)} />
|
|
144
|
+
<button type="submit" aria-label="Buscar"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7" /><path d="m16.5 16.5 4 4" /></svg></button>
|
|
145
|
+
</form>
|
|
146
|
+
{open && value.trim().length >= 2 && <div className="search-suggestions">
|
|
147
|
+
<div className="search-suggestions-heading"><strong>{loading ? "Buscando..." : "Produtos encontrados"}</strong>{!loading && <span>{results.length} de 5</span>}</div>
|
|
148
|
+
{!loading && results.map((product) => <Link href={`/produto/${product.slug}`} key={product.slug}>
|
|
149
|
+
<span className="search-suggestion-image"><Image image={product.image} fallbackAlt={product.title} /></span>
|
|
150
|
+
<span className="search-suggestion-copy"><strong>{product.title}</strong><small>{product.sku ? `Ref. ${product.sku}` : product.categories[0]?.name || "Produto"}</small></span>
|
|
151
|
+
{displayPrice(product) && <b>{displayPrice(product)}</b>}
|
|
152
|
+
</Link>)}
|
|
153
|
+
{!loading && !results.length && <p>Nenhum produto próximo foi encontrado.</p>}
|
|
154
|
+
<Link className="search-all-results" href={`/produtos?busca=${encodeURIComponent(value.trim())}`}>Ver todos os resultados</Link>
|
|
155
|
+
</div>}
|
|
156
|
+
</div>;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function Header({ context, adapters }: Omit<DefaultThemeProps, "children">) {
|
|
160
|
+
const { Link, Image } = adapters;
|
|
161
|
+
const settings = context.site.settings;
|
|
162
|
+
const name = settings?.siteName || context.store.name;
|
|
163
|
+
const categories = context.navigation.categories;
|
|
164
|
+
const extraLinks = moduleLinks(context);
|
|
165
|
+
|
|
166
|
+
return (
|
|
167
|
+
<>
|
|
168
|
+
<div className="announcement">
|
|
169
|
+
<div className="store-container announcement-inner">
|
|
170
|
+
<span>{template.announcement}</span>
|
|
171
|
+
{settings?.contact.phone && <span>{settings.contact.phone}</span>}
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
<header className="store-header">
|
|
175
|
+
<div className="store-container header-inner">
|
|
176
|
+
<Link className="brand" href="/">
|
|
177
|
+
{settings?.logo?.url ? (
|
|
178
|
+
<Image image={settings.logo} fallbackAlt={name} className="brand-logo" priority />
|
|
179
|
+
) : (
|
|
180
|
+
<><span className="brand-mark">7</span><span>{name}</span></>
|
|
181
|
+
)}
|
|
182
|
+
</Link>
|
|
183
|
+
{context.site.modules.includes("PRODUCTS") && (
|
|
184
|
+
<SmartSearch adapters={adapters} />
|
|
185
|
+
)}
|
|
186
|
+
<div className="header-message">
|
|
187
|
+
<span className="header-message-icon" aria-hidden="true">
|
|
188
|
+
<svg viewBox="0 0 24 24"><path d="m12 3 2.1 4.9L19 10l-4.9 2.1L12 17l-2.1-4.9L5 10l4.9-2.1L12 3Z" /></svg>
|
|
189
|
+
</span>
|
|
190
|
+
<span className="header-message-copy">
|
|
191
|
+
<small>Nossa loja</small>
|
|
192
|
+
<strong>{settings?.description?.trim() || template.announcement}</strong>
|
|
193
|
+
</span>
|
|
194
|
+
</div>
|
|
195
|
+
{extraLinks.length > 0 && (
|
|
196
|
+
<div className="header-actions">
|
|
197
|
+
<details className="header-more-menu">
|
|
198
|
+
<summary>Mais <span aria-hidden="true">⌄</span></summary>
|
|
199
|
+
<div className="header-more-panel">
|
|
200
|
+
{extraLinks.map((item) => <Link href={item.href} key={item.href}>{item.label}</Link>)}
|
|
201
|
+
</div>
|
|
202
|
+
</details>
|
|
203
|
+
</div>
|
|
204
|
+
)}
|
|
205
|
+
</div>
|
|
206
|
+
{categories.length > 0 ? (
|
|
207
|
+
<nav className="category-nav" aria-label="Categorias de produtos">
|
|
208
|
+
<div className="store-container category-nav-inner">
|
|
209
|
+
<details className="category-nav-all">
|
|
210
|
+
<summary className="all-categories">
|
|
211
|
+
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 7h16M4 12h16M4 17h16" /></svg>
|
|
212
|
+
<span>Todas as categorias</span>
|
|
213
|
+
</summary>
|
|
214
|
+
<div className="category-nav-all-panel">
|
|
215
|
+
<div className="category-nav-panel-heading">
|
|
216
|
+
<div><span>Explore o catálogo</span><strong>Todas as categorias</strong></div>
|
|
217
|
+
<Link href="/produtos">Ver todos</Link>
|
|
218
|
+
</div>
|
|
219
|
+
<div className="category-nav-tree">
|
|
220
|
+
<CategoryTree adapters={adapters} categories={categories} />
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
</details>
|
|
224
|
+
{categories.slice(0, 9).map((category) => (
|
|
225
|
+
<div className="category-nav-group" key={category.slug}>
|
|
226
|
+
<Link href={categoryUrl([category.slug])}>{category.name}</Link>
|
|
227
|
+
{category.children.length > 0 && (
|
|
228
|
+
<div className="category-nav-submenu">
|
|
229
|
+
<CategoryTree adapters={adapters} categories={category.children} path={[category.slug]} />
|
|
230
|
+
</div>
|
|
231
|
+
)}
|
|
232
|
+
</div>
|
|
233
|
+
))}
|
|
234
|
+
</div>
|
|
235
|
+
</nav>
|
|
236
|
+
) : (
|
|
237
|
+
<div className="primary-nav-shell">
|
|
238
|
+
<nav className="store-container main-nav" aria-label="Navegação principal">
|
|
239
|
+
<Link href="/">Início</Link>
|
|
240
|
+
{context.site.modules.includes("PRODUCTS") && <Link href="/produtos">Produtos</Link>}
|
|
241
|
+
{extraLinks.map((item) => <Link href={item.href} key={item.href}>{item.label}</Link>)}
|
|
242
|
+
</nav>
|
|
243
|
+
</div>
|
|
244
|
+
)}
|
|
245
|
+
</header>
|
|
246
|
+
</>
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
function ProductCard({ product, context, adapters }: {
|
|
251
|
+
product: ThemeProduct;
|
|
252
|
+
context: ThemeContext;
|
|
253
|
+
adapters: ThemeRuntimeAdapters;
|
|
254
|
+
}) {
|
|
255
|
+
const { Link, Image } = adapters;
|
|
256
|
+
const catalog = context.site.settings?.catalog ?? fallbackCatalog;
|
|
257
|
+
return (
|
|
258
|
+
<article className="product-card">
|
|
259
|
+
<Link className="product-card-image" href={`/produto/${product.slug}`}>
|
|
260
|
+
<Image image={product.image} fallbackAlt={product.title} />
|
|
261
|
+
</Link>
|
|
262
|
+
<div className="product-card-content">
|
|
263
|
+
{catalog.showCategory && (
|
|
264
|
+
<span className={`product-category${product.categories[0] ? "" : " product-category-empty"}`}>
|
|
265
|
+
{product.categories[0]?.name || "Sem categoria"}
|
|
266
|
+
</span>
|
|
267
|
+
)}
|
|
268
|
+
<h3><Link href={`/produto/${product.slug}`}>{product.title}</Link></h3>
|
|
269
|
+
{catalog.showDescription && product.description && (
|
|
270
|
+
<p className="product-card-description">{plainText(product.description)}</p>
|
|
271
|
+
)}
|
|
272
|
+
<Link className="button button-secondary button-block" href={`/produto/${product.slug}`}>
|
|
273
|
+
Ver detalhes e orçar
|
|
274
|
+
</Link>
|
|
275
|
+
</div>
|
|
276
|
+
</article>
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export interface ThemeSectionRendererProps {
|
|
281
|
+
section: ThemeHomeSection;
|
|
282
|
+
context: ThemeContext;
|
|
283
|
+
adapters: ThemeRuntimeAdapters;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export type ThemeSectionRenderer = (props: ThemeSectionRendererProps) => ReactNode;
|
|
287
|
+
export type ThemeSectionRegistry = Partial<Record<ThemeHomeSectionType, ThemeSectionRenderer>>;
|
|
288
|
+
|
|
289
|
+
function HeroSection({ section, context, adapters }: ThemeSectionRendererProps) {
|
|
290
|
+
const { Link, Image } = adapters;
|
|
291
|
+
const storeName = context.site.settings?.siteName || context.store.name;
|
|
292
|
+
const eyebrow = dataString(section.data, "eyebrow", "Bem-vindo à nossa loja");
|
|
293
|
+
const title = dataString(section.data, "title", "Tudo o que você procura, em um só lugar.");
|
|
294
|
+
const description = dataString(section.data, "description", context.site.settings?.description || `Conheça a seleção de produtos da ${storeName}.`);
|
|
295
|
+
const buttonLabel = dataString(section.data, "buttonLabel", "Explorar produtos");
|
|
296
|
+
const buttonUrl = dataString(section.data, "buttonUrl", "/produtos");
|
|
297
|
+
const imageUrl = dataString(section.data, "imageUrl");
|
|
298
|
+
|
|
299
|
+
if (imageUrl) {
|
|
300
|
+
return (
|
|
301
|
+
<section className="hero-section hero-section-image">
|
|
302
|
+
<Image image={{ url: imageUrl, alt: dataString(section.data, "imageAlt", title), width: null, height: null }} fallbackAlt={title} className="hero-background-image" />
|
|
303
|
+
<div className="hero-background-overlay" aria-hidden="true" />
|
|
304
|
+
<div className="store-container hero-image-content"><div className="hero-copy">
|
|
305
|
+
<span className="hero-eyebrow">{eyebrow}</span><h1>{title}</h1><p>{description}</p>
|
|
306
|
+
<div className="hero-actions"><Link className="button button-primary" href={buttonUrl}>{buttonLabel}</Link><Link className="text-link" href="/produtos">Ver catálogo completo <span>→</span></Link></div>
|
|
307
|
+
</div></div>
|
|
308
|
+
</section>
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return (
|
|
313
|
+
<section className="hero-section"><div className="store-container hero-grid">
|
|
314
|
+
<div className="hero-copy">
|
|
315
|
+
<span className="hero-eyebrow">{eyebrow}</span><h1>{title}</h1><p>{description}</p>
|
|
316
|
+
<div className="hero-actions"><Link className="button button-primary" href={buttonUrl}>{buttonLabel}</Link><Link className="text-link" href="/produtos">Ver catálogo completo <span>→</span></Link></div>
|
|
317
|
+
</div>
|
|
318
|
+
<div className="hero-art" aria-hidden="true"><div className="hero-orbit hero-orbit-one" /><div className="hero-orbit hero-orbit-two" /><div className="hero-seven">7</div><span className="hero-card hero-card-top">Seleção especial</span><span className="hero-card hero-card-bottom">Atendimento humano</span></div>
|
|
319
|
+
</div></section>
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
function BannerSection({ section, adapters }: ThemeSectionRendererProps) {
|
|
324
|
+
const { Link, Image } = adapters;
|
|
325
|
+
const banners = Array.isArray(section.data.banners)
|
|
326
|
+
? section.data.banners.filter((item): item is Record<string, unknown> => Boolean(item) && typeof item === "object")
|
|
327
|
+
: [];
|
|
328
|
+
const banner = banners[0];
|
|
329
|
+
if (!banner || typeof banner.imageUrl !== "string") return null;
|
|
330
|
+
return (
|
|
331
|
+
<section className="banner-carousel"><div className="banner-track"><article className="banner-slide">
|
|
332
|
+
<Image image={{ url: banner.imageUrl, alt: typeof banner.imageAlt === "string" ? banner.imageAlt : "Banner", width: null, height: null }} fallbackAlt="Banner" />
|
|
333
|
+
<div className="banner-overlay"><div className="store-container"><div className="banner-copy">
|
|
334
|
+
{typeof banner.title === "string" && <h2>{banner.title}</h2>}
|
|
335
|
+
{typeof banner.description === "string" && <p>{banner.description}</p>}
|
|
336
|
+
{typeof banner.buttonLabel === "string" && typeof banner.buttonUrl === "string" && <Link className="button button-primary" href={banner.buttonUrl}>{banner.buttonLabel}</Link>}
|
|
337
|
+
</div></div></div>
|
|
338
|
+
</article></div></section>
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
function TextSection({ section, adapters }: ThemeSectionRendererProps) {
|
|
343
|
+
const { Link, Image } = adapters;
|
|
344
|
+
const title = dataString(section.data, "title", "Conteúdo");
|
|
345
|
+
const eyebrow = dataString(section.data, "eyebrow");
|
|
346
|
+
const description = dataString(section.data, "description", dataString(section.data, "text"));
|
|
347
|
+
const imageUrl = dataString(section.data, "imageUrl");
|
|
348
|
+
if (!description && !imageUrl && !dataString(section.data, "title")) return null;
|
|
349
|
+
|
|
350
|
+
if (section.type === "image-text") {
|
|
351
|
+
return <section className="store-section image-text-section"><div className="store-container image-text-layout" data-position={section.data.imagePosition === "right" ? "right" : "left"}>
|
|
352
|
+
{imageUrl && <div className="image-text-media"><Image image={{ url: imageUrl, alt: title, width: null, height: null }} fallbackAlt={title} /></div>}
|
|
353
|
+
<div className="image-text-copy">{eyebrow && <span>{eyebrow}</span>}<h2>{title}</h2>{description && <p>{description}</p>}</div>
|
|
354
|
+
</div></section>;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
return <section className="store-section editorial-section"><div className="store-container editorial-content">
|
|
358
|
+
{eyebrow && <span>{eyebrow}</span>}<h2>{title}</h2>{description && <p>{description}</p>}
|
|
359
|
+
{section.type === "cta" && dataString(section.data, "buttonLabel") && dataString(section.data, "buttonUrl") && <Link className="button button-primary" href={dataString(section.data, "buttonUrl")}>{dataString(section.data, "buttonLabel")}</Link>}
|
|
360
|
+
</div></section>;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function ProductsSection({ section, context, adapters }: ThemeSectionRendererProps) {
|
|
364
|
+
const categorySlug = dataString(section.data, "categorySlug");
|
|
365
|
+
const products = context.catalog.products
|
|
366
|
+
.filter((product) => !categorySlug || product.categories.some((category) => category.slug === categorySlug))
|
|
367
|
+
.slice(0, dataLimit(section.data));
|
|
368
|
+
return <section className="store-section"><div className="store-container">
|
|
369
|
+
<div className="section-heading"><div><span>{dataString(section.data, "eyebrow", "Em destaque")}</span><h2>{dataString(section.data, "title", section.type === "products-grid" ? "Produtos em destaque" : "Vitrine de produtos")}</h2></div><adapters.Link href="/produtos">Ver todos</adapters.Link></div>
|
|
370
|
+
{products.length ? <div className="product-carousel"><div className="product-carousel-track">{products.map((product) => <div className="product-carousel-item" key={product.slug}><ProductCard adapters={adapters} context={context} product={product} /></div>)}</div></div> : <div className="empty-state"><span>7</span><h2>Nenhum produto encontrado</h2><p>Escolha outra categoria ou publique produtos para esta vitrine.</p></div>}
|
|
371
|
+
</div></section>;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
function EditorialCards({ items, basePath, adapters }: {
|
|
375
|
+
items: ThemeEditorialItem[];
|
|
376
|
+
basePath: string;
|
|
377
|
+
adapters: ThemeRuntimeAdapters;
|
|
378
|
+
}) {
|
|
379
|
+
const { Link, Image } = adapters;
|
|
380
|
+
if (!items.length) return <div className="empty-state"><span>7</span><h2>Nenhum conteúdo publicado</h2><p>As publicações aparecerão aqui quando estiverem disponíveis.</p></div>;
|
|
381
|
+
return <div className="editorial-grid">{items.map((item) => <article className="editorial-card" key={item.slug}>
|
|
382
|
+
<Link className="editorial-card-image" href={`${basePath}/${item.slug}`}><Image image={item.image ?? null} fallbackAlt={item.title} /></Link>
|
|
383
|
+
<div className="editorial-card-content">{item.category?.title && <span>{item.category.title}</span>}<h2><Link href={`${basePath}/${item.slug}`}>{item.title}</Link></h2><p>{item.description}</p><Link className="text-link" href={`${basePath}/${item.slug}`}>Saiba mais <span>→</span></Link></div>
|
|
384
|
+
</article>)}</div>;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
function AutomaticSection({ section, context, adapters }: ThemeSectionRendererProps) {
|
|
388
|
+
const titles: Partial<Record<ThemeHomeSectionType, string>> = { "services-grid": "Nossos serviços", "blog-grid": "Conteúdos recentes", "cases-grid": "Cases e resultados" };
|
|
389
|
+
const paths: Partial<Record<ThemeHomeSectionType, string>> = { "services-grid": "/servicos", "blog-grid": "/blog", "cases-grid": "/cases" };
|
|
390
|
+
const items = section.type === "services-grid"
|
|
391
|
+
? context.editorial.services
|
|
392
|
+
: section.type === "cases-grid"
|
|
393
|
+
? context.editorial.cases
|
|
394
|
+
: context.editorial.posts;
|
|
395
|
+
const basePath = paths[section.type] || "/";
|
|
396
|
+
return <section className="store-section"><div className="store-container">
|
|
397
|
+
<div className="section-heading"><div><span>{dataString(section.data, "eyebrow", "Em destaque")}</span><h2>{dataString(section.data, "title", titles[section.type] || "Conteúdo")}</h2></div><adapters.Link href={basePath}>Ver todos</adapters.Link></div>
|
|
398
|
+
<EditorialCards adapters={adapters} basePath={basePath} items={items.slice(0, dataLimit(section.data))} />
|
|
399
|
+
</div></section>;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export const defaultSectionRegistry: ThemeSectionRegistry = {
|
|
403
|
+
hero: HeroSection,
|
|
404
|
+
"banner-carousel": BannerSection,
|
|
405
|
+
"image-text": TextSection,
|
|
406
|
+
"rich-text": TextSection,
|
|
407
|
+
cta: TextSection,
|
|
408
|
+
"services-grid": AutomaticSection,
|
|
409
|
+
"blog-grid": AutomaticSection,
|
|
410
|
+
"cases-grid": AutomaticSection,
|
|
411
|
+
"products-grid": ProductsSection,
|
|
412
|
+
"products-carousel": ProductsSection,
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
function fallbackSections(context: ThemeContext): ThemeHomeSection[] {
|
|
416
|
+
const sections: ThemeHomeSection[] = [{ type: "hero", enabled: true, order: 0, data: {} }];
|
|
417
|
+
if (context.site.modules.includes("PRODUCTS")) sections.push({ type: "products-carousel", enabled: true, order: 1, data: { limit: 8 } });
|
|
418
|
+
return sections;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
function findCategory(categories: ThemeCategory[], slug: string | null): ThemeCategory | null {
|
|
422
|
+
if (!slug) return null;
|
|
423
|
+
for (const category of categories) {
|
|
424
|
+
if (category.slug === slug) return category;
|
|
425
|
+
const nested = findCategory(category.children, slug);
|
|
426
|
+
if (nested) return nested;
|
|
427
|
+
}
|
|
428
|
+
return null;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
function catalogHref(route: Extract<ThemeRoute, { type: "catalog" }>, page: number): string {
|
|
432
|
+
const params = new URLSearchParams();
|
|
433
|
+
if (route.search) params.set("busca", route.search);
|
|
434
|
+
route.variants.forEach((variant) => params.append("variante", variant));
|
|
435
|
+
if (page > 1) params.set("pagina", String(page));
|
|
436
|
+
const pathname = route.categoryPath.length ? categoryUrl(route.categoryPath) : "/produtos";
|
|
437
|
+
return params.size ? `${pathname}?${params}` : pathname;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
function pageNumbers(current: number, total: number): number[] {
|
|
441
|
+
return [...new Set([1, total, current - 1, current, current + 1])]
|
|
442
|
+
.filter((page) => page > 0 && page <= total)
|
|
443
|
+
.sort((a, b) => a - b);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
function CatalogPage({ route, context, adapters }: {
|
|
447
|
+
route: Extract<ThemeRoute, { type: "catalog" }>;
|
|
448
|
+
context: ThemeContext;
|
|
449
|
+
adapters: ThemeRuntimeAdapters;
|
|
450
|
+
}) {
|
|
451
|
+
const { Link } = adapters;
|
|
452
|
+
const selected = findCategory(route.categories, route.categorySlug);
|
|
453
|
+
const catalog = context.site.settings?.catalog ?? fallbackCatalog;
|
|
454
|
+
return <main className="catalog-page">
|
|
455
|
+
<section className="catalog-hero"><div className="store-container"><span>Nosso catálogo</span><h1>{route.search ? `Busca por “${route.search}”` : selected?.name || "Todos os produtos"}</h1><p>{route.search ? `${route.pagination.total} resultado${route.pagination.total === 1 ? "" : "s"} encontrado${route.pagination.total === 1 ? "" : "s"}.` : selected?.description || "Encontre o produto certo para o que você precisa."}</p></div></section>
|
|
456
|
+
<div className="store-container catalog-layout">
|
|
457
|
+
<aside className="category-filter catalog-filters">
|
|
458
|
+
<form action={route.categoryPath.length ? categoryUrl(route.categoryPath) : "/produtos"} className="catalog-filter-form"><label htmlFor="theme-catalog-search">Buscar no catálogo</label><div className="catalog-filter-search"><input id="theme-catalog-search" name="busca" type="search" defaultValue={route.search} placeholder="Nome do produto" /><button type="submit" aria-label="Pesquisar"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7" /><path d="m16.5 16.5 4 4" /></svg></button></div></form>
|
|
459
|
+
<div className="catalog-filter-section catalog-category-tree"><strong>Categorias</strong><Link className={!route.categorySlug ? "active" : ""} href="/produtos">Todos os produtos</Link><CategoryTree adapters={adapters} categories={route.categories} /></div>
|
|
460
|
+
{route.facets.length > 0 && <form action={route.categoryPath.length ? categoryUrl(route.categoryPath) : "/produtos"} className="catalog-variant-filters">
|
|
461
|
+
{route.search && <input type="hidden" name="busca" value={route.search} />}
|
|
462
|
+
{route.facets.map((facet) => <fieldset className="catalog-filter-section" key={facet.name}><legend>{facet.name}</legend>{facet.values.map(({ value, count }) => { const token = `${facet.name}::${value}`; return <label className="catalog-filter-checkbox" key={token}><input type="checkbox" name="variante" value={token} defaultChecked={route.variants.includes(token)} /><span>{value}</span><small>{count}</small></label>; })}</fieldset>)}
|
|
463
|
+
<button type="submit" className="button button-primary button-block">Aplicar filtros</button>
|
|
464
|
+
</form>}
|
|
465
|
+
{(route.categorySlug || route.search || route.variants.length) && <Link className="catalog-clear-filters" href="/produtos">Limpar todos os filtros</Link>}
|
|
466
|
+
</aside>
|
|
467
|
+
<section className="catalog-results">
|
|
468
|
+
<div className="catalog-toolbar"><span>{route.pagination.total} {route.pagination.total === 1 ? "produto" : "produtos"}</span></div>
|
|
469
|
+
{route.products.length ? <div className="product-grid" data-columns={catalog.desktopColumns}>{route.products.map((product) => <ProductCard adapters={adapters} context={context} product={product} key={product.slug} />)}</div> : <div className="empty-state"><span>7</span><h2>Nenhum produto encontrado</h2><p>Novos itens aparecerão aqui assim que forem publicados.</p></div>}
|
|
470
|
+
{route.pagination.totalPages > 1 && <nav className="catalog-pagination" aria-label="Paginação dos produtos">
|
|
471
|
+
<Link className={!route.pagination.hasPreviousPage ? "disabled" : ""} href={catalogHref(route, Math.max(1, route.pagination.page - 1))}><span>‹</span> Anterior</Link>
|
|
472
|
+
<div className="catalog-pagination-pages">{pageNumbers(route.pagination.page, route.pagination.totalPages).map((page, index, pages) => <span className="catalog-pagination-item" key={page}>{index > 0 && page - pages[index - 1] > 1 && <span className="catalog-pagination-ellipsis">…</span>}<Link className={page === route.pagination.page ? "active" : ""} href={catalogHref(route, page)}>{page}</Link></span>)}</div>
|
|
473
|
+
<Link className={!route.pagination.hasNextPage ? "disabled" : ""} href={catalogHref(route, route.pagination.page + 1)}>Próxima <span>›</span></Link>
|
|
474
|
+
</nav>}
|
|
475
|
+
</section>
|
|
476
|
+
</div>
|
|
477
|
+
</main>;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
function ProductPage({ product, context, adapters }: {
|
|
481
|
+
product: ThemeProduct;
|
|
482
|
+
context: ThemeContext;
|
|
483
|
+
adapters: ThemeRuntimeAdapters;
|
|
484
|
+
}) {
|
|
485
|
+
const { Link, Image } = adapters;
|
|
486
|
+
const [selectedVariantId, setSelectedVariantId] = useState<string | null>(null);
|
|
487
|
+
const selectedVariant = product.variants.find((variant) => variant.id === selectedVariantId);
|
|
488
|
+
const images = useMemo(() => {
|
|
489
|
+
if (selectedVariant?.image?.url) return [selectedVariant.image];
|
|
490
|
+
const unique = new Map<string, NonNullable<typeof product.image>>();
|
|
491
|
+
[product.image, ...product.images].forEach((image) => { if (image?.url) unique.set(image.url, image); });
|
|
492
|
+
return [...unique.values()];
|
|
493
|
+
}, [product.image, product.images, selectedVariant]);
|
|
494
|
+
const [selectedImageUrl, setSelectedImageUrl] = useState<string | null>(null);
|
|
495
|
+
const selectedImage = images.find((image) => image.url === selectedImageUrl) || images[0] || product.image;
|
|
496
|
+
const whatsapp = context.site.settings?.contact.whatsapp?.replace(/\D/g, "");
|
|
497
|
+
const quoteUrl = whatsapp ? `https://wa.me/${whatsapp}?text=${encodeURIComponent(`Olá! Gostaria de solicitar um orçamento para ${product.title}.`)}` : null;
|
|
498
|
+
|
|
499
|
+
return <main className="product-page"><div className="store-container">
|
|
500
|
+
<nav className="breadcrumbs"><Link href="/">Início</Link><span>/</span><Link href="/produtos">Produtos</Link><span>/</span><strong>{product.title}</strong></nav>
|
|
501
|
+
<div className="product-detail">
|
|
502
|
+
<div className="product-gallery"><div className="product-main-image"><Image image={selectedImage} fallbackAlt={selectedVariant?.name || product.title} priority /></div>{images.length > 1 && <div className="product-thumbnails">{images.map((image, index) => <button className={selectedImage?.url === image.url ? "active" : ""} type="button" onClick={() => setSelectedImageUrl(image.url)} key={`${image.url}-${index}`}><Image image={image} fallbackAlt={`${product.title} ${index + 1}`} /></button>)}</div>}</div>
|
|
503
|
+
<div className="product-info">{product.categories[0] && <span className="product-category">{product.categories[0].name}</span>}<h1>{product.title}</h1><div className="product-description">{plainText(product.description)}</div>
|
|
504
|
+
{product.variants.length > 0 && <div className="variant-selector"><fieldset><legend>Escolha uma variação</legend><div className="variant-values">{product.variants.filter((variant) => variant.active).map((variant) => <button className={variant.id === selectedVariantId ? "active" : ""} type="button" key={variant.id || variant.sku} onClick={() => { setSelectedVariantId(variant.id); setSelectedImageUrl(null); }}>{variant.name || variant.values.map((value) => value.value).join(" / ")}</button>)}</div></fieldset></div>}
|
|
505
|
+
<div className="product-purchase">{quoteUrl ? <a className="button button-primary button-block" href={quoteUrl} target="_blank" rel="noreferrer">Solicitar orçamento pelo WhatsApp</a> : <span className="button button-secondary button-block">Entre em contato para orçar</span>}</div>
|
|
506
|
+
<div className="purchase-benefits"><span><strong>Atendimento direto</strong> Fale com quem entende do produto</span><span><strong>Orçamento personalizado</strong> Condições para a sua necessidade</span></div>
|
|
507
|
+
</div>
|
|
508
|
+
</div>
|
|
509
|
+
</div></main>;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
function RouteContent({ route, context, adapters, home }: {
|
|
513
|
+
route: ThemeRoute;
|
|
514
|
+
context: ThemeContext;
|
|
515
|
+
adapters: ThemeRuntimeAdapters;
|
|
516
|
+
home: ReactNode;
|
|
517
|
+
}) {
|
|
518
|
+
if (route.type === "home") return home;
|
|
519
|
+
if (route.type === "loading") return <main className="not-found-page"><div className="not-found-card"><span>Carregando</span><h1>Buscando conteúdo da loja</h1></div></main>;
|
|
520
|
+
if (route.type === "not-found") return <main className="not-found-page"><div className="not-found-card"><span>404</span><h1>Conteúdo não encontrado</h1><adapters.Link className="button button-primary" href="/">Voltar ao início</adapters.Link></div></main>;
|
|
521
|
+
if (route.type === "catalog") return <CatalogPage adapters={adapters} context={context} route={route} />;
|
|
522
|
+
if (route.type === "product") return <ProductPage adapters={adapters} context={context} product={route.product} />;
|
|
523
|
+
if (route.type === "editorial-list") return <main className="catalog-page"><section className="catalog-hero"><div className="store-container"><span>Conteúdo</span><h1>{route.title}</h1></div></section><section className="store-section"><div className="store-container"><EditorialCards adapters={adapters} basePath={route.basePath} items={route.items} /></div></section></main>;
|
|
524
|
+
if (route.type === "editorial-detail") return <main className="store-section"><article className="store-container editorial-content"><span>Conteúdo</span><h1>{route.item.title}</h1><p>{route.item.description}</p></article></main>;
|
|
525
|
+
return <main className="store-section"><article className="store-container editorial-content"><h1>{route.title}</h1></article></main>;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
function Footer({ context, adapters }: DefaultThemeProps) {
|
|
529
|
+
const { Link } = adapters;
|
|
530
|
+
const settings = context.site.settings;
|
|
531
|
+
const name = settings?.siteName || context.store.name;
|
|
532
|
+
const extraLinks = moduleLinks(context);
|
|
533
|
+
return <footer className="store-footer">
|
|
534
|
+
<div className="store-container footer-grid">
|
|
535
|
+
<div><strong className="footer-brand">{name}</strong><p>{settings?.description || template.footerTagline}</p></div>
|
|
536
|
+
<div><strong>Navegação</strong>{context.site.modules.includes("PRODUCTS") && <Link href="/produtos">Todos os produtos</Link>}{extraLinks.map((item) => <Link href={item.href} key={item.href}>{item.label}</Link>)}<Link href="/">Início</Link></div>
|
|
537
|
+
<div><strong>Atendimento</strong>{settings?.contact.email && <a href={`mailto:${settings.contact.email}`}>{settings.contact.email}</a>}{settings?.contact.phone && <a href={`tel:${settings.contact.phone}`}>{settings.contact.phone}</a>}{settings?.contact.address && <span>{settings.contact.address}</span>}</div>
|
|
538
|
+
</div>
|
|
539
|
+
<div className="store-container footer-bottom"><span>© {new Date().getFullYear()} {name}</span><span>{template.footerNote}</span></div>
|
|
540
|
+
</footer>;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
function FloatingWhatsapp({ context }: { context: ThemeContext }) {
|
|
544
|
+
const settings = context.site.settings;
|
|
545
|
+
const floating = settings?.floatingWhatsapp;
|
|
546
|
+
const phone = settings?.contact.whatsapp?.replace(/\D/g, "");
|
|
547
|
+
if (!floating?.enabled || !phone) return null;
|
|
548
|
+
const label = floating.label?.trim() || "Fale conosco";
|
|
549
|
+
const url = `https://wa.me/${phone}?text=${encodeURIComponent(floating.message)}`;
|
|
550
|
+
return <a className="floating-whatsapp" href={url} target="_blank" rel="noreferrer" aria-label={`${label} pelo WhatsApp`}><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479s1.065 2.875 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.262.489 1.694.626.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.29.173-1.414-.074-.123-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.981.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.9 6.986c-.002 5.45-4.437 9.884-9.892 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.3-1.654a11.882 11.882 0 0 0 5.689 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413Z" /></svg><span>{label}</span></a>;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
export function DefaultTheme({ context, adapters, route = { type: "home" } }: DefaultThemeProps) {
|
|
554
|
+
const configured = context.site.settings?.theme;
|
|
555
|
+
const colors = configured?.colors ?? fallbackColors;
|
|
556
|
+
const layout = configured?.layout;
|
|
557
|
+
const style = {
|
|
558
|
+
"--color-primary": colors.primary,
|
|
559
|
+
"--color-secondary": colors.secondary,
|
|
560
|
+
"--store-background": colors.background,
|
|
561
|
+
"--store-text": colors.text,
|
|
562
|
+
"--container-width": `${layout?.containerWidth ?? 1280}px`,
|
|
563
|
+
"--border-radius": `${layout?.borderRadius ?? 18}px`,
|
|
564
|
+
} as CSSProperties;
|
|
565
|
+
const visible = context.home.content.sections.filter((section) => section.enabled).sort((a, b) => a.order - b.order);
|
|
566
|
+
const sections = visible.length ? visible : fallbackSections(context);
|
|
567
|
+
|
|
568
|
+
return <div className="store-shell nuvler-default-theme" data-theme-id="nuvler-default" data-theme-version="1.0.0" style={style}>
|
|
569
|
+
<Header adapters={adapters} context={context} />
|
|
570
|
+
<div className="store-page"><RouteContent adapters={adapters} context={context} route={route} home={<main>{sections.map((section, index) => {
|
|
571
|
+
const Renderer = defaultSectionRegistry[section.type];
|
|
572
|
+
return Renderer ? <Renderer adapters={adapters} context={context} key={`${section.type}-${section.order}-${index}`} section={section} /> : null;
|
|
573
|
+
})}<section className="benefits-section"><div className="store-container benefits-grid">{template.benefits.map((benefit) => <div key={benefit.title}><strong>{benefit.title}</strong><span>{benefit.description}</span></div>)}</div></section></main>} /></div>
|
|
574
|
+
<Footer adapters={adapters} context={context} />
|
|
575
|
+
<FloatingWhatsapp context={context} />
|
|
576
|
+
</div>;
|
|
577
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
NuvlerThemeComponent,
|
|
3
|
+
NuvlerThemeProps,
|
|
4
|
+
ThemeImageProps,
|
|
5
|
+
ThemeLinkProps,
|
|
6
|
+
ThemeRoute,
|
|
7
|
+
ThemeRuntimeAdapters,
|
|
8
|
+
} from "@nuvler/theme-sdk";
|
|
9
|
+
|
|
10
|
+
export type DefaultThemeProps = NuvlerThemeProps;
|
|
11
|
+
export type {
|
|
12
|
+
NuvlerThemeComponent,
|
|
13
|
+
NuvlerThemeProps,
|
|
14
|
+
ThemeImageProps,
|
|
15
|
+
ThemeLinkProps,
|
|
16
|
+
ThemeRoute,
|
|
17
|
+
ThemeRuntimeAdapters,
|
|
18
|
+
} from "@nuvler/theme-sdk";
|
|
19
|
+
|
|
20
|
+
export { DefaultTheme, defaultSectionRegistry } from "./default-theme.js";
|
|
21
|
+
export type {
|
|
22
|
+
ThemeSectionRenderer,
|
|
23
|
+
ThemeSectionRendererProps,
|
|
24
|
+
ThemeSectionRegistry,
|
|
25
|
+
} from "./default-theme.js";
|