@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.
- package/CHANGELOG.md +57 -0
- package/README.md +98 -2
- package/build/components/UI/CAD/Constraints.d.ts +30 -0
- package/build/components/UI/CAD/Drawing.d.ts +83 -0
- package/build/components/UI/CAD/ListPlaceholder.d.ts +3 -0
- package/build/components/UI/CAD/Messages/Message.d.ts +8 -0
- package/build/components/UI/CAD/Messages/Messages.d.ts +43 -0
- package/build/components/UI/CAD/Messages/index.d.ts +1 -0
- package/build/components/UI/CAD/Messages/msgStore.d.ts +18 -0
- package/build/components/UI/CAD/ModelTree/AssemblyNode.d.ts +5 -0
- package/build/components/UI/CAD/ModelTree/FeatureList/Feature.d.ts +8 -0
- package/build/components/UI/CAD/ModelTree/FeatureList/FeatureList.d.ts +6 -0
- package/build/components/UI/CAD/ModelTree/FeatureList/index.d.ts +1 -0
- package/build/components/UI/CAD/ModelTree/FeatureList/utils.d.ts +26 -0
- package/build/components/UI/CAD/ModelTree/ModelTree.d.ts +56 -0
- package/build/components/UI/CAD/ModelTree/ModelTreeHeader.d.ts +15 -0
- package/build/components/UI/CAD/ModelTree/index.d.ts +1 -0
- package/build/components/UI/CAD/ModelTree/primitives.d.ts +6 -0
- package/build/components/UI/CAD/ModelTree/useContextMenuItems.d.ts +4 -0
- package/build/components/UI/CAD/PluginBounds.d.ts +8 -0
- package/build/components/UI/CAD/PluginTooltip.d.ts +5 -0
- package/build/components/UI/CAD/PluginsWindows.d.ts +99 -0
- package/build/components/UI/CAD/ReadOnlyContext.d.ts +10 -0
- package/build/components/UI/CAD/SideBar.d.ts +40 -0
- package/build/components/UI/CAD/Solids/Solids.d.ts +23 -0
- package/build/components/UI/CAD/Solids/index.d.ts +1 -0
- package/build/components/UI/CAD/Solids/useContextMenuItems.d.ts +4 -0
- package/build/components/UI/CAD/Solids/useVisibleSolids.d.ts +30 -0
- package/build/components/UI/CAD/StageHud.d.ts +9 -0
- package/build/components/UI/CAD/StatusBar.d.ts +11 -0
- package/build/components/UI/CAD/ThemeToggle.d.ts +25 -0
- package/build/components/UI/CAD/ToolBar/AssemblyModeCmds.d.ts +3 -0
- package/build/components/UI/CAD/ToolBar/PartModeCmds.d.ts +3 -0
- package/build/components/UI/CAD/ToolBar/ToolBar.d.ts +24 -0
- package/build/components/UI/CAD/ToolBar/index.d.ts +1 -0
- package/build/components/UI/CAD/ToolBar/useCommands.d.ts +12 -0
- package/build/components/UI/CAD/ViewOptionsBar/ViewOptionButtons.d.ts +30 -0
- package/build/components/UI/CAD/ViewOptionsBar/useOptionCommands.d.ts +65 -0
- package/build/components/UI/CAD/ViewPlugButtons.d.ts +43 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModal.d.ts +18 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModalContext.d.ts +9 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModalInner.d.ts +27 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/DraggableModalProvider.d.ts +4 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/OverlayScrollbar.d.ts +6 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/ResizeHandle.d.ts +2 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/clamp.d.ts +1 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/draggableModalReducer.d.ts +123 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/getWindowSize.d.ts +4 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/index.d.ts +3 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/useDrag.d.ts +5 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/usePrevious.d.ts +1 -0
- package/build/components/UI/CAD/ant-design-draggable-modal/useResize.d.ts +7 -0
- package/build/components/UI/CAD/common/BlankDiv.d.ts +3 -0
- package/build/components/UI/CAD/common/Collapse.d.ts +13 -0
- package/build/components/UI/CAD/common/ContextMenu.d.ts +115 -0
- package/build/components/UI/CAD/common/Divider.d.ts +4 -0
- package/build/components/UI/CAD/common/EntityName.d.ts +14 -0
- package/build/components/UI/CAD/common/Img.d.ts +6 -0
- package/build/components/UI/CAD/common/LoadingScreen/LoadingScreen.d.ts +8 -0
- package/build/components/UI/CAD/common/LoadingScreen/Spinner.d.ts +3 -0
- package/build/components/UI/CAD/common/LoadingScreen/index.d.ts +1 -0
- package/build/components/UI/CAD/common/Menu.d.ts +81 -0
- package/build/components/UI/CAD/common/MultiSelect.d.ts +12 -0
- package/build/components/UI/CAD/common/NameEdit.d.ts +7 -0
- package/build/components/UI/CAD/common/SectionHeader.d.ts +9 -0
- package/build/components/UI/CAD/common/primitives.d.ts +36 -0
- package/build/components/UI/CAD/common/reveal.d.ts +12 -0
- package/build/components/UI/CAD/hooks/index.d.ts +13 -0
- package/build/components/UI/CAD/hooks/useContextMenuInteraction.d.ts +7 -0
- package/build/components/UI/CAD/hooks/useContextMenuItems.d.ts +4 -0
- package/build/components/UI/CAD/hooks/useCurrentInstance.d.ts +2 -0
- package/build/components/UI/CAD/hooks/useCurrentProduct.d.ts +2 -0
- package/build/components/UI/CAD/hooks/useEditMode.d.ts +40 -0
- package/build/components/UI/CAD/hooks/useFeatureCount.d.ts +6 -0
- package/build/components/UI/CAD/hooks/useGlobalMateInfo.d.ts +6 -0
- package/build/components/UI/CAD/hooks/useHasPending.d.ts +27 -0
- package/build/components/UI/CAD/hooks/useIsDisabled.d.ts +2 -0
- package/build/components/UI/CAD/hooks/useIsLoading.d.ts +25 -0
- package/build/components/UI/CAD/hooks/useIsSketchActive.d.ts +26 -0
- package/build/components/UI/CAD/hooks/useObjectDetails.d.ts +12 -0
- package/build/components/UI/CAD/hooks/useOperationSequence.d.ts +29 -0
- package/build/components/UI/CAD/hooks/useRollbackBar.d.ts +8 -0
- package/build/components/UI/CAD/hooks/useRoot.d.ts +2 -0
- package/build/components/UI/CAD/index.d.ts +27 -0
- package/build/components/UI/CAD/plugins/ProductManagement/ProdTable.d.ts +10 -0
- package/build/components/UI/CAD/plugins/ProductManagement/Root.d.ts +11 -0
- package/build/components/UI/CAD/plugins/ProductManagement/View.d.ts +11 -0
- package/build/components/UI/CAD/plugins/ProductManagement/index.d.ts +34 -0
- package/build/components/UI/CAD/plugins/ProductManagement/types.d.ts +4 -0
- package/build/components/UI/CAD/plugins/ProductManagement/useContextMenuItems.d.ts +4 -0
- package/build/components/UI/CAD/plugins/SessionManagement/Root.d.ts +11 -0
- package/build/components/UI/CAD/plugins/SessionManagement/index.d.ts +36 -0
- package/build/components/UI/CAD/plugins/SessionManagement/types.d.ts +3 -0
- package/build/components/UI/CAD/store/CADActions.d.ts +29 -0
- package/build/components/UI/CAD/store/CADStore.d.ts +68 -0
- package/build/components/UI/CAD/store/instances.d.ts +7 -0
- package/build/components/UI/Readfile.d.ts +39 -0
- package/build/components/UI/ThemeVars.d.ts +6 -0
- package/build/components/UI/editors/BooleanEditor/BooleanEditor.d.ts +8 -0
- package/build/components/UI/editors/BooleanEditor/index.d.ts +2 -0
- package/build/components/UI/editors/BooleanEditor/useBoolParam.d.ts +3 -0
- package/build/components/UI/editors/CSysEditor/CSysEditor.d.ts +11 -0
- package/build/components/UI/editors/CSysEditor/index.d.ts +2 -0
- package/build/components/UI/editors/CSysEditor/useCSysParam.d.ts +9 -0
- package/build/components/UI/editors/ColorEditor/ColorEditor.d.ts +12 -0
- package/build/components/UI/editors/ColorEditor/index.d.ts +2 -0
- package/build/components/UI/editors/ColorEditor/useColorParam.d.ts +9 -0
- package/build/components/UI/editors/ExpressionEditor/ExpressionEditor.d.ts +20 -0
- package/build/components/UI/editors/ExpressionEditor/index.d.ts +2 -0
- package/build/components/UI/editors/ExpressionEditor/useExpressionsParam.d.ts +5 -0
- package/build/components/UI/editors/NumberEditor/Inputs.d.ts +18 -0
- package/build/components/UI/editors/NumberEditor/Mentions.d.ts +10 -0
- package/build/components/UI/editors/NumberEditor/NumOrExpr.d.ts +12 -0
- package/build/components/UI/editors/NumberEditor/NumberEditor.d.ts +12 -0
- package/build/components/UI/editors/NumberEditor/index.d.ts +2 -0
- package/build/components/UI/editors/NumberEditor/useNumParam.d.ts +5 -0
- package/build/components/UI/editors/PointEditor/PointEditor.d.ts +10 -0
- package/build/components/UI/editors/PointEditor/index.d.ts +2 -0
- package/build/components/UI/editors/PointEditor/usePointParam.d.ts +5 -0
- package/build/components/UI/editors/RefsEditors/ChainFinder.d.ts +12 -0
- package/build/components/UI/editors/RefsEditors/MateEditor.d.ts +13 -0
- package/build/components/UI/editors/RefsEditors/MateOrientationEditor.d.ts +9 -0
- package/build/components/UI/editors/RefsEditors/RefEditor.d.ts +24 -0
- package/build/components/UI/editors/RefsEditors/RefsEditor.d.ts +16 -0
- package/build/components/UI/editors/RefsEditors/index.d.ts +8 -0
- package/build/components/UI/editors/RefsEditors/pickers.d.ts +4 -0
- package/build/components/UI/editors/RefsEditors/useIdParam.d.ts +3 -0
- package/build/components/UI/editors/RefsEditors/useMateParam.d.ts +19 -0
- package/build/components/UI/editors/RefsEditors/useModes.d.ts +11 -0
- package/build/components/UI/editors/RefsEditors/useRefsParam.d.ts +3 -0
- package/build/components/UI/editors/RefsEditors/useSelectedItems.d.ts +18 -0
- package/build/components/UI/editors/ToleranceEditor/ToleranceEditor.d.ts +7 -0
- package/build/components/UI/editors/ToleranceEditor/index.d.ts +2 -0
- package/build/components/UI/editors/ToleranceEditor/useToleranceParam.d.ts +3 -0
- package/build/components/UI/editors/TypeEditor/TypeEditor.d.ts +10 -0
- package/build/components/UI/editors/TypeEditor/index.d.ts +2 -0
- package/build/components/UI/editors/TypeEditor/useTypeParam.d.ts +3 -0
- package/build/components/UI/editors/TypeWrapper.d.ts +6 -0
- package/build/components/UI/editors/Wrapper.d.ts +16 -0
- package/build/components/UI/editors/useParam.d.ts +20 -0
- package/build/components/UI/editors/useValidation.d.ts +4 -0
- package/build/components/graphics/Badge.d.ts +70 -0
- package/build/components/graphics/CSysDisplay.d.ts +108 -0
- package/build/components/graphics/CompositeCurveObj.d.ts +33 -0
- package/build/components/graphics/GeometryOverrides/GeometryOverridesManager.d.ts +41 -0
- package/build/components/graphics/GeometryOverrides/GeometryOverridesStore.d.ts +28 -0
- package/build/components/graphics/GeometryOverrides/index.d.ts +2 -0
- package/build/components/graphics/GeometryOverrides/useOverrideGeometryColor.d.ts +36 -0
- package/build/components/graphics/HUD.d.ts +44 -0
- package/build/components/graphics/HoveredConstraintDisplay.d.ts +24 -0
- package/build/components/graphics/InfinityPlane.d.ts +4 -0
- package/build/components/graphics/Outlines/AAPass.d.ts +8 -0
- package/build/components/graphics/Outlines/IDPass.d.ts +12 -0
- package/build/components/graphics/Outlines/Outline.d.ts +62 -0
- package/build/components/graphics/Outlines/OutlineEffect.d.ts +48 -0
- package/build/components/graphics/Outlines/OutlineMaterial.d.ts +9 -0
- package/build/components/graphics/Outlines/WidenPass.d.ts +17 -0
- package/build/components/graphics/PluginGeometryBounds.d.ts +40 -0
- package/build/components/graphics/SelectableMate.d.ts +3 -0
- package/build/components/graphics/SelectedMateObj.d.ts +54 -0
- package/build/components/graphics/StageLook.d.ts +51 -0
- package/build/components/graphics/WorkAxisObj.d.ts +33 -0
- package/build/components/graphics/WorkCSysObj.d.ts +33 -0
- package/build/components/graphics/WorkCoordSystemObj.d.ts +32 -0
- package/build/components/graphics/WorkPlaneObj.d.ts +33 -0
- package/build/components/graphics/WorkPointObj.d.ts +57 -0
- package/build/components/graphics/graphics.d.ts +61 -0
- package/build/components/graphics/utils/MatePathTransform.d.ts +10 -0
- package/build/components/graphics/utils/useCsysMatrix.d.ts +4 -0
- package/build/components/utils/CompValidation/ErrorBoundary.d.ts +28 -0
- package/build/components/utils/CompValidation/validators/CSysDisplayValidator.d.ts +12 -0
- package/build/components/utils/CompValidation/validators/DrawingValidator.d.ts +12 -0
- package/build/components/utils/CompValidation/validators/ExpressionsValidator.d.ts +12 -0
- package/build/components/utils/CompValidation/validators/FPluginValidator.d.ts +16 -0
- package/build/components/utils/CompValidation/validators/FeatureListValidator.d.ts +12 -0
- package/build/components/utils/CompValidation/validators/ProductManagementValidator.d.ts +14 -0
- package/build/components/utils/CompValidation/verifiers.d.ts +32 -0
- package/build/components/utils/FtVisibilityController.d.ts +26 -0
- package/build/elements/index.d.ts +162 -0
- package/build/icons/axes.d.ts +73 -0
- package/build/icons/draw.d.ts +75 -0
- package/build/icons/features.d.ts +71 -0
- package/build/icons/glyphs.d.ts +10 -0
- package/build/icons/index.d.ts +152 -0
- package/build/icons/legacy.d.ts +159 -0
- package/build/icons/mates.d.ts +26 -0
- package/build/icons/params.d.ts +77 -0
- package/build/icons/refs.d.ts +61 -0
- package/build/icons/sheets.d.ts +302 -0
- package/build/icons/sketch.d.ts +102 -0
- package/build/icons/types.d.ts +74 -0
- package/build/icons/ui.d.ts +114 -0
- package/build/icons.cjs.js +1751 -0
- package/build/icons.js +1742 -0
- package/build/index.cjs.js +44948 -0
- package/build/index.d.ts +115 -0
- package/build/index.js +44800 -0
- package/build/plugins/AppearanceEditor/Root.d.ts +12 -0
- package/build/plugins/AppearanceEditor/index.d.ts +42 -0
- package/build/plugins/Boolean/Root.d.ts +11 -0
- package/build/plugins/Boolean/index.d.ts +39 -0
- package/build/plugins/BoundingBoxInfo/Root.d.ts +12 -0
- package/build/plugins/BoundingBoxInfo/View.d.ts +11 -0
- package/build/plugins/BoundingBoxInfo/index.d.ts +35 -0
- package/build/plugins/Box/Root.d.ts +11 -0
- package/build/plugins/Box/index.d.ts +34 -0
- package/build/plugins/Chamfer/Root.d.ts +11 -0
- package/build/plugins/Chamfer/index.d.ts +35 -0
- package/build/plugins/CircularPattern/Root.d.ts +11 -0
- package/build/plugins/CircularPattern/index.d.ts +35 -0
- package/build/plugins/CompositeCurve/Root.d.ts +11 -0
- package/build/plugins/CompositeCurve/View.d.ts +11 -0
- package/build/plugins/CompositeCurve/index.d.ts +36 -0
- package/build/plugins/Cone/Root.d.ts +11 -0
- package/build/plugins/Cone/index.d.ts +36 -0
- package/build/plugins/Cylinder/Root.d.ts +11 -0
- package/build/plugins/Cylinder/index.d.ts +35 -0
- package/build/plugins/Dimensions/DimContext.d.ts +10 -0
- package/build/plugins/Dimensions/Root.d.ts +11 -0
- package/build/plugins/Dimensions/View.d.ts +11 -0
- package/build/plugins/Dimensions/graphics/DimGraphics.d.ts +7 -0
- package/build/plugins/Dimensions/graphics/DimensionSet.d.ts +8 -0
- package/build/plugins/Dimensions/graphics/primitives.d.ts +34 -0
- package/build/plugins/Dimensions/index.d.ts +34 -0
- package/build/plugins/Dimensions/utils.d.ts +5 -0
- package/build/plugins/EntityDeletion/Root.d.ts +11 -0
- package/build/plugins/EntityDeletion/index.d.ts +34 -0
- package/build/plugins/Expressions/Root.d.ts +11 -0
- package/build/plugins/Expressions/index.d.ts +34 -0
- package/build/plugins/Expressions/useContextMenuItems.d.ts +4 -0
- package/build/plugins/Extrusion/Root.d.ts +11 -0
- package/build/plugins/Extrusion/View.d.ts +11 -0
- package/build/plugins/Extrusion/index.d.ts +50 -0
- package/build/plugins/Fillet/Root.d.ts +11 -0
- package/build/plugins/Fillet/index.d.ts +35 -0
- package/build/plugins/HLConstraints/CircularPattern/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/CircularPattern/View.d.ts +11 -0
- package/build/plugins/HLConstraints/CircularPattern/index.d.ts +38 -0
- package/build/plugins/HLConstraints/Cylindrical/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Cylindrical/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Cylindrical/index.d.ts +37 -0
- package/build/plugins/HLConstraints/Fastened/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Fastened/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Fastened/index.d.ts +37 -0
- package/build/plugins/HLConstraints/FastenedOrigin/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/FastenedOrigin/View.d.ts +11 -0
- package/build/plugins/HLConstraints/FastenedOrigin/index.d.ts +37 -0
- package/build/plugins/HLConstraints/Gear/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Gear/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Gear/index.d.ts +36 -0
- package/build/plugins/HLConstraints/Group/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Group/index.d.ts +34 -0
- package/build/plugins/HLConstraints/LinearPattern/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/LinearPattern/View.d.ts +11 -0
- package/build/plugins/HLConstraints/LinearPattern/index.d.ts +38 -0
- package/build/plugins/HLConstraints/Parallel/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Parallel/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Parallel/index.d.ts +37 -0
- package/build/plugins/HLConstraints/Planar/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Planar/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Planar/index.d.ts +37 -0
- package/build/plugins/HLConstraints/Revolute/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Revolute/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Revolute/index.d.ts +37 -0
- package/build/plugins/HLConstraints/Slider/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Slider/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Slider/index.d.ts +37 -0
- package/build/plugins/HLConstraints/Spherical/Root.d.ts +11 -0
- package/build/plugins/HLConstraints/Spherical/View.d.ts +11 -0
- package/build/plugins/HLConstraints/Spherical/index.d.ts +36 -0
- package/build/plugins/HLConstraints/components/CSysDisplayWrapper.d.ts +7 -0
- package/build/plugins/HLConstraints/components/HLConstrIcon.d.ts +7 -0
- package/build/plugins/HLConstraints/components/LimitedValue.d.ts +12 -0
- package/build/plugins/HLConstraints/components/Limits.d.ts +25 -0
- package/build/plugins/HLConstraints/components/LimitsCollapse.d.ts +12 -0
- package/build/plugins/HLConstraints/validators.d.ts +2 -0
- package/build/plugins/Import/Root.d.ts +11 -0
- package/build/plugins/Import/index.d.ts +35 -0
- package/build/plugins/LinearPattern/Root.d.ts +11 -0
- package/build/plugins/LinearPattern/index.d.ts +36 -0
- package/build/plugins/Measure/Digits.d.ts +7 -0
- package/build/plugins/Measure/Root.d.ts +11 -0
- package/build/plugins/Measure/View.d.ts +15 -0
- package/build/plugins/Measure/config.d.ts +1 -0
- package/build/plugins/Measure/graphics/MeasureGraphics.d.ts +24 -0
- package/build/plugins/Measure/index.d.ts +39 -0
- package/build/plugins/Measure/utils.d.ts +2 -0
- package/build/plugins/Mirror/Root.d.ts +11 -0
- package/build/plugins/Mirror/index.d.ts +34 -0
- package/build/plugins/Revolve/Root.d.ts +11 -0
- package/build/plugins/Revolve/index.d.ts +37 -0
- package/build/plugins/Rotate/Root.d.ts +11 -0
- package/build/plugins/Rotate/index.d.ts +35 -0
- package/build/plugins/Sketch/Root/Constraints/Constraints.d.ts +2 -0
- package/build/plugins/Sketch/Root/Constraints/constraintsHelpers.d.ts +22 -0
- package/build/plugins/Sketch/Root/Constraints/index.d.ts +2 -0
- package/build/plugins/Sketch/Root/Constraints/utils.d.ts +6 -0
- package/build/plugins/Sketch/Root/CopyPatterns.d.ts +2 -0
- package/build/plugins/Sketch/Root/Details.d.ts +2 -0
- package/build/plugins/Sketch/Root/Handlers.d.ts +2 -0
- package/build/plugins/Sketch/Root/PlaneSelection.d.ts +7 -0
- package/build/plugins/Sketch/Root/Position.d.ts +2 -0
- package/build/plugins/Sketch/Root/Regions.d.ts +2 -0
- package/build/plugins/Sketch/Root/Root.d.ts +11 -0
- package/build/plugins/Sketch/Root/RootContext.d.ts +7 -0
- package/build/plugins/Sketch/Root/SketchGroup.d.ts +15 -0
- package/build/plugins/Sketch/Root/index.d.ts +1 -0
- package/build/plugins/Sketch/Root/useContextMenuItems.d.ts +4 -0
- package/build/plugins/Sketch/Root/useLayoutSize.d.ts +11 -0
- package/build/plugins/Sketch/View/View.d.ts +11 -0
- package/build/plugins/Sketch/View/ViewContext.d.ts +8 -0
- package/build/plugins/Sketch/View/graphics/Constraints.d.ts +5 -0
- package/build/plugins/Sketch/View/graphics/IconGroups.d.ts +7 -0
- package/build/plugins/Sketch/View/graphics/Merged/Arc.d.ts +20 -0
- package/build/plugins/Sketch/View/graphics/Merged/ArcGeometry.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/Merged/ArcMaterial.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/Merged/Bezier.d.ts +19 -0
- package/build/plugins/Sketch/View/graphics/Merged/BezierGeometry.d.ts +12 -0
- package/build/plugins/Sketch/View/graphics/Merged/BezierMaterial.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/Merged/Circle.d.ts +9 -0
- package/build/plugins/Sketch/View/graphics/Merged/Line.d.ts +15 -0
- package/build/plugins/Sketch/View/graphics/Merged/LineGeometry.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/Merged/LineMaterial.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/Merged/MergedWrapper.d.ts +16 -0
- package/build/plugins/Sketch/View/graphics/Merged/Point.d.ts +8 -0
- package/build/plugins/Sketch/View/graphics/Merged/Spline.d.ts +17 -0
- package/build/plugins/Sketch/View/graphics/Merged/SplineGeometry.d.ts +11 -0
- package/build/plugins/Sketch/View/graphics/Merged/SplineMaterial.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/MousePosition.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/Regions.d.ts +5 -0
- package/build/plugins/Sketch/View/graphics/TmpAngularDimension.d.ts +8 -0
- package/build/plugins/Sketch/View/graphics/graphics.d.ts +5 -0
- package/build/plugins/Sketch/View/graphics/hooks.d.ts +49 -0
- package/build/plugins/Sketch/View/graphics/primitives.d.ts +34 -0
- package/build/plugins/Sketch/View/graphics/scale.d.ts +6 -0
- package/build/plugins/Sketch/View/graphics/tmpGraphics.d.ts +3 -0
- package/build/plugins/Sketch/View/graphics/transform.d.ts +4 -0
- package/build/plugins/Sketch/View/handlers/CreateAngle.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/CreateConstraint.d.ts +10 -0
- package/build/plugins/Sketch/View/handlers/Drag.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/DrawArc.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/DrawCircle.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/DrawLine.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/DrawNurbs.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/DrawPoint.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/DrawRectangle.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/Fillet.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/HandlersConstructors.d.ts +33 -0
- package/build/plugins/Sketch/View/handlers/Hover.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/SSelect.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/Split.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/Trim.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/Use.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/constraintCreation.d.ts +10 -0
- package/build/plugins/Sketch/View/handlers/filletHelpers.d.ts +24 -0
- package/build/plugins/Sketch/View/handlers/hoverHelpers.d.ts +3 -0
- package/build/plugins/Sketch/View/handlers/snapper.d.ts +11 -0
- package/build/plugins/Sketch/View/handlers/splitHelpers.d.ts +20 -0
- package/build/plugins/Sketch/View/index.d.ts +1 -0
- package/build/plugins/Sketch/constants.d.ts +5 -0
- package/build/plugins/Sketch/description.d.ts +7 -0
- package/build/plugins/Sketch/index.d.ts +35 -0
- package/build/plugins/Sketch/resources.d.ts +5 -0
- package/build/plugins/Sketch/types.d.ts +148 -0
- package/build/plugins/Sketch/utils/Interaction.d.ts +7 -0
- package/build/plugins/Sketch/utils/OverdefinedStateManager.d.ts +6 -0
- package/build/plugins/Sketch/utils/getSketchState.d.ts +3 -0
- package/build/plugins/Sketch/utils/useSketchRegions.d.ts +2 -0
- package/build/plugins/Sketch/utils/useSketchState.d.ts +3 -0
- package/build/plugins/Slice/Root.d.ts +11 -0
- package/build/plugins/Slice/index.d.ts +34 -0
- package/build/plugins/SliceBySheet/Root.d.ts +11 -0
- package/build/plugins/SliceBySheet/index.d.ts +35 -0
- package/build/plugins/Sphere/Root.d.ts +11 -0
- package/build/plugins/Sphere/index.d.ts +35 -0
- package/build/plugins/TransformByCsys/Root.d.ts +11 -0
- package/build/plugins/TransformByCsys/index.d.ts +35 -0
- package/build/plugins/Translate/Root.d.ts +11 -0
- package/build/plugins/Translate/index.d.ts +35 -0
- package/build/plugins/Twist/Root.d.ts +11 -0
- package/build/plugins/Twist/View.d.ts +11 -0
- package/build/plugins/Twist/index.d.ts +48 -0
- package/build/plugins/WorkAxis/Root.d.ts +11 -0
- package/build/plugins/WorkAxis/View.d.ts +11 -0
- package/build/plugins/WorkAxis/index.d.ts +37 -0
- package/build/plugins/WorkCSys/Root.d.ts +11 -0
- package/build/plugins/WorkCSys/View.d.ts +11 -0
- package/build/plugins/WorkCSys/index.d.ts +53 -0
- package/build/plugins/WorkCoordSystem/Root.d.ts +11 -0
- package/build/plugins/WorkCoordSystem/View.d.ts +11 -0
- package/build/plugins/WorkCoordSystem/index.d.ts +55 -0
- package/build/plugins/WorkPlane/Root.d.ts +11 -0
- package/build/plugins/WorkPlane/View.d.ts +11 -0
- package/build/plugins/WorkPlane/index.d.ts +38 -0
- package/build/plugins/WorkPlane/validators.d.ts +1 -0
- package/build/plugins/WorkPoint/Root.d.ts +11 -0
- package/build/plugins/WorkPoint/View.d.ts +11 -0
- package/build/plugins/WorkPoint/index.d.ts +38 -0
- package/build/plugins/components/PluginForm.d.ts +24 -0
- package/build/plugins/utils/useRefsReset.d.ts +2 -0
- package/build/session/identity.d.ts +46 -0
- package/build/session/sessionClient.d.ts +140 -0
- package/build/session/types.d.ts +52 -0
- package/build/session/viewpoints.d.ts +90 -0
- package/build/theme/AppStyle.d.ts +33 -0
- package/build/theme/fonts/mono.d.ts +29 -0
- package/build/theme/stage.d.ts +148 -0
- package/build/theme/styles/antdChoices.d.ts +1 -0
- package/build/theme/styles/antdControls.d.ts +1 -0
- package/build/theme/styles/antdSurfaces.d.ts +1 -0
- package/build/theme/styles/editors.d.ts +1 -0
- package/build/theme/styles/fields.d.ts +1 -0
- package/build/theme/styles/frame.d.ts +1 -0
- package/build/theme/styles/panes.d.ts +1 -0
- package/build/theme/styles/parts.d.ts +2 -0
- package/build/theme/styles/rest.d.ts +1 -0
- package/build/theme/styles/sketch.d.ts +1 -0
- package/build/theme/styles/toolbar.d.ts +1 -0
- package/build/theme/styles/tools.d.ts +1 -0
- package/build/theme/styles/windows.d.ts +1 -0
- package/build/theme/themeStore.d.ts +305 -0
- package/build/types/jsx-compat.d.ts +8 -0
- package/build/types.d.ts +16 -0
- package/build/utils/FileUtils.d.ts +20 -0
- package/build/utils/bezierMatrices.d.ts +3 -0
- package/build/utils/conversionUtils.d.ts +78 -0
- package/build/utils/cubicSplineInterpolation.d.ts +5 -0
- package/build/utils/defaultValues.d.ts +3 -0
- package/build/utils/drawing/index.d.ts +3 -0
- package/build/utils/drawing/useDrawingArr.d.ts +10 -0
- package/build/utils/drawing/useDrawingCCId.d.ts +10 -0
- package/build/utils/drawing/useDrawingStr.d.ts +10 -0
- package/build/utils/getHighlightedColor.d.ts +6 -0
- package/build/utils/getMatePath.d.ts +2 -0
- package/build/utils/getMateRefIds.d.ts +30 -0
- package/build/utils/helpers.d.ts +19 -0
- package/build/utils/mateUtils.d.ts +35 -0
- package/build/utils/nurbsUtils.d.ts +35 -0
- package/build/utils/selection/filters.d.ts +12 -0
- package/build/utils/selection/scopes/mateSelection.d.ts +49 -0
- package/build/utils/selection/scopes/treeObjInteraction.d.ts +74 -0
- package/build/utils/selection/useSelectorsOrder.d.ts +12 -0
- package/build/utils/sketchIntersectionUtils.d.ts +139 -0
- package/build/utils/sketchUtils.d.ts +235 -0
- package/build/utils/useAllObjects.d.ts +31 -0
- package/build/utils/useIsUncommited.d.ts +2 -0
- package/build/utils/useRetainVisibility.d.ts +2 -0
- package/build/utils/useScale.d.ts +5 -0
- package/build/utils/validation.d.ts +11 -0
- package/doc/api/advanced/session.md +646 -0
- package/doc/api/advanced/utilities.md +1306 -0
- package/doc/api/assembly-constraints.md +340 -0
- package/doc/api/feature-plugins.md +613 -0
- package/doc/api/graphics.md +848 -0
- package/doc/api/hooks.md +300 -0
- package/doc/api/icons.md +812 -0
- package/doc/api/index.md +87 -0
- package/doc/api/other.md +369 -0
- package/doc/api/panels.md +754 -0
- package/doc/api/theme.md +551 -0
- package/doc/api/tool-plugins.md +191 -0
- package/doc/api/ui-elements.md +310 -0
- package/doc/api/work-geometry.md +154 -0
- package/icons/package.json +8 -0
- package/package.json +109 -4
- package/tools/fonts/brotli.py +29 -0
- package/tools/fonts/build.py +76 -0
- package/tools/icons/preview.mjs +74 -0
- package/tsconfig.build.json +16 -0
- package/typedoc.json +18 -0
- package/vitest.config.mts +25 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Props of {@link SideBar}.
|
|
5
|
+
*
|
|
6
|
+
* @category Panels
|
|
7
|
+
*/
|
|
8
|
+
export type SideBarProps = {
|
|
9
|
+
/** The drawing whose model is shown. */
|
|
10
|
+
drawingId: DrawingID;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The sidebar's two panes: the model's tree above, and what the model is made of below it.
|
|
14
|
+
*
|
|
15
|
+
* The upper pane is the {@link ModelTree} (a part's features, an assembly's nodes); the lower one is the
|
|
16
|
+
* part's bodies ({@link Solids}) or the assembly's constraints ({@link Constraints}), as the current product is a
|
|
17
|
+
* part or an assembly. While the drawing has pending commands, the panes take no clicks. {@link Drawing} renders it
|
|
18
|
+
* in its sidebar; an app that composes the pieces itself gives it a container of the height it is to fill.
|
|
19
|
+
*
|
|
20
|
+
* Its props: {@link SideBarProps}.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* import type { DrawingID } from '@classcad/sdkjs'
|
|
25
|
+
* import { AppStyle, SideBar } from '@classcad/react-cad'
|
|
26
|
+
*
|
|
27
|
+
* // the tree and the bodies (or constraints) of a drawing, in a column of the app's own
|
|
28
|
+
* function ModelColumn({ drawingId }: { drawingId: DrawingID }) {
|
|
29
|
+
* return (
|
|
30
|
+
* <aside className="rcad" style={{ width: 300, height: '100%', display: 'flex', flexDirection: 'column' }}>
|
|
31
|
+
* <AppStyle />
|
|
32
|
+
* <SideBar drawingId={drawingId} />
|
|
33
|
+
* </aside>
|
|
34
|
+
* )
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @category Panels
|
|
39
|
+
*/
|
|
40
|
+
export declare const SideBar: React.FC<SideBarProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Props of {@link Solids}.
|
|
5
|
+
*
|
|
6
|
+
* @category Panels
|
|
7
|
+
*/
|
|
8
|
+
export type SolidsProps = {
|
|
9
|
+
/** The drawing whose bodies are listed. */
|
|
10
|
+
drawingId: DrawingID;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Lists the bodies of the current product: its solids and sheets ({@link useVisibleSolids}).
|
|
14
|
+
*
|
|
15
|
+
* A row is hovered and selected with the body on the stage, renamed, shown or hidden with its eye, and has a context
|
|
16
|
+
* menu. Several rows are selected with Shift and Ctrl.
|
|
17
|
+
*
|
|
18
|
+
* Its props: {@link SolidsProps}. The example of {@link useEditMode} shows it for a part, and {@link Constraints} for
|
|
19
|
+
* an assembly.
|
|
20
|
+
*
|
|
21
|
+
* @category Panels
|
|
22
|
+
*/
|
|
23
|
+
export declare const Solids: React.FC<SolidsProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Solids } from './Solids';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the bodies (solids and sheets) of the current product, and renders again when they change.
|
|
4
|
+
*
|
|
5
|
+
* For an assembly they are the bodies of the parts in the current instance, each once; for a part, the part's own.
|
|
6
|
+
* The curves of a composite curve are left out. The ids are the bodies' graphic containers, as
|
|
7
|
+
* `drawing.geometry.cache` and the scene's meshes (`userData.containerId`) have them. The {@link Solids} list
|
|
8
|
+
* shows them.
|
|
9
|
+
*
|
|
10
|
+
* @param drawingId - The drawing.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* import { useDrawing } from '@classcad/react'
|
|
15
|
+
* import type { DrawingID } from '@classcad/sdkjs'
|
|
16
|
+
* import { useVisibleSolids } from '@classcad/react-cad'
|
|
17
|
+
*
|
|
18
|
+
* // a list of the bodies of the current product, by their names
|
|
19
|
+
* function Bodies({ drawingId }: { drawingId: DrawingID }) {
|
|
20
|
+
* const solids = useVisibleSolids(drawingId)
|
|
21
|
+
* const names = useDrawing(drawingId, (d) =>
|
|
22
|
+
* solids.map((id) => d.structure.tree[d.graphic.containers[id]?.owner]?.name).join(', '),
|
|
23
|
+
* )
|
|
24
|
+
* return <p>{solids.length} bodies: {names}</p>
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @category Hooks
|
|
29
|
+
*/
|
|
30
|
+
export declare const useVisibleSolids: (drawingId: DrawingID) => number[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* The line across the top of the stage: what is open, and what is being worked on.
|
|
5
|
+
* As the family's stages carry theirs: mono capitals, at a quiet opacity.
|
|
6
|
+
*/
|
|
7
|
+
export declare const StageHud: React.FC<{
|
|
8
|
+
drawingId: DrawingID;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* The app's footer, ruled into cells as a drawing's title block is: where the engine stands, what
|
|
5
|
+
* is being picked, and how far the model is built.
|
|
6
|
+
* @param lead - what its first cell says instead of "ClassCAD"; the app says here where its engine runs.
|
|
7
|
+
*/
|
|
8
|
+
export declare const StatusBar: React.FC<{
|
|
9
|
+
drawingId: DrawingID;
|
|
10
|
+
lead?: React.ReactNode;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The theme switch: a button with a disc, half inked, that switches between the light and the dark theme.
|
|
4
|
+
*
|
|
5
|
+
* It sets the mode with {@link setRCadThemeMode}, which remembers the reader's pick for the next visit. The disc turns
|
|
6
|
+
* to the other side in the dark. {@link Drawing} shows it at the end of its bar (unless `themeSwitch` is `false`).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import type { DrawingID } from '@classcad/sdkjs'
|
|
11
|
+
* import { AppStyle, ThemeToggle, ToolBar } from '@classcad/react-cad'
|
|
12
|
+
*
|
|
13
|
+
* // a bar of the app's own: its tools, and the theme switch at its end
|
|
14
|
+
* const Bar = ({ drawingId }: { drawingId: DrawingID }) => (
|
|
15
|
+
* <header className="rcad" style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
16
|
+
* <AppStyle />
|
|
17
|
+
* <ToolBar drawingId={drawingId} />
|
|
18
|
+
* <ThemeToggle />
|
|
19
|
+
* </header>
|
|
20
|
+
* )
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @category Theme
|
|
24
|
+
*/
|
|
25
|
+
export declare const ThemeToggle: React.FC;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Props of {@link ToolBar}.
|
|
5
|
+
*
|
|
6
|
+
* @category Panels
|
|
7
|
+
*/
|
|
8
|
+
export type ToolBarProps = {
|
|
9
|
+
/** The drawing whose current product the tools build. */
|
|
10
|
+
drawingId: DrawingID;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The tools a part or an assembly is built with: one button a tool, its drawing on it.
|
|
14
|
+
*
|
|
15
|
+
* Tools that are kin share a button; its caret opens the set. In a part the tools are the features (a sketch, work
|
|
16
|
+
* geometry, extrusion, boolean, fillet, patterns, primitives …), in an assembly the constraints. A tool makes the new
|
|
17
|
+
* feature (uncommitted, in the current product) and opens its dialog; while a feature's dialog is open, it makes
|
|
18
|
+
* none. Until the drawing has a current product, the buttons are placeholders.
|
|
19
|
+
*
|
|
20
|
+
* Its props: {@link ToolBarProps}. The example of {@link ModelTree} lays it out with the other panels.
|
|
21
|
+
*
|
|
22
|
+
* @category Panels
|
|
23
|
+
*/
|
|
24
|
+
export declare const ToolBar: React.FC<ToolBarProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ToolBar } from './ToolBar';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
2
|
+
export type ToolBarCommand = {
|
|
3
|
+
label: string;
|
|
4
|
+
icon: any;
|
|
5
|
+
callback: () => Promise<any>;
|
|
6
|
+
/** The call the tool makes, as the API writes it (`part.extrusion`): shown with its name. */
|
|
7
|
+
call?: string;
|
|
8
|
+
};
|
|
9
|
+
export type ToolBarDivider = {
|
|
10
|
+
type: 'divider';
|
|
11
|
+
};
|
|
12
|
+
export declare function useCommands(drawingId: DrawingID, curProductClass: string | undefined): (ToolBarCommand | ToolBarDivider | ToolBarCommand[])[];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Switches for what of the model is shown: its faces, its wires, its edges, its points.
|
|
4
|
+
*
|
|
5
|
+
* Each is a switch over the SDK's geometry config, the one {@link setViewOptions} sets; the wireframe is only there
|
|
6
|
+
* while the faces are shown. They take no props: they are the same for every drawing. {@link Drawing} docks them on
|
|
7
|
+
* the stage's right-hand side.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { ThemeToggle, ViewOptionButtons, ViewPlugButtons } from '@classcad/react-cad'
|
|
12
|
+
* import type { DrawingID } from '@classcad/sdkjs'
|
|
13
|
+
*
|
|
14
|
+
* // the stage's docks of an app that lays the pieces out itself
|
|
15
|
+
* const StageDocks = ({ drawingId }: { drawingId: DrawingID }) => (
|
|
16
|
+
* <>
|
|
17
|
+
* <div className="rcad-dock rcad-dock-col" style={{ position: 'absolute', top: 12, right: 12 }}>
|
|
18
|
+
* <ViewOptionButtons />
|
|
19
|
+
* <ThemeToggle />
|
|
20
|
+
* </div>
|
|
21
|
+
* <div className="rcad-dock" style={{ position: 'absolute', bottom: 12, left: 12 }}>
|
|
22
|
+
* <ViewPlugButtons drawingId={drawingId} />
|
|
23
|
+
* </div>
|
|
24
|
+
* </>
|
|
25
|
+
* )
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @category Panels
|
|
29
|
+
*/
|
|
30
|
+
export declare const ViewOptionButtons: React.FC;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* What of the model is drawn: its faces (or their wires), its edges, its points.
|
|
4
|
+
*
|
|
5
|
+
* @category Panels
|
|
6
|
+
*/
|
|
7
|
+
export type ViewOptions = {
|
|
8
|
+
/** The faces are drawn. */
|
|
9
|
+
faces: boolean;
|
|
10
|
+
/** The faces are drawn as their wires (only while they are drawn). */
|
|
11
|
+
wireframe: boolean;
|
|
12
|
+
/** The edges are drawn. */
|
|
13
|
+
edges: boolean;
|
|
14
|
+
/** The points are drawn. */
|
|
15
|
+
vertices: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* What of the model is drawn now, as the SDK's geometry config says (which the stage draws from).
|
|
19
|
+
*
|
|
20
|
+
* The example of {@link setViewOptions} switches one of them with it.
|
|
21
|
+
*
|
|
22
|
+
* @returns The {@link ViewOptions} in force, for every drawing.
|
|
23
|
+
* @category Panels
|
|
24
|
+
*/
|
|
25
|
+
export declare const getViewOptions: () => ViewOptions;
|
|
26
|
+
/**
|
|
27
|
+
* Shows or hides what of the model is drawn, for every drawing.
|
|
28
|
+
*
|
|
29
|
+
* It merges the options into the SDK's geometry config (`init`'s `config.geometry`); what it leaves out stays as it
|
|
30
|
+
* is. The {@link ViewOptionButtons} show what is set here, whoever sets it: the user, or the app (Buerligons switches
|
|
31
|
+
* the edges off in its realistic look).
|
|
32
|
+
*
|
|
33
|
+
* @param options - What to change, such as `{ edges: false }`.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* import { getViewOptions, setViewOptions } from '@classcad/react-cad'
|
|
38
|
+
*
|
|
39
|
+
* // a key that switches the edges on and off, as the edges' button on the stage does
|
|
40
|
+
* window.addEventListener('keydown', (e) => {
|
|
41
|
+
* if (e.key !== 'e') return
|
|
42
|
+
* const { edges } = getViewOptions()
|
|
43
|
+
* setViewOptions({ edges: !edges })
|
|
44
|
+
* })
|
|
45
|
+
*
|
|
46
|
+
* // a look of the app's own: the faces alone, without edges or points
|
|
47
|
+
* setViewOptions({ faces: true, wireframe: false, edges: false, vertices: false })
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @category Panels
|
|
51
|
+
*/
|
|
52
|
+
export declare const setViewOptions: (options: Partial<ViewOptions>) => void;
|
|
53
|
+
export declare const useOptionCommands: () => ({
|
|
54
|
+
label: string;
|
|
55
|
+
icon: React.JSX.Element;
|
|
56
|
+
isChecked: boolean;
|
|
57
|
+
command: () => void;
|
|
58
|
+
isDisabled?: undefined;
|
|
59
|
+
} | {
|
|
60
|
+
label: string;
|
|
61
|
+
icon: React.JSX.Element;
|
|
62
|
+
isChecked: boolean;
|
|
63
|
+
isDisabled: boolean;
|
|
64
|
+
command: () => void;
|
|
65
|
+
})[];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Props of {@link ViewPlugButtons}.
|
|
5
|
+
*
|
|
6
|
+
* @category Panels
|
|
7
|
+
*/
|
|
8
|
+
export type ViewPlugButtonsProps = {
|
|
9
|
+
/** The drawing whose global plugins the buttons open. */
|
|
10
|
+
drawingId: DrawingID;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Buttons that open and close the global plugins laid over the stage: Dimensions, Measure, Bounding box, Session
|
|
14
|
+
* Management.
|
|
15
|
+
*
|
|
16
|
+
* A button is there only where the drawing has the plugin (`init`'s `globalPlugins`); it switches the plugin on and
|
|
17
|
+
* off, and its window is one of the {@link GlobalPlugins}. The Session Management button is not shown to a guest of a
|
|
18
|
+
* shared session. {@link Drawing} docks them in the stage's lower left corner.
|
|
19
|
+
*
|
|
20
|
+
* Its props: {@link ViewPlugButtonsProps}.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* import { init, WASMClient } from '@classcad/client'
|
|
25
|
+
* import type { DrawingID } from '@classcad/sdkjs'
|
|
26
|
+
* import { BoundingBoxInfo, Dimensions, elements, Measure, ViewPlugButtons } from '@classcad/react-cad'
|
|
27
|
+
*
|
|
28
|
+
* // a button for each of these global plugins that the drawings have
|
|
29
|
+
* init((drawingId) => new WASMClient(drawingId, { token: 'ccpk_…' }), {
|
|
30
|
+
* elements,
|
|
31
|
+
* globalPlugins: [Dimensions, Measure, BoundingBoxInfo],
|
|
32
|
+
* })
|
|
33
|
+
*
|
|
34
|
+
* const Tools = ({ drawingId }: { drawingId: DrawingID }) => (
|
|
35
|
+
* <div className="rcad-dock" style={{ position: 'absolute', left: 12, bottom: 12 }}>
|
|
36
|
+
* <ViewPlugButtons drawingId={drawingId} />
|
|
37
|
+
* </div>
|
|
38
|
+
* )
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @category Panels
|
|
42
|
+
*/
|
|
43
|
+
export declare const ViewPlugButtons: React.FC<ViewPlugButtonsProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import type { ModalProps } from 'antd';
|
|
3
|
+
export interface IDraggableModalProps extends ModalProps {
|
|
4
|
+
initialWidth?: number;
|
|
5
|
+
initialHeight?: number;
|
|
6
|
+
initialX?: number;
|
|
7
|
+
initialY?: number;
|
|
8
|
+
resizable?: boolean;
|
|
9
|
+
minPosition?: {
|
|
10
|
+
x?: number;
|
|
11
|
+
y?: number;
|
|
12
|
+
};
|
|
13
|
+
maxPosition?: {
|
|
14
|
+
x?: number;
|
|
15
|
+
y?: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare const DraggableModal: FunctionComponent<IDraggableModalProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Action, IModalsState } from './draggableModalReducer';
|
|
3
|
+
export interface IDraggableModalContextMethods {
|
|
4
|
+
dispatch: (action: Action) => void;
|
|
5
|
+
}
|
|
6
|
+
export interface IDraggableModalContextValue extends IDraggableModalContextMethods {
|
|
7
|
+
state: IModalsState;
|
|
8
|
+
}
|
|
9
|
+
export declare const DraggableModalContext: React.Context<IDraggableModalContextValue | null>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ModalProps } from 'antd';
|
|
3
|
+
import { IDraggableModalContextMethods } from './DraggableModalContext';
|
|
4
|
+
import { ModalID, IModalState } from './draggableModalReducer';
|
|
5
|
+
interface IContextProps extends IDraggableModalContextMethods {
|
|
6
|
+
id: ModalID;
|
|
7
|
+
modalState: IModalState;
|
|
8
|
+
initialWidth?: number;
|
|
9
|
+
initialHeight?: number;
|
|
10
|
+
initialX?: number;
|
|
11
|
+
initialY?: number;
|
|
12
|
+
resizable?: boolean;
|
|
13
|
+
minPosition?: {
|
|
14
|
+
x?: number;
|
|
15
|
+
y?: number;
|
|
16
|
+
};
|
|
17
|
+
maxPosition?: {
|
|
18
|
+
x?: number;
|
|
19
|
+
y?: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export type DraggableModalInnerProps = ModalProps & {
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
} & IContextProps;
|
|
25
|
+
declare function DraggableModalInnerNonMemo({ id, modalState, dispatch, visible, children, title, initialWidth, initialHeight, initialX, initialY, resizable, minPosition, maxPosition, bodyStyle, styles, ...otherProps }: DraggableModalInnerProps): React.JSX.Element;
|
|
26
|
+
export declare const DraggableModalInner: React.MemoExoticComponent<typeof DraggableModalInnerNonMemo>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A scrollbar drawn over a window's body instead of beside it, so that it takes no room: the body's
|
|
4
|
+
* own is hidden (see windows.ts). It hangs on the body's parent, which does not scroll.
|
|
5
|
+
*/
|
|
6
|
+
export declare const OverlayScrollbar: React.FC;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const clamp: (min: number, max: number, value: number) => number;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export type ModalID = string;
|
|
2
|
+
export interface IModalState {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number | undefined;
|
|
6
|
+
height: number | undefined;
|
|
7
|
+
zIndex: number;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
minPosition: {
|
|
10
|
+
x: number | null;
|
|
11
|
+
y: number | null;
|
|
12
|
+
};
|
|
13
|
+
maxPosition: {
|
|
14
|
+
x: number | null;
|
|
15
|
+
y: number | null;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface IModalsState {
|
|
19
|
+
maxZIndex: number;
|
|
20
|
+
windowSize: {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
24
|
+
modals: {
|
|
25
|
+
[key: string]: IModalState;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export declare const initialModalsState: IModalsState;
|
|
29
|
+
export type Action = {
|
|
30
|
+
type: 'show';
|
|
31
|
+
id: ModalID;
|
|
32
|
+
maxPosition?: {
|
|
33
|
+
x?: number;
|
|
34
|
+
y?: number;
|
|
35
|
+
};
|
|
36
|
+
minPosition?: {
|
|
37
|
+
x?: number;
|
|
38
|
+
y?: number;
|
|
39
|
+
};
|
|
40
|
+
} | {
|
|
41
|
+
type: 'hide';
|
|
42
|
+
id: ModalID;
|
|
43
|
+
} | {
|
|
44
|
+
type: 'focus';
|
|
45
|
+
id: ModalID;
|
|
46
|
+
} | {
|
|
47
|
+
type: 'unmount';
|
|
48
|
+
id: ModalID;
|
|
49
|
+
} | {
|
|
50
|
+
type: 'mount';
|
|
51
|
+
id: ModalID;
|
|
52
|
+
intialState: {
|
|
53
|
+
initialWidth?: number;
|
|
54
|
+
initialHeight?: number;
|
|
55
|
+
initialX?: number;
|
|
56
|
+
initialY?: number;
|
|
57
|
+
minPosition?: {
|
|
58
|
+
x?: number;
|
|
59
|
+
y?: number;
|
|
60
|
+
};
|
|
61
|
+
maxPosition?: {
|
|
62
|
+
x?: number;
|
|
63
|
+
y?: number;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
} | {
|
|
67
|
+
type: 'windowResize';
|
|
68
|
+
size: {
|
|
69
|
+
width: number;
|
|
70
|
+
height: number;
|
|
71
|
+
};
|
|
72
|
+
} | {
|
|
73
|
+
type: 'drag';
|
|
74
|
+
id: ModalID;
|
|
75
|
+
x: number;
|
|
76
|
+
y: number;
|
|
77
|
+
maxPosition?: {
|
|
78
|
+
x?: number;
|
|
79
|
+
y?: number;
|
|
80
|
+
};
|
|
81
|
+
minPosition?: {
|
|
82
|
+
x?: number;
|
|
83
|
+
y?: number;
|
|
84
|
+
};
|
|
85
|
+
} | {
|
|
86
|
+
type: 'resize';
|
|
87
|
+
id: ModalID;
|
|
88
|
+
x: number;
|
|
89
|
+
y: number;
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
} | {
|
|
93
|
+
type: 'updateMinPosition';
|
|
94
|
+
id: ModalID;
|
|
95
|
+
value: {
|
|
96
|
+
x: number | null;
|
|
97
|
+
y: number | null;
|
|
98
|
+
};
|
|
99
|
+
} | {
|
|
100
|
+
type: 'updateMaxPosition';
|
|
101
|
+
id: ModalID;
|
|
102
|
+
value: {
|
|
103
|
+
x: number | null;
|
|
104
|
+
y: number | null;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
export declare const getModalState: ({ state, id, initialWidth, initialHeight, initialX, initialY, minPosition, maxPosition, }: {
|
|
108
|
+
state: IModalsState;
|
|
109
|
+
id: ModalID;
|
|
110
|
+
initialWidth?: number;
|
|
111
|
+
initialHeight?: number;
|
|
112
|
+
initialX?: number;
|
|
113
|
+
initialY?: number;
|
|
114
|
+
maxPosition?: {
|
|
115
|
+
x?: number;
|
|
116
|
+
y?: number;
|
|
117
|
+
};
|
|
118
|
+
minPosition?: {
|
|
119
|
+
x?: number;
|
|
120
|
+
y?: number;
|
|
121
|
+
};
|
|
122
|
+
}) => IModalState;
|
|
123
|
+
export declare const draggableModalReducer: (state: IModalsState, action: Action) => IModalsState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const usePrevious: <T>(value: T) => T;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const useResize: (x: number, y: number, width: number | undefined, height: number | undefined, onResize: (args: {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number | undefined;
|
|
6
|
+
height: number | undefined;
|
|
7
|
+
}) => void) => ((e: React.MouseEvent) => void);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Fields that a check stands in for: a plain line with the check at its end, and under it the
|
|
4
|
+
* fields, while they are asked for. With `invertChecked` the check takes them away
|
|
5
|
+
* ("Use current transform": while it is on, the transform is not asked for).
|
|
6
|
+
*/
|
|
7
|
+
export declare const Collapse: React.FC<{
|
|
8
|
+
isCollapsed: boolean;
|
|
9
|
+
setIsCollapsed: any;
|
|
10
|
+
caption: string;
|
|
11
|
+
invertChecked?: boolean;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}>;
|