@hanzogui/theme-builder 7.3.1 → 8.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzogui/theme-builder",
3
- "version": "7.3.1",
3
+ "version": "8.0.0",
4
4
  "source": "src/index.ts",
5
5
  "files": [
6
6
  "src",
@@ -28,23 +28,21 @@
28
28
  "access": "public"
29
29
  },
30
30
  "scripts": {
31
- "build": "gui-build",
32
- "watch": "gui-build --watch",
33
- "clean": "gui-build clean",
34
- "clean:build": "gui-build clean:build",
31
+ "build": "hanzogui-build",
32
+ "watch": "hanzogui-build --watch",
33
+ "clean": "hanzogui-build clean",
34
+ "clean:build": "hanzogui-build clean:build",
35
35
  "test": "vitest --run",
36
36
  "test:web": "bun run test",
37
37
  "test:watch": "vitest"
38
38
  },
39
39
  "dependencies": {
40
- "@hanzogui/create-theme": "7.3.1",
41
- "@hanzogui/web": "7.3.1",
40
+ "@hanzogui/create-theme": "8.0.0",
41
+ "@hanzogui/web": "8.0.0",
42
42
  "color2k": "^2.0.2"
43
43
  },
44
44
  "devDependencies": {
45
- "@hanzogui/build": "7.3.1",
45
+ "@hanzogui/build": "8.0.0",
46
46
  "vitest": "4.0.4"
47
- },
48
- "license": "BSD-3-Clause",
49
- "author": "Hanzo AI <dev@hanzo.ai>"
47
+ }
50
48
  }
@@ -203,7 +203,7 @@ export const getLastBuilder = () => lastBuilder
203
203
 
204
204
  /**
205
205
  * V4 version of createThemes - uses v4 theme ordering for backwards compatibility.
206
- * Use this for v4 themes (like v4-gui.ts).
206
+ * Use this for v4 themes (like v4-hanzogui.ts).
207
207
  */
208
208
  export function createV4Themes<
209
209
  Extra extends ExtraThemeValuesByScheme = ExtraThemeValuesByScheme,
@@ -616,7 +616,7 @@ export function createPalettes(palettes: BuildPalettes): SimplePaletteDefinition
616
616
  * - Children and grandChildren themes are added FIRST
617
617
  * - Accent theme is added LAST with avoidNestingWithin for children themes
618
618
  *
619
- * Use this for v4 themes (like v4-gui.ts). The default createSimpleThemeBuilder
619
+ * Use this for v4 themes (like v4-hanzogui.ts). The default createSimpleThemeBuilder
620
620
  * now uses v5 ordering.
621
621
  */
622
622
  export function createV4ThemeBuilder<
@@ -10,7 +10,7 @@ import type { BuildPalette } from './types'
10
10
  const paletteSize = 12
11
11
 
12
12
  // how many things come before the actual bg color (transparencies etc)
13
- // 👋 SYNC WITH gui.dev/features/studio/constants
13
+ // 👋 SYNC WITH hanzogui.dev/features/studio/constants
14
14
  export const PALETTE_BACKGROUND_OFFSET = 6
15
15
 
