tldraw 3.16.0-canary.f60032f16651 → 3.16.0-canary.fa03b5a9ad13

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 (533) hide show
  1. package/dist-cjs/index.d.ts +412 -112
  2. package/dist-cjs/index.js +49 -14
  3. package/dist-cjs/index.js.map +2 -2
  4. package/dist-cjs/lib/Tldraw.js +12 -2
  5. package/dist-cjs/lib/Tldraw.js.map +2 -2
  6. package/dist-cjs/lib/canvas/TldrawScribble.js +1 -1
  7. package/dist-cjs/lib/canvas/TldrawScribble.js.map +2 -2
  8. package/dist-cjs/lib/defaultExternalContentHandlers.js +15 -4
  9. package/dist-cjs/lib/defaultExternalContentHandlers.js.map +2 -2
  10. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js +3 -3
  11. package/dist-cjs/lib/shapes/arrow/ArrowShapeUtil.js.map +2 -2
  12. package/dist-cjs/lib/shapes/arrow/arrow-types.js.map +1 -1
  13. package/dist-cjs/lib/shapes/arrow/arrowLabel.js +6 -0
  14. package/dist-cjs/lib/shapes/arrow/arrowLabel.js.map +3 -3
  15. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js +3 -2
  16. package/dist-cjs/lib/shapes/arrow/arrowTargetState.js.map +2 -2
  17. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js +3 -3
  18. package/dist-cjs/lib/shapes/arrow/elbow/ElbowArrowDebug.js.map +1 -1
  19. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js +1 -1
  20. package/dist-cjs/lib/shapes/arrow/toolStates/Pointing.js.map +2 -2
  21. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js +4 -4
  22. package/dist-cjs/lib/shapes/bookmark/BookmarkShapeUtil.js.map +2 -2
  23. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js +3 -3
  24. package/dist-cjs/lib/shapes/draw/DrawShapeUtil.js.map +2 -2
  25. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js +1 -1
  26. package/dist-cjs/lib/shapes/embed/EmbedShapeUtil.js.map +1 -1
  27. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js +20 -13
  28. package/dist-cjs/lib/shapes/frame/FrameShapeUtil.js.map +2 -2
  29. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js +1 -1
  30. package/dist-cjs/lib/shapes/frame/components/FrameHeading.js.map +2 -2
  31. package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js +8 -2
  32. package/dist-cjs/lib/shapes/frame/components/FrameLabelInput.js.map +2 -2
  33. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js +3 -2
  34. package/dist-cjs/lib/shapes/geo/GeoShapeUtil.js.map +2 -2
  35. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js +2 -1
  36. package/dist-cjs/lib/shapes/geo/components/GeoShapeBody.js.map +2 -2
  37. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js +5 -1
  38. package/dist-cjs/lib/shapes/highlight/HighlightShapeUtil.js.map +2 -2
  39. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js +6 -3
  40. package/dist-cjs/lib/shapes/image/ImageShapeUtil.js.map +2 -2
  41. package/dist-cjs/lib/shapes/line/LineShapeUtil.js +5 -1
  42. package/dist-cjs/lib/shapes/line/LineShapeUtil.js.map +2 -2
  43. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js +6 -5
  44. package/dist-cjs/lib/shapes/note/NoteShapeUtil.js.map +2 -2
  45. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js +4 -4
  46. package/dist-cjs/lib/shapes/shared/HyperlinkButton.js.map +2 -2
  47. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js +1 -3
  48. package/dist-cjs/lib/shapes/shared/PlainTextLabel.js.map +2 -2
  49. package/dist-cjs/lib/shapes/shared/ShapeFill.js +4 -4
  50. package/dist-cjs/lib/shapes/shared/ShapeFill.js.map +2 -2
  51. package/dist-cjs/lib/shapes/shared/freehand/svg.js.map +2 -2
  52. package/dist-cjs/lib/shapes/shared/useEditablePlainText.js +3 -5
  53. package/dist-cjs/lib/shapes/shared/useEditablePlainText.js.map +2 -2
  54. package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js +0 -2
  55. package/dist-cjs/lib/shapes/shared/useImageOrVideoAsset.js.map +2 -2
  56. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js +10 -1
  57. package/dist-cjs/lib/shapes/shared/usePrefersReducedMotion.js.map +2 -2
  58. package/dist-cjs/lib/shapes/text/PlainTextArea.js +3 -2
  59. package/dist-cjs/lib/shapes/text/PlainTextArea.js.map +2 -2
  60. package/dist-cjs/lib/shapes/text/RichTextArea.js +3 -3
  61. package/dist-cjs/lib/shapes/text/RichTextArea.js.map +2 -2
  62. package/dist-cjs/lib/shapes/text/TextShapeUtil.js +2 -2
  63. package/dist-cjs/lib/shapes/text/TextShapeUtil.js.map +2 -2
  64. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js +3 -3
  65. package/dist-cjs/lib/shapes/video/VideoShapeUtil.js.map +1 -1
  66. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js +25 -1
  67. package/dist-cjs/lib/tools/EraserTool/childStates/Erasing.js.map +2 -2
  68. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js +12 -0
  69. package/dist-cjs/lib/tools/EraserTool/childStates/Pointing.js.map +2 -2
  70. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js +3 -1
  71. package/dist-cjs/lib/tools/SelectTool/childStates/DraggingHandle.js.map +2 -2
  72. package/dist-cjs/lib/ui/TldrawUi.js +27 -12
  73. package/dist-cjs/lib/ui/TldrawUi.js.map +3 -3
  74. package/dist-cjs/lib/ui/assetUrls.js +13 -10
  75. package/dist-cjs/lib/ui/assetUrls.js.map +2 -2
  76. package/dist-cjs/lib/ui/components/A11y.js +1 -1
  77. package/dist-cjs/lib/ui/components/A11y.js.map +2 -2
  78. package/dist-cjs/lib/ui/components/AccessibilityMenu.js +35 -0
  79. package/dist-cjs/lib/ui/components/AccessibilityMenu.js.map +7 -0
  80. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js +12 -3
  81. package/dist-cjs/lib/ui/components/ActionsMenu/DefaultActionsMenu.js.map +2 -2
  82. package/dist-cjs/lib/ui/components/{FollowingIndicator.js → DefaultFollowingIndicator.js} +6 -6
  83. package/dist-cjs/lib/ui/components/DefaultFollowingIndicator.js.map +7 -0
  84. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js +3 -2
  85. package/dist-cjs/lib/ui/components/DefaultMenuPanel.js.map +2 -2
  86. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js +6 -6
  87. package/dist-cjs/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.js.map +1 -1
  88. package/dist-cjs/lib/ui/components/LanguageMenu.js +1 -0
  89. package/dist-cjs/lib/ui/components/LanguageMenu.js.map +2 -2
  90. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js +3 -3
  91. package/dist-cjs/lib/ui/components/MainMenu/DefaultMainMenuContent.js.map +2 -2
  92. package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js +2 -1
  93. package/dist-cjs/lib/ui/components/Minimap/DefaultMinimap.js.map +2 -2
  94. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js +4 -4
  95. package/dist-cjs/lib/ui/components/Minimap/MinimapManager.js.map +2 -2
  96. package/dist-cjs/lib/ui/components/MobileStylePanel.js +5 -3
  97. package/dist-cjs/lib/ui/components/MobileStylePanel.js.map +2 -2
  98. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js +1 -1
  99. package/dist-cjs/lib/ui/components/NavigationPanel/DefaultNavigationPanel.js.map +2 -2
  100. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js +3 -2
  101. package/dist-cjs/lib/ui/components/PageMenu/DefaultPageMenu.js.map +2 -2
  102. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js +3 -2
  103. package/dist-cjs/lib/ui/components/SharePanel/PeopleMenuItem.js.map +2 -2
  104. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js +2 -2
  105. package/dist-cjs/lib/ui/components/SharePanel/UserPresenceColorPicker.js.map +2 -2
  106. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js +11 -4
  107. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanel.js.map +2 -2
  108. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js +249 -279
  109. package/dist-cjs/lib/ui/components/StylePanel/DefaultStylePanelContent.js.map +2 -2
  110. package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js +147 -0
  111. package/dist-cjs/lib/ui/components/StylePanel/StylePanelButtonPicker.js.map +7 -0
  112. package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js +68 -0
  113. package/dist-cjs/lib/ui/components/StylePanel/StylePanelContext.js.map +7 -0
  114. package/dist-cjs/lib/ui/components/StylePanel/{DoubleDropdownPicker.js → StylePanelDoubleDropdownPicker.js} +26 -25
  115. package/dist-cjs/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.js.map +7 -0
  116. package/dist-cjs/lib/ui/components/StylePanel/{DropdownPicker.js → StylePanelDropdownPicker.js} +47 -43
  117. package/dist-cjs/lib/ui/components/StylePanel/StylePanelDropdownPicker.js.map +7 -0
  118. package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js +28 -0
  119. package/dist-cjs/lib/ui/components/StylePanel/StylePanelSubheading.js.map +7 -0
  120. package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js +2 -0
  121. package/dist-cjs/lib/ui/components/Toolbar/AltTextEditor.js.map +2 -2
  122. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js +39 -10
  123. package/dist-cjs/lib/ui/components/Toolbar/DefaultImageToolbarContent.js.map +2 -2
  124. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js +66 -21
  125. package/dist-cjs/lib/ui/components/Toolbar/DefaultToolbar.js.map +3 -3
  126. package/dist-cjs/lib/ui/components/Toolbar/DefaultVideoToolbarContent.js +15 -3
  127. package/dist-cjs/lib/ui/components/Toolbar/DefaultVideoToolbarContent.js.map +2 -2
  128. package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js +2 -1
  129. package/dist-cjs/lib/ui/components/Toolbar/LinkEditor.js.map +2 -2
  130. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js +189 -80
  131. package/dist-cjs/lib/ui/components/Toolbar/OverflowingToolbar.js.map +3 -3
  132. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js +10 -5
  133. package/dist-cjs/lib/ui/components/Toolbar/ToggleToolLockedButton.js.map +2 -2
  134. package/dist-cjs/lib/ui/components/menu-items.js +6 -0
  135. package/dist-cjs/lib/ui/components/menu-items.js.map +2 -2
  136. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js +11 -2
  137. package/dist-cjs/lib/ui/components/primitives/TldrawUiContextualToolbar.js.map +2 -2
  138. package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js +5 -3
  139. package/dist-cjs/lib/ui/components/primitives/TldrawUiInput.js.map +2 -2
  140. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js +3 -2
  141. package/dist-cjs/lib/ui/components/primitives/TldrawUiPopover.js.map +3 -3
  142. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js +18 -5
  143. package/dist-cjs/lib/ui/components/primitives/TldrawUiSlider.js.map +2 -2
  144. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js +33 -7
  145. package/dist-cjs/lib/ui/components/primitives/TldrawUiToolbar.js.map +2 -2
  146. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js +306 -0
  147. package/dist-cjs/lib/ui/components/primitives/TldrawUiTooltip.js.map +7 -0
  148. package/dist-cjs/lib/ui/components/primitives/layout.js +76 -0
  149. package/dist-cjs/lib/ui/components/primitives/layout.js.map +7 -0
  150. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.js +3 -0
  151. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.js.map +2 -2
  152. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuContext.js.map +2 -2
  153. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js +25 -12
  154. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuGroup.js.map +2 -2
  155. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js +19 -33
  156. package/dist-cjs/lib/ui/components/primitives/menus/TldrawUiMenuItem.js.map +2 -2
  157. package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js +3 -2
  158. package/dist-cjs/lib/ui/context/TldrawUiContextProvider.js.map +2 -2
  159. package/dist-cjs/lib/ui/context/actions.js +44 -10
  160. package/dist-cjs/lib/ui/context/actions.js.map +2 -2
  161. package/dist-cjs/lib/ui/context/components.js +2 -0
  162. package/dist-cjs/lib/ui/context/components.js.map +2 -2
  163. package/dist-cjs/lib/ui/context/events.js.map +2 -2
  164. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js +1 -1
  165. package/dist-cjs/lib/ui/hooks/useClipboardEvents.js.map +2 -2
  166. package/dist-cjs/lib/ui/hooks/useExportAs.js +3 -2
  167. package/dist-cjs/lib/ui/hooks/useExportAs.js.map +2 -2
  168. package/dist-cjs/lib/ui/hooks/useTools.js +22 -4
  169. package/dist-cjs/lib/ui/hooks/useTools.js.map +2 -2
  170. package/dist-cjs/lib/ui/hooks/useTranslation/TLUiTranslationKey.js.map +1 -1
  171. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js +8 -1
  172. package/dist-cjs/lib/ui/hooks/useTranslation/defaultTranslation.js.map +2 -2
  173. package/dist-cjs/lib/ui/kbd-utils.js +9 -3
  174. package/dist-cjs/lib/ui/kbd-utils.js.map +2 -2
  175. package/dist-cjs/lib/ui/version.js +3 -3
  176. package/dist-cjs/lib/ui/version.js.map +1 -1
  177. package/dist-cjs/lib/utils/export/copyAs.js +1 -2
  178. package/dist-cjs/lib/utils/export/copyAs.js.map +2 -2
  179. package/dist-cjs/lib/utils/export/export.js +0 -20
  180. package/dist-cjs/lib/utils/export/export.js.map +2 -2
  181. package/dist-cjs/lib/utils/export/exportAs.js +1 -2
  182. package/dist-cjs/lib/utils/export/exportAs.js.map +2 -2
  183. package/dist-esm/index.d.mts +412 -112
  184. package/dist-esm/index.mjs +91 -29
  185. package/dist-esm/index.mjs.map +2 -2
  186. package/dist-esm/lib/Tldraw.mjs +14 -4
  187. package/dist-esm/lib/Tldraw.mjs.map +2 -2
  188. package/dist-esm/lib/canvas/TldrawScribble.mjs +1 -1
  189. package/dist-esm/lib/canvas/TldrawScribble.mjs.map +2 -2
  190. package/dist-esm/lib/defaultExternalContentHandlers.mjs +15 -4
  191. package/dist-esm/lib/defaultExternalContentHandlers.mjs.map +2 -2
  192. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs +4 -3
  193. package/dist-esm/lib/shapes/arrow/ArrowShapeUtil.mjs.map +2 -2
  194. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs +6 -0
  195. package/dist-esm/lib/shapes/arrow/arrowLabel.mjs.map +3 -3
  196. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs +3 -2
  197. package/dist-esm/lib/shapes/arrow/arrowTargetState.mjs.map +2 -2
  198. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs +3 -3
  199. package/dist-esm/lib/shapes/arrow/elbow/ElbowArrowDebug.mjs.map +1 -1
  200. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs +1 -1
  201. package/dist-esm/lib/shapes/arrow/toolStates/Pointing.mjs.map +2 -2
  202. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs +4 -5
  203. package/dist-esm/lib/shapes/bookmark/BookmarkShapeUtil.mjs.map +2 -2
  204. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs +4 -3
  205. package/dist-esm/lib/shapes/draw/DrawShapeUtil.mjs.map +2 -2
  206. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs +1 -1
  207. package/dist-esm/lib/shapes/embed/EmbedShapeUtil.mjs.map +1 -1
  208. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs +21 -13
  209. package/dist-esm/lib/shapes/frame/FrameShapeUtil.mjs.map +2 -2
  210. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs +1 -1
  211. package/dist-esm/lib/shapes/frame/components/FrameHeading.mjs.map +2 -2
  212. package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs +9 -3
  213. package/dist-esm/lib/shapes/frame/components/FrameLabelInput.mjs.map +2 -2
  214. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs +4 -2
  215. package/dist-esm/lib/shapes/geo/GeoShapeUtil.mjs.map +2 -2
  216. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs +2 -1
  217. package/dist-esm/lib/shapes/geo/components/GeoShapeBody.mjs.map +2 -2
  218. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs +6 -1
  219. package/dist-esm/lib/shapes/highlight/HighlightShapeUtil.mjs.map +2 -2
  220. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs +6 -3
  221. package/dist-esm/lib/shapes/image/ImageShapeUtil.mjs.map +2 -2
  222. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs +6 -1
  223. package/dist-esm/lib/shapes/line/LineShapeUtil.mjs.map +2 -2
  224. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs +7 -5
  225. package/dist-esm/lib/shapes/note/NoteShapeUtil.mjs.map +2 -2
  226. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs +5 -5
  227. package/dist-esm/lib/shapes/shared/HyperlinkButton.mjs.map +2 -2
  228. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs +1 -3
  229. package/dist-esm/lib/shapes/shared/PlainTextLabel.mjs.map +2 -2
  230. package/dist-esm/lib/shapes/shared/ShapeFill.mjs +5 -4
  231. package/dist-esm/lib/shapes/shared/ShapeFill.mjs.map +2 -2
  232. package/dist-esm/lib/shapes/shared/freehand/svg.mjs.map +2 -2
  233. package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs +3 -6
  234. package/dist-esm/lib/shapes/shared/useEditablePlainText.mjs.map +2 -2
  235. package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs +0 -2
  236. package/dist-esm/lib/shapes/shared/useImageOrVideoAsset.mjs.map +2 -2
  237. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs +10 -1
  238. package/dist-esm/lib/shapes/shared/usePrefersReducedMotion.mjs.map +2 -2
  239. package/dist-esm/lib/shapes/text/PlainTextArea.mjs +4 -3
  240. package/dist-esm/lib/shapes/text/PlainTextArea.mjs.map +2 -2
  241. package/dist-esm/lib/shapes/text/RichTextArea.mjs +3 -4
  242. package/dist-esm/lib/shapes/text/RichTextArea.mjs.map +2 -2
  243. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs +3 -2
  244. package/dist-esm/lib/shapes/text/TextShapeUtil.mjs.map +2 -2
  245. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs +3 -3
  246. package/dist-esm/lib/shapes/video/VideoShapeUtil.mjs.map +1 -1
  247. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs +26 -1
  248. package/dist-esm/lib/tools/EraserTool/childStates/Erasing.mjs.map +2 -2
  249. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs +13 -0
  250. package/dist-esm/lib/tools/EraserTool/childStates/Pointing.mjs.map +2 -2
  251. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs +3 -1
  252. package/dist-esm/lib/tools/SelectTool/childStates/DraggingHandle.mjs.map +2 -2
  253. package/dist-esm/lib/ui/TldrawUi.mjs +29 -14
  254. package/dist-esm/lib/ui/TldrawUi.mjs.map +3 -3
  255. package/dist-esm/lib/ui/assetUrls.mjs +13 -10
  256. package/dist-esm/lib/ui/assetUrls.mjs.map +2 -2
  257. package/dist-esm/lib/ui/components/A11y.mjs +1 -2
  258. package/dist-esm/lib/ui/components/A11y.mjs.map +2 -2
  259. package/dist-esm/lib/ui/components/AccessibilityMenu.mjs +19 -0
  260. package/dist-esm/lib/ui/components/AccessibilityMenu.mjs.map +7 -0
  261. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs +12 -3
  262. package/dist-esm/lib/ui/components/ActionsMenu/DefaultActionsMenu.mjs.map +2 -2
  263. package/dist-esm/lib/ui/components/{FollowingIndicator.mjs → DefaultFollowingIndicator.mjs} +3 -3
  264. package/dist-esm/lib/ui/components/DefaultFollowingIndicator.mjs.map +7 -0
  265. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs +3 -2
  266. package/dist-esm/lib/ui/components/DefaultMenuPanel.mjs.map +2 -2
  267. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs +6 -6
  268. package/dist-esm/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.mjs.map +1 -1
  269. package/dist-esm/lib/ui/components/LanguageMenu.mjs +1 -0
  270. package/dist-esm/lib/ui/components/LanguageMenu.mjs.map +2 -2
  271. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs +3 -5
  272. package/dist-esm/lib/ui/components/MainMenu/DefaultMainMenuContent.mjs.map +2 -2
  273. package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs +2 -1
  274. package/dist-esm/lib/ui/components/Minimap/DefaultMinimap.mjs.map +2 -2
  275. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs +4 -4
  276. package/dist-esm/lib/ui/components/Minimap/MinimapManager.mjs.map +2 -2
  277. package/dist-esm/lib/ui/components/MobileStylePanel.mjs +6 -3
  278. package/dist-esm/lib/ui/components/MobileStylePanel.mjs.map +2 -2
  279. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs +1 -1
  280. package/dist-esm/lib/ui/components/NavigationPanel/DefaultNavigationPanel.mjs.map +2 -2
  281. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs +3 -3
  282. package/dist-esm/lib/ui/components/PageMenu/DefaultPageMenu.mjs.map +2 -2
  283. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs +3 -2
  284. package/dist-esm/lib/ui/components/SharePanel/PeopleMenuItem.mjs.map +2 -2
  285. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs +2 -2
  286. package/dist-esm/lib/ui/components/SharePanel/UserPresenceColorPicker.mjs.map +2 -2
  287. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs +16 -5
  288. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanel.mjs.map +2 -2
  289. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs +251 -283
  290. package/dist-esm/lib/ui/components/StylePanel/DefaultStylePanelContent.mjs.map +2 -2
  291. package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs +135 -0
  292. package/dist-esm/lib/ui/components/StylePanel/StylePanelButtonPicker.mjs.map +7 -0
  293. package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs +48 -0
  294. package/dist-esm/lib/ui/components/StylePanel/StylePanelContext.mjs.map +7 -0
  295. package/dist-esm/lib/ui/components/StylePanel/{DoubleDropdownPicker.mjs → StylePanelDoubleDropdownPicker.mjs} +23 -22
  296. package/dist-esm/lib/ui/components/StylePanel/StylePanelDoubleDropdownPicker.mjs.map +7 -0
  297. package/dist-esm/lib/ui/components/StylePanel/{DropdownPicker.mjs → StylePanelDropdownPicker.mjs} +44 -40
  298. package/dist-esm/lib/ui/components/StylePanel/StylePanelDropdownPicker.mjs.map +7 -0
  299. package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs +8 -0
  300. package/dist-esm/lib/ui/components/StylePanel/StylePanelSubheading.mjs.map +7 -0
  301. package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs +2 -0
  302. package/dist-esm/lib/ui/components/Toolbar/AltTextEditor.mjs.map +2 -2
  303. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs +39 -10
  304. package/dist-esm/lib/ui/components/Toolbar/DefaultImageToolbarContent.mjs.map +2 -2
  305. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs +56 -21
  306. package/dist-esm/lib/ui/components/Toolbar/DefaultToolbar.mjs.map +2 -2
  307. package/dist-esm/lib/ui/components/Toolbar/DefaultVideoToolbarContent.mjs +15 -3
  308. package/dist-esm/lib/ui/components/Toolbar/DefaultVideoToolbarContent.mjs.map +2 -2
  309. package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs +2 -1
  310. package/dist-esm/lib/ui/components/Toolbar/LinkEditor.mjs.map +2 -2
  311. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs +192 -81
  312. package/dist-esm/lib/ui/components/Toolbar/OverflowingToolbar.mjs.map +3 -3
  313. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs +10 -5
  314. package/dist-esm/lib/ui/components/Toolbar/ToggleToolLockedButton.mjs.map +2 -2
  315. package/dist-esm/lib/ui/components/menu-items.mjs +6 -0
  316. package/dist-esm/lib/ui/components/menu-items.mjs.map +2 -2
  317. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs +11 -3
  318. package/dist-esm/lib/ui/components/primitives/TldrawUiContextualToolbar.mjs.map +2 -2
  319. package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs +6 -4
  320. package/dist-esm/lib/ui/components/primitives/TldrawUiInput.mjs.map +2 -2
  321. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs +3 -2
  322. package/dist-esm/lib/ui/components/primitives/TldrawUiPopover.mjs.map +2 -2
  323. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs +18 -5
  324. package/dist-esm/lib/ui/components/primitives/TldrawUiSlider.mjs.map +2 -2
  325. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs +33 -7
  326. package/dist-esm/lib/ui/components/primitives/TldrawUiToolbar.mjs.map +2 -2
  327. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs +284 -0
  328. package/dist-esm/lib/ui/components/primitives/TldrawUiTooltip.mjs.map +7 -0
  329. package/dist-esm/lib/ui/components/primitives/layout.mjs +46 -0
  330. package/dist-esm/lib/ui/components/primitives/layout.mjs.map +7 -0
  331. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.mjs +3 -0
  332. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.mjs.map +2 -2
  333. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuContext.mjs.map +2 -2
  334. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs +25 -12
  335. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuGroup.mjs.map +2 -2
  336. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs +19 -33
  337. package/dist-esm/lib/ui/components/primitives/menus/TldrawUiMenuItem.mjs.map +2 -2
  338. package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs +3 -2
  339. package/dist-esm/lib/ui/context/TldrawUiContextProvider.mjs.map +2 -2
  340. package/dist-esm/lib/ui/context/actions.mjs +44 -10
  341. package/dist-esm/lib/ui/context/actions.mjs.map +2 -2
  342. package/dist-esm/lib/ui/context/components.mjs +2 -0
  343. package/dist-esm/lib/ui/context/components.mjs.map +2 -2
  344. package/dist-esm/lib/ui/context/events.mjs.map +2 -2
  345. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs +1 -2
  346. package/dist-esm/lib/ui/hooks/useClipboardEvents.mjs.map +2 -2
  347. package/dist-esm/lib/ui/hooks/useExportAs.mjs +3 -2
  348. package/dist-esm/lib/ui/hooks/useExportAs.mjs.map +2 -2
  349. package/dist-esm/lib/ui/hooks/useTools.mjs +23 -4
  350. package/dist-esm/lib/ui/hooks/useTools.mjs.map +2 -2
  351. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs +8 -1
  352. package/dist-esm/lib/ui/hooks/useTranslation/defaultTranslation.mjs.map +2 -2
  353. package/dist-esm/lib/ui/kbd-utils.mjs +9 -3
  354. package/dist-esm/lib/ui/kbd-utils.mjs.map +2 -2
  355. package/dist-esm/lib/ui/version.mjs +3 -3
  356. package/dist-esm/lib/ui/version.mjs.map +1 -1
  357. package/dist-esm/lib/utils/export/copyAs.mjs +1 -2
  358. package/dist-esm/lib/utils/export/copyAs.mjs.map +2 -2
  359. package/dist-esm/lib/utils/export/export.mjs +0 -20
  360. package/dist-esm/lib/utils/export/export.mjs.map +2 -2
  361. package/dist-esm/lib/utils/export/exportAs.mjs +1 -2
  362. package/dist-esm/lib/utils/export/exportAs.mjs.map +2 -2
  363. package/package.json +11 -34
  364. package/src/index.ts +69 -22
  365. package/src/lib/Tldraw.tsx +15 -2
  366. package/src/lib/canvas/TldrawScribble.tsx +1 -1
  367. package/src/lib/defaultExternalContentHandlers.ts +26 -4
  368. package/src/lib/shapes/arrow/ArrowShapeOptions.test.ts +85 -14
  369. package/src/lib/shapes/arrow/ArrowShapeTool.test.ts +103 -8
  370. package/src/lib/shapes/arrow/ArrowShapeUtil.test.ts +48 -6
  371. package/src/lib/shapes/arrow/ArrowShapeUtil.tsx +4 -3
  372. package/src/lib/shapes/arrow/arrow-types.ts +3 -5
  373. package/src/lib/shapes/arrow/arrowLabel.ts +8 -0
  374. package/src/lib/shapes/arrow/arrowTargetState.ts +34 -3
  375. package/src/lib/shapes/arrow/elbow/ElbowArrowDebug.tsx +3 -3
  376. package/src/lib/shapes/arrow/toolStates/Pointing.tsx +1 -1
  377. package/src/lib/shapes/bookmark/BookmarkShapeUtil.tsx +4 -5
  378. package/src/lib/shapes/draw/DrawShapeTool.test.ts +0 -5
  379. package/src/lib/shapes/draw/DrawShapeUtil.tsx +4 -3
  380. package/src/lib/shapes/embed/EmbedShapeUtil.tsx +1 -1
  381. package/src/lib/shapes/frame/FrameShapeUtil.tsx +30 -14
  382. package/src/lib/shapes/frame/components/FrameHeading.tsx +1 -1
  383. package/src/lib/shapes/frame/components/FrameLabelInput.tsx +10 -3
  384. package/src/lib/shapes/geo/GeoShapeUtil.tsx +4 -2
  385. package/src/lib/shapes/geo/components/GeoShapeBody.tsx +2 -2
  386. package/src/lib/shapes/highlight/HighlightShapeUtil.tsx +7 -1
  387. package/src/lib/shapes/image/ImageShapeUtil.tsx +6 -3
  388. package/src/lib/shapes/line/LineShapeUtil.test.tsx +4 -3
  389. package/src/lib/shapes/line/LineShapeUtil.tsx +6 -1
  390. package/src/lib/shapes/line/__snapshots__/LineShapeUtil.test.tsx.snap +2 -2
  391. package/src/lib/shapes/note/NoteShapeUtil.tsx +10 -4
  392. package/src/lib/shapes/shared/HyperlinkButton.tsx +5 -5
  393. package/src/lib/shapes/shared/PlainTextLabel.tsx +0 -6
  394. package/src/lib/shapes/shared/ShapeFill.tsx +5 -4
  395. package/src/lib/shapes/shared/freehand/svg.ts +2 -0
  396. package/src/lib/shapes/shared/useEditablePlainText.ts +3 -10
  397. package/src/lib/shapes/shared/useImageOrVideoAsset.ts +0 -7
  398. package/src/lib/shapes/shared/usePrefersReducedMotion.tsx +11 -1
  399. package/src/lib/shapes/text/PlainTextArea.tsx +4 -3
  400. package/src/lib/shapes/text/RichTextArea.tsx +3 -4
  401. package/src/lib/shapes/text/TextShapeTool.test.ts +6 -5
  402. package/src/lib/shapes/text/TextShapeUtil.tsx +3 -2
  403. package/src/lib/shapes/video/VideoShapeUtil.tsx +3 -3
  404. package/src/lib/tools/EraserTool/childStates/Erasing.ts +34 -1
  405. package/src/lib/tools/EraserTool/childStates/Pointing.ts +20 -0
  406. package/src/lib/tools/SelectTool/childStates/DraggingHandle.tsx +6 -2
  407. package/src/lib/ui/TldrawUi.tsx +33 -12
  408. package/src/lib/ui/assetUrls.ts +13 -10
  409. package/src/lib/ui/components/A11y.tsx +1 -2
  410. package/src/lib/ui/components/AccessibilityMenu.tsx +20 -0
  411. package/src/lib/ui/components/ActionsMenu/DefaultActionsMenu.tsx +15 -3
  412. package/src/lib/ui/components/{FollowingIndicator.tsx → DefaultFollowingIndicator.tsx} +2 -1
  413. package/src/lib/ui/components/DefaultMenuPanel.tsx +4 -3
  414. package/src/lib/ui/components/KeyboardShortcutsDialog/DefaultKeyboardShortcutsDialogContent.tsx +6 -6
  415. package/src/lib/ui/components/LanguageMenu.tsx +1 -0
  416. package/src/lib/ui/components/MainMenu/DefaultMainMenuContent.tsx +4 -4
  417. package/src/lib/ui/components/Minimap/DefaultMinimap.tsx +2 -1
  418. package/src/lib/ui/components/Minimap/MinimapManager.ts +4 -4
  419. package/src/lib/ui/components/MobileStylePanel.tsx +9 -6
  420. package/src/lib/ui/components/NavigationPanel/DefaultNavigationPanel.tsx +1 -1
  421. package/src/lib/ui/components/PageMenu/DefaultPageMenu.tsx +4 -4
  422. package/src/lib/ui/components/SharePanel/PeopleMenuItem.tsx +4 -3
  423. package/src/lib/ui/components/SharePanel/UserPresenceColorPicker.tsx +3 -3
  424. package/src/lib/ui/components/StylePanel/DefaultStylePanel.tsx +28 -12
  425. package/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx +261 -343
  426. package/src/lib/ui/components/{primitives/TldrawUiButtonPicker.tsx → StylePanel/StylePanelButtonPicker.tsx} +73 -50
  427. package/src/lib/ui/components/StylePanel/StylePanelContext.tsx +63 -0
  428. package/src/lib/ui/components/StylePanel/{DoubleDropdownPicker.tsx → StylePanelDoubleDropdownPicker.tsx} +31 -22
  429. package/src/lib/ui/components/StylePanel/StylePanelDropdownPicker.tsx +119 -0
  430. package/src/lib/ui/components/StylePanel/StylePanelSubheading.tsx +9 -0
  431. package/src/lib/ui/components/Toolbar/AltTextEditor.tsx +2 -0
  432. package/src/lib/ui/components/Toolbar/DefaultImageToolbarContent.tsx +33 -16
  433. package/src/lib/ui/components/Toolbar/DefaultToolbar.tsx +55 -23
  434. package/src/lib/ui/components/Toolbar/DefaultVideoToolbarContent.tsx +12 -4
  435. package/src/lib/ui/components/Toolbar/LinkEditor.tsx +1 -0
  436. package/src/lib/ui/components/Toolbar/OverflowingToolbar.tsx +212 -61
  437. package/src/lib/ui/components/Toolbar/ToggleToolLockedButton.tsx +21 -11
  438. package/src/lib/ui/components/menu-items.tsx +8 -0
  439. package/src/lib/ui/components/primitives/TldrawUiContextualToolbar.tsx +7 -3
  440. package/src/lib/ui/components/primitives/TldrawUiInput.tsx +6 -3
  441. package/src/lib/ui/components/primitives/TldrawUiPopover.tsx +4 -2
  442. package/src/lib/ui/components/primitives/TldrawUiSlider.tsx +52 -32
  443. package/src/lib/ui/components/primitives/TldrawUiToolbar.tsx +55 -12
  444. package/src/lib/ui/components/primitives/TldrawUiTooltip.tsx +379 -0
  445. package/src/lib/ui/components/primitives/layout.tsx +107 -0
  446. package/src/lib/ui/components/primitives/menus/TldrawUiMenuCheckboxItem.tsx +4 -0
  447. package/src/lib/ui/components/primitives/menus/TldrawUiMenuContext.tsx +0 -1
  448. package/src/lib/ui/components/primitives/menus/TldrawUiMenuGroup.tsx +29 -16
  449. package/src/lib/ui/components/primitives/menus/TldrawUiMenuItem.tsx +27 -36
  450. package/src/lib/ui/context/TldrawUiContextProvider.tsx +23 -20
  451. package/src/lib/ui/context/actions.tsx +51 -10
  452. package/src/lib/ui/context/components.tsx +3 -0
  453. package/src/lib/ui/context/events.tsx +2 -1
  454. package/src/lib/ui/hooks/useClipboardEvents.ts +1 -2
  455. package/src/lib/ui/hooks/useExportAs.ts +3 -2
  456. package/src/lib/ui/hooks/useTools.tsx +26 -4
  457. package/src/lib/ui/hooks/useTranslation/TLUiTranslationKey.ts +7 -0
  458. package/src/lib/ui/hooks/useTranslation/defaultTranslation.ts +8 -1
  459. package/src/lib/ui/kbd-utils.ts +10 -3
  460. package/src/lib/ui/version.ts +3 -3
  461. package/src/lib/ui.css +448 -294
  462. package/src/lib/utils/excalidraw/__snapshots__/putExcalidrawContent.test.tsx.snap +5 -5
  463. package/src/lib/utils/export/copyAs.ts +1 -24
  464. package/src/lib/utils/export/export.ts +0 -36
  465. package/src/lib/utils/export/exportAs.ts +1 -32
  466. package/src/lib/utils/tldr/__snapshots__/buildFromV1Document.test.ts.snap +4 -4
  467. package/src/test/A11y.test.tsx +3 -2
  468. package/src/test/ClickManager.test.ts +7 -6
  469. package/src/test/Editor.test.tsx +20 -19
  470. package/src/test/EraserTool.test.ts +184 -13
  471. package/src/test/HandTool.test.ts +10 -9
  472. package/src/test/HighlightShape.test.ts +2 -1
  473. package/src/test/SelectTool.test.ts +3 -2
  474. package/src/test/TLUserPreferences.test.ts +4 -3
  475. package/src/test/TestEditor.ts +21 -17
  476. package/src/test/TldrawEditor.test.tsx +11 -10
  477. package/src/test/ZoomTool.test.ts +7 -6
  478. package/src/test/__snapshots__/drawing.test.ts.snap +2 -2
  479. package/src/test/__snapshots__/groups.test.tsx.snap +6 -6
  480. package/src/test/__snapshots__/resizing.test.ts.snap +2 -2
  481. package/src/test/arrows-megabus.test.tsx +5 -4
  482. package/src/test/bindings.test.tsx +24 -37
  483. package/src/test/bookmark-shapes.test.ts +1 -8
  484. package/src/test/commands/__snapshots__/getSvgString.test.ts.snap +23 -7
  485. package/src/test/commands/__snapshots__/packShapes.test.ts.snap +8 -8
  486. package/src/test/commands/__snapshots__/zoomToFit.test.ts.snap +2 -2
  487. package/src/test/commands/alignShapes.test.tsx +25 -24
  488. package/src/test/commands/animationSpeed.test.ts +2 -1
  489. package/src/test/commands/centerOnPoint.test.ts +3 -2
  490. package/src/test/commands/clipboard.test.ts +3 -2
  491. package/src/test/commands/createShapes.test.ts +2 -1
  492. package/src/test/commands/deleteShapes.test.ts +2 -1
  493. package/src/test/commands/distributeShapes.test.tsx +11 -10
  494. package/src/test/commands/getSvgString.test.ts +2 -1
  495. package/src/test/commands/packShapes.test.ts +5 -4
  496. package/src/test/commands/resizeShape.test.ts +2 -1
  497. package/src/test/commands/rotateShapes.test.ts +7 -6
  498. package/src/test/commands/setCamera.test.ts +4 -3
  499. package/src/test/commands/setCurrentPage.test.ts +3 -2
  500. package/src/test/commands/stackShapes.test.ts +11 -10
  501. package/src/test/commands/stretch.test.tsx +13 -12
  502. package/src/test/createDeepLink.test.tsx +2 -1
  503. package/src/test/cropping.test.ts +3 -2
  504. package/src/test/custom-clipping.test.ts +436 -0
  505. package/src/test/drawing.test.ts +2 -1
  506. package/src/test/flipShapes.test.ts +4 -3
  507. package/src/test/frames.test.ts +40 -24
  508. package/src/test/getCulledShapes.test.tsx +74 -4
  509. package/src/test/groups.test.tsx +1 -1
  510. package/src/test/handleDeepLink.test.tsx +2 -1
  511. package/src/test/maxShapes.test.ts +3 -2
  512. package/src/test/modifiers.test.ts +5 -4
  513. package/src/test/navigation.test.ts +12 -11
  514. package/src/test/panning.test.ts +2 -1
  515. package/src/test/perf/perf.test.ts +2 -1
  516. package/src/test/registerDeepLinkListener.test.tsx +10 -9
  517. package/src/test/resizing.test.ts +39 -38
  518. package/src/test/select.test.tsx +4 -3
  519. package/src/test/selection-omnibus.test.ts +11 -10
  520. package/src/test/shapeutils.test.ts +4 -3
  521. package/src/test/translating.test.ts +9 -8
  522. package/tldraw.css +756 -584
  523. package/dist-cjs/lib/ui/components/FollowingIndicator.js.map +0 -7
  524. package/dist-cjs/lib/ui/components/StylePanel/DoubleDropdownPicker.js.map +0 -7
  525. package/dist-cjs/lib/ui/components/StylePanel/DropdownPicker.js.map +0 -7
  526. package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js +0 -142
  527. package/dist-cjs/lib/ui/components/primitives/TldrawUiButtonPicker.js.map +0 -7
  528. package/dist-esm/lib/ui/components/FollowingIndicator.mjs.map +0 -7
  529. package/dist-esm/lib/ui/components/StylePanel/DoubleDropdownPicker.mjs.map +0 -7
  530. package/dist-esm/lib/ui/components/StylePanel/DropdownPicker.mjs.map +0 -7
  531. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs +0 -115
  532. package/dist-esm/lib/ui/components/primitives/TldrawUiButtonPicker.mjs.map +0 -7
  533. package/src/lib/ui/components/StylePanel/DropdownPicker.tsx +0 -109
