@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,162 @@
1
+ import React from 'react';
2
+ import { Mentions as MentionsImpl } from 'antd';
3
+ import type { AlertProps, AutoCompleteProps, ButtonProps, CheckboxProps, CollapseProps, DropDownProps, InputProps, InputRef, MentionProps, MenuItemProps, MenuProps, RefSelectProps, SelectProps, SliderSingleProps as SliderBaseProps, TabPaneProps, TabsProps, TooltipProps } from 'antd';
4
+ import { CustomSelect, DrawingID, SelectedItem, SelectionFilter, SelectorID } from '@classcad/sdkjs';
5
+ /**
6
+ * What a field tells the control inside it: here, what its picker ({@link elements}.Selection) says while it is
7
+ * empty and not listening.
8
+ *
9
+ * The feature dialogs' fields provide it; a `caption` given to the picker itself goes first.
10
+ *
11
+ * @advanced
12
+ * @category UI Elements
13
+ */
14
+ export declare const FieldContext: React.Context<{
15
+ /** What an empty picker says, such as `Pick a face`. Default: `Click to pick`. */
16
+ hint?: string;
17
+ }>;
18
+ declare function Group({ children, format, className, ...props }: {
19
+ children?: React.ReactNode;
20
+ format?: string;
21
+ } & React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
22
+ declare function Button({ children, iconSrc, titleText, className, ...props }: ButtonProps & {
23
+ iconSrc?: string;
24
+ titleText?: string;
25
+ }): React.JSX.Element;
26
+ declare function ButtonGroup({ children, className, ...props }: ButtonProps): React.JSX.Element;
27
+ type LabelProps = React.HTMLAttributes<HTMLDivElement> & {
28
+ highlighted?: boolean;
29
+ bold?: boolean;
30
+ ellipsis?: boolean;
31
+ };
32
+ declare function Label({ highlighted, bold, ellipsis, className, ...props }: LabelProps): React.JSX.Element;
33
+ type MentionsT = React.ForwardRefExoticComponent<MentionProps & React.RefAttributes<any>> & {
34
+ Option: typeof MentionsImpl.Option;
35
+ };
36
+ declare function Slider({ children, className, ...props }: {
37
+ children?: any[];
38
+ } & SliderBaseProps & {
39
+ className?: string;
40
+ }): React.JSX.Element;
41
+ declare function Checkbox({ children, className, ...props }: CheckboxProps): React.JSX.Element;
42
+ declare function Collapse({ children, header, isActive, className, ...props }: CollapseProps & {
43
+ children?: React.ReactNode;
44
+ header: React.ReactNode;
45
+ isActive: boolean;
46
+ }): React.JSX.Element;
47
+ type Mode = {
48
+ name: string;
49
+ customSelect: CustomSelect;
50
+ customUnSelect: CustomSelect;
51
+ };
52
+ type SelectionArgs = {
53
+ drawingId: DrawingID;
54
+ filter?: SelectionFilter;
55
+ defaultActive?: boolean;
56
+ initialItems?: SelectedItem[];
57
+ onChange?: (items: SelectedItem[]) => void;
58
+ onCreated?: (selectorId: SelectorID) => void;
59
+ caption?: string;
60
+ maxLen?: number;
61
+ customSelect?: CustomSelect;
62
+ customUnSelect?: CustomSelect;
63
+ modes?: Mode[];
64
+ onHover?: ((objData: SelectedItem | null) => void) | undefined;
65
+ autoDisable?: boolean;
66
+ style?: React.CSSProperties;
67
+ className?: string;
68
+ };
69
+ /**
70
+ * The well a reference is picked into. A click makes it listen: its ring turns red, and what is
71
+ * clicked on the stage or in the tree goes into it. While it listens, a click on one of its chips
72
+ * takes that one out again.
73
+ */
74
+ declare function Selection({ drawingId, filter, defaultActive, initialItems, maxLen, onChange, onCreated, caption, customSelect, customUnSelect, autoDisable, // Disable selection when itmes.length === maxLen
75
+ modes, onHover, style: _style, className, ...props }: SelectionArgs): React.JSX.Element;
76
+ declare function AutoComplete({ className, ...props }: AutoCompleteProps): React.JSX.Element;
77
+ declare function Alert({ className, ...props }: AlertProps): React.JSX.Element;
78
+ declare function Tabs({ ...props }: TabsProps): React.JSX.Element;
79
+ declare function TabPane({ ...props }: TabPaneProps): React.JSX.Element;
80
+ declare function Tooltip(props: TooltipProps): React.JSX.Element;
81
+ declare function Menu({ ...props }: MenuProps): React.JSX.Element;
82
+ declare function MenuItem({ ...props }: MenuItemProps): React.JSX.Element;
83
+ declare function Dropdown({ ...props }: DropDownProps): React.JSX.Element;
84
+ /**
85
+ * The form controls the feature dialogs are made of, in the app's look: react-cad's set of buerli's `elements`.
86
+ *
87
+ * They take the place of the ones `@classcad/react` ships, prop for prop: plugins take their controls from `init`'s
88
+ * `elements` option, so an app passes these there. {@link Drawing} does so by itself where the app left the stock
89
+ * ones in; an app that brought controls of its own keeps them. They are antd's controls, styled by the app's
90
+ * stylesheet ({@link AppStyle}).
91
+ *
92
+ * @example
93
+ * ```tsx
94
+ * import type { TooltipProps } from 'antd'
95
+ * import { init, WASMClient } from '@classcad/client'
96
+ * import { elements } from '@classcad/react-cad'
97
+ *
98
+ * // the feature dialogs in the app's look; with a control of the app's own in place of one of them
99
+ * init((drawingId) => new WASMClient(drawingId, { token: 'ccpk_…' }), {
100
+ * elements: { ...elements, Tooltip: (props: TooltipProps) => <elements.Tooltip {...props} mouseEnterDelay={0.6} /> },
101
+ * })
102
+ * ```
103
+ *
104
+ * @category UI Elements
105
+ */
106
+ export declare const elements: {
107
+ /** A row (or, with `format="Columns"`, a column) of controls. */
108
+ Group: typeof Group;
109
+ /** A button (antd `Button`); with `iconSrc`, a small one with an icon, and with `titleText`, a tooltip. */
110
+ Button: typeof Button;
111
+ /** Buttons side by side. */
112
+ ButtonGroup: typeof ButtonGroup;
113
+ /** A text or number input (antd `Input`). */
114
+ Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>;
115
+ /** A label in front of a control; `highlighted` marks a value that was changed. */
116
+ Label: typeof Label;
117
+ /** A dropdown to choose from (antd `Select`); its children are the options, as strings. */
118
+ Select: React.ForwardRefExoticComponent<{
119
+ /** The options, as strings: each is its own value and label. */
120
+ children?: any[];
121
+ } & SelectProps<any, import("@rc-component/select").DefaultOptionType> & React.RefAttributes<RefSelectProps>>;
122
+ /** A text input with suggestions after a prefix such as `@` (antd `Mentions`), for expressions. */
123
+ Mentions: MentionsT;
124
+ /** A slider (antd `Slider`). */
125
+ Slider: typeof Slider;
126
+ /** A checkbox (antd `Checkbox`). */
127
+ Checkbox: typeof Checkbox;
128
+ /** A section that opens and closes (antd `Collapse`), open while `isActive`. */
129
+ Collapse: typeof Collapse;
130
+ /**
131
+ * The well a reference is picked into: a field that shows what its selector has selected, as chips.
132
+ *
133
+ * A click makes it listen (its selector is the drawing's active one): its ring turns red, and what is clicked on
134
+ * the stage or in the tree goes into it. While it listens, a click on one of its chips takes that one out again.
135
+ * While it is empty it says its `caption`, or the {@link FieldContext}'s hint.
136
+ */
137
+ Selection: typeof Selection;
138
+ /** A text input with suggestions (antd `AutoComplete`). */
139
+ AutoComplete: typeof AutoComplete;
140
+ /** A message box (antd `Alert`). */
141
+ Alert: typeof Alert;
142
+ /** Tabs (antd `Tabs`). */
143
+ Tabs: typeof Tabs;
144
+ /** A tab of {@link elements}.Tabs. */
145
+ TabPane: typeof TabPane;
146
+ /** A tooltip (antd `Tooltip`). */
147
+ Tooltip: typeof Tooltip;
148
+ /** A menu (antd `Menu`). */
149
+ Menu: typeof Menu;
150
+ /** An entry of {@link elements}.Menu. */
151
+ MenuItem: typeof MenuItem;
152
+ /** A dropdown menu (antd `Dropdown`). */
153
+ Dropdown: typeof Dropdown;
154
+ };
155
+ /**
156
+ * The type of react-cad's {@link elements}.
157
+ *
158
+ * @advanced
159
+ * @category UI Elements
160
+ */
161
+ export type RCadElements = typeof elements;
162
+ export {};
@@ -0,0 +1,73 @@
1
+ import type { IconLayer } from './types';
2
+ export declare const axes: {
3
+ /** An offset along X. */
4
+ offsetX: IconLayer[];
5
+ /** The lower limit of an offset along X. */
6
+ offsetXMin: IconLayer[];
7
+ /** The upper limit of an offset along X. */
8
+ offsetXMax: IconLayer[];
9
+ /** An offset along Y. */
10
+ offsetY: IconLayer[];
11
+ /** The lower limit of an offset along Y. */
12
+ offsetYMin: IconLayer[];
13
+ /** The upper limit of an offset along Y. */
14
+ offsetYMax: IconLayer[];
15
+ /** An offset along Z. */
16
+ offsetZ: IconLayer[];
17
+ /** The lower limit of an offset along Z. */
18
+ offsetZMin: IconLayer[];
19
+ /** The upper limit of an offset along Z. */
20
+ offsetZMax: IconLayer[];
21
+ /** The X axis picked as a direction. */
22
+ directionX: IconLayer[];
23
+ /** The Y axis picked as a direction. */
24
+ directionY: IconLayer[];
25
+ /** A turn about X. */
26
+ rotationX: IconLayer[];
27
+ /** A turn about Y. */
28
+ rotationY: IconLayer[];
29
+ /** A turn about Z. */
30
+ rotationZ: IconLayer[];
31
+ /** The lower limit of a turn about Z. */
32
+ rotationZMin: IconLayer[];
33
+ /** The upper limit of a turn about Z. */
34
+ rotationZMax: IconLayer[];
35
+ /** A turn in space. */
36
+ rotation3d: (["sub", string] | ["", string])[];
37
+ /** A direction switch, the one way. */
38
+ switchDirection1: string;
39
+ /** A direction switch, the other way. */
40
+ switchDirection2: string;
41
+ /** A normal switch, the one way. */
42
+ switchNormal1: (["sub", string] | ["", string])[];
43
+ /** A normal switch, the other way. */
44
+ switchNormal2: (["sub", string] | ["", string])[];
45
+ /** A switch of X, the one way. */
46
+ switchX1: IconLayer[];
47
+ /** A switch of X, the other way. */
48
+ switchX2: IconLayer[];
49
+ /** A switch of Y, the one way. */
50
+ switchY1: IconLayer[];
51
+ /** A switch of Y, the other way. */
52
+ switchY2: IconLayer[];
53
+ /** A mate whose main axis is X. */
54
+ flipX: IconLayer[];
55
+ /** A mate whose main axis is -X. */
56
+ flipXInv: IconLayer[];
57
+ /** A mate whose main axis is Y. */
58
+ flipY: IconLayer[];
59
+ /** A mate whose main axis is -Y. */
60
+ flipYInv: IconLayer[];
61
+ /** A mate whose main axis is Z. */
62
+ flipZ: IconLayer[];
63
+ /** A mate whose main axis is -Z. */
64
+ flipZInv: IconLayer[];
65
+ /** A mate as it lies, not turned about its main axis. */
66
+ reorient0: IconLayer[];
67
+ /** A mate turned 90° about its main axis. */
68
+ reorient90: IconLayer[];
69
+ /** A mate turned 180° about its main axis. */
70
+ reorient180: IconLayer[];
71
+ /** A mate turned 270° about its main axis. */
72
+ reorient270: IconLayer[];
73
+ };
@@ -0,0 +1,75 @@
1
+ import type { IconLayer } from './types';
2
+ export type P2 = readonly [number, number];
3
+ export type P3 = readonly [number, number, number];
4
+ /** The camera: a point in space, to the sheet. `s` is how long a unit is, `o` where the origin lies. */
5
+ export declare const iso: (s?: number, o?: P2) => ([x, y, z]: P3) => P2;
6
+ /** A line through points; closed when asked. */
7
+ export declare const line: (pts: readonly P2[], close?: boolean) => string;
8
+ /** A circle (as two arcs, so it can be stroked from its start). */
9
+ export declare const circle: (cx: number, cy: number, r: number) => string;
10
+ /** An ellipse, its axes along the sheet's. */
11
+ export declare const ellipse: (cx: number, cy: number, rx: number, ry: number) => string;
12
+ /** Part of an ellipse, from angle a0 to a1 (degrees, clockwise on the sheet from its right). */
13
+ export declare const arc: (cx: number, cy: number, rx: number, ry: number, a0: number, a1: number) => string;
14
+ /** A rectangle with round corners. */
15
+ export declare const rect: (x: number, y: number, w: number, h: number, r?: number) => string;
16
+ /** An arrow's head at `to`, coming from `from`: a solid triangle, `size` long. */
17
+ export declare const head: (from: P2, to: P2, size?: number) => string;
18
+ /** The box from `lo` to `hi`, as the camera sees it: its outline and the three edges of its near corner. */
19
+ export declare const box: (cam: (p: P3) => P2, lo: P3, hi: P3) => {
20
+ outline: string;
21
+ corner: string;
22
+ all: string;
23
+ };
24
+ /** A flat face in space, as the camera sees it. */
25
+ export declare const face: (cam: (p: P3) => P2, pts: readonly P3[]) => string;
26
+ /** A path through space. */
27
+ export declare const path3: (cam: (p: P3) => P2, pts: readonly P3[], close?: boolean) => string;
28
+ /** A point on an ellipse about `c`, by its angle (degrees, clockwise on the sheet from its right). */
29
+ export declare const on: (c: P2, rx: number, ry: number, a: number) => P2;
30
+ /** A point of a sign: a small filled dot. */
31
+ export declare const dot: (p: P2, r?: number) => string;
32
+ /** An arrow: its shaft, and a solid head. */
33
+ export declare const arrowTo: (from: P2, to: P2, size?: number) => string;
34
+ /** A length, as a dimension is drawn: a shaft with a head at either end. */
35
+ export declare const spanTo: (a: P2, b: P2, size?: number) => string;
36
+ /** A turn: part of an ellipse, with an arrow's head where it ends. */
37
+ export declare const turn: (c: P2, rx: number, ry: number, a0: number, a1: number, size?: number) => string;
38
+ /** A block from `lo` to `hi` in the one camera: its lines, its outline alone, and its top face. */
39
+ export declare const block: (s: number, o: P2, lo?: P3, hi?: P3) => {
40
+ cam: ([x, y, z]: P3) => P2;
41
+ lines: string;
42
+ outline: string;
43
+ top: string;
44
+ /** The face that looks along +X (to the right), and the one that looks along −Y (to the left). */
45
+ right: string;
46
+ left: string;
47
+ };
48
+ /** The cube every sign of a body starts from: it fills the sheet. */
49
+ export declare const cube: {
50
+ cam: ([x, y, z]: P3) => P2;
51
+ lines: string;
52
+ outline: string;
53
+ top: string;
54
+ /** The face that looks along +X (to the right), and the one that looks along −Y (to the left). */
55
+ right: string;
56
+ left: string;
57
+ };
58
+ /** A plate lying flat, as the camera sees it: its middle at `m`, `w` half its width on the sheet. */
59
+ export declare const plate: (m: P2, w: number) => string;
60
+ /** One of several: a small solid tile about `m`. For a pen that fills. */
61
+ export declare const tile: (m: P2, side?: number) => string;
62
+ /** Where three tiles in a row lie, the sheet wide. */
63
+ export declare const ROW: readonly [3.2, 10, 16.8];
64
+ /** Three about a middle: the one that was there at the top, its copies to either side below. */
65
+ export declare const AROUND: {
66
+ m: P2;
67
+ r: number;
68
+ at: number[];
69
+ };
70
+ /** A pattern along a line: the one that was there in grey, its copies in ink, in a row at `y`. */
71
+ export declare const copiesInRow: (y: number, way?: (p: P2) => P2) => IconLayer[];
72
+ /** A pattern about a middle: the circle the copies lie on (in grey, between them), and the three on it. */
73
+ export declare const copiesAround: (m?: P2, r?: number) => IconLayer[];
74
+ /** The closed shape a sign is about, as a body: its wash, then its outline. */
75
+ export declare const toned: (d: string) => IconLayer[];
@@ -0,0 +1,71 @@
1
+ import type { IconLayer } from './types';
2
+ export declare const features: {
3
+ /** Sketch: a profile and its points. */
4
+ sketch: (["fill", string] | ["tone", string] | ["", string])[];
5
+ /** Extrusion: a profile raised into a body. */
6
+ extrusion: (["tone", string] | ["", string])[];
7
+ /** Revolve: a profile turned about an axis into a body. */
8
+ revolve: (["sub-fill", string] | ["tone", string] | ["", string])[];
9
+ /** Twist: a profile raised with a twist. */
10
+ twist: (["tone", string] | ["", string])[];
11
+ /** Box. */
12
+ box: (["tone", string] | ["", string])[];
13
+ /** Cylinder. */
14
+ cylinder: (["tone", string] | ["", string])[];
15
+ /** Cone. */
16
+ cone: (["tone", string] | ["", string])[];
17
+ /** Sphere. */
18
+ sphere: (["tone", string] | ["", string])[];
19
+ /** Union: two bodies joined into one. */
20
+ union: (["tone", string] | ["", string])[];
21
+ /** Subtraction: the one body taken from the other. */
22
+ subtraction: (["tone", string] | ["", string] | ["sub-dash", string])[];
23
+ /** Intersection: what two bodies share. */
24
+ intersection: (["fill", string] | ["sub", string] | ["", string])[];
25
+ /** Fillet: an edge rounded. */
26
+ fillet: (["sub", string] | ["", string])[];
27
+ /** Chamfer: an edge cut. */
28
+ chamfer: (["sub", string] | ["", string])[];
29
+ /** Slice: a body cut in two by a plane. */
30
+ slice: (["sub", string] | ["tone", string] | ["", string])[];
31
+ /** Slice by sheet: a body cut in two by a sheet. */
32
+ sliceBySheet: (["sub", string] | ["tone", string] | ["", string])[];
33
+ /** Mirror: a body repeated in a mirror. */
34
+ mirror: (["sub", string] | ["tone", string] | ["", string] | ["axis", string])[];
35
+ /** Linear pattern: a body repeated along a line. */
36
+ linearPattern: IconLayer[];
37
+ /** Circular pattern: a body repeated about an axis. */
38
+ circularPattern: IconLayer[];
39
+ /** Translate: a body moved along a line. */
40
+ translation: IconLayer[];
41
+ /** Rotate: a body turned about an axis. */
42
+ rotation: IconLayer[];
43
+ /** Transform by coordinate systems: a body moved from one to another. */
44
+ transformByCsys: IconLayer[];
45
+ /** Work plane. */
46
+ workPlane: IconLayer[];
47
+ /** Work axis. */
48
+ workAxis: (["fill", string] | ["", string])[];
49
+ /** Work point. */
50
+ workPoint: (["fill", string] | ["", string])[];
51
+ /** Work coordinate system. */
52
+ workCSys: (["fill", string] | ["", string])[];
53
+ /** The part's origin. */
54
+ origin: (["fill", string] | ["sub", string])[];
55
+ /** The part's X axis. */
56
+ axisX: IconLayer[];
57
+ /** The part's Y axis. */
58
+ axisY: IconLayer[];
59
+ /** The part's Z axis. */
60
+ axisZ: IconLayer[];
61
+ /** The part's top plane. */
62
+ planeTop: IconLayer[];
63
+ /** The part's front plane. */
64
+ planeFront: IconLayer[];
65
+ /** The part's right plane. */
66
+ planeRight: IconLayer[];
67
+ /** A body. */
68
+ solid: (["tone", string] | ["", string])[];
69
+ /** A part. */
70
+ part: (["tone", string] | ["", string])[];
71
+ };
@@ -0,0 +1,10 @@
1
+ export declare const glyphs: {
2
+ /** Two bodies: an assembly. */
3
+ assembly: (["sub", string] | ["tone", string] | ["", string])[];
4
+ /** A cube, crossed out: a body or a face taken out of a part again. */
5
+ entityDeletion: (["sub", string] | ["", string])[];
6
+ /** A curve through points: several curves taken as one. */
7
+ compositeCurve: (["fill", string] | ["", string])[];
8
+ /** A rectangle with a hole, filled: a region of a sketch. */
9
+ region: (["sub", string] | ["tone", string] | ["", string])[];
10
+ };
@@ -0,0 +1,152 @@
1
+ import React from 'react';
2
+ import { IconDrawing, IconLayer, IconPen } from './types';
3
+ import { drawings, IconName } from './sheets';
4
+ export type { IconName, IconDrawing, IconLayer, IconPen };
5
+ export { drawings };
6
+ /**
7
+ * An icon's reference: a string (`'rcad:extrusion'`) that goes wherever an image's url went before.
8
+ *
9
+ * It goes into a plugin description's `iconUrl` or a menu item's icon, say: {@link Icon} draws it from its `url`, and
10
+ * shows anything else it is handed there as the image it is. {@link iconSvg} and {@link iconDataUrl} take it too.
11
+ *
12
+ * @param name - The drawing's name.
13
+ * @example
14
+ * ```tsx
15
+ * import { Icon, iconRef } from '@classcad/react-cad'
16
+ *
17
+ * // what took an image's url takes the reference: it is drawn as the sign, in the theme's ink
18
+ * const tools = [
19
+ * { name: 'Extrude', iconUrl: iconRef('extrusion') },
20
+ * { name: 'Logo', iconUrl: '/logo.svg' },
21
+ * ]
22
+ * const Tools = () => (
23
+ * <>{tools.map((tool) => <Icon key={tool.name} url={tool.iconUrl} size={20} title={tool.name} />)}</>
24
+ * )
25
+ * ```
26
+ *
27
+ * @category Icons
28
+ */
29
+ export declare const iconRef: (name: IconName) => string;
30
+ /**
31
+ * Whether a string is an icon's reference ({@link iconRef}) rather than an image's url.
32
+ *
33
+ * @internal
34
+ */
35
+ export declare const isIconRef: (url: unknown) => url is string;
36
+ /**
37
+ * Props of {@link Icon}.
38
+ *
39
+ * @category Icons
40
+ */
41
+ export type IconProps = {
42
+ /** A drawing's name. */
43
+ name?: IconName;
44
+ /** Or its reference (see {@link iconRef}), or the url of an image, which is shown as an `<img>`. */
45
+ url?: string;
46
+ /** Its width and height in px. Its lines keep their weight on the screen at any size. Default `20`. */
47
+ size?: number;
48
+ /** A class for the `<svg>`, besides `rcad-icon`. */
49
+ className?: string;
50
+ /** Its style. */
51
+ style?: React.CSSProperties;
52
+ /** What it says to a screen reader (and an image's `alt`). Without it, the icon is hidden from one. */
53
+ title?: string;
54
+ /** All in the one ink: no grey, no axis colours (a point keeps its light centre). Default `false`. */
55
+ mono?: boolean;
56
+ };
57
+ /**
58
+ * Draws one of the app's icons: a sign on a 20 × 20 sheet, in two tones of the theme's ink.
59
+ *
60
+ * It is an inline `<svg>` that the stylesheet ({@link AppStyle}) inks: its lines are the theme's ink, what a sign
61
+ * is done to is grey, and an axis is in its own colour. It is given the drawing's `name`, or a `url` that is a
62
+ * reference ({@link iconRef}) or an image's url, which it shows as an `<img>`. A name that has no drawing shows a
63
+ * dashed square. The drawings are {@link icons}. Its props: {@link IconProps}.
64
+ *
65
+ * @example
66
+ * ```tsx
67
+ * // on a page that only needs the icons: nothing but React
68
+ * import { Icon, iconDataUrl, iconRef } from '@classcad/react-cad/icons'
69
+ *
70
+ * const ToolButton = ({ onClick }: { onClick: () => void }) => (
71
+ * <button className="rcad-tool" onClick={onClick} title="Extrude">
72
+ * <Icon name="extrusion" size={20} />
73
+ * </button>
74
+ * )
75
+ * // a reference goes where an image's url went before; an image's url still shows as an <img>
76
+ * const Fillet = () => <Icon url={iconRef('fillet')} size={16} title="Fillet" />
77
+ * const Logo = () => <Icon url="/logo.svg" size={24} title="Our app" />
78
+ * // where no stylesheet reaches: the same drawing in colours of its own
79
+ * const Favicon = () => <link rel="icon" href={iconDataUrl('part', { ink: '#e7000b' }, 32)} />
80
+ * ```
81
+ *
82
+ * @category Icons
83
+ */
84
+ export declare const Icon: React.FC<IconProps>;
85
+ /**
86
+ * The colours an icon is drawn in, where no stylesheet gives them.
87
+ *
88
+ * @inline
89
+ */
90
+ type Inks = {
91
+ /** The ink: what the sign is about. What it is done to is the same, at 46 %. */
92
+ ink: string;
93
+ /** The X axis' colour. Default: the ink. */
94
+ x?: string;
95
+ /** The Y axis' colour. Default: the ink. */
96
+ y?: string;
97
+ /** The Z axis' colour. Default: the ink. */
98
+ z?: string;
99
+ /** All in the ink: no grey, and the axes in it too (a point keeps its light centre). Default `false`. */
100
+ mono?: boolean;
101
+ };
102
+ /**
103
+ * An icon as a standalone svg, its colours written into it: for where no stylesheet reaches.
104
+ *
105
+ * That is a texture on the canvas, say, or an image's url ({@link iconDataUrl}). Its lines are weighed for the size it
106
+ * is seen at, which a texture drawn large, to stay sharp, and shown small says apart from its size.
107
+ *
108
+ * @param name - The drawing's name, or its reference ({@link iconRef}).
109
+ * @param inks - Its colours, such as `{ ink: '#0f1320' }`.
110
+ * @param size - The svg's width and height in px. Default `20`.
111
+ * @param seenAt - The size in px it is seen at, which its lines are weighed for. Default: `size`.
112
+ * @returns The svg's markup.
113
+ *
114
+ * @example
115
+ * ```tsx
116
+ * import * as THREE from 'three'
117
+ * import { getStage, iconSvg } from '@classcad/react-cad'
118
+ *
119
+ * // a sign as a texture on the stage: drawn at 96 px to stay sharp, its lines weighed for 16 px on screen
120
+ * const stage = getStage()
121
+ * const svg = iconSvg('workPlane', { ink: stage.datum }, 96, 16)
122
+ * const texture = new THREE.TextureLoader().load('data:image/svg+xml;utf8,' + encodeURIComponent(svg))
123
+ * const material = new THREE.SpriteMaterial({ map: texture, transparent: true })
124
+ * ```
125
+ *
126
+ * @advanced
127
+ * @category Icons
128
+ */
129
+ export declare function iconSvg(name: IconName | string, inks: Inks, size?: number, seenAt?: number): string;
130
+ /**
131
+ * An icon as a `data:` url of its svg ({@link iconSvg}): for an `<img>`, a CSS background or a texture's loader.
132
+ *
133
+ * @param name - The drawing's name, or its reference ({@link iconRef}).
134
+ * @param inks - Its colours, such as `{ ink: '#0f1320' }`.
135
+ * @param size - The svg's width and height in px. Default `20`.
136
+ * @param seenAt - The size in px it is seen at, which its lines are weighed for. Default: `size`.
137
+ *
138
+ * @example
139
+ * ```tsx
140
+ * import { iconDataUrl, useRCadTheme } from '@classcad/react-cad'
141
+ *
142
+ * // an icon as an <img>, in the theme's colours: the axes in their own
143
+ * function AxisBadge() {
144
+ * const colors = useRCadTheme()
145
+ * const src = iconDataUrl('rotation3d', { ink: colors.ink, x: colors.axisX, y: colors.axisY, z: colors.axisZ }, 24)
146
+ * return <img src={src} width={24} height={24} alt="Rotation" />
147
+ * }
148
+ * ```
149
+ *
150
+ * @category Icons
151
+ */
152
+ export declare const iconDataUrl: (name: IconName | string, inks: Inks, size?: number, seenAt?: number) => string;