tldraw 3.15.0 → 3.16.0-canary.03deb7f8fe34

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 (374) hide show
  1. package/dist-cjs/index.d.ts +271 -9
  2. package/dist-cjs/index.js +28 -2
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/canvas/TldrawCropHandles.js.map +2 -2
  5. package/dist-cjs/lib/canvas/TldrawScribble.js +1 -1
  6. package/dist-cjs/lib/canvas/TldrawScribble.js.map +2 -2
  7. package/dist-cjs/lib/defaultExternalContentHandlers.js +1 -0
  8. package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
  9. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +25 -39
  10. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
  11. package/dist-cjs/lib/shapes/arrow/arrowLabel.js +16 -4
  12. package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +2 -2
  13. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js +1 -1
  14. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js.map +2 -2
  15. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js +3 -3
  16. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js.map +1 -1
  17. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js +3 -0
  18. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +2 -2
  19. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +3 -3
  20. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +2 -2
  21. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +1 -1
  22. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +1 -1
  23. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +12 -12
  24. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
  25. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js +1 -1
  26. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js.map +2 -2
  27. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +2 -2
  28. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
  29. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js +2 -1
  30. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js.map +2 -2
  31. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +5 -1
  32. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
  33. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +3 -3
  34. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +1 -1
  35. package/dist-cjs/lib/shapes/line/LineShapeUtil.js +20 -2
  36. package/dist-cjs/lib/shapes/line/LineShapeUtil.js.map +2 -2
  37. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +4 -4
  38. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
  39. package/dist-cjs/lib/shapes/shared/ShapeFill.js +4 -4
  40. package/dist-cjs/lib/shapes/shared/ShapeFill.js.map +2 -2
  41. package/dist-cjs/lib/shapes/shared/freehand/svg.js.map +2 -2
  42. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js +10 -1
  43. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js.map +2 -2
  44. package/dist-cjs/lib/shapes/text/TextShapeUtil.js +2 -2
  45. package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +2 -2
  46. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +3 -3
  47. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +1 -1
  48. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +25 -1
  49. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +2 -2
  50. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +12 -0
  51. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +2 -2
  52. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +43 -22
  53. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
  54. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +2 -15
  55. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +2 -2
  56. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js +5 -0
  57. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js.map +2 -2
  58. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +8 -0
  59. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +2 -2
  60. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +8 -0
  61. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +2 -2
  62. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +8 -0
  63. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +2 -2
  64. package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js.map +2 -2
  65. package/dist-cjs/lib/ui/TldrawUi.js +14 -0
  66. package/dist-cjs/lib/ui/TldrawUi.js.map +3 -3
  67. package/dist-cjs/lib/ui/components/AccessibilityMenu.js +35 -0
  68. package/dist-cjs/lib/ui/components/AccessibilityMenu.js.map +7 -0
  69. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js +12 -3
  70. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js.map +2 -2
  71. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js +3 -2
  72. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js.map +2 -2
  73. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js +40 -0
  74. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js.map +2 -2
  75. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js +3 -3
  76. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js.map +2 -2
  77. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js +4 -4
  78. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js.map +2 -2
  79. package/dist-cjs/lib/ui/components/MobileStylePanel.js +5 -3
  80. package/dist-cjs/lib/ui/components/MobileStylePanel.js.map +2 -2
  81. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js +1 -1
  82. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js.map +2 -2
  83. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js +2 -1
  84. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js.map +2 -2
  85. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js +3 -2
  86. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js.map +2 -2
  87. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js +2 -2
  88. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js.map +2 -2
  89. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js +2 -0
  90. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js.map +2 -2
  91. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +171 -140
  92. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
  93. package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js +3 -3
  94. package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js.map +2 -2
  95. package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js +26 -25
  96. package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js.map +3 -3
  97. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js +1 -1
  98. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js.map +2 -2
  99. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js +66 -21
  100. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js.map +3 -3
  101. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js +189 -80
  102. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js.map +3 -3
  103. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +5 -4
  104. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js.map +2 -2
  105. package/dist-cjs/lib/ui/components/menu-items.js +6 -0
  106. package/dist-cjs/lib/ui/components/menu-items.js.map +2 -2
  107. package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js +5 -16
  108. package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js.map +3 -3
  109. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +1 -1
  110. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
  111. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js +3 -2
  112. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js.map +3 -3
  113. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js +1 -0
  114. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js.map +2 -2
  115. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js +30 -7
  116. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js.map +2 -2
  117. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +268 -0
  118. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +7 -0
  119. package/dist-cjs/lib/ui/components/primitives/layout.js +76 -0
  120. package/dist-cjs/lib/ui/components/primitives/layout.js.map +7 -0
  121. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuContext.js.map +2 -2
  122. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js +25 -12
  123. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js.map +2 -2
  124. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +153 -20
  125. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
  126. package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js +3 -2
  127. package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js.map +2 -2
  128. package/dist-cjs/lib/ui/context/actions.js +29 -7
  129. package/dist-cjs/lib/ui/context/actions.js.map +2 -2
  130. package/dist-cjs/lib/ui/context/events.js.map +2 -2
  131. package/dist-cjs/lib/ui/hooks/menu-hooks.js.map +2 -2
  132. package/dist-cjs/lib/ui/hooks/useTools.js +94 -9
  133. package/dist-cjs/lib/ui/hooks/useTools.js.map +2 -2
  134. package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js.map +1 -1
  135. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +7 -0
  136. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
  137. package/dist-cjs/lib/ui/kbd-utils.js +2 -1
  138. package/dist-cjs/lib/ui/kbd-utils.js.map +2 -2
  139. package/dist-cjs/lib/ui/version.js +3 -3
  140. package/dist-cjs/lib/ui/version.js.map +1 -1
  141. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js +1 -1
  142. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js.map +2 -2
  143. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js +3 -2
  144. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js.map +2 -2
  145. package/dist-esm/index.d.mts +271 -9
  146. package/dist-esm/index.mjs +44 -3
  147. package/dist-esm/index.mjs.map +2 -2
  148. package/dist-esm/lib/canvas/TldrawCropHandles.mjs.map +2 -2
  149. package/dist-esm/lib/canvas/TldrawScribble.mjs +1 -1
  150. package/dist-esm/lib/canvas/TldrawScribble.mjs.map +2 -2
  151. package/dist-esm/lib/defaultExternalContentHandlers.mjs +1 -0
  152. package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
  153. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +28 -39
  154. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
  155. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +19 -5
  156. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +2 -2
  157. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs +1 -1
  158. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs.map +2 -2
  159. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs +3 -3
  160. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs.map +1 -1
  161. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs +3 -0
  162. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +2 -2
  163. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +4 -3
  164. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +2 -2
  165. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +1 -1
  166. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +1 -1
  167. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +13 -12
  168. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
  169. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs +1 -1
  170. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs.map +2 -2
  171. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +3 -2
  172. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
  173. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs +2 -1
  174. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs.map +2 -2
  175. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +6 -1
  176. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
  177. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +3 -3
  178. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +1 -1
  179. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs +21 -2
  180. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs.map +2 -2
  181. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +5 -4
  182. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
  183. package/dist-esm/lib/shapes/shared/ShapeFill.mjs +5 -4
  184. package/dist-esm/lib/shapes/shared/ShapeFill.mjs.map +2 -2
  185. package/dist-esm/lib/shapes/shared/freehand/svg.mjs.map +2 -2
  186. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs +10 -1
  187. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs.map +2 -2
  188. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +3 -2
  189. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +2 -2
  190. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +3 -3
  191. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +1 -1
  192. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +26 -1
  193. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +2 -2
  194. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +13 -0
  195. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +2 -2
  196. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +43 -22
  197. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
  198. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +2 -15
  199. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +2 -2
  200. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs +5 -0
  201. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs.map +2 -2
  202. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +8 -0
  203. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +2 -2
  204. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +8 -0
  205. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +2 -2
  206. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +8 -0
  207. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +2 -2
  208. package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs.map +2 -2
  209. package/dist-esm/lib/ui/TldrawUi.mjs +16 -2
  210. package/dist-esm/lib/ui/TldrawUi.mjs.map +3 -3
  211. package/dist-esm/lib/ui/components/AccessibilityMenu.mjs +19 -0
  212. package/dist-esm/lib/ui/components/AccessibilityMenu.mjs.map +7 -0
  213. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs +12 -3
  214. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs.map +2 -2
  215. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs +3 -2
  216. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs.map +2 -2
  217. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs +40 -0
  218. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs.map +2 -2
  219. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs +3 -5
  220. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs.map +2 -2
  221. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs +4 -4
  222. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs.map +2 -2
  223. package/dist-esm/lib/ui/components/MobileStylePanel.mjs +6 -3
  224. package/dist-esm/lib/ui/components/MobileStylePanel.mjs.map +2 -2
  225. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs +1 -1
  226. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs.map +2 -2
  227. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs +2 -1
  228. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs.map +2 -2
  229. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs +3 -2
  230. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs.map +2 -2
  231. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs +2 -2
  232. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs.map +2 -2
  233. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs +3 -1
  234. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs.map +2 -2
  235. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +171 -140
  236. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
  237. package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs +3 -3
  238. package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs.map +2 -2
  239. package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs +26 -25
  240. package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs.map +2 -2
  241. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs +1 -1
  242. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs.map +2 -2
  243. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs +56 -21
  244. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs.map +2 -2
  245. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs +192 -81
  246. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs.map +3 -3
  247. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs +5 -4
  248. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs.map +2 -2
  249. package/dist-esm/lib/ui/components/menu-items.mjs +6 -0
  250. package/dist-esm/lib/ui/components/menu-items.mjs.map +2 -2
  251. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs +6 -6
  252. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs.map +2 -2
  253. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +1 -1
  254. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
  255. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs +3 -2
  256. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs.map +2 -2
  257. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs +1 -0
  258. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs.map +2 -2
  259. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs +30 -7
  260. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs.map +2 -2
  261. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +245 -0
  262. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +7 -0
  263. package/dist-esm/lib/ui/components/primitives/layout.mjs +46 -0
  264. package/dist-esm/lib/ui/components/primitives/layout.mjs.map +7 -0
  265. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuContext.mjs.map +2 -2
  266. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs +25 -12
  267. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs.map +2 -2
  268. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +161 -22
  269. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
  270. package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs +3 -2
  271. package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs.map +2 -2
  272. package/dist-esm/lib/ui/context/actions.mjs +29 -7
  273. package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
  274. package/dist-esm/lib/ui/context/events.mjs.map +2 -2
  275. package/dist-esm/lib/ui/hooks/menu-hooks.mjs.map +2 -2
  276. package/dist-esm/lib/ui/hooks/useTools.mjs +102 -10
  277. package/dist-esm/lib/ui/hooks/useTools.mjs.map +2 -2
  278. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +7 -0
  279. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
  280. package/dist-esm/lib/ui/kbd-utils.mjs +2 -1
  281. package/dist-esm/lib/ui/kbd-utils.mjs.map +2 -2
  282. package/dist-esm/lib/ui/version.mjs +3 -3
  283. package/dist-esm/lib/ui/version.mjs.map +1 -1
  284. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs +1 -1
  285. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs.map +2 -2
  286. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs +3 -2
  287. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs.map +2 -2
  288. package/package.json +3 -3
  289. package/src/index.ts +32 -1
  290. package/src/lib/canvas/TldrawCropHandles.tsx +2 -0
  291. package/src/lib/canvas/TldrawScribble.tsx +1 -1
  292. package/src/lib/defaultExternalContentHandlers.ts +2 -1
  293. package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +5 -5
  294. package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +29 -42
  295. package/src/lib/shapes/arrow/arrowLabel.ts +23 -3
  296. package/src/lib/shapes/arrow/arrowTargetState.ts +2 -1
  297. package/src/lib/shapes/arrow/elbow/ElbowArrowDebug.tsx +3 -3
  298. package/src/lib/shapes/arrow/toolStates/Pointing.tsx +3 -0
  299. package/src/lib/shapes/draw/DrawShapeUtil.tsx +4 -3
  300. package/src/lib/shapes/embed/EmbedShapeUtil.tsx +1 -1
  301. package/src/lib/shapes/frame/FrameShapeUtil.tsx +21 -14
  302. package/src/lib/shapes/frame/components/FrameHeading.tsx +1 -1
  303. package/src/lib/shapes/geo/GeoShapeUtil.tsx +3 -2
  304. package/src/lib/shapes/geo/components/GeoShapeBody.tsx +2 -2
  305. package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +7 -1
  306. package/src/lib/shapes/image/ImageShapeUtil.tsx +3 -3
  307. package/src/lib/shapes/line/LineShapeUtil.tsx +25 -3
  308. package/src/lib/shapes/note/NoteShapeUtil.tsx +9 -4
  309. package/src/lib/shapes/shared/ShapeFill.tsx +5 -4
  310. package/src/lib/shapes/shared/freehand/svg.ts +2 -0
  311. package/src/lib/shapes/shared/usePrefersReducedMotion.tsx +11 -1
  312. package/src/lib/shapes/text/TextShapeUtil.tsx +3 -2
  313. package/src/lib/shapes/video/VideoShapeUtil.tsx +3 -3
  314. package/src/lib/tools/EraserTool/childStates/Erasing.ts +34 -1
  315. package/src/lib/tools/EraserTool/childStates/Pointing.ts +20 -0
  316. package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +54 -30
  317. package/src/lib/tools/SelectTool/childStates/Idle.ts +2 -24
  318. package/src/lib/tools/SelectTool/childStates/PointingShape.ts +7 -0
  319. package/src/lib/tools/SelectTool/childStates/Resizing.ts +12 -1
  320. package/src/lib/tools/SelectTool/childStates/Rotating.ts +11 -0
  321. package/src/lib/tools/SelectTool/childStates/Translating.ts +11 -1
  322. package/src/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.ts +1 -0
  323. package/src/lib/ui/TldrawUi.tsx +17 -2
  324. package/src/lib/ui/components/AccessibilityMenu.tsx +20 -0
  325. package/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx +15 -3
  326. package/src/lib/ui/components/DefaultMenuPanel.tsx +4 -3
  327. package/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.tsx +32 -0
  328. package/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx +4 -4
  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 +3 -1
  336. package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +146 -107
  337. package/src/lib/ui/components/StylePanel/DoubleDropdownPicker.tsx +3 -3
  338. package/src/lib/ui/components/StylePanel/DropdownPicker.tsx +7 -6
  339. package/src/lib/ui/components/Toolbar/DefaultImageToolbarContent.tsx +1 -1
  340. package/src/lib/ui/components/Toolbar/DefaultToolbar.tsx +55 -23
  341. package/src/lib/ui/components/Toolbar/OverflowingToolbar.tsx +212 -61
  342. package/src/lib/ui/components/Toolbar/ToggleToolLockedButton.tsx +17 -12
  343. package/src/lib/ui/components/menu-items.tsx +8 -0
  344. package/src/lib/ui/components/primitives/TldrawUiButtonPicker.tsx +40 -37
  345. package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +1 -1
  346. package/src/lib/ui/components/primitives/TldrawUiPopover.tsx +4 -2
  347. package/src/lib/ui/components/primitives/TldrawUiSlider.tsx +1 -0
  348. package/src/lib/ui/components/primitives/TldrawUiToolbar.tsx +51 -12
  349. package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +327 -0
  350. package/src/lib/ui/components/primitives/layout.tsx +107 -0
  351. package/src/lib/ui/components/primitives/menus/TldrawUiMenuContext.tsx +0 -1
  352. package/src/lib/ui/components/primitives/menus/TldrawUiMenuGroup.tsx +29 -16
  353. package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +220 -19
  354. package/src/lib/ui/context/TldrawUiContextProvider.tsx +23 -20
  355. package/src/lib/ui/context/actions.tsx +29 -7
  356. package/src/lib/ui/context/events.tsx +4 -2
  357. package/src/lib/ui/hooks/menu-hooks.ts +1 -0
  358. package/src/lib/ui/hooks/useTools.tsx +140 -10
  359. package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +7 -0
  360. package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +7 -0
  361. package/src/lib/ui/kbd-utils.ts +2 -1
  362. package/src/lib/ui/version.ts +3 -3
  363. package/src/lib/ui.css +406 -292
  364. package/src/lib/utils/excalidraw/__snapshots__/putExcalidrawContent.test.tsx.snap +16 -2
  365. package/src/lib/utils/excalidraw/putExcalidrawContent.ts +1 -1
  366. package/src/lib/utils/tldr/__snapshots__/buildFromV1Document.test.ts.snap +24 -3
  367. package/src/lib/utils/tldr/buildFromV1Document.ts +2 -1
  368. package/src/test/EraserTool.test.ts +176 -6
  369. package/src/test/SelectTool.test.ts +37 -11
  370. package/src/test/arrows-megabus.test.tsx +12 -6
  371. package/src/test/commands/deletePage.test.ts +84 -1
  372. package/src/test/inner-outer-margin.test.ts +315 -0
  373. package/src/test/shapeutils.test.ts +394 -45
  374. package/tldraw.css +703 -603
package/tldraw.css CHANGED
@@ -9,57 +9,57 @@
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-blocker: 10000;
37
37
 
