@nuvler/theme-sdk 1.1.0 → 1.2.1
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 +12 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,14 @@ export const theme = defineTheme({
|
|
|
17
17
|
styles: ["src/theme.css"],
|
|
18
18
|
presentation: {
|
|
19
19
|
description: "Tema da minha loja",
|
|
20
|
-
colors: {
|
|
20
|
+
colors: {
|
|
21
|
+
primary: "#1d4ed8", primaryText: "#ffffff",
|
|
22
|
+
secondary: "#f59e0b", secondaryText: "#0f172a", accent: "#d97706",
|
|
23
|
+
background: "#f8fafc", surface: "#ffffff", surfaceAlt: "#f1f5f9",
|
|
24
|
+
text: "#0f172a", textMuted: "#64748b", border: "#e2e8f0",
|
|
25
|
+
headerBackground: "#ffffff", headerText: "#0f172a",
|
|
26
|
+
footerBackground: "#0f172a", footerText: "#f8fafc",
|
|
27
|
+
},
|
|
21
28
|
layout: { containerWidth: 1200, borderRadius: 16 },
|
|
22
29
|
},
|
|
23
30
|
},
|
|
@@ -27,3 +34,7 @@ export const theme = defineTheme({
|
|
|
27
34
|
|
|
28
35
|
`version` identifica a versão imutável do tema. `runtimeVersion` identifica o
|
|
29
36
|
protocolo `mount/unmount` e `sdkVersion` declara a faixa do SDK aceita.
|
|
37
|
+
|
|
38
|
+
`primary`, `secondary`, `background` e `text` permanecem obrigatórios para
|
|
39
|
+
compatibilidade. Os demais tokens semânticos são opcionais no contrato, mas o
|
|
40
|
+
starter atual já os declara e os runtimes aplicam fallbacks para temas antigos.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentType, ReactNode } from "react";
|
|
2
2
|
export declare const THEME_SCHEMA_VERSION: 1;
|
|
3
|
-
export declare const THEME_API_VERSION: "1.1
|
|
3
|
+
export declare const THEME_API_VERSION: "1.2.1";
|
|
4
4
|
export declare const THEME_RUNTIME_VERSION: "1";
|
|
5
5
|
export interface ThemeApiCompatibility {
|
|
6
6
|
themeApi: string;
|
|
@@ -44,6 +44,24 @@ export interface ThemeSiteColors {
|
|
|
44
44
|
secondary: string;
|
|
45
45
|
background: string;
|
|
46
46
|
text: string;
|
|
47
|
+
/** Texto e ícones renderizados sobre a cor principal. */
|
|
48
|
+
primaryText?: string;
|
|
49
|
+
/** Texto e ícones renderizados sobre a cor secundária. */
|
|
50
|
+
secondaryText?: string;
|
|
51
|
+
/** Preços, badges e pequenos destaques. */
|
|
52
|
+
accent?: string;
|
|
53
|
+
/** Cards, menus, drawers e painéis. */
|
|
54
|
+
surface?: string;
|
|
55
|
+
/** Seções e superfícies alternativas. */
|
|
56
|
+
surfaceAlt?: string;
|
|
57
|
+
/** Descrições, metadados e textos auxiliares. */
|
|
58
|
+
textMuted?: string;
|
|
59
|
+
/** Bordas, divisores e contornos de campos. */
|
|
60
|
+
border?: string;
|
|
61
|
+
headerBackground?: string;
|
|
62
|
+
headerText?: string;
|
|
63
|
+
footerBackground?: string;
|
|
64
|
+
footerText?: string;
|
|
47
65
|
}
|
|
48
66
|
export interface ThemeSettings {
|
|
49
67
|
id?: string;
|
|
@@ -193,6 +211,7 @@ export interface ThemeContext {
|
|
|
193
211
|
navigation: {
|
|
194
212
|
pages: ThemeNavigationPage[];
|
|
195
213
|
categories: ThemeCategory[];
|
|
214
|
+
menu?: ThemeNavigationItem[];
|
|
196
215
|
};
|
|
197
216
|
home: ThemeHome;
|
|
198
217
|
catalog: {
|
|
@@ -205,6 +224,14 @@ export interface ThemeContext {
|
|
|
205
224
|
cases: ThemeEditorialItem[];
|
|
206
225
|
};
|
|
207
226
|
}
|
|
227
|
+
export type ThemeNavigationItemType = "CATEGORY" | "BLOG" | "SERVICES" | "CASES" | "PAGE";
|
|
228
|
+
export interface ThemeNavigationItem {
|
|
229
|
+
key: string;
|
|
230
|
+
type: ThemeNavigationItemType;
|
|
231
|
+
label: string;
|
|
232
|
+
href: string;
|
|
233
|
+
order: number;
|
|
234
|
+
}
|
|
208
235
|
export interface SiteTemplate {
|
|
209
236
|
announcement: string;
|
|
210
237
|
footerTagline: string;
|
|
@@ -225,6 +252,7 @@ export interface HeaderProps {
|
|
|
225
252
|
site: ThemeSite;
|
|
226
253
|
categories: ThemeCategory[];
|
|
227
254
|
pages: ThemePageSummary[];
|
|
255
|
+
menu?: ThemeNavigationItem[];
|
|
228
256
|
template: SiteTemplate;
|
|
229
257
|
cart?: ReactNode;
|
|
230
258
|
suggestionsEndpoint?: string;
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAU,CAAC;AAC/C,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAgB,CAAC;AAClD,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAU,CAAC;AAC/C,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAgB,CAAC;AAClD,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAY,CAAC;AA2clD,MAAM,UAAU,WAAW,CAAkD,KAAa;IACxF,OAAO,KAAK,CAAC;AACf,CAAC"}
|