@hanzogui/logo 8.3.5 → 8.4.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/LICENSE +26 -0
- package/NOTICE +60 -0
- package/dist/cjs/tints.js +32 -30
- package/dist/cjs/tints.js.map +1 -1
- package/dist/cjs/useTint.js +11 -6
- package/dist/cjs/useTint.js.map +1 -1
- package/dist/esm/tints.js +31 -29
- package/dist/esm/tints.js.map +1 -1
- package/dist/esm/useTint.js +12 -7
- package/dist/esm/useTint.js.map +1 -1
- package/package.json +9 -8
- package/src/tints.tsx +87 -37
- package/src/useTint.tsx +12 -7
- package/types/tints.d.ts +38 -12
- package/types/tints.d.ts.map +1 -1
- package/types/useTint.d.ts.map +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Nate Wienert
|
|
4
|
+
Copyright (c) 2015-present, Nicolas Gallagher.
|
|
5
|
+
Copyright (c) 2015-present, Facebook, Inc.
|
|
6
|
+
Copyright (c) 2021 Radix
|
|
7
|
+
Copyright (c) 2017 Carmelo Pullara
|
|
8
|
+
Copyright (c) 2018 Framer B.V.
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Hanzo GUI
|
|
2
|
+
Copyright (c) 2026-present, Hanzo AI, Inc.
|
|
3
|
+
|
|
4
|
+
This product is derived from Tamagui (https://github.com/tamagui/tamagui),
|
|
5
|
+
licensed under the MIT License. Its original copyright and permission notices
|
|
6
|
+
are reproduced below, as that license requires:
|
|
7
|
+
|
|
8
|
+
MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2020 Nate Wienert
|
|
11
|
+
Copyright (c) 2015-present, Nicolas Gallagher.
|
|
12
|
+
Copyright (c) 2015-present, Facebook, Inc.
|
|
13
|
+
Copyright (c) 2021 Radix
|
|
14
|
+
Copyright (c) 2017 Carmelo Pullara
|
|
15
|
+
Copyright (c) 2018 Framer B.V.
|
|
16
|
+
|
|
17
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
19
|
+
in the Software without restriction, including without limitation the rights
|
|
20
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
22
|
+
furnished to do so, subject to the following conditions:
|
|
23
|
+
|
|
24
|
+
The above copyright notice and this permission notice shall be included in all
|
|
25
|
+
copies or substantial portions of the Software.
|
|
26
|
+
|
|
27
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
29
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
30
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
32
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
|
+
SOFTWARE.
|
|
34
|
+
|
|
35
|
+
--- Fork provenance ---
|
|
36
|
+
|
|
37
|
+
Hanzo GUI is a fork of Tamagui, not a product that bundles it. The git history
|
|
38
|
+
in this repository is Tamagui's history continued, and every package in this
|
|
39
|
+
workspace except the nine listed below is Tamagui's work, carried here under the
|
|
40
|
+
MIT license above. Renaming those packages into the @hanzogui scope changed what
|
|
41
|
+
they are called, not who wrote them.
|
|
42
|
+
|
|
43
|
+
Written at Hanzo:
|
|
44
|
+
|
|
45
|
+
@hanzogui/shell pkgs/ui/shell
|
|
46
|
+
@hanzogui/chrome pkgs/ui/chrome
|
|
47
|
+
@hanzogui/telemetry pkgs/telemetry
|
|
48
|
+
@hanzo/booker pkgs/calendar
|
|
49
|
+
@hanzogui/tauri pkgs/tauri
|
|
50
|
+
@hanzogui/get pkgs/get
|
|
51
|
+
@hanzogui/recipes pkgs/recipes
|
|
52
|
+
@hanzogui/font-zen pkgs/core/font-zen
|
|
53
|
+
@hanzogui/desktop apps/desktop
|
|
54
|
+
|
|
55
|
+
This file is the whole of the attribution, and it has to be exact rather than
|
|
56
|
+
approximate. Apart from it, the LICENSE, and one line of descent in the README,
|
|
57
|
+
the upstream name is deliberately absent from the product surface — the package
|
|
58
|
+
names, the UI, and the documentation site. That is the house rule for every
|
|
59
|
+
import we carry. Hanzo GUI is not affiliated with, sponsored by, or endorsed by
|
|
60
|
+
Tamagui.
|
package/dist/cjs/tints.js
CHANGED
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.onTintFamilyChange = exports.setNextTintFamily = void 0;
|
|
3
|
+
exports.onTintFamilyChange = exports.setNextTintFamily = exports.NEUTRAL = exports.STOPS = void 0;
|
|
4
4
|
exports.getTints = getTints;
|
|
5
5
|
exports.useTints = useTints;
|
|
6
6
|
exports.setTintFamily = setTintFamily;
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
8
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
9
9
|
const listeners = new Set();
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
exports.STOPS = {
|
|
11
|
+
red: { accent: 9, dark: 9, light: 9 },
|
|
12
|
+
orange: { accent: 9, dark: 9, light: 11 },
|
|
13
|
+
yellow: { accent: 9, dark: 9, light: 9 },
|
|
14
|
+
green: { accent: 9, dark: 9, light: 10 },
|
|
15
|
+
blue: { accent: 9, dark: 9, light: 10 },
|
|
16
|
+
purple: { accent: 9, dark: 9, light: 9 },
|
|
17
|
+
white: { accent: 1, dark: 1, light: 1, neutral: true },
|
|
18
|
+
gray: { accent: null, dark: 9, light: 10, neutral: true },
|
|
19
|
+
black: { accent: 1, dark: 1, light: 1, neutral: true },
|
|
20
|
+
};
|
|
21
|
+
// Every family is one length, because readers index the ramp by it.
|
|
22
|
+
const LENGTH = 9;
|
|
23
|
+
const repeat = (...names) => Array.from({ length: LENGTH }, (_, i) => names[i % names.length]);
|
|
24
|
+
// The default is the spectrum with the scale's ends after it, and the grey it
|
|
25
|
+
// rests on between the warm half and the cool one.
|
|
12
26
|
const familiesValues = {
|
|
13
|
-
hanzogui: [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
'yellow',
|
|
17
|
-
'yellow',
|
|
18
|
-
'yellow',
|
|
19
|
-
'yellow',
|
|
20
|
-
'yellow',
|
|
21
|
-
'yellow',
|
|
22
|
-
'yellow',
|
|
23
|
-
],
|
|
24
|
-
halloween: [
|
|
25
|
-
'yellow',
|
|
26
|
-
'gray',
|
|
27
|
+
hanzogui: [
|
|
28
|
+
'red',
|
|
29
|
+
'orange',
|
|
27
30
|
'yellow',
|
|
28
31
|
'gray',
|
|
29
|
-
'yellow',
|
|
30
|
-
'gray',
|
|
31
|
-
'yellow',
|
|
32
|
-
],
|
|
33
|
-
valentine: ['red', 'red', 'red', 'red', 'red', 'red', 'red'],
|
|
34
|
-
lunar: ['yellow', 'red', 'red', 'red', 'red', 'red', 'yellow'],
|
|
35
|
-
stpatricks: [
|
|
36
|
-
'green',
|
|
37
|
-
'yellow',
|
|
38
|
-
'green',
|
|
39
|
-
'yellow',
|
|
40
|
-
'green',
|
|
41
|
-
'yellow',
|
|
42
32
|
'green',
|
|
33
|
+
'blue',
|
|
34
|
+
'purple',
|
|
35
|
+
'white',
|
|
36
|
+
'black',
|
|
43
37
|
],
|
|
38
|
+
xmas: repeat('red', 'green'),
|
|
39
|
+
easter: repeat('yellow'),
|
|
40
|
+
halloween: repeat('yellow', 'gray'),
|
|
41
|
+
valentine: repeat('red'),
|
|
42
|
+
lunar: ['yellow', ...repeat('red').slice(0, LENGTH - 2), 'yellow'],
|
|
43
|
+
stpatricks: repeat('green', 'yellow'),
|
|
44
44
|
};
|
|
45
|
+
/** Where the ramp rests: the stop that names no accent. */
|
|
46
|
+
exports.NEUTRAL = familiesValues.hanzogui.findIndex((name) => exports.STOPS[name]?.accent === null);
|
|
45
47
|
const DEFAULT_FAMILY = 'hanzogui';
|
|
46
48
|
const familiesNames = Object.keys(familiesValues);
|
|
47
49
|
const families = familiesValues;
|
package/dist/cjs/tints.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tints.js","sourceRoot":"","sources":["../../src/tints.tsx"],"names":[],"mappings":";;;;;;;AAAA,0DAAyB;AAKzB,MAAM,SAAS,GAAG,IAAI,GAAG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M,iBAAiB,GAAG,GAAS,EAAE;IAC1C,aAAa,CAAC,aAAa,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,CAAA;AACvF,CAAC,CAAA;AAFY,QAAA,iBAAiB,GAAjB,iBAAiB,CAE7B;AAEM,MAAM,kBAAkB,GAAG,CAAC,EAAiB,EAAE,EAAE;IACtD,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACjB,OAAO,GAAS,EAAE;QAChB,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IACtB,CAAC,CAAA;AACH,CAAC,CAAA;AALY,QAAA,kBAAkB,GAAlB,kBAAkB,CAK9B"}
|
package/dist/cjs/useTint.js
CHANGED
|
@@ -6,7 +6,7 @@ const tslib_1 = require("tslib");
|
|
|
6
6
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
7
7
|
const gui_1 = require("@hanzo/gui");
|
|
8
8
|
const tints_tsx_1 = require("./tints.js");
|
|
9
|
-
let current =
|
|
9
|
+
let current = tints_tsx_1.NEUTRAL;
|
|
10
10
|
let disableTintTheme = false;
|
|
11
11
|
const listeners = new Set();
|
|
12
12
|
const disableListeners = new Set();
|
|
@@ -43,11 +43,11 @@ function getDocsSection(pathname) {
|
|
|
43
43
|
? 'compiler'
|
|
44
44
|
: pathname.startsWith('/ui/')
|
|
45
45
|
? 'ui'
|
|
46
|
-
: pathname.startsWith('/docs/')
|
|
46
|
+
: pathname.startsWith('/docs/') || pathname.startsWith('/api')
|
|
47
47
|
? 'core'
|
|
48
48
|
: null;
|
|
49
49
|
}
|
|
50
|
-
exports.InitialPathContext = (0, react_1.createContext)(
|
|
50
|
+
exports.InitialPathContext = (0, react_1.createContext)(tints_tsx_1.NEUTRAL);
|
|
51
51
|
const useTint = (altOffset = -1) => {
|
|
52
52
|
const initial = (0, react_1.useContext)(exports.InitialPathContext);
|
|
53
53
|
const didHydrate = (0, gui_1.useDidFinishSSR)();
|
|
@@ -68,9 +68,14 @@ const useTint = (altOffset = -1) => {
|
|
|
68
68
|
disableListeners.delete(cb);
|
|
69
69
|
};
|
|
70
70
|
}, []);
|
|
71
|
-
//
|
|
72
|
-
|
|
73
|
-
const
|
|
71
|
+
// A neutral stop names a colour without washing the page, so what shows
|
|
72
|
+
// under one is the ground as published.
|
|
73
|
+
const wash = (at) => {
|
|
74
|
+
const name = tints[at];
|
|
75
|
+
return disabled || !name || tints_tsx_1.STOPS[name]?.neutral ? null : name;
|
|
76
|
+
};
|
|
77
|
+
const tint = wash(index);
|
|
78
|
+
const tintAlt = wash(tintAltIndex);
|
|
74
79
|
return {
|
|
75
80
|
...tintsContext,
|
|
76
81
|
tints: tintsContext.tints,
|
package/dist/cjs/useTint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTint.js","sourceRoot":"","sources":["../../src/useTint.tsx"],"names":[],"mappings":";;;;;AAAA,uDAA6E;AAC7E,oCAA4D;AAC5D,
|
|
1
|
+
{"version":3,"file":"useTint.js","sourceRoot":"","sources":["../../src/useTint.tsx"],"names":[],"mappings":";;;;;AAAA,uDAA6E;AAC7E,oCAA4D;AAC5D,0CAAmF;AAEnF,IAAI,OAAO,GAAG,mBAAO,CAAA;AACrB,IAAI,gBAAgB,GAAG,KAAK,CAAA;AAE5B,MAAM,SAAS,GAAG,IAAI,GAAG,EAAY,CAAA;AACrC,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAY,CAAA;AAErC,MAAM,YAAY,GAAG,CAAC,QAA+B,EAAE,EAAE;IAC9D,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IACvB,OAAO,GAAS,EAAE;QAChB,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC5B,CAAC,CAAA;AACH,CAAC,CAAA;AALY,QAAA,YAAY,GAAZ,YAAY,CAKxB;AAED,MAAM,QAAQ,GAAG,IAAA,oBAAQ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AC1B,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAA;QACtB,OAAO,QAAQ,IAAI,CAAC,IAAI,IAAI,iBAAK,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;IAChE,CAAC,CAAA;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;IACxB,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,CAAA;IAElC,OAAO;QACL,GAAG,YAAY;QACf,KAAK,EAAE,YAAY,CAAC,KAAoB;QACxC,SAAS,EAAE,KAAK;QAChB,YAAY;QACZ,IAAI,EAAE,IAAiB;QACvB,OAAO,EAAE,OAAoB;QAC7B,YAAY,EAAZ,QAAA,YAAY;QACZ,iBAAiB,EAAjB,6BAAiB;QACjB,mBAAmB,EAAnB,QAAA,mBAAmB;QACnB,gBAAgB,EAAE,QAAQ;QAC1B,WAAW,EAAE,GAAG,EAAE;YAChB,eAAK,CAAC,eAAe,CAAC,GAAG,EAAE;gBACzB,IAAA,QAAA,YAAY,EAAC,KAAK,GAAG,CAAC,CAAC,CAAA;YACzB,CAAC,CAAC,CAAA;QACJ,CAAC;KACO,CAAA;AACZ,CAAC,CAAA;AAvEY,QAAA,OAAO,GAAP,OAAO,CAuEnB"}
|
package/dist/esm/tints.js
CHANGED
|
@@ -1,40 +1,42 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
const listeners = new Set();
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
export const STOPS = {
|
|
4
|
+
red: { accent: 9, dark: 9, light: 9 },
|
|
5
|
+
orange: { accent: 9, dark: 9, light: 11 },
|
|
6
|
+
yellow: { accent: 9, dark: 9, light: 9 },
|
|
7
|
+
green: { accent: 9, dark: 9, light: 10 },
|
|
8
|
+
blue: { accent: 9, dark: 9, light: 10 },
|
|
9
|
+
purple: { accent: 9, dark: 9, light: 9 },
|
|
10
|
+
white: { accent: 1, dark: 1, light: 1, neutral: true },
|
|
11
|
+
gray: { accent: null, dark: 9, light: 10, neutral: true },
|
|
12
|
+
black: { accent: 1, dark: 1, light: 1, neutral: true },
|
|
13
|
+
};
|
|
14
|
+
// Every family is one length, because readers index the ramp by it.
|
|
15
|
+
const LENGTH = 9;
|
|
16
|
+
const repeat = (...names) => Array.from({ length: LENGTH }, (_, i) => names[i % names.length]);
|
|
17
|
+
// The default is the spectrum with the scale's ends after it, and the grey it
|
|
18
|
+
// rests on between the warm half and the cool one.
|
|
5
19
|
const familiesValues = {
|
|
6
|
-
hanzogui: [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
'yellow',
|
|
10
|
-
'yellow',
|
|
11
|
-
'yellow',
|
|
12
|
-
'yellow',
|
|
13
|
-
'yellow',
|
|
14
|
-
'yellow',
|
|
15
|
-
'yellow',
|
|
16
|
-
],
|
|
17
|
-
halloween: [
|
|
18
|
-
'yellow',
|
|
19
|
-
'gray',
|
|
20
|
+
hanzogui: [
|
|
21
|
+
'red',
|
|
22
|
+
'orange',
|
|
20
23
|
'yellow',
|
|
21
24
|
'gray',
|
|
22
|
-
'yellow',
|
|
23
|
-
'gray',
|
|
24
|
-
'yellow',
|
|
25
|
-
],
|
|
26
|
-
valentine: ['red', 'red', 'red', 'red', 'red', 'red', 'red'],
|
|
27
|
-
lunar: ['yellow', 'red', 'red', 'red', 'red', 'red', 'yellow'],
|
|
28
|
-
stpatricks: [
|
|
29
|
-
'green',
|
|
30
|
-
'yellow',
|
|
31
|
-
'green',
|
|
32
|
-
'yellow',
|
|
33
|
-
'green',
|
|
34
|
-
'yellow',
|
|
35
25
|
'green',
|
|
26
|
+
'blue',
|
|
27
|
+
'purple',
|
|
28
|
+
'white',
|
|
29
|
+
'black',
|
|
36
30
|
],
|
|
31
|
+
xmas: repeat('red', 'green'),
|
|
32
|
+
easter: repeat('yellow'),
|
|
33
|
+
halloween: repeat('yellow', 'gray'),
|
|
34
|
+
valentine: repeat('red'),
|
|
35
|
+
lunar: ['yellow', ...repeat('red').slice(0, LENGTH - 2), 'yellow'],
|
|
36
|
+
stpatricks: repeat('green', 'yellow'),
|
|
37
37
|
};
|
|
38
|
+
/** Where the ramp rests: the stop that names no accent. */
|
|
39
|
+
export const NEUTRAL = familiesValues.hanzogui.findIndex((name) => STOPS[name]?.accent === null);
|
|
38
40
|
const DEFAULT_FAMILY = 'hanzogui';
|
|
39
41
|
const familiesNames = Object.keys(familiesValues);
|
|
40
42
|
const families = familiesValues;
|
package/dist/esm/tints.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tints.js","sourceRoot":"","sources":["../../src/tints.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,MAAM,SAAS,GAAG,IAAI,GAAG,EAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"tints.js","sourceRoot":"","sources":["../../src/tints.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,MAAM,SAAS,GAAG,IAAI,GAAG,EAAiB,CAAA;AAqC1C,MAAM,CAAC,MAAM,KAAK,GAAyB;IACzC,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;IACrC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;IACxC,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACxC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACvC,MAAM,EAAE,EAAE,MAAM,EAA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,GAAG,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAA;QAC/C,4BAA4B;QAC5B,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YAC1B,IAAI,CAAC,KAAK,UAAU,EAAE,CAAC;gBACrB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;YAC5B,CAAC;QACH,CAAC,CAAC,CAAA;QACF,kCAAkC;QAClC,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,SAAS,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE;QACzB,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;IACnC,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAS,EAAE;IAC1C,aAAa,CAAC,aAAa,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,CAAA;AACvF,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAAiB,EAAE,EAAE;IACtD,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACjB,OAAO,GAAS,EAAE;QAChB,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IACtB,CAAC,CAAA;AACH,CAAC,CAAA"}
|
package/dist/esm/useTint.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { createContext, useContext, useEffect, useState } from 'react';
|
|
2
2
|
import { useDidFinishSSR } from '@hanzo/gui';
|
|
3
|
-
import { getTints, setNextTintFamily, useTints } from './tints.js';
|
|
4
|
-
let current =
|
|
3
|
+
import { NEUTRAL, STOPS, getTints, setNextTintFamily, useTints } from './tints.js';
|
|
4
|
+
let current = NEUTRAL;
|
|
5
5
|
let disableTintTheme = false;
|
|
6
6
|
const listeners = new Set();
|
|
7
7
|
const disableListeners = new Set();
|
|
@@ -34,11 +34,11 @@ export function getDocsSection(pathname) {
|
|
|
34
34
|
? 'compiler'
|
|
35
35
|
: pathname.startsWith('/ui/')
|
|
36
36
|
? 'ui'
|
|
37
|
-
: pathname.startsWith('/docs/')
|
|
37
|
+
: pathname.startsWith('/docs/') || pathname.startsWith('/api')
|
|
38
38
|
? 'core'
|
|
39
39
|
: null;
|
|
40
40
|
}
|
|
41
|
-
export const InitialPathContext = createContext(
|
|
41
|
+
export const InitialPathContext = createContext(NEUTRAL);
|
|
42
42
|
export const useTint = (altOffset = -1) => {
|
|
43
43
|
const initial = useContext(InitialPathContext);
|
|
44
44
|
const didHydrate = useDidFinishSSR();
|
|
@@ -59,9 +59,14 @@ export const useTint = (altOffset = -1) => {
|
|
|
59
59
|
disableListeners.delete(cb);
|
|
60
60
|
};
|
|
61
61
|
}, []);
|
|
62
|
-
//
|
|
63
|
-
|
|
64
|
-
const
|
|
62
|
+
// A neutral stop names a colour without washing the page, so what shows
|
|
63
|
+
// under one is the ground as published.
|
|
64
|
+
const wash = (at) => {
|
|
65
|
+
const name = tints[at];
|
|
66
|
+
return disabled || !name || STOPS[name]?.neutral ? null : name;
|
|
67
|
+
};
|
|
68
|
+
const tint = wash(index);
|
|
69
|
+
const tintAlt = wash(tintAltIndex);
|
|
65
70
|
return {
|
|
66
71
|
...tintsContext,
|
|
67
72
|
tints: tintsContext.tints,
|
package/dist/esm/useTint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTint.js","sourceRoot":"","sources":["../../src/useTint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC7E,OAAO,EAAE,eAAe,EAAkB,M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B,gBAAgB,EAAE,QAAQ;QAC1B,WAAW,EAAE,GAAG,EAAE;YAChB,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE;gBACzB,YAAY,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;YACzB,CAAC,CAAC,CAAA;QACJ,CAAC;KACO,CAAA;AACZ,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/logo",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.4.0",
|
|
4
4
|
"source": "src/index.tsx",
|
|
5
5
|
"files": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
6
|
+
"*.cjs",
|
|
7
|
+
"NOTICE",
|
|
8
8
|
"dist",
|
|
9
|
-
"
|
|
9
|
+
"src",
|
|
10
|
+
"types"
|
|
10
11
|
],
|
|
11
12
|
"type": "module",
|
|
12
13
|
"main": "./dist/cjs/index.js",
|
|
@@ -43,13 +44,13 @@
|
|
|
43
44
|
"clean:build": "hanzogui-build clean:build"
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
|
-
"@hanzo/gui": "8.
|
|
47
|
+
"@hanzo/gui": "8.4.0",
|
|
47
48
|
"@hanzo/logo": "^1.0.26",
|
|
48
|
-
"@hanzogui/use-element-layout": "8.
|
|
49
|
-
"@hanzogui/web": "8.
|
|
49
|
+
"@hanzogui/use-element-layout": "8.4.0",
|
|
50
|
+
"@hanzogui/web": "8.4.0"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
|
-
"@hanzogui/build": "8.
|
|
53
|
+
"@hanzogui/build": "8.4.0",
|
|
53
54
|
"react": "19.2.8"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
package/src/tints.tsx
CHANGED
|
@@ -5,52 +5,102 @@ type ChangeHandler = (next: TintFamily) => void
|
|
|
5
5
|
|
|
6
6
|
const listeners = new Set<ChangeHandler>()
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
8
|
+
/**
|
|
9
|
+
* What a stop is worth, by name, so every family answers the same way.
|
|
10
|
+
*
|
|
11
|
+
* `accent` is the rung a stop STANDS FOR — the colour stored when it is picked,
|
|
12
|
+
* read under the dark scheme so one value answers for both. Null names no
|
|
13
|
+
* colour: the middle of the grey scale is how the axis is cleared.
|
|
14
|
+
*
|
|
15
|
+
* `dark` and `light` are the rungs that SHOW it: the solid step wherever it
|
|
16
|
+
* clears three to one against the ground, and the next rung that does otherwise.
|
|
17
|
+
* On the dark ground every stop is its solid. The light ground sits near the
|
|
18
|
+
* bright end of the scale, so green and blue come down one rung and orange two —
|
|
19
|
+
* 2.6:1 at its solid against 4.0:1 at its eleventh, and orange still.
|
|
20
|
+
*
|
|
21
|
+
* Yellow cannot come down: three to one against a ground that light needs a
|
|
22
|
+
* luminance near 0.27, which is exactly where yellow stops being yellow and goes
|
|
23
|
+
* olive and then brown. So yellow keeps its solid on both schemes and is drawn
|
|
24
|
+
* the way the ENDS of the scale are drawn — by the ink hairline every dot
|
|
25
|
+
* carries, 12:1 there. That is the rule the fill and the edge share: the fill is
|
|
26
|
+
* the colour, and the edge is what makes it a chip rather than a smudge when the
|
|
27
|
+
* colour and the ground are near neighbours.
|
|
28
|
+
*
|
|
29
|
+
* No stop paints the page ground or a section surface — those are the neutral
|
|
30
|
+
* scale's on every one of the nine, and a tint that grounds a page is how yellow
|
|
31
|
+
* became olive. A stop reaches the swatch, the demo, the ink and the stored
|
|
32
|
+
* accent. `neutral` marks the three whose palettes are absolute rather than a
|
|
33
|
+
* scheme's: white, grey and black name a colour and theme nothing, since an
|
|
34
|
+
* absolute palette in an accent's place is the other scheme, not an accent.
|
|
35
|
+
*/
|
|
36
|
+
export type Stop = {
|
|
37
|
+
accent: number | null
|
|
38
|
+
dark: number
|
|
39
|
+
light: number
|
|
40
|
+
neutral?: true
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const STOPS: Record<string, Stop> = {
|
|
44
|
+
red: { accent: 9, dark: 9, light: 9 },
|
|
45
|
+
orange: { accent: 9, dark: 9, light: 11 },
|
|
46
|
+
yellow: { accent: 9, dark: 9, light: 9 },
|
|
47
|
+
green: { accent: 9, dark: 9, light: 10 },
|
|
48
|
+
blue: { accent: 9, dark: 9, light: 10 },
|
|
49
|
+
purple: { accent: 9, dark: 9, light: 9 },
|
|
50
|
+
white: { accent: 1, dark: 1, light: 1, neutral: true },
|
|
51
|
+
gray: { accent: null, dark: 9, light: 10, neutral: true },
|
|
52
|
+
black: { accent: 1, dark: 1, light: 1, neutral: true },
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Every family is one length, because readers index the ramp by it.
|
|
56
|
+
const LENGTH = 9
|
|
57
|
+
|
|
58
|
+
const repeat = (...names: ThemeName[]): ThemeName[] =>
|
|
59
|
+
Array.from({ length: LENGTH }, (_, i) => names[i % names.length]!)
|
|
60
|
+
|
|
61
|
+
export type TintFamily =
|
|
62
|
+
| 'hanzogui'
|
|
63
|
+
| 'xmas'
|
|
64
|
+
| 'easter'
|
|
65
|
+
| 'halloween'
|
|
66
|
+
| 'valentine'
|
|
67
|
+
| 'lunar'
|
|
68
|
+
| 'stpatricks'
|
|
69
|
+
|
|
70
|
+
type Families = { [key in TintFamily]: ThemeName[] }
|
|
71
|
+
|
|
72
|
+
// The default is the spectrum with the scale's ends after it, and the grey it
|
|
73
|
+
// rests on between the warm half and the cool one.
|
|
74
|
+
const familiesValues: Families = {
|
|
75
|
+
hanzogui: [
|
|
76
|
+
'red',
|
|
77
|
+
'orange',
|
|
27
78
|
'yellow',
|
|
28
79
|
'gray',
|
|
29
|
-
'yellow',
|
|
30
|
-
] as ThemeName[],
|
|
31
|
-
valentine: ['red', 'red', 'red', 'red', 'red', 'red', 'red'] as ThemeName[],
|
|
32
|
-
lunar: ['yellow', 'red', 'red', 'red', 'red', 'red', 'yellow'] as ThemeName[],
|
|
33
|
-
stpatricks: [
|
|
34
|
-
'green',
|
|
35
|
-
'yellow',
|
|
36
|
-
'green',
|
|
37
|
-
'yellow',
|
|
38
|
-
'green',
|
|
39
|
-
'yellow',
|
|
40
80
|
'green',
|
|
81
|
+
'blue',
|
|
82
|
+
'purple',
|
|
83
|
+
'white',
|
|
84
|
+
'black',
|
|
41
85
|
] as ThemeName[],
|
|
86
|
+
xmas: repeat('red', 'green'),
|
|
87
|
+
easter: repeat('yellow'),
|
|
88
|
+
halloween: repeat('yellow', 'gray'),
|
|
89
|
+
valentine: repeat('red'),
|
|
90
|
+
lunar: ['yellow', ...repeat('red').slice(0, LENGTH - 2), 'yellow'] as ThemeName[],
|
|
91
|
+
stpatricks: repeat('green', 'yellow'),
|
|
42
92
|
}
|
|
43
93
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
94
|
+
/** Where the ramp rests: the stop that names no accent. */
|
|
95
|
+
export const NEUTRAL: number = familiesValues.hanzogui.findIndex(
|
|
96
|
+
(name) => STOPS[name]?.accent === null
|
|
97
|
+
)
|
|
47
98
|
|
|
48
|
-
const
|
|
99
|
+
const DEFAULT_FAMILY: TintFamily = 'hanzogui'
|
|
49
100
|
|
|
50
|
-
|
|
51
|
-
const families = familiesValues as Families
|
|
101
|
+
const familiesNames = Object.keys(familiesValues) as TintFamily[]
|
|
52
102
|
|
|
53
|
-
|
|
103
|
+
const families = familiesValues
|
|
54
104
|
|
|
55
105
|
let fam: TintFamily = DEFAULT_FAMILY
|
|
56
106
|
|
package/src/useTint.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { createContext, useContext, useEffect, useState } from 'react'
|
|
2
2
|
import { useDidFinishSSR, type ThemeName } from '@hanzo/gui'
|
|
3
|
-
import { getTints, setNextTintFamily, useTints } from './tints.tsx'
|
|
3
|
+
import { NEUTRAL, STOPS, getTints, setNextTintFamily, useTints } from './tints.tsx'
|
|
4
4
|
|
|
5
|
-
let current =
|
|
5
|
+
let current = NEUTRAL
|
|
6
6
|
let disableTintTheme = false
|
|
7
7
|
|
|
8
8
|
const listeners = new Set<Function>()
|
|
@@ -40,12 +40,12 @@ export function getDocsSection(pathname: string): 'compiler' | 'ui' | 'core' | n
|
|
|
40
40
|
? 'compiler'
|
|
41
41
|
: pathname.startsWith('/ui/')
|
|
42
42
|
? 'ui'
|
|
43
|
-
: pathname.startsWith('/docs/')
|
|
43
|
+
: pathname.startsWith('/docs/') || pathname.startsWith('/api')
|
|
44
44
|
? 'core'
|
|
45
45
|
: null
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export const InitialPathContext: React.Context<number> = createContext(
|
|
48
|
+
export const InitialPathContext: React.Context<number> = createContext(NEUTRAL)
|
|
49
49
|
|
|
50
50
|
export const useTint = (
|
|
51
51
|
altOffset = -1
|
|
@@ -92,9 +92,14 @@ export const useTint = (
|
|
|
92
92
|
}
|
|
93
93
|
}, [])
|
|
94
94
|
|
|
95
|
-
//
|
|
96
|
-
|
|
97
|
-
const
|
|
95
|
+
// A neutral stop names a colour without washing the page, so what shows
|
|
96
|
+
// under one is the ground as published.
|
|
97
|
+
const wash = (at: number) => {
|
|
98
|
+
const name = tints[at]
|
|
99
|
+
return disabled || !name || STOPS[name]?.neutral ? null : name
|
|
100
|
+
}
|
|
101
|
+
const tint = wash(index)
|
|
102
|
+
const tintAlt = wash(tintAltIndex)
|
|
98
103
|
|
|
99
104
|
return {
|
|
100
105
|
...tintsContext,
|
package/types/tints.d.ts
CHANGED
|
@@ -1,20 +1,46 @@
|
|
|
1
1
|
import type { ThemeName } from '@hanzo/gui';
|
|
2
2
|
type ChangeHandler = (next: TintFamily) => void;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
/**
|
|
4
|
+
* What a stop is worth, by name, so every family answers the same way.
|
|
5
|
+
*
|
|
6
|
+
* `accent` is the rung a stop STANDS FOR — the colour stored when it is picked,
|
|
7
|
+
* read under the dark scheme so one value answers for both. Null names no
|
|
8
|
+
* colour: the middle of the grey scale is how the axis is cleared.
|
|
9
|
+
*
|
|
10
|
+
* `dark` and `light` are the rungs that SHOW it: the solid step wherever it
|
|
11
|
+
* clears three to one against the ground, and the next rung that does otherwise.
|
|
12
|
+
* On the dark ground every stop is its solid. The light ground sits near the
|
|
13
|
+
* bright end of the scale, so green and blue come down one rung and orange two —
|
|
14
|
+
* 2.6:1 at its solid against 4.0:1 at its eleventh, and orange still.
|
|
15
|
+
*
|
|
16
|
+
* Yellow cannot come down: three to one against a ground that light needs a
|
|
17
|
+
* luminance near 0.27, which is exactly where yellow stops being yellow and goes
|
|
18
|
+
* olive and then brown. So yellow keeps its solid on both schemes and is drawn
|
|
19
|
+
* the way the ENDS of the scale are drawn — by the ink hairline every dot
|
|
20
|
+
* carries, 12:1 there. That is the rule the fill and the edge share: the fill is
|
|
21
|
+
* the colour, and the edge is what makes it a chip rather than a smudge when the
|
|
22
|
+
* colour and the ground are near neighbours.
|
|
23
|
+
*
|
|
24
|
+
* No stop paints the page ground or a section surface — those are the neutral
|
|
25
|
+
* scale's on every one of the nine, and a tint that grounds a page is how yellow
|
|
26
|
+
* became olive. A stop reaches the swatch, the demo, the ink and the stored
|
|
27
|
+
* accent. `neutral` marks the three whose palettes are absolute rather than a
|
|
28
|
+
* scheme's: white, grey and black name a colour and theme nothing, since an
|
|
29
|
+
* absolute palette in an accent's place is the other scheme, not an accent.
|
|
30
|
+
*/
|
|
31
|
+
export type Stop = {
|
|
32
|
+
accent: number | null;
|
|
33
|
+
dark: number;
|
|
34
|
+
light: number;
|
|
35
|
+
neutral?: true;
|
|
11
36
|
};
|
|
12
|
-
|
|
37
|
+
export declare const STOPS: Record<string, Stop>;
|
|
38
|
+
export type TintFamily = 'hanzogui' | 'xmas' | 'easter' | 'halloween' | 'valentine' | 'lunar' | 'stpatricks';
|
|
13
39
|
type Families = {
|
|
14
|
-
[key in
|
|
40
|
+
[key in TintFamily]: ThemeName[];
|
|
15
41
|
};
|
|
16
|
-
|
|
17
|
-
export
|
|
42
|
+
/** Where the ramp rests: the stop that names no accent. */
|
|
43
|
+
export declare const NEUTRAL: number;
|
|
18
44
|
export declare function getTints(): {
|
|
19
45
|
name: string;
|
|
20
46
|
tints: ThemeName[];
|
package/types/tints.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tints.d.ts","sourceRoot":"","sources":["../src/tints.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"tints.d.ts","sourceRoot":"","sources":["../src/tints.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAA;AAI/C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,IAAI,GAAG;IACjB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,IAAI,CAAA;CACf,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAUtC,CAAA;AAQD,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,MAAM,GACN,QAAQ,GACR,WAAW,GACX,WAAW,GACX,OAAO,GACP,YAAY,CAAA;AAEhB,KAAK,QAAQ,GAAG;KAAG,GAAG,IAAI,UAAU,GAAG,SAAS,EAAE;CAAE,CAAA;AAwBpD,2DAA2D;AAC3D,eAAO,MAAM,OAAO,EAAE,MAErB,CAAA;AAUD,wBAAgB,QAAQ,IAAI;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAMA;AAED,wBAAgB,QAAQ,IAAI;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAYA;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAsBpD;AAED,eAAO,MAAM,iBAAiB,QAAO,IAEpC,CAAA;AAED,eAAO,MAAM,kBAAkB,OAAQ,aAAa,WAEvC,IAGZ,CAAA"}
|
package/types/useTint.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTint.d.ts","sourceRoot":"","sources":["../src/useTint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAA;AAC7E,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAA;AAS5D,eAAO,MAAM,YAAY,aAAc,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,WAE/C,IAGZ,CAAA;AAID,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,IAK3C,CAAA;AAGD,eAAO,MAAM,mBAAmB,YAAa,OAAO,KAAG,IAItD,CAAA;AAED,eAAO,MAAM,mBAAmB,QAAO,OAA2B,CAAA;AAElE,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAUlF;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"useTint.d.ts","sourceRoot":"","sources":["../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