@unbox-plus/cli 0.20.4
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/LICENSE.md +46 -0
- package/README.md +175 -0
- package/bin/cli.js +439 -0
- package/package.json +43 -0
- package/src/colors.js +100 -0
- package/src/presets.js +241 -0
- package/src/theme.js +253 -0
- package/template/.claude/agents/assets-marca.md +40 -0
- package/template/.claude/agents/avaliador-visual.md +48 -0
- package/template/.claude/agents/branding-briefing.md +401 -0
- package/template/.claude/agents/conteudo-secao.md +46 -0
- package/template/.claude/agents/paginas-legais.md +44 -0
- package/template/.claude/settings.json +3 -0
- package/template/.claude/skills/frontend-design/ATTRIBUTION.md +3 -0
- package/template/.claude/skills/frontend-design/LICENSE.txt +177 -0
- package/template/.claude/skills/frontend-design/SKILL.md +55 -0
- package/template/.claude/skills/web-design-guidelines/ATTRIBUTION.md +3 -0
- package/template/.claude/skills/web-design-guidelines/SKILL.md +50 -0
- package/template/.claude/skills/web-design-guidelines/guidelines-snapshot.md +180 -0
- package/template/.env.example +158 -0
- package/template/.mcp.json.example +14 -0
- package/template/.nvmrc +1 -0
- package/template/CLAUDE.md +333 -0
- package/template/COVERAGE.md +80 -0
- package/template/DEPLOY.md +179 -0
- package/template/QA.md +108 -0
- package/template/README.md +152 -0
- package/template/agents/CONSTRUCAO.md +207 -0
- package/template/agents/MANAGER.md +192 -0
- package/template/agents/PADROES.md +255 -0
- package/template/agents/definitions/00-scaffold.md +56 -0
- package/template/agents/definitions/01-layout.md +47 -0
- package/template/agents/definitions/02-homepage.md +70 -0
- package/template/agents/definitions/03-catalog.md +86 -0
- package/template/agents/definitions/04-pdp.md +97 -0
- package/template/agents/definitions/05-cart.md +116 -0
- package/template/agents/definitions/06-checkout.md +146 -0
- package/template/agents/definitions/07-auth.md +130 -0
- package/template/agents/definitions/08-customer.md +55 -0
- package/template/agents/definitions/09-promotions.md +62 -0
- package/template/agents/definitions/10-feedback.md +128 -0
- package/template/agents/definitions/11-seo-infra.md +159 -0
- package/template/agents/definitions/12-deploy.md +173 -0
- package/template/agents/definitions/13-cro.md +275 -0
- package/template/agents/definitions/14-seo.md +388 -0
- package/template/agents/definitions/15-branding.md +26 -0
- package/template/agents/definitions/16-qa-visual.md +138 -0
- package/template/agents/definitions/17-aeo.md +257 -0
- package/template/app/(loja)/busca/page.tsx +72 -0
- package/template/app/(loja)/carrinho/oferta/page.tsx +57 -0
- package/template/app/(loja)/carrinho/page.tsx +160 -0
- package/template/app/(loja)/categoria/[tagSlug]/layout.tsx +31 -0
- package/template/app/(loja)/categoria/[tagSlug]/loading.tsx +17 -0
- package/template/app/(loja)/categoria/[tagSlug]/page.tsx +49 -0
- package/template/app/(loja)/checkout/page.tsx +80 -0
- package/template/app/(loja)/checkout/pix/[ref]/page.tsx +133 -0
- package/template/app/(loja)/conta/assinaturas/[referenceId]/page.tsx +112 -0
- package/template/app/(loja)/conta/assinaturas/page.tsx +51 -0
- package/template/app/(loja)/conta/enderecos/page.tsx +20 -0
- package/template/app/(loja)/conta/entrar/page.tsx +119 -0
- package/template/app/(loja)/conta/page.tsx +45 -0
- package/template/app/(loja)/conta/pedidos/[referenceId]/page.tsx +49 -0
- package/template/app/(loja)/conta/pedidos/page.tsx +104 -0
- package/template/app/(loja)/conta/preferencias/page.tsx +24 -0
- package/template/app/(loja)/devolucoes/page.tsx +36 -0
- package/template/app/(loja)/layout.tsx +22 -0
- package/template/app/(loja)/oferta/page.tsx +57 -0
- package/template/app/(loja)/page.tsx +86 -0
- package/template/app/(loja)/pedido/[referenceId]/page.tsx +78 -0
- package/template/app/(loja)/privacidade/page.tsx +113 -0
- package/template/app/(loja)/produto/[productSlug]/layout.tsx +23 -0
- package/template/app/(loja)/produto/[productSlug]/loading.tsx +20 -0
- package/template/app/(loja)/produto/[productSlug]/page.tsx +372 -0
- package/template/app/(loja)/produtos/loading.tsx +16 -0
- package/template/app/(loja)/produtos/page.tsx +33 -0
- package/template/app/(loja)/termos/page.tsx +104 -0
- package/template/app/acesso/page.tsx +129 -0
- package/template/app/api/account/addresses/route.ts +39 -0
- package/template/app/api/account/exists/route.ts +21 -0
- package/template/app/api/account/me/route.ts +25 -0
- package/template/app/api/account/otp/route.ts +26 -0
- package/template/app/api/account/preferences/route.ts +19 -0
- package/template/app/api/account/signin/route.ts +27 -0
- package/template/app/api/account/signout/route.ts +9 -0
- package/template/app/api/acesso/route.ts +171 -0
- package/template/app/api/capi/route.ts +34 -0
- package/template/app/api/cart/coupon/route.ts +49 -0
- package/template/app/api/cart/items/route.ts +45 -0
- package/template/app/api/cart/link/route.ts +69 -0
- package/template/app/api/cart/route.ts +113 -0
- package/template/app/api/cart/share/route.ts +21 -0
- package/template/app/api/cep/[code]/route.ts +18 -0
- package/template/app/api/checkout/address/route.ts +24 -0
- package/template/app/api/checkout/email/route.ts +41 -0
- package/template/app/api/checkout/installments/route.ts +16 -0
- package/template/app/api/checkout/route.ts +110 -0
- package/template/app/api/checkout/shipping/route.ts +65 -0
- package/template/app/api/checkout-destination/route.ts +31 -0
- package/template/app/api/order/[ref]/route.ts +17 -0
- package/template/app/api/payment-link/route.ts +28 -0
- package/template/app/api/revalidate/route.ts +52 -0
- package/template/app/api/shipping/quote/route.ts +29 -0
- package/template/app/api/subscriptions/[id]/route.ts +52 -0
- package/template/app/api/track/route.ts +28 -0
- package/template/app/api/unbox/catalogo/route.ts +136 -0
- package/template/app/api/unbox/paginas/route.ts +167 -0
- package/template/app/api/unbox/vitrine/route.ts +84 -0
- package/template/app/api/webhooks/unbox/route.ts +97 -0
- package/template/app/apple-icon.svg +5 -0
- package/template/app/error.tsx +15 -0
- package/template/app/globals.css +457 -0
- package/template/app/icon.svg +4 -0
- package/template/app/layout.tsx +90 -0
- package/template/app/llms.txt/route.ts +43 -0
- package/template/app/manifest.ts +21 -0
- package/template/app/not-found.tsx +18 -0
- package/template/app/opengraph-image.tsx +35 -0
- package/template/app/robots.ts +31 -0
- package/template/app/sitemap.ts +42 -0
- package/template/bootstrap.sh +87 -0
- package/template/components/account/account-shell.tsx +47 -0
- package/template/components/account/address-book.tsx +147 -0
- package/template/components/account/preferences-form.tsx +77 -0
- package/template/components/account/reorder-button.tsx +47 -0
- package/template/components/account/signout-button.tsx +20 -0
- package/template/components/account/subscription-actions.tsx +204 -0
- package/template/components/account-nav.tsx +41 -0
- package/template/components/address-fields.tsx +102 -0
- package/template/components/analytics/data-layer-ready.tsx +16 -0
- package/template/components/analytics/purchase-tracker.tsx +32 -0
- package/template/components/brand-search.tsx +34 -0
- package/template/components/cart/cart-provider.tsx +340 -0
- package/template/components/cart/mini-cart.tsx +228 -0
- package/template/components/cart-button.tsx +35 -0
- package/template/components/catalog/catalog-client.tsx +523 -0
- package/template/components/catalog/grid-skeleton.tsx +19 -0
- package/template/components/catalog/pager.tsx +66 -0
- package/template/components/catalog/product-grid-card.tsx +52 -0
- package/template/components/catalog/product-grid.tsx +27 -0
- package/template/components/checkout/checkout-client.tsx +1333 -0
- package/template/components/chrome/announce-bar.tsx +57 -0
- package/template/components/chrome/chrome-recipe.ts +13 -0
- package/template/components/chrome/footers/captura-botao.tsx +28 -0
- package/template/components/chrome/footers/colunas.tsx +110 -0
- package/template/components/chrome/footers/conversao.tsx +90 -0
- package/template/components/chrome/footers/editorial.tsx +98 -0
- package/template/components/chrome/footers/minimal.tsx +55 -0
- package/template/components/chrome/header-bar-mobile.tsx +64 -0
- package/template/components/chrome/headers/centralizado.tsx +71 -0
- package/template/components/chrome/headers/classico.tsx +64 -0
- package/template/components/chrome/headers/compacto.tsx +66 -0
- package/template/components/chrome/headers/equilibrado.tsx +73 -0
- package/template/components/chrome/headers/imersivo.tsx +62 -0
- package/template/components/chrome/registry.ts +70 -0
- package/template/components/chrome/solid-on-scroll.tsx +39 -0
- package/template/components/empty-state.tsx +22 -0
- package/template/components/home/combo-card-compact.tsx +67 -0
- package/template/components/home/combos-home.tsx +64 -0
- package/template/components/home/combos-section.tsx +177 -0
- package/template/components/home/home-recipe.ts +41 -0
- package/template/components/home/sections/attributes-marquee.tsx +178 -0
- package/template/components/home/sections/benefits.tsx +80 -0
- package/template/components/home/sections/bloco-html.tsx +47 -0
- package/template/components/home/sections/catalogo.ts +165 -0
- package/template/components/home/sections/category-pills.tsx +32 -0
- package/template/components/home/sections/combos-carousel.tsx +141 -0
- package/template/components/home/sections/comparison.tsx +73 -0
- package/template/components/home/sections/founder-story.tsx +40 -0
- package/template/components/home/sections/hero.tsx +187 -0
- package/template/components/home/sections/kits.tsx +11 -0
- package/template/components/home/sections/media-cards.tsx +70 -0
- package/template/components/home/sections/newsletter.tsx +62 -0
- package/template/components/home/sections/product-showcase.tsx +175 -0
- package/template/components/home/sections/purchase-hero.tsx +187 -0
- package/template/components/home/sections/quote-banner.tsx +50 -0
- package/template/components/home/sections/registry.ts +186 -0
- package/template/components/home/sections/reviews-carousel.tsx +66 -0
- package/template/components/home/sections/reviews.tsx +68 -0
- package/template/components/home/sections/ritual.tsx +96 -0
- package/template/components/home/sections/savings.tsx +47 -0
- package/template/components/home/sections/social-row.tsx +65 -0
- package/template/components/home/sections/spec-table.tsx +117 -0
- package/template/components/home/sections/stars.tsx +12 -0
- package/template/components/home/sections/stats-grid.tsx +54 -0
- package/template/components/home/sections/trust-bar.tsx +56 -0
- package/template/components/home/sections/trust-strip.tsx +40 -0
- package/template/components/home/sections/video-wall.tsx +59 -0
- package/template/components/landing/landing-recipe.ts +20 -0
- package/template/components/landing/oferta-sections.tsx +40 -0
- package/template/components/landing/product-picker.tsx +257 -0
- package/template/components/mobile-nav.tsx +71 -0
- package/template/components/order-status.tsx +163 -0
- package/template/components/powered-by-unbox.tsx +27 -0
- package/template/components/product/pdp/buy-box.tsx +604 -0
- package/template/components/product/pdp/catalog-grid.tsx +113 -0
- package/template/components/product/pdp/faq-modelo.ts +86 -0
- package/template/components/product/pdp/gallery.tsx +87 -0
- package/template/components/product/pdp/interactive.tsx +200 -0
- package/template/components/product/pdp/newsletter.tsx +64 -0
- package/template/components/product/pdp/payment-chips.tsx +22 -0
- package/template/components/product/pdp/pdp-view.tsx +227 -0
- package/template/components/product/pdp/recommendations.tsx +144 -0
- package/template/components/product/pdp/sections.tsx +173 -0
- package/template/components/quantity-stepper.tsx +36 -0
- package/template/components/search-box.tsx +37 -0
- package/template/components/site-footer.tsx +59 -0
- package/template/components/site-header.tsx +64 -0
- package/template/components/ui/accordion.tsx +72 -0
- package/template/components/ui/alert-dialog.tsx +187 -0
- package/template/components/ui/alert.tsx +76 -0
- package/template/components/ui/aspect-ratio.tsx +22 -0
- package/template/components/ui/avatar.tsx +109 -0
- package/template/components/ui/badge.tsx +52 -0
- package/template/components/ui/breadcrumb.tsx +125 -0
- package/template/components/ui/button.tsx +58 -0
- package/template/components/ui/card.tsx +103 -0
- package/template/components/ui/carousel.tsx +242 -0
- package/template/components/ui/command.tsx +196 -0
- package/template/components/ui/dialog.tsx +160 -0
- package/template/components/ui/dropdown-menu.tsx +268 -0
- package/template/components/ui/foto.tsx +54 -0
- package/template/components/ui/input-group.tsx +158 -0
- package/template/components/ui/input-otp.tsx +87 -0
- package/template/components/ui/input.tsx +20 -0
- package/template/components/ui/label.tsx +20 -0
- package/template/components/ui/navigation-menu.tsx +168 -0
- package/template/components/ui/pagination.tsx +132 -0
- package/template/components/ui/popover.tsx +90 -0
- package/template/components/ui/progress.tsx +83 -0
- package/template/components/ui/radio-group.tsx +38 -0
- package/template/components/ui/scroll-area.tsx +55 -0
- package/template/components/ui/select.tsx +201 -0
- package/template/components/ui/separator.tsx +25 -0
- package/template/components/ui/sheet.tsx +138 -0
- package/template/components/ui/skeleton.tsx +13 -0
- package/template/components/ui/sonner.tsx +44 -0
- package/template/components/ui/switch.tsx +32 -0
- package/template/components/ui/table.tsx +116 -0
- package/template/components/ui/tabs.tsx +82 -0
- package/template/components/ui/textarea.tsx +18 -0
- package/template/components/ui/toggle-group.tsx +89 -0
- package/template/components/ui/toggle.tsx +45 -0
- package/template/components/ui/tooltip.tsx +66 -0
- package/template/components.json +25 -0
- package/template/eslint.config.mjs +36 -0
- package/template/gitignore +21 -0
- package/template/lib/analytics.ts +369 -0
- package/template/lib/api.ts +60 -0
- package/template/lib/capi.ts +87 -0
- package/template/lib/cart-link.ts +51 -0
- package/template/lib/cart-normalize.ts +142 -0
- package/template/lib/cart-recovery.ts +23 -0
- package/template/lib/cart-response.ts +48 -0
- package/template/lib/catalog-map.ts +54 -0
- package/template/lib/catalog.ts +3 -0
- package/template/lib/checkout-lock.ts +21 -0
- package/template/lib/checkout-nav.ts +22 -0
- package/template/lib/config.ts +51 -0
- package/template/lib/crm.ts +40 -0
- package/template/lib/customer-session.ts +21 -0
- package/template/lib/dataloader.ts +23 -0
- package/template/lib/editable/config.ts +11 -0
- package/template/lib/editable/document.ts +1762 -0
- package/template/lib/editable/index.ts +3 -0
- package/template/lib/editable/primitives.tsx +821 -0
- package/template/lib/editable/provider.tsx +861 -0
- package/template/lib/editable/rastreio-navegacao.tsx +65 -0
- package/template/lib/editable/rastreio.tsx +168 -0
- package/template/lib/editable/server.ts +189 -0
- package/template/lib/editable/tokens.ts +22 -0
- package/template/lib/editable/verify.ts +24 -0
- package/template/lib/enrichment/combos.ts +184 -0
- package/template/lib/enrichment/index.ts +188 -0
- package/template/lib/enrichment/products.json +1 -0
- package/template/lib/env-check.ts +47 -0
- package/template/lib/format.ts +130 -0
- package/template/lib/icons.ts +67 -0
- package/template/lib/json-ld.ts +9 -0
- package/template/lib/llms-txt.ts +75 -0
- package/template/lib/mockup.ts +24 -0
- package/template/lib/newsletter.ts +12 -0
- package/template/lib/orders.ts +160 -0
- package/template/lib/queries.ts +66 -0
- package/template/lib/ratelimit.ts +47 -0
- package/template/lib/rotas-editaveis.ts +192 -0
- package/template/lib/sanitize.ts +36 -0
- package/template/lib/schemas.ts +78 -0
- package/template/lib/session.ts +98 -0
- package/template/lib/store-config.ts +67 -0
- package/template/lib/unbox/client.ts +829 -0
- package/template/lib/unbox/customer.ts +224 -0
- package/template/lib/unbox/errors.ts +97 -0
- package/template/lib/unbox/index.ts +10 -0
- package/template/lib/unbox/store.ts +113 -0
- package/template/lib/unbox/types.ts +195 -0
- package/template/lib/unbox/webhooks.ts +66 -0
- package/template/lib/utils.ts +6 -0
- package/template/lib/vitrine.ts +242 -0
- package/template/lib/webhook-store.ts +22 -0
- package/template/middleware.ts +178 -0
- package/template/next.config.ts +63 -0
- package/template/package.json +62 -0
- package/template/postcss.config.mjs +5 -0
- package/template/public/brand/coll/default.png +0 -0
- package/template/public/brand/hero-desktop.svg +12 -0
- package/template/public/brand/hero-mobile.svg +12 -0
- package/template/public/brand/heros/boutique-desktop.svg +11 -0
- package/template/public/brand/heros/boutique-mobile.svg +11 -0
- package/template/public/brand/heros/editorial-desktop.svg +11 -0
- package/template/public/brand/heros/editorial-mobile.svg +11 -0
- package/template/public/brand/heros/essencial-desktop.svg +12 -0
- package/template/public/brand/heros/essencial-mobile.svg +12 -0
- package/template/public/brand/heros/promocional-desktop.svg +12 -0
- package/template/public/brand/heros/promocional-mobile.svg +12 -0
- package/template/public/brand/logo-chrome.svg +6 -0
- package/template/public/brand/logo-white.svg +6 -0
- package/template/public/brand/logo.svg +7 -0
- package/template/public/brand/pay-amex.webp +0 -0
- package/template/public/brand/pay-elo.webp +0 -0
- package/template/public/brand/pay-mastercard.webp +0 -0
- package/template/public/brand/pay-pix.webp +0 -0
- package/template/public/brand/pay-visa.webp +0 -0
- package/template/public/brand/ph/avatar-a.svg +5 -0
- package/template/public/brand/ph/avatar-b.svg +5 -0
- package/template/public/brand/ph/avatar-c.svg +5 -0
- package/template/public/brand/ph/avatar-d.svg +5 -0
- package/template/public/brand/ph/photo-a.svg +7 -0
- package/template/public/brand/ph/photo-b.svg +6 -0
- package/template/public/brand/ph/photo-c.svg +6 -0
- package/template/public/brand/ph/poster-a.svg +6 -0
- package/template/public/brand/ph/poster-b.svg +6 -0
- package/template/public/brand/ph/poster-c.svg +6 -0
- package/template/public/unbox/powered-by-fundo-preto.png +0 -0
- package/template/public/unbox/powered-by-transparente.png +0 -0
- package/template/public/unbox/powered-by.png +0 -0
- package/template/scripts/abandoned-cart.ts +82 -0
- package/template/scripts/check-editable.mjs +467 -0
- package/template/scripts/check-honestidade.mjs +111 -0
- package/template/scripts/check-placeholder.mjs +200 -0
- package/template/scripts/check-recipe.mjs +76 -0
- package/template/scripts/check-unbox-brand.mjs +298 -0
- package/template/scripts/contraste.js +177 -0
- package/template/scripts/dump-catalog.ts +95 -0
- package/template/scripts/load-env.ts +13 -0
- package/template/scripts/medir-sistema.mjs +56 -0
- package/template/scripts/place-order-pix.ts +61 -0
- package/template/scripts/qa-screenshots.mjs +150 -0
- package/template/scripts/sistema.py +231 -0
- package/template/scripts/subscribe-webhook.ts +36 -0
- package/template/scripts/test-live.ts +186 -0
- package/template/scripts/vocabulario.py +264 -0
- package/template/tsconfig.json +27 -0
- package/tools/LEIA-ME.md +39 -0
- package/tools/check-template-neutro.mjs +111 -0
- package/tools/notion-doc.mjs +191 -0
- package/tools/tokenize-neutrals.mjs +0 -0
- package/tools/tokenize-radius.mjs +52 -0
- package/tools/workflow-storefront.legado.js +1207 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1915 821">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="g" x1="0" y1="0.1" x2="0.9" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#18181B"/>
|
|
5
|
+
<stop offset="1" stop-color="#3F3F46"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="1915" height="821" fill="url(#g)"/>
|
|
9
|
+
<circle cx="1378" cy="246" r="377" fill="#FCFCFD" opacity="0.07"/>
|
|
10
|
+
<circle cx="268" cy="673" r="279" fill="#D97706" opacity="0.16"/>
|
|
11
|
+
<circle cx="1761" cy="722" r="180" fill="#FCFCFD" opacity="0.05"/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1122 1402">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="g" x1="0" y1="0.1" x2="0.9" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#18181B"/>
|
|
5
|
+
<stop offset="1" stop-color="#3F3F46"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="1122" height="1402" fill="url(#g)"/>
|
|
9
|
+
<circle cx="807" cy="420" r="515" fill="#FCFCFD" opacity="0.07"/>
|
|
10
|
+
<circle cx="157" cy="1149" r="381" fill="#D97706" opacity="0.16"/>
|
|
11
|
+
<circle cx="1032" cy="1233" r="246" fill="#FCFCFD" opacity="0.05"/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1915 821">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="g" x1="0" y1="0.1" x2="0.9" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#18181B"/>
|
|
5
|
+
<stop offset="1" stop-color="#3F3F46"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="1915" height="821" fill="url(#g)"/>
|
|
9
|
+
<circle cx="1493" cy="180" r="410" fill="#FCFCFD" opacity="0.06"/>
|
|
10
|
+
<circle cx="344" cy="656" r="311" fill="#D97706" opacity="0.14"/>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1122 1402">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="g" x1="0" y1="0.1" x2="0.9" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#18181B"/>
|
|
5
|
+
<stop offset="1" stop-color="#3F3F46"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="1122" height="1402" fill="url(#g)"/>
|
|
9
|
+
<circle cx="875" cy="308" r="560" fill="#FCFCFD" opacity="0.06"/>
|
|
10
|
+
<circle cx="201" cy="1121" r="426" fill="#D97706" opacity="0.14"/>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1915 821">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#FCFCFD"/>
|
|
5
|
+
<stop offset="1" stop-color="#F4F4F5"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="1915" height="821" fill="url(#g)"/>
|
|
9
|
+
<circle cx="1340" cy="311" r="361" fill="#27272A" opacity="0.09"/>
|
|
10
|
+
<circle cx="574" cy="640" r="246" fill="#D97706" opacity="0.10"/>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1122 1402">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#FCFCFD"/>
|
|
5
|
+
<stop offset="1" stop-color="#F4F4F5"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="1122" height="1402" fill="url(#g)"/>
|
|
9
|
+
<circle cx="785" cy="532" r="493" fill="#27272A" opacity="0.09"/>
|
|
10
|
+
<circle cx="336" cy="1093" r="336" fill="#D97706" opacity="0.10"/>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1915 821">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="g" x1="0" y1="0.1" x2="0.9" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#18181B"/>
|
|
5
|
+
<stop offset="1" stop-color="#3F3F46"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="1915" height="821" fill="url(#g)"/>
|
|
9
|
+
<circle cx="1378" cy="246" r="377" fill="#FCFCFD" opacity="0.07"/>
|
|
10
|
+
<circle cx="268" cy="673" r="279" fill="#D97706" opacity="0.16"/>
|
|
11
|
+
<circle cx="1761" cy="722" r="180" fill="#FCFCFD" opacity="0.05"/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1122 1402">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="g" x1="0" y1="0.1" x2="0.9" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#18181B"/>
|
|
5
|
+
<stop offset="1" stop-color="#3F3F46"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="1122" height="1402" fill="url(#g)"/>
|
|
9
|
+
<circle cx="807" cy="420" r="515" fill="#FCFCFD" opacity="0.07"/>
|
|
10
|
+
<circle cx="157" cy="1149" r="381" fill="#D97706" opacity="0.16"/>
|
|
11
|
+
<circle cx="1032" cy="1233" r="246" fill="#FCFCFD" opacity="0.05"/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1915 821">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#FCFCFD"/>
|
|
5
|
+
<stop offset="1" stop-color="#F4F4F5"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="1915" height="821" fill="url(#g)"/>
|
|
9
|
+
<circle cx="1646" cy="591" r="509" fill="#D97706" opacity="0.22"/>
|
|
10
|
+
<circle cx="421" cy="164" r="377" fill="#27272A" opacity="0.16"/>
|
|
11
|
+
<circle cx="995" cy="755" r="213" fill="#27272A" opacity="0.10"/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1122 1402">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#FCFCFD"/>
|
|
5
|
+
<stop offset="1" stop-color="#F4F4F5"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="1122" height="1402" fill="url(#g)"/>
|
|
9
|
+
<circle cx="964" cy="1009" r="695" fill="#D97706" opacity="0.22"/>
|
|
10
|
+
<circle cx="246" cy="280" r="515" fill="#27272A" opacity="0.16"/>
|
|
11
|
+
<circle cx="583" cy="1289" r="291" fill="#27272A" opacity="0.10"/>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="168" height="44" viewBox="0 0 168 44">
|
|
2
|
+
<!-- PLACEHOLDER de logo sobre o CHROME (rodapé, header sobreposto). Mesmo desenho da
|
|
3
|
+
versão clara, em tons que leem sobre fundo escuro. Troque pelo logo real da marca. -->
|
|
4
|
+
<rect x="0" y="0" width="44" height="44" rx="10" fill="#FFFFFF" fill-opacity="0.22"/>
|
|
5
|
+
<text x="56" y="28" font-family="system-ui,-apple-system,sans-serif" font-size="15" font-weight="600" fill="#FFFFFF" fill-opacity="0.75" letter-spacing="0.2">sua marca</text>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="168" height="44" viewBox="0 0 168 44">
|
|
2
|
+
<!-- PLACEHOLDER de logo sobre o CHROME (rodapé, header sobreposto). Mesmo desenho da
|
|
3
|
+
versão clara, em tons que leem sobre fundo escuro. Troque pelo logo real da marca. -->
|
|
4
|
+
<rect x="0" y="0" width="44" height="44" rx="10" fill="#FFFFFF" fill-opacity="0.22"/>
|
|
5
|
+
<text x="56" y="28" font-family="system-ui,-apple-system,sans-serif" font-size="15" font-weight="600" fill="#FFFFFF" fill-opacity="0.75" letter-spacing="0.2">sua marca</text>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="168" height="44" viewBox="0 0 168 44">
|
|
2
|
+
<!-- PLACEHOLDER de logo: quadrado neutro + "sua marca". É proposital que pareça
|
|
3
|
+
inacabado — quem entrega a loja tem que TROCAR este arquivo pelo logo real.
|
|
4
|
+
Versões: logo.svg (fundo claro) e logo-chrome.svg (sobre a cor de chrome). -->
|
|
5
|
+
<rect x="0" y="0" width="44" height="44" rx="10" fill="#D4D4D8"/>
|
|
6
|
+
<text x="56" y="28" font-family="system-ui,-apple-system,sans-serif" font-size="15" font-weight="600" fill="#71717A" letter-spacing="0.2">sua marca</text>
|
|
7
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 1000">
|
|
2
|
+
<rect width="800" height="1000" fill="#F1F1F3"/>
|
|
3
|
+
<circle cx="400" cy="430" r="240" fill="#27272A" opacity="0.85"/>
|
|
4
|
+
<circle cx="400" cy="430" r="150" fill="#FCFCFD" opacity="0.35"/>
|
|
5
|
+
<rect x="150" y="760" width="500" height="18" rx="9" fill="#18181B" opacity="0.35"/>
|
|
6
|
+
<rect x="230" y="808" width="340" height="14" rx="7" fill="#18181B" opacity="0.2"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 900">
|
|
2
|
+
<rect width="900" height="900" fill="#18181B"/>
|
|
3
|
+
<circle cx="640" cy="300" r="260" fill="#27272A" opacity="0.7"/>
|
|
4
|
+
<circle cx="250" cy="640" r="200" fill="#D97706" opacity="0.4"/>
|
|
5
|
+
<circle cx="450" cy="450" r="110" fill="#FCFCFD" opacity="0.25"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800">
|
|
2
|
+
<rect width="1200" height="800" fill="#F1F1F3"/>
|
|
3
|
+
<rect x="0" y="520" width="1200" height="280" fill="#27272A" opacity="0.8"/>
|
|
4
|
+
<circle cx="920" cy="330" r="180" fill="#D97706" opacity="0.75"/>
|
|
5
|
+
<circle cx="280" cy="260" r="90" fill="#18181B" opacity="0.3"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 1280">
|
|
2
|
+
<rect width="720" height="1280" fill="#18181B"/>
|
|
3
|
+
<circle cx="360" cy="500" r="220" fill="#27272A" opacity="0.8"/>
|
|
4
|
+
<circle cx="180" cy="950" r="150" fill="#D97706" opacity="0.35"/>
|
|
5
|
+
<rect x="160" y="1130" width="400" height="16" rx="8" fill="#FCFCFD" opacity="0.3"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 1280">
|
|
2
|
+
<rect width="720" height="1280" fill="#18181B"/>
|
|
3
|
+
<circle cx="360" cy="500" r="220" fill="#27272A" opacity="0.6"/>
|
|
4
|
+
<circle cx="540" cy="950" r="150" fill="#D97706" opacity="0.35"/>
|
|
5
|
+
<rect x="160" y="1130" width="400" height="16" rx="8" fill="#FCFCFD" opacity="0.3"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 1280">
|
|
2
|
+
<rect width="720" height="1280" fill="#18181B"/>
|
|
3
|
+
<circle cx="360" cy="500" r="220" fill="#27272A" opacity="0.45"/>
|
|
4
|
+
<circle cx="360" cy="950" r="150" fill="#D97706" opacity="0.35"/>
|
|
5
|
+
<rect x="160" y="1130" width="400" height="16" rx="8" fill="#FCFCFD" opacity="0.3"/>
|
|
6
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// Recuperação de carrinho abandonado (doc 10/11): fica com o storefront. Em produção, um
|
|
2
|
+
// cron varre os carrinhos persistidos (itens + e-mail, sem pedido há N min) e dispara o CRM.
|
|
3
|
+
//
|
|
4
|
+
// Aqui é uma DEMONSTRAÇÃO executável: como não há DB neste projeto self-contained, recebe um
|
|
5
|
+
// cartId+token (de um carrinho real, com e-mail capturado) e dispara o evento de CRM se houver
|
|
6
|
+
// itens e e-mail. Em produção, troque a fonte por uma consulta ao seu DB de ponteiros de carrinho.
|
|
7
|
+
//
|
|
8
|
+
// npm run unbox:abandoned -- <cartId> <cartToken>
|
|
9
|
+
//
|
|
10
|
+
// Não importa dispatchCrm de lib/crm.ts (só o TYPE, apagado em tempo de compilação): lib/crm.ts
|
|
11
|
+
// tem `import "server-only"`, um pacote que só existe dentro do bundler do Next — via tsx/Node
|
|
12
|
+
// puro ele SEMPRE lança "Cannot find module 'server-only'" e o script nunca chega a executar.
|
|
13
|
+
// Reimplementa o mesmo dispatch aqui lendo process.env direto, igual aos outros scripts.
|
|
14
|
+
import "./load-env"; // SEMPRE o primeiro import — parser de env idêntico ao do app
|
|
15
|
+
import { UnboxClient } from "../lib/unbox/client";
|
|
16
|
+
import { buildRecoveryUrl } from "../lib/cart-recovery";
|
|
17
|
+
import type { CrmEvent } from "../lib/crm";
|
|
18
|
+
|
|
19
|
+
async function dispatchCrm(event: CrmEvent): Promise<{ ok: boolean; skipped?: boolean }> {
|
|
20
|
+
const crmWebhookUrl = process.env.CRM_WEBHOOK_URL ?? "";
|
|
21
|
+
if (!crmWebhookUrl) {
|
|
22
|
+
console.info("[crm] CRM_WEBHOOK_URL não configurada — evento ignorado:", event.type);
|
|
23
|
+
return { ok: true, skipped: true };
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
const res = await fetch(crmWebhookUrl, {
|
|
27
|
+
method: "POST",
|
|
28
|
+
headers: { "Content-Type": "application/json" },
|
|
29
|
+
body: JSON.stringify({ source: "unbox-storefront", ...event, at: new Date().toISOString() }),
|
|
30
|
+
});
|
|
31
|
+
return { ok: res.ok };
|
|
32
|
+
} catch (e) {
|
|
33
|
+
console.error("[crm] falha ao despachar evento", e);
|
|
34
|
+
return { ok: false };
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const [cartId, cartToken] = process.argv.slice(2);
|
|
39
|
+
if (!cartId || !cartToken) {
|
|
40
|
+
console.error("Uso: npm run unbox:abandoned -- <cartId> <cartToken>");
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
(async () => {
|
|
45
|
+
const client = new UnboxClient({
|
|
46
|
+
apiKey: process.env.UNBOX_API_KEY ?? "",
|
|
47
|
+
shopId: process.env.UNBOX_SHOP_ID!,
|
|
48
|
+
// API de parceiros: presente = signIn e leituras compativeis roteiam pra ela
|
|
49
|
+
partnerApiKey: process.env.UNBOX_PARTNER_API_KEY,
|
|
50
|
+
partnerGqlUrl: process.env.UNBOX_PARTNER_GRAPHQL_URL,
|
|
51
|
+
captchaBypass: process.env.UNBOX_CAPTCHA_BYPASS,
|
|
52
|
+
});
|
|
53
|
+
await client.signIn(process.env.UNBOX_USER!, process.env.UNBOX_PASS!);
|
|
54
|
+
|
|
55
|
+
const cart = await client.getCart(cartId, cartToken);
|
|
56
|
+
if (!cart) {
|
|
57
|
+
console.log("Carrinho não encontrado/expirado — nada a recuperar.");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const itemCount = cart.items?.totalCount ?? cart.items?.edges?.length ?? 0;
|
|
61
|
+
if (itemCount === 0 || !cart.email) {
|
|
62
|
+
console.log(`Sem itens (${itemCount}) ou sem e-mail capturado — não dispara recuperação.`);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Formato único do link (id+token+freq+step=1), o mesmo que o /api/checkout/email manda
|
|
67
|
+
// no evento checkout_started — ver lib/cart-recovery.ts.
|
|
68
|
+
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL ?? "http://localhost:3000";
|
|
69
|
+
const recoveryUrl = buildRecoveryUrl(siteUrl, cartId, cartToken, cart.recurringItemsFrequencyId);
|
|
70
|
+
|
|
71
|
+
const r = await dispatchCrm({
|
|
72
|
+
type: "abandoned_cart",
|
|
73
|
+
email: cart.email,
|
|
74
|
+
cartId,
|
|
75
|
+
recoveryUrl,
|
|
76
|
+
payload: { itemCount, total: cart.checkout?.summary?.total?.displayAmount },
|
|
77
|
+
});
|
|
78
|
+
console.log(r.skipped ? "CRM não configurado (CRM_WEBHOOK_URL vazio) — evento ignorado." : `Evento de recuperação enviado ao CRM (ok=${r.ok}).`);
|
|
79
|
+
})().catch((e) => {
|
|
80
|
+
console.error("❌", e.message);
|
|
81
|
+
process.exit(1);
|
|
82
|
+
});
|