@reekon-tools/boldr-cad 0.1.0 → 1.0.0

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 (547) hide show
  1. package/README.md +81 -9
  2. package/dist/app/edit.d.ts +12 -1
  3. package/dist/app/edit.js +96 -11
  4. package/dist/app/edit.js.map +1 -1
  5. package/dist/app/state.d.ts +31 -4
  6. package/dist/app/state.js +31 -2
  7. package/dist/app/state.js.map +1 -1
  8. package/dist/data/memory.d.ts +5 -0
  9. package/dist/data/memory.js +2 -2
  10. package/dist/data/memory.js.map +1 -1
  11. package/dist/data/provider.d.ts +19 -7
  12. package/dist/data/sync.d.ts +7 -2
  13. package/dist/data/sync.js +115 -64
  14. package/dist/data/sync.js.map +1 -1
  15. package/dist/editor/actions.d.ts +1 -2
  16. package/dist/editor/actions.js +391 -113
  17. package/dist/editor/actions.js.map +1 -1
  18. package/dist/editor/confirm.d.ts +23 -0
  19. package/dist/editor/confirm.js +35 -0
  20. package/dist/editor/confirm.js.map +1 -0
  21. package/dist/editor/elevation.d.ts +191 -90
  22. package/dist/editor/elevation.js +812 -616
  23. package/dist/editor/elevation.js.map +1 -1
  24. package/dist/editor/face.d.ts +73 -0
  25. package/dist/editor/face.js +269 -0
  26. package/dist/editor/face.js.map +1 -0
  27. package/dist/editor/files.d.ts +6 -0
  28. package/dist/editor/files.js +50 -4
  29. package/dist/editor/files.js.map +1 -1
  30. package/dist/editor/gestures.d.ts +18 -3
  31. package/dist/editor/gestures.js +145 -30
  32. package/dist/editor/gestures.js.map +1 -1
  33. package/dist/editor/keypad.d.ts +19 -4
  34. package/dist/editor/keypad.js +39 -9
  35. package/dist/editor/keypad.js.map +1 -1
  36. package/dist/editor/keys.js +36 -4
  37. package/dist/editor/keys.js.map +1 -1
  38. package/dist/editor/laser.d.ts +20 -4
  39. package/dist/editor/laser.js +104 -21
  40. package/dist/editor/laser.js.map +1 -1
  41. package/dist/editor/linkActions.d.ts +49 -0
  42. package/dist/editor/linkActions.js +210 -0
  43. package/dist/editor/linkActions.js.map +1 -0
  44. package/dist/editor/linkFollow.d.ts +2 -0
  45. package/dist/editor/linkFollow.js +53 -0
  46. package/dist/editor/linkFollow.js.map +1 -0
  47. package/dist/editor/linkWrite.d.ts +13 -0
  48. package/dist/editor/linkWrite.js +84 -0
  49. package/dist/editor/linkWrite.js.map +1 -0
  50. package/dist/editor/links.d.ts +84 -0
  51. package/dist/editor/links.js +130 -0
  52. package/dist/editor/links.js.map +1 -0
  53. package/dist/editor/markup.d.ts +29 -3
  54. package/dist/editor/markup.js +95 -10
  55. package/dist/editor/markup.js.map +1 -1
  56. package/dist/editor/mode.d.ts +40 -2
  57. package/dist/editor/mode.js +71 -4
  58. package/dist/editor/mode.js.map +1 -1
  59. package/dist/editor/ports.d.ts +36 -6
  60. package/dist/editor/ports.js +10 -1
  61. package/dist/editor/ports.js.map +1 -1
  62. package/dist/editor/project.d.ts +38 -6
  63. package/dist/editor/project.js +167 -27
  64. package/dist/editor/project.js.map +1 -1
  65. package/dist/editor/selection.d.ts +10 -0
  66. package/dist/editor/selection.js +62 -8
  67. package/dist/editor/selection.js.map +1 -1
  68. package/dist/editor/status.js +3 -0
  69. package/dist/editor/status.js.map +1 -1
  70. package/dist/editor/tooltips.d.ts +5 -0
  71. package/dist/editor/tooltips.js +48 -0
  72. package/dist/editor/tooltips.js.map +1 -0
  73. package/dist/editor/view3d.d.ts +17 -0
  74. package/dist/editor/view3d.js +135 -0
  75. package/dist/editor/view3d.js.map +1 -0
  76. package/dist/editor/view3dState.d.ts +39 -0
  77. package/dist/editor/view3dState.js +44 -0
  78. package/dist/editor/view3dState.js.map +1 -0
  79. package/dist/export/dxf.js +1 -1
  80. package/dist/export/dxf.js.map +1 -1
  81. package/dist/export/pdf.js +17 -12
  82. package/dist/export/pdf.js.map +1 -1
  83. package/dist/export/plan.d.ts +23 -6
  84. package/dist/export/plan.js +127 -44
  85. package/dist/export/plan.js.map +1 -1
  86. package/dist/index.d.ts +5 -0
  87. package/dist/index.js +2 -0
  88. package/dist/index.js.map +1 -1
  89. package/dist/model/constraints.js +15 -4
  90. package/dist/model/constraints.js.map +1 -1
  91. package/dist/model/demo.js +3 -3
  92. package/dist/model/demo.js.map +1 -1
  93. package/dist/model/elevation.d.ts +6 -9
  94. package/dist/model/elevation.js +5 -13
  95. package/dist/model/elevation.js.map +1 -1
  96. package/dist/model/faces.d.ts +58 -0
  97. package/dist/model/faces.js +197 -0
  98. package/dist/model/faces.js.map +1 -0
  99. package/dist/model/facesolve.d.ts +72 -0
  100. package/dist/model/facesolve.js +369 -0
  101. package/dist/model/facesolve.js.map +1 -0
  102. package/dist/model/history.d.ts +3 -2
  103. package/dist/model/history.js +17 -11
  104. package/dist/model/history.js.map +1 -1
  105. package/dist/model/images.d.ts +18 -0
  106. package/dist/model/images.js +26 -0
  107. package/dist/model/images.js.map +1 -0
  108. package/dist/model/links.d.ts +46 -0
  109. package/dist/model/links.js +73 -0
  110. package/dist/model/links.js.map +1 -0
  111. package/dist/model/markup.d.ts +46 -0
  112. package/dist/model/markup.js +71 -0
  113. package/dist/model/markup.js.map +1 -0
  114. package/dist/model/measurement.d.ts +11 -0
  115. package/dist/model/measurement.js +24 -0
  116. package/dist/model/measurement.js.map +1 -0
  117. package/dist/model/openings.d.ts +4 -0
  118. package/dist/model/openings.js +4 -0
  119. package/dist/model/openings.js.map +1 -1
  120. package/dist/model/planGeom.d.ts +72 -2
  121. package/dist/model/planGeom.js +184 -10
  122. package/dist/model/planGeom.js.map +1 -1
  123. package/dist/model/project.js +3 -2
  124. package/dist/model/project.js.map +1 -1
  125. package/dist/model/projectfile.js +2 -1
  126. package/dist/model/projectfile.js.map +1 -1
  127. package/dist/model/rooms.js +2 -2
  128. package/dist/model/rooms.js.map +1 -1
  129. package/dist/model/settings.d.ts +6 -0
  130. package/dist/model/settings.js +2 -2
  131. package/dist/model/settings.js.map +1 -1
  132. package/dist/model/sketch.d.ts +14 -0
  133. package/dist/model/sketch.js +143 -24
  134. package/dist/model/sketch.js.map +1 -1
  135. package/dist/model/smooth.d.ts +6 -0
  136. package/dist/model/smooth.js +52 -0
  137. package/dist/model/smooth.js.map +1 -0
  138. package/dist/model/store.d.ts +12 -0
  139. package/dist/model/store.js +35 -3
  140. package/dist/model/store.js.map +1 -1
  141. package/dist/model/types.d.ts +173 -8
  142. package/dist/model/wallfaces.d.ts +32 -0
  143. package/dist/model/wallfaces.js +133 -20
  144. package/dist/model/wallfaces.js.map +1 -1
  145. package/dist/model/wallshape.d.ts +15 -0
  146. package/dist/model/wallshape.js +89 -0
  147. package/dist/model/wallshape.js.map +1 -0
  148. package/dist/react/BottomBar.d.ts +9 -5
  149. package/dist/react/BottomBar.js +213 -24
  150. package/dist/react/BottomBar.js.map +1 -1
  151. package/dist/react/Buttons.d.ts +13 -2
  152. package/dist/react/Buttons.js +37 -5
  153. package/dist/react/Buttons.js.map +1 -1
  154. package/dist/react/CadEditor.d.ts +46 -3
  155. package/dist/react/CadEditor.js +77 -20
  156. package/dist/react/CadEditor.js.map +1 -1
  157. package/dist/react/ConfirmSheet.d.ts +4 -0
  158. package/dist/react/ConfirmSheet.js +31 -0
  159. package/dist/react/ConfirmSheet.js.map +1 -0
  160. package/dist/react/ConflictSheet.d.ts +2 -1
  161. package/dist/react/ConflictSheet.js +16 -8
  162. package/dist/react/ConflictSheet.js.map +1 -1
  163. package/dist/react/Drawer.d.ts +8 -2
  164. package/dist/react/Drawer.js +167 -38
  165. package/dist/react/Drawer.js.map +1 -1
  166. package/dist/react/Duck.d.ts +13 -0
  167. package/dist/react/Duck.js +45 -0
  168. package/dist/react/Duck.js.map +1 -0
  169. package/dist/react/Empty3D.d.ts +2 -0
  170. package/dist/react/Empty3D.js +39 -0
  171. package/dist/react/Empty3D.js.map +1 -0
  172. package/dist/react/FitScroll.d.ts +6 -0
  173. package/dist/react/FitScroll.js +14 -0
  174. package/dist/react/FitScroll.js.map +1 -0
  175. package/dist/react/Icon.native.d.ts +6 -0
  176. package/dist/react/Icon.native.js +4 -0
  177. package/dist/react/Icon.native.js.map +1 -1
  178. package/dist/react/Icon.web.d.ts +6 -0
  179. package/dist/react/Icon.web.js +4 -0
  180. package/dist/react/Icon.web.js.map +1 -1
  181. package/dist/react/KeypadSheet.d.ts +9 -2
  182. package/dist/react/KeypadSheet.js +174 -42
  183. package/dist/react/KeypadSheet.js.map +1 -1
  184. package/dist/react/LaserTray.js +8 -5
  185. package/dist/react/LaserTray.js.map +1 -1
  186. package/dist/react/MarkupPanel.d.ts +8 -0
  187. package/dist/react/MarkupPanel.js +67 -0
  188. package/dist/react/MarkupPanel.js.map +1 -0
  189. package/dist/react/PageThumb.native.d.ts +7 -2
  190. package/dist/react/PageThumb.native.js +19 -7
  191. package/dist/react/PageThumb.native.js.map +1 -1
  192. package/dist/react/PageThumb.web.d.ts +3 -2
  193. package/dist/react/PageThumb.web.js +4 -4
  194. package/dist/react/PageThumb.web.js.map +1 -1
  195. package/dist/react/PlanCanvas.native.d.ts +1 -1
  196. package/dist/react/PlanCanvas.native.js +134 -36
  197. package/dist/react/PlanCanvas.native.js.map +1 -1
  198. package/dist/react/PlanCanvas.web.js +16 -5
  199. package/dist/react/PlanCanvas.web.js.map +1 -1
  200. package/dist/react/Popovers.d.ts +12 -6
  201. package/dist/react/Popovers.js +53 -26
  202. package/dist/react/Popovers.js.map +1 -1
  203. package/dist/react/Rail.d.ts +24 -0
  204. package/dist/react/Rail.js +324 -34
  205. package/dist/react/Rail.js.map +1 -1
  206. package/dist/react/ShapeMenu.d.ts +7 -0
  207. package/dist/react/ShapeMenu.js +58 -0
  208. package/dist/react/ShapeMenu.js.map +1 -0
  209. package/dist/react/Sheet.d.ts +14 -4
  210. package/dist/react/Sheet.js +54 -9
  211. package/dist/react/Sheet.js.map +1 -1
  212. package/dist/react/Slider.d.ts +18 -0
  213. package/dist/react/Slider.js +27 -0
  214. package/dist/react/Slider.js.map +1 -0
  215. package/dist/react/Toast.js +14 -6
  216. package/dist/react/Toast.js.map +1 -1
  217. package/dist/react/ToolTip.d.ts +7 -0
  218. package/dist/react/ToolTip.js +43 -0
  219. package/dist/react/ToolTip.js.map +1 -0
  220. package/dist/react/TopBar.d.ts +6 -3
  221. package/dist/react/TopBar.js +48 -17
  222. package/dist/react/TopBar.js.map +1 -1
  223. package/dist/react/Tween.d.ts +7 -0
  224. package/dist/react/Tween.js +26 -0
  225. package/dist/react/Tween.js.map +1 -0
  226. package/dist/react/Tween.native.d.ts +6 -0
  227. package/dist/react/Tween.native.js +43 -0
  228. package/dist/react/Tween.native.js.map +1 -0
  229. package/dist/react/View3D.native.d.ts +4 -0
  230. package/dist/react/View3D.native.js +103 -0
  231. package/dist/react/View3D.native.js.map +1 -0
  232. package/dist/react/View3D.web.d.ts +4 -0
  233. package/dist/react/View3D.web.js +151 -0
  234. package/dist/react/View3D.web.js.map +1 -0
  235. package/dist/react/View3DHost.d.ts +143 -0
  236. package/dist/react/View3DHost.js +377 -0
  237. package/dist/react/View3DHost.js.map +1 -0
  238. package/dist/react/corners.d.ts +7 -0
  239. package/dist/react/corners.js +51 -0
  240. package/dist/react/corners.js.map +1 -0
  241. package/dist/react/easing.d.ts +15 -0
  242. package/dist/react/easing.js +10 -0
  243. package/dist/react/easing.js.map +1 -0
  244. package/dist/react/host.d.ts +7 -2
  245. package/dist/react/host.js +8 -3
  246. package/dist/react/host.js.map +1 -1
  247. package/dist/react/hostKeypad.d.ts +56 -0
  248. package/dist/react/hostKeypad.js +5 -0
  249. package/dist/react/hostKeypad.js.map +1 -0
  250. package/dist/react/motion.d.ts +77 -0
  251. package/dist/react/motion.js +173 -0
  252. package/dist/react/motion.js.map +1 -0
  253. package/dist/react/ports.js +90 -8
  254. package/dist/react/ports.js.map +1 -1
  255. package/dist/react/saving.d.ts +15 -0
  256. package/dist/react/saving.js +76 -0
  257. package/dist/react/saving.js.map +1 -0
  258. package/dist/react/store.d.ts +38 -1
  259. package/dist/react/store.js +31 -1
  260. package/dist/react/store.js.map +1 -1
  261. package/dist/react/theme.d.ts +10 -0
  262. package/dist/react/theme.js +8 -0
  263. package/dist/react/theme.js.map +1 -1
  264. package/dist/react/topRow.d.ts +22 -0
  265. package/dist/react/topRow.js +61 -0
  266. package/dist/react/topRow.js.map +1 -0
  267. package/dist/react/touch.d.ts +6 -0
  268. package/dist/react/touch.js +9 -0
  269. package/dist/react/touch.js.map +1 -0
  270. package/dist/render/ctx.d.ts +8 -0
  271. package/dist/render/draw.d.ts +33 -1
  272. package/dist/render/draw.js +593 -215
  273. package/dist/render/draw.js.map +1 -1
  274. package/dist/render/elevation.d.ts +65 -43
  275. package/dist/render/elevation.js +414 -140
  276. package/dist/render/elevation.js.map +1 -1
  277. package/dist/render/figmaIcons.d.ts +12 -0
  278. package/dist/render/figmaIcons.js +21 -0
  279. package/dist/render/figmaIcons.js.map +1 -0
  280. package/dist/render/hit.d.ts +22 -2
  281. package/dist/render/hit.js +168 -25
  282. package/dist/render/hit.js.map +1 -1
  283. package/dist/render/icons.js +69 -10
  284. package/dist/render/icons.js.map +1 -1
  285. package/dist/render/linkTile.d.ts +15 -0
  286. package/dist/render/linkTile.js +369 -0
  287. package/dist/render/linkTile.js.map +1 -0
  288. package/dist/render/markup.d.ts +11 -0
  289. package/dist/render/markup.js +112 -0
  290. package/dist/render/markup.js.map +1 -0
  291. package/dist/render/navigate.d.ts +88 -0
  292. package/dist/render/navigate.js +100 -0
  293. package/dist/render/navigate.js.map +1 -0
  294. package/dist/render/snap.d.ts +20 -1
  295. package/dist/render/snap.js +118 -25
  296. package/dist/render/snap.js.map +1 -1
  297. package/dist/render/squircle.d.ts +8 -0
  298. package/dist/render/squircle.js +71 -0
  299. package/dist/render/squircle.js.map +1 -0
  300. package/dist/render/view.d.ts +115 -2
  301. package/dist/render/view.js +244 -19
  302. package/dist/render/view.js.map +1 -1
  303. package/dist/skia/SkiaDrawCtx.d.ts +30 -2
  304. package/dist/skia/SkiaDrawCtx.js +198 -43
  305. package/dist/skia/SkiaDrawCtx.js.map +1 -1
  306. package/dist/skia/host.d.ts +18 -2
  307. package/dist/skia/host.js +46 -1
  308. package/dist/skia/host.js.map +1 -1
  309. package/dist/solver/equations.js +37 -2
  310. package/dist/solver/equations.js.map +1 -1
  311. package/dist/solver/gauss-newton.d.ts +17 -0
  312. package/dist/solver/gauss-newton.js +144 -36
  313. package/dist/solver/gauss-newton.js.map +1 -1
  314. package/dist/solver/linalg.d.ts +45 -2
  315. package/dist/solver/linalg.js +164 -10
  316. package/dist/solver/linalg.js.map +1 -1
  317. package/dist/solver/types.d.ts +5 -0
  318. package/dist/tools/annotate.d.ts +57 -1
  319. package/dist/tools/annotate.js +64 -43
  320. package/dist/tools/annotate.js.map +1 -1
  321. package/dist/tools/chamfer.d.ts +12 -0
  322. package/dist/tools/chamfer.js +114 -0
  323. package/dist/tools/chamfer.js.map +1 -0
  324. package/dist/tools/corner.d.ts +38 -0
  325. package/dist/tools/corner.js +99 -0
  326. package/dist/tools/corner.js.map +1 -0
  327. package/dist/tools/dim.d.ts +86 -9
  328. package/dist/tools/dim.js +581 -96
  329. package/dist/tools/dim.js.map +1 -1
  330. package/dist/tools/elevation.js +1 -1
  331. package/dist/tools/elevation.js.map +1 -1
  332. package/dist/tools/fillet.d.ts +9 -0
  333. package/dist/tools/fillet.js +86 -0
  334. package/dist/tools/fillet.js.map +1 -0
  335. package/dist/tools/freehand.d.ts +3 -2
  336. package/dist/tools/freehand.js +19 -12
  337. package/dist/tools/freehand.js.map +1 -1
  338. package/dist/tools/index.js +14 -4
  339. package/dist/tools/index.js.map +1 -1
  340. package/dist/tools/line.d.ts +8 -3
  341. package/dist/tools/line.js +66 -30
  342. package/dist/tools/line.js.map +1 -1
  343. package/dist/tools/modify.d.ts +13 -0
  344. package/dist/tools/modify.js +105 -25
  345. package/dist/tools/modify.js.map +1 -1
  346. package/dist/tools/openings.js +22 -15
  347. package/dist/tools/openings.js.map +1 -1
  348. package/dist/tools/registry.d.ts +8 -0
  349. package/dist/tools/registry.js +42 -2
  350. package/dist/tools/registry.js.map +1 -1
  351. package/dist/tools/select.d.ts +77 -3
  352. package/dist/tools/select.js +560 -74
  353. package/dist/tools/select.js.map +1 -1
  354. package/dist/tools/shapes.d.ts +14 -0
  355. package/dist/tools/shapes.js +154 -75
  356. package/dist/tools/shapes.js.map +1 -1
  357. package/dist/units/format.d.ts +10 -2
  358. package/dist/units/format.js +18 -3
  359. package/dist/units/format.js.map +1 -1
  360. package/dist/view3d/build.d.ts +35 -0
  361. package/dist/view3d/build.js +630 -0
  362. package/dist/view3d/build.js.map +1 -0
  363. package/dist/view3d/camera.d.ts +60 -0
  364. package/dist/view3d/camera.js +84 -0
  365. package/dist/view3d/camera.js.map +1 -0
  366. package/dist/view3d/fatLines.d.ts +11 -0
  367. package/dist/view3d/fatLines.js +83 -0
  368. package/dist/view3d/fatLines.js.map +1 -0
  369. package/dist/view3d/lines.d.ts +17 -0
  370. package/dist/view3d/lines.js +271 -0
  371. package/dist/view3d/lines.js.map +1 -0
  372. package/dist/view3d/mesh.d.ts +51 -0
  373. package/dist/view3d/mesh.js +101 -0
  374. package/dist/view3d/mesh.js.map +1 -0
  375. package/dist/view3d/poly.d.ts +16 -0
  376. package/dist/view3d/poly.js +109 -0
  377. package/dist/view3d/poly.js.map +1 -0
  378. package/dist/view3d/viewer.d.ts +86 -0
  379. package/dist/view3d/viewer.js +350 -0
  380. package/dist/view3d/viewer.js.map +1 -0
  381. package/package.json +15 -2
  382. package/src/app/edit.ts +83 -12
  383. package/src/app/main.ts +11 -5
  384. package/src/app/state.ts +38 -5
  385. package/src/data/memory.ts +2 -2
  386. package/src/data/provider.ts +15 -7
  387. package/src/data/sync.ts +87 -50
  388. package/src/editor/actions.ts +292 -83
  389. package/src/editor/confirm.ts +58 -0
  390. package/src/editor/elevation.ts +698 -478
  391. package/src/editor/face.ts +227 -0
  392. package/src/editor/files.ts +40 -4
  393. package/src/editor/gestures.ts +147 -31
  394. package/src/editor/keypad.ts +43 -11
  395. package/src/editor/keys.ts +25 -5
  396. package/src/editor/laser.ts +98 -20
  397. package/src/editor/linkActions.ts +194 -0
  398. package/src/editor/linkFollow.ts +43 -0
  399. package/src/editor/linkWrite.ts +77 -0
  400. package/src/editor/links.ts +181 -0
  401. package/src/editor/markup.ts +92 -8
  402. package/src/editor/mode.ts +83 -7
  403. package/src/editor/ports.ts +37 -6
  404. package/src/editor/project.ts +155 -26
  405. package/src/editor/selection.ts +54 -8
  406. package/src/editor/status.ts +2 -0
  407. package/src/editor/tooltips.ts +47 -0
  408. package/src/editor/view3d.ts +119 -0
  409. package/src/editor/view3dState.ts +61 -0
  410. package/src/export/dxf.ts +1 -1
  411. package/src/export/pdf.ts +15 -7
  412. package/src/export/plan.ts +119 -35
  413. package/src/index.ts +5 -0
  414. package/src/input/keyboard.ts +2 -4
  415. package/src/model/constraints.ts +13 -4
  416. package/src/model/demo.ts +3 -3
  417. package/src/model/elevation.ts +6 -16
  418. package/src/model/faces.ts +153 -0
  419. package/src/model/facesolve.ts +322 -0
  420. package/src/model/history.ts +19 -11
  421. package/src/model/images.ts +35 -0
  422. package/src/model/links.ts +77 -0
  423. package/src/model/markup.ts +80 -0
  424. package/src/model/measurement.ts +26 -0
  425. package/src/model/openings.ts +6 -0
  426. package/src/model/planGeom.ts +174 -8
  427. package/src/model/project.ts +3 -2
  428. package/src/model/projectfile.ts +2 -1
  429. package/src/model/rooms.ts +1 -1
  430. package/src/model/settings.ts +8 -2
  431. package/src/model/sketch.ts +101 -14
  432. package/src/model/smooth.ts +51 -0
  433. package/src/model/store.ts +35 -4
  434. package/src/model/types.ts +170 -8
  435. package/src/model/wallfaces.ts +126 -17
  436. package/src/model/wallshape.ts +97 -0
  437. package/src/react/BottomBar.tsx +263 -46
  438. package/src/react/Buttons.tsx +50 -9
  439. package/src/react/CadEditor.tsx +133 -30
  440. package/src/react/ConfirmSheet.tsx +38 -0
  441. package/src/react/ConflictSheet.tsx +19 -12
  442. package/src/react/Drawer.tsx +213 -110
  443. package/src/react/Duck.tsx +50 -0
  444. package/src/react/Empty3D.tsx +32 -0
  445. package/src/react/FitScroll.tsx +19 -0
  446. package/src/react/Icon.native.tsx +5 -0
  447. package/src/react/Icon.web.tsx +5 -0
  448. package/src/react/KeypadSheet.tsx +253 -60
  449. package/src/react/LaserTray.tsx +12 -8
  450. package/src/react/MarkupPanel.tsx +150 -0
  451. package/src/react/PageThumb.native.tsx +18 -7
  452. package/src/react/PageThumb.web.tsx +4 -4
  453. package/src/react/PlanCanvas.native.tsx +151 -34
  454. package/src/react/PlanCanvas.web.tsx +15 -5
  455. package/src/react/Popovers.tsx +116 -51
  456. package/src/react/Rail.tsx +360 -27
  457. package/src/react/ShapeMenu.tsx +66 -0
  458. package/src/react/Sheet.tsx +56 -11
  459. package/src/react/Slider.tsx +48 -0
  460. package/src/react/Toast.tsx +16 -9
  461. package/src/react/ToolTip.tsx +49 -0
  462. package/src/react/TopBar.tsx +97 -39
  463. package/src/react/Tween.native.tsx +36 -0
  464. package/src/react/Tween.tsx +24 -0
  465. package/src/react/View3D.native.tsx +131 -0
  466. package/src/react/View3D.web.tsx +131 -0
  467. package/src/react/View3DHost.ts +367 -0
  468. package/src/react/corners.ts +52 -0
  469. package/src/react/easing.ts +14 -0
  470. package/src/react/host.ts +8 -3
  471. package/src/react/hostKeypad.ts +66 -0
  472. package/src/react/motion.tsx +239 -0
  473. package/src/react/ports.ts +78 -9
  474. package/src/react/saving.ts +80 -0
  475. package/src/react/store.ts +35 -3
  476. package/src/react/theme.ts +8 -0
  477. package/src/react/topRow.ts +71 -0
  478. package/src/react/touch.ts +10 -0
  479. package/src/render/ctx.ts +8 -0
  480. package/src/render/draw.ts +437 -175
  481. package/src/render/elevation.ts +349 -143
  482. package/src/render/figmaIcons.ts +22 -0
  483. package/src/render/hit.ts +140 -21
  484. package/src/render/icons.ts +69 -10
  485. package/src/render/linkTile.ts +297 -0
  486. package/src/render/markup.ts +91 -0
  487. package/src/render/navigate.ts +114 -0
  488. package/src/render/snap.ts +105 -22
  489. package/src/render/squircle.ts +73 -0
  490. package/src/render/view.ts +255 -19
  491. package/src/skia/SkiaDrawCtx.ts +163 -41
  492. package/src/skia/host.ts +46 -1
  493. package/src/solver/equations.ts +37 -2
  494. package/src/solver/gauss-newton.ts +125 -28
  495. package/src/solver/linalg.ts +141 -5
  496. package/src/solver/types.ts +5 -0
  497. package/src/styles.css +91 -42
  498. package/src/tools/annotate.ts +58 -29
  499. package/src/tools/chamfer.ts +103 -0
  500. package/src/tools/corner.ts +99 -0
  501. package/src/tools/dim.ts +524 -92
  502. package/src/tools/elevation.ts +1 -1
  503. package/src/tools/fillet.ts +82 -0
  504. package/src/tools/freehand.ts +20 -16
  505. package/src/tools/index.ts +17 -4
  506. package/src/tools/line.ts +59 -23
  507. package/src/tools/modify.ts +86 -24
  508. package/src/tools/openings.ts +8 -13
  509. package/src/tools/registry.ts +27 -2
  510. package/src/tools/select.ts +424 -75
  511. package/src/tools/shapes.ts +119 -58
  512. package/src/ui/ctx.ts +2 -1
  513. package/src/ui/domPorts.ts +23 -4
  514. package/src/ui/drawer.ts +6 -26
  515. package/src/ui/elevation.ts +10 -101
  516. package/src/ui/keypad.ts +8 -14
  517. package/src/ui/laser.ts +2 -2
  518. package/src/ui/menu.ts +63 -17
  519. package/src/ui/noteinput.ts +3 -3
  520. package/src/ui/opacity.ts +108 -0
  521. package/src/ui/palette.ts +67 -12
  522. package/src/ui/rail.ts +21 -7
  523. package/src/ui/topbar.ts +4 -14
  524. package/src/units/format.ts +18 -3
  525. package/src/view3d/build.ts +607 -0
  526. package/src/view3d/camera.ts +113 -0
  527. package/src/view3d/fatLines.ts +83 -0
  528. package/src/view3d/lines.ts +258 -0
  529. package/src/view3d/mesh.ts +111 -0
  530. package/src/view3d/poly.ts +104 -0
  531. package/src/view3d/viewer.ts +348 -0
  532. package/dist/react/ElevCanvas.native.d.ts +0 -3
  533. package/dist/react/ElevCanvas.native.js +0 -58
  534. package/dist/react/ElevCanvas.native.js.map +0 -1
  535. package/dist/react/ElevCanvas.web.d.ts +0 -4
  536. package/dist/react/ElevCanvas.web.js +0 -44
  537. package/dist/react/ElevCanvas.web.js.map +0 -1
  538. package/dist/react/ElevationSheet.d.ts +0 -2
  539. package/dist/react/ElevationSheet.js +0 -38
  540. package/dist/react/ElevationSheet.js.map +0 -1
  541. package/dist/render/elevationView.d.ts +0 -3
  542. package/dist/render/elevationView.js +0 -100
  543. package/dist/render/elevationView.js.map +0 -1
  544. package/src/react/ElevCanvas.native.tsx +0 -68
  545. package/src/react/ElevCanvas.web.tsx +0 -42
  546. package/src/react/ElevationSheet.tsx +0 -88
  547. package/src/render/elevationView.ts +0 -73
