@sanity/ui 3.0.0-static.10 → 3.0.0-static.3
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/dist/_chunks-cjs/_visual-editing.js +105 -143
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-cjs/buildCommand.js +1 -1
- package/dist/_chunks-cjs/buildCommand.js.map +1 -1
- package/dist/_chunks-cjs/v3_v2.js +251 -0
- package/dist/_chunks-cjs/v3_v2.js.map +1 -0
- package/dist/_chunks-es/_visual-editing.mjs +106 -144
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_chunks-es/v3_v2.mjs +252 -0
- package/dist/_chunks-es/v3_v2.mjs.map +1 -0
- package/dist/_visual-editing.d.mts +11 -14
- package/dist/_visual-editing.d.ts +11 -14
- package/dist/cli.js +1 -1
- package/dist/css.d.mts +1006 -282
- package/dist/css.d.ts +1006 -282
- package/dist/css.js +743 -852
- package/dist/css.js.map +1 -1
- package/dist/css.mjs +743 -852
- package/dist/css.mjs.map +1 -1
- package/dist/index.d.mts +11 -14
- package/dist/index.d.ts +11 -14
- package/dist/index.js +31 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -19
- package/dist/index.mjs.map +1 -1
- package/dist/sanity-palette.css +9 -1
- package/dist/sanity-theme.css +1 -1
- package/dist/system.css +1023 -1448
- package/dist/theme.d.mts +119 -85
- package/dist/theme.d.ts +119 -85
- package/dist/theme.js +219 -432
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +202 -413
- package/dist/theme.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cli/buildCommand.ts +2 -2
- package/src/css/_comp.ts +0 -1
- package/src/css/aspects/flex/flexJustify.style.ts +3 -3
- package/src/css/aspects/grid/types.ts +2 -2
- package/src/css/aspects/index.ts +0 -1
- package/src/css/aspects/textOverflow/textOverflow.ts +2 -2
- package/src/css/compile/compilePalette.ts +41 -8
- package/src/css/compile/compileRule.ts +0 -1
- package/src/css/compile/compileStyle.ts +1 -1
- package/src/css/compile/compileTheme_v3.ts +55 -46
- package/src/css/index.ts +2 -2
- package/src/css/primitives/_input/__workshop__/index.ts +1 -1
- package/src/css/primitives/_selectable/_contants.ts +1 -1
- package/src/css/primitives/badge/badge.style.ts +1 -1
- package/src/css/primitives/box/box.style.ts +1 -1
- package/src/css/primitives/box/box.ts +0 -2
- package/src/css/primitives/box/types.ts +0 -2
- package/src/css/primitives/button/_constants.ts +1 -1
- package/src/css/primitives/button/button.style.ts +13 -32
- package/src/css/primitives/card/_constants.ts +2 -2
- package/src/css/primitives/card/card.style.ts +44 -116
- package/src/css/primitives/card/card.ts +1 -1
- package/src/css/primitives/card/rules.ts +473 -0
- package/src/css/primitives/card/types.ts +1 -0
- package/src/css/primitives/kbd/kbd.style.ts +1 -1
- package/src/css/primitives/popover/popover.ts +0 -4
- package/src/css/primitives/switch/switch.style.ts +83 -8
- package/src/css/primitives/text/text.style.ts +3 -11
- package/src/css/system.style.ts +0 -4
- package/src/css/types.ts +188 -202
- package/src/css/varNames.ts +76 -110
- package/src/css/vars.ts +76 -109
- package/src/theme/defaults/config.ts +2 -2
- package/src/theme/defaults/fonts.ts +4 -4
- package/src/theme/palette/constants.ts +3 -1
- package/src/theme/palette/types.ts +12 -0
- package/src/theme/v3/buildTheme_v3.ts +2 -1
- package/src/theme/v3/color/buildColor_v3.ts +38 -43
- package/src/theme/v3/color/card.ts +38 -43
- package/src/theme/v3/color/color.ts +38 -42
- package/src/theme/v3/defaults.ts +72 -69
- package/src/theme/v3/resolveTokens.ts +38 -43
- package/src/theme/v3/types.ts +3 -0
- package/src/theme/versioning/themeColor_v3_v2.ts +1 -1
- package/src/ui/StyleTags.tsx +1 -1
- package/src/ui/components/autocomplete/__workshop__/async.tsx +1 -0
- package/src/ui/components/autocomplete/__workshop__/index.ts +1 -1
- package/src/ui/components/autocomplete/autocomplete.tsx +11 -2
- package/src/ui/components/dialog/dialog.tsx +4 -3
- package/src/ui/constants.ts +0 -6
- package/src/ui/hooks/useMediaIndex/useMediaIndex.ts +2 -0
- package/src/ui/primitives/box/box.tsx +2 -9
- package/src/ui/primitives/button/button.tsx +11 -12
- package/src/ui/primitives/card/card.tsx +5 -4
- package/src/ui/primitives/code/code.tsx +1 -1
- package/src/ui/primitives/heading/heading.tsx +1 -1
- package/src/ui/primitives/kbd/kbd.tsx +2 -2
- package/src/ui/primitives/popover/popover.tsx +75 -5
- package/src/ui/primitives/popover/popoverCard.tsx +39 -45
- package/src/ui/primitives/select/select.tsx +3 -3
- package/src/ui/primitives/stack/stack.tsx +5 -10
- package/src/ui/primitives/text/text.tsx +1 -1
- package/src/ui/primitives/textInput/textInput.tsx +1 -1
- package/src/ui/primitives/tooltip/tooltip.tsx +3 -2
- package/src/css/aspects/minWidth/index.ts +0 -2
- package/src/css/aspects/minWidth/minWidth.style.ts +0 -13
- package/src/css/aspects/minWidth/minWidth.ts +0 -6
- package/src/css/aspects/minWidth/types.ts +0 -7
- package/src/css/primitives/stack/index.ts +0 -1
- package/src/css/primitives/stack/stack.style.ts +0 -9
- package/src/css/primitives/stack/stack.ts +0 -6
package/dist/theme.d.mts
CHANGED
|
@@ -34,48 +34,6 @@ export declare interface CardColorTokens {
|
|
|
34
34
|
}
|
|
35
35
|
>
|
|
36
36
|
backdrop: [ColorToken, ColorToken]
|
|
37
|
-
code: {
|
|
38
|
-
bg: [ColorToken, ColorToken]
|
|
39
|
-
fg: [ColorToken, ColorToken]
|
|
40
|
-
token: {
|
|
41
|
-
atrule: [ColorToken, ColorToken]
|
|
42
|
-
attrName: [ColorToken, ColorToken]
|
|
43
|
-
attrValue: [ColorToken, ColorToken]
|
|
44
|
-
attribute: [ColorToken, ColorToken]
|
|
45
|
-
boolean: [ColorToken, ColorToken]
|
|
46
|
-
builtin: [ColorToken, ColorToken]
|
|
47
|
-
cdata: [ColorToken, ColorToken]
|
|
48
|
-
char: [ColorToken, ColorToken]
|
|
49
|
-
class: [ColorToken, ColorToken]
|
|
50
|
-
className: [ColorToken, ColorToken]
|
|
51
|
-
comment: [ColorToken, ColorToken]
|
|
52
|
-
constant: [ColorToken, ColorToken]
|
|
53
|
-
deleted: [ColorToken, ColorToken]
|
|
54
|
-
doctype: [ColorToken, ColorToken]
|
|
55
|
-
entity: [ColorToken, ColorToken]
|
|
56
|
-
function: [ColorToken, ColorToken]
|
|
57
|
-
hexcode: [ColorToken, ColorToken]
|
|
58
|
-
id: [ColorToken, ColorToken]
|
|
59
|
-
important: [ColorToken, ColorToken]
|
|
60
|
-
inserted: [ColorToken, ColorToken]
|
|
61
|
-
keyword: [ColorToken, ColorToken]
|
|
62
|
-
number: [ColorToken, ColorToken]
|
|
63
|
-
operator: [ColorToken, ColorToken]
|
|
64
|
-
prolog: [ColorToken, ColorToken]
|
|
65
|
-
property: [ColorToken, ColorToken]
|
|
66
|
-
pseudoClass: [ColorToken, ColorToken]
|
|
67
|
-
pseudoElement: [ColorToken, ColorToken]
|
|
68
|
-
punctuation: [ColorToken, ColorToken]
|
|
69
|
-
regex: [ColorToken, ColorToken]
|
|
70
|
-
selector: [ColorToken, ColorToken]
|
|
71
|
-
string: [ColorToken, ColorToken]
|
|
72
|
-
symbol: [ColorToken, ColorToken]
|
|
73
|
-
tag: [ColorToken, ColorToken]
|
|
74
|
-
unit: [ColorToken, ColorToken]
|
|
75
|
-
url: [ColorToken, ColorToken]
|
|
76
|
-
variable: [ColorToken, ColorToken]
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
37
|
focusRing: [ColorToken, ColorToken]
|
|
80
38
|
link: {
|
|
81
39
|
fg: [ColorToken, ColorToken]
|
|
@@ -90,6 +48,44 @@ export declare interface CardColorTokens {
|
|
|
90
48
|
from: [ColorToken, ColorToken]
|
|
91
49
|
to: [ColorToken, ColorToken]
|
|
92
50
|
}
|
|
51
|
+
token: {
|
|
52
|
+
atrule: [ColorToken, ColorToken]
|
|
53
|
+
attrName: [ColorToken, ColorToken]
|
|
54
|
+
attrValue: [ColorToken, ColorToken]
|
|
55
|
+
attribute: [ColorToken, ColorToken]
|
|
56
|
+
boolean: [ColorToken, ColorToken]
|
|
57
|
+
builtin: [ColorToken, ColorToken]
|
|
58
|
+
cdata: [ColorToken, ColorToken]
|
|
59
|
+
char: [ColorToken, ColorToken]
|
|
60
|
+
class: [ColorToken, ColorToken]
|
|
61
|
+
className: [ColorToken, ColorToken]
|
|
62
|
+
comment: [ColorToken, ColorToken]
|
|
63
|
+
constant: [ColorToken, ColorToken]
|
|
64
|
+
deleted: [ColorToken, ColorToken]
|
|
65
|
+
doctype: [ColorToken, ColorToken]
|
|
66
|
+
entity: [ColorToken, ColorToken]
|
|
67
|
+
function: [ColorToken, ColorToken]
|
|
68
|
+
hexcode: [ColorToken, ColorToken]
|
|
69
|
+
id: [ColorToken, ColorToken]
|
|
70
|
+
important: [ColorToken, ColorToken]
|
|
71
|
+
inserted: [ColorToken, ColorToken]
|
|
72
|
+
keyword: [ColorToken, ColorToken]
|
|
73
|
+
number: [ColorToken, ColorToken]
|
|
74
|
+
operator: [ColorToken, ColorToken]
|
|
75
|
+
prolog: [ColorToken, ColorToken]
|
|
76
|
+
property: [ColorToken, ColorToken]
|
|
77
|
+
pseudoClass: [ColorToken, ColorToken]
|
|
78
|
+
pseudoElement: [ColorToken, ColorToken]
|
|
79
|
+
punctuation: [ColorToken, ColorToken]
|
|
80
|
+
regex: [ColorToken, ColorToken]
|
|
81
|
+
selector: [ColorToken, ColorToken]
|
|
82
|
+
string: [ColorToken, ColorToken]
|
|
83
|
+
symbol: [ColorToken, ColorToken]
|
|
84
|
+
tag: [ColorToken, ColorToken]
|
|
85
|
+
unit: [ColorToken, ColorToken]
|
|
86
|
+
url: [ColorToken, ColorToken]
|
|
87
|
+
variable: [ColorToken, ColorToken]
|
|
88
|
+
}
|
|
93
89
|
variant: {
|
|
94
90
|
solid: Record<'*' | ThemeColorStateToneKey, ElementColorTokens>
|
|
95
91
|
tinted: Record<'*' | ThemeColorStateToneKey, ElementColorTokens>
|
|
@@ -284,6 +280,8 @@ export declare type CSSObject = StyledObject<any>
|
|
|
284
280
|
|
|
285
281
|
declare type CSSVariableKey = `--${string}`
|
|
286
282
|
|
|
283
|
+
export declare const defaultPalette: PaletteConfig
|
|
284
|
+
|
|
287
285
|
export declare const defaultTokens: PartialTokens<Tokens>
|
|
288
286
|
|
|
289
287
|
/** @public */
|
|
@@ -425,6 +423,24 @@ export declare function mix(b: RGB | RGBA, s: RGB | RGBA, weight: number): RGB
|
|
|
425
423
|
*/
|
|
426
424
|
export declare function multiply(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
427
425
|
|
|
426
|
+
export declare type PaletteConfig = {
|
|
427
|
+
chroma: {
|
|
428
|
+
min: number
|
|
429
|
+
max: number
|
|
430
|
+
}
|
|
431
|
+
luminosity: {
|
|
432
|
+
min: number
|
|
433
|
+
max: number
|
|
434
|
+
}
|
|
435
|
+
hues: Record<
|
|
436
|
+
Hue,
|
|
437
|
+
{
|
|
438
|
+
h: number
|
|
439
|
+
c: number
|
|
440
|
+
}
|
|
441
|
+
>
|
|
442
|
+
}
|
|
443
|
+
|
|
428
444
|
/**
|
|
429
445
|
* @internal
|
|
430
446
|
*/
|
|
@@ -730,6 +746,7 @@ export declare type Theme_v2 = Omit<RootTheme_v2, 'color'> & {
|
|
|
730
746
|
*/
|
|
731
747
|
export declare interface Theme_v3 {
|
|
732
748
|
_version: 3
|
|
749
|
+
_palette: PaletteConfig
|
|
733
750
|
_tokens: Tokens
|
|
734
751
|
avatar: ThemeAvatar_v2
|
|
735
752
|
button: {
|
|
@@ -1068,48 +1085,6 @@ export declare interface ThemeColorCard_v3 {
|
|
|
1068
1085
|
_hue: Hue
|
|
1069
1086
|
avatar: ThemeColorAvatar_v2
|
|
1070
1087
|
backdrop: string
|
|
1071
|
-
code: {
|
|
1072
|
-
bg: string
|
|
1073
|
-
fg: string
|
|
1074
|
-
token: {
|
|
1075
|
-
atrule: string
|
|
1076
|
-
attrName: string
|
|
1077
|
-
attrValue: string
|
|
1078
|
-
attribute: string
|
|
1079
|
-
boolean: string
|
|
1080
|
-
builtin: string
|
|
1081
|
-
cdata: string
|
|
1082
|
-
char: string
|
|
1083
|
-
class: string
|
|
1084
|
-
className: string
|
|
1085
|
-
comment: string
|
|
1086
|
-
constant: string
|
|
1087
|
-
deleted: string
|
|
1088
|
-
doctype: string
|
|
1089
|
-
entity: string
|
|
1090
|
-
function: string
|
|
1091
|
-
hexcode: string
|
|
1092
|
-
id: string
|
|
1093
|
-
important: string
|
|
1094
|
-
inserted: string
|
|
1095
|
-
keyword: string
|
|
1096
|
-
number: string
|
|
1097
|
-
operator: string
|
|
1098
|
-
prolog: string
|
|
1099
|
-
property: string
|
|
1100
|
-
pseudoClass: string
|
|
1101
|
-
pseudoElement: string
|
|
1102
|
-
punctuation: string
|
|
1103
|
-
regex: string
|
|
1104
|
-
selector: string
|
|
1105
|
-
string: string
|
|
1106
|
-
symbol: string
|
|
1107
|
-
tag: string
|
|
1108
|
-
unit: string
|
|
1109
|
-
url: string
|
|
1110
|
-
variable: string
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
1088
|
focusRing: string
|
|
1114
1089
|
shadow: {
|
|
1115
1090
|
outline: string
|
|
@@ -1117,6 +1092,44 @@ export declare interface ThemeColorCard_v3 {
|
|
|
1117
1092
|
penumbra: string
|
|
1118
1093
|
ambient: string
|
|
1119
1094
|
}
|
|
1095
|
+
token: {
|
|
1096
|
+
atrule: string
|
|
1097
|
+
attrName: string
|
|
1098
|
+
attrValue: string
|
|
1099
|
+
attribute: string
|
|
1100
|
+
boolean: string
|
|
1101
|
+
builtin: string
|
|
1102
|
+
cdata: string
|
|
1103
|
+
char: string
|
|
1104
|
+
class: string
|
|
1105
|
+
className: string
|
|
1106
|
+
comment: string
|
|
1107
|
+
constant: string
|
|
1108
|
+
deleted: string
|
|
1109
|
+
doctype: string
|
|
1110
|
+
entity: string
|
|
1111
|
+
function: string
|
|
1112
|
+
hexcode: string
|
|
1113
|
+
id: string
|
|
1114
|
+
important: string
|
|
1115
|
+
inserted: string
|
|
1116
|
+
keyword: string
|
|
1117
|
+
number: string
|
|
1118
|
+
operator: string
|
|
1119
|
+
prolog: string
|
|
1120
|
+
property: string
|
|
1121
|
+
pseudoClass: string
|
|
1122
|
+
pseudoElement: string
|
|
1123
|
+
punctuation: string
|
|
1124
|
+
regex: string
|
|
1125
|
+
selector: string
|
|
1126
|
+
string: string
|
|
1127
|
+
symbol: string
|
|
1128
|
+
tag: string
|
|
1129
|
+
unit: string
|
|
1130
|
+
url: string
|
|
1131
|
+
variable: string
|
|
1132
|
+
}
|
|
1120
1133
|
skeleton: {
|
|
1121
1134
|
from: string
|
|
1122
1135
|
to: string
|
|
@@ -1767,6 +1780,7 @@ export declare interface ThemeLayer {
|
|
|
1767
1780
|
/** @public */
|
|
1768
1781
|
export declare interface ThemeOptions {
|
|
1769
1782
|
v2?: ThemeConfig
|
|
1783
|
+
palette?: PaletteConfig
|
|
1770
1784
|
tokens?: PartialTokens<Tokens>
|
|
1771
1785
|
}
|
|
1772
1786
|
|
|
@@ -1793,7 +1807,27 @@ export declare interface ThemeStyles {
|
|
|
1793
1807
|
|
|
1794
1808
|
export declare type Tint = (typeof TINTS)[number]
|
|
1795
1809
|
|
|
1796
|
-
export declare const TINTS: readonly [
|
|
1810
|
+
export declare const TINTS: readonly [
|
|
1811
|
+
50,
|
|
1812
|
+
100,
|
|
1813
|
+
150,
|
|
1814
|
+
200,
|
|
1815
|
+
250,
|
|
1816
|
+
300,
|
|
1817
|
+
350,
|
|
1818
|
+
400,
|
|
1819
|
+
450,
|
|
1820
|
+
500,
|
|
1821
|
+
550,
|
|
1822
|
+
600,
|
|
1823
|
+
650,
|
|
1824
|
+
700,
|
|
1825
|
+
750,
|
|
1826
|
+
800,
|
|
1827
|
+
850,
|
|
1828
|
+
900,
|
|
1829
|
+
950,
|
|
1830
|
+
]
|
|
1797
1831
|
|
|
1798
1832
|
/** @internal */
|
|
1799
1833
|
export declare interface TokenBaseKeyNode {
|
package/dist/theme.d.ts
CHANGED
|
@@ -34,48 +34,6 @@ export declare interface CardColorTokens {
|
|
|
34
34
|
}
|
|
35
35
|
>
|
|
36
36
|
backdrop: [ColorToken, ColorToken]
|
|
37
|
-
code: {
|
|
38
|
-
bg: [ColorToken, ColorToken]
|
|
39
|
-
fg: [ColorToken, ColorToken]
|
|
40
|
-
token: {
|
|
41
|
-
atrule: [ColorToken, ColorToken]
|
|
42
|
-
attrName: [ColorToken, ColorToken]
|
|
43
|
-
attrValue: [ColorToken, ColorToken]
|
|
44
|
-
attribute: [ColorToken, ColorToken]
|
|
45
|
-
boolean: [ColorToken, ColorToken]
|
|
46
|
-
builtin: [ColorToken, ColorToken]
|
|
47
|
-
cdata: [ColorToken, ColorToken]
|
|
48
|
-
char: [ColorToken, ColorToken]
|
|
49
|
-
class: [ColorToken, ColorToken]
|
|
50
|
-
className: [ColorToken, ColorToken]
|
|
51
|
-
comment: [ColorToken, ColorToken]
|
|
52
|
-
constant: [ColorToken, ColorToken]
|
|
53
|
-
deleted: [ColorToken, ColorToken]
|
|
54
|
-
doctype: [ColorToken, ColorToken]
|
|
55
|
-
entity: [ColorToken, ColorToken]
|
|
56
|
-
function: [ColorToken, ColorToken]
|
|
57
|
-
hexcode: [ColorToken, ColorToken]
|
|
58
|
-
id: [ColorToken, ColorToken]
|
|
59
|
-
important: [ColorToken, ColorToken]
|
|
60
|
-
inserted: [ColorToken, ColorToken]
|
|
61
|
-
keyword: [ColorToken, ColorToken]
|
|
62
|
-
number: [ColorToken, ColorToken]
|
|
63
|
-
operator: [ColorToken, ColorToken]
|
|
64
|
-
prolog: [ColorToken, ColorToken]
|
|
65
|
-
property: [ColorToken, ColorToken]
|
|
66
|
-
pseudoClass: [ColorToken, ColorToken]
|
|
67
|
-
pseudoElement: [ColorToken, ColorToken]
|
|
68
|
-
punctuation: [ColorToken, ColorToken]
|
|
69
|
-
regex: [ColorToken, ColorToken]
|
|
70
|
-
selector: [ColorToken, ColorToken]
|
|
71
|
-
string: [ColorToken, ColorToken]
|
|
72
|
-
symbol: [ColorToken, ColorToken]
|
|
73
|
-
tag: [ColorToken, ColorToken]
|
|
74
|
-
unit: [ColorToken, ColorToken]
|
|
75
|
-
url: [ColorToken, ColorToken]
|
|
76
|
-
variable: [ColorToken, ColorToken]
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
37
|
focusRing: [ColorToken, ColorToken]
|
|
80
38
|
link: {
|
|
81
39
|
fg: [ColorToken, ColorToken]
|
|
@@ -90,6 +48,44 @@ export declare interface CardColorTokens {
|
|
|
90
48
|
from: [ColorToken, ColorToken]
|
|
91
49
|
to: [ColorToken, ColorToken]
|
|
92
50
|
}
|
|
51
|
+
token: {
|
|
52
|
+
atrule: [ColorToken, ColorToken]
|
|
53
|
+
attrName: [ColorToken, ColorToken]
|
|
54
|
+
attrValue: [ColorToken, ColorToken]
|
|
55
|
+
attribute: [ColorToken, ColorToken]
|
|
56
|
+
boolean: [ColorToken, ColorToken]
|
|
57
|
+
builtin: [ColorToken, ColorToken]
|
|
58
|
+
cdata: [ColorToken, ColorToken]
|
|
59
|
+
char: [ColorToken, ColorToken]
|
|
60
|
+
class: [ColorToken, ColorToken]
|
|
61
|
+
className: [ColorToken, ColorToken]
|
|
62
|
+
comment: [ColorToken, ColorToken]
|
|
63
|
+
constant: [ColorToken, ColorToken]
|
|
64
|
+
deleted: [ColorToken, ColorToken]
|
|
65
|
+
doctype: [ColorToken, ColorToken]
|
|
66
|
+
entity: [ColorToken, ColorToken]
|
|
67
|
+
function: [ColorToken, ColorToken]
|
|
68
|
+
hexcode: [ColorToken, ColorToken]
|
|
69
|
+
id: [ColorToken, ColorToken]
|
|
70
|
+
important: [ColorToken, ColorToken]
|
|
71
|
+
inserted: [ColorToken, ColorToken]
|
|
72
|
+
keyword: [ColorToken, ColorToken]
|
|
73
|
+
number: [ColorToken, ColorToken]
|
|
74
|
+
operator: [ColorToken, ColorToken]
|
|
75
|
+
prolog: [ColorToken, ColorToken]
|
|
76
|
+
property: [ColorToken, ColorToken]
|
|
77
|
+
pseudoClass: [ColorToken, ColorToken]
|
|
78
|
+
pseudoElement: [ColorToken, ColorToken]
|
|
79
|
+
punctuation: [ColorToken, ColorToken]
|
|
80
|
+
regex: [ColorToken, ColorToken]
|
|
81
|
+
selector: [ColorToken, ColorToken]
|
|
82
|
+
string: [ColorToken, ColorToken]
|
|
83
|
+
symbol: [ColorToken, ColorToken]
|
|
84
|
+
tag: [ColorToken, ColorToken]
|
|
85
|
+
unit: [ColorToken, ColorToken]
|
|
86
|
+
url: [ColorToken, ColorToken]
|
|
87
|
+
variable: [ColorToken, ColorToken]
|
|
88
|
+
}
|
|
93
89
|
variant: {
|
|
94
90
|
solid: Record<'*' | ThemeColorStateToneKey, ElementColorTokens>
|
|
95
91
|
tinted: Record<'*' | ThemeColorStateToneKey, ElementColorTokens>
|
|
@@ -284,6 +280,8 @@ export declare type CSSObject = StyledObject<any>
|
|
|
284
280
|
|
|
285
281
|
declare type CSSVariableKey = `--${string}`
|
|
286
282
|
|
|
283
|
+
export declare const defaultPalette: PaletteConfig
|
|
284
|
+
|
|
287
285
|
export declare const defaultTokens: PartialTokens<Tokens>
|
|
288
286
|
|
|
289
287
|
/** @public */
|
|
@@ -425,6 +423,24 @@ export declare function mix(b: RGB | RGBA, s: RGB | RGBA, weight: number): RGB
|
|
|
425
423
|
*/
|
|
426
424
|
export declare function multiply(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
427
425
|
|
|
426
|
+
export declare type PaletteConfig = {
|
|
427
|
+
chroma: {
|
|
428
|
+
min: number
|
|
429
|
+
max: number
|
|
430
|
+
}
|
|
431
|
+
luminosity: {
|
|
432
|
+
min: number
|
|
433
|
+
max: number
|
|
434
|
+
}
|
|
435
|
+
hues: Record<
|
|
436
|
+
Hue,
|
|
437
|
+
{
|
|
438
|
+
h: number
|
|
439
|
+
c: number
|
|
440
|
+
}
|
|
441
|
+
>
|
|
442
|
+
}
|
|
443
|
+
|
|
428
444
|
/**
|
|
429
445
|
* @internal
|
|
430
446
|
*/
|
|
@@ -730,6 +746,7 @@ export declare type Theme_v2 = Omit<RootTheme_v2, 'color'> & {
|
|
|
730
746
|
*/
|
|
731
747
|
export declare interface Theme_v3 {
|
|
732
748
|
_version: 3
|
|
749
|
+
_palette: PaletteConfig
|
|
733
750
|
_tokens: Tokens
|
|
734
751
|
avatar: ThemeAvatar_v2
|
|
735
752
|
button: {
|
|
@@ -1068,48 +1085,6 @@ export declare interface ThemeColorCard_v3 {
|
|
|
1068
1085
|
_hue: Hue
|
|
1069
1086
|
avatar: ThemeColorAvatar_v2
|
|
1070
1087
|
backdrop: string
|
|
1071
|
-
code: {
|
|
1072
|
-
bg: string
|
|
1073
|
-
fg: string
|
|
1074
|
-
token: {
|
|
1075
|
-
atrule: string
|
|
1076
|
-
attrName: string
|
|
1077
|
-
attrValue: string
|
|
1078
|
-
attribute: string
|
|
1079
|
-
boolean: string
|
|
1080
|
-
builtin: string
|
|
1081
|
-
cdata: string
|
|
1082
|
-
char: string
|
|
1083
|
-
class: string
|
|
1084
|
-
className: string
|
|
1085
|
-
comment: string
|
|
1086
|
-
constant: string
|
|
1087
|
-
deleted: string
|
|
1088
|
-
doctype: string
|
|
1089
|
-
entity: string
|
|
1090
|
-
function: string
|
|
1091
|
-
hexcode: string
|
|
1092
|
-
id: string
|
|
1093
|
-
important: string
|
|
1094
|
-
inserted: string
|
|
1095
|
-
keyword: string
|
|
1096
|
-
number: string
|
|
1097
|
-
operator: string
|
|
1098
|
-
prolog: string
|
|
1099
|
-
property: string
|
|
1100
|
-
pseudoClass: string
|
|
1101
|
-
pseudoElement: string
|
|
1102
|
-
punctuation: string
|
|
1103
|
-
regex: string
|
|
1104
|
-
selector: string
|
|
1105
|
-
string: string
|
|
1106
|
-
symbol: string
|
|
1107
|
-
tag: string
|
|
1108
|
-
unit: string
|
|
1109
|
-
url: string
|
|
1110
|
-
variable: string
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
1088
|
focusRing: string
|
|
1114
1089
|
shadow: {
|
|
1115
1090
|
outline: string
|
|
@@ -1117,6 +1092,44 @@ export declare interface ThemeColorCard_v3 {
|
|
|
1117
1092
|
penumbra: string
|
|
1118
1093
|
ambient: string
|
|
1119
1094
|
}
|
|
1095
|
+
token: {
|
|
1096
|
+
atrule: string
|
|
1097
|
+
attrName: string
|
|
1098
|
+
attrValue: string
|
|
1099
|
+
attribute: string
|
|
1100
|
+
boolean: string
|
|
1101
|
+
builtin: string
|
|
1102
|
+
cdata: string
|
|
1103
|
+
char: string
|
|
1104
|
+
class: string
|
|
1105
|
+
className: string
|
|
1106
|
+
comment: string
|
|
1107
|
+
constant: string
|
|
1108
|
+
deleted: string
|
|
1109
|
+
doctype: string
|
|
1110
|
+
entity: string
|
|
1111
|
+
function: string
|
|
1112
|
+
hexcode: string
|
|
1113
|
+
id: string
|
|
1114
|
+
important: string
|
|
1115
|
+
inserted: string
|
|
1116
|
+
keyword: string
|
|
1117
|
+
number: string
|
|
1118
|
+
operator: string
|
|
1119
|
+
prolog: string
|
|
1120
|
+
property: string
|
|
1121
|
+
pseudoClass: string
|
|
1122
|
+
pseudoElement: string
|
|
1123
|
+
punctuation: string
|
|
1124
|
+
regex: string
|
|
1125
|
+
selector: string
|
|
1126
|
+
string: string
|
|
1127
|
+
symbol: string
|
|
1128
|
+
tag: string
|
|
1129
|
+
unit: string
|
|
1130
|
+
url: string
|
|
1131
|
+
variable: string
|
|
1132
|
+
}
|
|
1120
1133
|
skeleton: {
|
|
1121
1134
|
from: string
|
|
1122
1135
|
to: string
|
|
@@ -1767,6 +1780,7 @@ export declare interface ThemeLayer {
|
|
|
1767
1780
|
/** @public */
|
|
1768
1781
|
export declare interface ThemeOptions {
|
|
1769
1782
|
v2?: ThemeConfig
|
|
1783
|
+
palette?: PaletteConfig
|
|
1770
1784
|
tokens?: PartialTokens<Tokens>
|
|
1771
1785
|
}
|
|
1772
1786
|
|
|
@@ -1793,7 +1807,27 @@ export declare interface ThemeStyles {
|
|
|
1793
1807
|
|
|
1794
1808
|
export declare type Tint = (typeof TINTS)[number]
|
|
1795
1809
|
|
|
1796
|
-
export declare const TINTS: readonly [
|
|
1810
|
+
export declare const TINTS: readonly [
|
|
1811
|
+
50,
|
|
1812
|
+
100,
|
|
1813
|
+
150,
|
|
1814
|
+
200,
|
|
1815
|
+
250,
|
|
1816
|
+
300,
|
|
1817
|
+
350,
|
|
1818
|
+
400,
|
|
1819
|
+
450,
|
|
1820
|
+
500,
|
|
1821
|
+
550,
|
|
1822
|
+
600,
|
|
1823
|
+
650,
|
|
1824
|
+
700,
|
|
1825
|
+
750,
|
|
1826
|
+
800,
|
|
1827
|
+
850,
|
|
1828
|
+
900,
|
|
1829
|
+
950,
|
|
1830
|
+
]
|
|
1797
1831
|
|
|
1798
1832
|
/** @internal */
|
|
1799
1833
|
export declare interface TokenBaseKeyNode {
|