@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
package/CHANGELOG.md ADDED
@@ -0,0 +1,57 @@
1
+ # @buerli.io/react-cad
2
+
3
+ ## 3.0.0-beta.20261119100608
4
+
5
+ ### Major Changes
6
+
7
+ - buerli is now ClassCAD's SDK for JavaScript, sdkjs, and its packages move to the `@classcad` scope:
8
+ `@buerli.io/core` is `@classcad/sdkjs`, `@buerli.io/classcad` is `@classcad/client`, `@buerli.io/react`
9
+ is `@classcad/react`, `@buerli.io/react-cad` is `@classcad/react-cad`, `@buerli.io/buerligons` is
10
+ `@classcad/modeler` (which also exports the app as `Modeler`) and `@buerli.io/backend` is
11
+ `@classcad/backend`. `@buerli.io/headless` is gone, and with it the `useSolid` and `useHistory` hooks of
12
+ `@classcad/react`.
13
+
14
+ ### Minor Changes
15
+
16
+ - The Extrusion and Revolve dialogs combine the new solid with target bodies in one feature: a union, a subtraction or an intersection, chosen next to the type, with the targets picked in the scene. A target is a body, so one body of a pattern can be a target on its own. The dialogs call `part.updateExtrusion` and `part.updateRevolve` with the targets as the feature and the body's place among its bodies, as the Mirror, Boolean and Pattern dialogs reference bodies.
17
+ - Sketches draw NURBS curves. Three new tools sit next to the circle: a spline and a Bezier curve shaped by their control points, and an interpolation spline through the fit points. Each point is picked in turn; a double click ends the curve at 3 or more points. Ctrl draws one as construction geometry, as with the other tools. A new Equal Curvature constraint was added.
18
+ - The model tree knows where its rows stand. `@classcad/react` gets `ScgTreeWalker`, which walks the structure tree from a node down and renders every node with its `ObjectPath` (the ids from the root down to it), and `buildObjectPath`, which makes that path for any object. react-cad's assembly tree is built on the walker: the interaction infos its rows make carry the instance's `objectPath`, the rows stay unfolded as they were left (in react-cad's store, not in the row), the header unfolds or folds them all, and a selection on the stage unfolds the tree to the instance it hit and scrolls its row into view. A folded row mounts nothing below it, and a row renders again only when its own answer to hover and selection changes, so a big assembly costs what is visible: on the Ducati (761 instances) a click in the tree went from 300-470 ms to 20-40 ms and folding all rows from 600 ms to 55 ms.
19
+
20
+ ### Patch Changes
21
+
22
+ - The packages name their repository, awv-informatik/sdkjs, and their sites, sdkjs.classcad.ch and
23
+ modeler.classcad.ch. The API reference calls the SDK by its name.
24
+ - On WebGPU a curved body's silhouette follows the view. It stayed where it was first drawn, a black line across the body. Seams, where a curved face meets itself, are now drawn like every other edge, so the edge that can be picked is the edge that is seen.
25
+ - The sidebar's lists follow what is picked on the stage: a feature, an instance, a body, a constraint or a sketch element picked in the view is scrolled into view in its list, however long the list. An instance picked inside a folded sub-assembly is found at the sub-assembly's row. Only the list moves, never the page; rows picked together show the topmost of them.
26
+ - Updated dependencies
27
+ - @classcad/client@3.0.0-beta.20261119100608
28
+ - @classcad/react@3.0.0-beta.20261119100608
29
+
30
+ ## 2.0.0
31
+
32
+ ### Major Changes
33
+
34
+ - React 19, @react-three/fiber 9, drei 10, three r170+, zustand 5, antd 6 and styled-components 6. These are the new peer dependencies; React 18 and fiber 8 are no longer supported. `useBuerli` and `useDrawing` keep their equality-function argument (on `zustand/traditional`), so selectors and the `shallow` comparisons that use them work as before. The custom line elements (`line_`, `line2`, `lineMaterial`) are declared on fiber's `ThreeElements`. `@buerli.io/core` builds its store with zustand 5's `createStore`. react-cad's tooltips no longer use `findDOMNode`, which React 19 removed.
35
+
36
+ react-cad is now part of this repository; it keeps a version of its own.
37
+
38
+ ### Minor Changes
39
+
40
+ - Every export is documented, most with an example of where it goes in an app, and each package carries its API reference as markdown in `doc/api`: a page for the package (what it is for, what it exposes) and a page for each part of its API, with what most apps don't need under Advanced. buerli.io shows it. The props of the components are exported as types (`BuerliGeometryProps`, `DrawingProps`, `ModelTreeProps`, `EditorProps`, …).
41
+ - `@buerli.io/react-cad/icons`: Buerligons' icons on their own (`Icon`, the drawings and their names), with nothing but React, so that a page can draw the app's signs without the library. It works with React 18 and 19.
42
+ - The stage can be drawn by three's WebGPURenderer (on WebGPU, or on its WebGL2 backend), as Buerligons now does, as well as by WebGLRenderer.
43
+
44
+ - react-cad: `Drawing` takes `ViewOptions`, buttons of the app's own for the stage's right-hand dock, and there is a `look` icon. The sketch's line and arc materials are named (`rcad-sketch-line`, `rcad-sketch-arc`), so that a renderer without GLSL can stand in for them; an arc's geometry keeps its position and parameter in one buffer and has no normals (WebGPU takes eight vertex buffers to a draw); a work plane's outline is drawn as segments, since WebGPU has no line loops.
45
+ - react: a body's material is named `buerli-body`, and takes no polygon offset in wireframe (WebGPU refuses one for lines); the vertices' material is named `buerli-points`.
46
+
47
+ ### Patch Changes
48
+
49
+ - A sketch's constraints show their signs again where WebGPU draws the stage, as in Buerligons: each badge was an empty disc. Its disc, ring and sign were set apart by fractions of a polygon offset, which WebGPU takes in whole units only, so the disc came out in front of its sign; the disc and the ring now leave the depth alone. The badges of a sketch being edited, and an assembly's constraint badges, are drawn over what they lie on, in their order: in a slanted view they lost to the sketch's lines and regions in the same plane, now and then, as the view was zoomed. A badge keeps its geometry as it is zoomed, scaled, where it was made anew each frame, and some did not reach the screen. The sign's lines are also weighed for the size it is seen at: drawn into the texture at 96px's own weight, they came out a third of a pixel wide, and read faintly on WebGL too.
50
+ - Edges can be picked while they are switched off, and so in Buerligons' realistic look, which switches them off: a fillet's or a chamfer's edges, a measurement's, any selection that takes edges. A body whose edges are switched off used to have none to point at; they are now there undrawn, and show when they are hovered or picked.
51
+ - The examples on the packages' pages and BuerliGeometry's build their models with `useBuerliCadFacade(name, build, deps)`, where they built in an effect.
52
+ - The feature list no longer throws while one drawing is switched for another. For a moment then, a node of the tree has members but no `refObj`, and the selectors that read the feature a reference points at threw "Cannot read properties of undefined (reading 'value')", logged on every switch in an app that opens its documents one after another. The feature list, its context menu and the rollback checks read a reference's `refObj` guarded.
53
+ - Menus read in the dark theme: their rows were drawn in antd's light-theme text colour, near black on the dark menu, all but the one under the pointer. Their hover, dividers, disabled rows and group titles take the app's colours too.
54
+ - A draggable window that is open when it first mounts, such as the Measure window that an app opens as soon as its model loads, no longer crashes the app with "Cannot read properties of undefined (reading 'x')": a window has its position limits from the start, and one that is shown after it unmounted is left alone.
55
+ - Updated dependencies
56
+ - @buerli.io/classcad@2.0.0
57
+ - @buerli.io/react@2.0.0
package/README.md CHANGED
@@ -1,3 +1,99 @@
1
- # Temporary Holding Version
1
+ # @classcad/react-cad
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The UI of a CAD app on [the ClassCAD SDK](https://sdkjs.classcad.ch): the frame around a drawing, the model's tree,
4
+ its tools and the windows of its features, the sketcher, and what is drawn over the model.
5
+ [ClassCAD Modeler](https://modeler.classcad.ch) is built from it.
6
+
7
+ Built against the ClassCAD engine 21.2.1-alpha.185 (alpha): the bundle at https://awvstatic.com/classcad/download/alpha/21.2.1-alpha.185. A server host installs that version, from the [Downloads](https://classcad.ch/account#downloads) of a classcad.ch account (channel Alpha); in WASM mode it is loaded from there by itself.
8
+
9
+ ## The look
10
+
11
+ The app speaks AWV's design language, set for a technical application: paper and ink with one red,
12
+ one mono face, a drawing's own furniture (a title block, numbered features, registration marks),
13
+ icons in two tones of ink.
14
+ It is written down in the websites repository, `BRANDING.md`, chapter **"The app"**. Read that
15
+ before changing how anything here looks; this is where it is implemented.
16
+
17
+ | Path | What |
18
+ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
19
+ | `src/theme/themeStore.ts` | the colour tokens, light and dark, and the theme's mode. Each token is also a custom property `--rcad-<name>` on `:root` |
20
+ | `src/theme/AppStyle.tsx`, `src/theme/styles/` | the stylesheet: metrics, antd as the app wears it, the app's own pieces (`.rcad-*`) |
21
+ | `src/theme/stage.ts` | the colours of what is drawn on the stage: the model, what is under the hand, a sketch, dimensions |
22
+ | `src/theme/fonts/mono.ts` | JetBrains Mono, carried with the library (made by `tools/fonts`) |
23
+ | `src/icons/` | the icons: small drawings on a 20 × 20 sheet, in layers, each with a pen |
24
+ | `src/elements/` | the controls a feature's window is made of |
25
+ | `src/components/graphics/StageLook.tsx` | the model as a drawing: the paper's colour, edges at a line's weight, silhouettes |
26
+
27
+ Rules that keep it one thing:
28
+
29
+ - Colours are tokens (`var(--rcad-ink)`, `useStage().select`), never literals. Both themes come for free that way.
30
+ - One face: `var(--rcad-font-mono)`. Labels are mono capitals; everything else is sentence case.
31
+ - Red (`--rcad-accent`) is for the one primary action, the rollback bar, a field that listens for a pick, and errors. A control that is merely on, and a row that is selected, are neutral.
32
+ - Icons are signs from `src/icons`, never image files or an icon font (antd's own included).
33
+
34
+ ### Using it
35
+
36
+ ```tsx
37
+ import { Drawing, StageLook, setRCadThemeMode } from '@classcad/react-cad'
38
+ ;<Drawing drawingId={drawingId} Menu={<FileMenu />} Status="ClassCAD · this tab">
39
+ <Canvas orthographic>
40
+ <StageLook />
41
+ <BuerliGeometry drawingId={drawingId} />
42
+ </Canvas>
43
+ </Drawing>
44
+ ```
45
+
46
+ - `Drawing` mounts the stylesheet (`AppStyle`), the bar, the sidebar, the stage and the footer. Its
47
+ children fill the stage. `Menu` leads the bar, `Trail` ends it, `Status` opens the footer.
48
+ - The theme follows the system until the reader picks the other one with the switch in the bar. A
49
+ page that has a switch of its own passes `themeSwitch={false}` and calls
50
+ `setRCadThemeMode(mode, { remember: false })` whenever its theme changes.
51
+ - `StageLook` goes inside the canvas, beside the geometry. Without it the model is the engine's own
52
+ grey with hairline edges.
53
+ - A host that composes the pieces itself (a `ModelTree` here, a `ToolBar` there) renders one
54
+ `<AppStyle />` beside them, inside an element with the class `rcad`.
55
+
56
+ ### Icons
57
+
58
+ ```tsx
59
+ import { Icon, iconRef } from '@classcad/react-cad'
60
+ ;<Icon name="extrusion" size={20} /> // a sign, in the theme's ink
61
+ iconRef('extrusion') // 'rcad:extrusion': goes wherever an image's url went
62
+ ```
63
+
64
+ An icon is a **sign**, not a picture: it has to be itself at 16 px. It is a list of layers, back to
65
+ front; a layer is a pen and an SVG path on a 20 × 20 sheet (`src/icons/types.ts` lists the pens).
66
+
67
+ - **Two tones.** Ink is what the sign is about (what a tool makes, the quantity a field sets, the
68
+ thing a field picks, the freedom a mate leaves). Grey is what that is done to, or was there
69
+ before. No accent colour; an axis' own colour (X red, Y green, Z blue) only where a sign is about
70
+ that axis.
71
+ - **One weight.** Every line is as heavy as every other; nothing closer than 3 units to its
72
+ neighbour, no detail smaller than that.
73
+ - **A few large shapes.** Flat where the third dimension is not the point; the one camera (`cube`,
74
+ `block` in `src/icons/draw.ts`) where a body has to be seen. The shape a sign is about gets a
75
+ wash (`tone`) so that it reads as a body.
76
+ - **Apart.** What a sign has several of stands apart, or it runs together at 16 px: a pattern's
77
+ items are small solid tiles with clear room between them (`tile`, `copiesInRow`, `copiesAround`
78
+ in `draw.ts`), and two bodies or two plates keep the same room.
79
+ - Points, arrows and turns are the shared ones in `draw.ts` (`dot`, `arrowTo`, `spanTo`, `turn`).
80
+ An arrow's head is a solid triangle: in a path, a part in square brackets is filled as well as
81
+ drawn (`M3 10H13[M17 10L13 8V12Z]`).
82
+
83
+ Sheets: `ui` (the app's own signs), `features` (what a feature does), `sketch`, `params` and `axes`
84
+ (what a field sets), `refs` (what a field picks), `mates`, `glyphs`. `src/icons/legacy.ts` maps the
85
+ names the icons had as image files. To look at them at the sizes the app shows them:
86
+
87
+ ```bash
88
+ node tools/icons/preview.mjs --out sheet.html # every sign at 96, 32, 20 and 16 px, light and dark
89
+ ```
90
+
91
+ ### The face
92
+
93
+ `src/theme/fonts/mono.ts` holds JetBrains Mono (SIL Open Font License) as data: the latin range in
94
+ all weights for the page, and one weight without ligatures for text on the stage. It is made from
95
+ the family's own file:
96
+
97
+ ```bash
98
+ PYTHONPATH=tools/fonts python3 tools/fonts/build.py <jetbrainsmono latin variable .woff2>
99
+ ```
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { DrawingID } from '@classcad/sdkjs';
3
+ import { IconName } from '../../../icons';
4
+ type ConstraintKind = {
5
+ name: string;
6
+ icon: IconName;
7
+ call?: string;
8
+ };
9
+ /** What kind of 3d constraint a class is. */
10
+ export declare function constraintKind(objClass: string | undefined): ConstraintKind | undefined;
11
+ /**
12
+ * Props of {@link Constraints}.
13
+ *
14
+ * @category Panels
15
+ */
16
+ export type ConstraintsProps = {
17
+ /** The drawing whose current assembly's constraints are listed. */
18
+ drawingId: DrawingID;
19
+ };
20
+ /**
21
+ * Lists the constraints of the current assembly, and says whether the assembly's solver has solved them.
22
+ *
23
+ * A row has a context menu (rename, delete), and the pointer on it shows the mates the constraint joins
24
+ * ({@link HoveredConstraintDisplay}). Its props: {@link ConstraintsProps}. The example of {@link useEditMode} shows it
25
+ * for an assembly.
26
+ *
27
+ * @category Panels
28
+ */
29
+ export declare const Constraints: React.FC<ConstraintsProps>;
30
+ export {};
@@ -0,0 +1,83 @@
1
+ import { DrawingID } from '@classcad/sdkjs';
2
+ import React from 'react';
3
+ /**
4
+ * Props of {@link Drawing}.
5
+ *
6
+ * @category Panels
7
+ */
8
+ export type DrawingProps = {
9
+ /** The drawing to show, such as the active one (`useBuerli(s => s.drawing.active)`). */
10
+ drawingId: DrawingID;
11
+ /** What leads the bar, before the button that puts the sidebar away: a file menu, undo and redo. */
12
+ Menu?: React.JSX.Element;
13
+ /** What the bar ends with, before the theme switch. */
14
+ Trail?: React.ReactNode;
15
+ /**
16
+ * What the footer's first cell names before the engine's state (ready, working, not connected): where the engine
17
+ * runs, say. Default: `ClassCAD`.
18
+ */
19
+ Status?: React.ReactNode;
20
+ /**
21
+ * Shows the theme switch ({@link ThemeToggle}) at the end of the bar. `false` where the page has a switch of its
22
+ * own and sets the app's theme from it with {@link setRCadThemeMode}. Default `true`.
23
+ */
24
+ themeSwitch?: boolean;
25
+ /** Buttons of the app's own for the stage's right-hand dock, after the {@link ViewOptionButtons}. */
26
+ ViewOptions?: React.ReactNode;
27
+ /** When true, hides the feature toolbar and disables model-tree editing (browsing stays). Default `false`. */
28
+ readOnly?: boolean;
29
+ /** What fills the stage: the app's canvas, with the drawing's geometry in it. */
30
+ children?: React.ReactNode;
31
+ };
32
+ /**
33
+ * The app's frame around a drawing: a bar with its tools, a sidebar with the model's tree and its bodies, the stage,
34
+ * and a footer that says where things stand.
35
+ *
36
+ * It is what Buerligons is made of, in one piece: the {@link ToolBar} in the bar, the {@link SideBar}, and on the stage
37
+ * the {@link ViewOptionButtons}, the {@link ViewPlugButtons}, the {@link Messages}, and the windows of the active
38
+ * feature ({@link FeaturePlugin}) and of the global plugins ({@link GlobalPlugins}). It mounts the stylesheet
39
+ * ({@link AppStyle}) itself. The sidebar's edge is dragged to set its width, and a button in the bar puts it away;
40
+ * both are kept for the next visit (in `localStorage`).
41
+ *
42
+ * Drawing contains no canvas: the app's canvas is its child, and fills the stage. The plugins need the SDK's
43
+ * `PluginManager` mounted once in the app, and `BuerliPluginsGeometry` in the canvas for what they draw (both from
44
+ * `@classcad/react`).
45
+ *
46
+ * Where the app's `init` left the SDK's stock form controls in, Drawing hands the SDK react-cad's {@link elements}
47
+ * instead; an app that brought controls of its own keeps them. It also sets the colour of the model's edges and
48
+ * points in the SDK's geometry config to the theme's ink, whenever the theme changes.
49
+ *
50
+ * Its props: {@link DrawingProps}.
51
+ *
52
+ * @example
53
+ * ```tsx
54
+ * import { Canvas } from '@react-three/fiber'
55
+ * import { BuerliCadFacade } from '@classcad/client'
56
+ * import { useBuerliCadFacade } from '@classcad/react'
57
+ * import { Drawing, Menu, sessionClient, StageLook } from '@classcad/react-cad'
58
+ *
59
+ * function Editor() {
60
+ * const { drawingId, Geometry } = useBuerliCadFacade('bracket')
61
+ * const file = {
62
+ * undo: { caption: 'Undo', callback: () => BuerliCadFacade.utils.undo(drawingId) },
63
+ * redo: { caption: 'Redo', callback: () => BuerliCadFacade.utils.redo(drawingId) },
64
+ * }
65
+ * return (
66
+ * <Drawing
67
+ * drawingId={drawingId}
68
+ * Menu={<Menu items={file} trigger={['click']} />}
69
+ * Status="ClassCAD · in this tab"
70
+ * Trail={<a href="/help">Help</a>}
71
+ * readOnly={sessionClient.useSessionRole() === 'view'}>
72
+ * <Canvas orthographic>
73
+ * <StageLook />
74
+ * <Geometry />
75
+ * </Canvas>
76
+ * </Drawing>
77
+ * )
78
+ * }
79
+ * ```
80
+ *
81
+ * @category Panels
82
+ */
83
+ export declare const Drawing: React.FC<DrawingProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ /** A list that is not there yet: its label, and rows breathing. */
3
+ export declare const ListPlaceholder: React.FC;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ /**
3
+ * What the app has to say, as a toast: a dark card with a mark for its kind (a ring that turns
4
+ * while something is still working), its lead in bold, and when it was said.
5
+ */
6
+ export declare const Message: React.FC<{
7
+ msgId: string;
8
+ }>;
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import { DrawingID } from '@classcad/sdkjs';
3
+ export declare const MessageList: React.FC<{
4
+ isOpen: boolean;
5
+ }>;
6
+ /**
7
+ * Props of {@link Messages}.
8
+ *
9
+ * @category Panels
10
+ */
11
+ export type MessagesProps = {
12
+ /** The drawing the messages are of: when it changes, the log is cleared. */
13
+ drawingId: DrawingID;
14
+ };
15
+ /**
16
+ * The app's messages: what the SDK's `showMessage` (`@classcad/sdkjs`) says, as toasts and in a log.
17
+ *
18
+ * A new message comes up as a toast and leaves again after a few seconds; an error stays until the log has been
19
+ * opened. The button under the toasts opens the log of all of them, and a dot on it says that there are new ones;
20
+ * the log has a button that clears it. {@link Drawing} shows them in the stage's lower right corner.
21
+ *
22
+ * Its props: {@link MessagesProps}.
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * import { showMessage } from '@classcad/sdkjs'
27
+ * import type { DrawingID } from '@classcad/sdkjs'
28
+ * import { Messages } from '@classcad/react-cad'
29
+ *
30
+ * // where the app shows them: over the stage's lower right corner
31
+ * const Toasts = () => (
32
+ * <div style={{ position: 'absolute', right: 12, bottom: 12, zIndex: 6 }}>
33
+ * <Messages drawingId={drawingId} />
34
+ * </div>
35
+ * )
36
+ *
37
+ * // anywhere in the app: a toast, and a line in the log
38
+ * showMessage({ type: 'warning', text: 'The sketch is not closed: nothing was extruded.', drawingId })
39
+ * ```
40
+ *
41
+ * @category Panels
42
+ */
43
+ export declare const Messages: React.FC<MessagesProps>;
@@ -0,0 +1 @@
1
+ export * from './Messages';
@@ -0,0 +1,18 @@
1
+ import { StoreApi } from 'zustand';
2
+ import { Message } from '@classcad/sdkjs';
3
+ export type MessageT = Message & {
4
+ timestamp: number;
5
+ isShown: boolean;
6
+ };
7
+ type StoreT = {
8
+ msgs: Record<string, MessageT>;
9
+ api: ReturnType<typeof createApi>;
10
+ };
11
+ declare function createApi(set: StoreApi<StoreT>['setState']): {
12
+ setMsg: (msgId: string, msg: MessageT) => void;
13
+ deleteMsg: (msgId: string) => void;
14
+ deleteAllMsgs: () => void;
15
+ setShown: () => void;
16
+ };
17
+ export declare const useMsgStore: import("zustand").UseBoundStore<StoreApi<StoreT>>;
18
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { DrawingID } from '@classcad/sdkjs';
3
+ export declare const AssemblyNodeList: React.FC<{
4
+ drawingId: DrawingID;
5
+ }>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { DrawingID, ObjectID } from '@classcad/sdkjs';
3
+ export declare const Feature: React.FC<{
4
+ drawingId: DrawingID;
5
+ featureRefId: ObjectID;
6
+ /** Its number in the part's history (the features a part starts with have none). */
7
+ no?: number;
8
+ }>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID } from '@classcad/sdkjs';
3
+ import '../../../../../types/jsx-compat';
4
+ export declare const FeatureList: React.FC<{
5
+ drawingId: DrawingID;
6
+ }>;
@@ -0,0 +1 @@
1
+ export { FeatureList } from './FeatureList';
@@ -0,0 +1,26 @@
1
+ import { DrawingID, ObjectID } from '@classcad/sdkjs';
2
+ import { IconName } from '../../../../../icons';
3
+ export declare function useFeaturesIds(drawingId: DrawingID, curInstanceId: ObjectID): ObjectID[];
4
+ export declare function getFeaturesIds(drawingId: DrawingID, curInstanceId: ObjectID): ObjectID[];
5
+ type FeatureKind = {
6
+ name: string;
7
+ icon: IconName;
8
+ call?: string;
9
+ };
10
+ /** What kind of feature a class is. */
11
+ export declare function featureKind(objClass: string | undefined): FeatureKind | undefined;
12
+ /**
13
+ * A feature's drawing: its kind's, or, for one of the seven a part starts with (by its place in
14
+ * the operation sequence), that datum's own.
15
+ */
16
+ export declare function featureIcon(objClass: string | undefined, index?: number): IconName;
17
+ export declare function getMenuHeader(drawingId: DrawingID, objId: ObjectID): {
18
+ name: string;
19
+ icon: string;
20
+ call: string | undefined;
21
+ } | {
22
+ name: string;
23
+ icon: null;
24
+ call: undefined;
25
+ };
26
+ export {};
@@ -0,0 +1,56 @@
1
+ import { DrawingID } from '@classcad/sdkjs';
2
+ import React from 'react';
3
+ /**
4
+ * Props of {@link ModelTree}.
5
+ *
6
+ * @category Panels
7
+ */
8
+ export type ModelTreeProps = {
9
+ /** The drawing whose model is shown. */
10
+ drawingId: DrawingID;
11
+ };
12
+ /**
13
+ * Shows the structure of the model: a part's features, or an assembly's nodes.
14
+ *
15
+ * Which of the two it shows is the {@link useEditMode} of the drawing. For a part it is the list of its features in
16
+ * the order they are built, with the rollback bar: a feature is dragged to reorder it, double-clicked to open its
17
+ * 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
18
+ * 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
19
+ * it, convert to a subassembly, open the products. With neither a part nor an assembly, it shows a placeholder.
20
+ * Read-only ({@link DrawingProps.readOnly}), the tree is browsed but not edited.
21
+ *
22
+ * Its props: {@link ModelTreeProps}.
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * import { Canvas } from '@react-three/fiber'
27
+ * import { BuerliPluginsGeometry, useBuerliCadFacade } from '@classcad/react'
28
+ * import { AppStyle, FeaturePlugin, FtVisibilityController, GlobalPlugins, Messages, ModelTree, StageLook, ToolBar } from '@classcad/react-cad'
29
+ *
30
+ * // The pieces laid out by the app instead of Drawing: then `init` is given react-cad's `elements` by the app.
31
+ * function Workbench() {
32
+ * const { drawingId, Geometry } = useBuerliCadFacade('bracket')
33
+ * return (
34
+ * <div className="rcad" style={{ display: 'grid', gridTemplate: '48px 1fr / 280px 1fr', height: '100vh' }}>
35
+ * <AppStyle />
36
+ * <header style={{ gridColumn: 'span 2' }}><ToolBar drawingId={drawingId} /></header>
37
+ * <aside><ModelTree drawingId={drawingId} /></aside>
38
+ * <main style={{ position: 'relative' }}>
39
+ * <Canvas orthographic>
40
+ * <StageLook />
41
+ * <Geometry />
42
+ * <BuerliPluginsGeometry drawingId={drawingId} />
43
+ * </Canvas>
44
+ * <Messages drawingId={drawingId} />
45
+ * </main>
46
+ * <FeaturePlugin drawingId={drawingId} />
47
+ * <GlobalPlugins drawingId={drawingId} />
48
+ * <FtVisibilityController drawingId={drawingId} />
49
+ * </div>
50
+ * )
51
+ * }
52
+ * ```
53
+ *
54
+ * @category Panels
55
+ */
56
+ export declare const ModelTree: React.FC<ModelTreeProps>;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { DrawingID } from '@classcad/sdkjs';
3
+ /**
4
+ * The model tree header.
5
+ *
6
+ * Responsibility:
7
+ * - Show name of current instance
8
+ * - Show back button
9
+ * - Show assembly node menu
10
+ * - Provide convert to template functionality
11
+ * - Provide import/add functionality
12
+ */
13
+ export declare const ModelTreeHeader: React.FC<{
14
+ drawingId: DrawingID;
15
+ }>;
@@ -0,0 +1 @@
1
+ export { ModelTree } from './ModelTree';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ /** The chevron a row is folded and unfolded with: it turns when the row is open. */
3
+ export declare const CollapseButton: React.FC<{
4
+ collapsed: boolean;
5
+ onClick: () => void;
6
+ }>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { DrawingID } from '@classcad/sdkjs';
3
+ import { MenuElement } from '../common/ContextMenu';
4
+ export declare function useContextMenuItems(drawingId: DrawingID, setRename: React.Dispatch<React.SetStateAction<boolean>>): MenuElement[];
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export type PBContextProps = {
3
+ pluginBoundsRef: React.MutableRefObject<HTMLDivElement>;
4
+ };
5
+ export declare const PBContext: React.Context<PBContextProps>;
6
+ export declare const PluginBounds: React.FC<{
7
+ children?: React.ReactNode;
8
+ }>;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { TooltipProps } from 'antd';
3
+ type PluginTooltipT = Omit<TooltipProps, 'color' | 'placement' | 'open' | 'align' | 'onOpenChange'>;
4
+ export declare const PluginTooltip: React.FC<PluginTooltipT>;
5
+ export {};
@@ -0,0 +1,99 @@
1
+ import React from 'react';
2
+ import { DrawingID } from '@classcad/sdkjs';
3
+ /**
4
+ * Where and how wide a plugin's window is.
5
+ *
6
+ * @inline
7
+ */
8
+ type ModalProps = {
9
+ /** The window's width (px, or a CSS length). */
10
+ width?: string | number;
11
+ /** The leftmost and topmost the window's corner goes, in the browser window (px): it opens there at the least. */
12
+ minPosition?: {
13
+ /** The leftmost. */
14
+ x?: number;
15
+ /** The topmost. */
16
+ y?: number;
17
+ };
18
+ /** The style of the window's body, such as its `maxHeight`. */
19
+ bodyStyle?: React.CSSProperties;
20
+ };
21
+ /**
22
+ * Props of {@link FeaturePlugin}.
23
+ *
24
+ * @category Panels
25
+ */
26
+ export type FeaturePluginProps = {
27
+ /** The drawing whose active feature's dialog is shown. */
28
+ drawingId: DrawingID;
29
+ /** Where and how wide the window is. */
30
+ modalProps?: ModalProps;
31
+ };
32
+ /**
33
+ * The window of the active feature: the dialog of the feature's plugin, in a window that can be dragged.
34
+ *
35
+ * The active feature is the drawing's `plugin.active.feature` (set by the {@link ToolBar} for a new feature, and by
36
+ * a double click in the {@link ModelTree}). The window's head is the feature's drawing, its name and the call that
37
+ * makes it; closing it sets the active feature to none. It renders nothing while no feature is active.
38
+ * {@link Drawing} renders it over the stage.
39
+ *
40
+ * Its props: {@link FeaturePluginProps}.
41
+ *
42
+ * @example
43
+ * ```tsx
44
+ * import { getDrawing } from '@classcad/sdkjs'
45
+ * import type { DrawingID, ObjectID } from '@classcad/sdkjs'
46
+ * import { FeaturePlugin } from '@classcad/react-cad'
47
+ *
48
+ * // the window, once, over the app's stage
49
+ * const Dialog = () => <FeaturePlugin drawingId={drawingId} modalProps={{ width: 312, minPosition: { x: 300, y: 60 } }} />
50
+ *
51
+ * // a feature's dialog opened from the app: the window shows it
52
+ * getDrawing(drawingId).api.plugin.setActiveFeature(extrusionId)
53
+ * ```
54
+ *
55
+ * @category Panels
56
+ */
57
+ export declare const FeaturePlugin: React.FC<FeaturePluginProps>;
58
+ /**
59
+ * Props of {@link GlobalPlugins}.
60
+ *
61
+ * @category Panels
62
+ */
63
+ export type GlobalPluginsProps = {
64
+ /** The drawing whose global plugins are shown. */
65
+ drawingId: DrawingID;
66
+ /** Where and how wide their windows are. */
67
+ modalProps?: ModalProps;
68
+ };
69
+ /**
70
+ * The windows of the drawing's global plugins (Measure, Expressions, Products, …): one for each plugin that is on.
71
+ *
72
+ * The global plugins are the ones `init`'s `globalPlugins` gives every drawing. A plugin is switched on and off with
73
+ * the drawing's `api.plugin.setActiveGlobal` (as the {@link ViewPlugButtons} and the model tree's header do), and
74
+ * closing its window switches it off. {@link Drawing} renders them over the stage; an app that composes the pieces
75
+ * itself renders them once, anywhere.
76
+ *
77
+ * Its props: {@link GlobalPluginsProps}.
78
+ *
79
+ * @example
80
+ * ```tsx
81
+ * import { getDrawing } from '@classcad/sdkjs'
82
+ * import type { DrawingID } from '@classcad/sdkjs'
83
+ * import { GlobalPlugins } from '@classcad/react-cad'
84
+ *
85
+ * // the windows, once, anywhere in the app
86
+ * const Windows = () => <GlobalPlugins drawingId={drawingId} modalProps={{ width: 380, minPosition: { x: 300, y: 60 } }} />
87
+ *
88
+ * // a button of the app's own that opens the Measure panel
89
+ * const openMeasure = () => {
90
+ * const { plugin, api } = getDrawing(drawingId)
91
+ * const measure = plugin.global.find((id) => plugin.refs[id].name === 'Measure')
92
+ * if (measure) api.plugin.setActiveGlobal(measure, true)
93
+ * }
94
+ * ```
95
+ *
96
+ * @category Panels
97
+ */
98
+ export declare const GlobalPlugins: React.FC<GlobalPluginsProps>;
99
+ export {};
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ /**
3
+ * Read-only mode for the CAD editing chrome. When true, `<Drawing>` hides the
4
+ * feature-creation toolbar and the model-tree editing actions (delete, rename,
5
+ * reorder, double-click-to-edit) are suppressed, leaving browsing/selection
6
+ * intact. Consumed via `useReadOnly()`. Defaults to false, so existing callers
7
+ * that don't pass `readOnly` are unaffected.
8
+ */
9
+ export declare const ReadOnlyContext: React.Context<boolean>;
10
+ export declare const useReadOnly: () => boolean;