tldraw 3.16.0-internal.a478398270c6 → 3.16.0-internal.f8b97f0c414f

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 (656) hide show
  1. package/dist-cjs/index.d.ts +471 -130
  2. package/dist-cjs/index.js +58 -15
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/Tldraw.js +12 -2
  5. package/dist-cjs/lib/Tldraw.js.map +2 -2
  6. package/dist-cjs/lib/TldrawImage.js +5 -2
  7. package/dist-cjs/lib/TldrawImage.js.map +3 -3
  8. package/dist-cjs/lib/canvas/TldrawCropHandles.js +1 -1
  9. package/dist-cjs/lib/canvas/TldrawCropHandles.js.map +2 -2
  10. package/dist-cjs/lib/canvas/TldrawHandles.js +1 -1
  11. package/dist-cjs/lib/canvas/TldrawHandles.js.map +2 -2
  12. package/dist-cjs/lib/canvas/TldrawOverlays.js +1 -1
  13. package/dist-cjs/lib/canvas/TldrawOverlays.js.map +2 -2
  14. package/dist-cjs/lib/canvas/TldrawScribble.js +1 -1
  15. package/dist-cjs/lib/canvas/TldrawScribble.js.map +2 -2
  16. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js +279 -271
  17. package/dist-cjs/lib/canvas/TldrawSelectionForeground.js.map +2 -2
  18. package/dist-cjs/lib/defaultExternalContentHandlers.js +6 -4
  19. package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
  20. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +27 -44
  21. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
  22. package/dist-cjs/lib/shapes/arrow/arrowLabel.js +22 -4
  23. package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +3 -3
  24. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js +1 -1
  25. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js.map +2 -2
  26. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js +3 -3
  27. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js.map +1 -1
  28. package/dist-cjs/lib/shapes/arrow/elbow/elbowArrowSnapLines.js.map +1 -1
  29. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js +3 -0
  30. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +2 -2
  31. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +4 -4
  32. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
  33. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +3 -6
  34. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +2 -2
  35. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +1 -1
  36. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +1 -1
  37. package/dist-cjs/lib/shapes/frame/FrameShapeTool.js.map +1 -1
  38. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +25 -18
  39. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
  40. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js +1 -1
  41. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js.map +2 -2
  42. package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js +2 -2
  43. package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js.map +2 -2
  44. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +3 -2
  45. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
  46. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js +2 -1
  47. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js.map +2 -2
  48. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +5 -4
  49. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
  50. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +6 -3
  51. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +2 -2
  52. package/dist-cjs/lib/shapes/line/LineShapeUtil.js +20 -5
  53. package/dist-cjs/lib/shapes/line/LineShapeUtil.js.map +2 -2
  54. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +8 -6
  55. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
  56. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +4 -4
  57. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js.map +2 -2
  58. package/dist-cjs/lib/shapes/shared/PathBuilder.js +21 -3
  59. package/dist-cjs/lib/shapes/shared/PathBuilder.js.map +2 -2
  60. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js +2 -3
  61. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js.map +2 -2
  62. package/dist-cjs/lib/shapes/shared/RichTextLabel.js +5 -2
  63. package/dist-cjs/lib/shapes/shared/RichTextLabel.js.map +2 -2
  64. package/dist-cjs/lib/shapes/shared/ShapeFill.js +4 -4
  65. package/dist-cjs/lib/shapes/shared/ShapeFill.js.map +2 -2
  66. package/dist-cjs/lib/shapes/shared/SvgTextLabel.js +4 -3
  67. package/dist-cjs/lib/shapes/shared/SvgTextLabel.js.map +2 -2
  68. package/dist-cjs/lib/shapes/shared/crop.js +1 -0
  69. package/dist-cjs/lib/shapes/shared/crop.js.map +2 -2
  70. package/dist-cjs/lib/shapes/shared/freehand/svg.js.map +2 -2
  71. package/dist-cjs/lib/shapes/shared/useEditablePlainText.js +3 -4
  72. package/dist-cjs/lib/shapes/shared/useEditablePlainText.js.map +2 -2
  73. package/dist-cjs/lib/shapes/shared/useEditableRichText.js.map +2 -2
  74. package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js +0 -2
  75. package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js.map +2 -2
  76. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js +10 -1
  77. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js.map +2 -2
  78. package/dist-cjs/lib/shapes/text/PlainTextArea.js +2 -2
  79. package/dist-cjs/lib/shapes/text/PlainTextArea.js.map +2 -2
  80. package/dist-cjs/lib/shapes/text/RichTextArea.js +3 -3
  81. package/dist-cjs/lib/shapes/text/RichTextArea.js.map +2 -2
  82. package/dist-cjs/lib/shapes/text/TextShapeUtil.js +7 -13
  83. package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +2 -2
  84. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +3 -3
  85. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +1 -1
  86. package/dist-cjs/lib/styles.js.map +2 -2
  87. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +25 -1
  88. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +2 -2
  89. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +12 -0
  90. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +2 -2
  91. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js +7 -1
  92. package/dist-cjs/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.js.map +2 -2
  93. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +43 -22
  94. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
  95. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js +2 -15
  96. package/dist-cjs/lib/tools/SelectTool/childStates/Idle.js.map +2 -2
  97. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js +5 -0
  98. package/dist-cjs/lib/tools/SelectTool/childStates/PointingShape.js.map +2 -2
  99. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js +8 -0
  100. package/dist-cjs/lib/tools/SelectTool/childStates/Resizing.js.map +2 -2
  101. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js +8 -0
  102. package/dist-cjs/lib/tools/SelectTool/childStates/Rotating.js.map +2 -2
  103. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js +8 -0
  104. package/dist-cjs/lib/tools/SelectTool/childStates/Translating.js.map +2 -2
  105. package/dist-cjs/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.js.map +2 -2
  106. package/dist-cjs/lib/ui/TldrawUi.js +27 -12
  107. package/dist-cjs/lib/ui/TldrawUi.js.map +3 -3
  108. package/dist-cjs/lib/ui/components/A11y.js +15 -13
  109. package/dist-cjs/lib/ui/components/A11y.js.map +2 -2
  110. package/dist-cjs/lib/ui/components/AccessibilityMenu.js +35 -0
  111. package/dist-cjs/lib/ui/components/AccessibilityMenu.js.map +7 -0
  112. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js +12 -3
  113. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js.map +2 -2
  114. package/dist-cjs/lib/ui/components/{FollowingIndicator.js → DefaultFollowingIndicator.js} +6 -6
  115. package/dist-cjs/lib/ui/components/DefaultFollowingIndicator.js.map +7 -0
  116. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js +3 -2
  117. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js.map +2 -2
  118. package/dist-cjs/lib/ui/components/EditLinkDialog.js +11 -1
  119. package/dist-cjs/lib/ui/components/EditLinkDialog.js.map +2 -2
  120. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js +57 -7
  121. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js.map +2 -2
  122. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js +3 -2
  123. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js.map +2 -2
  124. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js +4 -4
  125. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js.map +2 -2
  126. package/dist-cjs/lib/ui/components/MobileStylePanel.js +5 -3
  127. package/dist-cjs/lib/ui/components/MobileStylePanel.js.map +2 -2
  128. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js +4 -5
  129. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js.map +2 -2
  130. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js +3 -2
  131. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js.map +2 -2
  132. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js +3 -2
  133. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js.map +2 -2
  134. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js +2 -2
  135. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js.map +2 -2
  136. package/dist-cjs/lib/ui/components/Spinner.js +2 -25
  137. package/dist-cjs/lib/ui/components/Spinner.js.map +2 -2
  138. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js +11 -4
  139. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js.map +2 -2
  140. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +249 -278
  141. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
  142. package/dist-cjs/lib/ui/components/{primitives/TldrawUiButtonPicker.js → StylePanel/StylePanelButtonPicker.js} +52 -54
  143. package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js.map +7 -0
  144. package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js +68 -0
  145. package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js.map +7 -0
  146. package/dist-cjs/lib/ui/components/StylePanel/{DoubleDropdownPicker.js → StylePanelDoubleDropdownPicker.js} +26 -25
  147. package/dist-cjs/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.js.map +7 -0
  148. package/dist-cjs/lib/ui/components/StylePanel/{DropdownPicker.js → StylePanelDropdownPicker.js} +47 -43
  149. package/dist-cjs/lib/ui/components/StylePanel/StylePanelDropdownPicker.js.map +7 -0
  150. package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js +28 -0
  151. package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js.map +7 -0
  152. package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js +3 -2
  153. package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js.map +2 -2
  154. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js +21 -7
  155. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbar.js.map +3 -3
  156. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js +39 -10
  157. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js.map +2 -2
  158. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js +66 -21
  159. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js.map +3 -3
  160. package/dist-cjs/lib/ui/components/Toolbar/DefaultVideoToolbarContent.js +15 -3
  161. package/dist-cjs/lib/ui/components/Toolbar/DefaultVideoToolbarContent.js.map +2 -2
  162. package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js +3 -3
  163. package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js.map +2 -2
  164. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js +189 -80
  165. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js.map +3 -3
  166. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +5 -4
  167. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js.map +2 -2
  168. package/dist-cjs/lib/ui/components/menu-items.js +22 -0
  169. package/dist-cjs/lib/ui/components/menu-items.js.map +2 -2
  170. package/dist-cjs/lib/ui/components/primitives/Button/TldrawUiButtonIcon.js.map +2 -2
  171. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +11 -2
  172. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
  173. package/dist-cjs/lib/ui/components/primitives/TldrawUiDialog.js +1 -1
  174. package/dist-cjs/lib/ui/components/primitives/TldrawUiDialog.js.map +2 -2
  175. package/dist-cjs/lib/ui/components/primitives/TldrawUiIcon.js +35 -1
  176. package/dist-cjs/lib/ui/components/primitives/TldrawUiIcon.js.map +2 -2
  177. package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js +2 -2
  178. package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js.map +2 -2
  179. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js +3 -2
  180. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js.map +3 -3
  181. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js +23 -6
  182. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js.map +2 -2
  183. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js +33 -7
  184. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js.map +2 -2
  185. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +294 -0
  186. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +7 -0
  187. package/dist-cjs/lib/ui/components/primitives/layout.js +76 -0
  188. package/dist-cjs/lib/ui/components/primitives/layout.js.map +7 -0
  189. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.js.map +2 -2
  190. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuContext.js.map +2 -2
  191. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js +25 -12
  192. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js.map +2 -2
  193. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +154 -22
  194. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
  195. package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js +3 -2
  196. package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js.map +2 -2
  197. package/dist-cjs/lib/ui/context/actions.js +79 -17
  198. package/dist-cjs/lib/ui/context/actions.js.map +2 -2
  199. package/dist-cjs/lib/ui/context/components.js +2 -0
  200. package/dist-cjs/lib/ui/context/components.js.map +2 -2
  201. package/dist-cjs/lib/ui/context/events.js.map +2 -2
  202. package/dist-cjs/lib/ui/hooks/menu-hooks.js.map +2 -2
  203. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js +1 -1
  204. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js.map +2 -2
  205. package/dist-cjs/lib/ui/hooks/useExportAs.js +3 -2
  206. package/dist-cjs/lib/ui/hooks/useExportAs.js.map +2 -2
  207. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js +2 -2
  208. package/dist-cjs/lib/ui/hooks/useKeyboardShortcuts.js.map +2 -2
  209. package/dist-cjs/lib/ui/hooks/useTools.js +94 -9
  210. package/dist-cjs/lib/ui/hooks/useTools.js.map +2 -2
  211. package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js.map +1 -1
  212. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +13 -0
  213. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
  214. package/dist-cjs/lib/ui/kbd-utils.js +11 -4
  215. package/dist-cjs/lib/ui/kbd-utils.js.map +2 -2
  216. package/dist-cjs/lib/ui/version.js +3 -3
  217. package/dist-cjs/lib/ui/version.js.map +1 -1
  218. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js +1 -1
  219. package/dist-cjs/lib/utils/excalidraw/putExcalidrawContent.js.map +2 -2
  220. package/dist-cjs/lib/utils/export/copyAs.js +1 -2
  221. package/dist-cjs/lib/utils/export/copyAs.js.map +2 -2
  222. package/dist-cjs/lib/utils/export/export.js +0 -20
  223. package/dist-cjs/lib/utils/export/export.js.map +2 -2
  224. package/dist-cjs/lib/utils/export/exportAs.js +1 -2
  225. package/dist-cjs/lib/utils/export/exportAs.js.map +2 -2
  226. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js +3 -2
  227. package/dist-cjs/lib/utils/tldr/buildFromV1Document.js.map +2 -2
  228. package/dist-esm/index.d.mts +471 -130
  229. package/dist-esm/index.mjs +107 -32
  230. package/dist-esm/index.mjs.map +2 -2
  231. package/dist-esm/lib/Tldraw.mjs +14 -4
  232. package/dist-esm/lib/Tldraw.mjs.map +2 -2
  233. package/dist-esm/lib/TldrawImage.mjs +5 -2
  234. package/dist-esm/lib/TldrawImage.mjs.map +2 -2
  235. package/dist-esm/lib/canvas/TldrawCropHandles.mjs +1 -1
  236. package/dist-esm/lib/canvas/TldrawCropHandles.mjs.map +2 -2
  237. package/dist-esm/lib/canvas/TldrawHandles.mjs +1 -1
  238. package/dist-esm/lib/canvas/TldrawHandles.mjs.map +2 -2
  239. package/dist-esm/lib/canvas/TldrawOverlays.mjs +1 -1
  240. package/dist-esm/lib/canvas/TldrawOverlays.mjs.map +2 -2
  241. package/dist-esm/lib/canvas/TldrawScribble.mjs +1 -1
  242. package/dist-esm/lib/canvas/TldrawScribble.mjs.map +2 -2
  243. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs +279 -271
  244. package/dist-esm/lib/canvas/TldrawSelectionForeground.mjs.map +2 -2
  245. package/dist-esm/lib/defaultExternalContentHandlers.mjs +6 -4
  246. package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
  247. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +30 -44
  248. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
  249. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +25 -5
  250. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +3 -3
  251. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs +1 -1
  252. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs.map +2 -2
  253. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs +3 -3
  254. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs.map +1 -1
  255. package/dist-esm/lib/shapes/arrow/elbow/elbowArrowSnapLines.mjs.map +1 -1
  256. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs +3 -0
  257. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +2 -2
  258. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +5 -5
  259. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
  260. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +4 -6
  261. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +2 -2
  262. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +1 -1
  263. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +1 -1
  264. package/dist-esm/lib/shapes/frame/FrameShapeTool.mjs.map +1 -1
  265. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +26 -18
  266. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
  267. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs +1 -1
  268. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs.map +2 -2
  269. package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs +3 -3
  270. package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs.map +2 -2
  271. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +4 -2
  272. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
  273. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs +2 -1
  274. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs.map +2 -2
  275. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +6 -4
  276. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
  277. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +6 -3
  278. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +2 -2
  279. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs +21 -5
  280. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs.map +2 -2
  281. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +9 -6
  282. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
  283. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs +5 -5
  284. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs.map +2 -2
  285. package/dist-esm/lib/shapes/shared/PathBuilder.mjs +22 -3
  286. package/dist-esm/lib/shapes/shared/PathBuilder.mjs.map +2 -2
  287. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs +2 -3
  288. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs.map +2 -2
  289. package/dist-esm/lib/shapes/shared/RichTextLabel.mjs +5 -2
  290. package/dist-esm/lib/shapes/shared/RichTextLabel.mjs.map +2 -2
  291. package/dist-esm/lib/shapes/shared/ShapeFill.mjs +5 -4
  292. package/dist-esm/lib/shapes/shared/ShapeFill.mjs.map +2 -2
  293. package/dist-esm/lib/shapes/shared/SvgTextLabel.mjs +4 -3
  294. package/dist-esm/lib/shapes/shared/SvgTextLabel.mjs.map +2 -2
  295. package/dist-esm/lib/shapes/shared/crop.mjs +1 -0
  296. package/dist-esm/lib/shapes/shared/crop.mjs.map +2 -2
  297. package/dist-esm/lib/shapes/shared/freehand/svg.mjs.map +2 -2
  298. package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs +4 -5
  299. package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs.map +2 -2
  300. package/dist-esm/lib/shapes/shared/useEditableRichText.mjs.map +2 -2
  301. package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs +0 -2
  302. package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs.map +2 -2
  303. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs +10 -1
  304. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs.map +2 -2
  305. package/dist-esm/lib/shapes/text/PlainTextArea.mjs +3 -3
  306. package/dist-esm/lib/shapes/text/PlainTextArea.mjs.map +2 -2
  307. package/dist-esm/lib/shapes/text/RichTextArea.mjs +3 -4
  308. package/dist-esm/lib/shapes/text/RichTextArea.mjs.map +2 -2
  309. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +8 -13
  310. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +2 -2
  311. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +3 -3
  312. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +1 -1
  313. package/dist-esm/lib/styles.mjs.map +2 -2
  314. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +26 -1
  315. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +2 -2
  316. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +13 -0
  317. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +2 -2
  318. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs +7 -1
  319. package/dist-esm/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.mjs.map +2 -2
  320. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +43 -22
  321. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
  322. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs +2 -15
  323. package/dist-esm/lib/tools/SelectTool/childStates/Idle.mjs.map +2 -2
  324. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs +5 -0
  325. package/dist-esm/lib/tools/SelectTool/childStates/PointingShape.mjs.map +2 -2
  326. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs +8 -0
  327. package/dist-esm/lib/tools/SelectTool/childStates/Resizing.mjs.map +2 -2
  328. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs +8 -0
  329. package/dist-esm/lib/tools/SelectTool/childStates/Rotating.mjs.map +2 -2
  330. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs +8 -0
  331. package/dist-esm/lib/tools/SelectTool/childStates/Translating.mjs.map +2 -2
  332. package/dist-esm/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.mjs.map +2 -2
  333. package/dist-esm/lib/ui/TldrawUi.mjs +29 -14
  334. package/dist-esm/lib/ui/TldrawUi.mjs.map +3 -3
  335. package/dist-esm/lib/ui/components/A11y.mjs +16 -14
  336. package/dist-esm/lib/ui/components/A11y.mjs.map +2 -2
  337. package/dist-esm/lib/ui/components/AccessibilityMenu.mjs +19 -0
  338. package/dist-esm/lib/ui/components/AccessibilityMenu.mjs.map +7 -0
  339. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs +12 -3
  340. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs.map +2 -2
  341. package/dist-esm/lib/ui/components/{FollowingIndicator.mjs → DefaultFollowingIndicator.mjs} +3 -3
  342. package/dist-esm/lib/ui/components/DefaultFollowingIndicator.mjs.map +7 -0
  343. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs +3 -2
  344. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs.map +2 -2
  345. package/dist-esm/lib/ui/components/EditLinkDialog.mjs +11 -1
  346. package/dist-esm/lib/ui/components/EditLinkDialog.mjs.map +2 -2
  347. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs +57 -7
  348. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs.map +2 -2
  349. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs +3 -3
  350. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs.map +2 -2
  351. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs +4 -4
  352. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs.map +2 -2
  353. package/dist-esm/lib/ui/components/MobileStylePanel.mjs +6 -3
  354. package/dist-esm/lib/ui/components/MobileStylePanel.mjs.map +2 -2
  355. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs +4 -5
  356. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs.map +2 -2
  357. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs +4 -3
  358. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs.map +2 -2
  359. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs +3 -2
  360. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs.map +2 -2
  361. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs +2 -2
  362. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs.map +2 -2
  363. package/dist-esm/lib/ui/components/Spinner.mjs +3 -26
  364. package/dist-esm/lib/ui/components/Spinner.mjs.map +2 -2
  365. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs +16 -5
  366. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs.map +2 -2
  367. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +251 -282
  368. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
  369. package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs +126 -0
  370. package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs.map +7 -0
  371. package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs +48 -0
  372. package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs.map +7 -0
  373. package/dist-esm/lib/ui/components/StylePanel/{DoubleDropdownPicker.mjs → StylePanelDoubleDropdownPicker.mjs} +23 -22
  374. package/dist-esm/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.mjs.map +7 -0
  375. package/dist-esm/lib/ui/components/StylePanel/{DropdownPicker.mjs → StylePanelDropdownPicker.mjs} +44 -40
  376. package/dist-esm/lib/ui/components/StylePanel/StylePanelDropdownPicker.mjs.map +7 -0
  377. package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs +8 -0
  378. package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs.map +7 -0
  379. package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs +3 -2
  380. package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs.map +2 -2
  381. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs +23 -9
  382. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbar.mjs.map +3 -3
  383. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs +39 -10
  384. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs.map +2 -2
  385. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs +56 -21
  386. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs.map +2 -2
  387. package/dist-esm/lib/ui/components/Toolbar/DefaultVideoToolbarContent.mjs +15 -3
  388. package/dist-esm/lib/ui/components/Toolbar/DefaultVideoToolbarContent.mjs.map +2 -2
  389. package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs +3 -3
  390. package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs.map +2 -2
  391. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs +192 -81
  392. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs.map +3 -3
  393. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs +5 -4
  394. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs.map +2 -2
  395. package/dist-esm/lib/ui/components/menu-items.mjs +22 -0
  396. package/dist-esm/lib/ui/components/menu-items.mjs.map +2 -2
  397. package/dist-esm/lib/ui/components/primitives/Button/TldrawUiButtonIcon.mjs.map +2 -2
  398. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +12 -3
  399. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
  400. package/dist-esm/lib/ui/components/primitives/TldrawUiDialog.mjs +1 -1
  401. package/dist-esm/lib/ui/components/primitives/TldrawUiDialog.mjs.map +2 -2
  402. package/dist-esm/lib/ui/components/primitives/TldrawUiIcon.mjs +36 -2
  403. package/dist-esm/lib/ui/components/primitives/TldrawUiIcon.mjs.map +2 -2
  404. package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs +3 -3
  405. package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs.map +2 -2
  406. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs +3 -2
  407. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs.map +2 -2
  408. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs +23 -6
  409. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs.map +2 -2
  410. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs +33 -7
  411. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs.map +2 -2
  412. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +272 -0
  413. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +7 -0
  414. package/dist-esm/lib/ui/components/primitives/layout.mjs +46 -0
  415. package/dist-esm/lib/ui/components/primitives/layout.mjs.map +7 -0
  416. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.mjs.map +2 -2
  417. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuContext.mjs.map +2 -2
  418. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs +25 -12
  419. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs.map +2 -2
  420. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +162 -24
  421. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
  422. package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs +3 -2
  423. package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs.map +2 -2
  424. package/dist-esm/lib/ui/context/actions.mjs +79 -17
  425. package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
  426. package/dist-esm/lib/ui/context/components.mjs +2 -0
  427. package/dist-esm/lib/ui/context/components.mjs.map +2 -2
  428. package/dist-esm/lib/ui/context/events.mjs.map +2 -2
  429. package/dist-esm/lib/ui/hooks/menu-hooks.mjs.map +2 -2
  430. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs +2 -2
  431. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs.map +2 -2
  432. package/dist-esm/lib/ui/hooks/useExportAs.mjs +3 -2
  433. package/dist-esm/lib/ui/hooks/useExportAs.mjs.map +2 -2
  434. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs +2 -2
  435. package/dist-esm/lib/ui/hooks/useKeyboardShortcuts.mjs.map +2 -2
  436. package/dist-esm/lib/ui/hooks/useTools.mjs +102 -10
  437. package/dist-esm/lib/ui/hooks/useTools.mjs.map +2 -2
  438. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +13 -0
  439. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
  440. package/dist-esm/lib/ui/kbd-utils.mjs +11 -4
  441. package/dist-esm/lib/ui/kbd-utils.mjs.map +2 -2
  442. package/dist-esm/lib/ui/version.mjs +3 -3
  443. package/dist-esm/lib/ui/version.mjs.map +1 -1
  444. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs +1 -1
  445. package/dist-esm/lib/utils/excalidraw/putExcalidrawContent.mjs.map +2 -2
  446. package/dist-esm/lib/utils/export/copyAs.mjs +1 -2
  447. package/dist-esm/lib/utils/export/copyAs.mjs.map +2 -2
  448. package/dist-esm/lib/utils/export/export.mjs +0 -20
  449. package/dist-esm/lib/utils/export/export.mjs.map +2 -2
  450. package/dist-esm/lib/utils/export/exportAs.mjs +1 -2
  451. package/dist-esm/lib/utils/export/exportAs.mjs.map +2 -2
  452. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs +3 -2
  453. package/dist-esm/lib/utils/tldr/buildFromV1Document.mjs.map +2 -2
  454. package/package.json +12 -34
  455. package/src/index.ts +80 -24
  456. package/src/lib/Tldraw.tsx +15 -2
  457. package/src/lib/TldrawImage.tsx +6 -2
  458. package/src/lib/canvas/TldrawCropHandles.tsx +3 -1
  459. package/src/lib/canvas/TldrawHandles.tsx +5 -1
  460. package/src/lib/canvas/TldrawOverlays.tsx +1 -1
  461. package/src/lib/canvas/TldrawScribble.tsx +1 -1
  462. package/src/lib/canvas/TldrawSelectionForeground.tsx +5 -1
  463. package/src/lib/defaultExternalContentHandlers.ts +14 -5
  464. package/src/lib/shapes/arrow/ArrowShapeOptions.test.ts +2 -1
  465. package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +6 -5
  466. package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +53 -11
  467. package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +30 -46
  468. package/src/lib/shapes/arrow/arrowLabel.ts +31 -3
  469. package/src/lib/shapes/arrow/arrowTargetState.ts +3 -2
  470. package/src/lib/shapes/arrow/elbow/ElbowArrowDebug.tsx +3 -3
  471. package/src/lib/shapes/arrow/elbow/elbowArrowSnapLines.tsx +2 -2
  472. package/src/lib/shapes/arrow/toolStates/Pointing.tsx +3 -0
  473. package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +5 -5
  474. package/src/lib/shapes/draw/DrawShapeTool.test.ts +0 -5
  475. package/src/lib/shapes/draw/DrawShapeUtil.tsx +4 -7
  476. package/src/lib/shapes/embed/EmbedShapeUtil.tsx +1 -1
  477. package/src/lib/shapes/frame/FrameShapeTool.ts +1 -1
  478. package/src/lib/shapes/frame/FrameShapeUtil.tsx +35 -21
  479. package/src/lib/shapes/frame/components/FrameHeading.tsx +1 -1
  480. package/src/lib/shapes/frame/components/FrameLabelInput.tsx +3 -3
  481. package/src/lib/shapes/geo/GeoShapeUtil.tsx +4 -2
  482. package/src/lib/shapes/geo/components/GeoShapeBody.tsx +2 -2
  483. package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +7 -4
  484. package/src/lib/shapes/image/ImageShapeUtil.tsx +6 -3
  485. package/src/lib/shapes/line/LineShapeUtil.test.tsx +8 -7
  486. package/src/lib/shapes/line/LineShapeUtil.tsx +25 -6
  487. package/src/lib/shapes/line/__snapshots__/LineShapeUtil.test.tsx.snap +2 -2
  488. package/src/lib/shapes/note/NoteShapeTool.test.ts +2 -1
  489. package/src/lib/shapes/note/NoteShapeUtil.tsx +11 -4
  490. package/src/lib/shapes/shared/HyperlinkButton.tsx +5 -5
  491. package/src/lib/shapes/shared/PathBuilder.test.tsx +1 -1
  492. package/src/lib/shapes/shared/PathBuilder.tsx +35 -1
  493. package/src/lib/shapes/shared/PlainTextLabel.tsx +3 -7
  494. package/src/lib/shapes/shared/RichTextLabel.tsx +6 -1
  495. package/src/lib/shapes/shared/ShapeFill.tsx +5 -4
  496. package/src/lib/shapes/shared/SvgTextLabel.tsx +4 -2
  497. package/src/lib/shapes/shared/crop.ts +1 -0
  498. package/src/lib/shapes/shared/freehand/svg.ts +2 -0
  499. package/src/lib/shapes/shared/useEditablePlainText.ts +12 -12
  500. package/src/lib/shapes/shared/useEditableRichText.ts +7 -3
  501. package/src/lib/shapes/shared/useImageOrVideoAsset.ts +0 -7
  502. package/src/lib/shapes/shared/usePrefersReducedMotion.tsx +11 -1
  503. package/src/lib/shapes/text/PlainTextArea.tsx +3 -3
  504. package/src/lib/shapes/text/RichTextArea.tsx +3 -4
  505. package/src/lib/shapes/text/TextShapeTool.test.ts +6 -5
  506. package/src/lib/shapes/text/TextShapeUtil.tsx +8 -14
  507. package/src/lib/shapes/video/VideoShapeUtil.tsx +3 -3
  508. package/src/lib/styles.tsx +3 -1
  509. package/src/lib/tools/EraserTool/childStates/Erasing.ts +34 -1
  510. package/src/lib/tools/EraserTool/childStates/Pointing.ts +20 -0
  511. package/src/lib/tools/SelectTool/childStates/Crop/children/PointingCrop.ts +8 -1
  512. package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +54 -30
  513. package/src/lib/tools/SelectTool/childStates/Idle.ts +2 -24
  514. package/src/lib/tools/SelectTool/childStates/PointingShape.ts +7 -0
  515. package/src/lib/tools/SelectTool/childStates/Resizing.ts +12 -1
  516. package/src/lib/tools/SelectTool/childStates/Rotating.ts +11 -0
  517. package/src/lib/tools/SelectTool/childStates/Translating.ts +11 -1
  518. package/src/lib/tools/selection-logic/getHitShapeOnCanvasPointerDown.ts +1 -0
  519. package/src/lib/ui/TldrawUi.tsx +33 -12
  520. package/src/lib/ui/components/A11y.tsx +17 -15
  521. package/src/lib/ui/components/AccessibilityMenu.tsx +20 -0
  522. package/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx +15 -3
  523. package/src/lib/ui/components/{FollowingIndicator.tsx → DefaultFollowingIndicator.tsx} +2 -1
  524. package/src/lib/ui/components/DefaultMenuPanel.tsx +4 -3
  525. package/src/lib/ui/components/EditLinkDialog.tsx +16 -6
  526. package/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.tsx +46 -6
  527. package/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx +4 -2
  528. package/src/lib/ui/components/Minimap/MinimapManager.ts +4 -4
  529. package/src/lib/ui/components/MobileStylePanel.tsx +9 -6
  530. package/src/lib/ui/components/NavigationPanel/DefaultNavigationPanel.tsx +4 -5
  531. package/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx +5 -4
  532. package/src/lib/ui/components/SharePanel/PeopleMenuItem.tsx +4 -3
  533. package/src/lib/ui/components/SharePanel/UserPresenceColorPicker.tsx +3 -3
  534. package/src/lib/ui/components/Spinner.tsx +2 -24
  535. package/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx +28 -12
  536. package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +261 -342
  537. package/src/lib/ui/components/{primitives/TldrawUiButtonPicker.tsx → StylePanel/StylePanelButtonPicker.tsx} +66 -48
  538. package/src/lib/ui/components/StylePanel/StylePanelContext.tsx +63 -0
  539. package/src/lib/ui/components/StylePanel/{DoubleDropdownPicker.tsx → StylePanelDoubleDropdownPicker.tsx} +31 -22
  540. package/src/lib/ui/components/StylePanel/StylePanelDropdownPicker.tsx +119 -0
  541. package/src/lib/ui/components/StylePanel/StylePanelSubheading.tsx +9 -0
  542. package/src/lib/ui/components/Toolbar/AltTextEditor.tsx +5 -4
  543. package/src/lib/ui/components/Toolbar/DefaultImageToolbar.tsx +25 -9
  544. package/src/lib/ui/components/Toolbar/DefaultImageToolbarContent.tsx +33 -16
  545. package/src/lib/ui/components/Toolbar/DefaultToolbar.tsx +55 -23
  546. package/src/lib/ui/components/Toolbar/DefaultVideoToolbarContent.tsx +12 -4
  547. package/src/lib/ui/components/Toolbar/LinkEditor.tsx +5 -5
  548. package/src/lib/ui/components/Toolbar/OverflowingToolbar.tsx +212 -61
  549. package/src/lib/ui/components/Toolbar/ToggleToolLockedButton.tsx +17 -12
  550. package/src/lib/ui/components/menu-items.tsx +25 -0
  551. package/src/lib/ui/components/primitives/Button/TldrawUiButtonIcon.tsx +2 -2
  552. package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +8 -3
  553. package/src/lib/ui/components/primitives/TldrawUiDialog.tsx +1 -1
  554. package/src/lib/ui/components/primitives/TldrawUiIcon.tsx +41 -3
  555. package/src/lib/ui/components/primitives/TldrawUiInput.tsx +3 -3
  556. package/src/lib/ui/components/primitives/TldrawUiPopover.tsx +4 -2
  557. package/src/lib/ui/components/primitives/TldrawUiSlider.tsx +54 -29
  558. package/src/lib/ui/components/primitives/TldrawUiToolbar.tsx +59 -12
  559. package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +365 -0
  560. package/src/lib/ui/components/primitives/layout.tsx +107 -0
  561. package/src/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.tsx +2 -2
  562. package/src/lib/ui/components/primitives/menus/TldrawUiMenuContext.tsx +0 -1
  563. package/src/lib/ui/components/primitives/menus/TldrawUiMenuGroup.tsx +29 -16
  564. package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +224 -23
  565. package/src/lib/ui/context/TldrawUiContextProvider.tsx +23 -20
  566. package/src/lib/ui/context/actions.tsx +81 -18
  567. package/src/lib/ui/context/components.tsx +3 -0
  568. package/src/lib/ui/context/events.tsx +7 -3
  569. package/src/lib/ui/hooks/menu-hooks.ts +1 -0
  570. package/src/lib/ui/hooks/useClipboardEvents.ts +2 -2
  571. package/src/lib/ui/hooks/useExportAs.ts +3 -2
  572. package/src/lib/ui/hooks/useKeyboardShortcuts.ts +3 -2
  573. package/src/lib/ui/hooks/useTools.tsx +142 -11
  574. package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +13 -0
  575. package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +13 -0
  576. package/src/lib/ui/kbd-utils.ts +12 -4
  577. package/src/lib/ui/version.ts +3 -3
  578. package/src/lib/ui.css +432 -315
  579. package/src/lib/utils/excalidraw/__snapshots__/putExcalidrawContent.test.tsx.snap +21 -7
  580. package/src/lib/utils/excalidraw/putExcalidrawContent.ts +7 -7
  581. package/src/lib/utils/export/copyAs.ts +1 -24
  582. package/src/lib/utils/export/export.ts +0 -36
  583. package/src/lib/utils/export/exportAs.ts +1 -32
  584. package/src/lib/utils/tldr/__snapshots__/buildFromV1Document.test.ts.snap +28 -7
  585. package/src/lib/utils/tldr/buildFromV1Document.ts +2 -1
  586. package/src/test/A11y.test.tsx +3 -2
  587. package/src/test/ClickManager.test.ts +7 -6
  588. package/src/test/Editor.test.tsx +56 -28
  589. package/src/test/EraserTool.test.ts +184 -13
  590. package/src/test/HandTool.test.ts +10 -9
  591. package/src/test/HighlightShape.test.ts +2 -1
  592. package/src/test/SelectTool.test.ts +40 -13
  593. package/src/test/TLUserPreferences.test.ts +4 -3
  594. package/src/test/TestEditor.ts +13 -15
  595. package/src/test/TldrawEditor.test.tsx +26 -19
  596. package/src/test/ZoomTool.test.ts +7 -6
  597. package/src/test/__snapshots__/drawing.test.ts.snap +2 -2
  598. package/src/test/__snapshots__/groups.test.tsx.snap +6 -6
  599. package/src/test/__snapshots__/resizing.test.ts.snap +2 -2
  600. package/src/test/arrows-megabus.test.tsx +17 -10
  601. package/src/test/bindings.test.tsx +24 -37
  602. package/src/test/bookmark-shapes.test.ts +1 -8
  603. package/src/test/commands/__snapshots__/getSvgString.test.ts.snap +23 -7
  604. package/src/test/commands/__snapshots__/packShapes.test.ts.snap +8 -8
  605. package/src/test/commands/__snapshots__/zoomToFit.test.ts.snap +2 -2
  606. package/src/test/commands/alignShapes.test.tsx +25 -24
  607. package/src/test/commands/animationSpeed.test.ts +2 -1
  608. package/src/test/commands/centerOnPoint.test.ts +3 -2
  609. package/src/test/commands/clipboard.test.ts +3 -2
  610. package/src/test/commands/createShapes.test.ts +2 -1
  611. package/src/test/commands/deletePage.test.ts +84 -1
  612. package/src/test/commands/deleteShapes.test.ts +2 -1
  613. package/src/test/commands/distributeShapes.test.tsx +11 -10
  614. package/src/test/commands/getSvgString.test.ts +2 -1
  615. package/src/test/commands/packShapes.test.ts +5 -4
  616. package/src/test/commands/putContent.test.ts +1 -0
  617. package/src/test/commands/resizeShape.test.ts +2 -1
  618. package/src/test/commands/rotateShapes.test.ts +7 -6
  619. package/src/test/commands/setCamera.test.ts +4 -3
  620. package/src/test/commands/setCurrentPage.test.ts +3 -2
  621. package/src/test/commands/stackShapes.test.ts +11 -10
  622. package/src/test/commands/stretch.test.tsx +13 -12
  623. package/src/test/commands/updateShapes.test.ts +9 -5
  624. package/src/test/createDeepLink.test.tsx +2 -1
  625. package/src/test/cropping.test.ts +3 -2
  626. package/src/test/custom-clipping.test.ts +442 -0
  627. package/src/test/customSnapping.test.tsx +55 -41
  628. package/src/test/drawing.test.ts +2 -1
  629. package/src/test/flipShapes.test.ts +4 -3
  630. package/src/test/frames.test.ts +25 -24
  631. package/src/test/getCulledShapes.test.tsx +80 -4
  632. package/src/test/groups.test.tsx +6 -4
  633. package/src/test/handleDeepLink.test.tsx +2 -1
  634. package/src/test/inner-outer-margin.test.ts +315 -0
  635. package/src/test/maxShapes.test.ts +3 -2
  636. package/src/test/modifiers.test.ts +5 -4
  637. package/src/test/navigation.test.ts +264 -9
  638. package/src/test/panning.test.ts +2 -1
  639. package/src/test/perf/perf.test.ts +2 -1
  640. package/src/test/registerDeepLinkListener.test.tsx +10 -9
  641. package/src/test/resizing.test.ts +39 -38
  642. package/src/test/select.test.tsx +4 -3
  643. package/src/test/selection-omnibus.test.ts +11 -10
  644. package/src/test/shapeutils.test.ts +398 -48
  645. package/src/test/translating.test.ts +12 -11
  646. package/tldraw.css +759 -630
  647. package/dist-cjs/lib/ui/components/FollowingIndicator.js.map +0 -7
  648. package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js.map +0 -7
  649. package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js.map +0 -7
  650. package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js.map +0 -7
  651. package/dist-esm/lib/ui/components/FollowingIndicator.mjs.map +0 -7
  652. package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs.map +0 -7
  653. package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs.map +0 -7
  654. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs +0 -113
  655. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs.map +0 -7
  656. package/src/lib/ui/components/StylePanel/DropdownPicker.tsx +0 -109
