{
  "version": 3,
  "sources": ["../../src/misc/TLColor.ts"],
  "sourcesContent": ["import { T } from '@tldraw/validate'\nimport { SetValue } from '../util-types'\n\n/**\n * The colors used by tldraw's canvas UI system.\n *\n * These are special color types used for canvas UI elements like selections,\n * accents, and other interface components that overlay the drawing canvas.\n * Unlike shape colors, these are semantic color types that adapt to the\n * current theme.\n *\n * @example\n * ```ts\n * // Check if a color is a canvas UI color\n * if (TL_CANVAS_UI_COLOR_TYPES.has('selection-stroke')) {\n *   console.log('This is a valid canvas UI color')\n * }\n * ```\n *\n * @public\n */\nexport const TL_CANVAS_UI_COLOR_TYPES = new Set([\n\t'accent',\n\t'white',\n\t'black',\n\t'selection-stroke',\n\t'selection-fill',\n\t'laser',\n\t'muted-1',\n] as const)\n\n/**\n * A union type representing the available canvas UI color types.\n *\n * Canvas UI colors are semantic color types used for interface elements\n * that overlay the drawing canvas, such as selection indicators, accents,\n * and other UI components.\n *\n * @example\n * ```ts\n * const selectionColor: TLCanvasUiColor = 'selection-stroke'\n * const accentColor: TLCanvasUiColor = 'accent'\n * const backgroundColor: TLCanvasUiColor = 'white'\n * ```\n *\n * @public\n */\nexport type TLCanvasUiColor = SetValue<typeof TL_CANVAS_UI_COLOR_TYPES>\n\n/**\n * A validator for canvas UI color types.\n *\n * This validator ensures that color values are one of the valid canvas UI\n * color types defined in {@link TL_CANVAS_UI_COLOR_TYPES}. It provides\n * runtime type checking for canvas UI color properties.\n *\n * @example\n * ```ts\n * import { canvasUiColorTypeValidator } from '@tldraw/tlschema'\n *\n * // Validate a color value\n * try {\n *   const validColor = canvasUiColorTypeValidator.validate('accent')\n *   console.log('Valid color:', validColor)\n * } catch (error) {\n *   console.error('Invalid color:', error.message)\n * }\n * ```\n *\n * @public\n */\nexport const canvasUiColorTypeValidator = T.setEnum(TL_CANVAS_UI_COLOR_TYPES)\n"],
  "mappings": "AAAA,SAAS,SAAS;AAqBX,MAAM,2BAA2B,oBAAI,IAAI;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAU;AA0CH,MAAM,6BAA6B,EAAE,QAAQ,wBAAwB;",
  "names": []
}
