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

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 +55 -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 +108 -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,115 @@
1
+ import React from 'react';
2
+ import type { DropDownProps } from 'antd';
3
+ import type { MenuDividerType, MenuItemGroupType, MenuItemType, SubMenuType } from 'antd/es/menu/interface';
4
+ import { InteractionInfo } from '@classcad/sdkjs';
5
+ /**
6
+ * What a {@link ContextMenu} is opened on: buerli's interaction info of the thing.
7
+ *
8
+ * @inline
9
+ */
10
+ type MenuInfoBase = {
11
+ /** The thing the menu is on (its object, its product, its graphic), as buerli's `createInfo` makes it. */
12
+ interactionInfo: InteractionInfo;
13
+ };
14
+ /**
15
+ * What a {@link ContextMenu} is opened on, which its entries' handlers are called with: the thing's interaction info,
16
+ * and with a type argument also `clickInfo`, what the app knows of the click (such as where on the stage it was).
17
+ *
18
+ * @typeParam T - The type of `clickInfo`; without it there is none.
19
+ * @category UI Elements
20
+ */
21
+ export type MenuInfo<T = void> = T extends void ? MenuInfoBase : MenuInfoBase & {
22
+ /** What the app knows of the click that opened the menu. */
23
+ clickInfo: T;
24
+ };
25
+ /**
26
+ * An entry: antd's menu item, with handlers that are called with the menu's {@link MenuInfo}.
27
+ *
28
+ * @inline
29
+ */
30
+ type MenuItemElement = Omit<MenuItemType, 'onClick'> & {
31
+ /** Called when the entry is clicked; the menu closes. */
32
+ onClick?: (menuInfo: MenuInfo<any>) => void;
33
+ /** Called when the pointer comes onto the entry (to show what it would do, say). */
34
+ onMouseEnter?: (menuInfo: MenuInfo<any>) => void;
35
+ /** Called when the pointer leaves the entry. */
36
+ onMouseLeave?: (menuInfo: MenuInfo<any>) => void;
37
+ };
38
+ /**
39
+ * A submenu: antd's, with entries that may be made when it opens.
40
+ *
41
+ * @inline
42
+ */
43
+ type SubMenuElement = Omit<SubMenuType, 'onClick' | 'children'> & {
44
+ /** Its entries, or a function that makes them from the menu's {@link MenuInfo}. */
45
+ children: MenuElement[] | ((menuInfo: MenuInfo<any>) => MenuElement[]);
46
+ /** Called when the submenu's title is clicked. */
47
+ onClick?: (menuInfo: MenuInfo<any>) => void;
48
+ };
49
+ /**
50
+ * A group of entries under a title: antd's.
51
+ *
52
+ * @inline
53
+ */
54
+ type MenuItemGroupElement = Omit<MenuItemGroupType, 'children'> & {
55
+ /** The entries of the group. */
56
+ children: MenuElement[];
57
+ };
58
+ /**
59
+ * An entry of a {@link ContextMenu}: antd's menu items (an item, a submenu, a group, a divider) with handlers that
60
+ * take the menu's {@link MenuInfo}. `null` is left out, for entries that are there only sometimes.
61
+ *
62
+ * @category UI Elements
63
+ */
64
+ export type MenuElement = MenuItemElement | SubMenuElement | MenuItemGroupElement | MenuDividerType | null;
65
+ /**
66
+ * Props of {@link ContextMenu}, and any of antd's `Dropdown` props (`trigger`, `open`, …).
67
+ *
68
+ * @category UI Elements
69
+ */
70
+ export type ContextMenuProps = {
71
+ /** The entries. */
72
+ items: MenuElement[];
73
+ /** What the menu is on: the entries' handlers are called with it. */
74
+ menuInfo: MenuInfo<any>;
75
+ /** The menu's head: what the thing is (its name). */
76
+ caption: string;
77
+ /** A drawing in front of the caption, such as an {@link Icon}. */
78
+ icon?: React.JSX.Element;
79
+ /** Called when the menu closes, after a click on an entry or beside it. */
80
+ onHide?: () => void;
81
+ } & DropDownProps;
82
+ /**
83
+ * The menu on a thing: its head says what the thing is, its entries what can be done with it.
84
+ *
85
+ * It is antd's `Dropdown` around its children, which open it as its `trigger` says (`['contextMenu']` for a right
86
+ * click). The entries' handlers are called with the `menuInfo`, so one list of entries serves every thing of a kind;
87
+ * a submenu's entries may be made when it opens. While it is open, a blank layer over the app (which {@link Drawing}
88
+ * renders) takes the click beside it that closes it. Its props: {@link ContextMenuProps}.
89
+ *
90
+ * @example
91
+ * ```tsx
92
+ * import { createInfo, getDrawing } from '@classcad/sdkjs'
93
+ * import type { DrawingID, ObjectID } from '@classcad/sdkjs'
94
+ * import { ContextMenu, Icon } from '@classcad/react-cad'
95
+ * import type { MenuElement } from '@classcad/react-cad'
96
+ *
97
+ * // one list of entries for every row of a list of the app's: the handlers are told which object the menu is on
98
+ * const rowMenu = (drawingId: DrawingID): MenuElement[] => [
99
+ * { key: 'select', label: 'Select', onClick: ({ interactionInfo }) => getDrawing(drawingId).api.interaction.select(interactionInfo) },
100
+ * { type: 'divider' },
101
+ * { key: 'hide', label: 'Hide', onClick: ({ interactionInfo }) => getDrawing(drawingId).api.plugin.setVisiblePlugin(interactionInfo.objectId, false) },
102
+ * ]
103
+ *
104
+ * const Row = ({ drawingId, objectId, name }: { drawingId: DrawingID; objectId: ObjectID; name: string }) => (
105
+ * <ContextMenu items={rowMenu(drawingId)} menuInfo={{ interactionInfo: createInfo({ objectId }) }}
106
+ * caption={name} icon={<Icon name="workPlane" size={16} />} trigger={['contextMenu']}>
107
+ * <div>{name}</div>
108
+ * </ContextMenu>
109
+ * )
110
+ * ```
111
+ *
112
+ * @category UI Elements
113
+ */
114
+ export declare const ContextMenu: React.FC<ContextMenuProps>;
115
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { DividerProps } from 'antd';
3
+ declare const Divider: React.FC<DividerProps>;
4
+ export { Divider };
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ /**
3
+ * The name of a thing in one of the app's lists: one line, cut with an ellipsis.
4
+ * With `onClick` it can be taken up (to be renamed).
5
+ */
6
+ export declare const EntityName: React.FC<{
7
+ name: string;
8
+ /** (its counterpart on the stage is under the pointer: the row says so, the name stays as it is) */
9
+ underlined?: boolean;
10
+ strong?: boolean;
11
+ disabled?: boolean;
12
+ onClick?: () => void;
13
+ className?: string;
14
+ }>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ /**
3
+ * An image that is an icon. Its `src` is a drawing's reference (see icons/legacy), which is drawn
4
+ * in the theme's ink, or any image's url.
5
+ */
6
+ export declare const Img: React.FC<React.ImgHTMLAttributes<HTMLImageElement>>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ /** The stage while a model loads: quiet, and one line saying so. */
3
+ export declare const LoadingScreen: React.FC<{
4
+ isLoading?: boolean;
5
+ style?: React.CSSProperties;
6
+ className?: string;
7
+ children?: React.ReactNode;
8
+ }>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ /** Working: a ring that turns. */
3
+ export declare const Spinner: React.FC;
@@ -0,0 +1 @@
1
+ export { LoadingScreen } from './LoadingScreen';
@@ -0,0 +1,81 @@
1
+ import React from 'react';
2
+ import type { DropDownProps } from 'antd';
3
+ /**
4
+ * An entry of a {@link Menu}: what it says, and what a click on it does.
5
+ *
6
+ * @category UI Elements
7
+ */
8
+ export type MenuItem = {
9
+ /** What the entry says. */
10
+ caption: string | React.JSX.Element;
11
+ /** A drawing in front of it, such as an {@link Icon}. */
12
+ icon?: React.JSX.Element;
13
+ /** Called when the entry is clicked (or chosen with the keyboard). */
14
+ callback: (e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
15
+ /** An entry has no entries of its own; one with entries is a submenu. */
16
+ children?: undefined;
17
+ };
18
+ /**
19
+ * An entry of a {@link Menu} that opens entries of its own.
20
+ *
21
+ * @inline
22
+ */
23
+ export type SubMenuItem = {
24
+ /** What the entry says. */
25
+ caption: string;
26
+ /** A drawing in front of it. */
27
+ icon?: React.JSX.Element;
28
+ /** Its entries, by key. */
29
+ children: Record<string, MenuItem>;
30
+ };
31
+ /**
32
+ * The entries of a {@link Menu}, by key, in the order they are shown: each a {@link MenuItem}, or a submenu with
33
+ * entries of its own (`{ caption, icon?, children: { [key]: MenuItem } }`).
34
+ *
35
+ * @category UI Elements
36
+ */
37
+ export type MenuItems = Record<string, MenuItem | SubMenuItem>;
38
+ /**
39
+ * Props of {@link Menu}: its entries, and any of antd's `Dropdown` props (but `overlay`) to set how it opens.
40
+ *
41
+ * @category UI Elements
42
+ */
43
+ export type RCadMenuProps = Omit<{
44
+ /** The entries. */
45
+ items: MenuItems;
46
+ } & DropDownProps, 'overlay'>;
47
+ /**
48
+ * A dropdown menu on a button: by default a small button with three dots, or what is given as its children.
49
+ *
50
+ * It is antd's `Dropdown`, with the {@link MenuItems} as its entries; an entry with `children` opens a submenu. A click
51
+ * on an entry calls its `callback`, and does not reach what lies under the menu. Its props: {@link RCadMenuProps}.
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * import { createApi } from '@classcad/client'
56
+ * import type { DrawingID } from '@classcad/sdkjs'
57
+ * import { Icon, Menu } from '@classcad/react-cad'
58
+ * import type { MenuItems } from '@classcad/react-cad'
59
+ *
60
+ * // a file menu: a button with its icon, and a submenu of the formats
61
+ * function FileMenu({ drawingId }: { drawingId: DrawingID }) {
62
+ * const save = (format: 'STP' | 'STL' | 'OFB') => createApi(drawingId).v1.common.save({ format, encoding: 'base64' })
63
+ * const items: MenuItems = {
64
+ * clear: { caption: 'New', icon: <Icon name="file" size={16} />, callback: () => createApi(drawingId).v1.common.clear() },
65
+ * save: {
66
+ * caption: 'Save as',
67
+ * icon: <Icon name="export" size={16} />,
68
+ * children: { stp: { caption: 'STEP', callback: () => save('STP') }, stl: { caption: 'STL', callback: () => save('STL') } },
69
+ * },
70
+ * }
71
+ * return (
72
+ * <Menu items={items} trigger={['click']}>
73
+ * <button className="rcad-tool"><Icon name="menu" size={18} /></button>
74
+ * </Menu>
75
+ * )
76
+ * }
77
+ * ```
78
+ *
79
+ * @category UI Elements
80
+ */
81
+ export declare const Menu: React.FC<RCadMenuProps>;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { ObjectID, DrawingID, InteractionInfo } from '@classcad/sdkjs';
3
+ export declare const MultiSelectContext: React.Context<{
4
+ setLastSelected: (objId: ObjectID, overwrite?: boolean) => void;
5
+ multiSelect: (objId: ObjectID) => void;
6
+ }>;
7
+ export declare const MultiSelect: React.FC<{
8
+ children: React.ReactNode;
9
+ drawingId: DrawingID;
10
+ items: ObjectID[];
11
+ createInfo: (objId: ObjectID) => InteractionInfo;
12
+ }>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare const NameEdit: React.FC<{
3
+ style?: React.CSSProperties;
4
+ name: string;
5
+ setEditName: React.Dispatch<React.SetStateAction<boolean>>;
6
+ onEnter: (text: string) => void;
7
+ }>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ /**
3
+ * The label over a list of the sidebar: what the list holds, and how many. Mono capitals.
4
+ * Anything else it is given (a button) sits at its end.
5
+ */
6
+ export declare const SectionHeader: React.FC<{
7
+ count?: number;
8
+ children?: React.ReactNode;
9
+ }>;
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ export declare const FlexRow: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
+ style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
4
+ }> & string;
5
+ export declare const FlexReverseRow: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
6
+ style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
7
+ }> & string;
8
+ export declare const Link: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "style"> & {
9
+ style?: React.CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
10
+ }, {
11
+ underlined?: boolean;
12
+ }>> & string;
13
+ /**
14
+ * A row that lights up under the pointer. With `bordered` it is a row of one of the app's lists;
15
+ * the states a row can be in are attributes, which the stylesheet draws (see AppStyle).
16
+ */
17
+ export declare const HoveredDiv: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
18
+ /** Lit: under the pointer here, or its counterpart on the stage is. */
19
+ hovered?: boolean;
20
+ /** A row of a list (its drawing, its name, what can be done to it). Without it: a plain area that lights up. */
21
+ bordered?: boolean;
22
+ /** Shown, but not to be touched. */
23
+ blocked?: boolean;
24
+ /** The one being worked on: lit, its name a weight heavier. */
25
+ active?: boolean;
26
+ /** Picked. */
27
+ selected?: boolean;
28
+ /** There, but not in force (rolled back, suppressed). */
29
+ off?: boolean;
30
+ /**
31
+ * Brought into view in its list when this turns true: picked on the stage, the row is found in the sidebar however
32
+ * long the list. By default as it is `selected`.
33
+ */
34
+ reveal?: boolean;
35
+ } & React.RefAttributes<HTMLDivElement>>;
36
+ export { HoveredDiv as Row };
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ /**
3
+ * Scrolls the list a row lies in just so far that the row is wholly in view; a row in view stays where it is. Only
4
+ * that list moves, never the page around the app. A row that is not laid out (in a folded nest) is left alone.
5
+ */
6
+ export declare function revealInList(row: HTMLElement): void;
7
+ /**
8
+ * Brings a row of a list into view when it is picked: a feature, an instance or a body picked on the stage is found
9
+ * in the sidebar, however long the list. It acts when `picked` turns true (and when the row comes with it), not
10
+ * while it stays so, so the list can be scrolled away from it.
11
+ */
12
+ export declare function useRevealWhenPicked(row: React.RefObject<HTMLElement | null>, picked_: boolean): void;
@@ -0,0 +1,13 @@
1
+ export { useContextMenuInteraction } from './useContextMenuInteraction';
2
+ export { useContextMenuItems } from './useContextMenuItems';
3
+ export { useCurrentInstance } from './useCurrentInstance';
4
+ export { useCurrentProduct } from './useCurrentProduct';
5
+ export { EditMode, useEditMode } from './useEditMode';
6
+ export { useGlobalMateInfo } from './useGlobalMateInfo';
7
+ export { useHasPending } from './useHasPending';
8
+ export { useIsLoading } from './useIsLoading';
9
+ export { useIsSketchActive } from './useIsSketchActive';
10
+ export { useObjectDetails } from './useObjectDetails';
11
+ export { useOperationSequence } from './useOperationSequence';
12
+ export { useRollbackBar } from './useRollbackBar';
13
+ export { useRoot } from './useRoot';
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { DrawingID } from '@classcad/sdkjs';
3
+ export declare const useContextMenuInteraction: (drawingId: DrawingID, hasMenu?: boolean) => {
4
+ isContextMenuActive: boolean;
5
+ onContextMenu: (e: React.MouseEvent) => void;
6
+ onHide: () => void;
7
+ };
@@ -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, setEditName: React.Dispatch<React.SetStateAction<boolean>>): MenuElement[];
@@ -0,0 +1,2 @@
1
+ import { DrawingID } from '@classcad/sdkjs';
2
+ export declare const useCurrentInstance: (drawingId: DrawingID) => import("@classcad/api-js").ScgObject | undefined;
@@ -0,0 +1,2 @@
1
+ import { DrawingID } from '@classcad/sdkjs';
2
+ export declare const useCurrentProduct: (drawingId: DrawingID) => import("@classcad/api-js").ScgObject | undefined;
@@ -0,0 +1,40 @@
1
+ import { DrawingID } from '@classcad/sdkjs';
2
+ /**
3
+ * What the drawing is being worked on as: a part, an assembly, or nothing yet ({@link useEditMode}).
4
+ *
5
+ * @category Hooks
6
+ */
7
+ export declare enum EditMode {
8
+ /** Neither: the drawing has no current product yet. */
9
+ None = 0,
10
+ /** A part: its features are built. */
11
+ Part = 1,
12
+ /** An assembly: its instances are put together. */
13
+ Assembly = 2
14
+ }
15
+ /**
16
+ * Returns what the drawing is being worked on as: a part, an assembly, or neither; and renders again when it changes.
17
+ *
18
+ * It is {@link EditMode.Part} where the current product is a part, or where the drawing's root is one;
19
+ * {@link EditMode.Assembly} where the current product is an assembly. The {@link ModelTree} shows a part's features or
20
+ * an assembly's nodes by it.
21
+ *
22
+ * @param drawingId - The drawing.
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * import type { DrawingID } from '@classcad/sdkjs'
27
+ * import { Constraints, EditMode, Solids, useEditMode } from '@classcad/react-cad'
28
+ *
29
+ * // the lower pane of a sidebar of the app's own: a part's bodies, an assembly's constraints
30
+ * function LowerPane({ drawingId }: { drawingId: DrawingID }) {
31
+ * const mode = useEditMode(drawingId)
32
+ * if (mode === EditMode.Part) return <Solids drawingId={drawingId} />
33
+ * if (mode === EditMode.Assembly) return <Constraints drawingId={drawingId} />
34
+ * return <p>Open a part or an assembly.</p>
35
+ * }
36
+ * ```
37
+ *
38
+ * @category Hooks
39
+ */
40
+ export declare const useEditMode: (drawingId: DrawingID) => EditMode;
@@ -0,0 +1,6 @@
1
+ import { DrawingID } from '@classcad/sdkjs';
2
+ /** How far the part is built: the feature the rollback bar stands under, of how many. */
3
+ export declare function useFeatureCount(drawingId: DrawingID): {
4
+ built: number;
5
+ total: number;
6
+ };
@@ -0,0 +1,6 @@
1
+ import { DrawingID, ObjectID, SelectedItem } from '@classcad/sdkjs';
2
+ export declare const useGlobalMateInfo: (drawingId: DrawingID, instances?: ObjectID[], includeSelected?: boolean) => {
3
+ selItems: SelectedItem[];
4
+ activeSelItems: SelectedItem[];
5
+ activeRigidsets: number[];
6
+ };
@@ -0,0 +1,27 @@
1
+ import { DrawingID } from '@classcad/sdkjs';
2
+ /**
3
+ * Returns whether the drawing has commands the engine has not answered yet, and renders again when that changes.
4
+ *
5
+ * @param drawingId - The drawing.
6
+ * @returns `true` while one or more commands are pending.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * import { useBuerliCadFacade } from '@classcad/react'
11
+ * import { useHasPending } from '@classcad/react-cad'
12
+ *
13
+ * // a button that builds a box, and waits while the engine is busy
14
+ * function AddBox({ partId }: { partId: number }) {
15
+ * const { api, drawingId } = useBuerliCadFacade('bracket')
16
+ * const busy = useHasPending(drawingId)
17
+ * return (
18
+ * <button disabled={busy} onClick={() => api.v1.part.box({ id: partId, width: 20, length: 20, height: 20 })}>
19
+ * {busy ? 'Working…' : 'Add a box'}
20
+ * </button>
21
+ * )
22
+ * }
23
+ * ```
24
+ *
25
+ * @category Hooks
26
+ */
27
+ export declare const useHasPending: (drawingId: DrawingID) => boolean;
@@ -0,0 +1,2 @@
1
+ import { DrawingID, ObjectID } from '@classcad/sdkjs';
2
+ export declare const useIsDisabled: (drawingId: DrawingID, featureId: ObjectID) => boolean;
@@ -0,0 +1,25 @@
1
+ import { DrawingID } from '@classcad/sdkjs';
2
+ /**
3
+ * Returns whether the drawing is loading a model (a pending command whose name has `.load` in it), and renders again
4
+ * when that changes.
5
+ *
6
+ * {@link Drawing} covers the stage with its loading screen while it is.
7
+ *
8
+ * @param drawingId - The drawing.
9
+ * @returns `true` while a load is pending.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * import type { DrawingID } from '@classcad/sdkjs'
14
+ * import { useIsLoading } from '@classcad/react-cad'
15
+ *
16
+ * // what the app shows over its stage while a model is loaded
17
+ * function LoadingVeil({ drawingId }: { drawingId: DrawingID }) {
18
+ * const loading = useIsLoading(drawingId)
19
+ * return loading ? <div className="veil">Loading the model…</div> : null
20
+ * }
21
+ * ```
22
+ *
23
+ * @category Hooks
24
+ */
25
+ export declare const useIsLoading: (drawingId: DrawingID) => boolean;
@@ -0,0 +1,26 @@
1
+ import { DrawingID } from '@classcad/sdkjs';
2
+ /**
3
+ * Returns whether the drawing's active feature is a sketch, that is, whether its sketch is being edited; and renders
4
+ * again when that changes.
5
+ *
6
+ * The stage turns to paper while it is, and the canvas interaction of an app leaves the sketch's own to the sketcher.
7
+ * {@link sketchUtils}.isSketchActive asks the same outside of a component.
8
+ *
9
+ * @param drawingId - The drawing.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * import { OrbitControls } from '@react-three/drei'
14
+ * import type { DrawingID } from '@classcad/sdkjs'
15
+ * import { useIsSketchActive } from '@classcad/react-cad'
16
+ *
17
+ * // in the canvas: while a sketch is edited, the view does not turn away from its plane
18
+ * function Controls({ drawingId }: { drawingId: DrawingID }) {
19
+ * const sketching = useIsSketchActive(drawingId)
20
+ * return <OrbitControls makeDefault enableRotate={!sketching} />
21
+ * }
22
+ * ```
23
+ *
24
+ * @category Hooks
25
+ */
26
+ export declare const useIsSketchActive: (drawingId: DrawingID) => boolean;
@@ -0,0 +1,12 @@
1
+ import { DrawingID, ScgObject, ObjectID } from '@classcad/sdkjs';
2
+ type ObjectDetails = {
3
+ obj?: ScgObject;
4
+ isPart?: boolean;
5
+ isAssembly?: boolean;
6
+ isAssemblyNode?: boolean;
7
+ isRoot?: boolean;
8
+ isCurrProd?: boolean;
9
+ isCurrInstance?: boolean;
10
+ };
11
+ export declare const useObjectDetails: (drawingId: DrawingID, objectId: ObjectID) => ObjectDetails;
12
+ export {};
@@ -0,0 +1,29 @@
1
+ import { DrawingID, ObjectID } from '@classcad/sdkjs';
2
+ /**
3
+ * Returns the id of a part's operation sequence (`CC_OperationSequence`), the list its features are in; and renders
4
+ * again when the part's children change.
5
+ *
6
+ * The sequence's children are the references to the part's features, in the order they are built.
7
+ *
8
+ * @param drawingId - The drawing.
9
+ * @param partId - The part.
10
+ * @returns The sequence's id, or `null` where the part has none.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * import { useDrawing } from '@classcad/react'
15
+ * import type { DrawingID, ObjectID } from '@classcad/sdkjs'
16
+ * import { useOperationSequence } from '@classcad/react-cad'
17
+ *
18
+ * // how many features a part has
19
+ * function FeatureCount({ drawingId, partId }: { drawingId: DrawingID; partId: ObjectID }) {
20
+ * const sequence = useOperationSequence(drawingId, partId)
21
+ * const count = useDrawing(drawingId, (d) => (sequence ? d.structure.tree[sequence]?.children?.length : 0)) ?? 0
22
+ * return <span>{count} features</span>
23
+ * }
24
+ * ```
25
+ *
26
+ * @advanced
27
+ * @category Hooks
28
+ */
29
+ export declare const useOperationSequence: (drawingId: DrawingID, partId: ObjectID) => ObjectID | null;
@@ -0,0 +1,8 @@
1
+ import { DrawingID, ScgObject, ObjectID } from '@classcad/sdkjs';
2
+ type RollbackBarInfo = {
3
+ operationSequence?: ScgObject;
4
+ rollbackBar?: ScgObject;
5
+ rollbackBarIndex: number;
6
+ };
7
+ export declare const useRollbackBar: (drawingId: DrawingID, partId: ObjectID) => RollbackBarInfo;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import { DrawingID } from '@classcad/sdkjs';
2
+ export declare const useRoot: (drawingId: DrawingID) => import("@classcad/api-js").ScgObject | undefined;
@@ -0,0 +1,27 @@
1
+ export { Constraints } from './Constraints';
2
+ export { Drawing } from './Drawing';
3
+ export { Messages } from './Messages';
4
+ export { ModelTree } from './ModelTree';
5
+ export { FeaturePlugin, GlobalPlugins } from './PluginsWindows';
6
+ export { SideBar } from './SideBar';
7
+ export { Solids } from './Solids';
8
+ export { ToolBar } from './ToolBar';
9
+ export { ViewOptionButtons } from './ViewOptionsBar/ViewOptionButtons';
10
+ export { getViewOptions, setViewOptions } from './ViewOptionsBar/useOptionCommands';
11
+ export type { ViewOptions } from './ViewOptionsBar/useOptionCommands';
12
+ export { ViewPlugButtons } from './ViewPlugButtons';
13
+ export { ContextMenu } from './common/ContextMenu';
14
+ export { Menu } from './common/Menu';
15
+ export type { FeaturePluginProps, GlobalPluginsProps } from './PluginsWindows';
16
+ export type { ContextMenuProps, MenuInfo, MenuElement } from './common/ContextMenu';
17
+ export type { MenuItem, MenuItems, RCadMenuProps } from './common/Menu';
18
+ export type { ConstraintsProps } from './Constraints';
19
+ export type { DrawingProps } from './Drawing';
20
+ export type { MessagesProps } from './Messages';
21
+ export type { ModelTreeProps } from './ModelTree/ModelTree';
22
+ export type { SideBarProps } from './SideBar';
23
+ export type { SolidsProps } from './Solids/Solids';
24
+ export type { ToolBarProps } from './ToolBar/ToolBar';
25
+ export type { ViewPlugButtonsProps } from './ViewPlugButtons';
26
+ export { useOperationSequence } from './hooks/useOperationSequence';
27
+ export * from './store/CADStore';
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { DrawingID, ObjectID, PluginID } from '@classcad/sdkjs';
3
+ export declare const ProdList: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ prodIds: ObjectID[];
7
+ type: 'part' | 'asm';
8
+ createMode: boolean;
9
+ setCreateMode: React.Dispatch<React.SetStateAction<boolean>>;
10
+ }>;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@classcad/sdkjs';
3
+ /**
4
+ * The panel: the drawing's parts and assemblies, in two tabs.
5
+ *
6
+ * @internal
7
+ */
8
+ export declare const Root: React.FC<{
9
+ drawingId: DrawingID;
10
+ pluginId: PluginID;
11
+ }>;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@classcad/sdkjs';
3
+ /**
4
+ * Draws the product being added under the pointer, and adds it to the current assembly where the stage is clicked.
5
+ *
6
+ * @internal
7
+ */
8
+ export declare const View: React.FC<{
9
+ drawingId: DrawingID;
10
+ pluginId: PluginID;
11
+ }>;