@dheme/next 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
@@ -85,6 +85,7 @@ Fetches the theme on the server and renders inline `<style>` + `<script>` tags.
85
85
  // Optional generation params
86
86
  radius: 0.75,
87
87
  saturationAdjust: 10,
88
+ borderIsColored: false,
88
89
  }}
89
90
  defaultMode="light" // 'light' | 'dark' (default: 'light')
90
91
  baseUrl="http://localhost:3005" // Override API URL (optional)
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { D as DhemeProviderProps, a as DhemeScriptProps } from './types-yW-Y2Yox.mjs';
3
- export { G as GenerateThemeStylesOptions } from './types-yW-Y2Yox.mjs';
4
- export { ThemeActionsState, ThemeDataState, ThemeMode, applyThemeCSSVariables, buildCacheKey, themeToCSS, useDhemeClient, useGenerateTheme, useTheme, useThemeActions } from '@dheme/react';
2
+ import { D as DhemeProviderProps, a as DhemeScriptProps } from './types-ClHCJGkl.mjs';
3
+ export { G as GenerateThemeStylesOptions } from './types-ClHCJGkl.mjs';
4
+ export { ThemeActionsState, ThemeDataState, ThemeGenerator, ThemeGeneratorProps, ThemeMode, applyThemeCSSVariables, buildCacheKey, themeToCSS, useDhemeClient, useGenerateTheme, useTheme, useThemeActions } from '@dheme/react';
5
5
  export { ColorTokens, GenerateThemeRequest, GenerateThemeResponse, HSLColor } from '@dheme/sdk';
6
6
 
7
7
  declare function DhemeProvider({ children, cookieSync, onThemeChange, onModeChange, theme: primaryColor, themeParams, ...props }: DhemeProviderProps): React.ReactElement;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { D as DhemeProviderProps, a as DhemeScriptProps } from './types-yW-Y2Yox.js';
3
- export { G as GenerateThemeStylesOptions } from './types-yW-Y2Yox.js';
4
- export { ThemeActionsState, ThemeDataState, ThemeMode, applyThemeCSSVariables, buildCacheKey, themeToCSS, useDhemeClient, useGenerateTheme, useTheme, useThemeActions } from '@dheme/react';
2
+ import { D as DhemeProviderProps, a as DhemeScriptProps } from './types-ClHCJGkl.js';
3
+ export { G as GenerateThemeStylesOptions } from './types-ClHCJGkl.js';
4
+ export { ThemeActionsState, ThemeDataState, ThemeGenerator, ThemeGeneratorProps, ThemeMode, applyThemeCSSVariables, buildCacheKey, themeToCSS, useDhemeClient, useGenerateTheme, useTheme, useThemeActions } from '@dheme/react';
5
5
  export { ColorTokens, GenerateThemeRequest, GenerateThemeResponse, HSLColor } from '@dheme/sdk';
6
6
 
7
7
  declare function DhemeProvider({ children, cookieSync, onThemeChange, onModeChange, theme: primaryColor, themeParams, ...props }: DhemeProviderProps): React.ReactElement;
package/dist/index.js CHANGED
@@ -32,13 +32,14 @@ var index_exports = {};
32
32
  __export(index_exports, {
33
33
  DhemeProvider: () => DhemeProvider,
34
34
  DhemeScript: () => DhemeScript,
35
- applyThemeCSSVariables: () => import_react6.applyThemeCSSVariables,
36
- buildCacheKey: () => import_react6.buildCacheKey,
37
- themeToCSS: () => import_react6.themeToCSS,
38
- useDhemeClient: () => import_react5.useDhemeClient,
39
- useGenerateTheme: () => import_react5.useGenerateTheme,
40
- useTheme: () => import_react5.useTheme,
41
- useThemeActions: () => import_react5.useThemeActions
35
+ ThemeGenerator: () => import_react5.ThemeGenerator,
36
+ applyThemeCSSVariables: () => import_react7.applyThemeCSSVariables,
37
+ buildCacheKey: () => import_react7.buildCacheKey,
38
+ themeToCSS: () => import_react7.themeToCSS,
39
+ useDhemeClient: () => import_react6.useDhemeClient,
40
+ useGenerateTheme: () => import_react6.useGenerateTheme,
41
+ useTheme: () => import_react6.useTheme,
42
+ useThemeActions: () => import_react6.useThemeActions
42
43
  });
43
44
  module.exports = __toCommonJS(index_exports);
44
45
 