package/tldraw.css CHANGED
@@ -9,57 +9,58 @@
9
9
  height: 100%;
10
10
  font-size: 12px;
11
11
  /* Spacing */
12
- --space-1: 2px;
13
- --space-2: 4px;
14
- --space-3: 8px;
15
- --space-4: 12px;
16
- --space-5: 16px;
17
- --space-6: 20px;
18
- --space-7: 28px;
19
- --space-8: 32px;
20
- --space-9: 64px;
21
- --space-10: 72px;
12
+ --tl-space-1: 2px;
13
+ --tl-space-2: 4px;
14
+ --tl-space-3: 8px;
15
+ --tl-space-4: 12px;
16
+ --tl-space-5: 16px;
17
+ --tl-space-6: 20px;
18
+ --tl-space-7: 28px;
19
+ --tl-space-8: 32px;
20
+ --tl-space-9: 64px;
21
+ --tl-space-10: 72px;
22
22
  /* Radius */
23
- --radius-0: 2px;
24
- --radius-1: 4px;
25
- --radius-2: 6px;
26
- --radius-3: 9px;
27
- --radius-4: 11px;
23
+ --tl-radius-0: 2px;
24
+ --tl-radius-1: 4px;
25
+ --tl-radius-2: 6px;
26
+ --tl-radius-3: 9px;
27
+ --tl-radius-4: 11px;
28
28
 
29
29
  /* Canvas z-index */
30
- --layer-canvas-hidden: -999999;
31
- --layer-canvas-background: 100;
32
- --layer-canvas-grid: 150;
33
- --layer-watermark: 200;
34
- --layer-canvas-shapes: 300;
35
- --layer-canvas-overlays: 500;
36
- --layer-canvas-blocker: 10000;
30
+ --tl-layer-canvas-hidden: -999999;
31
+ --tl-layer-canvas-background: 100;
32
+ --tl-layer-canvas-grid: 150;
33
+ --tl-layer-watermark: 200;
34
+ --tl-layer-canvas-shapes: 300;
35
+ --tl-layer-canvas-overlays: 500;
36
+ --tl-layer-canvas-in-front: 600;
37
+ --tl-layer-canvas-blocker: 10000;
37
38
 
38
39
  /* Canvas overlays z-index */
