@classcad/react-cad 0.0.0-stage → 3.0.0-beta.20261119100608

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 (471) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +98 -2
  3. package/build/components/UI/CAD/Constraints.d.ts +30 -0
  4. package/build/components/UI/CAD/Drawing.d.ts +83 -0
  5. package/build/components/UI/CAD/ListPlaceholder.d.ts +3 -0
  6. package/build/components/UI/CAD/Messages/Message.d.ts +8 -0
  7. package/build/components/UI/CAD/Messages/Messages.d.ts +43 -0
  8. package/build/components/UI/CAD/Messages/index.d.ts +1 -0
  9. package/build/components/UI/CAD/Messages/msgStore.d.ts +18 -0
  10. package/build/components/UI/CAD/ModelTree/AssemblyNode.d.ts +5 -0
  11. package/build/components/UI/CAD/ModelTree/FeatureList/Feature.d.ts +8 -0
  12. package/build/components/UI/CAD/ModelTree/FeatureList/FeatureList.d.ts +6 -0
  13. package/build/components/UI/CAD/ModelTree/FeatureList/index.d.ts +1 -0
  14. package/build/components/UI/CAD/ModelTree/FeatureList/utils.d.ts +26 -0
  15. package/build/components/UI/CAD/ModelTree/ModelTree.d.ts +56 -0
  16. package/build/components/UI/CAD/ModelTree/ModelTreeHeader.d.ts +15 -0
  17. package/build/components/UI/CAD/ModelTree/index.d.ts +1 -0
  18. package/build/components/UI/CAD/ModelTree/primitives.d.ts +6 -0
  19. package/build/components/UI/CAD/ModelTree/useContextMenuItems.d.ts +4 -0
  20. package/build/components/UI/CAD/PluginBounds.d.ts +8 -0
  21. package/build/components/UI/CAD/PluginTooltip.d.ts +5 -0
  22. package/build/components/UI/CAD/PluginsWindows.d.ts +99 -0
  23. package/build/components/UI/CAD/ReadOnlyContext.d.ts +10 -0
  24. package/build/components/UI/CAD/SideBar.d.ts +40 -0
  25. package/build/components/UI/CAD/Solids/Solids.d.ts +23 -0
  26. package/build/components/UI/CAD/Solids/index.d.ts +1 -0
  27. package/build/components/UI/CAD/Solids/useContextMenuItems.d.ts +4 -0
  28. package/build/components/UI/CAD/Solids/useVisibleSolids.d.ts +30 -0
  29. package/build/components/UI/CAD/StageHud.d.ts +9 -0
  30. package/build/components/UI/CAD/StatusBar.d.ts +11 -0
  31. package/build/components/UI/CAD/ThemeToggle.d.ts +25 -0
  32. package/build/components/UI/CAD/ToolBar/AssemblyModeCmds.d.ts +3 -0
  33. package/build/components/UI/CAD/ToolBar/PartModeCmds.d.ts +3 -0
  34. package/build/components/UI/CAD/ToolBar/ToolBar.d.ts +24 -0
  35. package/build/components/UI/CAD/ToolBar/index.d.ts +1 -0
  36. package/build/components/UI/CAD/ToolBar/useCommands.d.ts +12 -0
  37. package/build/components/UI/CAD/ViewOptionsBar/ViewOptionButtons.d.ts +30 -0
  38. package/build/components/UI/CAD/ViewOptionsBar/useOptionCommands.d.ts +65 -0
  39. package/build/components/UI/CAD/ViewPlugButtons.d.ts +43 -0
  40. package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModal.d.ts +18 -0
  41. package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModalContext.d.ts +9 -0
  42. package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModalInner.d.ts +27 -0
  43. package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModalProvider.d.ts +4 -0
  44. package/build/components/UI/CAD/ant-design-draggable-modal/OverlayScrollbar.d.ts +6 -0
  45. package/build/components/UI/CAD/ant-design-draggable-modal/ResizeHandle.d.ts +2 -0
  46. package/build/components/UI/CAD/ant-design-draggable-modal/clamp.d.ts +1 -0
  47. package/build/components/UI/CAD/ant-design-draggable-modal/draggableModalReducer.d.ts +123 -0
  48. package/build/components/UI/CAD/ant-design-draggable-modal/getWindowSize.d.ts +4 -0
  49. package/build/components/UI/CAD/ant-design-draggable-modal/index.d.ts +3 -0
  50. package/build/components/UI/CAD/ant-design-draggable-modal/useDrag.d.ts +5 -0
  51. package/build/components/UI/CAD/ant-design-draggable-modal/usePrevious.d.ts +1 -0
  52. package/build/components/UI/CAD/ant-design-draggable-modal/useResize.d.ts +7 -0
  53. package/build/components/UI/CAD/common/BlankDiv.d.ts +3 -0
  54. package/build/components/UI/CAD/common/Collapse.d.ts +13 -0
  55. package/build/components/UI/CAD/common/ContextMenu.d.ts +115 -0
  56. package/build/components/UI/CAD/common/Divider.d.ts +4 -0
  57. package/build/components/UI/CAD/common/EntityName.d.ts +14 -0
  58. package/build/components/UI/CAD/common/Img.d.ts +6 -0
  59. package/build/components/UI/CAD/common/LoadingScreen/LoadingScreen.d.ts +8 -0
  60. package/build/components/UI/CAD/common/LoadingScreen/Spinner.d.ts +3 -0
  61. package/build/components/UI/CAD/common/LoadingScreen/index.d.ts +1 -0
  62. package/build/components/UI/CAD/common/Menu.d.ts +81 -0
  63. package/build/components/UI/CAD/common/MultiSelect.d.ts +12 -0
  64. package/build/components/UI/CAD/common/NameEdit.d.ts +7 -0
  65. package/build/components/UI/CAD/common/SectionHeader.d.ts +9 -0
  66. package/build/components/UI/CAD/common/primitives.d.ts +36 -0
  67. package/build/components/UI/CAD/common/reveal.d.ts +12 -0
  68. package/build/components/UI/CAD/hooks/index.d.ts +13 -0
  69. package/build/components/UI/CAD/hooks/useContextMenuInteraction.d.ts +7 -0
  70. package/build/components/UI/CAD/hooks/useContextMenuItems.d.ts +4 -0
  71. package/build/components/UI/CAD/hooks/useCurrentInstance.d.ts +2 -0
  72. package/build/components/UI/CAD/hooks/useCurrentProduct.d.ts +2 -0
  73. package/build/components/UI/CAD/hooks/useEditMode.d.ts +40 -0
  74. package/build/components/UI/CAD/hooks/useFeatureCount.d.ts +6 -0
  75. package/build/components/UI/CAD/hooks/useGlobalMateInfo.d.ts +6 -0
  76. package/build/components/UI/CAD/hooks/useHasPending.d.ts +27 -0
  77. package/build/components/UI/CAD/hooks/useIsDisabled.d.ts +2 -0
  78. package/build/components/UI/CAD/hooks/useIsLoading.d.ts +25 -0
  79. package/build/components/UI/CAD/hooks/useIsSketchActive.d.ts +26 -0
  80. package/build/components/UI/CAD/hooks/useObjectDetails.d.ts +12 -0
  81. package/build/components/UI/CAD/hooks/useOperationSequence.d.ts +29 -0
  82. package/build/components/UI/CAD/hooks/useRollbackBar.d.ts +8 -0
  83. package/build/components/UI/CAD/hooks/useRoot.d.ts +2 -0
  84. package/build/components/UI/CAD/index.d.ts +27 -0
  85. package/build/components/UI/CAD/plugins/ProductManagement/ProdTable.d.ts +10 -0
  86. package/build/components/UI/CAD/plugins/ProductManagement/Root.d.ts +11 -0
  87. package/build/components/UI/CAD/plugins/ProductManagement/View.d.ts +11 -0
  88. package/build/components/UI/CAD/plugins/ProductManagement/index.d.ts +34 -0
  89. package/build/components/UI/CAD/plugins/ProductManagement/types.d.ts +4 -0
  90. package/build/components/UI/CAD/plugins/ProductManagement/useContextMenuItems.d.ts +4 -0
  91. package/build/components/UI/CAD/plugins/SessionManagement/Root.d.ts +11 -0
  92. package/build/components/UI/CAD/plugins/SessionManagement/index.d.ts +36 -0
  93. package/build/components/UI/CAD/plugins/SessionManagement/types.d.ts +3 -0
  94. package/build/components/UI/CAD/store/CADActions.d.ts +29 -0
  95. package/build/components/UI/CAD/store/CADStore.d.ts +68 -0
  96. package/build/components/UI/CAD/store/instances.d.ts +7 -0
  97. package/build/components/UI/Readfile.d.ts +39 -0
  98. package/build/components/UI/ThemeVars.d.ts +6 -0
  99. package/build/components/UI/editors/BooleanEditor/BooleanEditor.d.ts +8 -0
  100. package/build/components/UI/editors/BooleanEditor/index.d.ts +2 -0
  101. package/build/components/UI/editors/BooleanEditor/useBoolParam.d.ts +3 -0
  102. package/build/components/UI/editors/CSysEditor/CSysEditor.d.ts +11 -0
  103. package/build/components/UI/editors/CSysEditor/index.d.ts +2 -0
  104. package/build/components/UI/editors/CSysEditor/useCSysParam.d.ts +9 -0
  105. package/build/components/UI/editors/ColorEditor/ColorEditor.d.ts +12 -0
  106. package/build/components/UI/editors/ColorEditor/index.d.ts +2 -0
  107. package/build/components/UI/editors/ColorEditor/useColorParam.d.ts +9 -0
  108. package/build/components/UI/editors/ExpressionEditor/ExpressionEditor.d.ts +20 -0
  109. package/build/components/UI/editors/ExpressionEditor/index.d.ts +2 -0
  110. package/build/components/UI/editors/ExpressionEditor/useExpressionsParam.d.ts +5 -0
  111. package/build/components/UI/editors/NumberEditor/Inputs.d.ts +18 -0
  112. package/build/components/UI/editors/NumberEditor/Mentions.d.ts +10 -0
  113. package/build/components/UI/editors/NumberEditor/NumOrExpr.d.ts +12 -0
  114. package/build/components/UI/editors/NumberEditor/NumberEditor.d.ts +12 -0
  115. package/build/components/UI/editors/NumberEditor/index.d.ts +2 -0
  116. package/build/components/UI/editors/NumberEditor/useNumParam.d.ts +5 -0
  117. package/build/components/UI/editors/PointEditor/PointEditor.d.ts +10 -0
  118. package/build/components/UI/editors/PointEditor/index.d.ts +2 -0
  119. package/build/components/UI/editors/PointEditor/usePointParam.d.ts +5 -0
  120. package/build/components/UI/editors/RefsEditors/ChainFinder.d.ts +12 -0
  121. package/build/components/UI/editors/RefsEditors/MateEditor.d.ts +13 -0
  122. package/build/components/UI/editors/RefsEditors/MateOrientationEditor.d.ts +9 -0
  123. package/build/components/UI/editors/RefsEditors/RefEditor.d.ts +24 -0
  124. package/build/components/UI/editors/RefsEditors/RefsEditor.d.ts +16 -0
  125. package/build/components/UI/editors/RefsEditors/index.d.ts +8 -0
  126. package/build/components/UI/editors/RefsEditors/pickers.d.ts +4 -0
  127. package/build/components/UI/editors/RefsEditors/useIdParam.d.ts +3 -0
  128. package/build/components/UI/editors/RefsEditors/useMateParam.d.ts +19 -0
  129. package/build/components/UI/editors/RefsEditors/useModes.d.ts +11 -0
  130. package/build/components/UI/editors/RefsEditors/useRefsParam.d.ts +3 -0
  131. package/build/components/UI/editors/RefsEditors/useSelectedItems.d.ts +18 -0
  132. package/build/components/UI/editors/ToleranceEditor/ToleranceEditor.d.ts +7 -0
  133. package/build/components/UI/editors/ToleranceEditor/index.d.ts +2 -0
  134. package/build/components/UI/editors/ToleranceEditor/useToleranceParam.d.ts +3 -0
  135. package/build/components/UI/editors/TypeEditor/TypeEditor.d.ts +10 -0
  136. package/build/components/UI/editors/TypeEditor/index.d.ts +2 -0
  137. package/build/components/UI/editors/TypeEditor/useTypeParam.d.ts +3 -0
  138. package/build/components/UI/editors/TypeWrapper.d.ts +6 -0
  139. package/build/components/UI/editors/Wrapper.d.ts +16 -0
  140. package/build/components/UI/editors/useParam.d.ts +20 -0
  141. package/build/components/UI/editors/useValidation.d.ts +4 -0
  142. package/build/components/graphics/Badge.d.ts +70 -0
  143. package/build/components/graphics/CSysDisplay.d.ts +108 -0
  144. package/build/components/graphics/CompositeCurveObj.d.ts +33 -0
  145. package/build/components/graphics/GeometryOverrides/GeometryOverridesManager.d.ts +41 -0
  146. package/build/components/graphics/GeometryOverrides/GeometryOverridesStore.d.ts +28 -0
  147. package/build/components/graphics/GeometryOverrides/index.d.ts +2 -0
  148. package/build/components/graphics/GeometryOverrides/useOverrideGeometryColor.d.ts +36 -0
  149. package/build/components/graphics/HUD.d.ts +44 -0
  150. package/build/components/graphics/HoveredConstraintDisplay.d.ts +24 -0
  151. package/build/components/graphics/InfinityPlane.d.ts +4 -0
  152. package/build/components/graphics/Outlines/AAPass.d.ts +8 -0
  153. package/build/components/graphics/Outlines/IDPass.d.ts +12 -0
  154. package/build/components/graphics/Outlines/Outline.d.ts +62 -0
  155. package/build/components/graphics/Outlines/OutlineEffect.d.ts +48 -0
  156. package/build/components/graphics/Outlines/OutlineMaterial.d.ts +9 -0
  157. package/build/components/graphics/Outlines/WidenPass.d.ts +17 -0
  158. package/build/components/graphics/PluginGeometryBounds.d.ts +40 -0
  159. package/build/components/graphics/SelectableMate.d.ts +3 -0
  160. package/build/components/graphics/SelectedMateObj.d.ts +54 -0
  161. package/build/components/graphics/StageLook.d.ts +51 -0
  162. package/build/components/graphics/WorkAxisObj.d.ts +33 -0
  163. package/build/components/graphics/WorkCSysObj.d.ts +33 -0
  164. package/build/components/graphics/WorkCoordSystemObj.d.ts +32 -0
  165. package/build/components/graphics/WorkPlaneObj.d.ts +33 -0
  166. package/build/components/graphics/WorkPointObj.d.ts +57 -0
  167. package/build/components/graphics/graphics.d.ts +61 -0
  168. package/build/components/graphics/utils/MatePathTransform.d.ts +10 -0
  169. package/build/components/graphics/utils/useCsysMatrix.d.ts +4 -0
  170. package/build/components/utils/CompValidation/ErrorBoundary.d.ts +28 -0
  171. package/build/components/utils/CompValidation/validators/CSysDisplayValidator.d.ts +12 -0
  172. package/build/components/utils/CompValidation/validators/DrawingValidator.d.ts +12 -0
  173. package/build/components/utils/CompValidation/validators/ExpressionsValidator.d.ts +12 -0
  174. package/build/components/utils/CompValidation/validators/FPluginValidator.d.ts +16 -0
  175. package/build/components/utils/CompValidation/validators/FeatureListValidator.d.ts +12 -0
  176. package/build/components/utils/CompValidation/validators/ProductManagementValidator.d.ts +14 -0
  177. package/build/components/utils/CompValidation/verifiers.d.ts +32 -0
  178. package/build/components/utils/FtVisibilityController.d.ts +26 -0
  179. package/build/elements/index.d.ts +162 -0
  180. package/build/icons/axes.d.ts +73 -0
  181. package/build/icons/draw.d.ts +75 -0
  182. package/build/icons/features.d.ts +71 -0
  183. package/build/icons/glyphs.d.ts +10 -0
  184. package/build/icons/index.d.ts +152 -0
  185. package/build/icons/legacy.d.ts +159 -0
  186. package/build/icons/mates.d.ts +26 -0
  187. package/build/icons/params.d.ts +77 -0
  188. package/build/icons/refs.d.ts +61 -0
  189. package/build/icons/sheets.d.ts +302 -0
  190. package/build/icons/sketch.d.ts +102 -0
  191. package/build/icons/types.d.ts +74 -0
  192. package/build/icons/ui.d.ts +114 -0
  193. package/build/icons.cjs.js +1751 -0
  194. package/build/icons.js +1742 -0
  195. package/build/index.cjs.js +44948 -0
  196. package/build/index.d.ts +115 -0
  197. package/build/index.js +44800 -0
  198. package/build/plugins/AppearanceEditor/Root.d.ts +12 -0
  199. package/build/plugins/AppearanceEditor/index.d.ts +42 -0
  200. package/build/plugins/Boolean/Root.d.ts +11 -0
  201. package/build/plugins/Boolean/index.d.ts +39 -0
  202. package/build/plugins/BoundingBoxInfo/Root.d.ts +12 -0
  203. package/build/plugins/BoundingBoxInfo/View.d.ts +11 -0
  204. package/build/plugins/BoundingBoxInfo/index.d.ts +35 -0
  205. package/build/plugins/Box/Root.d.ts +11 -0
  206. package/build/plugins/Box/index.d.ts +34 -0
  207. package/build/plugins/Chamfer/Root.d.ts +11 -0
  208. package/build/plugins/Chamfer/index.d.ts +35 -0
  209. package/build/plugins/CircularPattern/Root.d.ts +11 -0
  210. package/build/plugins/CircularPattern/index.d.ts +35 -0
  211. package/build/plugins/CompositeCurve/Root.d.ts +11 -0
  212. package/build/plugins/CompositeCurve/View.d.ts +11 -0
  213. package/build/plugins/CompositeCurve/index.d.ts +36 -0
  214. package/build/plugins/Cone/Root.d.ts +11 -0
  215. package/build/plugins/Cone/index.d.ts +36 -0
  216. package/build/plugins/Cylinder/Root.d.ts +11 -0
  217. package/build/plugins/Cylinder/index.d.ts +35 -0
  218. package/build/plugins/Dimensions/DimContext.d.ts +10 -0
  219. package/build/plugins/Dimensions/Root.d.ts +11 -0
  220. package/build/plugins/Dimensions/View.d.ts +11 -0
  221. package/build/plugins/Dimensions/graphics/DimGraphics.d.ts +7 -0
  222. package/build/plugins/Dimensions/graphics/DimensionSet.d.ts +8 -0
  223. package/build/plugins/Dimensions/graphics/primitives.d.ts +34 -0
  224. package/build/plugins/Dimensions/index.d.ts +34 -0
  225. package/build/plugins/Dimensions/utils.d.ts +5 -0
  226. package/build/plugins/EntityDeletion/Root.d.ts +11 -0
  227. package/build/plugins/EntityDeletion/index.d.ts +34 -0
  228. package/build/plugins/Expressions/Root.d.ts +11 -0
  229. package/build/plugins/Expressions/index.d.ts +34 -0
  230. package/build/plugins/Expressions/useContextMenuItems.d.ts +4 -0
  231. package/build/plugins/Extrusion/Root.d.ts +11 -0
  232. package/build/plugins/Extrusion/View.d.ts +11 -0
  233. package/build/plugins/Extrusion/index.d.ts +50 -0
  234. package/build/plugins/Fillet/Root.d.ts +11 -0
  235. package/build/plugins/Fillet/index.d.ts +35 -0
  236. package/build/plugins/HLConstraints/CircularPattern/Root.d.ts +11 -0
  237. package/build/plugins/HLConstraints/CircularPattern/View.d.ts +11 -0
  238. package/build/plugins/HLConstraints/CircularPattern/index.d.ts +38 -0
  239. package/build/plugins/HLConstraints/Cylindrical/Root.d.ts +11 -0
  240. package/build/plugins/HLConstraints/Cylindrical/View.d.ts +11 -0
  241. package/build/plugins/HLConstraints/Cylindrical/index.d.ts +37 -0
  242. package/build/plugins/HLConstraints/Fastened/Root.d.ts +11 -0
  243. package/build/plugins/HLConstraints/Fastened/View.d.ts +11 -0
  244. package/build/plugins/HLConstraints/Fastened/index.d.ts +37 -0
  245. package/build/plugins/HLConstraints/FastenedOrigin/Root.d.ts +11 -0
  246. package/build/plugins/HLConstraints/FastenedOrigin/View.d.ts +11 -0
  247. package/build/plugins/HLConstraints/FastenedOrigin/index.d.ts +37 -0
  248. package/build/plugins/HLConstraints/Gear/Root.d.ts +11 -0
  249. package/build/plugins/HLConstraints/Gear/View.d.ts +11 -0
  250. package/build/plugins/HLConstraints/Gear/index.d.ts +36 -0
  251. package/build/plugins/HLConstraints/Group/Root.d.ts +11 -0
  252. package/build/plugins/HLConstraints/Group/index.d.ts +34 -0
  253. package/build/plugins/HLConstraints/LinearPattern/Root.d.ts +11 -0
  254. package/build/plugins/HLConstraints/LinearPattern/View.d.ts +11 -0
  255. package/build/plugins/HLConstraints/LinearPattern/index.d.ts +38 -0
  256. package/build/plugins/HLConstraints/Parallel/Root.d.ts +11 -0
  257. package/build/plugins/HLConstraints/Parallel/View.d.ts +11 -0
  258. package/build/plugins/HLConstraints/Parallel/index.d.ts +37 -0
  259. package/build/plugins/HLConstraints/Planar/Root.d.ts +11 -0
  260. package/build/plugins/HLConstraints/Planar/View.d.ts +11 -0
  261. package/build/plugins/HLConstraints/Planar/index.d.ts +37 -0
  262. package/build/plugins/HLConstraints/Revolute/Root.d.ts +11 -0
  263. package/build/plugins/HLConstraints/Revolute/View.d.ts +11 -0
  264. package/build/plugins/HLConstraints/Revolute/index.d.ts +37 -0
  265. package/build/plugins/HLConstraints/Slider/Root.d.ts +11 -0
  266. package/build/plugins/HLConstraints/Slider/View.d.ts +11 -0
  267. package/build/plugins/HLConstraints/Slider/index.d.ts +37 -0
  268. package/build/plugins/HLConstraints/Spherical/Root.d.ts +11 -0
  269. package/build/plugins/HLConstraints/Spherical/View.d.ts +11 -0
  270. package/build/plugins/HLConstraints/Spherical/index.d.ts +36 -0
  271. package/build/plugins/HLConstraints/components/CSysDisplayWrapper.d.ts +7 -0
  272. package/build/plugins/HLConstraints/components/HLConstrIcon.d.ts +7 -0
  273. package/build/plugins/HLConstraints/components/LimitedValue.d.ts +12 -0
  274. package/build/plugins/HLConstraints/components/Limits.d.ts +25 -0
  275. package/build/plugins/HLConstraints/components/LimitsCollapse.d.ts +12 -0
  276. package/build/plugins/HLConstraints/validators.d.ts +2 -0
  277. package/build/plugins/Import/Root.d.ts +11 -0
  278. package/build/plugins/Import/index.d.ts +35 -0
  279. package/build/plugins/LinearPattern/Root.d.ts +11 -0
  280. package/build/plugins/LinearPattern/index.d.ts +36 -0
  281. package/build/plugins/Measure/Digits.d.ts +7 -0
  282. package/build/plugins/Measure/Root.d.ts +11 -0
  283. package/build/plugins/Measure/View.d.ts +15 -0
  284. package/build/plugins/Measure/config.d.ts +1 -0
  285. package/build/plugins/Measure/graphics/MeasureGraphics.d.ts +24 -0
  286. package/build/plugins/Measure/index.d.ts +39 -0
  287. package/build/plugins/Measure/utils.d.ts +2 -0
  288. package/build/plugins/Mirror/Root.d.ts +11 -0
  289. package/build/plugins/Mirror/index.d.ts +34 -0
  290. package/build/plugins/Revolve/Root.d.ts +11 -0
  291. package/build/plugins/Revolve/index.d.ts +37 -0
  292. package/build/plugins/Rotate/Root.d.ts +11 -0
  293. package/build/plugins/Rotate/index.d.ts +35 -0
  294. package/build/plugins/Sketch/Root/Constraints/Constraints.d.ts +2 -0
  295. package/build/plugins/Sketch/Root/Constraints/constraintsHelpers.d.ts +22 -0
  296. package/build/plugins/Sketch/Root/Constraints/index.d.ts +2 -0
  297. package/build/plugins/Sketch/Root/Constraints/utils.d.ts +6 -0
  298. package/build/plugins/Sketch/Root/CopyPatterns.d.ts +2 -0
  299. package/build/plugins/Sketch/Root/Details.d.ts +2 -0
  300. package/build/plugins/Sketch/Root/Handlers.d.ts +2 -0
  301. package/build/plugins/Sketch/Root/PlaneSelection.d.ts +7 -0
  302. package/build/plugins/Sketch/Root/Position.d.ts +2 -0
  303. package/build/plugins/Sketch/Root/Regions.d.ts +2 -0
  304. package/build/plugins/Sketch/Root/Root.d.ts +11 -0
  305. package/build/plugins/Sketch/Root/RootContext.d.ts +7 -0
  306. package/build/plugins/Sketch/Root/SketchGroup.d.ts +15 -0
  307. package/build/plugins/Sketch/Root/index.d.ts +1 -0
  308. package/build/plugins/Sketch/Root/useContextMenuItems.d.ts +4 -0
  309. package/build/plugins/Sketch/Root/useLayoutSize.d.ts +11 -0
  310. package/build/plugins/Sketch/View/View.d.ts +11 -0
  311. package/build/plugins/Sketch/View/ViewContext.d.ts +8 -0
  312. package/build/plugins/Sketch/View/graphics/Constraints.d.ts +5 -0
  313. package/build/plugins/Sketch/View/graphics/IconGroups.d.ts +7 -0
  314. package/build/plugins/Sketch/View/graphics/Merged/Arc.d.ts +20 -0
  315. package/build/plugins/Sketch/View/graphics/Merged/ArcGeometry.d.ts +2 -0
  316. package/build/plugins/Sketch/View/graphics/Merged/ArcMaterial.d.ts +2 -0
  317. package/build/plugins/Sketch/View/graphics/Merged/Bezier.d.ts +19 -0
  318. package/build/plugins/Sketch/View/graphics/Merged/BezierGeometry.d.ts +12 -0
  319. package/build/plugins/Sketch/View/graphics/Merged/BezierMaterial.d.ts +2 -0
  320. package/build/plugins/Sketch/View/graphics/Merged/Circle.d.ts +9 -0
  321. package/build/plugins/Sketch/View/graphics/Merged/Line.d.ts +15 -0
  322. package/build/plugins/Sketch/View/graphics/Merged/LineGeometry.d.ts +2 -0
  323. package/build/plugins/Sketch/View/graphics/Merged/LineMaterial.d.ts +2 -0
  324. package/build/plugins/Sketch/View/graphics/Merged/MergedWrapper.d.ts +16 -0
  325. package/build/plugins/Sketch/View/graphics/Merged/Point.d.ts +8 -0
  326. package/build/plugins/Sketch/View/graphics/Merged/Spline.d.ts +17 -0
  327. package/build/plugins/Sketch/View/graphics/Merged/SplineGeometry.d.ts +11 -0
  328. package/build/plugins/Sketch/View/graphics/Merged/SplineMaterial.d.ts +2 -0
  329. package/build/plugins/Sketch/View/graphics/MousePosition.d.ts +2 -0
  330. package/build/plugins/Sketch/View/graphics/Regions.d.ts +5 -0
  331. package/build/plugins/Sketch/View/graphics/TmpAngularDimension.d.ts +8 -0
  332. package/build/plugins/Sketch/View/graphics/graphics.d.ts +5 -0
  333. package/build/plugins/Sketch/View/graphics/hooks.d.ts +49 -0
  334. package/build/plugins/Sketch/View/graphics/primitives.d.ts +34 -0
  335. package/build/plugins/Sketch/View/graphics/scale.d.ts +6 -0
  336. package/build/plugins/Sketch/View/graphics/tmpGraphics.d.ts +3 -0
  337. package/build/plugins/Sketch/View/graphics/transform.d.ts +4 -0
  338. package/build/plugins/Sketch/View/handlers/CreateAngle.d.ts +3 -0
  339. package/build/plugins/Sketch/View/handlers/CreateConstraint.d.ts +10 -0
  340. package/build/plugins/Sketch/View/handlers/Drag.d.ts +3 -0
  341. package/build/plugins/Sketch/View/handlers/DrawArc.d.ts +3 -0
  342. package/build/plugins/Sketch/View/handlers/DrawCircle.d.ts +3 -0
  343. package/build/plugins/Sketch/View/handlers/DrawLine.d.ts +3 -0
  344. package/build/plugins/Sketch/View/handlers/DrawNurbs.d.ts +3 -0
  345. package/build/plugins/Sketch/View/handlers/DrawPoint.d.ts +3 -0
  346. package/build/plugins/Sketch/View/handlers/DrawRectangle.d.ts +3 -0
  347. package/build/plugins/Sketch/View/handlers/Fillet.d.ts +3 -0
  348. package/build/plugins/Sketch/View/handlers/HandlersConstructors.d.ts +33 -0
  349. package/build/plugins/Sketch/View/handlers/Hover.d.ts +3 -0
  350. package/build/plugins/Sketch/View/handlers/SSelect.d.ts +3 -0
  351. package/build/plugins/Sketch/View/handlers/Split.d.ts +3 -0
  352. package/build/plugins/Sketch/View/handlers/Trim.d.ts +3 -0
  353. package/build/plugins/Sketch/View/handlers/Use.d.ts +3 -0
  354. package/build/plugins/Sketch/View/handlers/constraintCreation.d.ts +10 -0
  355. package/build/plugins/Sketch/View/handlers/filletHelpers.d.ts +24 -0
  356. package/build/plugins/Sketch/View/handlers/hoverHelpers.d.ts +3 -0
  357. package/build/plugins/Sketch/View/handlers/snapper.d.ts +11 -0
  358. package/build/plugins/Sketch/View/handlers/splitHelpers.d.ts +20 -0
  359. package/build/plugins/Sketch/View/index.d.ts +1 -0
  360. package/build/plugins/Sketch/constants.d.ts +5 -0
  361. package/build/plugins/Sketch/description.d.ts +7 -0
  362. package/build/plugins/Sketch/index.d.ts +35 -0
  363. package/build/plugins/Sketch/resources.d.ts +5 -0
  364. package/build/plugins/Sketch/types.d.ts +148 -0
  365. package/build/plugins/Sketch/utils/Interaction.d.ts +7 -0
  366. package/build/plugins/Sketch/utils/OverdefinedStateManager.d.ts +6 -0
  367. package/build/plugins/Sketch/utils/getSketchState.d.ts +3 -0
  368. package/build/plugins/Sketch/utils/useSketchRegions.d.ts +2 -0
  369. package/build/plugins/Sketch/utils/useSketchState.d.ts +3 -0
  370. package/build/plugins/Slice/Root.d.ts +11 -0
  371. package/build/plugins/Slice/index.d.ts +34 -0
  372. package/build/plugins/SliceBySheet/Root.d.ts +11 -0
  373. package/build/plugins/SliceBySheet/index.d.ts +35 -0
  374. package/build/plugins/Sphere/Root.d.ts +11 -0
  375. package/build/plugins/Sphere/index.d.ts +35 -0
  376. package/build/plugins/TransformByCsys/Root.d.ts +11 -0
  377. package/build/plugins/TransformByCsys/index.d.ts +35 -0
  378. package/build/plugins/Translate/Root.d.ts +11 -0
  379. package/build/plugins/Translate/index.d.ts +35 -0
  380. package/build/plugins/Twist/Root.d.ts +11 -0
  381. package/build/plugins/Twist/View.d.ts +11 -0
  382. package/build/plugins/Twist/index.d.ts +48 -0
  383. package/build/plugins/WorkAxis/Root.d.ts +11 -0
  384. package/build/plugins/WorkAxis/View.d.ts +11 -0
  385. package/build/plugins/WorkAxis/index.d.ts +37 -0
  386. package/build/plugins/WorkCSys/Root.d.ts +11 -0
  387. package/build/plugins/WorkCSys/View.d.ts +11 -0
  388. package/build/plugins/WorkCSys/index.d.ts +53 -0
  389. package/build/plugins/WorkCoordSystem/Root.d.ts +11 -0
  390. package/build/plugins/WorkCoordSystem/View.d.ts +11 -0
  391. package/build/plugins/WorkCoordSystem/index.d.ts +55 -0
  392. package/build/plugins/WorkPlane/Root.d.ts +11 -0
  393. package/build/plugins/WorkPlane/View.d.ts +11 -0
  394. package/build/plugins/WorkPlane/index.d.ts +38 -0
  395. package/build/plugins/WorkPlane/validators.d.ts +1 -0
  396. package/build/plugins/WorkPoint/Root.d.ts +11 -0
  397. package/build/plugins/WorkPoint/View.d.ts +11 -0
  398. package/build/plugins/WorkPoint/index.d.ts +38 -0
  399. package/build/plugins/components/PluginForm.d.ts +24 -0
  400. package/build/plugins/utils/useRefsReset.d.ts +2 -0
  401. package/build/session/identity.d.ts +46 -0
  402. package/build/session/sessionClient.d.ts +140 -0
  403. package/build/session/types.d.ts +52 -0
  404. package/build/session/viewpoints.d.ts +90 -0
  405. package/build/theme/AppStyle.d.ts +33 -0
  406. package/build/theme/fonts/mono.d.ts +29 -0
  407. package/build/theme/stage.d.ts +148 -0
  408. package/build/theme/styles/antdChoices.d.ts +1 -0
  409. package/build/theme/styles/antdControls.d.ts +1 -0
  410. package/build/theme/styles/antdSurfaces.d.ts +1 -0
  411. package/build/theme/styles/editors.d.ts +1 -0
  412. package/build/theme/styles/fields.d.ts +1 -0
  413. package/build/theme/styles/frame.d.ts +1 -0
  414. package/build/theme/styles/panes.d.ts +1 -0
  415. package/build/theme/styles/parts.d.ts +2 -0
  416. package/build/theme/styles/rest.d.ts +1 -0
  417. package/build/theme/styles/sketch.d.ts +1 -0
  418. package/build/theme/styles/toolbar.d.ts +1 -0
  419. package/build/theme/styles/tools.d.ts +1 -0
  420. package/build/theme/styles/windows.d.ts +1 -0
  421. package/build/theme/themeStore.d.ts +305 -0
  422. package/build/types/jsx-compat.d.ts +8 -0
  423. package/build/types.d.ts +16 -0
  424. package/build/utils/FileUtils.d.ts +20 -0
  425. package/build/utils/bezierMatrices.d.ts +3 -0
  426. package/build/utils/conversionUtils.d.ts +78 -0
  427. package/build/utils/cubicSplineInterpolation.d.ts +5 -0
  428. package/build/utils/defaultValues.d.ts +3 -0
  429. package/build/utils/drawing/index.d.ts +3 -0
  430. package/build/utils/drawing/useDrawingArr.d.ts +10 -0
  431. package/build/utils/drawing/useDrawingCCId.d.ts +10 -0
  432. package/build/utils/drawing/useDrawingStr.d.ts +10 -0
  433. package/build/utils/getHighlightedColor.d.ts +6 -0
  434. package/build/utils/getMatePath.d.ts +2 -0
  435. package/build/utils/getMateRefIds.d.ts +30 -0
  436. package/build/utils/helpers.d.ts +19 -0
  437. package/build/utils/mateUtils.d.ts +35 -0
  438. package/build/utils/nurbsUtils.d.ts +35 -0
  439. package/build/utils/selection/filters.d.ts +12 -0
  440. package/build/utils/selection/scopes/mateSelection.d.ts +49 -0
  441. package/build/utils/selection/scopes/treeObjInteraction.d.ts +74 -0
  442. package/build/utils/selection/useSelectorsOrder.d.ts +12 -0
  443. package/build/utils/sketchIntersectionUtils.d.ts +139 -0
  444. package/build/utils/sketchUtils.d.ts +235 -0
  445. package/build/utils/useAllObjects.d.ts +31 -0
  446. package/build/utils/useIsUncommited.d.ts +2 -0
  447. package/build/utils/useRetainVisibility.d.ts +2 -0
  448. package/build/utils/useScale.d.ts +5 -0
  449. package/build/utils/validation.d.ts +11 -0
  450. package/doc/api/advanced/session.md +646 -0
  451. package/doc/api/advanced/utilities.md +1306 -0
  452. package/doc/api/assembly-constraints.md +340 -0
  453. package/doc/api/feature-plugins.md +613 -0
  454. package/doc/api/graphics.md +848 -0
  455. package/doc/api/hooks.md +300 -0
  456. package/doc/api/icons.md +812 -0
  457. package/doc/api/index.md +87 -0
  458. package/doc/api/other.md +369 -0
  459. package/doc/api/panels.md +754 -0
  460. package/doc/api/theme.md +551 -0
  461. package/doc/api/tool-plugins.md +191 -0
  462. package/doc/api/ui-elements.md +310 -0
  463. package/doc/api/work-geometry.md +154 -0
  464. package/icons/package.json +8 -0
  465. package/package.json +109 -4
  466. package/tools/fonts/brotli.py +29 -0
  467. package/tools/fonts/build.py +76 -0
  468. package/tools/icons/preview.mjs +74 -0
  469. package/tsconfig.build.json +16 -0
  470. package/typedoc.json +18 -0
  471. package/vitest.config.mts +25 -0