@@ -1,43 +1,70 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from 'react';
3
- import { Pressable, ScrollView, StyleSheet, Switch, Text, TextInput, View } from 'react-native';
4
- import { disarmReset, exportDxf, exportPdf, openProjectText, resetArmed, resetToDemo, saveProjectFile } from '../editor/files';
5
- import { NOTE_COLORS, setNoteColor } from '../editor/markup';
6
- import { setPreference, togglePreference } from '../editor/project';
7
- import { ed } from '../app/state';
3
+ import { Animated, Text, TextInput, View } from 'react-native';
4
+ import { disarmReset, exportDxf, exportPdf, importPagesText, openProjectText, resetArmed, resetToDemo, saveProjectFile } from '../editor/files';
5
+ import { editDefaultWallHeight, LAYER_ROWS, layerOn, setDefaultWallHeight, setPrecision, setPreference, setUnits, toggleLayer, togglePreference, WALL_PRESETS, } from '../editor/project';
6
+ import { page } from '../model/store';
7
+ import { fitView } from '../render/view';
8
+ import { command3d, is3d } from '../editor/view3dState';
9
+ import { fmtLen, followingHostUnits } from '../units';
8
10
  import { settings } from '../model/settings';
11
+ import { Toggle } from './Buttons';
12
+ import { FitScroll } from './FitScroll';
9
13
  import { pickTextFile } from './files';
