@tldraw/tlschema 4.2.0-next.f100cedfc45b → 4.3.0-canary.03ae87dcc44b

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 (47) hide show
  1. package/dist-cjs/bindings/TLBaseBinding.js.map +2 -2
  2. package/dist-cjs/createTLSchema.js.map +2 -2
  3. package/dist-cjs/index.d.ts +194 -38
  4. package/dist-cjs/index.js +2 -1
  5. package/dist-cjs/index.js.map +2 -2
  6. package/dist-cjs/misc/TLHandle.js.map +1 -1
  7. package/dist-cjs/records/TLAsset.js.map +1 -1
  8. package/dist-cjs/records/TLBinding.js.map +2 -2
  9. package/dist-cjs/records/TLShape.js.map +2 -2
  10. package/dist-cjs/shapes/ShapeWithCrop.js.map +1 -1
  11. package/dist-cjs/shapes/TLBaseShape.js.map +2 -2
  12. package/dist-cjs/store-migrations.js +1 -1
  13. package/dist-cjs/store-migrations.js.map +2 -2
  14. package/dist-cjs/styles/TLColorStyle.js +26 -0
  15. package/dist-cjs/styles/TLColorStyle.js.map +2 -2
  16. package/dist-cjs/styles/TLFillStyle.js +1 -1
  17. package/dist-cjs/styles/TLFillStyle.js.map +2 -2
  18. package/dist-esm/bindings/TLBaseBinding.mjs.map +2 -2
  19. package/dist-esm/createTLSchema.mjs.map +2 -2
  20. package/dist-esm/index.d.mts +194 -38
  21. package/dist-esm/index.mjs +3 -1
  22. package/dist-esm/index.mjs.map +2 -2
  23. package/dist-esm/misc/TLHandle.mjs.map +1 -1
  24. package/dist-esm/records/TLAsset.mjs.map +1 -1
  25. package/dist-esm/records/TLBinding.mjs.map +2 -2
  26. package/dist-esm/records/TLShape.mjs.map +2 -2
  27. package/dist-esm/shapes/TLBaseShape.mjs.map +2 -2
  28. package/dist-esm/store-migrations.mjs +1 -1
  29. package/dist-esm/store-migrations.mjs.map +2 -2
  30. package/dist-esm/styles/TLColorStyle.mjs +26 -0
  31. package/dist-esm/styles/TLColorStyle.mjs.map +2 -2
  32. package/dist-esm/styles/TLFillStyle.mjs +1 -1
  33. package/dist-esm/styles/TLFillStyle.mjs.map +2 -2
  34. package/package.json +5 -5
  35. package/src/bindings/TLBaseBinding.ts +25 -14
  36. package/src/createTLSchema.ts +8 -2
  37. package/src/index.ts +7 -0
  38. package/src/misc/TLHandle.ts +2 -0
  39. package/src/records/TLAsset.ts +2 -2
  40. package/src/records/TLBinding.ts +65 -23
  41. package/src/records/TLRecord.test.ts +17 -5
  42. package/src/records/TLShape.ts +100 -5
  43. package/src/shapes/ShapeWithCrop.ts +2 -2
  44. package/src/shapes/TLBaseShape.ts +34 -10
  45. package/src/store-migrations.ts +2 -1
  46. package/src/styles/TLColorStyle.ts +27 -0
  47. package/src/styles/TLFillStyle.ts +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/styles/TLColorStyle.ts"],
