@sanity/ui 2.0.0-beta.6 → 2.0.0-beta.8

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/theme.d.ts CHANGED
@@ -208,11 +208,13 @@ export declare type ColorConfigValue =
208
208
  | `black/${ColorConfigOpacityValue}`
209
209
  | `white/${ColorConfigOpacityValue}`
210
210
  | `${ColorHueKey}`
211
+ | `${ColorHueKey} ${number}%`
211
212
  | `${ColorHueKey}/${ColorTintKey}`
213
+ | `${ColorHueKey}/${ColorTintKey} ${number}%`
212
214
  | `${ColorHueKey}/${ColorTintKey}/${ColorConfigOpacityValue}`
213
215
  | `${ColorTintKey}`
216
+ | `${ColorTintKey} ${number}%`
214
217
  | `${ColorTintKey}/${ColorConfigOpacityValue}`
215
- | ThemeColorBlendModeKey
216
218
 
217
219
  /**
218
220
  * @public
@@ -1462,10 +1464,11 @@ export declare interface TokenButtonKeyNode {
1462
1464
  /** @internal */
1463
1465
  export declare interface TokenColorValueNode {
1464
1466
  type: 'color'
1465
- key?: 'black' | 'white' | `${ColorHueKey}/${ColorTintKey}` | ColorTintKey
1467
+ key?: 'black' | 'white'
1466
1468
  hue?: ColorHueKey
1467
- tint?: ColorTintKey
1469
+ mix?: number
1468
1470
  opacity?: number
1471
+ tint?: ColorTintKey
1469
1472
  }
1470
1473
 
1471
1474
  /** @internal */