10
- import { notify, ui } from './store';
14
+ import { editorVersion, notify, ui, useEditorKey } from './store';
11
15
  import { C, FONT, shadow } from './theme';
16
+ import { Segmented, Tap, usePopup } from './motion';
17
+ import { createSheet } from './corners';
12
18
  const closeMenu = () => { ui.menu = false; disarmReset(); notify(); };
13
19
  function MenuLink({ label, onPress, danger }) {
14
- return (_jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: label, onPress: onPress, style: s.link, children: _jsx(Text, { style: [s.linkText, danger && { color: C.softRed }], children: label }) }));
20
+ return (_jsx(Tap, { feel: "dim", accessibilityRole: "button", accessibilityLabel: label, onPress: onPress, style: s.link, children: _jsx(Text, { style: [s.linkText, danger && { color: C.softRed }], children: label }) }));
15
21
  }
16
22
  function Seg({ value, opts, onPick }) {
17
- return (_jsx(View, { style: s.seg, children: opts.map(([v, l]) => (_jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: l, accessibilityState: { selected: v === value }, onPress: () => onPick(v), style: [s.segBtn, v === value && { backgroundColor: '#fff' }], children: _jsx(Text, { style: [s.segText, v === value && { color: C.dark }], children: l }) }, String(v)))) }));
23
+ return _jsx(Segmented, { value: value, options: opts, onPick: onPick, style: s.seg, optionStyle: s.segBtn, textStyle: s.segText, onText: C.dark, offText: C.lg1 });
18
24
  }