38
38
  /* 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;
39
+ --tl-layer-overlays-collaborator-scribble: 10;
40
+ --tl-layer-overlays-collaborator-brush: 20;
41
+ --tl-layer-overlays-collaborator-shape-indicator: 30;
42
+ --tl-layer-overlays-user-scribble: 40;
43
+ --tl-layer-overlays-user-brush: 50;
44
+ --tl-layer-overlays-user-snapline: 90;
45
+ --tl-layer-overlays-selection-fg: 100;
46
46
  /* 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;
47
+ --tl-layer-overlays-user-handles: 105;
48
+ --tl-layer-overlays-user-indicator-hint: 110;
49
+ --tl-layer-overlays-custom: 115;
50
+ --tl-layer-overlays-collaborator-cursor-hint: 120;
51
+ --tl-layer-overlays-collaborator-cursor: 130;
52
52
 
53
53
  /* Text editor z-index */
54
- --layer-text-container: 1;
55
- --layer-text-content: 3;
56
- --layer-text-editor: 4;
54
+ --tl-layer-text-container: 1;
55
+ --tl-layer-text-content: 3;
56
+ --tl-layer-text-editor: 4;
57
57
 
58
58
  /* 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;
59
+ --tl-layer-error-overlay: 1;
60
+ --tl-layer-error-canvas: 2;
61
+ --tl-layer-error-canvas-after: 3;
62
+ --tl-layer-error-content: 4;
63
63
 
64
64
  /* Misc */
65
65
  --tl-zoom: 1;
@@ -124,12 +124,15 @@
124
124
  --tl-font-serif: 'tldraw_serif', serif;
125
125
  --tl-font-mono: 'tldraw_mono', monospace;
126
126
  /* text outline */
127
- --a: calc(min(0.5, 1 / var(--tl-zoom)) * 2px);
128
- --b: calc(min(0.5, 1 / var(--tl-zoom)) * -2px);
127
+ --tl-text-outline-a: calc(min(0.5, 1 / var(--tl-zoom)) * 2px);
128
+ --tl-text-outline-b: calc(min(0.5, 1 / var(--tl-zoom)) * -2px);
129
129
  --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);
130
+ 0 var(--tl-text-outline-b) 0 var(--tl-color-background),
131
+ 0 var(--tl-text-outline-a) 0 var(--tl-color-background),
132
+ var(--tl-text-outline-b) var(--tl-text-outline-b) 0 var(--tl-color-background),
133
+ var(--tl-text-outline-a) var(--tl-text-outline-b) 0 var(--tl-color-background),
134
+ var(--tl-text-outline-a) var(--tl-text-outline-a) 0 var(--tl-color-background),
135
+ var(--tl-text-outline-b) var(--tl-text-outline-a) 0 var(--tl-color-background);
133
136
  --tl-text-outline: var(--tl-text-outline-reference);
134
137
  /* own properties */
135
138
  position: relative;
@@ -137,116 +140,118 @@
137
140
  height: 100%;
138
141
  width: 100%;
139
142
  overflow: clip;
140
- color: var(--color-text);
143
+ color: var(--tl-color-text);
141
144
  }
142
145
 
143
146
  .tl-theme__light {
144
147
  /* 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%);
148
+ --tl-color-snap: hsl(0, 76%, 60%);
149
+ --tl-color-selection-fill: hsl(210, 100%, 56%, 24%);
150
+ --tl-color-selection-stroke: hsl(214, 84%, 56%);
151
+ --tl-color-background: hsl(210, 20%, 98%);
152
+ --tl-color-brush-fill: hsl(0, 0%, 56%, 10.2%);
153
+ --tl-color-brush-stroke: hsl(0, 0%, 56%, 25.1%);
154
+ --tl-color-grid: hsl(0, 0%, 43%);
152
155
  /* 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%);
156
+ --tl-color-low: hsl(204, 16%, 94%);
157
+ --tl-color-low-border: hsl(204, 16%, 92%);
158
+ --tl-color-culled: hsl(204, 14%, 93%);
159
+ --tl-color-muted-none: hsl(0, 0%, 0%, 0%);
160
+ --tl-color-muted-0: hsl(0, 0%, 0%, 2%);
161
+ --tl-color-muted-1: hsl(0, 0%, 0%, 10%);
162
+ --tl-color-muted-2: hsl(0, 0%, 0%, 4.3%);
163
+ --tl-color-hint: hsl(0, 0%, 0%, 5.5%);
164
+ --tl-color-overlay: hsl(0, 0%, 0%, 20%);
165
+ --tl-color-divider: hsl(0, 0%, 91%);
166
+ --tl-color-panel: hsl(0, 0%, 99%);
167
+ --tl-color-panel-contrast: hsl(0, 0%, 100%);
168
+ --tl-color-panel-overlay: hsl(0, 0%, 100%, 82%);
169
+ --tl-color-panel-transparent: hsla(0, 0%, 99%, 0%);
170
+ --tl-color-selected: hsl(214, 84%, 56%);
171
+ --tl-color-selected-contrast: hsl(0, 0%, 100%);
172
+ --tl-color-focus: hsl(219, 65%, 50%);
173
+ --tl-color-tooltip: hsla(200, 14%, 4%, 1);
170
174
  /* Text */
171
- --color-text: hsl(0, 0%, 0%);
172
- --color-text-0: hsl(0, 0%, 11%);
173
- --color-text-1: hsl(0, 0%, 18%);
174
- --color-text-3: hsl(204, 4%, 45%);
175
- --color-text-shadow: hsl(0, 0%, 100%);
176
- --color-text-highlight: hsl(52, 100%, 50%);
177
- --color-text-highlight-p3: color(display-p3 0.972 0.8205 0.05);
175
+ --tl-color-text: hsl(0, 0%, 0%);
176
+ --tl-color-text-0: hsl(0, 0%, 11%);
177
+ --tl-color-text-1: hsl(0, 0%, 18%);
178
+ --tl-color-text-3: hsl(204, 4%, 45%);
179
+ --tl-color-text-shadow: hsl(0, 0%, 100%);
180
+ --tl-color-text-highlight: hsl(52, 100%, 50%);
181
+ --tl-color-text-highlight-p3: color(display-p3 0.972 0.8205 0.05);
178
182
  /* Named */
179
- --color-primary: hsl(214, 84%, 56%);
180
- --color-success: hsl(123, 46%, 34%);
181
- --color-info: hsl(201, 98%, 41%);
182
- --color-warning: hsl(27, 98%, 47%);
183
- --color-danger: hsl(0, 90%, 43%);
184
- --color-laser: hsl(0, 100%, 50%);
183
+ --tl-color-primary: hsl(214, 84%, 56%);
184
+ --tl-color-success: hsl(123, 46%, 34%);
185
+ --tl-color-info: hsl(201, 98%, 41%);
186
+ --tl-color-warning: hsl(27, 98%, 47%);
187
+ --tl-color-danger: hsl(0, 90%, 43%);
188
+ --tl-color-laser: hsl(0, 100%, 50%);
185
189
  /* Shadows */
186
- --shadow-1: 0px 1px 2px hsl(0, 0%, 0%, 25%), 0px 1px 3px hsl(0, 0%, 0%, 9%);
187
- --shadow-2:
190
+ --tl-shadow-1: 0px 1px 2px hsl(0, 0%, 0%, 25%), 0px 1px 3px hsl(0, 0%, 0%, 9%);
191
+ --tl-shadow-2:
188
192
  0px 0px 2px hsl(0, 0%, 0%, 16%), 0px 2px 3px hsl(0, 0%, 0%, 24%),
189
- 0px 2px 6px hsl(0, 0%, 0%, 0.1), inset 0px 0px 0px 1px var(--color-panel-contrast);
190
- --shadow-3:
193
+ 0px 2px 6px hsl(0, 0%, 0%, 0.1), inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
194
+ --tl-shadow-3:
191
195
  0px 1px 2px hsl(0, 0%, 0%, 28%), 0px 2px 6px hsl(0, 0%, 0%, 14%),
192
- inset 0px 0px 0px 1px var(--color-panel-contrast);
193
- --shadow-4:
196
+ inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
197
+ --tl-shadow-4:
194
198
  0px 0px 3px hsl(0, 0%, 0%, 19%), 0px 5px 4px hsl(0, 0%, 0%, 16%),
195
- 0px 2px 16px hsl(0, 0%, 0%, 6%), inset 0px 0px 0px 1px var(--color-panel-contrast);
199
+ 0px 2px 16px hsl(0, 0%, 0%, 6%), inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
196
200
  }
197
201
 
198
202
  .tl-theme__dark {
199
203
  /* Canvas */
200
- --color-snap: hsl(0, 76%, 60%);
201
- --color-selection-fill: hsl(209, 100%, 57%, 20%);
202
- --color-selection-stroke: hsl(214, 84%, 56%);
203
- --color-background: hsl(240, 5%, 6.5%);
204
- --color-brush-fill: hsl(0, 0%, 71%, 5.1%);
205
- --color-brush-stroke: hsl(0, 0%, 71%, 25.1%);
206
- --color-grid: hsl(0, 0%, 40%);
204
+ --tl-color-snap: hsl(0, 76%, 60%);
205
+ --tl-color-selection-fill: hsl(209, 100%, 57%, 20%);
206
+ --tl-color-selection-stroke: hsl(214, 84%, 56%);
207
+ --tl-color-background: hsl(240, 5%, 6.5%);
208
+ --tl-color-brush-fill: hsl(0, 0%, 71%, 5.1%);
209
+ --tl-color-brush-stroke: hsl(0, 0%, 71%, 25.1%);
210
+ --tl-color-grid: hsl(0, 0%, 40%);
207
211
  /* UI */
208
- --color-low: hsl(260, 4.5%, 10.5%);
209
- --color-low-border: hsl(207, 10%, 10%);
210
- --color-culled: hsl(210, 11%, 19%);
211
- --color-muted-none: hsl(0, 0%, 100%, 0%);
212
- --color-muted-0: hsl(0, 0%, 100%, 2%);
213
- --color-muted-1: hsl(0, 0%, 100%, 10%);
214
- --color-muted-2: hsl(0, 0%, 100%, 5%);
215
- --color-hint: hsl(0, 0%, 100%, 7%);
216
- --color-overlay: hsl(0, 0%, 0%, 50%);
217
- --color-divider: hsl(240, 9%, 22%);
218
- --color-panel: hsl(235, 6.8%, 13.5%);
219
- --color-panel-contrast: hsl(245, 12%, 23%);
220
- --color-panel-overlay: hsl(210, 10%, 24%, 82%);
221
- --color-panel-transparent: hsla(235, 6.8%, 13.5%, 0%);
222
- --color-selected: hsl(217, 89%, 61%);
223
- --color-selected-contrast: hsl(0, 0%, 100%);
224
- --color-focus: hsl(217, 76%, 80%);
212
+ --tl-color-low: hsl(260, 4.5%, 10.5%);
213
+ --tl-color-low-border: hsl(207, 10%, 10%);
214
+ --tl-color-culled: hsl(210, 11%, 19%);
215
+ --tl-color-muted-none: hsl(0, 0%, 100%, 0%);
216
+ --tl-color-muted-0: hsl(0, 0%, 100%, 2%);
217
+ --tl-color-muted-1: hsl(0, 0%, 100%, 10%);
218
+ --tl-color-muted-2: hsl(0, 0%, 100%, 5%);
219
+ --tl-color-hint: hsl(0, 0%, 100%, 7%);
220
+ --tl-color-overlay: hsl(0, 0%, 0%, 50%);
221
+ --tl-color-divider: hsl(240, 9%, 22%);
222
+ --tl-color-panel: hsl(235, 6.8%, 13.5%);
223
+ --tl-color-panel-contrast: hsl(245, 12%, 23%);
224
+ --tl-color-panel-overlay: hsl(210, 10%, 24%, 82%);
225
+ --tl-color-panel-transparent: hsla(235, 6.8%, 13.5%, 0%);
226
+ --tl-color-selected: hsl(217, 89%, 61%);
227
+ --tl-color-selected-contrast: hsl(0, 0%, 100%);
228
+ --tl-color-focus: hsl(217, 76%, 80%);
229
+ --tl-color-tooltip: hsla(0, 0%, 100%, 1);
225
230
  /* Text */
226
- --color-text: hsl(210, 17%, 98%);
227
- --color-text-0: hsl(0, 9%, 94%);
228
- --color-text-1: hsl(0, 0%, 85%);
229
- --color-text-3: hsl(204, 4%, 75%);
230
- --color-text-shadow: hsl(210, 13%, 18%);
231
- --color-text-highlight: hsl(52, 100%, 41%);
232
- --color-text-highlight-p3: color(display-p3 0.8078 0.6225 0.0312);
231
+ --tl-color-text: hsl(210, 17%, 98%);
232
+ --tl-color-text-0: hsl(0, 9%, 94%);
233
+ --tl-color-text-1: hsl(0, 0%, 85%);
234
+ --tl-color-text-3: hsl(204, 4%, 75%);
235
+ --tl-color-text-shadow: hsl(210, 13%, 18%);
236
+ --tl-color-text-highlight: hsl(52, 100%, 41%);
237
+ --tl-color-text-highlight-p3: color(display-p3 0.8078 0.6225 0.0312);
233
238
  /* Named */
234
- --color-primary: hsl(214, 84%, 56%);
235
- --color-success: hsl(123, 38%, 57%);
236
- --color-info: hsl(199, 92%, 56%);
237
- --color-warning: hsl(36, 100%, 57%);
238
- --color-danger: hsl(0, 82%, 66%);
239
- --color-laser: hsl(0, 100%, 50%);
239
+ --tl-color-primary: hsl(214, 84%, 56%);
240
+ --tl-color-success: hsl(123, 38%, 57%);
241
+ --tl-color-info: hsl(199, 92%, 56%);
242
+ --tl-color-warning: hsl(36, 100%, 57%);
243
+ --tl-color-danger: hsl(0, 82%, 66%);
244
+ --tl-color-laser: hsl(0, 100%, 50%);
240
245
  /* Shadows */
241
- --shadow-1:
246
+ --tl-shadow-1:
242
247
  0px 1px 2px hsl(0, 0%, 0%, 16.1%), 0px 1px 3px hsl(0, 0%, 0%, 22%),
243
- inset 0px 0px 0px 1px var(--color-panel-contrast);
244
- --shadow-2:
248
+ inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
249
+ --tl-shadow-2:
245
250
  0px 1px 3px hsl(0, 0%, 0%, 66.6%), 0px 2px 6px hsl(0, 0%, 0%, 33%),
246
- inset 0px 0px 0px 1px var(--color-panel-contrast);
247
- --shadow-3:
251
+ inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
252
+ --tl-shadow-3:
248
253
  0px 1px 3px hsl(0, 0%, 0%, 50%), 0px 2px 12px hsl(0, 0%, 0%, 50%),
249
- inset 0px 0px 0px 1px var(--color-panel-contrast);
254
+ inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
250
255
  }
251
256
 
252
257
  .tl-counter-scaled {
@@ -272,7 +277,7 @@
272
277
  }
273
278
 
274
279
  .tl-container__focused {
275
- outline: 1px solid var(--color-low);
280
+ outline: 1px solid var(--tl-color-low);
276
281
  }
277
282
 
278
283
  input,
@@ -288,7 +293,7 @@ input,
288
293
  inset: 0px;
289
294
  height: 100%;
290
295
  width: 100%;
291
- color: var(--color-text);
296
+ color: var(--tl-color-text);
292
297
  cursor: var(--tl-cursor);
293
298
  overflow: clip;
294
299
  content-visibility: auto;
@@ -298,7 +303,7 @@ input,
298
303
 
299
304
  .tl-shapes {
300
305
  position: relative;
301
- z-index: var(--layer-canvas-shapes);
306
+ z-index: var(--tl-layer-canvas-shapes);
302
307
  }
303
308
 
304
309
  .tl-overlays {
@@ -309,7 +314,7 @@ input,
309
314
  width: 100%;
310
315
  contain: strict;
311
316
  pointer-events: none;
312
- z-index: var(--layer-canvas-overlays);
317
+ z-index: var(--tl-layer-canvas-overlays);
313
318
  }
314
319
 
315
320
  .tl-overlays__item {
@@ -333,7 +338,7 @@ input,
333
338
  /* ------------------- Background ------------------- */
334
339
 
335
340
  .tl-background__wrapper {
336
- z-index: var(--layer-canvas-background);
341
+ z-index: var(--tl-layer-canvas-background);
337
342
  position: absolute;
338
343
  inset: 0px;
339
344
  height: 100%;
@@ -341,7 +346,7 @@ input,
341
346
  }
342
347
 
343
348
  .tl-background {
344
- background-color: var(--color-background);
349
+ background-color: var(--tl-color-background);
345
350
  width: 100%;
346
351
  height: 100%;
347
352
  }
@@ -355,12 +360,12 @@ input,
355
360
  height: 100%;
356
361
  touch-action: none;
357
362
  pointer-events: none;
358
- z-index: var(--layer-canvas-grid);
363
+ z-index: var(--tl-layer-canvas-grid);
359
364
  contain: strict;
360
365
  }
361
366
 
362
367
  .tl-grid-dot {
363
- fill: var(--color-grid);
368
+ fill: var(--tl-color-grid);
364
369
  }
365
370
 
366
371
  /* --------------------- Layers --------------------- */
@@ -378,54 +383,54 @@ input,
378
383
 
379
384
  /* back of the stack, behind user's stuff */
380
385
  .tl-collaborator__scribble {
381
- z-index: var(--layer-overlays-collaborator-scribble);
386
+ z-index: var(--tl-layer-overlays-collaborator-scribble);
382
387
  }
383
388
 
384
389
  .tl-collaborator__brush {
385
- z-index: var(--layer-overlays-collaborator-brush);
390
+ z-index: var(--tl-layer-overlays-collaborator-brush);
386
391
  }
