tldraw 3.16.0-next.34fddf633325 → 3.16.0-next.4337ae1ab96d

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 (438) hide show
  1. package/dist-cjs/index.d.ts +324 -105
  2. package/dist-cjs/index.js +40 -14
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/Tldraw.js +12 -2
  5. package/dist-cjs/lib/Tldraw.js.map +2 -2
  6. package/dist-cjs/lib/canvas/TldrawScribble.js +1 -1
  7. package/dist-cjs/lib/canvas/TldrawScribble.js.map +2 -2
  8. package/dist-cjs/lib/defaultExternalContentHandlers.js +5 -4
  9. package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
  10. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +3 -3
  11. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
  12. package/dist-cjs/lib/shapes/arrow/arrowLabel.js +6 -0
  13. package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +3 -3
  14. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js +3 -3
  15. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js.map +1 -1
  16. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +3 -3
  17. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +2 -2
  18. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +1 -1
  19. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +1 -1
  20. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +18 -12
  21. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
  22. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js +1 -1
  23. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js.map +2 -2
  24. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +2 -2
  25. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
  26. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js +2 -1
  27. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js.map +2 -2
  28. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +5 -1
  29. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
  30. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +6 -3
  31. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +2 -2
  32. package/dist-cjs/lib/shapes/line/LineShapeUtil.js +5 -1
  33. package/dist-cjs/lib/shapes/line/LineShapeUtil.js.map +2 -2
  34. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +4 -4
  35. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
  36. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js +1 -3
  37. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js.map +2 -2
  38. package/dist-cjs/lib/shapes/shared/ShapeFill.js +4 -4
  39. package/dist-cjs/lib/shapes/shared/ShapeFill.js.map +2 -2
  40. package/dist-cjs/lib/shapes/shared/freehand/svg.js.map +2 -2
  41. package/dist-cjs/lib/shapes/shared/useEditablePlainText.js +0 -2
  42. package/dist-cjs/lib/shapes/shared/useEditablePlainText.js.map +2 -2
  43. package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js +0 -2
  44. package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js.map +2 -2
  45. package/dist-cjs/lib/shapes/text/TextShapeUtil.js +2 -2
  46. package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +2 -2
  47. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +3 -3
  48. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +1 -1
  49. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +25 -1
  50. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +2 -2
  51. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +12 -0
  52. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +2 -2
  53. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +2 -2
  54. package/dist-cjs/lib/ui/TldrawUi.js +27 -12
  55. package/dist-cjs/lib/ui/TldrawUi.js.map +3 -3
  56. package/dist-cjs/lib/ui/assetUrls.js +13 -10
  57. package/dist-cjs/lib/ui/assetUrls.js.map +2 -2
  58. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js +12 -3
  59. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js.map +2 -2
  60. package/dist-cjs/lib/ui/components/{FollowingIndicator.js → DefaultFollowingIndicator.js} +6 -6
  61. package/dist-cjs/lib/ui/components/DefaultFollowingIndicator.js.map +7 -0
  62. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js +3 -2
  63. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js.map +2 -2
  64. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js +6 -6
  65. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js.map +1 -1
  66. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js +4 -4
  67. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js.map +2 -2
  68. package/dist-cjs/lib/ui/components/MobileStylePanel.js +5 -3
  69. package/dist-cjs/lib/ui/components/MobileStylePanel.js.map +2 -2
  70. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js +1 -1
  71. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js.map +2 -2
  72. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js +2 -1
  73. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js.map +2 -2
  74. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js +3 -2
  75. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js.map +2 -2
  76. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js +2 -2
  77. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js.map +2 -2
  78. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js +9 -4
  79. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js.map +2 -2
  80. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +255 -316
  81. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
  82. package/dist-cjs/lib/ui/components/{primitives/TldrawUiButtonPicker.js → StylePanel/StylePanelButtonPicker.js} +52 -56
  83. package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js.map +7 -0
  84. package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js +68 -0
  85. package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js.map +7 -0
  86. package/dist-cjs/lib/ui/components/StylePanel/{DoubleDropdownPicker.js → StylePanelDoubleDropdownPicker.js} +26 -25
  87. package/dist-cjs/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.js.map +7 -0
  88. package/dist-cjs/lib/ui/components/StylePanel/{DropdownPicker.js → StylePanelDropdownPicker.js} +47 -43
  89. package/dist-cjs/lib/ui/components/StylePanel/StylePanelDropdownPicker.js.map +7 -0
  90. package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js +28 -0
  91. package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js.map +7 -0
  92. package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js +3 -2
  93. package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js.map +2 -2
  94. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js +39 -10
  95. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js.map +2 -2
  96. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js +66 -21
  97. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js.map +3 -3
  98. package/dist-cjs/lib/ui/components/Toolbar/DefaultVideoToolbarContent.js +15 -3
  99. package/dist-cjs/lib/ui/components/Toolbar/DefaultVideoToolbarContent.js.map +2 -2
  100. package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js +3 -3
  101. package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js.map +2 -2
  102. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js +189 -80
  103. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js.map +3 -3
  104. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +2 -2
  105. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js.map +2 -2
  106. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +10 -1
  107. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
  108. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js +3 -2
  109. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js.map +3 -3
  110. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js +17 -4
  111. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js.map +2 -2
  112. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js +21 -4
  113. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js.map +2 -2
  114. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +161 -159
  115. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +2 -2
  116. package/dist-cjs/lib/ui/components/primitives/layout.js +76 -0
  117. package/dist-cjs/lib/ui/components/primitives/layout.js.map +7 -0
  118. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuContext.js.map +2 -2
  119. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js +25 -12
  120. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js.map +2 -2
  121. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +154 -20
  122. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
  123. package/dist-cjs/lib/ui/context/actions.js +23 -10
  124. package/dist-cjs/lib/ui/context/actions.js.map +2 -2
  125. package/dist-cjs/lib/ui/context/components.js +2 -0
  126. package/dist-cjs/lib/ui/context/components.js.map +2 -2
  127. package/dist-cjs/lib/ui/context/events.js.map +2 -2
  128. package/dist-cjs/lib/ui/hooks/useExportAs.js +3 -2
  129. package/dist-cjs/lib/ui/hooks/useExportAs.js.map +2 -2
  130. package/dist-cjs/lib/ui/hooks/useTools.js +94 -9
  131. package/dist-cjs/lib/ui/hooks/useTools.js.map +2 -2
  132. package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js.map +1 -1
  133. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +2 -0
  134. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
  135. package/dist-cjs/lib/ui/kbd-utils.js +9 -3
  136. package/dist-cjs/lib/ui/kbd-utils.js.map +2 -2
  137. package/dist-cjs/lib/ui/version.js +3 -3
  138. package/dist-cjs/lib/ui/version.js.map +1 -1
  139. package/dist-cjs/lib/utils/export/copyAs.js +1 -2
  140. package/dist-cjs/lib/utils/export/copyAs.js.map +2 -2
  141. package/dist-cjs/lib/utils/export/export.js +0 -20
  142. package/dist-cjs/lib/utils/export/export.js.map +2 -2
  143. package/dist-cjs/lib/utils/export/exportAs.js +1 -2
  144. package/dist-cjs/lib/utils/export/exportAs.js.map +2 -2
  145. package/dist-esm/index.d.mts +324 -105
  146. package/dist-esm/index.mjs +75 -29
  147. package/dist-esm/index.mjs.map +2 -2
  148. package/dist-esm/lib/Tldraw.mjs +14 -4
  149. package/dist-esm/lib/Tldraw.mjs.map +2 -2
  150. package/dist-esm/lib/canvas/TldrawScribble.mjs +1 -1
  151. package/dist-esm/lib/canvas/TldrawScribble.mjs.map +2 -2
  152. package/dist-esm/lib/defaultExternalContentHandlers.mjs +5 -4
  153. package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
  154. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +4 -3
  155. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
  156. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +6 -0
  157. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +3 -3
  158. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs +3 -3
  159. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs.map +1 -1
  160. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +4 -3
  161. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +2 -2
  162. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +1 -1
  163. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +1 -1
  164. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +19 -12
  165. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
  166. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs +1 -1
  167. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs.map +2 -2
  168. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +3 -2
  169. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
  170. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs +2 -1
  171. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs.map +2 -2
  172. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +6 -1
  173. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
  174. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +6 -3
  175. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +2 -2
  176. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs +6 -1
  177. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs.map +2 -2
  178. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +5 -4
  179. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
  180. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs +1 -3
  181. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs.map +2 -2
  182. package/dist-esm/lib/shapes/shared/ShapeFill.mjs +5 -4
  183. package/dist-esm/lib/shapes/shared/ShapeFill.mjs.map +2 -2
  184. package/dist-esm/lib/shapes/shared/freehand/svg.mjs.map +2 -2
  185. package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs +0 -2
  186. package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs.map +2 -2
  187. package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs +0 -2
  188. package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs.map +2 -2
  189. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +3 -2
  190. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +2 -2
  191. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +3 -3
  192. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +1 -1
  193. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +26 -1
  194. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +2 -2
  195. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +13 -0
  196. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +2 -2
  197. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +2 -2
  198. package/dist-esm/lib/ui/TldrawUi.mjs +29 -14
  199. package/dist-esm/lib/ui/TldrawUi.mjs.map +3 -3
  200. package/dist-esm/lib/ui/assetUrls.mjs +13 -10
  201. package/dist-esm/lib/ui/assetUrls.mjs.map +2 -2
  202. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs +12 -3
  203. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs.map +2 -2
  204. package/dist-esm/lib/ui/components/{FollowingIndicator.mjs → DefaultFollowingIndicator.mjs} +3 -3
  205. package/dist-esm/lib/ui/components/DefaultFollowingIndicator.mjs.map +7 -0
  206. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs +3 -2
  207. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs.map +2 -2
  208. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs +6 -6
  209. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs.map +1 -1
  210. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs +4 -4
  211. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs.map +2 -2
  212. package/dist-esm/lib/ui/components/MobileStylePanel.mjs +6 -3
  213. package/dist-esm/lib/ui/components/MobileStylePanel.mjs.map +2 -2
  214. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs +1 -1
  215. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs.map +2 -2
  216. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs +2 -1
  217. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs.map +2 -2
  218. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs +3 -2
  219. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs.map +2 -2
  220. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs +2 -2
  221. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs.map +2 -2
  222. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs +14 -5
  223. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs.map +2 -2
  224. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +257 -320
  225. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
  226. package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs +126 -0
  227. package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs.map +7 -0
  228. package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs +48 -0
  229. package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs.map +7 -0
  230. package/dist-esm/lib/ui/components/StylePanel/{DoubleDropdownPicker.mjs → StylePanelDoubleDropdownPicker.mjs} +23 -22
  231. package/dist-esm/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.mjs.map +7 -0
  232. package/dist-esm/lib/ui/components/StylePanel/{DropdownPicker.mjs → StylePanelDropdownPicker.mjs} +44 -40
  233. package/dist-esm/lib/ui/components/StylePanel/StylePanelDropdownPicker.mjs.map +7 -0
  234. package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs +8 -0
  235. package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs.map +7 -0
  236. package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs +3 -2
  237. package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs.map +2 -2
  238. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs +39 -10
  239. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs.map +2 -2
  240. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs +56 -21
  241. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs.map +2 -2
  242. package/dist-esm/lib/ui/components/Toolbar/DefaultVideoToolbarContent.mjs +15 -3
  243. package/dist-esm/lib/ui/components/Toolbar/DefaultVideoToolbarContent.mjs.map +2 -2
  244. package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs +3 -3
  245. package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs.map +2 -2
  246. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs +192 -81
  247. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs.map +3 -3
  248. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs +2 -2
  249. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs.map +2 -2
  250. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +10 -1
  251. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
  252. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs +3 -2
  253. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs.map +2 -2
  254. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs +17 -4
  255. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs.map +2 -2
  256. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs +21 -4
  257. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs.map +2 -2
  258. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +170 -161
  259. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +2 -2
  260. package/dist-esm/lib/ui/components/primitives/layout.mjs +46 -0
  261. package/dist-esm/lib/ui/components/primitives/layout.mjs.map +7 -0
  262. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuContext.mjs.map +2 -2
  263. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs +25 -12
  264. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs.map +2 -2
  265. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +162 -22
  266. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
  267. package/dist-esm/lib/ui/context/actions.mjs +23 -10
  268. package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
  269. package/dist-esm/lib/ui/context/components.mjs +2 -0
  270. package/dist-esm/lib/ui/context/components.mjs.map +2 -2
  271. package/dist-esm/lib/ui/context/events.mjs.map +2 -2
  272. package/dist-esm/lib/ui/hooks/useExportAs.mjs +3 -2
  273. package/dist-esm/lib/ui/hooks/useExportAs.mjs.map +2 -2
  274. package/dist-esm/lib/ui/hooks/useTools.mjs +102 -10
  275. package/dist-esm/lib/ui/hooks/useTools.mjs.map +2 -2
  276. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +2 -0
  277. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
  278. package/dist-esm/lib/ui/kbd-utils.mjs +9 -3
  279. package/dist-esm/lib/ui/kbd-utils.mjs.map +2 -2
  280. package/dist-esm/lib/ui/version.mjs +3 -3
  281. package/dist-esm/lib/ui/version.mjs.map +1 -1
  282. package/dist-esm/lib/utils/export/copyAs.mjs +1 -2
  283. package/dist-esm/lib/utils/export/copyAs.mjs.map +2 -2
  284. package/dist-esm/lib/utils/export/export.mjs +0 -20
  285. package/dist-esm/lib/utils/export/export.mjs.map +2 -2
  286. package/dist-esm/lib/utils/export/exportAs.mjs +1 -2
  287. package/dist-esm/lib/utils/export/exportAs.mjs.map +2 -2
  288. package/package.json +11 -34
  289. package/src/index.ts +56 -22
  290. package/src/lib/Tldraw.tsx +15 -2
  291. package/src/lib/canvas/TldrawScribble.tsx +1 -1
  292. package/src/lib/defaultExternalContentHandlers.ts +12 -4
  293. package/src/lib/shapes/arrow/ArrowShapeOptions.test.ts +2 -1
  294. package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +4 -3
  295. package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +7 -6
  296. package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +4 -3
  297. package/src/lib/shapes/arrow/arrowLabel.ts +8 -0
  298. package/src/lib/shapes/arrow/elbow/ElbowArrowDebug.tsx +3 -3
  299. package/src/lib/shapes/draw/DrawShapeTool.test.ts +0 -5
  300. package/src/lib/shapes/draw/DrawShapeUtil.tsx +4 -3
  301. package/src/lib/shapes/embed/EmbedShapeUtil.tsx +1 -1
  302. package/src/lib/shapes/frame/FrameShapeUtil.tsx +29 -14
  303. package/src/lib/shapes/frame/components/FrameHeading.tsx +1 -1
  304. package/src/lib/shapes/geo/GeoShapeUtil.tsx +3 -2
  305. package/src/lib/shapes/geo/components/GeoShapeBody.tsx +2 -2
  306. package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +7 -1
  307. package/src/lib/shapes/image/ImageShapeUtil.tsx +6 -3
  308. package/src/lib/shapes/line/LineShapeUtil.test.tsx +4 -3
  309. package/src/lib/shapes/line/LineShapeUtil.tsx +6 -1
  310. package/src/lib/shapes/line/__snapshots__/LineShapeUtil.test.tsx.snap +2 -2
  311. package/src/lib/shapes/note/NoteShapeUtil.tsx +9 -4
  312. package/src/lib/shapes/shared/PlainTextLabel.tsx +0 -6
  313. package/src/lib/shapes/shared/ShapeFill.tsx +5 -4
  314. package/src/lib/shapes/shared/freehand/svg.ts +2 -0
  315. package/src/lib/shapes/shared/useEditablePlainText.ts +0 -6
  316. package/src/lib/shapes/shared/useImageOrVideoAsset.ts +0 -7
  317. package/src/lib/shapes/text/TextShapeTool.test.ts +6 -5
  318. package/src/lib/shapes/text/TextShapeUtil.tsx +3 -2
  319. package/src/lib/shapes/video/VideoShapeUtil.tsx +3 -3
  320. package/src/lib/tools/EraserTool/childStates/Erasing.ts +34 -1
  321. package/src/lib/tools/EraserTool/childStates/Pointing.ts +20 -0
  322. package/src/lib/tools/SelectTool/childStates/Translating.ts +0 -1
  323. package/src/lib/ui/TldrawUi.tsx +33 -12
  324. package/src/lib/ui/assetUrls.ts +13 -10
  325. package/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx +15 -3
  326. package/src/lib/ui/components/{FollowingIndicator.tsx → DefaultFollowingIndicator.tsx} +2 -1
  327. package/src/lib/ui/components/DefaultMenuPanel.tsx +4 -3
  328. package/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.tsx +6 -6
  329. package/src/lib/ui/components/Minimap/MinimapManager.ts +4 -4
  330. package/src/lib/ui/components/MobileStylePanel.tsx +9 -6
  331. package/src/lib/ui/components/NavigationPanel/DefaultNavigationPanel.tsx +1 -1
  332. package/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx +3 -2
  333. package/src/lib/ui/components/SharePanel/PeopleMenuItem.tsx +4 -3
  334. package/src/lib/ui/components/SharePanel/UserPresenceColorPicker.tsx +3 -3
  335. package/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx +27 -13
  336. package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +260 -385
  337. package/src/lib/ui/components/{primitives/TldrawUiButtonPicker.tsx → StylePanel/StylePanelButtonPicker.tsx} +66 -50
  338. package/src/lib/ui/components/StylePanel/StylePanelContext.tsx +63 -0
  339. package/src/lib/ui/components/StylePanel/{DoubleDropdownPicker.tsx → StylePanelDoubleDropdownPicker.tsx} +31 -22
  340. package/src/lib/ui/components/StylePanel/StylePanelDropdownPicker.tsx +119 -0
  341. package/src/lib/ui/components/StylePanel/StylePanelSubheading.tsx +9 -0
  342. package/src/lib/ui/components/Toolbar/AltTextEditor.tsx +4 -3
  343. package/src/lib/ui/components/Toolbar/DefaultImageToolbarContent.tsx +33 -16
  344. package/src/lib/ui/components/Toolbar/DefaultToolbar.tsx +55 -23
  345. package/src/lib/ui/components/Toolbar/DefaultVideoToolbarContent.tsx +12 -4
  346. package/src/lib/ui/components/Toolbar/LinkEditor.tsx +5 -5
  347. package/src/lib/ui/components/Toolbar/OverflowingToolbar.tsx +212 -61
  348. package/src/lib/ui/components/Toolbar/ToggleToolLockedButton.tsx +2 -2
  349. package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +6 -1
  350. package/src/lib/ui/components/primitives/TldrawUiPopover.tsx +4 -2
  351. package/src/lib/ui/components/primitives/TldrawUiSlider.tsx +50 -30
  352. package/src/lib/ui/components/primitives/TldrawUiToolbar.tsx +35 -9
  353. package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +203 -181
  354. package/src/lib/ui/components/primitives/layout.tsx +107 -0
  355. package/src/lib/ui/components/primitives/menus/TldrawUiMenuContext.tsx +0 -1
  356. package/src/lib/ui/components/primitives/menus/TldrawUiMenuGroup.tsx +29 -16
  357. package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +221 -19
  358. package/src/lib/ui/context/actions.tsx +23 -10
  359. package/src/lib/ui/context/components.tsx +3 -0
  360. package/src/lib/ui/context/events.tsx +2 -1
  361. package/src/lib/ui/hooks/useExportAs.ts +3 -2
  362. package/src/lib/ui/hooks/useTools.tsx +140 -10
  363. package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +2 -0
  364. package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +2 -0
  365. package/src/lib/ui/kbd-utils.ts +10 -3
  366. package/src/lib/ui/version.ts +3 -3
  367. package/src/lib/ui.css +381 -306
  368. package/src/lib/utils/excalidraw/__snapshots__/putExcalidrawContent.test.tsx.snap +5 -5
  369. package/src/lib/utils/export/copyAs.ts +1 -24
  370. package/src/lib/utils/export/export.ts +0 -36
  371. package/src/lib/utils/export/exportAs.ts +1 -32
  372. package/src/lib/utils/tldr/__snapshots__/buildFromV1Document.test.ts.snap +4 -4
  373. package/src/test/A11y.test.tsx +3 -2
  374. package/src/test/ClickManager.test.ts +7 -6
  375. package/src/test/Editor.test.tsx +20 -19
  376. package/src/test/EraserTool.test.ts +184 -13
  377. package/src/test/HandTool.test.ts +10 -9
  378. package/src/test/HighlightShape.test.ts +2 -1
  379. package/src/test/SelectTool.test.ts +3 -2
  380. package/src/test/TLUserPreferences.test.ts +4 -3
  381. package/src/test/TestEditor.ts +13 -15
  382. package/src/test/TldrawEditor.test.tsx +11 -10
  383. package/src/test/ZoomTool.test.ts +7 -6
  384. package/src/test/__snapshots__/drawing.test.ts.snap +2 -2
  385. package/src/test/__snapshots__/groups.test.tsx.snap +6 -6
  386. package/src/test/__snapshots__/resizing.test.ts.snap +2 -2
  387. package/src/test/arrows-megabus.test.tsx +5 -4
  388. package/src/test/bindings.test.tsx +24 -37
  389. package/src/test/bookmark-shapes.test.ts +1 -8
  390. package/src/test/commands/__snapshots__/getSvgString.test.ts.snap +23 -7
  391. package/src/test/commands/__snapshots__/packShapes.test.ts.snap +8 -8
  392. package/src/test/commands/__snapshots__/zoomToFit.test.ts.snap +2 -2
  393. package/src/test/commands/alignShapes.test.tsx +25 -24
  394. package/src/test/commands/animationSpeed.test.ts +2 -1
  395. package/src/test/commands/centerOnPoint.test.ts +3 -2
  396. package/src/test/commands/clipboard.test.ts +3 -2
  397. package/src/test/commands/createShapes.test.ts +2 -1
  398. package/src/test/commands/deleteShapes.test.ts +2 -1
  399. package/src/test/commands/distributeShapes.test.tsx +11 -10
  400. package/src/test/commands/getSvgString.test.ts +2 -1
  401. package/src/test/commands/packShapes.test.ts +5 -4
  402. package/src/test/commands/resizeShape.test.ts +2 -1
  403. package/src/test/commands/rotateShapes.test.ts +7 -6
  404. package/src/test/commands/setCamera.test.ts +4 -3
  405. package/src/test/commands/setCurrentPage.test.ts +3 -2
  406. package/src/test/commands/stackShapes.test.ts +11 -10
  407. package/src/test/commands/stretch.test.tsx +13 -12
  408. package/src/test/createDeepLink.test.tsx +2 -1
  409. package/src/test/cropping.test.ts +3 -2
  410. package/src/test/custom-clipping.test.ts +436 -0
  411. package/src/test/drawing.test.ts +2 -1
  412. package/src/test/flipShapes.test.ts +4 -3
  413. package/src/test/frames.test.ts +25 -24
  414. package/src/test/getCulledShapes.test.tsx +3 -2
  415. package/src/test/groups.test.tsx +1 -1
  416. package/src/test/handleDeepLink.test.tsx +2 -1
  417. package/src/test/maxShapes.test.ts +3 -2
  418. package/src/test/modifiers.test.ts +5 -4
  419. package/src/test/navigation.test.ts +12 -11
  420. package/src/test/panning.test.ts +2 -1
  421. package/src/test/perf/perf.test.ts +2 -1
  422. package/src/test/registerDeepLinkListener.test.tsx +10 -9
  423. package/src/test/resizing.test.ts +39 -38
  424. package/src/test/select.test.tsx +4 -3
  425. package/src/test/selection-omnibus.test.ts +11 -10
  426. package/src/test/shapeutils.test.ts +4 -3
  427. package/src/test/translating.test.ts +9 -8
  428. package/tldraw.css +682 -596
  429. package/dist-cjs/lib/ui/components/FollowingIndicator.js.map +0 -7
  430. package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js.map +0 -7
  431. package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js.map +0 -7
  432. package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js.map +0 -7
  433. package/dist-esm/lib/ui/components/FollowingIndicator.mjs.map +0 -7
  434. package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs.map +0 -7
  435. package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs.map +0 -7
  436. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs +0 -115
  437. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs.map +0 -7
  438. package/src/lib/ui/components/StylePanel/DropdownPicker.tsx +0 -109