19
25
  const MRow = ({ label, children }) => (_jsxs(View, { style: s.mrow, children: [_jsx(Text, { style: s.rowText, children: label }), children] }));
20
- /** Settings and files (the ••• button). `units` false: units come from the host (the person's BOLDR settings). */
21
- export function Menu({ units = true, devTools = true, themeChoice = true }) {
22
- if (!ui.menu)
23
- return null;
26
+ /**
27
+ * The top bar's menus: Layers, or ••• (on a phone Fit to screen, then exports, opening a file, settings). `accountUnits`: the host formats
28
+ * lengths (BOLDR: the person's account settings), offered as Units → Account beside the editor's own units.
29
+ */
30
+ export function Menu({ accountUnits = false, devTools = true, themeChoice = true, pickText = pickTextFile, readOnly = false, phone = false }) {
31
+ // (open only briefly: while it is, it follows every change)
32
+ useEditorKey(() => (ui.menu ? ui.menu + editorVersion() : ''));
33
+ // two menus in the one spot, each dropping down from its button (top right) and kept built once opened, so it opens
34
+ // at once the next time; one swapped for the other fades across
35
+ const more = usePopup(ui.menu === 'more', { y: -6 }, 'top right', true), layers = usePopup(ui.menu === 'layers', { y: -6 }, 'top right', true);
36
+ return (_jsxs(_Fragment, { children: [more.mounted && _jsx(MoreMenu, { open: ui.menu === 'more', style: more.style, accountUnits, devTools, themeChoice, pickText, readOnly, phone }), layers.mounted && _jsx(LayersMenu, { open: ui.menu === 'layers', style: layers.style })] }));
37
+ }
38
+ /** ••• : the exports, opening a file, and the settings. */
39
+ function MoreMenu({ open, style, accountUnits, devTools, themeChoice, pickText, readOnly, phone }) {
24
40
  const run = (fn) => () => { closeMenu(); fn(); };
25
- return (_jsx(View, { style: s.menu, accessibilityLabel: "Settings", testID: "menu", children: _jsxs(ScrollView, { children: [devTools && (_jsxs(_Fragment, { children: [_jsx(MenuLink, { label: "Save project to file\u2026", onPress: run(saveProjectFile) }), _jsx(MenuLink, { label: "Open project from file\u2026", onPress: run(() => { pickTextFile().then(t => { if (t != null)
26
- openProjectText(t); }); }) }), _jsx(View, { style: s.hr })] })), _jsx(MenuLink, { label: "Export page as PDF (.pdf)", onPress: run(exportPdf) }), _jsx(MenuLink, { label: "Export page as DXF (.dxf)", onPress: run(exportDxf) }), _jsx(View, { style: s.hr }), units && (_jsxs(_Fragment, { children: [_jsx(MRow, { label: "Units", children: _jsx(Seg, { value: settings.unit, opts: [['ftin', 'ft-in'], ['in', 'in'], ['mm', 'mm']], onPick: v => setPreference('unit', v) }) }), _jsx(MRow, { label: "Precision", children: _jsx(Seg, { value: settings.denom, opts: [[16, '1/16"'], [8, '1/8"'], [4, '1/4"']], onPick: v => setPreference('denom', v) }) })] })), _jsx(MRow, { label: "Wall height", children: _jsx(Seg, { value: settings.wallH, opts: [[96, "8'"], [108, "9'"], [120, "10'"]], onPick: v => setPreference('wallH', v) }) }), _jsx(MRow, { label: "Snap to grid", children: _jsx(Switch, { accessibilityLabel: "Snap to grid", value: settings.snapGrid, onValueChange: () => togglePreference('snapGrid'), trackColor: { true: C.blue, false: C.g3 }, thumbColor: "#fff" }) }), themeChoice && (_jsx(MRow, { label: "Theme", children: _jsx(Seg, { value: settings.theme, opts: [['system', 'Auto'], ['light', 'Light'], ['dark', 'Dark']], onPick: v => setPreference('theme', v) }) })), _jsx(MRow, { label: "Auto-constrain while drawing", children: _jsx(Switch, { accessibilityLabel: "Auto-constrain while drawing", value: settings.autoCons, onValueChange: () => togglePreference('autoCons'), trackColor: { true: C.blue, false: C.g3 }, thumbColor: "#fff" }) }), devTools && (_jsxs(_Fragment, { children: [_jsx(View, { style: s.hr }), _jsx(MenuLink, { danger: true, label: resetArmed() ? 'Tap again to reset — this clears your pages' : 'Reset to the demo project', onPress: () => { if (resetToDemo())
41
+ return (_jsx(Animated.View, { style: [s.menu, style], pointerEvents: open ? 'auto' : 'none', accessibilityLabel: "Settings", testID: open ? 'menu' : undefined, children: _jsxs(FitScroll, { children: [phone && _jsx(MenuLink, { label: "Fit to screen", onPress: run(() => (is3d() ? command3d('fit') : fitView())) }), _jsx(MenuLink, { label: "Export page as PDF (.pdf)", onPress: run(exportPdf) }), _jsx(MenuLink, { label: "Export page as DXF (.dxf)", onPress: run(exportDxf) }), _jsx(View, { style: s.hr }), !readOnly && (_jsxs(_Fragment, { children: [_jsx(MenuLink, { label: "Open file\u2026 (adds its pages)", onPress: run(() => { pickText().then(t => { if (t != null)
42
+ importPagesText(t); }, () => { }); }) }), _jsx(View, { style: s.hr })] })), devTools && (_jsxs(_Fragment, { children: [_jsx(MenuLink, { label: "Save project to file\u2026", onPress: run(saveProjectFile) }), _jsx(MenuLink, { label: "Open project from file\u2026", onPress: run(() => { pickTextFile().then(t => { if (t != null)
43
+ openProjectText(t); }); }) }), _jsx(View, { style: s.hr })] })), _jsx(MRow, { label: "Units", children: _jsx(Seg, { value: accountUnits && followingHostUnits() ? 'account' : settings.unit, opts: [...(accountUnits ? [['account', 'Account']] : []), ['ftin', 'ft-in'], ['in', 'in'], ['mm', 'mm']], onPick: setUnits }) }), !(accountUnits && followingHostUnits()) && settings.unit !== 'mm' && (_jsx(MRow, { label: "Precision", children: _jsx(Seg, { value: settings.denom, opts: [[16, '1/16"'], [8, '1/8"'], [4, '1/4"']], onPick: setPrecision }) })), _jsx(MRow, { label: "Wall height", children: _jsx(Seg, { value: WALL_PRESETS.includes(settings.wallH) ? settings.wallH : -1, opts: [[96, "8'"], [108, "9'"], [120, "10'"], [-1, WALL_PRESETS.includes(settings.wallH) ? 'Custom' : fmtLen(settings.wallH)]], onPick: v => { if (v === -1) {
44
+ closeMenu();
45
+ editDefaultWallHeight();
46
+ }
47
+ else if (setDefaultWallHeight(v))
48
+ notify(); } }) }), _jsx(MRow, { label: "Snap to grid", children: _jsx(Toggle, { label: "Snap to grid", value: settings.snapGrid, onChange: () => togglePreference('snapGrid') }) }), _jsx(MRow, { label: "Object snapping", children: _jsx(Toggle, { label: "Object snapping", value: layerOn('objSnap'), onChange: () => { toggleLayer('objSnap'); notify(); } }) }), themeChoice && (_jsx(MRow, { label: "Theme", children: _jsx(Seg, { value: settings.theme, opts: [['system', 'Auto'], ['light', 'Light'], ['dark', 'Dark']], onPick: v => setPreference('theme', v) }) })), _jsx(MRow, { label: "Auto-constrain while drawing", children: _jsx(Toggle, { label: "Auto-constrain while drawing", value: settings.autoCons, onChange: () => togglePreference('autoCons') }) }), _jsx(MRow, { label: "Tool tips", children: _jsx(Toggle, { label: "Tool tips", value: settings.toolTips !== false, onChange: () => { togglePreference('toolTips'); notify(); } }) }), devTools && (_jsxs(_Fragment, { children: [_jsx(View, { style: s.hr }), _jsx(MenuLink, { danger: true, label: resetArmed() ? 'Tap again to reset — this clears your pages' : 'Reset to the demo project', onPress: () => { if (resetToDemo())
27
49
  closeMenu();
28
50
  else
29
51
  notify(); } })] }))] }) }));
30
52
  }
31
- /** The markup colors (from the rail's color dot or the bar's Color). */
32
- export function Palette() {
33
- if (!ui.palette)
34
- return null;
35
- return (_jsx(View, { style: s.palette, testID: "palette", children: NOTE_COLORS.map(c => (_jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: 'Color ' + c, onPress: () => { setNoteColor(c); ui.palette = false; notify(); }, style: [s.swatch, { backgroundColor: c }, c === ed.noteColor && { borderColor: '#fff', borderWidth: 3 }] }, c))) }));
53
+ /** A layer's switch: its name, what it shows beneath, the toggle. */
54
+ function LayerRow({ label, sub, value, onChange }) {
55
+ return (_jsxs(View, { style: s.mrow, children: [_jsxs(View, { style: { flexShrink: 1 }, children: [_jsx(Text, { style: s.rowText, children: label }), sub ? _jsx(Text, { style: s.rowSub, children: sub }) : null] }), _jsx(Toggle, { label: label, value: value, onChange: onChange })] }));
56
+ }
57
+ /** The Layers menu: what's shown — the photos and plans under the drawing, then each layer. (An image's own lock, scale and
58
+ * opacity are in its bar when it's selected.) */
59
+ function LayersMenu({ open, style }) {
60
+ const ims = page().underlays, n = ims.length;
61
+ return (_jsx(Animated.View, { style: [s.menu, s.layers, style], pointerEvents: open ? 'auto' : 'none', accessibilityLabel: "Layers", testID: open ? 'layersMenu' : undefined, children: _jsxs(FitScroll, { children: [_jsx(LayerRow, { label: n > 1 ? 'Photos and plans' : 'Photo or plan underlay', sub: n > 1 ? n + ' images under the drawing' : n ? 'Traced image under the drawing' : 'None on this page', value: settings.layers.underlay, onChange: () => { toggleLayer('underlay'); notify(); } }), _jsx(View, { style: s.hr }), LAYER_ROWS.map(([k, label, sub]) => _jsx(LayerRow, { label: label, sub: sub, value: layerOn(k), onChange: () => { toggleLayer(k); notify(); } }, k))] }) }));
36
62
  }
37
63
  /** Typing a note where the text tool was tapped: Enter places it, Esc cancels, leaving the field places it too. */
38
64
  export function NoteInput() {
65
+ useEditorKey(() => (ui.note ? String(editorVersion()) : ''));
39
66
  const n = ui.note, [text, setText] = useState(''), ref = useRef(null), done = useRef(false);
40
- useEffect(() => { setText(''); done.current = false; if (n)
67
+ useEffect(() => { setText(n?.initial ?? ''); done.current = false; if (n)
41
68
  setTimeout(() => ref.current?.focus(), 30); }, [n]);
42
69
  if (!n)
43
70
  return null;
@@ -51,21 +78,21 @@ export function NoteInput() {
51
78
  if (commit && text.trim())
52
79
  cb(text.trim());
53
80
  };
54
- return (_jsx(TextInput, { ref: ref, accessibilityLabel: "Note text", placeholder: "Type a note, then Enter", placeholderTextColor: C.g4, value: text, onChangeText: setText, onSubmitEditing: () => finish(true), onBlur: () => finish(true), onKeyPress: e => { if (e.nativeEvent.key === 'Escape')
81
+ return (_jsx(TextInput, { ref: ref, accessibilityLabel: "Note text", selectTextOnFocus: !!n.initial, placeholder: "Type a note, then Enter", placeholderTextColor: C.g4, value: text, onChangeText: setText, onSubmitEditing: () => finish(true), onBlur: () => finish(true), onKeyPress: e => { if (e.nativeEvent.key === 'Escape')
55
82
  finish(false); }, style: [s.note, { left: n.x, top: n.y - 18 }] }));
56
83
  }
57
- const s = StyleSheet.create({
84
+ const s = createSheet({
58
85
  menu: { position: 'absolute', top: 66, right: 12, width: 320, maxHeight: '80%', backgroundColor: C.g1, borderRadius: 15, paddingVertical: 8, zIndex: 45, ...shadow },
59
86
  link: { paddingVertical: 10, paddingHorizontal: 16 },
60
87
  linkText: { fontFamily: FONT, fontSize: 14, color: '#fff' },
61
88
  hr: { height: 1, backgroundColor: C.g2, marginVertical: 6 },
62
89
  mrow: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', paddingVertical: 8, paddingHorizontal: 16, gap: 10 },
90
+ layers: { width: 340 },
91
+ rowSub: { fontFamily: FONT, fontSize: 12, color: C.g4, marginTop: 2 },
63
92
  rowText: { fontFamily: FONT, fontSize: 14, color: '#fff', flexShrink: 1 },
64
- seg: { flexDirection: 'row', backgroundColor: C.dark, borderRadius: 16, padding: 3 },
65
- segBtn: { paddingVertical: 5, paddingHorizontal: 10, borderRadius: 13 },
93
+ seg: { flexDirection: 'row', backgroundColor: C.dark, borderRadius: 999, padding: 3 },
94
+ segBtn: { paddingVertical: 5, paddingHorizontal: 10, borderRadius: 999 },
66
95
  segText: { fontFamily: FONT, fontSize: 12.5, fontWeight: '600', color: C.lg1 },
67
- palette: { position: 'absolute', left: 70, top: 300, flexDirection: 'row', gap: 8, backgroundColor: C.g1, borderRadius: 24, padding: 8, zIndex: 46, ...shadow },
68
- swatch: { width: 32, height: 32, borderRadius: 16, borderWidth: 2, borderColor: 'rgba(255,255,255,0.4)' },
69
96
  note: { position: 'absolute', zIndex: 40, minWidth: 220, height: 36, paddingHorizontal: 10, borderRadius: 8, backgroundColor: '#fff', color: C.dark, fontFamily: FONT, fontSize: 14, borderWidth: 2, borderColor: C.purple },
70
97
  });
71
98
  //# sourceMappingURL=Popovers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popovers.js","sourceRoot":"","sources":["../../src/react/Popovers.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC/H,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,SAAS,GAAG,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,GAAG,KA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AAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;IACzI,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;IACtB,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE;IACrE,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE;IACzE,GAAG,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE;IACrF,MAAM,EAAE,EAAE,eAAe,EAAE,CAAC,EAAE,iBAAiB,EAAE,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE;IACxE,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE;IAC9E,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;CAC7N,CAAC,CAAC"}
@@ -1,3 +1,27 @@
1
+ export interface TabletRail {
2
+ size: number;
3
+ gap: number;
4
+ div: number;
5
+ pad: number;
6
+ icon: number;
7
+ }
8
+ /**
9
+ * The room a tablet's rail is sized for: its room in landscape — what it has when held that way, and in portrait less
10
+ * the difference between the window's sides. From one layout (the window read with the room): the same either way the
11
+ * tablet is held, so the rail doesn't change as it's turned.
12
+ */
13
+ export declare function landscapeRoom(height: number, winW: number, winH: number): number;
14
+ /** The tablet rail for `height` of room: 44 pt buttons an eighth apart, tighter gaps then smaller to fit. */
15
+ export declare function tabletRailLayout(height: number, buttons: number, dividers: number): TabletRail;
16
+ /**
17
+ * Buttons and the space between them for a rail `height` tall: on a computer GAP apart, closer on a short screen, and
18
+ * on a shorter one still the buttons shrink to fit before it has to scroll. Phones keep the compact rail, scrolling
19
+ * when it must.
20
+ */
21
+ export declare function railLayout(height: number, buttons: number, dividers: number, phone: boolean): {
22
+ size: number;
23
+ gap: number;
24
+ };
1
25
  /** The tool rail on the left: the current mode's tools, toggles and actions. */
2
26
  export declare function Rail({ phone, onAddImage }: {
3
27
  phone: boolean;
@@ -1,47 +1,337 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Pressable, ScrollView, StyleSheet, View } from 'react-native';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { toolTip } from '../editor/tooltips';
3
+ import { notify, ui, useEditorKey } from './store';
4
+ import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
5
+ import { Animated, Dimensions, Platform, ScrollView, StyleSheet, View } from 'react-native';
3
6
  import { redo, undo } from '../app/edit';
4
7
  import { ed } from '../app/state';
5
- import { RAIL, toggleConstr } from '../editor/mode';
6
- import { openPalette, toast } from '../editor/ports';
8
+ import { groupTools, RAIL, railIcon, railItems, TOGGLES, TOOL_GROUPS, toolLabel } from '../editor/mode';
9
+ import { markupTarget } from '../editor/markup';
10
+ import { elevOpen } from '../editor/elevation';
11
+ import { openPalette } from '../editor/ports';
7
12
  import { setTool } from '../tools/registry';
13
+ import { addLinks, LINK_PLUS_LABEL, linkPlusVisible } from '../editor/linkActions';
14
+ import { canLink } from '../editor/links';
8
15
  import { hovered } from './Buttons';
9
16
  import { Icon } from './Icon';
10
17
  import { C, shadow } from './theme';
18
+ import { EASE, DURATION, Tap, TOGGLE_EASE, useEased } from './motion';
19
+ import { NATIVE } from './easing';
20
+ import { TweenView } from './Tween';
21
+ import { createSheet } from './corners';
22
+ /** A rail button's icon, fading from white to dark as it's selected (two icons, crossfaded). */
23
+ const RailIcon = memo(function RailIcon({ name, size, on }) {
24
+ const t = useEased(on), off = useMemo(() => t.interpolate({ inputRange: [0, 1], outputRange: [1, 0] }), [t]);
25
+ return (_jsxs(View, { style: { width: size, height: size }, children: [_jsx(Animated.View, { style: [StyleSheet.absoluteFill, { opacity: off }], children: _jsx(Icon, { name: name, size: size, color: "#fff" }) }), _jsx(Animated.View, { style: [StyleSheet.absoluteFill, { opacity: t }], children: _jsx(Icon, { name: name, size: size, color: C.dark }) })] }));
26
+ });
27
+ /**
28
+ * The selected tool's white disc: it glides from tool to tool (and fades when the tool isn't on the rail), moved by a
29
+ * transform so the glide runs on the native driver. Where it goes is worked out from the rail's own layout, not
30
+ * measured: a button that moves without changing size reports no new layout (react-native-web), which left the disc
31
+ * between buttons.
32
+ */
33
+ function useGlide(top) {
34
+ const y = useRef(new Animated.Value(0)).current, o = useRef(new Animated.Value(0)).current, seen = useRef(false);
35
+ useEffect(() => {
36
+ const go = (v, to) => Animated.timing(v, { toValue: to, duration: DURATION, easing: EASE, useNativeDriver: NATIVE }).start();
37
+ if (top == null) {
38
+ go(o, 0);
39
+ return;
40
+ }
41
+ if (!seen.current) {
42
+ y.setValue(top);
43
+ o.setValue(1);
44
+ seen.current = true;
45
+ return;
46
+ }
47
+ go(y, top);
48
+ go(o, 1);
49
+ }, [top]); // eslint-disable-line react-hooks/exhaustive-deps
50
+ return { y, o };
51
+ }
52
+ /**
53
+ * INSET: the space around the buttons, the same at the ends as at the sides, so the end buttons sit concentric in the
54
+ * pill. GAP: the space between buttons — kept, not spread to fill a tall screen (less only where the screen is short).
55
+ */
56
+ const BTN = 40, MIN_BTN = 32, DIV = 11, INSET = 6, PAD = 2 * INSET, GAP = 5;
57
+ /**
58
+ * On a tablet the rail is bigger than on a computer (44 pt buttons, easy to hit with a finger, the same eighth of a
59
+ * button apart) and keeps its proportions as it sizes: dividers, padding and icons follow the buttons. It's sized for
60
+ * the room it has in landscape and stays that size in portrait, so it looks the same whichever way the tablet is held:
61
+ * where landscape is short the space between buttons tightens first, to a twelfth of a button at least, and then the
62
+ * whole rail scales down — 44 pt buttons on a 13" iPad Pro, 41 pt on an 11" iPad, 36 pt on an iPad mini. A tablet's
63
+ * rail never scrolls: TABLET_MIN_BTN is below what the smallest iPad needs.
64
+ */
65
+ const TABLET_BTN = 44, TABLET_MIN_BTN = 30;
66
+ const PER_BTN = { gapMax: 0.12, gapMin: 0.08, div: 0.275, pad: (2 * INSET) / BTN, icon: 0.6 };
67
+ /**
68
+ * The room a tablet's rail is sized for: its room in landscape — what it has when held that way, and in portrait less
69
+ * the difference between the window's sides. From one layout (the window read with the room): the same either way the
70
+ * tablet is held, so the rail doesn't change as it's turned.
71
+ */
72
+ export function landscapeRoom(height, winW, winH) {
73
+ return height - Math.max(0, winH - Math.min(winW, winH));
74
+ }
75
+ /** The tablet rail for `height` of room: 44 pt buttons an eighth apart, tighter gaps then smaller to fit. */
76
+ export function tabletRailLayout(height, buttons, dividers) {
77
+ const spaces = buttons + dividers - 1;
78
+ // height per point of button size, before the gaps: the buttons, the dividers and the padding
79
+ const base = buttons + dividers * PER_BTN.div + PER_BTN.pad;
80
+ let size = TABLET_BTN, gap = PER_BTN.gapMax;
81
+ if (height) {
82
+ const room = height / TABLET_BTN - base; // what's left for gaps at full size, per point of button
83
+ if (room < spaces * PER_BTN.gapMax) {
84
+ gap = Math.max(PER_BTN.gapMin, room / spaces);
85
+ if (room < spaces * PER_BTN.gapMin)
86
+ size = Math.floor(height / (base + spaces * gap));
87
+ }
88
+ }
89
+ size = Math.max(TABLET_MIN_BTN, Math.min(TABLET_BTN, size));
90
+ return {
91
+ size,
92
+ gap: Math.round(size * gap),
93
+ div: Math.round(size * PER_BTN.div),
94
+ pad: Math.round(size * PER_BTN.pad),
95
+ icon: Math.round(size * PER_BTN.icon),
96
+ };
97
+ }
98
+ /**
99
+ * Buttons and the space between them for a rail `height` tall: on a computer GAP apart, closer on a short screen, and
100
+ * on a shorter one still the buttons shrink to fit before it has to scroll. Phones keep the compact rail, scrolling
101
+ * when it must.
102
+ */
103
+ export function railLayout(height, buttons, dividers, phone) {
104
+ if (phone || !height || buttons < 2)
105
+ return { size: BTN, gap: 0 };
106
+ const natural = buttons * BTN + dividers * DIV + PAD;
107
+ if (height < natural) {
108
+ return { size: Math.max(MIN_BTN, Math.floor((height - dividers * DIV - PAD) / buttons)), gap: 0 };
109
+ }
110
+ return { size: BTN, gap: Math.min(GAP, Math.floor((height - natural) / (buttons + dividers - 1))) };
111
+ }
112
+ /**
113
+ * The rail's room on a tablet or a computer: from 30 under the top bar's buttons (their 58) to 14 above the bottom.
114
+ * The rail hangs from the top of it, whatever its tools and whichever way a tablet is held: its first button (Select)
115
+ * never moves, and a shorter rail just ends sooner.
116
+ */
117
+ const RAIL_TOP = 58 + 30, RAIL_BOTTOM = 14;
118
+ /** How long the rail takes to change from one tool set to another (switching between Draft and Annotate). */
119
+ const MORPH = 240, FADE_OUT = 130, FADE_IN_AT = 70;
120
+ /** Annotate's + sits this far under the rail, as wide as the rail is. */
121
+ const PLUS_GAP = 10;
122
+ /** A value that follows `to`, easing to each new one (set at once the first time), on the native driver. */
123
+ function useMorphed(to) {
124
+ const v = useRef(new Animated.Value(to)).current;
125
+ useEffect(() => { Animated.timing(v, { toValue: to, duration: MORPH, easing: EASE, useNativeDriver: NATIVE }).start(); }, [to, v]);
126
+ return v;
127
+ }
128
+ /**
129
+ * One place on the rail. As the tool set changes it glides to where it now sits; a place new to this tool set fades
130
+ * (and grows a touch) in, and one that's gone fades out — so switching modes, the rail morphs rather than redraws.
131
+ * It moves by a transform, on the native driver.
132
+ */
133
+ const RailSlot = memo(function RailSlot(p) {
134
+ const top = useMorphed(p.y), vis = useRef(new Animated.Value(p.appear ? 0 : 1)).current;
135
+ const scale = useMemo(() => vis.interpolate({ inputRange: [0, 1], outputRange: [0.88, 1] }), [vis]);
136
+ // what goes clears quickly, and what comes fades in just behind it, so the two never sit on top of each other
137
+ useEffect(() => {
138
+ // (fades ease in and out: a fast start reads as a blink on something appearing or going)
139
+ Animated.timing(vis, p.leaving ? { toValue: 0, duration: FADE_OUT, easing: TOGGLE_EASE, useNativeDriver: NATIVE }
140
+ : { toValue: 1, duration: MORPH - FADE_IN_AT, delay: p.appear ? FADE_IN_AT : 0, easing: TOGGLE_EASE, useNativeDriver: NATIVE }).start();
141
+ }, [p.leaving, vis]); // eslint-disable-line react-hooks/exhaustive-deps
142
+ return (_jsx(Animated.View, { pointerEvents: p.leaving ? 'none' : 'box-none', "aria-hidden": p.leaving || undefined, style: [s.slot, { opacity: vis, transform: [{ translateY: top }, { scale }] }], children: p.id == null ? _jsx(View, { style: [s.div, { width: 28 * p.unit, marginVertical: (p.div - 1) / 2 }] }) : _jsx(RailEntry, { ...p }) }));
143
+ });
144
+ /**
145
+ * A tool, toggle or action on the rail, and what a press does. A place several tools share draws with the one it shows
146
+ * on a tap, and opens the menu of them all on a long press; with a mouse (a browser on a computer) a click opens the
147
+ * menu instead — a mouse has no long press to find. A browser on a phone or an iPad keeps the touch behaviour.
148
+ */
149
+ const MENU_ON_CLICK = Platform.OS === 'web' && typeof matchMedia === 'function' && matchMedia('(hover: hover) and (pointer: fine)').matches;
150
+ function RailEntry({ id, label, kind, tool, on, size, icon, unit, dot, menuX, menuY, onAddImage, leaving }) {
151
+ const group = kind === 'group';
152
+ const press = () => {
153
+ if (group && MENU_ON_CLICK) {
154
+ // a second click closes it again
155
+ if (ui.shapeMenu?.group === id) {
156
+ ui.shapeMenu = null;
157
+ notify();
158
+ }
159
+ else
160
+ openMenu();
161
+ return;
162
+ }
163
+ ui.shapeMenu = null;
164
+ if (kind === 'toggle')
165
+ TOGGLES[id]?.flip();
166
+ else if (kind === 'act') {
167
+ if (id === 'undo')
168
+ undo();
169
+ else if (id === 'redo')
170
+ redo();
171
+ else if (id === 'image')
172
+ onAddImage();
173
+ else if (id === 'color')
174
+ openPalette();
175
+ }
176
+ else
177
+ setTool(tool);
178
+ // what it does, in a line under the tabs (for a tool or a toggle; not Undo, a colour, an action)
179
+ const t = kind === 'act' ? null : toolTip(tool, label);
180
+ if (t)
181
+ ui.toolTip = { text: t, seq: (ui.toolTip?.seq ?? 0) + 1 };
182
+ notify();
183
+ };
184
+ // the menu of the place's tools, beside the rail level with it
185
+ const openMenu = () => {
186
+ setTool(tool);
187
+ ui.menu = false;
188
+ ui.palette = false;
189
+ ui.shapeMenu = { x: menuX, y: menuY, group: id };
190
+ notify();
191
+ };
192
+ return (_jsx(RailButton, { id: id, label: label, on: on, toggle: kind === 'toggle', size: size, onPress: press, testID: leaving ? undefined : 'tool-' + id, onLongPress: group ? openMenu : undefined, hint: group ? (MENU_ON_CLICK ? 'Opens the other shapes' : 'Touch and hold for the other shapes') : undefined, children: id === 'color'
193
+ ? _jsx(View, { style: [s.dot, { width: 20 * unit, height: 20 * unit, borderRadius: 10 * unit, backgroundColor: dot ?? undefined }] })
194
+ : _jsx(RailIcon, { name: railIcon(tool), size: icon, on: on }) }));
195
+ }
196
+ /** A rail item's place: a tool keeps its place across tool sets when it's the same tool (Select / Select markup). */
197
+ const slotKey = (it, divider) => (it === '|' ? 'd' + divider : it[0] === 'aselect' ? 'select' : it[0]);
11
198
  /** The tool rail on the left: the current mode's tools, toggles and actions. */
12
199
  export function Rail({ phone, onAddImage }) {
13
- const items = RAIL[ed.mode].filter(it => it === '|' || it[0] !== 'image' || onAddImage);
14
- return (_jsx(View, { style: [s.rail, phone && { top: 162 }], children: _jsx(ScrollView, { contentContainerStyle: s.inner, showsVerticalScrollIndicator: false, children: items.map((it, i) => {
15
- if (it === '|')
16
- return _jsx(View, { style: s.div }, 'd' + i);
17
- const [id, label, , kind] = it;
18
- const on = id === ed.tool || (id === 'constr' && ed.drawConstr);
19
- const press = () => {
20
- if (kind === 'toggle') {
21
- toggleConstr();
22
- toast(ed.drawConstr ? 'New lines are construction lines — guides that never make spaces.' : 'New lines are regular lines.');
23
- }
24
- else if (kind === 'act') {
25
- if (id === 'undo')
26
- undo();
27
- else if (id === 'redo')
28
- redo();
29
- else if (id === 'image')
30
- onAddImage?.();
31
- else if (id === 'color')
32
- openPalette();
33
- }
34
- else
35
- setTool(id);
36
- };
37
- return (_jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: label, accessibilityState: { selected: on }, testID: 'tool-' + id, onPress: press, style: st => [s.btn, on ? { backgroundColor: kind === 'toggle' ? C.lblue : '#fff' } : hovered(st) && { backgroundColor: 'rgba(255,255,255,0.08)' }], children: id === 'color' ? _jsx(View, { style: [s.dot, { backgroundColor: ed.noteColor }] }) : _jsx(Icon, { name: id, color: on ? C.dark : '#fff' }) }, id));
38
- }) }) }));
39
- }
40
- const s = StyleSheet.create({
41
- rail: { position: 'absolute', left: 12, top: 112, bottom: 84, zIndex: 22, alignItems: 'flex-start' },
42
- inner: { backgroundColor: C.g2, borderRadius: 30, paddingVertical: 8, paddingHorizontal: 6, alignItems: 'center', ...shadow },
200
+ // its tools (the mode's or the wall view's), the one in use, the toggles, the markup colour, the shape
201
+ useEditorKey(() => [ed.mode, elevOpen(), ed.tool, ed.drawConstr, ed.drawWalls, markupTarget().color, JSON.stringify(ui.picked), canLink(), linkPlusVisible()].join('|'));
202
+ // (shapes share one place: Annotate's always, Draft's on a phone, which has no room for each)
203
+ const usable = (list) => groupTools(list.filter(it => it === '|' || it[0] !== 'image' || onAddImage), phone);
204
+ const items = usable(railItems());
205
+ // the room it has, as last laid out, and the window it was laid out in — read at that same moment. A tablet turned
206
+ // changes the window at once and the room a layout later: the two taken together (a portrait room in a landscape
207
+ // window) shrank the rail to nothing and grew it back as it turned.
208
+ const [room, setRoom] = useState({ height: 0, y: 0, winW: 0, winH: 0 });
209
+ const { height, y: railY } = room;
210
+ // the tool a shared place draws with: the one in use, or the last picked
211
+ const pickedIn = (g) => (TOOL_GROUPS[g].tools.includes(ed.tool) ? ed.tool : ui.picked[g]);
212
+ const tablet = Platform.OS !== 'web' && !phone;
213
+ // a tablet's rail keeps its proportions as it sizes; elsewhere the 40 pt rail closes up or shrinks to fit
214
+ // the rail's room in landscape: the same as now when held that way; in portrait, less by the difference between the sides
215
+ const landscapeHeight = landscapeRoom(height, room.winW, room.winH);
216
+ const layoutOf = (list, less = 0) => {
217
+ const dividers = list.filter(it => it === '|').length, buttons = list.length - dividers;
218
+ return tablet ? tabletRailLayout(landscapeHeight - less, buttons, dividers) : { ...railLayout(height - less, buttons, dividers, phone), div: DIV, pad: PAD, icon: 24 };
219
+ };
220
+ const tightest = (ls) => ls.reduce((a, b) => (b.size < a.size || (b.size === a.size && b.gap < a.gap) ? b : a));
221
+ const lengthOf = (list, l) => list.reduce((h, it) => h + (it === '|' ? l.div : l.size) + l.gap, 0) - l.gap + 2 * INSET * (l.size / BTN);
222
+ const pillWidth = (l) => l.size + 2 * INSET * (l.size / BTN);
223
+ // one spacing for every tool set — the one the longest rail (Draft's) can fit — so a shorter rail is just shorter
224
+ let L = tightest([items, usable(RAIL.draft), usable(RAIL.annotate)].map(l => layoutOf(l)));
225
+ // with a host that links, Annotate's rail leaves room under it for the + — or, where even a smaller rail wouldn't
226
+ // (a short window), the + floats in the corner instead
227
+ let plusUnder = false;
228
+ if (!phone && canLink() && height > 0) {
229
+ const annotate = usable(RAIL.annotate), withPlus = tightest([L, layoutOf(annotate, PLUS_GAP + pillWidth(L))]);
230
+ if (lengthOf(annotate, withPlus) + PLUS_GAP + pillWidth(withPlus) <= height + 0.5) {
231
+ L = withPlus;
232
+ plusUnder = true;
233
+ }
234
+ }
235
+ const fab = !phone && canLink() && height > 0 && !plusUnder;
236
+ useEffect(() => { if (ui.linkFab !== fab) {
237
+ ui.linkFab = fab;
238
+ notify();
239
+ } }, [fab]);
240
+ const { size, gap, icon } = L, unit = size / BTN;
241
+ // where each item sits: the rail's top padding, then each button or divider above it and the gap after it
242
+ // (the space above the first button is the space beside it: the pill's ends are concentric with the end buttons)
243
+ const inset = INSET * unit;
244
+ let y = inset, dn = 0;
245
+ const placed = items.map(it => { const p = { key: slotKey(it, dn), y, it }; if (it === '|')
246
+ dn++; y += (it === '|' ? L.div : size) + gap; return p; });
247
+ const total = y - gap + inset, width = size + 2 * inset, radius = size / 2 + inset;
248
+ // what was on the rail and isn't now fades out where it was — worked out in this same render, so it never drops
249
+ // out for a frame before fading (that read as a flicker)
250
+ const prev = useRef(placed), leaving = useRef({ items: [], seq: 0 }), mounted = useRef(false);
251
+ const keys = placed.map(p => p.key).join(), [, rerender] = useState(0);
252
+ if (keys !== prev.current.map(p => p.key).join()) {
253
+ const now = new Set(placed.map(p => p.key));
254
+ const gone = [...prev.current.filter(p => !now.has(p.key)), ...leaving.current.items.filter(p => !now.has(p.key))];
255
+ leaving.current = { items: gone.filter((p, i) => gone.findIndex(q => q.key === p.key) === i), seq: leaving.current.seq + 1 };
256
+ prev.current = placed;
257
+ }
258
+ const seq = leaving.current.seq;
259
+ useEffect(() => {
260
+ if (!leaving.current.items.length)
261
+ return;
262
+ const t = setTimeout(() => { if (leaving.current.seq === seq) {
263
+ leaving.current = { items: [], seq };
264
+ rerender(n => n + 1);
265
+ } }, MORPH + 20);
266
+ return () => clearTimeout(t);
267
+ }, [seq]);
268
+ // (what's on the rail when it's first shown is just there; what comes later fades in)
269
+ useEffect(() => { if (height)
270
+ mounted.current = true; }, [height]);
271
+ const isOn = (id) => id === ed.tool || !!TOOL_GROUPS[id]?.tools.includes(ed.tool);
272
+ const sel = placed.find(p => p.it !== '|' && (!p.it[3] || p.it[3] === 'group') && isOn(p.it[0]));
273
+ const glide = useGlide(sel ? sel.y : null);
274
+ // (one function for every render, so the places' props stay equal: the host's own may be new each time)
275
+ const addImage = useRef(onAddImage);
276
+ addImage.current = onAddImage;
277
+ const onAdd = useCallback(() => addImage.current?.(), []);
278
+ /** A place's props: plain values only (see SlotProps). */
279
+ const slot = (p, isLeaving) => {
280
+ const common = { y: p.y, appear: !isLeaving && mounted.current, leaving: isLeaving, size, icon, unit, div: L.div, onAddImage: onAdd };
281
+ if (p.it === '|')
282
+ return { ...common, id: null, label: '', tool: '', on: false, dot: null, menuX: 0, menuY: 0 };
283
+ const [id, rawLabel, , kind] = p.it, group = kind === 'group';
284
+ // a shared place stands for the tool it'll draw with
285
+ const tool = group ? pickedIn(id) : id;
286
+ return {
287
+ ...common, id, kind, tool, label: group ? toolLabel(tool) : rawLabel,
288
+ on: !isLeaving && (kind === 'toggle' ? !!TOGGLES[id]?.on() : isOn(id)),
289
+ dot: id === 'color' ? markupTarget().color : null,
290
+ // (the rail's own place, plus where this sits on it)
291
+ menuX: group ? 12 + width + 10 : 0, menuY: group ? railY + p.y : 0,
292
+ };
293
+ };
294
+ return (_jsxs(View, { style: [s.rail, phone && { top: 162, bottom: 84 }], onLayout: e => {
295
+ const { height: h, y: top } = e.nativeEvent.layout, w = Dimensions.get('window');
296
+ setRoom({ height: h, y: top, winW: w.width, winH: w.height });
297
+ }, children: [height > 0 && _jsx(TweenView, { testID: "railPill", to: { height: total }, duration: MORPH, style: [s.inner, { width, maxHeight: '100%', borderRadius: radius }], children: _jsxs(ScrollView, { style: { flex: 1, borderRadius: radius }, contentContainerStyle: { height: total }, showsVerticalScrollIndicator: false, scrollEnabled: !!height && total > height + 1, bounces: false, children: [sel && _jsx(Animated.View, { pointerEvents: "none", style: [s.disc, { left: inset, width: size, height: size, borderRadius: size / 2, opacity: glide.o, transform: [{ translateY: glide.y }] }] }), leaving.current.items.map(p => _jsx(RailSlot, { ...slot(p, true) }, 'gone-' + p.key)), placed.map(p => _jsx(RailSlot, { ...slot(p, false) }, p.key))] }) }), height > 0 && plusUnder && _jsx(RailPlus, { top: Math.min(total, height) + PLUS_GAP, size: width, shown: linkPlusVisible() })] }));
298
+ }
299
+ /**
300
+ * Annotate's +, under the rail: picks the job's files and measurements to put on the plan. It follows the rail's end as
301
+ * the rail changes length, and fades in and out with Annotate's tools (all on the native driver).
302
+ */
303
+ const RailPlus = memo(function RailPlus({ top, size, shown }) {
304
+ const y = useMorphed(top), vis = useRef(new Animated.Value(shown ? 1 : 0)).current;
305
+ useEffect(() => {
306
+ Animated.timing(vis, shown ? { toValue: 1, duration: MORPH - FADE_IN_AT, delay: FADE_IN_AT, easing: TOGGLE_EASE, useNativeDriver: NATIVE }
307
+ : { toValue: 0, duration: FADE_OUT, easing: TOGGLE_EASE, useNativeDriver: NATIVE }).start();
308
+ }, [shown, vis]);
309
+ return (_jsx(Animated.View, { pointerEvents: shown ? 'box-none' : 'none', "aria-hidden": !shown || undefined, style: [s.plusAt, { opacity: vis, transform: [{ translateY: y }] }], children: _jsx(Tap, { accessibilityRole: "button", accessibilityLabel: LINK_PLUS_LABEL, testID: shown ? 'linkPlus' : undefined, onPress: () => { void addLinks(); }, style: [s.plus, { width: size, height: size, borderRadius: size / 2 }], children: _jsx(Icon, { name: "plus", size: Math.round(size * 0.5), color: C.dark }) }) }));
310
+ });
311
+ /**
312
+ * A rail button: a tool sits on the gliding disc when selected; a toggle fades its own blue in and out. One that opens
313
+ * a menu on a long press has a small nub on its right edge, pointing where the menu opens (as in BOLDR's annotation rail).
314
+ */
315
+ function RailButton({ id, label, on, toggle, size, onPress, onLongPress, hint, children, testID }) {
316
+ const t = useEased(on && toggle);
317
+ const fill = useMemo(() => t.interpolate({ inputRange: [0, 1], outputRange: ['rgba(80,166,255,0)', C.lblue] }), [t]);
318
+ return (_jsxs(Tap, { accessibilityRole: "button", accessibilityLabel: label, accessibilityHint: hint, accessibilityState: { selected: on }, "aria-pressed": toggle ? on : undefined, testID: testID, onPress: onPress, onLongPress: onLongPress, style: st => [s.btn, { width: size, height: size, borderRadius: size / 2 },
319
+ toggle && { backgroundColor: fill },
320
+ !on && hovered(st) && { backgroundColor: 'rgba(255,255,255,0.08)' }], children: [children, onLongPress && _jsx(View, { pointerEvents: "none", style: [s.nub, { top: size / 2 - 4 }, on && { borderLeftColor: C.dark }] })] }));
321
+ }
322
+ const s = createSheet({
323
+ // (both moved by a transform from the top: see useGlide, RailSlot)
324
+ disc: { position: 'absolute', top: 0, backgroundColor: '#fff' },
325
+ rail: { position: 'absolute', left: 12, top: RAIL_TOP, bottom: RAIL_BOTTOM, zIndex: 22, alignItems: 'flex-start' },
326
+ inner: { backgroundColor: C.g2, ...shadow },
327
+ slot: { position: 'absolute', top: 0, left: 0, right: 0, alignItems: 'center' },
43
328
  btn: { width: 40, height: 40, borderRadius: 20, alignItems: 'center', justifyContent: 'center' },
44
329
  div: { width: 28, height: 1, backgroundColor: C.g3, marginVertical: 5 },
330
+ // a right-pointing triangle, 8 tall, hugging the right edge
331
+ nub: { position: 'absolute', right: 3, width: 0, height: 0, borderTopWidth: 4, borderBottomWidth: 4, borderLeftWidth: 5, borderTopColor: 'transparent', borderBottomColor: 'transparent', borderLeftColor: 'rgba(255,255,255,0.75)' },
45
332
  dot: { width: 20, height: 20, borderRadius: 10, borderWidth: 2, borderColor: 'rgba(255,255,255,0.85)' },
333
+ // (moved by a transform from the rail's top: see RailPlus)
334
+ plusAt: { position: 'absolute', top: 0, left: 0 },
335
+ plus: { backgroundColor: C.yellow, alignItems: 'center', justifyContent: 'center', ...shadow },
46
336
  });
47
337
  //# sourceMappingURL=Rail.js.map