39
- --layer-overlays-collaborator-scribble: 10;
40
- --layer-overlays-collaborator-brush: 20;
41
- --layer-overlays-collaborator-shape-indicator: 30;
42
- --layer-overlays-user-scribble: 40;
43
- --layer-overlays-user-brush: 50;
44
- --layer-overlays-user-snapline: 90;
45
- --layer-overlays-selection-fg: 100;
40
+ --tl-layer-overlays-collaborator-scribble: 10;
41
+ --tl-layer-overlays-collaborator-brush: 20;
42
+ --tl-layer-overlays-collaborator-shape-indicator: 30;
43
+ --tl-layer-overlays-user-scribble: 40;
44
+ --tl-layer-overlays-user-brush: 50;
45
+ --tl-layer-overlays-user-snapline: 90;
46
+ --tl-layer-overlays-selection-fg: 100;
46
47
  /* User handles need to be above selection edges / corners, matters for sticky note clone handles */
47
- --layer-overlays-user-handles: 105;
48
- --layer-overlays-user-indicator-hint: 110;
49
- --layer-overlays-custom: 115;
50
- --layer-overlays-collaborator-cursor-hint: 120;
51
- --layer-overlays-collaborator-cursor: 130;
48
+ --tl-layer-overlays-user-handles: 105;
49
+ --tl-layer-overlays-user-indicator-hint: 110;
50
+ --tl-layer-overlays-custom: 115;
51
+ --tl-layer-overlays-collaborator-cursor-hint: 120;
52
+ --tl-layer-overlays-collaborator-cursor: 130;
52
53
 
53
54
  /* Text editor z-index */
54
- --layer-text-container: 1;
55
- --layer-text-content: 3;
56
- --layer-text-editor: 4;
55
+ --tl-layer-text-container: 1;
56
+ --tl-layer-text-content: 3;
57
+ --tl-layer-text-editor: 4;
57
58
 
58
59
  /* Error fallback z-index */
59
- --layer-error-overlay: 1;
60
- --layer-error-canvas: 2;
61
- --layer-error-canvas-after: 3;
62
- --layer-error-content: 4;
60
+ --tl-layer-error-overlay: 1;
61
+ --tl-layer-error-canvas: 2;
62
+ --tl-layer-error-canvas-after: 3;
63
+ --tl-layer-error-content: 4;
63
64
 
64
65
  /* Misc */
65
66
  --tl-zoom: 1;
@@ -124,12 +125,15 @@
124
125
  --tl-font-serif: 'tldraw_serif', serif;
125
126
  --tl-font-mono: 'tldraw_mono', monospace;
126
127
  /* text outline */
127
- --a: calc(min(0.5, 1 / var(--tl-zoom)) * 2px);
128
- --b: calc(min(0.5, 1 / var(--tl-zoom)) * -2px);
128
+ --tl-text-outline-a: calc(min(0.5, 1 / var(--tl-zoom)) * 2px);
129
+ --tl-text-outline-b: calc(min(0.5, 1 / var(--tl-zoom)) * -2px);
129
130
  --tl-text-outline-reference:
130
- 0 var(--b) 0 var(--color-background), 0 var(--a) 0 var(--color-background),
131
- var(--b) var(--b) 0 var(--color-background), var(--a) var(--b) 0 var(--color-background),
132
- var(--a) var(--a) 0 var(--color-background), var(--b) var(--a) 0 var(--color-background);
131
+ 0 var(--tl-text-outline-b) 0 var(--tl-color-background),
132
+ 0 var(--tl-text-outline-a) 0 var(--tl-color-background),
133
+ var(--tl-text-outline-b) var(--tl-text-outline-b) 0 var(--tl-color-background),
134
+ var(--tl-text-outline-a) var(--tl-text-outline-b) 0 var(--tl-color-background),
135
+ var(--tl-text-outline-a) var(--tl-text-outline-a) 0 var(--tl-color-background),
136
+ var(--tl-text-outline-b) var(--tl-text-outline-a) 0 var(--tl-color-background);
133
137
  --tl-text-outline: var(--tl-text-outline-reference);
134
138
  /* own properties */
135
139
  position: relative;
@@ -137,116 +141,118 @@
137
141
  height: 100%;
138
142
  width: 100%;
139
143
  overflow: clip;
140
- color: var(--color-text);
144
+ color: var(--tl-color-text);
141
145
  }
142
146
 
143
147
  .tl-theme__light {
144
148
  /* Canvas */
145
- --color-snap: hsl(0, 76%, 60%);
146
- --color-selection-fill: hsl(210, 100%, 56%, 24%);
147
- --color-selection-stroke: hsl(214, 84%, 56%);
148
- --color-background: hsl(210, 20%, 98%);
149
- --color-brush-fill: hsl(0, 0%, 56%, 10.2%);
150
- --color-brush-stroke: hsl(0, 0%, 56%, 25.1%);
151
- --color-grid: hsl(0, 0%, 43%);
149
+ --tl-color-snap: hsl(0, 76%, 60%);
150
+ --tl-color-selection-fill: hsl(210, 100%, 56%, 24%);
151
+ --tl-color-selection-stroke: hsl(214, 84%, 56%);
152
+ --tl-color-background: hsl(210, 20%, 98%);
153
+ --tl-color-brush-fill: hsl(0, 0%, 56%, 10.2%);
154
+ --tl-color-brush-stroke: hsl(0, 0%, 56%, 25.1%);
155
+ --tl-color-grid: hsl(0, 0%, 43%);
152
156
  /* UI */
153
- --color-low: hsl(204, 16%, 94%);
154
- --color-low-border: hsl(204, 16%, 92%);
155
- --color-culled: hsl(204, 14%, 93%);
156
- --color-muted-none: hsl(0, 0%, 0%, 0%);
157
- --color-muted-0: hsl(0, 0%, 0%, 2%);
158
- --color-muted-1: hsl(0, 0%, 0%, 10%);
159
- --color-muted-2: hsl(0, 0%, 0%, 4.3%);
160
- --color-hint: hsl(0, 0%, 0%, 5.5%);
161
- --color-overlay: hsl(0, 0%, 0%, 20%);
162
- --color-divider: hsl(0, 0%, 91%);
163
- --color-panel: hsl(0, 0%, 99%);
164
- --color-panel-contrast: hsl(0, 0%, 100%);
165
- --color-panel-overlay: hsl(0, 0%, 100%, 82%);
166
- --color-panel-transparent: hsla(0, 0%, 99%, 0%);
167
- --color-selected: hsl(214, 84%, 56%);
168
- --color-selected-contrast: hsl(0, 0%, 100%);
169
- --color-focus: hsl(219, 65%, 50%);
157
+ --tl-color-low: hsl(204, 16%, 94%);
158
+ --tl-color-low-border: hsl(204, 16%, 92%);
159
+ --tl-color-culled: hsl(204, 14%, 93%);
160
+ --tl-color-muted-none: hsl(0, 0%, 0%, 0%);
161
+ --tl-color-muted-0: hsl(0, 0%, 0%, 2%);
162
+ --tl-color-muted-1: hsl(0, 0%, 0%, 10%);
163
+ --tl-color-muted-2: hsl(0, 0%, 0%, 4.3%);
164
+ --tl-color-hint: hsl(0, 0%, 0%, 5.5%);
165
+ --tl-color-overlay: hsl(0, 0%, 0%, 20%);
166
+ --tl-color-divider: hsl(0, 0%, 91%);
167
+ --tl-color-panel: hsl(0, 0%, 99%);
168
+ --tl-color-panel-contrast: hsl(0, 0%, 100%);
169
+ --tl-color-panel-overlay: hsl(0, 0%, 100%, 82%);
170
+ --tl-color-panel-transparent: hsla(0, 0%, 99%, 0%);
171
+ --tl-color-selected: hsl(214, 84%, 56%);
172
+ --tl-color-selected-contrast: hsl(0, 0%, 100%);
173
+ --tl-color-focus: hsl(219, 65%, 50%);
174
+ --tl-color-tooltip: hsla(200, 14%, 4%, 1);
170
175
  /* 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(220, 2%, 65%);
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);
176
+ --tl-color-text: hsl(0, 0%, 0%);
177
+ --tl-color-text-0: hsl(0, 0%, 11%);
178
+ --tl-color-text-1: hsl(0, 0%, 18%);
179
+ --tl-color-text-3: hsl(204, 4%, 45%);
180
+ --tl-color-text-shadow: hsl(0, 0%, 100%);
181
+ --tl-color-text-highlight: hsl(52, 100%, 50%);
182
+ --tl-color-text-highlight-p3: color(display-p3 0.972 0.8205 0.05);
178
183
  /* 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%);
184
+ --tl-color-primary: hsl(214, 84%, 56%);
185
+ --tl-color-success: hsl(123, 46%, 34%);
186
+ --tl-color-info: hsl(201, 98%, 41%);
187
+ --tl-color-warning: hsl(27, 98%, 47%);
188
+ --tl-color-danger: hsl(0, 90%, 43%);
189
+ --tl-color-laser: hsl(0, 100%, 50%);
185
190
  /* Shadows */
186
- --shadow-1: 0px 1px 2px hsl(0, 0%, 0%, 25%), 0px 1px 3px hsl(0, 0%, 0%, 9%);
187
- --shadow-2:
191
+ --tl-shadow-1: 0px 1px 2px hsl(0, 0%, 0%, 25%), 0px 1px 3px hsl(0, 0%, 0%, 9%);
192
+ --tl-shadow-2:
188
193
  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:
194
+ 0px 2px 6px hsl(0, 0%, 0%, 0.1), inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
195
+ --tl-shadow-3:
191
196
  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:
197
+ inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
198
+ --tl-shadow-4:
194
199
  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);
200
+ 0px 2px 16px hsl(0, 0%, 0%, 6%), inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
196
201
  }
197
202
 
198
203
  .tl-theme__dark {
199
204
  /* 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%);
205
+ --tl-color-snap: hsl(0, 76%, 60%);
206
+ --tl-color-selection-fill: hsl(209, 100%, 57%, 20%);
207
+ --tl-color-selection-stroke: hsl(214, 84%, 56%);
208
+ --tl-color-background: hsl(240, 5%, 6.5%);
209
+ --tl-color-brush-fill: hsl(0, 0%, 71%, 5.1%);
210
+ --tl-color-brush-stroke: hsl(0, 0%, 71%, 25.1%);
211
+ --tl-color-grid: hsl(0, 0%, 40%);
207
212
  /* 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%);
213
+ --tl-color-low: hsl(260, 4.5%, 10.5%);
214
+ --tl-color-low-border: hsl(207, 10%, 10%);
215
+ --tl-color-culled: hsl(210, 11%, 19%);
216
+ --tl-color-muted-none: hsl(0, 0%, 100%, 0%);
217
+ --tl-color-muted-0: hsl(0, 0%, 100%, 2%);
218
+ --tl-color-muted-1: hsl(0, 0%, 100%, 10%);
219
+ --tl-color-muted-2: hsl(0, 0%, 100%, 5%);
220
+ --tl-color-hint: hsl(0, 0%, 100%, 7%);
221
+ --tl-color-overlay: hsl(0, 0%, 0%, 50%);
222
+ --tl-color-divider: hsl(240, 9%, 22%);
223
+ --tl-color-panel: hsl(235, 6.8%, 13.5%);
224
+ --tl-color-panel-contrast: hsl(245, 12%, 23%);
225
+ --tl-color-panel-overlay: hsl(210, 10%, 24%, 82%);
226
+ --tl-color-panel-transparent: hsla(235, 6.8%, 13.5%, 0%);
227
+ --tl-color-selected: hsl(217, 89%, 61%);
228
+ --tl-color-selected-contrast: hsl(0, 0%, 100%);
229
+ --tl-color-focus: hsl(217, 76%, 80%);
230
+ --tl-color-tooltip: hsla(0, 0%, 100%, 1);
225
231
  /* 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(210, 6%, 45%);
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);
232
+ --tl-color-text: hsl(210, 17%, 98%);
233
+ --tl-color-text-0: hsl(0, 9%, 94%);
234
+ --tl-color-text-1: hsl(0, 0%, 85%);
235
+ --tl-color-text-3: hsl(204, 4%, 75%);
236
+ --tl-color-text-shadow: hsl(210, 13%, 18%);
237
+ --tl-color-text-highlight: hsl(52, 100%, 41%);
238
+ --tl-color-text-highlight-p3: color(display-p3 0.8078 0.6225 0.0312);
233
239
  /* 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%);
240
+ --tl-color-primary: hsl(214, 84%, 56%);
241
+ --tl-color-success: hsl(123, 38%, 57%);
242
+ --tl-color-info: hsl(199, 92%, 56%);
243
+ --tl-color-warning: hsl(36, 100%, 57%);
244
+ --tl-color-danger: hsl(0, 82%, 66%);
245
+ --tl-color-laser: hsl(0, 100%, 50%);
240
246
  /* Shadows */
241
- --shadow-1:
247
+ --tl-shadow-1:
242
248
  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:
249
+ inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
250
+ --tl-shadow-2:
245
251
  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:
252
+ inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
253
+ --tl-shadow-3:
248
254
  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);
255
+ inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
250
256
  }
251
257
 
252
258
  .tl-counter-scaled {
@@ -272,7 +278,7 @@
272
278
  }
273
279
 
274
280
  .tl-container__focused {
275
- outline: 1px solid var(--color-low);
281
+ outline: 1px solid var(--tl-color-low);
276
282
  }
277
283
 
278
284
  input,
@@ -288,7 +294,7 @@ input,
288
294
  inset: 0px;
289
295
  height: 100%;
290
296
  width: 100%;
291
- color: var(--color-text);
297
+ color: var(--tl-color-text);
292
298
  cursor: var(--tl-cursor);
293
299
  overflow: clip;
294
300
  content-visibility: auto;
@@ -296,9 +302,16 @@ input,
296
302
  contain: strict;
297
303
  }
298
304
 
305
+ .tl-canvas__in-front {
306
+ position: absolute;
307
+ inset: 0;
308
+ pointer-events: none;
309
+ z-index: var(--tl-layer-canvas-in-front);
310
+ }
311
+
299
312
  .tl-shapes {
300
313
  position: relative;
301
- z-index: var(--layer-canvas-shapes);
314
+ z-index: var(--tl-layer-canvas-shapes);
302
315
  }
303
316
 
304
317
  .tl-overlays {
@@ -309,7 +322,7 @@ input,
309
322
  width: 100%;
310
323
  contain: strict;
311
324
  pointer-events: none;
312
- z-index: var(--layer-canvas-overlays);
325
+ z-index: var(--tl-layer-canvas-overlays);
313
326
  }
314
327
 
315
328
  .tl-overlays__item {
@@ -333,7 +346,7 @@ input,
333
346
  /* ------------------- Background ------------------- */
334
347
 
335
348
  .tl-background__wrapper {
336
- z-index: var(--layer-canvas-background);
349
+ z-index: var(--tl-layer-canvas-background);
337
350
  position: absolute;
338
351
  inset: 0px;
339
352
  height: 100%;
@@ -341,7 +354,7 @@ input,
341
354
  }
342
355
 
343
356
  .tl-background {
344
- background-color: var(--color-background);
357
+ background-color: var(--tl-color-background);
345
358
  width: 100%;
346
359
  height: 100%;
347
360
  }
@@ -355,12 +368,12 @@ input,
355
368
  height: 100%;
356
369
  touch-action: none;
357
370
  pointer-events: none;
358
- z-index: var(--layer-canvas-grid);
371
+ z-index: var(--tl-layer-canvas-grid);
359
372
  contain: strict;
360
373
  }
361
374
 
362
375
  .tl-grid-dot {
363
- fill: var(--color-grid);
376
+ fill: var(--tl-color-grid);
364
377
  }
365
378
 
366
379
  /* --------------------- Layers --------------------- */
@@ -378,54 +391,54 @@ input,
378
391
 
379
392
  /* back of the stack, behind user's stuff */
380
393
  .tl-collaborator__scribble {
381
- z-index: var(--layer-overlays-collaborator-scribble);
394
+ z-index: var(--tl-layer-overlays-collaborator-scribble);
382
395
  }
383
396
 
384
397
  .tl-collaborator__brush {
385
- z-index: var(--layer-overlays-collaborator-brush);
398
+ z-index: var(--tl-layer-overlays-collaborator-brush);
386
399
  }
387
400
 
388
401
  .tl-collaborator__shape-indicator {
389
- z-index: var(--layer-overlays-collaborator-shape-indicator);
402
+ z-index: var(--tl-layer-overlays-collaborator-shape-indicator);
390
403
  }
391
404
 
392
405
  .tl-user-scribble {
393
- z-index: var(--layer-overlays-user-scribble);
406
+ z-index: var(--tl-layer-overlays-user-scribble);
394
407
  }
395
408
 
396
409
  .tl-user-brush {
397
- z-index: var(--layer-overlays-user-brush);
410
+ z-index: var(--tl-layer-overlays-user-brush);
398
411
  }
399
412
 
400
413
  .tl-user-handles {
401
- z-index: var(--layer-overlays-user-handles);
414
+ z-index: var(--tl-layer-overlays-user-handles);
402
415
  }
403
416
 
404
417
  .tl-user-snapline {
405
- z-index: var(--layer-overlays-user-snapline);
418
+ z-index: var(--tl-layer-overlays-user-snapline);
406
419
  }
407
420
 
408
421
  .tl-selection__fg {
409
422
  pointer-events: none;
410
- z-index: var(--layer-overlays-selection-fg);
423
+ z-index: var(--tl-layer-overlays-selection-fg);
411
424
  }
412
425
 
413
426
  .tl-user-indicator__hint {
414
- z-index: var(--layer-overlays-user-indicator-hint);
427
+ z-index: var(--tl-layer-overlays-user-indicator-hint);
415
428
  stroke-width: calc(2.5px * var(--tl-scale));
416
429
  }
417
430
 
418
431
  .tl-custom-overlays {
419
- z-index: var(--layer-overlays-custom);
432
+ z-index: var(--tl-layer-overlays-custom);
420
433
  }
421
434
 
422
435
  /* behind collaborator cursor */
423
436
  .tl-collaborator__cursor-hint {
424
- z-index: var(--layer-overlays-collaborator-cursor-hint);
437
+ z-index: var(--tl-layer-overlays-collaborator-cursor-hint);
425
438
  }
426
439
 
427
440
  .tl-collaborator__cursor {
428
- z-index: var(--layer-overlays-collaborator-cursor);
441
+ z-index: var(--tl-layer-overlays-collaborator-cursor);
429
442
  }
430
443
 
431
444
  .tl-cursor {
@@ -446,32 +459,32 @@ input,
446
459
  .tl-selection__fg__outline {
447
460
  fill: none;
448
461
  pointer-events: none;
449
- stroke: var(--color-selection-stroke);
462
+ stroke: var(--tl-color-selection-stroke);
450
463
  stroke-width: calc(1.5px * var(--tl-scale));
451
464
  }
452
465
 
453
466
  .tl-corner-handle {
454
467
  pointer-events: none;
455
- stroke: var(--color-selection-stroke);
456
- fill: var(--color-background);
468
+ stroke: var(--tl-color-selection-stroke);
469
+ fill: var(--tl-color-background);
457
470
  stroke-width: calc(1.5px * var(--tl-scale));
458
471
  }
459
472
 
460
473
  .tl-text-handle {
461
474
  pointer-events: none;
462
- fill: var(--color-selection-stroke);
475
+ fill: var(--tl-color-selection-stroke);
463
476
  }
464
477
 
465
478
  .tl-corner-crop-handle {
466
479
  pointer-events: none;
467
480
  fill: none;
468
- stroke: var(--color-selection-stroke);
481
+ stroke: var(--tl-color-selection-stroke);
469
482
  }
470
483
 
471
484
  .tl-corner-crop-edge-handle {
472
485
  pointer-events: none;
473
486
  fill: none;
474
- stroke: var(--color-selection-stroke);
487
+ stroke: var(--tl-color-selection-stroke);
475
488
  }
476
489
 
477
490
  .tl-mobile-rotate__bg {
@@ -481,8 +494,8 @@ input,
481
494
 
482
495
  .tl-mobile-rotate__fg {
483
496
  pointer-events: none;
484
- stroke: var(--color-selection-stroke);
485
- fill: var(--color-background);
497
+ stroke: var(--tl-color-selection-stroke);
498
+ fill: var(--tl-color-background);
486
499
  stroke-width: calc(1.5px * var(--tl-scale));
487
500
  }
488
501
 
@@ -512,8 +525,8 @@ input,
512
525
  text-overflow: ellipsis;
513
526
  font-size: 12px;
514
527
  font-family: var(--font-body);
515
- border-radius: var(--radius-2);
516
- color: var(--color-selected-contrast);
528
+ border-radius: var(--tl-radius-2);
529
+ color: var(--tl-color-selected-contrast);
517
530
  }
518
531
 
519
532
  .tl-nametag-title {
@@ -531,7 +544,7 @@ input,
531
544
  font-size: 12px;
532
545
  font-family: var(--font-body);
533
546
  text-shadow: var(--tl-text-outline);
534
- color: var(--color-selected-contrast);
547
+ color: var(--tl-color-selected-contrast);
535
548
  }
536
549
 
537
550
  .tl-nametag-chat {
@@ -540,31 +553,31 @@ input,
540
553
  left: 13px;
541
554
  width: fit-content;
542
555
  height: fit-content;
543
- color: var(--color-selected-contrast);
556
+ color: var(--tl-color-selected-contrast);
544
557
  white-space: nowrap;
545
558
  position: absolute;
546
559
  padding: 3px 6px;
547
560
  font-size: 12px;
548
561
  font-family: var(--font-body);
549
562
  opacity: 1;
550
- border-radius: var(--radius-2);
563
+ border-radius: var(--tl-radius-2);
551
564
  }
552
565
 
553
566
  .tl-cursor-chat {
554
567
  position: absolute;
555
- color: var(--color-selected-contrast);
568
+ color: var(--tl-color-selected-contrast);
556
569
  white-space: nowrap;
557
570
  padding: 3px 6px;
558
571
  font-size: 12px;
559
572
  font-family: var(--font-body);
560
573
  pointer-events: none;
561
- z-index: var(--layer-cursor);
574
+ z-index: var(--tl-layer-cursor);
562
575
  margin-top: 16px;
563
576
  margin-left: 13px;
564
577
  opacity: 1;
565
578
  border: none;
566
579
  user-select: text;
567
- border-radius: var(--radius-2);
580
+ border-radius: var(--tl-radius-2);
568
581
  }
569
582
 
570
583
  .tl-cursor-chat .tl-cursor-chat__bubble {
@@ -572,13 +585,13 @@ input,
572
585
  }
573
586
 
574
587
  .tl-cursor-chat::selection {
575
- background: var(--color-selected);
576
- color: var(--color-selected-contrast);
588
+ background: var(--tl-color-selected);
589
+ color: var(--tl-color-selected-contrast);
577
590
  text-shadow: none;
578
591
  }
579
592
 
580
593
  .tl-cursor-chat::placeholder {
581
- color: var(--color-selected-contrast);
594
+ color: var(--tl-color-selected-contrast);
582
595
  opacity: 0.7;
583
596
  }
584
597
 
@@ -649,7 +662,7 @@ input,
649
662
  background: none;
650
663
  border-image: none;
651
664
  border: 0px;
652
- caret-color: var(--color-text);
665
+ caret-color: var(--tl-color-text);
653
666
  color: inherit;
654
667
  column-count: initial !important;
655
668
  display: inline-block;
@@ -680,11 +693,17 @@ input,
680
693
  }