package/tldraw.css CHANGED
@@ -9,57 +9,58 @@
9
9
  height: 100%;
10
10
  font-size: 12px;
11
11
  /* Spacing */
12
- --space-1: 2px;
13
- --space-2: 4px;
14
- --space-3: 8px;
15
- --space-4: 12px;
16
- --space-5: 16px;
17
- --space-6: 20px;
18
- --space-7: 28px;
19
- --space-8: 32px;
20
- --space-9: 64px;
21
- --space-10: 72px;
12
+ --tl-space-1: 2px;
13
+ --tl-space-2: 4px;
14
+ --tl-space-3: 8px;
15
+ --tl-space-4: 12px;
16
+ --tl-space-5: 16px;
17
+ --tl-space-6: 20px;
18
+ --tl-space-7: 28px;
19
+ --tl-space-8: 32px;
20
+ --tl-space-9: 64px;
21
+ --tl-space-10: 72px;
22
22
  /* Radius */
23
- --radius-0: 2px;
24
- --radius-1: 4px;
25
- --radius-2: 6px;
26
- --radius-3: 9px;
27
- --radius-4: 11px;
23
+ --tl-radius-0: 2px;
24
+ --tl-radius-1: 4px;
25
+ --tl-radius-2: 6px;
26
+ --tl-radius-3: 9px;
27
+ --tl-radius-4: 11px;
28
28
 
29
29
  /* Canvas z-index */
30
- --layer-canvas-hidden: -999999;
31
- --layer-canvas-background: 100;
32
- --layer-canvas-grid: 150;
33
- --layer-watermark: 200;
34
- --layer-canvas-shapes: 300;
35
- --layer-canvas-overlays: 500;
36
- --layer-canvas-blocker: 10000;
30
+ --tl-layer-canvas-hidden: -999999;
31
+ --tl-layer-canvas-background: 100;
32
+ --tl-layer-canvas-grid: 150;
33
+ --tl-layer-watermark: 200;
34
+ --tl-layer-canvas-shapes: 300;
35
+ --tl-layer-canvas-overlays: 500;
36
+ --tl-layer-canvas-in-front: 600;
37
+ --tl-layer-canvas-blocker: 10000;
37
38
 
38
39
  /* Canvas overlays z-index */
39
- --layer-overlays-collaborator-scribble: 10;
40
- --layer-overlays-collaborator-brush: 20;
41
- --layer-overlays-collaborator-shape-indicator: 30;
42
- --layer-overlays-user-scribble: 40;
43
- --layer-overlays-user-brush: 50;
44
- --layer-overlays-user-snapline: 90;
45
- --layer-overlays-selection-fg: 100;
40
+ --tl-layer-overlays-collaborator-scribble: 10;
41
+ --tl-layer-overlays-collaborator-brush: 20;
42
+ --tl-layer-overlays-collaborator-shape-indicator: 30;
43
+ --tl-layer-overlays-user-scribble: 40;
44
+ --tl-layer-overlays-user-brush: 50;
45
+ --tl-layer-overlays-user-snapline: 90;
46
+ --tl-layer-overlays-selection-fg: 100;
46
47
  /* User handles need to be above selection edges / corners, matters for sticky note clone handles */
47
- --layer-overlays-user-handles: 105;
48
- --layer-overlays-user-indicator-hint: 110;
49
- --layer-overlays-custom: 115;
50
- --layer-overlays-collaborator-cursor-hint: 120;
51
- --layer-overlays-collaborator-cursor: 130;
48
+ --tl-layer-overlays-user-handles: 105;
49
+ --tl-layer-overlays-user-indicator-hint: 110;
50
+ --tl-layer-overlays-custom: 115;
51
+ --tl-layer-overlays-collaborator-cursor-hint: 120;
52
+ --tl-layer-overlays-collaborator-cursor: 130;
52
53
 
53
54
  /* Text editor z-index */
54
- --layer-text-container: 1;
55
- --layer-text-content: 3;
56
- --layer-text-editor: 4;
55
+ --tl-layer-text-container: 1;
56
+ --tl-layer-text-content: 3;
57
+ --tl-layer-text-editor: 4;
57
58
 
58
59
  /* Error fallback z-index */
59
- --layer-error-overlay: 1;
60
- --layer-error-canvas: 2;
61
- --layer-error-canvas-after: 3;
62
- --layer-error-content: 4;
60
+ --tl-layer-error-overlay: 1;
61
+ --tl-layer-error-canvas: 2;
62
+ --tl-layer-error-canvas-after: 3;
63
+ --tl-layer-error-content: 4;
63
64
 
64
65
  /* Misc */
65
66
  --tl-zoom: 1;
@@ -124,12 +125,15 @@
124
125
  --tl-font-serif: 'tldraw_serif', serif;
125
126
  --tl-font-mono: 'tldraw_mono', monospace;
126
127
  /* text outline */
127
- --a: calc(min(0.5, 1 / var(--tl-zoom)) * 2px);
128
- --b: calc(min(0.5, 1 / var(--tl-zoom)) * -2px);
128
+ --tl-text-outline-a: calc(min(0.5, 1 / var(--tl-zoom)) * 2px);
129
+ --tl-text-outline-b: calc(min(0.5, 1 / var(--tl-zoom)) * -2px);
129
130
  --tl-text-outline-reference:
130
- 0 var(--b) 0 var(--color-background), 0 var(--a) 0 var(--color-background),
131
- var(--b) var(--b) 0 var(--color-background), var(--a) var(--b) 0 var(--color-background),
132
- var(--a) var(--a) 0 var(--color-background), var(--b) var(--a) 0 var(--color-background);
131
+ 0 var(--tl-text-outline-b) 0 var(--tl-color-background),
132
+ 0 var(--tl-text-outline-a) 0 var(--tl-color-background),
133
+ var(--tl-text-outline-b) var(--tl-text-outline-b) 0 var(--tl-color-background),
134
+ var(--tl-text-outline-a) var(--tl-text-outline-b) 0 var(--tl-color-background),
135
+ var(--tl-text-outline-a) var(--tl-text-outline-a) 0 var(--tl-color-background),
136
+ var(--tl-text-outline-b) var(--tl-text-outline-a) 0 var(--tl-color-background);
133
137
  --tl-text-outline: var(--tl-text-outline-reference);
134
138
  /* own properties */
135
139
  position: relative;
@@ -137,118 +141,118 @@
137
141
  height: 100%;
138
142
  width: 100%;
139
143
  overflow: clip;
140
- color: var(--color-text);
144
+ color: var(--tl-color-text);
141
145
  }
142
146
 
143
147
  .tl-theme__light {
144
148
  /* Canvas */
145
- --color-snap: hsl(0, 76%, 60%);
146
- --color-selection-fill: hsl(210, 100%, 56%, 24%);
147
- --color-selection-stroke: hsl(214, 84%, 56%);
148
- --color-background: hsl(210, 20%, 98%);
149
- --color-brush-fill: hsl(0, 0%, 56%, 10.2%);
150
- --color-brush-stroke: hsl(0, 0%, 56%, 25.1%);
151
- --color-grid: hsl(0, 0%, 43%);
149
+ --tl-color-snap: hsl(0, 76%, 60%);
150
+ --tl-color-selection-fill: hsl(210, 100%, 56%, 24%);
151
+ --tl-color-selection-stroke: hsl(214, 84%, 56%);
152
+ --tl-color-background: hsl(210, 20%, 98%);
153
+ --tl-color-brush-fill: hsl(0, 0%, 56%, 10.2%);
154
+ --tl-color-brush-stroke: hsl(0, 0%, 56%, 25.1%);
155
+ --tl-color-grid: hsl(0, 0%, 43%);
152
156
  /* UI */
153
- --color-low: hsl(204, 16%, 94%);
154
- --color-low-border: hsl(204, 16%, 92%);
155
- --color-culled: hsl(204, 14%, 93%);
156
- --color-muted-none: hsl(0, 0%, 0%, 0%);
157
- --color-muted-0: hsl(0, 0%, 0%, 2%);
158
- --color-muted-1: hsl(0, 0%, 0%, 10%);
159
- --color-muted-2: hsl(0, 0%, 0%, 4.3%);
160
- --color-hint: hsl(0, 0%, 0%, 5.5%);
161
- --color-overlay: hsl(0, 0%, 0%, 20%);
162
- --color-divider: hsl(0, 0%, 91%);
163
- --color-panel: hsl(0, 0%, 99%);
164
- --color-panel-contrast: hsl(0, 0%, 100%);
165
- --color-panel-overlay: hsl(0, 0%, 100%, 82%);
166
- --color-panel-transparent: hsla(0, 0%, 99%, 0%);
167
- --color-selected: hsl(214, 84%, 56%);
168
- --color-selected-contrast: hsl(0, 0%, 100%);
169
- --color-focus: hsl(219, 65%, 50%);
170
- --color-tooltip: hsla(200, 14%, 4%, 1);
157
+ --tl-color-low: hsl(204, 16%, 94%);
158
+ --tl-color-low-border: hsl(204, 16%, 92%);
159
+ --tl-color-culled: hsl(204, 14%, 93%);
160
+ --tl-color-muted-none: hsl(0, 0%, 0%, 0%);
161
+ --tl-color-muted-0: hsl(0, 0%, 0%, 2%);
162
+ --tl-color-muted-1: hsl(0, 0%, 0%, 10%);
163
+ --tl-color-muted-2: hsl(0, 0%, 0%, 4.3%);
164
+ --tl-color-hint: hsl(0, 0%, 0%, 5.5%);
165
+ --tl-color-overlay: hsl(0, 0%, 0%, 20%);
166
+ --tl-color-divider: hsl(0, 0%, 91%);
167
+ --tl-color-panel: hsl(0, 0%, 99%);
168
+ --tl-color-panel-contrast: hsl(0, 0%, 100%);
169
+ --tl-color-panel-overlay: hsl(0, 0%, 100%, 82%);
170
+ --tl-color-panel-transparent: hsla(0, 0%, 99%, 0%);
171
+ --tl-color-selected: hsl(214, 84%, 56%);
172
+ --tl-color-selected-contrast: hsl(0, 0%, 100%);
173
+ --tl-color-focus: hsl(219, 65%, 50%);
174
+ --tl-color-tooltip: hsla(200, 14%, 4%, 1);
171
175
  /* Text */
172
- --color-text: hsl(0, 0%, 0%);
173
- --color-text-0: hsl(0, 0%, 11%);
174
- --color-text-1: hsl(0, 0%, 18%);
175
- --color-text-3: hsl(204, 4%, 45%);
176
- --color-text-shadow: hsl(0, 0%, 100%);
177
- --color-text-highlight: hsl(52, 100%, 50%);
178
- --color-text-highlight-p3: color(display-p3 0.972 0.8205 0.05);
176
+ --tl-color-text: hsl(0, 0%, 0%);
177
+ --tl-color-text-0: hsl(0, 0%, 11%);
178
+ --tl-color-text-1: hsl(0, 0%, 18%);
179
+ --tl-color-text-3: hsl(204, 4%, 45%);
180
+ --tl-color-text-shadow: hsl(0, 0%, 100%);
181
+ --tl-color-text-highlight: hsl(52, 100%, 50%);
182
+ --tl-color-text-highlight-p3: color(display-p3 0.972 0.8205 0.05);
179
183
  /* Named */
180
- --color-primary: hsl(214, 84%, 56%);
181
- --color-success: hsl(123, 46%, 34%);
182
- --color-info: hsl(201, 98%, 41%);
183
- --color-warning: hsl(27, 98%, 47%);
184
- --color-danger: hsl(0, 90%, 43%);
185
- --color-laser: hsl(0, 100%, 50%);
184
+ --tl-color-primary: hsl(214, 84%, 56%);
185
+ --tl-color-success: hsl(123, 46%, 34%);
186
+ --tl-color-info: hsl(201, 98%, 41%);
187
+ --tl-color-warning: hsl(27, 98%, 47%);
188
+ --tl-color-danger: hsl(0, 90%, 43%);
189
+ --tl-color-laser: hsl(0, 100%, 50%);
186
190
  /* Shadows */
187
- --shadow-1: 0px 1px 2px hsl(0, 0%, 0%, 25%), 0px 1px 3px hsl(0, 0%, 0%, 9%);
188
- --shadow-2:
191
+ --tl-shadow-1: 0px 1px 2px hsl(0, 0%, 0%, 25%), 0px 1px 3px hsl(0, 0%, 0%, 9%);
192
+ --tl-shadow-2:
189
193
  0px 0px 2px hsl(0, 0%, 0%, 16%), 0px 2px 3px hsl(0, 0%, 0%, 24%),
190
- 0px 2px 6px hsl(0, 0%, 0%, 0.1), inset 0px 0px 0px 1px var(--color-panel-contrast);
191
- --shadow-3:
194
+ 0px 2px 6px hsl(0, 0%, 0%, 0.1), inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
195
+ --tl-shadow-3:
192
196
  0px 1px 2px hsl(0, 0%, 0%, 28%), 0px 2px 6px hsl(0, 0%, 0%, 14%),
193
- inset 0px 0px 0px 1px var(--color-panel-contrast);
194
- --shadow-4:
197
+ inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
198
+ --tl-shadow-4:
195
199
  0px 0px 3px hsl(0, 0%, 0%, 19%), 0px 5px 4px hsl(0, 0%, 0%, 16%),
196
- 0px 2px 16px hsl(0, 0%, 0%, 6%), inset 0px 0px 0px 1px var(--color-panel-contrast);
200
+ 0px 2px 16px hsl(0, 0%, 0%, 6%), inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
197
201
  }
198
202
 
