@sanity/ui 4.4.11 → 4.4.13

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.
Files changed (101) hide show
  1. package/dist/{_system-CTe2lb5l.d.ts → _system-DjnSx8gA.d.ts} +1 -1
  2. package/dist/{_system-CTe2lb5l.d.ts.map → _system-DjnSx8gA.d.ts.map} +1 -1
  3. package/dist/{arrow-CleOpGKV.js → arrow-BhooatHA.js} +2 -2
  4. package/dist/arrow-BhooatHA.js.map +1 -0
  5. package/dist/autocomplete.d.ts +3 -3
  6. package/dist/autocomplete.d.ts.map +1 -1
  7. package/dist/autocomplete.js +64 -63
  8. package/dist/autocomplete.js.map +1 -1
  9. package/dist/breadcrumbs.js +6 -6
  10. package/dist/breadcrumbs.js.map +1 -1
  11. package/dist/{button-dnqMFkWg.d.ts → button-DJ_N-Z82.d.ts} +5 -5
  12. package/dist/{button-dnqMFkWg.d.ts.map → button-DJ_N-Z82.d.ts.map} +1 -1
  13. package/dist/{button-DnJrhWml.js → button-GFefHUiY.js} +8 -8
  14. package/dist/button-GFefHUiY.js.map +1 -0
  15. package/dist/card-CEB9JLru.d.ts +7 -0
  16. package/dist/card-CEB9JLru.d.ts.map +1 -0
  17. package/dist/code.d.ts +1 -1
  18. package/dist/code.js +4 -4
  19. package/dist/code.js.map +1 -1
  20. package/dist/{component-DVlwaWB-.d.ts → component-CWyWF8Ut.d.ts} +1 -1
  21. package/dist/{component-DVlwaWB-.d.ts.map → component-CWyWF8Ut.d.ts.map} +1 -1
  22. package/dist/{element-BYgCE_iK.js → element-DIcKo4Jp.js} +1 -1
  23. package/dist/{element-BYgCE_iK.js.map → element-DIcKo4Jp.js.map} +1 -1
  24. package/dist/{elementSizeObserver-pevZfdGa.js → elementSizeObserver-CSI5StGC.js} +1 -1
  25. package/dist/{elementSizeObserver-pevZfdGa.js.map → elementSizeObserver-CSI5StGC.js.map} +1 -1
  26. package/dist/{factory-BzXTX8_Q.js → factory-D1M0GqJn.js} +3 -3
  27. package/dist/factory-D1M0GqJn.js.map +1 -0
  28. package/dist/{flex-ohP2jG9d.js → flex-DeU6k2uN.js} +4 -4
  29. package/dist/flex-DeU6k2uN.js.map +1 -0
  30. package/dist/{font-EtfxKPUz.d.ts → font-DI_tc5s8.d.ts} +1 -1
  31. package/dist/{font-EtfxKPUz.d.ts.map → font-DI_tc5s8.d.ts.map} +1 -1
  32. package/dist/{getElementRef-BLVMlHTn.js → getElementRef-5HypX0AT.js} +1 -1
  33. package/dist/getElementRef-5HypX0AT.js.map +1 -0
  34. package/dist/{getScopedTheme-C-sZsyAz.js → getScopedTheme-BJoqtbrb.js} +2 -2
  35. package/dist/{getScopedTheme-C-sZsyAz.js.map → getScopedTheme-BJoqtbrb.js.map} +1 -1
  36. package/dist/{getTheme_v2-y09KqtEb.js → getTheme_v2-CP5x_AcH.js} +1 -1
  37. package/dist/{getTheme_v2-y09KqtEb.js.map → getTheme_v2-CP5x_AcH.js.map} +1 -1
  38. package/dist/{grid-D-gOpN8z.js → grid-Bz_gKSjw.js} +4 -4
  39. package/dist/grid-Bz_gKSjw.js.map +1 -0
  40. package/dist/{helpers-XThPpWje.js → helpers-jp2T-bdR.js} +2 -2
  41. package/dist/{helpers-XThPpWje.js.map → helpers-jp2T-bdR.js.map} +1 -1
  42. package/dist/{hotkeys-Bd5rZOMO.js → hotkeys-B9h8uliL.js} +5 -5
  43. package/dist/hotkeys-B9h8uliL.js.map +1 -0
  44. package/dist/index.d.ts +8 -8
  45. package/dist/index.js +19 -19
  46. package/dist/index.js.map +1 -1
  47. package/dist/{layer-umnlcWXZ.js → layer-Bl7rtdZ_.js} +4 -4
  48. package/dist/layer-Bl7rtdZ_.js.map +1 -0
  49. package/dist/{layer-ChlP9Ik6.d.ts → layer-CAyooswI.d.ts} +1 -1
  50. package/dist/{layer-ChlP9Ik6.d.ts.map → layer-CAyooswI.d.ts.map} +1 -1
  51. package/dist/menu.d.ts +4 -4
  52. package/dist/menu.js +12 -12
  53. package/dist/menu.js.map +1 -1
  54. package/dist/{popover-qhIrQ_4V.js → popover-C-YWzo_l.js} +20 -15
  55. package/dist/popover-C-YWzo_l.js.map +1 -0
  56. package/dist/{popover-HDVgZg5e.d.ts → popover-DpHuX7yr.d.ts} +4 -4
  57. package/dist/{popover-HDVgZg5e.d.ts.map → popover-DpHuX7yr.d.ts.map} +1 -1
  58. package/dist/popover.d.ts +1 -1
  59. package/dist/popover.js +1 -1
  60. package/dist/{refractor-CC48DwHi.js → refractor-DeAFUFLp.js} +2 -2
  61. package/dist/refractor-DeAFUFLp.js.map +1 -0
  62. package/dist/{responsiveFont-Cyvxxz-G.js → responsiveFont-CfFXLc7o.js} +3 -3
  63. package/dist/{responsiveFont-Cyvxxz-G.js.map → responsiveFont-CfFXLc7o.js.map} +1 -1
  64. package/dist/{rgba-BSYaEUW6.d.ts → rgba-Hlu7P1jF.d.ts} +3 -3
  65. package/dist/{rgba-BSYaEUW6.d.ts.map → rgba-Hlu7P1jF.d.ts.map} +1 -1
  66. package/dist/selectable-2IHh9SLq.d.ts +7 -0
  67. package/dist/selectable-2IHh9SLq.d.ts.map +1 -0
  68. package/dist/{stack-DyrC2YfU.js → stack-DFRXALVU.js} +5 -5
  69. package/dist/stack-DFRXALVU.js.map +1 -0
  70. package/dist/{textInput-DhYi5cPT.js → textInput-cMQvSl5n.js} +7 -7
  71. package/dist/textInput-cMQvSl5n.js.map +1 -0
  72. package/dist/theme.d.ts +3 -3
  73. package/dist/theme.js +3 -3
  74. package/dist/toast.js +8 -8
  75. package/dist/toast.js.map +1 -1
  76. package/dist/tooltip.d.ts +2 -2
  77. package/dist/tooltip.js +9 -9
  78. package/dist/tooltip.js.map +1 -1
  79. package/dist/{useClickOutsideEvent-CC1zgOmv.js → useClickOutsideEvent-C-9cvlOu.js} +2 -2
  80. package/dist/useClickOutsideEvent-C-9cvlOu.js.map +1 -0
  81. package/dist/{useLayer-D_TnC6On.js → useLayer-DiYnwQ5T.js} +12 -12
  82. package/dist/useLayer-DiYnwQ5T.js.map +1 -0
  83. package/package.json +21 -21
  84. package/dist/arrow-CleOpGKV.js.map +0 -1
  85. package/dist/button-DnJrhWml.js.map +0 -1
  86. package/dist/card-C0a0wQTc.d.ts +0 -7
  87. package/dist/card-C0a0wQTc.d.ts.map +0 -1
  88. package/dist/factory-BzXTX8_Q.js.map +0 -1
  89. package/dist/flex-ohP2jG9d.js.map +0 -1
  90. package/dist/getElementRef-BLVMlHTn.js.map +0 -1
  91. package/dist/grid-D-gOpN8z.js.map +0 -1
  92. package/dist/hotkeys-Bd5rZOMO.js.map +0 -1
  93. package/dist/layer-umnlcWXZ.js.map +0 -1
  94. package/dist/popover-qhIrQ_4V.js.map +0 -1
  95. package/dist/refractor-CC48DwHi.js.map +0 -1
  96. package/dist/selectable-B0GUIL74.d.ts +0 -7
  97. package/dist/selectable-B0GUIL74.d.ts.map +0 -1
  98. package/dist/stack-DyrC2YfU.js.map +0 -1
  99. package/dist/textInput-DhYi5cPT.js.map +0 -1
  100. package/dist/useClickOutsideEvent-CC1zgOmv.js.map +0 -1
  101. package/dist/useLayer-D_TnC6On.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"factory-BzXTX8_Q.js","names":["_color","\"positive\"","\"caution\"","\"transparent\"","\"default\"","\"primary\"","\"suggest\"","\"critical\"","\"hovered\"","\"pressed\"","\"selected\"","\"disabled\"","\"readOnly\"","\"invalid\""],"sources":["../src/theme/defaults/fonts.ts","../src/theme/system/color/_constants.ts","../src/theme/system/color/_helpers.ts","../src/theme/config/system.ts","../src/theme/config/helpers.ts","../src/theme/config/tokens/parseTokenValue.ts","../src/theme/build/colorToken/compileColorToken.ts","../src/theme/build/colorToken/colorToken.ts","../src/theme/defaults/colorTokens.ts","../src/theme/build/lib/isRecord.ts","../src/theme/build/merge.ts","../src/theme/build/resolveColorTokens.ts","../src/theme/build/buildColorTheme.ts","../src/theme/defaults/colorPalette.ts","../src/theme/build/lib/color-fns/blend/mix.ts","../src/theme/build/lib/utils.ts","../src/theme/build/lib/color-fns/convert.ts","../src/theme/build/lib/color-fns/parse.ts","../src/theme/build/lib/color-fns/rgba.ts","../src/theme/build/lib/color-fns/blend/multiply.ts","../src/theme/build/lib/color-fns/blend/screen.ts","../src/theme/build/mixThemeColor.ts","../src/theme/build/renderColorValue.ts","../src/theme/build/renderColorTheme.ts","../src/theme/build/buildTheme.ts","../src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts","../src/theme/build/_deprecated/color/_solid/createSolidTones.ts","../src/theme/build/_deprecated/color/button/createButtonTones.ts","../src/theme/build/_deprecated/color/button/createButtonModes.ts","../src/theme/build/_deprecated/color/card/createCardStates.ts","../src/theme/build/_deprecated/color/defaults.ts","../src/theme/build/_deprecated/color/input/createInputModes.ts","../src/theme/build/_deprecated/color/muted/createMuted.ts","../src/theme/build/_deprecated/color/spot/createSpot.ts","../src/theme/build/_deprecated/color/factory.ts"],"sourcesContent":["import {ThemeFonts} from '../system/font'\n\nexport const defaultThemeFonts: ThemeFonts = {\n code: {\n family: 'ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace',\n weights: {\n regular: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n },\n sizes: [\n {\n ascenderHeight: 4,\n descenderHeight: 4,\n fontSize: 10,\n iconSize: 17,\n lineHeight: 15,\n letterSpacing: 0,\n },\n {\n ascenderHeight: 5,\n descenderHeight: 5,\n fontSize: 13,\n iconSize: 21,\n lineHeight: 19,\n letterSpacing: 0,\n },\n {\n ascenderHeight: 6,\n descenderHeight: 6,\n fontSize: 16,\n iconSize: 25,\n lineHeight: 23,\n letterSpacing: 0,\n },\n {\n ascenderHeight: 7,\n descenderHeight: 7,\n fontSize: 19,\n iconSize: 29,\n lineHeight: 27,\n letterSpacing: 0,\n },\n {\n ascenderHeight: 8,\n descenderHeight: 8,\n fontSize: 22,\n iconSize: 33,\n lineHeight: 31,\n letterSpacing: 0,\n },\n ],\n },\n heading: {\n family:\n 'Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Liberation Sans\", Helvetica, Arial, system-ui, sans-serif',\n weights: {\n regular: 700,\n medium: 800,\n semibold: 900,\n bold: 900,\n },\n sizes: [\n {\n ascenderHeight: 5,\n descenderHeight: 5,\n fontSize: 13,\n iconSize: 17,\n lineHeight: 19,\n letterSpacing: 0,\n },\n {\n ascenderHeight: 6,\n descenderHeight: 6,\n fontSize: 16,\n iconSize: 25,\n lineHeight: 23,\n letterSpacing: 0,\n },\n {\n ascenderHeight: 7,\n descenderHeight: 7,\n fontSize: 21,\n iconSize: 33,\n lineHeight: 29,\n letterSpacing: 0,\n },\n {\n ascenderHeight: 8,\n descenderHeight: 8,\n fontSize: 27,\n iconSize: 41,\n lineHeight: 35,\n letterSpacing: 0,\n },\n {\n ascenderHeight: 9.5,\n descenderHeight: 8.5,\n fontSize: 33,\n iconSize: 49,\n lineHeight: 41,\n letterSpacing: 0,\n },\n {\n ascenderHeight: 10.5,\n descenderHeight: 9.5,\n fontSize: 38,\n iconSize: 53,\n lineHeight: 47,\n letterSpacing: 0,\n },\n ],\n },\n label: {\n family:\n 'Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Liberation Sans\", system-ui, sans-serif',\n weights: {\n regular: 600,\n medium: 700,\n semibold: 800,\n bold: 900,\n },\n sizes: [\n {\n ascenderHeight: 2,\n descenderHeight: 2,\n fontSize: 8.1,\n iconSize: 13,\n lineHeight: 10,\n letterSpacing: 0.5,\n },\n {\n ascenderHeight: 2,\n descenderHeight: 2,\n fontSize: 9.5,\n iconSize: 15,\n lineHeight: 11,\n letterSpacing: 0.5,\n },\n {\n ascenderHeight: 2,\n descenderHeight: 2,\n fontSize: 10.8,\n iconSize: 17,\n lineHeight: 12,\n letterSpacing: 0.5,\n },\n {\n ascenderHeight: 2,\n descenderHeight: 2,\n fontSize: 12.25,\n iconSize: 19,\n lineHeight: 13,\n letterSpacing: 0.5,\n },\n {\n ascenderHeight: 2,\n descenderHeight: 2,\n fontSize: 13.6,\n iconSize: 21,\n lineHeight: 14,\n letterSpacing: 0.5,\n },\n {\n ascenderHeight: 2,\n descenderHeight: 2,\n fontSize: 15,\n iconSize: 23,\n lineHeight: 15,\n letterSpacing: 0.5,\n },\n ],\n },\n text: {\n family:\n 'Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Liberation Sans\", Helvetica, Arial, system-ui, sans-serif',\n weights: {\n regular: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n },\n sizes: [\n {\n ascenderHeight: 4,\n descenderHeight: 4,\n fontSize: 10,\n iconSize: 17,\n lineHeight: 15,\n letterSpacing: 0,\n },\n {\n ascenderHeight: 5,\n descenderHeight: 5,\n fontSize: 13,\n iconSize: 21,\n lineHeight: 19,\n letterSpacing: 0,\n },\n {\n ascenderHeight: 6,\n descenderHeight: 6,\n fontSize: 15,\n iconSize: 25,\n lineHeight: 23,\n letterSpacing: 0,\n },\n {\n ascenderHeight: 7,\n descenderHeight: 7,\n fontSize: 18,\n iconSize: 29,\n lineHeight: 27,\n letterSpacing: 0,\n },\n {\n ascenderHeight: 8,\n descenderHeight: 8,\n fontSize: 21,\n iconSize: 33,\n lineHeight: 31,\n letterSpacing: 0,\n },\n ],\n },\n}\n","import {COLOR_HUES} from '@sanity/color'\n\n/** @public */\nexport const THEME_COLOR_SCHEMES = ['light', 'dark'] as const\n\n/** @public */\nexport const THEME_COLOR_BLEND_MODES = ['multiply', 'screen'] as const\n\n/** @public */\nexport const THEME_COLOR_CARD_TONES = [\n 'transparent',\n 'default',\n 'neutral',\n 'primary', // deprecated\n 'suggest',\n 'positive',\n 'caution',\n 'critical',\n] as const\n\n/** @public */\nexport const THEME_COLOR_STATE_TONES = [\n 'default',\n 'neutral',\n 'primary', // deprecated\n 'suggest',\n 'positive',\n 'caution',\n 'critical',\n] as const\n\n/** @public */\nexport const THEME_COLOR_STATES = ['enabled', 'hovered', 'pressed', 'selected', 'disabled'] as const\n\n/** @public */\nexport const THEME_COLOR_BUTTON_MODES = ['default', 'ghost', 'bleed'] as const\n\n/** @public */\nexport const THEME_COLOR_INPUT_MODES = ['default', 'invalid'] as const\n\n/** @public */\nexport const THEME_COLOR_INPUT_STATES = ['enabled', 'hovered', 'readOnly', 'disabled'] as const\n\n/** @public */\nexport const THEME_COLOR_AVATAR_COLORS = COLOR_HUES\n","import {COLOR_HUES, COLOR_TINTS, ColorHueKey, ColorTintKey} from '@sanity/color'\n\nimport {THEME_COLOR_BLEND_MODES, THEME_COLOR_BUTTON_MODES} from './_constants'\nimport {ThemeColorBlendModeKey, ThemeColorButtonModeKey} from './_system'\n\n/** @internal */\nexport function isColorBlendModeValue(str: string): str is ThemeColorBlendModeKey {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return THEME_COLOR_BLEND_MODES.includes(str as ThemeColorBlendModeKey)\n}\n\n/** @internal */\nexport function isColorHueKey(str: string): str is ColorHueKey {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return COLOR_HUES.includes(str as ColorHueKey)\n}\n\n/** @internal */\nexport function isColorTintKey(str: string): str is ColorTintKey {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return COLOR_TINTS.includes(str as ColorTintKey)\n}\n\n/** @internal */\nexport function isColorButtonMode(str: string): str is ThemeColorButtonModeKey {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return THEME_COLOR_BUTTON_MODES.includes(str as ThemeColorButtonModeKey)\n}\n","import {ColorHueKey, ColorTintKey} from '@sanity/color'\n\nimport {\n THEME_COLOR_AVATAR_COLORS,\n THEME_COLOR_CARD_TONES,\n THEME_COLOR_INPUT_MODES,\n THEME_COLOR_INPUT_STATES,\n THEME_COLOR_STATE_TONES,\n THEME_COLOR_STATES,\n} from '../system/color/_constants'\nimport {ThemeColorBlendModeKey} from '../system/color/_system'\n\n/** @public */\nexport const COLOR_CONFIG_STATE_KEYS = [\n '_hue',\n 'bg',\n 'fg',\n 'border',\n 'focusRing',\n 'muted/fg',\n 'accent/fg',\n 'link/fg',\n 'code/bg',\n 'code/fg',\n 'skeleton/from',\n 'skeleton/to',\n 'status/dot',\n 'status/icon',\n] as const\n\n/** @public */\nexport type ColorConfigStateKey = (typeof COLOR_CONFIG_STATE_KEYS)[number]\n\n/** @public */\nexport const COLOR_CONFIG_CARD_KEYS = [\n ...COLOR_CONFIG_STATE_KEYS,\n '_hue',\n 'bg',\n 'fg',\n 'border',\n 'focusRing',\n 'shadow/outline',\n 'shadow/umbra',\n 'shadow/penumbra',\n 'shadow/ambient',\n] as const\n\n/** @public */\nexport type ColorConfigCardKey = (typeof COLOR_CONFIG_CARD_KEYS)[number]\n\n/** @public */\nexport const COLOR_CONFIG_BLEND_KEYS = ['_blend'] as const\n\n/** @public */\nexport type ColorConfigBlendKey = (typeof COLOR_CONFIG_BLEND_KEYS)[number]\n\n/** @public */\nexport type ColorConfigOpacityValue = `0` | `0.${number}` | `1`\n\n/** @public */\nexport type ColorConfigValue =\n | `black`\n | `white`\n | `black/${ColorConfigOpacityValue}`\n | `white/${ColorConfigOpacityValue}`\n // oxlint-disable-next-line no-unnecessary-template-expression\n | `${ColorHueKey}`\n | `${ColorHueKey} ${number}%`\n | `${ColorHueKey}/${ColorTintKey}`\n | `${ColorHueKey}/${ColorTintKey} ${number}%`\n | `${ColorHueKey}/${ColorTintKey}/${ColorConfigOpacityValue}`\n // oxlint-disable-next-line no-unnecessary-template-expression\n | `${ColorTintKey}`\n | `${ColorTintKey} ${number}%`\n | `${ColorTintKey}/${ColorConfigOpacityValue}`\n\n/** @public */\nexport type ThemeColorTokenValue = [ColorConfigValue, ColorConfigValue]\n\n/** @public */\nexport type ColorBlendModeTokenValue = [ThemeColorBlendModeKey, ThemeColorBlendModeKey]\n\n/** @public */\nexport const COLOR_CONFIG_AVATAR_COLORS = ['*', ...THEME_COLOR_AVATAR_COLORS] as const\n\n/** @public */\nexport type ColorConfigAvatarColor = (typeof COLOR_CONFIG_AVATAR_COLORS)[number]\n\n/** @public */\nexport const COLOR_CONFIG_CARD_TONES = ['*', ...THEME_COLOR_CARD_TONES] as const\n\n/** @public */\nexport type ColorConfigCardTone = (typeof COLOR_CONFIG_CARD_TONES)[number]\n\n/** @public */\nexport const COLOR_CONFIG_STATE_TONES = ['*', ...THEME_COLOR_STATE_TONES] as const\n\n/** @public */\nexport type ColorConfigStateTone = (typeof COLOR_CONFIG_STATE_TONES)[number]\n\n/** @public */\nexport const COLOR_CONFIG_STATES = ['*', ...THEME_COLOR_STATES] as const\n\n/** @public */\nexport type ColorConfigState = (typeof COLOR_CONFIG_STATES)[number]\n\n/** @public */\nexport const COLOR_CONFIG_INPUT_MODES = ['*', ...THEME_COLOR_INPUT_MODES] as const\n\n/** @public */\nexport type ColorConfigInputMode = (typeof COLOR_CONFIG_INPUT_MODES)[number]\n\n/** @public */\nexport const COLOR_CONFIG_INPUT_STATES = ['*', ...THEME_COLOR_INPUT_STATES] as const\n\n/** @public */\nexport type ColorConfigInputState = (typeof COLOR_CONFIG_INPUT_STATES)[number]\n","import {\n COLOR_CONFIG_BLEND_KEYS,\n COLOR_CONFIG_CARD_KEYS,\n COLOR_CONFIG_CARD_TONES,\n COLOR_CONFIG_STATE_KEYS,\n COLOR_CONFIG_STATE_TONES,\n ColorConfigBlendKey,\n ColorConfigCardKey,\n ColorConfigCardTone,\n ColorConfigOpacityValue,\n ColorConfigStateKey,\n ColorConfigStateTone,\n ColorConfigValue,\n} from './system'\nimport {parseTokenValue} from './tokens/parseTokenValue'\n\n/** @internal */\nexport function isColorConfigBaseTone(str: string): str is ColorConfigCardTone {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return COLOR_CONFIG_CARD_TONES.includes(str as ColorConfigCardTone)\n}\n\n/** @internal */\nexport function isColorConfigBaseKey(str: string): str is ColorConfigCardKey {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return COLOR_CONFIG_CARD_KEYS.includes(str as ColorConfigCardKey)\n}\n\n/** @internal */\nexport function isColorConfigStateKey(str: string): str is ColorConfigStateKey {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return COLOR_CONFIG_STATE_KEYS.includes(str as ColorConfigStateKey)\n}\n\n/** @internal */\nexport function isColorConfigStateTone(str: string): str is ColorConfigStateTone {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return COLOR_CONFIG_STATE_TONES.includes(str as ColorConfigStateTone)\n}\n\n/** @internal */\nexport function isColorConfigBlendKey(str: string): str is ColorConfigBlendKey {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return COLOR_CONFIG_BLEND_KEYS.includes(str as ColorConfigBlendKey)\n}\n\n/** @internal */\nexport function isColorTokenValue(str: string): str is ColorConfigValue {\n return parseTokenValue(str)?.type === 'color' || parseTokenValue(str)?.type === 'hue'\n}\n\n/** @internal */\nexport function isColorValue(str: string): str is 'black' | 'white' {\n return str === 'black' || str === 'white'\n}\n\n/** @internal */\nexport function isColorOpacityValue(str: string): str is ColorConfigOpacityValue {\n return str === '0' || /^0\\.[0-9]+$/.test(str) || str === '1'\n}\n","import {isColorBlendModeValue, isColorHueKey, isColorTintKey} from '../../system/color/_helpers'\nimport {isColorOpacityValue, isColorValue} from '../helpers'\nimport {TokenValueNode} from './types'\n\nfunction isColorMixPercentValue(str: string): str is `${number}%` {\n return /^\\d+%$/.test(str)\n}\n\n/** @internal */\nexport function parseTokenValue(str: string): TokenValueNode | undefined {\n const segments = str.split('/')\n\n let nextSegment = segments.shift() || ''\n\n const [segment0, segment0mix] = nextSegment.split(' ')\n\n if (isColorTintKey(segment0)) {\n const tint = segment0\n const segment1 = segments.shift() || ''\n\n if (isColorMixPercentValue(segment0mix)) {\n const mix = Number(segment0mix.slice(0, -1)) / 100\n\n return {\n type: 'color',\n tint,\n mix,\n }\n }\n\n if (isColorOpacityValue(segment1)) {\n const opacity = Number(segment1)\n\n return {\n type: 'color',\n tint,\n opacity,\n }\n }\n\n return {\n type: 'color',\n tint,\n }\n }\n\n if (isColorValue(segment0)) {\n // oxlint-disable-next-line no-unnecessary-type-assertion\n const key = segment0 as 'black' | 'white'\n const segment1 = segments.shift() || ''\n\n if (isColorMixPercentValue(segment0mix)) {\n const mix = Number(segment0mix.slice(0, -1)) / 100\n\n return {\n type: 'color',\n key,\n mix,\n }\n }\n\n if (isColorOpacityValue(segment1)) {\n const opacity = Number(segment1)\n\n return {\n type: 'color',\n key,\n opacity,\n }\n }\n\n return {\n type: 'color',\n key,\n }\n }\n\n if (isColorHueKey(segment0)) {\n const hue = segment0\n\n nextSegment = segments.shift() || ''\n\n const [segment1, segment1mix] = nextSegment.split(' ')\n\n if (isColorTintKey(segment1)) {\n const tint = segment1\n const segment2 = segments.shift() || ''\n\n if (isColorMixPercentValue(segment1mix)) {\n const mix = Number(segment1mix.slice(0, -1)) / 100\n\n return {\n type: 'color',\n hue,\n tint,\n mix,\n }\n }\n\n if (isColorOpacityValue(segment2)) {\n const opacity = Number(segment2)\n\n return {\n type: 'color',\n hue,\n tint,\n opacity,\n }\n }\n\n return {\n type: 'color',\n hue,\n tint,\n }\n }\n\n return {\n type: 'hue',\n value: hue,\n }\n }\n\n if (isColorBlendModeValue(segment0)) {\n const value = segment0\n\n return {\n type: 'blendMode',\n value,\n }\n }\n\n return undefined\n}\n","import {TokenColorValueNode} from '../../config/tokens/types'\n\nexport function compileColorTokenValue(node: TokenColorValueNode): string {\n let key = ''\n\n if (node.key === 'black' || node.key === 'white') {\n key = node.key\n } else {\n key = `${node.hue}/${node.tint}`\n }\n\n if (node.mix !== undefined) {\n return `${key} ${node.mix * 100}%`\n }\n\n if (node.opacity !== undefined) {\n key += `/${node.opacity}`\n }\n\n return key\n}\n","import {ThemeColorTokenValue} from '../../config/system'\nimport {parseTokenValue} from '../../config/tokens/parseTokenValue'\nimport {compileColorTokenValue} from './compileColorToken'\nimport {ColorTokenContext} from './types'\n\nconst DEFAULT_COLOR_TOKEN_VALUE: ThemeColorTokenValue = ['500', '500']\n\nexport function resolveColorTokenValue(\n context: ColorTokenContext,\n value: ThemeColorTokenValue = DEFAULT_COLOR_TOKEN_VALUE,\n): string {\n const {hue, scheme} = context\n const node = parseTokenValue(value[scheme === 'light' ? 0 : 1])\n\n if (!node || node.type !== 'color') {\n throw new Error(`Invalid color token: ${value[0]}`)\n }\n\n return compileColorTokenValue({...node, hue: node.hue || hue})\n}\n","import {ThemeColorTokens} from '../config/tokens/color/types'\n\nexport const defaultColorTokens: ThemeColorTokens = {\n base: {\n '*': {\n _blend: ['multiply', 'screen'],\n accent: {\n fg: ['purple/600', 'purple/400'],\n },\n avatar: {\n '*': {\n _blend: ['screen', 'multiply'],\n bg: ['500', '400'],\n fg: ['white', 'black'],\n },\n },\n backdrop: ['gray/200/0.5', 'black/0.5'],\n badge: {\n '*': {\n bg: ['100', '900'],\n fg: ['600', '400'],\n icon: ['500', '500'],\n dot: ['500', '500'],\n },\n 'positive': {\n bg: ['200 50%', '900'],\n fg: ['600', '500'],\n },\n 'caution': {\n bg: ['200 50%', '900'],\n fg: ['600', '500'],\n },\n },\n bg: ['50', '950'],\n border: ['200', '800'],\n code: {\n bg: ['50', '950'],\n fg: ['600', '400'],\n },\n fg: ['800', '200'],\n focusRing: ['blue/500', 'blue/500'],\n icon: ['600', '400'],\n kbd: {\n bg: ['white', 'black'],\n fg: ['600', '400'],\n border: ['200', '800'],\n },\n link: {\n fg: ['blue/600', 'blue/300'],\n },\n muted: {\n bg: ['50', '950'],\n fg: ['700 75%', '300 75%'],\n },\n shadow: {\n outline: ['500/0.3', '500/0.4'],\n umbra: ['gray/500/0.1', 'black/0.2'],\n penumbra: ['gray/500/0.07', 'black/0.14'],\n ambient: ['gray/500/0.06', 'black/0.12'],\n },\n skeleton: {\n from: ['100', '900'],\n to: ['100 50%', '900 50%'],\n },\n },\n 'transparent': {\n bg: ['50', 'black'],\n },\n 'default': {\n bg: ['white', '950'],\n fg: ['800', '200'],\n muted: {\n fg: ['600', '400'],\n },\n },\n 'primary': {_hue: 'blue'},\n 'suggest': {_hue: 'purple'},\n 'positive': {\n _hue: 'green',\n shadow: {outline: ['500/0.4', '500/0.4']},\n },\n 'caution': {\n _hue: 'yellow',\n shadow: {outline: ['600/0.3', '500/0.4']},\n },\n 'critical': {_hue: 'red'},\n },\n button: {\n default: {\n '*': {\n '*': {\n _blend: ['screen', 'multiply'],\n accent: {\n fg: ['purple/300', 'purple/700'],\n },\n avatar: {\n '*': {\n _blend: ['screen', 'multiply'],\n bg: ['500', '400'],\n fg: ['white', 'black'],\n },\n },\n badge: {\n '*': {\n bg: ['900', '100'],\n fg: ['400', '600'],\n dot: ['500', '500'],\n icon: ['500', '500'],\n },\n },\n bg: ['500', '400'],\n border: ['500/0', '400/0'],\n code: {\n bg: ['500 20%', '400 20%'],\n fg: ['200', '600'],\n },\n fg: ['white', 'black'],\n icon: ['100 70%', '900 70%'],\n kbd: {\n bg: ['black', 'white'],\n fg: ['200', '600'],\n border: ['800', '200'],\n },\n link: {\n fg: ['blue/200', 'blue/600'],\n },\n muted: {\n bg: ['950', '50'],\n fg: ['100 70%', '900 70%'],\n },\n skeleton: {\n from: ['900', '100'],\n to: ['900 50%', '100 50%'],\n },\n },\n 'hovered': {\n bg: ['600', '300'],\n border: ['700/0', '300/0'],\n },\n 'pressed': {\n bg: ['700', '300'],\n },\n 'selected': {\n bg: ['700', '300'],\n },\n 'disabled': {\n _hue: 'gray',\n accent: {\n fg: ['100 70%', '900 70%'],\n },\n avatar: {\n '*': {\n _blend: ['screen', 'multiply'],\n bg: ['gray/500', 'gray/400'],\n fg: ['white', 'black'],\n },\n },\n badge: {\n '*': {\n bg: ['gray/700', 'gray/300'],\n fg: ['white', 'black'],\n dot: ['white', 'black'],\n icon: ['white', 'black'],\n },\n },\n bg: ['300', '600'],\n code: {\n bg: ['950', '50'],\n fg: ['300', '600'],\n },\n fg: ['300', '600'],\n muted: {\n bg: ['950', '50'],\n fg: ['300', '600'],\n },\n kbd: {\n bg: ['black', 'white'],\n fg: ['white', 'black'],\n border: ['700', '300'],\n },\n link: {\n fg: ['100 70%', '900 70%'],\n },\n },\n },\n 'default': {\n '*': {\n avatar: {\n '*': {\n _blend: ['screen', 'multiply'],\n bg: ['500', '400'],\n fg: ['white', 'black'],\n },\n },\n bg: ['800', '200'],\n muted: {\n bg: ['950', '50'],\n fg: ['400', '600'],\n },\n },\n 'hovered': {\n bg: ['900', '100'],\n },\n 'pressed': {\n bg: ['black', 'white'],\n },\n 'selected': {\n bg: ['black', 'white'],\n },\n },\n },\n ghost: {\n '*': {\n '*': {\n _blend: ['multiply', 'screen'],\n accent: {\n fg: ['purple/700 60%', 'purple/300 70%'],\n },\n avatar: {\n '*': {\n _blend: ['screen', 'multiply'],\n bg: ['500', '400'],\n fg: ['white', 'black'],\n },\n },\n badge: {\n '*': {\n bg: ['100', '900'],\n fg: ['600', '400'],\n dot: ['500', '500'],\n icon: ['500', '500'],\n },\n },\n bg: ['50', '950'],\n border: ['100', '900'],\n code: {\n bg: ['500 10%', '400 10%'],\n fg: ['700 60%', '400 60%'],\n },\n fg: ['600', '400'],\n icon: ['700 60%', '300 60%'],\n kbd: {\n bg: ['white', 'black'],\n fg: ['600', '400'],\n border: ['200', '800'],\n },\n link: {\n fg: ['blue/700 60%', 'blue/300 60%'],\n },\n muted: {\n bg: ['100', '950'],\n fg: ['700 60%', '300 60%'],\n },\n skeleton: {\n from: ['100', '900'],\n to: ['100 50%', '900 50%'],\n },\n },\n 'hovered': {\n bg: ['100', '900'],\n fg: ['700', '300'],\n },\n 'pressed': {\n bg: ['200', '800'],\n fg: ['800', '200'],\n },\n 'selected': {\n bg: ['200', '800'],\n fg: ['800', '200'],\n },\n 'disabled': {\n _hue: 'gray',\n accent: {\n fg: ['200', '800'],\n },\n avatar: {\n '*': {\n _blend: ['screen', 'multiply'],\n bg: ['gray/100', 'gray/900'],\n fg: ['white', 'black'],\n },\n },\n badge: {\n '*': {\n _hue: 'gray',\n bg: ['50', '950'],\n fg: ['gray/200', 'gray/800'],\n dot: ['gray/200', 'gray/800'],\n icon: ['gray/200', 'gray/800'],\n },\n },\n border: ['100', '900'],\n code: {\n bg: ['50', '950'],\n fg: ['200', '800'],\n },\n fg: ['400', '600'],\n icon: ['300', '700'],\n muted: {\n fg: ['300', '700'],\n },\n kbd: {\n bg: ['white', 'black'],\n fg: ['200', '800'],\n border: ['100', '900'],\n },\n link: {\n fg: ['200', '800'],\n },\n },\n },\n 'positive': {\n '*': {\n border: ['600 20%', '800'],\n },\n },\n 'caution': {\n '*': {\n border: ['600 20%', '800'],\n },\n },\n },\n bleed: {\n '*': {\n '*': {\n _blend: ['multiply', 'screen'],\n accent: {\n fg: ['purple/700 70%', 'purple/300 70%'],\n },\n avatar: {\n '*': {\n _blend: ['screen', 'multiply'],\n bg: ['500', '400'],\n fg: ['white', 'black'],\n },\n },\n badge: {\n '*': {\n bg: ['100', '900'],\n fg: ['600', '400'],\n dot: ['500', '500'],\n icon: ['500', '500'],\n },\n },\n bg: ['white', 'black'],\n border: ['white/0', 'black/0'],\n code: {\n bg: ['50', '950'],\n fg: ['700 75%', '300 75%'],\n },\n fg: ['700', '300'],\n icon: ['700 75%', '300 75%'],\n kbd: {\n bg: ['white', 'black'],\n fg: ['700', '300'],\n border: ['200', '800'],\n },\n link: {\n fg: ['blue/700 70%', 'blue/300 70%'],\n },\n muted: {\n bg: ['100', '950'],\n fg: ['700 75%', '300 75%'],\n },\n skeleton: {\n from: ['100', '900'],\n to: ['100 50%', '900 50%'],\n },\n },\n 'hovered': {\n bg: ['50', '900'],\n fg: ['800', '200'],\n icon: ['800 70%', '300 70%'],\n },\n 'pressed': {\n bg: ['100', '800'],\n fg: ['800', '200'],\n icon: ['800 70%', '200 70%'],\n },\n 'selected': {\n bg: ['100', '900'],\n fg: ['800', '200'],\n icon: ['800 60%', '200 60%'],\n },\n 'disabled': {\n _hue: 'gray',\n accent: {\n fg: ['200', '800'],\n },\n avatar: {\n '*': {\n _blend: ['screen', 'multiply'],\n bg: ['gray/100', 'gray/900'],\n fg: ['white', 'black'],\n },\n },\n badge: {\n '*': {\n _hue: 'gray',\n bg: ['50', '950'],\n fg: ['gray/200', 'gray/800'],\n dot: ['gray/200', 'gray/800'],\n icon: ['gray/200', 'gray/800'],\n },\n },\n code: {\n bg: ['50', '950'],\n fg: ['200', '800'],\n },\n fg: ['400', '600'],\n icon: ['300', '700'],\n muted: {\n fg: ['400', '600'],\n },\n kbd: {\n bg: ['white', 'black'],\n fg: ['200', '800'],\n border: ['100', '900'],\n },\n link: {\n fg: ['200', '800'],\n },\n },\n },\n },\n },\n input: {\n '*': {\n '*': {\n _blend: ['multiply', 'screen'],\n bg: ['white', 'black'],\n border: ['200', '700'],\n fg: ['black', '200'],\n muted: {\n bg: ['50', '950'],\n },\n placeholder: ['400', '600'],\n },\n 'hovered': {\n border: ['300', '700'],\n },\n 'readOnly': {\n bg: ['50', '950'],\n border: ['200', '800'],\n fg: ['800', '200'],\n },\n 'disabled': {\n bg: ['50', '950'],\n fg: ['400', '600'],\n border: ['100', '900'],\n placeholder: ['200', '800 50%'],\n },\n },\n 'invalid': {\n '*': {\n _hue: 'red',\n bg: ['100', '950'],\n },\n },\n },\n selectable: {\n '*': {\n '*': {\n _blend: ['multiply', 'screen'],\n accent: {\n fg: ['purple/700 70%', 'purple/300 70%'],\n },\n avatar: {\n '*': {\n _blend: ['screen', 'multiply'],\n bg: ['500', '400'],\n fg: ['white', 'black'],\n },\n },\n badge: {\n '*': {\n bg: ['100', '900'],\n fg: ['600', '400'],\n dot: ['500', '500'],\n icon: ['500', '500'],\n },\n },\n bg: ['white', 'black'],\n border: ['200', '800'],\n code: {\n bg: ['50', '950'],\n fg: ['600', '400'],\n },\n fg: ['700', '300'],\n icon: ['700 75%', '300 75%'],\n kbd: {\n bg: ['white', 'black'],\n fg: ['600', '400'],\n border: ['200', '800'],\n },\n link: {\n fg: ['blue/700 70%', 'blue/300 70%'],\n },\n muted: {\n bg: ['50', '950'],\n fg: ['700 75%', '300 75%'],\n },\n skeleton: {\n from: ['100', '900'],\n to: ['100 50%', '900 50%'],\n },\n },\n 'hovered': {\n bg: ['50', '950'],\n },\n 'pressed': {\n bg: ['100', '900'],\n },\n 'selected': {\n _blend: ['screen', 'multiply'],\n accent: {\n fg: ['purple/300', 'purple/700'],\n },\n avatar: {\n '*': {\n _blend: ['multiply', 'screen'],\n bg: ['white', 'black'],\n fg: ['black', 'white'],\n },\n },\n badge: {\n '*': {\n bg: ['900', '100'],\n fg: ['400', '600'],\n dot: ['500', '500'],\n icon: ['500', '500'],\n },\n },\n bg: ['500', '400'],\n border: ['500 20%', '400 20%'],\n code: {\n bg: ['500 20%', '400 20%'],\n fg: ['200', '600'],\n },\n fg: ['white', 'black'],\n icon: ['100 70%', '900 70%'],\n kbd: {\n bg: ['black', 'white'],\n fg: ['200', '600'],\n border: ['800', '200'],\n },\n link: {\n fg: ['blue/200', 'blue/600'],\n },\n muted: {\n bg: ['500 10%', '400 10%'],\n fg: ['100 70%', '900 70%'],\n },\n skeleton: {\n from: ['900', '100'],\n to: ['900 50%', '100 50%'],\n },\n },\n 'disabled': {\n _hue: 'gray',\n accent: {\n fg: ['200', '800'],\n },\n avatar: {\n '*': {\n _blend: ['screen', 'multiply'],\n bg: ['gray/100', 'gray/900'],\n fg: ['white', 'black'],\n },\n },\n badge: {\n '*': {\n _hue: 'gray',\n bg: ['50', '950'],\n fg: ['gray/200', 'gray/800'],\n dot: ['gray/200', 'gray/800'],\n icon: ['gray/200', 'gray/800'],\n },\n },\n border: ['100', '900'],\n code: {\n bg: ['50', '950'],\n fg: ['200', '800'],\n },\n fg: ['200', '800'],\n icon: ['200', '800'],\n kbd: {\n bg: ['white', 'black'],\n fg: ['200', '800'],\n border: ['100', '900'],\n },\n link: {\n fg: ['200', '800'],\n },\n muted: {\n bg: ['50 50%', '950 50%'],\n fg: ['200', '800'],\n },\n },\n },\n 'default': {\n selected: {\n _hue: 'blue',\n },\n },\n 'critical': {\n disabled: {\n bg: ['50 50%', '950 50%'],\n },\n },\n },\n syntax: {\n atrule: ['purple/600', 'purple/400'],\n attrName: ['green/600', 'green/400'],\n attrValue: ['yellow/600', 'yellow/400'],\n attribute: ['yellow/600', 'yellow/400'],\n boolean: ['purple/600', 'purple/400'],\n builtin: ['purple/600', 'purple/400'],\n cdata: ['yellow/600', 'yellow/400'],\n char: ['yellow/600', 'yellow/400'],\n class: ['orange/600', 'orange/400'],\n className: ['cyan/600', 'cyan/400'],\n comment: ['gray/400', 'gray/600'],\n constant: ['purple/600', 'purple/400'],\n deleted: ['red/600', 'red/400'],\n entity: ['red/600', 'red/400'],\n function: ['green/600', 'green/400'],\n hexcode: ['blue/600', 'blue/400'],\n id: ['purple/600', 'purple/400'],\n important: ['purple/600', 'purple/400'],\n inserted: ['yellow/600', 'yellow/400'],\n keyword: ['magenta/600', 'magenta/400'],\n number: ['purple/600', 'purple/400'],\n operator: ['magenta/600', 'magenta/400'],\n property: ['blue/600', 'blue/400'],\n pseudoClass: ['yellow/600', 'yellow/400'],\n pseudoElement: ['yellow/600', 'yellow/400'],\n punctuation: ['gray/600', 'gray/400'],\n regex: ['blue/600', 'blue/400'],\n selector: ['red/600', 'red/400'],\n string: ['yellow/600', 'yellow/400'],\n symbol: ['purple/600', 'purple/400'],\n tag: ['red/600', 'red/400'],\n unit: ['orange/600', 'orange/400'],\n url: ['red/600', 'red/400'],\n variable: ['red/600', 'red/400'],\n },\n}\n","export function isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(value && typeof value === 'object' && !Array.isArray(value))\n}\n","import {isRecord} from './lib/isRecord'\n\nexport function merge<T extends Record<string, any>>(...records: (T | undefined)[]): T {\n // oxlint-disable-next-line no-unsafe-type-assertion\n const _records = records.filter(Boolean) as T[]\n\n if (_records.length === 0) {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return {} as T\n }\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n return _records.reduce(_merge, {} as T)\n}\n\nfunction _merge<T extends Record<string, any>>(acc: T, source: T): T {\n for (const key of Object.keys(source)) {\n const prevValue = acc[key]\n const nextValue = source[key]\n\n if (isRecord(prevValue) && isRecord(nextValue)) {\n // oxlint-disable-next-line no-unsafe-type-assertion\n ;(acc as any)[key] = merge(prevValue, nextValue)\n } else {\n // oxlint-disable-next-line no-unsafe-type-assertion\n ;(acc as any)[key] = nextValue\n }\n }\n\n return acc\n}\n","import {COLOR_HUES, ColorHueKey} from '@sanity/color'\n\nimport {\n ColorConfigCardTone,\n ColorConfigInputMode,\n ColorConfigInputState,\n ColorConfigStateTone,\n} from '../config/system'\nimport {\n ThemeColorAvatarTokens,\n ThemeColorBadgeTokens,\n ThemeColorBaseTokens,\n ThemeColorButtonTokens,\n ThemeColorInputStateTokens,\n ThemeColorInputTokens,\n ThemeColorStatesTokens,\n ThemeColorStateTokens,\n ThemeColorTokens,\n} from '../config/tokens/color/types'\nimport {defaultColorTokens} from '../defaults/colorTokens'\nimport {\n THEME_COLOR_BUTTON_MODES,\n THEME_COLOR_CARD_TONES,\n THEME_COLOR_INPUT_MODES,\n THEME_COLOR_INPUT_STATES,\n THEME_COLOR_STATE_TONES,\n THEME_COLOR_STATES,\n} from '../system/color/_constants'\nimport {\n ThemeColorButtonModeKey,\n ThemeColorCardToneKey,\n ThemeColorStateKey,\n ThemeColorStateToneKey,\n} from '../system/color/_system'\nimport {merge} from './merge'\n\n/**\n * Convert a tree of color tokens from a sparse format to a dense format.\n */\nexport function resolveColorTokens(inputTokens?: ThemeColorTokens): ThemeColorTokens {\n const tokens = merge(defaultColorTokens, inputTokens)\n\n return {\n base: resolveBaseColorTokens(tokens),\n button: resolveButtonColorTokens(tokens),\n input: resolveInputColorTokens(tokens),\n selectable: resolveSelectableColorTokens(tokens),\n syntax: tokens.syntax,\n }\n}\n\nfunction resolveBaseColorTokens(sparseTokens: ThemeColorTokens) {\n const tokens: Partial<Record<ColorConfigCardTone, ThemeColorBaseTokens>> = {}\n\n // base tones\n for (const tone of THEME_COLOR_CARD_TONES) {\n tokens[tone] = resolveBaseColorTones(sparseTokens, tone)\n }\n\n return tokens\n}\n\nfunction resolveBaseColorTones(\n inputTokens: ThemeColorTokens,\n tone: ThemeColorCardToneKey,\n): ThemeColorBaseTokens {\n const spec = merge(inputTokens?.base?.['*'], inputTokens?.base?.[tone])\n\n const hue = spec._hue || inputTokens?.base?.[tone]?._hue || 'gray'\n\n return {\n ...spec,\n _hue: hue,\n avatar: COLOR_HUES.reduce((acc, hue) => {\n return {\n // oxlint-disable-next-line no-accumulating-spread\n ...acc,\n [hue]: merge({_hue: hue}, spec.avatar?.['*'], spec.avatar?.[hue]),\n }\n }, {} as ThemeColorAvatarTokens),\n badge: THEME_COLOR_STATE_TONES.reduce((acc, tone) => {\n return {\n // oxlint-disable-next-line no-accumulating-spread\n ...acc,\n [tone]: {\n _hue: inputTokens?.base?.[tone]?._hue || hue,\n ...spec.badge?.['*'],\n ...spec.badge?.[tone],\n },\n }\n }, {} as ThemeColorBadgeTokens),\n }\n}\n\nfunction resolveButtonColorTokens(\n inputTokens: ThemeColorTokens,\n): Partial<Record<ThemeColorButtonModeKey, ThemeColorButtonTokens>> {\n const tokens: Partial<Record<ThemeColorButtonModeKey, ThemeColorButtonTokens>> = {}\n\n for (const mode of THEME_COLOR_BUTTON_MODES) {\n tokens[mode] = resolveButtonToneColorTokens(inputTokens, mode)\n }\n\n return tokens\n}\n\nfunction resolveButtonToneColorTokens(\n inputTokens: ThemeColorTokens,\n mode: ThemeColorButtonModeKey,\n): ThemeColorButtonTokens {\n const tokens: ThemeColorButtonTokens = {}\n\n for (const tone of THEME_COLOR_STATE_TONES) {\n tokens[tone] = resolveButtonModeColorTokens(inputTokens, mode, tone)\n }\n\n return tokens\n}\n\nfunction resolveButtonModeColorTokens(\n inputTokens: ThemeColorTokens,\n mode: ThemeColorButtonModeKey,\n tone: ThemeColorStateToneKey,\n): ThemeColorStatesTokens {\n const tokens: ThemeColorStatesTokens = {}\n\n for (const state of THEME_COLOR_STATES) {\n tokens[state] = resolveButtonStateColorTokens(inputTokens, tone, mode, state)\n }\n\n return tokens\n}\n\nfunction resolveButtonStateColorTokens(\n inputTokens: ThemeColorTokens,\n tone: ThemeColorStateToneKey,\n mode: ThemeColorButtonModeKey,\n state: ThemeColorStateKey,\n): ThemeColorStateTokens {\n const spec = merge(\n inputTokens?.button?.[mode]?.['*']?.['*'],\n inputTokens?.button?.[mode]?.[tone]?.['*'],\n inputTokens?.button?.[mode]?.['*']?.[state],\n inputTokens?.button?.[mode]?.[tone]?.[state],\n )\n\n const hue = spec._hue || inputTokens?.base?.[tone]?._hue\n\n return {\n ...spec,\n _hue: hue,\n avatar: COLOR_HUES.reduce((acc, hue) => {\n return {\n // oxlint-disable-next-line no-accumulating-spread\n ...acc,\n [hue]: merge({_hue: hue}, spec.avatar?.['*'], spec.avatar?.[hue]),\n }\n }, {} as ThemeColorAvatarTokens),\n badge: THEME_COLOR_STATE_TONES.reduce((acc, tone) => {\n return {\n // oxlint-disable-next-line no-accumulating-spread\n ...acc,\n [tone]: {\n _hue: inputTokens?.base?.[tone]?._hue || hue,\n ...spec.badge?.['*'],\n ...spec.badge?.[tone],\n },\n }\n }, {} as ThemeColorBadgeTokens),\n }\n}\n\nfunction resolveInputColorTokens(\n inputTokens: ThemeColorTokens,\n): Partial<Record<ColorConfigInputMode, ThemeColorInputTokens>> {\n const tokens: Partial<Record<ColorConfigInputMode, ThemeColorInputTokens>> = {}\n\n for (const mode of THEME_COLOR_INPUT_MODES) {\n tokens[mode] = resolveInputModeColorTokens(inputTokens, mode)\n }\n\n return tokens\n}\n\nfunction resolveInputModeColorTokens(\n inputTokens: ThemeColorTokens,\n mode: ColorConfigInputMode,\n): ThemeColorInputTokens {\n const states: ThemeColorInputTokens = {}\n\n for (const state of THEME_COLOR_INPUT_STATES) {\n states[state] = resolveInputStateColorTokens(inputTokens, mode, state)\n }\n\n return states\n}\n\nfunction resolveInputStateColorTokens(\n inputTokens: ThemeColorTokens,\n mode: ColorConfigInputMode,\n state: ColorConfigInputState,\n): ThemeColorInputStateTokens {\n const spec = merge(\n inputTokens?.input?.['*']?.['*'],\n inputTokens?.input?.[mode]?.['*'],\n inputTokens?.input?.['*']?.[state],\n inputTokens?.input?.[mode]?.[state],\n )\n\n const hue = spec._hue || inputTokens?.input?.[mode]?._hue\n\n return {...spec, _hue: hue}\n}\n\nfunction resolveSelectableColorTokens(\n inputTokens: ThemeColorTokens,\n): Partial<Record<ColorConfigStateTone, {_hue?: ColorHueKey} & ThemeColorStatesTokens>> {\n const tokens: ThemeColorButtonTokens = {}\n\n for (const tone of THEME_COLOR_STATE_TONES) {\n tokens[tone] = resolveSelectableToneColorTokens(inputTokens, tone)\n }\n\n return tokens\n}\n\nfunction resolveSelectableToneColorTokens(\n inputTokens: ThemeColorTokens,\n tone: ThemeColorStateToneKey,\n): {_hue?: ColorHueKey} & ThemeColorStatesTokens {\n const states: {_hue?: ColorHueKey} & ThemeColorStatesTokens = {\n _hue: inputTokens?.selectable?.[tone]?._hue || inputTokens?.base?.[tone]?._hue,\n }\n\n for (const state of THEME_COLOR_STATES) {\n states[state] = resolveSelectableStateColorTokens(inputTokens, tone, state)\n }\n\n return states\n}\n\nfunction resolveSelectableStateColorTokens(\n inputTokens: ThemeColorTokens,\n tone: ThemeColorStateToneKey,\n state: ThemeColorStateKey,\n) {\n const spec = merge(\n inputTokens?.selectable?.['*']?.['*'],\n inputTokens?.selectable?.[tone]?.['*'],\n inputTokens?.selectable?.['*']?.[state],\n inputTokens?.selectable?.[tone]?.[state],\n )\n\n const hue = spec._hue || inputTokens?.base?.[tone]?._hue\n\n return {\n ...spec,\n _hue: hue,\n avatar: COLOR_HUES.reduce((acc, hue) => {\n return {\n // oxlint-disable-next-line no-accumulating-spread\n ...acc,\n [hue]: merge({_hue: hue}, spec.avatar?.['*'], spec.avatar?.[hue]),\n }\n }, {} as ThemeColorAvatarTokens),\n badge: THEME_COLOR_STATE_TONES.reduce((acc, tone) => {\n return {\n // oxlint-disable-next-line no-accumulating-spread\n ...acc,\n [tone]: {\n _hue: inputTokens?.base?.[tone]?._hue || hue,\n ...spec.badge?.['*'],\n ...spec.badge?.[tone],\n },\n }\n }, {} as ThemeColorBadgeTokens),\n }\n}\n","import {ThemeColorBadgeTokens, ThemeColorStateTokens} from '../config/tokens/color/types'\nimport {ThemeConfig} from '../config/types'\nimport {\n THEME_COLOR_BUTTON_MODES,\n THEME_COLOR_CARD_TONES,\n THEME_COLOR_STATE_TONES,\n THEME_COLOR_STATES,\n} from '../system/color/_constants'\nimport {\n ThemeColorAvatarColorKey,\n ThemeColorButtonModeKey,\n ThemeColorCardToneKey,\n ThemeColorSchemeKey,\n ThemeColorStateKey,\n ThemeColorStateToneKey,\n} from '../system/color/_system'\nimport {ThemeColorAvatar_v2, ThemeColorAvatarHue_v2} from '../system/color/avatar'\nimport {ThemeColorBadge_v2} from '../system/color/badge'\nimport {\n ThemeColorButton_v2,\n ThemeColorButtonMode_v2,\n ThemeColorButtonTone_v2,\n} from '../system/color/button'\nimport {ThemeColorCard_v2, ThemeColorScheme_v2, ThemeColorSchemes_v2} from '../system/color/color'\nimport {\n ThemeColorInput_v2,\n ThemeColorInputMode_v2,\n ThemeColorInputState_v2,\n} from '../system/color/input'\nimport {ThemeColorShadow} from '../system/color/shadow'\nimport {ThemeColorState_v2} from '../system/color/state'\nimport {ThemeColorSyntax} from '../system/color/syntax'\nimport {resolveColorTokenValue as _color} from './colorToken/colorToken'\nimport {ColorTokenContext} from './colorToken/types'\nimport {defineLazyProperty} from './lib/lazy'\nimport {resolveColorTokens} from './resolveColorTokens'\n\nexport function buildColorTheme(config?: ThemeConfig): ThemeColorSchemes_v2 {\n const resolvedConfig: ThemeConfig = {\n ...config,\n color: resolveColorTokens(config?.color),\n }\n\n // Lazy schemes — each scheme's token tree is only built when first accessed\n // oxlint-disable-next-line no-unsafe-type-assertion\n const schemes = {} as ThemeColorSchemes_v2\n\n defineLazyProperty(schemes, 'light', () => buildColorScheme({scheme: 'light'}, resolvedConfig))\n defineLazyProperty(schemes, 'dark', () => buildColorScheme({scheme: 'dark'}, resolvedConfig))\n\n return schemes\n}\n\nfunction buildColorScheme(\n options: {scheme: ThemeColorSchemeKey},\n config: ThemeConfig,\n): ThemeColorScheme_v2 {\n const {scheme} = options\n\n // Lazy tones — each tone's token tree is only built when first accessed\n // oxlint-disable-next-line no-unsafe-type-assertion\n const colorScheme = {} as ThemeColorScheme_v2\n\n for (const tone of THEME_COLOR_CARD_TONES) {\n defineLazyProperty(colorScheme, tone, () => buildCardColorTheme({scheme, tone}, config))\n }\n\n return colorScheme\n}\n\nfunction buildCardColorTheme(\n options: {scheme: ThemeColorSchemeKey; tone: ThemeColorCardToneKey},\n config?: ThemeConfig,\n): ThemeColorCard_v2 {\n const {scheme, tone} = options\n const tokens = config?.color?.base?.[tone]\n const hue = tokens?._hue || 'gray'\n const context: ColorTokenContext = {hue, scheme}\n const blendMode = tokens?._blend || ['multiply', 'screen']\n\n return {\n _blend: blendMode[scheme === 'light' ? 0 : 1],\n _dark: scheme === 'dark',\n accent: {\n fg: _color(context, tokens?.accent?.fg),\n },\n avatar: buildAvatarColorTheme({scheme}, tokens),\n backdrop: _color(context, tokens?.backdrop),\n badge: buildBadgeColorTheme(tokens?.badge, {scheme}, config),\n bg: _color(context, tokens?.bg),\n border: _color(context, tokens?.border),\n button: buildButtonColorTheme({scheme, tone}, config),\n code: {\n bg: _color(context, tokens?.code?.bg),\n fg: _color(context, tokens?.code?.fg),\n },\n fg: _color(context, tokens?.fg),\n focusRing: _color(context, tokens?.focusRing),\n icon: _color(context, tokens?.icon),\n input: buildInputColorTheme({scheme, tone}, config),\n kbd: {\n bg: _color(context, tokens?.kbd?.bg),\n fg: _color(context, tokens?.kbd?.fg),\n border: _color(context, tokens?.kbd?.border),\n },\n link: {\n fg: _color(context, tokens?.link?.fg),\n },\n muted: {\n bg: _color(context, tokens?.muted?.bg),\n fg: _color(context, tokens?.muted?.fg),\n },\n selectable: buildSelectableColorTheme({scheme, tone}, config),\n shadow: buildShadowColorTheme({scheme, tone}, config),\n skeleton: {\n from: _color(context, tokens?.skeleton?.from),\n to: _color(context, tokens?.skeleton?.to),\n },\n syntax: buildSyntaxColorTheme({scheme}, config),\n }\n}\n\nfunction buildShadowColorTheme(\n options: {scheme: ThemeColorSchemeKey; tone: ThemeColorCardToneKey},\n config?: ThemeConfig,\n): ThemeColorShadow {\n const {scheme, tone} = options\n const tokens = config?.color?.base?.[tone]\n const hue = tokens?._hue || 'gray'\n const context: ColorTokenContext = {hue, scheme}\n\n return {\n outline: _color(context, tokens?.shadow?.outline),\n umbra: _color(context, tokens?.shadow?.umbra),\n penumbra: _color(context, tokens?.shadow?.penumbra),\n ambient: _color(context, tokens?.shadow?.ambient),\n }\n}\n\nfunction buildAvatarColorTheme(\n options: {scheme: ThemeColorSchemeKey},\n stateTokens?: ThemeColorStateTokens,\n): ThemeColorAvatar_v2 {\n const {scheme} = options\n\n return {\n gray: _buildAvatarColorTheme({color: 'gray', scheme}, stateTokens),\n blue: _buildAvatarColorTheme({color: 'blue', scheme}, stateTokens),\n purple: _buildAvatarColorTheme({color: 'purple', scheme}, stateTokens),\n magenta: _buildAvatarColorTheme({color: 'magenta', scheme}, stateTokens),\n red: _buildAvatarColorTheme({color: 'red', scheme}, stateTokens),\n orange: _buildAvatarColorTheme({color: 'orange', scheme}, stateTokens),\n yellow: _buildAvatarColorTheme({color: 'yellow', scheme}, stateTokens),\n green: _buildAvatarColorTheme({color: 'green', scheme}, stateTokens),\n cyan: _buildAvatarColorTheme({color: 'cyan', scheme}, stateTokens),\n }\n}\n\nfunction _buildAvatarColorTheme(\n options: {color: ThemeColorAvatarColorKey; scheme: ThemeColorSchemeKey},\n stateTokens?: ThemeColorStateTokens,\n): ThemeColorAvatarHue_v2 {\n const {color, scheme} = options\n const tokens = stateTokens?.avatar?.[color]\n const context: ColorTokenContext = {hue: tokens?._hue || 'gray', scheme}\n const blendMode = tokens?._blend || ['screen', 'multiply']\n\n return {\n _blend: blendMode[scheme === 'light' ? 0 : 1],\n bg: _color(context, tokens?.bg),\n fg: _color(context, tokens?.fg),\n }\n}\n\nfunction buildBadgeColorTheme(\n tokens: ThemeColorBadgeTokens | undefined,\n options: {scheme: ThemeColorSchemeKey},\n config?: ThemeConfig,\n): ThemeColorBadge_v2 {\n const {scheme} = options\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n const colorBadge = {} as ThemeColorBadge_v2\n\n for (const tone of THEME_COLOR_STATE_TONES) {\n colorBadge[tone] = _buildBadgeColorTheme(tokens, {scheme, tone}, config)\n }\n\n return colorBadge\n}\n\nfunction _buildBadgeColorTheme(\n parentTokens: ThemeColorBadgeTokens | undefined,\n options: {scheme: ThemeColorSchemeKey; tone: ThemeColorStateToneKey},\n config?: ThemeConfig,\n): ThemeColorBadge_v2['default'] {\n const {scheme, tone} = options\n const tokens = parentTokens?.[tone]\n const hue = tokens?._hue || config?.color?.base?.[tone]?._hue || 'gray'\n const context: ColorTokenContext = {hue, scheme}\n\n return {\n bg: _color(context, tokens?.bg),\n fg: _color(context, tokens?.fg),\n dot: _color(context, tokens?.dot),\n icon: _color(context, tokens?.icon),\n }\n}\n\nfunction buildButtonColorTheme(\n options: {scheme: ThemeColorSchemeKey; tone: ThemeColorCardToneKey},\n config?: ThemeConfig,\n): ThemeColorButton_v2 {\n const {scheme, tone: cardTone} = options\n\n const modes: Partial<ThemeColorButton_v2> = {}\n\n for (const mode of THEME_COLOR_BUTTON_MODES) {\n modes[mode] = buildButtonTonesColorTheme({cardTone, scheme, mode}, config)\n }\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n return modes as ThemeColorButton_v2\n}\n\nfunction buildButtonTonesColorTheme(\n options: {\n cardTone: ThemeColorCardToneKey\n scheme: ThemeColorSchemeKey\n mode: ThemeColorButtonModeKey\n },\n config?: ThemeConfig,\n): ThemeColorButtonMode_v2 {\n const {cardTone, mode, scheme} = options\n\n const tones: Partial<ThemeColorButtonMode_v2> = {}\n\n for (const tone of THEME_COLOR_STATE_TONES) {\n tones[tone] = buildButtonStatesColorTheme({cardTone, mode, scheme, tone}, config)\n }\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n return tones as ThemeColorButtonMode_v2\n}\n\nfunction buildButtonStatesColorTheme(\n options: {\n cardTone: ThemeColorCardToneKey\n mode: ThemeColorButtonModeKey\n scheme: ThemeColorSchemeKey\n tone: ThemeColorStateToneKey\n },\n config?: ThemeConfig,\n): ThemeColorButtonTone_v2 {\n const {cardTone, mode, scheme, tone} = options\n\n const states: Partial<ThemeColorButtonTone_v2> = {}\n\n for (const state of THEME_COLOR_STATES) {\n states[state] = buildButtonStateColorTheme({cardTone, mode, tone, scheme, state}, config)\n }\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n return states as ThemeColorButtonTone_v2\n}\n\nfunction buildButtonStateColorTheme(\n options: {\n cardTone: ThemeColorCardToneKey\n mode: ThemeColorButtonModeKey\n tone: ThemeColorStateToneKey\n scheme: ThemeColorSchemeKey\n state: ThemeColorStateKey\n },\n config?: ThemeConfig,\n): ThemeColorState_v2 {\n const {cardTone, mode, tone, scheme, state} = options\n const cardTokens = config?.color?.base?.[cardTone]\n const tokens = config?.color?.button?.[mode]?.[tone]?.[state]\n const hue = tokens?._hue || cardTokens?._hue || 'gray'\n const blendMode = tokens?._blend || ['screen', 'multiply']\n const context: ColorTokenContext = {hue, scheme}\n\n return {\n _blend: blendMode[scheme === 'light' ? 0 : 1],\n accent: {\n fg: _color(context, tokens?.accent?.fg),\n },\n avatar: buildAvatarColorTheme({scheme}, tokens),\n badge: buildBadgeColorTheme(tokens?.badge, {scheme}, config),\n bg: _color(context, tokens?.bg),\n border: _color(context, tokens?.border),\n code: {\n bg: _color(context, tokens?.code?.bg),\n fg: _color(context, tokens?.code?.fg),\n },\n fg: _color(context, tokens?.fg),\n icon: _color(context, tokens?.icon),\n muted: {\n bg: _color(context, tokens?.muted?.bg),\n fg: _color(context, tokens?.muted?.fg),\n },\n kbd: {\n bg: _color(context, tokens?.kbd?.bg),\n fg: _color(context, tokens?.kbd?.fg),\n border: _color(context, tokens?.kbd?.border),\n },\n link: {\n fg: _color(context, tokens?.link?.fg),\n },\n skeleton: {\n from: _color(context, tokens?.skeleton?.from),\n to: _color(context, tokens?.skeleton?.to),\n },\n }\n}\n\nfunction buildInputColorTheme(\n options: {scheme: ThemeColorSchemeKey; tone: ThemeColorCardToneKey},\n config?: ThemeConfig,\n): ThemeColorInput_v2 {\n const {scheme, tone} = options\n\n return {\n default: buildInputStatesColorTheme({mode: 'default', scheme, tone}, config),\n invalid: buildInputStatesColorTheme({mode: 'invalid', scheme, tone}, config),\n }\n}\n\nfunction buildInputStatesColorTheme(\n options: {\n mode: 'default' | 'invalid'\n scheme: ThemeColorSchemeKey\n tone: ThemeColorCardToneKey\n },\n config?: ThemeConfig,\n): ThemeColorInputMode_v2 {\n const {mode, scheme, tone} = options\n\n return {\n enabled: buildInputStateColorTheme({mode, scheme, state: 'enabled', cardTone: tone}, config),\n hovered: buildInputStateColorTheme({mode, scheme, state: 'hovered', cardTone: tone}, config),\n readOnly: buildInputStateColorTheme({mode, scheme, state: 'readOnly', cardTone: tone}, config),\n disabled: buildInputStateColorTheme({mode, scheme, state: 'disabled', cardTone: tone}, config),\n }\n}\n\nfunction buildInputStateColorTheme(\n options: {\n cardTone: ThemeColorCardToneKey\n mode: 'default' | 'invalid'\n scheme: ThemeColorSchemeKey\n state: 'enabled' | 'hovered' | 'readOnly' | 'disabled'\n },\n config?: ThemeConfig,\n): ThemeColorInputState_v2 {\n const {cardTone, mode, scheme, state} = options\n const cardTokens = config?.color?.base?.[cardTone]\n const tokens = config?.color?.input?.[mode]?.[state]\n const hue = tokens?._hue || cardTokens?._hue || 'gray'\n const blendMode = tokens?._blend || ['screen', 'multiply']\n const context: ColorTokenContext = {hue, scheme}\n\n return {\n _blend: blendMode[scheme === 'light' ? 0 : 1],\n bg: _color(context, tokens?.bg),\n border: _color(context, tokens?.border),\n fg: _color(context, tokens?.fg),\n muted: {\n bg: _color(context, tokens?.muted?.bg),\n },\n placeholder: _color(context, tokens?.placeholder),\n }\n}\n\nfunction buildSelectableColorTheme(\n options: {\n scheme: ThemeColorSchemeKey\n tone: ThemeColorCardToneKey\n },\n config?: ThemeConfig,\n): ThemeColorButtonMode_v2 {\n const {scheme, tone: cardTone} = options\n\n const tones: Partial<ThemeColorButtonMode_v2> = {}\n\n for (const tone of THEME_COLOR_STATE_TONES) {\n tones[tone] = buildSelectableStatesColorTheme({cardTone, scheme, tone}, config)\n }\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n return tones as ThemeColorButtonMode_v2\n}\n\nfunction buildSelectableStatesColorTheme(\n options: {\n cardTone: ThemeColorCardToneKey\n scheme: ThemeColorSchemeKey\n tone: ThemeColorStateToneKey\n },\n config?: ThemeConfig,\n): ThemeColorButtonTone_v2 {\n const {cardTone, scheme, tone} = options\n\n const states: Partial<ThemeColorButtonTone_v2> = {}\n\n for (const state of THEME_COLOR_STATES) {\n states[state] = buildSelectableStateColorTheme({cardTone, tone, scheme, state}, config)\n }\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n return states as ThemeColorButtonTone_v2\n}\n\nfunction buildSelectableStateColorTheme(\n options: {\n cardTone: ThemeColorCardToneKey\n scheme: ThemeColorSchemeKey\n state: ThemeColorStateKey\n tone: ThemeColorStateToneKey\n },\n config?: ThemeConfig,\n): ThemeColorState_v2 {\n const {cardTone, scheme, state, tone} = options\n const cardTokens = config?.color?.base?.[cardTone]\n const tokens = config?.color?.selectable?.[tone]?.[state]\n\n const hue = tokens?._hue || cardTokens?._hue || 'gray'\n const blendMode = tokens?._blend || ['screen', 'multiply']\n const context: ColorTokenContext = {hue, scheme}\n\n return {\n _blend: blendMode[scheme === 'light' ? 0 : 1],\n accent: {\n fg: _color(context, tokens?.accent?.fg),\n },\n avatar: buildAvatarColorTheme({scheme}, tokens),\n badge: buildBadgeColorTheme(tokens?.badge, {scheme}, config),\n bg: _color(context, tokens?.bg),\n border: _color(context, tokens?.border),\n code: {\n bg: _color(context, tokens?.code?.bg),\n fg: _color(context, tokens?.code?.fg),\n },\n fg: _color(context, tokens?.fg),\n icon: _color(context, tokens?.icon),\n muted: {\n bg: _color(context, tokens?.muted?.bg),\n fg: _color(context, tokens?.muted?.fg),\n },\n kbd: {\n bg: _color(context, tokens?.kbd?.bg),\n fg: _color(context, tokens?.kbd?.fg),\n border: _color(context, tokens?.kbd?.border),\n },\n link: {\n fg: _color(context, tokens?.link?.fg),\n },\n skeleton: {\n from: _color(context, tokens?.skeleton?.from),\n to: _color(context, tokens?.skeleton?.to),\n },\n }\n}\n\nfunction buildSyntaxColorTheme(\n options: {scheme: ThemeColorSchemeKey},\n config?: ThemeConfig,\n): ThemeColorSyntax {\n const {scheme} = options\n const tokens = config?.color?.syntax\n const context: ColorTokenContext = {hue: 'gray', scheme}\n\n return {\n atrule: _color(context, tokens?.atrule),\n attrName: _color(context, tokens?.attrName),\n attrValue: _color(context, tokens?.attrValue),\n attribute: _color(context, tokens?.attribute),\n boolean: _color(context, tokens?.boolean),\n builtin: _color(context, tokens?.builtin),\n cdata: _color(context, tokens?.cdata),\n char: _color(context, tokens?.char),\n class: _color(context, tokens?.class),\n className: _color(context, tokens?.className),\n comment: _color(context, tokens?.comment),\n constant: _color(context, tokens?.constant),\n deleted: _color(context, tokens?.deleted),\n doctype: _color(context, tokens?.doctype),\n entity: _color(context, tokens?.entity),\n function: _color(context, tokens?.function),\n hexcode: _color(context, tokens?.hexcode),\n id: _color(context, tokens?.id),\n important: _color(context, tokens?.important),\n inserted: _color(context, tokens?.inserted),\n keyword: _color(context, tokens?.keyword),\n number: _color(context, tokens?.number),\n operator: _color(context, tokens?.operator),\n prolog: _color(context, tokens?.prolog),\n property: _color(context, tokens?.property),\n pseudoClass: _color(context, tokens?.pseudoClass),\n pseudoElement: _color(context, tokens?.pseudoElement),\n punctuation: _color(context, tokens?.punctuation),\n regex: _color(context, tokens?.regex),\n selector: _color(context, tokens?.selector),\n string: _color(context, tokens?.string),\n symbol: _color(context, tokens?.symbol),\n tag: _color(context, tokens?.tag),\n unit: _color(context, tokens?.unit),\n url: _color(context, tokens?.url),\n variable: _color(context, tokens?.variable),\n }\n}\n","import {color} from '@sanity/color'\n\nimport {ThemeColorPalette} from '../config/types'\n\nexport const defaultColorPalette: ThemeColorPalette = color\n","import {RGB, RGBA} from '../types'\n\nfunction mixChannel(b: number, s: number, weight: number) {\n const diff = s - b\n\n const delta = diff * weight\n\n return b + delta\n}\n\n/**\n * Apply the \\`mix\\` blend mode\n * @internal\n */\nexport function mix(b: RGB | RGBA, s: RGB | RGBA, weight: number): RGB {\n return {\n r: mixChannel(b.r, s.r, weight),\n g: mixChannel(b.g, s.g, weight),\n b: mixChannel(b.b, s.b, weight),\n }\n}\n","function lerp(x: number, y: number, a: number): number {\n return x * (1 - a) + y * a\n}\n\nfunction invlerp(x: number, y: number, a: number): number {\n return clamp((a - x) / (y - x))\n}\n\nexport function clamp(a: number, min = 0, max = 1): number {\n return Math.min(max, Math.max(min, a))\n}\n\nexport function range(x1: number, y1: number, x2: number, y2: number, a: number): number {\n return lerp(x2, y2, invlerp(x1, y1, a))\n}\n\nexport function round(value: number): number {\n return Math.round(value)\n}\n","import {clamp, round} from '../utils'\nimport {HSL, RGB, RGBA} from './types'\n\n/**\n * @internal\n */\nexport function hexToRgb(hex: string): RGB {\n if (hex.length === 4) {\n const hexR = hex.slice(1, 2)\n const hexG = hex.slice(2, 3)\n const hexB = hex.slice(3, 4)\n\n return {\n r: parseInt(hexR + hexR, 16),\n g: parseInt(hexG + hexG, 16),\n b: parseInt(hexB + hexB, 16),\n }\n }\n\n return {\n r: parseInt(hex.slice(1, 3), 16),\n g: parseInt(hex.slice(3, 5), 16),\n b: parseInt(hex.slice(5, 7), 16),\n }\n}\n\n/**\n * @internal\n */\nexport function rgbaToRGBA(rgba: string): RGBA {\n const values = rgba.replace(/rgba\\(|\\)/g, '').split(',')\n\n return {\n r: parseInt(values[0]),\n g: parseInt(values[1]),\n b: parseInt(values[2]),\n a: parseFloat(values[3]),\n }\n}\n\n/**\n * @internal\n */\nexport function rgbToHex(color: RGB | RGBA): string {\n const r = round(clamp(Math.round(color.r), 0, 255))\n const g = round(clamp(Math.round(color.g), 0, 255))\n const b = round(clamp(Math.round(color.b), 0, 255))\n\n if ('a' in color) {\n return `rgba(${r},${g},${b},${color.a})`\n }\n\n return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)\n}\n\n/**\n * @internal\n * @see https://css-tricks.com/converting-color-spaces-in-javascript/\n */\nexport function rgbToHsl({r, g, b}: RGB): HSL {\n // Make r, g, and b fractions of 1\n r /= 255\n g /= 255\n b /= 255\n\n // Find greatest and smallest channel values\n const cmin = Math.min(r, g, b)\n const cmax = Math.max(r, g, b)\n const delta = cmax - cmin\n\n let h = 0\n let s = 0\n let l = 0\n\n // Calculate hue\n // No difference\n if (delta == 0) h = 0\n // Red is max\n else if (cmax == r) h = ((g - b) / delta) % 6\n // Green is max\n else if (cmax == g) h = (b - r) / delta + 2\n // Blue is max\n else h = (r - g) / delta + 4\n\n h = Math.round(h * 60)\n\n // Make negative hues positive behind 360°\n if (h < 0) h += 360\n\n // Calculate lightness\n l = (cmax + cmin) / 2\n\n // Calculate saturation\n s = delta == 0 ? 0 : delta / (1 - Math.abs(2 * l - 1))\n\n // Multiply l and s by 100\n s = +(s * 100).toFixed(1)\n l = +(l * 100).toFixed(1)\n\n return {h, s, l}\n}\n\n/**\n * @internal\n */\nexport function hslToRgb(hsl: HSL): RGB {\n // Must be fractions of 1\n const s = hsl.s / 100\n const l = hsl.l / 100\n\n const c = (1 - Math.abs(2 * l - 1)) * s\n const x = c * (1 - Math.abs(((hsl.h / 60) % 2) - 1))\n const m = l - c / 2\n\n let r = 0\n let g = 0\n let b = 0\n\n if (0 <= hsl.h && hsl.h < 60) {\n r = c\n g = x\n b = 0\n } else if (60 <= hsl.h && hsl.h < 120) {\n r = x\n g = c\n b = 0\n } else if (120 <= hsl.h && hsl.h < 180) {\n r = 0\n g = c\n b = x\n } else if (180 <= hsl.h && hsl.h < 240) {\n r = 0\n g = x\n b = c\n } else if (240 <= hsl.h && hsl.h < 300) {\n r = x\n g = 0\n b = c\n } else if (300 <= hsl.h && hsl.h < 360) {\n r = c\n g = 0\n b = x\n }\n\n return {\n r: Math.round((r + m) * 255),\n g: Math.round((g + m) * 255),\n b: Math.round((b + m) * 255),\n }\n}\n","import {hexToRgb, hslToRgb, rgbaToRGBA} from './convert'\nimport {HSL, RGB, RGBA} from './types'\n\nconst HEX_CHARS = '0123456789ABCDEFabcdef'\n\nconst HSL_RE = /hsl\\(\\s*(\\d+)\\s*,\\s*((\\d+(?:\\.\\d+)?)%)\\s*,\\s*((\\d+(?:\\.\\d+)?)%)\\s*\\)/i\n\nfunction isHexChars(str: string) {\n for (const c of str) {\n if (HEX_CHARS.indexOf(c) === -1) {\n return false\n }\n }\n\n return true\n}\n\nfunction isHex(str: string) {\n if (str[0] !== '#') return false\n\n // Accept both #000 and #000000\n if (!(str.length === 4 || str.length === 7)) return false\n\n return isHexChars(str.slice(1))\n}\n\nfunction parseHsl(str: string): HSL {\n const res = HSL_RE.exec(str)\n\n if (!res) {\n throw new Error(`parseHsl: string is not a HSL color: \"${str}\"`)\n }\n\n return {h: parseInt(res[1]), s: parseFloat(res[3]), l: parseFloat(res[5])}\n}\n\n/**\n * @internal\n */\nexport function parseColor(color: unknown): RGB | RGBA {\n if (!color) return {r: 0, g: 0, b: 0}\n\n if (typeof color !== 'string') {\n throw new Error('parseColor: expected a string')\n }\n\n if (isHex(color)) {\n return hexToRgb(color)\n }\n\n if (color.startsWith('hsl(')) {\n return hslToRgb(parseHsl(color))\n }\n\n if (color.startsWith('rgba(')) {\n return rgbaToRGBA(color)\n }\n\n throw new Error(`parseColor: unexpected color format: \"${color}\"`)\n}\n","import {parseColor} from './parse'\n\n/**\n * @internal\n */\nexport function rgba(color: unknown, a: number): string {\n const rgb = parseColor(color)\n\n return `rgba(${rgb.r},${rgb.g},${rgb.b},${a})`\n}\n","import {RGB, RGBA} from '../types'\n\nfunction multiplyChannel(b: number, s: number) {\n return b * s\n}\n\n/**\n * Apply the \\`multiply\\` blend mode\n * Source: https://www.w3.org/TR/compositing-1/#blendingmultiply\n * @internal\n */\nexport function multiply(b: RGB | RGBA, s: RGB | RGBA): RGB {\n return {\n r: multiplyChannel(b.r / 255, s.r / 255) * 255,\n g: multiplyChannel(b.g / 255, s.g / 255) * 255,\n b: multiplyChannel(b.b / 255, s.b / 255) * 255,\n }\n}\n","import {RGB, RGBA} from '../types'\n\nfunction screenChannel(b: number, s: number) {\n return b + s - b * s\n}\n\n/**\n * Apply the \\`screen\\` blend mode\n * Source: https://www.w3.org/TR/compositing-1/#blendingscreen\n * @internal\n */\nexport function screen(b: RGB | RGBA, s: RGB | RGBA): RGB {\n return {\n r: screenChannel(b.r / 255, s.r / 255) * 255,\n g: screenChannel(b.g / 255, s.g / 255) * 255,\n b: screenChannel(b.b / 255, s.b / 255) * 255,\n }\n}\n","import {multiply} from './lib/color-fns/blend/multiply'\nimport {screen} from './lib/color-fns/blend/screen'\nimport {rgbToHex} from './lib/color-fns/convert'\nimport {parseColor} from './lib/color-fns/parse'\nimport {RGB} from './lib/color-fns/types'\nimport {clamp, range} from './lib/utils'\n\nconst RGB_RANGE: [number, number] = [0, 255]\n\nexport function mixThemeColor(\n value: string,\n options: {\n bg?: string\n blendMode: 'multiply' | 'screen'\n black: string\n white: string\n },\n): string {\n const {blendMode} = options\n\n const color = parseColor(value)\n const black = parseColor(options.black)\n const white = parseColor(options.white)\n\n const bg = options.bg ? parseColor(options.bg) : blendMode === 'multiply' ? white : black\n\n const paletteRange: {r: [number, number]; g: [number, number]; b: [number, number]} = {\n r: [black.r, white.r],\n g: [black.g, white.g],\n b: [black.b, white.b],\n }\n\n const convertedBgColor: RGB = {\n r: clamp(range(...paletteRange.r, ...RGB_RANGE, bg.r), ...RGB_RANGE),\n g: clamp(range(...paletteRange.g, ...RGB_RANGE, bg.g), ...RGB_RANGE),\n b: clamp(range(...paletteRange.b, ...RGB_RANGE, bg.b), ...RGB_RANGE),\n }\n\n const convertedColor: RGB = {\n r: clamp(range(...paletteRange.r, ...RGB_RANGE, color.r), ...RGB_RANGE),\n g: clamp(range(...paletteRange.g, ...RGB_RANGE, color.g), ...RGB_RANGE),\n b: clamp(range(...paletteRange.b, ...RGB_RANGE, color.b), ...RGB_RANGE),\n }\n\n const resultColor =\n blendMode === 'multiply'\n ? multiply(convertedBgColor, convertedColor)\n : screen(convertedBgColor, convertedColor)\n\n const v: RGB = {\n r: clamp(range(...RGB_RANGE, ...paletteRange.r, resultColor.r), ...paletteRange.r),\n g: clamp(range(...RGB_RANGE, ...paletteRange.g, resultColor.g), ...paletteRange.g),\n b: clamp(range(...RGB_RANGE, ...paletteRange.b, resultColor.b), ...paletteRange.b),\n }\n\n return rgbToHex(v)\n}\n","import {ColorTint as ColorPaletteValue} from '@sanity/color'\n\nimport {parseTokenValue} from '../config/tokens/parseTokenValue'\nimport {ThemeColorPalette} from '../config/types'\nimport {ThemeColorBlendModeKey} from '../system/color/_system'\nimport {mix} from './lib/color-fns/blend/mix'\nimport {hexToRgb, rgbToHex} from './lib/color-fns/convert'\nimport {rgba} from './lib/color-fns/rgba'\nimport {mixThemeColor} from './mixThemeColor'\n\nexport interface RenderColorValueOptions {\n bg?: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n}\n\nexport function renderColorValue(str: string, options: RenderColorValueOptions): string {\n const {bg, blendMode, colorPalette} = options\n\n if (bg === 'white') {\n throw new Error('Cannot blend with white background')\n }\n\n const node = parseTokenValue(str)\n\n if (!node || node.type !== 'color') {\n throw new Error(`Invalid color token value: ${str}`)\n }\n\n let hex = ''\n\n if (node.key === 'black') {\n hex = renderColorHex(colorPalette.black)\n }\n\n if (node.key === 'white') {\n hex = renderColorHex(colorPalette.white)\n }\n\n if (node.hue && node.tint) {\n hex = renderColorHex(colorPalette[node.hue][node.tint])\n }\n\n if (!hex) {\n throw new Error(`Invalid color token value: ${str}`)\n }\n\n const hexBeforeMix = hex\n\n const mixOptions = {\n blendMode,\n bg,\n black: renderColorHex(colorPalette.black),\n // opacity: node.opacity,\n white: renderColorHex(colorPalette.white),\n }\n\n try {\n hex = mixThemeColor(hex, mixOptions)\n\n if (bg && node.mix !== undefined) {\n const from = hexToRgb(bg)\n const to = hexToRgb(hex)\n\n hex = rgbToHex(mix(from, to, node.mix))\n }\n } catch (err) {\n console.warn('could not blend', hex, mixOptions)\n throw err\n }\n\n if (hex === '#aN') {\n console.warn(`invalid color token value: ${str}`)\n hex = hexBeforeMix\n }\n\n if (node.opacity !== undefined) {\n hex = rgba(hex, node.opacity)\n }\n\n return hex\n}\n\nfunction renderColorHex(color: string | ColorPaletteValue) {\n return typeof color === 'string' ? color : color.hex\n}\n","import {COLOR_HUES} from '@sanity/color'\n\nimport {ThemeColorPalette, ThemeConfig} from '../config/types'\nimport {defaultColorPalette} from '../defaults/colorPalette'\nimport {THEME_COLOR_CARD_TONES, THEME_COLOR_STATE_TONES} from '../system/color/_constants'\nimport {ThemeColorBlendModeKey} from '../system/color/_system'\nimport {ThemeColorAvatar_v2} from '../system/color/avatar'\nimport {ThemeColorBadge_v2, ThemeColorBadgeTone_v2} from '../system/color/badge'\nimport {\n ThemeColorButton_v2,\n ThemeColorButtonMode_v2,\n ThemeColorButtonTone_v2,\n} from '../system/color/button'\nimport {ThemeColorCard_v2, ThemeColorScheme_v2, ThemeColorSchemes_v2} from '../system/color/color'\nimport {\n ThemeColorInput_v2,\n ThemeColorInputMode_v2,\n ThemeColorInputState_v2,\n} from '../system/color/input'\nimport {ThemeColorKBD} from '../system/color/kbd'\nimport {ThemeColorSelectable_v2, ThemeColorSelectableTone_v2} from '../system/color/selectable'\nimport {ThemeColorShadow} from '../system/color/shadow'\nimport {ThemeColorState_v2} from '../system/color/state'\nimport {ThemeColorSyntax} from '../system/color/syntax'\nimport {defineLazyProperty} from './lib/lazy'\nimport {renderColorValue, RenderColorValueOptions} from './renderColorValue'\n\nexport function renderThemeColorSchemes(\n value: ThemeColorSchemes_v2,\n config?: ThemeConfig,\n): ThemeColorSchemes_v2 {\n const colorPalette = config?.palette ?? defaultColorPalette\n\n // Lazy schemes — each scheme is only rendered when first accessed\n // oxlint-disable-next-line no-unsafe-type-assertion\n const schemes = {} as ThemeColorSchemes_v2\n defineLazyProperty(schemes, 'light', () => renderThemeColorScheme(colorPalette, value.light))\n defineLazyProperty(schemes, 'dark', () => renderThemeColorScheme(colorPalette, value.dark))\n\n return schemes\n}\n\nfunction renderThemeColorScheme(\n colorPalette: ThemeColorPalette,\n value: ThemeColorScheme_v2,\n): ThemeColorScheme_v2 {\n // The `default` tone must be rendered eagerly — other tones depend on its `bg`.\n const renderedDefaultTone = renderThemeColor(value.default, {colorPalette})\n\n const bg = renderedDefaultTone.bg\n\n if (bg === 'white') {\n throw new Error('Cannot blend with white background')\n }\n\n // All other tones are lazy. `transparent` and `default` are rendered without\n // a `bg` option; the rest blend on top of `default`'s `bg`.\n // We iterate THEME_COLOR_CARD_TONES (not Object.entries) to avoid\n // force-evaluating lazy getters from the build phase.\n // oxlint-disable-next-line no-unsafe-type-assertion\n const scheme = {default: renderedDefaultTone} as ThemeColorScheme_v2\n\n for (const tone of THEME_COLOR_CARD_TONES) {\n if (tone === 'default') continue\n const opts = tone === 'transparent' ? {colorPalette} : {bg, colorPalette}\n defineLazyProperty(scheme, tone, () => renderThemeColor(value[tone], opts))\n }\n\n return scheme\n}\n\nfunction renderThemeColor(\n value: ThemeColorCard_v2,\n options: {\n bg?: string\n colorPalette: ThemeColorPalette\n },\n): ThemeColorCard_v2 {\n const {colorPalette, bg} = options\n const blendMode = value._blend || 'multiply'\n const baseBg = renderColorValue(value.bg, {colorPalette, bg, blendMode})\n const colorOptions: RenderColorValueOptions = {colorPalette, bg: baseBg, blendMode}\n\n const button = renderThemeColorButton(value.button, {\n baseBg,\n blendMode,\n colorPalette,\n })\n\n const selectable = renderThemeColorSelectable(value.selectable, {\n colorPalette,\n baseBg,\n blendMode,\n })\n\n const shadow: ThemeColorShadow = {\n outline: renderColorValue(value.shadow.outline, colorOptions),\n umbra: renderColorValue(value.shadow.umbra, {\n ...colorOptions,\n bg: undefined,\n colorPalette: {...colorPalette, black: '#000000'},\n }),\n penumbra: renderColorValue(value.shadow.penumbra, {\n ...colorOptions,\n bg: undefined,\n colorPalette: {...colorPalette, black: '#000000'},\n }),\n ambient: renderColorValue(value.shadow.ambient, {\n ...colorOptions,\n bg: undefined,\n colorPalette: {...colorPalette, black: '#000000'},\n }),\n }\n\n return {\n _blend: blendMode,\n _dark: value._dark,\n accent: {\n fg: renderColorValue(value.accent.fg, colorOptions),\n },\n avatar: renderThemeColorAvatar(value.avatar, {baseBg, colorPalette, blendMode}),\n backdrop: renderColorValue(value.backdrop, colorOptions),\n badge: renderThemeColorBadge(value.badge, {baseBg, colorPalette, blendMode}),\n bg: baseBg,\n border: renderColorValue(value.border, colorOptions),\n button,\n code: {\n bg: renderColorValue(value.code.bg, colorOptions),\n fg: renderColorValue(value.code.fg, colorOptions),\n },\n fg: renderColorValue(value.fg, colorOptions),\n focusRing: renderColorValue(value.focusRing, colorOptions),\n icon: renderColorValue(value.icon, colorOptions),\n input: renderThemeColorInput(value.input, {baseBg, colorPalette, blendMode}),\n kbd: renderThemeColorKBD(value.kbd, {baseBg, colorPalette, blendMode}),\n link: {\n fg: renderColorValue(value.link.fg, colorOptions),\n },\n muted: {\n bg: renderColorValue(value.muted.bg, colorOptions),\n fg: renderColorValue(value.muted.fg, colorOptions),\n },\n shadow,\n skeleton: {\n from: renderColorValue(value.skeleton.from, colorOptions),\n to: renderColorValue(value.skeleton.to, colorOptions),\n },\n syntax: renderSyntaxColorTheme(value.syntax, {baseBg, colorPalette, blendMode}),\n selectable,\n }\n}\n\nfunction renderThemeColorKBD(\n value: ThemeColorKBD,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorKBD {\n const {baseBg, blendMode, colorPalette} = options\n\n const rootOptions: RenderColorValueOptions = {\n bg: baseBg,\n blendMode,\n colorPalette,\n }\n\n const bg = renderColorValue(value.bg, rootOptions)\n\n const colorOptions: RenderColorValueOptions = {\n bg,\n blendMode,\n colorPalette,\n }\n\n return {\n bg,\n fg: renderColorValue(value.fg, colorOptions),\n border: renderColorValue(value.border, colorOptions),\n }\n}\n\nfunction renderThemeColorAvatar(\n value: ThemeColorAvatar_v2,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorAvatar_v2 {\n // oxlint-disable-next-line no-unsafe-type-assertion\n const colorAvatar = {} as ThemeColorAvatar_v2\n\n for (const hue of COLOR_HUES) {\n colorAvatar[hue] = renderThemeColorAvatarColor(value[hue], options)\n }\n\n return colorAvatar\n}\n\nfunction renderThemeColorAvatarColor(\n value: ThemeColorAvatar_v2['gray'],\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorAvatar_v2['gray'] {\n const {baseBg, blendMode: rootBlendMode, colorPalette} = options\n const blendMode = value._blend || 'multiply'\n\n const rootOptions: RenderColorValueOptions = {\n bg: baseBg,\n blendMode: rootBlendMode,\n colorPalette,\n }\n\n const bg = renderColorValue(value.bg, rootOptions)\n\n const colorOptions: RenderColorValueOptions = {\n bg,\n blendMode,\n colorPalette,\n }\n\n return {\n _blend: blendMode,\n bg,\n fg: renderColorValue(value.fg, colorOptions),\n }\n}\n\nfunction renderThemeColorBadge(\n value: ThemeColorBadge_v2,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorBadge_v2 {\n // oxlint-disable-next-line no-unsafe-type-assertion\n const colorBadge = {} as ThemeColorBadge_v2\n\n for (const tone of THEME_COLOR_STATE_TONES) {\n colorBadge[tone] = renderThemeColorBadgeColor(value[tone], options)\n }\n\n return colorBadge\n}\n\nfunction renderThemeColorBadgeColor(\n value: ThemeColorBadgeTone_v2,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorBadgeTone_v2 {\n const {baseBg, blendMode: rootBlendMode, colorPalette} = options\n\n const blendMode = rootBlendMode\n\n const rootOptions: RenderColorValueOptions = {\n bg: baseBg,\n blendMode: rootBlendMode,\n colorPalette,\n }\n\n const bg = renderColorValue(value.bg, rootOptions)\n\n const colorOptions: RenderColorValueOptions = {\n bg,\n blendMode,\n colorPalette,\n }\n\n return {\n bg,\n dot: renderColorValue(value.dot, colorOptions),\n fg: renderColorValue(value.fg, colorOptions),\n icon: renderColorValue(value.icon, colorOptions),\n }\n}\n\nfunction renderThemeColorButton(\n value: ThemeColorButton_v2,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorButton_v2 {\n return {\n default: renderThemeColorButtonTones(value.default, options),\n ghost: renderThemeColorButtonTones(value.ghost, options),\n bleed: renderThemeColorButtonTones(value.bleed, options),\n }\n}\n\nfunction renderThemeColorButtonTones(\n value: ThemeColorButtonMode_v2,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorButtonMode_v2 {\n // oxlint-disable-next-line no-unsafe-type-assertion\n const colorButtonMode = {} as ThemeColorButtonMode_v2\n\n for (const tone of THEME_COLOR_STATE_TONES) {\n colorButtonMode[tone] = renderThemeColorButtonStates(value[tone], options)\n }\n\n return colorButtonMode\n}\n\nfunction renderThemeColorButtonStates(\n value: ThemeColorButtonTone_v2,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorButtonTone_v2 {\n return {\n enabled: renderThemeColorState(value.enabled, options),\n hovered: renderThemeColorState(value.hovered, options),\n pressed: renderThemeColorState(value.pressed, options),\n selected: renderThemeColorState(value.selected, options),\n disabled: renderThemeColorState(value.disabled, options),\n }\n}\n\nfunction renderThemeColorState(\n value: ThemeColorState_v2,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorState_v2 {\n const {baseBg, blendMode: rootBlendMode, colorPalette} = options\n const blendMode = value._blend || 'multiply'\n\n const rootOptions: RenderColorValueOptions = {\n bg: baseBg,\n blendMode: rootBlendMode,\n colorPalette,\n }\n\n const bg = renderColorValue(value.bg, rootOptions)\n\n const colorOptions: RenderColorValueOptions = {\n bg,\n blendMode,\n colorPalette,\n }\n\n return {\n _blend: blendMode,\n accent: {\n fg: renderColorValue(value.accent.fg, colorOptions),\n },\n avatar: renderThemeColorAvatar(value.avatar, {baseBg: bg, colorPalette, blendMode}),\n badge: renderThemeColorBadge(value.badge, {baseBg: bg, colorPalette, blendMode}),\n bg,\n border: renderColorValue(value.border, colorOptions),\n code: {\n bg: renderColorValue(value.code.bg, colorOptions),\n fg: renderColorValue(value.code.fg, colorOptions),\n },\n fg: renderColorValue(value.fg, colorOptions),\n icon: renderColorValue(value.icon, colorOptions),\n link: {\n fg: renderColorValue(value.link.fg, colorOptions),\n },\n muted: {\n bg: renderColorValue(value.muted.bg, colorOptions),\n fg: renderColorValue(value.muted.fg, colorOptions),\n },\n kbd: {\n bg: renderColorValue(value.kbd.bg, colorOptions),\n fg: renderColorValue(value.kbd.fg, colorOptions),\n border: renderColorValue(value.kbd.border, colorOptions),\n },\n skeleton: {\n from: renderColorValue(value.skeleton?.from, colorOptions),\n to: renderColorValue(value.skeleton?.to, colorOptions),\n },\n }\n}\n\nfunction renderThemeColorInput(\n value: ThemeColorInput_v2,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorInput_v2 {\n return {\n default: renderInputStatesColorTheme(value.default, options),\n invalid: renderInputStatesColorTheme(value.invalid, options),\n }\n}\n\nfunction renderInputStatesColorTheme(\n value: ThemeColorInputMode_v2,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorInputMode_v2 {\n return {\n enabled: renderInputStateColorTheme(value.enabled, options),\n hovered: renderInputStateColorTheme(value.hovered, options),\n readOnly: renderInputStateColorTheme(value.readOnly, options),\n disabled: renderInputStateColorTheme(value.disabled, options),\n }\n}\n\nfunction renderInputStateColorTheme(\n value: ThemeColorInputState_v2,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorInputState_v2 {\n const {baseBg, blendMode: rootBlendMode, colorPalette} = options\n const blendMode = value._blend || 'multiply'\n const rootOptions: RenderColorValueOptions = {colorPalette, bg: baseBg, blendMode: rootBlendMode}\n const bg = renderColorValue(value.bg, rootOptions)\n const colorOptions: RenderColorValueOptions = {colorPalette, bg, blendMode}\n\n return {\n _blend: blendMode,\n bg,\n border: renderColorValue(value.border, colorOptions),\n fg: renderColorValue(value.fg, colorOptions),\n muted: {\n bg: renderColorValue(value.muted.bg, colorOptions),\n },\n placeholder: renderColorValue(value.placeholder, colorOptions),\n }\n}\n\nfunction renderThemeColorSelectable(\n value: ThemeColorSelectable_v2,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorSelectable_v2 {\n // oxlint-disable-next-line no-unsafe-type-assertion\n const colorSelectable = {} as ThemeColorSelectable_v2\n\n for (const tone of THEME_COLOR_STATE_TONES) {\n colorSelectable[tone] = renderThemeColorSelectableStates(value[tone], options)\n }\n\n return colorSelectable\n}\n\nfunction renderThemeColorSelectableStates(\n value: ThemeColorSelectableTone_v2,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorSelectableTone_v2 {\n return {\n enabled: renderThemeColorState(value.enabled, options),\n hovered: renderThemeColorState(value.hovered, options),\n pressed: renderThemeColorState(value.pressed, options),\n selected: renderThemeColorState(value.selected, options),\n disabled: renderThemeColorState(value.disabled, options),\n }\n}\n\nfunction renderSyntaxColorTheme(\n value: ThemeColorSyntax,\n options: {\n baseBg: string\n blendMode: ThemeColorBlendModeKey\n colorPalette: ThemeColorPalette\n },\n): ThemeColorSyntax {\n const {colorPalette, baseBg, blendMode} = options\n const colorOptions: RenderColorValueOptions = {colorPalette, bg: baseBg, blendMode}\n\n return {\n atrule: renderColorValue(value.atrule, colorOptions),\n attrName: renderColorValue(value.attrName, colorOptions),\n attrValue: renderColorValue(value.attrValue, colorOptions),\n attribute: renderColorValue(value.attribute, colorOptions),\n boolean: renderColorValue(value.boolean, colorOptions),\n builtin: renderColorValue(value.builtin, colorOptions),\n cdata: renderColorValue(value.cdata, colorOptions),\n char: renderColorValue(value.char, colorOptions),\n class: renderColorValue(value.class, colorOptions),\n className: renderColorValue(value.className, colorOptions),\n comment: renderColorValue(value.comment, colorOptions),\n constant: renderColorValue(value.constant, colorOptions),\n deleted: renderColorValue(value.deleted, colorOptions),\n doctype: renderColorValue(value.doctype, colorOptions),\n entity: renderColorValue(value.entity, colorOptions),\n function: renderColorValue(value.function, colorOptions),\n hexcode: renderColorValue(value.hexcode, colorOptions),\n id: renderColorValue(value.id, colorOptions),\n important: renderColorValue(value.important, colorOptions),\n inserted: renderColorValue(value.inserted, colorOptions),\n keyword: renderColorValue(value.keyword, colorOptions),\n number: renderColorValue(value.number, colorOptions),\n operator: renderColorValue(value.operator, colorOptions),\n prolog: renderColorValue(value.prolog, colorOptions),\n property: renderColorValue(value.property, colorOptions),\n pseudoClass: renderColorValue(value.pseudoClass, colorOptions),\n pseudoElement: renderColorValue(value.pseudoElement, colorOptions),\n punctuation: renderColorValue(value.punctuation, colorOptions),\n regex: renderColorValue(value.regex, colorOptions),\n selector: renderColorValue(value.selector, colorOptions),\n string: renderColorValue(value.string, colorOptions),\n symbol: renderColorValue(value.symbol, colorOptions),\n tag: renderColorValue(value.tag, colorOptions),\n unit: renderColorValue(value.unit, colorOptions),\n url: renderColorValue(value.url, colorOptions),\n variable: renderColorValue(value.variable, colorOptions),\n }\n}\n","import {ThemeConfig} from '../config/types'\nimport {defaultThemeConfig} from '../defaults/config'\nimport {defaultThemeFonts} from '../defaults/fonts'\nimport {RootTheme, RootTheme_v2} from '../system/theme'\nimport {v2_v0} from '../versioning/v2_v0'\nimport {buildColorTheme} from './buildColorTheme'\nimport {renderThemeColorSchemes} from './renderColorTheme'\n\n/** @internal */\nexport function buildTheme(config?: ThemeConfig): RootTheme {\n const colorTheme = buildColorTheme(config)\n\n const v2: RootTheme_v2 = {\n _version: 2,\n avatar: config?.avatar ?? defaultThemeConfig.avatar,\n button: config?.button ?? defaultThemeConfig.button,\n card: config?.card ?? defaultThemeConfig.card,\n // How colors are generated:\n // 1. Merge custom tokens with default tokens\n // 2. Generate tree of color keys (gray/500, black, white, etc.)\n // 3. Apply mixing and render to hex values\n // render(build(mergeWithDefaults()))\n color: renderThemeColorSchemes(colorTheme, config),\n container: config?.container ?? defaultThemeConfig.container,\n font: config?.font ?? defaultThemeFonts,\n input: config?.input ?? defaultThemeConfig.input,\n layer: config?.layer ?? defaultThemeConfig.layer,\n media: config?.media ?? defaultThemeConfig.media,\n radius: config?.radius ?? defaultThemeConfig.radius,\n shadow: config?.shadow ?? defaultThemeConfig.shadow,\n space: config?.space ?? defaultThemeConfig.space,\n style: config?.style ?? defaultThemeConfig.style,\n }\n\n return v2_v0(v2)\n}\n","import {ThemeColorBase} from '../../../../system/v0/color/base'\nimport {ThemeColorMuted} from '../../../../system/v0/color/muted'\nimport {\n ThemeColorSelectable,\n ThemeColorSelectableStates,\n} from '../../../../system/v0/color/selectable'\nimport {ThemeColorSolid} from '../../../../system/v0/color/solid'\nimport {ThemeColorBuilderOpts} from '../factory'\n\nexport function createSelectableTones(\n // oxlint-disable-next-line no-deprecated\n opts: ThemeColorBuilderOpts,\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase,\n dark: boolean,\n // oxlint-disable-next-line no-deprecated\n solid: ThemeColorSolid,\n // oxlint-disable-next-line no-deprecated\n muted: ThemeColorMuted,\n // oxlint-disable-next-line no-deprecated\n): ThemeColorSelectable {\n return {\n default: _createSelectableStates(opts, base, dark, solid, muted, 'default'),\n primary: _createSelectableStates(opts, base, dark, solid, muted, 'primary'),\n positive: _createSelectableStates(opts, base, dark, solid, muted, 'positive'),\n caution: _createSelectableStates(opts, base, dark, solid, muted, 'caution'),\n critical: _createSelectableStates(opts, base, dark, solid, muted, 'critical'),\n }\n}\n\nfunction _createSelectableStates(\n // oxlint-disable-next-line no-deprecated\n opts: ThemeColorBuilderOpts,\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase,\n dark: boolean,\n // oxlint-disable-next-line no-deprecated\n solid: ThemeColorSolid,\n // oxlint-disable-next-line no-deprecated\n muted: ThemeColorMuted,\n tone: 'default' | 'primary' | 'positive' | 'caution' | 'critical',\n // oxlint-disable-next-line no-deprecated\n): ThemeColorSelectableStates {\n return {\n enabled: opts.selectable({\n base,\n dark,\n solid,\n muted,\n state: 'enabled',\n tone,\n }),\n hovered: opts.selectable({\n base,\n dark,\n solid,\n muted,\n state: 'hovered',\n tone,\n }),\n pressed: opts.selectable({\n base,\n dark,\n solid,\n muted,\n state: 'pressed',\n tone,\n }),\n selected: opts.selectable({\n base,\n dark,\n solid,\n muted,\n state: 'selected',\n tone,\n }),\n disabled: opts.selectable({\n base,\n dark,\n solid,\n muted,\n state: 'disabled',\n tone,\n }),\n }\n}\n","import {ThemeColorName} from '../../../../system/v0/color/_system'\nimport {ThemeColorBase} from '../../../../system/v0/color/base'\nimport {ThemeColorSolid} from '../../../../system/v0/color/solid'\nimport {ThemeColorBuilderOpts} from '../factory'\n\nexport function createSolidTones(\n // oxlint-disable-next-line no-deprecated\n opts: ThemeColorBuilderOpts,\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase,\n dark: boolean,\n // oxlint-disable-next-line no-deprecated\n name: ThemeColorName,\n // oxlint-disable-next-line no-deprecated\n): ThemeColorSolid {\n return {\n default: {\n enabled: opts.solid({base, dark, tone: 'default', name, state: 'enabled'}),\n disabled: opts.solid({base, dark, tone: 'default', name, state: 'disabled'}),\n hovered: opts.solid({base, dark, tone: 'default', name, state: 'hovered'}),\n pressed: opts.solid({base, dark, tone: 'default', name, state: 'pressed'}),\n selected: opts.solid({base, dark, tone: 'default', name, state: 'selected'}),\n },\n transparent: {\n enabled: opts.solid({base, dark, tone: 'transparent', name, state: 'enabled'}),\n disabled: opts.solid({base, dark, tone: 'transparent', name, state: 'disabled'}),\n hovered: opts.solid({base, dark, tone: 'transparent', name, state: 'hovered'}),\n pressed: opts.solid({base, dark, tone: 'transparent', name, state: 'pressed'}),\n selected: opts.solid({base, dark, tone: 'transparent', name, state: 'selected'}),\n },\n primary: {\n enabled: opts.solid({base, dark, tone: 'primary', name, state: 'enabled'}),\n disabled: opts.solid({base, dark, tone: 'primary', name, state: 'disabled'}),\n hovered: opts.solid({base, dark, tone: 'primary', name, state: 'hovered'}),\n pressed: opts.solid({base, dark, tone: 'primary', name, state: 'pressed'}),\n selected: opts.solid({base, dark, tone: 'primary', name, state: 'selected'}),\n },\n positive: {\n enabled: opts.solid({base, dark, tone: 'positive', name, state: 'enabled'}),\n disabled: opts.solid({base, dark, tone: 'positive', name, state: 'disabled'}),\n hovered: opts.solid({base, dark, tone: 'positive', name, state: 'hovered'}),\n pressed: opts.solid({base, dark, tone: 'positive', name, state: 'pressed'}),\n selected: opts.solid({base, dark, tone: 'positive', name, state: 'selected'}),\n },\n caution: {\n enabled: opts.solid({base, dark, tone: 'caution', name, state: 'enabled'}),\n disabled: opts.solid({base, dark, tone: 'caution', name, state: 'disabled'}),\n hovered: opts.solid({base, dark, tone: 'caution', name, state: 'hovered'}),\n pressed: opts.solid({base, dark, tone: 'caution', name, state: 'pressed'}),\n selected: opts.solid({base, dark, tone: 'caution', name, state: 'selected'}),\n },\n critical: {\n enabled: opts.solid({base, dark, tone: 'critical', name, state: 'enabled'}),\n disabled: opts.solid({base, dark, tone: 'critical', name, state: 'disabled'}),\n hovered: opts.solid({base, dark, tone: 'critical', name, state: 'hovered'}),\n pressed: opts.solid({base, dark, tone: 'critical', name, state: 'pressed'}),\n selected: opts.solid({base, dark, tone: 'critical', name, state: 'selected'}),\n },\n }\n}\n","import {ThemeColorButtonModeKey} from '../../../../system/color/_system'\nimport {ThemeColorBase} from '../../../../system/v0/color/base'\nimport {ThemeColorButtonTones} from '../../../../system/v0/color/button'\nimport {ThemeColorMuted} from '../../../../system/v0/color/muted'\nimport {ThemeColorSolid} from '../../../../system/v0/color/solid'\nimport {ThemeColorBuilderOpts} from '../factory'\n\nexport function createButtonTones(\n // oxlint-disable-next-line no-deprecated\n opts: ThemeColorBuilderOpts,\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase,\n dark: boolean,\n // oxlint-disable-next-line no-deprecated\n solid: ThemeColorSolid,\n // oxlint-disable-next-line no-deprecated\n muted: ThemeColorMuted,\n mode: ThemeColorButtonModeKey,\n // oxlint-disable-next-line no-deprecated\n): ThemeColorButtonTones {\n return {\n default: opts.button({\n base,\n dark,\n solid: solid.default,\n muted: muted.default,\n mode,\n }),\n primary: opts.button({\n base,\n dark,\n solid: solid.primary,\n muted: muted.primary,\n mode,\n }),\n positive: opts.button({\n base,\n dark,\n solid: solid.positive,\n muted: muted.positive,\n mode,\n }),\n caution: opts.button({\n base,\n dark,\n solid: solid.caution,\n muted: muted.caution,\n mode,\n }),\n critical: opts.button({\n base,\n dark,\n solid: solid.critical,\n muted: muted.critical,\n mode,\n }),\n }\n}\n","import {ThemeColorBase} from '../../../../system/v0/color/base'\nimport {ThemeColorButton} from '../../../../system/v0/color/button'\nimport {ThemeColorMuted} from '../../../../system/v0/color/muted'\nimport {ThemeColorSolid} from '../../../../system/v0/color/solid'\nimport {ThemeColorBuilderOpts} from '../factory'\nimport {createButtonTones} from './createButtonTones'\n\nexport function createButtonModes(\n // oxlint-disable-next-line no-deprecated\n opts: ThemeColorBuilderOpts,\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase,\n dark: boolean,\n // oxlint-disable-next-line no-deprecated\n solid: ThemeColorSolid,\n // oxlint-disable-next-line no-deprecated\n muted: ThemeColorMuted,\n // oxlint-disable-next-line no-deprecated\n): ThemeColorButton {\n return {\n default: createButtonTones(opts, base, dark, solid, muted, 'default'),\n ghost: createButtonTones(opts, base, dark, solid, muted, 'ghost'),\n bleed: createButtonTones(opts, base, dark, solid, muted, 'bleed'),\n }\n}\n","import {ThemeColorName} from '../../../../system/v0/color/_system'\nimport {ThemeColorBase} from '../../../../system/v0/color/base'\nimport {ThemeColorCard} from '../../../../system/v0/color/card'\nimport {ThemeColorMuted} from '../../../../system/v0/color/muted'\nimport {ThemeColorSolid} from '../../../../system/v0/color/solid'\nimport {ThemeColorBuilderOpts} from '../factory'\n\nexport function createCardStates(\n // oxlint-disable-next-line no-deprecated\n opts: ThemeColorBuilderOpts,\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase,\n dark: boolean,\n // oxlint-disable-next-line no-deprecated\n name: ThemeColorName,\n // oxlint-disable-next-line no-deprecated\n solid: ThemeColorSolid,\n // oxlint-disable-next-line no-deprecated\n muted: ThemeColorMuted,\n // oxlint-disable-next-line no-deprecated\n): ThemeColorCard {\n return {\n enabled: opts.card({\n base,\n dark,\n name,\n state: 'enabled',\n solid,\n muted,\n }),\n disabled: opts.card({\n base,\n dark,\n name,\n state: 'disabled',\n solid,\n muted,\n }),\n hovered: opts.card({\n base,\n dark,\n name,\n state: 'hovered',\n solid,\n muted,\n }),\n pressed: opts.card({\n base,\n dark,\n name,\n state: 'pressed',\n solid,\n muted,\n }),\n selected: opts.card({\n base,\n dark,\n name,\n state: 'selected',\n solid,\n muted,\n }),\n }\n}\n","import {ThemeColorBuilderOpts} from './factory'\n\nconst black = 'hsl(0, 0%, 0%)'\nconst white = 'hsl(0, 0%, 100%)'\n\nconst colors = {\n default: {\n lightest: 'hsl(0, 0%, 95%)',\n lighter: 'hsl(0, 0%, 70%)',\n light: 'hsl(0, 0%, 65%)',\n base: 'hsl(0, 0%, 50%)',\n dark: 'hsl(0, 0%, 35%)',\n darker: 'hsl(0, 0%, 20%)',\n darkest: 'hsl(0, 0%, 5%)',\n },\n transparent: {\n lightest: 'hsl(240, 100%, 95%)',\n lighter: 'hsl(240, 100%, 70%)',\n light: 'hsl(240, 100%, 65%)',\n base: 'hsl(240, 100%, 50%)',\n dark: 'hsl(240, 100%, 35%)',\n darker: 'hsl(240, 100%, 20%)',\n darkest: 'hsl(240, 100%, 5%)',\n },\n primary: {\n lightest: 'hsl(240, 100%, 95%)',\n lighter: 'hsl(240, 100%, 70%)',\n light: 'hsl(240, 100%, 65%)',\n base: 'hsl(240, 100%, 50%)',\n dark: 'hsl(240, 100%, 35%)',\n darker: 'hsl(240, 100%, 20%)',\n darkest: 'hsl(240, 100%, 5%)',\n },\n positive: {\n lightest: 'hsl(120, 100%, 95%)',\n lighter: 'hsl(120, 100%, 70%)',\n light: 'hsl(120, 100%, 65%)',\n base: 'hsl(120, 100%, 50%)',\n dark: 'hsl(120, 100%, 35%)',\n darker: 'hsl(120, 100%, 20%)',\n darkest: 'hsl(120, 100%, 5%)',\n },\n caution: {\n lightest: 'hsl(60, 100%, 95%)',\n lighter: 'hsl(60, 100%, 70%)',\n light: 'hsl(60, 100%, 65%)',\n base: 'hsl(60, 100%, 50%)',\n dark: 'hsl(60, 100%, 35%)',\n darker: 'hsl(60, 100%, 20%)',\n darkest: 'hsl(60, 100%, 5%)',\n },\n critical: {\n lightest: 'hsl(0, 100%, 95%)',\n lighter: 'hsl(0, 100%, 70%)',\n light: 'hsl(0, 100%, 65%)',\n base: 'hsl(0, 100%, 50%)',\n dark: 'hsl(0, 100%, 35%)',\n darker: 'hsl(0, 100%, 20%)',\n darkest: 'hsl(0, 100%, 5%)',\n },\n}\n\nconst spots = {\n gray: 'hsl(0, 0%, 50%)',\n red: 'hsl(0, 100%, 50%)',\n orange: 'hsl(30, 100%, 50%)',\n yellow: 'hsl(60, 100%, 50%)',\n green: 'hsl(120, 100%, 50%)',\n cyan: 'hsl(180, 100%, 50%)',\n blue: 'hsl(240, 100%, 50%)',\n purple: 'hsl(270, 100%, 50%)',\n magenta: 'hsl(300, 100%, 50%)',\n}\n\nconst tones = {\n transparent: {\n bg: [colors.transparent.darkest, colors.transparent.lightest],\n fg: [colors.transparent.lightest, colors.transparent.darkest],\n border: [colors.transparent.darker, colors.transparent.lighter],\n focusRing: [colors.transparent.base, colors.transparent.base],\n },\n primary: {\n bg: [colors.primary.darkest, colors.primary.lightest],\n fg: [colors.primary.lightest, colors.primary.darkest],\n border: [colors.primary.darker, colors.primary.lighter],\n focusRing: [colors.primary.base, colors.primary.base],\n },\n positive: {\n bg: [colors.positive.darkest, colors.positive.lightest],\n fg: [colors.positive.lightest, colors.positive.darkest],\n border: [colors.positive.darker, colors.positive.lighter],\n focusRing: [colors.positive.base, colors.positive.base],\n },\n caution: {\n bg: [colors.caution.darkest, colors.caution.lightest],\n fg: [colors.caution.lightest, colors.caution.darkest],\n border: [colors.caution.darker, colors.caution.lighter],\n focusRing: [colors.caution.base, colors.caution.base],\n },\n critical: {\n bg: [colors.critical.darkest, colors.critical.lightest],\n fg: [colors.critical.lightest, colors.critical.darkest],\n border: [colors.critical.darker, colors.critical.lighter],\n focusRing: [colors.critical.base, colors.critical.base],\n },\n}\n\n// oxlint-disable-next-line no-deprecated\nexport const defaultOpts: ThemeColorBuilderOpts = {\n base: ({dark, name}) => {\n if (name === 'default') {\n return {\n bg: dark ? black : white,\n fg: dark ? white : black,\n border: dark ? colors.default.darkest : colors.default.lightest,\n focusRing: colors.primary.base,\n shadow: {\n outline: black,\n umbra: black,\n penumbra: black,\n ambient: black,\n },\n skeleton: {\n from: dark ? white : black,\n to: dark ? white : black,\n },\n }\n }\n\n // Variants:\n // - primary\n // - positive\n // - caution\n // - critical\n return {\n bg: tones[name].bg[dark ? 0 : 1],\n fg: tones[name].fg[dark ? 0 : 1],\n border: tones[name].border[dark ? 0 : 1],\n focusRing: tones[name].focusRing[dark ? 0 : 1],\n shadow: {\n outline: black,\n umbra: black,\n penumbra: black,\n ambient: black,\n },\n skeleton: {\n from: dark ? white : black,\n to: dark ? white : black,\n },\n }\n },\n\n solid: ({base, dark, state, tone}) => {\n const color = colors[tone]\n\n if (state === 'hovered') {\n return {\n bg: dark ? color.light : color.dark,\n bg2: dark ? color.light : color.dark,\n border: dark ? color.lighter : color.darker,\n fg: dark ? color.darkest : color.lightest,\n icon: dark ? color.darkest : color.lightest,\n muted: {\n fg: black,\n },\n accent: {\n fg: black,\n },\n link: {\n fg: black,\n },\n code: {\n bg: black,\n fg: black,\n },\n skeleton: base.skeleton,\n }\n }\n\n return {\n bg: color.base,\n bg2: color.base,\n border: dark ? color.light : color.dark,\n fg: dark ? color.darkest : color.lightest,\n icon: dark ? color.darkest : color.lightest,\n muted: {\n fg: black,\n },\n accent: {\n fg: black,\n },\n link: {\n fg: black,\n },\n code: {\n bg: black,\n fg: black,\n },\n skeleton: base.skeleton,\n }\n },\n\n muted: ({base, dark, state, tone}) => {\n const color = colors[tone]\n\n if (state === 'hovered') {\n return {\n bg: dark ? color.darker : color.lighter,\n bg2: dark ? color.darker : color.lighter,\n border: dark ? color.lighter : color.darker,\n fg: dark ? color.lightest : color.darkest,\n icon: dark ? color.lightest : color.darkest,\n muted: {\n fg: black,\n },\n accent: {\n fg: black,\n },\n link: {\n fg: black,\n },\n code: {\n bg: black,\n fg: black,\n },\n skeleton: base.skeleton,\n }\n }\n\n return {\n bg: dark ? color.darkest : color.lightest,\n bg2: dark ? color.darkest : color.lightest,\n border: dark ? color.darker : color.lighter,\n fg: dark ? color.lighter : color.darker,\n icon: dark ? color.lighter : color.darker,\n muted: {\n fg: black,\n },\n accent: {\n fg: black,\n },\n link: {\n fg: black,\n },\n code: {\n bg: black,\n fg: black,\n },\n skeleton: base.skeleton,\n }\n },\n\n button: ({base, mode, muted, solid}) => {\n if (mode === 'bleed') {\n return {\n ...muted,\n enabled: {\n bg: 'transparent',\n bg2: 'transparent',\n fg: muted.enabled.fg,\n icon: muted.enabled.fg,\n border: 'transparent',\n muted: {\n fg: black,\n },\n accent: {\n fg: black,\n },\n link: {\n fg: black,\n },\n code: {\n bg: black,\n fg: black,\n },\n skeleton: base.skeleton,\n },\n hovered: {\n bg: muted.enabled.bg,\n bg2: muted.enabled.bg,\n fg: muted.hovered.fg,\n icon: muted.hovered.fg,\n border: 'transparent',\n muted: {\n fg: black,\n },\n accent: {\n fg: black,\n },\n link: {\n fg: black,\n },\n code: {\n bg: black,\n fg: black,\n },\n skeleton: base.skeleton,\n },\n }\n }\n\n if (mode === 'ghost')\n return {\n ...solid,\n enabled: muted.enabled,\n }\n\n return solid\n },\n\n card: ({base}) => {\n return {\n bg: black,\n bg2: black,\n fg: black,\n icon: black,\n border: black,\n muted: {\n fg: black,\n },\n accent: {\n fg: black,\n },\n link: {\n fg: black,\n },\n code: {\n bg: black,\n fg: black,\n },\n skeleton: base.skeleton,\n }\n },\n\n input: () => {\n return {\n bg: black,\n bg2: black,\n fg: black,\n border: black,\n placeholder: black,\n }\n },\n\n selectable: ({muted, state, tone}) => {\n return muted[tone][state]\n },\n\n spot: ({key}) => {\n return spots[key]\n },\n\n syntax: () => ({\n atrule: black,\n attrName: black,\n attrValue: black,\n attribute: black,\n boolean: black,\n builtin: black,\n cdata: black,\n char: black,\n class: black,\n className: black,\n comment: black,\n constant: black,\n deleted: black,\n doctype: black,\n entity: black,\n function: black,\n hexcode: black,\n id: black,\n important: black,\n inserted: black,\n keyword: black,\n number: black,\n operator: black,\n prolog: black,\n property: black,\n pseudoClass: black,\n pseudoElement: black,\n punctuation: black,\n regex: black,\n selector: black,\n string: black,\n symbol: black,\n tag: black,\n unit: black,\n url: black,\n variable: black,\n }),\n}\n","import {ThemeColorBase} from '../../../../system/v0/color/base'\nimport {ThemeColorInput} from '../../../../system/v0/color/input'\nimport {ThemeColorMuted} from '../../../../system/v0/color/muted'\nimport {ThemeColorSolid} from '../../../../system/v0/color/solid'\nimport {ThemeColorBuilderOpts} from '../factory'\n\nexport function createInputModes(\n // oxlint-disable-next-line no-deprecated\n opts: ThemeColorBuilderOpts,\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase,\n dark: boolean,\n // oxlint-disable-next-line no-deprecated\n solid: ThemeColorSolid,\n // oxlint-disable-next-line no-deprecated\n muted: ThemeColorMuted,\n // oxlint-disable-next-line no-deprecated\n): ThemeColorInput {\n return {\n default: {\n enabled: opts.input({\n base,\n dark,\n mode: 'default',\n state: 'enabled',\n solid: solid.default,\n muted: muted.default,\n }),\n disabled: opts.input({\n base,\n dark,\n mode: 'default',\n state: 'disabled',\n solid: solid.default,\n muted: muted.default,\n }),\n hovered: opts.input({\n base,\n dark,\n mode: 'default',\n state: 'hovered',\n solid: solid.default,\n muted: muted.default,\n }),\n readOnly: opts.input({\n base,\n dark,\n mode: 'default',\n state: 'readOnly',\n solid: solid.default,\n muted: muted.default,\n }),\n },\n invalid: {\n enabled: opts.input({\n base,\n dark,\n mode: 'invalid',\n state: 'enabled',\n solid: solid.default,\n muted: muted.default,\n }),\n disabled: opts.input({\n base,\n dark,\n mode: 'invalid',\n state: 'disabled',\n solid: solid.default,\n muted: muted.default,\n }),\n hovered: opts.input({\n base,\n dark,\n mode: 'invalid',\n state: 'hovered',\n solid: solid.default,\n muted: muted.default,\n }),\n readOnly: opts.input({\n base,\n dark,\n mode: 'invalid',\n state: 'readOnly',\n solid: solid.default,\n muted: muted.default,\n }),\n },\n }\n}\n","import {ThemeColorName} from '../../../../system/v0/color/_system'\nimport {ThemeColorBase} from '../../../../system/v0/color/base'\nimport {ThemeColorMuted} from '../../../../system/v0/color/muted'\nimport {ThemeColorBuilderOpts} from '../factory'\n\nexport function createMutedTones(\n // oxlint-disable-next-line no-deprecated\n opts: ThemeColorBuilderOpts,\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase,\n dark: boolean,\n // oxlint-disable-next-line no-deprecated\n name: ThemeColorName,\n // oxlint-disable-next-line no-deprecated\n): ThemeColorMuted {\n return {\n default: {\n enabled: opts.muted({base, dark, tone: 'default', name, state: 'enabled'}),\n disabled: opts.muted({base, dark, tone: 'default', name, state: 'disabled'}),\n hovered: opts.muted({base, dark, tone: 'default', name, state: 'hovered'}),\n pressed: opts.muted({base, dark, tone: 'default', name, state: 'pressed'}),\n selected: opts.muted({base, dark, tone: 'default', name, state: 'selected'}),\n },\n transparent: {\n enabled: opts.muted({base, dark, tone: 'transparent', name, state: 'enabled'}),\n disabled: opts.muted({base, dark, tone: 'transparent', name, state: 'disabled'}),\n hovered: opts.muted({base, dark, tone: 'transparent', name, state: 'hovered'}),\n pressed: opts.muted({base, dark, tone: 'transparent', name, state: 'pressed'}),\n selected: opts.muted({base, dark, tone: 'transparent', name, state: 'selected'}),\n },\n primary: {\n enabled: opts.muted({base, dark, tone: 'primary', name, state: 'enabled'}),\n disabled: opts.muted({base, dark, tone: 'primary', name, state: 'disabled'}),\n hovered: opts.muted({base, dark, tone: 'primary', name, state: 'hovered'}),\n pressed: opts.muted({base, dark, tone: 'primary', name, state: 'pressed'}),\n selected: opts.muted({base, dark, tone: 'primary', name, state: 'selected'}),\n },\n positive: {\n enabled: opts.muted({base, dark, tone: 'positive', name, state: 'enabled'}),\n disabled: opts.muted({base, dark, tone: 'positive', name, state: 'disabled'}),\n hovered: opts.muted({base, dark, tone: 'positive', name, state: 'hovered'}),\n pressed: opts.muted({base, dark, tone: 'positive', name, state: 'pressed'}),\n selected: opts.muted({base, dark, tone: 'positive', name, state: 'selected'}),\n },\n caution: {\n enabled: opts.muted({base, dark, tone: 'caution', name, state: 'enabled'}),\n disabled: opts.muted({base, dark, tone: 'caution', name, state: 'disabled'}),\n hovered: opts.muted({base, dark, tone: 'caution', name, state: 'hovered'}),\n pressed: opts.muted({base, dark, tone: 'caution', name, state: 'pressed'}),\n selected: opts.muted({base, dark, tone: 'caution', name, state: 'selected'}),\n },\n critical: {\n enabled: opts.muted({base, dark, tone: 'critical', name, state: 'enabled'}),\n disabled: opts.muted({base, dark, tone: 'critical', name, state: 'disabled'}),\n hovered: opts.muted({base, dark, tone: 'critical', name, state: 'hovered'}),\n pressed: opts.muted({base, dark, tone: 'critical', name, state: 'pressed'}),\n selected: opts.muted({base, dark, tone: 'critical', name, state: 'selected'}),\n },\n }\n}\n","import {ThemeColorBase} from '../../../../system/v0/color/base'\nimport {ThemeColorSpot} from '../../../../system/v0/color/spot'\nimport {ThemeColorBuilderOpts} from '../factory'\n\nexport function createSpot(\n // oxlint-disable-next-line no-deprecated\n opts: ThemeColorBuilderOpts,\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase,\n dark: boolean,\n // oxlint-disable-next-line no-deprecated\n): ThemeColorSpot {\n return {\n gray: opts.spot({base, dark, key: 'gray'}),\n blue: opts.spot({base, dark, key: 'blue'}),\n purple: opts.spot({base, dark, key: 'purple'}),\n magenta: opts.spot({base, dark, key: 'magenta'}),\n red: opts.spot({base, dark, key: 'red'}),\n orange: opts.spot({base, dark, key: 'orange'}),\n yellow: opts.spot({base, dark, key: 'yellow'}),\n green: opts.spot({base, dark, key: 'green'}),\n cyan: opts.spot({base, dark, key: 'cyan'}),\n }\n}\n","import {ThemeColorButtonModeKey} from '../../../system/color/_system'\nimport {ThemeColorSyntax} from '../../../system/color/syntax'\nimport {ThemeColorGenericState} from '../../../system/v0/color/_generic'\nimport {ThemeColorName, ThemeColorToneKey} from '../../../system/v0/color/_system'\nimport {ThemeColorBase} from '../../../system/v0/color/base'\nimport {ThemeColorButtonStates} from '../../../system/v0/color/button'\nimport {ThemeColor, ThemeColorScheme, ThemeColorSchemes} from '../../../system/v0/color/color'\nimport {ThemeColorInputState} from '../../../system/v0/color/input'\nimport {ThemeColorMuted, ThemeColorMutedTone} from '../../../system/v0/color/muted'\nimport {ThemeColorSolid, ThemeColorSolidTone} from '../../../system/v0/color/solid'\nimport {ThemeColorSpotKey} from '../../../system/v0/color/spot'\nimport {createSelectableTones} from './_selectable/createSelectableTones'\nimport {createSolidTones} from './_solid/createSolidTones'\nimport {createButtonModes} from './button/createButtonModes'\nimport {createCardStates} from './card/createCardStates'\nimport {defaultOpts} from './defaults'\nimport {createInputModes} from './input/createInputModes'\nimport {createMutedTones} from './muted/createMuted'\nimport {createSpot} from './spot/createSpot'\n\n/**\n * @public\n * @deprecated Use `buildColorTheme` instead.\n */\nexport interface ThemeColorBuilderOpts {\n // oxlint-disable-next-line no-deprecated\n base: (opts: {dark: boolean; name: ThemeColorName}) => ThemeColorBase\n solid: (opts: {\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase\n dark: boolean\n // oxlint-disable-next-line no-deprecated\n tone: ThemeColorName\n // oxlint-disable-next-line no-deprecated\n name: ThemeColorName\n state: 'enabled' | 'disabled' | 'hovered' | 'pressed' | 'selected'\n // oxlint-disable-next-line no-deprecated\n }) => ThemeColorGenericState\n muted: (opts: {\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase\n dark: boolean\n // oxlint-disable-next-line no-deprecated\n tone: ThemeColorToneKey\n // oxlint-disable-next-line no-deprecated\n name: ThemeColorName\n state: 'enabled' | 'disabled' | 'hovered' | 'pressed' | 'selected'\n // oxlint-disable-next-line no-deprecated\n }) => ThemeColorGenericState\n card: (opts: {\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase\n dark: boolean\n // oxlint-disable-next-line no-deprecated\n muted: ThemeColorMuted\n // oxlint-disable-next-line no-deprecated\n name: ThemeColorName\n // oxlint-disable-next-line no-deprecated\n solid: ThemeColorSolid\n state: 'enabled' | 'disabled' | 'hovered' | 'pressed' | 'selected'\n // oxlint-disable-next-line no-deprecated\n }) => ThemeColorGenericState\n button: (opts: {\n dark: boolean\n mode: ThemeColorButtonModeKey\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase\n // oxlint-disable-next-line no-deprecated\n solid: ThemeColorSolidTone\n // oxlint-disable-next-line no-deprecated\n muted: ThemeColorMutedTone\n // oxlint-disable-next-line no-deprecated\n }) => ThemeColorButtonStates\n input: (opts: {\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase\n // oxlint-disable-next-line no-deprecated\n solid: ThemeColorSolidTone\n // oxlint-disable-next-line no-deprecated\n muted: ThemeColorMutedTone\n dark: boolean\n mode: 'default' | 'invalid'\n state: 'enabled' | 'disabled' | 'hovered' | 'readOnly'\n // oxlint-disable-next-line no-deprecated\n }) => ThemeColorInputState\n selectable: (opts: {\n dark: boolean\n // oxlint-disable-next-line no-deprecated\n base: ThemeColorBase\n // oxlint-disable-next-line no-deprecated\n solid: ThemeColorSolid\n // oxlint-disable-next-line no-deprecated\n muted: ThemeColorMuted\n state: 'enabled' | 'disabled' | 'hovered' | 'pressed' | 'selected'\n tone: 'default' | 'primary' | 'positive' | 'caution' | 'critical'\n // oxlint-disable-next-line no-deprecated\n }) => ThemeColorGenericState\n // oxlint-disable-next-line no-deprecated\n syntax: (opts: {base: ThemeColorBase; dark: boolean}) => ThemeColorSyntax\n // oxlint-disable-next-line no-deprecated\n spot: (opts: {base: ThemeColorBase; dark: boolean; key: ThemeColorSpotKey}) => string\n}\n\n/**\n * @public\n * @deprecated Use `ThemeConfig` instead.\n */\n// oxlint-disable-next-line no-deprecated\nexport type PartialThemeColorBuilderOpts = Partial<ThemeColorBuilderOpts>\n\n/**\n * @public\n * @deprecated Use `buildColorTheme` instead.\n */\nexport function createColorTheme(\n // oxlint-disable-next-line no-deprecated\n partialOpts: PartialThemeColorBuilderOpts = {},\n // oxlint-disable-next-line no-deprecated\n): ThemeColorSchemes {\n // oxlint-disable-next-line no-deprecated\n const builders: ThemeColorBuilderOpts = {...defaultOpts, ...partialOpts}\n\n return {\n light: _createColorScheme(builders, false),\n dark: _createColorScheme(builders, true),\n }\n}\n\n/**\n * @internal\n */\n// oxlint-disable-next-line no-deprecated\nfunction _createColorScheme(opts: ThemeColorBuilderOpts, dark: boolean): ThemeColorScheme {\n return {\n default: _createColor(opts, dark, 'default'),\n transparent: _createColor(opts, dark, 'transparent'),\n primary: _createColor(opts, dark, 'primary'),\n positive: _createColor(opts, dark, 'positive'),\n caution: _createColor(opts, dark, 'caution'),\n critical: _createColor(opts, dark, 'critical'),\n }\n}\n\n/**\n * @internal\n */\nfunction _createColor(\n // oxlint-disable-next-line no-deprecated\n opts: ThemeColorBuilderOpts,\n dark: boolean,\n // oxlint-disable-next-line no-deprecated\n name: ThemeColorName,\n // oxlint-disable-next-line no-deprecated\n): ThemeColor {\n const base = opts.base({dark, name})\n const solid = createSolidTones(opts, base, dark, name)\n const muted = createMutedTones(opts, base, dark, name)\n\n return {\n base,\n button: createButtonModes(opts, base, dark, solid, muted),\n card: createCardStates(opts, base, dark, name, solid, muted),\n dark,\n input: createInputModes(opts, base, dark, solid, muted),\n selectable: createSelectableTones(opts, base, dark, solid, muted),\n spot: createSpot(opts, base, dark),\n syntax: opts.syntax({base, dark}),\n solid,\n muted,\n }\n}\n"],"mappings":";;;AAEA,MAAa,oBAAgC;CAC3C,MAAM;EACJ,QAAQ;EACR,SAAS;GACP,SAAS;GACT,QAAQ;GACR,UAAU;GACV,MAAM;EACR;EACA,OAAO;GACL;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;EACF;CACF;CACA,SAAS;EACP,QACE;EACF,SAAS;GACP,SAAS;GACT,QAAQ;GACR,UAAU;GACV,MAAM;EACR;EACA,OAAO;GACL;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;EACF;CACF;CACA,OAAO;EACL,QACE;EACF,SAAS;GACP,SAAS;GACT,QAAQ;GACR,UAAU;GACV,MAAM;EACR;EACA,OAAO;GACL;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;EACF;CACF;CACA,MAAM;EACJ,QACE;EACF,SAAS;GACP,SAAS;GACT,QAAQ;GACR,UAAU;GACV,MAAM;EACR;EACA,OAAO;GACL;IACE,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;GACA;IACE,gBAAgB;IAChB,iBAAiB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M,CAAC;CAC3C;AACF;;;;;AC2FA,SAAgB,iBAEd,cAA4C,CAAC,GAE1B;CAEnB,IAAM,WAAkC;EAAC,GAAG;EAAa,GAAG;CAAW;CAEvE,OAAO;EACL,OAAO,mBAAmB,UAAU,EAAK;EACzC,MAAM,mBAAmB,UAAU,EAAI;CACzC;AACF;;;;AAMA,SAAS,mBAAmB,MAA6B,MAAiC;CACxF,OAAO;EACL,SAAS,aAAa,MAAM,MAAM,SAAS;EAC3C,aAAa,aAAa,MAAM,MAAM,aAAa;EACnD,SAAS,aAAa,MAAM,MAAM,SAAS;EAC3C,UAAU,aAAa,MAAM,MAAM,UAAU;EAC7C,SAAS,aAAa,MAAM,MAAM,SAAS;EAC3C,UAAU,aAAa,MAAM,MAAM,UAAU;CAC/C;AACF;;;;AAKA,SAAS,aAEP,MACA,MAEA,MAEY;CACZ,IAAM,OAAO,KAAK,KAAK;EAAC;EAAM;CAAI,CAAC,GAC7B,QAAQ,iBAAiB,MAAM,MAAM,MAAM,IAAI,GAC/C,QAAQ,iBAAiB,MAAM,MAAM,MAAM,IAAI;CAErD,OAAO;EACL;EACA,QAAQ,kBAAkB,MAAM,MAAM,MAAM,OAAO,KAAK;EACxD,MAAM,iBAAiB,MAAM,MAAM,MAAM,MAAM,OAAO,KAAK;EAC3D;EACA,OAAO,iBAAiB,MAAM,MAAM,MAAM,OAAO,KAAK;EACtD,YAAY,sBAAsB,MAAM,MAAM,MAAM,OAAO,KAAK;EAChE,MAAM,WAAW,MAAM,MAAM,IAAI;EACjC,QAAQ,KAAK,OAAO;GAAC;GAAM;EAAI,CAAC;EAChC;EACA;CACF;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"flex-ohP2jG9d.js","names":["direction = 'row'","_getArrayProp(align)","_getArrayProp(direction)","_getArrayProp(gap)","_getArrayProp(justify)","_getArrayProp(wrap)","<StyledFlex\n data-ui=\"Flex\"\n {...restProps}\n $align={_getArrayProp(align)}\n $direction={_getArrayProp(direction)}\n $gap={_getArrayProp(gap)}\n $justify={_getArrayProp(justify)}\n $wrap={_getArrayProp(wrap)}\n forwardedAs={as}\n ref={ref}\n />","_c"],"sources":["../src/core/styles/flex/flexStyle.ts","../src/core/primitives/flex/flex.tsx"],"sourcesContent":["import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, _ruleSet, rem} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveFlexStyleProps} from './types'\n\nconst BASE_STYLE: CSSObject = {\n '&&:not([hidden])': {\n display: 'flex',\n },\n}\n\nconst RULES = _ruleSet(\n BASE_STYLE,\n responsiveFlexAlignStyle,\n responsiveFlexGapStyle,\n responsiveFlexWrapStyle,\n responsiveFlexJustifyStyle,\n responsiveFlexDirectionStyle,\n)\n\nexport function responsiveFlexStyle(): CSSObject[] {\n return RULES\n}\n\nfunction responsiveFlexAlignStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$align, (align) => {\n return {alignItems: align}\n })\n}\n\nfunction responsiveFlexGapStyle(props: ResponsiveFlexStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gap, (gap) => ({\n gap: gap ? rem(space[gap]) : undefined,\n }))\n}\n\nfunction responsiveFlexWrapStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$wrap, (wrap) => {\n return {flexWrap: wrap}\n })\n}\n\nfunction responsiveFlexJustifyStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$justify, (justify) => {\n return {justifyContent: justify}\n })\n}\n\nfunction responsiveFlexDirectionStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$direction, (direction) => {\n return {flexDirection: direction}\n })\n}\n","import {styled} from 'styled-components'\n\nimport {flexItemStyle} from '../../styles/flex/flexItemStyle'\nimport {responsiveFlexStyle} from '../../styles/flex/flexStyle'\nimport {FlexItemStyleProps, ResponsiveFlexStyleProps} from '../../styles/flex/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {ResponsiveFlexItemProps, ResponsiveFlexProps} from '../types'\n\n/**\n * @public\n */\nexport interface FlexOwnProps\n extends Omit<BoxOwnProps, 'display'>, ResponsiveFlexProps, ResponsiveFlexItemProps {\n gap?: number | number[]\n}\n\n/**\n * @public\n */\nexport type FlexProps<E extends ElementType = 'div'> = Props<FlexOwnProps, E>\n\nconst StyledFlex = styled(Box)<FlexItemStyleProps & ResponsiveFlexStyleProps>(\n flexItemStyle,\n responsiveFlexStyle,\n)\n\nfunction FlexComponent(\n props: FlexOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'wrap'>,\n) {\n const {align, as, direction = 'row', gap, justify, ref, wrap, ...restProps} = props\n\n return (\n <StyledFlex\n data-ui=\"Flex\"\n {...restProps}\n $align={_getArrayProp(align)}\n $direction={_getArrayProp(direction)}\n $gap={_getArrayProp(gap)}\n $justify={_getArrayProp(justify)}\n $wrap={_getArrayProp(wrap)}\n forwardedAs={as}\n ref={ref}\n />\n )\n}\n\n/**\n * The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Flex = FlexComponent as unknown as <E extends ElementType = 'div'>(\n props: FlexProps<E>,\n) => React.JSX.Element\n"],"mappings":";;;;;;AAYA,MAAM,QAAQ,SACZ,EANA,oBAAoB,EAClB,SAAS,OACX,EAIA,GACA,0BACA,wBACA,yBACA,4BACA,4BACF;AAEA,SAAgB,sBAAmC;CACjD,OAAO;AACT;AAEA,SAAS,yBAAyB,OAA2D;CAC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CAAc,AAAA,EAAA,QAAA,M,cAAd,KAAA,cAAc,GAAG,GAAH,EAAA,MAAA,K;CACVC,IAAAA;CAAc,AAAA,EAAA,QAAA,U,cAAd,KAAA,cAAc,OAAO,GAAP,EAAA,MAAA,S;CACjBC,IAAAA;CAAc,AAAA,EAAA,QAAA,O,cAAd,KAAA,cAAc,IAAI,GAAJ,EAAA,MAAA,M;CAPvBC,IAAAA;CADF,OASiB,EAAA,QAAA,MAAA,EAAA,QACR,OAAA,EAAA,QAPD,aAAA,EAAA,QACIL,MAAAA,EAAAA,QACIC,MAAAA,EAAAA,QACNC,MAAAA,EAAAA,QACIC,MAAAA,EAAAA,QACHC,MAPT,KAAA,oBAAC,YAAD;EACE,WAAQ;EACR,GAAI;EACJ,QAAQJ;EACR,YAAYC;EACZ,MAAMC;EACN,UAAUC;EACV,OAAOC;EACP,aAAa;EACR;CACN,CAAA,GAFc,EAAA,MAAA,IACR,EAAA,MAAA,KAPD,EAAA,MAAA,WACIJ,EAAAA,MAAAA,IACIC,EAAAA,MAAAA,IACNC,EAAAA,MAAAA,IACIC,EAAAA,MAAAA,IACHC,EAAAA,MAAAA,I,0BAPTC;AAYJ;;;;;;AAQA,MAAa,OAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getElementRef-BLVMlHTn.js","names":["() => {\n ref.current = value\n }","[value]","_c","(node: HTMLElement) => {\n referenceRef.current = node\n if (refs.floating.current) refs.setReference(node)\n const detach = onAttach?.(node)\n syncChildRef(attachmentRef, childRefRef.current, node)\n\n return () => {\n syncChildRef(attachmentRef, undefined, null)\n detach?.()\n referenceRef.current = null\n if (refs.floating.current) refs.setReference(null)\n }\n }","childRefRef.current","refs.floating.current","useCallback(\n (node: HTMLElement) => {\n referenceRef.current = node\n if (refs.floating.current) refs.setReference(node)\n const detach = onAttach?.(node)\n syncChildRef(attachmentRef, childRefRef.current, node)\n\n return () => {\n syncChildRef(attachmentRef, undefined, null)\n detach?.()\n referenceRef.current = null\n if (refs.floating.current) refs.setReference(null)\n }\n },\n [childRefRef, onAttach, refs],\n )","() => {\n syncChildRef(attachmentRef, childRef, referenceRef.current)\n }","[childRef]","() => {\n // Never `null`: that would replace `Popover`'s `referenceElement` option in `refs.reference`\n if (referenceRef.current) refs.setReference(referenceRef.current)\n }","useCallback(() => {\n // Never `null`: that would replace `Popover`'s `referenceElement` option in `refs.reference`\n if (referenceRef.current) refs.setReference(referenceRef.current)\n }, [refs])","{handOverReference, referenceRef, setReference}","_c","{mode: modeFromProps, layoutMode, children}: AnimateActivityProps","() => setMode('hidden')","<PresenceChild\n isPresent={isPresent}\n onExitComplete={!isPresent ? onExitComplete : undefined}\n presenceAffectsLayout={false}\n mode={layoutMode === 'pop' ? 'popLayout' : 'sync'}\n >\n {/* oxlint-disable-next-line no-unsafe-type-assertion -- PresenceChild expects a single ReactElement */}\n {children as any}\n </PresenceChild>","!isPresent ? onExitComplete : undefined","layoutMode === 'pop' ? 'popLayout' : 'sync'","children as any","<Activity mode={mode}>\n <PresenceChild\n isPresent={isPresent}\n onExitComplete={!isPresent ? onExitComplete : undefined}\n presenceAffectsLayout={false}\n mode={layoutMode === 'pop' ? 'popLayout' : 'sync'}\n >\n {/* oxlint-disable-next-line no-unsafe-type-assertion -- PresenceChild expects a single ReactElement */}\n {children as any}\n </PresenceChild>\n </Activity>","_c"],"sources":["../src/core/hooks/useLatestRef.ts","../src/core/utils/attachRef.ts","../src/core/hooks/useReferenceElement.ts","../src/core/middleware/origin.ts","../src/core/utils/animateActivity.tsx","../src/core/utils/getElementRef.ts"],"sourcesContent":["import {useInsertionEffect, useRef} from 'react'\n\n/**\n * A ref that always holds the latest `value`, updated before any layout effect of the same commit\n * runs (the same mechanism `use-effect-event` uses), for callbacks that run outside render.\n *\n * @internal\n */\nexport function useLatestRef<T>(value: T): React.RefObject<T> {\n const ref = useRef(value)\n\n useInsertionEffect(() => {\n ref.current = value\n }, [value])\n\n return ref\n}\n","/**\n * Attaches `value` to `ref` the way React attaches an element's `ref` prop, and returns the\n * function that detaches it: the cleanup a callback ref returned, or else a call with `null`.\n *\n * @internal\n */\nexport function attachRef<T>(ref: React.Ref<T> | undefined, value: T): () => void {\n if (!ref) return noop\n\n if (typeof ref === 'function') {\n const cleanup = ref(value)\n\n return typeof cleanup === 'function' ? cleanup : () => ref(null)\n }\n\n ref.current = value\n\n return () => {\n ref.current = null\n }\n}\n\nfunction noop() {}\n","import {useCallback, useLayoutEffect, useRef} from 'react'\n\nimport {attachRef} from '../utils/attachRef'\nimport {useLatestRef} from './useLatestRef'\n\n/** The part of Floating UI's `refs` used here, whichever reference element type it was given */\ninterface FloatingRefs {\n floating: React.RefObject<Element | null>\n setReference: (node: HTMLElement | null) => void\n}\n\ninterface ChildRefAttachment {\n detach: () => void\n node: HTMLElement\n ref: React.Ref<HTMLElement>\n}\n\n/**\n * Keeps the element of the child that `Tooltip` and `Popover` clone in a ref rather than in state.\n * A ref callback runs in the commit phase, where a state update is scheduled at Immediate priority:\n * inside a `<ViewTransition>` such an update holds up the animation, and makes React skip the\n * transition if sync work is flushed while the browser prepares it. Floating UI is handed the\n * element as the floating element mounts, or right away when it is replaced while shown.\n *\n * The child's own `ref` is attached to the element too. A change of that ref alone (an inline\n * callback ref) is applied from a layout effect, so that `setReference` keeps its identity and a\n * re-render does not detach the element from Floating UI and `onAttach`.\n *\n * @internal\n */\nexport function useReferenceElement(\n refs: FloatingRefs,\n childRef: React.Ref<HTMLElement> | undefined,\n onAttach?: (node: HTMLElement) => () => void,\n): {\n handOverReference: () => void\n referenceRef: React.RefObject<HTMLElement | null>\n setReference: React.RefCallback<HTMLElement>\n} {\n const referenceRef = useRef<HTMLElement | null>(null)\n const attachmentRef = useRef<ChildRefAttachment | null>(null)\n const childRefRef = useLatestRef(childRef)\n\n const setReference = useCallback(\n (node: HTMLElement) => {\n referenceRef.current = node\n if (refs.floating.current) refs.setReference(node)\n const detach = onAttach?.(node)\n syncChildRef(attachmentRef, childRefRef.current, node)\n\n return () => {\n syncChildRef(attachmentRef, undefined, null)\n detach?.()\n referenceRef.current = null\n if (refs.floating.current) refs.setReference(null)\n }\n },\n [childRefRef, onAttach, refs],\n )\n\n useLayoutEffect(() => {\n syncChildRef(attachmentRef, childRef, referenceRef.current)\n }, [childRef])\n\n const handOverReference = useCallback(() => {\n // Never `null`: that would replace `Popover`'s `referenceElement` option in `refs.reference`\n if (referenceRef.current) refs.setReference(referenceRef.current)\n }, [refs])\n\n return {handOverReference, referenceRef, setReference}\n}\n\n/** Attaches `ref` to `node` unless it is attached already, detaching whatever else was */\nfunction syncChildRef(\n attachmentRef: React.RefObject<ChildRefAttachment | null>,\n ref: React.Ref<HTMLElement> | undefined,\n node: HTMLElement | null,\n) {\n const attachment = attachmentRef.current\n\n if (attachment && attachment.ref === ref && attachment.node === node) return\n\n attachmentRef.current = null\n attachment?.detach()\n\n if (ref && node) attachmentRef.current = {detach: attachRef(ref, node), node, ref}\n}\n","import {Middleware} from '@floating-ui/react-dom'\n\n/**\n * Custom floating-ui middleware which calculates transform-origin X + Y offsets\n * based on the current floating rect's dimensions and shift offset.\n *\n * Scaling popovers with these transform-origin offsets will give the effect of\n * popvers slightly 'growing' from the origin/reference element.\n *\n * This middleware must be applied after both `@sanity/ui/size` and `shift` middlewares.\n */\nexport const origin: Middleware = {\n name: '@sanity/ui/origin',\n fn({middlewareData, placement, rects}) {\n const [side] = placement.split('-')\n\n const floatingWidth = rects.floating.width\n const floatingHeight = rects.floating.height\n\n const shiftX = middlewareData.shift?.x || 0\n const shiftY = middlewareData.shift?.y || 0\n\n if (floatingWidth <= 0 || floatingHeight <= 0) {\n return {}\n }\n\n const isVerticalPlacement = ['bottom', 'top'].includes(side)\n\n const {originX, originY}: {originX: number; originY: number} = isVerticalPlacement\n ? {\n originX: clamp(0.5 - shiftX / floatingWidth, 0, 1),\n originY: side === 'bottom' ? 0 : 1,\n }\n : {\n originX: side === 'left' ? 1 : 0,\n originY: clamp(0.5 - shiftY / floatingHeight, 0, 1),\n }\n\n return {\n data: {originX, originY},\n }\n },\n}\n\n/**\n * Converts the `origin` middleware data into a plain `transform-origin` CSS value.\n *\n * The value is intentionally applied as a regular CSS property rather than motion's\n * `originX`/`originY` style keys: motion turns those into motion values that it resets to\n * their initial (unpositioned, `undefined`) state whenever the element re-mounts, which is\n * what happens every time an `Activity`-hidden popover or tooltip is shown again.\n */\nexport function getTransformOrigin(originX?: number, originY?: number): string | undefined {\n if (originX === undefined || originY === undefined) return undefined\n\n return `${originX * 100}% ${originY * 100}%`\n}\n\nfunction clamp(num: number, min: number, max: number) {\n return Math.min(Math.max(num, min), max)\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2024 Motion One\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport {invariant, PresenceChild} from 'motion/react'\nimport {Activity, useState} from 'react'\n\ninterface AnimateActivityProps {\n mode: 'visible' | 'hidden'\n layoutMode: 'default' | 'pop'\n children: React.ReactNode\n}\n\n/**\n * Animated version of React's `Activity` that defers `mode=\"hidden\"` until\n * child exit animations have finished.\n *\n * @internal\n */\nexport function AnimateActivity({mode: modeFromProps, layoutMode, children}: AnimateActivityProps) {\n /**\n * This is the mode that we'll render.\n */\n const [mode, setMode] = useState(modeFromProps)\n\n /**\n * This is the goal state as defined by props.\n */\n const isPresent = modeFromProps === 'visible'\n\n /**\n * Immediately switch to mode=\"visible\" when the user\n * changes the mode prop.\n */\n if (isPresent && mode !== 'visible') {\n setMode('visible')\n return null\n }\n\n /**\n * Set mode to \"hidden\" only when the exit animation is complete.\n */\n const onExitComplete = () => setMode('hidden')\n\n invariant(Boolean(Activity), 'Activity component not found - upgrade to React 19.2.0 or higher')\n\n return (\n <Activity mode={mode}>\n <PresenceChild\n isPresent={isPresent}\n onExitComplete={!isPresent ? onExitComplete : undefined}\n presenceAffectsLayout={false}\n mode={layoutMode === 'pop' ? 'popLayout' : 'sync'}\n >\n {/* oxlint-disable-next-line no-unsafe-type-assertion -- PresenceChild expects a single ReactElement */}\n {children as any}\n </PresenceChild>\n </Activity>\n )\n}\n","// Based on https://github.com/radix-ui/primitives/blob/0bade6a704e5821b90a6da0f3d8cfa8a7711127d/packages/react/slot/src/Slot.tsx#L128-L150\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nexport function getElementRef<T = unknown>(element: React.ReactElement): React.Ref<T> | undefined {\n // React <=18 in DEV\n // oxlint-disable-next-line unbound-method\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning\n\n if (mayWarn) {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return (element as {ref?: React.Ref<T>}).ref\n }\n\n // React 19 in DEV\n // oxlint-disable-next-line unbound-method\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning\n\n if (mayWarn) {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return (element.props as {ref?: React.Ref<T>}).ref\n }\n\n // Not DEV\n // oxlint-disable-next-line no-unsafe-type-assertion\n return (element.props as {ref?: React.Ref<T>}).ref || (element as {ref?: React.Ref<T>}).ref\n}\n"],"mappings":";;;;;;;;;;AAQA,SAAgB,aAAgB,OAA8B;C,cACtD,MAAM,OAAO,KAAK,GAELA,IAEhBC;CAEH,OAHgB,EAAA,OAAA,S,yBADG,WAAM;EACvB,IAAI,UAAU;CAChB,GAAG,KAAA,CAAC,KAAK,GADO,EAAA,KAAA,O,uBADhB,mBAAmBD,IAEhBC,EAAO,GAEH;AACT;;;;;;;ACVA,SAAgB,UAAa,KAA+B,OAAsB;CAChF,IAAI,CAAC,KAAK,OAAO;CAEjB,IAAI,OAAO,OAAQ,YAAY;EAC7B,IAAM,UAAU,IAAI,KAAK;EAEzB,OAAO,OAAO,WAAY,aAAa,gBAAgB,IAAI,IAAI;CACjE;CAIA,OAFA,IAAI,UAAU,aAED;EACX,IAAI,UAAU;CAChB;AACF;AAEA,SAAS,OAAO,CAAC;;;;;;;;;;;;;;ACQjB,SAAgB,oBACd,MACA,UACA,UAKA;C,eACM,eAAe,OAA2B,IAAI,GAC9C,gBAAgB,OAAkC,IAAI,GACtD,cAAc,aAAa,QAAQ,GAGvCE;CAI8BC,AAAAA,EAAAA,OAAAA,eAAAA,EAAAA,OADb,YAAA,EAAA,OADXC,QAFN,MAAC,SAAsB;EAErB,AADA,aAAa,UAAU,MACnB,KAAK,SAAS,WAAS,KAAK,aAAa,IAAI;EACjD,IAAM,SAAS,WAAW,IAAI;EAG9B,OAFA,aAAa,eAAe,YAAY,SAAS,IAAI,SAExC;GAIX,AAHA,aAAa,eAAe,KAAA,GAAW,IAAI,GAC3C,SAAS,GACT,aAAa,UAAU,MACnB,KAAK,SAAS,WAAS,KAAK,aAAa,IAAI;EACnD;CACF,GAR8BD,EAAAA,KAAAA,aADb,EAAA,KAAA,UADXC,EAAAA,KAAAA,M;CAHR,IA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AAO,yBAAyB,QAAQ,OAAO,KAAK,CAAC,EAAE,KAChE,UAAU,UAAU,oBAAoB,UAAU,OAAO;CAmB7D,OAjBI,UAEM,QAAiC,OAK3C,SAAS,OAAO,yBAAyB,SAAS,KAAK,CAAC,EAAE,KAC1D,UAAU,UAAU,oBAAoB,UAAU,OAAO,gBAErD,UAEM,QAAQ,MAA+B,MAKzC,QAAQ,MAA+B,OAAQ,QAAiC;AAC1F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"grid-D-gOpN8z.js","names":["_getArrayProp(autoRows)","_getArrayProp(autoCols)","_getArrayProp(autoFlow)","_getArrayProp(gridTemplateColumns)","_getArrayProp(gap)","_getArrayProp(gapX)","_getArrayProp(gapY)","_getArrayProp(gridTemplateRows)","<StyledGrid\n data-as={typeof as === 'string' ? as : undefined}\n data-ui=\"Grid\"\n {...restProps}\n $autoRows={_getArrayProp(autoRows)}\n $autoCols={_getArrayProp(autoCols)}\n $autoFlow={_getArrayProp(autoFlow)}\n $columns={_getArrayProp(gridTemplateColumns)}\n $gap={_getArrayProp(gap)}\n $gapX={_getArrayProp(gapX)}\n $gapY={_getArrayProp(gapY)}\n $rows={_getArrayProp(gridTemplateRows)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledGrid>","typeof as === 'string' ? as : undefined","_c"],"sources":["../src/core/styles/grid/gridStyle.ts","../src/core/primitives/grid/grid.tsx"],"sourcesContent":["import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, _ruleSet, rem} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveGridStyleProps} from './types'\n\nconst GRID_CSS = {\n '&&:not([hidden])': {\n display: 'grid',\n },\n '&[data-as=\"ul\"],&[data-as=\"ol\"]': {\n listStyle: 'none',\n },\n}\n\nconst GRID_AUTO_COLUMS = {\n auto: 'auto',\n min: 'min-content',\n max: 'max-content',\n fr: 'minmax(0, 1fr)',\n}\n\nconst GRID_AUTO_ROWS = {\n auto: 'auto',\n min: 'min-content',\n max: 'max-content',\n fr: 'minmax(0, 1fr)',\n}\n\nconst RULES = _ruleSet(\n GRID_CSS,\n responsiveGridAutoFlowStyle,\n responsiveGridAutoRowsStyle,\n responsiveGridAutoColsStyle,\n responsiveGridColumnsStyle,\n responsiveGridRowsStyle,\n responsiveGridGapStyle,\n responsiveGridGapXStyle,\n responsiveGridGapYStyle,\n)\n\nexport function responsiveGridStyle(): CSSObject[] {\n return RULES\n}\n\nfunction responsiveGridAutoFlowStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$autoFlow, (autoFlow) => ({\n gridAutoFlow: autoFlow,\n }))\n}\n\nfunction responsiveGridAutoRowsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$autoRows, (autoRows) => ({\n gridAutoRows: autoRows && GRID_AUTO_ROWS[autoRows],\n }))\n}\n\nfunction responsiveGridAutoColsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$autoCols, (autoCols) => ({\n gridAutoColumns: autoCols && GRID_AUTO_COLUMS[autoCols],\n }))\n}\n\nfunction responsiveGridColumnsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$columns, (columns) => ({\n gridTemplateColumns: columns && `repeat(${columns},minmax(0,1fr));`,\n }))\n}\n\nfunction responsiveGridRowsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$rows, (rows) => ({\n gridTemplateRows: rows && `repeat(${rows},minmax(0,1fr));`,\n }))\n}\n\nfunction responsiveGridGapStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gap, (gap) => ({\n // oxlint-disable-next-line no-deprecated\n gridGap: gap ? rem(space[gap]) : undefined,\n }))\n}\n\nfunction responsiveGridGapXStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gapX, (gapX) => ({\n columnGap: gapX ? rem(space[gapX]) : undefined,\n }))\n}\n\nfunction responsiveGridGapYStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gapY, (gapY) => ({\n rowGap: gapY ? rem(space[gapY]) : undefined,\n }))\n}\n","import {styled} from 'styled-components'\n\nimport {responsiveGridStyle} from '../../styles/grid/gridStyle'\nimport {ResponsiveGridStyleProps} from '../../styles/grid/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {ResponsiveGridProps} from '../types'\n\n/**\n * @public\n */\nexport interface GridOwnProps extends Omit<BoxOwnProps, 'display'>, ResponsiveGridProps {}\n\n/**\n * @public\n */\nexport type GridProps<E extends ElementType = 'div'> = Props<GridOwnProps, E>\n\nconst StyledGrid = styled(Box)<ResponsiveGridStyleProps>(responsiveGridStyle)\n\nfunction GridComponent(\n props: GridOwnProps & {as?: ElementType} & Omit<\n React.HTMLProps<HTMLDivElement>,\n 'as' | 'height' | 'rows'\n >,\n) {\n const {\n as,\n autoRows,\n autoCols,\n autoFlow,\n gridTemplateColumns,\n gap,\n gapX,\n gapY,\n gridTemplateRows,\n children,\n ref,\n ...restProps\n } = props\n\n return (\n <StyledGrid\n data-as={typeof as === 'string' ? as : undefined}\n data-ui=\"Grid\"\n {...restProps}\n $autoRows={_getArrayProp(autoRows)}\n $autoCols={_getArrayProp(autoCols)}\n $autoFlow={_getArrayProp(autoFlow)}\n $columns={_getArrayProp(gridTemplateColumns)}\n $gap={_getArrayProp(gap)}\n $gapX={_getArrayProp(gapX)}\n $gapY={_getArrayProp(gapY)}\n $rows={_getArrayProp(gridTemplateRows)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledGrid>\n )\n}\n\n/**\n * The `Grid` component is for building 2-dimensional layers (based on CSS grid).\n *\n * @public\n */\nexport const Grid: <E extends ElementType = 'div'>(props: GridProps<E>) => React.JSX.Element =\n GridComponent\n"],"mappings":";;;;;;AAMA,MAAM,WAAW;CACf,oBAAoB,EAClB,SAAS,OACX;CACA,uCAAmC,EACjC,WAAW,OACb;AACF,GAEM,mBAAmB;CACvB,MAAM;CACN,KAAK;CACL,KAAK;CACL,IAAI;AACN,GAEM,iBAAiB;CACrB,MAAM;CACN,KAAK;CACL,KAAK;CACL,IAAI;AACN,GAEM,QAAQ,SACZ,UACA,6BACA,6BACA,6BACA,4BACA,yBACA,wBACA,yBACA,uBACF;AAEA,SAAgB,sBAAmC;CACjD,OAAO;AACT;AAEA,SAAS,4BAA4B,OAA8C;CACjF,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,YAAY,cAAc,EACxD,cAAc,SAChB,EAAE;AACJ;AAEA,SAAS,4BAA4B,OAA8C;CACjF,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,YAAY,cAAc,EACxD,cAAc,YAAY,eAAe,UAC3C,EAAE;AACJ;AAEA,SAAS,4BAA4B,OAA8C;CACjF,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,YAAY,cAAc,EACxD,iBAAiB,YAAY,iBAAiB,UAChD,EAAE;AACJ;AAEA,SAAS,2BAA2B,OAA8C;CAChF,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,WAAW,aAAa,EACtD,qBAAqB,WAAW,UAAU,QAAQ,kBACpD,EAAE;AACJ;AAEA,SAAS,wBAAwB,OAA8C;CAC7E,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OA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3,"file":"hotkeys-Bd5rZOMO.js","names":["(event: KeyboardEvent) => onKeyDown(event)","() => {\n const handler = (event: KeyboardEvent) => handleKeyDown(event)\n\n window.addEventListener('keydown', handler, options)\n\n return () => window.removeEventListener('keydown', handler, options)\n }","event","[options]","_c","Children.map(childrenProp, (child) => child && <div>{child}</div>)","(child) => child && <div>{child}</div>","useMemo(\n () => Children.map(childrenProp, (child) => child && <div>{child}</div>),\n [childrenProp],\n )","_getArrayProp(gap)","<StyledInline\n data-ui=\"Inline\"\n {...restProps}\n $space={_getArrayProp(gap)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledInline>","_c","fontSize = 0","padding = 1","radius = 2","_getArrayProp(radius)","<Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>","<Box as=\"span\" padding={padding}>\n <Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>\n </Box>","<StyledKBD data-ui=\"KBD\" {...restProps} $radius={_getArrayProp(radius)} ref={ref}>\n <Box as=\"span\" padding={padding}>\n <Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>\n </Box>\n </StyledKBD>","_c","gap = 0.5","_getArrayProp(gap)","<></>","clsx(hotkeys, className)","keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key key={i} fontSize={fontSize} padding={padding} radius={radius}>\n {key}\n </Key>\n ))","(key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key key={i} fontSize={fontSize} padding={padding} radius={radius}>\n {key}\n </Key>\n )","<Inline as=\"span\" gap={spacing}>\n {keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key key={i} fontSize={fontSize} padding={padding} radius={radius}>\n {key}\n </Key>\n ))}\n </Inline>","<kbd className={clsx(hotkeys, className)} data-ui=\"Hotkeys\" ref={ref} {...restProps}>\n <Inline as=\"span\" gap={spacing}>\n {keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key key={i} fontSize={fontSize} padding={padding} radius={radius}>\n {key}\n </Key>\n ))}\n </Inline>\n </kbd>","_c","_Fragment","\"lineHeight\"","\"margin\""],"sources":["../src/core/hooks/useGlobalKeyDown.ts","../src/core/primitives/inline/styles.ts","../src/core/primitives/inline/inline.tsx","../src/core/primitives/kbd/kbd.tsx","../src/core/components/hotkeys/hotkeys.css.ts","../src/core/components/hotkeys/hotkeys.tsx"],"sourcesContent":["import {useEffect} from 'react'\n// TODO: switch to `useEffectEvent` from `react` once\n// https://github.com/facebook/react/issues/34818 is fixed in the lowest React\n// version we support: on React 19.2 the native hook never sees values past\n// the first render when the calling component is wrapped in `forwardRef` or\n// `memo`. This public hook runs in the fiber of whatever component calls it\n// (consumers may call it from `forwardRef` or `memo` components).\nimport {useEffectEvent} from 'use-effect-event'\n\n/**\n * Adds global keydown event listener to the window.\n *\n * @param onKeyDown - The function to call when a keydown event is triggered.\n * @param options - The options to pass to the addEventListener function (example, capture: true)\n * @beta\n */\nexport function useGlobalKeyDown(\n onKeyDown: (event: KeyboardEvent) => void,\n options?: AddEventListenerOptions,\n): void {\n const handleKeyDown = useEffectEvent((event: KeyboardEvent) => onKeyDown(event))\n\n useEffect(() => {\n const handler = (event: KeyboardEvent) => handleKeyDown(event)\n\n window.addEventListener('keydown', handler, options)\n\n return () => window.removeEventListener('keydown', handler, options)\n }, [options])\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../../styles/helpers'\nimport {ThemeProps} from '../../styles/types'\nimport {ResponsiveInlineSpaceStyleProps} from './types'\n\nexport function inlineBaseStyle(): CSSObject {\n return {\n 'lineHeight': '0',\n\n '&&:not([hidden])': {\n display: 'block',\n },\n\n '& > div': {\n display: 'inline-block',\n verticalAlign: 'middle',\n },\n }\n}\n\nexport function inlineSpaceStyle(props: ResponsiveInlineSpaceStyleProps & ThemeProps): CSSObject[] {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$space, (spaceIndex) => {\n const _space = rem(spaceIndex === 0.5 ? space[1] / 2 : space[spaceIndex])\n\n return {\n 'margin': `-${_space} 0 0 -${_space}`,\n '& > div': {padding: `${_space} 0 0 ${_space}`},\n }\n })\n}\n","import {Children, useMemo} from 'react'\nimport {styled} from 'styled-components'\n\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {inlineBaseStyle, inlineSpaceStyle} from './styles'\nimport {ResponsiveInlineSpaceStyleProps} from './types'\n\n/**\n * @public\n */\nexport interface InlineOwnProps extends Omit<BoxOwnProps, 'display'> {\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n /** The spacing between children. */\n gap?: number | number[]\n}\n\n/**\n * @public\n */\nexport type InlineProps<E extends ElementType = 'div'> = Props<InlineOwnProps, E>\n\nconst StyledInline = styled(Box)<ResponsiveInlineSpaceStyleProps>(inlineBaseStyle, inlineSpaceStyle)\n\nfunction InlineComponent(\n props: InlineOwnProps & {as?: ElementType} & React.HTMLProps<HTMLDivElement>,\n) {\n const {as, children: childrenProp, gap, ref, ...restProps} = props\n\n const children = useMemo(\n () => Children.map(childrenProp, (child) => child && <div>{child}</div>),\n [childrenProp],\n )\n\n return (\n <StyledInline\n data-ui=\"Inline\"\n {...restProps}\n $space={_getArrayProp(gap)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledInline>\n )\n}\n\n/**\n * The `Inline` component is a layout utility for aligning and spacing items horizontally.\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Inline = InlineComponent as unknown as <E extends ElementType = 'div'>(\n props: InlineProps<E>,\n) => React.JSX.Element\n","import {css, styled} from 'styled-components'\n\nimport {_getArrayProp} from '../../styles/helpers'\nimport {responsiveRadiusStyle} from '../../styles/radius/radiusStyle'\nimport {ResponsiveRadiusStyleProps} from '../../styles/radius/types'\nimport {ElementType, Props} from '../../types/component'\nimport {Radius} from '../../types/radius'\nimport {Box} from '../box/box'\nimport {Text} from '../text/text'\n\n/**\n * @public\n */\nexport interface KBDOwnProps {\n fontSize?: number | number[]\n padding?: number | number[]\n radius?: Radius | Radius[]\n}\n\n/**\n * @public\n */\nexport type KBDProps<E extends ElementType = 'kbd'> = Props<KBDOwnProps, E>\n\nconst kbdBaseStyle = css`\n --card-bg-color: var(--card-kbd-bg-color);\n --card-border-color: var(--card-kbd-border-color);\n --card-fg-color: var(--card-kbd-fg-color);\n\n box-shadow: inset 0 0 0 1px var(--card-border-color);\n background: var(--card-bg-color);\n font: inherit;\n\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n`\n\nconst KBDBase = styled.kbd`\n ${kbdBaseStyle}\n`\n\nconst StyledKBD = styled(KBDBase)<ResponsiveRadiusStyleProps>(responsiveRadiusStyle)\n\nfunction KBDComponent(\n props: KBDOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLElement>, 'as' | 'size'>,\n) {\n const {children, fontSize = 0, padding = 1, radius = 2, ref, ...restProps} = props\n\n return (\n <StyledKBD data-ui=\"KBD\" {...restProps} $radius={_getArrayProp(radius)} ref={ref}>\n <Box as=\"span\" padding={padding}>\n <Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>\n </Box>\n </StyledKBD>\n )\n}\n\n/**\n * Used to define some text as keyboard input.\n *\n * @public\n */\nexport const KBD: <E extends ElementType = 'kbd'>(props: KBDProps<E>) => React.JSX.Element =\n KBDComponent\n","import {css} from '#styled-system/css'\n\nexport const hotkeys = css({\n 'font': 'inherit',\n 'padding': '1px',\n '&:not([hidden])': {\n display: 'block',\n },\n})\n","import {clsx} from 'clsx/lite'\nimport {styled} from 'styled-components'\n\nimport {Inline} from '../../primitives/inline/inline'\nimport {KBD} from '../../primitives/kbd/kbd'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {Radius} from '../../types/radius'\n\nimport {hotkeys} from './hotkeys.css'\n\n/**\n * @public\n */\nexport interface HotkeysProps {\n fontSize?: number | number[]\n gap?: number | number[]\n padding?: number | number[]\n radius?: Radius | Radius[]\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n keys?: string[]\n}\n\n// Stays on styled-components: `display: block` must beat KBD's runtime\n// `display: inline-block` at equal specificity, which needs both rules in the\n// runtime stylesheet.\nconst Key = styled(KBD)`\n &:not([hidden]) {\n display: block;\n }\n`\n\n/**\n * Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.\n *\n * @public\n */\nexport function Hotkeys(props: HotkeysProps & Omit<React.HTMLProps<HTMLElement>, 'as' | 'size'>) {\n const {className, fontSize, gap = 0.5, keys, padding, radius, ref, ...restProps} = props\n const spacing = _getArrayProp(gap)\n\n if (!keys || keys.length === 0) {\n return <></>\n }\n\n return (\n <kbd className={clsx(hotkeys, className)} data-ui=\"Hotkeys\" ref={ref} {...restProps}>\n <Inline as=\"span\" gap={spacing}>\n {keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key key={i} fontSize={fontSize} padding={padding} radius={radius}>\n {key}\n </Key>\n ))}\n </Inline>\n </kbd>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,SAAgB,iBACd,WACA,SACM;C,cAC+BA;CAA0B,AAAA,EAAA,OAAA,Y,aAA1B,MAAC,UAAyB,UAAU,KAAK,GAAf,EAAA,KAAA,W;CAA/D,IAAM,gBAAgB,eAAeA,EAA0C,GAErEC;CACkC,AAAA,EAAA,OAAA,iBAAA,EAAA,OAEE,WAHpC,WAAM;EACd,IAAM,WAAW,YAAyB,cAAcC,OAAK;EAI7D,OAFA,OAAO,iBAAiB,WAAW,SAAS,OAAO,SAEtC,OAAO,oBAAoB,WAAW,SAAS,OAAO;CACrE,GAL4C,EAAA,KAAA,eAEE,EAAA,KAAA,S;CAG3CC,IAAAA;CANH,AAMI,EAAA,OAAA,U,aAAD,KAAA,CAAC,OAAO,GAAP,EAAA,KAAA,S,YANJ,UAAUF,IAMPE,EAAS;AACd;ACvBA,SAAgB,kBAA6B;C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