681
694
 
682
695
  .tl-text-measure {
696
+ z-index: var(--tl-layer-canvas-hidden);
697
+ opacity: 0;
698
+ visibility: hidden;
699
+
700
+ /* pointer-events: all; */
701
+ /* opacity: 1; */
702
+ /* z-index: 99999; */
703
+
683
704
  position: absolute;
684
- z-index: var(--layer-canvas-hidden);
685
705
  top: 0px;
686
706
  left: 0px;
687
- opacity: 0;
688
707
  width: max-content;
689
708
  box-sizing: border-box;
690
709
  pointer-events: none;
@@ -695,7 +714,6 @@ input,
695
714
  border: none;
696
715
  user-select: none;
697
716
  contain: style paint;
698
- visibility: hidden;
699
717
  /* N.B. This property, while discouraged ("intended for Document Type Definition (DTD) designers") is necessary for ensuring correct mixed RTL/LTR behavior when exporting SVGs. */
700
718
  unicode-bidi: plaintext;
701
719
  -webkit-user-select: none;
@@ -744,8 +762,8 @@ input,
744
762
  }
745
763
 
746
764
  .tl-text-input::selection {
747
- background: var(--color-selected);
748
- color: var(--color-selected-contrast);
765
+ background: var(--tl-color-selected);
766
+ color: var(--tl-color-selected-contrast);
749
767
  text-shadow: none;
750
768
  }
751
769
 
@@ -755,7 +773,7 @@ input,
755
773
  display: flex;
756
774
  justify-content: center;
757
775
  align-items: center;
758
- color: var(--color-text);
776
+ color: var(--tl-color-text);
759
777
  text-shadow: var(--tl-text-outline);
760
778
  line-height: inherit;
761
779
  position: absolute;
@@ -778,8 +796,7 @@ input,
778
796
  position: static;
779
797
  }
780
798
 
781
- .tl-text-wrapper[data-isediting='false'] .tl-text-input,
782
- .tl-arrow-label[data-isediting='false'] .tl-text-input {
799
+ .tl-text-wrapper[data-isediting='false'] .tl-text-input {
783
800
  opacity: 0;
784
801
  cursor: var(--tl-cursor-default);
785
802
  }
@@ -800,7 +817,7 @@ input,
800
817
 
801
818
  .tl-text-wrapper .tl-text-content {
802
819
  pointer-events: all;
803
- z-index: var(--layer-text-content);
820
+ z-index: var(--tl-layer-text-content);
804
821
  }
805
822
 
806
823
  .tl-text-label__inner > .tl-text-content {
@@ -810,7 +827,7 @@ input,
810
827
  padding: inherit;
811
828
  height: fit-content;
812
829
  width: fit-content;
813
- border-radius: var(--radius-1);
830
+ border-radius: var(--tl-radius-1);
814
831
  max-width: 100%;
815
832
  }
816
833
 
@@ -823,7 +840,7 @@ input,
823
840
  }
824
841
 
825
842
  .tl-text-wrapper[data-isselected='true'] .tl-text-input {
826
- z-index: var(--layer-text-editor);
843
+ z-index: var(--tl-layer-text-editor);
827
844
  pointer-events: all;
828
845
  }
829
846
 
@@ -918,7 +935,7 @@ input,
918
935
  }
919
936
 
920
937
  .tl-rich-text a {
921
- color: var(--color-primary);
938
+ color: var(--tl-color-primary);
922
939
  text-decoration: underline;
923
940
  }
924
941
 
@@ -941,14 +958,14 @@ input,
941
958
  }
942
959
 
943
960
  .tl-theme__dark .tl-rich-text mark {
944
- background-color: var(--color-text-highlight);
961
+ background-color: var(--tl-color-text-highlight);
945
962
  color: currentColor;
946
963
  }
947
964
 
948
965
  @supports (color: color(display-p3 1 1 1)) {
949
966
  @media (color-gamut: p3) {
950
967
  .tl-container:not(.tl-theme__force-sRGB) .tl-rich-text mark {
951
- background-color: var(--color-text-highlight-p3);
968
+ background-color: var(--tl-color-text-highlight-p3);
952
969
  }
953
970
  }
954
971
  }
@@ -960,26 +977,26 @@ input,
960
977
  /* --------------------- Loading -------------------- */
961
978
 
962
979
  .tl-loading {
963
- background-color: var(--color-background);
964
- color: var(--color-text-1);
980
+ background-color: var(--tl-color-background);
981
+ color: var(--tl-color-text-1);
965
982
  height: 100%;
966
983
  width: 100%;
967
984
  display: flex;
968
985
  flex-direction: column;
969
986
  justify-content: center;
970
987
  align-items: center;
971
- gap: var(--space-2);
988
+ gap: var(--tl-space-2);
972
989
  font-size: 14px;
973
990
  font-weight: 500;
974
991
  opacity: 0;
975
- animation: fade-in 0.2s ease-in-out forwards;
992
+ animation: tl-fade-in 0.2s ease-in-out forwards;
976
993
  animation-delay: 0.2s;
977
994
  position: absolute;
978
995
  inset: 0px;
979
- z-index: var(--layer-canvas-blocker);
996
+ z-index: var(--tl-layer-canvas-blocker);
980
997
  }
981
998
 
982
- @keyframes fade-in {
999
+ @keyframes tl-fade-in {
983
1000
  0% {
984
1001
  opacity: 0;
985
1002
  }
@@ -988,6 +1005,19 @@ input,
988
1005
  }
989
1006
  }
990
1007
 
1008
+ .tl-spinner {
1009
+ animation: tl-spin 1s linear infinite;
1010
+ }
1011
+
1012
+ @keyframes tl-spin {
1013
+ 0% {
1014
+ transform: rotate(0deg);
1015
+ }
1016
+ 100% {
1017
+ transform: rotate(360deg);
1018
+ }
1019
+ }
1020
+
991
1021
  /* ---------------------- Brush --------------------- */
992
1022
 
993
1023
  .tl-brush {
@@ -996,8 +1026,8 @@ input,
996
1026
  }
997
1027
 
998
1028
  .tl-brush__default {
999
- stroke: var(--color-brush-stroke);
1000
- fill: var(--color-brush-fill);
1029
+ stroke: var(--tl-color-brush-stroke);
1030
+ fill: var(--tl-color-brush-fill);
1001
1031
  }
1002
1032
 
1003
1033
  /* -------------------- Scribble -------------------- */
@@ -1012,13 +1042,13 @@ input,
1012
1042
  /* ---------------------- Snaps --------------------- */
1013
1043
 
1014
1044
  .tl-snap-indicator {
1015
- stroke: var(--color-snap);
1045
+ stroke: var(--tl-color-snap);
1016
1046
  stroke-width: calc(1px * var(--tl-scale));
1017
1047
  fill: none;
1018
1048
  }
1019
1049
 
1020
1050
  .tl-snap-point {
1021
- stroke: var(--color-snap);
1051
+ stroke: var(--tl-color-snap);
1022
1052
  stroke-width: calc(1px * var(--tl-scale));
1023
1053
  fill: none;
1024
1054
  }
@@ -1038,7 +1068,7 @@ input,
1038
1068
  justify-content: center;
1039
1069
  font-size: 12px;
1040
1070
  font-weight: 400;
1041
- color: var(--color-text-1);
1071
+ color: var(--tl-color-text-1);
1042
1072
  padding: 13px;
1043
1073
  cursor: var(--tl-cursor-pointer);
1044
1074
  border: none;
@@ -1056,13 +1086,13 @@ input,
1056
1086
  display: block;
1057
1087
  width: calc(100% - 12px);
1058
1088
  height: calc(100% - 12px);
1059
- border-radius: var(--radius-1);
1060
- background-color: var(--color-background);
1089
+ border-radius: var(--tl-radius-1);
1090
+ background-color: var(--tl-color-background);
1061
1091
  pointer-events: none;
1062
1092
  }
1063
1093
 
1064
1094
  .tl-hyperlink-button:focus-visible {
1065
- color: var(--color-selected);
1095
+ color: var(--tl-color-selected);
1066
1096
  }
1067
1097
 
1068
1098
  .tl-hyperlink__icon {
@@ -1089,8 +1119,8 @@ input,
1089
1119
  }
1090
1120
 
1091
1121
  .tl-handle__fg {
1092
- fill: var(--color-selected-contrast);
1093
- stroke: var(--color-selection-stroke);
1122
+ fill: var(--tl-color-selected-contrast);
1123
+ stroke: var(--tl-color-selection-stroke);
1094
1124
  stroke-width: calc(1.5px * var(--tl-scale));
1095
1125
  pointer-events: none;
1096
1126
  }
@@ -1100,7 +1130,7 @@ input,
1100
1130
  }
1101
1131
 
1102
1132
  .tl-handle__clone > .tl-handle__fg {
1103
- fill: var(--color-selection-stroke);
1133
+ fill: var(--tl-color-selection-stroke);
1104
1134
  stroke: none;
1105
1135
  }
1106
1136
 
@@ -1110,7 +1140,7 @@ input,
1110
1140
 
1111
1141
  @media (pointer: coarse) {
1112
1142
  .tl-handle__bg:active {
1113
- fill: var(--color-selection-fill);
1143
+ fill: var(--tl-color-selection-fill);
1114
1144
  }
1115
1145
 
1116
1146
  .tl-handle__create {
@@ -1166,20 +1196,20 @@ input,
1166
1196
  stroke-linejoin: round;
1167
1197
  /* content-visibility: auto; */
1168
1198
  transform-origin: top left;
1169
- color: var(--color-text-1);
1199
+ color: var(--tl-color-text-1);
1170
1200
  }
1171
1201
 
1172
1202
  /* -------------------- Group shape ------------------ */
1173
1203
 
1174
1204
  .tl-group {
1175
- stroke: var(--color-text);
1205
+ stroke: var(--tl-color-text);
1176
1206
  stroke-width: calc(1px * var(--tl-scale));
1177
1207
  opacity: 0.5;
1178
1208
  }
1179
1209
 
1180
1210
  /* --------------------- Arrow shape -------------------- */
1181
1211
 
1182
- .tl-arrow-label {
1212
+ .tl-shape[data-shape-type='arrow'] .tl-text-label {
1183
1213
  position: absolute;
1184
1214
  top: -1px;
1185
1215
  left: -1px;
@@ -1190,56 +1220,38 @@ input,
1190
1220
  justify-content: center;
1191
1221
  align-items: center;
1192
1222
  text-align: center;
1193
- color: var(--color-text);
1223
+ color: var(--tl-color-text);
1194
1224
  text-shadow: var(--tl-text-outline);
1195
1225
  }
1196
1226
 
1197
- .tl-arrow-label[data-isediting='true'] p {
1198
- opacity: 0;
1199
- }
1200
-
1201
- .tl-arrow-label__inner {
1202
- border-radius: var(--radius-1);
1227
+ .tl-shape[data-shape-type='arrow'] .tl-text-label__inner {
1228
+ border-radius: var(--tl-radius-1);
1203
1229
  box-sizing: content-box;
1204
- position: relative;
1205
1230
  height: max-content;
1206
1231
  width: max-content;
1207
- pointer-events: none;
1208
- display: flex;
1209
- justify-content: center;
1210
- align-items: center;
1211
1232
  }
1212
1233
 
1213
- .tl-arrow-label .tl-arrow {
1214
- position: relative;
1234
+ .tl-shape[data-shape-type='arrow'] .tl-text {
1215
1235
  height: max-content;
1216
- padding: inherit;
1217
- overflow: visible;
1218
- }
1219
-
1220
- .tl-arrow-label textarea {
1221
- padding: inherit;
1222
- /* Don't allow textarea to be zero width */
1223
- min-width: 4px;
1224
1236
  }
1225
1237
 
1226
1238
  .tl-arrow-hint {
1227
- stroke: var(--color-text-1);
1239
+ stroke: var(--tl-color-text-1);
1228
1240
  fill: none;
1229
1241
  stroke-linecap: round;
1230
1242
  overflow: visible;
1231
1243
  }
1232
1244
 
1233
1245
  .tl-arrow-hint-handle {
1234
- fill: var(--color-selected-contrast);
1235
- stroke: var(--color-selection-stroke);
1246
+ fill: var(--tl-color-selected-contrast);
1247
+ stroke: var(--tl-color-selection-stroke);
1236
1248
  stroke-width: calc(1.5px * var(--tl-scale));
1237
1249
  r: calc(4px * var(--tl-scale));
1238
1250
  }
1239
1251
 
1240
1252
  .tl-arrow-hint-snap {
1241
1253
  stroke: transparent;
1242
- fill: var(--color-selection-fill);
1254
+ fill: var(--tl-color-selection-fill);
1243
1255
  r: calc(12px * var(--tl-scale));
1244
1256
  }
1245
1257
 
@@ -1259,40 +1271,40 @@ input,
1259
1271
  width: 100%;
1260
1272
  height: 100%;
1261
1273
  position: relative;
1262
- border: 1px solid var(--color-panel-contrast);
1263
- background-color: var(--color-panel);
1264
- border-radius: var(--radius-2);
1274
+ border: 1px solid var(--tl-color-panel-contrast);
1275
+ background-color: var(--tl-color-panel);
1276
+ border-radius: var(--tl-radius-2);
1265
1277
  display: flex;
1266
1278
  flex-direction: column;
1267
1279
  overflow: hidden;
1268
1280
  }
1269
1281
 
1270
1282
  .tl-bookmark__container--safariExport {
1271
- border: 1px solid var(--color-divider);
1283
+ border: 1px solid var(--tl-color-divider);
1272
1284
  }
1273
1285
 
1274
1286
  .tl-bookmark__image_container {
1275
1287
  flex: 1 1 100%;
1276
1288
  overflow: hidden;
1277
- border-top-left-radius: var(--radius-1);
1278
- border-top-right-radius: var(--radius-1);
1289
+ border-top-left-radius: var(--tl-radius-1);
1290
+ border-top-right-radius: var(--tl-radius-1);
1279
1291
  width: 100%;
1280
1292
  height: 100%;
1281
1293
  display: flex;
1282
1294
  justify-content: flex-end;
1283
1295
  align-items: flex-start;
1284
- box-shadow: inset 0px 0px 0px 1px var(--color-divider);
1296
+ box-shadow: inset 0px 0px 0px 1px var(--tl-color-divider);
1285
1297
  }
1286
1298
 
1287
1299
  .tl-bookmark__image_container > .tl-hyperlink-button::after {
1288
- background-color: var(--color-panel);
1300
+ background-color: var(--tl-color-panel);
1289
1301
  }
1290
1302
 
1291
1303
  .tl-bookmark__placeholder {
1292
1304
  width: 100%;
1293
1305
  height: 100%;
1294
- background-color: var(--color-muted-2);
1295
- border-bottom: 1px solid var(--color-muted-2);
1306
+ background-color: var(--tl-color-muted-2);
1307
+ border-bottom: 1px solid var(--tl-color-muted-2);
1296
1308
  }
1297
1309
 
1298
1310
  .tl-bookmark__image {
@@ -1300,12 +1312,12 @@ input,
1300
1312
  height: 100%;
1301
1313
  object-fit: cover;
1302
1314
  object-position: center;
1303
- border-bottom: 1px solid var(--color-muted-2);
1315
+ border-bottom: 1px solid var(--tl-color-muted-2);
1304
1316
  }
1305
1317
 
1306
1318
  .tl-bookmark__copy_container {
1307
- background-color: var(--color-muted-0);
1308
- padding: var(--space-4);
1319
+ background-color: var(--tl-color-muted-0);
1320
+ padding: var(--tl-space-4);
1309
1321
  pointer-events: all;
1310
1322
  display: flex;
1311
1323
  flex-direction: column;
@@ -1325,7 +1337,7 @@ input,
1325
1337
  font-size: 16px;
1326
1338
  line-height: 1.6;
1327
1339
  font-weight: bold;
1328
- padding-bottom: var(--space-2);
1340
+ padding-bottom: var(--tl-space-2);
1329
1341
  overflow: hidden;
1330
1342
  max-height: calc((16px * 1.6) * 2);
1331
1343
  -webkit-box-orient: vertical;
@@ -1345,19 +1357,19 @@ input,
1345
1357
  line-clamp: 3;
1346
1358
  text-overflow: ellipsis;
1347
1359
  display: -webkit-box;
1348
- color: var(--color-text-2);
1349
- margin: var(--space-2) 0px;
1360
+ color: var(--tl-color-text-2);
1361
+ margin: var(--tl-space-2) 0px;
1350
1362
  }
1351
1363
 
1352
1364
  .tl-bookmark__heading + .tl-bookmark__link,
1353
1365
  .tl-bookmark__description + .tl-bookmark__link {
1354
- margin-top: var(--space-3);
1366
+ margin-top: var(--tl-space-3);
1355
1367
  }
1356
1368
  .tl-bookmark__link {
1357
1369
  font-size: 12px;
1358
1370
  pointer-events: all;
1359
1371
  display: flex;
1360
- color: var(--color-text-2);
1372
+ color: var(--tl-color-text-2);
1361
1373
  align-items: center;
1362
1374
  cursor: var(--tl-cursor-pointer);
1363
1375
  width: fit-content;
@@ -1399,7 +1411,7 @@ input,
1399
1411
  width: 100%;
1400
1412
  height: 100%;
1401
1413
  pointer-events: all;
1402
- /* background-color: var(--color-background); */
1414
+ /* background-color: var(--tl-color-background); */
1403
1415
 
1404
1416
  display: flex;
1405
1417
  justify-content: center;
@@ -1428,7 +1440,7 @@ input,
1428
1440
  height: 100%;
1429
1441
  pointer-events: all;
1430
1442
  opacity: 1;
1431
- z-index: var(--layer-text-container);
1443
+ z-index: var(--tl-layer-text-container);
1432
1444
  border-radius: 1px;
1433
1445
  }
1434
1446
 
@@ -1444,22 +1456,22 @@ input,
1444
1456
  }
1445
1457
 
1446
1458
  .tl-frame__creating {
1447
- stroke: var(--color-selected);
1459
+ stroke: var(--tl-color-selected);
1448
1460
  fill: none;
1449
1461
  }
1450
1462
 
1451
1463
  .tl-frame-heading {
1452
- --frame-padding-x: 6px;
1453
- --frame-height: 24px;
1454
- --frame-minimum-width: 32px;
1455
- --frame-offset-width: 16px;
1464
+ --tl-frame-padding-x: 6px;
1465
+ --tl-frame-height: 24px;
1466
+ --tl-frame-minimum-width: 32px;
1467
+ --tl-frame-offset-width: 16px;
1456
1468
  display: flex;
1457
1469
  align-items: center;
1458
1470
  position: absolute;
1459
1471
  transform-origin: 0% 100%;
1460
1472
  overflow: hidden;
1461
1473
  max-width: 100%;
1462
- min-width: var(--frame-minimum-width);
1474
+ min-width: var(--tl-frame-minimum-width);
1463
1475
  height: auto;
1464
1476
  font-size: 12px;
1465
1477
  padding-bottom: 4px;
@@ -1471,18 +1483,18 @@ input,
1471
1483
  /* scale from bottom left corner so we can pin it to the top left corner of the frame */
1472
1484
  transform-origin: 0% 100%;
1473
1485
  display: flex;
1474
- height: var(--frame-height);
1486
+ height: var(--tl-frame-height);
1475
1487
  width: 100%;
1476
1488
  align-items: center;
1477
- border-radius: var(--radius-1);
1489
+ border-radius: var(--tl-radius-1);
1478
1490
  }
1479
1491
 
1480
1492
  .tl-frame-label {
1481
1493
  pointer-events: all;
1482
1494
  overflow: hidden;
1483
1495
  text-overflow: ellipsis;
1484
- padding: 0px var(--frame-padding-x);
1485
- border-radius: var(--radius-1);
1496
+ padding: 0px var(--tl-frame-padding-x);
1497
+ border-radius: var(--tl-radius-1);
1486
1498
  position: relative;
1487
1499
  font-size: inherit;
1488
1500
  white-space: pre;
@@ -1492,12 +1504,12 @@ input,
1492
1504
  color: transparent;
1493
1505
  white-space: pre;
1494
1506
  width: auto;
1495
- min-width: var(--frame-minimum-width);
1507
+ min-width: var(--tl-frame-minimum-width);
1496
1508
  height: 100%;
1497
1509
  overflow: visible;
1498
- background-color: var(--color-panel);
1499
- border-color: var(--color-selected);
1500
- box-shadow: inset 0px 0px 0px 1.5px var(--color-selected);
1510
+ background-color: var(--tl-color-panel);
1511
+ border-color: var(--tl-color-selected);
1512
+ box-shadow: inset 0px 0px 0px 1.5px var(--tl-color-selected);
1501
1513
  }
1502
1514
 
1503
1515
  .tl-frame-name-input {
@@ -1505,7 +1517,7 @@ input,
1505
1517
  border: none;
1506
1518
  background: none;
1507
1519
  outline: none;
1508
- padding: 0px var(--frame-padding-x);
1520
+ padding: 0px var(--tl-frame-padding-x);
1509
1521
  inset: 0px;
1510
1522
  height: 100%;
1511
1523
  width: 100%;
@@ -1513,8 +1525,8 @@ input,
1513
1525
  font-family: inherit;
1514
1526
  font-weight: inherit;
1515
1527
  width: 100%;
1516
- color: var(--color-text-1);
1517
- border-radius: var(--radius-1);
1528
+ color: var(--tl-color-text-1);
1529
+ border-radius: var(--tl-radius-1);
1518
1530
  user-select: all;
1519
1531
  -webkit-user-select: text;
1520
1532
  white-space: pre;
@@ -1534,7 +1546,7 @@ input,
1534
1546
 
1535
1547
  .tl-embed {
1536
1548
  border: none;
1537
- border-radius: var(--radius-2);
1549
+ border-radius: var(--tl-radius-2);
1538
1550
  }
1539
1551
 
1540
1552
  /* -------------- Shape error boundary -------------- */
@@ -1542,11 +1554,11 @@ input,
1542
1554
  .tl-shape-error-boundary {
1543
1555
  width: 100%;
1544
1556
  height: 100%;
1545
- background-color: var(--color-muted-1);
1557
+ background-color: var(--tl-color-muted-1);
1546
1558
  border-width: calc(1px * var(--tl-scale));
1547
- border-color: var(--color-muted-1);
1559
+ border-color: var(--tl-color-muted-1);
1548
1560
  border-style: solid;
1549
- border-radius: calc(var(--radius-1) * var(--tl-scale));
1561
+ border-radius: calc(var(--tl-radius-1) * var(--tl-scale));
1550
1562
  display: flex;
1551
1563
  flex-direction: column;
1552
1564
  align-items: center;
@@ -1555,7 +1567,7 @@ input,
1555
1567
  position: relative;
1556
1568
  pointer-events: all;
1557
1569
  overflow: hidden;
1558
- padding: var(--space-2);
1570
+ padding: var(--tl-space-2);
1559
1571
  }
1560
1572
 
1561
1573
  .tl-shape-error-boundary::before {
@@ -1563,7 +1575,7 @@ input,
1563
1575
  content: 'Error';
1564
1576
  font-size: 12px;
1565
1577
  font-family: inherit;
1566
- color: var(--color-text-0);
1578
+ color: var(--tl-color-text-0);
1567
1579
  }
1568
1580
 
1569
1581
  /* ----------------- Error boundary ----------------- */
@@ -1574,9 +1586,9 @@ input,
1574
1586
  display: flex;
1575
1587
  align-items: center;
1576
1588
  justify-content: center;
1577
- padding: var(--space-4);
1578
- background-color: var(--color-background);
1579
- color: var(--color-text-1);
1589
+ padding: var(--tl-space-4);
1590
+ background-color: var(--tl-color-background);
1591
+ color: var(--tl-color-text-1);
1580
1592
  position: absolute;
1581
1593
  }
1582
1594
 
@@ -1585,8 +1597,8 @@ input,
1585
1597
  inset: 0px;
1586
1598
  height: 100%;
1587
1599
  width: 100%;
1588
- z-index: var(--layer-error-overlay);
1589
- background-color: var(--color-overlay);
1600
+ z-index: var(--tl-layer-error-overlay);
1601
+ background-color: var(--tl-color-overlay);
1590
1602
  }
1591
1603
 
1592
1604
  .tl-error-boundary__content * {
@@ -1601,7 +1613,7 @@ input,
1601
1613
  inset: 0px;
1602
1614
  height: 100%;
1603
1615
  width: 100%;
1604
- z-index: var(--layer-error-canvas);
1616
+ z-index: var(--tl-layer-error-canvas);
1605
1617
  }
1606
1618
 
1607
1619
  /* some browsers seem to have some weird interactions between stacking contexts
@@ -1614,7 +1626,7 @@ it from receiving any pointer events or affecting the cursor. */
1614
1626
  inset: 0px;
1615
1627
  height: 100%;
1616
1628
  width: 100%;
1617
- z-index: var(--layer-error-canvas-after);
1629
+ z-index: var(--tl-layer-error-canvas-after);
1618
1630
  pointer-events: all;
1619
1631
  }