199
203
  .tl-theme__dark {
200
204
  /* Canvas */
201
- --color-snap: hsl(0, 76%, 60%);
202
- --color-selection-fill: hsl(209, 100%, 57%, 20%);
203
- --color-selection-stroke: hsl(214, 84%, 56%);
204
- --color-background: hsl(240, 5%, 6.5%);
205
- --color-brush-fill: hsl(0, 0%, 71%, 5.1%);
206
- --color-brush-stroke: hsl(0, 0%, 71%, 25.1%);
207
- --color-grid: hsl(0, 0%, 40%);
205
+ --tl-color-snap: hsl(0, 76%, 60%);
206
+ --tl-color-selection-fill: hsl(209, 100%, 57%, 20%);
207
+ --tl-color-selection-stroke: hsl(214, 84%, 56%);
208
+ --tl-color-background: hsl(240, 5%, 6.5%);
209
+ --tl-color-brush-fill: hsl(0, 0%, 71%, 5.1%);
210
+ --tl-color-brush-stroke: hsl(0, 0%, 71%, 25.1%);
211
+ --tl-color-grid: hsl(0, 0%, 40%);
208
212
  /* UI */
209
- --color-low: hsl(260, 4.5%, 10.5%);
210
- --color-low-border: hsl(207, 10%, 10%);
211
- --color-culled: hsl(210, 11%, 19%);
212
- --color-muted-none: hsl(0, 0%, 100%, 0%);
213
- --color-muted-0: hsl(0, 0%, 100%, 2%);
214
- --color-muted-1: hsl(0, 0%, 100%, 10%);
215
- --color-muted-2: hsl(0, 0%, 100%, 5%);
216
- --color-hint: hsl(0, 0%, 100%, 7%);
217
- --color-overlay: hsl(0, 0%, 0%, 50%);
218
- --color-divider: hsl(240, 9%, 22%);
219
- --color-panel: hsl(235, 6.8%, 13.5%);
220
- --color-panel-contrast: hsl(245, 12%, 23%);
221
- --color-panel-overlay: hsl(210, 10%, 24%, 82%);
222
- --color-panel-transparent: hsla(235, 6.8%, 13.5%, 0%);
223
- --color-selected: hsl(217, 89%, 61%);
224
- --color-selected-contrast: hsl(0, 0%, 100%);
225
- --color-focus: hsl(217, 76%, 80%);
226
- --color-tooltip: hsla(0, 0%, 100%, 1);
213
+ --tl-color-low: hsl(260, 4.5%, 10.5%);
214
+ --tl-color-low-border: hsl(207, 10%, 10%);
215
+ --tl-color-culled: hsl(210, 11%, 19%);
216
+ --tl-color-muted-none: hsl(0, 0%, 100%, 0%);
217
+ --tl-color-muted-0: hsl(0, 0%, 100%, 2%);
218
+ --tl-color-muted-1: hsl(0, 0%, 100%, 10%);
219
+ --tl-color-muted-2: hsl(0, 0%, 100%, 5%);
220
+ --tl-color-hint: hsl(0, 0%, 100%, 7%);
221
+ --tl-color-overlay: hsl(0, 0%, 0%, 50%);
222
+ --tl-color-divider: hsl(240, 9%, 22%);
223
+ --tl-color-panel: hsl(235, 6.8%, 13.5%);
224
+ --tl-color-panel-contrast: hsl(245, 12%, 23%);
225
+ --tl-color-panel-overlay: hsl(210, 10%, 24%, 82%);
226
+ --tl-color-panel-transparent: hsla(235, 6.8%, 13.5%, 0%);
227
+ --tl-color-selected: hsl(217, 89%, 61%);
228
+ --tl-color-selected-contrast: hsl(0, 0%, 100%);
229
+ --tl-color-focus: hsl(217, 76%, 80%);
230
+ --tl-color-tooltip: hsla(0, 0%, 100%, 1);
227
231
  /* Text */
228
- --color-text: hsl(210, 17%, 98%);
229
- --color-text-0: hsl(0, 9%, 94%);
230
- --color-text-1: hsl(0, 0%, 85%);
231
- --color-text-3: hsl(204, 4%, 75%);
232
- --color-text-shadow: hsl(210, 13%, 18%);
233
- --color-text-highlight: hsl(52, 100%, 41%);
234
- --color-text-highlight-p3: color(display-p3 0.8078 0.6225 0.0312);
232
+ --tl-color-text: hsl(210, 17%, 98%);
233
+ --tl-color-text-0: hsl(0, 9%, 94%);
234
+ --tl-color-text-1: hsl(0, 0%, 85%);
235
+ --tl-color-text-3: hsl(204, 4%, 75%);
236
+ --tl-color-text-shadow: hsl(210, 13%, 18%);
237
+ --tl-color-text-highlight: hsl(52, 100%, 41%);
238
+ --tl-color-text-highlight-p3: color(display-p3 0.8078 0.6225 0.0312);
235
239
  /* Named */
236
- --color-primary: hsl(214, 84%, 56%);
237
- --color-success: hsl(123, 38%, 57%);
238
- --color-info: hsl(199, 92%, 56%);
239
- --color-warning: hsl(36, 100%, 57%);
240
- --color-danger: hsl(0, 82%, 66%);
241
- --color-laser: hsl(0, 100%, 50%);
240
+ --tl-color-primary: hsl(214, 84%, 56%);
241
+ --tl-color-success: hsl(123, 38%, 57%);
242
+ --tl-color-info: hsl(199, 92%, 56%);
243
+ --tl-color-warning: hsl(36, 100%, 57%);
244
+ --tl-color-danger: hsl(0, 82%, 66%);
245
+ --tl-color-laser: hsl(0, 100%, 50%);
242
246
  /* Shadows */
243
- --shadow-1:
247
+ --tl-shadow-1:
244
248
  0px 1px 2px hsl(0, 0%, 0%, 16.1%), 0px 1px 3px hsl(0, 0%, 0%, 22%),
245
- inset 0px 0px 0px 1px var(--color-panel-contrast);
246
- --shadow-2:
249
+ inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
250
+ --tl-shadow-2:
247
251
  0px 1px 3px hsl(0, 0%, 0%, 66.6%), 0px 2px 6px hsl(0, 0%, 0%, 33%),
248
- inset 0px 0px 0px 1px var(--color-panel-contrast);
249
- --shadow-3:
252
+ inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
253
+ --tl-shadow-3:
250
254
  0px 1px 3px hsl(0, 0%, 0%, 50%), 0px 2px 12px hsl(0, 0%, 0%, 50%),
251
- inset 0px 0px 0px 1px var(--color-panel-contrast);
255
+ inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
252
256
  }
253
257
 
254
258
  .tl-counter-scaled {
@@ -274,7 +278,7 @@
274
278
  }
275
279
 
276
280
  .tl-container__focused {
277
- outline: 1px solid var(--color-low);
281
+ outline: 1px solid var(--tl-color-low);
278
282
  }
279
283
 
280
284
  input,
@@ -290,7 +294,7 @@ input,
290
294
  inset: 0px;
291
295
  height: 100%;
292
296
  width: 100%;
293
- color: var(--color-text);
297
+ color: var(--tl-color-text);
294
298
  cursor: var(--tl-cursor);
295
299
  overflow: clip;
296
300
  content-visibility: auto;
@@ -298,9 +302,16 @@ input,
298
302
  contain: strict;
299
303
  }
300
304
 
305
+ .tl-canvas__in-front {
306
+ position: absolute;
307
+ inset: 0;
308
+ pointer-events: none;
309
+ z-index: var(--tl-layer-canvas-in-front);
310
+ }
311
+
301
312
  .tl-shapes {
302
313
  position: relative;
303
- z-index: var(--layer-canvas-shapes);
314
+ z-index: var(--tl-layer-canvas-shapes);
304
315
  }
305
316
 
306
317
  .tl-overlays {
@@ -311,7 +322,7 @@ input,
311
322
  width: 100%;
312
323
  contain: strict;
313
324
  pointer-events: none;
314
- z-index: var(--layer-canvas-overlays);
325
+ z-index: var(--tl-layer-canvas-overlays);
315
326
  }
316
327
 
317
328
  .tl-overlays__item {
@@ -335,7 +346,7 @@ input,
335
346
  /* ------------------- Background ------------------- */
336
347
 
337
348
  .tl-background__wrapper {
338
- z-index: var(--layer-canvas-background);
349
+ z-index: var(--tl-layer-canvas-background);
339
350
  position: absolute;
340
351
  inset: 0px;
341
352
  height: 100%;
@@ -343,7 +354,7 @@ input,
343
354
  }
344
355
 
345
356
  .tl-background {
346
- background-color: var(--color-background);
357
+ background-color: var(--tl-color-background);
347
358
  width: 100%;
348
359
  height: 100%;
349
360
  }
@@ -357,12 +368,12 @@ input,
357
368
  height: 100%;
358
369
  touch-action: none;
359
370
  pointer-events: none;
360
- z-index: var(--layer-canvas-grid);
371
+ z-index: var(--tl-layer-canvas-grid);
361
372
  contain: strict;
362
373
  }
363
374
 
364
375
  .tl-grid-dot {
365
- fill: var(--color-grid);
376
+ fill: var(--tl-color-grid);
366
377
  }
367
378
 
368
379
  /* --------------------- Layers --------------------- */
@@ -380,54 +391,54 @@ input,
380
391
 
381
392
  /* back of the stack, behind user's stuff */
382
393
  .tl-collaborator__scribble {
383
- z-index: var(--layer-overlays-collaborator-scribble);
394
+ z-index: var(--tl-layer-overlays-collaborator-scribble);
384
395
  }
385
396
 
386
397
  .tl-collaborator__brush {
387
- z-index: var(--layer-overlays-collaborator-brush);
398
+ z-index: var(--tl-layer-overlays-collaborator-brush);
388
399
  }
389
400
 
390
401
  .tl-collaborator__shape-indicator {
391
- z-index: var(--layer-overlays-collaborator-shape-indicator);
402
+ z-index: var(--tl-layer-overlays-collaborator-shape-indicator);
392
403
  }
393
404
 
394
405
  .tl-user-scribble {
395
- z-index: var(--layer-overlays-user-scribble);
406
+ z-index: var(--tl-layer-overlays-user-scribble);
396
407
  }
397
408
 
398
409
  .tl-user-brush {
399
- z-index: var(--layer-overlays-user-brush);
410
+ z-index: var(--tl-layer-overlays-user-brush);
400
411
  }
401
412
 
402
413
  .tl-user-handles {
403
- z-index: var(--layer-overlays-user-handles);
414
+ z-index: var(--tl-layer-overlays-user-handles);
404
415
  }
405
416
 
406
417
  .tl-user-snapline {
407
- z-index: var(--layer-overlays-user-snapline);
418
+ z-index: var(--tl-layer-overlays-user-snapline);
408
419
  }
409
420
 
410
421
  .tl-selection__fg {
411
422
  pointer-events: none;
412
- z-index: var(--layer-overlays-selection-fg);
423
+ z-index: var(--tl-layer-overlays-selection-fg);
413
424
  }
414
425
 
415
426
  .tl-user-indicator__hint {
416
- z-index: var(--layer-overlays-user-indicator-hint);
427
+ z-index: var(--tl-layer-overlays-user-indicator-hint);
417
428
  stroke-width: calc(2.5px * var(--tl-scale));
418
429
  }
419
430
 
420
431
  .tl-custom-overlays {
421
- z-index: var(--layer-overlays-custom);
432
+ z-index: var(--tl-layer-overlays-custom);
422
433
  }
423
434
 
424
435
  /* behind collaborator cursor */
425
436
  .tl-collaborator__cursor-hint {
426
- z-index: var(--layer-overlays-collaborator-cursor-hint);
437
+ z-index: var(--tl-layer-overlays-collaborator-cursor-hint);
427
438
  }
428
439
 
429
440
  .tl-collaborator__cursor {
430
- z-index: var(--layer-overlays-collaborator-cursor);
441
+ z-index: var(--tl-layer-overlays-collaborator-cursor);
431
442
  }
432
443
 
433
444
  .tl-cursor {
@@ -448,32 +459,32 @@ input,
448
459
  .tl-selection__fg__outline {
449
460
  fill: none;
450
461
  pointer-events: none;
451
- stroke: var(--color-selection-stroke);
462
+ stroke: var(--tl-color-selection-stroke);
452
463
  stroke-width: calc(1.5px * var(--tl-scale));
453
464
  }
454
465
 
455
466
  .tl-corner-handle {
456
467
  pointer-events: none;
457
- stroke: var(--color-selection-stroke);
458
- fill: var(--color-background);
468
+ stroke: var(--tl-color-selection-stroke);
469
+ fill: var(--tl-color-background);
459
470
  stroke-width: calc(1.5px * var(--tl-scale));
460
471
  }
461
472
 
462
473
  .tl-text-handle {
463
474
  pointer-events: none;
464
- fill: var(--color-selection-stroke);
475
+ fill: var(--tl-color-selection-stroke);
465
476
  }
466
477
 
467
478
  .tl-corner-crop-handle {
468
479
  pointer-events: none;
469
480
  fill: none;
470
- stroke: var(--color-selection-stroke);
481
+ stroke: var(--tl-color-selection-stroke);
471
482
  }
472
483
 
473
484
  .tl-corner-crop-edge-handle {
474
485
  pointer-events: none;
475
486
  fill: none;
476
- stroke: var(--color-selection-stroke);
487
+ stroke: var(--tl-color-selection-stroke);
477
488
  }
478
489
 
479
490
  .tl-mobile-rotate__bg {
@@ -483,8 +494,8 @@ input,
483
494
 
484
495
  .tl-mobile-rotate__fg {
485
496
  pointer-events: none;
486
- stroke: var(--color-selection-stroke);
487
- fill: var(--color-background);
497
+ stroke: var(--tl-color-selection-stroke);
498
+ fill: var(--tl-color-background);
488
499
  stroke-width: calc(1.5px * var(--tl-scale));
489
500
  }
490
501
 
@@ -514,8 +525,8 @@ input,
514
525
  text-overflow: ellipsis;
515
526
  font-size: 12px;
516
527
  font-family: var(--font-body);
517
- border-radius: var(--radius-2);
518
- color: var(--color-selected-contrast);
528
+ border-radius: var(--tl-radius-2);
529
+ color: var(--tl-color-selected-contrast);
519
530
  }
520
531
 
521
532
  .tl-nametag-title {
@@ -533,7 +544,7 @@ input,
533
544
  font-size: 12px;
534
545
  font-family: var(--font-body);
535
546
  text-shadow: var(--tl-text-outline);
536
- color: var(--color-selected-contrast);
547
+ color: var(--tl-color-selected-contrast);
537
548
  }
538
549
 
539
550
  .tl-nametag-chat {
@@ -542,31 +553,31 @@ input,
542
553
  left: 13px;
543
554
  width: fit-content;
544
555
  height: fit-content;
545
- color: var(--color-selected-contrast);
556
+ color: var(--tl-color-selected-contrast);
546
557
  white-space: nowrap;
547
558
  position: absolute;
548
559
  padding: 3px 6px;
549
560
  font-size: 12px;
550
561
  font-family: var(--font-body);
551
562
  opacity: 1;
552
- border-radius: var(--radius-2);
563
+ border-radius: var(--tl-radius-2);
553
564
  }
554
565
 
555
566
  .tl-cursor-chat {
556
567
  position: absolute;
557
- color: var(--color-selected-contrast);
568
+ color: var(--tl-color-selected-contrast);
558
569
  white-space: nowrap;
559
570
  padding: 3px 6px;
560
571
  font-size: 12px;
561
572
  font-family: var(--font-body);
562
573
  pointer-events: none;
563
- z-index: var(--layer-cursor);
574
+ z-index: var(--tl-layer-cursor);
564
575
  margin-top: 16px;
565
576
  margin-left: 13px;
566
577
  opacity: 1;
567
578
  border: none;
568
579
  user-select: text;
569
- border-radius: var(--radius-2);
580
+ border-radius: var(--tl-radius-2);
570
581
  }
571
582
 
572
583
  .tl-cursor-chat .tl-cursor-chat__bubble {
@@ -574,13 +585,13 @@ input,
574
585
  }
575
586
 
576
587
  .tl-cursor-chat::selection {
577
- background: var(--color-selected);
578
- color: var(--color-selected-contrast);
588
+ background: var(--tl-color-selected);
589
+ color: var(--tl-color-selected-contrast);
579
590
  text-shadow: none;
580
591
  }
581
592
 
582
593
  .tl-cursor-chat::placeholder {
583
- color: var(--color-selected-contrast);
594
+ color: var(--tl-color-selected-contrast);
584
595
  opacity: 0.7;
585
596
  }
586
597
 
@@ -651,7 +662,7 @@ input,
651
662
  background: none;
652
663
  border-image: none;
653
664
  border: 0px;
654
- caret-color: var(--color-text);
665
+ caret-color: var(--tl-color-text);
655
666
  color: inherit;
656
667
  column-count: initial !important;
657
668
  display: inline-block;
@@ -683,7 +694,7 @@ input,
683
694
 
684
695
  .tl-text-measure {
685
696
  position: absolute;
686
- z-index: var(--layer-canvas-hidden);
697
+ z-index: var(--tl-layer-canvas-hidden);
687
698
  top: 0px;
688
699
  left: 0px;
689
700
  opacity: 0;
@@ -746,8 +757,8 @@ input,
746
757
  }
747
758
 
748
759
  .tl-text-input::selection {
749
- background: var(--color-selected);
750
- color: var(--color-selected-contrast);
760
+ background: var(--tl-color-selected);
761
+ color: var(--tl-color-selected-contrast);
751
762
  text-shadow: none;
752
763
  }
753
764
 
@@ -757,7 +768,7 @@ input,
757
768
  display: flex;
758
769
  justify-content: center;
759
770
  align-items: center;
760
- color: var(--color-text);
771
+ color: var(--tl-color-text);
761
772
  text-shadow: var(--tl-text-outline);
762
773
  line-height: inherit;
763
774
  position: absolute;
@@ -801,7 +812,7 @@ input,
801
812
 
802
813
  .tl-text-wrapper .tl-text-content {
803
814
  pointer-events: all;
804
- z-index: var(--layer-text-content);
815
+ z-index: var(--tl-layer-text-content);
805
816
  }
806
817
 
807
818
  .tl-text-label__inner > .tl-text-content {
@@ -811,7 +822,7 @@ input,
811
822
  padding: inherit;
812
823
  height: fit-content;
813
824
  width: fit-content;
814
- border-radius: var(--radius-1);
825
+ border-radius: var(--tl-radius-1);
815
826
  max-width: 100%;
816
827
  }
817
828
 
@@ -824,7 +835,7 @@ input,
824
835
  }
825
836
 
826
837
  .tl-text-wrapper[data-isselected='true'] .tl-text-input {
827
- z-index: var(--layer-text-editor);
838
+ z-index: var(--tl-layer-text-editor);
828
839
  pointer-events: all;
829
840
  }
830
841
 
@@ -919,7 +930,7 @@ input,
919
930
  }
920
931
 
921
932
  .tl-rich-text a {
922
- color: var(--color-primary);
933
+ color: var(--tl-color-primary);
923
934
  text-decoration: underline;
924
935
  }
925
936
 