@@ -164,13 +165,17 @@ async function DhemeScript({
164
165
  );
165
166
  }
166
167
 
167
- // src/index.ts
168
+ // src/components/ThemeGenerator.tsx
168
169
  var import_react5 = require("@dheme/react");
170
+
171
+ // src/index.ts
169
172
  var import_react6 = require("@dheme/react");
173
+ var import_react7 = require("@dheme/react");
170
174
  // Annotate the CommonJS export names for ESM import in node:
171
175
  0 && (module.exports = {
172
176
  DhemeProvider,
173
177
  DhemeScript,
178
+ ThemeGenerator,
174
179
  applyThemeCSSVariables,
175
180
  buildCacheKey,
176
181
  themeToCSS,
package/dist/index.mjs CHANGED
@@ -91,12 +91,16 @@ async function DhemeScript({
91
91
  );
92
92
  }
93
93
 
94
+ // src/components/ThemeGenerator.tsx
95
+ import { ThemeGenerator } from "@dheme/react";
96
+
94
97
  // src/index.ts
95
98
  import { useTheme, useThemeActions, useGenerateTheme, useDhemeClient } from "@dheme/react";
96
99
  import { themeToCSS as themeToCSS2, applyThemeCSSVariables, buildCacheKey as buildCacheKey2 } from "@dheme/react";
97
100
  export {
98
101
  DhemeProvider,
99
102
  DhemeScript,
103
+ ThemeGenerator,
100
104
  applyThemeCSSVariables,
101
105
  buildCacheKey2 as buildCacheKey,
102
106
  themeToCSS2 as themeToCSS,
package/dist/server.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { G as GenerateThemeStylesOptions } from './types-yW-Y2Yox.mjs';
1
+ import { G as GenerateThemeStylesOptions } from './types-ClHCJGkl.mjs';
2
2
  import { ThemeMode } from '@dheme/react';
3
3
  import { GenerateThemeResponse } from '@dheme/sdk';
4
4
 
package/dist/server.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { G as GenerateThemeStylesOptions } from './types-yW-Y2Yox.js';
1
+ import { G as GenerateThemeStylesOptions } from './types-ClHCJGkl.js';
2
2
  import { ThemeMode } from '@dheme/react';
3
3
  import { GenerateThemeResponse } from '@dheme/sdk';
4
4
 
@@ -5,7 +5,8 @@ interface DhemeProviderProps extends DhemeProviderProps$1 {
5
5
  cookieSync?: boolean;
6
6
  }
7
7
  interface DhemeScriptProps {
8
- apiKey: string;
8
+ /** API key (obrigatório para uso externo; omitir para rotas internas sem autenticação) */
9
+ apiKey?: string;
9
10
  theme: string;
10
11
  themeParams?: Omit<GenerateThemeRequest, 'theme'>;
11
12
  defaultMode?: ThemeMode;
@@ -13,7 +14,8 @@ interface DhemeScriptProps {
13
14
  nonce?: string;
14
15
  }
15
16
  interface GenerateThemeStylesOptions {
16
- apiKey: string;
17
+ /** API key (obrigatório para uso externo; omitir para rotas internas sem autenticação) */
18
+ apiKey?: string;
17
19
  theme: string;
18
20
  themeParams?: Omit<GenerateThemeRequest, 'theme'>;
19
21
  mode?: ThemeMode;
@@ -5,7 +5,8 @@ interface DhemeProviderProps extends DhemeProviderProps$1 {
5
5
  cookieSync?: boolean;
6
6
  }
7
7
  interface DhemeScriptProps {
8
- apiKey: string;
8
+ /** API key (obrigatório para uso externo; omitir para rotas internas sem autenticação) */
9
+ apiKey?: string;
9
10
  theme: string;
10
11
  themeParams?: Omit<GenerateThemeRequest, 'theme'>;
11
12
  defaultMode?: ThemeMode;
@@ -13,7 +14,8 @@ interface DhemeScriptProps {
13
14
  nonce?: string;
14
15
  }
15
16
  interface GenerateThemeStylesOptions {
16
- apiKey: string;
17
+ /** API key (obrigatório para uso externo; omitir para rotas internas sem autenticação) */
18
+ apiKey?: string;
17
19
  theme: string;
18
20
  themeParams?: Omit<GenerateThemeRequest, 'theme'>;
19
21
  mode?: ThemeMode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dheme/next",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Next.js App Router bindings for Dheme SDK with server-side theme generation",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",