package/src/lib/ui.css CHANGED
@@ -1,15 +1,15 @@
1
1
  /* @tldraw/ui */
2
2
 
3
3
  .tl-container {
4
- --layer-above: 1;
5
- --layer-focused-input: 10;
6
- --layer-menu-click-capture: 250;
7
- --layer-panels: 300;
8
- --layer-menus: 400;
9
- --layer-toasts: 650;
10
- --layer-cursor: 700;
11
- --layer-header-footer: 999;
12
- --layer-following-indicator: 1000;
4
+ --tl-layer-above: 1;
5
+ --tl-layer-focused-input: 10;
6
+ --tl-layer-menu-click-capture: 250;
7
+ --tl-layer-panels: 300;
8
+ --tl-layer-menus: 400;
9
+ --tl-layer-toasts: 650;
10
+ --tl-layer-cursor: 700;
11
+ --tl-layer-header-footer: 999;
12
+ --tl-layer-following-indicator: 1000;
13
13
  }
14
14
 
15
15
  /* Button */
@@ -33,23 +33,23 @@
33
33
  text-rendering: optimizeLegibility;
34
34
  font-size: 12px;
35
35
  gap: 0px;
36
- color: var(--color-text-1);
36
+ color: var(--tl-color-text-1);
37
37
  z-index: 0;