1620
1632
 
@@ -1624,16 +1636,16 @@ it from receiving any pointer events or affecting the cursor. */
1624
1636
  max-width: 100%;
1625
1637
  width: 400px;
1626
1638
  max-height: 100%;
1627
- background-color: var(--color-panel);
1639
+ background-color: var(--tl-color-panel);
1628
1640
  padding: 16px;
1629
1641
  border-radius: 16px;
1630
- box-shadow: var(--shadow-2);
1642
+ box-shadow: var(--tl-shadow-2);
1631
1643
  font-size: 14px;
1632
1644
  font-weight: 400;
1633
1645
  display: flex;
1634
1646
  flex-direction: column;
1635
1647
  overflow: auto;
1636
- z-index: var(--layer-error-content);
1648
+ z-index: var(--tl-layer-error-content);
1637
1649
  gap: 12px;
1638
1650
  }
1639
1651
 
@@ -1648,10 +1660,10 @@ it from receiving any pointer events or affecting the cursor. */
1648
1660
  }
1649
1661
 
1650
1662
  .tl-error-boundary__content h4 {
1651
- border: 1px solid var(--color-low-border);
1663
+ border: 1px solid var(--tl-color-low-border);
1652
1664
  margin: -6px 0 0 0;
1653
- padding: var(--space-5);
1654
- border-radius: var(--radius-2);
1665
+ padding: var(--tl-space-5);
1666
+ border-radius: var(--tl-radius-2);
1655
1667
  font-weight: normal;
1656
1668
  }
1657
1669
 
@@ -1661,10 +1673,10 @@ it from receiving any pointer events or affecting the cursor. */
1661
1673
  }
1662
1674
 
1663
1675
  .tl-error-boundary__content pre {
1664
- background-color: var(--color-muted-2);
1676
+ background-color: var(--tl-color-muted-2);
1665
1677
  margin-top: 0;
1666
- padding: var(--space-5);
1667
- border-radius: var(--radius-2);
1678
+ padding: var(--tl-space-5);
1679
+ border-radius: var(--tl-radius-2);
1668
1680
  overflow: auto;
1669
1681
  font-size: 12px;
1670
1682
  max-height: 320px;
@@ -1676,15 +1688,15 @@ it from receiving any pointer events or affecting the cursor. */
1676
1688
  font-family: inherit;
1677
1689
  font-size: 14px;
1678
1690
  font-weight: 500;
1679
- padding: var(--space-4);
1680
- border-radius: var(--radius-3);
1691
+ padding: var(--tl-space-4);
1692
+ border-radius: var(--tl-radius-3);
1681
1693
  cursor: var(--tl-cursor-pointer);
1682
1694
  color: inherit;
1683
1695
  background-color: transparent;
1684
1696
  }
1685
1697
 
1686
1698
  .tl-error-boundary__content a {
1687
- color: var(--color-selected);
1699
+ color: var(--tl-color-selected);
1688
1700
  font-weight: 500;
1689
1701
  text-decoration: none;
1690
1702
  }
@@ -1696,31 +1708,31 @@ it from receiving any pointer events or affecting the cursor. */
1696
1708
 
1697
1709
  .tl-error-boundary__content__error button {
1698
1710
  position: absolute;
1699
- top: var(--space-2);
1700
- right: var(--space-2);
1711
+ top: var(--tl-space-2);
1712
+ right: var(--tl-space-2);
1701
1713
  font-size: 12px;
1702
- padding: var(--space-2) var(--space-3);
1703
- background-color: var(--color-panel);
1704
- border-radius: var(--radius-1);
1714
+ padding: var(--tl-space-2) var(--tl-space-3);
1715
+ background-color: var(--tl-color-panel);
1716
+ border-radius: var(--tl-radius-1);
1705
1717
  }
1706
1718
 
1707
1719
  .tl-error-boundary__content__actions {
1708
1720
  display: flex;
1709
1721
  justify-content: space-between;
1710
- gap: var(--space-4);
1722
+ gap: var(--tl-space-4);
1711
1723
  margin: 0px;
1712
1724
  margin-left: -4px;
1713
1725
  }
1714
1726
  .tl-error-boundary__content__actions__group {
1715
1727
  display: flex;
1716
- gap: var(--space-4);
1728
+ gap: var(--tl-space-4);
1717
1729
  }
1718
1730
  .tl-error-boundary__content .tl-error-boundary__reset {
1719
- color: var(--color-danger);
1731
+ color: var(--tl-color-danger);
1720
1732
  }
1721
1733
  .tl-error-boundary__content .tl-error-boundary__refresh {
1722
- background-color: var(--color-primary);
1723
- color: var(--color-selected-contrast);
1734
+ background-color: var(--tl-color-primary);
1735
+ color: var(--tl-color-selected-contrast);
1724
1736
  }
1725
1737
  .tl-container__focused:not(.tl-container__no-focus-ring)
1726
1738
  .tlui-button.tl-error-boundary__refresh:focus-visible {
@@ -1732,7 +1744,7 @@ it from receiving any pointer events or affecting the cursor. */
1732
1744
 
1733
1745
  .tl-hit-test-blocker {
1734
1746
  position: absolute;
1735
- z-index: var(--layer-canvas-blocker);
1747
+ z-index: var(--tl-layer-canvas-blocker);
1736
1748
  inset: 0px;
1737
1749
  width: 100%;
1738
1750
  height: 100%;
@@ -1752,32 +1764,32 @@ it from receiving any pointer events or affecting the cursor. */
1752
1764
 
1753
1765
  .tl-handle__bg:hover {
1754
1766
  cursor: var(--tl-cursor-grab);
1755
- fill: var(--color-selection-fill);
1767
+ fill: var(--tl-color-selection-fill);
1756
1768
  }
1757
1769
 
1758
1770
  .tl-bookmark__link:hover {
1759
- color: var(--color-selected);
1771
+ color: var(--tl-color-selected);
1760
1772
  }
1761
1773
 
1762
1774
  .tl-hyperlink-button:hover {
1763
- color: var(--color-selected);
1775
+ color: var(--tl-color-selected);
1764
1776
  }
1765
1777
 
1766
1778
  .tl-error-boundary__content button:hover {
1767
- background-color: var(--color-low);
1779
+ background-color: var(--tl-color-low);
1768
1780
  }
1769
1781
  .tl-error-boundary__content a:hover {
1770
- color: var(--color-text-1);
1782
+ color: var(--tl-color-text-1);
1771
1783
  }
1772
1784
  .tl-error-boundary__content .tl-error-boundary__refresh:hover {
1773
- background-color: var(--color-primary);
1785
+ background-color: var(--tl-color-primary);
1774
1786
  opacity: 0.9;
1775
1787
  }
1776
1788
 
1777
1789
  /* These three rules help preserve clicking into specific points in text areas *while*
1778
1790
  * already in edit mode when jumping from shape to shape. */
1779
1791
  .tl-canvas[data-iseditinganything='true'] .tl-text-wrapper:hover .tl-text-input {
1780
- z-index: var(--layer-text-editor);
1792
+ z-index: var(--tl-layer-text-editor);
1781
1793
  pointer-events: all;
1782
1794
  }
1783
1795
  }
@@ -1785,15 +1797,15 @@ it from receiving any pointer events or affecting the cursor. */
1785
1797
  /* @tldraw/ui */
1786
1798
 
1787
1799
  .tl-container {
1788
- --layer-above: 1;
1789
- --layer-focused-input: 10;
1790
- --layer-menu-click-capture: 250;
1791
- --layer-panels: 300;
1792
- --layer-menus: 400;
1793
- --layer-toasts: 650;
1794
- --layer-cursor: 700;
1795
- --layer-header-footer: 999;
1796
- --layer-following-indicator: 1000;
1800
+ --tl-layer-above: 1;
1801
+ --tl-layer-focused-input: 10;
1802
+ --tl-layer-menu-click-capture: 250;
1803
+ --tl-layer-panels: 300;
1804
+ --tl-layer-menus: 400;
1805
+ --tl-layer-toasts: 650;
1806
+ --tl-layer-cursor: 700;
1807
+ --tl-layer-header-footer: 999;
1808
+ --tl-layer-following-indicator: 1000;
1797
1809
  }
1798
1810
 
1799
1811
  /* Button */
@@ -1817,23 +1829,23 @@ it from receiving any pointer events or affecting the cursor. */
1817
1829
  text-rendering: optimizeLegibility;
1818
1830
  font-size: 12px;
1819
1831
  gap: 0px;
1820
- color: var(--color-text-1);
1832
+ color: var(--tl-color-text-1);
1821
1833
  z-index: 0;
1822
1834
  }
1823
1835
 
1824
1836
  .tlui-button:disabled {
1825
- color: var(--color-text-3);
1837
+ color: var(--tl-color-text-3);
1826
1838
  text-shadow: none;
1827
1839
  cursor: default;
1828
1840
  }
1829
1841
 
1830
1842
  .tlui-button:disabled .tlui-kbd {
1831
- color: var(--color-text-3);
1843
+ color: var(--tl-color-text-3);
1832
1844
  }
1833
1845
 
1834
1846
  .tlui-button > * {
1835
1847
  position: relative;
1836
- z-index: var(--layer-above);
1848
+ z-index: var(--tl-layer-above);
1837
1849
  }
1838
1850
 
1839
1851
  .tlui-button__label {
@@ -1849,7 +1861,7 @@ it from receiving any pointer events or affecting the cursor. */
1849
1861
  */
1850
1862
  .tl-container__focused:not(.tl-container__no-focus-ring) .tlui-button:focus-visible {
1851
1863
  border-radius: 10px;
1852
- outline: 2px solid var(--color-focus);
1864
+ outline: 2px solid var(--tl-color-focus);
1853
1865
  outline-offset: -5px;
1854
1866
  }
1855
1867
  .tl-container__focused:not(.tl-container__no-focus-ring) .tlui-button__tool:focus-visible {
@@ -1857,7 +1869,7 @@ it from receiving any pointer events or affecting the cursor. */
1857
1869
  }
1858
1870
  .tlui-slider__container:has(.tlui-slider__thumb:focus-visible) {
1859
1871
  border-radius: 10px;
1860
- outline: 2px solid var(--color-focus);
1872
+ outline: 2px solid var(--tl-color-focus);
1861
1873
  outline-offset: -5px;
1862
1874
  }
1863
1875
 
@@ -1866,8 +1878,8 @@ it from receiving any pointer events or affecting the cursor. */
1866
1878
  content: '';
1867
1879
  position: absolute;
1868
1880
  inset: 4px;
1869
- border-radius: var(--radius-2);
1870
- background: var(--color-muted-2);
1881
+ border-radius: var(--tl-radius-2);
1882
+ background: var(--tl-color-muted-2);
1871
1883
  opacity: 0;
1872
1884
  }
1873
1885
 
@@ -1877,18 +1889,18 @@ it from receiving any pointer events or affecting the cursor. */
1877
1889
 
1878
1890
  .tlui-button[data-isactive='true']::after,
1879
1891
  .tlui-button[data-isactive='true']:not(:disabled, :focus-visible):active:after {
1880
- background: var(--color-hint);
1892
+ background: var(--tl-color-hint);
1881
1893
  opacity: 1;
1882
1894
  }
1883
1895
 
