@nuvler/cli 0.4.1 → 0.4.3
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 -2
- package/dist/commands/theme/create.js +2 -2
- package/dist/commands/theme/validate.js +21 -0
- package/dist/commands/theme/validate.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/migrate/generator.js +6 -5
- package/dist/migrate/generator.js.map +1 -1
- package/dist/nuvler.js +163 -10
- package/dist/nuvler.js.map +1 -1
- package/dist/templates/nuvler-atelier/nuvler.theme.json +1 -1
- package/dist/templates/nuvler-atelier/package.json +2 -2
- package/dist/templates/nuvler-atelier/src/definition.tsx +10 -9
- package/dist/templates/nuvler-atelier/src/theme.tsx +2 -2
- package/dist/templates/nuvler-default/README.md +50 -4
- package/dist/templates/nuvler-default/nuvler.theme.json +2 -2
- package/dist/templates/nuvler-default/package.json +37 -5
- package/dist/templates/nuvler-default/src/banner-carousel.tsx +42 -12
- package/dist/templates/nuvler-default/src/carousel-frame.tsx +58 -0
- package/dist/templates/nuvler-default/src/definition.ts +9 -59
- package/dist/templates/nuvler-default/src/footer.tsx +7 -2
- package/dist/templates/nuvler-default/src/header-interactions.tsx +114 -12
- package/dist/templates/nuvler-default/src/header.tsx +7 -5
- package/dist/templates/nuvler-default/src/home.tsx +61 -20
- package/dist/templates/nuvler-default/src/index.ts +1 -0
- package/dist/templates/nuvler-default/src/product-carousel.tsx +13 -7
- package/dist/templates/nuvler-default/src/product-detail-interactive.tsx +261 -0
- package/dist/templates/nuvler-default/src/product-detail.tsx +80 -55
- package/dist/templates/nuvler-default/src/products.tsx +9 -6
- package/dist/templates/nuvler-default/src/server-shell.tsx +91 -0
- package/dist/templates/nuvler-default/src/shared.tsx +28 -16
- package/dist/templates/nuvler-default/src/theme-component.tsx +6 -5
- package/dist/templates/nuvler-default/src/theme-config.ts +63 -0
- package/dist/templates/nuvler-default/src/theme.css +159 -3
- package/dist/templates/starter/nuvler.theme.json +1 -1
- package/dist/templates/starter/package.json +2 -2
- package/dist/templates/starter/src/definition.tsx +3 -2
- package/dist/theme/performance.js +126 -0
- package/dist/theme/performance.js.map +1 -0
- package/package.json +2 -2
- package/preview-host/package.json +1 -1
- package/preview-host/vendor/theme-runtime/default-theme.tsx +13 -12
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useMemo, useState, type CSSProperties } from "react";
|
|
4
|
-
import type
|
|
4
|
+
import { productUrl, type NuvlerStoreThemeDefinition, type ThemeCartItem, type ThemeCategory, type ThemeEditorialItem, type ThemeHomeSection, type ThemeNavigationItem, type ThemePageSummary, type ThemeProduct, type ThemeRuntimeAdapters, type ThemeSite } from "@nuvler/theme-sdk";
|
|
5
5
|
import { nuvlerDefaultTheme } from "./definition.js";
|
|
6
|
+
import { ThemeInteractionProvider } from "./product-detail-interactive.js";
|
|
6
7
|
import { plainText, ThemeImageView } from "./shared.js";
|
|
7
8
|
|
|
8
9
|
interface PreviewContext {
|
|
9
10
|
store: { name: string; slug: string };
|
|
10
11
|
site: { modules: string[]; settings: ThemeSite["settings"] };
|
|
11
|
-
navigation: { pages: ThemePageSummary[]; categories: ThemeCategory[] };
|
|
12
|
+
navigation: { pages: ThemePageSummary[]; categories: ThemeCategory[]; menu?: ThemeNavigationItem[] };
|
|
12
13
|
home: { content: { sections: ThemeHomeSection[] } };
|
|
13
14
|
catalog: { products: ThemeProduct[] };
|
|
14
15
|
editorial: { posts: ThemeEditorialItem[]; services: ThemeEditorialItem[]; cases: ThemeEditorialItem[] };
|
|
@@ -37,7 +38,7 @@ function catalogHref(route: Extract<PreviewRoute, { type: "catalog" }>, page: nu
|
|
|
37
38
|
if (route.search) params.set("busca", route.search);
|
|
38
39
|
route.variants.forEach((variant) => params.append("variante", variant));
|
|
39
40
|
if (page > 1) params.set("pagina", String(page));
|
|
40
|
-
const pathname = route.categoryPath.length ?
|
|
41
|
+
const pathname = route.categoryPath.length ? `/${route.categoryPath.map(encodeURIComponent).join("/")}` : "/produtos";
|
|
41
42
|
return params.size ? `${pathname}?${params}` : pathname;
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -94,11 +95,11 @@ export function createNuvlerDefaultRuntime(themeDefinition: NuvlerStoreThemeDefi
|
|
|
94
95
|
let content;
|
|
95
96
|
if (route.type === "home") content = <main><Home sections={context.home.content.sections} products={context.catalog.products} posts={context.editorial.posts} services={context.editorial.services} cases={context.editorial.cases} site={site} template={themeDefinition.template} /></main>;
|
|
96
97
|
else if (route.type === "product") content = <main className="product-page"><div className="store-container"><nav className="breadcrumbs" aria-label="Navegação estrutural"><a href="/">Início</a><span>/</span><a href="/produtos">Produtos</a><span>/</span><strong>{route.product.title}</strong></nav><ProductDetail product={route.product} contact={site.settings?.contact} productUrl={window.location.href} descriptionContent={<p>{plainText(route.product.description)}</p>} onAddToCart={addToCart} /></div></main>;
|
|
97
|
-
else if (route.type === "catalog") content = <main className="catalog-page"><section className="catalog-hero"><div className="store-container"><span>Nosso catálogo</span><h1>{route.search ? `Busca por “${route.search}”` : "Todos os produtos"}</h1><p>{route.pagination.total} produto(s)</p></div></section><div className="store-container catalog-layout"><aside className="category-filter catalog-filters"><form action={route.categoryPath.length ?
|
|
98
|
+
else if (route.type === "catalog") content = <main className="catalog-page"><section className="catalog-hero"><div className="store-container"><span>Nosso catálogo</span><h1>{route.search ? `Busca por “${route.search}”` : "Todos os produtos"}</h1><p>{route.pagination.total} produto(s)</p></div></section><div className="store-container catalog-layout"><aside className="category-filter catalog-filters"><form action={route.categoryPath.length ? `/${route.categoryPath.join("/")}` : "/produtos"} className="catalog-filter-form"><label htmlFor="preview-catalog-search">Buscar no catálogo</label><div className="catalog-filter-search"><input id="preview-catalog-search" name="busca" type="search" defaultValue={route.search} placeholder="Nome do produto" /><button type="submit" aria-label="Pesquisar">⌕</button></div></form>{route.facets.length > 0 && <form className="catalog-variant-filters">{route.search && <input type="hidden" name="busca" value={route.search} />}{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>)}<button type="submit" className="button button-primary button-block">Aplicar filtros</button></form>}</aside><section className="catalog-results"><ProductGrid products={route.products} columns={site.settings?.catalog?.desktopColumns || 3} showCategory={site.settings?.catalog?.showCategory} showDescription={site.settings?.catalog?.showDescription} />{route.pagination.totalPages > 1 && <nav className="catalog-pagination" aria-label="Paginação dos produtos"><a className={route.pagination.hasPreviousPage ? "" : "disabled"} href={catalogHref(route, Math.max(1, route.pagination.page - 1))}><span>‹</span> Anterior</a><div className="catalog-pagination-pages"><span className="catalog-pagination-item"><a className="active" href={catalogHref(route, route.pagination.page)}>{route.pagination.page}</a></span></div><a className={route.pagination.hasNextPage ? "" : "disabled"} href={catalogHref(route, Math.min(route.pagination.totalPages, route.pagination.page + 1))}>Próxima <span>›</span></a></nav>}</section></div></main>;
|
|
98
99
|
else if (route.type === "editorial-list") content = <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"><EditorialPreview items={route.items} basePath={route.basePath} /></div></section></main>;
|
|
99
100
|
else if (route.type === "editorial-detail") content = <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>;
|
|
100
101
|
else content = <main className="not-found-page"><div className="not-found-card"><span>{route.type === "loading" ? "Carregando" : "404"}</span><h1>{route.title || (route.type === "loading" ? "Buscando conteúdo da loja" : "Conteúdo não encontrado")}</h1></div></main>;
|
|
101
|
-
return <div className="store-shell nuvler-default-theme" data-theme-id={themeDefinition.manifest.id} data-theme-version={themeDefinition.manifest.version} style={style}><Header site={site} categories={context.navigation.categories} pages={context.navigation.pages} template={themeDefinition.template} searchProducts={adapters?.searchProducts} cart={cartButton} /><div className="store-page">{content}</div><Footer site={site} pages={context.navigation.pages} template={themeDefinition.template} />{cartOpen && <div className="cart-backdrop" role="presentation" onPointerDown={(event) => event.target === event.currentTarget && setCartOpen(false)}><aside className="cart-drawer" aria-label="Carrinho de orçamento"><div className="cart-heading"><div><small>Seu orçamento</small><strong>{cartCount} {cartCount === 1 ? "item" : "itens"}</strong></div><button type="button" onClick={() => setCartOpen(false)} aria-label="Fechar carrinho">×</button></div><div className="cart-items">{!cartItems.length && <div className="cart-empty"><strong>Seu carrinho está vazio</strong><p>Abra um produto e adicione-o para montar a solicitação.</p><button type="button" onClick={() => setCartOpen(false)}>Continuar navegando</button></div>}{cartItems.map((item) => <article className="cart-item" key={item.key}><a href={
|
|
102
|
+
return <ThemeInteractionProvider onAddToCart={addToCart}><div className="store-shell nuvler-default-theme" data-theme-id={themeDefinition.manifest.id} data-theme-version={themeDefinition.manifest.version} style={style}><Header site={site} categories={context.navigation.categories} pages={context.navigation.pages} menu={context.navigation.menu} template={themeDefinition.template} searchProducts={adapters?.searchProducts} cart={cartButton} /><div className="store-page">{content}</div><Footer site={site} pages={context.navigation.pages} template={themeDefinition.template} />{cartOpen && <div className="cart-backdrop" role="presentation" onPointerDown={(event) => event.target === event.currentTarget && setCartOpen(false)}><aside className="cart-drawer" aria-label="Carrinho de orçamento"><div className="cart-heading"><div><small>Seu orçamento</small><strong>{cartCount} {cartCount === 1 ? "item" : "itens"}</strong></div><button type="button" onClick={() => setCartOpen(false)} aria-label="Fechar carrinho">×</button></div><div className="cart-items">{!cartItems.length && <div className="cart-empty"><strong>Seu carrinho está vazio</strong><p>Abra um produto e adicione-o para montar a solicitação.</p><button type="button" onClick={() => setCartOpen(false)}>Continuar navegando</button></div>}{cartItems.map((item) => <article className="cart-item" key={item.key}><a href={item.productUrl || productUrl({ slug: item.productSlug })} onClick={() => setCartOpen(false)}><ThemeImageView image={item.image} fallbackAlt={item.title} /></a><div><strong>{item.title}</strong>{item.variantName && <small>{item.variantName}</small>}{item.sku && <small>Ref. {item.sku}</small>}<div className="cart-quantity"><button type="button" onClick={() => setCartItems((current) => current.flatMap((candidate) => candidate.key !== item.key ? [candidate] : candidate.quantity > 1 ? [{ ...candidate, quantity: candidate.quantity - 1 }] : []))}>−</button><span>{item.quantity}</span><button type="button" onClick={() => setCartItems((current) => current.map((candidate) => candidate.key === item.key ? { ...candidate, quantity: Math.min(99, candidate.quantity + 1) } : candidate))}>+</button><button type="button" className="cart-remove" onClick={() => setCartItems((current) => current.filter((candidate) => candidate.key !== item.key))}>Remover</button></div></div></article>)}</div>{cartItems.length > 0 && <footer className="cart-footer"><p>O valor e a disponibilidade serão confirmados pela loja.</p>{checkoutUrl ? <a className="button button-primary button-block" href={checkoutUrl} target="_blank" rel="noreferrer">Enviar orçamento pelo WhatsApp</a> : <p className="cart-warning">Configure o WhatsApp da loja para enviar o orçamento.</p>}</footer>}</aside></div>}</div></ThemeInteractionProvider>;
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
Theme.displayName = `NuvlerThemeRuntime(${themeDefinition.manifest.id})`;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import manifestData from "../nuvler.theme.json" with { type: "json" };
|
|
2
|
+
import type {
|
|
3
|
+
SiteTemplate,
|
|
4
|
+
ThemeHomeSection,
|
|
5
|
+
ThemeManifest,
|
|
6
|
+
NuvlerStoreThemeDefinition,
|
|
7
|
+
} from "@nuvler/theme-sdk";
|
|
8
|
+
|
|
9
|
+
function section(id: string, type: ThemeHomeSection["type"], order: number): ThemeHomeSection {
|
|
10
|
+
return { id, type, enabled: true, order, data: {} };
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const manifest = manifestData as ThemeManifest;
|
|
14
|
+
|
|
15
|
+
export const nuvlerDefaultTokens = {
|
|
16
|
+
colors: {
|
|
17
|
+
primary: "#176b3a",
|
|
18
|
+
primaryText: "#ffffff",
|
|
19
|
+
secondary: "#d99b31",
|
|
20
|
+
secondaryText: "#18221b",
|
|
21
|
+
accent: "#b45309",
|
|
22
|
+
background: "#f7f7f2",
|
|
23
|
+
surface: "#ffffff",
|
|
24
|
+
surfaceAlt: "#eef2e9",
|
|
25
|
+
text: "#18221b",
|
|
26
|
+
textMuted: "#657068",
|
|
27
|
+
border: "#dfe4dd",
|
|
28
|
+
headerBackground: "#ffffff",
|
|
29
|
+
headerText: "#18221b",
|
|
30
|
+
footerBackground: "#14251a",
|
|
31
|
+
footerText: "#f7f7f2",
|
|
32
|
+
},
|
|
33
|
+
layout: { containerWidth: 1280, borderRadius: 18 },
|
|
34
|
+
} satisfies NuvlerStoreThemeDefinition["tokens"];
|
|
35
|
+
|
|
36
|
+
export const nuvlerDefaultTemplate = {
|
|
37
|
+
announcement: "Soluções, conteúdo e atendimento para o seu negócio",
|
|
38
|
+
footerTagline: "Soluções, conteúdo e atendimento próximo para aproximar sua marca das pessoas.",
|
|
39
|
+
footerNavigationLabel: "Navegação",
|
|
40
|
+
footerNote: "Conteúdo e atendimento que geram confiança",
|
|
41
|
+
socialLabel: "Acompanhe a empresa",
|
|
42
|
+
benefits: [
|
|
43
|
+
{ title: "Soluções sob medida", description: "Serviços pensados para o seu momento" },
|
|
44
|
+
{ title: "Conteúdo relevante", description: "Informação para ajudar nas decisões" },
|
|
45
|
+
{ title: "Atendimento próximo", description: "Fale diretamente com a empresa" },
|
|
46
|
+
],
|
|
47
|
+
fallbackSections(modules) {
|
|
48
|
+
const sections = [section("default-hero", "hero", 0)];
|
|
49
|
+
let order = 1;
|
|
50
|
+
if (modules.includes("SERVICES")) sections.push(section("default-services", "services-grid", order++));
|
|
51
|
+
if (modules.includes("CASES")) sections.push(section("default-cases", "cases-grid", order++));
|
|
52
|
+
if (modules.includes("PRODUCTS")) sections.push(section("default-products", "products-carousel", order++));
|
|
53
|
+
if (modules.includes("BLOG")) sections.push(section("default-blog", "blog-grid", order));
|
|
54
|
+
return sections;
|
|
55
|
+
},
|
|
56
|
+
primaryAction(modules) {
|
|
57
|
+
if (modules.includes("SERVICES")) return { label: "Conheça nossos serviços", href: "/servicos" };
|
|
58
|
+
if (modules.includes("PRODUCTS")) return { label: "Ver produtos", href: "/produtos" };
|
|
59
|
+
if (modules.includes("CASES")) return { label: "Conheça nossos cases", href: "/cases" };
|
|
60
|
+
if (modules.includes("BLOG")) return { label: "Ver conteúdos", href: "/blog" };
|
|
61
|
+
return { label: "Conheça a empresa", href: "/" };
|
|
62
|
+
},
|
|
63
|
+
} satisfies SiteTemplate;
|
|
@@ -44,7 +44,6 @@ body {
|
|
|
44
44
|
margin: 0;
|
|
45
45
|
background: var(--store-background);
|
|
46
46
|
color: var(--store-text);
|
|
47
|
-
font-family: Arial, Helvetica, sans-serif;
|
|
48
47
|
-webkit-font-smoothing: antialiased;
|
|
49
48
|
}
|
|
50
49
|
|
|
@@ -52,6 +51,17 @@ body {
|
|
|
52
51
|
min-height: 100vh;
|
|
53
52
|
background: var(--store-background);
|
|
54
53
|
color: var(--store-text);
|
|
54
|
+
font-family: var(
|
|
55
|
+
--nuvler-font-sans,
|
|
56
|
+
ui-sans-serif,
|
|
57
|
+
system-ui,
|
|
58
|
+
-apple-system,
|
|
59
|
+
BlinkMacSystemFont,
|
|
60
|
+
"Segoe UI",
|
|
61
|
+
Arial,
|
|
62
|
+
Helvetica,
|
|
63
|
+
sans-serif
|
|
64
|
+
);
|
|
55
65
|
}
|
|
56
66
|
|
|
57
67
|
.floating-whatsapp {
|
|
@@ -506,6 +516,7 @@ select {
|
|
|
506
516
|
.mobile-menu-links a { padding: 12px 4px; font-size: 13px; font-weight: 750; }
|
|
507
517
|
.mobile-menu-categories { padding: 18px 16px; }
|
|
508
518
|
.mobile-menu-categories h2 { margin: 0 0 10px; color: var(--store-muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
|
|
519
|
+
.mobile-menu-category-status { margin: 0 0 10px; color: var(--store-muted); font-size: 12px; }
|
|
509
520
|
.mobile-menu-categories > a,
|
|
510
521
|
.mobile-menu-category > summary { display: flex; min-height: 44px; align-items: center; justify-content: space-between; border-bottom: 1px solid color-mix(in srgb, var(--store-line), transparent 35%); padding: 8px 4px; cursor: pointer; font-size: 13px; font-weight: 750; list-style: none; }
|
|
511
522
|
.mobile-menu-category summary::-webkit-details-marker { display: none; }
|
|
@@ -637,6 +648,7 @@ select {
|
|
|
637
648
|
|
|
638
649
|
.main-nav {
|
|
639
650
|
display: flex;
|
|
651
|
+
position: relative;
|
|
640
652
|
min-height: 45px;
|
|
641
653
|
align-items: center;
|
|
642
654
|
justify-content: center;
|
|
@@ -645,6 +657,53 @@ select {
|
|
|
645
657
|
font-weight: 700;
|
|
646
658
|
}
|
|
647
659
|
|
|
660
|
+
.main-nav-group {
|
|
661
|
+
display: flex;
|
|
662
|
+
position: static;
|
|
663
|
+
min-height: 45px;
|
|
664
|
+
align-items: stretch;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
.main-nav-group > a {
|
|
668
|
+
display: inline-flex;
|
|
669
|
+
position: relative;
|
|
670
|
+
align-items: center;
|
|
671
|
+
gap: 5px;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.main-nav-group > a::after {
|
|
675
|
+
position: absolute;
|
|
676
|
+
right: 0;
|
|
677
|
+
bottom: 0;
|
|
678
|
+
left: 0;
|
|
679
|
+
height: 2px;
|
|
680
|
+
transform: scaleX(0);
|
|
681
|
+
background: var(--color-primary);
|
|
682
|
+
content: "";
|
|
683
|
+
transition: transform 160ms ease;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.main-nav-group:hover > a::after,
|
|
687
|
+
.main-nav-group:focus-within > a::after {
|
|
688
|
+
transform: scaleX(1);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.category-item-chevron {
|
|
692
|
+
width: 13px;
|
|
693
|
+
height: 13px;
|
|
694
|
+
fill: none;
|
|
695
|
+
stroke: currentColor;
|
|
696
|
+
stroke-width: 1.8;
|
|
697
|
+
transition: transform 160ms ease;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
.main-nav-group:hover .category-item-chevron,
|
|
701
|
+
.main-nav-group:focus-within .category-item-chevron,
|
|
702
|
+
.category-nav-group:hover .category-item-chevron,
|
|
703
|
+
.category-nav-group:focus-within .category-item-chevron {
|
|
704
|
+
transform: rotate(180deg);
|
|
705
|
+
}
|
|
706
|
+
|
|
648
707
|
.category-nav {
|
|
649
708
|
position: relative;
|
|
650
709
|
overflow: visible;
|
|
@@ -789,6 +848,13 @@ select {
|
|
|
789
848
|
scrollbar-width: thin;
|
|
790
849
|
}
|
|
791
850
|
|
|
851
|
+
.category-nav-status {
|
|
852
|
+
margin: 0;
|
|
853
|
+
padding: 12px 16px 0;
|
|
854
|
+
color: var(--store-muted);
|
|
855
|
+
font-size: 12px;
|
|
856
|
+
}
|
|
857
|
+
|
|
792
858
|
.category-nav-tree-node > a {
|
|
793
859
|
display: flex;
|
|
794
860
|
width: 100%;
|
|
@@ -848,10 +914,76 @@ select {
|
|
|
848
914
|
}
|
|
849
915
|
|
|
850
916
|
.category-nav-group:hover .category-nav-submenu,
|
|
851
|
-
.category-nav-group:focus-within .category-nav-submenu
|
|
917
|
+
.category-nav-group:focus-within .category-nav-submenu,
|
|
918
|
+
.main-nav-group:hover .configured-category-submenu,
|
|
919
|
+
.main-nav-group:focus-within .configured-category-submenu {
|
|
852
920
|
display: grid;
|
|
853
921
|
}
|
|
854
922
|
|
|
923
|
+
.configured-category-submenu {
|
|
924
|
+
grid-template-columns: minmax(0, 1fr);
|
|
925
|
+
gap: 0;
|
|
926
|
+
overflow: hidden;
|
|
927
|
+
padding: 0;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
.configured-category-heading {
|
|
931
|
+
display: flex;
|
|
932
|
+
align-items: center;
|
|
933
|
+
justify-content: space-between;
|
|
934
|
+
gap: 20px;
|
|
935
|
+
border-bottom: 1px solid var(--store-line);
|
|
936
|
+
padding: 18px 20px;
|
|
937
|
+
background: color-mix(in srgb, var(--color-secondary), transparent 93%);
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
.configured-category-heading > div {
|
|
941
|
+
display: grid;
|
|
942
|
+
gap: 3px;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
.configured-category-heading span {
|
|
946
|
+
color: var(--store-muted);
|
|
947
|
+
font-size: 9px;
|
|
948
|
+
font-weight: 850;
|
|
949
|
+
letter-spacing: .12em;
|
|
950
|
+
text-transform: uppercase;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
.configured-category-heading strong {
|
|
954
|
+
color: var(--store-text);
|
|
955
|
+
font-size: 17px;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
.main-nav .configured-category-heading > a {
|
|
959
|
+
border-radius: 999px;
|
|
960
|
+
background: var(--color-secondary);
|
|
961
|
+
padding: 9px 13px;
|
|
962
|
+
color: #fff;
|
|
963
|
+
font-size: 11px;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
.main-nav .configured-category-heading > a:hover {
|
|
967
|
+
background: color-mix(in srgb, var(--color-secondary), #000 14%);
|
|
968
|
+
color: #fff;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
.configured-category-grid {
|
|
972
|
+
display: grid;
|
|
973
|
+
max-height: 410px;
|
|
974
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
975
|
+
align-content: start;
|
|
976
|
+
gap: 8px 12px;
|
|
977
|
+
overflow-y: auto;
|
|
978
|
+
padding: 14px;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
.configured-category-grid > .category-nav-tree-node > a {
|
|
982
|
+
background: color-mix(in srgb, var(--color-secondary), transparent 93%);
|
|
983
|
+
font-size: 13px;
|
|
984
|
+
font-weight: 800;
|
|
985
|
+
}
|
|
986
|
+
|
|
855
987
|
.category-nav-submenu a {
|
|
856
988
|
display: flex;
|
|
857
989
|
width: 100%;
|
|
@@ -922,6 +1054,7 @@ select {
|
|
|
922
1054
|
|
|
923
1055
|
.category-nav-inner > .category-nav-group > a {
|
|
924
1056
|
position: relative;
|
|
1057
|
+
gap: 5px;
|
|
925
1058
|
color: var(--color-secondary);
|
|
926
1059
|
}
|
|
927
1060
|
|
|
@@ -1655,7 +1788,7 @@ select {
|
|
|
1655
1788
|
align-items: stretch;
|
|
1656
1789
|
overflow-x: auto;
|
|
1657
1790
|
gap: 22px;
|
|
1658
|
-
padding: 5px
|
|
1791
|
+
padding: 5px 0 25px;
|
|
1659
1792
|
scroll-behavior: smooth;
|
|
1660
1793
|
scroll-snap-type: x mandatory;
|
|
1661
1794
|
scrollbar-width: none;
|
|
@@ -1679,6 +1812,7 @@ select {
|
|
|
1679
1812
|
.product-carousel .carousel-arrow-next { right: -21px; }
|
|
1680
1813
|
|
|
1681
1814
|
.product-card {
|
|
1815
|
+
position: relative;
|
|
1682
1816
|
display: flex;
|
|
1683
1817
|
width: 100%;
|
|
1684
1818
|
height: 100%;
|
|
@@ -1775,9 +1909,21 @@ select {
|
|
|
1775
1909
|
}
|
|
1776
1910
|
|
|
1777
1911
|
.product-card-content > .button {
|
|
1912
|
+
position: relative;
|
|
1913
|
+
z-index: 1;
|
|
1778
1914
|
margin-top: auto;
|
|
1779
1915
|
}
|
|
1780
1916
|
|
|
1917
|
+
.product-card-details-link::after {
|
|
1918
|
+
position: absolute;
|
|
1919
|
+
inset: 0;
|
|
1920
|
+
content: "";
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
.product-card-action {
|
|
1924
|
+
cursor: pointer;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1781
1927
|
.benefits-section {
|
|
1782
1928
|
border-top: 1px solid var(--store-line);
|
|
1783
1929
|
border-bottom: 1px solid var(--store-line);
|
|
@@ -2221,6 +2367,16 @@ select {
|
|
|
2221
2367
|
object-fit: contain;
|
|
2222
2368
|
}
|
|
2223
2369
|
|
|
2370
|
+
.product-main-image > [data-product-main-image] {
|
|
2371
|
+
display: block;
|
|
2372
|
+
width: 100%;
|
|
2373
|
+
height: 100%;
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
.product-main-image > [data-product-main-image][hidden] {
|
|
2377
|
+
display: none;
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2224
2380
|
.product-thumbnails {
|
|
2225
2381
|
display: grid;
|
|
2226
2382
|
grid-template-columns: repeat(5, 1fr);
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@nuvler/theme-sdk": "^1.2.
|
|
15
|
+
"@nuvler/theme-sdk": "^1.2.2"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"react": "^19.0.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@nuvler/cli": "^0.4.
|
|
21
|
+
"@nuvler/cli": "^0.4.3",
|
|
22
22
|
"@types/react": "^19.0.0",
|
|
23
23
|
"react": "^19.0.0",
|
|
24
24
|
"typescript": "^5.9.0"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import manifestData from "../nuvler.theme.json" with { type: "json" };
|
|
2
2
|
import {
|
|
3
3
|
defineTheme,
|
|
4
|
+
productUrl,
|
|
4
5
|
type FooterProps,
|
|
5
6
|
type HeaderProps,
|
|
6
7
|
type HomeProps,
|
|
@@ -20,7 +21,7 @@ function Footer({ site }: FooterProps) {
|
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
function ProductGrid({ products }: ProductGridProps) {
|
|
23
|
-
return <div className="theme-products">{products.map((product) => <article key={product.slug}><a href={
|
|
24
|
+
return <div className="theme-products">{products.map((product) => <article key={product.slug}><a href={productUrl(product)}><strong>{product.title}</strong><span>{product.sku || "Ver produto"}</span></a></article>)}</div>;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
function Home({ products, site }: HomeProps) {
|
|
@@ -29,7 +30,7 @@ function Home({ products, site }: HomeProps) {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
function ProductDetail({ product, descriptionContent, onAddToCart }: ProductDetailProps) {
|
|
32
|
-
return <article className="theme-product-detail"><div><span>{product.categories[0]?.name || "Produto"}</span><h1>{product.title}</h1>{descriptionContent}</div><button type="button" onClick={() => onAddToCart?.({ productSlug: product.slug, title: product.title, sku: product.sku, image: product.image, unitPrice: product.promotionalPrice ?? product.price })}>Adicionar ao orçamento</button></article>;
|
|
33
|
+
return <article className="theme-product-detail"><div><span>{product.categories[0]?.name || "Produto"}</span><h1>{product.title}</h1>{descriptionContent}</div><button type="button" onClick={() => onAddToCart?.({ productSlug: product.slug, productUrl: productUrl(product), title: product.title, sku: product.sku, image: product.image, unitPrice: product.promotionalPrice ?? product.price })}>Adicionar ao orçamento</button></article>;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export const manifest = manifestData as ThemeManifest;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { readFile, readdir, stat } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { gzipSync } from "node:zlib";
|
|
4
|
+
import ts from "typescript";
|
|
5
|
+
const SOURCE_EXTENSIONS = new Set([".js", ".jsx", ".mjs", ".cjs", ".ts", ".tsx"]);
|
|
6
|
+
const IMAGE_EXTENSIONS = new Set([".avif", ".gif", ".jpeg", ".jpg", ".png", ".svg", ".webp"]);
|
|
7
|
+
const FONT_EXTENSIONS = new Set([".eot", ".otf", ".ttf", ".woff", ".woff2"]);
|
|
8
|
+
const IGNORED_DIRECTORIES = new Set([
|
|
9
|
+
".git",
|
|
10
|
+
".nuvler",
|
|
11
|
+
".next",
|
|
12
|
+
".vite",
|
|
13
|
+
"artifacts",
|
|
14
|
+
"dist",
|
|
15
|
+
"node_modules",
|
|
16
|
+
]);
|
|
17
|
+
export const DEFAULT_THEME_PERFORMANCE_BUDGET = {
|
|
18
|
+
cssGzipBytes: 50 * 1024,
|
|
19
|
+
clientJavaScriptGzipBytes: 120 * 1024,
|
|
20
|
+
imageTotalBytes: 5 * 1024 * 1024,
|
|
21
|
+
imageMaxBytes: 512 * 1024,
|
|
22
|
+
fontTotalBytes: 400 * 1024,
|
|
23
|
+
fontFiles: 4,
|
|
24
|
+
clientComponents: 8,
|
|
25
|
+
};
|
|
26
|
+
async function listProjectFiles(directory) {
|
|
27
|
+
const files = [];
|
|
28
|
+
async function visit(currentDirectory) {
|
|
29
|
+
const entries = await readdir(currentDirectory, { withFileTypes: true });
|
|
30
|
+
await Promise.all(entries.map(async (entry) => {
|
|
31
|
+
if (entry.isSymbolicLink())
|
|
32
|
+
return;
|
|
33
|
+
const absolutePath = path.join(currentDirectory, entry.name);
|
|
34
|
+
if (entry.isDirectory()) {
|
|
35
|
+
if (!IGNORED_DIRECTORIES.has(entry.name))
|
|
36
|
+
await visit(absolutePath);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (entry.isFile())
|
|
40
|
+
files.push(absolutePath);
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
await visit(directory);
|
|
44
|
+
return files.sort();
|
|
45
|
+
}
|
|
46
|
+
function hasUseClientDirective(source, filePath) {
|
|
47
|
+
const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, false, filePath.endsWith("x") ? ts.ScriptKind.TSX : ts.ScriptKind.TS);
|
|
48
|
+
for (const statement of sourceFile.statements) {
|
|
49
|
+
if (ts.isExpressionStatement(statement)
|
|
50
|
+
&& ts.isStringLiteral(statement.expression)) {
|
|
51
|
+
if (statement.expression.text === "use client")
|
|
52
|
+
return true;
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
async function totalSize(files) {
|
|
60
|
+
const sizes = await Promise.all(files.map(async (file) => (await stat(file)).size));
|
|
61
|
+
return sizes.reduce((total, size) => total + size, 0);
|
|
62
|
+
}
|
|
63
|
+
async function gzipFiles(files) {
|
|
64
|
+
if (!files.length)
|
|
65
|
+
return 0;
|
|
66
|
+
const contents = await Promise.all(files.map((file) => readFile(file)));
|
|
67
|
+
return gzipSync(Buffer.concat(contents), { level: 9 }).byteLength;
|
|
68
|
+
}
|
|
69
|
+
function metric(key, label, value, unit, available = true, detail) {
|
|
70
|
+
return {
|
|
71
|
+
key,
|
|
72
|
+
label,
|
|
73
|
+
value,
|
|
74
|
+
limit: DEFAULT_THEME_PERFORMANCE_BUDGET[key],
|
|
75
|
+
unit,
|
|
76
|
+
available,
|
|
77
|
+
detail,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export async function analyzeThemePerformance(project) {
|
|
81
|
+
const projectFiles = await listProjectFiles(project.directory);
|
|
82
|
+
const css = projectFiles.filter((file) => path.extname(file).toLowerCase() === ".css");
|
|
83
|
+
const images = projectFiles.filter((file) => IMAGE_EXTENSIONS.has(path.extname(file).toLowerCase()));
|
|
84
|
+
const fonts = projectFiles.filter((file) => FONT_EXTENSIONS.has(path.extname(file).toLowerCase()));
|
|
85
|
+
const sourceFiles = projectFiles.filter((file) => SOURCE_EXTENSIONS.has(path.extname(file).toLowerCase()));
|
|
86
|
+
const clientComponents = (await Promise.all(sourceFiles.map(async (file) => ({
|
|
87
|
+
file,
|
|
88
|
+
client: hasUseClientDirective(await readFile(file, "utf8"), file),
|
|
89
|
+
})))).filter(({ client }) => client).map(({ file }) => file);
|
|
90
|
+
const imageSizes = await Promise.all(images.map(async (file) => (await stat(file)).size));
|
|
91
|
+
const clientBundle = path.join(project.directory, "dist", "theme.js");
|
|
92
|
+
const hasClientBundle = await stat(clientBundle).then((details) => details.isFile()).catch(() => false);
|
|
93
|
+
const clientJavaScriptGzipBytes = hasClientBundle
|
|
94
|
+
? gzipSync(await readFile(clientBundle), { level: 9 }).byteLength
|
|
95
|
+
: 0;
|
|
96
|
+
const metrics = [
|
|
97
|
+
metric("cssGzipBytes", "CSS gzip", await gzipFiles(css), "bytes", true, `${css.length} arquivo(s)`),
|
|
98
|
+
metric("clientJavaScriptGzipBytes", "JS client gzip", clientJavaScriptGzipBytes, "bytes", hasClientBundle, hasClientBundle ? "dist/theme.js" : "execute nuvler theme build para medir"),
|
|
99
|
+
metric("imageTotalBytes", "Imagens (total)", imageSizes.reduce((total, size) => total + size, 0), "bytes", true, `${images.length} arquivo(s)`),
|
|
100
|
+
metric("imageMaxBytes", "Maior imagem", Math.max(0, ...imageSizes), "bytes"),
|
|
101
|
+
metric("fontTotalBytes", "Fontes (total)", await totalSize(fonts), "bytes", true, `${fonts.length} arquivo(s)`),
|
|
102
|
+
metric("fontFiles", "Arquivos de fonte", fonts.length, "count"),
|
|
103
|
+
metric("clientComponents", "Client Components", clientComponents.length, "count"),
|
|
104
|
+
];
|
|
105
|
+
return {
|
|
106
|
+
metrics,
|
|
107
|
+
files: {
|
|
108
|
+
css: css.map((file) => path.relative(project.directory, file)),
|
|
109
|
+
images: images.map((file) => path.relative(project.directory, file)),
|
|
110
|
+
fonts: fonts.map((file) => path.relative(project.directory, file)),
|
|
111
|
+
clientComponents: clientComponents.map((file) => path.relative(project.directory, file)),
|
|
112
|
+
clientBundle: hasClientBundle ? path.relative(project.directory, clientBundle) : undefined,
|
|
113
|
+
},
|
|
114
|
+
warnings: metrics.filter(({ available, value, limit }) => available && value > limit),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export function formatPerformanceValue(metric) {
|
|
118
|
+
if (metric.unit === "count")
|
|
119
|
+
return String(metric.value);
|
|
120
|
+
if (metric.value < 1024)
|
|
121
|
+
return `${metric.value} B`;
|
|
122
|
+
if (metric.value < 1024 * 1024)
|
|
123
|
+
return `${(metric.value / 1024).toFixed(1)} KiB`;
|
|
124
|
+
return `${(metric.value / 1024 / 1024).toFixed(2)} MiB`;
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=performance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance.js","sourceRoot":"","sources":["../../src/theme/performance.ts"],"names":[],"mappings":"AAAA,OAAO,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AC,KAAK,CAAC,CAAC;IACzD,IAAI,MAAM,CAAC,KAAK,GAAG,IAAI;QAAE,OAAO,GAAG,MAAM,CAAC,KAAK,IAAI,CAAC;IACpD,IAAI,MAAM,CAAC,KAAK,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;IACjF,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;AAC1D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuvler/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "CLI oficial para criação, validação, preview e empacotamento de temas Nuvler",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@nuvler/theme-schema": "^1.2.0",
|
|
24
|
-
"@nuvler/theme-sdk": "^1.2.
|
|
24
|
+
"@nuvler/theme-sdk": "^1.2.2",
|
|
25
25
|
"@vitejs/plugin-react": "^6.0.5",
|
|
26
26
|
"commander": "^15.0.0",
|
|
27
27
|
"react": "19.2.8",
|