387
392
 
388
393
  .tl-collaborator__shape-indicator {
389
- z-index: var(--layer-overlays-collaborator-shape-indicator);
394
+ z-index: var(--tl-layer-overlays-collaborator-shape-indicator);
390
395
  }
391
396
 
392
397
  .tl-user-scribble {
393
- z-index: var(--layer-overlays-user-scribble);
398
+ z-index: var(--tl-layer-overlays-user-scribble);
394
399
  }
395
400
 
396
401
  .tl-user-brush {
397
- z-index: var(--layer-overlays-user-brush);
402
+ z-index: var(--tl-layer-overlays-user-brush);
398
403
  }
399
404
 
400
405
  .tl-user-handles {
401
- z-index: var(--layer-overlays-user-handles);
406
+ z-index: var(--tl-layer-overlays-user-handles);
402
407
  }
403
408
 
404
409
  .tl-user-snapline {
405
- z-index: var(--layer-overlays-user-snapline);
410
+ z-index: var(--tl-layer-overlays-user-snapline);
406
411
  }
407
412
 
408
413
  .tl-selection__fg {
409
414
  pointer-events: none;
410
- z-index: var(--layer-overlays-selection-fg);
415
+ z-index: var(--tl-layer-overlays-selection-fg);
411
416
  }
412
417
 
413
418
  .tl-user-indicator__hint {
414
- z-index: var(--layer-overlays-user-indicator-hint);
419
+ z-index: var(--tl-layer-overlays-user-indicator-hint);
415
420
  stroke-width: calc(2.5px * var(--tl-scale));
416
421
  }
417
422
 
418
423
  .tl-custom-overlays {
419
- z-index: var(--layer-overlays-custom);
424
+ z-index: var(--tl-layer-overlays-custom);
420
425
  }
421
426
 
422
427
  /* behind collaborator cursor */
423
428
  .tl-collaborator__cursor-hint {
424
- z-index: var(--layer-overlays-collaborator-cursor-hint);
429
+ z-index: var(--tl-layer-overlays-collaborator-cursor-hint);
425
430
  }
426
431
 
427
432
  .tl-collaborator__cursor {
428
- z-index: var(--layer-overlays-collaborator-cursor);
433
+ z-index: var(--tl-layer-overlays-collaborator-cursor);
429
434
  }
430
435
 
431
436
  .tl-cursor {
@@ -446,32 +451,32 @@ input,
446
451
  .tl-selection__fg__outline {
447
452
  fill: none;
448
453
  pointer-events: none;
449
- stroke: var(--color-selection-stroke);
454
+ stroke: var(--tl-color-selection-stroke);
450
455
  stroke-width: calc(1.5px * var(--tl-scale));
451
456
  }
452
457
 
453
458
  .tl-corner-handle {
454
459
  pointer-events: none;
455
- stroke: var(--color-selection-stroke);
456
- fill: var(--color-background);
460
+ stroke: var(--tl-color-selection-stroke);
461
+ fill: var(--tl-color-background);
457
462
  stroke-width: calc(1.5px * var(--tl-scale));
458
463
  }
459
464
 
460
465
  .tl-text-handle {
461
466
  pointer-events: none;
462
- fill: var(--color-selection-stroke);
467
+ fill: var(--tl-color-selection-stroke);
463
468
  }
464
469
 
465
470
  .tl-corner-crop-handle {
466
471
  pointer-events: none;
467
472
  fill: none;
468
- stroke: var(--color-selection-stroke);
473
+ stroke: var(--tl-color-selection-stroke);
469
474
  }
470
475
 
471
476
  .tl-corner-crop-edge-handle {
472
477
  pointer-events: none;
473
478
  fill: none;
474
- stroke: var(--color-selection-stroke);
479
+ stroke: var(--tl-color-selection-stroke);
475
480
  }
476
481
 
477
482
  .tl-mobile-rotate__bg {
@@ -481,8 +486,8 @@ input,
481
486
 
482
487
  .tl-mobile-rotate__fg {
483
488
  pointer-events: none;
484
- stroke: var(--color-selection-stroke);
485
- fill: var(--color-background);
489
+ stroke: var(--tl-color-selection-stroke);
490
+ fill: var(--tl-color-background);
486
491
  stroke-width: calc(1.5px * var(--tl-scale));
487
492
  }
488
493
 
@@ -512,8 +517,8 @@ input,
512
517
  text-overflow: ellipsis;
513
518
  font-size: 12px;
514
519
  font-family: var(--font-body);
515
- border-radius: var(--radius-2);
516
- color: var(--color-selected-contrast);
520
+ border-radius: var(--tl-radius-2);
521
+ color: var(--tl-color-selected-contrast);
517
522
  }
518
523
 
519
524
  .tl-nametag-title {
@@ -531,7 +536,7 @@ input,
531
536
  font-size: 12px;
532
537
  font-family: var(--font-body);
533
538
  text-shadow: var(--tl-text-outline);
534
- color: var(--color-selected-contrast);
539
+ color: var(--tl-color-selected-contrast);
535
540
  }
536
541
 
537
542
  .tl-nametag-chat {
@@ -540,31 +545,31 @@ input,
540
545
  left: 13px;
541
546
  width: fit-content;
542
547
  height: fit-content;
543
- color: var(--color-selected-contrast);
548
+ color: var(--tl-color-selected-contrast);
544
549
  white-space: nowrap;
545
550
  position: absolute;
546
551
  padding: 3px 6px;
547
552
  font-size: 12px;
548
553
  font-family: var(--font-body);
549
554
  opacity: 1;
550
- border-radius: var(--radius-2);
555
+ border-radius: var(--tl-radius-2);
551
556
  }
552
557
 
553
558
  .tl-cursor-chat {
554
559
  position: absolute;
555
- color: var(--color-selected-contrast);
560
+ color: var(--tl-color-selected-contrast);
556
561
  white-space: nowrap;
557
562
  padding: 3px 6px;
558
563
  font-size: 12px;
559
564
  font-family: var(--font-body);
560
565
  pointer-events: none;
561
- z-index: var(--layer-cursor);
566
+ z-index: var(--tl-layer-cursor);
562
567
  margin-top: 16px;
563
568
  margin-left: 13px;
564
569
  opacity: 1;
565
570
  border: none;
566
571
  user-select: text;
567
- border-radius: var(--radius-2);
572
+ border-radius: var(--tl-radius-2);
568
573
  }
569
574
 
570
575
  .tl-cursor-chat .tl-cursor-chat__bubble {
@@ -572,13 +577,13 @@ input,
572
577
  }
573
578
 
574
579
  .tl-cursor-chat::selection {
575
- background: var(--color-selected);
576
- color: var(--color-selected-contrast);
580
+ background: var(--tl-color-selected);
581
+ color: var(--tl-color-selected-contrast);
577
582
  text-shadow: none;
578
583
  }
579
584
 
580
585
  .tl-cursor-chat::placeholder {
581
- color: var(--color-selected-contrast);
586
+ color: var(--tl-color-selected-contrast);
582
587
  opacity: 0.7;
583
588
  }
584
589
 
@@ -649,7 +654,7 @@ input,
649
654
  background: none;
650
655
  border-image: none;
651
656
  border: 0px;
652
- caret-color: var(--color-text);
657
+ caret-color: var(--tl-color-text);
653
658
  color: inherit;
654
659
  column-count: initial !important;
655
660
  display: inline-block;
@@ -681,7 +686,7 @@ input,
681
686
 
682
687
  .tl-text-measure {
683
688
  position: absolute;
684
- z-index: var(--layer-canvas-hidden);
689
+ z-index: var(--tl-layer-canvas-hidden);
685
690
  top: 0px;
686
691
  left: 0px;
687
692
  opacity: 0;
@@ -744,8 +749,8 @@ input,
744
749
  }
745
750
 
746
751
  .tl-text-input::selection {
747
- background: var(--color-selected);
748
- color: var(--color-selected-contrast);
752
+ background: var(--tl-color-selected);
753
+ color: var(--tl-color-selected-contrast);
749
754
  text-shadow: none;
750
755
  }
751
756
 
@@ -755,7 +760,7 @@ input,
755
760
  display: flex;
756
761
  justify-content: center;
757
762
  align-items: center;
758
- color: var(--color-text);
763
+ color: var(--tl-color-text);
759
764
  text-shadow: var(--tl-text-outline);
760
765
  line-height: inherit;
761
766
  position: absolute;
@@ -778,8 +783,7 @@ input,
778
783
  position: static;
779
784
  }
780
785
 
781
- .tl-text-wrapper[data-isediting='false'] .tl-text-input,
782
- .tl-arrow-label[data-isediting='false'] .tl-text-input {
786
+ .tl-text-wrapper[data-isediting='false'] .tl-text-input {
783
787
  opacity: 0;
784
788
  cursor: var(--tl-cursor-default);
785
789
  }
@@ -800,7 +804,7 @@ input,
800
804
 
801
805
  .tl-text-wrapper .tl-text-content {
802
806
  pointer-events: all;
803
- z-index: var(--layer-text-content);
807
+ z-index: var(--tl-layer-text-content);
804
808
  }
805
809
 
806
810
  .tl-text-label__inner > .tl-text-content {
@@ -810,7 +814,7 @@ input,
810
814
  padding: inherit;
811
815
  height: fit-content;
812
816
  width: fit-content;
813
- border-radius: var(--radius-1);
817
+ border-radius: var(--tl-radius-1);
814
818
  max-width: 100%;
815
819
  }
816
820
 
@@ -823,7 +827,7 @@ input,
823
827
  }
824
828
 
825
829
  .tl-text-wrapper[data-isselected='true'] .tl-text-input {
826
- z-index: var(--layer-text-editor);
830
+ z-index: var(--tl-layer-text-editor);
827
831
  pointer-events: all;
828
832
  }
829
833
 
@@ -918,7 +922,7 @@ input,
918
922
  }
919
923
 
920
924
  .tl-rich-text a {
921
- color: var(--color-primary);
925
+ color: var(--tl-color-primary);
922
926
  text-decoration: underline;
923
927
  }
924
928
 
@@ -941,14 +945,14 @@ input,
941
945
  }
942
946
 
943
947
  .tl-theme__dark .tl-rich-text mark {
944
- background-color: var(--color-text-highlight);
948
+ background-color: var(--tl-color-text-highlight);
945
949
  color: currentColor;
946
950
  }
947
951
 
948
952
  @supports (color: color(display-p3 1 1 1)) {
949
953
  @media (color-gamut: p3) {
950
954
  .tl-container:not(.tl-theme__force-sRGB) .tl-rich-text mark {
951
- background-color: var(--color-text-highlight-p3);
955
+ background-color: var(--tl-color-text-highlight-p3);
952
956
  }
953
957
  }
954
958
  }
@@ -960,15 +964,15 @@ input,
960
964
  /* --------------------- Loading -------------------- */
961
965
 
962
966
  .tl-loading {
963
- background-color: var(--color-background);
964
- color: var(--color-text-1);
967
+ background-color: var(--tl-color-background);
968
+ color: var(--tl-color-text-1);
965
969
  height: 100%;
966
970
  width: 100%;
967
971
  display: flex;
968
972
  flex-direction: column;
969
973
  justify-content: center;
970
974
  align-items: center;
971
- gap: var(--space-2);
975
+ gap: var(--tl-space-2);
972
976
  font-size: 14px;
973
977
  font-weight: 500;
974
978
  opacity: 0;
@@ -976,7 +980,7 @@ input,
976
980
  animation-delay: 0.2s;
977
981
  position: absolute;
978
982
  inset: 0px;
979
- z-index: var(--layer-canvas-blocker);
983
+ z-index: var(--tl-layer-canvas-blocker);
980
984
  }
981
985
 
982
986
  @keyframes tl-fade-in {
@@ -1009,8 +1013,8 @@ input,
1009
1013
  }
1010
1014
 
1011
1015
  .tl-brush__default {
1012
- stroke: var(--color-brush-stroke);
1013
- fill: var(--color-brush-fill);
1016
+ stroke: var(--tl-color-brush-stroke);
1017
+ fill: var(--tl-color-brush-fill);
1014
1018
  }
1015
1019
 
1016
1020
  /* -------------------- Scribble -------------------- */
@@ -1025,13 +1029,13 @@ input,
1025
1029
  /* ---------------------- Snaps --------------------- */
1026
1030
 
1027
1031
  .tl-snap-indicator {
1028
- stroke: var(--color-snap);
1032
+ stroke: var(--tl-color-snap);
1029
1033
  stroke-width: calc(1px * var(--tl-scale));
1030
1034
  fill: none;
1031
1035
  }
1032
1036
 
1033
1037
  .tl-snap-point {
1034
- stroke: var(--color-snap);
1038
+ stroke: var(--tl-color-snap);
1035
1039
  stroke-width: calc(1px * var(--tl-scale));
1036
1040
  fill: none;
1037
1041
  }
@@ -1051,7 +1055,7 @@ input,
1051
1055
  justify-content: center;
1052
1056
  font-size: 12px;
1053
1057
  font-weight: 400;
1054
- color: var(--color-text-1);
1058
+ color: var(--tl-color-text-1);
1055
1059
  padding: 13px;
1056
1060
  cursor: var(--tl-cursor-pointer);
1057
1061
  border: none;
@@ -1069,13 +1073,13 @@ input,
1069
1073
  display: block;
1070
1074
  width: calc(100% - 12px);
1071
1075
  height: calc(100% - 12px);
1072
- border-radius: var(--radius-1);
1073
- background-color: var(--color-background);
1076
+ border-radius: var(--tl-radius-1);
1077
+ background-color: var(--tl-color-background);
1074
1078
  pointer-events: none;
1075
1079
  }
1076
1080
 
1077
1081
  .tl-hyperlink-button:focus-visible {
1078
- color: var(--color-selected);
1082
+ color: var(--tl-color-selected);
1079
1083
  }
1080
1084
 
1081
1085
  .tl-hyperlink__icon {
@@ -1102,8 +1106,8 @@ input,
1102
1106
  }
1103
1107
 
1104
1108
  .tl-handle__fg {
1105
- fill: var(--color-selected-contrast);
1106
- stroke: var(--color-selection-stroke);
1109
+ fill: var(--tl-color-selected-contrast);
1110
+ stroke: var(--tl-color-selection-stroke);
1107
1111
  stroke-width: calc(1.5px * var(--tl-scale));
1108
1112
  pointer-events: none;
1109
1113
  }
@@ -1113,7 +1117,7 @@ input,
1113
1117
  }
1114
1118
 
1115
1119
  .tl-handle__clone > .tl-handle__fg {
1116
- fill: var(--color-selection-stroke);
1120
+ fill: var(--tl-color-selection-stroke);
1117
1121
  stroke: none;
1118
1122
  }
1119
1123
 
@@ -1123,7 +1127,7 @@ input,
1123
1127
 