1884
- .tlui-button[aria-expanded='true'][data-direction='left']::after {
1885
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
1896
+ .tlui-button[aria-expanded='true'][data-direction='left'] {
1897
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
1886
1898
  opacity: 1;
1887
1899
  }
1888
1900
 
1889
1901
  @media (hover: hover) {
1890
1902
  .tlui-button[aria-expanded='true'][data-direction='left']:not(:hover)::after {
1891
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
1903
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
1892
1904
  opacity: 1;
1893
1905
  }
1894
1906
 
@@ -1902,18 +1914,18 @@ it from receiving any pointer events or affecting the cursor. */
1902
1914
  }
1903
1915
 
1904
1916
  .tlui-button__icon + .tlui-button__label {
1905
- margin-left: var(--space-2);
1917
+ margin-left: var(--tl-space-2);
1906
1918
  }
1907
1919
 
1908
1920
  /* Low button */
1909
1921
 
1910
1922
  .tlui-button__low {
1911
- border-radius: var(--radius-3);
1912
- background-color: var(--color-low);
1923
+ border-radius: var(--tl-radius-3);
1924
+ background-color: var(--tl-color-low);
1913
1925
  }
1914
1926
 
1915
1927
  .tlui-button__low::after {
1916
- background-color: var(--color-muted-2);
1928
+ background-color: var(--tl-color-muted-2);
1917
1929
  opacity: 0;
1918
1930
  }
1919
1931
 
@@ -1926,31 +1938,25 @@ it from receiving any pointer events or affecting the cursor. */
1926
1938
  /* Primary / danger buttons */
1927
1939
 
1928
1940
  .tlui-button__primary {
1929
- color: var(--color-primary);
1941
+ color: var(--tl-color-primary);
1930
1942
  }
1931
1943
 
1932
1944
  .tlui-button__danger {
1933
- color: var(--color-danger);
1945
+ color: var(--tl-color-danger);
1934
1946
  text-shadow: none;
1935
1947
  }
1936
1948
 
1937
1949
  @media (hover: hover) {
1938
1950
  .tlui-button__primary:not(:disabled, :focus-visible):hover {
1939
- color: var(--color-primary);
1951
+ color: var(--tl-color-primary);
1940
1952
  }
1941
1953
 
1942
1954
  .tlui-button__danger:not(:disabled, :focus-visible):hover {
1943
- color: var(--color-danger);
1955
+ color: var(--tl-color-danger);
1944
1956
  text-shadow: none;
1945
1957
  }
1946
1958
  }
1947
1959
 
1948
- /* Panel button */
1949
-
1950
- .tlui-button__panel {
1951
- position: relative;
1952
- }
1953
-
1954
1960
  /* Menu button */
1955
1961
 
1956
1962
  .tlui-button__menu {
@@ -1963,7 +1969,7 @@ it from receiving any pointer events or affecting the cursor. */
1963
1969
 
1964
1970
  .tlui-button__menu::after {
1965
1971
  inset: 4px;
1966
- border-radius: var(--radius-2);
1972
+ border-radius: var(--tl-radius-2);
1967
1973
  }
1968
1974
 
1969
1975
  .tlui-button__menu > .tlui-icon + .tlui-button__label {
@@ -1991,18 +1997,26 @@ it from receiving any pointer events or affecting the cursor. */
1991
1997
 
1992
1998
  /* Tool lock button */
1993
1999
 
1994
- .tlui-toolbar__lock-button {
2000
+ .tlui-main-toolbar__lock-button {
1995
2001
  position: absolute;
1996
- top: 4px;
1997
- right: 0px;
1998
2002
  pointer-events: all;
1999
2003
  height: 40px;
2000
2004
  width: 40px;
2005
+ border-radius: var(--tl-radius-2);
2006
+ }
2007
+
2008
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__lock-button {
2009
+ top: 4px;
2010
+ right: 0px;
2001
2011
  min-width: 0px;
2002
- border-radius: var(--radius-2);
2003
2012
  }
2004
2013
 
2005
- .tlui-toolbar__lock-button::after {
2014
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__lock-button {
2015
+ bottom: 0px;
2016
+ min-height: 0px;
2017
+ }
2018
+
2019
+ .tlui-main-toolbar__lock-button::after {
2006
2020
  top: 4px;
2007
2021
  left: 8px;
2008
2022
  inset: 4px;
@@ -2014,16 +2028,6 @@ it from receiving any pointer events or affecting the cursor. */
2014
2028
  position: relative;
2015
2029
  height: 48px;
2016
2030
  width: 48px;
2017
- margin-left: -2px;
2018
- margin-right: -2px;
2019
- }
2020
-
2021
- .tlui-button__tool:nth-of-type(1) {
2022
- margin-left: 0px;
2023
- }
2024
-
2025
- .tlui-button__tool:nth-last-of-type(1) {
2026
- margin-right: 0px;
2027
2031
  }
2028
2032
 
2029
2033
  .tlui-button__tool::after {
@@ -2032,69 +2036,64 @@ it from receiving any pointer events or affecting the cursor. */
2032
2036
  }
2033
2037
 
2034
2038
  .tlui-button__tool[aria-pressed='true'] {
2035
- color: var(--color-selected-contrast);
2039
+ color: var(--tl-color-selected-contrast);
2036
2040
  }
2037
2041
 
2038
2042
  .tlui-button__tool[aria-pressed='true']:not(:disabled, :focus-visible):active {
2039
- color: var(--color-selected-contrast);
2043
+ color: var(--tl-color-selected-contrast);
2040
2044
  }
2041
2045
 
2042
2046
  .tlui-button__tool[aria-pressed='true']:not(:disabled)::after {
2043
- background: var(--color-selected);
2047
+ background: var(--tl-color-selected);
2044
2048
  opacity: 1;
2045
2049
  }
2046
2050
 
2047
- .tlui-layout__mobile .tlui-button__tool {
2051
+ .tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-button__tool {
2048
2052
  height: 48px;
2049
2053
  width: 43px;
2050
2054
  }
2051
2055
 
2052
- .tlui-layout__mobile .tlui-button__tool > .tlui-icon {
2056
+ .tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-button__tool > .tlui-icon {
2053
2057
  height: 16px;
2054
2058
  width: 16px;
2055
2059
  }
2056
2060
 
2057
- /* Button Row */
2061
+ /* Row layout */
2058
2062
 
2059
- .tlui-buttons__horizontal {
2063
+ .tlui-row {
2060
2064
  display: flex;
2061
2065
  flex-direction: row;
2066
+ padding: 0 2px;
2062
2067
  }
2063
- .tlui-buttons__horizontal > * {
2068
+ .tlui-row > * {
2064
2069
  margin-left: -2px;
2065
2070
  margin-right: -2px;
2066
2071
  }
2067
- .tlui-buttons__horizontal > *:nth-child(1) {
2068
- margin-left: 0px;
2072
+
2073
+ /* Column layout */
2074
+
2075
+ .tlui-column {
2076
+ display: flex;
2077
+ flex-direction: column;
2078
+ padding: 2px 0;
2069
2079
  }
2070
- .tlui-buttons__horizontal > *:nth-last-child(1) {
2071
- margin-right: 0px;
2080
+ .tlui-column > * {
2081
+ margin-top: -2px;
2082
+ margin-bottom: -2px;
2072
2083
  }
2073
2084
 
2074
- /* Button Grid */
2085
+ /* Grid layout */
2075
2086
 
2076
- .tlui-buttons__grid {
2087
+ .tlui-grid {
2077
2088
  display: grid;
2078
- grid-template-columns: repeat(4, auto);
2089
+ grid-template-columns: repeat(4, 1fr);
2079
2090
  grid-auto-flow: row;
2080
2091
  overflow: hidden;
2092
+ padding: 2px;
2081
2093
  }
2082
- .tlui-buttons__grid > .tlui-button {
2094
+ .tlui-grid > * {
2083
2095
  margin: -2px;
2084
2096
  }
2085
- .tlui-buttons__grid > .tlui-button:nth-of-type(4n),
2086
- .tlui-buttons__vertical-align > .tlui-button:nth-of-type(3n) {
2087
- margin-right: 0px;
2088
- }
2089
- .tlui-buttons__grid > .tlui-button:nth-of-type(4n - 3) {
2090
- margin-left: 0px;
2091
- }
2092
- .tlui-buttons__grid > .tlui-button:nth-of-type(-n + 4) {
2093
- margin-top: 0px;
2094
- }
2095
- .tlui-buttons__grid > .tlui-button:nth-last-of-type(-n + 4) {
2096
- margin-bottom: 0px;
2097
- }
2098
2097
 
2099
2098
  /* Zoom button */
2100
2099
 
@@ -2118,9 +2117,9 @@ it from receiving any pointer events or affecting the cursor. */
2118
2117
  pointer-events: none;
2119
2118
  user-select: none;
2120
2119
  contain: strict;
2121
- z-index: var(--layer-panels);
2120
+ z-index: var(--tl-layer-panels);
2122
2121
  transform: translate3d(0, 0, 0);
2123
- --sab: env(safe-area-inset-bottom);
2122
+ --tl-sab: env(safe-area-inset-bottom);
2124
2123
  font-weight: 500;
2125
2124
  line-height: 1.6;
2126
2125
  -webkit-font-smoothing: antialiased;
@@ -2173,11 +2172,11 @@ it from receiving any pointer events or affecting the cursor. */
2173
2172
  justify-content: flex-start;
2174
2173
  align-items: flex-start;
2175
2174
  width: min-content;
2176
- gap: var(--space-3);
2177
- margin: var(--space-2) var(--space-3);
2175
+ gap: var(--tl-space-3);
2176
+ margin: var(--tl-space-2) var(--tl-space-3);
2178
2177
  white-space: nowrap;
2179
2178
  pointer-events: none;
2180
- z-index: var(--layer-panels);
2179
+ z-index: var(--tl-layer-panels);
2181
2180
  }
2182
2181
 
2183
2182
  /* ---------------------- Icon ---------------------- */
@@ -2205,7 +2204,7 @@ it from receiving any pointer events or affecting the cursor. */
2205
2204
 
2206
2205
  .tlui-slider__container {
2207
2206
  width: 100%;
2208
- padding: 0px var(--space-4);
2207
+ padding: 0px var(--tl-space-4);
2209
2208
  }
2210
2209
 
2211
2210
  .tlui-slider {
@@ -2231,7 +2230,7 @@ it from receiving any pointer events or affecting the cursor. */
2231
2230
  content: '';
2232
2231
  height: 3px;
2233
2232
  width: 100%;
2234
- background-color: var(--color-muted-1);
2233
+ background-color: var(--tl-color-muted-1);
2235
2234
  border-radius: 14px;
2236
2235
  }
2237
2236
 
@@ -2240,7 +2239,7 @@ it from receiving any pointer events or affecting the cursor. */
2240
2239
  top: calc(50% - 2px);
2241
2240
  left: 0px;
2242
2241
  height: 3px;
2243
- background-color: var(--color-selected);
2242
+ background-color: var(--tl-color-selected);
2244
2243
  border-radius: 14px;
2245
2244
  }
2246
2245
 
@@ -2252,16 +2251,16 @@ it from receiving any pointer events or affecting the cursor. */
2252
2251
  height: 18px;
2253
2252
  position: relative;
2254
2253
  top: -1px;
2255
- background-color: var(--color-panel);
2254
+ background-color: var(--tl-color-panel);
2256
2255
  border-radius: 999px;
2257
- box-shadow: inset 0px 0px 0px 2px var(--color-text-1);
2256
+ box-shadow: inset 0px 0px 0px 2px var(--tl-color-text-1);
2258
2257
  }
2259
2258
 
2260
2259
  .tlui-slider__thumb:active {
2261
2260
  cursor: grabbing;
2262
2261
  box-shadow:
2263
- inset 0px 0px 0px 2px var(--color-text-1),
2264
- var(--shadow-1);
2262
+ inset 0px 0px 0px 2px var(--tl-color-text-1),
2263
+ var(--tl-shadow-1);
2265
2264
  }
2266
2265
 
2267
2266
  /* ---------------------- Input --------------------- */
@@ -2270,7 +2269,7 @@ it from receiving any pointer events or affecting the cursor. */
2270
2269
  background: none;
2271
2270
  margin: 0px;
2272
2271
  position: relative;
2273
- z-index: var(--layer-above);
2272
+ z-index: var(--tl-layer-above);
2274
2273
  height: 40px;
2275
2274
  max-height: 40px;
2276
2275
  display: flex;
@@ -2279,8 +2278,8 @@ it from receiving any pointer events or affecting the cursor. */
2279
2278
  font-family: inherit;
2280
2279
  font-size: 12px;
2281
2280
  font-weight: inherit;
2282
- color: var(--color-text-1);
2283
- padding: var(--space-4);
2281
+ color: var(--tl-color-text-1);
2282
+ padding: var(--tl-space-4);
2284
2283
  padding-left: 0px;
2285
2284
  border: none;
2286
2285
  outline: none;
@@ -2296,8 +2295,8 @@ it from receiving any pointer events or affecting the cursor. */
2296
2295
  height: 44px;
2297
2296
  display: flex;
2298
2297
  align-items: center;
2299
- gap: var(--space-4);
2300
- color: var(--color-text);
2298
+ gap: var(--tl-space-4);
2299
+ color: var(--tl-color-text);
2301
2300
  }
2302
2301
 
2303
2302
  .tlui-input__wrapper > .tlui-icon {
@@ -2329,7 +2328,7 @@ it from receiving any pointer events or affecting the cursor. */
2329
2328
  grid-auto-columns: minmax(1em, auto);
2330
2329
  align-self: bottom;
2331
2330
  color: currentColor;
2332
- margin-left: var(--space-4);
2331
+ margin-left: var(--tl-space-4);
2333
2332
  }
2334
2333
 
2335
2334
  .tlui-kbd > span {
@@ -2346,13 +2345,13 @@ it from receiving any pointer events or affecting the cursor. */
2346
2345
  }
2347
2346
 
2348
2347
  .tlui-kbd:not(:last-child) {
2349
- margin-right: var(--space-2);
2348
+ margin-right: var(--tl-space-2);
2350
2349
  }
2351
2350
 
2352
2351
  /* Focus Mode Button */
2353
2352
 
2354
2353
  .tlui-focus-button {
2355
- z-index: var(--layer-panels);
2354
+ z-index: var(--tl-layer-panels);
2356
2355
  pointer-events: all;
2357
2356
  }
2358
2357
 
@@ -2363,16 +2362,16 @@ it from receiving any pointer events or affecting the cursor. */
2363
2362
  }
2364
2363
 
2365
2364
  .tlui-menu {
2366
- z-index: var(--layer-menus);
2365
+ z-index: var(--tl-layer-menus);
2367
2366
  height: fit-content;
2368
2367
  width: fit-content;
2369
- border-radius: var(--radius-3);
2368
+ border-radius: var(--tl-radius-3);
2370
2369
  pointer-events: all;
2371
2370
  touch-action: auto;
2372
2371
  overflow-y: auto;
2373
2372
  overscroll-behavior: none;
2374
- background-color: var(--color-panel);
2375
- box-shadow: var(--shadow-3);
2373
+ background-color: var(--tl-color-panel);
2374
+ box-shadow: var(--tl-shadow-3);
2376
2375
  }
2377
2376
 
2378
2377
  .tlui-menu::-webkit-scrollbar {
@@ -2390,7 +2389,7 @@ it from receiving any pointer events or affecting the cursor. */
2390
2389
  }
2391
2390
 
2392
2391
  .tlui-menu__group {
2393
- border-bottom: 1px solid var(--color-divider);
2392
+ border-bottom: 1px solid var(--tl-color-divider);
2394
2393
  }
2395
2394
  .tlui-menu__group:nth-last-of-type(1) {
2396
2395
  border-bottom: none;
@@ -2400,23 +2399,23 @@ it from receiving any pointer events or affecting the cursor. */
2400
2399
 
2401
2400
  .tlui-menu__submenu__trigger[data-state='open']::after {
2402
2401
  opacity: 1;
2403
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2402
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2404
2403
  }
2405
2404
 
2406
2405
  .tlui-menu__submenu__trigger[data-direction='left'][data-state='open']::after {
2407
2406
  opacity: 1;
2408
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2407
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2409
2408
  }
2410
2409
 
2411
2410
  @media (hover: hover) {
2412
2411
  .tlui-menu__submenu__trigger[data-state='open']:not(:hover)::after {
2413
2412
  opacity: 1;
2414
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2413
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2415
2414
  }
2416
2415
 
2417
2416
  .tlui-menu__submenu__trigger[data-direction='left'][data-state='open']:not(:hover)::after {
2418
2417
  opacity: 1;
2419
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2418
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2420
2419
  }
2421
2420
  }
2422
2421
 
@@ -2441,7 +2440,7 @@ it from receiving any pointer events or affecting the cursor. */
2441
2440
  .tlui-menu-click-capture {
2442
2441
  position: fixed;
2443
2442
  inset: 0;
2444
- z-index: var(--layer-menu-click-capture);
2443
+ z-index: var(--tl-layer-menu-click-capture);
2445
2444
  }
2446
2445
 
2447
2446
  /* --------------------- Popover -------------------- */
@@ -2457,10 +2456,10 @@ it from receiving any pointer events or affecting the cursor. */
2457
2456
  max-height: calc(var(--radix-popover-content-available-height) - 8px);
2458
2457
  margin: 0px;
2459
2458
  border: none;
2460
- border-radius: var(--radius-3);
2461
- background-color: var(--color-panel);
2462
- box-shadow: var(--shadow-3);
2463
- z-index: var(--layer-menus);
2459
+ border-radius: var(--tl-radius-3);
2460
+ background-color: var(--tl-color-panel);
2461
+ box-shadow: var(--tl-shadow-3);
2462
+ z-index: var(--tl-layer-menus);
2464
2463
  overflow: hidden;
2465
2464
  overflow-y: auto;
2466
2465
  touch-action: auto;
@@ -2473,22 +2472,22 @@ it from receiving any pointer events or affecting the cursor. */
2473
2472
 
2474
2473
  .tlui-menu-zone {
2475
2474
  position: relative;
2476
- z-index: var(--layer-panels);
2475
+ z-index: var(--tl-layer-panels);
2477
2476
  width: fit-content;
2478
- border-right: 2px solid var(--color-background);
2479
- border-bottom: 2px solid var(--color-background);
2480
- border-bottom-right-radius: var(--radius-4);
2481
- background-color: var(--color-low);
2477
+ border-right: 2px solid var(--tl-color-background);
2478
+ border-bottom: 2px solid var(--tl-color-background);
2479
+ border-bottom-right-radius: var(--tl-radius-4);
2480
+ background-color: var(--tl-color-low);
2482
2481
  }
2483
2482
 
2484
2483
  .tlui-menu-zone *[data-state='open']::after {
2485
- background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2484
+ background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2486
2485
  opacity: 1;
2487
2486
  }
2488
2487
 
2489
2488
  @media (hover: hover) {
2490
2489
  .tlui-menu-zone *[data-state='open']:not(:hover)::after {
2491
- background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2490
+ background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2492
2491
  opacity: 1;
2493
2492
  }
2494
2493
  }
@@ -2514,8 +2513,8 @@ it from receiving any pointer events or affecting the cursor. */
2514
2513
  align-items: center;
2515
2514
  width: 100%;
2516
2515
  height: 40px;
2517
- padding-left: var(--space-4);
2518
- border-bottom: 1px solid var(--color-divider);
2516
+ padding-left: var(--tl-space-4);
2517
+ border-bottom: 1px solid var(--tl-color-divider);
2519
2518
  }
2520
2519
 
2521
2520
  .tlui-page-menu__header > .tlui-button:nth-of-type(1) {
@@ -2523,7 +2522,7 @@ it from receiving any pointer events or affecting the cursor. */
2523
2522
  }
2524
2523
 
2525
2524
  .tlui-page-menu__header__title {
2526
- color: var(--color-text);
2525
+ color: var(--tl-color-text);
2527
2526
  font-size: 12px;
2528
2527
  flex-grow: 2;
2529
2528
  }
@@ -2608,7 +2607,7 @@ it from receiving any pointer events or affecting the cursor. */
2608
2607
  display: inline-flex;
2609
2608
  align-items: center;
2610
2609
  justify-content: center;
2611
- color: var(--color-text);
2610
+ color: var(--tl-color-text);
2612
2611
  }
2613
2612
 
2614
2613
  .tlui-page_menu__item__sortable {
@@ -2621,7 +2620,7 @@ it from receiving any pointer events or affecting the cursor. */
2621
2620
  flex-direction: row;
2622
2621
  align-items: center;
2623
2622
  overflow: hidden;
2624
- z-index: var(--layer-above);
2623
+ z-index: var(--tl-layer-above);
2625
2624
  }
2626
2625
 
2627
2626
  .tlui-page_menu__item__sortable__title {
@@ -2633,7 +2632,7 @@ it from receiving any pointer events or affecting the cursor. */
2633
2632
  }
2634
2633
 
2635
2634
  .tlui-page_menu__item__sortable:focus-visible {
2636
- z-index: var(--layer-focused-input);
2635
+ z-index: var(--tl-layer-focused-input);
2637
2636
  }
2638
2637
 
2639
2638
  .tlui-page_menu__item__sortable__handle {
@@ -2642,7 +2641,7 @@ it from receiving any pointer events or affecting the cursor. */
2642
2641
  min-width: 0px;
2643
2642
  height: 40px;
2644
2643
  cursor: grab;
2645
- color: var(--color-text-3);
2644
+ color: var(--tl-color-text-3);
2646
2645
  flex-shrink: 0;
2647
2646
  margin-right: -9px;
2648
2647
  }
@@ -2684,13 +2683,13 @@ it from receiving any pointer events or affecting the cursor. */
2684
2683
  }
2685
2684
 
2686
2685
  .tlui-page_menu__item__submenu > .tlui-button[data-state='open']::after {
2687
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2686
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2688
2687
  opacity: 1;
2689
2688
  }
2690
2689
 
2691
2690
  @media (hover: hover) {
2692
2691
  .tlui-page_menu__item__submenu > .tlui-button[data-state='open']:not(:hover)::after {
2693
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2692
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2694
2693
  opacity: 1;
2695
2694
  }
2696
2695
  }
@@ -2726,7 +2725,7 @@ it from receiving any pointer events or affecting the cursor. */
2726
2725
  top: 48px;
2727
2726
  left: -9999px;
2728
2727
  padding: 8px 16px;
2729
- z-index: var(--layer-toasts);
2728
+ z-index: var(--tl-layer-toasts);
2730
2729
  }
2731
2730
 
2732
2731
  .tl-skip-to-main-content:focus {
@@ -2738,17 +2737,17 @@ it from receiving any pointer events or affecting the cursor. */
2738
2737
  .tlui-offline-indicator {
2739
2738
  display: flex;
2740
2739
  flex-direction: row;
2741
- gap: var(--space-3);
2742
- color: var(--color-text);
2743
- background-color: var(--color-low);
2744
- border: 3px solid var(--color-background);
2745
- padding: 0px var(--space-5);
2740
+ gap: var(--tl-space-3);
2741
+ color: var(--tl-color-text);
2742
+ background-color: var(--tl-color-low);
2743
+ border: 3px solid var(--tl-color-background);
2744
+ padding: 0px var(--tl-space-5);
2746
2745
  height: 42px;
2747
2746
  align-items: center;
2748
2747
  justify-content: center;
2749
2748
  border-radius: 99px;
2750
2749
  opacity: 0;
2751
- animation: fade-in;
2750
+ animation: tl-fade-in;
2752
2751
  animation-duration: 0.12s;
2753
2752
  animation-delay: 2s;
2754
2753
  animation-fill-mode: forwards;
@@ -2757,10 +2756,10 @@ it from receiving any pointer events or affecting the cursor. */
2757
2756
  /* ------------------- Style panel ------------------ */
2758
2757
 
2759
2758
  .tlui-style-panel__wrapper {
2760
- box-shadow: var(--shadow-2);
2761
- border-radius: var(--radius-3);
2759
+ box-shadow: var(--tl-shadow-2);
2760
+ border-radius: var(--tl-radius-3);
2762
2761
  pointer-events: all;
2763
- background-color: var(--color-panel);
2762
+ background-color: var(--tl-color-panel);
2764
2763
  height: fit-content;
2765
2764
  max-height: 100%;
2766
2765
  margin: 8px;
@@ -2769,7 +2768,7 @@ it from receiving any pointer events or affecting the cursor. */
2769
2768
  overscroll-behavior: none;
2770
2769
  overflow-y: auto;
2771
2770
  overflow-x: hidden;
2772
- color: var(--color-text);
2771
+ color: var(--tl-color-text);
2773
2772
  }
2774
2773
  /* if the style panel is the only child (ie no share menu), increase the margin */
2775
2774
  .tlui-style-panel__wrapper:only-child {
@@ -2778,12 +2777,18 @@ it from receiving any pointer events or affecting the cursor. */
2778
2777
 
2779
2778
  .tlui-style-panel {
2780
2779
  position: relative;
2781
- z-index: var(--layer-panels);
2780
+ z-index: var(--tl-layer-panels);
2782
2781
  pointer-events: all;
2783
2782
  width: 148px;
2784
2783
  max-width: 148px;
2785
2784
  }
2786
2785
 
2786
+ .tlui-style-panel[data-show-ui-labels='true'] .tlui-button[data-isactive='true'] {
2787
+ border-radius: 10px;
2788
+ outline: 2px solid var(--tl-color-text);
2789
+ outline-offset: -5px;
2790
+ }
2791
+
2787
2792
  .tlui-style-panel::-webkit-scrollbar {
2788
2793
  display: none;
2789
2794
  }
@@ -2798,8 +2803,22 @@ it from receiving any pointer events or affecting the cursor. */
2798
2803
  flex-direction: column;
2799
2804
  }
2800
2805
 
2801
- .tlui-style-panel__section:nth-of-type(n + 2):not(:last-child) {
2802
- border-bottom: 1px solid var(--color-divider);
2806
+ /*
2807
+ add a border to the bottom of all but the last section. we have to handle empty sections too, which
2808
+ are hidden and shouldn't be counted
2809
+ */
2810
+ .tlui-style-panel__section:not(:nth-last-child(-n + 1 of .tlui-style-panel__section:not(:empty))) {
2811
+ border-bottom: 1px solid var(--tl-color-divider);
2812
+ }
2813
+ /*
2814
+ if a section ends with a slider and we're adding a border, we need some extra space for visual
2815
+ balance. we need to handle empty sections as above. is this the most complex css selector in all of
2816
+ tldraw? probably.
2817
+ */
2818
+ .tlui-style-panel__section:has(.tlui-slider__container:last-child):not(
2819
+ :nth-last-child(-n + 1 of .tlui-style-panel__section:not(:empty))
2820
+ ) {
2821
+ margin-bottom: 7px;
2803
2822
  }
2804
2823
 
2805
2824
  .tlui-style-panel__section:empty {
@@ -2808,23 +2827,19 @@ it from receiving any pointer events or affecting the cursor. */
2808
2827
 
2809
2828
  .tlui-style-panel__section__common:not(:only-child) {
2810
2829
  margin-bottom: 7px;
2811
- border-bottom: 1px solid var(--color-divider);
2830
+ border-bottom: 1px solid var(--tl-color-divider);
2812
2831
  }
2813
2832
 
2814
- .tlui-style-panel__row {
2815
- display: flex;
2816
- }
2817
- /* Only really used for the alignment picker */
2818
- .tlui-style-panel__row__extra-button {
2819
- margin-left: -2px;
2833
+ .tlui-style-panel__dropdown-picker:only-child {
2834
+ flex: 1;
2820
2835
  }
2821
2836
 
2822
2837
  .tlui-style-panel__double-select-picker {
2823
2838
  display: flex;
2824
2839
  grid-template-columns: 1fr auto;
2825
2840
  align-items: center;
2826
- padding-left: var(--space-4);
2827
- color: var(--color-text-1);
2841
+ padding-left: var(--tl-space-4);
2842
+ color: var(--tl-color-text-1);
2828
2843
  font-size: 12px;
2829
2844
  }
2830
2845
 
@@ -2838,25 +2853,48 @@ it from receiving any pointer events or affecting the cursor. */
2838
2853
 
2839
2854
  .tlui-style-panel .tlui-button[data-state='open']::after {
2840
2855
  opacity: 1;
2841
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2856
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2842
2857
  }
2843
2858
 
2844
2859
  @media (hover: hover) {
2860
+ .tlui-style-panel .tlui-button[aria-expanded='true'] {
2861
+ background: none;
2862
+ }
2845
2863
  .tlui-style-panel .tlui-button[data-state='open']:not(:hover)::after {
2846
2864
  opacity: 1;
2847
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
2865
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
2848
2866
  }
2849
2867
  }
2850
2868
 
2869
+ /* Accessibility subheadings */
2870
+
2871
+ .tlui-style-panel__section .tlui-style-panel__subheading,
2872
+ .tlui-style-panel__section__common .tlui-style-panel__subheading,
2873
+ .tlui-style-panel__subheading + .tlui-slider__container {
2874
+ margin: 0;
2875
+ padding: var(--tl-space-2) var(--tl-space-3) 0px var(--tl-space-4);
2876
+ font-size: 12px;
2877
+ font-weight: inherit;
2878
+ line-height: inherit;
2879
+ }
2880
+
2881
+ .tlui-style-panel .tlui-style-panel__subheading:nth-of-type(1) {
2882
+ padding-top: var(--tl-space-3);
2883
+ }
2884
+
2885
+ .tlui-style-panel__subheading + .tlui-slider__container {
2886
+ padding-top: 0px;
2887
+ }
2888
+
2851
2889
  /* --------------------- Bottom --------------------- */
2852
2890
 
2853
2891
  .tlui-layout__bottom {
2854
2892
  grid-row: 2;
2893
+ width: 100%;
2855
2894
  }
2856
2895
 
2857
2896
  .tlui-layout__bottom__main {
2858
2897
  width: 100%;
2859
- position: relative;
2860
2898
  display: flex;
2861
2899
  align-items: flex-end;
2862
2900
  justify-content: center;
@@ -2868,11 +2906,10 @@ it from receiving any pointer events or affecting the cursor. */
2868
2906
  display: flex;
2869
2907
  width: min-content;
2870
2908
  flex-direction: column;
2871
- z-index: var(--layer-panels);
2909
+ z-index: var(--tl-layer-panels);
2872
2910
  pointer-events: all;
2873
2911
  position: absolute;
2874
2912
  left: 0px;
2875
- bottom: 0px;
2876
2913
  }
2877
2914
 
2878
2915
  .tlui-navigation-panel::before {
@@ -2882,30 +2919,16 @@ it from receiving any pointer events or affecting the cursor. */
2882
2919
  z-index: -1;
2883
2920
  inset: -2px -2px 0px 0px;
2884
2921
  border-radius: 0;
2885
- border-top: 2px solid var(--color-background);
2886
- border-right: 2px solid var(--color-background);
2887
- border-top-right-radius: var(--radius-4);
2888
- background-color: var(--color-low);
2922
+ border-top: 2px solid var(--tl-color-background);
2923
+ border-right: 2px solid var(--tl-color-background);
2924
+ border-top-right-radius: var(--tl-radius-4);
2925
+ background-color: var(--tl-color-low);
2889
2926
  }
2890
2927
 
2891
2928
  .tlui-navigation-panel[data-a11y='true']::before {
2892
2929
  display: none;
2893
2930
  }
2894
2931
 
2895
- .tlui-navigation-panel__toggle .tlui-icon {
2896
- opacity: 0.24;
2897
- }
2898
-
2899
- .tlui-navigation-panel__toggle:active .tlui-icon {
2900
- opacity: 1;
2901
- }
2902
-
2903
- @media (hover: hover) {
2904
- .tlui-navigation-panel__toggle:hover .tlui-icon {
2905
- opacity: 1;
2906
- }
2907
- }
2908
-
2909
2932
  /* Minimap */
2910
2933
 
2911
2934
  .tlui-minimap {
@@ -2913,7 +2936,7 @@ it from receiving any pointer events or affecting the cursor. */
2913
2936
  height: 96px;
2914
2937
  min-height: 96px;
2915
2938
  overflow: hidden;
2916
- padding: var(--space-3);
2939
+ padding: var(--tl-space-3);
2917
2940
  padding-top: 0px;
2918
2941
  }
2919
2942
 
@@ -2926,114 +2949,220 @@ it from receiving any pointer events or affecting the cursor. */
2926
2949
  /* --------------------- Toolbar -------------------- */
2927
2950
 
2928
2951
  /* Wide container */
2929
- .tlui-toolbar {
2952
+ .tlui-main-toolbar {
2930
2953
  grid-column: 1 / span 3;
2931
2954
  grid-row: 1;
2932
2955
  display: flex;
2933
2956
  align-items: center;
2934
2957
  justify-content: center;
2935
2958
  flex-grow: 2;
2936
- padding-bottom: calc(var(--space-3) + var(--sab));
2959
+ }
2960
+
2961
+ .tlui-main-toolbar--horizontal {
2962
+ padding-bottom: calc(var(--tl-space-3) + var(--tl-sab));
2963
+ max-width: 100%;
2964
+ }
2965
+
2966
+ .tlui-main-toolbar--vertical {
2967
+ position: absolute;
2968
+ left: 0;
2969
+ top: 90px; /* height of page menu + 'back to content' button */
2970
+ bottom: 140px; /* height of expanded mini-map */
2971
+ padding-left: calc(var(--tl-space-3) + var(--tl-sab));
2972
+ }
2973
+
2974
+ [data-breakpoints-below*='6'] .tlui-main-toolbar--vertical {
2975
+ bottom: 90px; /* collapsed mini-map, but same as top to keep things looking even */
2937
2976
  }
2938
2977
 
2939
2978
  /* Centered Content */
2940
- .tlui-toolbar__inner {
2979
+ .tlui-main-toolbar__inner {
2941
2980
  position: relative;
2942
2981
  width: fit-content;
2943
2982
  display: flex;
2944
- gap: var(--space-3);
2945
- align-items: flex-end;
2983
+ gap: var(--tl-space-3);
2984
+ align-items: flex-start;
2985
+ }
2986
+
2987
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__inner {
2988
+ flex-direction: column;
2946
2989
  }
2947
2990
 
2948
- .tlui-toolbar__left {
2991
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__left {
2949
2992
  width: fit-content;
2950
2993
  }
2994
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__left {
2995
+ display: flex;
2996
+ height: fit-content;
2997
+ }
2951
2998
 
2952
2999
  /* Row of controls + lock button */
2953
- .tlui-toolbar__extras {
3000
+ .tlui-main-toolbar__extras {
2954
3001
  position: relative;
2955
- z-index: var(--layer-above);
2956
- width: 100%;
3002
+ z-index: var(--tl-layer-above);
2957
3003
  pointer-events: none;
2958
- top: 6px;
2959
- height: 48px;
3004
+ align-self: stretch;
2960
3005
  }
2961
3006
 
2962
- .tlui-toolbar__extras:empty {
3007
+ .tlui-main-toolbar__extras:empty {
2963
3008
  display: none;
2964
3009
  }
2965
3010
 
2966
- .tlui-toolbar__extras__controls {
2967
- display: flex;
3011
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__extras {
3012
+ height: 48px;
3013
+ top: 6px;
3014
+ }
3015
+
3016
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__extras {
3017
+ width: 48px;
3018
+ order: 1;
3019
+ }
3020
+
3021
+ .tlui-main-toolbar__extras__controls {
2968
3022
  position: relative;
2969
- flex-direction: row;
2970
- z-index: var(--layer-above);
2971
- background-color: var(--color-low);
2972
- border-top-left-radius: var(--radius-4);
2973
- border-top-right-radius: var(--radius-4);
2974
- border: 2px solid var(--color-background);
3023
+ z-index: var(--tl-layer-above);
3024
+ background-color: var(--tl-color-low);
3025
+ border: 2px solid var(--tl-color-background);
3026
+ pointer-events: all;
3027
+ }
3028
+
3029
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__extras__controls {
3030
+ border-top-left-radius: var(--tl-radius-4);
3031
+ border-top-right-radius: var(--tl-radius-4);
2975
3032
  margin-left: 8px;
2976
3033
  margin-right: 0px;
2977
- pointer-events: all;
2978
3034
  width: fit-content;
2979
3035
  }
2980
3036
 
2981
- .tlui-toolbar__tools {
2982
- display: flex;
2983
- flex-direction: row;
2984
- align-items: center;
2985
- border-radius: var(--radius-4);
2986
- z-index: var(--layer-panels);
3037
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__extras__controls {
3038
+ border-top-right-radius: var(--tl-radius-4);
3039
+ border-bottom-right-radius: var(--tl-radius-4);
3040
+ margin-top: 8px;
3041
+ margin-left: -2px;
3042
+ margin-bottom: 0px;
3043
+ width: fit-content;
3044
+ }
3045
+
3046
+ .tlui-main-toolbar__tools {
3047
+ border-radius: var(--tl-radius-4);
3048
+ z-index: var(--tl-layer-panels);
2987
3049
  pointer-events: all;
2988
3050
  position: relative;
2989
- background: var(--color-panel);
2990
- box-shadow: var(--shadow-2);
3051
+ background: var(--tl-color-panel);
3052
+ box-shadow: var(--tl-shadow-2);
2991
3053
  }
2992
- .tlui-toolbar__tools__list {
2993
- display: flex;
2994
- flex-direction: row;
2995
- align-items: center;
3054
+
3055
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__mobile-style-panel {
3056
+ align-self: flex-end;
3057
+ }
3058
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__mobile-style-panel {
3059
+ align-self: flex-start;
2996
3060
  }
2997
3061
 
2998
- .tlui-toolbar__overflow {
3062
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__overflow {
2999
3063
  width: 40px;
3064
+ margin-left: 2px;
3065
+ }
3066
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__overflow {
3067
+ height: 40px;
3068
+ margin-top: 2px;
3000
3069
  }
3001
3070
 
3002
- .tlui-layout__mobile .tlui-toolbar__overflow {
3071
+ .tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-main-toolbar__overflow {
3003
3072
  width: 32px;
3004
3073
  padding: 0px;
3005
3074
  }
3006
3075
 
3007
- .tlui-toolbar *[data-state='open']::after {
3008
- background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
3076
+ .tlui-main-toolbar--horizontal *[data-state='open']::after {
3077
+ background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
3078
+ opacity: 1;
3079
+ }
3080
+ .tlui-main-toolbar--vertical *[data-state='open']::after {
3081
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
3009
3082
  opacity: 1;
3010
3083
  }
3011
3084
 
3085
+ .tlui-main-toolbar__overflow-content {
3086
+ touch-action: none;
3087
+ }
3088
+
3089
+ .tlui-main-toolbar__tools [data-toolbar-visible='false'],
3090
+ .tlui-main-toolbar__overflow-content [data-toolbar-visible='false'] {
3091
+ display: none;
3092
+ }
3093
+
3094
+ .tlui-main-toolbar__group:empty {
3095
+ display: none;
3096
+ }
3097
+ .tlui-row.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
3098
+ border-right: 1px solid var(--color-divider);
3099
+ margin-right: 2px;
3100
+ }
3101
+ .tlui-column.tlui-main-toolbar__group:not(
3102
+ :nth-last-child(-n + 1 of [data-toolbar-visible='true'])
3103
+ ) {
3104
+ border-bottom: 1px solid var(--color-divider);
3105
+ margin-bottom: 2px;
3106
+ }
3107
+ .tlui-grid.tlui-main-toolbar__group {
3108
+ grid-column: 1 / span 4;
3109
+ }
3110
+ .tlui-grid.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
3111
+ border-bottom: 1px solid var(--color-divider);
3112
+ margin-bottom: 2px;
3113
+ }
3114
+
3012
3115
  @media (hover: hover) {
3013
- .tlui-toolbar *[data-state='open']:not(:hover)::after {
3014
- background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
3116
+ .tlui-main-toolbar--horizontal *[data-state='open']:not(:hover)::after {
3117
+ background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
3118
+ opacity: 1;
3119
+ }
3120
+ .tlui-main-toolbar--vertical *[data-state='open']:not(:hover)::after {
3121
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
3015
3122
  opacity: 1;
3016
3123
  }
3017
3124
  }
3018
3125
 
3019
- .tlui-layout__mobile .tlui-toolbar {
3020
- transition: transform 0.15s ease-out 0.05s;
3126
+ /* ------------------- Tooltip -------------------- */
3127
+
3128
+ .tlui-tooltip {
3129
+ font-size: 12px;
3130
+ padding: 2px 8px;
3131
+ border-radius: 4px;
3132
+ background-color: var(--tl-color-tooltip);
3133
+ box-shadow: none;
3134
+ color: var(--tl-color-text-shadow);
3135
+ max-width: 400px;
3136
+ width: fit-content;
3137
+ text-align: center;
3138
+ will-change: transform, opacity;
3139
+ z-index: 2;
3140
+ }
3141
+
3142
+ .tlui-tooltip__arrow {
3143
+ fill: var(--tl-color-tooltip);
3144
+ will-change: opacity;
3145
+ }
3146
+
3147
+ [data-radix-popper-content-wrapper]:has(.tlui-tooltip) {
3148
+ z-index: var(--tl-layer-toasts) !important;
3149
+ pointer-events: none;
3021
3150
  }
3022
3151
 
3023
3152
  /* ------------------- Debug panel ------------------ */
3024
3153
 
3025
3154
  .tlui-debug-panel {
3026
- background-color: var(--color-low);
3155
+ background-color: var(--tl-color-low);
3027
3156
  width: 100%;
3028
3157
  display: grid;
3029
3158
  align-items: center;
3030
3159
  grid-template-columns: 1fr auto auto auto;
3031
3160
  justify-content: space-between;
3032
- padding-left: var(--space-4);
3033
- border-top: 1px solid var(--color-background);
3161
+ padding-left: var(--tl-space-4);
3162
+ border-top: 1px solid var(--tl-color-background);
3034
3163
  font-size: 12px;
3035
- color: var(--color-text-1);
3036
- z-index: var(--layer-panels);
3164
+ color: var(--tl-color-text-1);
3165
+ z-index: var(--tl-layer-panels);
3037
3166
  pointer-events: all;
3038
3167
  }
3039
3168
 
@@ -3049,7 +3178,7 @@ it from receiving any pointer events or affecting the cursor. */
3049
3178
 
3050
3179
  .tlui-debug-panel__fps__slow {
3051
3180
  font-weight: bold;
3052
- color: var(--color-danger);
3181
+ color: var(--tl-color-danger);
3053
3182
  }
3054
3183
 
3055
3184
  .tlui-a11y-audit {
@@ -3059,7 +3188,7 @@ it from receiving any pointer events or affecting the cursor. */
3059
3188
  .tlui-a11y-audit th,
3060
3189
  .tlui-a11y-audit td {
3061
3190
  padding: 8px;
3062
- border: 1px solid var(--color-low-border);
3191
+ border: 1px solid var(--tl-color-low-border);
3063
3192
  }
3064
3193
 
3065
3194
  /* --------------------- Toasts --------------------- */
@@ -3072,10 +3201,10 @@ it from receiving any pointer events or affecting the cursor. */
3072
3201
  align-items: flex-end;
3073
3202
  justify-content: flex-end;
3074
3203
  flex-direction: column;
3075
- gap: var(--space-3);
3204
+ gap: var(--tl-space-3);
3076
3205
  pointer-events: none;
3077
- padding: 0px var(--space-3) 64px 0px;
3078
- z-index: var(--layer-toasts);
3206
+ padding: 0px var(--tl-space-3) 64px 0px;
3207
+ z-index: var(--tl-layer-toasts);
3079
3208
  }
3080
3209
 
3081
3210
  .tlui-toast__viewport > * {
@@ -3084,34 +3213,34 @@ it from receiving any pointer events or affecting the cursor. */
3084
3213
 
3085
3214
  .tlui-toast__icon {
3086
3215
  padding-top: 11px;
3087
- padding-left: var(--space-4);
3088
- color: var(--color-text-1);
3216
+ padding-left: var(--tl-space-4);
3217
+ color: var(--tl-color-text-1);
3089
3218
  }
3090
3219
 
3091
3220
  .tlui-toast__container {
3092
3221
  min-width: 200px;
3093
3222
  display: flex;
3094
3223
  flex-direction: row;
3095
- background-color: var(--color-panel);
3096
- box-shadow: var(--shadow-2);
3097
- border-radius: var(--radius-3);
3224
+ background-color: var(--tl-color-panel);
3225
+ box-shadow: var(--tl-shadow-2);
3226
+ border-radius: var(--tl-radius-3);
3098
3227
  font-size: 12px;
3099
3228
  }
3100
3229
 
3101
3230
  .tlui-toast__container[data-severity='success'] .tlui-icon {
3102
- color: var(--color-success);
3231
+ color: var(--tl-color-success);
3103
3232
  }
3104
3233
 
3105
3234
  .tlui-toast__container[data-severity='info'] .tlui-icon {
3106
- color: var(--color-info);
3235
+ color: var(--tl-color-info);
3107
3236
  }
3108
3237
 
3109
3238
  .tlui-toast__container[data-severity='warning'] .tlui-icon {
3110
- color: var(--color-warning);
3239
+ color: var(--tl-color-warning);
3111
3240
  }
3112
3241
 
3113
3242
  .tlui-toast__container[data-severity='error'] .tlui-icon {
3114
- color: var(--color-danger);
3243
+ color: var(--tl-color-danger);
3115
3244
  }
3116
3245
 
3117
3246
  .tlui-toast__main {
@@ -3120,27 +3249,27 @@ it from receiving any pointer events or affecting the cursor. */
3120
3249
  }
3121
3250
 
3122
3251
  .tlui-toast__content {
3123
- padding: var(--space-4);
3252
+ padding: var(--tl-space-4);
3124
3253
  display: flex;
3125
3254
  line-height: 1.4;
3126
3255
  flex-direction: column;
3127
- gap: var(--space-3);
3256
+ gap: var(--tl-space-3);
3128
3257
  }
3129
3258
 
3130
3259
  .tlui-toast__main[data-actions='true'] .tlui-toast__content {
3131
- padding-bottom: var(--space-2);
3260
+ padding-bottom: var(--tl-space-2);
3132
3261
  }
3133
3262
 
3134
3263
  .tlui-toast__title {
3135
3264
  font-weight: bold;
3136
- color: var(--color-text-1);
3265
+ color: var(--tl-color-text-1);
3137
3266
  /* this makes the default toast look better */
3138
3267
  line-height: 16px;
3139
3268
  }
3140
3269
 
3141
3270
  .tlui-toast__description {
3142
- color: var(--color-text-1);
3143
- padding: var(--space-3);
3271
+ color: var(--tl-color-text-1);
3272
+ padding: var(--tl-space-3);
3144
3273
  margin: 0px;
3145
3274
  padding: 0px;
3146
3275
  }
@@ -3163,11 +3292,11 @@ it from receiving any pointer events or affecting the cursor. */
3163
3292
 
3164
3293
  @media (prefers-reduced-motion: no-preference) {
3165
3294
  .tlui-toast__container[data-state='open'] {
3166
- animation: slide-in 200ms cubic-bezier(0.785, 0.135, 0.15, 0.86);
3295
+ animation: tlui-slide-in 200ms cubic-bezier(0.785, 0.135, 0.15, 0.86);
3167
3296
  }
3168
3297
 
3169
3298
  .tlui-toast__container[data-state='closed'] {
3170
- animation: hide 100ms ease-in;
3299
+ animation: tlui-fade-out 100ms ease-in;
3171
3300
  }
3172
3301
 
3173
3302
  .tlui-toast__container[data-swipe='move'] {
@@ -3180,7 +3309,7 @@ it from receiving any pointer events or affecting the cursor. */
3180
3309
  }
3181
3310
 
3182
3311
  .tlui-toast__container[data-swipe='end'] {
3183
- animation: swipe-out 100ms ease-out;
3312
+ animation: tlui-slide-out 100ms ease-out;
3184
3313
  }
3185
3314
  }
3186
3315
 
@@ -3192,14 +3321,14 @@ it from receiving any pointer events or affecting the cursor. */
3192
3321
  left: 0px;
3193
3322
  width: 100%;
3194
3323
  height: 100%;
3195
- z-index: var(--layer-canvas-overlays);
3196
- background-color: var(--color-overlay);
3324
+ z-index: var(--tl-layer-canvas-overlays);
3325
+ background-color: var(--tl-color-overlay);
3197
3326
  pointer-events: all;
3198
- animation: fadeIn 0.12s ease-out;
3327
+ animation: tl-fade-in 0.12s ease-out;
3199
3328
  display: grid;
3200
3329
  place-items: center;
3201
3330
  overflow-y: auto;
3202
- padding: 0px var(--space-3);
3331
+ padding: 0px var(--tl-space-3);
3203
3332
  }
3204
3333
 
3205
3334
  .tlui-dialog__content {
@@ -3207,9 +3336,9 @@ it from receiving any pointer events or affecting the cursor. */
3207
3336
  flex-direction: column;
3208
3337
  position: relative;
3209
3338
  cursor: default;
3210
- background-color: var(--color-panel);
3211
- box-shadow: var(--shadow-3);
3212
- border-radius: var(--radius-3);
3339
+ background-color: var(--tl-color-panel);
3340
+ box-shadow: var(--tl-shadow-3);
3341
+ border-radius: var(--tl-radius-3);
3213
3342
  font-size: 12px;
3214
3343
  overflow: hidden;
3215
3344
  min-width: 300px;
@@ -3222,9 +3351,9 @@ it from receiving any pointer events or affecting the cursor. */
3222
3351
  display: flex;
3223
3352
  align-items: center;
3224
3353
  flex: 0;
3225
- z-index: var(--layer-header-footer);
3226
- padding-left: var(--space-4);
3227
- color: var(--color-text);
3354
+ z-index: var(--tl-layer-header-footer);
3355
+ padding-left: var(--tl-space-4);
3356
+ color: var(--tl-color-text);
3228
3357
  height: 40px;
3229
3358
  }
3230
3359
 
@@ -3233,7 +3362,7 @@ it from receiving any pointer events or affecting the cursor. */
3233
3362
  font-weight: inherit;
3234
3363
  font-size: 12px;
3235
3364
  margin: 0px;
3236
- color: var(--color-text-1);
3365
+ color: var(--tl-color-text-1);
3237
3366
  }
3238
3367
 
3239
3368
  .tlui-dialog__header__close {
@@ -3241,16 +3370,16 @@ it from receiving any pointer events or affecting the cursor. */
3241
3370
  }
3242
3371
 
3243
3372
  .tlui-dialog__body {
3244
- padding: var(--space-4) var(--space-4);
3373
+ padding: var(--tl-space-4) var(--tl-space-4);
3245
3374
  flex: 0 1;
3246
3375
  overflow-y: auto;
3247
3376
  overflow-x: hidden;
3248
- color: var(--color-text-1);
3377
+ color: var(--tl-color-text-1);
3249
3378
  user-select: all;
3250
3379
  -webkit-user-select: text;
3251
3380
  }
3252
3381
  .tlui-dialog__body a {
3253
- color: var(--color-selected);
3382
+ color: var(--tl-color-selected);
3254
3383
  }
3255
3384
 
3256
3385
  .tlui-dialog__body ul,
@@ -3258,13 +3387,13 @@ it from receiving any pointer events or affecting the cursor. */
3258
3387
  padding-left: 16px;
3259
3388
  display: flex;
3260
3389
  flex-direction: column;
3261
- gap: var(--space-2);
3390
+ gap: var(--tl-space-2);
3262
3391
  }
3263
3392
 
3264
3393
  .tlui-dialog__footer {
3265
3394
  position: relative;
3266
3395
  min-height: 12px;
3267
- z-index: var(--layer-header-footer);
3396
+ z-index: var(--tl-layer-header-footer);
3268
3397
  }
3269
3398
 
3270
3399
  .tlui-dialog__footer__actions {
@@ -3284,15 +3413,15 @@ it from receiving any pointer events or affecting the cursor. */
3284
3413
  .tlui-edit-link-dialog {
3285
3414
  display: flex;
3286
3415
  flex-direction: column;
3287
- gap: var(--space-4);
3288
- color: var(--color-text);
3416
+ gap: var(--tl-space-4);
3417
+ color: var(--tl-color-text);
3289
3418
  }
3290
3419
 
3291
3420
  .tlui-edit-link-dialog__input {
3292
- background-color: var(--color-muted-2);
3421
+ background-color: var(--tl-color-muted-2);
3293
3422
  flex-grow: 2;
3294
- border-radius: var(--radius-2);
3295
- padding: 0px var(--space-4);
3423
+ border-radius: var(--tl-radius-2);
3424
+ padding: 0px var(--tl-space-4);
3296
3425
  }
3297
3426
 
3298
3427
  /* Embed Dialog */
@@ -3300,15 +3429,15 @@ it from receiving any pointer events or affecting the cursor. */
3300
3429
  .tlui-embed__spacer {
3301
3430
  flex-grow: 2;
3302
3431
  min-height: 0px;
3303
- margin-left: calc(-1 * var(--space-4));
3304
- margin-top: calc(-1 * var(--space-4));
3432
+ margin-left: calc(-1 * var(--tl-space-4));
3433
+ margin-top: calc(-1 * var(--tl-space-4));
3305
3434
  pointer-events: none;
3306
3435
  }
3307
3436
 
3308
3437
  .tlui-embed-dialog__list {
3309
3438
  display: flex;
3310
3439
  flex-direction: column;
3311
- padding: 0px var(--space-3) var(--space-4) var(--space-3);
3440
+ padding: 0px var(--tl-space-3) var(--tl-space-4) var(--tl-space-3);
3312
3441
  }
3313
3442
 
3314
3443
  .tlui-embed-dialog__item__image {
@@ -3320,49 +3449,49 @@ it from receiving any pointer events or affecting the cursor. */
3320
3449
  background-size: contain;
3321
3450
  background-repeat: no-repeat;
3322
3451
  background-position: center center;
3323
- background-color: var(--color-selected-contrast);
3324
- border-radius: var(--radius-1);
3452
+ background-color: var(--tl-color-selected-contrast);
3453
+ border-radius: var(--tl-radius-1);
3325
3454
  }
3326
3455
 
3327
3456
  .tlui-embed-dialog__enter {
3328
3457
  display: flex;
3329
3458
  flex-direction: column;
3330
- gap: var(--space-4);
3331
- color: var(--color-text-1);
3459
+ gap: var(--tl-space-4);
3460
+ color: var(--tl-color-text-1);
3332
3461
  }
3333
3462
 
3334
3463
  .tlui-embed-dialog__input {
3335
- background-color: var(--color-muted-2);
3464
+ background-color: var(--tl-color-muted-2);
3336
3465
  flex-grow: 2;
3337
- border-radius: var(--radius-2);
3338
- padding: 0px var(--space-4);
3466
+ border-radius: var(--tl-radius-2);
3467
+ padding: 0px var(--tl-space-4);
3339
3468
  }
3340
3469
 
3341
3470
  .tlui-embed-dialog__warning {
3342
- color: var(--color-danger);
3471
+ color: var(--tl-color-danger);
3343
3472
  text-shadow: none;
3344
3473
  }
3345
3474
 
3346
3475
  .tlui-embed-dialog__instruction__link {
3347
3476
  display: flex;
3348
- gap: var(--space-1);
3349
- margin-top: var(--space-4);
3477
+ gap: var(--tl-space-1);
3478
+ margin-top: var(--tl-space-4);
3350
3479
  }
3351
3480
 
3352
3481
  .tlui-embed-dialog__enter a {
3353
- color: var(--color-text-1);
3482
+ color: var(--tl-color-text-1);
3354
3483
  }
3355
3484
 
3356
3485
  /* --------------- Keyboard shortcuts --------------- */
3357
3486
 
3358
3487
  .tlui-shortcuts-dialog__header {
3359
- border-bottom: 1px solid var(--color-divider);
3488
+ border-bottom: 1px solid var(--tl-color-divider);
3360
3489
  }
3361
3490
 
3362
3491
  .tlui-shortcuts-dialog__body {
3363
3492
  position: relative;
3364
3493
  columns: 3;
3365
- column-gap: var(--space-9);
3494
+ column-gap: var(--tl-space-9);
3366
3495
  pointer-events: all;
3367
3496
  touch-action: auto;
3368
3497
 
@@ -3380,14 +3509,14 @@ it from receiving any pointer events or affecting the cursor. */
3380
3509
 
3381
3510
  .tlui-shortcuts-dialog__group {
3382
3511
  break-inside: avoid-column;
3383
- padding-bottom: var(--space-6);
3512
+ padding-bottom: var(--tl-space-6);
3384
3513
  }
3385
3514
 
3386
3515
  .tlui-shortcuts-dialog__group__title {
3387
3516
  font-size: inherit;
3388
3517
  font-weight: inherit;
3389
3518
  margin: 0px;
3390
- color: var(--color-text-3);
3519
+ color: var(--tl-color-text-3);
3391
3520
  height: 32px;
3392
3521
  display: flex;
3393
3522
  align-items: center;
@@ -3396,12 +3525,12 @@ it from receiving any pointer events or affecting the cursor. */
3396
3525
  .tlui-shortcuts-dialog__group__content {
3397
3526
  display: flex;
3398
3527
  flex-direction: column;
3399
- color: var(--color-text-1);
3528
+ color: var(--tl-color-text-1);
3400
3529
  }
3401
3530
 
3402
3531
  .tlui-shortcuts-dialog__key-pair {
3403
3532
  display: flex;
3404
- gap: var(--space-4);
3533
+ gap: var(--tl-space-4);
3405
3534
  align-items: center;
3406
3535
  justify-content: space-between;
3407
3536
  height: 32px;
@@ -3428,12 +3557,12 @@ it from receiving any pointer events or affecting the cursor. */
3428
3557
  height: 24px;
3429
3558
  background: linear-gradient(
3430
3559
  to bottom,
3431
- var(--color-panel-transparent) 0%,
3432
- var(--color-panel) 90%,
3433
- var(--color-panel) 100%
3560
+ var(--tl-color-panel-transparent) 0%,
3561
+ var(--tl-color-panel) 90%,
3562
+ var(--tl-color-panel) 100%
3434
3563
  );
3435
- border-bottom-left-radius: var(--radius-3);
3436
- border-bottom-right-radius: var(--radius-3);
3564
+ border-bottom-left-radius: var(--tl-radius-3);
3565
+ border-bottom-right-radius: var(--tl-radius-3);
3437
3566
  pointer-events: none;
3438
3567
  }
3439
3568
 
@@ -3448,10 +3577,10 @@ it from receiving any pointer events or affecting the cursor. */
3448
3577
  .tlui-help-menu {
3449
3578
  pointer-events: all;
3450
3579
  position: absolute;
3451
- bottom: var(--space-2);
3452
- right: var(--space-2);
3453
- z-index: var(--layer-panels);
3454
- border: 2px solid var(--color-background);
3580
+ bottom: var(--tl-space-2);
3581
+ right: var(--tl-space-2);
3582
+ z-index: var(--tl-layer-panels);
3583
+ border: 2px solid var(--tl-color-background);
3455
3584
  border-radius: 100%;
3456
3585
  }
3457
3586
 
@@ -3462,7 +3591,7 @@ it from receiving any pointer events or affecting the cursor. */
3462
3591
  display: flex;
3463
3592
  flex-direction: row;
3464
3593
  justify-content: flex-end;
3465
- z-index: var(--layer-panels);
3594
+ z-index: var(--tl-layer-panels);
3466
3595
  align-items: center;
3467
3596
  padding-top: 2px;
3468
3597
  padding-right: 4px;
@@ -3478,7 +3607,7 @@ it from receiving any pointer events or affecting the cursor. */
3478
3607
  border: none;
3479
3608
  cursor: pointer;
3480
3609
  pointer-events: all;
3481
- border-radius: var(--radius-1);
3610
+ border-radius: var(--tl-radius-1);
3482
3611
  padding-right: 1px;
3483
3612
  height: 100%;
3484
3613
  }
@@ -3491,8 +3620,8 @@ it from receiving any pointer events or affecting the cursor. */
3491
3620
  .tlui-people-menu__avatar {
3492
3621
  height: 24px;
3493
3622
  width: 24px;
3494
- border: 2px solid var(--color-background);
3495
- background-color: var(--color-low);
3623
+ border: 2px solid var(--tl-color-background);
3624
+ background-color: var(--tl-color-low);
3496
3625
  border-radius: 100%;
3497
3626
  display: flex;
3498
3627
  align-items: center;
@@ -3501,7 +3630,7 @@ it from receiving any pointer events or affecting the cursor. */
3501
3630
  font-size: 10px;
3502
3631
  font-weight: bold;
3503
3632
  text-align: center;
3504
- color: var(--color-selected-contrast);
3633
+ color: var(--tl-color-selected-contrast);
3505
3634
  z-index: 2;
3506
3635
  }
3507
3636
 
@@ -3515,7 +3644,7 @@ it from receiving any pointer events or affecting the cursor. */
3515
3644
 
3516
3645
  @media (hover: hover) {
3517
3646
  .tlui-people-menu__avatars-button:hover .tlui-people-menu__avatar {
3518
- border-color: var(--color-low);
3647
+ border-color: var(--tl-color-low);
3519
3648
  }
3520
3649
  }
3521
3650
 
@@ -3523,12 +3652,12 @@ it from receiving any pointer events or affecting the cursor. */
3523
3652
  min-width: 0px;
3524
3653
  font-size: 11px;
3525
3654
  font-weight: 600;
3526
- color: var(--color-text-1);
3655
+ color: var(--tl-color-text-1);
3527
3656
  font-family: inherit;
3528
3657
  padding: 0px 4px;
3529
3658
  }
3530
3659
  .tlui-people-menu__more::after {
3531
- border-radius: var(--radius-2);
3660
+ border-radius: var(--tl-radius-2);
3532
3661
  inset: 0px;
3533
3662
  }
3534
3663
 
@@ -3557,7 +3686,7 @@ it from receiving any pointer events or affecting the cursor. */
3557
3686
  }
3558
3687
 
3559
3688
  .tlui-people-menu__section:not(:last-child) {
3560
- border-bottom: 1px solid var(--color-divider);
3689
+ border-bottom: 1px solid var(--tl-color-divider);
3561
3690
  }
3562
3691
 
3563
3692
  .tlui-people-menu__user {
@@ -3576,7 +3705,7 @@ it from receiving any pointer events or affecting the cursor. */
3576
3705
  text-overflow: ellipsis;
3577
3706
  white-space: nowrap;
3578
3707
  font-size: 12px;
3579
- color: var(--color-text-1);
3708
+ color: var(--tl-color-text-1);
3580
3709
  max-width: 100%;
3581
3710
  flex-grow: 1;
3582
3711
  flex-shrink: 100;
@@ -3588,7 +3717,7 @@ it from receiving any pointer events or affecting the cursor. */
3588
3717
  text-overflow: ellipsis;
3589
3718
  white-space: nowrap;
3590
3719
  font-size: 12px;
3591
- color: var(--color-text-3);
3720
+ color: var(--tl-color-text-3);
3592
3721
  flex-grow: 100;
3593
3722
  flex-shrink: 0;
3594
3723
  margin-left: 4px;
@@ -3679,7 +3808,7 @@ it from receiving any pointer events or affecting the cursor. */
3679
3808
  inset: 0px;
3680
3809
  border-width: 2px;
3681
3810
  border-style: solid;
3682
- z-index: var(--layer-following-indicator);
3811
+ z-index: var(--tl-layer-following-indicator);
3683
3812
  pointer-events: none;
3684
3813
  }
3685
3814
 
@@ -3698,7 +3827,7 @@ it from receiving any pointer events or affecting the cursor. */
3698
3827
  }
3699
3828
 
3700
3829
  .tlui-contextual-toolbar [data-isactive='true']::after {
3701
- background-color: var(--color-muted-2);
3830
+ background-color: var(--tl-color-muted-2);
3702
3831
  opacity: 1;
3703
3832
  }
3704
3833
 
@@ -3714,7 +3843,7 @@ it from receiving any pointer events or affecting the cursor. */
3714
3843
 
3715
3844
  .tlui-contextual-toolbar[data-visible='true'] {
3716
3845
  opacity: 1;
3717
- z-index: var(--layer-menus);
3846
+ z-index: var(--tl-layer-menus);
3718
3847
  }
3719
3848
 
3720
3849
  .tlui-contextual-toolbar[data-interactive='true'],
@@ -3762,7 +3891,7 @@ it from receiving any pointer events or affecting the cursor. */
3762
3891
  }
3763
3892
 
3764
3893
  /* ------------------- Animations ------------------- */
3765
- @keyframes hide {
3894
+ @keyframes tlui-fade-out {
3766
3895
  0% {
3767
3896
  opacity: 1;
3768
3897
  }
@@ -3771,21 +3900,21 @@ it from receiving any pointer events or affecting the cursor. */
3771
3900
  }
3772
3901
  }
3773
3902
 
3774
- @keyframes slide-in {
3903
+ @keyframes tlui-slide-in {
3775
3904
  from {
3776
- transform: translateX(calc(100% + var(--space-3)));
3905
+ transform: translateX(calc(100% + var(--tl-space-3)));
3777
3906
  }
3778
3907
  to {
3779
3908
  transform: translateX(0px);
3780
3909
  }
3781
3910
  }
3782
3911
 
3783
- @keyframes swipe-out {
3912
+ @keyframes tlui-slide-out {
3784
3913
  from {
3785
3914
  transform: translateX(var(--radix-toast-swipe-end-x));
3786
3915
  }
3787
3916
  to {
3788
- transform: translateX(calc(100% + var(--space-3)));
3917
+ transform: translateX(calc(100% + var(--tl-space-3)));
3789
3918
  }
3790
3919
  }
3791
3920