16
16
  const generateColorPalette = ({
@@ -72,7 +72,7 @@ export declare function createThemes<Extra extends ExtraThemeValuesByScheme = Ex
72
72
  export declare const getLastBuilder: () => ThemeBuilder<import("./ThemeBuilder").ThemeBuilderInternalState, Record<string, string>> | null;
73
73
  /**
74
74
  * V4 version of createThemes - uses v4 theme ordering for backwards compatibility.
75
- * Use this for v4 themes (like v4-gui.ts).
75
+ * Use this for v4 themes (like v4-hanzogui.ts).
76
76
  */
77
77
  export declare function createV4Themes<Extra extends ExtraThemeValuesByScheme = ExtraThemeValuesByScheme, SubThemes extends SimpleThemesDefinition = SimpleThemesDefinition, ComponentThemes extends SimpleThemesDefinition | false = SimpleThemesDefinition, GrandChildrenThemes extends SimpleThemesDefinition | undefined = undefined, Accent extends BaseThemeDefinition<Extra> | undefined = undefined, Templates extends BuildTemplates = typeof defaultTemplates, GetThemeReturn extends Record<string, string | number> = Record<string, string>>(props: CreateThemesProps<Accent, GrandChildrenThemes, Extra, SubThemes, ComponentThemes, Templates, GetThemeReturn>): Record<"light" | "dark" | ((Accent extends undefined ? false : true) extends infer T ? T extends (Accent extends undefined ? false : true) ? T extends true ? "light_accent" | "dark_accent" : never : never : never) | (keyof SubThemes extends string ? `light_${(GrandChildrenThemes extends undefined ? undefined : Record<keyof GrandChildrenThemes, any>) extends infer T_1 ? T_1 extends (GrandChildrenThemes extends undefined ? undefined : Record<keyof GrandChildrenThemes, any>) ? T_1 extends undefined ? string & keyof SubThemes : NamesWithChildrenNames<string & keyof SubThemes, keyof T_1> : never : never}` | `dark_${(GrandChildrenThemes extends undefined ? undefined : Record<keyof GrandChildrenThemes, any>) extends infer T_2 ? T_2 extends (GrandChildrenThemes extends undefined ? undefined : Record<keyof GrandChildrenThemes, any>) ? T_2 extends undefined ? string & keyof SubThemes : NamesWithChildrenNames<string & keyof SubThemes, keyof T_2> : never : never}` : never), { [ThemeKey in "colorTransparent" | "color" | "colorHover" | "colorPress" | "colorFocus" | "placeholderColor" | "outlineColor" | "accentBackground" | "accentColor" | "background0" | "background02" | "background04" | "background06" | "background08" | "color1" | "color2" | "color3" | "color4" | "color5" | "color6" | "color7" | "color8" | "color9" | "color10" | "color11" | "color12" | "color0" | "color02" | "color04" | "color06" | "color08" | "background" | "backgroundHover" | "backgroundPress" | "backgroundFocus" | "borderColor" | "borderColorHover" | "borderColorPress" | "borderColorFocus" | keyof Extra["dark"] | ((Accent extends undefined ? false : true) extends infer T_3 ? T_3 extends (Accent extends undefined ? false : true) ? T_3 extends true ? "accent0" | "accent2" | "accent1" | "accent3" | "accent4" | "accent5" | "accent6" | "accent7" | "accent8" | "accent9" | "accent10" | "accent11" | "accent12" : never : never : never)]: string; } & GetThemeReturn>;
78
78
  type NamesWithChildrenNames<ParentNames extends string, ChildNames> = ParentNames | (ChildNames extends string ? `${ParentNames}_${ChildNames}` : never);
@@ -111,7 +111,7 @@ export declare function createPalettes(palettes: BuildPalettes): SimplePaletteDe
111
111
  * - Children and grandChildren themes are added FIRST
112
112
  * - Accent theme is added LAST with avoidNestingWithin for children themes
113
113
  *
114
- * Use this for v4 themes (like v4-gui.ts). The default createSimpleThemeBuilder
114
+ * Use this for v4 themes (like v4-hanzogui.ts). The default createSimpleThemeBuilder
115
115
  * now uses v5 ordering.
116
116
  */
117
117
  export declare function createV4ThemeBuilder<Extra extends ExtraThemeValuesByScheme, Templates extends BuildTemplates, Palettes extends SimplePaletteDefinitions, ChildrenThemes extends Record<string, {
package/LICENSE DELETED
@@ -1,42 +0,0 @@
1
- BSD 3-Clause License
2
-
3
- Copyright (c) 2026-present, Hanzo AI, Inc.
4
-
5
- Portions of this software are derived from upstream code originally licensed under
6
- the MIT License, with the following copyright notices retained per its terms:
7
-
8
- Copyright (c) 2020 Nate Wienert
9
- Copyright (c) 2015-present, Nicolas Gallagher.
10
- Copyright (c) 2015-present, Facebook, Inc.
11
- Copyright (c) 2021 Radix
12
- Copyright (c) 2017 Carmelo Pullara
13
- Copyright (c) 2018 Framer B.V.
14
- Copyright (c) 2022 WorkOS
15
-
16
- All rights reserved.
17
-
18
- Redistribution and use in source and binary forms, with or without
19
- modification, are permitted provided that the following conditions are met:
20
-
21
- 1. Redistributions of source code must retain the above copyright notice, this
22
- list of conditions and the following disclaimer.
23
-
24
- 2. Redistributions in binary form must reproduce the above copyright notice,
25
- this list of conditions and the following disclaimer in the documentation
26
- and/or other materials provided with the distribution.
27
-
28
- 3. Neither the name of the copyright holder nor the names of its contributors
29
- may be used to endorse or promote products derived from this software
30
- without specific prior written permission.
31
-
32
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
33
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
36
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
37
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
38
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
39
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
40
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
41
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42
- POSSIBILITY OF SUCH DAMAGE.