1124
1128
  @media (pointer: coarse) {
1125
1129
  .tl-handle__bg:active {
1126
- fill: var(--color-selection-fill);
1130
+ fill: var(--tl-color-selection-fill);
1127
1131
  }
1128
1132
 
1129
1133
  .tl-handle__create {
@@ -1179,20 +1183,20 @@ input,
1179
1183
  stroke-linejoin: round;
1180
1184
  /* content-visibility: auto; */
1181
1185
  transform-origin: top left;
1182
- color: var(--color-text-1);
1186
+ color: var(--tl-color-text-1);
1183
1187
  }
1184
1188
 
1185
1189
  /* -------------------- Group shape ------------------ */
1186
1190
 
1187
1191
  .tl-group {
1188
- stroke: var(--color-text);
1192
+ stroke: var(--tl-color-text);
1189
1193
  stroke-width: calc(1px * var(--tl-scale));
1190
1194
  opacity: 0.5;
1191
1195
  }
1192
1196
 
1193
1197
  /* --------------------- Arrow shape -------------------- */
1194
1198
 
1195
- .tl-arrow-label {
1199
+ .tl-shape[data-shape-type='arrow'] .tl-text-label {
1196
1200
  position: absolute;
1197
1201
  top: -1px;
1198
1202
  left: -1px;
@@ -1203,56 +1207,38 @@ input,
1203
1207
  justify-content: center;
1204
1208
  align-items: center;
1205
1209
  text-align: center;
1206
- color: var(--color-text);
1210
+ color: var(--tl-color-text);
1207
1211
  text-shadow: var(--tl-text-outline);
1208
1212
  }
1209
1213
 
1210
- .tl-arrow-label[data-isediting='true'] p {
1211
- opacity: 0;
1212
- }
1213
-
1214
- .tl-arrow-label__inner {
1215
- border-radius: var(--radius-1);
1214
+ .tl-shape[data-shape-type='arrow'] .tl-text-label__inner {
1215
+ border-radius: var(--tl-radius-1);
1216
1216
  box-sizing: content-box;
1217
- position: relative;
1218
1217
  height: max-content;
1219
1218
  width: max-content;
1220
- pointer-events: none;
1221
- display: flex;
1222
- justify-content: center;
1223
- align-items: center;
1224
1219
  }
1225
1220
 
1226
- .tl-arrow-label .tl-arrow {
1227
- position: relative;
1221
+ .tl-shape[data-shape-type='arrow'] .tl-text {
1228
1222
  height: max-content;
1229
- padding: inherit;
1230
- overflow: visible;
1231
- }
1232
-
1233
- .tl-arrow-label textarea {
1234
- padding: inherit;
1235
- /* Don't allow textarea to be zero width */
1236
- min-width: 4px;
1237
1223
  }
1238
1224
 
1239
1225
  .tl-arrow-hint {
1240
- stroke: var(--color-text-1);
1226
+ stroke: var(--tl-color-text-1);
1241
1227
  fill: none;
1242
1228
  stroke-linecap: round;
1243
1229
  overflow: visible;
1244
1230
  }
1245
1231
 
1246
1232
  .tl-arrow-hint-handle {
1247
- fill: var(--color-selected-contrast);
1248
- stroke: var(--color-selection-stroke);
1233
+ fill: var(--tl-color-selected-contrast);
1234
+ stroke: var(--tl-color-selection-stroke);
1249
1235
  stroke-width: calc(1.5px * var(--tl-scale));
1250
1236
  r: calc(4px * var(--tl-scale));
1251
1237
  }
1252
1238
 
1253
1239
  .tl-arrow-hint-snap {
1254
1240
  stroke: transparent;
1255
- fill: var(--color-selection-fill);
1241
+ fill: var(--tl-color-selection-fill);
1256
1242
  r: calc(12px * var(--tl-scale));
1257
1243
  }
1258
1244
 
@@ -1272,40 +1258,40 @@ input,
1272
1258
  width: 100%;
1273
1259
  height: 100%;
1274
1260
  position: relative;
1275
- border: 1px solid var(--color-panel-contrast);
1276
- background-color: var(--color-panel);
1277
- border-radius: var(--radius-2);
1261
+ border: 1px solid var(--tl-color-panel-contrast);
1262
+ background-color: var(--tl-color-panel);
1263
+ border-radius: var(--tl-radius-2);
1278
1264
  display: flex;
1279
1265
  flex-direction: column;
1280
1266
  overflow: hidden;
1281
1267
  }
1282
1268
 
1283
1269
  .tl-bookmark__container--safariExport {
1284
- border: 1px solid var(--color-divider);
1270
+ border: 1px solid var(--tl-color-divider);
1285
1271
  }
1286
1272
 
1287
1273
  .tl-bookmark__image_container {
1288
1274
  flex: 1 1 100%;
1289
1275
  overflow: hidden;
1290
- border-top-left-radius: var(--radius-1);
1291
- border-top-right-radius: var(--radius-1);
1276
+ border-top-left-radius: var(--tl-radius-1);
1277
+ border-top-right-radius: var(--tl-radius-1);
1292
1278
  width: 100%;
1293
1279
  height: 100%;
1294
1280
  display: flex;
1295
1281
  justify-content: flex-end;
1296
1282
  align-items: flex-start;
1297
- box-shadow: inset 0px 0px 0px 1px var(--color-divider);
1283
+ box-shadow: inset 0px 0px 0px 1px var(--tl-color-divider);
1298
1284
  }
1299
1285
 
1300
1286
  .tl-bookmark__image_container > .tl-hyperlink-button::after {
1301
- background-color: var(--color-panel);
1287
+ background-color: var(--tl-color-panel);
1302
1288
  }
1303
1289
 
1304
1290
  .tl-bookmark__placeholder {
1305
1291
  width: 100%;
1306
1292
  height: 100%;
1307
- background-color: var(--color-muted-2);
1308
- border-bottom: 1px solid var(--color-muted-2);
1293
+ background-color: var(--tl-color-muted-2);
1294
+ border-bottom: 1px solid var(--tl-color-muted-2);
1309
1295
  }
1310
1296
 
1311
1297
  .tl-bookmark__image {
@@ -1313,12 +1299,12 @@ input,
1313
1299
  height: 100%;
1314
1300
  object-fit: cover;
1315
1301
  object-position: center;
1316
- border-bottom: 1px solid var(--color-muted-2);
1302
+ border-bottom: 1px solid var(--tl-color-muted-2);
1317
1303
  }
1318
1304
 
1319
1305
  .tl-bookmark__copy_container {
1320
- background-color: var(--color-muted-0);
1321
- padding: var(--space-4);
1306
+ background-color: var(--tl-color-muted-0);
1307
+ padding: var(--tl-space-4);
1322
1308
  pointer-events: all;
1323
1309
  display: flex;
1324
1310
  flex-direction: column;
@@ -1338,7 +1324,7 @@ input,
1338
1324
  font-size: 16px;
1339
1325
  line-height: 1.6;
1340
1326
  font-weight: bold;
1341
- padding-bottom: var(--space-2);
1327
+ padding-bottom: var(--tl-space-2);
1342
1328
  overflow: hidden;
1343
1329
  max-height: calc((16px * 1.6) * 2);
1344
1330
  -webkit-box-orient: vertical;
@@ -1358,19 +1344,19 @@ input,
1358
1344
  line-clamp: 3;
1359
1345
  text-overflow: ellipsis;
1360
1346
  display: -webkit-box;
1361
- color: var(--color-text-2);
1362
- margin: var(--space-2) 0px;
1347
+ color: var(--tl-color-text-2);
1348
+ margin: var(--tl-space-2) 0px;
1363
1349
  }
1364
1350
 
1365
1351
  .tl-bookmark__heading + .tl-bookmark__link,
1366
1352
  .tl-bookmark__description + .tl-bookmark__link {
1367
- margin-top: var(--space-3);
1353
+ margin-top: var(--tl-space-3);
1368
1354
  }
1369
1355
  .tl-bookmark__link {
1370
1356
  font-size: 12px;
1371
1357
  pointer-events: all;
1372
1358
  display: flex;
1373
- color: var(--color-text-2);
1359
+ color: var(--tl-color-text-2);
1374
1360
  align-items: center;
1375
1361
  cursor: var(--tl-cursor-pointer);
1376
1362
  width: fit-content;
@@ -1412,7 +1398,7 @@ input,
1412
1398
  width: 100%;
1413
1399
  height: 100%;
1414
1400
  pointer-events: all;
1415
- /* background-color: var(--color-background); */
1401
+ /* background-color: var(--tl-color-background); */
1416
1402
 
1417
1403
  display: flex;
1418
1404
  justify-content: center;
@@ -1441,7 +1427,7 @@ input,
1441
1427
  height: 100%;
1442
1428
  pointer-events: all;
1443
1429
  opacity: 1;
1444
- z-index: var(--layer-text-container);
1430
+ z-index: var(--tl-layer-text-container);
1445
1431
  border-radius: 1px;
1446
1432
  }
1447
1433
 
@@ -1457,22 +1443,22 @@ input,
1457
1443
  }
1458
1444
 
1459
1445
  .tl-frame__creating {
1460
- stroke: var(--color-selected);
1446
+ stroke: var(--tl-color-selected);
1461
1447
  fill: none;
1462
1448
  }
1463
1449
 
1464
1450
  .tl-frame-heading {
1465
- --frame-padding-x: 6px;
1466
- --frame-height: 24px;
1467
- --frame-minimum-width: 32px;
1468
- --frame-offset-width: 16px;
1451
+ --tl-frame-padding-x: 6px;
1452
+ --tl-frame-height: 24px;
1453
+ --tl-frame-minimum-width: 32px;
1454
+ --tl-frame-offset-width: 16px;
1469
1455
  display: flex;
1470
1456
  align-items: center;
1471
1457
  position: absolute;
1472
1458
  transform-origin: 0% 100%;
1473
1459
  overflow: hidden;
1474
1460
  max-width: 100%;
1475
- min-width: var(--frame-minimum-width);
1461
+ min-width: var(--tl-frame-minimum-width);
1476
1462
  height: auto;
1477
1463
  font-size: 12px;
1478
1464
  padding-bottom: 4px;
@@ -1484,18 +1470,18 @@ input,
1484
1470
  /* scale from bottom left corner so we can pin it to the top left corner of the frame */
1485
1471
  transform-origin: 0% 100%;
1486
1472
  display: flex;
1487
- height: var(--frame-height);
1473
+ height: var(--tl-frame-height);
1488
1474
  width: 100%;
1489
1475
  align-items: center;
1490
- border-radius: var(--radius-1);
1476
+ border-radius: var(--tl-radius-1);
1491
1477
  }
1492
1478
 
1493
1479
  .tl-frame-label {
1494
1480
  pointer-events: all;
1495
1481
  overflow: hidden;
1496
1482
  text-overflow: ellipsis;
1497
- padding: 0px var(--frame-padding-x);
1498
- border-radius: var(--radius-1);
1483
+ padding: 0px var(--tl-frame-padding-x);
1484
+ border-radius: var(--tl-radius-1);
1499
1485
  position: relative;
1500
1486
  font-size: inherit;
1501
1487
  white-space: pre;
@@ -1505,12 +1491,12 @@ input,
1505
1491
  color: transparent;
1506
1492
  white-space: pre;
1507
1493
  width: auto;
1508
- min-width: var(--frame-minimum-width);
1494
+ min-width: var(--tl-frame-minimum-width);
1509
1495
  height: 100%;
1510
1496
  overflow: visible;
1511
- background-color: var(--color-panel);
1512
- border-color: var(--color-selected);
1513
- box-shadow: inset 0px 0px 0px 1.5px var(--color-selected);
1497
+ background-color: var(--tl-color-panel);
1498
+ border-color: var(--tl-color-selected);
1499
+ box-shadow: inset 0px 0px 0px 1.5px var(--tl-color-selected);
1514
1500
  }
1515
1501
 
1516
1502
  .tl-frame-name-input {
@@ -1518,7 +1504,7 @@ input,
1518
1504
  border: none;
1519
1505
  background: none;
1520
1506
  outline: none;
1521
- padding: 0px var(--frame-padding-x);
1507
+ padding: 0px var(--tl-frame-padding-x);
1522
1508
  inset: 0px;
1523
1509
  height: 100%;
1524
1510
  width: 100%;
@@ -1526,8 +1512,8 @@ input,
1526
1512
  font-family: inherit;
1527
1513
  font-weight: inherit;
1528
1514
  width: 100%;
1529
- color: var(--color-text-1);
1530
- border-radius: var(--radius-1);
1515
+ color: var(--tl-color-text-1);
1516
+ border-radius: var(--tl-radius-1);
1531
1517
  user-select: all;
1532
1518
  -webkit-user-select: text;
1533
1519
  white-space: pre;
@@ -1547,7 +1533,7 @@ input,
1547
1533
 
1548
1534
  .tl-embed {
1549
1535
  border: none;
1550
- border-radius: var(--radius-2);
1536
+ border-radius: var(--tl-radius-2);
1551
1537
  }
1552
1538
 
1553
1539
  /* -------------- Shape error boundary -------------- */
@@ -1555,11 +1541,11 @@ input,
1555
1541
  .tl-shape-error-boundary {
1556
1542
  width: 100%;
1557
1543
  height: 100%;
1558
- background-color: var(--color-muted-1);
1544
+ background-color: var(--tl-color-muted-1);
1559
1545
  border-width: calc(1px * var(--tl-scale));
1560
- border-color: var(--color-muted-1);
1546
+ border-color: var(--tl-color-muted-1);
1561
1547
  border-style: solid;
1562
- border-radius: calc(var(--radius-1) * var(--tl-scale));
1548
+ border-radius: calc(var(--tl-radius-1) * var(--tl-scale));
1563
1549
  display: flex;
1564
1550
  flex-direction: column;
1565
1551
  align-items: center;
@@ -1568,7 +1554,7 @@ input,
1568
1554
  position: relative;
1569
1555
  pointer-events: all;
1570
1556
  overflow: hidden;
1571
- padding: var(--space-2);
1557
+ padding: var(--tl-space-2);
1572
1558
  }
1573
1559
 
1574
1560
  .tl-shape-error-boundary::before {
@@ -1576,7 +1562,7 @@ input,
1576
1562
  content: 'Error';
1577
1563
  font-size: 12px;
1578
1564
  font-family: inherit;
1579
- color: var(--color-text-0);
1565
+ color: var(--tl-color-text-0);
1580
1566
  }
1581
1567
 
1582
1568
  /* ----------------- Error boundary ----------------- */
@@ -1587,9 +1573,9 @@ input,
1587
1573
  display: flex;
1588
1574
  align-items: center;
1589
1575
  justify-content: center;
1590
- padding: var(--space-4);
1591
- background-color: var(--color-background);
1592
- color: var(--color-text-1);
1576
+ padding: var(--tl-space-4);
1577
+ background-color: var(--tl-color-background);
1578
+ color: var(--tl-color-text-1);
1593
1579
  position: absolute;
1594
1580
  }
1595
1581
 
@@ -1598,8 +1584,8 @@ input,
1598
1584
  inset: 0px;
1599
1585
  height: 100%;
1600
1586
  width: 100%;
1601
- z-index: var(--layer-error-overlay);
1602
- background-color: var(--color-overlay);
1587
+ z-index: var(--tl-layer-error-overlay);
1588
+ background-color: var(--tl-color-overlay);
1603
1589
  }
1604
1590
 
1605
1591
  .tl-error-boundary__content * {
@@ -1614,7 +1600,7 @@ input,
1614
1600
  inset: 0px;
1615
1601
  height: 100%;
1616
1602
  width: 100%;
1617
- z-index: var(--layer-error-canvas);
1603
+ z-index: var(--tl-layer-error-canvas);
1618
1604
  }
1619
1605
 
1620
1606
  /* some browsers seem to have some weird interactions between stacking contexts
@@ -1627,7 +1613,7 @@ it from receiving any pointer events or affecting the cursor. */
1627
1613
  inset: 0px;
1628
1614
  height: 100%;
1629
1615
  width: 100%;
1630
- z-index: var(--layer-error-canvas-after);
1616
+ z-index: var(--tl-layer-error-canvas-after);
1631
1617
  pointer-events: all;
1632
1618
  }
1633
1619
 
@@ -1637,16 +1623,16 @@ it from receiving any pointer events or affecting the cursor. */
1637
1623
  max-width: 100%;
1638
1624
  width: 400px;
1639
1625
  max-height: 100%;
1640
- background-color: var(--color-panel);
1626
+ background-color: var(--tl-color-panel);
1641
1627
  padding: 16px;
1642
1628
  border-radius: 16px;
1643
- box-shadow: var(--shadow-2);
1629
+ box-shadow: var(--tl-shadow-2);
1644
1630
  font-size: 14px;
1645
1631
  font-weight: 400;
1646
1632
  display: flex;
1647
1633
  flex-direction: column;
1648
1634
  overflow: auto;
1649
- z-index: var(--layer-error-content);
1635
+ z-index: var(--tl-layer-error-content);
1650
1636
  gap: 12px;
1651
1637
  }
1652
1638
 
@@ -1661,10 +1647,10 @@ it from receiving any pointer events or affecting the cursor. */
1661
1647
  }
1662
1648
 
1663
1649
  .tl-error-boundary__content h4 {
1664
- border: 1px solid var(--color-low-border);
1650
+ border: 1px solid var(--tl-color-low-border);
1665
1651
  margin: -6px 0 0 0;
1666
- padding: var(--space-5);
1667
- border-radius: var(--radius-2);
1652
+ padding: var(--tl-space-5);
1653
+ border-radius: var(--tl-radius-2);
1668
1654
  font-weight: normal;
1669
1655
  }
1670
1656
 
@@ -1674,10 +1660,10 @@ it from receiving any pointer events or affecting the cursor. */
1674
1660
  }
1675
1661
 
1676
1662
  .tl-error-boundary__content pre {
1677
- background-color: var(--color-muted-2);
1663
+ background-color: var(--tl-color-muted-2);
1678
1664
  margin-top: 0;
1679
- padding: var(--space-5);
1680
- border-radius: var(--radius-2);
1665
+ padding: var(--tl-space-5);
1666
+ border-radius: var(--tl-radius-2);
1681
1667
  overflow: auto;
1682
1668
  font-size: 12px;
1683
1669
  max-height: 320px;
@@ -1689,15 +1675,15 @@ it from receiving any pointer events or affecting the cursor. */
1689
1675
  font-family: inherit;
1690
1676
  font-size: 14px;
1691
1677
  font-weight: 500;
1692
- padding: var(--space-4);
1693
- border-radius: var(--radius-3);
1678
+ padding: var(--tl-space-4);
1679
+ border-radius: var(--tl-radius-3);
1694
1680
  cursor: var(--tl-cursor-pointer);
1695
1681
  color: inherit;
1696
1682
  background-color: transparent;
1697
1683
  }
1698
1684
 
1699
1685
  .tl-error-boundary__content a {
1700
- color: var(--color-selected);
1686
+ color: var(--tl-color-selected);
1701
1687
  font-weight: 500;
1702
1688
  text-decoration: none;
1703
1689
  }
@@ -1709,31 +1695,31 @@ it from receiving any pointer events or affecting the cursor. */
1709
1695
 
1710
1696
  .tl-error-boundary__content__error button {
1711
1697
  position: absolute;
1712
- top: var(--space-2);
1713
- right: var(--space-2);
1698
+ top: var(--tl-space-2);
1699
+ right: var(--tl-space-2);
1714
1700
  font-size: 12px;
1715
- padding: var(--space-2) var(--space-3);
1716
- background-color: var(--color-panel);
1717
- border-radius: var(--radius-1);
1701
+ padding: var(--tl-space-2) var(--tl-space-3);
1702
+ background-color: var(--tl-color-panel);
1703
+ border-radius: var(--tl-radius-1);
1718
1704
  }
1719
1705
 
1720
1706
  .tl-error-boundary__content__actions {
1721
1707
  display: flex;
1722
1708
  justify-content: space-between;
1723
- gap: var(--space-4);
1709
+ gap: var(--tl-space-4);
1724
1710
  margin: 0px;
1725
1711
  margin-left: -4px;
1726
1712
  }
