@hanzogui/theme 7.3.0 → 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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isServer","startTransition","ensureThemeVariable","forceUpdateThemes","getConfig","getThemeCSSRules","mutatedAutoVariables","proxyThemeToParents","simpleHash","updateConfig","mutateThemes","themes","batch","insertCSS","props","allThemesProxied","allThemesRaw","name","theme","res","_mutateTheme","avoidUpdate","mutationType","themeRaw","cssRules","insertThemeCSS","themeName","updateThemeConfig","updateThemeStates","themesRaw","process","env","NODE_ENV","console","warn","config","themeIn","Error","theme2","key","themeProxied","response","rules","names","hasDarkLight","useMutatedVariables","updateStyle","length","map","v","val","join","Object","keys","id","existing","document","querySelector","style","createElement","appendChild","createTextNode","head","parentElement","removeChild"],"sources":["
|
|
1
|
+
{"version":3,"names":["isServer","startTransition","ensureThemeVariable","forceUpdateThemes","getConfig","getThemeCSSRules","mutatedAutoVariables","proxyThemeToParents","simpleHash","updateConfig","mutateThemes","themes","batch","insertCSS","props","allThemesProxied","allThemesRaw","name","theme","res","_mutateTheme","avoidUpdate","mutationType","themeRaw","cssRules","insertThemeCSS","themeName","updateThemeConfig","updateThemeStates","themesRaw","process","env","NODE_ENV","console","warn","config","themeIn","Error","theme2","key","themeProxied","response","rules","names","hasDarkLight","useMutatedVariables","updateStyle","length","map","v","val","join","Object","keys","id","existing","document","querySelector","style","createElement","appendChild","createTextNode","head","parentElement","removeChild"],"sources":["_mutateTheme.mjs"],"sourcesContent":["import { isServer } from \"@hanzogui/constants\";\nimport { startTransition } from \"@hanzogui/start-transition\";\nimport { ensureThemeVariable, forceUpdateThemes, getConfig, getThemeCSSRules, mutatedAutoVariables, proxyThemeToParents, simpleHash, updateConfig } from \"@hanzogui/web\";\n\nfunction mutateThemes({ themes, batch, insertCSS = true, ...props }) {\n\tconst allThemesProxied = {};\n\tconst allThemesRaw = {};\n\tfor (const { name, theme } of themes) {\n\t\tconst res = _mutateTheme({\n\t\t\t...props,\n\t\t\tname,\n\t\t\ttheme,\n\t\t\tavoidUpdate: true,\n\t\t\tmutationType: \"add\"\n\t\t});\n\t\tif (res) {\n\t\t\tallThemesProxied[name] = res.theme;\n\t\t\tallThemesRaw[name] = res.themeRaw;\n\t\t}\n\t}\n\tconst cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];\n\tstartTransition(() => {\n\t\tfor (const themeName in allThemesProxied) {\n\t\t\tconst theme = allThemesProxied[themeName];\n\t\t\tupdateThemeConfig(themeName, theme);\n\t\t}\n\t\tupdateThemeStates();\n\t});\n\treturn {\n\t\tthemes: allThemesProxied,\n\t\tthemesRaw: allThemesRaw,\n\t\tcssRules\n\t};\n}\nfunction _mutateTheme(props) {\n\tif (isServer) {\n\t\tif (process.env.NODE_ENV === \"development\") console.warn(\"Theme mutation is not supported on server side\");\n\t\treturn;\n\t}\n\tconst config = getConfig();\n\tconst { name: themeName, theme: themeIn, insertCSS, mutationType } = props;\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!config) throw new Error(\"No config\");\n\t\tconst theme2 = config.themes[props.name];\n\t\tif (mutationType !== \"add\" && !theme2) throw new Error(`${mutationType === \"replace\" ? \"Replace\" : \"Update\"} theme failed! Theme ${props.name} does not exist`);\n\t}\n\tconst theme = {\n\t\t...mutationType === \"update\" ? config.themes[themeName] ?? {} : {},\n\t\t...themeIn\n\t};\n\tfor (const key in theme) ensureThemeVariable(theme, key);\n\tconst themeProxied = proxyThemeToParents(themeName, theme);\n\tconst response = {\n\t\tthemeRaw: theme,\n\t\ttheme: themeProxied,\n\t\tcssRules: []\n\t};\n\tif (props.avoidUpdate) return response;\n\tif (insertCSS) response.cssRules = insertThemeCSS({ [themeName]: theme });\n\tupdateThemeConfig(themeName, themeProxied);\n\tupdateThemeStates();\n\treturn response;\n}\nfunction updateThemeConfig(themeName, theme) {\n\tconst config = getConfig();\n\tconfig.themes[themeName] = theme;\n\tupdateConfig(\"themes\", config.themes);\n}\nfunction updateThemeStates() {\n\tforceUpdateThemes();\n}\nfunction insertThemeCSS(themes, batch = false) {\n\tconst config = getConfig();\n\tlet cssRules = [];\n\tfor (const themeName in themes) {\n\t\tconst theme = themes[themeName];\n\t\tconst rules = getThemeCSSRules({\n\t\t\tconfig,\n\t\t\tthemeName,\n\t\t\tnames: [themeName],\n\t\t\thasDarkLight: true,\n\t\t\ttheme,\n\t\t\tuseMutatedVariables: true\n\t\t});\n\t\tcssRules = [...cssRules, ...rules];\n\t\tif (!batch) updateStyle(`t_theme_style_${themeName}`, rules);\n\t}\n\tif (mutatedAutoVariables.length > 0) updateStyle(`t_mutate_vars`, [`:root{${mutatedAutoVariables.map((v) => `--${v.name}:${v.val}`).join(\";\")}}`]);\n\tif (batch) updateStyle(`t_theme_style_${typeof batch == \"string\" ? batch : simpleHash(Object.keys(themes).join(\"\"))}`, cssRules);\n\treturn cssRules;\n}\nfunction updateStyle(id, rules) {\n\tconst existing = document.querySelector(`#${id}`);\n\tconst style = document.createElement(\"style\");\n\tstyle.id = id;\n\tstyle.appendChild(document.createTextNode(rules.join(\"\\n\")));\n\tdocument.head.appendChild(style);\n\tif (existing) existing.parentElement?.removeChild(existing);\n}\n\nexport { _mutateTheme, mutateThemes };"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,mBAAmB,EAAEC,iBAAiB,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,oBAAoB,EAAEC,mBAAmB,EAAEC,UAAU,EAAEC,YAAY,QAAQ,eAAe;AAExK,SAASC,YAAYA,CAAC;EAAEC,MAAM;EAAEC,KAAK;EAAEC,SAAS,GAAG,IAAI;EAAE,GAAGC;AAAM,CAAC,EAAE;EACpE,MAAMC,gBAAgB,GAAG,CAAC,CAAC;EAC3B,MAAMC,YAAY,GAAG,CAAC,CAAC;EACvB,KAAK,MAAM;IAAEC,IAAI;IA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,QAAQ,CAACG,aAAa,CAAC,OAAO,CAAC;EAC7CD,KAAK,CAACJ,EAAE,GAAGA,EAAE;EACbI,KAAK,CAACE,WAAW,CAACJ,QAAQ,CAACK,cAAc,CAACnB,KAAK,CAACS,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;EAC5DK,QAAQ,CAACM,IAAI,CAACF,WAAW,CAACF,KAAK,CAAC;EAChC,IAAIH,QAAQ,EAAEA,QAAQ,CAACQ,aAAa,EAAEC,WAAW,CAACT,QAAQ,CAAC;AAC5D;AAEA,SAASnC,YAAY,EAAEV,YAAY","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isServer } from "@hanzogui/constants";
|
|
2
2
|
import { startTransition } from "@hanzogui/start-transition";
|
|
3
|
-
import { ensureThemeVariable, forceUpdateThemes, getConfig,
|
|
3
|
+
import { ensureThemeVariable, forceUpdateThemes, getConfig, proxyThemeToParents, updateConfig } from "@hanzogui/web";
|
|
4
4
|
function mutateThemes(param) {
|
|
5
5
|
var {
|
|
6
6
|
themes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isServer","startTransition","ensureThemeVariable","forceUpdateThemes","getConfig","
|
|
1
|
+
{"version":3,"names":["isServer","startTransition","ensureThemeVariable","forceUpdateThemes","getConfig","proxyThemeToParents","updateConfig","mutateThemes","param","themes","batch","insertCSS","props","allThemesProxied","allThemesRaw","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","name","theme","value","res","_mutateTheme","avoidUpdate","mutationType","themeRaw","err","return","cssRules","insertThemeCSS","themeName","theme2","updateThemeConfig","updateThemeStates","themesRaw","process","env","NODE_ENV","console","warn","config","themeIn","Error","_config_themes_themeName","theme1","key","themeProxied","response","arguments","length"],"sources":["_mutateTheme.native.js"],"sourcesContent":["import { isServer } from \"@hanzogui/constants\";\nimport { startTransition } from \"@hanzogui/start-transition\";\nimport { ensureThemeVariable, forceUpdateThemes, getConfig, proxyThemeToParents, updateConfig } from \"@hanzogui/web\";\n\nfunction mutateThemes(param) {\n\tvar { themes, batch, insertCSS = true, ...props } = param;\n\tvar allThemesProxied = {};\n\tvar allThemesRaw = {};\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = themes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar { name, theme } = _step.value;\n\t\t\tvar res = _mutateTheme({\n\t\t\t\t...props,\n\t\t\t\tname,\n\t\t\t\ttheme,\n\t\t\t\tavoidUpdate: true,\n\t\t\t\tmutationType: \"add\"\n\t\t\t});\n\t\t\tif (res) {\n\t\t\t\tallThemesProxied[name] = res.theme;\n\t\t\t\tallThemesRaw[name] = res.themeRaw;\n\t\t\t}\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\tvar cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];\n\tstartTransition(function() {\n\t\tfor (var themeName in allThemesProxied) {\n\t\t\tvar theme2 = allThemesProxied[themeName];\n\t\t\tupdateThemeConfig(themeName, theme2);\n\t\t}\n\t\tupdateThemeStates();\n\t});\n\treturn {\n\t\tthemes: allThemesProxied,\n\t\tthemesRaw: allThemesRaw,\n\t\tcssRules\n\t};\n}\nfunction _mutateTheme(props) {\n\tif (isServer) {\n\t\tif (process.env.NODE_ENV === \"development\") console.warn(\"Theme mutation is not supported on server side\");\n\t\treturn;\n\t}\n\tvar config = getConfig();\n\tvar { name: themeName, theme: themeIn, insertCSS, mutationType } = props;\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tif (!config) throw new Error(\"No config\");\n\t\tvar theme = config.themes[props.name];\n\t\tif (mutationType !== \"add\" && !theme) throw new Error(`${mutationType === \"replace\" ? \"Replace\" : \"Update\"} theme failed! Theme ${props.name} does not exist`);\n\t}\n\tvar _config_themes_themeName;\n\tvar theme1 = {\n\t\t...mutationType === \"update\" ? (_config_themes_themeName = config.themes[themeName]) !== null && _config_themes_themeName !== void 0 ? _config_themes_themeName : {} : {},\n\t\t...themeIn\n\t};\n\tfor (var key in theme1) ensureThemeVariable(theme1, key);\n\tvar themeProxied = proxyThemeToParents(themeName, theme1);\n\tvar response = {\n\t\tthemeRaw: theme1,\n\t\ttheme: themeProxied,\n\t\tcssRules: []\n\t};\n\tif (props.avoidUpdate) return response;\n\tif (insertCSS) response.cssRules = insertThemeCSS({ [themeName]: theme1 });\n\tupdateThemeConfig(themeName, themeProxied);\n\tupdateThemeStates();\n\treturn response;\n}\nfunction updateThemeConfig(themeName, theme) {\n\tvar config = getConfig();\n\tconfig.themes[themeName] = theme;\n\tupdateConfig(\"themes\", config.themes);\n}\nfunction updateThemeStates() {\n\tforceUpdateThemes();\n}\nfunction insertThemeCSS(themes) {\n\targuments.length > 1 && arguments[1] !== void 0 && arguments[1];\n\treturn [];\n}\n\nexport { _mutateTheme, mutateThemes };"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,mBAAmB,EAAEC,iBAAiB,EAAEC,SAAS,EAAEC,mBAAmB,EAAEC,YAAY,QAAQ,eAAe;AAEpH,SAASC,YAAYA,CAACC,KAAK,EAAE;EAC5B,IAAI;IAAEC,MAAM;IAAEC,KAAK;IAAEC,SAAS,GAAG,IAAI;IAAE,GAAGC;EAAM,CAAC,GAAGJ,KAAK;EACzD,IAAIK,gBAAgB,GAAG,CAAC,CAAC;EACzB,IAAIC,YAAY,GAAG,CAAC,CAAC;EACrB,IAAIC,yBAAyB,GAAG,IAAI;IAAEC,iBAAiB,GAAG,KAAK;IAAEC,cAAc,GAAG,KAAK,CAAC;EACxF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;EACzD,IAAIG,QAAQ,GAAG;IACdtB,QAAQ,EAAEmB,MAAM;IAChBzB,KAAK,EAAE2B,YAAY;IACnBlB,QAAQ,EAAE;EACX,CAAC;EACD,IAAItB,KAAK,CAACiB,WAAW,EAAE,OAAOwB,QAAQ;EACtC,IAAI1C,SAAS,EAAE0C,QAAQ,CAACnB,QAAQ,GAAGC,cAAc,CAAC;IAAE,CAACC,SAAS,GAAGc;EAAO,CAAC,CAAC;EAC1EZ,iBAAiB,CAACF,SAAS,EAAEgB,YAAY,CAAC;EAC1Cb,iBAAiB,CAAC,CAAC;EACnB,OAAOc,QAAQ;AAChB;AACA,SAASf,iBAAiBA,CAACF,SAAS,EAAEX,KAAK,EAAE;EAC5C,IAAIqB,MAAM,GAAG1C,SAAS,CAAC,CAAC;EACxB0C,MAAM,CAACrC,MAAM,CAAC2B,SAAS,CAAC,GAAGX,KAAK;EAChCnB,YAAY,CAAC,QAAQ,EAAEwC,MAAM,CAACrC,MAAM,CAAC;AACtC;AACA,SAAS8B,iBAAiBA,CAAA,EAAG;EAC5BpC,iBAAiB,CAAC,CAAC;AACpB;AACA,SAASgC,cAAcA,CAAC1B,MAAM,EAAE;EAC/B6C,SAAS,CAACC,MAAM,GAAG,CAAC,IAAID,SAAS,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,IAAIA,SAAS,CAAC,CAAC,CAAC;EAC/D,OAAO,EAAE;AACV;AAEA,SAAS1B,YAAY,EAAErB,YAAY","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/theme",
|
|
3
|
-
"version": "
|
|
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": "
|
|
32
|
-
"watch": "
|
|
33
|
-
"clean": "
|
|
34
|
-
"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
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@hanzogui/constants": "
|
|
38
|
-
"@hanzogui/start-transition": "
|
|
39
|
-
"@hanzogui/web": "
|
|
37
|
+
"@hanzogui/constants": "8.0.0",
|
|
38
|
+
"@hanzogui/start-transition": "8.0.0",
|
|
39
|
+
"@hanzogui/web": "8.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@hanzogui/build": "
|
|
42
|
+
"@hanzogui/build": "8.0.0",
|
|
43
43
|
"react": ">=19"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": ">=19"
|
|
47
|
-
}
|
|
48
|
-
"license": "BSD-3-Clause",
|
|
49
|
-
"author": "Hanzo AI <dev@hanzo.ai>"
|
|
47
|
+
}
|
|
50
48
|
}
|
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.
|