@@ -942,14 +953,14 @@ input,
942
953
  }
943
954
 
944
955
  .tl-theme__dark .tl-rich-text mark {
945
- background-color: var(--color-text-highlight);
956
+ background-color: var(--tl-color-text-highlight);
946
957
  color: currentColor;
947
958
  }
948
959
 
949
960
  @supports (color: color(display-p3 1 1 1)) {
950
961
  @media (color-gamut: p3) {
951
962
  .tl-container:not(.tl-theme__force-sRGB) .tl-rich-text mark {
952
- background-color: var(--color-text-highlight-p3);
963
+ background-color: var(--tl-color-text-highlight-p3);
953
964
  }
954
965
  }
955
966
  }
@@ -961,15 +972,15 @@ input,
961
972
  /* --------------------- Loading -------------------- */
962
973
 
963
974
  .tl-loading {
964
- background-color: var(--color-background);
965
- color: var(--color-text-1);
975
+ background-color: var(--tl-color-background);
976
+ color: var(--tl-color-text-1);
966
977
  height: 100%;
967
978
  width: 100%;
968
979
  display: flex;
969
980
  flex-direction: column;
970
981
  justify-content: center;
971
982
  align-items: center;
972
- gap: var(--space-2);
983
+ gap: var(--tl-space-2);
973
984
  font-size: 14px;
974
985
  font-weight: 500;
975
986
  opacity: 0;
@@ -977,7 +988,7 @@ input,
977
988
  animation-delay: 0.2s;
978
989
  position: absolute;
979
990
  inset: 0px;
980
- z-index: var(--layer-canvas-blocker);
991
+ z-index: var(--tl-layer-canvas-blocker);
981
992
  }
982
993
 
983
994
  @keyframes tl-fade-in {
@@ -1010,8 +1021,8 @@ input,
1010
1021
  }
1011
1022
 
1012
1023
  .tl-brush__default {
1013
- stroke: var(--color-brush-stroke);
1014
- fill: var(--color-brush-fill);
1024
+ stroke: var(--tl-color-brush-stroke);
1025
+ fill: var(--tl-color-brush-fill);
1015
1026
  }
1016
1027
 
1017
1028
  /* -------------------- Scribble -------------------- */
@@ -1026,13 +1037,13 @@ input,
1026
1037
  /* ---------------------- Snaps --------------------- */
1027
1038
 
1028
1039
  .tl-snap-indicator {
1029
- stroke: var(--color-snap);
1040
+ stroke: var(--tl-color-snap);
1030
1041
  stroke-width: calc(1px * var(--tl-scale));
1031
1042
  fill: none;
1032
1043
  }
1033
1044
 
1034
1045
  .tl-snap-point {
1035
- stroke: var(--color-snap);
1046
+ stroke: var(--tl-color-snap);
1036
1047
  stroke-width: calc(1px * var(--tl-scale));
1037
1048
  fill: none;
1038
1049
  }
@@ -1052,7 +1063,7 @@ input,
1052
1063
  justify-content: center;
1053
1064
  font-size: 12px;
1054
1065
  font-weight: 400;
1055
- color: var(--color-text-1);
1066
+ color: var(--tl-color-text-1);
1056
1067
  padding: 13px;
1057
1068
  cursor: var(--tl-cursor-pointer);
1058
1069
  border: none;
@@ -1070,13 +1081,13 @@ input,
1070
1081
  display: block;
1071
1082
  width: calc(100% - 12px);
1072
1083
  height: calc(100% - 12px);
1073
- border-radius: var(--radius-1);
1074
- background-color: var(--color-background);
1084
+ border-radius: var(--tl-radius-1);
1085
+ background-color: var(--tl-color-background);
1075
1086
  pointer-events: none;
1076
1087
  }
1077
1088
 
1078
1089
  .tl-hyperlink-button:focus-visible {
1079
- color: var(--color-selected);
1090
+ color: var(--tl-color-selected);
1080
1091
  }
1081
1092
 
1082
1093
  .tl-hyperlink__icon {
@@ -1103,8 +1114,8 @@ input,
1103
1114
  }
1104
1115
 
1105
1116
  .tl-handle__fg {
1106
- fill: var(--color-selected-contrast);
1107
- stroke: var(--color-selection-stroke);
1117
+ fill: var(--tl-color-selected-contrast);
1118
+ stroke: var(--tl-color-selection-stroke);
1108
1119
  stroke-width: calc(1.5px * var(--tl-scale));
1109
1120
  pointer-events: none;
1110
1121
  }
@@ -1114,7 +1125,7 @@ input,
1114
1125
  }
1115
1126
 
1116
1127
  .tl-handle__clone > .tl-handle__fg {
1117
- fill: var(--color-selection-stroke);
1128
+ fill: var(--tl-color-selection-stroke);
1118
1129
  stroke: none;
1119
1130
  }
1120
1131
 
@@ -1124,7 +1135,7 @@ input,
1124
1135
 
1125
1136
  @media (pointer: coarse) {
1126
1137
  .tl-handle__bg:active {
1127
- fill: var(--color-selection-fill);
1138
+ fill: var(--tl-color-selection-fill);
1128
1139
  }
1129
1140
 
1130
1141
  .tl-handle__create {
@@ -1180,13 +1191,13 @@ input,
1180
1191
  stroke-linejoin: round;
1181
1192
  /* content-visibility: auto; */
1182
1193
  transform-origin: top left;
1183
- color: var(--color-text-1);
1194
+ color: var(--tl-color-text-1);
1184
1195
  }
1185
1196
 
1186
1197
  /* -------------------- Group shape ------------------ */
1187
1198
 
1188
1199
  .tl-group {
1189
- stroke: var(--color-text);
1200
+ stroke: var(--tl-color-text);
1190
1201
  stroke-width: calc(1px * var(--tl-scale));
1191
1202
  opacity: 0.5;
1192
1203
  }
@@ -1204,12 +1215,12 @@ input,
1204
1215
  justify-content: center;
1205
1216
  align-items: center;
1206
1217
  text-align: center;
1207
- color: var(--color-text);
1218
+ color: var(--tl-color-text);
1208
1219
  text-shadow: var(--tl-text-outline);
1209
1220
  }
1210
1221
 
1211
1222
  .tl-shape[data-shape-type='arrow'] .tl-text-label__inner {
1212
- border-radius: var(--radius-1);
1223
+ border-radius: var(--tl-radius-1);
1213
1224
  box-sizing: content-box;
1214
1225
  height: max-content;
1215
1226
  width: max-content;
@@ -1220,22 +1231,22 @@ input,
1220
1231
  }
1221
1232
 
1222
1233
  .tl-arrow-hint {
1223
- stroke: var(--color-text-1);
1234
+ stroke: var(--tl-color-text-1);
1224
1235
  fill: none;
1225
1236
  stroke-linecap: round;
1226
1237
  overflow: visible;
1227
1238
  }
1228
1239
 
1229
1240
  .tl-arrow-hint-handle {
1230
- fill: var(--color-selected-contrast);
1231
- stroke: var(--color-selection-stroke);
1241
+ fill: var(--tl-color-selected-contrast);
1242
+ stroke: var(--tl-color-selection-stroke);
1232
1243
  stroke-width: calc(1.5px * var(--tl-scale));
1233
1244
  r: calc(4px * var(--tl-scale));
1234
1245
  }
1235
1246
 
1236
1247
  .tl-arrow-hint-snap {
1237
1248
  stroke: transparent;
1238
- fill: var(--color-selection-fill);
1249
+ fill: var(--tl-color-selection-fill);
1239
1250
  r: calc(12px * var(--tl-scale));
1240
1251
  }
1241
1252
 
@@ -1255,40 +1266,40 @@ input,
1255
1266
  width: 100%;
1256
1267
  height: 100%;
1257
1268
  position: relative;
1258
- border: 1px solid var(--color-panel-contrast);
1259
- background-color: var(--color-panel);
1260
- border-radius: var(--radius-2);
1269
+ border: 1px solid var(--tl-color-panel-contrast);
1270
+ background-color: var(--tl-color-panel);
1271
+ border-radius: var(--tl-radius-2);
1261
1272
  display: flex;
1262
1273
  flex-direction: column;
1263
1274
  overflow: hidden;
1264
1275
  }
1265
1276
 
1266
1277
  .tl-bookmark__container--safariExport {
1267
- border: 1px solid var(--color-divider);
1278
+ border: 1px solid var(--tl-color-divider);
1268
1279
  }
1269
1280
 
1270
1281
  .tl-bookmark__image_container {
1271
1282
  flex: 1 1 100%;
1272
1283
  overflow: hidden;
1273
- border-top-left-radius: var(--radius-1);
1274
- border-top-right-radius: var(--radius-1);
1284
+ border-top-left-radius: var(--tl-radius-1);
1285
+ border-top-right-radius: var(--tl-radius-1);
1275
1286
  width: 100%;
1276
1287
  height: 100%;
1277
1288
  display: flex;
1278
1289
  justify-content: flex-end;
1279
1290
  align-items: flex-start;
1280
- box-shadow: inset 0px 0px 0px 1px var(--color-divider);
1291
+ box-shadow: inset 0px 0px 0px 1px var(--tl-color-divider);
1281
1292
  }
1282
1293
 
1283
1294
  .tl-bookmark__image_container > .tl-hyperlink-button::after {
1284
- background-color: var(--color-panel);
1295
+ background-color: var(--tl-color-panel);
1285
1296
  }
1286
1297
 
1287
1298
  .tl-bookmark__placeholder {
1288
1299
  width: 100%;
1289
1300
  height: 100%;
1290
- background-color: var(--color-muted-2);
1291
- border-bottom: 1px solid var(--color-muted-2);
1301
+ background-color: var(--tl-color-muted-2);
1302
+ border-bottom: 1px solid var(--tl-color-muted-2);
1292
1303
  }
1293
1304
 
1294
1305
  .tl-bookmark__image {
@@ -1296,12 +1307,12 @@ input,
1296
1307
  height: 100%;
1297
1308
  object-fit: cover;
1298
1309
  object-position: center;
1299
- border-bottom: 1px solid var(--color-muted-2);
1310
+ border-bottom: 1px solid var(--tl-color-muted-2);
1300
1311
  }
1301
1312
 
1302
1313
  .tl-bookmark__copy_container {
1303
- background-color: var(--color-muted-0);
1304
- padding: var(--space-4);
1314
+ background-color: var(--tl-color-muted-0);
1315
+ padding: var(--tl-space-4);
1305
1316
  pointer-events: all;
1306
1317
  display: flex;
1307
1318
  flex-direction: column;
@@ -1321,7 +1332,7 @@ input,
1321
1332
  font-size: 16px;
1322
1333
  line-height: 1.6;
1323
1334
  font-weight: bold;
1324
- padding-bottom: var(--space-2);
1335
+ padding-bottom: var(--tl-space-2);
1325
1336
  overflow: hidden;
1326
1337
  max-height: calc((16px * 1.6) * 2);
1327
1338
  -webkit-box-orient: vertical;
@@ -1341,19 +1352,19 @@ input,
1341
1352
  line-clamp: 3;
1342
1353
  text-overflow: ellipsis;
1343
1354
  display: -webkit-box;
1344
- color: var(--color-text-2);
1345
- margin: var(--space-2) 0px;
1355
+ color: var(--tl-color-text-2);
1356
+ margin: var(--tl-space-2) 0px;
1346
1357
  }
1347
1358
 
1348
1359
  .tl-bookmark__heading + .tl-bookmark__link,
1349
1360
  .tl-bookmark__description + .tl-bookmark__link {
1350
- margin-top: var(--space-3);
1361
+ margin-top: var(--tl-space-3);
1351
1362
  }
1352
1363
  .tl-bookmark__link {
1353
1364
  font-size: 12px;
1354
1365
  pointer-events: all;
1355
1366
  display: flex;
1356
- color: var(--color-text-2);
1367
+ color: var(--tl-color-text-2);
1357
1368
  align-items: center;
1358
1369
  cursor: var(--tl-cursor-pointer);
1359
1370
  width: fit-content;
@@ -1395,7 +1406,7 @@ input,
1395
1406
  width: 100%;
1396
1407
  height: 100%;
1397
1408
  pointer-events: all;
1398
- /* background-color: var(--color-background); */
1409
+ /* background-color: var(--tl-color-background); */
1399
1410
 
1400
1411
  display: flex;
1401
1412
  justify-content: center;
@@ -1424,7 +1435,7 @@ input,
1424
1435
  height: 100%;
1425
1436
  pointer-events: all;
1426
1437
  opacity: 1;
1427
- z-index: var(--layer-text-container);
1438
+ z-index: var(--tl-layer-text-container);
1428
1439
  border-radius: 1px;
1429
1440
  }
1430
1441
 
@@ -1440,22 +1451,22 @@ input,
1440
1451
  }
1441
1452
 
1442
1453
  .tl-frame__creating {
1443
- stroke: var(--color-selected);
1454
+ stroke: var(--tl-color-selected);
1444
1455
  fill: none;
1445
1456
  }
1446
1457
 
1447
1458
  .tl-frame-heading {
1448
- --frame-padding-x: 6px;
1449
- --frame-height: 24px;
1450
- --frame-minimum-width: 32px;
1451
- --frame-offset-width: 16px;
1459
+ --tl-frame-padding-x: 6px;
1460
+ --tl-frame-height: 24px;
1461
+ --tl-frame-minimum-width: 32px;
1462
+ --tl-frame-offset-width: 16px;
1452
1463
  display: flex;
1453
1464
  align-items: center;
1454
1465
  position: absolute;
1455
1466
  transform-origin: 0% 100%;
1456
1467
  overflow: hidden;
1457
1468
  max-width: 100%;
1458
- min-width: var(--frame-minimum-width);
1469
+ min-width: var(--tl-frame-minimum-width);
1459
1470
  height: auto;
1460
1471
  font-size: 12px;
1461
1472
  padding-bottom: 4px;
@@ -1467,18 +1478,18 @@ input,
1467
1478
  /* scale from bottom left corner so we can pin it to the top left corner of the frame */
1468
1479
  transform-origin: 0% 100%;
1469
1480
  display: flex;
1470
- height: var(--frame-height);
1481
+ height: var(--tl-frame-height);
1471
1482
  width: 100%;
1472
1483
  align-items: center;
1473
- border-radius: var(--radius-1);
1484
+ border-radius: var(--tl-radius-1);
1474
1485
  }
1475
1486
 
1476
1487
  .tl-frame-label {
1477
1488
  pointer-events: all;
1478
1489
  overflow: hidden;
1479
1490
  text-overflow: ellipsis;
1480
- padding: 0px var(--frame-padding-x);
1481
- border-radius: var(--radius-1);
1491
+ padding: 0px var(--tl-frame-padding-x);
1492
+ border-radius: var(--tl-radius-1);
1482
1493
  position: relative;
1483
1494
  font-size: inherit;
1484
1495
  white-space: pre;
@@ -1488,12 +1499,12 @@ input,
1488
1499
  color: transparent;
1489
1500
  white-space: pre;
1490
1501
  width: auto;
1491
- min-width: var(--frame-minimum-width);
1502
+ min-width: var(--tl-frame-minimum-width);
1492
1503
  height: 100%;
1493
1504
  overflow: visible;
1494
- background-color: var(--color-panel);
1495
- border-color: var(--color-selected);
1496
- box-shadow: inset 0px 0px 0px 1.5px var(--color-selected);
1505
+ background-color: var(--tl-color-panel);
1506
+ border-color: var(--tl-color-selected);
1507
+ box-shadow: inset 0px 0px 0px 1.5px var(--tl-color-selected);
1497
1508
  }
1498
1509
 
1499
1510
  .tl-frame-name-input {
@@ -1501,7 +1512,7 @@ input,
1501
1512
  border: none;
1502
1513
  background: none;
1503
1514
  outline: none;
1504
- padding: 0px var(--frame-padding-x);
1515
+ padding: 0px var(--tl-frame-padding-x);
1505
1516
  inset: 0px;
1506
1517
  height: 100%;
1507
1518
  width: 100%;
@@ -1509,8 +1520,8 @@ input,
1509
1520
  font-family: inherit;
1510
1521
  font-weight: inherit;
1511
1522
  width: 100%;
1512
- color: var(--color-text-1);
1513
- border-radius: var(--radius-1);
1523
+ color: var(--tl-color-text-1);
1524
+ border-radius: var(--tl-radius-1);
1514
1525
  user-select: all;
1515
1526
  -webkit-user-select: text;
1516
1527
  white-space: pre;
@@ -1530,7 +1541,7 @@ input,
1530
1541
 
1531
1542
  .tl-embed {
1532
1543
  border: none;
1533
- border-radius: var(--radius-2);
1544
+ border-radius: var(--tl-radius-2);
1534
1545
  }
1535
1546
 
1536
1547
  /* -------------- Shape error boundary -------------- */
@@ -1538,11 +1549,11 @@ input,
1538
1549
  .tl-shape-error-boundary {
1539
1550
  width: 100%;
1540
1551
  height: 100%;
1541
- background-color: var(--color-muted-1);
1552
+ background-color: var(--tl-color-muted-1);
1542
1553
  border-width: calc(1px * var(--tl-scale));
1543
- border-color: var(--color-muted-1);
1554
+ border-color: var(--tl-color-muted-1);
1544
1555
  border-style: solid;
1545
- border-radius: calc(var(--radius-1) * var(--tl-scale));
1556
+ border-radius: calc(var(--tl-radius-1) * var(--tl-scale));
1546
1557
  display: flex;
1547
1558
  flex-direction: column;
1548
1559
  align-items: center;
@@ -1551,7 +1562,7 @@ input,
1551
1562
  position: relative;
1552
1563
  pointer-events: all;
1553
1564
  overflow: hidden;
1554
- padding: var(--space-2);
1565
+ padding: var(--tl-space-2);
1555
1566
  }
1556
1567
 
1557
1568
  .tl-shape-error-boundary::before {
@@ -1559,7 +1570,7 @@ input,
1559
1570
  content: 'Error';
1560
1571
  font-size: 12px;
1561
1572
  font-family: inherit;
1562
- color: var(--color-text-0);
1573
+ color: var(--tl-color-text-0);
1563
1574
  }
1564
1575
 
1565
1576
  /* ----------------- Error boundary ----------------- */
@@ -1570,9 +1581,9 @@ input,
1570
1581
  display: flex;
1571
1582
  align-items: center;
1572
1583
  justify-content: center;
1573
- padding: var(--space-4);
1574
- background-color: var(--color-background);
1575
- color: var(--color-text-1);
1584
+ padding: var(--tl-space-4);
1585
+ background-color: var(--tl-color-background);
1586
+ color: var(--tl-color-text-1);
1576
1587
  position: absolute;
1577
1588
  }
1578
1589
 
@@ -1581,8 +1592,8 @@ input,
1581
1592
  inset: 0px;
1582
1593
  height: 100%;
1583
1594
  width: 100%;
1584
- z-index: var(--layer-error-overlay);
1585
- background-color: var(--color-overlay);
1595
+ z-index: var(--tl-layer-error-overlay);
1596
+ background-color: var(--tl-color-overlay);
1586
1597
  }