38
38
  }
39
39
 
40
40
  .tlui-button:disabled {
41
- color: var(--color-text-3);
41
+ color: var(--tl-color-text-3);
42
42
  text-shadow: none;
43
43
  cursor: default;
44
44
  }
45
45
 
46
46
  .tlui-button:disabled .tlui-kbd {
47
- color: var(--color-text-3);
47
+ color: var(--tl-color-text-3);
48
48
  }
49
49
 
50
50
  .tlui-button > * {
51
51
  position: relative;
52
- z-index: var(--layer-above);
52
+ z-index: var(--tl-layer-above);
53
53
  }
54
54
 
55
55
  .tlui-button__label {
@@ -65,7 +65,7 @@
65
65
  */
66
66
  .tl-container__focused:not(.tl-container__no-focus-ring) .tlui-button:focus-visible {
67
67
  border-radius: 10px;
68
- outline: 2px solid var(--color-focus);
68
+ outline: 2px solid var(--tl-color-focus);
69
69
  outline-offset: -5px;
70
70
  }
71
71
  .tl-container__focused:not(.tl-container__no-focus-ring) .tlui-button__tool:focus-visible {
@@ -73,7 +73,7 @@
73
73
  }
74
74
  .tlui-slider__container:has(.tlui-slider__thumb:focus-visible) {
75
75
  border-radius: 10px;
76
- outline: 2px solid var(--color-focus);
76
+ outline: 2px solid var(--tl-color-focus);
77
77
  outline-offset: -5px;
78
78
  }
79
79
 
@@ -82,8 +82,8 @@
82
82
  content: '';
83
83
  position: absolute;
84
84
  inset: 4px;
85
- border-radius: var(--radius-2);
86
- background: var(--color-muted-2);
85
+ border-radius: var(--tl-radius-2);
86
+ background: var(--tl-color-muted-2);
87
87
  opacity: 0;
88
88
  }