4
- "sourcesContent": ["import { Expand } from '@tldraw/utils'\nimport { T } from '@tldraw/validate'\nimport { StyleProp } from './StyleProp'\n\n/**\n * Array of default color names available in tldraw's color palette.\n * These colors form the basis for the default color style system and are available\n * in both light and dark theme variants.\n *\n * @example\n * ```ts\n * import { defaultColorNames } from '@tldraw/tlschema'\n *\n * // Create a color picker with all default colors\n * const colorOptions = defaultColorNames.map(color => ({\n * name: color,\n * value: color\n * }))\n * ```\n *\n * @public\n */\nexport const defaultColorNames = [\n\t'black',\n\t'grey',\n\t'light-violet',\n\t'violet',\n\t'blue',\n\t'light-blue',\n\t'yellow',\n\t'orange',\n\t'green',\n\t'light-green',\n\t'light-red',\n\t'red',\n\t'white',\n] as const\n\n/**\n * Defines the color variants available for each color in the default theme.\n * Each color has multiple variants for different use cases like fills, strokes,\n * patterns, and UI elements like frames and notes.\n *\n * @example\n * ```ts\n * import { TLDefaultColorThemeColor } from '@tldraw/tlschema'\n *\n * const blueColor: TLDefaultColorThemeColor = {\n * solid: '#4465e9',\n * semi: '#dce1f8',\n * pattern: '#6681ee',\n * fill: '#4465e9',\n * // ... other variants\n * }\n * ```\n *\n * @public\n */\nexport interface TLDefaultColorThemeColor {\n\tsolid: string\n\tsemi: string\n\tpattern: string\n\tfill: string // usually same as solid\n\tframeHeadingStroke: string\n\tframeHeadingFill: string\n\tframeStroke: string\n\tframeFill: string\n\tframeText: string\n\tnoteFill: string\n\tnoteText: string\n\thighlightSrgb: string\n\thighlightP3: string\n}\n\n/**\n * Complete color theme definition containing all colors and their variants\n * for either light or dark mode. Includes base theme properties and all\n * default colors with their respective color variants.\n *\n * @example\n * ```ts\n * import { TLDefaultColorTheme } from '@tldraw/tlschema'\n *\n * const customTheme: TLDefaultColorTheme = {\n * id: 'light',\n * text: '#000000',\n * background: '#ffffff',\n * solid: '#fcfffe',\n * black: { solid: '#000000', semi: '#cccccc', ... },\n * // ... other colors\n * }\n * ```\n *\n * @public\n */\nexport type TLDefaultColorTheme = Expand<\n\t{\n\t\tid: 'light' | 'dark'\n\t\ttext: string\n\t\tbackground: string\n\t\tsolid: string\n\t} & Record<(typeof defaultColorNames)[number], TLDefaultColorThemeColor>\n>\n\n/**\n * Complete color palette containing both light and dark theme definitions.\n * This object provides the full color system used by tldraw's default themes,\n * including all color variants and theme-specific adjustments.\n *\n * @example\n * ```ts\n * import { DefaultColorThemePalette } from '@tldraw/tlschema'\n *\n * // Get the dark theme colors\n * const darkTheme = DefaultColorThemePalette.darkMode\n * const redColor = darkTheme.red.solid // '#e03131'\n *\n * // Access light theme colors\n * const lightTheme = DefaultColorThemePalette.lightMode\n * const blueColor = lightTheme.blue.fill // '#4465e9'\n * ```\n *\n * @public\n */\nexport const DefaultColorThemePalette: {\n\tlightMode: TLDefaultColorTheme\n\tdarkMode: TLDefaultColorTheme\n} = {\n\tlightMode: {\n\t\tid: 'light',\n\t\ttext: '#000000',\n\t\tbackground: '#f9fafb',\n\t\tsolid: '#fcfffe',\n\t\tblack: {\n\t\t\tsolid: '#1d1d1d',\n\t\t\tfill: '#1d1d1d',\n\t\t\tframeHeadingStroke: '#717171',\n\t\t\tframeHeadingFill: '#ffffff',\n\t\t\tframeStroke: '#717171',\n\t\t\tframeFill: '#ffffff',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#FCE19C',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#e8e8e8',\n\t\t\tpattern: '#494949',\n\t\t\thighlightSrgb: '#fddd00',\n\t\t\thighlightP3: 'color(display-p3 0.972 0.8205 0.05)',\n\t\t},\n\t\tblue: {\n\t\t\tsolid: '#4465e9',\n\t\t\tfill: '#4465e9',\n\t\t\tframeHeadingStroke: '#6681ec',\n\t\t\tframeHeadingFill: '#f9fafe',\n\t\t\tframeStroke: '#6681ec',\n\t\t\tframeFill: '#f9fafe',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#8AA3FF',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#dce1f8',\n\t\t\tpattern: '#6681ee',\n\t\t\thighlightSrgb: '#10acff',\n\t\t\thighlightP3: 'color(display-p3 0.308 0.6632 0.9996)',\n\t\t},\n\t\tgreen: {\n\t\t\tsolid: '#099268',\n\t\t\tfill: '#099268',\n\t\t\tframeHeadingStroke: '#37a684',\n\t\t\tframeHeadingFill: '#f8fcfa',\n\t\t\tframeStroke: '#37a684',\n\t\t\tframeFill: '#f8fcfa',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#6FC896',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#d3e9e3',\n\t\t\tpattern: '#39a785',\n\t\t\thighlightSrgb: '#00ffc8',\n\t\t\thighlightP3: 'color(display-p3 0.2536 0.984 0.7981)',\n\t\t},\n\t\tgrey: {\n\t\t\tsolid: '#9fa8b2',\n\t\t\tfill: '#9fa8b2',\n\t\t\tframeHeadingStroke: '#aaaaab',\n\t\t\tframeHeadingFill: '#fbfcfc',\n\t\t\tframeStroke: '#aaaaab',\n\t\t\tframeFill: '#fcfcfd',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#C0CAD3',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#eceef0',\n\t\t\tpattern: '#bcc3c9',\n\t\t\thighlightSrgb: '#cbe7f1',\n\t\t\thighlightP3: 'color(display-p3 0.8163 0.9023 0.9416)',\n\t\t},\n\t\t'light-blue': {\n\t\t\tsolid: '#4ba1f1',\n\t\t\tfill: '#4ba1f1',\n\t\t\tframeHeadingStroke: '#6cb2f3',\n\t\t\tframeHeadingFill: '#f8fbfe',\n\t\t\tframeStroke: '#6cb2f3',\n\t\t\tframeFill: '#fafcff',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#9BC4FD',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#ddedfa',\n\t\t\tpattern: '#6fbbf8',\n\t\t\thighlightSrgb: '#00f4ff',\n\t\t\thighlightP3: 'color(display-p3 0.1512 0.9414 0.9996)',\n\t\t},\n\t\t'light-green': {\n\t\t\tsolid: '#4cb05e',\n\t\t\tfill: '#4cb05e',\n\t\t\tframeHeadingStroke: '#6dbe7c',\n\t\t\tframeHeadingFill: '#f8fcf9',\n\t\t\tframeStroke: '#6dbe7c',\n\t\t\tframeFill: '#fafdfa',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#98D08A',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#dbf0e0',\n\t\t\tpattern: '#65cb78',\n\t\t\thighlightSrgb: '#65f641',\n\t\t\thighlightP3: 'color(display-p3 0.563 0.9495 0.3857)',\n\t\t},\n\t\t'light-red': {\n\t\t\tsolid: '#f87777',\n\t\t\tfill: '#f87777',\n\t\t\tframeHeadingStroke: '#f89090',\n\t\t\tframeHeadingFill: '#fffafa',\n\t\t\tframeStroke: '#f89090',\n\t\t\tframeFill: '#fffbfb',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#F7A5A1',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#f4dadb',\n\t\t\tpattern: '#fe9e9e',\n\t\t\thighlightSrgb: '#ff7fa3',\n\t\t\thighlightP3: 'color(display-p3 0.9988 0.5301 0.6397)',\n\t\t},\n\t\t'light-violet': {\n\t\t\tsolid: '#e085f4',\n\t\t\tfill: '#e085f4',\n\t\t\tframeHeadingStroke: '#e59bf5',\n\t\t\tframeHeadingFill: '#fefaff',\n\t\t\tframeStroke: '#e59bf5',\n\t\t\tframeFill: '#fefbff',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#DFB0F9',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#f5eafa',\n\t\t\tpattern: '#e9acf8',\n\t\t\thighlightSrgb: '#ff88ff',\n\t\t\thighlightP3: 'color(display-p3 0.9676 0.5652 0.9999)',\n\t\t},\n\t\torange: {\n\t\t\tsolid: '#e16919',\n\t\t\tfill: '#e16919',\n\t\t\tframeHeadingStroke: '#e68544',\n\t\t\tframeHeadingFill: '#fef9f6',\n\t\t\tframeStroke: '#e68544',\n\t\t\tframeFill: '#fef9f6',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#FAA475',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#f8e2d4',\n\t\t\tpattern: '#f78438',\n\t\t\thighlightSrgb: '#ffa500',\n\t\t\thighlightP3: 'color(display-p3 0.9988 0.6905 0.266)',\n\t\t},\n\t\tred: {\n\t\t\tsolid: '#e03131',\n\t\t\tfill: '#e03131',\n\t\t\tframeHeadingStroke: '#e55757',\n\t\t\tframeHeadingFill: '#fef7f7',\n\t\t\tframeStroke: '#e55757',\n\t\t\tframeFill: '#fef9f9',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#FC8282',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#f4dadb',\n\t\t\tpattern: '#e55959',\n\t\t\thighlightSrgb: '#ff636e',\n\t\t\thighlightP3: 'color(display-p3 0.9992 0.4376 0.45)',\n\t\t},\n\t\tviolet: {\n\t\t\tsolid: '#ae3ec9',\n\t\t\tfill: '#ae3ec9',\n\t\t\tframeHeadingStroke: '#bc62d3',\n\t\t\tframeHeadingFill: '#fcf7fd',\n\t\t\tframeStroke: '#bc62d3',\n\t\t\tframeFill: '#fdf9fd',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#DB91FD',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#ecdcf2',\n\t\t\tpattern: '#bd63d3',\n\t\t\thighlightSrgb: '#c77cff',\n\t\t\thighlightP3: 'color(display-p3 0.7469 0.5089 0.9995)',\n\t\t},\n\t\tyellow: {\n\t\t\tsolid: '#f1ac4b',\n\t\t\tfill: '#f1ac4b',\n\t\t\tframeHeadingStroke: '#f3bb6c',\n\t\t\tframeHeadingFill: '#fefcf8',\n\t\t\tframeStroke: '#f3bb6c',\n\t\t\tframeFill: '#fffdfa',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#FED49A',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#f9f0e6',\n\t\t\tpattern: '#fecb92',\n\t\t\thighlightSrgb: '#fddd00',\n\t\t\thighlightP3: 'color(display-p3 0.972 0.8705 0.05)',\n\t\t},\n\t\twhite: {\n\t\t\tsolid: '#FFFFFF',\n\t\t\tfill: '#FFFFFF',\n\t\t\tsemi: '#f5f5f5',\n\t\t\tpattern: '#f9f9f9',\n\t\t\tframeHeadingStroke: '#7d7d7d',\n\t\t\tframeHeadingFill: '#ffffff',\n\t\t\tframeStroke: '#7d7d7d',\n\t\t\tframeFill: '#ffffff',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#FFFFFF',\n\t\t\tnoteText: '#000000',\n\t\t\thighlightSrgb: '#ffffff',\n\t\t\thighlightP3: 'color(display-p3 1 1 1)',\n\t\t},\n\t},\n\tdarkMode: {\n\t\tid: 'dark',\n\t\ttext: 'hsl(210, 17%, 98%)',\n\t\tbackground: 'hsl(240, 5%, 6.5%)',\n\t\tsolid: '#010403',\n\n\t\tblack: {\n\t\t\tsolid: '#f2f2f2',\n\t\t\tfill: '#f2f2f2',\n\t\t\tframeHeadingStroke: '#5c5c5c',\n\t\t\tframeHeadingFill: '#252525',\n\t\t\tframeStroke: '#5c5c5c',\n\t\t\tframeFill: '#0c0c0c',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#2c2c2c',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#2c3036',\n\t\t\tpattern: '#989898',\n\t\t\thighlightSrgb: '#d2b700',\n\t\t\thighlightP3: 'color(display-p3 0.8078 0.6225 0.0312)',\n\t\t},\n\t\tblue: {\n\t\t\tsolid: '#4f72fc', // 3c60f0\n\t\t\tfill: '#4f72fc',\n\t\t\tframeHeadingStroke: '#384994',\n\t\t\tframeHeadingFill: '#1C2036',\n\t\t\tframeStroke: '#384994',\n\t\t\tframeFill: '#11141f',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#2A3F98',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#262d40',\n\t\t\tpattern: '#3a4b9e',\n\t\t\thighlightSrgb: '#0079d2',\n\t\t\thighlightP3: 'color(display-p3 0.0032 0.4655 0.7991)',\n\t\t},\n\t\tgreen: {\n\t\t\tsolid: '#099268',\n\t\t\tfill: '#099268',\n\t\t\tframeHeadingStroke: '#10513C',\n\t\t\tframeHeadingFill: '#14241f',\n\t\t\tframeStroke: '#10513C',\n\t\t\tframeFill: '#0E1614',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#014429',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#253231',\n\t\t\tpattern: '#366a53',\n\t\t\thighlightSrgb: '#009774',\n\t\t\thighlightP3: 'color(display-p3 0.0085 0.582 0.4604)',\n\t\t},\n\t\tgrey: {\n\t\t\tsolid: '#9398b0',\n\t\t\tfill: '#9398b0',\n\t\t\tframeHeadingStroke: '#42474D',\n\t\t\tframeHeadingFill: '#23262A',\n\t\t\tframeStroke: '#42474D',\n\t\t\tframeFill: '#151719',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#56595F',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#33373c',\n\t\t\tpattern: '#7c8187',\n\t\t\thighlightSrgb: '#9cb4cb',\n\t\t\thighlightP3: 'color(display-p3 0.6299 0.7012 0.7856)',\n\t\t},\n\t\t'light-blue': {\n\t\t\tsolid: '#4dabf7',\n\t\t\tfill: '#4dabf7',\n\t\t\tframeHeadingStroke: '#075797',\n\t\t\tframeHeadingFill: '#142839',\n\t\t\tframeStroke: '#075797',\n\t\t\tframeFill: '#0B1823',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#1F5495',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#2a3642',\n\t\t\tpattern: '#4d7aa9',\n\t\t\thighlightSrgb: '#00bdc8',\n\t\t\thighlightP3: 'color(display-p3 0.0023 0.7259 0.7735)',\n\t\t},\n\t\t'light-green': {\n\t\t\tsolid: '#40c057',\n\t\t\tfill: '#40c057',\n\t\t\tframeHeadingStroke: '#1C5427',\n\t\t\tframeHeadingFill: '#18251A',\n\t\t\tframeStroke: '#1C5427',\n\t\t\tframeFill: '#0F1911',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#21581D',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#2a3830',\n\t\t\tpattern: '#4e874e',\n\t\t\thighlightSrgb: '#00a000',\n\t\t\thighlightP3: 'color(display-p3 0.2711 0.6172 0.0195)',\n\t\t},\n\t\t'light-red': {\n\t\t\tsolid: '#ff8787',\n\t\t\tfill: '#ff8787',\n\t\t\tframeHeadingStroke: '#6f3232', // Darker and desaturated variant of solid\n\t\t\tframeHeadingFill: '#341818', // Deep, muted dark red\n\t\t\tframeStroke: '#6f3232', // Matches headingStroke\n\t\t\tframeFill: '#181212', // Darker, muted background shade\n\t\t\tframeText: '#f2f2f2', // Consistent bright text color\n\t\t\tnoteFill: '#7a3333', // Medium-dark, muted variant of solid\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#3c2b2b', // Subdued, darker neutral-red tone\n\t\t\tpattern: '#a56767', // Existing pattern shade retained\n\t\t\thighlightSrgb: '#db005b',\n\t\t\thighlightP3: 'color(display-p3 0.7849 0.0585 0.3589)',\n\t\t},\n\t\t'light-violet': {\n\t\t\tsolid: '#e599f7',\n\t\t\tfill: '#e599f7',\n\t\t\tframeHeadingStroke: '#6c367a',\n\t\t\tframeHeadingFill: '#2D2230',\n\t\t\tframeStroke: '#6c367a',\n\t\t\tframeFill: '#1C151E',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#762F8E',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#383442',\n\t\t\tpattern: '#9770a9',\n\t\t\thighlightSrgb: '#c400c7',\n\t\t\thighlightP3: 'color(display-p3 0.7024 0.0403 0.753)',\n\t\t},\n\t\torange: {\n\t\t\tsolid: '#f76707',\n\t\t\tfill: '#f76707',\n\t\t\tframeHeadingStroke: '#773a0e', // Darker, muted version of solid\n\t\t\tframeHeadingFill: '#2f1d13', // Deep, warm, muted background\n\t\t\tframeStroke: '#773a0e', // Matches headingStroke\n\t\t\tframeFill: '#1c1512', // Darker, richer muted background\n\t\t\tframeText: '#f2f2f2', // Bright text for contrast\n\t\t\tnoteFill: '#7c3905', // Muted dark variant for note fill\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#3b2e27', // Muted neutral-orange tone\n\t\t\tpattern: '#9f552d', // Retained existing shade\n\t\t\thighlightSrgb: '#d07a00',\n\t\t\thighlightP3: 'color(display-p3 0.7699 0.4937 0.0085)',\n\t\t},\n\t\tred: {\n\t\t\tsolid: '#e03131',\n\t\t\tfill: '#e03131',\n\t\t\tframeHeadingStroke: '#701e1e', // Darker, muted variation of solid\n\t\t\tframeHeadingFill: '#301616', // Deep, muted reddish backdrop\n\t\t\tframeStroke: '#701e1e', // Matches headingStroke\n\t\t\tframeFill: '#1b1313', // Rich, dark muted background\n\t\t\tframeText: '#f2f2f2', // Bright text for readability\n\t\t\tnoteFill: '#7e201f', // Muted dark variant for note fill\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#382726', // Dark neutral-red tone\n\t\t\tpattern: '#8f3734', // Existing pattern color retained\n\t\t\thighlightSrgb: '#de002c',\n\t\t\thighlightP3: 'color(display-p3 0.7978 0.0509 0.2035)',\n\t\t},\n\t\tviolet: {\n\t\t\tsolid: '#ae3ec9',\n\t\t\tfill: '#ae3ec9',\n\t\t\tframeHeadingStroke: '#6d1583', // Darker, muted variation of solid\n\t\t\tframeHeadingFill: '#27152e', // Deep, rich muted violet backdrop\n\t\t\tframeStroke: '#6d1583', // Matches headingStroke\n\t\t\tframeFill: '#1b0f21', // Darker muted violet background\n\t\t\tframeText: '#f2f2f2', // Consistent bright text color\n\t\t\tnoteFill: '#5f1c70', // Muted dark variant for note fill\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#342938', // Dark neutral-violet tone\n\t\t\tpattern: '#763a8b', // Retained existing pattern color\n\t\t\thighlightSrgb: '#9e00ee',\n\t\t\thighlightP3: 'color(display-p3 0.5651 0.0079 0.8986)',\n\t\t},\n\t\tyellow: {\n\t\t\tsolid: '#ffc034',\n\t\t\tfill: '#ffc034',\n\t\t\tframeHeadingStroke: '#684e12', // Darker, muted variant of solid\n\t\t\tframeHeadingFill: '#2a2113', // Rich, muted dark-yellow background\n\t\t\tframeStroke: '#684e12', // Matches headingStroke\n\t\t\tframeFill: '#1e1911', // Darker muted shade for background fill\n\t\t\tframeText: '#f2f2f2', // Bright text color for readability\n\t\t\tnoteFill: '#8a5e1c', // Muted, dark complementary variant\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#3b352b', // Dark muted neutral-yellow tone\n\t\t\tpattern: '#fecb92', // Existing shade retained\n\t\t\thighlightSrgb: '#d2b700',\n\t\t\thighlightP3: 'color(display-p3 0.8078 0.7225 0.0312)',\n\t\t},\n\t\twhite: {\n\t\t\tsolid: '#f3f3f3',\n\t\t\tfill: '#f3f3f3',\n\t\t\tsemi: '#f5f5f5',\n\t\t\tpattern: '#f9f9f9',\n\t\t\tframeHeadingStroke: '#ffffff',\n\t\t\tframeHeadingFill: '#ffffff',\n\t\t\tframeStroke: '#ffffff',\n\t\t\tframeFill: '#ffffff',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#eaeaea',\n\t\t\tnoteText: '#1d1d1d',\n\t\t\thighlightSrgb: '#ffffff',\n\t\t\thighlightP3: 'color(display-p3 1 1 1)',\n\t\t},\n\t},\n}\n\n/**\n * Returns the appropriate default color theme based on the dark mode preference.\n *\n * @param opts - Configuration options\n * - isDarkMode - Whether to return the dark theme (true) or light theme (false)\n * @returns The corresponding TLDefaultColorTheme (light or dark)\n *\n * @example\n * ```ts\n * import { getDefaultColorTheme } from '@tldraw/tlschema'\n *\n * // Get light theme\n * const lightTheme = getDefaultColorTheme({ isDarkMode: false })\n *\n * // Get dark theme\n * const darkTheme = getDefaultColorTheme({ isDarkMode: true })\n *\n * // Use with editor\n * const theme = getDefaultColorTheme({ isDarkMode: window.matchMedia('(prefers-color-scheme: dark)').matches })\n * ```\n *\n * @public\n */\nexport function getDefaultColorTheme(opts: { isDarkMode: boolean }): TLDefaultColorTheme {\n\treturn opts.isDarkMode ? DefaultColorThemePalette.darkMode : DefaultColorThemePalette.lightMode\n}\n\n/**\n * Default color style property used by tldraw shapes for their primary color.\n * This style prop allows shapes to use any of the default color names and\n * automatically saves the last used value for new shapes.\n *\n * @example\n * ```ts\n * import { DefaultColorStyle } from '@tldraw/tlschema'\n *\n * // Use in shape props definition\n * interface MyShapeProps {\n * color: typeof DefaultColorStyle\n * // other props...\n * }\n *\n * // Set color on a shape\n * const shape = {\n * // ... other properties\n * props: {\n * color: 'red' as const,\n * // ... other props\n * }\n * }\n * ```\n *\n * @public\n */\nexport const DefaultColorStyle = StyleProp.defineEnum('tldraw:color', {\n\tdefaultValue: 'black',\n\tvalues: defaultColorNames,\n})\n\n/**\n * Default label color style property used for text labels on shapes.\n * This is separate from the main color style to allow different colors\n * for shape fills/strokes versus their text labels.\n *\n * @example\n * ```ts\n * import { DefaultLabelColorStyle } from '@tldraw/tlschema'\n *\n * // Use in shape props definition\n * interface MyShapeProps {\n * labelColor: typeof DefaultLabelColorStyle\n * // other props...\n * }\n *\n * // Create a shape with different fill and label colors\n * const shape = {\n * // ... other properties\n * props: {\n * color: 'blue' as const,\n * labelColor: 'white' as const,\n * // ... other props\n * }\n * }\n * ```\n *\n * @public\n */\nexport const DefaultLabelColorStyle = StyleProp.defineEnum('tldraw:labelColor', {\n\tdefaultValue: 'black',\n\tvalues: defaultColorNames,\n})\n\n/**\n * Type representing a default color style value.\n * This is a union type of all available default color names.\n *\n * @example\n * ```ts\n * import { TLDefaultColorStyle } from '@tldraw/tlschema'\n *\n * // Valid color values\n * const redColor: TLDefaultColorStyle = 'red'\n * const blueColor: TLDefaultColorStyle = 'blue'\n *\n * // Type guard usage\n * function isValidColor(color: string): color is TLDefaultColorStyle {\n * return ['black', 'red', 'blue'].includes(color as TLDefaultColorStyle)\n * }\n * ```\n *\n * @public\n */\nexport type TLDefaultColorStyle = T.TypeOf<typeof DefaultColorStyle>\n\nconst defaultColorNamesSet = new Set(defaultColorNames)\n\n/**\n * Type guard to check if a color value is one of the default theme colors.\n * Useful for determining if a color can be looked up in the theme palette.\n *\n * @param color - The color value to check\n * @returns True if the color is a default theme color, false otherwise\n *\n * @example\n * ```ts\n * import { isDefaultThemeColor, TLDefaultColorStyle } from '@tldraw/tlschema'\n *\n * const color: TLDefaultColorStyle = 'red'\n *\n * if (isDefaultThemeColor(color)) {\n * // color is guaranteed to be a default theme color\n * console.log(`${color} is a default theme color`)\n * } else {\n * // color might be a custom hex value or other format\n * console.log(`${color} is a custom color`)\n * }\n * ```\n *\n * @public\n */\nexport function isDefaultThemeColor(\n\tcolor: TLDefaultColorStyle\n): color is (typeof defaultColorNames)[number] {\n\treturn defaultColorNamesSet.has(color as (typeof defaultColorNames)[number])\n}\n\n/**\n * Resolves a color style value to its actual CSS color string for a given theme and variant.\n * If the color is not a default theme color, returns the color value as-is.\n *\n * @param theme - The color theme to use for resolution\n * @param color - The color style value to resolve\n * @param variant - Which variant of the color to return (solid, fill, pattern, etc.)\n * @returns The CSS color string for the specified color and variant\n *\n * @example\n * ```ts\n * import { getColorValue, getDefaultColorTheme } from '@tldraw/tlschema'\n *\n * const theme = getDefaultColorTheme({ isDarkMode: false })\n *\n * // Get the solid variant of red\n * const redSolid = getColorValue(theme, 'red', 'solid') // '#e03131'\n *\n * // Get the fill variant of blue\n * const blueFill = getColorValue(theme, 'blue', 'fill') // '#4465e9'\n *\n * // Custom color passes through unchanged\n * const customColor = getColorValue(theme, '#ff0000', 'solid') // '#ff0000'\n * ```\n *\n * @public\n */\nexport function getColorValue(\n\ttheme: TLDefaultColorTheme,\n\tcolor: TLDefaultColorStyle,\n\tvariant: keyof TLDefaultColorThemeColor\n): string {\n\tif (!isDefaultThemeColor(color)) {\n\t\treturn color\n\t}\n\n\treturn theme[color][variant]\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,uBAA0B;AAoBnB,MAAM,oBAAoB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAwFO,MAAM,2BAGT;AAAA,EACH,WAAW;AAAA,IACV,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,OAAO;AAAA,MACN,OAAO;AAAA,MACP,MAAM;AAAA,MACN,oBAAoB;AAAA,MACpB,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,WAAW;AAAA,MACX,WAAW;AAAA,MACX,UAAU;AAAA,MACV,UAAU;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA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Ae;AAAA,MACf,aAAa;AAAA,IACd;AAAA,IACA,QAAQ;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,MACN,oBAAoB;AAAA;AAAA,MACpB,kBAAkB;AAAA;AAAA,MAClB,aAAa;AAAA;AAAA,MACb,WAAW;AAAA;AAAA,MACX,WAAW;AAAA;AAAA,MACX,UAAU;AAAA;AAAA,MACV,UAAU;AAAA,MACV,MAAM;AAAA;AAAA,MACN,SAAS;AAAA;AAAA,MACT,eAAe;AAAA,MACf,aAAa;AAAA,IACd;AAAA,IACA,OAAO;AAAA,MACN,OAAO;AAAA,MACP,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,oBAAoB;AAAA,MACpB,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,WAAW;AAAA,MACX,WAAW;AAAA,MACX,UAAU;AAAA,MACV,UAAU;AAAA,MACV,eAAe;AAAA,MACf,aAAa;AAAA,IACd;AAAA,EACD;AACD;AAyBO,SAAS,qBAAqB,MAAoD;AACxF,SAAO,KAAK,aAAa,yBAAyB,WAAW,yBAAyB;AACvF;AA6BO,MAAM,oBAAoB,2BAAU,WAAW,gBAAgB;AAAA,EACrE,cAAc;AAAA,EACd,QAAQ;AACT,CAAC;AA8BM,MAAM,yBAAyB,2BAAU,WAAW,qBAAqB;AAAA,EAC/E,cAAc;AAAA,EACd,QAAQ;AACT,CAAC;AAwBD,MAAM,uBAAuB,IAAI,IAAI,iBAAiB;AA0B/C,SAAS,oBACf,OAC8C;AAC9C,SAAO,qBAAqB,IAAI,KAA2C;AAC5E;AA6BO,SAAS,cACf,OACA,OACA,SACS;AACT,MAAI,CAAC,oBAAoB,KAAK,GAAG;AAChC,WAAO;AAAA,EACR;AAEA,SAAO,MAAM,KAAK,EAAE,OAAO;AAC5B;",
4
+ "sourcesContent": ["import { Expand } from '@tldraw/utils'\nimport { T } from '@tldraw/validate'\nimport { StyleProp } from './StyleProp'\n\n/**\n * Array of default color names available in tldraw's color palette.\n * These colors form the basis for the default color style system and are available\n * in both light and dark theme variants.\n *\n * @example\n * ```ts\n * import { defaultColorNames } from '@tldraw/tlschema'\n *\n * // Create a color picker with all default colors\n * const colorOptions = defaultColorNames.map(color => ({\n * name: color,\n * value: color\n * }))\n * ```\n *\n * @public\n */\nexport const defaultColorNames = [\n\t'black',\n\t'grey',\n\t'light-violet',\n\t'violet',\n\t'blue',\n\t'light-blue',\n\t'yellow',\n\t'orange',\n\t'green',\n\t'light-green',\n\t'light-red',\n\t'red',\n\t'white',\n] as const\n\n/**\n * Defines the color variants available for each color in the default theme.\n * Each color has multiple variants for different use cases like fills, strokes,\n * patterns, and UI elements like frames and notes.\n *\n * @example\n * ```ts\n * import { TLDefaultColorThemeColor } from '@tldraw/tlschema'\n *\n * const blueColor: TLDefaultColorThemeColor = {\n * solid: '#4465e9',\n * semi: '#dce1f8',\n * pattern: '#6681ee',\n * fill: '#4465e9',\n * // ... other variants\n * }\n * ```\n *\n * @public\n */\nexport interface TLDefaultColorThemeColor {\n\tsolid: string\n\tsemi: string\n\tpattern: string\n\tfill: string // usually same as solid\n\tlinedFill: string // usually slightly lighter than fill\n\tframeHeadingStroke: string\n\tframeHeadingFill: string\n\tframeStroke: string\n\tframeFill: string\n\tframeText: string\n\tnoteFill: string\n\tnoteText: string\n\thighlightSrgb: string\n\thighlightP3: string\n}\n\n/**\n * Complete color theme definition containing all colors and their variants\n * for either light or dark mode. Includes base theme properties and all\n * default colors with their respective color variants.\n *\n * @example\n * ```ts\n * import { TLDefaultColorTheme } from '@tldraw/tlschema'\n *\n * const customTheme: TLDefaultColorTheme = {\n * id: 'light',\n * text: '#000000',\n * background: '#ffffff',\n * solid: '#fcfffe',\n * black: { solid: '#000000', semi: '#cccccc', ... },\n * // ... other colors\n * }\n * ```\n *\n * @public\n */\nexport type TLDefaultColorTheme = Expand<\n\t{\n\t\tid: 'light' | 'dark'\n\t\ttext: string\n\t\tbackground: string\n\t\tsolid: string\n\t} & Record<(typeof defaultColorNames)[number], TLDefaultColorThemeColor>\n>\n\n/**\n * Complete color palette containing both light and dark theme definitions.\n * This object provides the full color system used by tldraw's default themes,\n * including all color variants and theme-specific adjustments.\n *\n * @example\n * ```ts\n * import { DefaultColorThemePalette } from '@tldraw/tlschema'\n *\n * // Get the dark theme colors\n * const darkTheme = DefaultColorThemePalette.darkMode\n * const redColor = darkTheme.red.solid // '#e03131'\n *\n * // Access light theme colors\n * const lightTheme = DefaultColorThemePalette.lightMode\n * const blueColor = lightTheme.blue.fill // '#4465e9'\n * ```\n *\n * @public\n */\nexport const DefaultColorThemePalette: {\n\tlightMode: TLDefaultColorTheme\n\tdarkMode: TLDefaultColorTheme\n} = {\n\tlightMode: {\n\t\tid: 'light',\n\t\ttext: '#000000',\n\t\tbackground: '#f9fafb',\n\t\tsolid: '#fcfffe',\n\t\tblack: {\n\t\t\tsolid: '#1d1d1d',\n\t\t\tfill: '#1d1d1d',\n\t\t\tlinedFill: '#363636',\n\t\t\tframeHeadingStroke: '#717171',\n\t\t\tframeHeadingFill: '#ffffff',\n\t\t\tframeStroke: '#717171',\n\t\t\tframeFill: '#ffffff',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#FCE19C',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#e8e8e8',\n\t\t\tpattern: '#494949',\n\t\t\thighlightSrgb: '#fddd00',\n\t\t\thighlightP3: 'color(display-p3 0.972 0.8205 0.05)',\n\t\t},\n\t\tblue: {\n\t\t\tsolid: '#4465e9',\n\t\t\tfill: '#4465e9',\n\t\t\tlinedFill: '#6580ec',\n\t\t\tframeHeadingStroke: '#6681ec',\n\t\t\tframeHeadingFill: '#f9fafe',\n\t\t\tframeStroke: '#6681ec',\n\t\t\tframeFill: '#f9fafe',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#8AA3FF',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#dce1f8',\n\t\t\tpattern: '#6681ee',\n\t\t\thighlightSrgb: '#10acff',\n\t\t\thighlightP3: 'color(display-p3 0.308 0.6632 0.9996)',\n\t\t},\n\t\tgreen: {\n\t\t\tsolid: '#099268',\n\t\t\tfill: '#099268',\n\t\t\tlinedFill: '#0bad7c',\n\t\t\tframeHeadingStroke: '#37a684',\n\t\t\tframeHeadingFill: '#f8fcfa',\n\t\t\tframeStroke: '#37a684',\n\t\t\tframeFill: '#f8fcfa',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#6FC896',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#d3e9e3',\n\t\t\tpattern: '#39a785',\n\t\t\thighlightSrgb: '#00ffc8',\n\t\t\thighlightP3: 'color(display-p3 0.2536 0.984 0.7981)',\n\t\t},\n\t\tgrey: {\n\t\t\tsolid: '#9fa8b2',\n\t\t\tfill: '#9fa8b2',\n\t\t\tlinedFill: '#bbc1c9',\n\t\t\tframeHeadingStroke: '#aaaaab',\n\t\t\tframeHeadingFill: '#fbfcfc',\n\t\t\tframeStroke: '#aaaaab',\n\t\t\tframeFill: '#fcfcfd',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#C0CAD3',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#eceef0',\n\t\t\tpattern: '#bcc3c9',\n\t\t\thighlightSrgb: '#cbe7f1',\n\t\t\thighlightP3: 'color(display-p3 0.8163 0.9023 0.9416)',\n\t\t},\n\t\t'light-blue': {\n\t\t\tsolid: '#4ba1f1',\n\t\t\tfill: '#4ba1f1',\n\t\t\tlinedFill: '#7abaf5',\n\t\t\tframeHeadingStroke: '#6cb2f3',\n\t\t\tframeHeadingFill: '#f8fbfe',\n\t\t\tframeStroke: '#6cb2f3',\n\t\t\tframeFill: '#fafcff',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#9BC4FD',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#ddedfa',\n\t\t\tpattern: '#6fbbf8',\n\t\t\thighlightSrgb: '#00f4ff',\n\t\t\thighlightP3: 'color(display-p3 0.1512 0.9414 0.9996)',\n\t\t},\n\t\t'light-green': {\n\t\t\tsolid: '#4cb05e',\n\t\t\tfill: '#4cb05e',\n\t\t\tlinedFill: '#7ec88c',\n\t\t\tframeHeadingStroke: '#6dbe7c',\n\t\t\tframeHeadingFill: '#f8fcf9',\n\t\t\tframeStroke: '#6dbe7c',\n\t\t\tframeFill: '#fafdfa',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#98D08A',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#dbf0e0',\n\t\t\tpattern: '#65cb78',\n\t\t\thighlightSrgb: '#65f641',\n\t\t\thighlightP3: 'color(display-p3 0.563 0.9495 0.3857)',\n\t\t},\n\t\t'light-red': {\n\t\t\tsolid: '#f87777',\n\t\t\tfill: '#f87777',\n\t\t\tlinedFill: '#f99a9a',\n\t\t\tframeHeadingStroke: '#f89090',\n\t\t\tframeHeadingFill: '#fffafa',\n\t\t\tframeStroke: '#f89090',\n\t\t\tframeFill: '#fffbfb',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#F7A5A1',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#f4dadb',\n\t\t\tpattern: '#fe9e9e',\n\t\t\thighlightSrgb: '#ff7fa3',\n\t\t\thighlightP3: 'color(display-p3 0.9988 0.5301 0.6397)',\n\t\t},\n\t\t'light-violet': {\n\t\t\tsolid: '#e085f4',\n\t\t\tfill: '#e085f4',\n\t\t\tlinedFill: '#e9abf7',\n\t\t\tframeHeadingStroke: '#e59bf5',\n\t\t\tframeHeadingFill: '#fefaff',\n\t\t\tframeStroke: '#e59bf5',\n\t\t\tframeFill: '#fefbff',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#DFB0F9',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#f5eafa',\n\t\t\tpattern: '#e9acf8',\n\t\t\thighlightSrgb: '#ff88ff',\n\t\t\thighlightP3: 'color(display-p3 0.9676 0.5652 0.9999)',\n\t\t},\n\t\torange: {\n\t\t\tsolid: '#e16919',\n\t\t\tfill: '#e16919',\n\t\t\tlinedFill: '#ea8643',\n\t\t\tframeHeadingStroke: '#e68544',\n\t\t\tframeHeadingFill: '#fef9f6',\n\t\t\tframeStroke: '#e68544',\n\t\t\tframeFill: '#fef9f6',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#FAA475',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#f8e2d4',\n\t\t\tpattern: '#f78438',\n\t\t\thighlightSrgb: '#ffa500',\n\t\t\thighlightP3: 'color(display-p3 0.9988 0.6905 0.266)',\n\t\t},\n\t\tred: {\n\t\t\tsolid: '#e03131',\n\t\t\tfill: '#e03131',\n\t\t\tlinedFill: '#e75f5f',\n\t\t\tframeHeadingStroke: '#e55757',\n\t\t\tframeHeadingFill: '#fef7f7',\n\t\t\tframeStroke: '#e55757',\n\t\t\tframeFill: '#fef9f9',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#FC8282',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#f4dadb',\n\t\t\tpattern: '#e55959',\n\t\t\thighlightSrgb: '#ff636e',\n\t\t\thighlightP3: 'color(display-p3 0.9992 0.4376 0.45)',\n\t\t},\n\t\tviolet: {\n\t\t\tsolid: '#ae3ec9',\n\t\t\tfill: '#ae3ec9',\n\t\t\tlinedFill: '#be68d4',\n\t\t\tframeHeadingStroke: '#bc62d3',\n\t\t\tframeHeadingFill: '#fcf7fd',\n\t\t\tframeStroke: '#bc62d3',\n\t\t\tframeFill: '#fdf9fd',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#DB91FD',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#ecdcf2',\n\t\t\tpattern: '#bd63d3',\n\t\t\thighlightSrgb: '#c77cff',\n\t\t\thighlightP3: 'color(display-p3 0.7469 0.5089 0.9995)',\n\t\t},\n\t\tyellow: {\n\t\t\tsolid: '#f1ac4b',\n\t\t\tfill: '#f1ac4b',\n\t\t\tlinedFill: '#f5c27a',\n\t\t\tframeHeadingStroke: '#f3bb6c',\n\t\t\tframeHeadingFill: '#fefcf8',\n\t\t\tframeStroke: '#f3bb6c',\n\t\t\tframeFill: '#fffdfa',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#FED49A',\n\t\t\tnoteText: '#000000',\n\t\t\tsemi: '#f9f0e6',\n\t\t\tpattern: '#fecb92',\n\t\t\thighlightSrgb: '#fddd00',\n\t\t\thighlightP3: 'color(display-p3 0.972 0.8705 0.05)',\n\t\t},\n\t\twhite: {\n\t\t\tsolid: '#FFFFFF',\n\t\t\tfill: '#FFFFFF',\n\t\t\tlinedFill: '#ffffff',\n\t\t\tsemi: '#f5f5f5',\n\t\t\tpattern: '#f9f9f9',\n\t\t\tframeHeadingStroke: '#7d7d7d',\n\t\t\tframeHeadingFill: '#ffffff',\n\t\t\tframeStroke: '#7d7d7d',\n\t\t\tframeFill: '#ffffff',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#FFFFFF',\n\t\t\tnoteText: '#000000',\n\t\t\thighlightSrgb: '#ffffff',\n\t\t\thighlightP3: 'color(display-p3 1 1 1)',\n\t\t},\n\t},\n\tdarkMode: {\n\t\tid: 'dark',\n\t\ttext: 'hsl(210, 17%, 98%)',\n\t\tbackground: 'hsl(240, 5%, 6.5%)',\n\t\tsolid: '#010403',\n\n\t\tblack: {\n\t\t\tsolid: '#f2f2f2',\n\t\t\tfill: '#f2f2f2',\n\t\t\tlinedFill: '#ffffff',\n\t\t\tframeHeadingStroke: '#5c5c5c',\n\t\t\tframeHeadingFill: '#252525',\n\t\t\tframeStroke: '#5c5c5c',\n\t\t\tframeFill: '#0c0c0c',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#2c2c2c',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#2c3036',\n\t\t\tpattern: '#989898',\n\t\t\thighlightSrgb: '#d2b700',\n\t\t\thighlightP3: 'color(display-p3 0.8078 0.6225 0.0312)',\n\t\t},\n\t\tblue: {\n\t\t\tsolid: '#4f72fc', // 3c60f0\n\t\t\tfill: '#4f72fc',\n\t\t\tlinedFill: '#3c5cdd',\n\t\t\tframeHeadingStroke: '#384994',\n\t\t\tframeHeadingFill: '#1C2036',\n\t\t\tframeStroke: '#384994',\n\t\t\tframeFill: '#11141f',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#2A3F98',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#262d40',\n\t\t\tpattern: '#3a4b9e',\n\t\t\thighlightSrgb: '#0079d2',\n\t\t\thighlightP3: 'color(display-p3 0.0032 0.4655 0.7991)',\n\t\t},\n\t\tgreen: {\n\t\t\tsolid: '#099268',\n\t\t\tfill: '#099268',\n\t\t\tlinedFill: '#087856',\n\t\t\tframeHeadingStroke: '#10513C',\n\t\t\tframeHeadingFill: '#14241f',\n\t\t\tframeStroke: '#10513C',\n\t\t\tframeFill: '#0E1614',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#014429',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#253231',\n\t\t\tpattern: '#366a53',\n\t\t\thighlightSrgb: '#009774',\n\t\t\thighlightP3: 'color(display-p3 0.0085 0.582 0.4604)',\n\t\t},\n\t\tgrey: {\n\t\t\tsolid: '#9398b0',\n\t\t\tfill: '#9398b0',\n\t\t\tlinedFill: '#8388a5',\n\t\t\tframeHeadingStroke: '#42474D',\n\t\t\tframeHeadingFill: '#23262A',\n\t\t\tframeStroke: '#42474D',\n\t\t\tframeFill: '#151719',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#56595F',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#33373c',\n\t\t\tpattern: '#7c8187',\n\t\t\thighlightSrgb: '#9cb4cb',\n\t\t\thighlightP3: 'color(display-p3 0.6299 0.7012 0.7856)',\n\t\t},\n\t\t'light-blue': {\n\t\t\tsolid: '#4dabf7',\n\t\t\tfill: '#4dabf7',\n\t\t\tlinedFill: '#2793ec',\n\t\t\tframeHeadingStroke: '#075797',\n\t\t\tframeHeadingFill: '#142839',\n\t\t\tframeStroke: '#075797',\n\t\t\tframeFill: '#0B1823',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#1F5495',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#2a3642',\n\t\t\tpattern: '#4d7aa9',\n\t\t\thighlightSrgb: '#00bdc8',\n\t\t\thighlightP3: 'color(display-p3 0.0023 0.7259 0.7735)',\n\t\t},\n\t\t'light-green': {\n\t\t\tsolid: '#40c057',\n\t\t\tfill: '#40c057',\n\t\t\tlinedFill: '#37a44b',\n\t\t\tframeHeadingStroke: '#1C5427',\n\t\t\tframeHeadingFill: '#18251A',\n\t\t\tframeStroke: '#1C5427',\n\t\t\tframeFill: '#0F1911',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#21581D',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#2a3830',\n\t\t\tpattern: '#4e874e',\n\t\t\thighlightSrgb: '#00a000',\n\t\t\thighlightP3: 'color(display-p3 0.2711 0.6172 0.0195)',\n\t\t},\n\t\t'light-red': {\n\t\t\tsolid: '#ff8787',\n\t\t\tfill: '#ff8787',\n\t\t\tlinedFill: '#ff6666',\n\t\t\tframeHeadingStroke: '#6f3232', // Darker and desaturated variant of solid\n\t\t\tframeHeadingFill: '#341818', // Deep, muted dark red\n\t\t\tframeStroke: '#6f3232', // Matches headingStroke\n\t\t\tframeFill: '#181212', // Darker, muted background shade\n\t\t\tframeText: '#f2f2f2', // Consistent bright text color\n\t\t\tnoteFill: '#7a3333', // Medium-dark, muted variant of solid\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#3c2b2b', // Subdued, darker neutral-red tone\n\t\t\tpattern: '#a56767', // Existing pattern shade retained\n\t\t\thighlightSrgb: '#db005b',\n\t\t\thighlightP3: 'color(display-p3 0.7849 0.0585 0.3589)',\n\t\t},\n\t\t'light-violet': {\n\t\t\tsolid: '#e599f7',\n\t\t\tfill: '#e599f7',\n\t\t\tlinedFill: '#dc71f4',\n\t\t\tframeHeadingStroke: '#6c367a',\n\t\t\tframeHeadingFill: '#2D2230',\n\t\t\tframeStroke: '#6c367a',\n\t\t\tframeFill: '#1C151E',\n\t\t\tframeText: '#f2f2f2',\n\t\t\tnoteFill: '#762F8E',\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#383442',\n\t\t\tpattern: '#9770a9',\n\t\t\thighlightSrgb: '#c400c7',\n\t\t\thighlightP3: 'color(display-p3 0.7024 0.0403 0.753)',\n\t\t},\n\t\torange: {\n\t\t\tsolid: '#f76707',\n\t\t\tfill: '#f76707',\n\t\t\tlinedFill: '#f54900',\n\t\t\tframeHeadingStroke: '#773a0e', // Darker, muted version of solid\n\t\t\tframeHeadingFill: '#2f1d13', // Deep, warm, muted background\n\t\t\tframeStroke: '#773a0e', // Matches headingStroke\n\t\t\tframeFill: '#1c1512', // Darker, richer muted background\n\t\t\tframeText: '#f2f2f2', // Bright text for contrast\n\t\t\tnoteFill: '#7c3905', // Muted dark variant for note fill\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#3b2e27', // Muted neutral-orange tone\n\t\t\tpattern: '#9f552d', // Retained existing shade\n\t\t\thighlightSrgb: '#d07a00',\n\t\t\thighlightP3: 'color(display-p3 0.7699 0.4937 0.0085)',\n\t\t},\n\t\tred: {\n\t\t\tsolid: '#e03131',\n\t\t\tfill: '#e03131',\n\t\t\tlinedFill: '#c31d1d',\n\t\t\tframeHeadingStroke: '#701e1e', // Darker, muted variation of solid\n\t\t\tframeHeadingFill: '#301616', // Deep, muted reddish backdrop\n\t\t\tframeStroke: '#701e1e', // Matches headingStroke\n\t\t\tframeFill: '#1b1313', // Rich, dark muted background\n\t\t\tframeText: '#f2f2f2', // Bright text for readability\n\t\t\tnoteFill: '#7e201f', // Muted dark variant for note fill\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#382726', // Dark neutral-red tone\n\t\t\tpattern: '#8f3734', // Existing pattern color retained\n\t\t\thighlightSrgb: '#de002c',\n\t\t\thighlightP3: 'color(display-p3 0.7978 0.0509 0.2035)',\n\t\t},\n\t\tviolet: {\n\t\t\tsolid: '#ae3ec9',\n\t\t\tfill: '#ae3ec9',\n\t\t\tlinedFill: '#8f2fa7',\n\t\t\tframeHeadingStroke: '#6d1583', // Darker, muted variation of solid\n\t\t\tframeHeadingFill: '#27152e', // Deep, rich muted violet backdrop\n\t\t\tframeStroke: '#6d1583', // Matches headingStroke\n\t\t\tframeFill: '#1b0f21', // Darker muted violet background\n\t\t\tframeText: '#f2f2f2', // Consistent bright text color\n\t\t\tnoteFill: '#5f1c70', // Muted dark variant for note fill\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#342938', // Dark neutral-violet tone\n\t\t\tpattern: '#763a8b', // Retained existing pattern color\n\t\t\thighlightSrgb: '#9e00ee',\n\t\t\thighlightP3: 'color(display-p3 0.5651 0.0079 0.8986)',\n\t\t},\n\t\tyellow: {\n\t\t\tsolid: '#ffc034',\n\t\t\tfill: '#ffc034',\n\t\t\tlinedFill: '#ffae00',\n\t\t\tframeHeadingStroke: '#684e12', // Darker, muted variant of solid\n\t\t\tframeHeadingFill: '#2a2113', // Rich, muted dark-yellow background\n\t\t\tframeStroke: '#684e12', // Matches headingStroke\n\t\t\tframeFill: '#1e1911', // Darker muted shade for background fill\n\t\t\tframeText: '#f2f2f2', // Bright text color for readability\n\t\t\tnoteFill: '#8a5e1c', // Muted, dark complementary variant\n\t\t\tnoteText: '#f2f2f2',\n\t\t\tsemi: '#3b352b', // Dark muted neutral-yellow tone\n\t\t\tpattern: '#fecb92', // Existing shade retained\n\t\t\thighlightSrgb: '#d2b700',\n\t\t\thighlightP3: 'color(display-p3 0.8078 0.7225 0.0312)',\n\t\t},\n\t\twhite: {\n\t\t\tsolid: '#f3f3f3',\n\t\t\tfill: '#f3f3f3',\n\t\t\tlinedFill: '#f3f3f3',\n\t\t\tsemi: '#f5f5f5',\n\t\t\tpattern: '#f9f9f9',\n\t\t\tframeHeadingStroke: '#ffffff',\n\t\t\tframeHeadingFill: '#ffffff',\n\t\t\tframeStroke: '#ffffff',\n\t\t\tframeFill: '#ffffff',\n\t\t\tframeText: '#000000',\n\t\t\tnoteFill: '#eaeaea',\n\t\t\tnoteText: '#1d1d1d',\n\t\t\thighlightSrgb: '#ffffff',\n\t\t\thighlightP3: 'color(display-p3 1 1 1)',\n\t\t},\n\t},\n}\n\n/**\n * Returns the appropriate default color theme based on the dark mode preference.\n *\n * @param opts - Configuration options\n * - isDarkMode - Whether to return the dark theme (true) or light theme (false)\n * @returns The corresponding TLDefaultColorTheme (light or dark)\n *\n * @example\n * ```ts\n * import { getDefaultColorTheme } from '@tldraw/tlschema'\n *\n * // Get light theme\n * const lightTheme = getDefaultColorTheme({ isDarkMode: false })\n *\n * // Get dark theme\n * const darkTheme = getDefaultColorTheme({ isDarkMode: true })\n *\n * // Use with editor\n * const theme = getDefaultColorTheme({ isDarkMode: window.matchMedia('(prefers-color-scheme: dark)').matches })\n * ```\n *\n * @public\n */\nexport function getDefaultColorTheme(opts: { isDarkMode: boolean }): TLDefaultColorTheme {\n\treturn opts.isDarkMode ? DefaultColorThemePalette.darkMode : DefaultColorThemePalette.lightMode\n}\n\n/**\n * Default color style property used by tldraw shapes for their primary color.\n * This style prop allows shapes to use any of the default color names and\n * automatically saves the last used value for new shapes.\n *\n * @example\n * ```ts\n * import { DefaultColorStyle } from '@tldraw/tlschema'\n *\n * // Use in shape props definition\n * interface MyShapeProps {\n * color: typeof DefaultColorStyle\n * // other props...\n * }\n *\n * // Set color on a shape\n * const shape = {\n * // ... other properties\n * props: {\n * color: 'red' as const,\n * // ... other props\n * }\n * }\n * ```\n *\n * @public\n */\nexport const DefaultColorStyle = StyleProp.defineEnum('tldraw:color', {\n\tdefaultValue: 'black',\n\tvalues: defaultColorNames,\n})\n\n/**\n * Default label color style property used for text labels on shapes.\n * This is separate from the main color style to allow different colors\n * for shape fills/strokes versus their text labels.\n *\n * @example\n * ```ts\n * import { DefaultLabelColorStyle } from '@tldraw/tlschema'\n *\n * // Use in shape props definition\n * interface MyShapeProps {\n * labelColor: typeof DefaultLabelColorStyle\n * // other props...\n * }\n *\n * // Create a shape with different fill and label colors\n * const shape = {\n * // ... other properties\n * props: {\n * color: 'blue' as const,\n * labelColor: 'white' as const,\n * // ... other props\n * }\n * }\n * ```\n *\n * @public\n */\nexport const DefaultLabelColorStyle = StyleProp.defineEnum('tldraw:labelColor', {\n\tdefaultValue: 'black',\n\tvalues: defaultColorNames,\n})\n\n/**\n * Type representing a default color style value.\n * This is a union type of all available default color names.\n *\n * @example\n * ```ts\n * import { TLDefaultColorStyle } from '@tldraw/tlschema'\n *\n * // Valid color values\n * const redColor: TLDefaultColorStyle = 'red'\n * const blueColor: TLDefaultColorStyle = 'blue'\n *\n * // Type guard usage\n * function isValidColor(color: string): color is TLDefaultColorStyle {\n * return ['black', 'red', 'blue'].includes(color as TLDefaultColorStyle)\n * }\n * ```\n *\n * @public\n */\nexport type TLDefaultColorStyle = T.TypeOf<typeof DefaultColorStyle>\n\nconst defaultColorNamesSet = new Set(defaultColorNames)\n\n/**\n * Type guard to check if a color value is one of the default theme colors.\n * Useful for determining if a color can be looked up in the theme palette.\n *\n * @param color - The color value to check\n * @returns True if the color is a default theme color, false otherwise\n *\n * @example\n * ```ts\n * import { isDefaultThemeColor, TLDefaultColorStyle } from '@tldraw/tlschema'\n *\n * const color: TLDefaultColorStyle = 'red'\n *\n * if (isDefaultThemeColor(color)) {\n * // color is guaranteed to be a default theme color\n * console.log(`${color} is a default theme color`)\n * } else {\n * // color might be a custom hex value or other format\n * console.log(`${color} is a custom color`)\n * }\n * ```\n *\n * @public\n */\nexport function isDefaultThemeColor(\n\tcolor: TLDefaultColorStyle\n): color is (typeof defaultColorNames)[number] {\n\treturn defaultColorNamesSet.has(color as (typeof defaultColorNames)[number])\n}\n\n/**\n * Resolves a color style value to its actual CSS color string for a given theme and variant.\n * If the color is not a default theme color, returns the color value as-is.\n *\n * @param theme - The color theme to use for resolution\n * @param color - The color style value to resolve\n * @param variant - Which variant of the color to return (solid, fill, pattern, etc.)\n * @returns The CSS color string for the specified color and variant\n *\n * @example\n * ```ts\n * import { getColorValue, getDefaultColorTheme } from '@tldraw/tlschema'\n *\n * const theme = getDefaultColorTheme({ isDarkMode: false })\n *\n * // Get the solid variant of red\n * const redSolid = getColorValue(theme, 'red', 'solid') // '#e03131'\n *\n * // Get the fill variant of blue\n * const blueFill = getColorValue(theme, 'blue', 'fill') // '#4465e9'\n *\n * // Custom color passes through unchanged\n * const customColor = getColorValue(theme, '#ff0000', 'solid') // '#ff0000'\n * ```\n *\n * @public\n */\nexport function getColorValue(\n\ttheme: TLDefaultColorTheme,\n\tcolor: TLDefaultColorStyle,\n\tvariant: keyof TLDefaultColorThemeColor\n): string {\n\tif (!isDefaultThemeColor(color)) {\n\t\treturn color\n\t}\n\n\treturn theme[color][variant]\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,uBAA0B;AAoBnB,MAAM,oBAAoB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAyFO,MAAM,2BAGT;AAAA,EACH,WAAW;AAAA,IACV,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,OAAO;AAAA,MACN,OAAO;AAAA,MACP,MAAM;AAAA,MACN,WAAW;AAAA,MACX,oBAAoB;AAAA,MACpB,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,WAAW;AAAA,MACX,WAAW;AAAA,MACX,UAAU;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d,QAAQ;AACT,CAAC;AA8BM,MAAM,yBAAyB,2BAAU,WAAW,qBAAqB;AAAA,EAC/E,cAAc;AAAA,EACd,QAAQ;AACT,CAAC;AAwBD,MAAM,uBAAuB,IAAI,IAAI,iBAAiB;AA0B/C,SAAS,oBACf,OAC8C;AAC9C,SAAO,qBAAqB,IAAI,KAA2C;AAC5E;AA6BO,SAAS,cACf,OACA,OACA,SACS;AACT,MAAI,CAAC,oBAAoB,KAAK,GAAG;AAChC,WAAO;AAAA,EACR;AAEA,SAAO,MAAM,KAAK,EAAE,OAAO;AAC5B;",
6
6
  "names": []
7
7
  }
@@ -24,6 +24,6 @@ module.exports = __toCommonJS(TLFillStyle_exports);
24
24
  var import_StyleProp = require("./StyleProp");
25
25
  const DefaultFillStyle = import_StyleProp.StyleProp.defineEnum("tldraw:fill", {
26
26
  defaultValue: "none",
27
- values: ["none", "semi", "solid", "pattern", "fill"]
27
+ values: ["none", "semi", "solid", "pattern", "fill", "lined-fill"]
28
28
  });
29
29
  //# sourceMappingURL=TLFillStyle.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/styles/TLFillStyle.ts"],
4
- "sourcesContent": ["import { T } from '@tldraw/validate'\nimport { StyleProp } from './StyleProp'\n\n/**\n * Default fill style property used by tldraw shapes for interior styling.\n * Controls how the inside of shapes are filled or left empty.\n *\n * Available values:\n * - `none` - No fill, shape interior is transparent\n * - `semi` - Semi-transparent fill using the shape's color\n * - `solid` - Solid fill using the shape's color\n * - `pattern` - Crosshatch pattern fill using the shape's color\n * - `fill` - Alternative solid fill variant\n *\n * @example\n * ```ts\n * import { DefaultFillStyle } from '@tldraw/tlschema'\n *\n * // Use in shape props definition\n * interface MyShapeProps {\n * fill: typeof DefaultFillStyle\n * // other props...\n * }\n *\n * // Create a shape with solid fill\n * const shape = {\n * // ... other properties\n * props: {\n * fill: 'solid' as const,\n * // ... other props\n * }\n * }\n * ```\n *\n * @public\n */\nexport const DefaultFillStyle = StyleProp.defineEnum('tldraw:fill', {\n\tdefaultValue: 'none',\n\tvalues: ['none', 'semi', 'solid', 'pattern', 'fill'],\n})\n\n/**\n * Type representing a default fill style value.\n * This is a union type of all available fill style options.\n *\n * @example\n * ```ts\n * import { TLDefaultFillStyle } from '@tldraw/tlschema'\n *\n * // Valid fill style values\n * const noFill: TLDefaultFillStyle = 'none'\n * const solidFill: TLDefaultFillStyle = 'solid'\n * const patternFill: TLDefaultFillStyle = 'pattern'\n *\n * // Use in a function parameter\n * function setShapeFill(fill: TLDefaultFillStyle) {\n * // Apply fill style to shape\n * }\n * ```\n *\n * @public\n */\nexport type TLDefaultFillStyle = T.TypeOf<typeof DefaultFillStyle>\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAA0B;AAmCnB,MAAM,mBAAmB,2BAAU,WAAW,eAAe;AAAA,EACnE,cAAc;AAAA,EACd,QAAQ,CAAC,QAAQ,QAAQ,SAAS,WAAW,MAAM;AACpD,CAAC;",
4
+ "sourcesContent": ["import { T } from '@tldraw/validate'\nimport { StyleProp } from './StyleProp'\n\n/**\n * Default fill style property used by tldraw shapes for interior styling.\n * Controls how the inside of shapes are filled or left empty.\n *\n * Available values:\n * - `none` - No fill, shape interior is transparent\n * - `semi` - Semi-transparent fill using the shape's color\n * - `solid` - Solid fill using the shape's color\n * - `pattern` - Crosshatch pattern fill using the shape's color\n * - `fill` - Alternative solid fill variant\n *\n * @example\n * ```ts\n * import { DefaultFillStyle } from '@tldraw/tlschema'\n *\n * // Use in shape props definition\n * interface MyShapeProps {\n * fill: typeof DefaultFillStyle\n * // other props...\n * }\n *\n * // Create a shape with solid fill\n * const shape = {\n * // ... other properties\n * props: {\n * fill: 'solid' as const,\n * // ... other props\n * }\n * }\n * ```\n *\n * @public\n */\nexport const DefaultFillStyle = StyleProp.defineEnum('tldraw:fill', {\n\tdefaultValue: 'none',\n\tvalues: ['none', 'semi', 'solid', 'pattern', 'fill', 'lined-fill'],\n})\n\n/**\n * Type representing a default fill style value.\n * This is a union type of all available fill style options.\n *\n * @example\n * ```ts\n * import { TLDefaultFillStyle } from '@tldraw/tlschema'\n *\n * // Valid fill style values\n * const noFill: TLDefaultFillStyle = 'none'\n * const solidFill: TLDefaultFillStyle = 'solid'\n * const patternFill: TLDefaultFillStyle = 'pattern'\n *\n * // Use in a function parameter\n * function setShapeFill(fill: TLDefaultFillStyle) {\n * // Apply fill style to shape\n * }\n * ```\n *\n * @public\n */\nexport type TLDefaultFillStyle = T.TypeOf<typeof DefaultFillStyle>\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAA0B;AAmCnB,MAAM,mBAAmB,2BAAU,WAAW,eAAe;AAAA,EACnE,cAAc;AAAA,EACd,QAAQ,CAAC,QAAQ,QAAQ,SAAS,WAAW,QAAQ,YAAY;AAClE,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/bindings/TLBaseBinding.ts"],
4
- "sourcesContent": ["import { BaseRecord } from '@tldraw/store'\nimport { JsonObject } from '@tldraw/utils'\nimport { T } from '@tldraw/validate'\nimport { idValidator } from '../misc/id-validator'\nimport { TLBindingId } from '../records/TLBinding'\nimport { TLShapeId } from '../records/TLShape'\nimport { shapeIdValidator } from '../shapes/TLBaseShape'\n\n/**\n * Base interface for all binding types in tldraw. Bindings represent relationships\n * between shapes, such as arrows connecting to other shapes or organizational connections.\n *\n * All bindings extend this base interface with specific type and property definitions.\n * The binding system enables shapes to maintain relationships that persist through\n * transformations, movements, and other operations.\n *\n * @param Type - String literal type identifying the specific binding type (e.g., 'arrow')\n * @param Props - Object containing binding-specific properties and configuration\n *\n * @example\n * ```ts\n * // Define a custom binding type\n * interface MyCustomBinding extends TLBaseBinding<'custom', MyCustomProps> {}\n *\n * interface MyCustomProps {\n * strength: number\n * color: string\n * }\n *\n * // Create a binding instance\n * const binding: MyCustomBinding = {\n * id: 'binding:abc123',\n * typeName: 'binding',\n * type: 'custom',\n * fromId: 'shape:source1',\n * toId: 'shape:target1',\n * props: {\n * strength: 0.8,\n * color: 'red'\n * },\n * meta: {}\n * }\n * ```\n *\n * @public\n */\nexport interface TLBaseBinding<Type extends string, Props extends object>\n\textends BaseRecord<'binding', TLBindingId> {\n\t/** The specific type of this binding (e.g., 'arrow', 'custom') */\n\ttype: Type\n\t/** ID of the source shape in this binding relationship */\n\tfromId: TLShapeId\n\t/** ID of the target shape in this binding relationship */\n\ttoId: TLShapeId\n\t/** Binding-specific properties that define behavior and appearance */\n\tprops: Props\n\t/** User-defined metadata for extending binding functionality */\n\tmeta: JsonObject\n}\n\n/**\n * Validator for binding IDs. Ensures that binding identifiers follow the correct\n * format and type constraints required by the tldraw schema system.\n *\n * Used internally by the schema validation system to verify binding IDs when\n * records are created or modified. All binding IDs must be prefixed with 'binding:'.\n *\n * @example\n * ```ts\n * import { bindingIdValidator } from '@tldraw/tlschema'\n *\n * // Validate a binding ID\n * const isValid = bindingIdValidator.isValid('binding:abc123') // true\n * const isInvalid = bindingIdValidator.isValid('shape:abc123') // false\n *\n * // Use in custom validation schema\n * const customBindingValidator = T.object({\n * id: bindingIdValidator,\n * // ... other properties\n * })\n * ```\n *\n * @public\n */\nexport const bindingIdValidator = idValidator<TLBindingId>('binding')\n\n/**\n * Creates a runtime validator for a specific binding type. This factory function\n * generates a complete validation schema for custom bindings that extends TLBaseBinding.\n *\n * The validator ensures all binding records conform to the expected structure with\n * proper type safety and runtime validation. It validates the base binding properties\n * (id, type, fromId, toId) along with custom props and meta fields.\n *\n * @param type - The string literal type identifier for this binding (e.g., 'arrow', 'custom')\n * @param props - Optional validation schema for binding-specific properties\n * @param meta - Optional validation schema for metadata fields\n *\n * @returns A validator object that can validate complete binding records\n *\n * @example\n * ```ts\n * import { createBindingValidator } from '@tldraw/tlschema'\n * import { T } from '@tldraw/validate'\n *\n * // Create validator for a custom binding type\n * const myBindingValidator = createBindingValidator(\n * 'myBinding',\n * {\n * strength: T.number,\n * color: T.string,\n * enabled: T.boolean\n * },\n * {\n * createdAt: T.number,\n * author: T.string\n * }\n * )\n *\n * // Validate a binding instance\n * const bindingData = {\n * id: 'binding:123',\n * typeName: 'binding',\n * type: 'myBinding',\n * fromId: 'shape:abc',\n * toId: 'shape:def',\n * props: {\n * strength: 0.8,\n * color: 'red',\n * enabled: true\n * },\n * meta: {\n * createdAt: Date.now(),\n * author: 'user123'\n * }\n * }\n *\n * const isValid = myBindingValidator.isValid(bindingData) // true\n * ```\n *\n * @example\n * ```ts\n * // Simple binding without custom props or meta\n * const simpleBindingValidator = createBindingValidator('simple')\n *\n * // This will use JsonValue validation for props and meta\n * const binding = {\n * id: 'binding:456',\n * typeName: 'binding',\n * type: 'simple',\n * fromId: 'shape:start',\n * toId: 'shape:end',\n * props: {}, // Any JSON value allowed\n * meta: {} // Any JSON value allowed\n * }\n * ```\n *\n * @public\n */\nexport function createBindingValidator<\n\tType extends string,\n\tProps extends JsonObject,\n\tMeta extends JsonObject,\n>(\n\ttype: Type,\n\tprops?: { [K in keyof Props]: T.Validatable<Props[K]> },\n\tmeta?: { [K in keyof Meta]: T.Validatable<Meta[K]> }\n) {\n\treturn T.object<TLBaseBinding<Type, Props>>({\n\t\tid: bindingIdValidator,\n\t\ttypeName: T.literal('binding'),\n\t\ttype: T.literal(type),\n\t\tfromId: shapeIdValidator,\n\t\ttoId: shapeIdValidator,\n\t\tprops: props ? T.object(props) : (T.jsonValue as any),\n\t\tmeta: meta ? T.object(meta) : (T.jsonValue as any),\n\t})\n}\n"],
5
- "mappings": "AAEA,SAAS,SAAS;AAClB,SAAS,mBAAmB;AAG5B,SAAS,wBAAwB;AA8E1B,MAAM,qBAAqB,YAAyB,SAAS;AA2E7D,SAAS,uBAKf,MACA,OACA,MACC;AACD,SAAO,EAAE,OAAmC;AAAA,IAC3C,IAAI;AAAA,IACJ,UAAU,EAAE,QAAQ,SAAS;AAAA,IAC7B,MAAM,EAAE,QAAQ,IAAI;AAAA,IACpB,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO,QAAQ,EAAE,OAAO,KAAK,IAAK,EAAE;AAAA,IACpC,MAAM,OAAO,EAAE,OAAO,IAAI,IAAK,EAAE;AAAA,EAClC,CAAC;AACF;",
4
+ "sourcesContent": ["import { JsonObject } from '@tldraw/utils'\nimport { T } from '@tldraw/validate'\nimport { idValidator } from '../misc/id-validator'\nimport { TLBindingId } from '../records/TLBinding'\nimport { TLShapeId } from '../records/TLShape'\nimport { shapeIdValidator } from '../shapes/TLBaseShape'\n\n/**\n * Base interface for all binding types in tldraw. Bindings represent relationships\n * between shapes, such as arrows connecting to other shapes or organizational connections.\n *\n * All default bindings extend this base interface with specific type and property definitions.\n * The binding system enables shapes to maintain relationships that persist through\n * transformations, movements, and other operations.\n *\n * Custom bindings should be defined by augmenting the TLGlobalBindingPropsMap type and getting the binding type from the TLBinding type.\n *\n * @param Type - String literal type identifying the specific binding type (e.g., 'arrow')\n * @param Props - Object containing binding-specific properties and configuration\n *\n * @example\n * ```ts\n * // Define a default binding type\n * interface TLArrowBinding extends TLBaseBinding<'arrow', TLArrowBindingProps> {}\n *\n * interface TLArrowBindingProps {\n * terminal: 'start' | 'end'\n * normalizedAnchor: VecModel\n * isExact: boolean\n * isPrecise: boolean\n * snap: ElbowArrowSnap\n * }\n *\n * // Create a binding instance\n * const arrowBinding: TLArrowBinding = {\n * id: 'binding:abc123',\n * typeName: 'binding',\n * type: 'arrow',\n * fromId: 'shape:source1',\n * toId: 'shape:target1',\n * props: {\n * terminal: 'end',\n * normalizedAnchor: { x: 0.5, y: 0.5 },\n * isExact: false,\n * isPrecise: true,\n * snap: 'edge'\n * },\n * meta: {}\n * }\n * ```\n *\n * @public\n */\nexport interface TLBaseBinding<Type extends string, Props extends object> {\n\t// using real `extends BaseRecord<'binding', TLBindingId>` introduces a circularity in the types\n\t// and for that reason those \"base members\" have to be declared manually here\n\treadonly id: TLBindingId\n\treadonly typeName: 'binding'\n\n\t/** The specific type of this binding (e.g., 'arrow', 'custom') */\n\ttype: Type\n\t/** ID of the source shape in this binding relationship */\n\tfromId: TLShapeId\n\t/** ID of the target shape in this binding relationship */\n\ttoId: TLShapeId\n\t/** Binding-specific properties that define behavior and appearance */\n\tprops: Props\n\t/** User-defined metadata for extending binding functionality */\n\tmeta: JsonObject\n}\n\n/**\n * Validator for binding IDs. Ensures that binding identifiers follow the correct\n * format and type constraints required by the tldraw schema system.\n *\n * Used internally by the schema validation system to verify binding IDs when\n * records are created or modified. All binding IDs must be prefixed with 'binding:'.\n *\n * @example\n * ```ts\n * import { bindingIdValidator } from '@tldraw/tlschema'\n *\n * // Validate a binding ID\n * const isValid = bindingIdValidator.isValid('binding:abc123') // true\n * const isInvalid = bindingIdValidator.isValid('shape:abc123') // false\n *\n * // Use in custom validation schema\n * const customBindingValidator = T.object({\n * id: bindingIdValidator,\n * // ... other properties\n * })\n * ```\n *\n * @public\n */\nexport const bindingIdValidator = idValidator<TLBindingId>('binding')\n\n/**\n * Creates a runtime validator for a specific binding type. This factory function\n * generates a complete validation schema for custom bindings that extends TLBaseBinding.\n *\n * The validator ensures all binding records conform to the expected structure with\n * proper type safety and runtime validation. It validates the base binding properties\n * (id, type, fromId, toId) along with custom props and meta fields.\n *\n * @param type - The string literal type identifier for this binding (e.g., 'arrow', 'custom')\n * @param props - Optional validation schema for binding-specific properties\n * @param meta - Optional validation schema for metadata fields\n *\n * @returns A validator object that can validate complete binding records\n *\n * @example\n * ```ts\n * import { createBindingValidator } from '@tldraw/tlschema'\n * import { T } from '@tldraw/validate'\n *\n * // Create validator for a custom binding type\n * const myBindingValidator = createBindingValidator(\n * 'myBinding',\n * {\n * strength: T.number,\n * color: T.string,\n * enabled: T.boolean\n * },\n * {\n * createdAt: T.number,\n * author: T.string\n * }\n * )\n *\n * // Validate a binding instance\n * const bindingData = {\n * id: 'binding:123',\n * typeName: 'binding',\n * type: 'myBinding',\n * fromId: 'shape:abc',\n * toId: 'shape:def',\n * props: {\n * strength: 0.8,\n * color: 'red',\n * enabled: true\n * },\n * meta: {\n * createdAt: Date.now(),\n * author: 'user123'\n * }\n * }\n *\n * const isValid = myBindingValidator.isValid(bindingData) // true\n * ```\n *\n * @example\n * ```ts\n * // Simple binding without custom props or meta\n * const simpleBindingValidator = createBindingValidator('simple')\n *\n * // This will use JsonValue validation for props and meta\n * const binding = {\n * id: 'binding:456',\n * typeName: 'binding',\n * type: 'simple',\n * fromId: 'shape:start',\n * toId: 'shape:end',\n * props: {}, // Any JSON value allowed\n * meta: {} // Any JSON value allowed\n * }\n * ```\n *\n * @public\n */\nexport function createBindingValidator<\n\tType extends string,\n\tProps extends JsonObject,\n\tMeta extends JsonObject,\n>(\n\ttype: Type,\n\tprops?: { [K in keyof Props]: T.Validatable<Props[K]> },\n\tmeta?: { [K in keyof Meta]: T.Validatable<Meta[K]> }\n) {\n\treturn T.object<TLBaseBinding<Type, Props>>({\n\t\tid: bindingIdValidator,\n\t\ttypeName: T.literal('binding'),\n\t\ttype: T.literal(type),\n\t\tfromId: shapeIdValidator,\n\t\ttoId: shapeIdValidator,\n\t\tprops: props ? T.object(props) : (T.jsonValue as any),\n\t\tmeta: meta ? T.object(meta) : (T.jsonValue as any),\n\t})\n}\n"],
5
+ "mappings": "AACA,SAAS,SAAS;AAClB,SAAS,mBAAmB;AAG5B,SAAS,wBAAwB;AA0F1B,MAAM,qBAAqB,YAAyB,SAAS;AA2E7D,SAAS,uBAKf,MACA,OACA,MACC;AACD,SAAO,EAAE,OAAmC;AAAA,IAC3C,IAAI;AAAA,IACJ,UAAU,EAAE,QAAQ,SAAS;AAAA,IAC7B,MAAM,EAAE,QAAQ,IAAI;AAAA,IACpB,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO,QAAQ,EAAE,OAAO,KAAK,IAAK,EAAE;AAAA,IACpC,MAAM,OAAO,EAAE,OAAO,IAAI,IAAK,EAAE;AAAA,EAClC,CAAC;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/createTLSchema.ts"],
4
- "sourcesContent": ["import { LegacyMigrations, MigrationSequence, StoreSchema, StoreValidator } from '@tldraw/store'\nimport { objectMapValues } from '@tldraw/utils'\nimport { TLStoreProps, createIntegrityChecker, onValidationFailure } from './TLStore'\nimport { bookmarkAssetMigrations } from './assets/TLBookmarkAsset'\nimport { imageAssetMigrations } from './assets/TLImageAsset'\nimport { videoAssetMigrations } from './assets/TLVideoAsset'\nimport { arrowBindingMigrations, arrowBindingProps } from './bindings/TLArrowBinding'\nimport { AssetRecordType, assetMigrations } from './records/TLAsset'\nimport { TLBinding, TLDefaultBinding, createBindingRecordType } from './records/TLBinding'\nimport { CameraRecordType, cameraMigrations } from './records/TLCamera'\nimport { DocumentRecordType, documentMigrations } from './records/TLDocument'\nimport { createInstanceRecordType, instanceMigrations } from './records/TLInstance'\nimport { PageRecordType, pageMigrations } from './records/TLPage'\nimport { InstancePageStateRecordType, instancePageStateMigrations } from './records/TLPageState'\nimport { PointerRecordType, pointerMigrations } from './records/TLPointer'\nimport { InstancePresenceRecordType, instancePresenceMigrations } from './records/TLPresence'\nimport { TLRecord } from './records/TLRecord'\nimport {\n\tTLDefaultShape,\n\tTLShape,\n\tcreateShapeRecordType,\n\tgetShapePropKeysByStyle,\n\trootShapeMigrations,\n} from './records/TLShape'\nimport { TLPropsMigrations, processPropsMigrations } from './recordsWithProps'\nimport { arrowShapeMigrations, arrowShapeProps } from './shapes/TLArrowShape'\nimport { bookmarkShapeMigrations, bookmarkShapeProps } from './shapes/TLBookmarkShape'\nimport { drawShapeMigrations, drawShapeProps } from './shapes/TLDrawShape'\nimport { embedShapeMigrations, embedShapeProps } from './shapes/TLEmbedShape'\nimport { frameShapeMigrations, frameShapeProps } from './shapes/TLFrameShape'\nimport { geoShapeMigrations, geoShapeProps } from './shapes/TLGeoShape'\nimport { groupShapeMigrations, groupShapeProps } from './shapes/TLGroupShape'\nimport { highlightShapeMigrations, highlightShapeProps } from './shapes/TLHighlightShape'\nimport { imageShapeMigrations, imageShapeProps } from './shapes/TLImageShape'\nimport { lineShapeMigrations, lineShapeProps } from './shapes/TLLineShape'\nimport { noteShapeMigrations, noteShapeProps } from './shapes/TLNoteShape'\nimport { textShapeMigrations, textShapeProps } from './shapes/TLTextShape'\nimport { videoShapeMigrations, videoShapeProps } from './shapes/TLVideoShape'\nimport { storeMigrations } from './store-migrations'\nimport { StyleProp } from './styles/StyleProp'\n\n/**\n * Configuration information for a schema type (shape or binding), including its properties,\n * metadata, and migration sequences for data evolution over time.\n *\n * @public\n * @example\n * ```ts\n * import { arrowShapeMigrations, arrowShapeProps } from './shapes/TLArrowShape'\n *\n * const myShapeSchema: SchemaPropsInfo = {\n * migrations: arrowShapeMigrations,\n * props: arrowShapeProps,\n * meta: {\n * customField: T.string,\n * },\n * }\n * ```\n */\nexport interface SchemaPropsInfo {\n\t/**\n\t * Migration sequences for handling data evolution over time. Can be legacy migrations,\n\t * props-specific migrations, or general migration sequences.\n\t */\n\tmigrations?: LegacyMigrations | TLPropsMigrations | MigrationSequence\n\n\t/**\n\t * Validation schema for the shape or binding properties. Maps property names to their validators.\n\t */\n\tprops?: Record<string, StoreValidator<any>>\n\n\t/**\n\t * Validation schema for metadata fields. Maps metadata field names to their validators.\n\t */\n\tmeta?: Record<string, StoreValidator<any>>\n}\n\n/**\n * The complete schema definition for a tldraw store, encompassing all record types,\n * validation rules, and migration sequences. This schema defines the structure of\n * the persistent data model used by tldraw.\n *\n * @public\n * @example\n * ```ts\n * import { createTLSchema, defaultShapeSchemas } from '@tldraw/tlschema'\n * import { Store } from '@tldraw/store'\n *\n * const schema: TLSchema = createTLSchema({\n * shapes: defaultShapeSchemas,\n * })\n *\n * const store = new Store({ schema })\n * ```\n */\nexport type TLSchema = StoreSchema<TLRecord, TLStoreProps>\n\n/**\n * Default shape schema configurations for all built-in tldraw shape types.\n * Each shape type includes its validation props and migration sequences.\n *\n * This object contains schema information for:\n * - arrow: Directional lines that can bind to other shapes\n * - bookmark: Website bookmark cards with preview information\n * - draw: Freehand drawing paths created with drawing tools\n * - embed: Embedded content from external services (YouTube, Figma, etc.)\n * - frame: Container shapes for organizing content\n * - geo: Geometric shapes (rectangles, ellipses, triangles, etc.)\n * - group: Logical groupings of multiple shapes\n * - highlight: Highlighting strokes from the highlighter tool\n * - image: Raster image shapes referencing image assets\n * - line: Multi-point lines and splines\n * - note: Sticky note shapes with text content\n * - text: Rich text shapes with formatting support\n * - video: Video shapes referencing video assets\n *\n * @public\n * @example\n * ```ts\n * import { createTLSchema, defaultShapeSchemas } from '@tldraw/tlschema'\n *\n * // Use all default shapes\n * const schema = createTLSchema({\n * shapes: defaultShapeSchemas,\n * })\n *\n * // Use only specific default shapes\n * const minimalSchema = createTLSchema({\n * shapes: {\n * geo: defaultShapeSchemas.geo,\n * text: defaultShapeSchemas.text,\n * },\n * })\n * ```\n */\nexport const defaultShapeSchemas = {\n\tarrow: { migrations: arrowShapeMigrations, props: arrowShapeProps },\n\tbookmark: { migrations: bookmarkShapeMigrations, props: bookmarkShapeProps },\n\tdraw: { migrations: drawShapeMigrations, props: drawShapeProps },\n\tembed: { migrations: embedShapeMigrations, props: embedShapeProps },\n\tframe: { migrations: frameShapeMigrations, props: frameShapeProps },\n\tgeo: { migrations: geoShapeMigrations, props: geoShapeProps },\n\tgroup: { migrations: groupShapeMigrations, props: groupShapeProps },\n\thighlight: { migrations: highlightShapeMigrations, props: highlightShapeProps },\n\timage: { migrations: imageShapeMigrations, props: imageShapeProps },\n\tline: { migrations: lineShapeMigrations, props: lineShapeProps },\n\tnote: { migrations: noteShapeMigrations, props: noteShapeProps },\n\ttext: { migrations: textShapeMigrations, props: textShapeProps },\n\tvideo: { migrations: videoShapeMigrations, props: videoShapeProps },\n} satisfies { [T in TLDefaultShape['type']]: SchemaPropsInfo }\n\n/**\n * Default binding schema configurations for all built-in tldraw binding types.\n * Bindings represent relationships between shapes, such as arrows connected to shapes.\n *\n * Currently includes:\n * - arrow: Bindings that connect arrow shapes to other shapes at specific anchor points\n *\n * @public\n * @example\n * ```ts\n * import { createTLSchema, defaultBindingSchemas } from '@tldraw/tlschema'\n *\n * // Use default bindings\n * const schema = createTLSchema({\n * bindings: defaultBindingSchemas,\n * })\n *\n * // Add custom binding alongside defaults\n * const customSchema = createTLSchema({\n * bindings: {\n * ...defaultBindingSchemas,\n * myCustomBinding: {\n * props: myCustomBindingProps,\n * migrations: myCustomBindingMigrations,\n * },\n * },\n * })\n * ```\n */\nexport const defaultBindingSchemas = {\n\tarrow: { migrations: arrowBindingMigrations, props: arrowBindingProps },\n} satisfies { [T in TLDefaultBinding['type']]: SchemaPropsInfo }\n\n/**\n * Creates a complete TLSchema for use with tldraw stores. This schema defines the structure,\n * validation, and migration sequences for all record types in a tldraw application.\n *\n * The schema includes all core record types (pages, cameras, instances, etc.) plus the\n * shape and binding types you specify. Style properties are automatically collected from\n * all shapes to ensure consistency across the application.\n *\n * @param options - Configuration options for the schema\n * - shapes - Shape schema configurations. Defaults to defaultShapeSchemas if not provided\n * - bindings - Binding schema configurations. Defaults to defaultBindingSchemas if not provided\n * - migrations - Additional migration sequences to include in the schema\n * @returns A complete TLSchema ready for use with Store creation\n *\n * @public\n * @example\n * ```ts\n * import { createTLSchema, defaultShapeSchemas, defaultBindingSchemas } from '@tldraw/tlschema'\n * import { Store } from '@tldraw/store'\n *\n * // Create schema with all default shapes and bindings\n * const schema = createTLSchema()\n *\n * // Create schema with custom shapes added\n * const customSchema = createTLSchema({\n * shapes: {\n * ...defaultShapeSchemas,\n * myCustomShape: {\n * props: myCustomShapeProps,\n * migrations: myCustomShapeMigrations,\n * },\n * },\n * })\n *\n * // Create schema with only specific shapes\n * const minimalSchema = createTLSchema({\n * shapes: {\n * geo: defaultShapeSchemas.geo,\n * text: defaultShapeSchemas.text,\n * },\n * bindings: defaultBindingSchemas,\n * })\n *\n * // Use the schema with a store\n * const store = new Store({\n * schema: customSchema,\n * props: {\n * defaultName: 'My Drawing',\n * },\n * })\n * ```\n */\nexport function createTLSchema({\n\tshapes = defaultShapeSchemas,\n\tbindings = defaultBindingSchemas,\n\tmigrations,\n}: {\n\tshapes?: Record<string, SchemaPropsInfo>\n\tbindings?: Record<string, SchemaPropsInfo>\n\tmigrations?: readonly MigrationSequence[]\n} = {}): TLSchema {\n\tconst stylesById = new Map<string, StyleProp<unknown>>()\n\tfor (const shape of objectMapValues(shapes)) {\n\t\tfor (const style of getShapePropKeysByStyle(shape.props ?? {}).keys()) {\n\t\t\tif (stylesById.has(style.id) && stylesById.get(style.id) !== style) {\n\t\t\t\tthrow new Error(`Multiple StyleProp instances with the same id: ${style.id}`)\n\t\t\t}\n\t\t\tstylesById.set(style.id, style)\n\t\t}\n\t}\n\n\tconst ShapeRecordType = createShapeRecordType(shapes)\n\tconst BindingRecordType = createBindingRecordType(bindings)\n\tconst InstanceRecordType = createInstanceRecordType(stylesById)\n\n\treturn StoreSchema.create(\n\t\t{\n\t\t\tasset: AssetRecordType,\n\t\t\tbinding: BindingRecordType,\n\t\t\tcamera: CameraRecordType,\n\t\t\tdocument: DocumentRecordType,\n\t\t\tinstance: InstanceRecordType,\n\t\t\tinstance_page_state: InstancePageStateRecordType,\n\t\t\tpage: PageRecordType,\n\t\t\tinstance_presence: InstancePresenceRecordType,\n\t\t\tpointer: PointerRecordType,\n\t\t\tshape: ShapeRecordType,\n\t\t},\n\t\t{\n\t\t\tmigrations: [\n\t\t\t\tstoreMigrations,\n\t\t\t\tassetMigrations,\n\t\t\t\tcameraMigrations,\n\t\t\t\tdocumentMigrations,\n\t\t\t\tinstanceMigrations,\n\t\t\t\tinstancePageStateMigrations,\n\t\t\t\tpageMigrations,\n\t\t\t\tinstancePresenceMigrations,\n\t\t\t\tpointerMigrations,\n\t\t\t\trootShapeMigrations,\n\n\t\t\t\tbookmarkAssetMigrations,\n\t\t\t\timageAssetMigrations,\n\t\t\t\tvideoAssetMigrations,\n\n\t\t\t\t...processPropsMigrations<TLShape>('shape', shapes),\n\t\t\t\t...processPropsMigrations<TLBinding>('binding', bindings),\n\n\t\t\t\t...(migrations ?? []),\n\t\t\t],\n\t\t\tonValidationFailure,\n\t\t\tcreateIntegrityChecker,\n\t\t}\n\t)\n}\n"],
5
- "mappings": "AAAA,SAA8C,mBAAmC;AACjF,SAAS,uBAAuB;AAChC,SAAuB,wBAAwB,2BAA2B;AAC1E,SAAS,+BAA+B;AACxC,SAAS,4BAA4B;AACrC,SAAS,4BAA4B;AACrC,SAAS,wBAAwB,yBAAyB;AAC1D,SAAS,iBAAiB,uBAAuB;AACjD,SAAsC,+BAA+B;AACrE,SAAS,kBAAkB,wBAAwB;AACnD,SAAS,oBAAoB,0BAA0B;AACvD,SAAS,0BAA0B,0BAA0B;AAC7D,SAAS,gBAAgB,sBAAsB;AAC/C,SAAS,6BAA6B,mCAAmC;AACzE,SAAS,mBAAmB,yBAAyB;AACrD,SAAS,4BAA4B,kCAAkC;AAEvE;AAAA,EAGC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAA4B,8BAA8B;AAC1D,SAAS,sBAAsB,uBAAuB;AACtD,SAAS,yBAAyB,0BAA0B;AAC5D,SAAS,qBAAqB,sBAAsB;AACpD,SAAS,sBAAsB,uBAAuB;AACtD,SAAS,sBAAsB,uBAAuB;AACtD,SAAS,oBAAoB,qBAAqB;AAClD,SAAS,sBAAsB,uBAAuB;AACtD,SAAS,0BAA0B,2BAA2B;AAC9D,SAAS,sBAAsB,uBAAuB;AACtD,SAAS,qBAAqB,sBAAsB;AACpD,SAAS,qBAAqB,sBAAsB;AACpD,SAAS,qBAAqB,sBAAsB;AACpD,SAAS,sBAAsB,uBAAuB;AACtD,SAAS,uBAAuB;AAiGzB,MAAM,sBAAsB;AAAA,EAClC,OAAO,EAAE,YAAY,sBAAsB,OAAO,gBAAgB;AAAA,EAClE,UAAU,EAAE,YAAY,yBAAyB,OAAO,mBAAmB;AAAA,E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,MACC,OAAO;AAAA,MACP,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,UAAU;AAAA,MACV,qBAAqB;AAAA,MACrB,MAAM;AAAA,MACN,mBAAmB;AAAA,MACnB,SAAS;AAAA,MACT,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,YAAY;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QAEA;AAAA,QACA;AAAA,QACA;AAAA,QAEA,GAAG,uBAAgC,SAAS,MAAM;AAAA,QAClD,GAAG,uBAAkC,WAAW,QAAQ;AAAA,QAExD,GAAI,cAAc,CAAC;AAAA,MACpB;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACD;AACD;",
4
+ "sourcesContent": ["import { LegacyMigrations, MigrationSequence, StoreSchema, StoreValidator } from '@tldraw/store'\nimport { objectMapValues } from '@tldraw/utils'\nimport { TLStoreProps, createIntegrityChecker, onValidationFailure } from './TLStore'\nimport { bookmarkAssetMigrations } from './assets/TLBookmarkAsset'\nimport { imageAssetMigrations } from './assets/TLImageAsset'\nimport { videoAssetMigrations } from './assets/TLVideoAsset'\nimport { arrowBindingMigrations, arrowBindingProps } from './bindings/TLArrowBinding'\nimport { AssetRecordType, assetMigrations } from './records/TLAsset'\nimport { TLBinding, TLDefaultBinding, createBindingRecordType } from './records/TLBinding'\nimport { CameraRecordType, cameraMigrations } from './records/TLCamera'\nimport { DocumentRecordType, documentMigrations } from './records/TLDocument'\nimport { createInstanceRecordType, instanceMigrations } from './records/TLInstance'\nimport { PageRecordType, pageMigrations } from './records/TLPage'\nimport { InstancePageStateRecordType, instancePageStateMigrations } from './records/TLPageState'\nimport { PointerRecordType, pointerMigrations } from './records/TLPointer'\nimport { InstancePresenceRecordType, instancePresenceMigrations } from './records/TLPresence'\nimport { TLRecord } from './records/TLRecord'\nimport {\n\tTLDefaultShape,\n\tTLShape,\n\tcreateShapeRecordType,\n\tgetShapePropKeysByStyle,\n\trootShapeMigrations,\n} from './records/TLShape'\nimport { RecordProps, TLPropsMigrations, processPropsMigrations } from './recordsWithProps'\nimport { arrowShapeMigrations, arrowShapeProps } from './shapes/TLArrowShape'\nimport { TLBaseShape } from './shapes/TLBaseShape'\nimport { bookmarkShapeMigrations, bookmarkShapeProps } from './shapes/TLBookmarkShape'\nimport { drawShapeMigrations, drawShapeProps } from './shapes/TLDrawShape'\nimport { embedShapeMigrations, embedShapeProps } from './shapes/TLEmbedShape'\nimport { frameShapeMigrations, frameShapeProps } from './shapes/TLFrameShape'\nimport { geoShapeMigrations, geoShapeProps } from './shapes/TLGeoShape'\nimport { groupShapeMigrations, groupShapeProps } from './shapes/TLGroupShape'\nimport { highlightShapeMigrations, highlightShapeProps } from './shapes/TLHighlightShape'\nimport { imageShapeMigrations, imageShapeProps } from './shapes/TLImageShape'\nimport { lineShapeMigrations, lineShapeProps } from './shapes/TLLineShape'\nimport { noteShapeMigrations, noteShapeProps } from './shapes/TLNoteShape'\nimport { textShapeMigrations, textShapeProps } from './shapes/TLTextShape'\nimport { videoShapeMigrations, videoShapeProps } from './shapes/TLVideoShape'\nimport { storeMigrations } from './store-migrations'\nimport { StyleProp } from './styles/StyleProp'\n\n/**\n * Configuration information for a schema type (shape or binding), including its properties,\n * metadata, and migration sequences for data evolution over time.\n *\n * @public\n * @example\n * ```ts\n * import { arrowShapeMigrations, arrowShapeProps } from './shapes/TLArrowShape'\n *\n * const myShapeSchema: SchemaPropsInfo = {\n * migrations: arrowShapeMigrations,\n * props: arrowShapeProps,\n * meta: {\n * customField: T.string,\n * },\n * }\n * ```\n */\nexport interface SchemaPropsInfo {\n\t/**\n\t * Migration sequences for handling data evolution over time. Can be legacy migrations,\n\t * props-specific migrations, or general migration sequences.\n\t */\n\tmigrations?: LegacyMigrations | TLPropsMigrations | MigrationSequence\n\n\t/**\n\t * Validation schema for the shape or binding properties. Maps property names to their validators.\n\t */\n\tprops?: Record<string, StoreValidator<any>>\n\n\t/**\n\t * Validation schema for metadata fields. Maps metadata field names to their validators.\n\t */\n\tmeta?: Record<string, StoreValidator<any>>\n}\n\n/**\n * The complete schema definition for a tldraw store, encompassing all record types,\n * validation rules, and migration sequences. This schema defines the structure of\n * the persistent data model used by tldraw.\n *\n * @public\n * @example\n * ```ts\n * import { createTLSchema, defaultShapeSchemas } from '@tldraw/tlschema'\n * import { Store } from '@tldraw/store'\n *\n * const schema: TLSchema = createTLSchema({\n * shapes: defaultShapeSchemas,\n * })\n *\n * const store = new Store({ schema })\n * ```\n */\nexport type TLSchema = StoreSchema<TLRecord, TLStoreProps>\n\n/**\n * Default shape schema configurations for all built-in tldraw shape types.\n * Each shape type includes its validation props and migration sequences.\n *\n * This object contains schema information for:\n * - arrow: Directional lines that can bind to other shapes\n * - bookmark: Website bookmark cards with preview information\n * - draw: Freehand drawing paths created with drawing tools\n * - embed: Embedded content from external services (YouTube, Figma, etc.)\n * - frame: Container shapes for organizing content\n * - geo: Geometric shapes (rectangles, ellipses, triangles, etc.)\n * - group: Logical groupings of multiple shapes\n * - highlight: Highlighting strokes from the highlighter tool\n * - image: Raster image shapes referencing image assets\n * - line: Multi-point lines and splines\n * - note: Sticky note shapes with text content\n * - text: Rich text shapes with formatting support\n * - video: Video shapes referencing video assets\n *\n * @public\n * @example\n * ```ts\n * import { createTLSchema, defaultShapeSchemas } from '@tldraw/tlschema'\n *\n * // Use all default shapes\n * const schema = createTLSchema({\n * shapes: defaultShapeSchemas,\n * })\n *\n * // Use only specific default shapes\n * const minimalSchema = createTLSchema({\n * shapes: {\n * geo: defaultShapeSchemas.geo,\n * text: defaultShapeSchemas.text,\n * },\n * })\n * ```\n */\nexport const defaultShapeSchemas = {\n\tarrow: { migrations: arrowShapeMigrations, props: arrowShapeProps },\n\tbookmark: { migrations: bookmarkShapeMigrations, props: bookmarkShapeProps },\n\tdraw: { migrations: drawShapeMigrations, props: drawShapeProps },\n\tembed: { migrations: embedShapeMigrations, props: embedShapeProps },\n\tframe: { migrations: frameShapeMigrations, props: frameShapeProps },\n\tgeo: { migrations: geoShapeMigrations, props: geoShapeProps },\n\tgroup: { migrations: groupShapeMigrations, props: groupShapeProps },\n\thighlight: { migrations: highlightShapeMigrations, props: highlightShapeProps },\n\timage: { migrations: imageShapeMigrations, props: imageShapeProps },\n\tline: { migrations: lineShapeMigrations, props: lineShapeProps },\n\tnote: { migrations: noteShapeMigrations, props: noteShapeProps },\n\ttext: { migrations: textShapeMigrations, props: textShapeProps },\n\tvideo: { migrations: videoShapeMigrations, props: videoShapeProps },\n} satisfies {\n\t[T in TLDefaultShape['type']]: {\n\t\tmigrations: SchemaPropsInfo['migrations']\n\t\tprops: RecordProps<TLBaseShape<T, Extract<TLDefaultShape, { type: T }>['props']>>\n\t}\n}\n\n/**\n * Default binding schema configurations for all built-in tldraw binding types.\n * Bindings represent relationships between shapes, such as arrows connected to shapes.\n *\n * Currently includes:\n * - arrow: Bindings that connect arrow shapes to other shapes at specific anchor points\n *\n * @public\n * @example\n * ```ts\n * import { createTLSchema, defaultBindingSchemas } from '@tldraw/tlschema'\n *\n * // Use default bindings\n * const schema = createTLSchema({\n * bindings: defaultBindingSchemas,\n * })\n *\n * // Add custom binding alongside defaults\n * const customSchema = createTLSchema({\n * bindings: {\n * ...defaultBindingSchemas,\n * myCustomBinding: {\n * props: myCustomBindingProps,\n * migrations: myCustomBindingMigrations,\n * },\n * },\n * })\n * ```\n */\nexport const defaultBindingSchemas = {\n\tarrow: { migrations: arrowBindingMigrations, props: arrowBindingProps },\n} satisfies { [T in TLDefaultBinding['type']]: SchemaPropsInfo }\n\n/**\n * Creates a complete TLSchema for use with tldraw stores. This schema defines the structure,\n * validation, and migration sequences for all record types in a tldraw application.\n *\n * The schema includes all core record types (pages, cameras, instances, etc.) plus the\n * shape and binding types you specify. Style properties are automatically collected from\n * all shapes to ensure consistency across the application.\n *\n * @param options - Configuration options for the schema\n * - shapes - Shape schema configurations. Defaults to defaultShapeSchemas if not provided\n * - bindings - Binding schema configurations. Defaults to defaultBindingSchemas if not provided\n * - migrations - Additional migration sequences to include in the schema\n * @returns A complete TLSchema ready for use with Store creation\n *\n * @public\n * @example\n * ```ts\n * import { createTLSchema, defaultShapeSchemas, defaultBindingSchemas } from '@tldraw/tlschema'\n * import { Store } from '@tldraw/store'\n *\n * // Create schema with all default shapes and bindings\n * const schema = createTLSchema()\n *\n * // Create schema with custom shapes added\n * const customSchema = createTLSchema({\n * shapes: {\n * ...defaultShapeSchemas,\n * myCustomShape: {\n * props: myCustomShapeProps,\n * migrations: myCustomShapeMigrations,\n * },\n * },\n * })\n *\n * // Create schema with only specific shapes\n * const minimalSchema = createTLSchema({\n * shapes: {\n * geo: defaultShapeSchemas.geo,\n * text: defaultShapeSchemas.text,\n * },\n * bindings: defaultBindingSchemas,\n * })\n *\n * // Use the schema with a store\n * const store = new Store({\n * schema: customSchema,\n * props: {\n * defaultName: 'My Drawing',\n * },\n * })\n * ```\n */\nexport function createTLSchema({\n\tshapes = defaultShapeSchemas,\n\tbindings = defaultBindingSchemas,\n\tmigrations,\n}: {\n\tshapes?: Record<string, SchemaPropsInfo>\n\tbindings?: Record<string, SchemaPropsInfo>\n\tmigrations?: readonly MigrationSequence[]\n} = {}): TLSchema {\n\tconst stylesById = new Map<string, StyleProp<unknown>>()\n\tfor (const shape of objectMapValues(shapes)) {\n\t\tfor (const style of getShapePropKeysByStyle(shape.props ?? {}).keys()) {\n\t\t\tif (stylesById.has(style.id) && stylesById.get(style.id) !== style) {\n\t\t\t\tthrow new Error(`Multiple StyleProp instances with the same id: ${style.id}`)\n\t\t\t}\n\t\t\tstylesById.set(style.id, style)\n\t\t}\n\t}\n\n\tconst ShapeRecordType = createShapeRecordType(shapes)\n\tconst BindingRecordType = createBindingRecordType(bindings)\n\tconst InstanceRecordType = createInstanceRecordType(stylesById)\n\n\treturn StoreSchema.create(\n\t\t{\n\t\t\tasset: AssetRecordType,\n\t\t\tbinding: BindingRecordType,\n\t\t\tcamera: CameraRecordType,\n\t\t\tdocument: DocumentRecordType,\n\t\t\tinstance: InstanceRecordType,\n\t\t\tinstance_page_state: InstancePageStateRecordType,\n\t\t\tpage: PageRecordType,\n\t\t\tinstance_presence: InstancePresenceRecordType,\n\t\t\tpointer: PointerRecordType,\n\t\t\tshape: ShapeRecordType,\n\t\t},\n\t\t{\n\t\t\tmigrations: [\n\t\t\t\tstoreMigrations,\n\t\t\t\tassetMigrations,\n\t\t\t\tcameraMigrations,\n\t\t\t\tdocumentMigrations,\n\t\t\t\tinstanceMigrations,\n\t\t\t\tinstancePageStateMigrations,\n\t\t\t\tpageMigrations,\n\t\t\t\tinstancePresenceMigrations,\n\t\t\t\tpointerMigrations,\n\t\t\t\trootShapeMigrations,\n\n\t\t\t\tbookmarkAssetMigrations,\n\t\t\t\timageAssetMigrations,\n\t\t\t\tvideoAssetMigrations,\n\n\t\t\t\t...processPropsMigrations<TLShape>('shape', shapes),\n\t\t\t\t...processPropsMigrations<TLBinding>('binding', bindings),\n\n\t\t\t\t...(migrations ?? []),\n\t\t\t],\n\t\t\tonValidationFailure,\n\t\t\tcreateIntegrityChecker,\n\t\t}\n\t)\n}\n"],
5
+ "mappings": "AAAA,SAA8C,mBAAmC;AACjF,SAAS,uBAAuB;AAChC,SAAuB,wBAAwB,2BAA2B;AAC1E,SAAS,+BAA+B;AACxC,SAAS,4BAA4B;AACrC,SAAS,4BAA4B;AACrC,SAAS,wBAAwB,yBAAyB;AAC1D,SAAS,iBAAiB,uBAAuB;AACjD,SAAsC,+BAA+B;AACrE,SAAS,kBAAkB,wBAAwB;AACnD,SAAS,oBAAoB,0BAA0B;AACvD,SAAS,0BAA0B,0BAA0B;AAC7D,SAAS,gBAAgB,sBAAsB;AAC/C,SAAS,6BAA6B,mCAAmC;AACzE,SAAS,mBAAmB,yBAAyB;AACrD,SAAS,4BAA4B,kCAAkC;AAEvE;AAAA,EAGC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SA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