package/dist/theme.esm.js CHANGED
@@ -1258,7 +1258,7 @@ const defaultThemeConfig = {
1258
1258
  switch: {
1259
1259
  width: 25,
1260
1260
  height: 17,
1261
- padding: 2,
1261
+ padding: 5,
1262
1262
  transitionDurationMs: 150,
1263
1263
  transitionTimingFunction: "ease-out",
1264
1264
  focusRing: {
@@ -1993,12 +1993,24 @@ function parseTokenKey(str) {
1993
1993
  }
1994
1994
  return void 0;
1995
1995
  }
1996
+ function isColorMixPercentValue(str) {
1997
+ return /^\d+%$/.test(str);
1998
+ }
1996
1999
  function parseTokenValue(str) {
1997
2000
  const segments = str.split("/");
1998
- const segment0 = segments.shift() || "";
2001
+ let nextSegment = segments.shift() || "";
2002
+ const [segment0, segment0mix] = nextSegment.split(" ");
1999
2003
  if (isColorTintKey(segment0)) {
2000
2004
  const tint = segment0;
2001
2005
  const segment1 = segments.shift() || "";
2006
+ if (isColorMixPercentValue(segment0mix)) {
2007
+ const mix = Number(segment0mix.slice(0, -1)) / 100;
2008
+ return {
2009
+ type: "color",
2010
+ tint,
2011
+ mix
2012
+ };
2013
+ }
2002
2014
  if (isColorOpacityValue(segment1)) {
2003
2015
  const opacity = Number(segment1);
2004
2016
  return {
@@ -2015,6 +2027,14 @@ function parseTokenValue(str) {
2015
2027
  if (isColorValue(segment0)) {
2016
2028
  const key = segment0;
2017
2029
  const segment1 = segments.shift() || "";
2030
+ if (isColorMixPercentValue(segment0mix)) {
2031
+ const mix = Number(segment0mix.slice(0, -1)) / 100;
2032
+ return {
2033
+ type: "color",
2034
+ key,
2035
+ mix
2036
+ };
2037
+ }
2018
2038
  if (isColorOpacityValue(segment1)) {
2019
2039
  const opacity = Number(segment1);
2020
2040
  return {
@@ -2030,15 +2050,24 @@ function parseTokenValue(str) {
2030
2050
  }
2031
2051
  if (isColorHueKey(segment0)) {
2032
2052
  const hue = segment0;
2033
- const segment1 = segments.shift() || "";
2053
+ nextSegment = segments.shift() || "";
2054
+ const [segment1, segment1mix] = nextSegment.split(" ");
2034
2055
  if (isColorTintKey(segment1)) {
2035
2056
  const tint = segment1;
2036
2057
  const segment2 = segments.shift() || "";
2058
+ if (isColorMixPercentValue(segment1mix)) {
2059
+ const mix = Number(segment1mix.slice(0, -1)) / 100;
2060
+ return {
2061
+ type: "color",
2062
+ hue,
2063
+ tint,
2064
+ mix
2065
+ };
2066
+ }
2037
2067
  if (isColorOpacityValue(segment2)) {
2038
2068
  const opacity = Number(segment2);
2039
2069
  return {
2040
2070
  type: "color",
2041
- key: "".concat(hue, "/").concat(tint),
2042
2071
  hue,
2043
2072
  tint,
2044
2073
  opacity
@@ -2046,21 +2075,13 @@ function parseTokenValue(str) {
2046
2075
  }
2047
2076
  return {
2048
2077
  type: "color",
2049
- key: "".concat(hue, "/").concat(tint),
2050
2078
  hue,
2051
2079
  tint
2052
2080
  };
2053
2081
  }
2054
2082
  return {
2055
2083
  type: "hue",
2056
- value: "".concat(hue)
2057
- };
2058
- }
2059
- if (isColorOpacityValue(segment0)) {
2060
- const opacity = Number(segment0);
2061
- return {
2062
- type: "color",
2063
- opacity
2084
+ value: hue
2064
2085
  };
2065
2086
  }
2066
2087
  if (isColorBlendModeValue(segment0)) {
@@ -2104,6 +2125,9 @@ function compileColorTokenValue(node) {
2104
2125
  } else {
2105
2126
  key = "".concat(node.hue, "/").concat(node.tint);
2106
2127
  }
2128
+ if (node.mix !== void 0) {
2129
+ return "".concat(key, " ").concat(node.mix * 100, "%");
2130
+ }
2107
2131
  if (node.opacity !== void 0) {
2108
2132
  key += "/".concat(node.opacity);
2109
2133
  }
@@ -2137,15 +2161,6 @@ const defaultColorTokens = {
2137
2161
  _blend: ["screen", "multiply"],
2138
2162
  bg: ["500", "400"],
2139
2163
  fg: ["white", "black"]
2140
- },
2141
- yellow: {
2142
- bg: ["600", "400"]
2143
- },
2144
- green: {
2145
- bg: ["600", "400"]
2146
- },
2147
- cyan: {
2148
- bg: ["600", "400"]
2149
2164
  }
2150
2165
  },
2151
2166
  backdrop: ["gray/200/0.2", "black/0.5"],
@@ -2157,19 +2172,19 @@ const defaultColorTokens = {
2157
2172
  dot: ["500", "500"]
2158
2173
  },
2159
2174
  positive: {
2160
- bg: ["200/0.6", "900"],
2161
- fg: ["700", "500"]
2175
+ bg: ["200 50%", "900"],
2176
+ fg: ["600", "500"]
2162
2177
  },
2163
2178
  caution: {
2164
- bg: ["200/0.7", "900"],
2165
- fg: ["700", "500"]
2179
+ bg: ["200 50%", "900"],
2180
+ fg: ["600", "500"]
2166
2181
  }
2167
2182
  },
2168
2183
  bg: ["50", "950"],
2169
2184
  border: ["200", "800"],
2170
2185
  code: {
2171
2186
  bg: ["50", "950"],
2172
- fg: ["700", "300"]
2187
+ fg: ["600", "300"]
2173
2188
  },
2174
2189
  fg: ["800", "200"],
2175
2190
  focusRing: ["blue/500", "blue/500"],
@@ -2179,11 +2194,11 @@ const defaultColorTokens = {
2179
2194
  border: ["200", "800"]
2180
2195
  },
2181
2196
  link: {
2182
- fg: ["blue/700", "blue/300"]
2197
+ fg: ["blue/600", "blue/300"]
2183
2198
  },
2184
2199
  muted: {
2185
2200
  bg: ["50", "950"],
2186
- fg: ["600", "400"]
2201
+ fg: ["700 70%", "300 70%"]
2187
2202
  },
2188
2203
  shadow: {
2189
2204
  outline: ["500/0.3", "500/0.4"],
@@ -2193,16 +2208,22 @@ const defaultColorTokens = {
2193
2208
  },
2194
2209
  skeleton: {
2195
2210
  from: ["100", "900"],
2196
- to: ["100/0.5", "900/0.5"]
2211
+ to: ["100 50%", "900 50%"]
2197
2212
  }
2198
2213
  },
2199
2214
  transparent: {
2200
2215
  bg: ["50", "black"],
2201
- fg: ["600", "400"]
2216
+ fg: ["600", "400"],
2217
+ muted: {
2218
+ fg: ["600", "400"]
2219
+ }
2202
2220
  },
2203
2221
  default: {
2204
2222
  bg: ["white", "950"],
2205
- fg: ["black", "200"]
2223
+ fg: ["black", "200"],
2224
+ muted: {
2225
+ fg: ["600", "400"]
2226
+ }
2206
2227
  },
2207
2228
  primary: {
2208
2229
  _hue: "blue"
@@ -2210,20 +2231,17 @@ const defaultColorTokens = {
2210
2231
  positive: {
2211
2232
  _hue: "green",
2212
2233
  shadow: {
2213
- outline: ["600/0.3", "500/0.25"]
2234
+ outline: ["500/0.4", "500/0.4"]
2214
2235
  }
2215
2236
  },
2216
2237
  caution: {
2217
2238
  _hue: "yellow",
2218
2239
  shadow: {
2219
- outline: ["600/0.3", "500/0.25"]
2240
+ outline: ["600/0.3", "500/0.4"]
2220
2241
  }
2221
2242
  },
2222
2243
  critical: {
2223
- _hue: "red",
2224
- shadow: {
2225
- outline: ["500/0.3", "500/0.3"]
2226
- }
2244
+ _hue: "red"
2227
2245
  }
2228
2246
  },
2229
2247
  button: {
@@ -2232,7 +2250,7 @@ const defaultColorTokens = {
2232
2250
  "*": {
2233
2251
  _blend: ["screen", "multiply"],
2234
2252
  accent: {
2235
- fg: ["purple/200", "purple/700"]
2253
+ fg: ["purple/300", "purple/700"]
2236
2254
  },
2237
2255
  badge: {
2238
2256
  "*": {
@@ -2245,8 +2263,8 @@ const defaultColorTokens = {
2245
2263
  bg: ["500", "400"],
2246
2264
  border: ["500/0", "400/0"],
2247
2265
  code: {
2248
- bg: ["500/0.2", "400/0.2"],
2249
- fg: ["200", "700"]
2266
+ bg: ["500 20%", "400 20%"],
2267
+ fg: ["200", "600"]
2250
2268
  },
2251
2269
  fg: ["white", "black"],
2252
2270
  icon: ["200", "800"],
@@ -2259,23 +2277,23 @@ const defaultColorTokens = {
2259
2277
  fg: ["blue/200", "blue/700"]
2260
2278
  },
2261
2279
  muted: {
2262
- bg: ["900", "50"],
2263
- fg: ["200", "700"]
2280
+ bg: ["950", "50"],
2281
+ fg: ["100 70%", "600"]
2264
2282
  },
2265
2283
  skeleton: {
2266
2284
  from: ["900", "100"],
2267
- to: ["900/0.5", "100/0.5"]
2285
+ to: ["900 50%", "100 50%"]
2268
2286
  }
2269
2287
  },
2270
2288
  hovered: {
2271
- bg: ["600", "300"],
2272
- border: ["600/0", "300/0"]
2289
+ bg: ["700", "300"],
2290
+ border: ["700/0", "300/0"]
2273
2291
  },
2274
2292
  pressed: {
2275
- bg: ["700", "200"]
2293
+ bg: ["700", "300"]
2276
2294
  },
2277
2295
  selected: {
2278
- bg: ["700", "200"]
2296
+ bg: ["700", "300"]
2279
2297
  },
2280
2298
  disabled: {
2281
2299
  _hue: "gray",
@@ -2298,7 +2316,11 @@ const defaultColorTokens = {
2298
2316
  },
2299
2317
  default: {
2300
2318
  "*": {
2301
- bg: ["800", "200"]
2319
+ bg: ["800", "200"],
2320
+ muted: {
2321
+ bg: ["950", "50"],
2322
+ fg: ["400", "600"]
2323
+ }
2302
2324
  },
2303
2325
  hovered: {
2304
2326
  bg: ["900", "100"]
@@ -2309,34 +2331,6 @@ const defaultColorTokens = {
2309
2331
  selected: {
2310
2332
  bg: ["black", "white"]
2311
2333
  }
2312
- },
2313
- positive: {
2314
- "*": {
2315
- bg: ["600", "400"]
2316
- },
2317
- hovered: {
2318
- bg: ["700", "300"]
2319
- },
2320
- pressed: {
2321
- bg: ["800", "200"]
2322
- },
2323
- selected: {
2324
- bg: ["800", "200"]
2325
- }
2326
- },
2327
- caution: {
2328
- "*": {
2329
- bg: ["600", "400"]
2330
- },
2331
- hovered: {
2332
- bg: ["700", "300"]
2333
- },
2334
- pressed: {
2335
- bg: ["800", "200"]
2336
- },
2337
- selected: {
2338
- bg: ["800", "200"]
2339
- }
2340
2334
  }
2341
2335
  },
2342
2336
  ghost: {
@@ -2344,7 +2338,7 @@ const defaultColorTokens = {
2344
2338
  "*": {
2345
2339
  _blend: ["multiply", "screen"],
2346
2340
  accent: {
2347
- fg: ["purple/700/0.6", "purple/400/0.8"]
2341
+ fg: ["purple/700 60%", "purple/300 70%"]
2348
2342
  },
2349
2343
  badge: {
2350
2344
  "*": {
@@ -2357,10 +2351,10 @@ const defaultColorTokens = {
2357
2351
  bg: ["50", "950"],
2358
2352
  border: ["100", "900"],
2359
2353
  code: {
2360
- bg: ["500/0.1", "400/0.1"],
2361
- fg: ["700/0.6", "400/0.6"]
2354
+ bg: ["500 10%", "400 10%"],
2355
+ fg: ["700 60%", "400 60%"]
2362
2356
  },
2363
- fg: ["700", "400"],
2357
+ fg: ["600", "400"],
2364
2358
  icon: ["600", "500"],
2365
2359
  kbd: {
2366
2360
  bg: ["white", "black"],
@@ -2368,15 +2362,15 @@ const defaultColorTokens = {
2368
2362
  border: ["200", "800"]
2369
2363
  },
2370
2364
  link: {
2371
- fg: ["blue/700/0.6", "blue/400/0.8"]
2365
+ fg: ["blue/700 60%", "blue/300 60%"]
2372
2366
  },
2373
2367
  muted: {
2374
2368
  bg: ["100", "950"],
2375
- fg: ["700/0.6", "400/0.6"]
2369
+ fg: ["700 60%", "300 60%"]
2376
2370
  },
2377
2371
  skeleton: {
2378
2372
  from: ["100", "900"],
2379
- to: ["100/0.5", "900/0.5"]
2373
+ to: ["100 50%", "900 50%"]
2380
2374
  }
2381
2375
  },
2382
2376
  hovered: {
@@ -2427,12 +2421,12 @@ const defaultColorTokens = {
2427
2421
  },
2428
2422
  positive: {
2429
2423
  "*": {
2430
- border: ["600/0.2", "800"]
2424
+ border: ["600 20%", "800"]
2431
2425
  }
2432
2426
  },
2433
2427
  caution: {
2434
2428
  "*": {
2435
- border: ["600/0.2", "800"]
2429
+ border: ["600 20%", "800"]
2436
2430
  }
2437
2431
  }
2438
2432
  },
@@ -2441,7 +2435,7 @@ const defaultColorTokens = {
2441
2435
  "*": {
2442
2436
  _blend: ["multiply", "screen"],
2443
2437
  accent: {
2444
- fg: ["purple/700/0.7", "purple/300/0.7"]
2438
+ fg: ["purple/700 70%", "purple/300 70%"]
2445
2439
  },
2446
2440
  badge: {
2447
2441
  "*": {
@@ -2458,38 +2452,38 @@ const defaultColorTokens = {
2458
2452
  fg: ["600", "300"]
2459
2453
  },
2460
2454
  fg: ["700", "300"],
2461
- icon: ["700/0.7", "300/0.7"],
2455
+ icon: ["700 70%", "300 70%"],
2462
2456
  kbd: {
2463
2457
  bg: ["white", "black"],
2464
2458
  fg: ["600", "400"],
2465
2459
  border: ["200", "800"]
2466
2460
  },
2467
2461
  link: {
2468
- fg: ["blue/700/0.7", "blue/300/0.7"]
2462
+ fg: ["blue/700 70%", "blue/300 70%"]
2469
2463
  },
2470
2464
  muted: {
2471
2465
  bg: ["100", "950"],
2472
- fg: ["700/0.7", "300/0.7"]
2466
+ fg: ["700 70%", "300 70%"]
2473
2467
  },
2474
2468
  skeleton: {
2475
2469
  from: ["100", "900"],
2476
- to: ["100/0.5", "900/0.5"]
2470
+ to: ["100 50%", "900 50%"]
2477
2471
  }
2478
2472
  },
2479
2473
  hovered: {
2480
2474
  bg: ["50", "950"],
2481
2475
  fg: ["700", "300"],
2482
- icon: ["700/0.7", "400/0.7"]
2476
+ icon: ["700 70%", "400 70%"]
2483
2477
  },
2484
2478
  pressed: {
2485
2479
  bg: ["100", "900"],
2486
2480
  fg: ["800", "200"],
2487
- icon: ["800/0.7", "200/0.7"]
2481
+ icon: ["800 70%", "200 70%"]
2488
2482
  },
2489
2483
  selected: {
2490
2484
  bg: ["100", "900"],
2491
2485
  fg: ["800", "200"],
2492
- icon: ["800/0.7", "200/0.7"]
2486
+ icon: ["800 60%", "200 60%"]
2493
2487
  },
2494
2488
  disabled: {
2495
2489
  _hue: "gray",
@@ -2535,14 +2529,14 @@ const defaultColorTokens = {
2535
2529
  muted: {
2536
2530
  bg: ["50", "950"]
2537
2531
  },
2538
- placeholder: ["400", "600/0.5"]
2532
+ placeholder: ["400", "600 50%"]
2539
2533
  },
2540
2534
  hovered: {
2541
- border: ["300", "800"]
2535
+ border: ["300", "700"]
2542
2536
  },
2543
2537
  readOnly: {
2544
- border: ["200/0", "900/0"],
2545
- bg: ["100", "950"],
2538
+ bg: ["50", "950"],
2539
+ border: ["200", "800"],
2546
2540
  fg: ["800", "200"]
2547
2541
  },
2548
2542
  disabled: {
@@ -2563,26 +2557,16 @@ const defaultColorTokens = {
2563
2557
  _blend: ["multiply", "screen"],
2564
2558
  bg: ["white", "black"],
2565
2559
  fg: ["800", "200"],
2566
- icon: ["700/0.7", "300/0.7"],
2560
+ icon: ["700 70%", "300 70%"],
2567
2561
  avatar: {
2568
2562
  "*": {
2569
2563
  _blend: ["screen", "multiply"],
2570
2564
  bg: ["500", "400"],
2571
2565
  fg: ["white", "black"]
2572
- },
2573
- yellow: {
2574
- bg: ["600", "400"]
2575
- },
2576
- green: {
2577
- bg: ["600", "400"]
2578
- },
2579
- cyan: {
2580
- bg: ["600", "400"]
2581
2566
  }
2582
2567
  },
2583
2568
  badge: {
2584
2569
  "*": {
2585
- // _blend: ['multiply', 'screen'],
2586
2570
  bg: ["100", "900"],
2587
2571
  fg: ["600", "400"],
2588
2572
  dot: ["500", "500"],
@@ -2606,12 +2590,12 @@ const defaultColorTokens = {
2606
2590
  fg: ["blue/700", "blue/300"]
2607
2591
  },
2608
2592
  code: {
2609
- bg: ["100", "950"],
2593
+ bg: ["50", "950"],
2610
2594
  fg: ["700", "300"]
2611
2595
  },
2612
2596
  skeleton: {
2613
2597
  from: ["100", "900"],
2614
- to: ["100/0.5", "900/0.5"]
2598
+ to: ["100 50%", "900 50%"]
2615
2599
  }
2616
2600
  },
2617
2601
  hovered: {
@@ -2631,22 +2615,18 @@ const defaultColorTokens = {
2631
2615
  bg: ["white", "black"],
2632
2616
  fg: ["black", "white"]
2633
2617
  }
2634
- // magenta: {_hue: 'green'},
2635
- // yellow: {bg: ['600', '400']},
2636
- // green: {bg: ['600', '400']},
2637
- // cyan: {bg: ['600', '400']},
2638
2618
  },
2639
2619
  badge: {
2640
2620
  "*": {
2641
- // _blend: ['multiply', 'screen'],
2642
- // _blend: ['screen', 'multiply'],
2643
2621
  bg: ["700", "300"],
2644
- fg: ["white", "black"]
2622
+ fg: ["white", "black"],
2623
+ dot: ["300", "700"],
2624
+ icon: ["300", "700"]
2645
2625
  }
2646
2626
  },
2647
- border: ["500/0.2", "400/0.2"],
2627
+ border: ["500 20%", "400 20%"],
2648
2628
  muted: {
2649
- bg: ["900", "50"],
2629
+ bg: ["950", "50"],
2650
2630
  fg: ["200", "800"]
2651
2631
  },
2652
2632
  accent: {
@@ -2661,86 +2641,76 @@ const defaultColorTokens = {
2661
2641
  fg: ["blue/200", "blue/800"]
2662
2642
  },
2663
2643
  code: {
2664
- bg: ["500/0.2", "400/0.2"],
2665
- fg: ["200", "700"]
2644
+ bg: ["500 20%", "400 20%"],
2645
+ fg: ["300", "700"]
2666
2646
  },
2667
2647
  skeleton: {
2668
2648
  from: ["900", "100"],
2669
- to: ["900/0.5", "100/0.5"]
2649
+ to: ["900 50%", "100 50%"]
2670
2650
  }
2671
- // badge: {
2672
- // '*': {
2673
- // _blend: ['multiply', 'screen'],
2674
- // bg: ['900', '100'],
2675
- // fg: ['white', 'black'],
2676
- // dot: ['700', '300'],
2677
- // icon: ['400', '600'],
2678
- // },
2679
- // },
2680
2651
  },
2681
2652
  disabled: {
2682
2653
  fg: ["200", "800"],
2683
2654
  icon: ["200", "800"],
2684
2655
  muted: {
2685
- fg: ["200", "800/0.5"]
2656
+ fg: ["200", "800"]
2686
2657
  },
2687
2658
  accent: {
2688
- fg: ["purple/200", "purple/800/0.5"]
2659
+ fg: ["purple/200", "purple/800"]
2689
2660
  },
2690
2661
  link: {
2691
- fg: ["blue/200", "blue/800/0.5"]
2662
+ fg: ["blue/200", "blue/800"]
2692
2663
  },
2693
2664
  code: {
2694
- bg: ["100", "950/0.5"],
2695
- fg: ["200", "800/0.5"]
2665
+ bg: ["50", "950"],
2666
+ fg: ["200", "800"]
2696
2667
  }
2697
2668
  }
2698
2669
  },
2699
2670
  default: {
2700
2671
  selected: {
2701
2672
  _hue: "blue"
2702
- // bg: ['500', '400'],
2703
2673
  }
2704
2674
  },
2705
2675
  critical: {
2706
2676
  disabled: {
2707
- bg: ["50/0.5", "950/0.5"]
2677
+ bg: ["50 50%", "950 50%"]
2708
2678
  }
2709
2679
  }
2710
2680
  },
2711
2681
  syntax: {
2712
2682
  atrule: ["purple/600", "purple/400"],
2713
- attrName: ["green/700", "green/400"],
2714
- attrValue: ["yellow/700", "yellow/400"],
2715
- attribute: ["yellow/700", "yellow/400"],
2683
+ attrName: ["green/600", "green/400"],
2684
+ attrValue: ["yellow/600", "yellow/400"],
2685
+ attribute: ["yellow/600", "yellow/400"],
2716
2686
  boolean: ["purple/600", "purple/400"],
2717
2687
  builtin: ["purple/600", "purple/400"],
2718
- cdata: ["yellow/700", "yellow/400"],
2719
- char: ["yellow/700", "yellow/400"],
2720
- class: ["orange/700", "orange/400"],
2721
- className: ["cyan/700", "cyan/400"],
2688
+ cdata: ["yellow/600", "yellow/400"],
2689
+ char: ["yellow/600", "yellow/400"],
2690
+ class: ["orange/600", "orange/400"],
2691
+ className: ["cyan/600", "cyan/400"],
2722
2692
  comment: ["gray/400", "gray/600"],
2723
2693
  constant: ["purple/600", "purple/400"],
2724
2694
  deleted: ["red/600", "red/400"],
2725
2695
  entity: ["red/600", "red/400"],
2726
- function: ["green/700", "green/400"],
2696
+ function: ["green/600", "green/400"],
2727
2697
  hexcode: ["blue/600", "blue/400"],
2728
2698
  id: ["purple/600", "purple/400"],
2729
2699
  important: ["purple/600", "purple/400"],
2730
- inserted: ["yellow/700", "yellow/400"],
2700
+ inserted: ["yellow/600", "yellow/400"],
2731
2701
  keyword: ["magenta/600", "magenta/400"],
2732
2702
  number: ["purple/600", "purple/400"],
2733
2703
  operator: ["magenta/600", "magenta/400"],
2734
2704
  property: ["blue/600", "blue/400"],
2735
- pseudoClass: ["yellow/700", "yellow/400"],
2736
- pseudoElement: ["yellow/700", "yellow/400"],
2705
+ pseudoClass: ["yellow/600", "yellow/400"],
2706
+ pseudoElement: ["yellow/600", "yellow/400"],
2737
2707
  punctuation: ["gray/600", "gray/400"],
2738
2708
  regex: ["blue/600", "blue/400"],
2739
2709
  selector: ["red/600", "red/400"],
2740
- string: ["yellow/700", "yellow/400"],
2710
+ string: ["yellow/600", "yellow/400"],
2741
2711
  symbol: ["purple/600", "purple/400"],
2742
2712
  tag: ["red/600", "red/400"],
2743
- unit: ["orange/700", "orange/400"],
2713
+ unit: ["orange/600", "orange/400"],
2744
2714
  url: ["red/600", "red/400"],
2745
2715
  variable: ["red/600", "red/400"]
2746
2716
  }
@@ -3881,6 +3851,11 @@ function renderColorValue(str, options) {
3881
3851
  };
3882
3852
  try {
3883
3853
  hex = mixThemeColor(hex, mixOptions);
3854
+ if (bg && node.mix !== void 0) {
3855
+ const from = hexToRgb(bg);
3856
+ const to = hexToRgb(hex);
3857
+ hex = rgbToHex(mix(from, to, node.mix));
3858
+ }
3884
3859
  } catch (err) {
3885
3860
  console.warn("could not blend", hex, mixOptions);
3886
3861
  throw err;