@sanity/themer 0.8.1 → 0.9.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/dist/AnimatedColorWheelIcon-DEy-cy3X.js +171 -0
- package/dist/AnimatedColorWheelIcon-DEy-cy3X.js.map +1 -0
- package/dist/{ResizableSidebar-DD787kQr.js → ResizableSidebar-BpgLA4XQ.js} +817 -430
- package/dist/ResizableSidebar-BpgLA4XQ.js.map +1 -0
- package/dist/bundle.css +102 -322
- package/dist/index.d.ts +66 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/themes-Bxgltjmb.js +139 -0
- package/dist/themes-Bxgltjmb.js.map +1 -0
- package/dist/tool.d.ts +3 -14
- package/dist/tool.d.ts.map +1 -1
- package/dist/tool.js +649 -818
- package/dist/tool.js.map +1 -1
- package/package.json +11 -3
- package/dist/ResizableSidebar-DD787kQr.js.map +0 -1
- package/dist/ResizableSidebar.css.ts.vanilla-M9EuPu-q.js +0 -422
- package/dist/ResizableSidebar.css.ts.vanilla-M9EuPu-q.js.map +0 -1
- package/dist/options-CU-emn_p.d.ts +0 -69
- package/dist/options-CU-emn_p.d.ts.map +0 -1
package/dist/bundle.css
CHANGED
|
@@ -1,386 +1,129 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
.bgn4np2[data-overlay="true"] {
|
|
7
|
-
width: auto;
|
|
8
|
-
position: absolute;
|
|
9
|
-
inset: 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.bgn4np3 {
|
|
13
|
-
position: relative;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.bgn4np4 {
|
|
17
|
-
container: bgn4np1 / inline-size;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.bgn4np5 {
|
|
21
|
-
z-index: 1;
|
|
22
|
-
cursor: col-resize;
|
|
23
|
-
touch-action: none;
|
|
24
|
-
width: 7px;
|
|
25
|
-
position: absolute;
|
|
26
|
-
top: 0;
|
|
27
|
-
bottom: 0;
|
|
28
|
-
left: -3px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.bgn4np5:after {
|
|
32
|
-
content: "";
|
|
33
|
-
background: var(--card-focus-ring-color);
|
|
34
|
-
opacity: 0;
|
|
35
|
-
width: 3px;
|
|
36
|
-
transition: opacity .1s;
|
|
37
|
-
position: absolute;
|
|
38
|
-
top: 0;
|
|
39
|
-
bottom: 0;
|
|
40
|
-
left: 2px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.bgn4np5:focus {
|
|
44
|
-
outline: none;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.bgn4np5:hover:after, .bgn4np5:focus-visible:after, .bgn4np5[data-dragging="true"]:after {
|
|
48
|
-
opacity: 1;
|
|
1
|
+
@keyframes pcwcs07 {
|
|
2
|
+
to {
|
|
3
|
+
opacity: 0;
|
|
4
|
+
filter: blur(12px);
|
|
5
|
+
}
|
|
49
6
|
}
|
|
50
7
|
|
|
51
|
-
@keyframes
|
|
8
|
+
@keyframes pcwcs08 {
|
|
52
9
|
from {
|
|
53
|
-
|
|
10
|
+
opacity: 0;
|
|
11
|
+
filter: blur(12px);
|
|
54
12
|
}
|
|
55
13
|
}
|
|
56
14
|
|
|
57
|
-
@keyframes
|
|
58
|
-
|
|
15
|
+
@keyframes pcwcs0a {
|
|
16
|
+
from {
|
|
17
|
+
opacity: 0;
|
|
59
18
|
transform: translateX(-100%);
|
|
60
19
|
}
|
|
61
|
-
}
|
|
62
20
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
transform: translateY(-100%);
|
|
21
|
+
25% {
|
|
22
|
+
opacity: 0;
|
|
66
23
|
}
|
|
67
24
|
}
|
|
68
25
|
|
|
69
|
-
@keyframes
|
|
26
|
+
@keyframes pcwcs0b {
|
|
70
27
|
to {
|
|
71
|
-
|
|
28
|
+
opacity: 0;
|
|
29
|
+
transform: translateX(-100%);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
75% {
|
|
33
|
+
opacity: 0;
|
|
72
34
|
}
|
|
73
35
|
}
|
|
74
36
|
|
|
75
|
-
@keyframes
|
|
37
|
+
@keyframes pcwcs0c {
|
|
76
38
|
from {
|
|
77
39
|
transform: translateX(100%);
|
|
78
40
|
}
|
|
79
41
|
}
|
|
80
42
|
|
|
81
|
-
@keyframes
|
|
43
|
+
@keyframes pcwcs0e {
|
|
82
44
|
to {
|
|
83
45
|
transform: translateX(100%);
|
|
84
46
|
}
|
|
85
47
|
}
|
|
86
48
|
|
|
87
|
-
.
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
._1yq4ar79 {
|
|
92
|
-
color-scheme: light;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
._1yq4ar7a {
|
|
96
|
-
color-scheme: dark;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
::view-transition-group(._1yq4ar70) {
|
|
100
|
-
animation-duration: .32s;
|
|
101
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
::view-transition-old(._1yq4ar70) {
|
|
105
|
-
animation-duration: .32s;
|
|
106
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
::view-transition-new(._1yq4ar70) {
|
|
110
|
-
animation-duration: .32s;
|
|
111
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
::view-transition-new(._1yq4ar72) {
|
|
115
|
-
animation-duration: .32s;
|
|
116
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
::view-transition-old(._1yq4ar73) {
|
|
120
|
-
animation-duration: .32s;
|
|
121
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
::view-transition-new(._1yq4ar74) {
|
|
125
|
-
animation-duration: .32s;
|
|
126
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
::view-transition-old(._1yq4ar75) {
|
|
130
|
-
animation-duration: .32s;
|
|
131
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
::view-transition-new(._1yq4ar76) {
|
|
135
|
-
animation-duration: .32s;
|
|
136
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
::view-transition-old(._1yq4ar77) {
|
|
140
|
-
animation-duration: .32s;
|
|
141
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
::view-transition-old(._1yq4ar71) {
|
|
145
|
-
animation-duration: .32s;
|
|
146
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
::view-transition-new(._1yq4ar71) {
|
|
150
|
-
animation-duration: .32s;
|
|
151
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
:root:active-view-transition-type(sanity-themer)::view-transition-group(*) {
|
|
155
|
-
animation-duration: .32s;
|
|
156
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
:root:active-view-transition-type(sanity-themer)::view-transition-old(*) {
|
|
160
|
-
animation-duration: .32s;
|
|
161
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
49
|
+
::view-transition-new(.pcwcs05) {
|
|
50
|
+
animation: none;
|
|
162
51
|
}
|
|
163
52
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
animation-timing-function: cubic-bezier(.2, 0, 0, 1);
|
|
53
|
+
::view-transition-old(.pcwcs05) {
|
|
54
|
+
display: none;
|
|
167
55
|
}
|
|
168
56
|
|
|
169
|
-
::view-transition-
|
|
57
|
+
::view-transition-new(.pcwcs06) {
|
|
170
58
|
object-fit: fill;
|
|
171
59
|
block-size: 100%;
|
|
172
60
|
inline-size: 100%;
|
|
173
61
|
}
|
|
174
62
|
|
|
175
|
-
::view-transition-
|
|
63
|
+
::view-transition-old(.pcwcs06) {
|
|
176
64
|
object-fit: fill;
|
|
177
65
|
block-size: 100%;
|
|
178
66
|
inline-size: 100%;
|
|
179
67
|
}
|
|
180
68
|
|
|
181
|
-
::view-transition-new(.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
animation-name: _1yq4ar7c;
|
|
69
|
+
::view-transition-new(.pcwcs09) {
|
|
70
|
+
object-fit: fill;
|
|
71
|
+
block-size: 100%;
|
|
72
|
+
inline-size: 100%;
|
|
73
|
+
animation-name: pcwcs08;
|
|
187
74
|
}
|
|
188
75
|
|
|
189
|
-
::view-transition-
|
|
190
|
-
|
|
76
|
+
::view-transition-old(.pcwcs09) {
|
|
77
|
+
object-fit: fill;
|
|
78
|
+
block-size: 100%;
|
|
79
|
+
inline-size: 100%;
|
|
80
|
+
animation-name: pcwcs07;
|
|
191
81
|
}
|
|
192
82
|
|
|
193
|
-
::view-transition-
|
|
194
|
-
animation-name:
|
|
83
|
+
::view-transition-new(.pcwcs0d) {
|
|
84
|
+
animation-name: pcwcs0c;
|
|
195
85
|
}
|
|
196
86
|
|
|
197
|
-
::view-transition-
|
|
198
|
-
animation-name:
|
|
87
|
+
::view-transition-old(.pcwcs0f) {
|
|
88
|
+
animation-name: pcwcs0e;
|
|
199
89
|
}
|
|
200
90
|
|
|
201
|
-
::view-transition-
|
|
202
|
-
animation-name:
|
|
91
|
+
::view-transition-new(.pcwcs0g) {
|
|
92
|
+
animation-name: pcwcs0a;
|
|
203
93
|
}
|
|
204
94
|
|
|
205
|
-
::view-transition-
|
|
206
|
-
|
|
95
|
+
::view-transition-old(.pcwcs0h) {
|
|
96
|
+
animation-name: pcwcs0b;
|
|
207
97
|
}
|
|
208
98
|
|
|
209
|
-
::view-transition-group(
|
|
210
|
-
animation:
|
|
99
|
+
:root:active-view-transition-type(sanity-themer)::view-transition-group(*) {
|
|
100
|
+
animation-duration: .32s;
|
|
101
|
+
animation-timing-function: cubic-bezier(.65, 0, .35, 1);
|
|
211
102
|
}
|
|
212
103
|
|
|
213
|
-
::view-transition-
|
|
214
|
-
animation:
|
|
104
|
+
:root:active-view-transition-type(pcwcs02)::view-transition-group(*) {
|
|
105
|
+
animation-duration: .48s;
|
|
215
106
|
}
|
|
216
107
|
|
|
217
|
-
::view-transition-
|
|
218
|
-
animation:
|
|
108
|
+
:root:active-view-transition-type(pcwcs03)::view-transition-group(*) {
|
|
109
|
+
animation-duration: .48s;
|
|
219
110
|
}
|
|
220
111
|
|
|
221
|
-
|
|
222
|
-
|
|
112
|
+
.pcwcs0i {
|
|
113
|
+
position: relative;
|
|
223
114
|
}
|
|
224
115
|
|
|
225
116
|
@media (prefers-reduced-motion: reduce) {
|
|
226
|
-
::view-transition-group(._1yq4ar70) {
|
|
227
|
-
animation: none;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
::view-transition-group(._1yq4ar71) {
|
|
231
|
-
animation: none;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
::view-transition-group(._1yq4ar72) {
|
|
235
|
-
animation: none;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
::view-transition-group(._1yq4ar73) {
|
|
239
|
-
animation: none;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
::view-transition-group(._1yq4ar74) {
|
|
243
|
-
animation: none;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
::view-transition-group(._1yq4ar75) {
|
|
247
|
-
animation: none;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
::view-transition-group(._1yq4ar76) {
|
|
251
|
-
animation: none;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
::view-transition-group(._1yq4ar77) {
|
|
255
|
-
animation: none;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
::view-transition-group(bgn4np0) {
|
|
259
|
-
animation: none;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
117
|
:root:active-view-transition-type(sanity-themer)::view-transition-group(*) {
|
|
263
|
-
animation: none;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
::view-transition-image-pair(._1yq4ar70) {
|
|
267
|
-
animation: none;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
::view-transition-image-pair(._1yq4ar71) {
|
|
271
|
-
animation: none;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
::view-transition-image-pair(._1yq4ar72) {
|
|
275
|
-
animation: none;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
::view-transition-image-pair(._1yq4ar73) {
|
|
279
|
-
animation: none;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
::view-transition-image-pair(._1yq4ar74) {
|
|
283
|
-
animation: none;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
::view-transition-image-pair(._1yq4ar75) {
|
|
287
|
-
animation: none;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
::view-transition-image-pair(._1yq4ar76) {
|
|
291
|
-
animation: none;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
::view-transition-image-pair(._1yq4ar77) {
|
|
295
|
-
animation: none;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
::view-transition-image-pair(bgn4np0) {
|
|
299
|
-
animation: none;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
:root:active-view-transition-type(sanity-themer)::view-transition-image-pair(*) {
|
|
303
|
-
animation: none;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
::view-transition-old(._1yq4ar70) {
|
|
307
|
-
animation: none;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
::view-transition-old(._1yq4ar71) {
|
|
311
|
-
animation: none;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
::view-transition-old(._1yq4ar72) {
|
|
315
|
-
animation: none;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
::view-transition-old(._1yq4ar73) {
|
|
319
|
-
animation: none;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
::view-transition-old(._1yq4ar74) {
|
|
323
|
-
animation: none;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
::view-transition-old(._1yq4ar75) {
|
|
327
|
-
animation: none;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
::view-transition-old(._1yq4ar76) {
|
|
331
|
-
animation: none;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
::view-transition-old(._1yq4ar77) {
|
|
335
|
-
animation: none;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
::view-transition-old(bgn4np0) {
|
|
339
|
-
animation: none;
|
|
118
|
+
animation: none !important;
|
|
340
119
|
}
|
|
341
120
|
|
|
342
121
|
:root:active-view-transition-type(sanity-themer)::view-transition-old(*) {
|
|
343
|
-
animation: none;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
::view-transition-new(._1yq4ar70) {
|
|
347
|
-
animation: none;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
::view-transition-new(._1yq4ar71) {
|
|
351
|
-
animation: none;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
::view-transition-new(._1yq4ar72) {
|
|
355
|
-
animation: none;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
::view-transition-new(._1yq4ar73) {
|
|
359
|
-
animation: none;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
::view-transition-new(._1yq4ar74) {
|
|
363
|
-
animation: none;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
::view-transition-new(._1yq4ar75) {
|
|
367
|
-
animation: none;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
::view-transition-new(._1yq4ar76) {
|
|
371
|
-
animation: none;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
::view-transition-new(._1yq4ar77) {
|
|
375
|
-
animation: none;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
::view-transition-new(bgn4np0) {
|
|
379
|
-
animation: none;
|
|
122
|
+
animation: none !important;
|
|
380
123
|
}
|
|
381
124
|
|
|
382
125
|
:root:active-view-transition-type(sanity-themer)::view-transition-new(*) {
|
|
383
|
-
animation: none;
|
|
126
|
+
animation: none !important;
|
|
384
127
|
}
|
|
385
128
|
}
|
|
386
129
|
|
|
@@ -722,24 +465,61 @@
|
|
|
722
465
|
display: inline-block;
|
|
723
466
|
}
|
|
724
467
|
|
|
468
|
+
.bgn4np1 {
|
|
469
|
+
flex: none;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.bgn4np2 {
|
|
473
|
+
position: relative;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.bgn4np3 {
|
|
477
|
+
container: bgn4np0 / inline-size;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.bgn4np4 {
|
|
481
|
+
z-index: 1;
|
|
482
|
+
cursor: col-resize;
|
|
483
|
+
touch-action: none;
|
|
484
|
+
width: 7px;
|
|
485
|
+
position: absolute;
|
|
486
|
+
top: 0;
|
|
487
|
+
bottom: 0;
|
|
488
|
+
left: -3px;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.bgn4np4:after {
|
|
492
|
+
content: "";
|
|
493
|
+
background: var(--card-focus-ring-color);
|
|
494
|
+
opacity: 0;
|
|
495
|
+
width: 3px;
|
|
496
|
+
transition: opacity .1s;
|
|
497
|
+
position: absolute;
|
|
498
|
+
top: 0;
|
|
499
|
+
bottom: 0;
|
|
500
|
+
left: 2px;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.bgn4np4:focus {
|
|
504
|
+
outline: none;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.bgn4np4:hover:after, .bgn4np4:focus-visible:after, .bgn4np4[data-dragging="true"]:after {
|
|
508
|
+
opacity: 1;
|
|
509
|
+
}
|
|
510
|
+
|
|
725
511
|
.twjqgh0 {
|
|
726
512
|
grid-template-columns: minmax(0, 1fr);
|
|
727
513
|
gap: 16px;
|
|
728
514
|
display: grid;
|
|
729
515
|
}
|
|
730
516
|
|
|
731
|
-
@container
|
|
517
|
+
@container bgn4np0 (width >= 260px) {
|
|
732
518
|
.twjqgh0 {
|
|
733
519
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
734
520
|
}
|
|
735
521
|
}
|
|
736
522
|
|
|
737
|
-
@container bgn4np1 (width >= 480px) {
|
|
738
|
-
.twjqgh0 {
|
|
739
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
|
|
743
523
|
.c2pqej0 {
|
|
744
524
|
min-width: 0;
|
|
745
525
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,71 @@
|
|
|
1
|
-
import { n as SchemeThemeOptions, t as BuildThemeOptions } from "./options-CU-emn_p.js";
|
|
2
1
|
import { ColorHueKey, ColorTintKey } from "@sanity/color";
|
|
3
2
|
import { RootTheme, ThemeColorSchemeKey } from "@sanity/ui/theme";
|
|
3
|
+
/**
|
|
4
|
+
* The colors of one color scheme, for {@link BuildThemeOptions}. Every color
|
|
5
|
+
* is a hex color (`#rgb` or `#rrggbb`), and everything is optional: omitted
|
|
6
|
+
* options fall back to the stock Studio colors, so an empty object reproduces
|
|
7
|
+
* the stock scheme exactly.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
interface SchemeThemeOptions {
|
|
12
|
+
/**
|
|
13
|
+
* The accent color — the brand color of the scheme. Replaces the `blue`
|
|
14
|
+
* scale of the palette, which Sanity UI uses for primary buttons, focus
|
|
15
|
+
* rings and links.
|
|
16
|
+
*
|
|
17
|
+
* The stock accent is `#556bfc` (`blue/500` of `@sanity/color`).
|
|
18
|
+
*/
|
|
19
|
+
accent?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The background of the scheme — every other color of the scheme is
|
|
22
|
+
* blended onto it. The dark scheme's background replaces `black` in the
|
|
23
|
+
* palette and the light scheme's replaces `white`.
|
|
24
|
+
*
|
|
25
|
+
* It is kept far enough from the text and accent colors to stay usable:
|
|
26
|
+
* a dark background is made darker until it has enough contrast with them
|
|
27
|
+
* (it can never be lighter than either), and a light background can never
|
|
28
|
+
* be darker than either.
|
|
29
|
+
*
|
|
30
|
+
* The stock backgrounds are `#0d0e12` (dark) and `#ffffff` (light).
|
|
31
|
+
*/
|
|
32
|
+
background?: string;
|
|
33
|
+
/**
|
|
34
|
+
* How strongly text and borders separate from the accent color, between 15
|
|
35
|
+
* and 100. The default is 85, which uses the text color as-is. Above 85 the
|
|
36
|
+
* text scale loses its tint until it is fully neutral at 100 — a high
|
|
37
|
+
* contrast scheme with no mixing of the text and accent colors. Below 85
|
|
38
|
+
* more and more of the accent color mixes into the text scale, giving text
|
|
39
|
+
* and borders more color, until the scale fully adopts the accent hue and
|
|
40
|
+
* saturation at 15.
|
|
41
|
+
*/
|
|
42
|
+
contrast?: number;
|
|
43
|
+
/**
|
|
44
|
+
* The text color. Replaces the `gray` scale of the palette, which Sanity UI
|
|
45
|
+
* uses for text, icons, borders and neutral surfaces. When omitted, it is
|
|
46
|
+
* derived from the accent color: a mostly desaturated version of it, the
|
|
47
|
+
* way the stock `gray` scale carries a hint of the stock blue.
|
|
48
|
+
*
|
|
49
|
+
* The stock text color is `#727892` (`gray/500` of `@sanity/color`).
|
|
50
|
+
*/
|
|
51
|
+
text?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Options for {@link buildTheme} and {@link buildPalette}: the colors of the
|
|
55
|
+
* dark and the light scheme, each with its own accent, text, background and
|
|
56
|
+
* contrast — so the two schemes can differ in more than their background.
|
|
57
|
+
* Both schemes are optional, and so is every color: whatever is omitted
|
|
58
|
+
* falls back to the stock Studio colors, so `buildTheme({})` matches
|
|
59
|
+
* `buildTheme()` from `@sanity/ui/theme` exactly.
|
|
60
|
+
*
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
interface BuildThemeOptions {
|
|
64
|
+
/** The colors of the dark scheme */
|
|
65
|
+
dark?: SchemeThemeOptions;
|
|
66
|
+
/** The colors of the light scheme */
|
|
67
|
+
light?: SchemeThemeOptions;
|
|
68
|
+
}
|
|
4
69
|
/**
|
|
5
70
|
* A color palette generated by {@link buildPalette}: the `palette` config of
|
|
6
71
|
* `buildTheme` from `@sanity/ui/theme`, with every color as a hex string.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/theme/buildPalette.ts","../src/theme/buildTheme.ts","../src/theme/presets.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/theme/options.ts","../src/theme/buildPalette.ts","../src/theme/buildTheme.ts","../src/theme/presets.ts"],"mappings":";;;;;;;;;;UAciB;;;;;;;;EAQf;;;;;;;;;;;;;EAcA;;;;;;;;;;EAWA;;;;;;;;;EAUA;;;;;;;;;;;;UAae;;EAEf,OAAO;;EAEP,QAAQ;;;;;;;;KC7BE;EAAyB;EAAe;IAAiB,OACnE,aACA,OAAO;;;;;;KAQG,yBAAyB,OAAO,qBAAqB;;;;;;;;;;;;;;;;;iBAkBjD,aAAa,UAAS,oBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCvB/C,WAAW,UAAS,oBAAyB;;;;;;;UC1C5C;EACf;EACA;;EAEA,SAAS;;;;;;;;;;;;;;;;;cA6BE,SAAS"}
|