1587
1598
 
1588
1599
  .tl-error-boundary__content * {
@@ -1597,7 +1608,7 @@ input,
1597
1608
  inset: 0px;
1598
1609
  height: 100%;
1599
1610
  width: 100%;
1600
- z-index: var(--layer-error-canvas);
1611
+ z-index: var(--tl-layer-error-canvas);
1601
1612
  }
1602
1613
 
1603
1614
  /* some browsers seem to have some weird interactions between stacking contexts
@@ -1610,7 +1621,7 @@ it from receiving any pointer events or affecting the cursor. */
1610
1621
  inset: 0px;
1611
1622
  height: 100%;
1612
1623
  width: 100%;
1613
- z-index: var(--layer-error-canvas-after);
1624
+ z-index: var(--tl-layer-error-canvas-after);
1614
1625
  pointer-events: all;
1615
1626
  }
1616
1627
 
@@ -1620,16 +1631,16 @@ it from receiving any pointer events or affecting the cursor. */
1620
1631
  max-width: 100%;
1621
1632
  width: 400px;
1622
1633
  max-height: 100%;
1623
- background-color: var(--color-panel);
1634
+ background-color: var(--tl-color-panel);
1624
1635
  padding: 16px;
1625
1636
  border-radius: 16px;
1626
- box-shadow: var(--shadow-2);
1637
+ box-shadow: var(--tl-shadow-2);
1627
1638
  font-size: 14px;
1628
1639
  font-weight: 400;
1629
1640
  display: flex;
1630
1641
  flex-direction: column;
1631
1642
  overflow: auto;
1632
- z-index: var(--layer-error-content);
1643
+ z-index: var(--tl-layer-error-content);
1633
1644
  gap: 12px;
1634
1645
  }
1635
1646
 
@@ -1644,10 +1655,10 @@ it from receiving any pointer events or affecting the cursor. */
1644
1655
  }
1645
1656
 
1646
1657
  .tl-error-boundary__content h4 {
1647
- border: 1px solid var(--color-low-border);
1658
+ border: 1px solid var(--tl-color-low-border);
1648
1659
  margin: -6px 0 0 0;
1649
- padding: var(--space-5);
1650
- border-radius: var(--radius-2);
1660
+ padding: var(--tl-space-5);
1661
+ border-radius: var(--tl-radius-2);
1651
1662
  font-weight: normal;
1652
1663
  }
1653
1664
 
@@ -1657,10 +1668,10 @@ it from receiving any pointer events or affecting the cursor. */
1657
1668
  }
1658
1669
 
1659
1670
  .tl-error-boundary__content pre {
1660
- background-color: var(--color-muted-2);
1671
+ background-color: var(--tl-color-muted-2);
1661
1672
  margin-top: 0;
1662
- padding: var(--space-5);
1663
- border-radius: var(--radius-2);
1673
+ padding: var(--tl-space-5);
1674
+ border-radius: var(--tl-radius-2);
1664
1675
  overflow: auto;
1665
1676
  font-size: 12px;
1666
1677
  max-height: 320px;
@@ -1672,15 +1683,15 @@ it from receiving any pointer events or affecting the cursor. */
1672
1683
  font-family: inherit;
1673
1684
  font-size: 14px;
1674
1685
  font-weight: 500;
1675
- padding: var(--space-4);
1676
- border-radius: var(--radius-3);
1686
+ padding: var(--tl-space-4);
1687
+ border-radius: var(--tl-radius-3);
1677
1688
  cursor: var(--tl-cursor-pointer);
1678
1689
  color: inherit;
1679
1690
  background-color: transparent;
1680
1691
  }
1681
1692
 
1682
1693
  .tl-error-boundary__content a {
1683
- color: var(--color-selected);
1694
+ color: var(--tl-color-selected);
1684
1695
  font-weight: 500;
1685
1696
  text-decoration: none;
1686
1697
  }
@@ -1692,31 +1703,31 @@ it from receiving any pointer events or affecting the cursor. */
1692
1703
 
1693
1704
  .tl-error-boundary__content__error button {
1694
1705
  position: absolute;
1695
- top: var(--space-2);
1696
- right: var(--space-2);
1706
+ top: var(--tl-space-2);
1707
+ right: var(--tl-space-2);
1697
1708
  font-size: 12px;
1698
- padding: var(--space-2) var(--space-3);
1699
- background-color: var(--color-panel);
1700
- border-radius: var(--radius-1);
1709
+ padding: var(--tl-space-2) var(--tl-space-3);
1710
+ background-color: var(--tl-color-panel);
1711
+ border-radius: var(--tl-radius-1);
1701
1712
  }
1702
1713
 
1703
1714
  .tl-error-boundary__content__actions {
1704
1715
  display: flex;
1705
1716
  justify-content: space-between;
1706
- gap: var(--space-4);
1717
+ gap: var(--tl-space-4);
1707
1718
  margin: 0px;
1708
1719
  margin-left: -4px;
1709
1720
  }
1710
1721
  .tl-error-boundary__content__actions__group {
1711
1722
  display: flex;
1712
- gap: var(--space-4);
1723
+ gap: var(--tl-space-4);
1713
1724
  }
1714
1725
  .tl-error-boundary__content .tl-error-boundary__reset {
1715
- color: var(--color-danger);
1726
+ color: var(--tl-color-danger);
1716
1727
  }
1717
1728
  .tl-error-boundary__content .tl-error-boundary__refresh {
1718
- background-color: var(--color-primary);
1719
- color: var(--color-selected-contrast);
1729
+ background-color: var(--tl-color-primary);
1730
+ color: var(--tl-color-selected-contrast);
1720
1731
  }
1721
1732
  .tl-container__focused:not(.tl-container__no-focus-ring)
1722
1733
  .tlui-button.tl-error-boundary__refresh:focus-visible {
@@ -1728,7 +1739,7 @@ it from receiving any pointer events or affecting the cursor. */
1728
1739
 
1729
1740
  .tl-hit-test-blocker {
1730
1741
  position: absolute;
1731
- z-index: var(--layer-canvas-blocker);
1742
+ z-index: var(--tl-layer-canvas-blocker);
1732
1743
  inset: 0px;
1733
1744
  width: 100%;
1734
1745
  height: 100%;
@@ -1748,32 +1759,32 @@ it from receiving any pointer events or affecting the cursor. */
1748
1759
 
1749
1760
  .tl-handle__bg:hover {
1750
1761
  cursor: var(--tl-cursor-grab);
1751
- fill: var(--color-selection-fill);
1762
+ fill: var(--tl-color-selection-fill);
1752
1763
  }
1753
1764
 
1754
1765
  .tl-bookmark__link:hover {
1755
- color: var(--color-selected);
1766
+ color: var(--tl-color-selected);
1756
1767
  }
1757
1768
 
1758
1769
  .tl-hyperlink-button:hover {
1759
- color: var(--color-selected);
1770
+ color: var(--tl-color-selected);
1760
1771
  }
1761
1772
 
1762
1773
  .tl-error-boundary__content button:hover {
1763
- background-color: var(--color-low);
1774
+ background-color: var(--tl-color-low);
1764
1775
  }
1765
1776
  .tl-error-boundary__content a:hover {
1766
- color: var(--color-text-1);
1777
+ color: var(--tl-color-text-1);
1767
1778
  }
1768
1779
  .tl-error-boundary__content .tl-error-boundary__refresh:hover {
1769
- background-color: var(--color-primary);
1780
+ background-color: var(--tl-color-primary);
1770
1781
  opacity: 0.9;
1771
1782
  }
1772
1783
 
1773
1784
  /* These three rules help preserve clicking into specific points in text areas *while*
1774
1785
  * already in edit mode when jumping from shape to shape. */
1775
1786
  .tl-canvas[data-iseditinganything='true'] .tl-text-wrapper:hover .tl-text-input {
1776
- z-index: var(--layer-text-editor);
1787
+ z-index: var(--tl-layer-text-editor);
1777
1788
  pointer-events: all;
1778
1789
  }
1779
1790
  }
@@ -1781,15 +1792,15 @@ it from receiving any pointer events or affecting the cursor. */
1781
1792
  /* @tldraw/ui */
1782
1793
 
1783
1794
  .tl-container {
1784
- --layer-above: 1;
1785
- --layer-focused-input: 10;
1786
- --layer-menu-click-capture: 250;
1787
- --layer-panels: 300;
1788
- --layer-menus: 400;
1789
- --layer-toasts: 650;
1790
- --layer-cursor: 700;
1791
- --layer-header-footer: 999;
1792
- --layer-following-indicator: 1000;
1795
+ --tl-layer-above: 1;
1796
+ --tl-layer-focused-input: 10;
1797
+ --tl-layer-menu-click-capture: 250;
1798
+ --tl-layer-panels: 300;
1799
+ --tl-layer-menus: 400;
1800
+ --tl-layer-toasts: 650;
1801
+ --tl-layer-cursor: 700;
1802
+ --tl-layer-header-footer: 999;
1803
+ --tl-layer-following-indicator: 1000;
1793
1804
  }
1794
1805
 
1795
1806
  /* Button */
@@ -1813,23 +1824,23 @@ it from receiving any pointer events or affecting the cursor. */
1813
1824
  text-rendering: optimizeLegibility;
1814
1825
  font-size: 12px;
1815
1826
  gap: 0px;
1816
- color: var(--color-text-1);
1827
+ color: var(--tl-color-text-1);
1817
1828
  z-index: 0;
1818
1829
  }
1819
1830
 
1820
1831
  .tlui-button:disabled {
1821
- color: var(--color-text-3);
1832
+ color: var(--tl-color-text-3);
1822
1833
  text-shadow: none;
1823
1834
  cursor: default;
1824
1835
  }
1825
1836
 
1826
1837
  .tlui-button:disabled .tlui-kbd {
1827
- color: var(--color-text-3);
1838
+ color: var(--tl-color-text-3);
1828
1839
  }
1829
1840
 
1830
1841
  .tlui-button > * {
1831
1842
  position: relative;
1832
- z-index: var(--layer-above);
1843
+ z-index: var(--tl-layer-above);
1833
1844
  }
1834
1845
 
1835
1846
  .tlui-button__label {
@@ -1845,7 +1856,7 @@ it from receiving any pointer events or affecting the cursor. */
1845
1856
  */
1846
1857
  .tl-container__focused:not(.tl-container__no-focus-ring) .tlui-button:focus-visible {
1847
1858
  border-radius: 10px;
1848
- outline: 2px solid var(--color-focus);
1859
+ outline: 2px solid var(--tl-color-focus);
1849
1860
  outline-offset: -5px;
1850
1861
  }
1851
1862
  .tl-container__focused:not(.tl-container__no-focus-ring) .tlui-button__tool:focus-visible {
@@ -1853,7 +1864,7 @@ it from receiving any pointer events or affecting the cursor. */
1853
1864
  }
1854
1865
  .tlui-slider__container:has(.tlui-slider__thumb:focus-visible) {
1855
1866
  border-radius: 10px;
1856
- outline: 2px solid var(--color-focus);
1867
+ outline: 2px solid var(--tl-color-focus);
1857
1868
  outline-offset: -5px;
1858
1869
  }
1859
1870
 
@@ -1862,8 +1873,8 @@ it from receiving any pointer events or affecting the cursor. */
1862
1873
  content: '';
1863
1874
  position: absolute;
1864
1875
  inset: 4px;
1865
- border-radius: var(--radius-2);
1866
- background: var(--color-muted-2);
1876
+ border-radius: var(--tl-radius-2);
1877
+ background: var(--tl-color-muted-2);
1867
1878
  opacity: 0;
1868
1879
  }
1869
1880
 
@@ -1873,18 +1884,18 @@ it from receiving any pointer events or affecting the cursor. */
1873
1884
 
1874
1885
  .tlui-button[data-isactive='true']::after,
1875
1886
  .tlui-button[data-isactive='true']:not(:disabled, :focus-visible):active:after {
1876
- background: var(--color-hint);
1887
+ background: var(--tl-color-hint);
1877
1888
  opacity: 1;
1878
1889
  }
1879
1890
 
1880
1891
  .tlui-button[aria-expanded='true'][data-direction='left'] {
1881
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
1892
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
1882
1893
  opacity: 1;
1883
1894
  }
1884
1895
 
1885
1896
  @media (hover: hover) {
1886
1897
  .tlui-button[aria-expanded='true'][data-direction='left']:not(:hover)::after {
1887
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
1898
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
1888
1899
  opacity: 1;
1889
1900
  }
1890
1901
 
@@ -1898,18 +1909,18 @@ it from receiving any pointer events or affecting the cursor. */
1898
1909
  }
1899
1910
 
1900
1911
  .tlui-button__icon + .tlui-button__label {
1901
- margin-left: var(--space-2);
1912
+ margin-left: var(--tl-space-2);
1902
1913
  }
1903
1914
 
1904
1915
  /* Low button */
1905
1916
 
1906
1917
  .tlui-button__low {
1907
- border-radius: var(--radius-3);
1908
- background-color: var(--color-low);
1918
+ border-radius: var(--tl-radius-3);
1919
+ background-color: var(--tl-color-low);
1909
1920
  }
1910
1921
 
1911
1922
  .tlui-button__low::after {
1912
- background-color: var(--color-muted-2);
1923
+ background-color: var(--tl-color-muted-2);
1913
1924
  opacity: 0;
1914
1925
  }
1915
1926
 
@@ -1922,31 +1933,25 @@ it from receiving any pointer events or affecting the cursor. */
1922
1933
  /* Primary / danger buttons */
1923
1934
 
1924
1935
  .tlui-button__primary {
1925
- color: var(--color-primary);
1936
+ color: var(--tl-color-primary);
1926
1937
  }
1927
1938
 
1928
1939
  .tlui-button__danger {
1929
- color: var(--color-danger);
1940
+ color: var(--tl-color-danger);
1930
1941
  text-shadow: none;
1931
1942
  }
1932
1943
 
1933
1944
  @media (hover: hover) {
1934
1945
  .tlui-button__primary:not(:disabled, :focus-visible):hover {
1935
- color: var(--color-primary);
1946
+ color: var(--tl-color-primary);
1936
1947
  }
1937
1948
 
1938
1949
  .tlui-button__danger:not(:disabled, :focus-visible):hover {
1939
- color: var(--color-danger);
1950
+ color: var(--tl-color-danger);
1940
1951
  text-shadow: none;
1941
1952
  }
1942
1953
  }
1943
1954
 
1944
- /* Panel button */
1945
-
1946
- .tlui-button__panel {
1947
- position: relative;
1948
- }
1949
-
1950
1955
  /* Menu button */
1951
1956
 