89
89
 
@@ -93,18 +93,18 @@
93
93
 
94
94
  .tlui-button[data-isactive='true']::after,
95
95
  .tlui-button[data-isactive='true']:not(:disabled, :focus-visible):active:after {
96
- background: var(--color-hint);
96
+ background: var(--tl-color-hint);
97
97
  opacity: 1;
98
98
  }
99
99
 
100
- .tlui-button[aria-expanded='true'][data-direction='left']::after {
101
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
100
+ .tlui-button[aria-expanded='true'][data-direction='left'] {
101
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
102
102
  opacity: 1;
103
103
  }
104
104
 
105
105
  @media (hover: hover) {
106
106
  .tlui-button[aria-expanded='true'][data-direction='left']:not(:hover)::after {
107
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
107
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
108
108
  opacity: 1;
109
109
  }
110
110
 
@@ -118,18 +118,18 @@
118
118
  }
119
119
 
120
120
  .tlui-button__icon + .tlui-button__label {
121
- margin-left: var(--space-2);
121
+ margin-left: var(--tl-space-2);
122
122
  }
123
123
 
124
124
  /* Low button */
125
125
 
126
126
  .tlui-button__low {
127
- border-radius: var(--radius-3);
128
- background-color: var(--color-low);
127
+ border-radius: var(--tl-radius-3);
128
+ background-color: var(--tl-color-low);
129
129
  }
130
130
 
131
131
  .tlui-button__low::after {
132
- background-color: var(--color-muted-2);
132
+ background-color: var(--tl-color-muted-2);
133
133
  opacity: 0;
134
134
  }
135
135
 
@@ -142,31 +142,25 @@
142
142
  /* Primary / danger buttons */
143
143
 
144
144
  .tlui-button__primary {
145
- color: var(--color-primary);
145
+ color: var(--tl-color-primary);
146
146
  }
147
147
 
148
148
  .tlui-button__danger {
149
- color: var(--color-danger);
149
+ color: var(--tl-color-danger);
150
150
  text-shadow: none;
151
151
  }
152
152
 
153
153
  @media (hover: hover) {
154
154
  .tlui-button__primary:not(:disabled, :focus-visible):hover {
155
- color: var(--color-primary);
155
+ color: var(--tl-color-primary);
156
156
  }
157
157
 
158
158
  .tlui-button__danger:not(:disabled, :focus-visible):hover {
159
- color: var(--color-danger);
159
+ color: var(--tl-color-danger);
160
160
  text-shadow: none;
161
161
  }
162
162
  }
163
163
 
164
- /* Panel button */
165
-
166
- .tlui-button__panel {
167
- position: relative;
168
- }
169
-
170
164
  /* Menu button */
171
165
 
172
166
  .tlui-button__menu {
@@ -174,12 +168,12 @@
174
168
  min-height: 40px;
175
169
  width: 100%;
176
170
  gap: 8px;
177
- margin: -4px 0px;
171
+ margin-top: -4px;
178
172
  }
179
173
 
180
174
  .tlui-button__menu::after {
181
175
  inset: 4px;
182
- border-radius: var(--radius-2);
176
+ border-radius: var(--tl-radius-2);
183
177
  }
184
178
 
185
179
  .tlui-button__menu > .tlui-icon + .tlui-button__label {
@@ -207,18 +201,26 @@
207
201
 
208
202
  /* Tool lock button */
209
203
 
210
- .tlui-toolbar__lock-button {
204
+ .tlui-main-toolbar__lock-button {
211
205
  position: absolute;
212
- top: 4px;
213
- right: 0px;
214
206
  pointer-events: all;
215
207
  height: 40px;
216
208
  width: 40px;
209
+ border-radius: var(--tl-radius-2);
210
+ }
211
+
212
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__lock-button {
213
+ top: 4px;
214
+ right: 0px;
217
215
  min-width: 0px;
218
- border-radius: var(--radius-2);
219
216
  }
220
217
 
221
- .tlui-toolbar__lock-button::after {
218
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__lock-button {
219
+ bottom: 0px;
220
+ min-height: 0px;
221
+ }
222
+
223
+ .tlui-main-toolbar__lock-button::after {
222
224
  top: 4px;
223
225
  left: 8px;
224
226
  inset: 4px;
@@ -230,16 +232,6 @@
230
232
  position: relative;
231
233
  height: 48px;
232
234
  width: 48px;
233
- margin-left: -2px;
234
- margin-right: -2px;
235
- }
236
-
237
- .tlui-button__tool:nth-of-type(1) {
238
- margin-left: 0px;
239
- }
240
-
241
- .tlui-button__tool:nth-last-of-type(1) {
242
- margin-right: 0px;
243
235
  }
244
236
 
245
237
  .tlui-button__tool::after {
@@ -248,69 +240,64 @@
248
240
  }
249
241
 
250
242
  .tlui-button__tool[aria-pressed='true'] {
251
- color: var(--color-selected-contrast);
243
+ color: var(--tl-color-selected-contrast);
252
244
  }
253
245
 
254
246
  .tlui-button__tool[aria-pressed='true']:not(:disabled, :focus-visible):active {
255
- color: var(--color-selected-contrast);
247
+ color: var(--tl-color-selected-contrast);
256
248
  }
257
249
 
258
250
  .tlui-button__tool[aria-pressed='true']:not(:disabled)::after {
259
- background: var(--color-selected);
251
+ background: var(--tl-color-selected);
260
252
  opacity: 1;
261
253
  }
262
254
 
263
- .tlui-layout__mobile .tlui-button__tool {
255
+ .tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-button__tool {
264
256
  height: 48px;
265
257
  width: 43px;
266
258
  }
267
259
 
268
- .tlui-layout__mobile .tlui-button__tool > .tlui-icon {
260
+ .tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-button__tool > .tlui-icon {
269
261
  height: 16px;
270
262
  width: 16px;
271
263
  }
272
264
 
273
- /* Button Row */
265
+ /* Row layout */
274
266
 
275
- .tlui-buttons__horizontal {
267
+ .tlui-row {
276
268
  display: flex;
277
269
  flex-direction: row;
270
+ padding: 0 2px;
278
271
  }
279
- .tlui-buttons__horizontal > * {
272
+ .tlui-row > * {
280
273
  margin-left: -2px;
281
274
  margin-right: -2px;
282
275
  }
283
- .tlui-buttons__horizontal > *:nth-child(1) {
284
- margin-left: 0px;
276
+
277
+ /* Column layout */
278
+
279
+ .tlui-column {
280
+ display: flex;
281
+ flex-direction: column;
282
+ padding: 2px 0;
285
283
  }
286
- .tlui-buttons__horizontal > *:nth-last-child(1) {
287
- margin-right: 0px;
284
+ .tlui-column > * {
285
+ margin-top: -2px;
286
+ margin-bottom: -2px;
288
287
  }
289
288
 
290
- /* Button Grid */
289
+ /* Grid layout */
291
290
 
292
- .tlui-buttons__grid {
291
+ .tlui-grid {
293
292
  display: grid;
294
- grid-template-columns: repeat(4, auto);
293
+ grid-template-columns: repeat(4, 1fr);
295
294
  grid-auto-flow: row;
296
295
  overflow: hidden;
296
+ padding: 2px;
297
297
  }
298
- .tlui-buttons__grid > .tlui-button {
298
+ .tlui-grid > * {
299
299
  margin: -2px;
300
300
  }
301
- .tlui-buttons__grid > .tlui-button:nth-of-type(4n),
302
- .tlui-buttons__vertical-align > .tlui-button:nth-of-type(3n) {
303
- margin-right: 0px;
304
- }
305
- .tlui-buttons__grid > .tlui-button:nth-of-type(4n - 3) {
306
- margin-left: 0px;
307
- }
308
- .tlui-buttons__grid > .tlui-button:nth-of-type(-n + 4) {
309
- margin-top: 0px;
310
- }
311
- .tlui-buttons__grid > .tlui-button:nth-last-of-type(-n + 4) {
312
- margin-bottom: 0px;
313
- }
314
301
 
315
302
  /* Zoom button */
316
303
 
@@ -334,9 +321,9 @@
334
321
  pointer-events: none;
335
322
  user-select: none;
336
323
  contain: strict;
337
- z-index: var(--layer-panels);
324
+ z-index: var(--tl-layer-panels);
338
325
  transform: translate3d(0, 0, 0);
339
- --sab: env(safe-area-inset-bottom);
326
+ --tl-sab: env(safe-area-inset-bottom);
340
327
  font-weight: 500;
341
328
  line-height: 1.6;
342
329
  -webkit-font-smoothing: antialiased;
@@ -389,11 +376,11 @@
389
376
  justify-content: flex-start;
390
377
  align-items: flex-start;
391
378
  width: min-content;
392
- gap: var(--space-3);
393
- margin: var(--space-2) var(--space-3);
379
+ gap: var(--tl-space-3);
380
+ margin: var(--tl-space-2) var(--tl-space-3);
394
381
  white-space: nowrap;
395
382
  pointer-events: none;
396
- z-index: var(--layer-panels);
383
+ z-index: var(--tl-layer-panels);
397
384
  }
398
385
 
399
386
  /* ---------------------- Icon ---------------------- */
@@ -421,7 +408,7 @@
421
408
 
422
409
  .tlui-slider__container {
423
410
  width: 100%;
424
- padding: 0px var(--space-4);
411
+ padding: 0px var(--tl-space-4);
425
412
  }
426
413
 
427
414
  .tlui-slider {
@@ -447,7 +434,7 @@
447
434
  content: '';
448
435
  height: 3px;
449
436
  width: 100%;
450
- background-color: var(--color-muted-1);
437
+ background-color: var(--tl-color-muted-1);
451
438
  border-radius: 14px;
452
439
  }
453
440
 
@@ -456,7 +443,7 @@
456
443
  top: calc(50% - 2px);
457
444
  left: 0px;
458
445
  height: 3px;
459
- background-color: var(--color-selected);
446
+ background-color: var(--tl-color-selected);
460
447
  border-radius: 14px;
461
448
  }
462
449
 
@@ -468,16 +455,16 @@
468
455
  height: 18px;
469
456
  position: relative;
470
457
  top: -1px;
471
- background-color: var(--color-panel);
458
+ background-color: var(--tl-color-panel);
472
459
  border-radius: 999px;
473
- box-shadow: inset 0px 0px 0px 2px var(--color-text-1);
460
+ box-shadow: inset 0px 0px 0px 2px var(--tl-color-text-1);
474
461
  }
475
462
 
476
463
  .tlui-slider__thumb:active {
477
464
  cursor: grabbing;
478
465
  box-shadow:
479
- inset 0px 0px 0px 2px var(--color-text-1),
480
- var(--shadow-1);
466
+ inset 0px 0px 0px 2px var(--tl-color-text-1),
467
+ var(--tl-shadow-1);
481
468
  }
482
469
 
483
470
  /* ---------------------- Input --------------------- */
@@ -486,7 +473,7 @@
486
473
  background: none;
487
474
  margin: 0px;
488
475
  position: relative;
489
- z-index: var(--layer-above);
476
+ z-index: var(--tl-layer-above);
490
477
  height: 40px;
491
478
  max-height: 40px;
492
479
  display: flex;
@@ -495,8 +482,8 @@
495
482
  font-family: inherit;
496
483
  font-size: 12px;
497
484
  font-weight: inherit;
498
- color: var(--color-text-1);
499
- padding: var(--space-4);
485
+ color: var(--tl-color-text-1);
486
+ padding: var(--tl-space-4);
500
487
  padding-left: 0px;
501
488
  border: none;
502
489
  outline: none;
@@ -507,13 +494,17 @@
507
494
  -webkit-user-select: auto !important;
508
495
  }
509
496
 
497
+ .tlui-input::placeholder {
498
+ color: var(--tl-color-text-3);
499
+ }
500
+
510
501
  .tlui-input__wrapper {
511
502
  width: 100%;
512
503
  height: 44px;
513
504
  display: flex;
514
505
  align-items: center;
515
- gap: var(--space-4);
516
- color: var(--color-text);
506
+ gap: var(--tl-space-4);
507
+ color: var(--tl-color-text);
517
508
  }
518
509
 
519
510
  .tlui-input__wrapper > .tlui-icon {
@@ -545,7 +536,7 @@
545
536
  grid-auto-columns: minmax(1em, auto);
546
537
  align-self: bottom;
547
538
  color: currentColor;
548
- margin-left: var(--space-4);
539
+ margin-left: var(--tl-space-4);
549
540
  }
550
541
 
551
542
  .tlui-kbd > span {
@@ -562,13 +553,13 @@
562
553
  }
563
554
 
564
555
  .tlui-kbd:not(:last-child) {
565
- margin-right: var(--space-2);
556
+ margin-right: var(--tl-space-2);
566
557
  }
567
558
 
568
559
  /* Focus Mode Button */
569
560
 
570
561
  .tlui-focus-button {
571
- z-index: var(--layer-panels);
562
+ z-index: var(--tl-layer-panels);
572
563
  pointer-events: all;
573
564
  }
574
565
 
@@ -579,16 +570,22 @@
579
570
  }
580
571
 
581
572
  .tlui-menu {
582
- z-index: var(--layer-menus);
573
+ z-index: var(--tl-layer-menus);
583
574
  height: fit-content;
584
575
  width: fit-content;
585
- border-radius: var(--radius-3);
576
+ border-radius: var(--tl-radius-3);
586
577
  pointer-events: all;
587
578
  touch-action: auto;
588
579
  overflow-y: auto;
589
580
  overscroll-behavior: none;
590
- background-color: var(--color-panel);
591
- box-shadow: var(--shadow-3);
581
+ background-color: var(--tl-color-panel);
582
+ box-shadow: var(--tl-shadow-3);
583
+ }
584
+
585
+ @media (max-height: 600px) {
586
+ .tlui-menu {
587
+ max-height: 70vh;
588
+ }
592
589
  }
593
590
 
594
591
  .tlui-menu::-webkit-scrollbar {
@@ -606,7 +603,7 @@
606
603
  }
607
604
 
608
605
  .tlui-menu__group {
609
- border-bottom: 1px solid var(--color-divider);
606
+ border-bottom: 1px solid var(--tl-color-divider);
610
607
  }
611
608
  .tlui-menu__group:nth-last-of-type(1) {
612
609
  border-bottom: none;
@@ -616,23 +613,23 @@
616
613
 
617
614
  .tlui-menu__submenu__trigger[data-state='open']::after {
618
615
  opacity: 1;
619
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
616
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
620
617
  }
621
618
 
622
619
  .tlui-menu__submenu__trigger[data-direction='left'][data-state='open']::after {
623
620
  opacity: 1;
624
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
621
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
625
622
  }
626
623
 
627
624
  @media (hover: hover) {
628
625
  .tlui-menu__submenu__trigger[data-state='open']:not(:hover)::after {
629
626
  opacity: 1;
630
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
627
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
631
628
  }
632
629
 
633
630
  .tlui-menu__submenu__trigger[data-direction='left'][data-state='open']:not(:hover)::after {
634
631
  opacity: 1;
635
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
632
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
636
633
  }
637
634
  }
638
635
 
@@ -657,7 +654,7 @@
657
654
  .tlui-menu-click-capture {
658
655
  position: fixed;
659
656
  inset: 0;
660
- z-index: var(--layer-menu-click-capture);
657
+ z-index: var(--tl-layer-menu-click-capture);
661
658
  }
662
659
 
663
660
  /* --------------------- Popover -------------------- */
@@ -673,10 +670,10 @@
673
670
  max-height: calc(var(--radix-popover-content-available-height) - 8px);
674
671
  margin: 0px;
675
672
  border: none;
676
- border-radius: var(--radius-3);
677
- background-color: var(--color-panel);
678
- box-shadow: var(--shadow-3);
679
- z-index: var(--layer-menus);
673
+ border-radius: var(--tl-radius-3);
674
+ background-color: var(--tl-color-panel);
675
+ box-shadow: var(--tl-shadow-3);
676
+ z-index: var(--tl-layer-menus);
680
677
  overflow: hidden;
681
678
  overflow-y: auto;
682
679
  touch-action: auto;
@@ -689,22 +686,22 @@
689
686
 
690
687
  .tlui-menu-zone {
691
688
  position: relative;
692
- z-index: var(--layer-panels);
689
+ z-index: var(--tl-layer-panels);
693
690
  width: fit-content;
694
- border-right: 2px solid var(--color-background);
695
- border-bottom: 2px solid var(--color-background);
696
- border-bottom-right-radius: var(--radius-4);
697
- background-color: var(--color-low);
691
+ border-right: 2px solid var(--tl-color-background);
692
+ border-bottom: 2px solid var(--tl-color-background);
693
+ border-bottom-right-radius: var(--tl-radius-4);
694
+ background-color: var(--tl-color-low);
698
695
  }
699
696
 
700
697
  .tlui-menu-zone *[data-state='open']::after {
701
- background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
698
+ background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
702
699
  opacity: 1;
703
700
  }
704
701
 
705
702
  @media (hover: hover) {
706
703
  .tlui-menu-zone *[data-state='open']:not(:hover)::after {
707
- background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
704
+ background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
708
705
  opacity: 1;
709
706
  }
710
707
  }
@@ -730,8 +727,8 @@
730
727
  align-items: center;
731
728
  width: 100%;
732
729
  height: 40px;
733
- padding-left: var(--space-4);
734
- border-bottom: 1px solid var(--color-divider);
730
+ padding-left: var(--tl-space-4);
731
+ border-bottom: 1px solid var(--tl-color-divider);
735
732
  }
736
733
 
737
734
  .tlui-page-menu__header > .tlui-button:nth-of-type(1) {
@@ -739,7 +736,7 @@
739
736
  }
740
737
 
741
738
  .tlui-page-menu__header__title {
742
- color: var(--color-text);
739
+ color: var(--tl-color-text);
743
740
  font-size: 12px;
744
741
  flex-grow: 2;
745
742
  }
@@ -824,7 +821,7 @@
824
821
  display: inline-flex;
825
822
  align-items: center;
826
823
  justify-content: center;
827
- color: var(--color-text);
824
+ color: var(--tl-color-text);
828
825
  }
829
826
 
830
827
  .tlui-page_menu__item__sortable {
@@ -837,7 +834,7 @@
837
834
  flex-direction: row;
838
835
  align-items: center;
839
836
  overflow: hidden;
840
- z-index: var(--layer-above);
837
+ z-index: var(--tl-layer-above);
841
838
  }
842
839
 
843
840
  .tlui-page_menu__item__sortable__title {
@@ -849,7 +846,7 @@
849
846
  }
850
847
 
851
848
  .tlui-page_menu__item__sortable:focus-visible {
852
- z-index: var(--layer-focused-input);
849
+ z-index: var(--tl-layer-focused-input);
853
850
  }
854
851
 
855
852
  .tlui-page_menu__item__sortable__handle {
@@ -858,7 +855,7 @@
858
855
  min-width: 0px;
859
856
  height: 40px;
860
857
  cursor: grab;
861
- color: var(--color-text-3);
858
+ color: var(--tl-color-text-3);
862
859
  flex-shrink: 0;
863
860
  margin-right: -9px;
864
861
  }
@@ -900,13 +897,13 @@
900
897
  }
901
898
 
902
899
  .tlui-page_menu__item__submenu > .tlui-button[data-state='open']::after {
903
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
900
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
904
901
  opacity: 1;
905
902
  }
906
903
 
907
904
  @media (hover: hover) {
908
905
  .tlui-page_menu__item__submenu > .tlui-button[data-state='open']:not(:hover)::after {
909
- background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
906
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
910
907
  opacity: 1;
911
908
  }
912
909
  }
@@ -942,7 +939,7 @@
942
939
  top: 48px;
943
940
  left: -9999px;
944
941
  padding: 8px 16px;
945
- z-index: var(--layer-toasts);
942
+ z-index: var(--tl-layer-toasts);
946
943
  }
947
944
 
948
945
  .tl-skip-to-main-content:focus {
@@ -954,11 +951,11 @@
954
951
  .tlui-offline-indicator {
955
952
  display: flex;
956
953
  flex-direction: row;
957
- gap: var(--space-3);
958
- color: var(--color-text);
959
- background-color: var(--color-low);
960
- border: 3px solid var(--color-background);
961
- padding: 0px var(--space-5);
954
+ gap: var(--tl-space-3);
955
+ color: var(--tl-color-text);
956
+ background-color: var(--tl-color-low);
957
+ border: 3px solid var(--tl-color-background);
958
+ padding: 0px var(--tl-space-5);
962
959
  height: 42px;
963
960
  align-items: center;
964
961
  justify-content: center;
@@ -973,10 +970,10 @@
973
970
  /* ------------------- Style panel ------------------ */
974
971
 
975
972
  .tlui-style-panel__wrapper {
976
- box-shadow: var(--shadow-2);
977
- border-radius: var(--radius-3);
973
+ box-shadow: var(--tl-shadow-2);
974
+ border-radius: var(--tl-radius-3);
978
975
  pointer-events: all;
979
- background-color: var(--color-panel);
976
+ background-color: var(--tl-color-panel);
980
977
  height: fit-content;
981
978
  max-height: 100%;
982
979
  margin: 8px;
@@ -985,7 +982,7 @@
985
982
  overscroll-behavior: none;
986
983
  overflow-y: auto;
987
984
  overflow-x: hidden;
988
- color: var(--color-text);
985
+ color: var(--tl-color-text);
989
986
  }
990
987
  /* if the style panel is the only child (ie no share menu), increase the margin */
991
988
  .tlui-style-panel__wrapper:only-child {
@@ -994,12 +991,18 @@
994
991
 
995
992
  .tlui-style-panel {
996
993
  position: relative;
997
- z-index: var(--layer-panels);
994
+ z-index: var(--tl-layer-panels);
998
995
  pointer-events: all;
999
996
  width: 148px;
1000
997
  max-width: 148px;
1001
998
  }
1002
999
 
1000
+ .tlui-style-panel[data-show-ui-labels='true'] .tlui-button[data-isactive='true'] {
1001
+ border-radius: 10px;
1002
+ outline: 2px solid var(--tl-color-text);
1003
+ outline-offset: -5px;
1004
+ }
1005
+
1003
1006
  .tlui-style-panel::-webkit-scrollbar {
1004
1007
  display: none;
1005
1008
  }
@@ -1014,33 +1017,56 @@
1014
1017
  flex-direction: column;
1015
1018
  }
1016
1019
 
1017
- .tlui-style-panel__section:nth-of-type(n + 2):not(:last-child) {
1018
- border-bottom: 1px solid var(--color-divider);
1020
+ /*
1021
+ add a border to the bottom of all but the last section. we have to handle empty sections too, which
1022
+ are hidden and shouldn't be counted
1023
+ */
1024
+ .tlui-style-panel__section:not(:nth-last-child(-n + 1 of .tlui-style-panel__section:not(:empty))) {
1025
+ border-bottom: 1px solid var(--tl-color-divider);
1026
+ }
1027
+ /*
1028
+ if a section ends with a slider and we're adding a border, we need some extra space for visual
1029
+ balance. we need to handle empty sections as above. is this the most complex css selector in all of
1030
+ tldraw? probably.
1031
+ */
1032
+ .tlui-style-panel__section:has(.tlui-slider__container:last-child):not(
1033
+ :nth-last-child(-n + 1 of .tlui-style-panel__section:not(:empty))
1034
+ ) {
1035
+ margin-bottom: 7px;
1019
1036
  }
1020
1037
 
1021
1038
  .tlui-style-panel__section:empty {
1022
1039
  display: none;
1023
1040
  }
1024
1041
 
1042
+ /*
1043
+ * This is used in a couple places, like Align and Vertical Align.
1044
+ * It's because we have a toolbar with a Toggle Group but then an adjacent button
1045
+ * next to it that opens a popup.
1046
+ */
1047
+ .tlui-style-panel__section .tlui-toolbar:has(.tlui-toolbar) {
1048
+ flex-wrap: wrap;
1049
+ }
1050
+
1051
+ .tlui-style-panel__section .tlui-toolbar:has(.tlui-toolbar) .tlui-style-panel__subheading {
1052
+ margin-left: -2px;
1053
+ }
1054
+
1025
1055
  .tlui-style-panel__section__common:not(:only-child) {
1026
1056
  margin-bottom: 7px;
1027
- border-bottom: 1px solid var(--color-divider);
1057
+ border-bottom: 1px solid var(--tl-color-divider);
1028
1058
  }
1029
1059
 
1030
- .tlui-style-panel__row {
1031
- display: flex;
1032
- }
1033
- /* Only really used for the alignment picker */
1034
- .tlui-style-panel__row__extra-button {
1035
- margin-left: -2px;
1060
+ .tlui-style-panel__dropdown-picker:only-child {
1061
+ flex: 1;
1036
1062
  }
1037
1063
 
1038
1064
  .tlui-style-panel__double-select-picker {
1039
1065
  display: flex;
1040
1066
  grid-template-columns: 1fr auto;
1041
1067
  align-items: center;
1042
- padding-left: var(--space-4);
1043
- color: var(--color-text-1);
1068
+ padding-left: var(--tl-space-4);
1069
+ color: var(--tl-color-text-1);
1044
1070
  font-size: 12px;
1045
1071
  }
1046
1072
 
@@ -1054,25 +1080,48 @@
1054
1080
 
1055
1081
  .tlui-style-panel .tlui-button[data-state='open']::after {
1056
1082
  opacity: 1;
1057
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
1083
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
1058
1084
  }
1059
1085
 
1060
1086
  @media (hover: hover) {
1087
+ .tlui-style-panel .tlui-button[aria-expanded='true'] {
1088
+ background: none;
1089
+ }
1061
1090
  .tlui-style-panel .tlui-button[data-state='open']:not(:hover)::after {
1062
1091
  opacity: 1;
1063
- background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
1092
+ background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
1064
1093
  }
1065
1094
  }
1066
1095
 
1096
+ /* Accessibility subheadings */
1097
+
1098
+ .tlui-style-panel__section .tlui-style-panel__subheading,
1099
+ .tlui-style-panel__section__common .tlui-style-panel__subheading,
1100
+ .tlui-style-panel__subheading + .tlui-slider__container {
1101
+ margin: 0;
1102
+ padding: var(--tl-space-2) var(--tl-space-3) 0px var(--tl-space-4);
1103
+ font-size: 12px;
1104
+ font-weight: inherit;
1105
+ line-height: inherit;
1106
+ }
1107
+
1108
+ .tlui-style-panel .tlui-style-panel__subheading:nth-of-type(1) {
1109
+ padding-top: var(--tl-space-3);
1110
+ }
1111
+
1112
+ .tlui-style-panel__subheading + .tlui-slider__container {
1113
+ padding-top: 0px;
1114
+ }
1115
+
1067
1116
  /* --------------------- Bottom --------------------- */
1068
1117
 
1069
1118
  .tlui-layout__bottom {
1070
1119
  grid-row: 2;
1120
+ width: 100%;
1071
1121
  }
1072
1122
 
1073
1123
  .tlui-layout__bottom__main {
1074
1124
  width: 100%;
1075
- position: relative;
1076
1125
  display: flex;
1077
1126
  align-items: flex-end;
1078
1127
  justify-content: center;
@@ -1084,11 +1133,10 @@
1084
1133
  display: flex;
1085
1134
  width: min-content;
1086
1135
  flex-direction: column;
1087
- z-index: var(--layer-panels);
1136
+ z-index: var(--tl-layer-panels);
1088
1137
  pointer-events: all;
1089
1138
  position: absolute;
1090
1139
  left: 0px;
1091
- bottom: 0px;
1092
1140
  }
1093
1141
 
1094
1142
  .tlui-navigation-panel::before {
@@ -1098,10 +1146,10 @@
1098
1146
  z-index: -1;
1099
1147
  inset: -2px -2px 0px 0px;
1100
1148
  border-radius: 0;
1101
- border-top: 2px solid var(--color-background);
1102
- border-right: 2px solid var(--color-background);
1103
- border-top-right-radius: var(--radius-4);
1104
- background-color: var(--color-low);
1149
+ border-top: 2px solid var(--tl-color-background);
1150
+ border-right: 2px solid var(--tl-color-background);
1151
+ border-top-right-radius: var(--tl-radius-4);
1152
+ background-color: var(--tl-color-low);
1105
1153
  }
1106
1154
 
1107
1155
  .tlui-navigation-panel[data-a11y='true']::before {
@@ -1115,7 +1163,7 @@
1115
1163
  height: 96px;
1116
1164
  min-height: 96px;
1117
1165
  overflow: hidden;
1118
- padding: var(--space-3);
1166
+ padding: var(--tl-space-3);
1119
1167
  padding-top: 0px;
1120
1168
  }
1121
1169
 
@@ -1128,114 +1176,220 @@
1128
1176
  /* --------------------- Toolbar -------------------- */
1129
1177
 
1130
1178
  /* Wide container */
1131
- .tlui-toolbar {
1179
+ .tlui-main-toolbar {
1132
1180
  grid-column: 1 / span 3;
1133
1181
  grid-row: 1;
1134
1182
  display: flex;
1135
1183
  align-items: center;
1136
1184
  justify-content: center;
1137
1185
  flex-grow: 2;
1138
- padding-bottom: calc(var(--space-3) + var(--sab));
1186
+ }
1187
+
1188
+ .tlui-main-toolbar--horizontal {
1189
+ padding-bottom: calc(var(--tl-space-3) + var(--tl-sab));
1190
+ max-width: 100%;
1191
+ }
1192
+
1193
+ .tlui-main-toolbar--vertical {
1194
+ position: absolute;
1195
+ left: 0;
1196
+ top: 90px; /* height of page menu + 'back to content' button */
1197
+ bottom: 140px; /* height of expanded mini-map */
1198
+ padding-left: calc(var(--tl-space-3) + var(--tl-sab));
1199
+ }
1200
+
1201
+ [data-breakpoints-below*='6'] .tlui-main-toolbar--vertical {
1202
+ bottom: 90px; /* collapsed mini-map, but same as top to keep things looking even */
1139
1203
  }
1140
1204
 
1141
1205
  /* Centered Content */
1142
- .tlui-toolbar__inner {
1206
+ .tlui-main-toolbar__inner {
1143
1207
  position: relative;
1144
1208
  width: fit-content;
1145
1209
  display: flex;
1146
- gap: var(--space-3);
1147
- align-items: flex-end;
1210
+ gap: var(--tl-space-3);
1211
+ align-items: flex-start;
1148
1212
  }
1149
1213
 
1150
- .tlui-toolbar__left {
1214
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__inner {
1215
+ flex-direction: column;
1216
+ }
1217
+
1218
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__left {
1151
1219
  width: fit-content;
1152
1220
  }
1221
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__left {
1222
+ display: flex;
1223
+ height: fit-content;
1224
+ }
1153
1225
 
1154
1226
  /* Row of controls + lock button */
1155
- .tlui-toolbar__extras {
1227
+ .tlui-main-toolbar__extras {
1156
1228
  position: relative;
1157
- z-index: var(--layer-above);
1158
- width: 100%;
1229
+ z-index: var(--tl-layer-above);
1159
1230
  pointer-events: none;
1160
- top: 6px;
1161
- height: 48px;
1231
+ align-self: stretch;
1162
1232
  }
1163
1233
 
1164
- .tlui-toolbar__extras:empty {
1234
+ .tlui-main-toolbar__extras:empty {
1165
1235
  display: none;
1166
1236
  }
1167
1237
 
1168
- .tlui-toolbar__extras__controls {
1169
- display: flex;
1238
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__extras {
1239
+ height: 48px;
1240
+ top: 6px;
1241
+ }
1242
+
1243
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__extras {
1244
+ width: 48px;
1245
+ order: 1;
1246
+ }
1247
+
1248
+ .tlui-main-toolbar__extras__controls {
1170
1249
  position: relative;
1171
- flex-direction: row;
1172
- z-index: var(--layer-above);
1173
- background-color: var(--color-low);
1174
- border-top-left-radius: var(--radius-4);
1175
- border-top-right-radius: var(--radius-4);
1176
- border: 2px solid var(--color-background);
1250
+ z-index: var(--tl-layer-above);
1251
+ background-color: var(--tl-color-low);
1252
+ border: 2px solid var(--tl-color-background);
1253
+ pointer-events: all;
1254
+ }
1255
+
1256
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__extras__controls {
1257
+ border-top-left-radius: var(--tl-radius-4);
1258
+ border-top-right-radius: var(--tl-radius-4);
1177
1259
  margin-left: 8px;
1178
1260
  margin-right: 0px;
1179
- pointer-events: all;
1180
1261
  width: fit-content;
1181
1262
  }
1182
1263
 
1183
- .tlui-toolbar__tools {
1184
- display: flex;
1185
- flex-direction: row;
1186
- align-items: center;
1187
- border-radius: var(--radius-4);
1188
- z-index: var(--layer-panels);
1264
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__extras__controls {
1265
+ border-top-right-radius: var(--tl-radius-4);
1266
+ border-bottom-right-radius: var(--tl-radius-4);
1267
+ margin-top: 8px;
1268
+ margin-left: -2px;
1269
+ margin-bottom: 0px;
1270
+ width: fit-content;
1271
+ }
1272
+
1273
+ .tlui-main-toolbar__tools {
1274
+ border-radius: var(--tl-radius-4);
1275
+ z-index: var(--tl-layer-panels);
1189
1276
  pointer-events: all;
1190
1277
  position: relative;
1191
- background: var(--color-panel);
1192
- box-shadow: var(--shadow-2);
1278
+ background: var(--tl-color-panel);
1279
+ box-shadow: var(--tl-shadow-2);
1193
1280
  }
1194
- .tlui-toolbar__tools__list {
1195
- display: flex;
1196
- flex-direction: row;
1197
- align-items: center;
1281
+
1282
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__mobile-style-panel {
1283
+ align-self: flex-end;
1284
+ }
1285
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__mobile-style-panel {
1286
+ align-self: flex-start;
1198
1287
  }
1199
1288
 
1200
- .tlui-toolbar__overflow {
1289
+ .tlui-main-toolbar--horizontal .tlui-main-toolbar__overflow {
1201
1290
  width: 40px;
1291
+ margin-left: 2px;
1292
+ }
1293
+ .tlui-main-toolbar--vertical .tlui-main-toolbar__overflow {
1294
+ height: 40px;
1295
+ margin-top: 2px;
1202
1296
  }
1203
1297
 
1204
- .tlui-layout__mobile .tlui-toolbar__overflow {
1298
+ .tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-main-toolbar__overflow {
1205
1299
  width: 32px;
1206
1300
  padding: 0px;
1207
1301
  }
1208
1302
 
1209
- .tlui-toolbar *[data-state='open']::after {
1210
- background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
1303
+ .tlui-main-toolbar--horizontal *[data-state='open']::after {
1304
+ background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
1305
+ opacity: 1;
1306
+ }
1307
+ .tlui-main-toolbar--vertical *[data-state='open']::after {
1308
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
1211
1309
  opacity: 1;
1212
1310
  }
1213
1311
 
1312
+ .tlui-main-toolbar__overflow-content {
1313
+ touch-action: none;
1314
+ }
1315
+
1316
+ .tlui-main-toolbar__tools [data-toolbar-visible='false'],
1317
+ .tlui-main-toolbar__overflow-content [data-toolbar-visible='false'] {
1318
+ display: none;
1319
+ }
1320
+
1321
+ .tlui-main-toolbar__group:empty {
1322
+ display: none;
1323
+ }
1324
+ .tlui-row.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
1325
+ border-right: 1px solid var(--color-divider);
1326
+ margin-right: 2px;
1327
+ }
1328
+ .tlui-column.tlui-main-toolbar__group:not(
1329
+ :nth-last-child(-n + 1 of [data-toolbar-visible='true'])
1330
+ ) {
1331
+ border-bottom: 1px solid var(--color-divider);
1332
+ margin-bottom: 2px;
1333
+ }
1334
+ .tlui-grid.tlui-main-toolbar__group {
1335
+ grid-column: 1 / span 4;
1336
+ }
1337
+ .tlui-grid.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
1338
+ border-bottom: 1px solid var(--color-divider);
1339
+ margin-bottom: 2px;
1340
+ }
1341
+
1214
1342
  @media (hover: hover) {
1215
- .tlui-toolbar *[data-state='open']:not(:hover)::after {
1216
- background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--color-muted-2) 100%);
1343
+ .tlui-main-toolbar--horizontal *[data-state='open']:not(:hover)::after {
1344
+ background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
1345
+ opacity: 1;
1346
+ }
1347
+ .tlui-main-toolbar--vertical *[data-state='open']:not(:hover)::after {
1348
+ background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
1217
1349
  opacity: 1;
1218
1350
  }
1219
1351
  }
1220
1352
 
1221
- .tlui-layout__mobile .tlui-toolbar {
1222
- transition: transform 0.15s ease-out 0.05s;
1353
+ /* ------------------- Tooltip -------------------- */
1354
+
1355
+ .tlui-tooltip {
1356
+ font-size: 12px;
1357
+ padding: 2px 8px;
1358
+ border-radius: 4px;
1359
+ background-color: var(--tl-color-tooltip);
1360
+ box-shadow: none;
1361
+ color: var(--tl-color-text-shadow);
1362
+ max-width: 400px;
1363
+ width: fit-content;
1364
+ text-align: center;
1365
+ will-change: transform, opacity;
1366
+ z-index: 2;
1367
+ }
1368
+
1369
+ .tlui-tooltip__arrow {
1370
+ fill: var(--tl-color-tooltip);
1371
+ will-change: opacity;
1372
+ }
1373
+
1374
+ [data-radix-popper-content-wrapper]:has(.tlui-tooltip) {
1375
+ z-index: var(--tl-layer-toasts) !important;
1376
+ pointer-events: none;
1223
1377
  }
1224
1378
 
1225
1379
  /* ------------------- Debug panel ------------------ */
1226
1380
 
1227
1381
  .tlui-debug-panel {
1228
- background-color: var(--color-low);
1382
+ background-color: var(--tl-color-low);
1229
1383
  width: 100%;
1230
1384
  display: grid;
1231
1385
  align-items: center;
1232
1386
  grid-template-columns: 1fr auto auto auto;
1233
1387
  justify-content: space-between;
1234
- padding-left: var(--space-4);
1235
- border-top: 1px solid var(--color-background);
1388
+ padding-left: var(--tl-space-4);
1389
+ border-top: 1px solid var(--tl-color-background);
1236
1390
  font-size: 12px;
1237
- color: var(--color-text-1);
1238
- z-index: var(--layer-panels);
1391
+ color: var(--tl-color-text-1);
1392
+ z-index: var(--tl-layer-panels);
1239
1393
  pointer-events: all;
1240
1394
  }
1241
1395
 
@@ -1251,7 +1405,7 @@
1251
1405
 
1252
1406
  .tlui-debug-panel__fps__slow {
1253
1407
  font-weight: bold;
1254
- color: var(--color-danger);
1408
+ color: var(--tl-color-danger);
1255
1409
  }
1256
1410
 
1257
1411
  .tlui-a11y-audit {
@@ -1261,7 +1415,7 @@
1261
1415
  .tlui-a11y-audit th,
1262
1416
  .tlui-a11y-audit td {
1263
1417
  padding: 8px;
1264
- border: 1px solid var(--color-low-border);
1418
+ border: 1px solid var(--tl-color-low-border);
1265
1419
  }
1266
1420
 
1267
1421
  /* --------------------- Toasts --------------------- */
@@ -1274,10 +1428,10 @@
1274
1428
  align-items: flex-end;
1275
1429
  justify-content: flex-end;
1276
1430
  flex-direction: column;
1277
- gap: var(--space-3);
1431
+ gap: var(--tl-space-3);
1278
1432
  pointer-events: none;
1279
- padding: 0px var(--space-3) 64px 0px;
1280
- z-index: var(--layer-toasts);
1433
+ padding: 0px var(--tl-space-3) 64px 0px;
1434
+ z-index: var(--tl-layer-toasts);
1281
1435
  }
1282
1436
 
1283
1437
  .tlui-toast__viewport > * {
@@ -1286,34 +1440,34 @@
1286
1440
 
1287
1441
  .tlui-toast__icon {
1288
1442
  padding-top: 11px;
1289
- padding-left: var(--space-4);
1290
- color: var(--color-text-1);
1443
+ padding-left: var(--tl-space-4);
1444
+ color: var(--tl-color-text-1);
1291
1445
  }
1292
1446
 
1293
1447
  .tlui-toast__container {
1294
1448
  min-width: 200px;
1295
1449
  display: flex;
1296
1450
  flex-direction: row;
1297
- background-color: var(--color-panel);
1298
- box-shadow: var(--shadow-2);
1299
- border-radius: var(--radius-3);
1451
+ background-color: var(--tl-color-panel);
1452
+ box-shadow: var(--tl-shadow-2);
1453
+ border-radius: var(--tl-radius-3);
1300
1454
  font-size: 12px;
1301
1455
  }
1302
1456
 
1303
1457
  .tlui-toast__container[data-severity='success'] .tlui-icon {
1304
- color: var(--color-success);
1458
+ color: var(--tl-color-success);
1305
1459
  }
1306
1460
 
1307
1461
  .tlui-toast__container[data-severity='info'] .tlui-icon {
1308
- color: var(--color-info);
1462
+ color: var(--tl-color-info);
1309
1463
  }
1310
1464
 
1311
1465
  .tlui-toast__container[data-severity='warning'] .tlui-icon {
1312
- color: var(--color-warning);
1466
+ color: var(--tl-color-warning);
1313
1467
  }
1314
1468
 
1315
1469
  .tlui-toast__container[data-severity='error'] .tlui-icon {
1316
- color: var(--color-danger);
1470
+ color: var(--tl-color-danger);
1317
1471
  }
1318
1472
 
1319
1473
  .tlui-toast__main {
@@ -1322,27 +1476,27 @@
1322
1476
  }
1323
1477
 
1324
1478
  .tlui-toast__content {
1325
- padding: var(--space-4);
1479
+ padding: var(--tl-space-4);
1326
1480
  display: flex;
1327
1481
  line-height: 1.4;
1328
1482
  flex-direction: column;
1329
- gap: var(--space-3);
1483
+ gap: var(--tl-space-3);
1330
1484
  }
1331
1485
 
1332
1486
  .tlui-toast__main[data-actions='true'] .tlui-toast__content {
1333
- padding-bottom: var(--space-2);
1487
+ padding-bottom: var(--tl-space-2);
1334
1488
  }
1335
1489
 
1336
1490
  .tlui-toast__title {
1337
1491
  font-weight: bold;
1338
- color: var(--color-text-1);
1492
+ color: var(--tl-color-text-1);
1339
1493
  /* this makes the default toast look better */
1340
1494
  line-height: 16px;
1341
1495
  }
1342
1496
 
1343
1497
  .tlui-toast__description {
1344
- color: var(--color-text-1);
1345
- padding: var(--space-3);
1498
+ color: var(--tl-color-text-1);
1499
+ padding: var(--tl-space-3);
1346
1500
  margin: 0px;
1347
1501
  padding: 0px;
1348
1502
  }
@@ -1394,14 +1548,14 @@
1394
1548
  left: 0px;
1395
1549
  width: 100%;
1396
1550
  height: 100%;
1397
- z-index: var(--layer-canvas-overlays);
1398
- background-color: var(--color-overlay);
1551
+ z-index: var(--tl-layer-canvas-overlays);
1552
+ background-color: var(--tl-color-overlay);
1399
1553
  pointer-events: all;
1400
1554
  animation: tl-fade-in 0.12s ease-out;
1401
1555
  display: grid;
1402
1556
  place-items: center;
1403
1557
  overflow-y: auto;
1404
- padding: 0px var(--space-3);
1558
+ padding: 0px var(--tl-space-3);
1405
1559
  }
1406
1560
 
1407
1561
  .tlui-dialog__content {
@@ -1409,9 +1563,9 @@
1409
1563
  flex-direction: column;
1410
1564
  position: relative;
1411
1565
  cursor: default;
1412
- background-color: var(--color-panel);
1413
- box-shadow: var(--shadow-3);
1414
- border-radius: var(--radius-3);
1566
+ background-color: var(--tl-color-panel);
1567
+ box-shadow: var(--tl-shadow-3);
1568
+ border-radius: var(--tl-radius-3);
1415
1569
  font-size: 12px;
1416
1570
  overflow: hidden;
1417
1571
  min-width: 300px;
@@ -1424,9 +1578,9 @@
1424
1578
  display: flex;
1425
1579
  align-items: center;
1426
1580
  flex: 0;
1427
- z-index: var(--layer-header-footer);
1428
- padding-left: var(--space-4);
1429
- color: var(--color-text);
1581
+ z-index: var(--tl-layer-header-footer);
1582
+ padding-left: var(--tl-space-4);
1583
+ color: var(--tl-color-text);
1430
1584
  height: 40px;
1431
1585
  }
1432
1586
 
@@ -1435,7 +1589,7 @@
1435
1589
  font-weight: inherit;
1436
1590
  font-size: 12px;
1437
1591
  margin: 0px;
1438
- color: var(--color-text-1);
1592
+ color: var(--tl-color-text-1);
1439
1593
  }
1440
1594
 
1441
1595
  .tlui-dialog__header__close {
@@ -1443,16 +1597,16 @@
1443
1597
  }
1444
1598
 
1445
1599
  .tlui-dialog__body {
1446
- padding: var(--space-4) var(--space-4);
1600
+ padding: var(--tl-space-4) var(--tl-space-4);
1447
1601
  flex: 0 1;
1448
1602
  overflow-y: auto;
1449
1603
  overflow-x: hidden;
1450
- color: var(--color-text-1);
1604
+ color: var(--tl-color-text-1);
1451
1605
  user-select: all;
1452
1606
  -webkit-user-select: text;
1453
1607
  }
1454
1608
  .tlui-dialog__body a {
1455
- color: var(--color-selected);
1609
+ color: var(--tl-color-selected);
1456
1610
  }
1457
1611
 
1458
1612
  .tlui-dialog__body ul,
@@ -1460,13 +1614,13 @@
1460
1614
  padding-left: 16px;
1461
1615
  display: flex;
1462
1616
  flex-direction: column;
1463
- gap: var(--space-2);
1617
+ gap: var(--tl-space-2);
1464
1618
  }
1465
1619
 
1466
1620
  .tlui-dialog__footer {
1467
1621
  position: relative;
1468
1622
  min-height: 12px;
1469
- z-index: var(--layer-header-footer);
1623
+ z-index: var(--tl-layer-header-footer);
1470
1624
  }
1471
1625
 
1472
1626
  .tlui-dialog__footer__actions {
@@ -1486,15 +1640,15 @@
1486
1640
  .tlui-edit-link-dialog {
1487
1641
  display: flex;
1488
1642
  flex-direction: column;
1489
- gap: var(--space-4);
1490
- color: var(--color-text);
1643
+ gap: var(--tl-space-4);
1644
+ color: var(--tl-color-text);
1491
1645
  }
1492
1646
 
1493
1647
  .tlui-edit-link-dialog__input {
1494
- background-color: var(--color-muted-2);
1648
+ background-color: var(--tl-color-muted-2);
1495
1649
  flex-grow: 2;
1496
- border-radius: var(--radius-2);
1497
- padding: 0px var(--space-4);
1650
+ border-radius: var(--tl-radius-2);
1651
+ padding: 0px var(--tl-space-4);
1498
1652
  }
1499
1653
 
1500
1654
  /* Embed Dialog */
@@ -1502,15 +1656,15 @@
1502
1656
  .tlui-embed__spacer {
1503
1657
  flex-grow: 2;
1504
1658
  min-height: 0px;
1505
- margin-left: calc(-1 * var(--space-4));
1506
- margin-top: calc(-1 * var(--space-4));
1659
+ margin-left: calc(-1 * var(--tl-space-4));
1660
+ margin-top: calc(-1 * var(--tl-space-4));
1507
1661
  pointer-events: none;
1508
1662
  }
1509
1663
 
1510
1664
  .tlui-embed-dialog__list {
1511
1665
  display: flex;
1512
1666
  flex-direction: column;
1513
- padding: 0px var(--space-3) var(--space-4) var(--space-3);
1667
+ padding: 0px var(--tl-space-3) var(--tl-space-4) var(--tl-space-3);
1514
1668
  }
1515
1669
 
1516
1670
  .tlui-embed-dialog__item__image {
@@ -1522,49 +1676,49 @@
1522
1676
  background-size: contain;
1523
1677
  background-repeat: no-repeat;
1524
1678
  background-position: center center;
1525
- background-color: var(--color-selected-contrast);
1526
- border-radius: var(--radius-1);
1679
+ background-color: var(--tl-color-selected-contrast);
1680
+ border-radius: var(--tl-radius-1);
1527
1681
  }
1528
1682
 
1529
1683
  .tlui-embed-dialog__enter {
1530
1684
  display: flex;
1531
1685
  flex-direction: column;
1532
- gap: var(--space-4);
1533
- color: var(--color-text-1);
1686
+ gap: var(--tl-space-4);
1687
+ color: var(--tl-color-text-1);
1534
1688
  }
1535
1689
 
1536
1690
  .tlui-embed-dialog__input {
1537
- background-color: var(--color-muted-2);
1691
+ background-color: var(--tl-color-muted-2);
1538
1692
  flex-grow: 2;
1539
- border-radius: var(--radius-2);
1540
- padding: 0px var(--space-4);
1693
+ border-radius: var(--tl-radius-2);
1694
+ padding: 0px var(--tl-space-4);
1541
1695
  }
1542
1696
 
1543
1697
  .tlui-embed-dialog__warning {
1544
- color: var(--color-danger);
1698
+ color: var(--tl-color-danger);
1545
1699
  text-shadow: none;
1546
1700
  }
1547
1701
 
1548
1702
  .tlui-embed-dialog__instruction__link {
1549
1703
  display: flex;
1550
- gap: var(--space-1);
1551
- margin-top: var(--space-4);
1704
+ gap: var(--tl-space-1);
1705
+ margin-top: var(--tl-space-4);
1552
1706
  }
1553
1707
 
1554
1708
  .tlui-embed-dialog__enter a {
1555
- color: var(--color-text-1);
1709
+ color: var(--tl-color-text-1);
1556
1710
  }
1557
1711
 
1558
1712
  /* --------------- Keyboard shortcuts --------------- */
1559
1713
 
1560
1714
  .tlui-shortcuts-dialog__header {
1561
- border-bottom: 1px solid var(--color-divider);
1715
+ border-bottom: 1px solid var(--tl-color-divider);
1562
1716
  }
1563
1717
 
1564
1718
  .tlui-shortcuts-dialog__body {
1565
1719
  position: relative;
1566
1720
  columns: 3;
1567
- column-gap: var(--space-9);
1721
+ column-gap: var(--tl-space-9);
1568
1722
  pointer-events: all;
1569
1723
  touch-action: auto;
1570
1724
 
@@ -1582,14 +1736,14 @@
1582
1736
 
1583
1737
  .tlui-shortcuts-dialog__group {
1584
1738
  break-inside: avoid-column;
1585
- padding-bottom: var(--space-6);
1739
+ padding-bottom: var(--tl-space-6);
1586
1740
  }
1587
1741
 
1588
1742
  .tlui-shortcuts-dialog__group__title {
1589
1743
  font-size: inherit;
1590
1744
  font-weight: inherit;
1591
1745
  margin: 0px;
1592
- color: var(--color-text-3);
1746
+ color: var(--tl-color-text-3);
1593
1747
  height: 32px;
1594
1748
  display: flex;
1595
1749
  align-items: center;
@@ -1598,12 +1752,12 @@
1598
1752
  .tlui-shortcuts-dialog__group__content {
1599
1753
  display: flex;
1600
1754
  flex-direction: column;
1601
- color: var(--color-text-1);
1755
+ color: var(--tl-color-text-1);
1602
1756
  }
1603
1757
 
1604
1758
  .tlui-shortcuts-dialog__key-pair {
1605
1759
  display: flex;
1606
- gap: var(--space-4);
1760
+ gap: var(--tl-space-4);
1607
1761
  align-items: center;
1608
1762
  justify-content: space-between;
1609
1763
  height: 32px;
@@ -1630,12 +1784,12 @@
1630
1784
  height: 24px;
1631
1785
  background: linear-gradient(
1632
1786
  to bottom,
1633
- var(--color-panel-transparent) 0%,
1634
- var(--color-panel) 90%,
1635
- var(--color-panel) 100%
1787
+ var(--tl-color-panel-transparent) 0%,
1788
+ var(--tl-color-panel) 90%,
1789
+ var(--tl-color-panel) 100%
1636
1790
  );
1637
- border-bottom-left-radius: var(--radius-3);
1638
- border-bottom-right-radius: var(--radius-3);
1791
+ border-bottom-left-radius: var(--tl-radius-3);
1792
+ border-bottom-right-radius: var(--tl-radius-3);
1639
1793
  pointer-events: none;
1640
1794
  }
1641
1795
 
@@ -1650,10 +1804,10 @@
1650
1804
  .tlui-help-menu {
1651
1805
  pointer-events: all;
1652
1806
  position: absolute;
1653
- bottom: var(--space-2);
1654
- right: var(--space-2);
1655
- z-index: var(--layer-panels);
1656
- border: 2px solid var(--color-background);
1807
+ bottom: var(--tl-space-2);
1808
+ right: var(--tl-space-2);
1809
+ z-index: var(--tl-layer-panels);
1810
+ border: 2px solid var(--tl-color-background);
1657
1811
  border-radius: 100%;
1658
1812
  }
1659
1813
 
@@ -1664,7 +1818,7 @@
1664
1818
  display: flex;
1665
1819
  flex-direction: row;
1666
1820
  justify-content: flex-end;
1667
- z-index: var(--layer-panels);
1821
+ z-index: var(--tl-layer-panels);
1668
1822
  align-items: center;
1669
1823
  padding-top: 2px;
1670
1824
  padding-right: 4px;
@@ -1680,7 +1834,7 @@
1680
1834
  border: none;
1681
1835
  cursor: pointer;
1682
1836
  pointer-events: all;
1683
- border-radius: var(--radius-1);
1837
+ border-radius: var(--tl-radius-1);
1684
1838
  padding-right: 1px;
1685
1839
  height: 100%;
1686
1840
  }
@@ -1693,8 +1847,8 @@
1693
1847
  .tlui-people-menu__avatar {
1694
1848
  height: 24px;
1695
1849
  width: 24px;
1696
- border: 2px solid var(--color-background);
1697
- background-color: var(--color-low);
1850
+ border: 2px solid var(--tl-color-background);
1851
+ background-color: var(--tl-color-low);
1698
1852
  border-radius: 100%;
1699
1853
  display: flex;
1700
1854
  align-items: center;
@@ -1703,7 +1857,7 @@
1703
1857
  font-size: 10px;
1704
1858
  font-weight: bold;
1705
1859
  text-align: center;
1706
- color: var(--color-selected-contrast);
1860
+ color: var(--tl-color-selected-contrast);
1707
1861
  z-index: 2;
1708
1862
  }
1709
1863
 
@@ -1717,7 +1871,7 @@
1717
1871
 
1718
1872
  @media (hover: hover) {
1719
1873
  .tlui-people-menu__avatars-button:hover .tlui-people-menu__avatar {
1720
- border-color: var(--color-low);
1874
+ border-color: var(--tl-color-low);
1721
1875
  }
1722
1876
  }
1723
1877
 
@@ -1725,12 +1879,12 @@
1725
1879
  min-width: 0px;
1726
1880
  font-size: 11px;
1727
1881
  font-weight: 600;
1728
- color: var(--color-text-1);
1882
+ color: var(--tl-color-text-1);
1729
1883
  font-family: inherit;
1730
1884
  padding: 0px 4px;
1731
1885
  }
1732
1886
  .tlui-people-menu__more::after {
1733
- border-radius: var(--radius-2);
1887
+ border-radius: var(--tl-radius-2);
1734
1888
  inset: 0px;
1735
1889
  }
1736
1890
 
@@ -1759,7 +1913,7 @@
1759
1913
  }
1760
1914
 
1761
1915
  .tlui-people-menu__section:not(:last-child) {
1762
- border-bottom: 1px solid var(--color-divider);
1916
+ border-bottom: 1px solid var(--tl-color-divider);
1763
1917
  }
1764
1918
 
1765
1919
  .tlui-people-menu__user {
@@ -1778,7 +1932,7 @@
1778
1932
  text-overflow: ellipsis;
1779
1933
  white-space: nowrap;
1780
1934
  font-size: 12px;
1781
- color: var(--color-text-1);
1935
+ color: var(--tl-color-text-1);
1782
1936
  max-width: 100%;
1783
1937
  flex-grow: 1;
1784
1938
  flex-shrink: 100;
@@ -1790,7 +1944,7 @@
1790
1944
  text-overflow: ellipsis;
1791
1945
  white-space: nowrap;
1792
1946
  font-size: 12px;
1793
- color: var(--color-text-3);
1947
+ color: var(--tl-color-text-3);
1794
1948
  flex-grow: 100;
1795
1949
  flex-shrink: 0;
1796
1950
  margin-left: 4px;
@@ -1881,7 +2035,7 @@
1881
2035
  inset: 0px;
1882
2036
  border-width: 2px;
1883
2037
  border-style: solid;
1884
- z-index: var(--layer-following-indicator);
2038
+ z-index: var(--tl-layer-following-indicator);
1885
2039
  pointer-events: none;
1886
2040
  }
1887
2041
 
@@ -1900,7 +2054,7 @@
1900
2054
  }
1901
2055
 
1902
2056
  .tlui-contextual-toolbar [data-isactive='true']::after {
1903
- background-color: var(--color-muted-2);
2057
+ background-color: var(--tl-color-muted-2);
1904
2058
  opacity: 1;
1905
2059
  }
1906
2060
 
@@ -1916,7 +2070,7 @@
1916
2070
 
1917
2071
  .tlui-contextual-toolbar[data-visible='true'] {
1918
2072
  opacity: 1;
1919
- z-index: var(--layer-menus);
2073
+ z-index: var(--tl-layer-menus);
1920
2074
  }
1921
2075
 
1922
2076
  .tlui-contextual-toolbar[data-interactive='true'],
@@ -1975,7 +2129,7 @@
1975
2129
 
1976
2130
  @keyframes tlui-slide-in {
1977
2131
  from {
1978
- transform: translateX(calc(100% + var(--space-3)));
2132
+ transform: translateX(calc(100% + var(--tl-space-3)));
1979
2133
  }
1980
2134
  to {
1981
2135
  transform: translateX(0px);
@@ -1987,6 +2141,6 @@
1987
2141
  transform: translateX(var(--radix-toast-swipe-end-x));
1988
2142
  }
1989
2143
  to {
1990
- transform: translateX(calc(100% + var(--space-3)));
2144
+ transform: translateX(calc(100% + var(--tl-space-3)));
1991
2145
  }
1992
2146
  }