@nuvler/theme-sdk 1.0.0 → 1.2.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 CHANGED
@@ -10,11 +10,23 @@ export const theme = defineTheme({
10
10
  schemaVersion: 1,
11
11
  id: "meu-tema",
12
12
  name: "Meu tema",
13
- version: "1.0.0",
13
+ version: "1.0.1",
14
14
  runtimeVersion: THEME_RUNTIME_VERSION,
15
15
  sdkVersion: `^${THEME_API_VERSION}`,
16
16
  entry: "src/theme.tsx",
17
17
  styles: ["src/theme.css"],
18
+ presentation: {
19
+ description: "Tema da minha loja",
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
+ },
28
+ layout: { containerWidth: 1200, borderRadius: 16 },
29
+ },
18
30
  },
19
31
  // tokens, template e components
20
32
  });
@@ -22,3 +34,7 @@ export const theme = defineTheme({
22
34
 
23
35
  `version` identifica a versão imutável do tema. `runtimeVersion` identifica o
24
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.0.0";
3
+ export declare const THEME_API_VERSION: "1.2.0";
4
4
  export declare const THEME_RUNTIME_VERSION: "1";
5
5
  export interface ThemeApiCompatibility {
6
6
  themeApi: string;
@@ -15,6 +15,7 @@ export interface ThemeManifest {
15
15
  sdkVersion: string;
16
16
  entry: string;
17
17
  styles?: string[];
18
+ presentation?: ThemePresentation;
18
19
  }
19
20
  /** Manifesto imutável entregue junto ao bundle publicado no Registry. */
20
21
  export interface ThemeArtifactManifest {
@@ -26,6 +27,7 @@ export interface ThemeArtifactManifest {
26
27
  sdkVersion: string;
27
28
  entry: "./theme.js";
28
29
  style?: "./theme.css";
30
+ presentation?: ThemePresentation;
29
31
  }
30
32
  export interface ThemeImage {
31
33
  url: string | null;
@@ -42,6 +44,24 @@ export interface ThemeSiteColors {
42
44
  secondary: string;
43
45
  background: string;
44
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;
45
65
  }
46
66
  export interface ThemeSettings {
47
67
  id?: string;
@@ -51,6 +71,13 @@ export interface ThemeSettings {
51
71
  borderRadius: number;
52
72
  };
53
73
  }
74
+ /** Metadados usados pelo painel para apresentar e configurar um tema publicado. */
75
+ export interface ThemePresentation {
76
+ description: string;
77
+ templateId?: string;
78
+ colors: ThemeSiteColors;
79
+ layout: ThemeSettings["layout"];
80
+ }
54
81
  export interface ThemeContact {
55
82
  email?: string;
56
83
  phone?: string;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export const THEME_SCHEMA_VERSION = 1;
2
- export const THEME_API_VERSION = "1.0.0";
2
+ export const THEME_API_VERSION = "1.2.0";
3
3
  export const THEME_RUNTIME_VERSION = "1";
4
4
  export function defineTheme(theme) {
5
5
  return theme;
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;AAmalD,MAAM,UAAU,WAAW,CAAkD,KAAa;IACxF,OAAO,KAAK,CAAC;AACf,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;AA+blD,MAAM,UAAU,WAAW,CAAkD,KAAa;IACxF,OAAO,KAAK,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuvler/theme-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Contrato público para temas da plataforma Nuvler",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",