1952
1957
  .tlui-button__menu {
@@ -1959,7 +1964,7 @@ it from receiving any pointer events or affecting the cursor. */
1959
1964
 
1960
1965
  .tlui-button__menu::after {
1961
1966
  inset: 4px;
1962
- border-radius: var(--radius-2);
1967
+ border-radius: var(--tl-radius-2);
1963
1968
  }
1964
1969
 
1965
1970
  .tlui-button__menu > .tlui-icon + .tlui-button__label {
@@ -1987,18 +1992,26 @@ it from receiving any pointer events or affecting the cursor. */
1987
1992
 
1988
1993
  /* Tool lock button */
1989
1994
 
1990
- .tlui-toolbar__lock-button {
1995
+ .tlui-main-toolbar__lock-button {
1991
1996
  position: absolute;
1992
- top: 4px;
1993
- right: 0px;
1994
1997
  pointer-events: all;
1995
1998
  height: 40px;
1996
1999
  width: 40px;
2000
+ border-radius: var(--tl-radius-2);
2001
+ }
2002
+
2003
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__lock-button {
2004
+ top: 4px;
2005
+ right: 0px;
1997
2006
  min-width: 0px;
1998
- border-radius: var(--radius-2);
1999
2007
  }
2000
2008
 
2001
- .tlui-toolbar__lock-button::after {
2009
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__lock-button {
2010
+ bottom: 0px;
2011
+ min-height: 0px;
2012
+ }
2013
+
2014
+ .tlui-main-toolbar__lock-button::after {
2002
2015
  top: 4px;
2003
2016
  left: 8px;
2004
2017
  inset: 4px;
@@ -2010,16 +2023,6 @@ it from receiving any pointer events or affecting the cursor. */
2010
2023
  position: relative;
2011
2024
  height: 48px;
2012
2025
  width: 48px;
2013
- margin-left: -2px;
2014
- margin-right: -2px;
2015
- }
2016
-
2017
- .tlui-button__tool:nth-of-type(1) {
2018
- margin-left: 0px;
2019
- }
2020
-
2021
- .tlui-button__tool:nth-last-of-type(1) {
2022
- margin-right: 0px;
2023
2026
  }
2024
2027
 
2025
2028
  .tlui-button__tool::after {
@@ -2028,69 +2031,64 @@ it from receiving any pointer events or affecting the cursor. */
2028
2031
  }
2029
2032
 
2030
2033
  .tlui-button__tool[aria-pressed='true'] {
2031
- color: var(--color-selected-contrast);
2034
+ color: var(--tl-color-selected-contrast);
2032
2035
  }
2033
2036
 
2034
2037
  .tlui-button__tool[aria-pressed='true']:not(:disabled, :focus-visible):active {
2035
- color: var(--color-selected-contrast);
2038
+ color: var(--tl-color-selected-contrast);
2036
2039
  }
2037
2040
 
2038
2041
  .tlui-button__tool[aria-pressed='true']:not(:disabled)::after {
2039
- background: var(--color-selected);
2042
+ background: var(--tl-color-selected);
2040
2043
  opacity: 1;
2041
2044
  }
2042
2045
 
2043
- .tlui-layout__mobile .tlui-button__tool {
2046
+ .tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-button__tool {
2044
2047
  height: 48px;
2045
2048
  width: 43px;
2046
2049
  }
2047
2050
 
2048
- .tlui-layout__mobile .tlui-button__tool > .tlui-icon {
2051
+ .tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-button__tool > .tlui-icon {
2049
2052
  height: 16px;
2050
2053
  width: 16px;
2051
2054
  }
2052
2055
 
2053
- /* Button Row */
2056
+ /* Row layout */
2054
2057
 
2055
- .tlui-buttons__horizontal {
2058
+ .tlui-row {
2056
2059
  display: flex;
2057
2060
  flex-direction: row;
2061
+ padding: 0 2px;
2058
2062
  }
2059
- .tlui-buttons__horizontal > * {
2063
+ .tlui-row > * {
2060
2064
  margin-left: -2px;
2061
2065
  margin-right: -2px;
2062
2066
  }
2063
- .tlui-buttons__horizontal > *:nth-child(1) {
2064
- margin-left: 0px;
2067
+
2068
+ /* Column layout */
2069
+
2070
+ .tlui-column {
2071
+ display: flex;
2072
+ flex-direction: column;
2073
+ padding: 2px 0;
2065
2074
  }
2066
- .tlui-buttons__horizontal > *:nth-last-child(1) {
2067
- margin-right: 0px;
2075
+ .tlui-column > * {
2076
+ margin-top: -2px;
2077
+ margin-bottom: -2px;
2068
2078
  }
2069
2079
 
2070
- /* Button Grid */
2080
+ /* Grid layout */
2071
2081
 
2072
- .tlui-buttons__grid {
2082
+ .tlui-grid {
2073
2083
  display: grid;
2074
- grid-template-columns: repeat(4, auto);
2084
+ grid-template-columns: repeat(4, 1fr);
2075
2085
  grid-auto-flow: row;
2076
2086
  overflow: hidden;
2087
+ padding: 2px;
2077
2088
  }
2078
- .tlui-buttons__grid > .tlui-button {
2089
+ .tlui-grid > * {
2079
2090
  margin: -2px;
2080
2091
  }
2081
- .tlui-buttons__grid > .tlui-button:nth-of-type(4n),
2082
- .tlui-buttons__vertical-align > .tlui-button:nth-of-type(3n) {
2083
- margin-right: 0px;
2084
- }
2085
- .tlui-buttons__grid > .tlui-button:nth-of-type(4n - 3) {
2086
- margin-left: 0px;
2087
- }
2088
- .tlui-buttons__grid > .tlui-button:nth-of-type(-n + 4) {
2089
- margin-top: 0px;
2090
- }
2091
- .tlui-buttons__grid > .tlui-button:nth-last-of-type(-n + 4) {
2092
- margin-bottom: 0px;
2093
- }
2094
2092
 
2095
2093
  /* Zoom button */
2096
2094
 
@@ -2114,9 +2112,9 @@ it from receiving any pointer events or affecting the cursor. */
2114
2112
  pointer-events: none;
2115
2113
  user-select: none;
2116
2114
  contain: strict;
2117
- z-index: var(--layer-panels);
2115
+ z-index: var(--tl-layer-panels);
2118
2116
  transform: translate3d(0, 0, 0);
2119
- --sab: env(safe-area-inset-bottom);
2117
+ --tl-sab: env(safe-area-inset-bottom);
2120
2118
  font-weight: 500;
2121
2119
  line-height: 1.6;
2122
2120
  -webkit-font-smoothing: antialiased;
@@ -2169,11 +2167,11 @@ it from receiving any pointer events or affecting the cursor. */
2169
2167
  justify-content: flex-start;
2170
2168
  align-items: flex-start;
2171
2169
  width: min-content;
2172
- gap: var(--space-3);
2173
- margin: var(--space-2) var(--space-3);
2170
+ gap: var(--tl-space-3);
2171
+ margin: var(--tl-space-2) var(--tl-space-3);
2174
2172
  white-space: nowrap;
2175
2173
  pointer-events: none;
2176
- z-index: var(--layer-panels);
2174
+ z-index: var(--tl-layer-panels);
2177
2175
  }
2178
2176
 
2179
2177
  /* ---------------------- Icon ---------------------- */
@@ -2201,7 +2199,7 @@ it from receiving any pointer events or affecting the cursor. */
2201
2199
 
2202
2200
  .tlui-slider__container {
2203
2201
  width: 100%;
2204
- padding: 0px var(--space-4);
2202
+ padding: 0px var(--tl-space-4);
2205
2203
  }
2206
2204
 
2207
2205
  .tlui-slider {
@@ -2227,7 +2225,7 @@ it from receiving any pointer events or affecting the cursor. */
2227
2225
  content: '';
2228
2226
  height: 3px;
2229
2227
  width: 100%;
2230
- background-color: var(--color-muted-1);
2228
+ background-color: var(--tl-color-muted-1);
2231
2229
  border-radius: 14px;
2232
2230
  }
2233
2231
 
@@ -2236,7 +2234,7 @@ it from receiving any pointer events or affecting the cursor. */
2236
2234
  top: calc(50% - 2px);
2237
2235
  left: 0px;
2238
2236
  height: 3px;
2239
- background-color: var(--color-selected);
2237
+ background-color: var(--tl-color-selected);
2240
2238
  border-radius: 14px;
2241
2239
  }
2242
2240
 
@@ -2248,16 +2246,16 @@ it from receiving any pointer events or affecting the cursor. */
2248
2246
  height: 18px;
2249
2247
  position: relative;
2250
2248
  top: -1px;
2251
- background-color: var(--color-panel);
2249
+ background-color: var(--tl-color-panel);
2252
2250
  border-radius: 999px;
2253
- box-shadow: inset 0px 0px 0px 2px var(--color-text-1);
2251
+ box-shadow: inset 0px 0px 0px 2px var(--tl-color-text-1);
2254
2252
  }
2255
2253
 
2256
2254
  .tlui-slider__thumb:active {
2257
2255
  cursor: grabbing;
2258
2256
  box-shadow:
2259
- inset 0px 0px 0px 2px var(--color-text-1),
2260
- var(--shadow-1);
2257
+ inset 0px 0px 0px 2px var(--tl-color-text-1),
2258
+ var(--tl-shadow-1);
2261
2259
  }
2262
2260
 
2263
2261
  /* ---------------------- Input --------------------- */
@@ -2266,7 +2264,7 @@ it from receiving any pointer events or affecting the cursor. */
2266
2264
  background: none;
2267
2265
  margin: 0px;
2268
2266
  position: relative;
2269
- z-index: var(--layer-above);
2267
+ z-index: var(--tl-layer-above);
2270
2268
  height: 40px;
2271
2269
  max-height: 40px;
2272
2270
  display: flex;
@@ -2275,8 +2273,8 @@ it from receiving any pointer events or affecting the cursor. */
2275
2273
  font-family: inherit;
2276
2274
  font-size: 12px;
2277
2275
  font-weight: inherit;
2278
- color: var(--color-text-1);
2279
- padding: var(--space-4);
2276
+ color: var(--tl-color-text-1);
2277
+ padding: var(--tl-space-4);
2280
2278
  padding-left: 0px;
2281
2279
  border: none;
2282
2280
  outline: none;
@@ -2292,8 +2290,8 @@ it from receiving any pointer events or affecting the cursor. */
2292
2290
  height: 44px;
2293
2291
  display: flex;
2294
2292
  align-items: center;
2295
- gap: var(--space-4);
2296
- color: var(--color-text);
2293
+ gap: var(--tl-space-4);
2294
+ color: var(--tl-color-text);
2297
2295
  }
2298
2296
 
2299
2297
  .tlui-input__wrapper > .tlui-icon {
@@ -2325,7 +2323,7 @@ it from receiving any pointer events or affecting the cursor. */
2325
2323
  grid-auto-columns: minmax(1em, auto);
2326
2324
  align-self: bottom;
2327
2325
  color: currentColor;
2328
- margin-left: var(--space-4);
2326
+ margin-left: var(--tl-space-4);
2329
2327
  }
2330
2328
 
2331
2329
  .tlui-kbd > span {
@@ -2342,13 +2340,13 @@ it from receiving any pointer events or affecting the cursor. */
2342
2340
  }
2343
2341
 
2344
2342
  .tlui-kbd:not(:last-child) {
2345
- margin-right: var(--space-2);
2343
+ margin-right: var(--tl-space-2);
2346
2344
  }
2347
2345
 
2348
2346
  /* Focus Mode Button */
2349
2347
 
2350
2348
  .tlui-focus-button {
2351
- z-index: var(--layer-panels);
2349
+ z-index: var(--tl-layer-panels);
2352
2350
  pointer-events: all;
2353
2351
  }
2354
2352
 
@@ -2359,16 +2357,16 @@ it from receiving any pointer events or affecting the cursor. */
2359
2357
  }
2360
2358
 
2361
2359
  .tlui-menu {
2362
- z-index: var(--layer-menus);
2360
+ z-index: var(--tl-layer-menus);
2363
2361
  height: fit-content;
2364
2362
  width: fit-content;
2365
- border-radius: var(--radius-3);
2363
+ border-radius: var(--tl-radius-3);
2366
2364
  pointer-events: all;
2367
2365
  touch-action: auto;
2368
2366
  overflow-y: auto;
2369
2367
  overscroll-behavior: none;
2370
- background-color: var(--color-panel);
2371
- box-shadow: var(--shadow-3);
2368
+ background-color: var(--tl-color-panel);
2369
+ box-shadow: var(--tl-shadow-3);
2372
2370
  }
2373
2371
 
2374
2372
  .tlui-menu::-webkit-scrollbar {
@@ -2386,7 +2384,7 @@ it from receiving any pointer events or affecting the cursor. */
2386
2384
  }
2387
2385
 
2388
2386
  .tlui-menu__group {
2389
- border-bottom: 1px solid var(--color-divider);
2387
+ border-bottom: 1px solid var(--tl-color-divider);
2390
2388
  }
2391
2389
  .tlui-menu__group:nth-last-of-type(1) {
2392
2390
  border-bottom: none;
@@ -2396,23 +2394,23 @@ it from receiving any pointer events or affecting the cursor. */
2396
2394
 
2397
2395
  .tlui-menu__submenu__trigger[data-state='open']::after {
2398
2396
  opacity: 1;
2399
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2397
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2400
2398
  }
2401
2399
 
2402
2400
  .tlui-menu__submenu__trigger[data-direction='left'][data-state='open']::after {
2403
2401
  opacity: 1;
2404
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2402
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2405
2403
  }
2406
2404
 
2407
2405
  @media (hover: hover) {
2408
2406
  .tlui-menu__submenu__trigger[data-state='open']:not(:hover)::after {
2409
2407
  opacity: 1;
2410
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2408
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2411
2409
  }
2412
2410
 
2413
2411
  .tlui-menu__submenu__trigger[data-direction='left'][data-state='open']:not(:hover)::after {
2414
2412
  opacity: 1;
2415
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2413
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2416
2414
  }
2417
2415
  }
2418
2416
 
@@ -2437,7 +2435,7 @@ it from receiving any pointer events or affecting the cursor. */
2437
2435
  .tlui-menu-click-capture {
2438
2436
  position: fixed;
2439
2437
  inset: 0;
2440
- z-index: var(--layer-menu-click-capture);
2438
+ z-index: var(--tl-layer-menu-click-capture);
2441
2439
  }
2442
2440
 
2443
2441
  /* --------------------- Popover -------------------- */
@@ -2453,10 +2451,10 @@ it from receiving any pointer events or affecting the cursor. */
2453
2451
  max-height: calc(var(--radix-popover-content-available-height) - 8px);
2454
2452
  margin: 0px;
2455
2453
  border: none;
2456
- border-radius: var(--radius-3);
2457
- background-color: var(--color-panel);
2458
- box-shadow: var(--shadow-3);
2459
- z-index: var(--layer-menus);
2454
+ border-radius: var(--tl-radius-3);
2455
+ background-color: var(--tl-color-panel);
2456
+ box-shadow: var(--tl-shadow-3);
2457
+ z-index: var(--tl-layer-menus);
2460
2458
  overflow: hidden;
2461
2459
  overflow-y: auto;
2462
2460
  touch-action: auto;
@@ -2469,22 +2467,22 @@ it from receiving any pointer events or affecting the cursor. */
2469
2467
 
2470
2468
  .tlui-menu-zone {
2471
2469
  position: relative;
2472
- z-index: var(--layer-panels);
2470
+ z-index: var(--tl-layer-panels);
2473
2471
  width: fit-content;
2474
- border-right: 2px solid var(--color-background);
2475
- border-bottom: 2px solid var(--color-background);
2476
- border-bottom-right-radius: var(--radius-4);
2477
- background-color: var(--color-low);
2472
+ border-right: 2px solid var(--tl-color-background);
2473
+ border-bottom: 2px solid var(--tl-color-background);
2474
+ border-bottom-right-radius: var(--tl-radius-4);
2475
+ background-color: var(--tl-color-low);
2478
2476
  }
2479
2477
 
2480
2478
  .tlui-menu-zone *[data-state='open']::after {
2481
- background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2479
+ background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2482
2480
  opacity: 1;
2483
2481
  }
2484
2482
 
2485
2483
  @media (hover: hover) {
2486
2484
  .tlui-menu-zone *[data-state='open']:not(:hover)::after {
2487
- background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2485
+ background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2488
2486
  opacity: 1;
2489
2487
  }
2490
2488
  }
@@ -2510,8 +2508,8 @@ it from receiving any pointer events or affecting the cursor. */
2510
2508
  align-items: center;
2511
2509
  width: 100%;
2512
2510
  height: 40px;
2513
- padding-left: var(--space-4);
2514
- border-bottom: 1px solid var(--color-divider);
2511
+ padding-left: var(--tl-space-4);
2512
+ border-bottom: 1px solid var(--tl-color-divider);
2515
2513
  }
2516
2514
 
2517
2515
  .tlui-page-menu__header > .tlui-button:nth-of-type(1) {
@@ -2519,7 +2517,7 @@ it from receiving any pointer events or affecting the cursor. */
2519
2517
  }
2520
2518
 
2521
2519
  .tlui-page-menu__header__title {
2522
- color: var(--color-text);
2520
+ color: var(--tl-color-text);
2523
2521
  font-size: 12px;
2524
2522
  flex-grow: 2;
2525
2523
  }
@@ -2604,7 +2602,7 @@ it from receiving any pointer events or affecting the cursor. */
2604
2602
  display: inline-flex;
2605
2603
  align-items: center;
2606
2604
  justify-content: center;
2607
- color: var(--color-text);
2605
+ color: var(--tl-color-text);
2608
2606
  }
2609
2607
 
2610
2608
  .tlui-page_menu__item__sortable {
@@ -2617,7 +2615,7 @@ it from receiving any pointer events or affecting the cursor. */
2617
2615
  flex-direction: row;
2618
2616
  align-items: center;
2619
2617
  overflow: hidden;
2620
- z-index: var(--layer-above);
2618
+ z-index: var(--tl-layer-above);
2621
2619
  }
2622
2620
 
2623
2621
  .tlui-page_menu__item__sortable__title {
@@ -2629,7 +2627,7 @@ it from receiving any pointer events or affecting the cursor. */
2629
2627
  }
2630
2628
 
2631
2629
  .tlui-page_menu__item__sortable:focus-visible {
2632
- z-index: var(--layer-focused-input);
2630
+ z-index: var(--tl-layer-focused-input);
2633
2631
  }
2634
2632
 
2635
2633
  .tlui-page_menu__item__sortable__handle {
@@ -2638,7 +2636,7 @@ it from receiving any pointer events or affecting the cursor. */
2638
2636
  min-width: 0px;
2639
2637
  height: 40px;
2640
2638
  cursor: grab;
2641
- color: var(--color-text-3);
2639
+ color: var(--tl-color-text-3);
2642
2640
  flex-shrink: 0;
2643
2641
  margin-right: -9px;
2644
2642
  }
@@ -2680,13 +2678,13 @@ it from receiving any pointer events or affecting the cursor. */
2680
2678
  }
2681
2679
 
2682
2680
  .tlui-page_menu__item__submenu > .tlui-button[data-state='open']::after {
2683
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2681
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2684
2682
  opacity: 1;
2685
2683
  }
2686
2684
 
2687
2685
  @media (hover: hover) {
2688
2686
  .tlui-page_menu__item__submenu > .tlui-button[data-state='open']:not(:hover)::after {
2689
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2687
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2690
2688
  opacity: 1;
2691
2689
  }
2692
2690
  }
@@ -2722,7 +2720,7 @@ it from receiving any pointer events or affecting the cursor. */
2722
2720
  top: 48px;
2723
2721
  left: -9999px;
2724
2722
  padding: 8px 16px;
2725
- z-index: var(--layer-toasts);
2723
+ z-index: var(--tl-layer-toasts);
2726
2724
  }
2727
2725
 
2728
2726
  .tl-skip-to-main-content:focus {
@@ -2734,11 +2732,11 @@ it from receiving any pointer events or affecting the cursor. */
2734
2732
  .tlui-offline-indicator {
2735
2733
  display: flex;
2736
2734
  flex-direction: row;
2737
- gap: var(--space-3);
2738
- color: var(--color-text);
2739
- background-color: var(--color-low);
2740
- border: 3px solid var(--color-background);
2741
- padding: 0px var(--space-5);
2735
+ gap: var(--tl-space-3);
2736
+ color: var(--tl-color-text);
2737
+ background-color: var(--tl-color-low);
2738
+ border: 3px solid var(--tl-color-background);
2739
+ padding: 0px var(--tl-space-5);
2742
2740
  height: 42px;
2743
2741
  align-items: center;
2744
2742
  justify-content: center;
@@ -2753,10 +2751,10 @@ it from receiving any pointer events or affecting the cursor. */
2753
2751
  /* ------------------- Style panel ------------------ */
2754
2752
 
2755
2753
  .tlui-style-panel__wrapper {
2756
- box-shadow: var(--shadow-2);
2757
- border-radius: var(--radius-3);
2754
+ box-shadow: var(--tl-shadow-2);
2755
+ border-radius: var(--tl-radius-3);
2758
2756
  pointer-events: all;
2759
- background-color: var(--color-panel);
2757
+ background-color: var(--tl-color-panel);
2760
2758
  height: fit-content;
2761
2759
  max-height: 100%;
2762
2760
  margin: 8px;
@@ -2765,7 +2763,7 @@ it from receiving any pointer events or affecting the cursor. */
2765
2763
  overscroll-behavior: none;
2766
2764
  overflow-y: auto;
2767
2765
  overflow-x: hidden;
2768
- color: var(--color-text);
2766
+ color: var(--tl-color-text);
2769
2767
  }
2770
2768
  /* if the style panel is the only child (ie no share menu), increase the margin */
2771
2769
  .tlui-style-panel__wrapper:only-child {
@@ -2774,7 +2772,7 @@ it from receiving any pointer events or affecting the cursor. */
2774
2772
 
2775
2773
  .tlui-style-panel {
2776
2774
  position: relative;
2777
- z-index: var(--layer-panels);
2775
+ z-index: var(--tl-layer-panels);
2778
2776
  pointer-events: all;
2779
2777
  width: 148px;
2780
2778
  max-width: 148px;
@@ -2782,7 +2780,7 @@ it from receiving any pointer events or affecting the cursor. */
2782
2780
 
2783
2781
  .tlui-style-panel[data-show-ui-labels='true'] .tlui-button[data-isactive='true'] {
2784
2782
  border-radius: 10px;
2785
- outline: 2px solid var(--color-text);
2783
+ outline: 2px solid var(--tl-color-text);
2786
2784
  outline-offset: -5px;
2787
2785
  }
2788
2786
 
@@ -2800,8 +2798,22 @@ it from receiving any pointer events or affecting the cursor. */
2800
2798
  flex-direction: column;
2801
2799
  }
2802
2800
 
2803
- .tlui-style-panel__section:nth-of-type(n + 2):not(:last-child) {
2804
- border-bottom: 1px solid var(--color-divider);
2801
+ /*
2802
+ add a border to the bottom of all but the last section. we have to handle empty sections too, which
2803
+ are hidden and shouldn't be counted
2804
+ */
2805
+ .tlui-style-panel__section:not(:nth-last-child(-n + 1 of .tlui-style-panel__section:not(:empty))) {
2806
+ border-bottom: 1px solid var(--tl-color-divider);
2807
+ }
2808
+ /*
2809
+ if a section ends with a slider and we're adding a border, we need some extra space for visual
2810
+ balance. we need to handle empty sections as above. is this the most complex css selector in all of
2811
+ tldraw? probably.
2812
+ */
2813
+ .tlui-style-panel__section:has(.tlui-slider__container:last-child):not(
2814
+ :nth-last-child(-n + 1 of .tlui-style-panel__section:not(:empty))
2815
+ ) {
2816
+ margin-bottom: 7px;
2805
2817
  }
2806
2818
 
2807
2819
  .tlui-style-panel__section:empty {
@@ -2810,23 +2822,19 @@ it from receiving any pointer events or affecting the cursor. */
2810
2822
 
2811
2823
  .tlui-style-panel__section__common:not(:only-child) {
2812
2824
  margin-bottom: 7px;
2813
- border-bottom: 1px solid var(--color-divider);
2825
+ border-bottom: 1px solid var(--tl-color-divider);
2814
2826
  }
2815
2827
 
2816
- .tlui-style-panel__row {
2817
- display: flex;
2818
- }
2819
- /* Only really used for the alignment picker */
2820
- .tlui-style-panel__row__extra-button {
2821
- margin-left: -2px;
2828
+ .tlui-style-panel__dropdown-picker:only-child {
2829
+ flex: 1;
2822
2830
  }
2823
2831
 
2824
2832
  .tlui-style-panel__double-select-picker {
2825
2833
  display: flex;
2826
2834
  grid-template-columns: 1fr auto;
2827
2835
  align-items: center;
2828
- padding-left: var(--space-4);
2829
- color: var(--color-text-1);
2836
+ padding-left: var(--tl-space-4);
2837
+ color: var(--tl-color-text-1);
2830
2838
  font-size: 12px;
2831
2839
  }
2832
2840
 
@@ -2840,13 +2848,16 @@ it from receiving any pointer events or affecting the cursor. */
2840
2848
 
2841
2849
  .tlui-style-panel .tlui-button[data-state='open']::after {
2842
2850
  opacity: 1;
2843
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2851
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2844
2852
  }
2845
2853
 
2846
2854
  @media (hover: hover) {
2855
+ .tlui-style-panel .tlui-button[aria-expanded='true'] {
2856
+ background: none;
2857
+ }
2847
2858
  .tlui-style-panel .tlui-button[data-state='open']:not(:hover)::after {
2848
2859
  opacity: 1;
2849
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2860
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2850
2861
  }
2851
2862
  }
2852
2863
 
@@ -2856,14 +2867,14 @@ it from receiving any pointer events or affecting the cursor. */
2856
2867
  .tlui-style-panel__section__common .tlui-style-panel__subheading,
2857
2868
  .tlui-style-panel__subheading + .tlui-slider__container {
2858
2869
  margin: 0;
2859
- padding: var(--space-2) var(--space-3) 0px var(--space-4);
2870
+ padding: var(--tl-space-2) var(--tl-space-3) 0px var(--tl-space-4);
2860
2871
  font-size: 12px;
2861
2872
  font-weight: inherit;
2862
2873
  line-height: inherit;
2863
2874
  }
2864
2875
 
2865
2876
  .tlui-style-panel .tlui-style-panel__subheading:nth-of-type(1) {
2866
- padding-top: var(--space-3);
2877
+ padding-top: var(--tl-space-3);
2867
2878
  }
2868
2879
 
2869
2880
  .tlui-style-panel__subheading + .tlui-slider__container {
@@ -2874,11 +2885,11 @@ it from receiving any pointer events or affecting the cursor. */
2874
2885
 
2875
2886
  .tlui-layout__bottom {
2876
2887
  grid-row: 2;
2888
+ width: 100%;
2877
2889
  }
2878
2890
 
2879
2891
  .tlui-layout__bottom__main {
2880
2892
  width: 100%;
2881
- position: relative;
2882
2893
  display: flex;
2883
2894
  align-items: flex-end;
2884
2895
  justify-content: center;
@@ -2890,11 +2901,10 @@ it from receiving any pointer events or affecting the cursor. */
2890
2901
  display: flex;
2891
2902
  width: min-content;
2892
2903
  flex-direction: column;
2893
- z-index: var(--layer-panels);
2904
+ z-index: var(--tl-layer-panels);
2894
2905
  pointer-events: all;
2895
2906
  position: absolute;
2896
2907
  left: 0px;
2897
- bottom: 0px;
2898
2908
  }
2899
2909
 
2900
2910
  .tlui-navigation-panel::before {
@@ -2904,10 +2914,10 @@ it from receiving any pointer events or affecting the cursor. */
2904
2914
  z-index: -1;
2905
2915
  inset: -2px -2px 0px 0px;
2906
2916
  border-radius: 0;
2907
- border-top: 2px solid var(--color-background);
2908
- border-right: 2px solid var(--color-background);
2909
- border-top-right-radius: var(--radius-4);
2910
- background-color: var(--color-low);
2917
+ border-top: 2px solid var(--tl-color-background);
2918
+ border-right: 2px solid var(--tl-color-background);
2919
+ border-top-right-radius: var(--tl-radius-4);
2920
+ background-color: var(--tl-color-low);
2911
2921
  }
2912
2922
 
2913
2923
  .tlui-navigation-panel[data-a11y='true']::before {
@@ -2921,7 +2931,7 @@ it from receiving any pointer events or affecting the cursor. */
2921
2931
  height: 96px;
2922
2932
  min-height: 96px;
2923
2933
  overflow: hidden;
2924
- padding: var(--space-3);
2934
+ padding: var(--tl-space-3);
2925
2935
  padding-top: 0px;
2926
2936
  }
2927
2937
 
@@ -2934,98 +2944,178 @@ it from receiving any pointer events or affecting the cursor. */
2934
2944
  /* --------------------- Toolbar -------------------- */
2935
2945
 
2936
2946
  /* Wide container */
2937
- .tlui-toolbar {
2947
+ .tlui-main-toolbar {
2938
2948
  grid-column: 1 / span 3;
2939
2949
  grid-row: 1;
2940
2950
  display: flex;
2941
2951
  align-items: center;
2942
2952
  justify-content: center;
2943
2953
  flex-grow: 2;
2944
- padding-bottom: calc(var(--space-3) + var(--sab));
2954
+ }
2955
+
2956
+ .tlui-main-toolbar--horizontal {
2957
+ padding-bottom: calc(var(--tl-space-3) + var(--tl-sab));
2958
+ max-width: 100%;
2959
+ }
2960
+
2961
+ .tlui-main-toolbar--vertical {
2962
+ position: absolute;
2963
+ left: 0;
2964
+ top: 90px; /* height of page menu + 'back to content' button */
2965
+ bottom: 140px; /* height of expanded mini-map */
2966
+ padding-left: calc(var(--tl-space-3) + var(--tl-sab));
2967
+ }
2968
+
2969
+ [data-breakpoints-below*='6'] .tlui-main-toolbar--vertical {
2970
+ bottom: 90px; /* collapsed mini-map, but same as top to keep things looking even */
2945
2971
  }
2946
2972
 
2947
2973
  /* Centered Content */
2948
- .tlui-toolbar__inner {
2974
+ .tlui-main-toolbar__inner {
2949
2975
  position: relative;
2950
2976
  width: fit-content;
2951
2977
  display: flex;
2952
- gap: var(--space-3);
2953
- align-items: flex-end;
2978
+ gap: var(--tl-space-3);
2979
+ align-items: flex-start;
2954
2980
  }
2955
2981
 
2956
- .tlui-toolbar__left {
2982
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__inner {
2983
+ flex-direction: column;
2984
+ }
2985
+
2986
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__left {
2957
2987
  width: fit-content;
2958
2988
  }
2989
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__left {
2990
+ display: flex;
2991
+ height: fit-content;
2992
+ }
2959
2993
 
2960
2994
  /* Row of controls + lock button */
2961
- .tlui-toolbar__extras {
2995
+ .tlui-main-toolbar__extras {
2962
2996
  position: relative;
2963
- z-index: var(--layer-above);
2964
- width: 100%;
2997
+ z-index: var(--tl-layer-above);
2965
2998
  pointer-events: none;
2966
- top: 6px;
2967
- height: 48px;
2999
+ align-self: stretch;
2968
3000
  }
2969
3001
 
2970
- .tlui-toolbar__extras:empty {
3002
+ .tlui-main-toolbar__extras:empty {
2971
3003
  display: none;
2972
3004
  }
2973
3005
 
2974
- .tlui-toolbar__extras__controls {
2975
- display: flex;
3006
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__extras {
3007
+ height: 48px;
3008
+ top: 6px;
3009
+ }
3010
+
3011
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__extras {
3012
+ width: 48px;
3013
+ order: 1;
3014
+ }
3015
+
3016
+ .tlui-main-toolbar__extras__controls {
2976
3017
  position: relative;
2977
- flex-direction: row;
2978
- z-index: var(--layer-above);
2979
- background-color: var(--color-low);
2980
- border-top-left-radius: var(--radius-4);
2981
- border-top-right-radius: var(--radius-4);
2982
- border: 2px solid var(--color-background);
3018
+ z-index: var(--tl-layer-above);
3019
+ background-color: var(--tl-color-low);
3020
+ border: 2px solid var(--tl-color-background);
3021
+ pointer-events: all;
3022
+ }
3023
+
3024
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__extras__controls {
3025
+ border-top-left-radius: var(--tl-radius-4);
3026
+ border-top-right-radius: var(--tl-radius-4);
2983
3027
  margin-left: 8px;
2984
3028
  margin-right: 0px;
2985
- pointer-events: all;
2986
3029
  width: fit-content;
2987
3030
  }
2988
3031
 
2989
- .tlui-toolbar__tools {
2990
- display: flex;
2991
- flex-direction: row;
2992
- align-items: center;
2993
- border-radius: var(--radius-4);
2994
- z-index: var(--layer-panels);
3032
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__extras__controls {
3033
+ border-top-right-radius: var(--tl-radius-4);
3034
+ border-bottom-right-radius: var(--tl-radius-4);
3035
+ margin-top: 8px;
3036
+ margin-left: -2px;
3037
+ margin-bottom: 0px;
3038
+ width: fit-content;
3039
+ }
3040
+
3041
+ .tlui-main-toolbar__tools {
3042
+ border-radius: var(--tl-radius-4);
3043
+ z-index: var(--tl-layer-panels);
2995
3044
  pointer-events: all;
2996
3045
  position: relative;
2997
- background: var(--color-panel);
2998
- box-shadow: var(--shadow-2);
3046
+ background: var(--tl-color-panel);
3047
+ box-shadow: var(--tl-shadow-2);
2999
3048
  }
3000
- .tlui-toolbar__tools__list {
3001
- display: flex;
3002
- flex-direction: row;
3003
- align-items: center;
3049
+
3050
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__mobile-style-panel {
3051
+ align-self: flex-end;
3052
+ }
3053
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__mobile-style-panel {
3054
+ align-self: flex-start;
3004
3055
  }
3005
3056
 
3006
- .tlui-toolbar__overflow {
3057
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__overflow {
3007
3058
  width: 40px;
3059
+ margin-left: 2px;
3060
+ }
3061
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__overflow {
3062
+ height: 40px;
3063
+ margin-top: 2px;
3008
3064
  }
3009
3065
 
3010
- .tlui-layout__mobile .tlui-toolbar__overflow {
3066
+ .tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-main-toolbar__overflow {
3011
3067
  width: 32px;
3012
3068
  padding: 0px;
3013
3069
  }
3014
3070
 
3015
- .tlui-toolbar *[data-state='open']::after {
3016
- background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
3071
+ .tlui-main-toolbar--horizontal *[data-state='open']::after {
3072
+ background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
3073
+ opacity: 1;
3074
+ }
3075
+ .tlui-main-toolbar--vertical *[data-state='open']::after {
3076
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
3017
3077
  opacity: 1;
3018
3078
  }
3019
3079
 
3080
+ .tlui-main-toolbar__overflow-content {
3081
+ touch-action: none;
3082
+ }
3083
+
3084
+ .tlui-main-toolbar__tools [data-toolbar-visible='false'],
3085
+ .tlui-main-toolbar__overflow-content [data-toolbar-visible='false'] {
3086
+ display: none;
3087
+ }
3088
+
3089
+ .tlui-main-toolbar__group:empty {
3090
+ display: none;
3091
+ }
3092
+ .tlui-row.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
3093
+ border-right: 1px solid var(--color-divider);
3094
+ margin-right: 2px;
3095
+ }
3096
+ .tlui-column.tlui-main-toolbar__group:not(
3097
+ :nth-last-child(-n + 1 of [data-toolbar-visible='true'])
3098
+ ) {
3099
+ border-bottom: 1px solid var(--color-divider);
3100
+ margin-bottom: 2px;
3101
+ }
3102
+ .tlui-grid.tlui-main-toolbar__group {
3103
+ grid-column: 1 / span 4;
3104
+ }
3105
+ .tlui-grid.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
3106
+ border-bottom: 1px solid var(--color-divider);
3107
+ margin-bottom: 2px;
3108
+ }
3109
+
3020
3110
  @media (hover: hover) {
3021
- .tlui-toolbar *[data-state='open']:not(:hover)::after {
3022
- background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
3111
+ .tlui-main-toolbar--horizontal *[data-state='open']:not(:hover)::after {
3112
+ background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
3113
+ opacity: 1;
3114
+ }
3115
+ .tlui-main-toolbar--vertical *[data-state='open']:not(:hover)::after {
3116
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
3023
3117
  opacity: 1;
3024
3118
  }
3025
- }
3026
-
3027
- .tlui-layout__mobile .tlui-toolbar {
3028
- transition: transform 0.15s ease-out 0.05s;
3029
3119
  }
3030
3120
 
3031
3121
  /* ------------------- Tooltip -------------------- */
@@ -3034,44 +3124,40 @@ it from receiving any pointer events or affecting the cursor. */
3034
3124
  font-size: 12px;
3035
3125
  padding: 2px 8px;
3036
3126
  border-radius: 4px;
3037
- background-color: var(--color-tooltip);
3127
+ background-color: var(--tl-color-tooltip);
3038
3128
  box-shadow: none;
3039
- color: var(--color-text-shadow);
3129
+ color: var(--tl-color-text-shadow);
3040
3130
  max-width: 400px;
3041
3131
  width: fit-content;
3042
3132
  text-align: center;
3043
- pointer-events: none;
3044
3133
  will-change: transform, opacity;
3045
3134
  z-index: 2;
3046
3135
  }
3047
3136
 
3048
3137
  .tlui-tooltip__arrow {
3049
- fill: var(--color-tooltip);
3138
+ fill: var(--tl-color-tooltip);
3050
3139
  will-change: opacity;
3051
3140
  }
3052
3141
 
3053
3142
  [data-radix-popper-content-wrapper]:has(.tlui-tooltip) {
3054
- z-index: var(--layer-toasts) !important;
3055
- }
3056
-
3057
- [data-radix-popper-content-wrapper]:has(.tlui-tooltip[data-should-animate='true']) {
3058
- transition: all 0.1s ease-out;
3143
+ z-index: var(--tl-layer-toasts) !important;
3144
+ pointer-events: none;
3059
3145
  }
3060
3146
 
3061
3147
  /* ------------------- Debug panel ------------------ */
3062
3148
 
3063
3149
  .tlui-debug-panel {
3064
- background-color: var(--color-low);
3150
+ background-color: var(--tl-color-low);
3065
3151
  width: 100%;
3066
3152
  display: grid;
3067
3153
  align-items: center;
3068
3154
  grid-template-columns: 1fr auto auto auto;
3069
3155
  justify-content: space-between;
3070
- padding-left: var(--space-4);
3071
- border-top: 1px solid var(--color-background);
3156
+ padding-left: var(--tl-space-4);
3157
+ border-top: 1px solid var(--tl-color-background);
3072
3158
  font-size: 12px;
3073
- color: var(--color-text-1);
3074
- z-index: var(--layer-panels);
3159
+ color: var(--tl-color-text-1);
3160
+ z-index: var(--tl-layer-panels);
3075
3161
  pointer-events: all;
3076
3162
  }
3077
3163
 
@@ -3087,7 +3173,7 @@ it from receiving any pointer events or affecting the cursor. */
3087
3173
 
3088
3174
  .tlui-debug-panel__fps__slow {
3089
3175
  font-weight: bold;
3090
- color: var(--color-danger);
3176
+ color: var(--tl-color-danger);
3091
3177
  }
3092
3178
 
3093
3179
  .tlui-a11y-audit {
@@ -3097,7 +3183,7 @@ it from receiving any pointer events or affecting the cursor. */
3097
3183
  .tlui-a11y-audit th,
3098
3184
  .tlui-a11y-audit td {
3099
3185
  padding: 8px;
3100
- border: 1px solid var(--color-low-border);
3186
+ border: 1px solid var(--tl-color-low-border);
3101
3187
  }
3102
3188
 
3103
3189
  /* --------------------- Toasts --------------------- */
@@ -3110,10 +3196,10 @@ it from receiving any pointer events or affecting the cursor. */
3110
3196
  align-items: flex-end;
3111
3197
  justify-content: flex-end;
3112
3198
  flex-direction: column;
3113
- gap: var(--space-3);
3199
+ gap: var(--tl-space-3);
3114
3200
  pointer-events: none;
3115
- padding: 0px var(--space-3) 64px 0px;
3116
- z-index: var(--layer-toasts);
3201
+ padding: 0px var(--tl-space-3) 64px 0px;
3202
+ z-index: var(--tl-layer-toasts);
3117
3203
  }
3118
3204
 
3119
3205
  .tlui-toast__viewport > * {
@@ -3122,34 +3208,34 @@ it from receiving any pointer events or affecting the cursor. */
3122
3208
 
3123
3209
  .tlui-toast__icon {
3124
3210
  padding-top: 11px;
3125
- padding-left: var(--space-4);
3126
- color: var(--color-text-1);
3211
+ padding-left: var(--tl-space-4);
3212
+ color: var(--tl-color-text-1);
3127
3213
  }
3128
3214
 
3129
3215
  .tlui-toast__container {
3130
3216
  min-width: 200px;
3131
3217
  display: flex;
3132
3218
  flex-direction: row;
3133
- background-color: var(--color-panel);
3134
- box-shadow: var(--shadow-2);
3135
- border-radius: var(--radius-3);
3219
+ background-color: var(--tl-color-panel);
3220
+ box-shadow: var(--tl-shadow-2);
3221
+ border-radius: var(--tl-radius-3);
3136
3222
  font-size: 12px;
3137
3223
  }
3138
3224
 
3139
3225
  .tlui-toast__container[data-severity='success'] .tlui-icon {
3140
- color: var(--color-success);
3226
+ color: var(--tl-color-success);
3141
3227
  }
3142
3228
 
3143
3229
  .tlui-toast__container[data-severity='info'] .tlui-icon {
3144
- color: var(--color-info);
3230
+ color: var(--tl-color-info);
3145
3231
  }
3146
3232
 
3147
3233
  .tlui-toast__container[data-severity='warning'] .tlui-icon {
3148
- color: var(--color-warning);
3234
+ color: var(--tl-color-warning);
3149
3235
  }
3150
3236
 
3151
3237
  .tlui-toast__container[data-severity='error'] .tlui-icon {
3152
- color: var(--color-danger);
3238
+ color: var(--tl-color-danger);
3153
3239
  }
3154
3240
 
3155
3241
  .tlui-toast__main {
@@ -3158,27 +3244,27 @@ it from receiving any pointer events or affecting the cursor. */
3158
3244
  }
3159
3245
 
3160
3246
  .tlui-toast__content {
3161
- padding: var(--space-4);
3247
+ padding: var(--tl-space-4);
3162
3248
  display: flex;
3163
3249
  line-height: 1.4;
3164
3250
  flex-direction: column;
3165
- gap: var(--space-3);
3251
+ gap: var(--tl-space-3);
3166
3252
  }
3167
3253
 
3168
3254
  .tlui-toast__main[data-actions='true'] .tlui-toast__content {
3169
- padding-bottom: var(--space-2);
3255
+ padding-bottom: var(--tl-space-2);
3170
3256
  }
3171
3257
 
3172
3258
  .tlui-toast__title {
3173
3259
  font-weight: bold;
3174
- color: var(--color-text-1);
3260
+ color: var(--tl-color-text-1);
3175
3261
  /* this makes the default toast look better */
3176
3262
  line-height: 16px;
3177
3263
  }
3178
3264
 
3179
3265
  .tlui-toast__description {
3180
- color: var(--color-text-1);
3181
- padding: var(--space-3);
3266
+ color: var(--tl-color-text-1);
3267
+ padding: var(--tl-space-3);
3182
3268
  margin: 0px;
3183
3269
  padding: 0px;
3184
3270
  }
@@ -3230,14 +3316,14 @@ it from receiving any pointer events or affecting the cursor. */
3230
3316
  left: 0px;
3231
3317
  width: 100%;
3232
3318
  height: 100%;
3233
- z-index: var(--layer-canvas-overlays);
3234
- background-color: var(--color-overlay);
3319
+ z-index: var(--tl-layer-canvas-overlays);
3320
+ background-color: var(--tl-color-overlay);
3235
3321
  pointer-events: all;
3236
3322
  animation: tl-fade-in 0.12s ease-out;
3237
3323
  display: grid;
3238
3324
  place-items: center;
3239
3325
  overflow-y: auto;
3240
- padding: 0px var(--space-3);
3326
+ padding: 0px var(--tl-space-3);
3241
3327
  }
3242
3328
 
3243
3329
  .tlui-dialog__content {
@@ -3245,9 +3331,9 @@ it from receiving any pointer events or affecting the cursor. */
3245
3331
  flex-direction: column;
3246
3332
  position: relative;
3247
3333
  cursor: default;
3248
- background-color: var(--color-panel);
3249
- box-shadow: var(--shadow-3);
3250
- border-radius: var(--radius-3);
3334
+ background-color: var(--tl-color-panel);
3335
+ box-shadow: var(--tl-shadow-3);
3336
+ border-radius: var(--tl-radius-3);
3251
3337
  font-size: 12px;
3252
3338
  overflow: hidden;
3253
3339
  min-width: 300px;
@@ -3260,9 +3346,9 @@ it from receiving any pointer events or affecting the cursor. */
3260
3346
  display: flex;
3261
3347
  align-items: center;
3262
3348
  flex: 0;
3263
- z-index: var(--layer-header-footer);
3264
- padding-left: var(--space-4);
3265
- color: var(--color-text);
3349
+ z-index: var(--tl-layer-header-footer);
3350
+ padding-left: var(--tl-space-4);
3351
+ color: var(--tl-color-text);
3266
3352
  height: 40px;
3267
3353
  }
3268
3354
 
@@ -3271,7 +3357,7 @@ it from receiving any pointer events or affecting the cursor. */
3271
3357
  font-weight: inherit;
3272
3358
  font-size: 12px;
3273
3359
  margin: 0px;
3274
- color: var(--color-text-1);
3360
+ color: var(--tl-color-text-1);
3275
3361
  }
3276
3362
 
3277
3363
  .tlui-dialog__header__close {
@@ -3279,16 +3365,16 @@ it from receiving any pointer events or affecting the cursor. */
3279
3365
  }
3280
3366
 
3281
3367
  .tlui-dialog__body {
3282
- padding: var(--space-4) var(--space-4);
3368
+ padding: var(--tl-space-4) var(--tl-space-4);
3283
3369
  flex: 0 1;
3284
3370
  overflow-y: auto;
3285
3371
  overflow-x: hidden;
3286
- color: var(--color-text-1);
3372
+ color: var(--tl-color-text-1);
3287
3373
  user-select: all;
3288
3374
  -webkit-user-select: text;
3289
3375
  }
3290
3376
  .tlui-dialog__body a {
3291
- color: var(--color-selected);
3377
+ color: var(--tl-color-selected);
3292
3378
  }
3293
3379
 
3294
3380
  .tlui-dialog__body ul,
@@ -3296,13 +3382,13 @@ it from receiving any pointer events or affecting the cursor. */
3296
3382
  padding-left: 16px;
3297
3383
  display: flex;
3298
3384
  flex-direction: column;
3299
- gap: var(--space-2);
3385
+ gap: var(--tl-space-2);
3300
3386
  }
3301
3387
 
3302
3388
  .tlui-dialog__footer {
3303
3389
  position: relative;
3304
3390
  min-height: 12px;
3305
- z-index: var(--layer-header-footer);
3391
+ z-index: var(--tl-layer-header-footer);
3306
3392
  }
3307
3393
 
3308
3394
  .tlui-dialog__footer__actions {
@@ -3322,15 +3408,15 @@ it from receiving any pointer events or affecting the cursor. */
3322
3408
  .tlui-edit-link-dialog {
3323
3409
  display: flex;
3324
3410
  flex-direction: column;
3325
- gap: var(--space-4);
3326
- color: var(--color-text);
3411
+ gap: var(--tl-space-4);
3412
+ color: var(--tl-color-text);
3327
3413
  }
3328
3414
 
3329
3415
  .tlui-edit-link-dialog__input {
3330
- background-color: var(--color-muted-2);
3416
+ background-color: var(--tl-color-muted-2);
3331
3417
  flex-grow: 2;
3332
- border-radius: var(--radius-2);
3333
- padding: 0px var(--space-4);
3418
+ border-radius: var(--tl-radius-2);
3419
+ padding: 0px var(--tl-space-4);
3334
3420
  }
3335
3421
 
3336
3422
  /* Embed Dialog */
@@ -3338,15 +3424,15 @@ it from receiving any pointer events or affecting the cursor. */
3338
3424
  .tlui-embed__spacer {
3339
3425
  flex-grow: 2;
3340
3426
  min-height: 0px;
3341
- margin-left: calc(-1 * var(--space-4));
3342
- margin-top: calc(-1 * var(--space-4));
3427
+ margin-left: calc(-1 * var(--tl-space-4));
3428
+ margin-top: calc(-1 * var(--tl-space-4));
3343
3429
  pointer-events: none;
3344
3430
  }
3345
3431
 
3346
3432
  .tlui-embed-dialog__list {
3347
3433
  display: flex;
3348
3434
  flex-direction: column;
3349
- padding: 0px var(--space-3) var(--space-4) var(--space-3);
3435
+ padding: 0px var(--tl-space-3) var(--tl-space-4) var(--tl-space-3);
3350
3436
  }
3351
3437
 
3352
3438
  .tlui-embed-dialog__item__image {
@@ -3358,49 +3444,49 @@ it from receiving any pointer events or affecting the cursor. */
3358
3444
  background-size: contain;
3359
3445
  background-repeat: no-repeat;
3360
3446
  background-position: center center;
3361
- background-color: var(--color-selected-contrast);
3362
- border-radius: var(--radius-1);
3447
+ background-color: var(--tl-color-selected-contrast);
3448
+ border-radius: var(--tl-radius-1);
3363
3449
  }
3364
3450
 
3365
3451
  .tlui-embed-dialog__enter {
3366
3452
  display: flex;
3367
3453
  flex-direction: column;
3368
- gap: var(--space-4);
3369
- color: var(--color-text-1);
3454
+ gap: var(--tl-space-4);
3455
+ color: var(--tl-color-text-1);
3370
3456
  }
3371
3457
 
3372
3458
  .tlui-embed-dialog__input {
3373
- background-color: var(--color-muted-2);
3459
+ background-color: var(--tl-color-muted-2);
3374
3460
  flex-grow: 2;
3375
- border-radius: var(--radius-2);
3376
- padding: 0px var(--space-4);
3461
+ border-radius: var(--tl-radius-2);
3462
+ padding: 0px var(--tl-space-4);
3377
3463
  }
3378
3464
 
3379
3465
  .tlui-embed-dialog__warning {
3380
- color: var(--color-danger);
3466
+ color: var(--tl-color-danger);
3381
3467
  text-shadow: none;
3382
3468
  }
3383
3469
 
3384
3470
  .tlui-embed-dialog__instruction__link {
3385
3471
  display: flex;
3386
- gap: var(--space-1);
3387
- margin-top: var(--space-4);
3472
+ gap: var(--tl-space-1);
3473
+ margin-top: var(--tl-space-4);
3388
3474
  }
3389
3475
 
3390
3476
  .tlui-embed-dialog__enter a {
3391
- color: var(--color-text-1);
3477
+ color: var(--tl-color-text-1);
3392
3478
  }
3393
3479
 
3394
3480
  /* --------------- Keyboard shortcuts --------------- */
3395
3481
 
3396
3482
  .tlui-shortcuts-dialog__header {
3397
- border-bottom: 1px solid var(--color-divider);
3483
+ border-bottom: 1px solid var(--tl-color-divider);
3398
3484
  }
3399
3485
 
3400
3486
  .tlui-shortcuts-dialog__body {
3401
3487
  position: relative;
3402
3488
  columns: 3;
3403
- column-gap: var(--space-9);
3489
+ column-gap: var(--tl-space-9);
3404
3490
  pointer-events: all;
3405
3491
  touch-action: auto;
3406
3492
 
@@ -3418,14 +3504,14 @@ it from receiving any pointer events or affecting the cursor. */
3418
3504
 
3419
3505
  .tlui-shortcuts-dialog__group {
3420
3506
  break-inside: avoid-column;
3421
- padding-bottom: var(--space-6);
3507
+ padding-bottom: var(--tl-space-6);
3422
3508
  }
3423
3509
 
3424
3510
  .tlui-shortcuts-dialog__group__title {
3425
3511
  font-size: inherit;
3426
3512
  font-weight: inherit;
3427
3513
  margin: 0px;
3428
- color: var(--color-text-3);
3514
+ color: var(--tl-color-text-3);
3429
3515
  height: 32px;
3430
3516
  display: flex;
3431
3517
  align-items: center;
@@ -3434,12 +3520,12 @@ it from receiving any pointer events or affecting the cursor. */
3434
3520
  .tlui-shortcuts-dialog__group__content {
3435
3521
  display: flex;
3436
3522
  flex-direction: column;
3437
- color: var(--color-text-1);
3523
+ color: var(--tl-color-text-1);
3438
3524
  }
3439
3525
 
3440
3526
  .tlui-shortcuts-dialog__key-pair {
3441
3527
  display: flex;
3442
- gap: var(--space-4);
3528
+ gap: var(--tl-space-4);
3443
3529
  align-items: center;
3444
3530
  justify-content: space-between;
3445
3531
  height: 32px;
@@ -3466,12 +3552,12 @@ it from receiving any pointer events or affecting the cursor. */
3466
3552
  height: 24px;
3467
3553
  background: linear-gradient(
3468
3554
  to bottom,
3469
- var(--color-panel-transparent) 0%,
3470
- var(--color-panel) 90%,
3471
- var(--color-panel) 100%
3555
+ var(--tl-color-panel-transparent) 0%,
3556
+ var(--tl-color-panel) 90%,
3557
+ var(--tl-color-panel) 100%
3472
3558
  );
3473
- border-bottom-left-radius: var(--radius-3);
3474
- border-bottom-right-radius: var(--radius-3);
3559
+ border-bottom-left-radius: var(--tl-radius-3);
3560
+ border-bottom-right-radius: var(--tl-radius-3);
3475
3561
  pointer-events: none;
3476
3562
  }
3477
3563
 
@@ -3486,10 +3572,10 @@ it from receiving any pointer events or affecting the cursor. */
3486
3572
  .tlui-help-menu {
3487
3573
  pointer-events: all;
3488
3574
  position: absolute;
3489
- bottom: var(--space-2);
3490
- right: var(--space-2);
3491
- z-index: var(--layer-panels);
3492
- border: 2px solid var(--color-background);
3575
+ bottom: var(--tl-space-2);
3576
+ right: var(--tl-space-2);
3577
+ z-index: var(--tl-layer-panels);
3578
+ border: 2px solid var(--tl-color-background);
3493
3579
  border-radius: 100%;
3494
3580
  }
3495
3581
 
@@ -3500,7 +3586,7 @@ it from receiving any pointer events or affecting the cursor. */
3500
3586
  display: flex;
3501
3587
  flex-direction: row;
3502
3588
  justify-content: flex-end;
3503
- z-index: var(--layer-panels);
3589
+ z-index: var(--tl-layer-panels);
3504
3590
  align-items: center;
3505
3591
  padding-top: 2px;
3506
3592
  padding-right: 4px;
@@ -3516,7 +3602,7 @@ it from receiving any pointer events or affecting the cursor. */
3516
3602
  border: none;
3517
3603
  cursor: pointer;
3518
3604
  pointer-events: all;
3519
- border-radius: var(--radius-1);
3605
+ border-radius: var(--tl-radius-1);
3520
3606
  padding-right: 1px;
3521
3607
  height: 100%;
3522
3608
  }
@@ -3529,8 +3615,8 @@ it from receiving any pointer events or affecting the cursor. */
3529
3615
  .tlui-people-menu__avatar {
3530
3616
  height: 24px;
3531
3617
  width: 24px;
3532
- border: 2px solid var(--color-background);
3533
- background-color: var(--color-low);
3618
+ border: 2px solid var(--tl-color-background);
3619
+ background-color: var(--tl-color-low);
3534
3620
  border-radius: 100%;
3535
3621
  display: flex;
3536
3622
  align-items: center;
@@ -3539,7 +3625,7 @@ it from receiving any pointer events or affecting the cursor. */
3539
3625
  font-size: 10px;
3540
3626
  font-weight: bold;
3541
3627
  text-align: center;
3542
- color: var(--color-selected-contrast);
3628
+ color: var(--tl-color-selected-contrast);
3543
3629
  z-index: 2;
3544
3630
  }
3545
3631
 
@@ -3553,7 +3639,7 @@ it from receiving any pointer events or affecting the cursor. */
3553
3639
 
3554
3640
  @media (hover: hover) {
3555
3641
  .tlui-people-menu__avatars-button:hover .tlui-people-menu__avatar {
3556
- border-color: var(--color-low);
3642
+ border-color: var(--tl-color-low);
3557
3643
  }
3558
3644
  }
3559
3645
 
@@ -3561,12 +3647,12 @@ it from receiving any pointer events or affecting the cursor. */
3561
3647
  min-width: 0px;
3562
3648
  font-size: 11px;
3563
3649
  font-weight: 600;
3564
- color: var(--color-text-1);
3650
+ color: var(--tl-color-text-1);
3565
3651
  font-family: inherit;
3566
3652
  padding: 0px 4px;
3567
3653
  }
3568
3654
  .tlui-people-menu__more::after {
3569
- border-radius: var(--radius-2);
3655
+ border-radius: var(--tl-radius-2);
3570
3656
  inset: 0px;
3571
3657
  }
3572
3658
 
@@ -3595,7 +3681,7 @@ it from receiving any pointer events or affecting the cursor. */
3595
3681
  }
3596
3682
 
3597
3683
  .tlui-people-menu__section:not(:last-child) {
3598
- border-bottom: 1px solid var(--color-divider);
3684
+ border-bottom: 1px solid var(--tl-color-divider);
3599
3685
  }
3600
3686
 
3601
3687
  .tlui-people-menu__user {
@@ -3614,7 +3700,7 @@ it from receiving any pointer events or affecting the cursor. */
3614
3700
  text-overflow: ellipsis;
3615
3701
  white-space: nowrap;
3616
3702
  font-size: 12px;
3617
- color: var(--color-text-1);
3703
+ color: var(--tl-color-text-1);
3618
3704
  max-width: 100%;
3619
3705
  flex-grow: 1;
3620
3706
  flex-shrink: 100;
@@ -3626,7 +3712,7 @@ it from receiving any pointer events or affecting the cursor. */
3626
3712
  text-overflow: ellipsis;
3627
3713
  white-space: nowrap;
3628
3714
  font-size: 12px;
3629
- color: var(--color-text-3);
3715
+ color: var(--tl-color-text-3);
3630
3716
  flex-grow: 100;
3631
3717
  flex-shrink: 0;
3632
3718
  margin-left: 4px;
@@ -3717,7 +3803,7 @@ it from receiving any pointer events or affecting the cursor. */
3717
3803
  inset: 0px;
3718
3804
  border-width: 2px;
3719
3805
  border-style: solid;
3720
- z-index: var(--layer-following-indicator);
3806
+ z-index: var(--tl-layer-following-indicator);
3721
3807
  pointer-events: none;
3722
3808
  }
3723
3809
 
@@ -3736,7 +3822,7 @@ it from receiving any pointer events or affecting the cursor. */
3736
3822
  }
3737
3823
 
3738
3824
  .tlui-contextual-toolbar [data-isactive='true']::after {
3739
- background-color: var(--color-muted-2);
3825
+ background-color: var(--tl-color-muted-2);
3740
3826
  opacity: 1;
3741
3827
  }
3742
3828
 
@@ -3752,7 +3838,7 @@ it from receiving any pointer events or affecting the cursor. */
3752
3838
 
3753
3839
  .tlui-contextual-toolbar[data-visible='true'] {
3754
3840
  opacity: 1;
3755
- z-index: var(--layer-menus);
3841
+ z-index: var(--tl-layer-menus);
3756
3842
  }
3757
3843
 
3758
3844
  .tlui-contextual-toolbar[data-interactive='true'],
@@ -3811,7 +3897,7 @@ it from receiving any pointer events or affecting the cursor. */
3811
3897
 
3812
3898
  @keyframes tlui-slide-in {
3813
3899
  from {
3814
- transform: translateX(calc(100% + var(--space-3)));
3900
+ transform: translateX(calc(100% + var(--tl-space-3)));
3815
3901
  }
3816
3902
  to {
3817
3903
  transform: translateX(0px);
@@ -3823,7 +3909,7 @@ it from receiving any pointer events or affecting the cursor. */
3823
3909
  transform: translateX(var(--radix-toast-swipe-end-x));
3824
3910
  }
3825
3911
  to {
3826
- transform: translateX(calc(100% + var(--space-3)));
3912
+ transform: translateX(calc(100% + var(--tl-space-3)));
3827
3913
  }
3828
3914
  }
3829
3915