@@ -0,0 +1,754 @@
1
+ # Panels
2
+
3
+ The app's frame and its panels: `Drawing` in one piece, or the model tree, the toolbar, the sidebar, the messages
4
+ and the windows of the dialogs, laid out by the app. Start with `Drawing`.
5
+
6
+ ## Components
7
+
8
+ ### Drawing {#drawing}
9
+
10
+ ```ts
11
+ const Drawing: React.FC<DrawingProps>;
12
+ ```
13
+
14
+ The app's frame around a drawing: a bar with its tools, a sidebar with the model's tree and its bodies, the stage,
15
+ and a footer that says where things stand.
16
+
17
+ It is what Buerligons is made of, in one piece: the [ToolBar](#toolbar) in the bar, the [SideBar](#sidebar), and on the stage
18
+ the [ViewOptionButtons](#viewoptionbuttons), the [ViewPlugButtons](#viewplugbuttons), the [Messages](#messages), and the windows of the active
19
+ feature ([FeaturePlugin](#featureplugin)) and of the global plugins ([GlobalPlugins](#globalplugins)). It mounts the stylesheet
20
+ ([AppStyle](theme.md#appstyle)) itself. The sidebar's edge is dragged to set its width, and a button in the bar puts it away;
21
+ both are kept for the next visit (in `localStorage`).
22
+
23
+ Drawing contains no canvas: the app's canvas is its child, and fills the stage. The plugins need the SDK's
24
+ `PluginManager` mounted once in the app, and `BuerliPluginsGeometry` in the canvas for what they draw (both from
25
+ `@classcad/react`).
26
+
27
+ Where the app's `init` left the SDK's stock form controls in, Drawing hands the SDK react-cad's [elements](ui-elements.md#elements)
28
+ instead; an app that brought controls of its own keeps them. It also sets the colour of the model's edges and
29
+ points in the SDK's geometry config to the theme's ink, whenever the theme changes.
30
+
31
+ Its props: [DrawingProps](#drawingprops).
32
+
33
+ #### Example
34
+
35
+ ```tsx
36
+ import { Canvas } from '@react-three/fiber'
37
+ import { BuerliCadFacade } from '@classcad/client'
38
+ import { useBuerliCadFacade } from '@classcad/react'
39
+ import { Drawing, Menu, sessionClient, StageLook } from '@classcad/react-cad'
40
+
41
+ function Editor() {
42
+ const { drawingId, Geometry } = useBuerliCadFacade('bracket')
43
+ const file = {
44
+ undo: { caption: 'Undo', callback: () => BuerliCadFacade.utils.undo(drawingId) },
45
+ redo: { caption: 'Redo', callback: () => BuerliCadFacade.utils.redo(drawingId) },
46
+ }
47
+ return (
48
+ <Drawing
49
+ drawingId={drawingId}
50
+ Menu={<Menu items={file} trigger={['click']} />}
51
+ Status="ClassCAD · in this tab"
52
+ Trail={<a href="/help">Help</a>}
53
+ readOnly={sessionClient.useSessionRole() === 'view'}>
54
+ <Canvas orthographic>
55
+ <StageLook />
56
+ <Geometry />
57
+ </Canvas>
58
+ </Drawing>
59
+ )
60
+ }
61
+ ```
62
+
63
+ ***
64
+
65
+ ### ModelTree {#modeltree}
66
+
67
+ ```ts
68
+ const ModelTree: React.FC<ModelTreeProps>;
69
+ ```
70
+
71
+ Shows the structure of the model: a part's features, or an assembly's nodes.
72
+
73
+ Which of the two it shows is the [useEditMode](hooks.md#useeditmode) of the drawing. For a part it is the list of its features in
74
+ the order they are built, with the rollback bar: a feature is dragged to reorder it, double-clicked to open its
75
+ dialog, and has a context menu (rename, edit, delete). For an assembly it is the tree of its instances, which stay unfolded as they were
76
+ left, and unfold to an instance selected on the stage; one is double-clicked to work on it. The header names the current product and has its actions: back out of it, export
77
+ it, convert to a subassembly, open the products. With neither a part nor an assembly, it shows a placeholder.
78
+ Read-only ([DrawingProps.readOnly](#property-readonly)), the tree is browsed but not edited.
79
+
80
+ Its props: [ModelTreeProps](#modeltreeprops).
81
+
82
+ #### Example
83
+
84
+ ```tsx
85
+ import { Canvas } from '@react-three/fiber'
86
+ import { BuerliPluginsGeometry, useBuerliCadFacade } from '@classcad/react'
87
+ import { AppStyle, FeaturePlugin, FtVisibilityController, GlobalPlugins, Messages, ModelTree, StageLook, ToolBar } from '@classcad/react-cad'
88
+
89
+ // The pieces laid out by the app instead of Drawing: then `init` is given react-cad's `elements` by the app.
90
+ function Workbench() {
91
+ const { drawingId, Geometry } = useBuerliCadFacade('bracket')
92
+ return (
93
+ <div className="rcad" style={{ display: 'grid', gridTemplate: '48px 1fr / 280px 1fr', height: '100vh' }}>
94
+ <AppStyle />
95
+ <header style={{ gridColumn: 'span 2' }}><ToolBar drawingId={drawingId} /></header>
96
+ <aside><ModelTree drawingId={drawingId} /></aside>
97
+ <main style={{ position: 'relative' }}>
98
+ <Canvas orthographic>
99
+ <StageLook />
100
+ <Geometry />
101
+ <BuerliPluginsGeometry drawingId={drawingId} />
102
+ </Canvas>
103
+ <Messages drawingId={drawingId} />
104
+ </main>
105
+ <FeaturePlugin drawingId={drawingId} />
106
+ <GlobalPlugins drawingId={drawingId} />
107
+ <FtVisibilityController drawingId={drawingId} />
108
+ </div>
109
+ )
110
+ }
111
+ ```
112
+
113
+ ***
114
+
115
+ ### ToolBar {#toolbar}
116
+
117
+ ```ts
118
+ const ToolBar: React.FC<ToolBarProps>;
119
+ ```
120
+
121
+ The tools a part or an assembly is built with: one button a tool, its drawing on it.
122
+
123
+ Tools that are kin share a button; its caret opens the set. In a part the tools are the features (a sketch, work
124
+ geometry, extrusion, boolean, fillet, patterns, primitives …), in an assembly the constraints. A tool makes the new
125
+ feature (uncommitted, in the current product) and opens its dialog; while a feature's dialog is open, it makes
126
+ none. Until the drawing has a current product, the buttons are placeholders.
127
+
128
+ Its props: [ToolBarProps](#toolbarprops). The example of [ModelTree](#modeltree) lays it out with the other panels.
129
+
130
+ ***
131
+
132
+ ### SideBar {#sidebar}
133
+
134
+ ```ts
135
+ const SideBar: React.FC<SideBarProps>;
136
+ ```
137
+
138
+ The sidebar's two panes: the model's tree above, and what the model is made of below it.
139
+
140
+ The upper pane is the [ModelTree](#modeltree) (a part's features, an assembly's nodes); the lower one is the
141
+ part's bodies ([Solids](#solids)) or the assembly's constraints ([Constraints](#constraints)), as the current product is a
142
+ part or an assembly. While the drawing has pending commands, the panes take no clicks. [Drawing](#drawing) renders it
143
+ in its sidebar; an app that composes the pieces itself gives it a container of the height it is to fill.
144
+
145
+ Its props: [SideBarProps](#sidebarprops).
146
+
147
+ #### Example
148
+
149
+ ```tsx
150
+ import type { DrawingID } from '@classcad/sdkjs'
151
+ import { AppStyle, SideBar } from '@classcad/react-cad'
152
+
153
+ // the tree and the bodies (or constraints) of a drawing, in a column of the app's own
154
+ function ModelColumn({ drawingId }: { drawingId: DrawingID }) {
155
+ return (
156
+ <aside className="rcad" style={{ width: 300, height: '100%', display: 'flex', flexDirection: 'column' }}>
157
+ <AppStyle />
158
+ <SideBar drawingId={drawingId} />
159
+ </aside>
160
+ )
161
+ }
162
+ ```
163
+
164
+ ***
165
+
166
+ ### Messages {#messages}
167
+
168
+ ```ts
169
+ const Messages: React.FC<MessagesProps>;
170
+ ```
171
+
172
+ The app's messages: what the SDK's `showMessage` (`@classcad/sdkjs`) says, as toasts and in a log.
173
+
174
+ A new message comes up as a toast and leaves again after a few seconds; an error stays until the log has been
175
+ opened. The button under the toasts opens the log of all of them, and a dot on it says that there are new ones;
176
+ the log has a button that clears it. [Drawing](#drawing) shows them in the stage's lower right corner.
177
+
178
+ Its props: [MessagesProps](#messagesprops).
179
+
180
+ #### Example
181
+
182
+ ```tsx
183
+ import { showMessage } from '@classcad/sdkjs'
184
+ import type { DrawingID } from '@classcad/sdkjs'
185
+ import { Messages } from '@classcad/react-cad'
186
+
187
+ // where the app shows them: over the stage's lower right corner
188
+ const Toasts = () => (
189
+ <div style={{ position: 'absolute', right: 12, bottom: 12, zIndex: 6 }}>
190
+ <Messages drawingId={drawingId} />
191
+ </div>
192
+ )
193
+
194
+ // anywhere in the app: a toast, and a line in the log
195
+ showMessage({ type: 'warning', text: 'The sketch is not closed: nothing was extruded.', drawingId })
196
+ ```
197
+
198
+ ***
199
+
200
+ ### FeaturePlugin {#featureplugin}
201
+
202
+ ```ts
203
+ const FeaturePlugin: React.FC<FeaturePluginProps>;
204
+ ```
205
+
206
+ The window of the active feature: the dialog of the feature's plugin, in a window that can be dragged.
207
+
208
+ The active feature is the drawing's `plugin.active.feature` (set by the [ToolBar](#toolbar) for a new feature, and by
209
+ a double click in the [ModelTree](#modeltree)). The window's head is the feature's drawing, its name and the call that
210
+ makes it; closing it sets the active feature to none. It renders nothing while no feature is active.
211
+ [Drawing](#drawing) renders it over the stage.
212
+
213
+ Its props: [FeaturePluginProps](#featurepluginprops).
214
+
215
+ #### Example
216
+
217
+ ```tsx
218
+ import { getDrawing } from '@classcad/sdkjs'
219
+ import type { DrawingID, ObjectID } from '@classcad/sdkjs'
220
+ import { FeaturePlugin } from '@classcad/react-cad'
221
+
222
+ // the window, once, over the app's stage
223
+ const Dialog = () => <FeaturePlugin drawingId={drawingId} modalProps={{ width: 312, minPosition: { x: 300, y: 60 } }} />
224
+
225
+ // a feature's dialog opened from the app: the window shows it
226
+ getDrawing(drawingId).api.plugin.setActiveFeature(extrusionId)
227
+ ```
228
+
229
+ ***
230
+
231
+ ### GlobalPlugins {#globalplugins}
232
+
233
+ ```ts
234
+ const GlobalPlugins: React.FC<GlobalPluginsProps>;
235
+ ```
236
+
237
+ The windows of the drawing's global plugins (Measure, Expressions, Products, …): one for each plugin that is on.
238
+
239
+ The global plugins are the ones `init`'s `globalPlugins` gives every drawing. A plugin is switched on and off with
240
+ the drawing's `api.plugin.setActiveGlobal` (as the [ViewPlugButtons](#viewplugbuttons) and the model tree's header do), and
241
+ closing its window switches it off. [Drawing](#drawing) renders them over the stage; an app that composes the pieces
242
+ itself renders them once, anywhere.
243
+
244
+ Its props: [GlobalPluginsProps](#globalpluginsprops).
245
+
246
+ #### Example
247
+
248
+ ```tsx
249
+ import { getDrawing } from '@classcad/sdkjs'
250
+ import type { DrawingID } from '@classcad/sdkjs'
251
+ import { GlobalPlugins } from '@classcad/react-cad'
252
+
253
+ // the windows, once, anywhere in the app
254
+ const Windows = () => <GlobalPlugins drawingId={drawingId} modalProps={{ width: 380, minPosition: { x: 300, y: 60 } }} />
255
+
256
+ // a button of the app's own that opens the Measure panel
257
+ const openMeasure = () => {
258
+ const { plugin, api } = getDrawing(drawingId)
259
+ const measure = plugin.global.find((id) => plugin.refs[id].name === 'Measure')
260
+ if (measure) api.plugin.setActiveGlobal(measure, true)
261
+ }
262
+ ```
263
+
264
+ ***
265
+
266
+ ### Constraints {#constraints}
267
+
268
+ ```ts
269
+ const Constraints: React.FC<ConstraintsProps>;
270
+ ```
271
+
272
+ Lists the constraints of the current assembly, and says whether the assembly's solver has solved them.
273
+
274
+ A row has a context menu (rename, delete), and the pointer on it shows the mates the constraint joins
275
+ ([HoveredConstraintDisplay](graphics.md#hoveredconstraintdisplay)). Its props: [ConstraintsProps](#constraintsprops). The example of [useEditMode](hooks.md#useeditmode) shows it
276
+ for an assembly.
277
+
278
+ ***
279
+
280
+ ### Readfile {#readfile}
281
+
282
+ ```ts
283
+ const Readfile: ForwardRefExoticComponent<ReadfileProps & RefAttributes<any>>;
284
+ ```
285
+
286
+ A hidden file input that loads a model the user picks: an `.ofb`, `.stp`/`.step` or `.iwp` file.
287
+
288
+ Its ref is the `<input>`: a button of the app's calls `ref.current.click()` to open the browser's file dialog. The
289
+ file is loaded into a new drawing named after it (`BuerliCadFacade.utils.connect`), which becomes the active one.
290
+ A guest of a shared session loads it into the session's drawing instead, in place of its model, for everyone in
291
+ it. What goes wrong is said with `showMessage`. Its props: [ReadfileProps](#readfileprops).
292
+
293
+ #### Example
294
+
295
+ ```tsx
296
+ import { useRef } from 'react'
297
+ import { Readfile } from '@classcad/react-cad'
298
+
299
+ // an Open button: the browser's file dialog, and the model the user picks in a drawing of its own
300
+ function OpenButton() {
301
+ const input = useRef<HTMLInputElement>(null)
302
+ return (
303
+ <>
304
+ <button onClick={() => input.current?.click()}>Open…</button>
305
+ <Readfile ref={input} singleDrawingApp />
306
+ </>
307
+ )
308
+ }
309
+ ```
310
+
311
+ ***
312
+
313
+ ### Solids {#solids}
314
+
315
+ ```ts
316
+ const Solids: React.FC<SolidsProps>;
317
+ ```
318
+
319
+ Lists the bodies of the current product: its solids and sheets ([useVisibleSolids](hooks.md#usevisiblesolids)).
320
+
321
+ A row is hovered and selected with the body on the stage, renamed, shown or hidden with its eye, and has a context
322
+ menu. Several rows are selected with Shift and Ctrl.
323
+
324
+ Its props: [SolidsProps](#solidsprops). The example of [useEditMode](hooks.md#useeditmode) shows it for a part, and [Constraints](#constraints) for
325
+ an assembly.
326
+
327
+ ***
328
+
329
+ ### ViewOptionButtons {#viewoptionbuttons}
330
+
331
+ ```ts
332
+ const ViewOptionButtons: React.FC;
333
+ ```
334
+
335
+ Switches for what of the model is shown: its faces, its wires, its edges, its points.
336
+
337
+ Each is a switch over the SDK's geometry config, the one [setViewOptions](#setviewoptions) sets; the wireframe is only there
338
+ while the faces are shown. They take no props: they are the same for every drawing. [Drawing](#drawing) docks them on
339
+ the stage's right-hand side.
340
+
341
+ #### Example
342
+
343
+ ```tsx
344
+ import { ThemeToggle, ViewOptionButtons, ViewPlugButtons } from '@classcad/react-cad'
345
+ import type { DrawingID } from '@classcad/sdkjs'
346
+
347
+ // the stage's docks of an app that lays the pieces out itself
348
+ const StageDocks = ({ drawingId }: { drawingId: DrawingID }) => (
349
+ <>
350
+ <div className="rcad-dock rcad-dock-col" style={{ position: 'absolute', top: 12, right: 12 }}>
351
+ <ViewOptionButtons />
352
+ <ThemeToggle />
353
+ </div>
354
+ <div className="rcad-dock" style={{ position: 'absolute', bottom: 12, left: 12 }}>
355
+ <ViewPlugButtons drawingId={drawingId} />
356
+ </div>
357
+ </>
358
+ )
359
+ ```
360
+
361
+ ***
362
+
363
+ ### ViewPlugButtons {#viewplugbuttons}
364
+
365
+ ```ts
366
+ const ViewPlugButtons: React.FC<ViewPlugButtonsProps>;
367
+ ```
368
+
369
+ Buttons that open and close the global plugins laid over the stage: Dimensions, Measure, Bounding box, Session
370
+ Management.
371
+
372
+ A button is there only where the drawing has the plugin (`init`'s `globalPlugins`); it switches the plugin on and
373
+ off, and its window is one of the [GlobalPlugins](#globalplugins). The Session Management button is not shown to a guest of a
374
+ shared session. [Drawing](#drawing) docks them in the stage's lower left corner.
375
+
376
+ Its props: [ViewPlugButtonsProps](#viewplugbuttonsprops).
377
+
378
+ #### Example
379
+
380
+ ```tsx
381
+ import { init, WASMClient } from '@classcad/client'
382
+ import type { DrawingID } from '@classcad/sdkjs'
383
+ import { BoundingBoxInfo, Dimensions, elements, Measure, ViewPlugButtons } from '@classcad/react-cad'
384
+
385
+ // a button for each of these global plugins that the drawings have
386
+ init((drawingId) => new WASMClient(drawingId, { token: 'ccpk_…' }), {
387
+ elements,
388
+ globalPlugins: [Dimensions, Measure, BoundingBoxInfo],
389
+ })
390
+
391
+ const Tools = ({ drawingId }: { drawingId: DrawingID }) => (
392
+ <div className="rcad-dock" style={{ position: 'absolute', left: 12, bottom: 12 }}>
393
+ <ViewPlugButtons drawingId={drawingId} />
394
+ </div>
395
+ )
396
+ ```
397
+
398
+ ## Functions
399
+
400
+ ### getViewOptions() {#getviewoptions}
401
+
402
+ ```ts
403
+ function getViewOptions(): ViewOptions;
404
+ ```
405
+
406
+ What of the model is drawn now, as the SDK's geometry config says (which the stage draws from).
407
+
408
+ The example of [setViewOptions](#setviewoptions) switches one of them with it.
409
+
410
+ #### Returns
411
+
412
+ [`ViewOptions`](#viewoptions)
413
+
414
+ The [ViewOptions](#viewoptions) in force, for every drawing.
415
+
416
+ ***
417
+
418
+ ### setViewOptions() {#setviewoptions}
419
+
420
+ ```ts
421
+ function setViewOptions(options): void;
422
+ ```
423
+
424
+ Shows or hides what of the model is drawn, for every drawing.
425
+
426
+ It merges the options into the SDK's geometry config (`init`'s `config.geometry`); what it leaves out stays as it
427
+ is. The [ViewOptionButtons](#viewoptionbuttons) show what is set here, whoever sets it: the user, or the app (Buerligons switches
428
+ the edges off in its realistic look).
429
+
430
+ #### Parameters
431
+
432
+ | Parameter | Type | Description |
433
+ | :------ | :------ | :------ |
434
+ | `options` | `Partial`&lt;[`ViewOptions`](#viewoptions)&gt; | What to change, such as `{ edges: false }`. |
435
+
436
+ #### Returns
437
+
438
+ `void`
439
+
440
+ #### Example
441
+
442
+ ```tsx
443
+ import { getViewOptions, setViewOptions } from '@classcad/react-cad'
444
+
445
+ // a key that switches the edges on and off, as the edges' button on the stage does
446
+ window.addEventListener('keydown', (e) => {
447
+ if (e.key !== 'e') return
448
+ const { edges } = getViewOptions()
449
+ setViewOptions({ edges: !edges })
450
+ })
451
+
452
+ // a look of the app's own: the faces alone, without edges or points
453
+ setViewOptions({ faces: true, wireframe: false, edges: false, vertices: false })
454
+ ```
455
+
456
+ ## Types
457
+
458
+ ### ConstraintsProps {#constraintsprops}
459
+
460
+ ```ts
461
+ type ConstraintsProps = {
462
+ drawingId: DrawingID;
463
+ };
464
+ ```
465
+
466
+ Props of [Constraints](#constraints).
467
+
468
+ #### Properties
469
+
470
+ | Property | Type | Description |
471
+ | :------ | :------ | :------ |
472
+ | <a id="property-drawingid"></a> `drawingId` | `DrawingID` | The drawing whose current assembly's constraints are listed. |
473
+
474
+ ***
475
+
476
+ ### DrawingProps {#drawingprops}
477
+
478
+ ```ts
479
+ type DrawingProps = {
480
+ children?: React.ReactNode;
481
+ drawingId: DrawingID;
482
+ Menu?: React.JSX.Element;
483
+ readOnly?: boolean;
484
+ Status?: React.ReactNode;
485
+ themeSwitch?: boolean;
486
+ Trail?: React.ReactNode;
487
+ ViewOptions?: React.ReactNode;
488
+ };
489
+ ```
490
+
491
+ Props of [Drawing](#drawing).
492
+
493
+ #### Properties
494
+
495
+ | Property | Type | Description |
496
+ | :------ | :------ | :------ |
497
+ | <a id="property-children"></a> `children?` | `React.ReactNode` | What fills the stage: the app's canvas, with the drawing's geometry in it. |
498
+ | <a id="property-drawingid-1"></a> `drawingId` | `DrawingID` | The drawing to show, such as the active one (`useBuerli(s => s.drawing.active)`). |
499
+ | <a id="property-menu"></a> `Menu?` | `React.JSX.Element` | What leads the bar, before the button that puts the sidebar away: a file menu, undo and redo. |
500
+ | <a id="property-readonly"></a> `readOnly?` | `boolean` | When true, hides the feature toolbar and disables model-tree editing (browsing stays). Default `false`. |
501
+ | <a id="property-status"></a> `Status?` | `React.ReactNode` | What the footer's first cell names before the engine's state (ready, working, not connected): where the engine runs, say. Default: `ClassCAD`. |
502
+ | <a id="property-themeswitch"></a> `themeSwitch?` | `boolean` | Shows the theme switch ([ThemeToggle](theme.md#themetoggle)) at the end of the bar. `false` where the page has a switch of its own and sets the app's theme from it with [setRCadThemeMode](theme.md#setrcadthememode). Default `true`. |
503
+ | <a id="property-trail"></a> `Trail?` | `React.ReactNode` | What the bar ends with, before the theme switch. |
504
+ | <a id="property-viewoptions"></a> `ViewOptions?` | `React.ReactNode` | Buttons of the app's own for the stage's right-hand dock, after the [ViewOptionButtons](#viewoptionbuttons). |
505
+
506
+ ***
507
+
508
+ ### FeaturePluginProps {#featurepluginprops}
509
+
510
+ ```ts
511
+ type FeaturePluginProps = {
512
+ drawingId: DrawingID;
513
+ modalProps?: {
514
+ bodyStyle?: React.CSSProperties;
515
+ minPosition?: {
516
+ x?: number;
517
+ y?: number;
518
+ };
519
+ width?: string | number;
520
+ };
521
+ };
522
+ ```
523
+
524
+ Props of [FeaturePlugin](#featureplugin).
525
+
526
+ #### Properties
527
+
528
+ | Property | Type | Description |
529
+ | :------ | :------ | :------ |
530
+ | <a id="property-drawingid-2"></a> `drawingId` | `DrawingID` | The drawing whose active feature's dialog is shown. |
531
+ | <a id="property-modalprops"></a> `modalProps?` | \{ `bodyStyle?`: `React.CSSProperties`; `minPosition?`: \{ `x?`: `number`; `y?`: `number`; \}; `width?`: `string` \| `number`; \} | Where and how wide the window is. |
532
+ | `modalProps.bodyStyle?` | `React.CSSProperties` | The style of the window's body, such as its `maxHeight`. |
533
+ | `modalProps.minPosition?` | \{ `x?`: `number`; `y?`: `number`; \} | The leftmost and topmost the window's corner goes, in the browser window (px): it opens there at the least. |
534
+ | `modalProps.minPosition.x?` | `number` | The leftmost. |
535
+ | `modalProps.minPosition.y?` | `number` | The topmost. |
536
+ | `modalProps.width?` | `string` \| `number` | The window's width (px, or a CSS length). |
537
+
538
+ ***
539
+
540
+ ### GlobalPluginsProps {#globalpluginsprops}
541
+
542
+ ```ts
543
+ type GlobalPluginsProps = {
544
+ drawingId: DrawingID;
545
+ modalProps?: {
546
+ bodyStyle?: React.CSSProperties;
547
+ minPosition?: {
548
+ x?: number;
549
+ y?: number;
550
+ };
551
+ width?: string | number;
552
+ };
553
+ };
554
+ ```
555
+
556
+ Props of [GlobalPlugins](#globalplugins).
557
+
558
+ #### Properties
559
+
560
+ | Property | Type | Description |
561
+ | :------ | :------ | :------ |
562
+ | <a id="property-drawingid-4"></a> `drawingId` | `DrawingID` | The drawing whose global plugins are shown. |
563
+ | <a id="property-modalprops-1"></a> `modalProps?` | \{ `bodyStyle?`: `React.CSSProperties`; `minPosition?`: \{ `x?`: `number`; `y?`: `number`; \}; `width?`: `string` \| `number`; \} | Where and how wide their windows are. |
564
+ | `modalProps.bodyStyle?` | `React.CSSProperties` | The style of the window's body, such as its `maxHeight`. |
565
+ | `modalProps.minPosition?` | \{ `x?`: `number`; `y?`: `number`; \} | The leftmost and topmost the window's corner goes, in the browser window (px): it opens there at the least. |
566
+ | `modalProps.minPosition.x?` | `number` | The leftmost. |
567
+ | `modalProps.minPosition.y?` | `number` | The topmost. |
568
+ | `modalProps.width?` | `string` \| `number` | The window's width (px, or a CSS length). |
569
+
570
+ ***
571
+
572
+ ### MessagesProps {#messagesprops}
573
+
574
+ ```ts
575
+ type MessagesProps = {
576
+ drawingId: DrawingID;
577
+ };
578
+ ```
579
+
580
+ Props of [Messages](#messages).
581
+
582
+ #### Properties
583
+
584
+ | Property | Type | Description |
585
+ | :------ | :------ | :------ |
586
+ | <a id="property-drawingid-5"></a> `drawingId` | `DrawingID` | The drawing the messages are of: when it changes, the log is cleared. |
587
+
588
+ ***
589
+
590
+ ### ModelTreeProps {#modeltreeprops}
591
+
592
+ ```ts
593
+ type ModelTreeProps = {
594
+ drawingId: DrawingID;
595
+ };
596
+ ```
597
+
598
+ Props of [ModelTree](#modeltree).
599
+
600
+ #### Properties
601
+
602
+ | Property | Type | Description |
603
+ | :------ | :------ | :------ |
604
+ | <a id="property-drawingid-6"></a> `drawingId` | `DrawingID` | The drawing whose model is shown. |
605
+
606
+ ***
607
+
608
+ ### ReadfileProps {#readfileprops}
609
+
610
+ ```ts
611
+ type ReadfileProps = {
612
+ singleDrawingApp?: boolean;
613
+ };
614
+ ```
615
+
616
+ Props of [Readfile](#readfile).
617
+
618
+ #### Properties
619
+
620
+ | Property | Type | Description |
621
+ | :------ | :------ | :------ |
622
+ | <a id="property-singledrawingapp"></a> `singleDrawingApp?` | `boolean` | Removes the drawing that was active before, once the file is loaded into a new one: the app has one drawing. |
623
+
624
+ ***
625
+
626
+ ### SideBarProps {#sidebarprops}
627
+
628
+ ```ts
629
+ type SideBarProps = {
630
+ drawingId: DrawingID;
631
+ };
632
+ ```
633
+
634
+ Props of [SideBar](#sidebar).
635
+
636
+ #### Properties
637
+
638
+ | Property | Type | Description |
639
+ | :------ | :------ | :------ |
640
+ | <a id="property-drawingid-7"></a> `drawingId` | `DrawingID` | The drawing whose model is shown. |
641
+
642
+ ***
643
+
644
+ ### SolidsProps {#solidsprops}
645
+
646
+ ```ts
647
+ type SolidsProps = {
648
+ drawingId: DrawingID;
649
+ };
650
+ ```
651
+
652
+ Props of [Solids](#solids).
653
+
654
+ #### Properties
655
+
656
+ | Property | Type | Description |
657
+ | :------ | :------ | :------ |
658
+ | <a id="property-drawingid-8"></a> `drawingId` | `DrawingID` | The drawing whose bodies are listed. |
659
+
660
+ ***
661
+
662
+ ### ToolBarProps {#toolbarprops}
663
+
664
+ ```ts
665
+ type ToolBarProps = {
666
+ drawingId: DrawingID;
667
+ };
668
+ ```
669
+
670
+ Props of [ToolBar](#toolbar).
671
+
672
+ #### Properties
673
+
674
+ | Property | Type | Description |
675
+ | :------ | :------ | :------ |
676
+ | <a id="property-drawingid-9"></a> `drawingId` | `DrawingID` | The drawing whose current product the tools build. |
677
+
678
+ ***
679
+
680
+ ### ViewOptions {#viewoptions}
681
+
682
+ ```ts
683
+ type ViewOptions = {
684
+ edges: boolean;
685
+ faces: boolean;
686
+ vertices: boolean;
687
+ wireframe: boolean;
688
+ };
689
+ ```
690
+
691
+ What of the model is drawn: its faces (or their wires), its edges, its points.
692
+
693
+ #### Properties
694
+
695
+ | Property | Type | Description |
696
+ | :------ | :------ | :------ |
697
+ | <a id="property-edges"></a> `edges` | `boolean` | The edges are drawn. |
698
+ | <a id="property-faces"></a> `faces` | `boolean` | The faces are drawn. |
699
+ | <a id="property-vertices"></a> `vertices` | `boolean` | The points are drawn. |
700
+ | <a id="property-wireframe"></a> `wireframe` | `boolean` | The faces are drawn as their wires (only while they are drawn). |
701
+
702
+ ***
703
+
704
+ ### ViewPlugButtonsProps {#viewplugbuttonsprops}
705
+
706
+ ```ts
707
+ type ViewPlugButtonsProps = {
708
+ drawingId: DrawingID;
709
+ };
710
+ ```
711
+
712
+ Props of [ViewPlugButtons](#viewplugbuttons).
713
+
714
+ #### Properties
715
+
716
+ | Property | Type | Description |
717
+ | :------ | :------ | :------ |
718
+ | <a id="property-drawingid-10"></a> `drawingId` | `DrawingID` | The drawing whose global plugins the buttons open. |
719
+
720
+ ## Advanced
721
+
722
+ Most apps do not need these directly: types they meet through the exports above, and what is there for special cases or for building on the SDK itself.
723
+
724
+ ### FtVisibilityController {#ftvisibilitycontroller}
725
+
726
+ ```ts
727
+ const FtVisibilityController: React.FC<FtVisibilityControllerProps>;
728
+ ```
729
+
730
+ Shows and hides the views of the current part's features as the rollback bar and the fields ask.
731
+
732
+ A feature below the rollback bar is not in force: its view (a work plane, a sketch) is hidden while it is there,
733
+ and shown again when the bar moves past it. While a field picks, the features picked into it by their tree object
734
+ (a sketch, a work plane) are shown, and hidden again afterwards if they were hidden before. It renders nothing.
735
+ [Drawing](#drawing) renders it; an app that composes the pieces itself renders it once beside its [ModelTree](#modeltree), as
736
+ the example there does. Its props: [FtVisibilityControllerProps](#ftvisibilitycontrollerprops).
737
+
738
+ ***
739
+
740
+ ### FtVisibilityControllerProps {#ftvisibilitycontrollerprops}
741
+
742
+ ```ts
743
+ type FtVisibilityControllerProps = {
744
+ drawingId: DrawingID;
745
+ };
746
+ ```
747
+
748
+ Props of [FtVisibilityController](#ftvisibilitycontroller).
749
+
750
+ #### Properties
751
+
752
+ | Property | Type | Description |
753
+ | :------ | :------ | :------ |
754
+ | <a id="property-drawingid-3"></a> `drawingId` | `DrawingID` | The drawing whose features' views it shows and hides. |