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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (471) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +98 -2
  3. package/build/components/UI/CAD/Constraints.d.ts +30 -0
  4. package/build/components/UI/CAD/Drawing.d.ts +83 -0
  5. package/build/components/UI/CAD/ListPlaceholder.d.ts +3 -0
  6. package/build/components/UI/CAD/Messages/Message.d.ts +8 -0
  7. package/build/components/UI/CAD/Messages/Messages.d.ts +43 -0
  8. package/build/components/UI/CAD/Messages/index.d.ts +1 -0
  9. package/build/components/UI/CAD/Messages/msgStore.d.ts +18 -0
  10. package/build/components/UI/CAD/ModelTree/AssemblyNode.d.ts +5 -0
  11. package/build/components/UI/CAD/ModelTree/FeatureList/Feature.d.ts +8 -0
  12. package/build/components/UI/CAD/ModelTree/FeatureList/FeatureList.d.ts +6 -0
  13. package/build/components/UI/CAD/ModelTree/FeatureList/index.d.ts +1 -0
  14. package/build/components/UI/CAD/ModelTree/FeatureList/utils.d.ts +26 -0
  15. package/build/components/UI/CAD/ModelTree/ModelTree.d.ts +56 -0
  16. package/build/components/UI/CAD/ModelTree/ModelTreeHeader.d.ts +15 -0
  17. package/build/components/UI/CAD/ModelTree/index.d.ts +1 -0
  18. package/build/components/UI/CAD/ModelTree/primitives.d.ts +6 -0
  19. package/build/components/UI/CAD/ModelTree/useContextMenuItems.d.ts +4 -0
  20. package/build/components/UI/CAD/PluginBounds.d.ts +8 -0
  21. package/build/components/UI/CAD/PluginTooltip.d.ts +5 -0
  22. package/build/components/UI/CAD/PluginsWindows.d.ts +99 -0
  23. package/build/components/UI/CAD/ReadOnlyContext.d.ts +10 -0
  24. package/build/components/UI/CAD/SideBar.d.ts +40 -0
  25. package/build/components/UI/CAD/Solids/Solids.d.ts +23 -0
  26. package/build/components/UI/CAD/Solids/index.d.ts +1 -0
  27. package/build/components/UI/CAD/Solids/useContextMenuItems.d.ts +4 -0
  28. package/build/components/UI/CAD/Solids/useVisibleSolids.d.ts +30 -0
  29. package/build/components/UI/CAD/StageHud.d.ts +9 -0
  30. package/build/components/UI/CAD/StatusBar.d.ts +11 -0
  31. package/build/components/UI/CAD/ThemeToggle.d.ts +25 -0
  32. package/build/components/UI/CAD/ToolBar/AssemblyModeCmds.d.ts +3 -0
  33. package/build/components/UI/CAD/ToolBar/PartModeCmds.d.ts +3 -0
  34. package/build/components/UI/CAD/ToolBar/ToolBar.d.ts +24 -0
  35. package/build/components/UI/CAD/ToolBar/index.d.ts +1 -0
  36. package/build/components/UI/CAD/ToolBar/useCommands.d.ts +12 -0
  37. package/build/components/UI/CAD/ViewOptionsBar/ViewOptionButtons.d.ts +30 -0
  38. package/build/components/UI/CAD/ViewOptionsBar/useOptionCommands.d.ts +65 -0
  39. package/build/components/UI/CAD/ViewPlugButtons.d.ts +43 -0
  40. package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModal.d.ts +18 -0
  41. package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModalContext.d.ts +9 -0
  42. package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModalInner.d.ts +27 -0
  43. package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModalProvider.d.ts +4 -0
  44. package/build/components/UI/CAD/ant-design-draggable-modal/OverlayScrollbar.d.ts +6 -0
  45. package/build/components/UI/CAD/ant-design-draggable-modal/ResizeHandle.d.ts +2 -0
  46. package/build/components/UI/CAD/ant-design-draggable-modal/clamp.d.ts +1 -0
  47. package/build/components/UI/CAD/ant-design-draggable-modal/draggableModalReducer.d.ts +123 -0
  48. package/build/components/UI/CAD/ant-design-draggable-modal/getWindowSize.d.ts +4 -0
  49. package/build/components/UI/CAD/ant-design-draggable-modal/index.d.ts +3 -0
  50. package/build/components/UI/CAD/ant-design-draggable-modal/useDrag.d.ts +5 -0
  51. package/build/components/UI/CAD/ant-design-draggable-modal/usePrevious.d.ts +1 -0
  52. package/build/components/UI/CAD/ant-design-draggable-modal/useResize.d.ts +7 -0
  53. package/build/components/UI/CAD/common/BlankDiv.d.ts +3 -0
  54. package/build/components/UI/CAD/common/Collapse.d.ts +13 -0
  55. package/build/components/UI/CAD/common/ContextMenu.d.ts +115 -0
  56. package/build/components/UI/CAD/common/Divider.d.ts +4 -0
  57. package/build/components/UI/CAD/common/EntityName.d.ts +14 -0
  58. package/build/components/UI/CAD/common/Img.d.ts +6 -0
  59. package/build/components/UI/CAD/common/LoadingScreen/LoadingScreen.d.ts +8 -0
  60. package/build/components/UI/CAD/common/LoadingScreen/Spinner.d.ts +3 -0
  61. package/build/components/UI/CAD/common/LoadingScreen/index.d.ts +1 -0
  62. package/build/components/UI/CAD/common/Menu.d.ts +81 -0
  63. package/build/components/UI/CAD/common/MultiSelect.d.ts +12 -0
  64. package/build/components/UI/CAD/common/NameEdit.d.ts +7 -0
  65. package/build/components/UI/CAD/common/SectionHeader.d.ts +9 -0
  66. package/build/components/UI/CAD/common/primitives.d.ts +36 -0
  67. package/build/components/UI/CAD/common/reveal.d.ts +12 -0
  68. package/build/components/UI/CAD/hooks/index.d.ts +13 -0
  69. package/build/components/UI/CAD/hooks/useContextMenuInteraction.d.ts +7 -0
  70. package/build/components/UI/CAD/hooks/useContextMenuItems.d.ts +4 -0
  71. package/build/components/UI/CAD/hooks/useCurrentInstance.d.ts +2 -0
  72. package/build/components/UI/CAD/hooks/useCurrentProduct.d.ts +2 -0
  73. package/build/components/UI/CAD/hooks/useEditMode.d.ts +40 -0
  74. package/build/components/UI/CAD/hooks/useFeatureCount.d.ts +6 -0
  75. package/build/components/UI/CAD/hooks/useGlobalMateInfo.d.ts +6 -0
  76. package/build/components/UI/CAD/hooks/useHasPending.d.ts +27 -0
  77. package/build/components/UI/CAD/hooks/useIsDisabled.d.ts +2 -0
  78. package/build/components/UI/CAD/hooks/useIsLoading.d.ts +25 -0
  79. package/build/components/UI/CAD/hooks/useIsSketchActive.d.ts +26 -0
  80. package/build/components/UI/CAD/hooks/useObjectDetails.d.ts +12 -0
  81. package/build/components/UI/CAD/hooks/useOperationSequence.d.ts +29 -0
  82. package/build/components/UI/CAD/hooks/useRollbackBar.d.ts +8 -0
  83. package/build/components/UI/CAD/hooks/useRoot.d.ts +2 -0
  84. package/build/components/UI/CAD/index.d.ts +27 -0
  85. package/build/components/UI/CAD/plugins/ProductManagement/ProdTable.d.ts +10 -0
  86. package/build/components/UI/CAD/plugins/ProductManagement/Root.d.ts +11 -0
  87. package/build/components/UI/CAD/plugins/ProductManagement/View.d.ts +11 -0
  88. package/build/components/UI/CAD/plugins/ProductManagement/index.d.ts +34 -0
  89. package/build/components/UI/CAD/plugins/ProductManagement/types.d.ts +4 -0
  90. package/build/components/UI/CAD/plugins/ProductManagement/useContextMenuItems.d.ts +4 -0
  91. package/build/components/UI/CAD/plugins/SessionManagement/Root.d.ts +11 -0
  92. package/build/components/UI/CAD/plugins/SessionManagement/index.d.ts +36 -0
  93. package/build/components/UI/CAD/plugins/SessionManagement/types.d.ts +3 -0
  94. package/build/components/UI/CAD/store/CADActions.d.ts +29 -0
  95. package/build/components/UI/CAD/store/CADStore.d.ts +68 -0
  96. package/build/components/UI/CAD/store/instances.d.ts +7 -0
  97. package/build/components/UI/Readfile.d.ts +39 -0
  98. package/build/components/UI/ThemeVars.d.ts +6 -0
  99. package/build/components/UI/editors/BooleanEditor/BooleanEditor.d.ts +8 -0
  100. package/build/components/UI/editors/BooleanEditor/index.d.ts +2 -0
  101. package/build/components/UI/editors/BooleanEditor/useBoolParam.d.ts +3 -0
  102. package/build/components/UI/editors/CSysEditor/CSysEditor.d.ts +11 -0
  103. package/build/components/UI/editors/CSysEditor/index.d.ts +2 -0
  104. package/build/components/UI/editors/CSysEditor/useCSysParam.d.ts +9 -0
  105. package/build/components/UI/editors/ColorEditor/ColorEditor.d.ts +12 -0
  106. package/build/components/UI/editors/ColorEditor/index.d.ts +2 -0
  107. package/build/components/UI/editors/ColorEditor/useColorParam.d.ts +9 -0
  108. package/build/components/UI/editors/ExpressionEditor/ExpressionEditor.d.ts +20 -0
  109. package/build/components/UI/editors/ExpressionEditor/index.d.ts +2 -0
  110. package/build/components/UI/editors/ExpressionEditor/useExpressionsParam.d.ts +5 -0
  111. package/build/components/UI/editors/NumberEditor/Inputs.d.ts +18 -0
  112. package/build/components/UI/editors/NumberEditor/Mentions.d.ts +10 -0
  113. package/build/components/UI/editors/NumberEditor/NumOrExpr.d.ts +12 -0
  114. package/build/components/UI/editors/NumberEditor/NumberEditor.d.ts +12 -0
  115. package/build/components/UI/editors/NumberEditor/index.d.ts +2 -0
  116. package/build/components/UI/editors/NumberEditor/useNumParam.d.ts +5 -0
  117. package/build/components/UI/editors/PointEditor/PointEditor.d.ts +10 -0
  118. package/build/components/UI/editors/PointEditor/index.d.ts +2 -0
  119. package/build/components/UI/editors/PointEditor/usePointParam.d.ts +5 -0
  120. package/build/components/UI/editors/RefsEditors/ChainFinder.d.ts +12 -0
  121. package/build/components/UI/editors/RefsEditors/MateEditor.d.ts +13 -0
  122. package/build/components/UI/editors/RefsEditors/MateOrientationEditor.d.ts +9 -0
  123. package/build/components/UI/editors/RefsEditors/RefEditor.d.ts +24 -0
  124. package/build/components/UI/editors/RefsEditors/RefsEditor.d.ts +16 -0
  125. package/build/components/UI/editors/RefsEditors/index.d.ts +8 -0
  126. package/build/components/UI/editors/RefsEditors/pickers.d.ts +4 -0
  127. package/build/components/UI/editors/RefsEditors/useIdParam.d.ts +3 -0
  128. package/build/components/UI/editors/RefsEditors/useMateParam.d.ts +19 -0
  129. package/build/components/UI/editors/RefsEditors/useModes.d.ts +11 -0
  130. package/build/components/UI/editors/RefsEditors/useRefsParam.d.ts +3 -0
  131. package/build/components/UI/editors/RefsEditors/useSelectedItems.d.ts +18 -0
  132. package/build/components/UI/editors/ToleranceEditor/ToleranceEditor.d.ts +7 -0
  133. package/build/components/UI/editors/ToleranceEditor/index.d.ts +2 -0
  134. package/build/components/UI/editors/ToleranceEditor/useToleranceParam.d.ts +3 -0
  135. package/build/components/UI/editors/TypeEditor/TypeEditor.d.ts +10 -0
  136. package/build/components/UI/editors/TypeEditor/index.d.ts +2 -0
  137. package/build/components/UI/editors/TypeEditor/useTypeParam.d.ts +3 -0
  138. package/build/components/UI/editors/TypeWrapper.d.ts +6 -0
  139. package/build/components/UI/editors/Wrapper.d.ts +16 -0
  140. package/build/components/UI/editors/useParam.d.ts +20 -0
  141. package/build/components/UI/editors/useValidation.d.ts +4 -0
  142. package/build/components/graphics/Badge.d.ts +70 -0
  143. package/build/components/graphics/CSysDisplay.d.ts +108 -0
  144. package/build/components/graphics/CompositeCurveObj.d.ts +33 -0
  145. package/build/components/graphics/GeometryOverrides/GeometryOverridesManager.d.ts +41 -0
  146. package/build/components/graphics/GeometryOverrides/GeometryOverridesStore.d.ts +28 -0
  147. package/build/components/graphics/GeometryOverrides/index.d.ts +2 -0
  148. package/build/components/graphics/GeometryOverrides/useOverrideGeometryColor.d.ts +36 -0
  149. package/build/components/graphics/HUD.d.ts +44 -0
  150. package/build/components/graphics/HoveredConstraintDisplay.d.ts +24 -0
  151. package/build/components/graphics/InfinityPlane.d.ts +4 -0
  152. package/build/components/graphics/Outlines/AAPass.d.ts +8 -0
  153. package/build/components/graphics/Outlines/IDPass.d.ts +12 -0
  154. package/build/components/graphics/Outlines/Outline.d.ts +62 -0
  155. package/build/components/graphics/Outlines/OutlineEffect.d.ts +48 -0
  156. package/build/components/graphics/Outlines/OutlineMaterial.d.ts +9 -0
  157. package/build/components/graphics/Outlines/WidenPass.d.ts +17 -0
  158. package/build/components/graphics/PluginGeometryBounds.d.ts +40 -0
  159. package/build/components/graphics/SelectableMate.d.ts +3 -0
  160. package/build/components/graphics/SelectedMateObj.d.ts +54 -0
  161. package/build/components/graphics/StageLook.d.ts +51 -0
  162. package/build/components/graphics/WorkAxisObj.d.ts +33 -0
  163. package/build/components/graphics/WorkCSysObj.d.ts +33 -0
  164. package/build/components/graphics/WorkCoordSystemObj.d.ts +32 -0
  165. package/build/components/graphics/WorkPlaneObj.d.ts +33 -0
  166. package/build/components/graphics/WorkPointObj.d.ts +57 -0
  167. package/build/components/graphics/graphics.d.ts +61 -0
  168. package/build/components/graphics/utils/MatePathTransform.d.ts +10 -0
  169. package/build/components/graphics/utils/useCsysMatrix.d.ts +4 -0
  170. package/build/components/utils/CompValidation/ErrorBoundary.d.ts +28 -0
  171. package/build/components/utils/CompValidation/validators/CSysDisplayValidator.d.ts +12 -0
  172. package/build/components/utils/CompValidation/validators/DrawingValidator.d.ts +12 -0
  173. package/build/components/utils/CompValidation/validators/ExpressionsValidator.d.ts +12 -0
  174. package/build/components/utils/CompValidation/validators/FPluginValidator.d.ts +16 -0
  175. package/build/components/utils/CompValidation/validators/FeatureListValidator.d.ts +12 -0
  176. package/build/components/utils/CompValidation/validators/ProductManagementValidator.d.ts +14 -0
  177. package/build/components/utils/CompValidation/verifiers.d.ts +32 -0
  178. package/build/components/utils/FtVisibilityController.d.ts +26 -0
  179. package/build/elements/index.d.ts +162 -0
  180. package/build/icons/axes.d.ts +73 -0
  181. package/build/icons/draw.d.ts +75 -0
  182. package/build/icons/features.d.ts +71 -0
  183. package/build/icons/glyphs.d.ts +10 -0
  184. package/build/icons/index.d.ts +152 -0
  185. package/build/icons/legacy.d.ts +159 -0
  186. package/build/icons/mates.d.ts +26 -0
  187. package/build/icons/params.d.ts +77 -0
  188. package/build/icons/refs.d.ts +61 -0
  189. package/build/icons/sheets.d.ts +302 -0
  190. package/build/icons/sketch.d.ts +102 -0
  191. package/build/icons/types.d.ts +74 -0
  192. package/build/icons/ui.d.ts +114 -0
  193. package/build/icons.cjs.js +1751 -0
  194. package/build/icons.js +1742 -0
  195. package/build/index.cjs.js +44948 -0
  196. package/build/index.d.ts +115 -0
  197. package/build/index.js +44800 -0
  198. package/build/plugins/AppearanceEditor/Root.d.ts +12 -0
  199. package/build/plugins/AppearanceEditor/index.d.ts +42 -0
  200. package/build/plugins/Boolean/Root.d.ts +11 -0
  201. package/build/plugins/Boolean/index.d.ts +39 -0
  202. package/build/plugins/BoundingBoxInfo/Root.d.ts +12 -0
  203. package/build/plugins/BoundingBoxInfo/View.d.ts +11 -0
  204. package/build/plugins/BoundingBoxInfo/index.d.ts +35 -0
  205. package/build/plugins/Box/Root.d.ts +11 -0
  206. package/build/plugins/Box/index.d.ts +34 -0
  207. package/build/plugins/Chamfer/Root.d.ts +11 -0
  208. package/build/plugins/Chamfer/index.d.ts +35 -0
  209. package/build/plugins/CircularPattern/Root.d.ts +11 -0
  210. package/build/plugins/CircularPattern/index.d.ts +35 -0
  211. package/build/plugins/CompositeCurve/Root.d.ts +11 -0
  212. package/build/plugins/CompositeCurve/View.d.ts +11 -0
  213. package/build/plugins/CompositeCurve/index.d.ts +36 -0
  214. package/build/plugins/Cone/Root.d.ts +11 -0
  215. package/build/plugins/Cone/index.d.ts +36 -0
  216. package/build/plugins/Cylinder/Root.d.ts +11 -0
  217. package/build/plugins/Cylinder/index.d.ts +35 -0
  218. package/build/plugins/Dimensions/DimContext.d.ts +10 -0
  219. package/build/plugins/Dimensions/Root.d.ts +11 -0
  220. package/build/plugins/Dimensions/View.d.ts +11 -0
  221. package/build/plugins/Dimensions/graphics/DimGraphics.d.ts +7 -0
  222. package/build/plugins/Dimensions/graphics/DimensionSet.d.ts +8 -0
  223. package/build/plugins/Dimensions/graphics/primitives.d.ts +34 -0
  224. package/build/plugins/Dimensions/index.d.ts +34 -0
  225. package/build/plugins/Dimensions/utils.d.ts +5 -0
  226. package/build/plugins/EntityDeletion/Root.d.ts +11 -0
  227. package/build/plugins/EntityDeletion/index.d.ts +34 -0
  228. package/build/plugins/Expressions/Root.d.ts +11 -0
  229. package/build/plugins/Expressions/index.d.ts +34 -0
  230. package/build/plugins/Expressions/useContextMenuItems.d.ts +4 -0
  231. package/build/plugins/Extrusion/Root.d.ts +11 -0
  232. package/build/plugins/Extrusion/View.d.ts +11 -0
  233. package/build/plugins/Extrusion/index.d.ts +50 -0
  234. package/build/plugins/Fillet/Root.d.ts +11 -0
  235. package/build/plugins/Fillet/index.d.ts +35 -0
  236. package/build/plugins/HLConstraints/CircularPattern/Root.d.ts +11 -0
  237. package/build/plugins/HLConstraints/CircularPattern/View.d.ts +11 -0
  238. package/build/plugins/HLConstraints/CircularPattern/index.d.ts +38 -0
  239. package/build/plugins/HLConstraints/Cylindrical/Root.d.ts +11 -0
  240. package/build/plugins/HLConstraints/Cylindrical/View.d.ts +11 -0
  241. package/build/plugins/HLConstraints/Cylindrical/index.d.ts +37 -0
  242. package/build/plugins/HLConstraints/Fastened/Root.d.ts +11 -0
  243. package/build/plugins/HLConstraints/Fastened/View.d.ts +11 -0
  244. package/build/plugins/HLConstraints/Fastened/index.d.ts +37 -0
  245. package/build/plugins/HLConstraints/FastenedOrigin/Root.d.ts +11 -0
  246. package/build/plugins/HLConstraints/FastenedOrigin/View.d.ts +11 -0
  247. package/build/plugins/HLConstraints/FastenedOrigin/index.d.ts +37 -0
  248. package/build/plugins/HLConstraints/Gear/Root.d.ts +11 -0
  249. package/build/plugins/HLConstraints/Gear/View.d.ts +11 -0
  250. package/build/plugins/HLConstraints/Gear/index.d.ts +36 -0
  251. package/build/plugins/HLConstraints/Group/Root.d.ts +11 -0
  252. package/build/plugins/HLConstraints/Group/index.d.ts +34 -0
  253. package/build/plugins/HLConstraints/LinearPattern/Root.d.ts +11 -0
  254. package/build/plugins/HLConstraints/LinearPattern/View.d.ts +11 -0
  255. package/build/plugins/HLConstraints/LinearPattern/index.d.ts +38 -0
  256. package/build/plugins/HLConstraints/Parallel/Root.d.ts +11 -0
  257. package/build/plugins/HLConstraints/Parallel/View.d.ts +11 -0
  258. package/build/plugins/HLConstraints/Parallel/index.d.ts +37 -0
  259. package/build/plugins/HLConstraints/Planar/Root.d.ts +11 -0
  260. package/build/plugins/HLConstraints/Planar/View.d.ts +11 -0
  261. package/build/plugins/HLConstraints/Planar/index.d.ts +37 -0
  262. package/build/plugins/HLConstraints/Revolute/Root.d.ts +11 -0
  263. package/build/plugins/HLConstraints/Revolute/View.d.ts +11 -0
  264. package/build/plugins/HLConstraints/Revolute/index.d.ts +37 -0
  265. package/build/plugins/HLConstraints/Slider/Root.d.ts +11 -0
  266. package/build/plugins/HLConstraints/Slider/View.d.ts +11 -0
  267. package/build/plugins/HLConstraints/Slider/index.d.ts +37 -0
  268. package/build/plugins/HLConstraints/Spherical/Root.d.ts +11 -0
  269. package/build/plugins/HLConstraints/Spherical/View.d.ts +11 -0
  270. package/build/plugins/HLConstraints/Spherical/index.d.ts +36 -0
  271. package/build/plugins/HLConstraints/components/CSysDisplayWrapper.d.ts +7 -0
  272. package/build/plugins/HLConstraints/components/HLConstrIcon.d.ts +7 -0
  273. package/build/plugins/HLConstraints/components/LimitedValue.d.ts +12 -0
  274. package/build/plugins/HLConstraints/components/Limits.d.ts +25 -0
  275. package/build/plugins/HLConstraints/components/LimitsCollapse.d.ts +12 -0
  276. package/build/plugins/HLConstraints/validators.d.ts +2 -0
  277. package/build/plugins/Import/Root.d.ts +11 -0
  278. package/build/plugins/Import/index.d.ts +35 -0
  279. package/build/plugins/LinearPattern/Root.d.ts +11 -0
  280. package/build/plugins/LinearPattern/index.d.ts +36 -0
  281. package/build/plugins/Measure/Digits.d.ts +7 -0
  282. package/build/plugins/Measure/Root.d.ts +11 -0
  283. package/build/plugins/Measure/View.d.ts +15 -0
  284. package/build/plugins/Measure/config.d.ts +1 -0
  285. package/build/plugins/Measure/graphics/MeasureGraphics.d.ts +24 -0
  286. package/build/plugins/Measure/index.d.ts +39 -0
  287. package/build/plugins/Measure/utils.d.ts +2 -0
  288. package/build/plugins/Mirror/Root.d.ts +11 -0
  289. package/build/plugins/Mirror/index.d.ts +34 -0
  290. package/build/plugins/Revolve/Root.d.ts +11 -0
  291. package/build/plugins/Revolve/index.d.ts +37 -0
  292. package/build/plugins/Rotate/Root.d.ts +11 -0
  293. package/build/plugins/Rotate/index.d.ts +35 -0
  294. package/build/plugins/Sketch/Root/Constraints/Constraints.d.ts +2 -0
  295. package/build/plugins/Sketch/Root/Constraints/constraintsHelpers.d.ts +22 -0
  296. package/build/plugins/Sketch/Root/Constraints/index.d.ts +2 -0
  297. package/build/plugins/Sketch/Root/Constraints/utils.d.ts +6 -0
  298. package/build/plugins/Sketch/Root/CopyPatterns.d.ts +2 -0
  299. package/build/plugins/Sketch/Root/Details.d.ts +2 -0
  300. package/build/plugins/Sketch/Root/Handlers.d.ts +2 -0
  301. package/build/plugins/Sketch/Root/PlaneSelection.d.ts +7 -0
  302. package/build/plugins/Sketch/Root/Position.d.ts +2 -0
  303. package/build/plugins/Sketch/Root/Regions.d.ts +2 -0
  304. package/build/plugins/Sketch/Root/Root.d.ts +11 -0
  305. package/build/plugins/Sketch/Root/RootContext.d.ts +7 -0
  306. package/build/plugins/Sketch/Root/SketchGroup.d.ts +15 -0
  307. package/build/plugins/Sketch/Root/index.d.ts +1 -0
  308. package/build/plugins/Sketch/Root/useContextMenuItems.d.ts +4 -0
  309. package/build/plugins/Sketch/Root/useLayoutSize.d.ts +11 -0
  310. package/build/plugins/Sketch/View/View.d.ts +11 -0
  311. package/build/plugins/Sketch/View/ViewContext.d.ts +8 -0
  312. package/build/plugins/Sketch/View/graphics/Constraints.d.ts +5 -0
  313. package/build/plugins/Sketch/View/graphics/IconGroups.d.ts +7 -0
  314. package/build/plugins/Sketch/View/graphics/Merged/Arc.d.ts +20 -0
  315. package/build/plugins/Sketch/View/graphics/Merged/ArcGeometry.d.ts +2 -0
  316. package/build/plugins/Sketch/View/graphics/Merged/ArcMaterial.d.ts +2 -0
  317. package/build/plugins/Sketch/View/graphics/Merged/Bezier.d.ts +19 -0
  318. package/build/plugins/Sketch/View/graphics/Merged/BezierGeometry.d.ts +12 -0
  319. package/build/plugins/Sketch/View/graphics/Merged/BezierMaterial.d.ts +2 -0
  320. package/build/plugins/Sketch/View/graphics/Merged/Circle.d.ts +9 -0
  321. package/build/plugins/Sketch/View/graphics/Merged/Line.d.ts +15 -0
  322. package/build/plugins/Sketch/View/graphics/Merged/LineGeometry.d.ts +2 -0
  323. package/build/plugins/Sketch/View/graphics/Merged/LineMaterial.d.ts +2 -0
  324. package/build/plugins/Sketch/View/graphics/Merged/MergedWrapper.d.ts +16 -0
  325. package/build/plugins/Sketch/View/graphics/Merged/Point.d.ts +8 -0
  326. package/build/plugins/Sketch/View/graphics/Merged/Spline.d.ts +17 -0
  327. package/build/plugins/Sketch/View/graphics/Merged/SplineGeometry.d.ts +11 -0
  328. package/build/plugins/Sketch/View/graphics/Merged/SplineMaterial.d.ts +2 -0
  329. package/build/plugins/Sketch/View/graphics/MousePosition.d.ts +2 -0
  330. package/build/plugins/Sketch/View/graphics/Regions.d.ts +5 -0
  331. package/build/plugins/Sketch/View/graphics/TmpAngularDimension.d.ts +8 -0
  332. package/build/plugins/Sketch/View/graphics/graphics.d.ts +5 -0
  333. package/build/plugins/Sketch/View/graphics/hooks.d.ts +49 -0
  334. package/build/plugins/Sketch/View/graphics/primitives.d.ts +34 -0
  335. package/build/plugins/Sketch/View/graphics/scale.d.ts +6 -0
  336. package/build/plugins/Sketch/View/graphics/tmpGraphics.d.ts +3 -0
  337. package/build/plugins/Sketch/View/graphics/transform.d.ts +4 -0
  338. package/build/plugins/Sketch/View/handlers/CreateAngle.d.ts +3 -0
  339. package/build/plugins/Sketch/View/handlers/CreateConstraint.d.ts +10 -0
  340. package/build/plugins/Sketch/View/handlers/Drag.d.ts +3 -0
  341. package/build/plugins/Sketch/View/handlers/DrawArc.d.ts +3 -0
  342. package/build/plugins/Sketch/View/handlers/DrawCircle.d.ts +3 -0
  343. package/build/plugins/Sketch/View/handlers/DrawLine.d.ts +3 -0
  344. package/build/plugins/Sketch/View/handlers/DrawNurbs.d.ts +3 -0
  345. package/build/plugins/Sketch/View/handlers/DrawPoint.d.ts +3 -0
  346. package/build/plugins/Sketch/View/handlers/DrawRectangle.d.ts +3 -0
  347. package/build/plugins/Sketch/View/handlers/Fillet.d.ts +3 -0
  348. package/build/plugins/Sketch/View/handlers/HandlersConstructors.d.ts +33 -0
  349. package/build/plugins/Sketch/View/handlers/Hover.d.ts +3 -0
  350. package/build/plugins/Sketch/View/handlers/SSelect.d.ts +3 -0
  351. package/build/plugins/Sketch/View/handlers/Split.d.ts +3 -0
  352. package/build/plugins/Sketch/View/handlers/Trim.d.ts +3 -0
  353. package/build/plugins/Sketch/View/handlers/Use.d.ts +3 -0
  354. package/build/plugins/Sketch/View/handlers/constraintCreation.d.ts +10 -0
  355. package/build/plugins/Sketch/View/handlers/filletHelpers.d.ts +24 -0
  356. package/build/plugins/Sketch/View/handlers/hoverHelpers.d.ts +3 -0
  357. package/build/plugins/Sketch/View/handlers/snapper.d.ts +11 -0
  358. package/build/plugins/Sketch/View/handlers/splitHelpers.d.ts +20 -0
  359. package/build/plugins/Sketch/View/index.d.ts +1 -0
  360. package/build/plugins/Sketch/constants.d.ts +5 -0
  361. package/build/plugins/Sketch/description.d.ts +7 -0
  362. package/build/plugins/Sketch/index.d.ts +35 -0
  363. package/build/plugins/Sketch/resources.d.ts +5 -0
  364. package/build/plugins/Sketch/types.d.ts +148 -0
  365. package/build/plugins/Sketch/utils/Interaction.d.ts +7 -0
  366. package/build/plugins/Sketch/utils/OverdefinedStateManager.d.ts +6 -0
  367. package/build/plugins/Sketch/utils/getSketchState.d.ts +3 -0
  368. package/build/plugins/Sketch/utils/useSketchRegions.d.ts +2 -0
  369. package/build/plugins/Sketch/utils/useSketchState.d.ts +3 -0
  370. package/build/plugins/Slice/Root.d.ts +11 -0
  371. package/build/plugins/Slice/index.d.ts +34 -0
  372. package/build/plugins/SliceBySheet/Root.d.ts +11 -0
  373. package/build/plugins/SliceBySheet/index.d.ts +35 -0
  374. package/build/plugins/Sphere/Root.d.ts +11 -0
  375. package/build/plugins/Sphere/index.d.ts +35 -0
  376. package/build/plugins/TransformByCsys/Root.d.ts +11 -0
  377. package/build/plugins/TransformByCsys/index.d.ts +35 -0
  378. package/build/plugins/Translate/Root.d.ts +11 -0
  379. package/build/plugins/Translate/index.d.ts +35 -0
  380. package/build/plugins/Twist/Root.d.ts +11 -0
  381. package/build/plugins/Twist/View.d.ts +11 -0
  382. package/build/plugins/Twist/index.d.ts +48 -0
  383. package/build/plugins/WorkAxis/Root.d.ts +11 -0
  384. package/build/plugins/WorkAxis/View.d.ts +11 -0
  385. package/build/plugins/WorkAxis/index.d.ts +37 -0
  386. package/build/plugins/WorkCSys/Root.d.ts +11 -0
  387. package/build/plugins/WorkCSys/View.d.ts +11 -0
  388. package/build/plugins/WorkCSys/index.d.ts +53 -0
  389. package/build/plugins/WorkCoordSystem/Root.d.ts +11 -0
  390. package/build/plugins/WorkCoordSystem/View.d.ts +11 -0
  391. package/build/plugins/WorkCoordSystem/index.d.ts +55 -0
  392. package/build/plugins/WorkPlane/Root.d.ts +11 -0
  393. package/build/plugins/WorkPlane/View.d.ts +11 -0
  394. package/build/plugins/WorkPlane/index.d.ts +38 -0
  395. package/build/plugins/WorkPlane/validators.d.ts +1 -0
  396. package/build/plugins/WorkPoint/Root.d.ts +11 -0
  397. package/build/plugins/WorkPoint/View.d.ts +11 -0
  398. package/build/plugins/WorkPoint/index.d.ts +38 -0
  399. package/build/plugins/components/PluginForm.d.ts +24 -0
  400. package/build/plugins/utils/useRefsReset.d.ts +2 -0
  401. package/build/session/identity.d.ts +46 -0
  402. package/build/session/sessionClient.d.ts +140 -0
  403. package/build/session/types.d.ts +52 -0
  404. package/build/session/viewpoints.d.ts +90 -0
  405. package/build/theme/AppStyle.d.ts +33 -0
  406. package/build/theme/fonts/mono.d.ts +29 -0
  407. package/build/theme/stage.d.ts +148 -0
  408. package/build/theme/styles/antdChoices.d.ts +1 -0
  409. package/build/theme/styles/antdControls.d.ts +1 -0
  410. package/build/theme/styles/antdSurfaces.d.ts +1 -0
  411. package/build/theme/styles/editors.d.ts +1 -0
  412. package/build/theme/styles/fields.d.ts +1 -0
  413. package/build/theme/styles/frame.d.ts +1 -0
  414. package/build/theme/styles/panes.d.ts +1 -0
  415. package/build/theme/styles/parts.d.ts +2 -0
  416. package/build/theme/styles/rest.d.ts +1 -0
  417. package/build/theme/styles/sketch.d.ts +1 -0
  418. package/build/theme/styles/toolbar.d.ts +1 -0
  419. package/build/theme/styles/tools.d.ts +1 -0
  420. package/build/theme/styles/windows.d.ts +1 -0
  421. package/build/theme/themeStore.d.ts +305 -0
  422. package/build/types/jsx-compat.d.ts +8 -0
  423. package/build/types.d.ts +16 -0
  424. package/build/utils/FileUtils.d.ts +20 -0
  425. package/build/utils/bezierMatrices.d.ts +3 -0
  426. package/build/utils/conversionUtils.d.ts +78 -0
  427. package/build/utils/cubicSplineInterpolation.d.ts +5 -0
  428. package/build/utils/defaultValues.d.ts +3 -0
  429. package/build/utils/drawing/index.d.ts +3 -0
  430. package/build/utils/drawing/useDrawingArr.d.ts +10 -0
  431. package/build/utils/drawing/useDrawingCCId.d.ts +10 -0
  432. package/build/utils/drawing/useDrawingStr.d.ts +10 -0
  433. package/build/utils/getHighlightedColor.d.ts +6 -0
  434. package/build/utils/getMatePath.d.ts +2 -0
  435. package/build/utils/getMateRefIds.d.ts +30 -0
  436. package/build/utils/helpers.d.ts +19 -0
  437. package/build/utils/mateUtils.d.ts +35 -0
  438. package/build/utils/nurbsUtils.d.ts +35 -0
  439. package/build/utils/selection/filters.d.ts +12 -0
  440. package/build/utils/selection/scopes/mateSelection.d.ts +49 -0
  441. package/build/utils/selection/scopes/treeObjInteraction.d.ts +74 -0
  442. package/build/utils/selection/useSelectorsOrder.d.ts +12 -0
  443. package/build/utils/sketchIntersectionUtils.d.ts +139 -0
  444. package/build/utils/sketchUtils.d.ts +235 -0
  445. package/build/utils/useAllObjects.d.ts +31 -0
  446. package/build/utils/useIsUncommited.d.ts +2 -0
  447. package/build/utils/useRetainVisibility.d.ts +2 -0
  448. package/build/utils/useScale.d.ts +5 -0
  449. package/build/utils/validation.d.ts +11 -0
  450. package/doc/api/advanced/session.md +646 -0
  451. package/doc/api/advanced/utilities.md +1306 -0
  452. package/doc/api/assembly-constraints.md +340 -0
  453. package/doc/api/feature-plugins.md +613 -0
  454. package/doc/api/graphics.md +848 -0
  455. package/doc/api/hooks.md +300 -0
  456. package/doc/api/icons.md +812 -0
  457. package/doc/api/index.md +87 -0
  458. package/doc/api/other.md +369 -0
  459. package/doc/api/panels.md +754 -0
  460. package/doc/api/theme.md +551 -0
  461. package/doc/api/tool-plugins.md +191 -0
  462. package/doc/api/ui-elements.md +310 -0
  463. package/doc/api/work-geometry.md +154 -0
  464. package/icons/package.json +8 -0
  465. package/package.json +109 -4
  466. package/tools/fonts/brotli.py +29 -0
  467. package/tools/fonts/build.py +76 -0
  468. package/tools/icons/preview.mjs +74 -0
  469. package/tsconfig.build.json +16 -0
  470. package/typedoc.json +18 -0
  471. package/vitest.config.mts +25 -0
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { MemberParam } from '../../../../types';
3
+ export declare const TypeEditor: React.FC<{
4
+ param: MemberParam<number>;
5
+ caption?: string;
6
+ types: {
7
+ [key: number]: string;
8
+ };
9
+ readonlyTypes?: number[];
10
+ }>;
@@ -0,0 +1,2 @@
1
+ export * from './useTypeParam';
2
+ export * from './TypeEditor';
@@ -0,0 +1,3 @@
1
+ import { DrawingID, ObjectID } from '@classcad/sdkjs';
2
+ import { MemberParam } from '../../../../types';
3
+ export declare function useTypeParam(drawingId: DrawingID, objId: ObjectID, memberName: string): MemberParam<number>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ /** The head of a feature's window: what kind it is, and its switches, in one row. */
3
+ export declare const TypeWrapper: React.FC<{
4
+ justifyEnd?: boolean;
5
+ children?: React.ReactNode;
6
+ }>;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ /**
3
+ * One field of a feature's window.
4
+ *
5
+ * With `iconUrl` it is a labelled field: its label in mono capitals, and under it the drawing of
6
+ * what the field is next to its control. A label turns red once its value has been changed.
7
+ * Without it is a plain line: its caption on the left, its control on the right.
8
+ */
9
+ export declare const Wrapper: React.FC<{
10
+ highlighted?: boolean;
11
+ minor?: boolean;
12
+ caption?: string;
13
+ iconUrl?: string;
14
+ contentWidth?: number;
15
+ children?: React.ReactNode;
16
+ }>;
@@ -0,0 +1,20 @@
1
+ import { MemberParam } from '../../../types';
2
+ /**
3
+ * Wrapper for a parameter which will be used in an editor.
4
+ * @param param - an object which should contain next props:
5
+ * {
6
+ * userValue - value shown for the user
7
+ * setUserValue - userValue setter
8
+ defaults - default value
9
+ isChanged - function shows whether value is changed or not
10
+ * }
11
+ * @param getServValue - if value should be converted (e.g. deg -> rad) pass this function, it will be called right before classCAD API call.
12
+ * @param validation - Custom validation (used in useMateParam, useRefsParam. - these params has an array in userValue, so we need to apply validateF for each element from array).
13
+ * @returns
14
+ */
15
+ export declare function useParam<T>(param: Omit<MemberParam<T>, 'serverValue' | 'validator' | 'setValidator' | 'options'>, getServValue?: (x: T) => T, validation?: {
16
+ validator: () => string[];
17
+ setValidator: (...args: any[]) => void;
18
+ }, options?: {
19
+ [key: string]: any;
20
+ }): MemberParam<T>;
@@ -0,0 +1,4 @@
1
+ export declare function useValidation<T>(userValue: T): {
2
+ setValidator: (validator_: (x: T) => string[]) => void;
3
+ validator: () => string[];
4
+ };
@@ -0,0 +1,70 @@
1
+ import React from 'react';
2
+ import * as THREE from 'three';
3
+ /**
4
+ * A drawing as a texture for the stage: white on black, how much of each texel it covers. The badge takes
5
+ * it as its glyph's alpha and gives the glyph its colour, so one texture serves both themes and every state.
6
+ * (As white on transparent, the filtering mixed the transparent texels' black into the edges: a dark rim
7
+ * around a light glyph.) It is drawn large, to stay sharp. `mono`: all of it in the one ink, without the
8
+ * grey (see {@link iconSvg}).
9
+ *
10
+ * @internal
11
+ */
12
+ export declare const glyphTexture: (ref: string, mono?: boolean) => THREE.Texture;
13
+ /**
14
+ * Props of {@link Badge}.
15
+ *
16
+ * @advanced
17
+ * @category Graphics
18
+ */
19
+ export type BadgeProps = {
20
+ /** The disc's diameter, in the scene's units. */
21
+ size: number;
22
+ /** The glyph: a texture of a drawing in white (see {@link glyphTexture}, or {@link iconDataUrl}), which the badge colours. */
23
+ texture?: THREE.Texture | null;
24
+ /** The colour the badge is lit in, when it has something to say. Without it, it is at rest. */
25
+ tone?: THREE.ColorRepresentation;
26
+ /** The glyph's width, as a share of the disc's. Default `0.9`. */
27
+ glyph?: number;
28
+ /** The render order of the glyph; the disc and the ring are drawn just before it. Default `0`. */
29
+ renderOrder?: number;
30
+ /** The polygon offset of its layers, in whole units. Default `0`. */
31
+ polygonOffsetUnits?: number;
32
+ /** Drawn over what it lies on, in its render order (a HUD's badge): no depth test. Default `false`. */
33
+ onTop?: boolean;
34
+ };
35
+ /**
36
+ * A badge on the stage: a constraint's sign where it holds. At rest a light disc with a faint shadow
37
+ * ring. A badge that has something to say (it is under the pointer, in hand, redundant, in conflict)
38
+ * is lit in that colour. Its glyph is the same in every state: black in the light theme, white in the dark.
39
+ *
40
+ * Its three layers lie in one plane, at the badge's offset, and are drawn in their order: the disc
41
+ * and the ring are a ground that leaves the depth alone, so the glyph is never measured against
42
+ * them. (They were set apart by fractions of a polygon offset, which WebGPU takes in whole units
43
+ * only: there the disc came out in front, and the badges were empty.) A badge `onTop`, in a HUD,
44
+ * is not measured against anything: it lies in the sketch's plane with its lines and regions,
45
+ * which in a slanted view and on WebGPU won it by a hair or lost it as the view was zoomed.
46
+ *
47
+ * It lies in the XY plane of where it is put, and takes no pointer. Its props: {@link BadgeProps}.
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * import { useMemo } from 'react'
52
+ * import * as THREE from 'three'
53
+ * import { Badge, iconDataUrl, useStage } from '@classcad/react-cad'
54
+ *
55
+ * // a badge of the app's own on the stage: a pin's sign, lit while it is under the pointer
56
+ * function PinBadge({ position, hovered }: { position: [number, number, number]; hovered: boolean }) {
57
+ * const stage = useStage()
58
+ * const glyph = useMemo(() => new THREE.TextureLoader().load(iconDataUrl('pin', { ink: '#ffffff' }, 96, 18)), [])
59
+ * return (
60
+ * <group position={position}>
61
+ * <Badge size={6} texture={glyph} tone={hovered ? stage.sketchHover : undefined} renderOrder={10} />
62
+ * </group>
63
+ * )
64
+ * }
65
+ * ```
66
+ *
67
+ * @advanced
68
+ * @category Graphics
69
+ */
70
+ export declare const Badge: React.FC<BadgeProps>;
@@ -0,0 +1,108 @@
1
+ import React from 'react';
2
+ import * as THREE from 'three';
3
+ import { DrawingID, ObjectID, SelectedItem } from '@classcad/sdkjs';
4
+ import { FlipType, ReorientedType } from '@classcad/client';
5
+ /**
6
+ * What a component given to {@link CSysDisplay} as `csys` draws a mate from.
7
+ *
8
+ * @inline
9
+ */
10
+ export type CustomCSys = {
11
+ /** The drawing. */
12
+ drawingId: DrawingID;
13
+ /** Where the mate's coordinate system is, flipped and turned as the mate says. */
14
+ matrix: THREE.Matrix4;
15
+ /** The mate: its coordinate system and its path. */
16
+ userData: {
17
+ /** The work coordinate system the mate is on. */
18
+ csysId: ObjectID;
19
+ /** The instances that lead to it. */
20
+ path: ObjectID[];
21
+ };
22
+ };
23
+ export type CSysUserData = {
24
+ path: ObjectID[];
25
+ csysId: ObjectID;
26
+ flip?: FlipType;
27
+ reorient?: ReorientedType;
28
+ isSelected?: boolean;
29
+ isActive?: boolean;
30
+ onHUD?: boolean;
31
+ };
32
+ /**
33
+ * Which mates {@link CSysDisplay} shows.
34
+ *
35
+ * @advanced
36
+ * @category Graphics
37
+ */
38
+ export declare enum CSysDisplayMode {
39
+ /** Every mate of the instances that take part. */
40
+ DisplayAll = 0,
41
+ /** The mates of the instance under the pointer (for a while after it leaves), and the selected ones. */
42
+ DisplayHovered = 1,
43
+ /** The mates switched visible in the assembly's tree. */
44
+ DisplayVisible = 2
45
+ }
46
+ export type CSysDisplayContextProps = {
47
+ drawingId: DrawingID;
48
+ displayMode: CSysDisplayMode;
49
+ includeSelected: boolean;
50
+ selItems: SelectedItem<any>[];
51
+ activeSelItems: SelectedItem<any>[];
52
+ activeRigidsets: ObjectID[];
53
+ csysComponent: React.FC<CustomCSys> | undefined;
54
+ };
55
+ export declare const CSysDisplayContext: React.Context<CSysDisplayContextProps>;
56
+ export declare const CSysWrapper: React.FC<{
57
+ drawingId: DrawingID;
58
+ csys?: React.FC<CustomCSys>;
59
+ onPointerMove?: (csysId_: ObjectID, path_: ObjectID[]) => void;
60
+ onPointerOut?: (csysId_: ObjectID, path_: ObjectID[]) => void;
61
+ userData: CSysUserData;
62
+ }>;
63
+ /**
64
+ * Props of {@link CSysDisplay}.
65
+ *
66
+ * @advanced
67
+ * @category Graphics
68
+ */
69
+ export type CSysDisplayProps = {
70
+ /** The drawing whose current assembly's mates are shown. */
71
+ drawingId: DrawingID;
72
+ /** A component that draws a mate that is not selected, instead of the stock axes. */
73
+ csys?: React.FC<CustomCSys>;
74
+ /** Which mates are shown. Default {@link CSysDisplayMode.DisplayAll}. */
75
+ displayMode?: CSysDisplayMode;
76
+ /** The instances whose mates take part, by their product. Default: the current product and every instance in it. */
77
+ instances?: ObjectID[];
78
+ /**
79
+ * Lets an instance take part that already has a mate selected in another field, which by default does not (a
80
+ * constraint joins two instances); the current product's own mates then do not. Default `false`.
81
+ */
82
+ includeSelected?: boolean;
83
+ };
84
+ /**
85
+ * Shows the mates of an assembly on the stage: the work coordinate systems of its instances, in a {@link HUD}.
86
+ *
87
+ * It walks the current instance and the instances in it. A mate that is selected in a field (an assembly
88
+ * constraint's) is drawn flipped and turned as the field has it; the others as their coordinate system lies, as
89
+ * `displayMode` says. An instance that does not take part shows only its selected mates. It goes inside the canvas.
90
+ * Its props: {@link CSysDisplayProps}.
91
+ *
92
+ * @example
93
+ * ```tsx
94
+ * import type { DrawingID } from '@classcad/sdkjs'
95
+ * import { CSysDisplay, CSysDisplayMode, EditMode, useEditMode } from '@classcad/react-cad'
96
+ *
97
+ * // in the canvas: the mates the user switched visible in the tree, while an assembly is worked on
98
+ * function Mates({ drawingId }: { drawingId: DrawingID }) {
99
+ * const mode = useEditMode(drawingId)
100
+ * if (mode !== EditMode.Assembly) return null
101
+ * return <CSysDisplay drawingId={drawingId} displayMode={CSysDisplayMode.DisplayVisible} />
102
+ * }
103
+ * ```
104
+ *
105
+ * @advanced
106
+ * @category Graphics
107
+ */
108
+ export declare const CSysDisplay: React.FC<CSysDisplayProps>;
@@ -0,0 +1,33 @@
1
+ import { DrawingID, ObjectID } from '@classcad/sdkjs';
2
+ import React from 'react';
3
+ import * as THREE from 'three';
4
+ /**
5
+ * Props of {@link CompositeCurveObj}.
6
+ *
7
+ * @advanced
8
+ * @category Graphics
9
+ */
10
+ export type CompositeCurveObjProps = {
11
+ /** The drawing the curve is in. */
12
+ drawingId: DrawingID;
13
+ /** The composite curve (`CC_CompositeCurve`) in the drawing's structure tree. */
14
+ objectId: ObjectID;
15
+ /** Its colour. Default: the stage's datum colour ({@link StageColors}.datum). */
16
+ color?: THREE.ColorRepresentation;
17
+ /** How wide its line is, in px. Default `3`. */
18
+ lineWidth?: number;
19
+ /** Given to its lines' `userData`, for whoever picks it from the scene. */
20
+ userData?: any;
21
+ /** Pointer handlers for its lines (react-three-fiber's `onClick`, `onPointerOver`, …). */
22
+ handlers?: any;
23
+ };
24
+ /**
25
+ * Draws a composite curve of the drawing's structure on the stage: its curves as lines of a width in px.
26
+ *
27
+ * It draws what the engine tessellated of the curve (its lines, edges and arcs), over the model. Its props:
28
+ * {@link CompositeCurveObjProps}. See {@link WorkPointObj}.
29
+ *
30
+ * @advanced
31
+ * @category Graphics
32
+ */
33
+ export declare const CompositeCurveObj: React.FC<CompositeCurveObjProps>;
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { DrawingID } from '@classcad/sdkjs';
3
+ /**
4
+ * Props of {@link GeometryOverridesManager}.
5
+ *
6
+ * @category Graphics
7
+ */
8
+ export type GeometryOverridesManagerProps = {
9
+ /** The drawing whose geometry is recoloured. */
10
+ drawingId: DrawingID;
11
+ };
12
+ /**
13
+ * Applies the colour overrides that {@link useOverrideGeometryColor} registers to the model's meshes and edges in the
14
+ * scene.
15
+ *
16
+ * It swaps the material of each mesh and edge of the geometry for a recoloured copy, and puts the material back when
17
+ * the override goes. It applies them anew when the geometry, the active feature or the rollback bar changes. Without
18
+ * it, the overrides do nothing: mount it once inside the canvas. Its props: {@link GeometryOverridesManagerProps}.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * import { Canvas } from '@react-three/fiber'
23
+ * import type { DrawingID } from '@classcad/sdkjs'
24
+ * import { BuerliGeometry } from '@classcad/react'
25
+ * import { GeometryOverridesManager, HoveredConstraintDisplay, PluginGeometryBounds, StageLook } from '@classcad/react-cad'
26
+ *
27
+ * // the pieces an app's own canvas carries for react-cad's plugins and panels
28
+ * const Stage = ({ drawingId }: { drawingId: DrawingID }) => (
29
+ * <Canvas orthographic>
30
+ * <StageLook />
31
+ * <GeometryOverridesManager drawingId={drawingId} />
32
+ * <HoveredConstraintDisplay drawingId={drawingId} />
33
+ * <BuerliGeometry drawingId={drawingId} />
34
+ * <PluginGeometryBounds drawingId={drawingId} />
35
+ * </Canvas>
36
+ * )
37
+ * ```
38
+ *
39
+ * @category Graphics
40
+ */
41
+ export declare const GeometryOverridesManager: React.FC<GeometryOverridesManagerProps>;
@@ -0,0 +1,28 @@
1
+ import type * as THREE from 'three';
2
+ import { ObjectID } from '@classcad/sdkjs';
3
+ /**
4
+ * The colours a geometry override gives the bodies it is for.
5
+ *
6
+ * @inline
7
+ */
8
+ export type OverrideValues = {
9
+ /** The faces' colour. */
10
+ meshColor?: THREE.Color;
11
+ /** The faces' opacity, from 0 to 1 (0 leaves it as it is). */
12
+ meshOpacity?: number;
13
+ /** The edges' colour. */
14
+ lineColor?: THREE.Color;
15
+ /** The edges' opacity, from 0 to 1 (0 leaves it as it is). */
16
+ lineOpacity?: number;
17
+ };
18
+ export type Override = {
19
+ priority: number;
20
+ values: OverrideValues;
21
+ solidIds?: ObjectID[];
22
+ };
23
+ export type GeometryOverridesStateT = {
24
+ overrides: Record<string, Override>;
25
+ addOverride: (name: string, override: Override) => void;
26
+ removeOverride: (name: string) => void;
27
+ };
28
+ export declare const useGeometryOverridesStore: import("zustand").UseBoundStore<import("zustand").StoreApi<GeometryOverridesStateT>>;
@@ -0,0 +1,2 @@
1
+ export { useOverrideGeometryColor } from './useOverrideGeometryColor';
2
+ export { GeometryOverridesManager } from './GeometryOverridesManager';
@@ -0,0 +1,36 @@
1
+ import { ObjectID } from '@classcad/sdkjs';
2
+ import { OverrideValues } from './GeometryOverridesStore';
3
+ /**
4
+ * Recolours bodies of the model while the component that calls it is mounted: a geometry override.
5
+ *
6
+ * The override is registered under `name`, and removed again when the component unmounts or its arguments change;
7
+ * {@link GeometryOverridesManager} applies it in the canvas. Where overrides meet on a body, the one with the lower
8
+ * `priority` wins. An override without `solidIds` is for every body that no override of a lower priority has taken,
9
+ * and overrides of a higher priority are then not applied at all. Keep `values` and `solidIds` the same objects from
10
+ * render to render (`useMemo`): a new one registers the override anew.
11
+ *
12
+ * @param name - The override's name: one of the same name replaces it.
13
+ * @param priority - Its priority: lower wins.
14
+ * @param values - The colours it gives.
15
+ * @param solidIds - The bodies it is for, as {@link useVisibleSolids} gives them; without them, all the others.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * import { useMemo } from 'react'
20
+ * import type { ObjectID } from '@classcad/sdkjs'
21
+ * import { useOverrideGeometryColor } from '@classcad/react-cad'
22
+ *
23
+ * // while it is mounted, the bodies to keep stay as they are and all the others are see-through
24
+ * function GhostTheRest({ keep }: { keep: ObjectID[] }) {
25
+ * const asTheyAre = useMemo(() => ({}), [])
26
+ * const ghost = useMemo(() => ({ meshOpacity: 0.2, lineOpacity: 0.2 }), [])
27
+ * useOverrideGeometryColor('keep', 0, asTheyAre, keep)
28
+ * useOverrideGeometryColor('ghost', 1, ghost)
29
+ * return null
30
+ * }
31
+ * ```
32
+ *
33
+ * @advanced
34
+ * @category Graphics
35
+ */
36
+ export declare const useOverrideGeometryColor: (name: string, priority: number, values: OverrideValues, solidIds?: ObjectID[]) => void;
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ /**
3
+ * Props of {@link HUD}.
4
+ *
5
+ * @advanced
6
+ * @category Graphics
7
+ */
8
+ export type HUDProps = {
9
+ /** What is drawn over the scene. */
10
+ children?: React.ReactNode;
11
+ };
12
+ /**
13
+ * Draws its children over the scene, after it and without its depth: what is in a HUD is never hidden by the model.
14
+ *
15
+ * Every HUD of a canvas shares one scene, which is drawn once a frame with the stage's camera, and only while something
16
+ * in it shows; its children are placed in the scene's coordinates as anywhere else. The work geometry, the mates and
17
+ * the sketch's badges on the stage are drawn in one. It goes inside the canvas. Its props: {@link HUDProps}.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * import { Canvas } from '@react-three/fiber'
22
+ * import type { DrawingID, ObjectID } from '@classcad/sdkjs'
23
+ * import { useBuerliCadFacade } from '@classcad/react'
24
+ * import { HUD, StageLook, WorkPointObj } from '@classcad/react-cad'
25
+ *
26
+ * // a work point that stays in sight, even where the body is in front of it
27
+ * function Stage({ pointId }: { pointId: ObjectID }) {
28
+ * const { drawingId, Geometry } = useBuerliCadFacade('bracket')
29
+ * return (
30
+ * <Canvas orthographic>
31
+ * <StageLook />
32
+ * <Geometry />
33
+ * <HUD>
34
+ * <WorkPointObj drawingId={drawingId} objectId={pointId} color="#e7000b" />
35
+ * </HUD>
36
+ * </Canvas>
37
+ * )
38
+ * }
39
+ * ```
40
+ *
41
+ * @advanced
42
+ * @category Graphics
43
+ */
44
+ export declare const HUD: React.FC<HUDProps>;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { DrawingID } from '@classcad/sdkjs';
3
+ /**
4
+ * Props of {@link HoveredConstraintDisplay}.
5
+ *
6
+ * @advanced
7
+ * @category Graphics
8
+ */
9
+ export type HoveredConstraintDisplayProps = {
10
+ /** The drawing whose assembly constraints are pointed at. */
11
+ drawingId: DrawingID;
12
+ };
13
+ /**
14
+ * Shows what an assembly constraint under the pointer holds: the two mates it joins, or, for a relation such as a
15
+ * gear, the badges of the constraints it relates.
16
+ *
17
+ * The pointer is on the constraint in the {@link Constraints} list or on the stage (the drawing's hovered object).
18
+ * Nothing is shown while a field picks. It goes inside the canvas, and draws in a {@link HUD}; the example of
19
+ * {@link GeometryOverridesManager} has it in its place. Its props: {@link HoveredConstraintDisplayProps}.
20
+ *
21
+ * @advanced
22
+ * @category Graphics
23
+ */
24
+ export declare const HoveredConstraintDisplay: React.FC<HoveredConstraintDisplayProps>;
@@ -0,0 +1,4 @@
1
+ import * as THREE from 'three';
2
+ export declare class InfinityPlane extends THREE.Object3D {
3
+ raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void;
4
+ }
@@ -0,0 +1,8 @@
1
+ import * as THREE from 'three';
2
+ import { Pass } from 'postprocessing';
3
+ export declare class AAPass extends Pass {
4
+ material: THREE.RawShaderMaterial;
5
+ constructor();
6
+ setSize(width: number, height: number): void;
7
+ render(renderer: THREE.WebGLRenderer, inputBuffer: THREE.WebGLRenderTarget, outputBuffer: THREE.WebGLRenderTarget): void;
8
+ }
@@ -0,0 +1,12 @@
1
+ import * as THREE from 'three';
2
+ import { Pass, Selection } from 'postprocessing';
3
+ export declare class IDPass extends Pass {
4
+ material: THREE.RawShaderMaterial;
5
+ oldMaterials: Map<THREE.Mesh, THREE.Material>;
6
+ selection: Selection;
7
+ id: number;
8
+ channel: number;
9
+ constructor(scene: THREE.Scene, camera: THREE.Camera);
10
+ get idColor(): THREE.Color;
11
+ render(renderer: THREE.WebGLRenderer, inputBuffer: THREE.WebGLRenderTarget): void;
12
+ }
@@ -0,0 +1,62 @@
1
+ import React from 'react';
2
+ import { Object3D } from 'three';
3
+ import { OutlineEffect } from './OutlineEffect';
4
+ /**
5
+ * Props of {@link Outline}: the three groups of objects that are outlined, and the outlines' width and colours.
6
+ *
7
+ * @category Graphics
8
+ */
9
+ export type OutlineProps = ConstructorParameters<typeof OutlineEffect>[2] & Partial<{
10
+ /** The first group: what is outlined in `edgeColor1`, as lists of objects (each list one selection). */
11
+ selections1: Object3D[][];
12
+ /** The second group, outlined in `edgeColor2`. */
13
+ selections2: Object3D[][];
14
+ /** The third group, outlined in `edgeColor3`. */
15
+ selections3: Object3D[][];
16
+ /** The layer the outlined objects are put on while they are outlined. Default `10`. */
17
+ selectionLayer: number;
18
+ }>;
19
+ /**
20
+ * An outline effect for postprocessing's `EffectComposer`: draws a line around each object of up to three groups,
21
+ * each group in its own colour.
22
+ *
23
+ * It is an effect, not an object: it goes into an `EffectComposer` (`@react-three/postprocessing`), on WebGL. The
24
+ * groups are what is hovered, selected and picked, say. A colour comes as a pair: the outline's colour, and the one
25
+ * that stands in for it on a body of nearly that colour. A ref reaches the effect. Its props: {@link OutlineProps}.
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * import { EffectComposer } from '@react-three/postprocessing'
30
+ * import type * as THREE from 'three'
31
+ * import { Outline, useStage } from '@classcad/react-cad'
32
+ *
33
+ * // in a WebGL canvas: what is hovered outlined in the highlight, held back; what is selected, in the highlight
34
+ * function Outlines({ hovered, selected }: { hovered: THREE.Object3D[]; selected: THREE.Object3D[] }) {
35
+ * const stage = useStage()
36
+ * return (
37
+ * <EffectComposer autoClear={false} multisampling={8}>
38
+ * <Outline selections1={[hovered]} selections2={[selected]} width={4}
39
+ * edgeColor1={[stage.hover, stage.alt]} edgeColor2={[stage.select, stage.alt]} />
40
+ * </EffectComposer>
41
+ * )
42
+ * }
43
+ * ```
44
+ *
45
+ * @advanced
46
+ * @category Graphics
47
+ */
48
+ export declare const Outline: React.ForwardRefExoticComponent<{
49
+ width?: number | undefined;
50
+ edgeColor1?: [import("three").ColorRepresentation, import("three").ColorRepresentation] | undefined;
51
+ edgeColor2?: [import("three").ColorRepresentation, import("three").ColorRepresentation] | undefined;
52
+ edgeColor3?: [import("three").ColorRepresentation, import("three").ColorRepresentation] | undefined;
53
+ } & Partial<{
54
+ /** The first group: what is outlined in `edgeColor1`, as lists of objects (each list one selection). */
55
+ selections1: Object3D[][];
56
+ /** The second group, outlined in `edgeColor2`. */
57
+ selections2: Object3D[][];
58
+ /** The third group, outlined in `edgeColor3`. */
59
+ selections3: Object3D[][];
60
+ /** The layer the outlined objects are put on while they are outlined. Default `10`. */
61
+ selectionLayer: number;
62
+ }> & React.RefAttributes<OutlineEffect>>;
@@ -0,0 +1,48 @@
1
+ import * as THREE from 'three';
2
+ import { Effect, ClearPass, ShaderPass, Selection } from 'postprocessing';
3
+ import { IDPass } from './IDPass';
4
+ import { WidenPass } from './WidenPass';
5
+ import { AAPass } from './AAPass';
6
+ export declare class OutlineEffect extends Effect {
7
+ scene: THREE.Scene;
8
+ camera: THREE.Camera;
9
+ idRT: THREE.WebGLRenderTarget;
10
+ outlineRT: THREE.WebGLRenderTarget;
11
+ aaRT: THREE.WebGLRenderTarget;
12
+ clearPass: ClearPass;
13
+ idPass: IDPass;
14
+ outlinePass: ShaderPass;
15
+ widenPass: WidenPass;
16
+ aaPass: AAPass;
17
+ selections1: Selection[];
18
+ selections2: Selection[];
19
+ selections3: Selection[];
20
+ time: number;
21
+ isColorSwitchNeeded: (selection: Selection, color: THREE.Color, colorS: THREE.Color) => boolean;
22
+ processSelection: (renderer: THREE.WebGLRenderer, selection: Selection, color: THREE.Color, colorS: THREE.Color, id: number) => void;
23
+ constructor(scene: THREE.Scene, camera: THREE.Camera, {
24
+ /** How wide the outlines are, in px. Default `4`. */
25
+ width,
26
+ /**
27
+ * The colour of the first group's outline, and the one that stands in for it on a body of nearly that colour.
28
+ * Default white and grey.
29
+ */
30
+ edgeColor1,
31
+ /** The colours of the second group's outline, the same way. */
32
+ edgeColor2,
33
+ /** The colours of the third group's outline, the same way. */
34
+ edgeColor3, }?: {
35
+ width?: number | undefined;
36
+ edgeColor1?: [THREE.ColorRepresentation, THREE.ColorRepresentation] | undefined;
37
+ edgeColor2?: [THREE.ColorRepresentation, THREE.ColorRepresentation] | undefined;
38
+ edgeColor3?: [THREE.ColorRepresentation, THREE.ColorRepresentation] | undefined;
39
+ });
40
+ set width(value: number);
41
+ set edgeColor1(value: [THREE.ColorRepresentation, THREE.ColorRepresentation]);
42
+ set edgeColor2(value: [THREE.ColorRepresentation, THREE.ColorRepresentation]);
43
+ set edgeColor3(value: [THREE.ColorRepresentation, THREE.ColorRepresentation]);
44
+ set selectionLayer(value: number);
45
+ update(renderer: THREE.WebGLRenderer, inputBuffer: THREE.WebGLRenderTarget, deltaTime: number): void;
46
+ setSize(width: number, height: number): void;
47
+ initialize(renderer: THREE.WebGLRenderer, alpha: boolean, frameBufferType?: number): void;
48
+ }
@@ -0,0 +1,9 @@
1
+ import * as THREE from 'three';
2
+ export declare class OutlineMaterial extends THREE.ShaderMaterial {
3
+ constructor(texelSize?: THREE.Vector2);
4
+ set inputBuffer(value: THREE.Texture);
5
+ set idColor(value: THREE.Color);
6
+ set isColorSwitchNeeded(value: boolean);
7
+ setTexelSize(x: number, y: number): void;
8
+ setSize(width: number, height: number): void;
9
+ }
@@ -0,0 +1,17 @@
1
+ import * as THREE from 'three';
2
+ import { Pass, CopyMaterial } from 'postprocessing';
3
+ export declare class WidenPass extends Pass {
4
+ material: THREE.RawShaderMaterial;
5
+ copyMaterial: CopyMaterial;
6
+ renderTargetA: THREE.WebGLRenderTarget;
7
+ renderTargetB: THREE.WebGLRenderTarget;
8
+ passes: number;
9
+ pxPass: boolean;
10
+ constructor({ width }: {
11
+ width: number;
12
+ });
13
+ set width(value: number);
14
+ setSize(width: number, height: number): void;
15
+ render(renderer: THREE.WebGLRenderer, inputBuffer: THREE.WebGLRenderTarget, outputBuffer: THREE.WebGLRenderTarget): void;
16
+ initialize(renderer: THREE.WebGLRenderer, alpha: boolean, frameBufferType?: number): void;
17
+ }