@sanity/themer 0.3.13 → 0.3.14
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/legacy.js +44 -32
- package/dist/legacy.js.map +1 -1
- package/package.json +8 -8
package/dist/legacy.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { n as mix, t as isColor } from "./mix-BfV6_Ke4.js";
|
|
2
|
-
import { COLOR_TINTS } from "@sanity/color";
|
|
3
2
|
import { buildTheme, createColorTheme, multiply, parseColor, rgbToHex, rgba, screen } from "@sanity/ui/theme";
|
|
4
3
|
/**
|
|
5
4
|
* Drops properties that are set to `undefined`, so that spreading the hue
|
|
@@ -19,13 +18,13 @@ function dropUndefined(hue) {
|
|
|
19
18
|
* here without changing generated themes.
|
|
20
19
|
*/
|
|
21
20
|
/** @internal */
|
|
22
|
-
const black
|
|
21
|
+
const black = {
|
|
23
22
|
title: "Black",
|
|
24
23
|
hex: "#101112"
|
|
25
|
-
}, white
|
|
24
|
+
}, white = {
|
|
26
25
|
title: "White",
|
|
27
26
|
hex: "#fff"
|
|
28
|
-
}, gray
|
|
27
|
+
}, gray = {
|
|
29
28
|
50: {
|
|
30
29
|
title: "Gray 50",
|
|
31
30
|
hex: "#f2f3f5"
|
|
@@ -70,7 +69,7 @@ const black$1 = {
|
|
|
70
69
|
title: "Gray 950",
|
|
71
70
|
hex: "#1b1d20"
|
|
72
71
|
}
|
|
73
|
-
}, blue
|
|
72
|
+
}, blue = {
|
|
74
73
|
50: {
|
|
75
74
|
title: "Blue 50",
|
|
76
75
|
hex: "#e8f1fe"
|
|
@@ -430,7 +429,7 @@ const black$1 = {
|
|
|
430
429
|
title: "Cyan 950",
|
|
431
430
|
hex: "#112124"
|
|
432
431
|
}
|
|
433
|
-
}, lightest = white
|
|
432
|
+
}, lightest = white.hex.toLowerCase(), darkest = black.hex.toLowerCase(), defaultHues = {
|
|
434
433
|
default: {
|
|
435
434
|
lightest,
|
|
436
435
|
darkest,
|
|
@@ -657,19 +656,32 @@ function createTonesFromHues(hues) {
|
|
|
657
656
|
};
|
|
658
657
|
}
|
|
659
658
|
function createTintsFromHue(hue, title) {
|
|
660
|
-
|
|
659
|
+
let createTint = (tint) => ({
|
|
661
660
|
title: `${title} ${tint}`,
|
|
662
661
|
hex: getColorHex(hue, tint)
|
|
663
|
-
}
|
|
662
|
+
});
|
|
663
|
+
return {
|
|
664
|
+
50: createTint("50"),
|
|
665
|
+
100: createTint("100"),
|
|
666
|
+
200: createTint("200"),
|
|
667
|
+
300: createTint("300"),
|
|
668
|
+
400: createTint("400"),
|
|
669
|
+
500: createTint("500"),
|
|
670
|
+
600: createTint("600"),
|
|
671
|
+
700: createTint("700"),
|
|
672
|
+
800: createTint("800"),
|
|
673
|
+
900: createTint("900"),
|
|
674
|
+
950: createTint("950")
|
|
675
|
+
};
|
|
664
676
|
}
|
|
665
677
|
function getColorHex(hue, tint) {
|
|
666
678
|
let tintNum = Number(tint), midPoint = hue.midPoint, darkSize = 1e3 - midPoint, lightPosition = tintNum / midPoint, darkPosition = (tintNum - midPoint) / darkSize;
|
|
667
679
|
return tintNum === midPoint ? hue.mid.toLowerCase() : tintNum < midPoint ? mix(lightPosition, hue.mid, hue.lightest) : mix(darkPosition, hue.darkest, hue.mid);
|
|
668
680
|
}
|
|
669
681
|
const NEUTRAL_TONES = /* @__PURE__ */ new Set(["default", "transparent"]), SPOT_TINTS = {
|
|
670
|
-
blue
|
|
682
|
+
blue,
|
|
671
683
|
cyan,
|
|
672
|
-
gray
|
|
684
|
+
gray,
|
|
673
685
|
green,
|
|
674
686
|
magenta,
|
|
675
687
|
orange,
|
|
@@ -1022,7 +1034,7 @@ function themeFromHues(partialHues) {
|
|
|
1022
1034
|
border: base.border,
|
|
1023
1035
|
muted: { fg: mix(base.bg, tints[dark ? 400 : 600].hex) },
|
|
1024
1036
|
accent: { fg: mix(base.bg, red[dark ? 400 : 500].hex) },
|
|
1025
|
-
link: { fg: mix(base.bg, blue
|
|
1037
|
+
link: { fg: mix(base.bg, blue[dark ? 400 : 600].hex) },
|
|
1026
1038
|
code: {
|
|
1027
1039
|
bg: mix(base.bg, tints[dark ? 950 : 50].hex),
|
|
1028
1040
|
fg: tints[dark ? 400 : 600].hex
|
|
@@ -1047,28 +1059,28 @@ function themeFromHues(partialHues) {
|
|
|
1047
1059
|
}
|
|
1048
1060
|
return state === "hovered" ? {
|
|
1049
1061
|
bg: base.bg,
|
|
1050
|
-
bg2: mix(base.bg, gray
|
|
1062
|
+
bg2: mix(base.bg, gray[dark ? 700 : 300].hex),
|
|
1051
1063
|
fg: base.fg,
|
|
1052
|
-
border: mix(base.bg, gray
|
|
1053
|
-
placeholder: mix(base.bg, gray
|
|
1064
|
+
border: mix(base.bg, gray[dark ? 700 : 300].hex),
|
|
1065
|
+
placeholder: mix(base.bg, gray[dark ? 600 : 400].hex)
|
|
1054
1066
|
} : state === "disabled" ? {
|
|
1055
|
-
bg: mix(base.bg, gray
|
|
1056
|
-
bg2: mix(base.bg, gray
|
|
1057
|
-
fg: mix(base.bg, gray
|
|
1058
|
-
border: mix(base.bg, gray
|
|
1059
|
-
placeholder: mix(base.bg, gray
|
|
1067
|
+
bg: mix(base.bg, gray[dark ? 950 : 50].hex),
|
|
1068
|
+
bg2: mix(base.bg, gray[dark ? 900 : 100].hex),
|
|
1069
|
+
fg: mix(base.bg, gray[dark ? 700 : 300].hex),
|
|
1070
|
+
border: mix(base.bg, gray[dark ? 900 : 100].hex),
|
|
1071
|
+
placeholder: mix(base.bg, gray[dark ? 800 : 200].hex)
|
|
1060
1072
|
} : state === "readOnly" ? {
|
|
1061
|
-
bg: mix(base.bg, gray
|
|
1062
|
-
bg2: mix(base.bg, gray
|
|
1063
|
-
fg: mix(base.bg, gray
|
|
1064
|
-
border: mix(base.bg, gray
|
|
1065
|
-
placeholder: mix(base.bg, gray
|
|
1073
|
+
bg: mix(base.bg, gray[dark ? 950 : 50].hex),
|
|
1074
|
+
bg2: mix(base.bg, gray[dark ? 800 : 200].hex),
|
|
1075
|
+
fg: mix(base.bg, gray[dark ? 200 : 800].hex),
|
|
1076
|
+
border: mix(base.bg, gray[dark ? 800 : 200].hex),
|
|
1077
|
+
placeholder: mix(base.bg, gray[dark ? 600 : 400].hex)
|
|
1066
1078
|
} : {
|
|
1067
1079
|
bg: base.bg,
|
|
1068
1080
|
bg2: base.border,
|
|
1069
1081
|
fg: base.fg,
|
|
1070
1082
|
border: base.border,
|
|
1071
|
-
placeholder: mix(base.bg, gray
|
|
1083
|
+
placeholder: mix(base.bg, gray[dark ? 600 : 400].hex)
|
|
1072
1084
|
};
|
|
1073
1085
|
},
|
|
1074
1086
|
selectable: ({ base, muted, tone, solid, state }) => state === "enabled" ? {
|
|
@@ -1092,25 +1104,25 @@ function themeFromHues(partialHues) {
|
|
|
1092
1104
|
char: mix(base.bg, yellow[mainShade].hex),
|
|
1093
1105
|
class: mix(base.bg, orange[mainShade].hex),
|
|
1094
1106
|
className: mix(base.bg, cyan[mainShade].hex),
|
|
1095
|
-
comment: mix(base.bg, gray
|
|
1107
|
+
comment: mix(base.bg, gray[secondaryShade].hex),
|
|
1096
1108
|
constant: mix(base.bg, purple[mainShade].hex),
|
|
1097
1109
|
deleted: mix(base.bg, red[mainShade].hex),
|
|
1098
|
-
doctype: mix(base.bg, gray
|
|
1110
|
+
doctype: mix(base.bg, gray[secondaryShade].hex),
|
|
1099
1111
|
entity: mix(base.bg, red[mainShade].hex),
|
|
1100
1112
|
function: mix(base.bg, green[mainShade].hex),
|
|
1101
|
-
hexcode: mix(base.bg, blue
|
|
1113
|
+
hexcode: mix(base.bg, blue[mainShade].hex),
|
|
1102
1114
|
id: mix(base.bg, purple[mainShade].hex),
|
|
1103
1115
|
important: mix(base.bg, purple[mainShade].hex),
|
|
1104
1116
|
inserted: mix(base.bg, yellow[mainShade].hex),
|
|
1105
1117
|
keyword: mix(base.bg, magenta[mainShade].hex),
|
|
1106
1118
|
number: mix(base.bg, purple[mainShade].hex),
|
|
1107
1119
|
operator: mix(base.bg, magenta[mainShade].hex),
|
|
1108
|
-
prolog: mix(base.bg, gray
|
|
1109
|
-
property: mix(base.bg, blue
|
|
1120
|
+
prolog: mix(base.bg, gray[secondaryShade].hex),
|
|
1121
|
+
property: mix(base.bg, blue[mainShade].hex),
|
|
1110
1122
|
pseudoClass: mix(base.bg, yellow[mainShade].hex),
|
|
1111
1123
|
pseudoElement: mix(base.bg, yellow[mainShade].hex),
|
|
1112
|
-
punctuation: mix(base.bg, gray
|
|
1113
|
-
regex: mix(base.bg, blue
|
|
1124
|
+
punctuation: mix(base.bg, gray[mainShade].hex),
|
|
1125
|
+
regex: mix(base.bg, blue[mainShade].hex),
|
|
1114
1126
|
selector: mix(base.bg, red[mainShade].hex),
|
|
1115
1127
|
string: mix(base.bg, yellow[mainShade].hex),
|
|
1116
1128
|
symbol: mix(base.bg, purple[mainShade].hex),
|
package/dist/legacy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy.js","names":[],"sources":["../src/legacy/dropUndefined.ts","../src/legacy/palette.ts","../src/legacy/applyHues.ts","../src/legacy/parseHuesFromSearchParams.ts","../src/legacy/presets.ts","../src/legacy/createTonesFromHues.ts","../src/legacy/themeFromHues.ts","../src/legacy/createTheme.ts","../src/legacy/defaults.ts"],"sourcesContent":["import {Hue} from './types'\n\n/**\n * Drops properties that are set to `undefined`, so that spreading the hue\n * over defaults doesn't shadow them. The hosted Themer service used a\n * `JSON.parse(JSON.stringify(…))` round trip for this.\n */\nexport function dropUndefined(hue: Partial<Hue> | undefined): Partial<Hue> | undefined {\n if (!hue) return undefined\n\n const result: Partial<Hue> = {}\n\n if (hue.mid !== undefined) result.mid = hue.mid\n if (hue.midPoint !== undefined) result.midPoint = hue.midPoint\n if (hue.lightest !== undefined) result.lightest = hue.lightest\n if (hue.darkest !== undefined) result.darkest = hue.darkest\n\n return result\n}\n","import {ColorTint, ColorTints} from '@sanity/color'\n\n/**\n * The color palette from `@sanity/color@2.2.5`, vendored so that themes\n * generated by this module keep producing the exact same colors as the hosted\n * Themer service (themer.sanity.build), which bundles that version. The\n * current `@sanity/color` palette has different values, so it cannot be used\n * here without changing generated themes.\n */\n\n/** @internal */\nexport const black: ColorTint = {title: 'Black', hex: '#101112'}\n\n/** @internal */\nexport const white: ColorTint = {title: 'White', hex: '#fff'}\n\n/** @internal */\nexport const gray: ColorTints = {\n '50': {title: 'Gray 50', hex: '#f2f3f5'},\n '100': {title: 'Gray 100', hex: '#e6e8ec'},\n '200': {title: 'Gray 200', hex: '#ced2d9'},\n '300': {title: 'Gray 300', hex: '#b6bcc6'},\n '400': {title: 'Gray 400', hex: '#9ea6b3'},\n '500': {title: 'Gray 500', hex: '#8690a0'},\n '600': {title: 'Gray 600', hex: '#6e7683'},\n '700': {title: 'Gray 700', hex: '#565d67'},\n '800': {title: 'Gray 800', hex: '#3f434a'},\n '900': {title: 'Gray 900', hex: '#272a2e'},\n '950': {title: 'Gray 950', hex: '#1b1d20'},\n}\n\n/** @internal */\nexport const blue: ColorTints = {\n '50': {title: 'Blue 50', hex: '#e8f1fe'},\n '100': {title: 'Blue 100', hex: '#d2e3fe'},\n '200': {title: 'Blue 200', hex: '#a6c8fd'},\n '300': {title: 'Blue 300', hex: '#7aacfd'},\n '400': {title: 'Blue 400', hex: '#4e91fc'},\n '500': {title: 'Blue 500', hex: '#2276fc'},\n '600': {title: 'Blue 600', hex: '#1e61cd'},\n '700': {title: 'Blue 700', hex: '#1a4d9e'},\n '800': {title: 'Blue 800', hex: '#17396f'},\n '900': {title: 'Blue 900', hex: '#132540'},\n '950': {title: 'Blue 950', hex: '#111b29'},\n}\n\n/** @internal */\nexport const purple: ColorTints = {\n '50': {title: 'Purple 50', hex: '#f8e9fe'},\n '100': {title: 'Purple 100', hex: '#f2d3fe'},\n '200': {title: 'Purple 200', hex: '#e6a7fd'},\n '300': {title: 'Purple 300', hex: '#d97bfd'},\n '400': {title: 'Purple 400', hex: '#cd4efc'},\n '500': {title: 'Purple 500', hex: '#c123fc'},\n '600': {title: 'Purple 600', hex: '#9d1fcd'},\n '700': {title: 'Purple 700', hex: '#7a1b9e'},\n '800': {title: 'Purple 800', hex: '#56186f'},\n '900': {title: 'Purple 900', hex: '#331440'},\n '950': {title: 'Purple 950', hex: '#211229'},\n}\n\n/** @internal */\nexport const magenta: ColorTints = {\n '50': {title: 'Magenta 50', hex: '#fcebf5'},\n '100': {title: 'Magenta 100', hex: '#f9d7eb'},\n '200': {title: 'Magenta 200', hex: '#f4afd8'},\n '300': {title: 'Magenta 300', hex: '#ef87c4'},\n '400': {title: 'Magenta 400', hex: '#ea5fb1'},\n '500': {title: 'Magenta 500', hex: '#e5389e'},\n '600': {title: 'Magenta 600', hex: '#ba3082'},\n '700': {title: 'Magenta 700', hex: '#8f2866'},\n '800': {title: 'Magenta 800', hex: '#65204a'},\n '900': {title: 'Magenta 900', hex: '#3a182d'},\n '950': {title: 'Magenta 950', hex: '#25141f'},\n}\n\n/** @internal */\nexport const red: ColorTints = {\n '50': {title: 'Red 50', hex: '#fdebea'},\n '100': {title: 'Red 100', hex: '#fcd8d5'},\n '200': {title: 'Red 200', hex: '#f9b1ab'},\n '300': {title: 'Red 300', hex: '#f68b82'},\n '400': {title: 'Red 400', hex: '#f36458'},\n '500': {title: 'Red 500', hex: '#f03e2f'},\n '600': {title: 'Red 600', hex: '#c33529'},\n '700': {title: 'Red 700', hex: '#962c23'},\n '800': {title: 'Red 800', hex: '#69231d'},\n '900': {title: 'Red 900', hex: '#3c1a17'},\n '950': {title: 'Red 950', hex: '#261514'},\n}\n\n/** @internal */\nexport const orange: ColorTints = {\n '50': {title: 'Orange 50', hex: '#fef0e6'},\n '100': {title: 'Orange 100', hex: '#fee2ce'},\n '200': {title: 'Orange 200', hex: '#fdc59d'},\n '300': {title: 'Orange 300', hex: '#fca86d'},\n '400': {title: 'Orange 400', hex: '#fb8b3c'},\n '500': {title: 'Orange 500', hex: '#e57322'},\n '600': {title: 'Orange 600', hex: '#ba5f1f'},\n '700': {title: 'Orange 700', hex: '#904b1b'},\n '800': {title: 'Orange 800', hex: '#653818'},\n '900': {title: 'Orange 900', hex: '#3a2415'},\n '950': {title: 'Orange 950', hex: '#251a13'},\n}\n\n/** @internal */\nexport const yellow: ColorTints = {\n '50': {title: 'Yellow 50', hex: '#fef7da'},\n '100': {title: 'Yellow 100', hex: '#fdefb6'},\n '200': {title: 'Yellow 200', hex: '#fcdf6d'},\n '300': {title: 'Yellow 300', hex: '#fbd024'},\n '400': {title: 'Yellow 400', hex: '#d9b421'},\n '500': {title: 'Yellow 500', hex: '#b7991e'},\n '600': {title: 'Yellow 600', hex: '#967e1c'},\n '700': {title: 'Yellow 700', hex: '#746219'},\n '800': {title: 'Yellow 800', hex: '#534717'},\n '900': {title: 'Yellow 900', hex: '#312c14'},\n '950': {title: 'Yellow 950', hex: '#201e13'},\n}\n\n/** @internal */\nexport const green: ColorTints = {\n '50': {title: 'Green 50', hex: '#e7f9ed'},\n '100': {title: 'Green 100', hex: '#d0f4dc'},\n '200': {title: 'Green 200', hex: '#a1eaba'},\n '300': {title: 'Green 300', hex: '#72e097'},\n '400': {title: 'Green 400', hex: '#43d675'},\n '500': {title: 'Green 500', hex: '#3ab564'},\n '600': {title: 'Green 600', hex: '#329454'},\n '700': {title: 'Green 700', hex: '#297343'},\n '800': {title: 'Green 800', hex: '#215233'},\n '900': {title: 'Green 900', hex: '#183122'},\n '950': {title: 'Green 950', hex: '#14211a'},\n}\n\n/** @internal */\nexport const cyan: ColorTints = {\n '50': {title: 'Cyan 50', hex: '#e3fafd'},\n '100': {title: 'Cyan 100', hex: '#c7f5fc'},\n '200': {title: 'Cyan 200', hex: '#90ecf9'},\n '300': {title: 'Cyan 300', hex: '#59e3f6'},\n '400': {title: 'Cyan 400', hex: '#22daf4'},\n '500': {title: 'Cyan 500', hex: '#1fb8ce'},\n '600': {title: 'Cyan 600', hex: '#1c97a8'},\n '700': {title: 'Cyan 700', hex: '#197583'},\n '800': {title: 'Cyan 800', hex: '#16545d'},\n '900': {title: 'Cyan 900', hex: '#133237'},\n '950': {title: 'Cyan 950', hex: '#112124'},\n}\n","import {dropUndefined} from './dropUndefined'\nimport {black, white} from './palette'\nimport {Hues, PartialHues} from './types'\n\nconst lightest = white.hex.toLowerCase()\nconst darkest = black.hex.toLowerCase()\n\n/**\n * The hues of the default Studio theme, matching the `default` preset of the\n * hosted Themer service.\n */\nconst defaultHues: Hues = {\n default: {\n lightest,\n darkest,\n mid: '#8690a0',\n midPoint: 500,\n },\n primary: {\n lightest,\n darkest,\n mid: '#2276fc',\n midPoint: 500,\n },\n transparent: {\n lightest,\n darkest,\n mid: '#8690a0',\n midPoint: 500,\n },\n positive: {\n lightest,\n darkest,\n mid: '#43d675',\n midPoint: 400,\n },\n caution: {\n lightest,\n darkest,\n mid: '#fbd024',\n midPoint: 300,\n },\n critical: {\n lightest,\n darkest,\n mid: '#f03e2f',\n midPoint: 500,\n },\n}\n\n/**\n * Merges partial hues over the defaults, exactly like the hosted Themer\n * service did. When a hue's `mid` color is customized without an explicit\n * `midPoint`, the mid point resets to `500`.\n */\nexport function applyHues(_hues: PartialHues, defaults: Hues = defaultHues): Hues {\n // Filter out undefined values so they don't shadow the defaults when spread\n const hues: PartialHues = {\n default: dropUndefined(_hues.default),\n primary: dropUndefined(_hues.primary),\n transparent: dropUndefined(_hues.transparent),\n positive: dropUndefined(_hues.positive),\n caution: dropUndefined(_hues.caution),\n critical: dropUndefined(_hues.critical),\n }\n\n const defaultMid = hues.default?.mid?.toLowerCase() || defaults.default.mid\n const primaryMid = hues.primary?.mid?.toLowerCase() || defaults.primary.mid\n const transparentMid = hues.transparent?.mid?.toLowerCase() || defaults.transparent.mid\n const positiveMid = hues.positive?.mid?.toLowerCase() || defaults.positive.mid\n const cautionMid = hues.caution?.mid?.toLowerCase() || defaults.caution.mid\n const criticalMid = hues.critical?.mid?.toLowerCase() || defaults.critical.mid\n\n return {\n default: {\n ...defaults.default,\n midPoint: defaultMid === defaults.default.mid ? defaults.default.midPoint : 500,\n ...hues.default,\n mid: defaultMid,\n },\n primary: {\n ...defaults.primary,\n midPoint: primaryMid === defaults.primary.mid ? defaults.primary.midPoint : 500,\n ...hues.primary,\n mid: primaryMid,\n },\n transparent: {\n ...defaults.transparent,\n midPoint: transparentMid === defaults.transparent.mid ? defaults.transparent.midPoint : 500,\n ...hues.transparent,\n mid: transparentMid,\n },\n positive: {\n ...defaults.positive,\n midPoint: positiveMid === defaults.positive.mid ? defaults.positive.midPoint : 500,\n ...hues.positive,\n mid: positiveMid,\n },\n caution: {\n ...defaults.caution,\n midPoint: cautionMid === defaults.caution.mid ? defaults.caution.midPoint : 500,\n ...hues.caution,\n mid: cautionMid,\n },\n critical: {\n ...defaults.critical,\n midPoint: criticalMid === defaults.critical.mid ? defaults.critical.midPoint : 500,\n ...hues.critical,\n mid: criticalMid,\n },\n }\n}\n","import {isColor} from '../lib/mix'\nimport {dropUndefined} from './dropUndefined'\nimport {Hue, HueMidPoint, PartialHues} from './types'\n\nconst HUE_KEYS = ['default', 'primary', 'transparent', 'positive', 'caution', 'critical'] as const\n\nconst VALID_MID_POINTS = new Set([50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950])\n\n/**\n * Parses hues from the query of a hosted Themer service URL, exactly like\n * `https://themer.sanity.build/api/hues` did — including its validation\n * errors.\n */\nexport function parseHuesFromSearchParams(searchParams: URLSearchParams): PartialHues {\n const lightest = searchParams.has('lightest')\n ? assertValidColor(`#${(searchParams.get('lightest') ?? '').toLowerCase()}`)\n : undefined\n const darkest = searchParams.get('darkest')\n ? assertValidColor(`#${(searchParams.get('darkest') ?? '').toLowerCase()}`)\n : undefined\n\n // Filter out undefined values so they don't shadow defaults downstream\n return {\n default: dropUndefined(parseHue('default', searchParams, lightest, darkest)),\n primary: dropUndefined(parseHue('primary', searchParams, lightest, darkest)),\n transparent: dropUndefined(parseHue('transparent', searchParams, lightest, darkest)),\n positive: dropUndefined(parseHue('positive', searchParams, lightest, darkest)),\n caution: dropUndefined(parseHue('caution', searchParams, lightest, darkest)),\n critical: dropUndefined(parseHue('critical', searchParams, lightest, darkest)),\n }\n}\n\nfunction parseHue(\n key: (typeof HUE_KEYS)[number],\n searchParams: URLSearchParams,\n defaultLightest: string | undefined,\n defaultDarkest: string | undefined,\n): Partial<Hue> {\n if (!searchParams.has(key)) {\n return {lightest: defaultLightest, darkest: defaultDarkest}\n }\n const input = (searchParams.get(key) ?? '').toLowerCase()\n\n let mid: string | undefined\n let midPoint: HueMidPoint | undefined\n let lightest: string | undefined\n let darkest: string | undefined\n // format: color;midPoint;lightest:color;darkest:color\n const params = input.split(';')\n if (params.length > 4) {\n throw new TypeError(\n `Invalid number of params for the ${key} hue, it should be 4 or less instead it's ${\n params.length\n }: ${JSON.stringify(params)}`,\n )\n }\n for (const param of params) {\n const maybeMid = `#${param}`\n const maybeMidPoint = roundMidPoint(Number(param))\n\n switch (true) {\n case param === '':\n break\n case isColor(maybeMid) && !mid:\n mid = maybeMid\n break\n case !Number.isNaN(maybeMidPoint) && !midPoint:\n midPoint = assertValidMidPoint(maybeMidPoint)\n break\n case param.startsWith('lightest:') && !lightest:\n lightest = assertValidColor(`#${param.replace(/^lightest:/, '')}`)\n break\n case param.startsWith('darkest:') && !darkest:\n darkest = assertValidColor(`#${param.replace(/^darkest:/, '')}`)\n break\n // Surface duplicates\n case isColor(maybeMid):\n throwDuplicate(key, mid?.replace(/^#/, ''), param, input)\n break\n case !Number.isNaN(maybeMidPoint):\n throwDuplicate(key, midPoint, maybeMidPoint, input)\n break\n case param.startsWith('lightest:'):\n throwDuplicate(key, lightest?.replace(/^#/, 'lightest:'), param, input)\n break\n case param.startsWith('darkest:'):\n throwDuplicate(key, darkest?.replace(/^#/, 'darkest:'), param, input)\n break\n default:\n // If the parser can't make sense of it we throw to surface that something is wrong with the input\n throw new TypeError(`Invalid param for the ${key} hue: ${param}`)\n }\n }\n\n return {\n mid,\n midPoint,\n lightest: lightest ?? defaultLightest,\n darkest: darkest ?? defaultDarkest,\n }\n}\n\nfunction roundMidPoint(value: number): number {\n if (value < 75) {\n return 50\n }\n if (value > 925) {\n return 950\n }\n\n return Math.round(value / 100) * 100\n}\n\nfunction throwDuplicate(key: string, a: unknown, b: unknown, input: string): never {\n throw new TypeError(\n `Duplicate params detected. Remove at least ${\n a === b\n ? `one of the ${JSON.stringify(String(a))}`\n : `${JSON.stringify(String(a))} or ${JSON.stringify(String(b))}`\n } from the ${key} hue: ${JSON.stringify(input)}`,\n )\n}\n\nfunction assertValidColor(input: string): string {\n if (isColor(input)) {\n return input\n }\n throw new TypeError(`Invalid color: ${input}`)\n}\n\nfunction assertValidMidPoint(input: number): HueMidPoint {\n if (isMidPoint(input)) {\n return input\n }\n throw new TypeError(`Invalid midPoint: ${input}`)\n}\n\nfunction isMidPoint(input: number): input is HueMidPoint {\n return VALID_MID_POINTS.has(input)\n}\n","import {applyHues} from './applyHues'\nimport {parseHuesFromSearchParams} from './parseHuesFromSearchParams'\nimport {ThemePreset} from './types'\n\nfunction definePreset(slug: string, title: string, searchParams: string): ThemePreset {\n return {\n slug,\n title,\n searchParams,\n hues: applyHues(parseHuesFromSearchParams(new URLSearchParams(searchParams))),\n }\n}\n\nconst defaultPreset = definePreset(\n 'default',\n 'Studio v3',\n 'lightest=fff&darkest=101112&default=8690a0;500&primary=2276fc;500&transparent=8690a0;500&positive=43d675;400&caution=fbd024;300&critical=f03e2f;500',\n)\n\n/**\n * The preset themes of the hosted Themer service (themer.sanity.build), with\n * the same slugs and hues:\n *\n * ```ts\n * import {createTheme, presets} from '@sanity/themer/legacy'\n *\n * const verdant = presets.find((preset) => preset.slug === 'verdant')\n * const theme = createTheme(verdant.hues)\n * ```\n *\n * @public\n */\nexport const presets: ThemePreset[] = [\n defaultPreset,\n definePreset(\n 'dew',\n 'Dew',\n 'default=5e63b4;600;lightest:fcfcfd;darkest:0d0d15&primary=d1a308;400;lightest:fcfcfd;darkest:0d0d15&transparent=6c6fa7;500;lightest:fcfcfd;darkest:0d0d15&positive=43D675;300;lightest:fcfcfd;darkest:0d0d15&caution=fb9f24;400;lightest:fcfcfd;darkest:0d0d15&critical=F03E2F;500;lightest:fcfcfd;darkest:0d0d15',\n ),\n definePreset(\n 'pink-synth',\n 'Pink Synth',\n 'lightest=f7f2f5&darkest=171721&default=8b6584&primary=ec4899&transparent=503a4c&positive=10b981&caution=fde047;300&critical=fe3459',\n ),\n definePreset(\n 'pixel-art',\n 'Pixel Art',\n 'default=57619c;600&primary=f10784&transparent=5b6498;600&positive=43d675;300&caution=fbd024;200&lightest=fcfcfd&darkest=0d0e15',\n ),\n definePreset(\n 'retro-colonial',\n 'Retro Colonial',\n 'default=8bb9b5;400&primary=fa7a78;400&transparent=8bb9b5;400&positive=43d675;300&caution=fbd024;200&critical=f02f53&lightest=fcfdfd&darkest=0d1515',\n ),\n definePreset(\n 'rosabel',\n 'Rosabel',\n 'default=9d8966&primary=ed2555;700&transparent=9d8966&positive=43d675;300&caution=fbd024;200&lightest=fdfdfc&darkest=15120d',\n ),\n definePreset(\n 'stereofidelic',\n 'Stereofidelic',\n 'default=678e9a&primary=f13009&transparent=678e9a&positive=43d675;300&caution=fbd024;200&critical=f02f35&lightest=fcfdfd&darkest=0e1315',\n ),\n definePreset(\n 'tw-cyan',\n 'Tailwind Cyan',\n 'default=677389;500;lightest:f9fafb;darkest:101728&primary=51b4d0;500;lightest:effefe;darkest:264d61&transparent=6b727f;500;lightest:f8fafb;darkest:131826&positive=55b785;500;lightest:eefdf5;darkest:214d3b&caution=e2b53e;500;lightest:fefbea;darkest:69411b&critical=e14f62;500;lightest:fdf2f2;darkest:7d2037',\n ),\n definePreset(\n 'verdant',\n 'Verdant',\n 'default=5c9199;500;lightest:fcfdfd;darkest:0d1415&primary=1cb485;400;lightest:fcfdfd;darkest:0d1415&transparent=5c9199;500;lightest:fcfdfd;darkest:0d1415&positive=43D675;300;lightest:fcfdfd;darkest:0d1415&caution=FBD024;200;lightest:fcfdfd;darkest:0d1415&critical=F03E2F;500;lightest:fcfdfd;darkest:0d1415',\n ),\n]\n\n/**\n * Finds a preset by its slug, falling back to the default Studio preset for\n * unknown slugs — the behavior of the hosted Themer service's `?preset`\n * param, which `parseHuesFromUrl` exposes.\n *\n * @internal\n */\nexport function getPreset(slug: string | null | undefined): ThemePreset {\n const needle = slug?.toLowerCase()\n const match = presets.find((preset) => preset.slug === needle)\n if (match) return match\n return defaultPreset\n}\n","import {COLOR_TINTS, ColorTints} from '@sanity/color'\n\nimport {mix} from '../lib/mix'\nimport {Hue, Hues} from './types'\n\n/**\n * Generates the tint ramp for each of the six hues, exactly like the hosted\n * Themer service did.\n */\nexport function createTonesFromHues(hues: Hues): {\n default: ColorTints\n primary: ColorTints\n transparent: ColorTints\n positive: ColorTints\n caution: ColorTints\n critical: ColorTints\n} {\n return {\n default: createTintsFromHue(hues.default, 'Default'),\n primary: createTintsFromHue(hues.primary, 'Primary'),\n transparent: createTintsFromHue(hues.transparent, 'Transparent'),\n positive: createTintsFromHue(hues.positive, 'Positive'),\n caution: createTintsFromHue(hues.caution, 'Caution'),\n critical: createTintsFromHue(hues.critical, 'Critical'),\n }\n}\n\nfunction createTintsFromHue(hue: Hue, title: string): ColorTints {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- the reduce assigns every COLOR_TINTS key, so the Partial is complete\n return COLOR_TINTS.reduce<Partial<ColorTints>>((tints, tint) => {\n tints[tint] = {\n title: `${title} ${tint}`,\n hex: getColorHex(hue, tint),\n }\n\n return tints\n }, {}) as ColorTints\n}\n\nfunction getColorHex(hue: Hue, tint: string): string {\n const tintNum = Number(tint)\n const midPoint = hue.midPoint\n const darkSize = 1000 - midPoint\n const lightPosition = tintNum / midPoint\n const darkPosition = (tintNum - midPoint) / darkSize\n\n if (tintNum === midPoint) {\n return hue.mid.toLowerCase()\n }\n\n // light side of scale: x < midPoint\n if (tintNum < midPoint) {\n return mix(lightPosition, hue.mid, hue.lightest)\n }\n\n // dark side of scale: x > midPoint\n return mix(darkPosition, hue.darkest, hue.mid)\n}\n","import {ColorTints} from '@sanity/color'\nimport {\n buildTheme,\n createColorTheme,\n multiply as multiplyRgb,\n parseColor,\n rgba,\n rgbToHex,\n screen as screenRgb,\n} from '@sanity/ui/theme'\n\nimport {applyHues} from './applyHues'\nimport {createTonesFromHues} from './createTonesFromHues'\nimport {blue, cyan, gray, green, magenta, orange, purple, red, yellow} from './palette'\nimport {LegacyTheme, PartialHues} from './types'\n\nconst NEUTRAL_TONES: ReadonlySet<string> = new Set(['default', 'transparent'])\n\n/** The static tints used for spot colors, syntax highlighting and input states */\nconst SPOT_TINTS: Record<string, ColorTints> = {\n blue,\n cyan,\n gray,\n green,\n magenta,\n orange,\n purple,\n red,\n yellow,\n}\n\nfunction getTint(key: string): ColorTints {\n const tints = SPOT_TINTS[key]\n\n if (!tints) {\n throw new Error(`Unknown tint: ${key}`)\n }\n\n return tints\n}\n\nconst defaultTheme = buildTheme()\n\n/**\n * Generates a Studio theme from hues, producing the exact same colors as the\n * hosted Themer service (themer.sanity.build). This is a port of its\n * `themeFromHues` implementation:\n * https://github.com/sanity-io/themer/blob/main/apps/v1/utils/themeFromHues.ts\n */\nexport function themeFromHues(partialHues: PartialHues): LegacyTheme {\n function multiply(bg: string, fg: string): string {\n return rgbToHex(multiplyRgb(parseColor(bg), parseColor(fg)))\n }\n function screen(bg: string, fg: string): string {\n return rgbToHex(screenRgb(parseColor(bg), parseColor(fg)))\n }\n\n const hues = applyHues(partialHues)\n // These variables are made top-level to keep the body of createColorTheme largely the same.\n // This makes it much easier to sync it with new releases of @sanity/ui should its implementation details change.\n const black = {title: 'Black', hex: hues.default.darkest}\n const white = {title: 'white', hex: hues.default.lightest}\n\n const tones = createTonesFromHues(hues)\n const focusRingHue = tones.primary\n const accentHue = tones.critical\n const linkHue = tones.primary\n\n // Generate colors :OOO\n // Based on the studio color theme of @sanity/ui at the time the hosted\n // Themer service was built\n // oxlint-disable-next-line no-deprecated\n const color = createColorTheme({\n base: ({dark, name}) => {\n if (name === 'default') {\n const skeletonFrom = dark ? tones.transparent[900].hex : tones.transparent[100].hex\n\n return {\n fg: dark ? white.hex : black.hex,\n bg: dark ? black.hex : white.hex,\n border: tones.transparent[dark ? 800 : 200].hex,\n focusRing: focusRingHue[500].hex,\n shadow: {\n outline: rgba(tones.transparent[500].hex, 0.4),\n umbra: rgba(dark ? black.hex : tones.transparent[500].hex, 0.2),\n penumbra: rgba(dark ? black.hex : tones.transparent[500].hex, 0.14),\n ambient: rgba(dark ? black.hex : tones.transparent[500].hex, 0.12),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n if (name === 'transparent') {\n const tints = tones.default\n const skeletonFrom = tints[dark ? 800 : 200].hex\n\n return {\n fg: tints[dark ? 100 : 900].hex,\n bg: tints[dark ? 950 : 50].hex,\n border: tints[dark ? 800 : 300].hex,\n focusRing: focusRingHue[500].hex,\n shadow: {\n outline: rgba(tints[500].hex, dark ? 0.2 : 0.4),\n umbra: rgba(dark ? black.hex : tints[500].hex, 0.2),\n penumbra: rgba(dark ? black.hex : tints[500].hex, 0.14),\n ambient: rgba(dark ? black.hex : tints[500].hex, 0.12),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n const tints = tones[name] || tones.default\n const skeletonFrom = tints[dark ? 800 : 200].hex\n\n return {\n fg: tints[dark ? 100 : 900].hex,\n bg: tints[dark ? 950 : 50].hex,\n border: tints[dark ? 800 : 200].hex,\n focusRing: tints[500].hex,\n shadow: {\n outline: rgba(tints[500].hex, dark ? 0.2 : 0.4),\n umbra: rgba(dark ? black.hex : tints[500].hex, 0.2),\n penumbra: rgba(dark ? black.hex : tints[500].hex, 0.14),\n ambient: rgba(dark ? black.hex : tints[500].hex, 0.12),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n },\n\n solid: ({base, dark, name, state, tone}) => {\n const mix = dark ? screen : multiply\n const mix2 = dark ? multiply : screen\n const defaultTints = tones[name] || tones.default\n const isNeutral = NEUTRAL_TONES.has(name) && NEUTRAL_TONES.has(tone)\n\n let tints = tones[tone === 'default' ? name : tone] || defaultTints\n\n if (state === 'disabled') {\n tints = defaultTints\n const bg = mix(base.bg, tints[dark ? 800 : 200].hex)\n const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)\n\n return {\n bg,\n bg2: mix2(bg, tints[dark ? 50 : 950].hex),\n border: mix(base.bg, tints[dark ? 800 : 200].hex),\n fg: mix(base.bg, dark ? black.hex : white.hex),\n icon: mix(base.bg, dark ? black.hex : white.hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 950 : 50].hex),\n },\n accent: {\n fg: mix(base.bg, tints[dark ? 950 : 50].hex),\n },\n link: {\n fg: mix(base.bg, tints[dark ? 950 : 50].hex),\n },\n code: {\n bg,\n fg: mix(base.bg, tints[dark ? 950 : 50].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n if (state === 'hovered') {\n const bg = mix(base.bg, tints[dark ? 300 : 600].hex)\n const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)\n\n return {\n bg,\n bg2: mix2(bg, tints[dark ? 50 : 950].hex),\n border: mix(base.bg, tints[dark ? 300 : 600].hex),\n fg: mix(base.bg, dark ? black.hex : white.hex),\n icon: mix(base.bg, dark ? black.hex : white.hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 800 : 200].hex),\n },\n accent: {\n fg: mix2(bg, accentHue[dark ? 800 : 200].hex),\n },\n link: {\n fg: mix2(bg, linkHue[dark ? 800 : 200].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 800 : 200].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n if (state === 'pressed') {\n const bg = mix(base.bg, tints[dark ? 200 : 800].hex)\n const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)\n\n return {\n bg: mix(base.bg, tints[dark ? 200 : 800].hex),\n bg2: mix2(bg, tints[dark ? 50 : 950].hex),\n border: mix(base.bg, tints[dark ? 200 : 800].hex),\n fg: mix(base.bg, dark ? black.hex : white.hex),\n icon: mix(base.bg, dark ? black.hex : white.hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 800 : 200].hex),\n },\n accent: {\n fg: mix2(bg, accentHue[dark ? 800 : 200].hex),\n },\n link: {\n fg: mix2(bg, linkHue[dark ? 800 : 200].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 800 : 200].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n if (state === 'selected') {\n if (isNeutral) {\n tints = tones.primary\n }\n\n const bg = mix(base.bg, tints[dark ? 200 : 800].hex)\n const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)\n\n return {\n bg,\n bg2: mix2(bg, tints[dark ? 50 : 950].hex),\n border: mix(base.bg, tints[dark ? 200 : 800].hex),\n fg: mix(base.bg, dark ? black.hex : white.hex),\n icon: mix(base.bg, dark ? black.hex : white.hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 800 : 200].hex),\n },\n accent: {\n fg: mix2(bg, accentHue[dark ? 800 : 200].hex),\n },\n link: {\n fg: mix2(bg, linkHue[dark ? 800 : 200].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 800 : 200].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n // state: \"enabled\" | unknown\n const bg = mix(base.bg, tints[dark ? 400 : 500].hex)\n const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)\n\n return {\n bg,\n bg2: mix2(bg, tints[dark ? 50 : 950].hex),\n border: mix(base.bg, tints[dark ? 400 : 500].hex),\n fg: mix(base.bg, dark ? black.hex : white.hex),\n icon: mix(base.bg, dark ? black.hex : white.hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 900 : 100].hex),\n },\n accent: {\n fg: mix2(bg, accentHue[dark ? 900 : 100].hex),\n },\n link: {\n fg: mix2(bg, linkHue[dark ? 900 : 100].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 900 : 100].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n },\n\n muted: ({base, dark, name, state, tone}) => {\n const mix = dark ? screen : multiply\n const defaultTints = tones[name] || tones.default\n const isNeutral = NEUTRAL_TONES.has(name) && NEUTRAL_TONES.has(tone)\n\n let tints = tones[tone === 'default' ? name : tone] || defaultTints\n\n if (state === 'disabled') {\n tints = defaultTints\n\n const bg = base.bg\n const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)\n\n return {\n bg,\n bg2: mix(bg, tints[dark ? 950 : 50].hex),\n border: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(bg, tints[dark ? 800 : 200].hex),\n icon: mix(bg, tints[dark ? 800 : 200].hex),\n muted: {\n fg: mix(bg, tints[dark ? 900 : 100].hex),\n },\n accent: {\n fg: mix(bg, tints[dark ? 900 : 100].hex),\n },\n link: {\n fg: mix(bg, tints[dark ? 900 : 100].hex),\n },\n code: {\n bg,\n fg: mix(bg, tints[dark ? 900 : 100].hex),\n },\n skeleton: {\n from: rgba(skeletonFrom, 0.5),\n to: rgba(skeletonFrom, 0.25),\n },\n }\n }\n\n if (state === 'hovered') {\n if (isNeutral) {\n tints = tones.primary\n }\n\n const bg = mix(base.bg, tints[dark ? 950 : 50].hex)\n const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)\n\n return {\n bg,\n bg2: mix(bg, tints[dark ? 950 : 50].hex),\n border: mix(bg, tints[dark ? 900 : 100].hex),\n fg: mix(base.bg, tints[dark ? 200 : 800].hex),\n icon: mix(base.bg, tints[dark ? 200 : 800].hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n accent: {\n fg: mix(base.bg, linkHue[dark ? 400 : 500].hex),\n },\n link: {\n fg: mix(base.bg, linkHue[dark ? 400 : 600].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n if (state === 'pressed') {\n if (isNeutral) {\n tints = tones.primary\n }\n\n const bg = mix(base.bg, tints[dark ? 900 : 100].hex)\n const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)\n\n return {\n bg,\n bg2: mix(bg, tints[dark ? 950 : 50].hex),\n border: mix(bg, tints[dark ? 900 : 100].hex),\n fg: mix(base.bg, tints[dark ? 200 : 800].hex),\n icon: mix(base.bg, tints[dark ? 200 : 800].hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n accent: {\n fg: mix(bg, accentHue[dark ? 400 : 500].hex),\n },\n link: {\n fg: mix(bg, linkHue[dark ? 400 : 600].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n if (state === 'selected') {\n if (isNeutral) {\n tints = tones.primary\n }\n\n const bg = mix(base.bg, tints[dark ? 900 : 100].hex)\n const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)\n\n return {\n bg,\n bg2: mix(bg, tints[dark ? 950 : 50].hex),\n border: mix(bg, tints[dark ? 900 : 100].hex),\n fg: mix(base.bg, tints[dark ? 200 : 800].hex),\n icon: mix(base.bg, tints[dark ? 200 : 800].hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n accent: {\n fg: mix(bg, accentHue[dark ? 400 : 500].hex),\n },\n link: {\n fg: mix(bg, linkHue[dark ? 400 : 600].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n const bg = base.bg\n const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)\n\n return {\n bg,\n bg2: mix(bg, tints[dark ? 950 : 50].hex),\n border: mix(bg, tints[dark ? 900 : 100].hex),\n fg: mix(base.bg, tints[dark ? 300 : 700].hex),\n icon: mix(base.bg, tints[dark ? 300 : 700].hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n accent: {\n fg: mix(base.bg, accentHue[dark ? 400 : 500].hex),\n },\n link: {\n fg: mix(base.bg, linkHue[dark ? 400 : 600].hex),\n },\n code: {\n bg: mix(base.bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n },\n\n button: ({base, mode, muted, solid}) => {\n if (mode === 'bleed') {\n return {\n enabled: {\n ...muted.enabled,\n border: muted.enabled.bg,\n },\n hovered: {\n ...muted.hovered,\n border: muted.hovered.bg,\n },\n pressed: {\n ...muted.pressed,\n border: muted.pressed.bg,\n },\n selected: {\n ...muted.selected,\n border: muted.selected.bg,\n },\n disabled: {\n ...muted.disabled,\n border: muted.disabled.bg,\n },\n }\n }\n\n if (mode === 'ghost') {\n return {\n ...solid,\n enabled: {\n ...muted.enabled,\n border: base.border,\n },\n disabled: muted.disabled,\n }\n }\n\n return solid\n },\n\n card: ({base, dark, muted, name, solid, state}) => {\n if (state === 'hovered') {\n return muted[name].hovered\n }\n\n if (state === 'disabled') {\n return muted[name].disabled\n }\n\n const isNeutral = NEUTRAL_TONES.has(name)\n const tints = tones[name] || tones.default\n const mix = dark ? screen : multiply\n\n if (state === 'pressed') {\n if (isNeutral) {\n return muted.primary.pressed\n }\n\n return muted[name].pressed\n }\n\n if (state === 'selected') {\n if (isNeutral) {\n return solid.primary.enabled\n }\n\n return solid[name].enabled\n }\n\n const bg = base.bg\n const skeletonFrom = mix(base.bg, tints[dark ? 900 : 100].hex)\n\n return {\n bg,\n bg2: mix(bg, tints[dark ? 950 : 50].hex),\n fg: base.fg,\n icon: base.fg,\n border: base.border,\n muted: {\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n accent: {\n fg: mix(base.bg, red[dark ? 400 : 500].hex),\n },\n link: {\n fg: mix(base.bg, blue[dark ? 400 : 600].hex),\n },\n code: {\n bg: mix(base.bg, tints[dark ? 950 : 50].hex),\n fg: tints[dark ? 400 : 600].hex,\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n },\n\n input: ({base, dark, mode, state}) => {\n const mix = dark ? screen : multiply\n\n if (mode === 'invalid') {\n const tints = tones.critical\n\n return {\n bg: mix(base.bg, tints[dark ? 950 : 50].hex),\n bg2: mix(base.bg, tints[dark ? 800 : 200].hex),\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n border: mix(base.bg, tints[dark ? 800 : 200].hex),\n placeholder: mix(base.bg, tints[dark ? 600 : 400].hex),\n }\n }\n\n if (state === 'hovered') {\n return {\n bg: base.bg,\n bg2: mix(base.bg, gray[dark ? 700 : 300].hex),\n fg: base.fg,\n border: mix(base.bg, gray[dark ? 700 : 300].hex),\n placeholder: mix(base.bg, gray[dark ? 600 : 400].hex),\n }\n }\n\n if (state === 'disabled') {\n return {\n bg: mix(base.bg, gray[dark ? 950 : 50].hex),\n bg2: mix(base.bg, gray[dark ? 900 : 100].hex),\n fg: mix(base.bg, gray[dark ? 700 : 300].hex),\n border: mix(base.bg, gray[dark ? 900 : 100].hex),\n placeholder: mix(base.bg, gray[dark ? 800 : 200].hex),\n }\n }\n\n if (state === 'readOnly') {\n return {\n bg: mix(base.bg, gray[dark ? 950 : 50].hex),\n bg2: mix(base.bg, gray[dark ? 800 : 200].hex),\n fg: mix(base.bg, gray[dark ? 200 : 800].hex),\n border: mix(base.bg, gray[dark ? 800 : 200].hex),\n placeholder: mix(base.bg, gray[dark ? 600 : 400].hex),\n }\n }\n\n return {\n bg: base.bg,\n bg2: base.border,\n fg: base.fg,\n border: base.border,\n placeholder: mix(base.bg, gray[dark ? 600 : 400].hex),\n }\n },\n\n selectable: ({base, muted, tone, solid, state}) => {\n if (state === 'enabled') {\n return {\n ...muted[tone].enabled,\n bg: base.bg,\n }\n }\n\n if (state === 'pressed') {\n if (tone === 'default') {\n return muted.primary.pressed\n }\n\n return muted[tone].pressed\n }\n\n if (state === 'selected') {\n if (tone === 'default') {\n return solid.primary.enabled\n }\n\n return solid[tone].enabled\n }\n\n if (state === 'disabled') {\n return {\n ...muted[tone].disabled,\n bg: base.bg,\n }\n }\n\n return muted[tone][state]\n },\n\n spot: ({base, dark, key}) => {\n const mix = dark ? screen : multiply\n\n return mix(base.bg, getTint(key)[dark ? 400 : 500].hex)\n },\n\n syntax: ({base, dark}) => {\n const mix = dark ? screen : multiply\n const mainShade = dark ? 400 : 600\n const secondaryShade = dark ? 600 : 400\n\n return {\n atrule: mix(base.bg, purple[mainShade].hex),\n attrName: mix(base.bg, green[mainShade].hex),\n attrValue: mix(base.bg, yellow[mainShade].hex),\n attribute: mix(base.bg, yellow[mainShade].hex),\n boolean: mix(base.bg, purple[mainShade].hex),\n builtin: mix(base.bg, purple[mainShade].hex),\n cdata: mix(base.bg, yellow[mainShade].hex),\n char: mix(base.bg, yellow[mainShade].hex),\n class: mix(base.bg, orange[mainShade].hex),\n className: mix(base.bg, cyan[mainShade].hex),\n comment: mix(base.bg, gray[secondaryShade].hex),\n constant: mix(base.bg, purple[mainShade].hex),\n deleted: mix(base.bg, red[mainShade].hex),\n doctype: mix(base.bg, gray[secondaryShade].hex),\n entity: mix(base.bg, red[mainShade].hex),\n function: mix(base.bg, green[mainShade].hex),\n hexcode: mix(base.bg, blue[mainShade].hex),\n id: mix(base.bg, purple[mainShade].hex),\n important: mix(base.bg, purple[mainShade].hex),\n inserted: mix(base.bg, yellow[mainShade].hex),\n keyword: mix(base.bg, magenta[mainShade].hex),\n number: mix(base.bg, purple[mainShade].hex),\n operator: mix(base.bg, magenta[mainShade].hex),\n prolog: mix(base.bg, gray[secondaryShade].hex),\n property: mix(base.bg, blue[mainShade].hex),\n pseudoClass: mix(base.bg, yellow[mainShade].hex),\n pseudoElement: mix(base.bg, yellow[mainShade].hex),\n punctuation: mix(base.bg, gray[mainShade].hex),\n regex: mix(base.bg, blue[mainShade].hex),\n selector: mix(base.bg, red[mainShade].hex),\n string: mix(base.bg, yellow[mainShade].hex),\n symbol: mix(base.bg, purple[mainShade].hex),\n tag: mix(base.bg, red[mainShade].hex),\n unit: mix(base.bg, orange[mainShade].hex),\n url: mix(base.bg, red[mainShade].hex),\n variable: mix(base.bg, red[mainShade].hex),\n }\n },\n })\n\n // Sanity Studio only reads `color`, `fonts` and `v2` off a custom theme, and\n // throws away the `fonts` of themes flagged `__themer: true` — a workaround\n // for the hosted service serving the fonts of the `@sanity/ui` version it was\n // bundled with, which drifted from the Studio's own. These fonts come from the\n // `@sanity/ui` installed next to the Studio instead, so they already are the\n // ones the workaround substitutes and the theme needs no flag:\n // https://github.com/sanity-io/sanity/blob/bae53feb46ab7f5630259a264968b50bdbc728bb/packages/sanity/src/core/studio/StudioThemeProvider.tsx#L13-L17\n // oxlint-disable-next-line no-deprecated -- the legacy API intentionally targets the deprecated v0 color property, like the hosted service did\n return {...defaultTheme, color, v2: undefined}\n}\n","import {applyHues} from './applyHues'\nimport {parseHuesFromSearchParams} from './parseHuesFromSearchParams'\nimport {getPreset} from './presets'\nimport {themeFromHues} from './themeFromHues'\nimport {Hues, LegacyTheme, PartialHues} from './types'\n\n/**\n * Generates a Studio theme from hues, producing the same colors as importing\n * the theme from the hosted Themer service (themer.sanity.build):\n *\n * ```ts\n * import {createTheme, hues} from '@sanity/themer/legacy'\n * import {defineConfig} from 'sanity'\n *\n * export default defineConfig({\n * theme: createTheme({...hues, primary: {...hues.primary, mid: '#22fca8'}}),\n * // ...rest of the config\n * })\n * ```\n *\n * @public\n */\nexport function createTheme(hues: PartialHues = {}): LegacyTheme {\n return themeFromHues(hues)\n}\n\n/**\n * Parses the hues encoded in a hosted Themer service URL, returning the exact\n * hues that `https://themer.sanity.build/api/hues` served for that query —\n * presets and overrides included.\n *\n * ```ts\n * import {createTheme, parseHuesFromUrl} from '@sanity/themer/legacy'\n *\n * const hues = parseHuesFromUrl(\n * 'https://themer.sanity.build/api/hues?preset=verdant&primary=22fca8',\n * )\n * const theme = createTheme(hues)\n * ```\n *\n * @public\n */\nexport function parseHuesFromUrl(url: string | URL): Hues {\n const {searchParams} = new URL(url, 'https://themer.sanity.build/api/hues')\n const preset = getPreset(searchParams.get('preset'))\n\n return applyHues(parseHuesFromSearchParams(searchParams), preset.hues)\n}\n\n/**\n * The one-line replacement for a theme imported from the hosted Themer\n * service — pass the URL that used to be imported:\n *\n * ```ts\n * // Before:\n * // import {theme} from 'https://themer.sanity.build/api/hues?preset=verdant'\n *\n * // After:\n * import {buildThemeFromUrl} from '@sanity/themer/legacy'\n *\n * const theme = buildThemeFromUrl(\n * 'https://themer.sanity.build/api/hues?preset=verdant',\n * )\n * ```\n *\n * @public\n */\nexport function buildThemeFromUrl(url: string | URL): LegacyTheme {\n return createTheme(parseHuesFromUrl(url))\n}\n","import {applyHues} from './applyHues'\nimport {createTheme} from './createTheme'\nimport {Hues, LegacyTheme} from './types'\n\n/**\n * The hues of the default Studio theme — the same `hues` export that\n * `https://themer.sanity.build/api/hues` served without any parameters.\n *\n * @public\n */\nexport const hues: Hues = applyHues({})\n\n/**\n * The default Studio theme — the same `theme` export that\n * `https://themer.sanity.build/api/hues` served without any parameters.\n *\n * @public\n */\nexport const theme: LegacyTheme = createTheme(hues)\n"],"mappings":";;;;;;;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,sCAAsC,GACpE,SAAS,UAAU,aAAa,IAAI,QAAQ,CAAC;CAEnD,OAAO,UAAU,0BAA0B,YAAY,GAAG,OAAO,IAAI;AACvE;;;;;;;;;;;;;;;;;;;AAoBA,SAAgB,kBAAkB,KAAgC;CAChE,OAAO,YAAY,iBAAiB,GAAG,CAAC;AAC1C;;;;;;;AC3DA,MAAa,OAAa,UAAU,CAAC,CAAC,GAQzB,QAAqB,YAAY,IAAI"}
|
|
1
|
+
{"version":3,"file":"legacy.js","names":[],"sources":["../src/legacy/dropUndefined.ts","../src/legacy/palette.ts","../src/legacy/applyHues.ts","../src/legacy/parseHuesFromSearchParams.ts","../src/legacy/presets.ts","../src/legacy/createTonesFromHues.ts","../src/legacy/themeFromHues.ts","../src/legacy/createTheme.ts","../src/legacy/defaults.ts"],"sourcesContent":["import {Hue} from './types'\n\n/**\n * Drops properties that are set to `undefined`, so that spreading the hue\n * over defaults doesn't shadow them. The hosted Themer service used a\n * `JSON.parse(JSON.stringify(…))` round trip for this.\n */\nexport function dropUndefined(hue: Partial<Hue> | undefined): Partial<Hue> | undefined {\n if (!hue) return undefined\n\n const result: Partial<Hue> = {}\n\n if (hue.mid !== undefined) result.mid = hue.mid\n if (hue.midPoint !== undefined) result.midPoint = hue.midPoint\n if (hue.lightest !== undefined) result.lightest = hue.lightest\n if (hue.darkest !== undefined) result.darkest = hue.darkest\n\n return result\n}\n","import {ColorTint, ColorTints} from '@sanity/color'\n\n/**\n * The color palette from `@sanity/color@2.2.5`, vendored so that themes\n * generated by this module keep producing the exact same colors as the hosted\n * Themer service (themer.sanity.build), which bundles that version. The\n * current `@sanity/color` palette has different values, so it cannot be used\n * here without changing generated themes.\n */\n\n/** @internal */\nexport const black: ColorTint = {title: 'Black', hex: '#101112'}\n\n/** @internal */\nexport const white: ColorTint = {title: 'White', hex: '#fff'}\n\n/** @internal */\nexport const gray: ColorTints = {\n '50': {title: 'Gray 50', hex: '#f2f3f5'},\n '100': {title: 'Gray 100', hex: '#e6e8ec'},\n '200': {title: 'Gray 200', hex: '#ced2d9'},\n '300': {title: 'Gray 300', hex: '#b6bcc6'},\n '400': {title: 'Gray 400', hex: '#9ea6b3'},\n '500': {title: 'Gray 500', hex: '#8690a0'},\n '600': {title: 'Gray 600', hex: '#6e7683'},\n '700': {title: 'Gray 700', hex: '#565d67'},\n '800': {title: 'Gray 800', hex: '#3f434a'},\n '900': {title: 'Gray 900', hex: '#272a2e'},\n '950': {title: 'Gray 950', hex: '#1b1d20'},\n}\n\n/** @internal */\nexport const blue: ColorTints = {\n '50': {title: 'Blue 50', hex: '#e8f1fe'},\n '100': {title: 'Blue 100', hex: '#d2e3fe'},\n '200': {title: 'Blue 200', hex: '#a6c8fd'},\n '300': {title: 'Blue 300', hex: '#7aacfd'},\n '400': {title: 'Blue 400', hex: '#4e91fc'},\n '500': {title: 'Blue 500', hex: '#2276fc'},\n '600': {title: 'Blue 600', hex: '#1e61cd'},\n '700': {title: 'Blue 700', hex: '#1a4d9e'},\n '800': {title: 'Blue 800', hex: '#17396f'},\n '900': {title: 'Blue 900', hex: '#132540'},\n '950': {title: 'Blue 950', hex: '#111b29'},\n}\n\n/** @internal */\nexport const purple: ColorTints = {\n '50': {title: 'Purple 50', hex: '#f8e9fe'},\n '100': {title: 'Purple 100', hex: '#f2d3fe'},\n '200': {title: 'Purple 200', hex: '#e6a7fd'},\n '300': {title: 'Purple 300', hex: '#d97bfd'},\n '400': {title: 'Purple 400', hex: '#cd4efc'},\n '500': {title: 'Purple 500', hex: '#c123fc'},\n '600': {title: 'Purple 600', hex: '#9d1fcd'},\n '700': {title: 'Purple 700', hex: '#7a1b9e'},\n '800': {title: 'Purple 800', hex: '#56186f'},\n '900': {title: 'Purple 900', hex: '#331440'},\n '950': {title: 'Purple 950', hex: '#211229'},\n}\n\n/** @internal */\nexport const magenta: ColorTints = {\n '50': {title: 'Magenta 50', hex: '#fcebf5'},\n '100': {title: 'Magenta 100', hex: '#f9d7eb'},\n '200': {title: 'Magenta 200', hex: '#f4afd8'},\n '300': {title: 'Magenta 300', hex: '#ef87c4'},\n '400': {title: 'Magenta 400', hex: '#ea5fb1'},\n '500': {title: 'Magenta 500', hex: '#e5389e'},\n '600': {title: 'Magenta 600', hex: '#ba3082'},\n '700': {title: 'Magenta 700', hex: '#8f2866'},\n '800': {title: 'Magenta 800', hex: '#65204a'},\n '900': {title: 'Magenta 900', hex: '#3a182d'},\n '950': {title: 'Magenta 950', hex: '#25141f'},\n}\n\n/** @internal */\nexport const red: ColorTints = {\n '50': {title: 'Red 50', hex: '#fdebea'},\n '100': {title: 'Red 100', hex: '#fcd8d5'},\n '200': {title: 'Red 200', hex: '#f9b1ab'},\n '300': {title: 'Red 300', hex: '#f68b82'},\n '400': {title: 'Red 400', hex: '#f36458'},\n '500': {title: 'Red 500', hex: '#f03e2f'},\n '600': {title: 'Red 600', hex: '#c33529'},\n '700': {title: 'Red 700', hex: '#962c23'},\n '800': {title: 'Red 800', hex: '#69231d'},\n '900': {title: 'Red 900', hex: '#3c1a17'},\n '950': {title: 'Red 950', hex: '#261514'},\n}\n\n/** @internal */\nexport const orange: ColorTints = {\n '50': {title: 'Orange 50', hex: '#fef0e6'},\n '100': {title: 'Orange 100', hex: '#fee2ce'},\n '200': {title: 'Orange 200', hex: '#fdc59d'},\n '300': {title: 'Orange 300', hex: '#fca86d'},\n '400': {title: 'Orange 400', hex: '#fb8b3c'},\n '500': {title: 'Orange 500', hex: '#e57322'},\n '600': {title: 'Orange 600', hex: '#ba5f1f'},\n '700': {title: 'Orange 700', hex: '#904b1b'},\n '800': {title: 'Orange 800', hex: '#653818'},\n '900': {title: 'Orange 900', hex: '#3a2415'},\n '950': {title: 'Orange 950', hex: '#251a13'},\n}\n\n/** @internal */\nexport const yellow: ColorTints = {\n '50': {title: 'Yellow 50', hex: '#fef7da'},\n '100': {title: 'Yellow 100', hex: '#fdefb6'},\n '200': {title: 'Yellow 200', hex: '#fcdf6d'},\n '300': {title: 'Yellow 300', hex: '#fbd024'},\n '400': {title: 'Yellow 400', hex: '#d9b421'},\n '500': {title: 'Yellow 500', hex: '#b7991e'},\n '600': {title: 'Yellow 600', hex: '#967e1c'},\n '700': {title: 'Yellow 700', hex: '#746219'},\n '800': {title: 'Yellow 800', hex: '#534717'},\n '900': {title: 'Yellow 900', hex: '#312c14'},\n '950': {title: 'Yellow 950', hex: '#201e13'},\n}\n\n/** @internal */\nexport const green: ColorTints = {\n '50': {title: 'Green 50', hex: '#e7f9ed'},\n '100': {title: 'Green 100', hex: '#d0f4dc'},\n '200': {title: 'Green 200', hex: '#a1eaba'},\n '300': {title: 'Green 300', hex: '#72e097'},\n '400': {title: 'Green 400', hex: '#43d675'},\n '500': {title: 'Green 500', hex: '#3ab564'},\n '600': {title: 'Green 600', hex: '#329454'},\n '700': {title: 'Green 700', hex: '#297343'},\n '800': {title: 'Green 800', hex: '#215233'},\n '900': {title: 'Green 900', hex: '#183122'},\n '950': {title: 'Green 950', hex: '#14211a'},\n}\n\n/** @internal */\nexport const cyan: ColorTints = {\n '50': {title: 'Cyan 50', hex: '#e3fafd'},\n '100': {title: 'Cyan 100', hex: '#c7f5fc'},\n '200': {title: 'Cyan 200', hex: '#90ecf9'},\n '300': {title: 'Cyan 300', hex: '#59e3f6'},\n '400': {title: 'Cyan 400', hex: '#22daf4'},\n '500': {title: 'Cyan 500', hex: '#1fb8ce'},\n '600': {title: 'Cyan 600', hex: '#1c97a8'},\n '700': {title: 'Cyan 700', hex: '#197583'},\n '800': {title: 'Cyan 800', hex: '#16545d'},\n '900': {title: 'Cyan 900', hex: '#133237'},\n '950': {title: 'Cyan 950', hex: '#112124'},\n}\n","import {dropUndefined} from './dropUndefined'\nimport {black, white} from './palette'\nimport {Hues, PartialHues} from './types'\n\nconst lightest = white.hex.toLowerCase()\nconst darkest = black.hex.toLowerCase()\n\n/**\n * The hues of the default Studio theme, matching the `default` preset of the\n * hosted Themer service.\n */\nconst defaultHues: Hues = {\n default: {\n lightest,\n darkest,\n mid: '#8690a0',\n midPoint: 500,\n },\n primary: {\n lightest,\n darkest,\n mid: '#2276fc',\n midPoint: 500,\n },\n transparent: {\n lightest,\n darkest,\n mid: '#8690a0',\n midPoint: 500,\n },\n positive: {\n lightest,\n darkest,\n mid: '#43d675',\n midPoint: 400,\n },\n caution: {\n lightest,\n darkest,\n mid: '#fbd024',\n midPoint: 300,\n },\n critical: {\n lightest,\n darkest,\n mid: '#f03e2f',\n midPoint: 500,\n },\n}\n\n/**\n * Merges partial hues over the defaults, exactly like the hosted Themer\n * service did. When a hue's `mid` color is customized without an explicit\n * `midPoint`, the mid point resets to `500`.\n */\nexport function applyHues(_hues: PartialHues, defaults: Hues = defaultHues): Hues {\n // Filter out undefined values so they don't shadow the defaults when spread\n const hues: PartialHues = {\n default: dropUndefined(_hues.default),\n primary: dropUndefined(_hues.primary),\n transparent: dropUndefined(_hues.transparent),\n positive: dropUndefined(_hues.positive),\n caution: dropUndefined(_hues.caution),\n critical: dropUndefined(_hues.critical),\n }\n\n const defaultMid = hues.default?.mid?.toLowerCase() || defaults.default.mid\n const primaryMid = hues.primary?.mid?.toLowerCase() || defaults.primary.mid\n const transparentMid = hues.transparent?.mid?.toLowerCase() || defaults.transparent.mid\n const positiveMid = hues.positive?.mid?.toLowerCase() || defaults.positive.mid\n const cautionMid = hues.caution?.mid?.toLowerCase() || defaults.caution.mid\n const criticalMid = hues.critical?.mid?.toLowerCase() || defaults.critical.mid\n\n return {\n default: {\n ...defaults.default,\n midPoint: defaultMid === defaults.default.mid ? defaults.default.midPoint : 500,\n ...hues.default,\n mid: defaultMid,\n },\n primary: {\n ...defaults.primary,\n midPoint: primaryMid === defaults.primary.mid ? defaults.primary.midPoint : 500,\n ...hues.primary,\n mid: primaryMid,\n },\n transparent: {\n ...defaults.transparent,\n midPoint: transparentMid === defaults.transparent.mid ? defaults.transparent.midPoint : 500,\n ...hues.transparent,\n mid: transparentMid,\n },\n positive: {\n ...defaults.positive,\n midPoint: positiveMid === defaults.positive.mid ? defaults.positive.midPoint : 500,\n ...hues.positive,\n mid: positiveMid,\n },\n caution: {\n ...defaults.caution,\n midPoint: cautionMid === defaults.caution.mid ? defaults.caution.midPoint : 500,\n ...hues.caution,\n mid: cautionMid,\n },\n critical: {\n ...defaults.critical,\n midPoint: criticalMid === defaults.critical.mid ? defaults.critical.midPoint : 500,\n ...hues.critical,\n mid: criticalMid,\n },\n }\n}\n","import {isColor} from '../lib/mix'\nimport {dropUndefined} from './dropUndefined'\nimport {Hue, HueMidPoint, PartialHues} from './types'\n\nconst HUE_KEYS = ['default', 'primary', 'transparent', 'positive', 'caution', 'critical'] as const\n\nconst VALID_MID_POINTS = new Set([50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950])\n\n/**\n * Parses hues from the query of a hosted Themer service URL, exactly like\n * `https://themer.sanity.build/api/hues` did — including its validation\n * errors.\n */\nexport function parseHuesFromSearchParams(searchParams: URLSearchParams): PartialHues {\n const lightest = searchParams.has('lightest')\n ? assertValidColor(`#${(searchParams.get('lightest') ?? '').toLowerCase()}`)\n : undefined\n const darkest = searchParams.get('darkest')\n ? assertValidColor(`#${(searchParams.get('darkest') ?? '').toLowerCase()}`)\n : undefined\n\n // Filter out undefined values so they don't shadow defaults downstream\n return {\n default: dropUndefined(parseHue('default', searchParams, lightest, darkest)),\n primary: dropUndefined(parseHue('primary', searchParams, lightest, darkest)),\n transparent: dropUndefined(parseHue('transparent', searchParams, lightest, darkest)),\n positive: dropUndefined(parseHue('positive', searchParams, lightest, darkest)),\n caution: dropUndefined(parseHue('caution', searchParams, lightest, darkest)),\n critical: dropUndefined(parseHue('critical', searchParams, lightest, darkest)),\n }\n}\n\nfunction parseHue(\n key: (typeof HUE_KEYS)[number],\n searchParams: URLSearchParams,\n defaultLightest: string | undefined,\n defaultDarkest: string | undefined,\n): Partial<Hue> {\n if (!searchParams.has(key)) {\n return {lightest: defaultLightest, darkest: defaultDarkest}\n }\n const input = (searchParams.get(key) ?? '').toLowerCase()\n\n let mid: string | undefined\n let midPoint: HueMidPoint | undefined\n let lightest: string | undefined\n let darkest: string | undefined\n // format: color;midPoint;lightest:color;darkest:color\n const params = input.split(';')\n if (params.length > 4) {\n throw new TypeError(\n `Invalid number of params for the ${key} hue, it should be 4 or less instead it's ${\n params.length\n }: ${JSON.stringify(params)}`,\n )\n }\n for (const param of params) {\n const maybeMid = `#${param}`\n const maybeMidPoint = roundMidPoint(Number(param))\n\n switch (true) {\n case param === '':\n break\n case isColor(maybeMid) && !mid:\n mid = maybeMid\n break\n case !Number.isNaN(maybeMidPoint) && !midPoint:\n midPoint = assertValidMidPoint(maybeMidPoint)\n break\n case param.startsWith('lightest:') && !lightest:\n lightest = assertValidColor(`#${param.replace(/^lightest:/, '')}`)\n break\n case param.startsWith('darkest:') && !darkest:\n darkest = assertValidColor(`#${param.replace(/^darkest:/, '')}`)\n break\n // Surface duplicates\n case isColor(maybeMid):\n throwDuplicate(key, mid?.replace(/^#/, ''), param, input)\n break\n case !Number.isNaN(maybeMidPoint):\n throwDuplicate(key, midPoint, maybeMidPoint, input)\n break\n case param.startsWith('lightest:'):\n throwDuplicate(key, lightest?.replace(/^#/, 'lightest:'), param, input)\n break\n case param.startsWith('darkest:'):\n throwDuplicate(key, darkest?.replace(/^#/, 'darkest:'), param, input)\n break\n default:\n // If the parser can't make sense of it we throw to surface that something is wrong with the input\n throw new TypeError(`Invalid param for the ${key} hue: ${param}`)\n }\n }\n\n return {\n mid,\n midPoint,\n lightest: lightest ?? defaultLightest,\n darkest: darkest ?? defaultDarkest,\n }\n}\n\nfunction roundMidPoint(value: number): number {\n if (value < 75) {\n return 50\n }\n if (value > 925) {\n return 950\n }\n\n return Math.round(value / 100) * 100\n}\n\nfunction throwDuplicate(key: string, a: unknown, b: unknown, input: string): never {\n throw new TypeError(\n `Duplicate params detected. Remove at least ${\n a === b\n ? `one of the ${JSON.stringify(String(a))}`\n : `${JSON.stringify(String(a))} or ${JSON.stringify(String(b))}`\n } from the ${key} hue: ${JSON.stringify(input)}`,\n )\n}\n\nfunction assertValidColor(input: string): string {\n if (isColor(input)) {\n return input\n }\n throw new TypeError(`Invalid color: ${input}`)\n}\n\nfunction assertValidMidPoint(input: number): HueMidPoint {\n if (isMidPoint(input)) {\n return input\n }\n throw new TypeError(`Invalid midPoint: ${input}`)\n}\n\nfunction isMidPoint(input: number): input is HueMidPoint {\n return VALID_MID_POINTS.has(input)\n}\n","import {applyHues} from './applyHues'\nimport {parseHuesFromSearchParams} from './parseHuesFromSearchParams'\nimport {ThemePreset} from './types'\n\nfunction definePreset(slug: string, title: string, searchParams: string): ThemePreset {\n return {\n slug,\n title,\n searchParams,\n hues: applyHues(parseHuesFromSearchParams(new URLSearchParams(searchParams))),\n }\n}\n\nconst defaultPreset = definePreset(\n 'default',\n 'Studio v3',\n 'lightest=fff&darkest=101112&default=8690a0;500&primary=2276fc;500&transparent=8690a0;500&positive=43d675;400&caution=fbd024;300&critical=f03e2f;500',\n)\n\n/**\n * The preset themes of the hosted Themer service (themer.sanity.build), with\n * the same slugs and hues:\n *\n * ```ts\n * import {createTheme, presets} from '@sanity/themer/legacy'\n *\n * const verdant = presets.find((preset) => preset.slug === 'verdant')\n * const theme = createTheme(verdant.hues)\n * ```\n *\n * @public\n */\nexport const presets: ThemePreset[] = [\n defaultPreset,\n definePreset(\n 'dew',\n 'Dew',\n 'default=5e63b4;600;lightest:fcfcfd;darkest:0d0d15&primary=d1a308;400;lightest:fcfcfd;darkest:0d0d15&transparent=6c6fa7;500;lightest:fcfcfd;darkest:0d0d15&positive=43D675;300;lightest:fcfcfd;darkest:0d0d15&caution=fb9f24;400;lightest:fcfcfd;darkest:0d0d15&critical=F03E2F;500;lightest:fcfcfd;darkest:0d0d15',\n ),\n definePreset(\n 'pink-synth',\n 'Pink Synth',\n 'lightest=f7f2f5&darkest=171721&default=8b6584&primary=ec4899&transparent=503a4c&positive=10b981&caution=fde047;300&critical=fe3459',\n ),\n definePreset(\n 'pixel-art',\n 'Pixel Art',\n 'default=57619c;600&primary=f10784&transparent=5b6498;600&positive=43d675;300&caution=fbd024;200&lightest=fcfcfd&darkest=0d0e15',\n ),\n definePreset(\n 'retro-colonial',\n 'Retro Colonial',\n 'default=8bb9b5;400&primary=fa7a78;400&transparent=8bb9b5;400&positive=43d675;300&caution=fbd024;200&critical=f02f53&lightest=fcfdfd&darkest=0d1515',\n ),\n definePreset(\n 'rosabel',\n 'Rosabel',\n 'default=9d8966&primary=ed2555;700&transparent=9d8966&positive=43d675;300&caution=fbd024;200&lightest=fdfdfc&darkest=15120d',\n ),\n definePreset(\n 'stereofidelic',\n 'Stereofidelic',\n 'default=678e9a&primary=f13009&transparent=678e9a&positive=43d675;300&caution=fbd024;200&critical=f02f35&lightest=fcfdfd&darkest=0e1315',\n ),\n definePreset(\n 'tw-cyan',\n 'Tailwind Cyan',\n 'default=677389;500;lightest:f9fafb;darkest:101728&primary=51b4d0;500;lightest:effefe;darkest:264d61&transparent=6b727f;500;lightest:f8fafb;darkest:131826&positive=55b785;500;lightest:eefdf5;darkest:214d3b&caution=e2b53e;500;lightest:fefbea;darkest:69411b&critical=e14f62;500;lightest:fdf2f2;darkest:7d2037',\n ),\n definePreset(\n 'verdant',\n 'Verdant',\n 'default=5c9199;500;lightest:fcfdfd;darkest:0d1415&primary=1cb485;400;lightest:fcfdfd;darkest:0d1415&transparent=5c9199;500;lightest:fcfdfd;darkest:0d1415&positive=43D675;300;lightest:fcfdfd;darkest:0d1415&caution=FBD024;200;lightest:fcfdfd;darkest:0d1415&critical=F03E2F;500;lightest:fcfdfd;darkest:0d1415',\n ),\n]\n\n/**\n * Finds a preset by its slug, falling back to the default Studio preset for\n * unknown slugs — the behavior of the hosted Themer service's `?preset`\n * param, which `parseHuesFromUrl` exposes.\n *\n * @internal\n */\nexport function getPreset(slug: string | null | undefined): ThemePreset {\n const needle = slug?.toLowerCase()\n const match = presets.find((preset) => preset.slug === needle)\n if (match) return match\n return defaultPreset\n}\n","import {ColorTint, ColorTintKey, ColorTints} from '@sanity/color'\n\nimport {mix} from '../lib/mix'\nimport {Hue, Hues} from './types'\n\n/**\n * Generates the tint ramp for each of the six hues, exactly like the hosted\n * Themer service did.\n */\nexport function createTonesFromHues(hues: Hues): {\n default: ColorTints\n primary: ColorTints\n transparent: ColorTints\n positive: ColorTints\n caution: ColorTints\n critical: ColorTints\n} {\n return {\n default: createTintsFromHue(hues.default, 'Default'),\n primary: createTintsFromHue(hues.primary, 'Primary'),\n transparent: createTintsFromHue(hues.transparent, 'Transparent'),\n positive: createTintsFromHue(hues.positive, 'Positive'),\n caution: createTintsFromHue(hues.caution, 'Caution'),\n critical: createTintsFromHue(hues.critical, 'Critical'),\n }\n}\n\nfunction createTintsFromHue(hue: Hue, title: string): ColorTints {\n const createTint = (tint: ColorTintKey): ColorTint => {\n return {\n title: `${title} ${tint}`,\n hex: getColorHex(hue, tint),\n }\n }\n\n return {\n '50': createTint('50'),\n '100': createTint('100'),\n '200': createTint('200'),\n '300': createTint('300'),\n '400': createTint('400'),\n '500': createTint('500'),\n '600': createTint('600'),\n '700': createTint('700'),\n '800': createTint('800'),\n '900': createTint('900'),\n '950': createTint('950'),\n } satisfies ColorTints\n}\n\nfunction getColorHex(hue: Hue, tint: string): string {\n const tintNum = Number(tint)\n const midPoint = hue.midPoint\n const darkSize = 1000 - midPoint\n const lightPosition = tintNum / midPoint\n const darkPosition = (tintNum - midPoint) / darkSize\n\n if (tintNum === midPoint) {\n return hue.mid.toLowerCase()\n }\n\n // light side of scale: x < midPoint\n if (tintNum < midPoint) {\n return mix(lightPosition, hue.mid, hue.lightest)\n }\n\n // dark side of scale: x > midPoint\n return mix(darkPosition, hue.darkest, hue.mid)\n}\n","import {ColorTints} from '@sanity/color'\nimport {\n buildTheme,\n createColorTheme,\n multiply as multiplyRgb,\n parseColor,\n rgba,\n rgbToHex,\n screen as screenRgb,\n} from '@sanity/ui/theme'\n\nimport {applyHues} from './applyHues'\nimport {createTonesFromHues} from './createTonesFromHues'\nimport {blue, cyan, gray, green, magenta, orange, purple, red, yellow} from './palette'\nimport {LegacyTheme, PartialHues} from './types'\n\nconst NEUTRAL_TONES: ReadonlySet<string> = new Set(['default', 'transparent'])\n\n/** The static tints used for spot colors, syntax highlighting and input states */\nconst SPOT_TINTS: Record<string, ColorTints> = {\n blue,\n cyan,\n gray,\n green,\n magenta,\n orange,\n purple,\n red,\n yellow,\n}\n\nfunction getTint(key: string): ColorTints {\n const tints = SPOT_TINTS[key]\n\n if (!tints) {\n throw new Error(`Unknown tint: ${key}`)\n }\n\n return tints\n}\n\nconst defaultTheme = buildTheme()\n\n/**\n * Generates a Studio theme from hues, producing the exact same colors as the\n * hosted Themer service (themer.sanity.build). This is a port of its\n * `themeFromHues` implementation:\n * https://github.com/sanity-io/themer/blob/main/apps/v1/utils/themeFromHues.ts\n */\nexport function themeFromHues(partialHues: PartialHues): LegacyTheme {\n function multiply(bg: string, fg: string): string {\n return rgbToHex(multiplyRgb(parseColor(bg), parseColor(fg)))\n }\n function screen(bg: string, fg: string): string {\n return rgbToHex(screenRgb(parseColor(bg), parseColor(fg)))\n }\n\n const hues = applyHues(partialHues)\n // These variables are made top-level to keep the body of createColorTheme largely the same.\n // This makes it much easier to sync it with new releases of @sanity/ui should its implementation details change.\n const black = {title: 'Black', hex: hues.default.darkest}\n const white = {title: 'white', hex: hues.default.lightest}\n\n const tones = createTonesFromHues(hues)\n const focusRingHue = tones.primary\n const accentHue = tones.critical\n const linkHue = tones.primary\n\n // Generate colors :OOO\n // Based on the studio color theme of @sanity/ui at the time the hosted\n // Themer service was built\n // oxlint-disable-next-line no-deprecated\n const color = createColorTheme({\n base: ({dark, name}) => {\n if (name === 'default') {\n const skeletonFrom = dark ? tones.transparent[900].hex : tones.transparent[100].hex\n\n return {\n fg: dark ? white.hex : black.hex,\n bg: dark ? black.hex : white.hex,\n border: tones.transparent[dark ? 800 : 200].hex,\n focusRing: focusRingHue[500].hex,\n shadow: {\n outline: rgba(tones.transparent[500].hex, 0.4),\n umbra: rgba(dark ? black.hex : tones.transparent[500].hex, 0.2),\n penumbra: rgba(dark ? black.hex : tones.transparent[500].hex, 0.14),\n ambient: rgba(dark ? black.hex : tones.transparent[500].hex, 0.12),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n if (name === 'transparent') {\n const tints = tones.default\n const skeletonFrom = tints[dark ? 800 : 200].hex\n\n return {\n fg: tints[dark ? 100 : 900].hex,\n bg: tints[dark ? 950 : 50].hex,\n border: tints[dark ? 800 : 300].hex,\n focusRing: focusRingHue[500].hex,\n shadow: {\n outline: rgba(tints[500].hex, dark ? 0.2 : 0.4),\n umbra: rgba(dark ? black.hex : tints[500].hex, 0.2),\n penumbra: rgba(dark ? black.hex : tints[500].hex, 0.14),\n ambient: rgba(dark ? black.hex : tints[500].hex, 0.12),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n const tints = tones[name] || tones.default\n const skeletonFrom = tints[dark ? 800 : 200].hex\n\n return {\n fg: tints[dark ? 100 : 900].hex,\n bg: tints[dark ? 950 : 50].hex,\n border: tints[dark ? 800 : 200].hex,\n focusRing: tints[500].hex,\n shadow: {\n outline: rgba(tints[500].hex, dark ? 0.2 : 0.4),\n umbra: rgba(dark ? black.hex : tints[500].hex, 0.2),\n penumbra: rgba(dark ? black.hex : tints[500].hex, 0.14),\n ambient: rgba(dark ? black.hex : tints[500].hex, 0.12),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n },\n\n solid: ({base, dark, name, state, tone}) => {\n const mix = dark ? screen : multiply\n const mix2 = dark ? multiply : screen\n const defaultTints = tones[name] || tones.default\n const isNeutral = NEUTRAL_TONES.has(name) && NEUTRAL_TONES.has(tone)\n\n let tints = tones[tone === 'default' ? name : tone] || defaultTints\n\n if (state === 'disabled') {\n tints = defaultTints\n const bg = mix(base.bg, tints[dark ? 800 : 200].hex)\n const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)\n\n return {\n bg,\n bg2: mix2(bg, tints[dark ? 50 : 950].hex),\n border: mix(base.bg, tints[dark ? 800 : 200].hex),\n fg: mix(base.bg, dark ? black.hex : white.hex),\n icon: mix(base.bg, dark ? black.hex : white.hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 950 : 50].hex),\n },\n accent: {\n fg: mix(base.bg, tints[dark ? 950 : 50].hex),\n },\n link: {\n fg: mix(base.bg, tints[dark ? 950 : 50].hex),\n },\n code: {\n bg,\n fg: mix(base.bg, tints[dark ? 950 : 50].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n if (state === 'hovered') {\n const bg = mix(base.bg, tints[dark ? 300 : 600].hex)\n const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)\n\n return {\n bg,\n bg2: mix2(bg, tints[dark ? 50 : 950].hex),\n border: mix(base.bg, tints[dark ? 300 : 600].hex),\n fg: mix(base.bg, dark ? black.hex : white.hex),\n icon: mix(base.bg, dark ? black.hex : white.hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 800 : 200].hex),\n },\n accent: {\n fg: mix2(bg, accentHue[dark ? 800 : 200].hex),\n },\n link: {\n fg: mix2(bg, linkHue[dark ? 800 : 200].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 800 : 200].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n if (state === 'pressed') {\n const bg = mix(base.bg, tints[dark ? 200 : 800].hex)\n const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)\n\n return {\n bg: mix(base.bg, tints[dark ? 200 : 800].hex),\n bg2: mix2(bg, tints[dark ? 50 : 950].hex),\n border: mix(base.bg, tints[dark ? 200 : 800].hex),\n fg: mix(base.bg, dark ? black.hex : white.hex),\n icon: mix(base.bg, dark ? black.hex : white.hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 800 : 200].hex),\n },\n accent: {\n fg: mix2(bg, accentHue[dark ? 800 : 200].hex),\n },\n link: {\n fg: mix2(bg, linkHue[dark ? 800 : 200].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 800 : 200].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n if (state === 'selected') {\n if (isNeutral) {\n tints = tones.primary\n }\n\n const bg = mix(base.bg, tints[dark ? 200 : 800].hex)\n const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)\n\n return {\n bg,\n bg2: mix2(bg, tints[dark ? 50 : 950].hex),\n border: mix(base.bg, tints[dark ? 200 : 800].hex),\n fg: mix(base.bg, dark ? black.hex : white.hex),\n icon: mix(base.bg, dark ? black.hex : white.hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 800 : 200].hex),\n },\n accent: {\n fg: mix2(bg, accentHue[dark ? 800 : 200].hex),\n },\n link: {\n fg: mix2(bg, linkHue[dark ? 800 : 200].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 800 : 200].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n // state: \"enabled\" | unknown\n const bg = mix(base.bg, tints[dark ? 400 : 500].hex)\n const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)\n\n return {\n bg,\n bg2: mix2(bg, tints[dark ? 50 : 950].hex),\n border: mix(base.bg, tints[dark ? 400 : 500].hex),\n fg: mix(base.bg, dark ? black.hex : white.hex),\n icon: mix(base.bg, dark ? black.hex : white.hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 900 : 100].hex),\n },\n accent: {\n fg: mix2(bg, accentHue[dark ? 900 : 100].hex),\n },\n link: {\n fg: mix2(bg, linkHue[dark ? 900 : 100].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 900 : 100].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n },\n\n muted: ({base, dark, name, state, tone}) => {\n const mix = dark ? screen : multiply\n const defaultTints = tones[name] || tones.default\n const isNeutral = NEUTRAL_TONES.has(name) && NEUTRAL_TONES.has(tone)\n\n let tints = tones[tone === 'default' ? name : tone] || defaultTints\n\n if (state === 'disabled') {\n tints = defaultTints\n\n const bg = base.bg\n const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)\n\n return {\n bg,\n bg2: mix(bg, tints[dark ? 950 : 50].hex),\n border: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(bg, tints[dark ? 800 : 200].hex),\n icon: mix(bg, tints[dark ? 800 : 200].hex),\n muted: {\n fg: mix(bg, tints[dark ? 900 : 100].hex),\n },\n accent: {\n fg: mix(bg, tints[dark ? 900 : 100].hex),\n },\n link: {\n fg: mix(bg, tints[dark ? 900 : 100].hex),\n },\n code: {\n bg,\n fg: mix(bg, tints[dark ? 900 : 100].hex),\n },\n skeleton: {\n from: rgba(skeletonFrom, 0.5),\n to: rgba(skeletonFrom, 0.25),\n },\n }\n }\n\n if (state === 'hovered') {\n if (isNeutral) {\n tints = tones.primary\n }\n\n const bg = mix(base.bg, tints[dark ? 950 : 50].hex)\n const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)\n\n return {\n bg,\n bg2: mix(bg, tints[dark ? 950 : 50].hex),\n border: mix(bg, tints[dark ? 900 : 100].hex),\n fg: mix(base.bg, tints[dark ? 200 : 800].hex),\n icon: mix(base.bg, tints[dark ? 200 : 800].hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n accent: {\n fg: mix(base.bg, linkHue[dark ? 400 : 500].hex),\n },\n link: {\n fg: mix(base.bg, linkHue[dark ? 400 : 600].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n if (state === 'pressed') {\n if (isNeutral) {\n tints = tones.primary\n }\n\n const bg = mix(base.bg, tints[dark ? 900 : 100].hex)\n const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)\n\n return {\n bg,\n bg2: mix(bg, tints[dark ? 950 : 50].hex),\n border: mix(bg, tints[dark ? 900 : 100].hex),\n fg: mix(base.bg, tints[dark ? 200 : 800].hex),\n icon: mix(base.bg, tints[dark ? 200 : 800].hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n accent: {\n fg: mix(bg, accentHue[dark ? 400 : 500].hex),\n },\n link: {\n fg: mix(bg, linkHue[dark ? 400 : 600].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n if (state === 'selected') {\n if (isNeutral) {\n tints = tones.primary\n }\n\n const bg = mix(base.bg, tints[dark ? 900 : 100].hex)\n const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)\n\n return {\n bg,\n bg2: mix(bg, tints[dark ? 950 : 50].hex),\n border: mix(bg, tints[dark ? 900 : 100].hex),\n fg: mix(base.bg, tints[dark ? 200 : 800].hex),\n icon: mix(base.bg, tints[dark ? 200 : 800].hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n accent: {\n fg: mix(bg, accentHue[dark ? 400 : 500].hex),\n },\n link: {\n fg: mix(bg, linkHue[dark ? 400 : 600].hex),\n },\n code: {\n bg: mix(bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n }\n\n const bg = base.bg\n const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)\n\n return {\n bg,\n bg2: mix(bg, tints[dark ? 950 : 50].hex),\n border: mix(bg, tints[dark ? 900 : 100].hex),\n fg: mix(base.bg, tints[dark ? 300 : 700].hex),\n icon: mix(base.bg, tints[dark ? 300 : 700].hex),\n muted: {\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n accent: {\n fg: mix(base.bg, accentHue[dark ? 400 : 500].hex),\n },\n link: {\n fg: mix(base.bg, linkHue[dark ? 400 : 600].hex),\n },\n code: {\n bg: mix(base.bg, tints[dark ? 950 : 50].hex),\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n },\n\n button: ({base, mode, muted, solid}) => {\n if (mode === 'bleed') {\n return {\n enabled: {\n ...muted.enabled,\n border: muted.enabled.bg,\n },\n hovered: {\n ...muted.hovered,\n border: muted.hovered.bg,\n },\n pressed: {\n ...muted.pressed,\n border: muted.pressed.bg,\n },\n selected: {\n ...muted.selected,\n border: muted.selected.bg,\n },\n disabled: {\n ...muted.disabled,\n border: muted.disabled.bg,\n },\n }\n }\n\n if (mode === 'ghost') {\n return {\n ...solid,\n enabled: {\n ...muted.enabled,\n border: base.border,\n },\n disabled: muted.disabled,\n }\n }\n\n return solid\n },\n\n card: ({base, dark, muted, name, solid, state}) => {\n if (state === 'hovered') {\n return muted[name].hovered\n }\n\n if (state === 'disabled') {\n return muted[name].disabled\n }\n\n const isNeutral = NEUTRAL_TONES.has(name)\n const tints = tones[name] || tones.default\n const mix = dark ? screen : multiply\n\n if (state === 'pressed') {\n if (isNeutral) {\n return muted.primary.pressed\n }\n\n return muted[name].pressed\n }\n\n if (state === 'selected') {\n if (isNeutral) {\n return solid.primary.enabled\n }\n\n return solid[name].enabled\n }\n\n const bg = base.bg\n const skeletonFrom = mix(base.bg, tints[dark ? 900 : 100].hex)\n\n return {\n bg,\n bg2: mix(bg, tints[dark ? 950 : 50].hex),\n fg: base.fg,\n icon: base.fg,\n border: base.border,\n muted: {\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n },\n accent: {\n fg: mix(base.bg, red[dark ? 400 : 500].hex),\n },\n link: {\n fg: mix(base.bg, blue[dark ? 400 : 600].hex),\n },\n code: {\n bg: mix(base.bg, tints[dark ? 950 : 50].hex),\n fg: tints[dark ? 400 : 600].hex,\n },\n skeleton: {\n from: skeletonFrom,\n to: rgba(skeletonFrom, 0.5),\n },\n }\n },\n\n input: ({base, dark, mode, state}) => {\n const mix = dark ? screen : multiply\n\n if (mode === 'invalid') {\n const tints = tones.critical\n\n return {\n bg: mix(base.bg, tints[dark ? 950 : 50].hex),\n bg2: mix(base.bg, tints[dark ? 800 : 200].hex),\n fg: mix(base.bg, tints[dark ? 400 : 600].hex),\n border: mix(base.bg, tints[dark ? 800 : 200].hex),\n placeholder: mix(base.bg, tints[dark ? 600 : 400].hex),\n }\n }\n\n if (state === 'hovered') {\n return {\n bg: base.bg,\n bg2: mix(base.bg, gray[dark ? 700 : 300].hex),\n fg: base.fg,\n border: mix(base.bg, gray[dark ? 700 : 300].hex),\n placeholder: mix(base.bg, gray[dark ? 600 : 400].hex),\n }\n }\n\n if (state === 'disabled') {\n return {\n bg: mix(base.bg, gray[dark ? 950 : 50].hex),\n bg2: mix(base.bg, gray[dark ? 900 : 100].hex),\n fg: mix(base.bg, gray[dark ? 700 : 300].hex),\n border: mix(base.bg, gray[dark ? 900 : 100].hex),\n placeholder: mix(base.bg, gray[dark ? 800 : 200].hex),\n }\n }\n\n if (state === 'readOnly') {\n return {\n bg: mix(base.bg, gray[dark ? 950 : 50].hex),\n bg2: mix(base.bg, gray[dark ? 800 : 200].hex),\n fg: mix(base.bg, gray[dark ? 200 : 800].hex),\n border: mix(base.bg, gray[dark ? 800 : 200].hex),\n placeholder: mix(base.bg, gray[dark ? 600 : 400].hex),\n }\n }\n\n return {\n bg: base.bg,\n bg2: base.border,\n fg: base.fg,\n border: base.border,\n placeholder: mix(base.bg, gray[dark ? 600 : 400].hex),\n }\n },\n\n selectable: ({base, muted, tone, solid, state}) => {\n if (state === 'enabled') {\n return {\n ...muted[tone].enabled,\n bg: base.bg,\n }\n }\n\n if (state === 'pressed') {\n if (tone === 'default') {\n return muted.primary.pressed\n }\n\n return muted[tone].pressed\n }\n\n if (state === 'selected') {\n if (tone === 'default') {\n return solid.primary.enabled\n }\n\n return solid[tone].enabled\n }\n\n if (state === 'disabled') {\n return {\n ...muted[tone].disabled,\n bg: base.bg,\n }\n }\n\n return muted[tone][state]\n },\n\n spot: ({base, dark, key}) => {\n const mix = dark ? screen : multiply\n\n return mix(base.bg, getTint(key)[dark ? 400 : 500].hex)\n },\n\n syntax: ({base, dark}) => {\n const mix = dark ? screen : multiply\n const mainShade = dark ? 400 : 600\n const secondaryShade = dark ? 600 : 400\n\n return {\n atrule: mix(base.bg, purple[mainShade].hex),\n attrName: mix(base.bg, green[mainShade].hex),\n attrValue: mix(base.bg, yellow[mainShade].hex),\n attribute: mix(base.bg, yellow[mainShade].hex),\n boolean: mix(base.bg, purple[mainShade].hex),\n builtin: mix(base.bg, purple[mainShade].hex),\n cdata: mix(base.bg, yellow[mainShade].hex),\n char: mix(base.bg, yellow[mainShade].hex),\n class: mix(base.bg, orange[mainShade].hex),\n className: mix(base.bg, cyan[mainShade].hex),\n comment: mix(base.bg, gray[secondaryShade].hex),\n constant: mix(base.bg, purple[mainShade].hex),\n deleted: mix(base.bg, red[mainShade].hex),\n doctype: mix(base.bg, gray[secondaryShade].hex),\n entity: mix(base.bg, red[mainShade].hex),\n function: mix(base.bg, green[mainShade].hex),\n hexcode: mix(base.bg, blue[mainShade].hex),\n id: mix(base.bg, purple[mainShade].hex),\n important: mix(base.bg, purple[mainShade].hex),\n inserted: mix(base.bg, yellow[mainShade].hex),\n keyword: mix(base.bg, magenta[mainShade].hex),\n number: mix(base.bg, purple[mainShade].hex),\n operator: mix(base.bg, magenta[mainShade].hex),\n prolog: mix(base.bg, gray[secondaryShade].hex),\n property: mix(base.bg, blue[mainShade].hex),\n pseudoClass: mix(base.bg, yellow[mainShade].hex),\n pseudoElement: mix(base.bg, yellow[mainShade].hex),\n punctuation: mix(base.bg, gray[mainShade].hex),\n regex: mix(base.bg, blue[mainShade].hex),\n selector: mix(base.bg, red[mainShade].hex),\n string: mix(base.bg, yellow[mainShade].hex),\n symbol: mix(base.bg, purple[mainShade].hex),\n tag: mix(base.bg, red[mainShade].hex),\n unit: mix(base.bg, orange[mainShade].hex),\n url: mix(base.bg, red[mainShade].hex),\n variable: mix(base.bg, red[mainShade].hex),\n }\n },\n })\n\n // Sanity Studio only reads `color`, `fonts` and `v2` off a custom theme, and\n // throws away the `fonts` of themes flagged `__themer: true` — a workaround\n // for the hosted service serving the fonts of the `@sanity/ui` version it was\n // bundled with, which drifted from the Studio's own. These fonts come from the\n // `@sanity/ui` installed next to the Studio instead, so they already are the\n // ones the workaround substitutes and the theme needs no flag:\n // https://github.com/sanity-io/sanity/blob/bae53feb46ab7f5630259a264968b50bdbc728bb/packages/sanity/src/core/studio/StudioThemeProvider.tsx#L13-L17\n // oxlint-disable-next-line no-deprecated -- the legacy API intentionally targets the deprecated v0 color property, like the hosted service did\n return {...defaultTheme, color, v2: undefined}\n}\n","import {applyHues} from './applyHues'\nimport {parseHuesFromSearchParams} from './parseHuesFromSearchParams'\nimport {getPreset} from './presets'\nimport {themeFromHues} from './themeFromHues'\nimport {Hues, LegacyTheme, PartialHues} from './types'\n\n/**\n * Generates a Studio theme from hues, producing the same colors as importing\n * the theme from the hosted Themer service (themer.sanity.build):\n *\n * ```ts\n * import {createTheme, hues} from '@sanity/themer/legacy'\n * import {defineConfig} from 'sanity'\n *\n * export default defineConfig({\n * theme: createTheme({...hues, primary: {...hues.primary, mid: '#22fca8'}}),\n * // ...rest of the config\n * })\n * ```\n *\n * @public\n */\nexport function createTheme(hues: PartialHues = {}): LegacyTheme {\n return themeFromHues(hues)\n}\n\n/**\n * Parses the hues encoded in a hosted Themer service URL, returning the exact\n * hues that `https://themer.sanity.build/api/hues` served for that query —\n * presets and overrides included.\n *\n * ```ts\n * import {createTheme, parseHuesFromUrl} from '@sanity/themer/legacy'\n *\n * const hues = parseHuesFromUrl(\n * 'https://themer.sanity.build/api/hues?preset=verdant&primary=22fca8',\n * )\n * const theme = createTheme(hues)\n * ```\n *\n * @public\n */\nexport function parseHuesFromUrl(url: string | URL): Hues {\n const {searchParams} = new URL(url, 'https://themer.sanity.build/api/hues')\n const preset = getPreset(searchParams.get('preset'))\n\n return applyHues(parseHuesFromSearchParams(searchParams), preset.hues)\n}\n\n/**\n * The one-line replacement for a theme imported from the hosted Themer\n * service — pass the URL that used to be imported:\n *\n * ```ts\n * // Before:\n * // import {theme} from 'https://themer.sanity.build/api/hues?preset=verdant'\n *\n * // After:\n * import {buildThemeFromUrl} from '@sanity/themer/legacy'\n *\n * const theme = buildThemeFromUrl(\n * 'https://themer.sanity.build/api/hues?preset=verdant',\n * )\n * ```\n *\n * @public\n */\nexport function buildThemeFromUrl(url: string | URL): LegacyTheme {\n return createTheme(parseHuesFromUrl(url))\n}\n","import {applyHues} from './applyHues'\nimport {createTheme} from './createTheme'\nimport {Hues, LegacyTheme} from './types'\n\n/**\n * The hues of the default Studio theme — the same `hues` export that\n * `https://themer.sanity.build/api/hues` served without any parameters.\n *\n * @public\n */\nexport const hues: Hues = applyHues({})\n\n/**\n * The default Studio theme — the same `theme` export that\n * `https://themer.sanity.build/api/hues` served without any parameters.\n *\n * @public\n */\nexport const theme: LegacyTheme = createTheme(hues)\n"],"mappings":";;;;;;;AAOA,SAAgB,cAAc,KAAyD;CACrF,IAAI,CAAC,KAAK;CAEV,IAAM,SAAuB,CAAC;CAO9B,OALI,IAAI,QAAQ,KAAA,MAAW,OAAO,MAAM,IAAI,MACxC,IAAI,aAAa,KAAA,MAAW,OAAO,WAAW,IAAI,WAClD,IAAI,aAAa,KAAA,MAAW,OAAO,WAAW,IAAI,WAClD,IAAI,YAAY,KAA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,IAAI,QAAQ,CAAC;CAEnD,OAAO,UAAU,0BAA0B,YAAY,GAAG,OAAO,IAAI;AACvE;;;;;;;;;;;;;;;;;;;AAoBA,SAAgB,kBAAkB,KAAgC;CAChE,OAAO,YAAY,iBAAiB,GAAG,CAAC;AAC1C;;;;;;;AC3DA,MAAa,OAAa,UAAU,CAAC,CAAC,GAQzB,QAAqB,YAAY,IAAI"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/themer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"description": "Generate Sanity Studio themes, and preview them with a Studio tool.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -35,24 +35,24 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@sanity/color": "^3.0.8",
|
|
37
37
|
"@sanity/icons": "^5.2.2",
|
|
38
|
-
"@sanity/ui": "^4.2.
|
|
38
|
+
"@sanity/ui": "^4.2.2",
|
|
39
39
|
"react-compiler-runtime": "1.0.0",
|
|
40
40
|
"react-refractor": "^4.0.0",
|
|
41
41
|
"refractor": "^5.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@sanity/tsdown-config": "^0.28.
|
|
45
|
-
"@sanity/vanilla-extract-vite-plugin": "^0.2.
|
|
46
|
-
"@types/node": "^24.13.
|
|
44
|
+
"@sanity/tsdown-config": "^0.28.1",
|
|
45
|
+
"@sanity/vanilla-extract-vite-plugin": "^0.2.19",
|
|
46
|
+
"@types/node": "^24.13.6",
|
|
47
47
|
"@types/react": "^19.3.0",
|
|
48
|
-
"oxc-transform-react": "^0.
|
|
48
|
+
"oxc-transform-react": "^0.151.0",
|
|
49
49
|
"react": "^19.3.0",
|
|
50
50
|
"rimraf": "^5.0.5",
|
|
51
|
-
"sanity": "^6.
|
|
51
|
+
"sanity": "^6.15.0",
|
|
52
52
|
"styled-components": "^6.5.3",
|
|
53
53
|
"tsdown": "^0.23.0",
|
|
54
54
|
"typescript": "7.0.2",
|
|
55
|
-
"vitest": "^5.0.
|
|
55
|
+
"vitest": "^5.0.1"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"react": "^18 || ^19",
|