1727
1713
  .tl-error-boundary__content__actions__group {
1728
1714
  display: flex;
1729
- gap: var(--space-4);
1715
+ gap: var(--tl-space-4);
1730
1716
  }
1731
1717
  .tl-error-boundary__content .tl-error-boundary__reset {
1732
- color: var(--color-danger);
1718
+ color: var(--tl-color-danger);
1733
1719
  }
1734
1720
  .tl-error-boundary__content .tl-error-boundary__refresh {
1735
- background-color: var(--color-primary);
1736
- color: var(--color-selected-contrast);
1721
+ background-color: var(--tl-color-primary);
1722
+ color: var(--tl-color-selected-contrast);
1737
1723
  }
1738
1724
  .tl-container__focused:not(.tl-container__no-focus-ring)
1739
1725
  .tlui-button.tl-error-boundary__refresh:focus-visible {
@@ -1745,7 +1731,7 @@ it from receiving any pointer events or affecting the cursor. */
1745
1731
 
1746
1732
  .tl-hit-test-blocker {
1747
1733
  position: absolute;
1748
- z-index: var(--layer-canvas-blocker);
1734
+ z-index: var(--tl-layer-canvas-blocker);
1749
1735
  inset: 0px;
1750
1736
  width: 100%;
1751
1737
  height: 100%;
@@ -1765,32 +1751,32 @@ it from receiving any pointer events or affecting the cursor. */
1765
1751
 
1766
1752
  .tl-handle__bg:hover {
1767
1753
  cursor: var(--tl-cursor-grab);
1768
- fill: var(--color-selection-fill);
1754
+ fill: var(--tl-color-selection-fill);
1769
1755
  }
1770
1756
 
1771
1757
  .tl-bookmark__link:hover {
1772
- color: var(--color-selected);
1758
+ color: var(--tl-color-selected);
1773
1759
  }
1774
1760
 
1775
1761
  .tl-hyperlink-button:hover {
1776
- color: var(--color-selected);
1762
+ color: var(--tl-color-selected);
1777
1763
  }
1778
1764
 
1779
1765
  .tl-error-boundary__content button:hover {
1780
- background-color: var(--color-low);
1766
+ background-color: var(--tl-color-low);
1781
1767
  }
1782
1768
  .tl-error-boundary__content a:hover {
1783
- color: var(--color-text-1);
1769
+ color: var(--tl-color-text-1);
1784
1770
  }
1785
1771
  .tl-error-boundary__content .tl-error-boundary__refresh:hover {
1786
- background-color: var(--color-primary);
1772
+ background-color: var(--tl-color-primary);
1787
1773
  opacity: 0.9;
1788
1774
  }
1789
1775
 
1790
1776
  /* These three rules help preserve clicking into specific points in text areas *while*
1791
1777
  * already in edit mode when jumping from shape to shape. */
1792
1778
  .tl-canvas[data-iseditinganything='true'] .tl-text-wrapper:hover .tl-text-input {
1793
- z-index: var(--layer-text-editor);
1779
+ z-index: var(--tl-layer-text-editor);
1794
1780
  pointer-events: all;
1795
1781
  }
1796
1782
  }
@@ -1798,15 +1784,15 @@ it from receiving any pointer events or affecting the cursor. */
1798
1784
  /* @tldraw/ui */
1799
1785
 
1800
1786
  .tl-container {
1801
- --layer-above: 1;
1802
- --layer-focused-input: 10;
1803
- --layer-menu-click-capture: 250;
1804
- --layer-panels: 300;
1805
- --layer-menus: 400;
1806
- --layer-toasts: 650;
1807
- --layer-cursor: 700;
1808
- --layer-header-footer: 999;
1809
- --layer-following-indicator: 1000;
1787
+ --tl-layer-above: 1;
1788
+ --tl-layer-focused-input: 10;
1789
+ --tl-layer-menu-click-capture: 250;
1790
+ --tl-layer-panels: 300;
1791
+ --tl-layer-menus: 400;
1792
+ --tl-layer-toasts: 650;
1793
+ --tl-layer-cursor: 700;
1794
+ --tl-layer-header-footer: 999;
1795
+ --tl-layer-following-indicator: 1000;
1810
1796
  }
1811
1797
 
1812
1798
  /* Button */
@@ -1830,23 +1816,23 @@ it from receiving any pointer events or affecting the cursor. */
1830
1816
  text-rendering: optimizeLegibility;
1831
1817
  font-size: 12px;
1832
1818
  gap: 0px;
1833
- color: var(--color-text-1);
1819
+ color: var(--tl-color-text-1);
1834
1820
  z-index: 0;
1835
1821
  }
1836
1822
 
1837
1823
  .tlui-button:disabled {
1838
- color: var(--color-text-3);
1824
+ color: var(--tl-color-text-3);
1839
1825
  text-shadow: none;
1840
1826
  cursor: default;
1841
1827
  }
1842
1828
 
1843
1829
  .tlui-button:disabled .tlui-kbd {
1844
- color: var(--color-text-3);
1830
+ color: var(--tl-color-text-3);
1845
1831
  }
1846
1832
 
1847
1833
  .tlui-button > * {
1848
1834
  position: relative;
1849
- z-index: var(--layer-above);
1835
+ z-index: var(--tl-layer-above);
1850
1836
  }
1851
1837
 
1852
1838
  .tlui-button__label {
@@ -1862,7 +1848,7 @@ it from receiving any pointer events or affecting the cursor. */
1862
1848
  */
1863
1849
  .tl-container__focused:not(.tl-container__no-focus-ring) .tlui-button:focus-visible {
1864
1850
  border-radius: 10px;
1865
- outline: 2px solid var(--color-focus);
1851
+ outline: 2px solid var(--tl-color-focus);
1866
1852
  outline-offset: -5px;
1867
1853
  }
1868
1854
  .tl-container__focused:not(.tl-container__no-focus-ring) .tlui-button__tool:focus-visible {
@@ -1870,7 +1856,7 @@ it from receiving any pointer events or affecting the cursor. */
1870
1856
  }
1871
1857
  .tlui-slider__container:has(.tlui-slider__thumb:focus-visible) {
1872
1858
  border-radius: 10px;
1873
- outline: 2px solid var(--color-focus);
1859
+ outline: 2px solid var(--tl-color-focus);
1874
1860
  outline-offset: -5px;
1875
1861
  }
1876
1862
 
@@ -1879,8 +1865,8 @@ it from receiving any pointer events or affecting the cursor. */
1879
1865
  content: '';
1880
1866
  position: absolute;
1881
1867
  inset: 4px;
1882
- border-radius: var(--radius-2);
1883
- background: var(--color-muted-2);
1868
+ border-radius: var(--tl-radius-2);
1869
+ background: var(--tl-color-muted-2);
1884
1870
  opacity: 0;
1885
1871
  }
1886
1872
 
@@ -1890,18 +1876,18 @@ it from receiving any pointer events or affecting the cursor. */
1890
1876
 
1891
1877
  .tlui-button[data-isactive='true']::after,
1892
1878
  .tlui-button[data-isactive='true']:not(:disabled, :focus-visible):active:after {
1893
- background: var(--color-hint);
1879
+ background: var(--tl-color-hint);
1894
1880
  opacity: 1;
1895
1881
  }
1896
1882
 
