> ## Documentation Index
> Fetch the complete documentation index at: https://docs-loja.usecorvex.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Vocabulário

> Vocabulário da Corvex — Theme, Section, Template, Draft, Published e Theme SDK.

Vocabulário mínimo para desenvolver temas. Detalhes normativos: [Contratos](https://docs-loja.usecorvex.com.br/reference/contracts/theme.md).

***

## Theme (tema)

Pacote versionado que declara sections, blocks, templates padrão, layout e settings globais.

* Identificado por `theme.json` com `manifestVersion: 2`
* Compilado em bundle JS/CSS (`corvex build`)
* Instalado na loja do merchant (catálogo ou `corvex sync`)

[Theme Contract](https://docs-loja.usecorvex.com.br/reference/contracts/theme.md)

***

## Layout

Wrapper React global (`layout/theme.jsx`) que envolve o conteúdo das páginas.

**Layout groups** (`header`, `footer` em `theme.json`) definem sections globais repetidas em todas as páginas (ex.: navegação, rodapé).

***

## Template e Page

| Conceito | O que é |
| - | - |
| **Template** | Tipo de página do sistema (`index`, `product`, `collection`, `cart`, `search`, …) |
| **Template file** | `templates/{type}.json` — sections **padrão** ao instalar o tema |
| **Page (instância)** | Composição **efetiva** da loja — draft do merchant, depois revisão publicada |

O merchant altera ordem, settings e sections no Editor. O JSON do tema define **defaults**; a loja persiste **instâncias**.

[Page Contract](https://docs-loja.usecorvex.com.br/reference/contracts/page.md)

***

## Section

Componente React registrado no tema que ocupa uma região da página.

Fluxo público:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
schema.json  →  Editor (inspector)
section.jsx  →  Preview / Storefront (render)
```

[Section Contract](https://docs-loja.usecorvex.com.br/reference/contracts/section.md)

***

## Block

Subcomponente editável **dentro** de uma section (ex.: item de FAQ, slide).

Declarado no tema (`blocks/{id}/`) e opcionalmente permitido por section via `blocks.json`.

[Block Contract](https://docs-loja.usecorvex.com.br/reference/contracts/block.md)

***

## Snippet

Componente React reutilizável **não** listado em `theme.json`. Importado por sections via alias de build `@corvex/snippets/{id}`.

[Snippet Contract](https://docs-loja.usecorvex.com.br/reference/contracts/snippet.md)

***

## Settings

Valores editáveis pelo merchant. Quatro níveis:

| Nível | Fonte | Consumo no tema |
| - | - | - |
| **Theme settings** | `config/settings.schema.json` | CSS vars, `useThemeSetting()` (runtime opcional) |
| **Section settings** | `sections/{id}/schema.json` | prop `settings` |
| **Block settings** | `blocks/{id}/schema.json` | `props.settings` |
| **Composição** | template / draft | quais sections existem e ordem |

[Schema Contract](https://docs-loja.usecorvex.com.br/reference/contracts/schema.md)

***

## Theme SDK

Pacote público `@corvex/theme-sdk` para acessar dados da loja sem depender de APIs internas.

* `createStorefront()` — cliente HTTP da vitrine
* Hooks: `useCorvexCart`, `usePage`, `useStorefront`, …
* `defineSection` / `defineSectionData` — declarar schema e loaders

Não inclui APIs de administração da plataforma.

[Data Contract](https://docs-loja.usecorvex.com.br/reference/contracts/data.md) · [SDK overview](https://docs-loja.usecorvex.com.br/sdk/overview.md)

***

## Draft e Published

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Editor (edição)
  → Draft (rascunho salvo)
  → Preview (visualização do draft)
  → Publish (publicar)
  → Published (loja ao vivo)
```

| Estado | Quem vê | Conteúdo |
| - | - | - |
| **Draft** | Merchant no Editor / preview autorizado | Composição + settings não publicados |
| **Published** | Visitantes da loja | Revisão congelada servida ao storefront |

Código do tema (bundle) tem ciclo próprio: `corvex build` → `corvex sync` / `corvex publish`.

[Preview Contract](https://docs-loja.usecorvex.com.br/reference/contracts/preview.md) · [Publish Contract](https://docs-loja.usecorvex.com.br/reference/contracts/publish.md)

***

## Identificadores

| Camada | Formato | Exemplo |
| - | - | - |
| Section type (manifest) | kebab-case | `featured-products` |
| Section component | PascalCase + `Section` | `FeaturedProductsSection` |
| Block component | PascalCase + `Block` | `HeadingBlock` |
| Template type | slug fixo | `index`, `product` |

***

## Leitura seguinte

* [Theme Contract](https://docs-loja.usecorvex.com.br/reference/contracts/theme.md)
* [Section Contract](https://docs-loja.usecorvex.com.br/reference/contracts/section.md)
* [Schema overview](https://docs-loja.usecorvex.com.br/schema/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.