1897
- .tlui-button[aria-expanded='true'][data-direction='left']::after {
1898
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
1883
+ .tlui-button[aria-expanded='true'][data-direction='left'] {
1884
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
1899
1885
  opacity: 1;
1900
1886
  }
1901
1887
 
1902
1888
  @media (hover: hover) {
1903
1889
  .tlui-button[aria-expanded='true'][data-direction='left']:not(:hover)::after {
1904
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
1890
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
1905
1891
  opacity: 1;
1906
1892
  }
1907
1893
 
@@ -1915,18 +1901,18 @@ it from receiving any pointer events or affecting the cursor. */
1915
1901
  }
1916
1902
 
1917
1903
  .tlui-button__icon + .tlui-button__label {
1918
- margin-left: var(--space-2);
1904
+ margin-left: var(--tl-space-2);
1919
1905
  }
1920
1906
 
1921
1907
  /* Low button */
1922
1908
 
1923
1909
  .tlui-button__low {
1924
- border-radius: var(--radius-3);
1925
- background-color: var(--color-low);
1910
+ border-radius: var(--tl-radius-3);
1911
+ background-color: var(--tl-color-low);
1926
1912
  }
1927
1913
 
1928
1914
  .tlui-button__low::after {
1929
- background-color: var(--color-muted-2);
1915
+ background-color: var(--tl-color-muted-2);
1930
1916
  opacity: 0;
1931
1917
  }
1932
1918
 
@@ -1939,31 +1925,25 @@ it from receiving any pointer events or affecting the cursor. */
1939
1925
  /* Primary / danger buttons */
1940
1926
 
1941
1927
  .tlui-button__primary {
1942
- color: var(--color-primary);
1928
+ color: var(--tl-color-primary);
1943
1929
  }
1944
1930
 
1945
1931
  .tlui-button__danger {
1946
- color: var(--color-danger);
1932
+ color: var(--tl-color-danger);
1947
1933
  text-shadow: none;
1948
1934
  }
1949
1935
 
1950
1936
  @media (hover: hover) {
1951
1937
  .tlui-button__primary:not(:disabled, :focus-visible):hover {
1952
- color: var(--color-primary);
1938
+ color: var(--tl-color-primary);
1953
1939
  }
1954
1940
 
1955
1941
  .tlui-button__danger:not(:disabled, :focus-visible):hover {
1956
- color: var(--color-danger);
1942
+ color: var(--tl-color-danger);
1957
1943
  text-shadow: none;
1958
1944
  }
1959
1945
  }
1960
1946
 
1961
- /* Panel button */
1962
-
1963
- .tlui-button__panel {
1964
- position: relative;
1965
- }
1966
-
1967
1947
  /* Menu button */
1968
1948
 
1969
1949
  .tlui-button__menu {
@@ -1976,7 +1956,7 @@ it from receiving any pointer events or affecting the cursor. */
1976
1956
 
1977
1957
  .tlui-button__menu::after {
1978
1958
  inset: 4px;
1979
- border-radius: var(--radius-2);
1959
+ border-radius: var(--tl-radius-2);
1980
1960
  }
1981
1961
 
1982
1962
  .tlui-button__menu > .tlui-icon + .tlui-button__label {
@@ -2004,18 +1984,26 @@ it from receiving any pointer events or affecting the cursor. */
2004
1984
 
2005
1985
  /* Tool lock button */
2006
1986
 
2007
- .tlui-toolbar__lock-button {
1987
+ .tlui-main-toolbar__lock-button {
2008
1988
  position: absolute;
2009
- top: 4px;
2010
- right: 0px;
2011
1989
  pointer-events: all;
2012
1990
  height: 40px;
2013
1991
  width: 40px;
1992
+ border-radius: var(--tl-radius-2);
1993
+ }
1994
+
1995
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__lock-button {
1996
+ top: 4px;
1997
+ right: 0px;
2014
1998
  min-width: 0px;
2015
- border-radius: var(--radius-2);
2016
1999
  }
2017
2000
 
2018
- .tlui-toolbar__lock-button::after {
2001
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__lock-button {
2002
+ bottom: 0px;
2003
+ min-height: 0px;
2004
+ }
2005
+
2006
+ .tlui-main-toolbar__lock-button::after {
2019
2007
  top: 4px;
2020
2008
  left: 8px;
2021
2009
  inset: 4px;
@@ -2027,16 +2015,6 @@ it from receiving any pointer events or affecting the cursor. */
2027
2015
  position: relative;
2028
2016
  height: 48px;
2029
2017
  width: 48px;
2030
- margin-left: -2px;
2031
- margin-right: -2px;
2032
- }
2033
-
2034
- .tlui-button__tool:nth-of-type(1) {
2035
- margin-left: 0px;
2036
- }
2037
-
2038
- .tlui-button__tool:nth-last-of-type(1) {
2039
- margin-right: 0px;
2040
2018
  }
2041
2019
 
2042
2020
  .tlui-button__tool::after {
@@ -2045,69 +2023,64 @@ it from receiving any pointer events or affecting the cursor. */
2045
2023
  }
2046
2024
 
2047
2025
  .tlui-button__tool[aria-pressed='true'] {
2048
- color: var(--color-selected-contrast);
2026
+ color: var(--tl-color-selected-contrast);
2049
2027
  }
2050
2028
 
2051
2029
  .tlui-button__tool[aria-pressed='true']:not(:disabled, :focus-visible):active {
2052
- color: var(--color-selected-contrast);
2030
+ color: var(--tl-color-selected-contrast);
2053
2031
  }
2054
2032
 
2055
2033
  .tlui-button__tool[aria-pressed='true']:not(:disabled)::after {
2056
- background: var(--color-selected);
2034
+ background: var(--tl-color-selected);
2057
2035
  opacity: 1;
2058
2036
  }
2059
2037
 
2060
- .tlui-layout__mobile .tlui-button__tool {
2038
+ .tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-button__tool {
2061
2039
  height: 48px;
2062
2040
  width: 43px;
2063
2041
  }
2064
2042
 
2065
- .tlui-layout__mobile .tlui-button__tool > .tlui-icon {
2043
+ .tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-button__tool > .tlui-icon {
2066
2044
  height: 16px;
2067
2045
  width: 16px;
2068
2046
  }
2069
2047
 
2070
- /* Button Row */
2048
+ /* Row layout */
2071
2049
 
2072
- .tlui-buttons__horizontal {
2050
+ .tlui-row {
2073
2051
  display: flex;
2074
2052
  flex-direction: row;
2053
+ padding: 0 2px;
2075
2054
  }
2076
- .tlui-buttons__horizontal > * {
2055
+ .tlui-row > * {
2077
2056
  margin-left: -2px;
2078
2057
  margin-right: -2px;
2079
2058
  }
2080
- .tlui-buttons__horizontal > *:nth-child(1) {
2081
- margin-left: 0px;
2059
+
2060
+ /* Column layout */
2061
+
2062
+ .tlui-column {
2063
+ display: flex;
2064
+ flex-direction: column;
2065
+ padding: 2px 0;
2082
2066
  }
2083
- .tlui-buttons__horizontal > *:nth-last-child(1) {
2084
- margin-right: 0px;
2067
+ .tlui-column > * {
2068
+ margin-top: -2px;
2069
+ margin-bottom: -2px;
2085
2070
  }
2086
2071
 
2087
- /* Button Grid */
2072
+ /* Grid layout */
2088
2073
 
2089
- .tlui-buttons__grid {
2074
+ .tlui-grid {
2090
2075
  display: grid;
2091
- grid-template-columns: repeat(4, auto);
2076
+ grid-template-columns: repeat(4, 1fr);
2092
2077
  grid-auto-flow: row;
2093
2078
  overflow: hidden;
2079
+ padding: 2px;
2094
2080
  }
2095
- .tlui-buttons__grid > .tlui-button {
2081
+ .tlui-grid > * {
2096
2082
  margin: -2px;
2097
2083
  }
2098
- .tlui-buttons__grid > .tlui-button:nth-of-type(4n),
2099
- .tlui-buttons__vertical-align > .tlui-button:nth-of-type(3n) {
2100
- margin-right: 0px;
2101
- }
2102
- .tlui-buttons__grid > .tlui-button:nth-of-type(4n - 3) {
2103
- margin-left: 0px;
2104
- }
2105
- .tlui-buttons__grid > .tlui-button:nth-of-type(-n + 4) {
2106
- margin-top: 0px;
2107
- }
2108
- .tlui-buttons__grid > .tlui-button:nth-last-of-type(-n + 4) {
2109
- margin-bottom: 0px;
2110
- }
2111
2084
 
2112
2085
  /* Zoom button */
2113
2086
 
@@ -2131,9 +2104,9 @@ it from receiving any pointer events or affecting the cursor. */
2131
2104
  pointer-events: none;
2132
2105
  user-select: none;
2133
2106
  contain: strict;
2134
- z-index: var(--layer-panels);
2107
+ z-index: var(--tl-layer-panels);
2135
2108
  transform: translate3d(0, 0, 0);
2136
- --sab: env(safe-area-inset-bottom);
2109
+ --tl-sab: env(safe-area-inset-bottom);
2137
2110
  font-weight: 500;
2138
2111
  line-height: 1.6;
2139
2112
  -webkit-font-smoothing: antialiased;
@@ -2186,11 +2159,11 @@ it from receiving any pointer events or affecting the cursor. */
2186
2159
  justify-content: flex-start;
2187
2160
  align-items: flex-start;
2188
2161
  width: min-content;
2189
- gap: var(--space-3);
2190
- margin: var(--space-2) var(--space-3);
2162
+ gap: var(--tl-space-3);
2163
+ margin: var(--tl-space-2) var(--tl-space-3);
2191
2164
  white-space: nowrap;
2192
2165
  pointer-events: none;
2193
- z-index: var(--layer-panels);
2166
+ z-index: var(--tl-layer-panels);
2194
2167
  }
2195
2168
 
2196
2169
  /* ---------------------- Icon ---------------------- */
@@ -2218,7 +2191,7 @@ it from receiving any pointer events or affecting the cursor. */
2218
2191
 
2219
2192
  .tlui-slider__container {
2220
2193
  width: 100%;
2221
- padding: 0px var(--space-4);
2194
+ padding: 0px var(--tl-space-4);
2222
2195
  }
2223
2196
 
2224
2197
  .tlui-slider {
@@ -2244,7 +2217,7 @@ it from receiving any pointer events or affecting the cursor. */
2244
2217
  content: '';
2245
2218
  height: 3px;
2246
2219
  width: 100%;
2247
- background-color: var(--color-muted-1);
2220
+ background-color: var(--tl-color-muted-1);
2248
2221
  border-radius: 14px;
2249
2222
  }
2250
2223
 
@@ -2253,7 +2226,7 @@ it from receiving any pointer events or affecting the cursor. */
2253
2226
  top: calc(50% - 2px);
2254
2227
  left: 0px;
2255
2228
  height: 3px;
2256
- background-color: var(--color-selected);
2229
+ background-color: var(--tl-color-selected);
2257
2230
  border-radius: 14px;
2258
2231
  }
2259
2232
 
@@ -2265,16 +2238,16 @@ it from receiving any pointer events or affecting the cursor. */
2265
2238
  height: 18px;
2266
2239
  position: relative;
2267
2240
  top: -1px;
2268
- background-color: var(--color-panel);
2241
+ background-color: var(--tl-color-panel);
2269
2242
  border-radius: 999px;
2270
- box-shadow: inset 0px 0px 0px 2px var(--color-text-1);
2243
+ box-shadow: inset 0px 0px 0px 2px var(--tl-color-text-1);
2271
2244
  }
2272
2245
 
2273
2246
  .tlui-slider__thumb:active {
2274
2247
  cursor: grabbing;
2275
2248
  box-shadow:
2276
- inset 0px 0px 0px 2px var(--color-text-1),
2277
- var(--shadow-1);
2249
+ inset 0px 0px 0px 2px var(--tl-color-text-1),
2250
+ var(--tl-shadow-1);
2278
2251
  }
2279
2252
 
2280
2253
  /* ---------------------- Input --------------------- */
@@ -2283,7 +2256,7 @@ it from receiving any pointer events or affecting the cursor. */
2283
2256
  background: none;
2284
2257
  margin: 0px;
2285
2258
  position: relative;
2286
- z-index: var(--layer-above);
2259
+ z-index: var(--tl-layer-above);
2287
2260
  height: 40px;
2288
2261
  max-height: 40px;
2289
2262
  display: flex;
@@ -2292,8 +2265,8 @@ it from receiving any pointer events or affecting the cursor. */
2292
2265
  font-family: inherit;
2293
2266
  font-size: 12px;
2294
2267
  font-weight: inherit;
2295
- color: var(--color-text-1);
2296
- padding: var(--space-4);
2268
+ color: var(--tl-color-text-1);
2269
+ padding: var(--tl-space-4);
2297
2270
  padding-left: 0px;
2298
2271
  border: none;
2299
2272
  outline: none;
@@ -2309,8 +2282,8 @@ it from receiving any pointer events or affecting the cursor. */
2309
2282
  height: 44px;
2310
2283
  display: flex;
2311
2284
  align-items: center;
2312
- gap: var(--space-4);
2313
- color: var(--color-text);
2285
+ gap: var(--tl-space-4);
2286
+ color: var(--tl-color-text);
2314
2287
  }
2315
2288
 
2316
2289
  .tlui-input__wrapper > .tlui-icon {
@@ -2342,7 +2315,7 @@ it from receiving any pointer events or affecting the cursor. */
2342
2315
  grid-auto-columns: minmax(1em, auto);
2343
2316
  align-self: bottom;
2344
2317
  color: currentColor;
2345
- margin-left: var(--space-4);
2318
+ margin-left: var(--tl-space-4);
2346
2319
  }
2347
2320
 
2348
2321
  .tlui-kbd > span {
@@ -2359,13 +2332,13 @@ it from receiving any pointer events or affecting the cursor. */
2359
2332
  }
2360
2333
 
2361
2334
  .tlui-kbd:not(:last-child) {
2362
- margin-right: var(--space-2);
2335
+ margin-right: var(--tl-space-2);
2363
2336
  }
2364
2337
 
2365
2338
  /* Focus Mode Button */
2366
2339
 
2367
2340
  .tlui-focus-button {
2368
- z-index: var(--layer-panels);
2341
+ z-index: var(--tl-layer-panels);
2369
2342
  pointer-events: all;
2370
2343
  }
2371
2344
 
@@ -2376,16 +2349,16 @@ it from receiving any pointer events or affecting the cursor. */
2376
2349
  }
2377
2350
 
2378
2351
  .tlui-menu {
2379
- z-index: var(--layer-menus);
2352
+ z-index: var(--tl-layer-menus);
2380
2353
  height: fit-content;
2381
2354
  width: fit-content;
2382
- border-radius: var(--radius-3);
2355
+ border-radius: var(--tl-radius-3);
2383
2356
  pointer-events: all;
2384
2357
  touch-action: auto;
2385
2358
  overflow-y: auto;
2386
2359
  overscroll-behavior: none;
2387
- background-color: var(--color-panel);
2388
- box-shadow: var(--shadow-3);
2360
+ background-color: var(--tl-color-panel);
2361
+ box-shadow: var(--tl-shadow-3);
2389
2362
  }
2390
2363
 
2391
2364
  .tlui-menu::-webkit-scrollbar {
@@ -2403,7 +2376,7 @@ it from receiving any pointer events or affecting the cursor. */
2403
2376
  }
2404
2377
 
2405
2378
  .tlui-menu__group {
2406
- border-bottom: 1px solid var(--color-divider);
2379
+ border-bottom: 1px solid var(--tl-color-divider);
2407
2380
  }
2408
2381
  .tlui-menu__group:nth-last-of-type(1) {
2409
2382
  border-bottom: none;
@@ -2413,23 +2386,23 @@ it from receiving any pointer events or affecting the cursor. */
2413
2386
 
2414
2387
  .tlui-menu__submenu__trigger[data-state='open']::after {
2415
2388
  opacity: 1;
2416
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2389
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2417
2390
  }
2418
2391
 
2419
2392
  .tlui-menu__submenu__trigger[data-direction='left'][data-state='open']::after {
2420
2393
  opacity: 1;
2421
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2394
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2422
2395
  }
2423
2396
 
2424
2397
  @media (hover: hover) {
2425
2398
  .tlui-menu__submenu__trigger[data-state='open']:not(:hover)::after {
2426
2399
  opacity: 1;
2427
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2400
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2428
2401
  }
2429
2402
 
2430
2403
  .tlui-menu__submenu__trigger[data-direction='left'][data-state='open']:not(:hover)::after {
2431
2404
  opacity: 1;
2432
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2405
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2433
2406
  }
2434
2407
  }
2435
2408
 
@@ -2454,7 +2427,7 @@ it from receiving any pointer events or affecting the cursor. */
2454
2427
  .tlui-menu-click-capture {
2455
2428
  position: fixed;
2456
2429
  inset: 0;
2457
- z-index: var(--layer-menu-click-capture);
2430
+ z-index: var(--tl-layer-menu-click-capture);
2458
2431
  }
2459
2432
 
2460
2433
  /* --------------------- Popover -------------------- */
@@ -2470,10 +2443,10 @@ it from receiving any pointer events or affecting the cursor. */
2470
2443
  max-height: calc(var(--radix-popover-content-available-height) - 8px);
2471
2444
  margin: 0px;
2472
2445
  border: none;
2473
- border-radius: var(--radius-3);
2474
- background-color: var(--color-panel);
2475
- box-shadow: var(--shadow-3);
2476
- z-index: var(--layer-menus);
2446
+ border-radius: var(--tl-radius-3);
2447
+ background-color: var(--tl-color-panel);
2448
+ box-shadow: var(--tl-shadow-3);
2449
+ z-index: var(--tl-layer-menus);
2477
2450
  overflow: hidden;
2478
2451
  overflow-y: auto;
2479
2452
  touch-action: auto;
@@ -2486,22 +2459,22 @@ it from receiving any pointer events or affecting the cursor. */
2486
2459
 
2487
2460
  .tlui-menu-zone {
2488
2461
  position: relative;
2489
- z-index: var(--layer-panels);
2462
+ z-index: var(--tl-layer-panels);
2490
2463
  width: fit-content;
2491
- border-right: 2px solid var(--color-background);
2492
- border-bottom: 2px solid var(--color-background);
2493
- border-bottom-right-radius: var(--radius-4);
2494
- background-color: var(--color-low);
2464
+ border-right: 2px solid var(--tl-color-background);
2465
+ border-bottom: 2px solid var(--tl-color-background);
2466
+ border-bottom-right-radius: var(--tl-radius-4);
2467
+ background-color: var(--tl-color-low);
2495
2468
  }
2496
2469
 
2497
2470
  .tlui-menu-zone *[data-state='open']::after {
2498
- background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2471
+ background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2499
2472
  opacity: 1;
2500
2473
  }
2501
2474
 
2502
2475
  @media (hover: hover) {
2503
2476
  .tlui-menu-zone *[data-state='open']:not(:hover)::after {
2504
- background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2477
+ background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2505
2478
  opacity: 1;
2506
2479
  }
2507
2480
  }
@@ -2527,8 +2500,8 @@ it from receiving any pointer events or affecting the cursor. */
2527
2500
  align-items: center;
2528
2501
  width: 100%;
2529
2502
  height: 40px;
2530
- padding-left: var(--space-4);
2531
- border-bottom: 1px solid var(--color-divider);
2503
+ padding-left: var(--tl-space-4);
2504
+ border-bottom: 1px solid var(--tl-color-divider);
2532
2505
  }
2533
2506
 
2534
2507
  .tlui-page-menu__header > .tlui-button:nth-of-type(1) {
@@ -2536,7 +2509,7 @@ it from receiving any pointer events or affecting the cursor. */
2536
2509
  }
2537
2510
 
2538
2511
  .tlui-page-menu__header__title {
2539
- color: var(--color-text);
2512
+ color: var(--tl-color-text);
2540
2513
  font-size: 12px;
2541
2514
  flex-grow: 2;
2542
2515
  }
@@ -2621,7 +2594,7 @@ it from receiving any pointer events or affecting the cursor. */
2621
2594
  display: inline-flex;
2622
2595
  align-items: center;
2623
2596
  justify-content: center;
2624
- color: var(--color-text);
2597
+ color: var(--tl-color-text);
2625
2598
  }
2626
2599
 
2627
2600
  .tlui-page_menu__item__sortable {
@@ -2634,7 +2607,7 @@ it from receiving any pointer events or affecting the cursor. */
2634
2607
  flex-direction: row;
2635
2608
  align-items: center;
2636
2609
  overflow: hidden;
2637
- z-index: var(--layer-above);
2610
+ z-index: var(--tl-layer-above);
2638
2611
  }
2639
2612
 
2640
2613
  .tlui-page_menu__item__sortable__title {
@@ -2646,7 +2619,7 @@ it from receiving any pointer events or affecting the cursor. */
2646
2619
  }
2647
2620
 
2648
2621
  .tlui-page_menu__item__sortable:focus-visible {
2649
- z-index: var(--layer-focused-input);
2622
+ z-index: var(--tl-layer-focused-input);
2650
2623
  }
2651
2624
 
2652
2625
  .tlui-page_menu__item__sortable__handle {
@@ -2655,7 +2628,7 @@ it from receiving any pointer events or affecting the cursor. */
2655
2628
  min-width: 0px;
2656
2629
  height: 40px;
2657
2630
  cursor: grab;
2658
- color: var(--color-text-3);
2631
+ color: var(--tl-color-text-3);
2659
2632
  flex-shrink: 0;
2660
2633
  margin-right: -9px;
2661
2634
  }
@@ -2697,13 +2670,13 @@ it from receiving any pointer events or affecting the cursor. */
2697
2670
  }
2698
2671
 
2699
2672
  .tlui-page_menu__item__submenu > .tlui-button[data-state='open']::after {
2700
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2673
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2701
2674
  opacity: 1;
2702
2675
  }
2703
2676
 
2704
2677
  @media (hover: hover) {
2705
2678
  .tlui-page_menu__item__submenu > .tlui-button[data-state='open']:not(:hover)::after {
2706
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2679
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2707
2680
  opacity: 1;
2708
2681
  }
2709
2682
  }
@@ -2739,7 +2712,7 @@ it from receiving any pointer events or affecting the cursor. */
2739
2712
  top: 48px;
2740
2713
  left: -9999px;
2741
2714
  padding: 8px 16px;
2742
- z-index: var(--layer-toasts);
2715
+ z-index: var(--tl-layer-toasts);
2743
2716
  }
2744
2717
 
2745
2718
  .tl-skip-to-main-content:focus {
@@ -2751,11 +2724,11 @@ it from receiving any pointer events or affecting the cursor. */
2751
2724
  .tlui-offline-indicator {
2752
2725
  display: flex;
2753
2726
  flex-direction: row;
2754
- gap: var(--space-3);
2755
- color: var(--color-text);
2756
- background-color: var(--color-low);
2757
- border: 3px solid var(--color-background);
2758
- padding: 0px var(--space-5);
2727
+ gap: var(--tl-space-3);
2728
+ color: var(--tl-color-text);
2729
+ background-color: var(--tl-color-low);
2730
+ border: 3px solid var(--tl-color-background);
2731
+ padding: 0px var(--tl-space-5);
2759
2732
  height: 42px;
2760
2733
  align-items: center;
2761
2734
  justify-content: center;
@@ -2770,10 +2743,10 @@ it from receiving any pointer events or affecting the cursor. */
2770
2743
  /* ------------------- Style panel ------------------ */
2771
2744
 
2772
2745
  .tlui-style-panel__wrapper {
2773
- box-shadow: var(--shadow-2);
2774
- border-radius: var(--radius-3);
2746
+ box-shadow: var(--tl-shadow-2);
2747
+ border-radius: var(--tl-radius-3);
2775
2748
  pointer-events: all;
2776
- background-color: var(--color-panel);
2749
+ background-color: var(--tl-color-panel);
2777
2750
  height: fit-content;
2778
2751
  max-height: 100%;
2779
2752
  margin: 8px;
@@ -2782,7 +2755,7 @@ it from receiving any pointer events or affecting the cursor. */
2782
2755
  overscroll-behavior: none;
2783
2756
  overflow-y: auto;
2784
2757
  overflow-x: hidden;
2785
- color: var(--color-text);
2758
+ color: var(--tl-color-text);
2786
2759
  }
2787
2760
  /* if the style panel is the only child (ie no share menu), increase the margin */
2788
2761
  .tlui-style-panel__wrapper:only-child {
@@ -2791,12 +2764,18 @@ it from receiving any pointer events or affecting the cursor. */
2791
2764
 
2792
2765
  .tlui-style-panel {
2793
2766
  position: relative;
2794
- z-index: var(--layer-panels);
2767
+ z-index: var(--tl-layer-panels);
2795
2768
  pointer-events: all;
2796
2769
  width: 148px;
2797
2770
  max-width: 148px;
2798
2771
  }
2799
2772
 
2773
+ .tlui-style-panel[data-show-ui-labels='true'] .tlui-button[data-isactive='true'] {
2774
+ border-radius: 10px;
2775
+ outline: 2px solid var(--tl-color-text);
2776
+ outline-offset: -5px;
2777
+ }
2778
+
2800
2779
  .tlui-style-panel::-webkit-scrollbar {
2801
2780
  display: none;
2802
2781
  }
@@ -2812,7 +2791,7 @@ it from receiving any pointer events or affecting the cursor. */
2812
2791
  }
2813
2792
 
2814
2793
  .tlui-style-panel__section:nth-of-type(n + 2):not(:last-child) {
2815
- border-bottom: 1px solid var(--color-divider);
2794
+ border-bottom: 1px solid var(--tl-color-divider);
2816
2795
  }
2817
2796
 
2818
2797
  .tlui-style-panel__section:empty {
@@ -2821,23 +2800,19 @@ it from receiving any pointer events or affecting the cursor. */
2821
2800
 
2822
2801
  .tlui-style-panel__section__common:not(:only-child) {
2823
2802
  margin-bottom: 7px;
2824
- border-bottom: 1px solid var(--color-divider);
2803
+ border-bottom: 1px solid var(--tl-color-divider);
2825
2804
  }
2826
2805
 
2827
- .tlui-style-panel__row {
2828
- display: flex;
2829
- }
2830
- /* Only really used for the alignment picker */
2831
- .tlui-style-panel__row__extra-button {
2832
- margin-left: -2px;
2806
+ .tlui-style-panel__dropdown-picker:only-child {
2807
+ width: 100%;
2833
2808
  }
2834
2809
 
2835
2810
  .tlui-style-panel__double-select-picker {
2836
2811
  display: flex;
2837
2812
  grid-template-columns: 1fr auto;
2838
2813
  align-items: center;
2839
- padding-left: var(--space-4);
2840
- color: var(--color-text-1);
2814
+ padding-left: var(--tl-space-4);
2815
+ color: var(--tl-color-text-1);
2841
2816
  font-size: 12px;
2842
2817
  }
2843
2818
 
@@ -2851,25 +2826,45 @@ it from receiving any pointer events or affecting the cursor. */
2851
2826
 
2852
2827
  .tlui-style-panel .tlui-button[data-state='open']::after {
2853
2828
  opacity: 1;
2854
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2829
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2855
2830
  }
2856
2831
 
2857
2832
  @media (hover: hover) {
2858
2833
  .tlui-style-panel .tlui-button[data-state='open']:not(:hover)::after {
2859
2834
  opacity: 1;
2860
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2835
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2861
2836
  }
2862
2837
  }
2863
2838
 
2839
+ /* Accessibility subheadings */
2840
+
2841
+ .tlui-style-panel__section .tlui-style-panel__subheading,
2842
+ .tlui-style-panel__section__common .tlui-style-panel__subheading,
2843
+ .tlui-style-panel__subheading + .tlui-slider__container {
2844
+ margin: 0;
2845
+ padding: var(--tl-space-2) var(--tl-space-3) 0px var(--tl-space-4);
2846
+ font-size: 12px;
2847
+ font-weight: inherit;
2848
+ line-height: inherit;
2849
+ }
2850
+
2851
+ .tlui-style-panel .tlui-style-panel__subheading:nth-of-type(1) {
2852
+ padding-top: var(--tl-space-3);
2853
+ }
2854
+
2855
+ .tlui-style-panel__subheading + .tlui-slider__container {
2856
+ padding-top: 0px;
2857
+ }
2858
+
2864
2859
  /* --------------------- Bottom --------------------- */
2865
2860
 
2866
2861
  .tlui-layout__bottom {
2867
2862
  grid-row: 2;
2863
+ width: 100%;
2868
2864
  }
2869
2865
 
2870
2866
  .tlui-layout__bottom__main {
2871
2867
  width: 100%;
2872
- position: relative;
2873
2868
  display: flex;
2874
2869
  align-items: flex-end;
2875
2870
  justify-content: center;
@@ -2881,11 +2876,10 @@ it from receiving any pointer events or affecting the cursor. */
2881
2876
  display: flex;
2882
2877
  width: min-content;
2883
2878
  flex-direction: column;
2884
- z-index: var(--layer-panels);
2879
+ z-index: var(--tl-layer-panels);
2885
2880
  pointer-events: all;
2886
2881
  position: absolute;
2887
2882
  left: 0px;
2888
- bottom: 0px;
2889
2883
  }
2890
2884
 
2891
2885
  .tlui-navigation-panel::before {
@@ -2895,10 +2889,10 @@ it from receiving any pointer events or affecting the cursor. */
2895
2889
  z-index: -1;
2896
2890
  inset: -2px -2px 0px 0px;
2897
2891
  border-radius: 0;
2898
- border-top: 2px solid var(--color-background);
2899
- border-right: 2px solid var(--color-background);
2900
- border-top-right-radius: var(--radius-4);
2901
- background-color: var(--color-low);
2892
+ border-top: 2px solid var(--tl-color-background);
2893
+ border-right: 2px solid var(--tl-color-background);
2894
+ border-top-right-radius: var(--tl-radius-4);
2895
+ background-color: var(--tl-color-low);
2902
2896
  }
2903
2897
 
2904
2898
  .tlui-navigation-panel[data-a11y='true']::before {
@@ -2912,7 +2906,7 @@ it from receiving any pointer events or affecting the cursor. */
2912
2906
  height: 96px;
2913
2907
  min-height: 96px;
2914
2908
  overflow: hidden;
2915
- padding: var(--space-3);
2909
+ padding: var(--tl-space-3);
2916
2910
  padding-top: 0px;
2917
2911
  }
2918
2912
 
@@ -2925,114 +2919,220 @@ it from receiving any pointer events or affecting the cursor. */
2925
2919
  /* --------------------- Toolbar -------------------- */
2926
2920
 
2927
2921
  /* Wide container */
2928
- .tlui-toolbar {
2922
+ .tlui-main-toolbar {
2929
2923
  grid-column: 1 / span 3;
2930
2924
  grid-row: 1;
2931
2925
  display: flex;
2932
2926
  align-items: center;
2933
2927
  justify-content: center;
2934
2928
  flex-grow: 2;
2935
- padding-bottom: calc(var(--space-3) + var(--sab));
2929
+ }
2930
+
2931
+ .tlui-main-toolbar--horizontal {
2932
+ padding-bottom: calc(var(--tl-space-3) + var(--tl-sab));
2933
+ max-width: 100%;
2934
+ }
2935
+
2936
+ .tlui-main-toolbar--vertical {
2937
+ position: absolute;
2938
+ left: 0;
2939
+ top: 90px; /* height of page menu + 'back to content' button */
2940
+ bottom: 140px; /* height of expanded mini-map */
2941
+ padding-left: calc(var(--tl-space-3) + var(--tl-sab));
2942
+ }
2943
+
2944
+ [data-breakpoints-below*='6'] .tlui-main-toolbar--vertical {
2945
+ bottom: 90px; /* collapsed mini-map, but same as top to keep things looking even */
2936
2946
  }
2937
2947
 
2938
2948
  /* Centered Content */
2939
- .tlui-toolbar__inner {
2949
+ .tlui-main-toolbar__inner {
2940
2950
  position: relative;
2941
2951
  width: fit-content;
2942
2952
  display: flex;
2943
- gap: var(--space-3);
2944
- align-items: flex-end;
2953
+ gap: var(--tl-space-3);
2954
+ align-items: flex-start;
2955
+ }
2956
+
2957
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__inner {
2958
+ flex-direction: column;
2945
2959
  }
2946
2960
 
2947
- .tlui-toolbar__left {
2961
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__left {
2948
2962
  width: fit-content;
2949
2963
  }
2964
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__left {
2965
+ display: flex;
2966
+ height: fit-content;
2967
+ }
2950
2968
 
2951
2969
  /* Row of controls + lock button */
2952
- .tlui-toolbar__extras {
2970
+ .tlui-main-toolbar__extras {
2953
2971
  position: relative;
2954
- z-index: var(--layer-above);
2955
- width: 100%;
2972
+ z-index: var(--tl-layer-above);
2956
2973
  pointer-events: none;
2957
- top: 6px;
2958
- height: 48px;
2974
+ align-self: stretch;
2959
2975
  }
2960
2976
 
2961
- .tlui-toolbar__extras:empty {
2977
+ .tlui-main-toolbar__extras:empty {
2962
2978
  display: none;
2963
2979
  }
2964
2980
 
2965
- .tlui-toolbar__extras__controls {
2966
- display: flex;
2981
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__extras {
2982
+ height: 48px;
2983
+ top: 6px;
2984
+ }
2985
+
2986
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__extras {
2987
+ width: 48px;
2988
+ order: 1;
2989
+ }
2990
+
2991
+ .tlui-main-toolbar__extras__controls {
2967
2992
  position: relative;
2968
- flex-direction: row;
2969
- z-index: var(--layer-above);
2970
- background-color: var(--color-low);
2971
- border-top-left-radius: var(--radius-4);
2972
- border-top-right-radius: var(--radius-4);
2973
- border: 2px solid var(--color-background);
2993
+ z-index: var(--tl-layer-above);
2994
+ background-color: var(--tl-color-low);
2995
+ border: 2px solid var(--tl-color-background);
2996
+ pointer-events: all;
2997
+ }
2998
+
2999
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__extras__controls {
3000
+ border-top-left-radius: var(--tl-radius-4);
3001
+ border-top-right-radius: var(--tl-radius-4);
2974
3002
  margin-left: 8px;
2975
3003
  margin-right: 0px;
2976
- pointer-events: all;
2977
3004
  width: fit-content;
2978
3005
  }
2979
3006
 
2980
- .tlui-toolbar__tools {
2981
- display: flex;
2982
- flex-direction: row;
2983
- align-items: center;
2984
- border-radius: var(--radius-4);
2985
- z-index: var(--layer-panels);
3007
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__extras__controls {
3008
+ border-top-right-radius: var(--tl-radius-4);
3009
+ border-bottom-right-radius: var(--tl-radius-4);
3010
+ margin-top: 8px;
3011
+ margin-left: -2px;
3012
+ margin-bottom: 0px;
3013
+ width: fit-content;
3014
+ }
3015
+
3016
+ .tlui-main-toolbar__tools {
3017
+ border-radius: var(--tl-radius-4);
3018
+ z-index: var(--tl-layer-panels);
2986
3019
  pointer-events: all;
2987
3020
  position: relative;
2988
- background: var(--color-panel);
2989
- box-shadow: var(--shadow-2);
3021
+ background: var(--tl-color-panel);
3022
+ box-shadow: var(--tl-shadow-2);
2990
3023
  }
2991
- .tlui-toolbar__tools__list {
2992
- display: flex;
2993
- flex-direction: row;
2994
- align-items: center;
3024
+
3025
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__mobile-style-panel {
3026
+ align-self: flex-end;
3027
+ }
3028
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__mobile-style-panel {
3029
+ align-self: flex-start;
2995
3030
  }
2996
3031
 
2997
- .tlui-toolbar__overflow {
3032
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__overflow {
2998
3033
  width: 40px;
3034
+ margin-left: 2px;
3035
+ }
3036
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__overflow {
3037
+ height: 40px;
3038
+ margin-top: 2px;
2999
3039
  }
3000
3040
 
3001
- .tlui-layout__mobile .tlui-toolbar__overflow {
3041
+ .tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-main-toolbar__overflow {
3002
3042
  width: 32px;
3003
3043
  padding: 0px;
3004
3044
  }
3005
3045
 
3006
- .tlui-toolbar *[data-state='open']::after {
3007
- background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
3046
+ .tlui-main-toolbar--horizontal *[data-state='open']::after {
3047
+ background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
3008
3048
  opacity: 1;
3009
3049
  }
3050
+ .tlui-main-toolbar--vertical *[data-state='open']::after {
3051
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
3052
+ opacity: 1;
3053
+ }
3054
+
3055
+ .tlui-main-toolbar__overflow-content {
3056
+ touch-action: none;
3057
+ }
3058
+
3059
+ .tlui-main-toolbar__tools [data-toolbar-visible='false'],
3060
+ .tlui-main-toolbar__overflow-content [data-toolbar-visible='false'] {
3061
+ display: none;
3062
+ }
3063
+
3064
+ .tlui-main-toolbar__group:empty {
3065
+ display: none;
3066
+ }
3067
+ .tlui-row.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
3068
+ border-right: 1px solid var(--color-divider);
3069
+ margin-right: 2px;
3070
+ }
3071
+ .tlui-column.tlui-main-toolbar__group:not(
3072
+ :nth-last-child(-n + 1 of [data-toolbar-visible='true'])
3073
+ ) {
3074
+ border-bottom: 1px solid var(--color-divider);
3075
+ margin-bottom: 2px;
3076
+ }
3077
+ .tlui-grid.tlui-main-toolbar__group {
3078
+ grid-column: 1 / span 4;
3079
+ }
3080
+ .tlui-grid.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
3081
+ border-bottom: 1px solid var(--color-divider);
3082
+ margin-bottom: 2px;
3083
+ }
3010
3084
 
3011
3085
  @media (hover: hover) {
3012
- .tlui-toolbar *[data-state='open']:not(:hover)::after {
3013
- background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
3086
+ .tlui-main-toolbar--horizontal *[data-state='open']:not(:hover)::after {
3087
+ background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
3088
+ opacity: 1;
3089
+ }
3090
+ .tlui-main-toolbar--vertical *[data-state='open']:not(:hover)::after {
3091
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
3014
3092
  opacity: 1;
3015
3093
  }
3016
3094
  }
3017
3095
 
3018
- .tlui-layout__mobile .tlui-toolbar {
3019
- transition: transform 0.15s ease-out 0.05s;
3096
+ /* ------------------- Tooltip -------------------- */
3097
+
3098
+ .tlui-tooltip {
3099
+ font-size: 12px;
3100
+ padding: 2px 8px;
3101
+ border-radius: 4px;
3102
+ background-color: var(--tl-color-tooltip);
3103
+ box-shadow: none;
3104
+ color: var(--tl-color-text-shadow);
3105
+ max-width: 400px;
3106
+ width: fit-content;
3107
+ text-align: center;
3108
+ will-change: transform, opacity;
3109
+ z-index: 2;
3110
+ }
3111
+
3112
+ .tlui-tooltip__arrow {
3113
+ fill: var(--tl-color-tooltip);
3114
+ will-change: opacity;
3115
+ }
3116
+
3117
+ [data-radix-popper-content-wrapper]:has(.tlui-tooltip) {
3118
+ z-index: var(--tl-layer-toasts) !important;
3119
+ pointer-events: none;
3020
3120
  }
3021
3121
 
3022
3122
  /* ------------------- Debug panel ------------------ */
3023
3123
 
3024
3124
  .tlui-debug-panel {
3025
- background-color: var(--color-low);
3125
+ background-color: var(--tl-color-low);
3026
3126
  width: 100%;
3027
3127
  display: grid;
3028
3128
  align-items: center;
3029
3129
  grid-template-columns: 1fr auto auto auto;
3030
3130
  justify-content: space-between;
3031
- padding-left: var(--space-4);
3032
- border-top: 1px solid var(--color-background);
3131
+ padding-left: var(--tl-space-4);
3132
+ border-top: 1px solid var(--tl-color-background);
3033
3133
  font-size: 12px;
3034
- color: var(--color-text-1);
3035
- z-index: var(--layer-panels);
3134
+ color: var(--tl-color-text-1);
3135
+ z-index: var(--tl-layer-panels);
3036
3136
  pointer-events: all;
3037
3137
  }
3038
3138
 
@@ -3048,7 +3148,7 @@ it from receiving any pointer events or affecting the cursor. */
3048
3148
 
3049
3149
  .tlui-debug-panel__fps__slow {
3050
3150
  font-weight: bold;
3051
- color: var(--color-danger);
3151
+ color: var(--tl-color-danger);
3052
3152
  }
3053
3153
 
3054
3154
  .tlui-a11y-audit {
@@ -3058,7 +3158,7 @@ it from receiving any pointer events or affecting the cursor. */
3058
3158
  .tlui-a11y-audit th,
3059
3159
  .tlui-a11y-audit td {
3060
3160
  padding: 8px;
3061
- border: 1px solid var(--color-low-border);
3161
+ border: 1px solid var(--tl-color-low-border);
3062
3162
  }
3063
3163
 
3064
3164
  /* --------------------- Toasts --------------------- */
@@ -3071,10 +3171,10 @@ it from receiving any pointer events or affecting the cursor. */
3071
3171
  align-items: flex-end;
3072
3172
  justify-content: flex-end;
3073
3173
  flex-direction: column;
3074
- gap: var(--space-3);
3174
+ gap: var(--tl-space-3);
3075
3175
  pointer-events: none;
3076
- padding: 0px var(--space-3) 64px 0px;
3077
- z-index: var(--layer-toasts);
3176
+ padding: 0px var(--tl-space-3) 64px 0px;
3177
+ z-index: var(--tl-layer-toasts);
3078
3178
  }
3079
3179
 
3080
3180
  .tlui-toast__viewport > * {
@@ -3083,34 +3183,34 @@ it from receiving any pointer events or affecting the cursor. */
3083
3183
 
3084
3184
  .tlui-toast__icon {
3085
3185
  padding-top: 11px;
3086
- padding-left: var(--space-4);
3087
- color: var(--color-text-1);
3186
+ padding-left: var(--tl-space-4);
3187
+ color: var(--tl-color-text-1);
3088
3188
  }
3089
3189
 
3090
3190
  .tlui-toast__container {
3091
3191
  min-width: 200px;
3092
3192
  display: flex;
3093
3193
  flex-direction: row;
3094
- background-color: var(--color-panel);
3095
- box-shadow: var(--shadow-2);
3096
- border-radius: var(--radius-3);
3194
+ background-color: var(--tl-color-panel);
3195
+ box-shadow: var(--tl-shadow-2);
3196
+ border-radius: var(--tl-radius-3);
3097
3197
  font-size: 12px;
3098
3198
  }
3099
3199
 
3100
3200
  .tlui-toast__container[data-severity='success'] .tlui-icon {
3101
- color: var(--color-success);
3201
+ color: var(--tl-color-success);
3102
3202
  }
3103
3203
 
3104
3204
  .tlui-toast__container[data-severity='info'] .tlui-icon {
3105
- color: var(--color-info);
3205
+ color: var(--tl-color-info);
3106
3206
  }
3107
3207
 
3108
3208
  .tlui-toast__container[data-severity='warning'] .tlui-icon {
3109
- color: var(--color-warning);
3209
+ color: var(--tl-color-warning);
3110
3210
  }
3111
3211
 
3112
3212
  .tlui-toast__container[data-severity='error'] .tlui-icon {
3113
- color: var(--color-danger);
3213
+ color: var(--tl-color-danger);
3114
3214
  }
3115
3215
 
3116
3216
  .tlui-toast__main {
@@ -3119,27 +3219,27 @@ it from receiving any pointer events or affecting the cursor. */
3119
3219
  }
3120
3220
 
3121
3221
  .tlui-toast__content {
3122
- padding: var(--space-4);
3222
+ padding: var(--tl-space-4);
3123
3223
  display: flex;
3124
3224
  line-height: 1.4;
3125
3225
  flex-direction: column;
3126
- gap: var(--space-3);
3226
+ gap: var(--tl-space-3);
3127
3227
  }
3128
3228
 
3129
3229
  .tlui-toast__main[data-actions='true'] .tlui-toast__content {
3130
- padding-bottom: var(--space-2);
3230
+ padding-bottom: var(--tl-space-2);
3131
3231
  }
3132
3232
 
3133
3233
  .tlui-toast__title {
3134
3234
  font-weight: bold;
3135
- color: var(--color-text-1);
3235
+ color: var(--tl-color-text-1);
3136
3236
  /* this makes the default toast look better */
3137
3237
  line-height: 16px;
3138
3238
  }
3139
3239
 
3140
3240
  .tlui-toast__description {
3141
- color: var(--color-text-1);
3142
- padding: var(--space-3);
3241
+ color: var(--tl-color-text-1);
3242
+ padding: var(--tl-space-3);
3143
3243
  margin: 0px;
3144
3244
  padding: 0px;
3145
3245
  }
@@ -3191,14 +3291,14 @@ it from receiving any pointer events or affecting the cursor. */
3191
3291
  left: 0px;
3192
3292
  width: 100%;
3193
3293
  height: 100%;
3194
- z-index: var(--layer-canvas-overlays);
3195
- background-color: var(--color-overlay);
3294
+ z-index: var(--tl-layer-canvas-overlays);
3295
+ background-color: var(--tl-color-overlay);
3196
3296
  pointer-events: all;
3197
3297
  animation: tl-fade-in 0.12s ease-out;
3198
3298
  display: grid;
3199
3299
  place-items: center;
3200
3300
  overflow-y: auto;
3201
- padding: 0px var(--space-3);
3301
+ padding: 0px var(--tl-space-3);
3202
3302
  }
3203
3303
 
3204
3304
  .tlui-dialog__content {
@@ -3206,9 +3306,9 @@ it from receiving any pointer events or affecting the cursor. */
3206
3306
  flex-direction: column;
3207
3307
  position: relative;
3208
3308
  cursor: default;
3209
- background-color: var(--color-panel);
3210
- box-shadow: var(--shadow-3);
3211
- border-radius: var(--radius-3);
3309
+ background-color: var(--tl-color-panel);
3310
+ box-shadow: var(--tl-shadow-3);
3311
+ border-radius: var(--tl-radius-3);
3212
3312
  font-size: 12px;
3213
3313
  overflow: hidden;
3214
3314
  min-width: 300px;
@@ -3221,9 +3321,9 @@ it from receiving any pointer events or affecting the cursor. */
3221
3321
  display: flex;
3222
3322
  align-items: center;
3223
3323
  flex: 0;
3224
- z-index: var(--layer-header-footer);
3225
- padding-left: var(--space-4);
3226
- color: var(--color-text);
3324
+ z-index: var(--tl-layer-header-footer);
3325
+ padding-left: var(--tl-space-4);
3326
+ color: var(--tl-color-text);
3227
3327
  height: 40px;
3228
3328
  }
3229
3329
 
@@ -3232,7 +3332,7 @@ it from receiving any pointer events or affecting the cursor. */
3232
3332
  font-weight: inherit;
3233
3333
  font-size: 12px;
3234
3334
  margin: 0px;
3235
- color: var(--color-text-1);
3335
+ color: var(--tl-color-text-1);
3236
3336
  }
3237
3337
 
3238
3338
  .tlui-dialog__header__close {
@@ -3240,16 +3340,16 @@ it from receiving any pointer events or affecting the cursor. */
3240
3340
  }
3241
3341
 
3242
3342
  .tlui-dialog__body {
3243
- padding: var(--space-4) var(--space-4);
3343
+ padding: var(--tl-space-4) var(--tl-space-4);
3244
3344
  flex: 0 1;
3245
3345
  overflow-y: auto;
3246
3346
  overflow-x: hidden;
3247
- color: var(--color-text-1);
3347
+ color: var(--tl-color-text-1);
3248
3348
  user-select: all;
3249
3349
  -webkit-user-select: text;
3250
3350
  }
3251
3351
  .tlui-dialog__body a {
3252
- color: var(--color-selected);
3352
+ color: var(--tl-color-selected);
3253
3353
  }
3254
3354
 
3255
3355
  .tlui-dialog__body ul,
@@ -3257,13 +3357,13 @@ it from receiving any pointer events or affecting the cursor. */
3257
3357
  padding-left: 16px;
3258
3358
  display: flex;
3259
3359
  flex-direction: column;
3260
- gap: var(--space-2);
3360
+ gap: var(--tl-space-2);
3261
3361
  }
3262
3362
 
3263
3363
  .tlui-dialog__footer {
3264
3364
  position: relative;
3265
3365
  min-height: 12px;
3266
- z-index: var(--layer-header-footer);
3366
+ z-index: var(--tl-layer-header-footer);
3267
3367
  }
3268
3368
 
3269
3369
  .tlui-dialog__footer__actions {
@@ -3283,15 +3383,15 @@ it from receiving any pointer events or affecting the cursor. */
3283
3383
  .tlui-edit-link-dialog {
3284
3384
  display: flex;
3285
3385
  flex-direction: column;
3286
- gap: var(--space-4);
3287
- color: var(--color-text);
3386
+ gap: var(--tl-space-4);
3387
+ color: var(--tl-color-text);
3288
3388
  }
3289
3389
 
3290
3390
  .tlui-edit-link-dialog__input {
3291
- background-color: var(--color-muted-2);
3391
+ background-color: var(--tl-color-muted-2);
3292
3392
  flex-grow: 2;
3293
- border-radius: var(--radius-2);
3294
- padding: 0px var(--space-4);
3393
+ border-radius: var(--tl-radius-2);
3394
+ padding: 0px var(--tl-space-4);
3295
3395
  }
3296
3396
 
3297
3397
  /* Embed Dialog */
@@ -3299,15 +3399,15 @@ it from receiving any pointer events or affecting the cursor. */
3299
3399
  .tlui-embed__spacer {
3300
3400
  flex-grow: 2;
3301
3401
  min-height: 0px;
3302
- margin-left: calc(-1 * var(--space-4));
3303
- margin-top: calc(-1 * var(--space-4));
3402
+ margin-left: calc(-1 * var(--tl-space-4));
3403
+ margin-top: calc(-1 * var(--tl-space-4));
3304
3404
  pointer-events: none;
3305
3405
  }
3306
3406
 
3307
3407
  .tlui-embed-dialog__list {
3308
3408
  display: flex;
3309
3409
  flex-direction: column;
3310
- padding: 0px var(--space-3) var(--space-4) var(--space-3);
3410
+ padding: 0px var(--tl-space-3) var(--tl-space-4) var(--tl-space-3);
3311
3411
  }
3312
3412
 
3313
3413
  .tlui-embed-dialog__item__image {
@@ -3319,49 +3419,49 @@ it from receiving any pointer events or affecting the cursor. */
3319
3419
  background-size: contain;
3320
3420
  background-repeat: no-repeat;
3321
3421
  background-position: center center;
3322
- background-color: var(--color-selected-contrast);
3323
- border-radius: var(--radius-1);
3422
+ background-color: var(--tl-color-selected-contrast);
3423
+ border-radius: var(--tl-radius-1);
3324
3424
  }
3325
3425
 
3326
3426
  .tlui-embed-dialog__enter {
3327
3427
  display: flex;
3328
3428
  flex-direction: column;
3329
- gap: var(--space-4);
3330
- color: var(--color-text-1);
3429
+ gap: var(--tl-space-4);
3430
+ color: var(--tl-color-text-1);
3331
3431
  }
3332
3432
 
3333
3433
  .tlui-embed-dialog__input {
3334
- background-color: var(--color-muted-2);
3434
+ background-color: var(--tl-color-muted-2);
3335
3435
  flex-grow: 2;
3336
- border-radius: var(--radius-2);
3337
- padding: 0px var(--space-4);
3436
+ border-radius: var(--tl-radius-2);
3437
+ padding: 0px var(--tl-space-4);
3338
3438
  }
3339
3439
 
3340
3440
  .tlui-embed-dialog__warning {
3341
- color: var(--color-danger);
3441
+ color: var(--tl-color-danger);
3342
3442
  text-shadow: none;
3343
3443
  }
3344
3444
 
3345
3445
  .tlui-embed-dialog__instruction__link {
3346
3446
  display: flex;
3347
- gap: var(--space-1);
3348
- margin-top: var(--space-4);
3447
+ gap: var(--tl-space-1);
3448
+ margin-top: var(--tl-space-4);
3349
3449
  }
3350
3450
 
3351
3451
  .tlui-embed-dialog__enter a {
3352
- color: var(--color-text-1);
3452
+ color: var(--tl-color-text-1);
3353
3453
  }
3354
3454
 
3355
3455
  /* --------------- Keyboard shortcuts --------------- */
3356
3456
 
3357
3457
  .tlui-shortcuts-dialog__header {
3358
- border-bottom: 1px solid var(--color-divider);
3458
+ border-bottom: 1px solid var(--tl-color-divider);
3359
3459
  }
3360
3460
 
3361
3461
  .tlui-shortcuts-dialog__body {
3362
3462
  position: relative;
3363
3463
  columns: 3;
3364
- column-gap: var(--space-9);
3464
+ column-gap: var(--tl-space-9);
3365
3465
  pointer-events: all;
3366
3466
  touch-action: auto;
3367
3467
 
@@ -3379,14 +3479,14 @@ it from receiving any pointer events or affecting the cursor. */
3379
3479
 
3380
3480
  .tlui-shortcuts-dialog__group {
3381
3481
  break-inside: avoid-column;
3382
- padding-bottom: var(--space-6);
3482
+ padding-bottom: var(--tl-space-6);
3383
3483
  }
3384
3484
 
3385
3485
  .tlui-shortcuts-dialog__group__title {
3386
3486
  font-size: inherit;
3387
3487
  font-weight: inherit;
3388
3488
  margin: 0px;
3389
- color: var(--color-text-3);
3489
+ color: var(--tl-color-text-3);
3390
3490
  height: 32px;
3391
3491
  display: flex;
3392
3492
  align-items: center;
@@ -3395,12 +3495,12 @@ it from receiving any pointer events or affecting the cursor. */
3395
3495
  .tlui-shortcuts-dialog__group__content {
3396
3496
  display: flex;
3397
3497
  flex-direction: column;
3398
- color: var(--color-text-1);
3498
+ color: var(--tl-color-text-1);
3399
3499
  }
3400
3500
 
3401
3501
  .tlui-shortcuts-dialog__key-pair {
3402
3502
  display: flex;
3403
- gap: var(--space-4);
3503
+ gap: var(--tl-space-4);
3404
3504
  align-items: center;
3405
3505
  justify-content: space-between;
3406
3506
  height: 32px;
@@ -3427,12 +3527,12 @@ it from receiving any pointer events or affecting the cursor. */
3427
3527
  height: 24px;
3428
3528
  background: linear-gradient(
3429
3529
  to bottom,
3430
- var(--color-panel-transparent) 0%,
3431
- var(--color-panel) 90%,
3432
- var(--color-panel) 100%
3530
+ var(--tl-color-panel-transparent) 0%,
3531
+ var(--tl-color-panel) 90%,
3532
+ var(--tl-color-panel) 100%
3433
3533
  );
3434
- border-bottom-left-radius: var(--radius-3);
3435
- border-bottom-right-radius: var(--radius-3);
3534
+ border-bottom-left-radius: var(--tl-radius-3);
3535
+ border-bottom-right-radius: var(--tl-radius-3);
3436
3536
  pointer-events: none;
3437
3537
  }
3438
3538
 
@@ -3447,10 +3547,10 @@ it from receiving any pointer events or affecting the cursor. */
3447
3547
  .tlui-help-menu {
3448
3548
  pointer-events: all;
3449
3549
  position: absolute;
3450
- bottom: var(--space-2);
3451
- right: var(--space-2);
3452
- z-index: var(--layer-panels);
3453
- border: 2px solid var(--color-background);
3550
+ bottom: var(--tl-space-2);
3551
+ right: var(--tl-space-2);
3552
+ z-index: var(--tl-layer-panels);
3553
+ border: 2px solid var(--tl-color-background);
3454
3554
  border-radius: 100%;
3455
3555
  }
3456
3556
 
@@ -3461,7 +3561,7 @@ it from receiving any pointer events or affecting the cursor. */
3461
3561
  display: flex;
3462
3562
  flex-direction: row;
3463
3563
  justify-content: flex-end;
3464
- z-index: var(--layer-panels);
3564
+ z-index: var(--tl-layer-panels);
3465
3565
  align-items: center;
3466
3566
  padding-top: 2px;
3467
3567
  padding-right: 4px;
@@ -3477,7 +3577,7 @@ it from receiving any pointer events or affecting the cursor. */
3477
3577
  border: none;
3478
3578
  cursor: pointer;
3479
3579
  pointer-events: all;
3480
- border-radius: var(--radius-1);
3580
+ border-radius: var(--tl-radius-1);
3481
3581
  padding-right: 1px;
3482
3582
  height: 100%;
3483
3583
  }
@@ -3490,8 +3590,8 @@ it from receiving any pointer events or affecting the cursor. */
3490
3590
  .tlui-people-menu__avatar {
3491
3591
  height: 24px;
3492
3592
  width: 24px;
3493
- border: 2px solid var(--color-background);
3494
- background-color: var(--color-low);
3593
+ border: 2px solid var(--tl-color-background);
3594
+ background-color: var(--tl-color-low);
3495
3595
  border-radius: 100%;
3496
3596
  display: flex;
3497
3597
  align-items: center;
@@ -3500,7 +3600,7 @@ it from receiving any pointer events or affecting the cursor. */
3500
3600
  font-size: 10px;
3501
3601
  font-weight: bold;
3502
3602
  text-align: center;
3503
- color: var(--color-selected-contrast);
3603
+ color: var(--tl-color-selected-contrast);
3504
3604
  z-index: 2;
3505
3605
  }
3506
3606
 
@@ -3514,7 +3614,7 @@ it from receiving any pointer events or affecting the cursor. */
3514
3614
 
3515
3615
  @media (hover: hover) {
3516
3616
  .tlui-people-menu__avatars-button:hover .tlui-people-menu__avatar {
3517
- border-color: var(--color-low);
3617
+ border-color: var(--tl-color-low);
3518
3618
  }
3519
3619
  }
3520
3620
 
@@ -3522,12 +3622,12 @@ it from receiving any pointer events or affecting the cursor. */
3522
3622
  min-width: 0px;
3523
3623
  font-size: 11px;
3524
3624
  font-weight: 600;
3525
- color: var(--color-text-1);
3625
+ color: var(--tl-color-text-1);
3526
3626
  font-family: inherit;
3527
3627
  padding: 0px 4px;
3528
3628
  }
3529
3629
  .tlui-people-menu__more::after {
3530
- border-radius: var(--radius-2);
3630
+ border-radius: var(--tl-radius-2);
3531
3631
  inset: 0px;
3532
3632
  }
3533
3633
 
@@ -3556,7 +3656,7 @@ it from receiving any pointer events or affecting the cursor. */
3556
3656
  }
3557
3657
 
3558
3658
  .tlui-people-menu__section:not(:last-child) {
3559
- border-bottom: 1px solid var(--color-divider);
3659
+ border-bottom: 1px solid var(--tl-color-divider);
3560
3660
  }
3561
3661
 
3562
3662
  .tlui-people-menu__user {
@@ -3575,7 +3675,7 @@ it from receiving any pointer events or affecting the cursor. */
3575
3675
  text-overflow: ellipsis;
3576
3676
  white-space: nowrap;
3577
3677
  font-size: 12px;
3578
- color: var(--color-text-1);
3678
+ color: var(--tl-color-text-1);
3579
3679
  max-width: 100%;
3580
3680
  flex-grow: 1;
3581
3681
  flex-shrink: 100;
@@ -3587,7 +3687,7 @@ it from receiving any pointer events or affecting the cursor. */
3587
3687
  text-overflow: ellipsis;
3588
3688
  white-space: nowrap;
3589
3689
  font-size: 12px;
3590
- color: var(--color-text-3);
3690
+ color: var(--tl-color-text-3);
3591
3691
  flex-grow: 100;
3592
3692
  flex-shrink: 0;
3593
3693
  margin-left: 4px;
@@ -3678,7 +3778,7 @@ it from receiving any pointer events or affecting the cursor. */
3678
3778
  inset: 0px;
3679
3779
  border-width: 2px;
3680
3780
  border-style: solid;
3681
- z-index: var(--layer-following-indicator);
3781
+ z-index: var(--tl-layer-following-indicator);
3682
3782
  pointer-events: none;
3683
3783
  }
3684
3784
 
@@ -3697,7 +3797,7 @@ it from receiving any pointer events or affecting the cursor. */
3697
3797
  }
3698
3798
 
3699
3799
  .tlui-contextual-toolbar [data-isactive='true']::after {
3700
- background-color: var(--color-muted-2);
3800
+ background-color: var(--tl-color-muted-2);
3701
3801
  opacity: 1;
3702
3802
  }
3703
3803
 
@@ -3713,7 +3813,7 @@ it from receiving any pointer events or affecting the cursor. */
3713
3813
 
3714
3814
  .tlui-contextual-toolbar[data-visible='true'] {
3715
3815
  opacity: 1;
3716
- z-index: var(--layer-menus);
3816
+ z-index: var(--tl-layer-menus);
3717
3817
  }
3718
3818
 
3719
3819
  .tlui-contextual-toolbar[data-interactive='true'],
@@ -3772,7 +3872,7 @@ it from receiving any pointer events or affecting the cursor. */
3772
3872
 
3773
3873
  @keyframes tlui-slide-in {
3774
3874
  from {
3775
- transform: translateX(calc(100% + var(--space-3)));
3875
+ transform: translateX(calc(100% + var(--tl-space-3)));
3776
3876
  }
3777
3877
  to {
3778
3878
  transform: translateX(0px);
@@ -3784,7 +3884,7 @@ it from receiving any pointer events or affecting the cursor. */
3784
3884
  transform: translateX(var(--radix-toast-swipe-end-x));
3785
3885
  }
3786
3886
  to {
3787
- transform: translateX(calc(100% + var(--space-3)));
3887
+ transform: translateX(calc(100% + var(--tl-space-3)));
3788
3888
  }
3789
3889
  }
3790
3890