@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.
- package/CHANGELOG.md +55 -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 +108 -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,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Twist feature's dialog: extrudes a sketch region, sketch curves or a composite curve and twists it by an angle.
|
|
3
|
+
*
|
|
4
|
+
* It is the plugin of the feature class `CC_Twist`: an app maps the class to it in `init`'s `plugins`, and react-cad
|
|
5
|
+
* opens it when the toolbar makes a new twist and when one is double-clicked in the feature list. The dialog picks the
|
|
6
|
+
* profile and the type (up, down, symmetric or custom) and takes the height, or for custom the lower and upper limits,
|
|
7
|
+
* the rotation center and the direction, and the twist angle; it switches between solid and sheet. Apply updates the
|
|
8
|
+
* feature (`part.updateTwist`).
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { init, ScgClassType, WASMClient } from '@classcad/client'
|
|
13
|
+
* import { getDrawing } from '@classcad/sdkjs'
|
|
14
|
+
* import { elements, Twist } from '@classcad/react-cad'
|
|
15
|
+
*
|
|
16
|
+
* init(drawingId => new WASMClient(drawingId, { token: 'ccpk_…' }), {
|
|
17
|
+
* elements,
|
|
18
|
+
* plugins: { [ScgClassType.CCTwist]: Twist },
|
|
19
|
+
* })
|
|
20
|
+
*
|
|
21
|
+
* // Code opens one by making it the active feature, with the id that `api.v1.part.twist` returns:
|
|
22
|
+
* getDrawing(drawingId).api.plugin.setActiveFeature(twistId)
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @category Feature Plugins
|
|
26
|
+
* @module
|
|
27
|
+
*/
|
|
28
|
+
import type * as THREE from 'three';
|
|
29
|
+
import { PluginDescription } from '@classcad/sdkjs';
|
|
30
|
+
import { Root } from './Root';
|
|
31
|
+
import { View } from './View';
|
|
32
|
+
/**
|
|
33
|
+
* The plugin's state: the profile's coordinate system.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export type TwistPState = {
|
|
38
|
+
originPos: THREE.Vector3 | undefined;
|
|
39
|
+
xDir: THREE.Vector3 | undefined;
|
|
40
|
+
yDir: THREE.Vector3 | undefined;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* The plugin's description for buerli's plugin system. Its state holds the profile's coordinate system.
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
declare const description: PluginDescription;
|
|
48
|
+
export { Root, View, description };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID, PluginID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Draws the work axis in the scene while the feature is shown or its dialog is open.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const View: React.FC<{
|
|
9
|
+
drawingId: DrawingID;
|
|
10
|
+
pluginId: PluginID;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Work Axis feature's dialog: places a work axis by coordinates or on geometry: a curve, two points, two planes.
|
|
3
|
+
*
|
|
4
|
+
* It is the plugin of the feature class `CC_WorkAxis`: an app maps the class to it in `init`'s `plugins`, and react-cad
|
|
5
|
+
* opens it when the toolbar makes a new work axis and when one is double-clicked in the feature list. The dialog picks
|
|
6
|
+
* the type (a point and a direction as coordinates, a curve, two points, two planes, or a point and a direction picked
|
|
7
|
+
* in the model) and the geometry it is made from. Apply updates the feature (`part.updateWorkAxis`). Its view draws the
|
|
8
|
+
* axis while the feature is shown or its dialog is open.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { init, ScgClassType, WASMClient } from '@classcad/client'
|
|
13
|
+
* import { getDrawing } from '@classcad/sdkjs'
|
|
14
|
+
* import { elements, WorkAxis } from '@classcad/react-cad'
|
|
15
|
+
*
|
|
16
|
+
* init(drawingId => new WASMClient(drawingId, { token: 'ccpk_…' }), {
|
|
17
|
+
* elements,
|
|
18
|
+
* plugins: { [ScgClassType.CCWorkAxis]: WorkAxis },
|
|
19
|
+
* })
|
|
20
|
+
*
|
|
21
|
+
* // Code opens one by making it the active feature, with the id that `api.v1.part.workAxis` returns:
|
|
22
|
+
* getDrawing(drawingId).api.plugin.setActiveFeature(axisId)
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @category Work Geometry
|
|
26
|
+
* @module
|
|
27
|
+
*/
|
|
28
|
+
import { PluginDescription } from '@classcad/sdkjs';
|
|
29
|
+
import { Root } from './Root';
|
|
30
|
+
import { View } from './View';
|
|
31
|
+
/**
|
|
32
|
+
* The plugin's description for buerli's plugin system.
|
|
33
|
+
*
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
declare const description: PluginDescription;
|
|
37
|
+
export { Root, View, description };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID, PluginID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Draws the coordinate system in the scene, and its preview while the dialog is open.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const View: React.FC<{
|
|
9
|
+
drawingId: DrawingID;
|
|
10
|
+
pluginId: PluginID;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Work Coordinate System feature's dialog: places a coordinate system on an origin and two axes, offset and
|
|
3
|
+
* rotated.
|
|
4
|
+
*
|
|
5
|
+
* It is the plugin of the feature class `CC_WorkCSys`: an app maps the class to it in `init`'s `plugins`, and react-cad
|
|
6
|
+
* opens it when the toolbar makes a new coordinate system and when one is double-clicked in the feature list. The
|
|
7
|
+
* dialog picks the type: Set takes an origin (a point, a vertex, an arc or a circle) and a primary and a secondary
|
|
8
|
+
* axis, the primary one invertible; Set and Custom take an offset and a rotation as Euler angles; Fixed is read-only.
|
|
9
|
+
* Apply updates the feature (`part.updateWorkCSys`). Its view draws the coordinate system, and its preview while the
|
|
10
|
+
* dialog is open.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* import { init, ScgClassType, WASMClient } from '@classcad/client'
|
|
15
|
+
* import { getDrawing } from '@classcad/sdkjs'
|
|
16
|
+
* import { elements, WorkCSys } from '@classcad/react-cad'
|
|
17
|
+
*
|
|
18
|
+
* init(drawingId => new WASMClient(drawingId, { token: 'ccpk_…' }), {
|
|
19
|
+
* elements,
|
|
20
|
+
* plugins: { [ScgClassType.CCWorkCSys]: WorkCSys },
|
|
21
|
+
* })
|
|
22
|
+
*
|
|
23
|
+
* // Code opens one by making it the active feature, with the id that `api.v1.part.workCSys` returns:
|
|
24
|
+
* getDrawing(drawingId).api.plugin.setActiveFeature(csysId)
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @category Work Geometry
|
|
28
|
+
* @module
|
|
29
|
+
*/
|
|
30
|
+
import * as THREE from 'three';
|
|
31
|
+
import { PluginDescription } from '@classcad/sdkjs';
|
|
32
|
+
import { Root } from './Root';
|
|
33
|
+
import { View } from './View';
|
|
34
|
+
/**
|
|
35
|
+
* The plugin's state: the preview of the coordinate system.
|
|
36
|
+
*
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export type InternalState = {
|
|
40
|
+
originPos: THREE.Vector3 | undefined;
|
|
41
|
+
xDir: THREE.Vector3 | undefined;
|
|
42
|
+
yDir: THREE.Vector3 | undefined;
|
|
43
|
+
offset: THREE.Vector3;
|
|
44
|
+
rotation: THREE.Vector3;
|
|
45
|
+
inverted: 0 | 1;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* The plugin's description for buerli's plugin system. Its state holds the preview of the coordinate system.
|
|
49
|
+
*
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
declare const description: PluginDescription<InternalState>;
|
|
53
|
+
export { Root, View, description };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID, PluginID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Draws the coordinate system in the scene, and its preview while the dialog is open.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const View: React.FC<{
|
|
9
|
+
drawingId: DrawingID;
|
|
10
|
+
pluginId: PluginID;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The dialog of `CC_WorkCoordSystem` features: places a coordinate system at an origin and two axes, or at coordinates.
|
|
3
|
+
*
|
|
4
|
+
* It is the plugin of the feature class `CC_WorkCoordSystem`, which ClassCAD's v0 API updates
|
|
5
|
+
* (`feature.updateWorkCoordSystem`); the coordinate systems that react-cad's toolbar makes are of the class
|
|
6
|
+
* `CC_WorkCSys`, whose plugin is {@link WorkCSys}. An app whose models have such features (no call of ClassCAD's API
|
|
7
|
+
* makes one) maps the class to it in `init`'s `plugins`, and a double click in the feature list opens it. Set takes an
|
|
8
|
+
* origin and a primary and a secondary axis; Custom takes the origin and the directions of the axes as coordinates;
|
|
9
|
+
* both take an offset and a rotation as Euler angles.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { init, ScgClassType, WASMClient } from '@classcad/client'
|
|
14
|
+
* import { getDrawing } from '@classcad/sdkjs'
|
|
15
|
+
* import { elements, WorkCoordSystem } from '@classcad/react-cad'
|
|
16
|
+
*
|
|
17
|
+
* init(drawingId => new WASMClient(drawingId, { token: 'ccpk_…' }), {
|
|
18
|
+
* elements,
|
|
19
|
+
* plugins: { [ScgClassType.CCWorkCoordSystem]: WorkCoordSystem },
|
|
20
|
+
* })
|
|
21
|
+
*
|
|
22
|
+
* // Code opens one of the drawing's tree by making it the active feature:
|
|
23
|
+
* const { structure, api } = getDrawing(drawingId)
|
|
24
|
+
* const csys = Object.values(structure.tree).find(obj => obj.class === ScgClassType.CCWorkCoordSystem)
|
|
25
|
+
* if (csys) api.plugin.setActiveFeature(csys.id)
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @category Work Geometry
|
|
29
|
+
* @advanced
|
|
30
|
+
* @module
|
|
31
|
+
*/
|
|
32
|
+
import * as THREE from 'three';
|
|
33
|
+
import { PluginDescription } from '@classcad/sdkjs';
|
|
34
|
+
import { Root } from './Root';
|
|
35
|
+
import { View } from './View';
|
|
36
|
+
/**
|
|
37
|
+
* The plugin's state: the preview of the coordinate system.
|
|
38
|
+
*
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export type InternalState = {
|
|
42
|
+
originPos: THREE.Vector3 | undefined;
|
|
43
|
+
xDir: THREE.Vector3 | undefined;
|
|
44
|
+
yDir: THREE.Vector3 | undefined;
|
|
45
|
+
offset: THREE.Vector3;
|
|
46
|
+
rotation: THREE.Vector3;
|
|
47
|
+
inverted: 0 | 1;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* The plugin's description for buerli's plugin system. Its state holds the preview of the coordinate system.
|
|
51
|
+
*
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
declare const description: PluginDescription<InternalState>;
|
|
55
|
+
export { Root, View, description };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID, PluginID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Draws the work plane in the scene while the feature is shown or its dialog is open.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const View: React.FC<{
|
|
9
|
+
drawingId: DrawingID;
|
|
10
|
+
pluginId: PluginID;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Work Plane feature's dialog: places a work plane on a base plane, a plane, points or lines, with an offset.
|
|
3
|
+
*
|
|
4
|
+
* It is the plugin of the feature class `CC_WorkPlane`: an app maps the class to it in `init`'s `plugins`, and
|
|
5
|
+
* react-cad opens it when the toolbar makes a new work plane and when one is double-clicked in the feature list. The
|
|
6
|
+
* dialog picks the type (one of the base planes, a plane, three points, a line and a point, a point and a normal, a
|
|
7
|
+
* point and a plane, a line and a plane at an angle, or a position and a normal as coordinates) and the geometry, and
|
|
8
|
+
* takes the offset or the angle. Apply updates the feature (`part.updateWorkPlane`). Its view draws the plane while the
|
|
9
|
+
* feature is shown or its dialog is open.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { init, ScgClassType, WASMClient } from '@classcad/client'
|
|
14
|
+
* import { getDrawing } from '@classcad/sdkjs'
|
|
15
|
+
* import { elements, WorkPlane } from '@classcad/react-cad'
|
|
16
|
+
*
|
|
17
|
+
* init(drawingId => new WASMClient(drawingId, { token: 'ccpk_…' }), {
|
|
18
|
+
* elements,
|
|
19
|
+
* plugins: { [ScgClassType.CCWorkPlane]: WorkPlane },
|
|
20
|
+
* })
|
|
21
|
+
*
|
|
22
|
+
* // Code opens one by making it the active feature, with the id that `api.v1.part.workPlane` returns:
|
|
23
|
+
* getDrawing(drawingId).api.plugin.setActiveFeature(planeId)
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @category Work Geometry
|
|
27
|
+
* @module
|
|
28
|
+
*/
|
|
29
|
+
import { PluginDescription } from '@classcad/sdkjs';
|
|
30
|
+
import { Root } from './Root';
|
|
31
|
+
import { View } from './View';
|
|
32
|
+
/**
|
|
33
|
+
* The plugin's description for buerli's plugin system.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
declare const description: PluginDescription;
|
|
38
|
+
export { Root, View, description };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validators: Record<number, (...args: any[]) => string[]>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID, PluginID } from '@classcad/sdkjs';
|
|
3
|
+
/**
|
|
4
|
+
* Draws the work point in the scene while the feature is shown or its dialog is open.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const View: React.FC<{
|
|
9
|
+
drawingId: DrawingID;
|
|
10
|
+
pluginId: PluginID;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Work Point feature's dialog: places a work point by coordinates or on geometry: a vertex, a midpoint, a center.
|
|
3
|
+
*
|
|
4
|
+
* It is the plugin of the feature class `CC_WorkPoint`: an app maps the class to it in `init`'s `plugins`, and
|
|
5
|
+
* react-cad opens it when the toolbar makes a new work point and when one is double-clicked in the feature list. The
|
|
6
|
+
* dialog picks the type (coordinates, a point, the midpoint of a line or of two points, the center of an arc or circle,
|
|
7
|
+
* the barycenter of a face, the intersection of two lines, or the incircle center of three lines) and the geometry it
|
|
8
|
+
* is made from. Apply updates the feature (`part.updateWorkPoint`). Its view draws the point while the feature is shown
|
|
9
|
+
* or its dialog is open.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { init, ScgClassType, WASMClient } from '@classcad/client'
|
|
14
|
+
* import { getDrawing } from '@classcad/sdkjs'
|
|
15
|
+
* import { elements, WorkPoint } from '@classcad/react-cad'
|
|
16
|
+
*
|
|
17
|
+
* init(drawingId => new WASMClient(drawingId, { token: 'ccpk_…' }), {
|
|
18
|
+
* elements,
|
|
19
|
+
* plugins: { [ScgClassType.CCWorkPoint]: WorkPoint },
|
|
20
|
+
* })
|
|
21
|
+
*
|
|
22
|
+
* // Code opens one by making it the active feature, with the id that `api.v1.part.workPoint` returns:
|
|
23
|
+
* getDrawing(drawingId).api.plugin.setActiveFeature(pointId)
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @category Work Geometry
|
|
27
|
+
* @module
|
|
28
|
+
*/
|
|
29
|
+
import { PluginDescription } from '@classcad/sdkjs';
|
|
30
|
+
import { Root } from './Root';
|
|
31
|
+
import { View } from './View';
|
|
32
|
+
/**
|
|
33
|
+
* The plugin's description for buerli's plugin system.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
declare const description: PluginDescription;
|
|
38
|
+
export { Root, View, description };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawingID, PluginID } from '@classcad/sdkjs';
|
|
3
|
+
import { MemberParam } from '../../types';
|
|
4
|
+
/**
|
|
5
|
+
* @param drawingId - id of the drawing.
|
|
6
|
+
* @param update - a function which will be called when user presses "Update" button.
|
|
7
|
+
* @param params - all params which should be sent to the server. PluginForm validates each of them.
|
|
8
|
+
* @param validator - smart validation (check https://awv-informatik.atlassian.net/wiki/spaces/CLAS/pages/2428076033/Validation for mor details)
|
|
9
|
+
* @param autoClose - (optional) if true plugin will closed after update. Default is true.
|
|
10
|
+
* @param forceUpdateEnabled - if plugin is opened for the recently created feature it contains default values.
|
|
11
|
+
* User should be able to click "Update" button (clicking on close will remove the feature). Since there is no params changed by the user validator disables "Update" button.
|
|
12
|
+
* To make "Update" button enabled with default values pass true to forceUpdateEnabled
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare const PluginForm: React.FC<{
|
|
16
|
+
drawingId: DrawingID;
|
|
17
|
+
pluginId: PluginID;
|
|
18
|
+
update: () => Promise<any>;
|
|
19
|
+
params: Record<string, MemberParam<any>>;
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
validator?: () => string[];
|
|
22
|
+
autoClose?: boolean;
|
|
23
|
+
forceUpdateEnabled?: boolean;
|
|
24
|
+
}>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The colours of one participant of a shared session, in tones that go together: one hue, picked from its name.
|
|
3
|
+
*
|
|
4
|
+
* They are CSS colours (`hsl(…)`), and do not change with the app's theme: `bg` and `text` are a pair that reads on
|
|
5
|
+
* its own. `viewpoints.identityColors(name)` gives them.
|
|
6
|
+
*
|
|
7
|
+
* @advanced
|
|
8
|
+
* @category Session
|
|
9
|
+
*/
|
|
10
|
+
export type IdentityColors = {
|
|
11
|
+
/** A saturated tone, for what is drawn over the canvas: a camera's frustum, a name tag, a pointer, a swatch. */
|
|
12
|
+
solid: string;
|
|
13
|
+
/** A light pastel ground: a comment's chip, a thread's panel. */
|
|
14
|
+
bg: string;
|
|
15
|
+
/** A medium tone, for borders and frames. */
|
|
16
|
+
accent: string;
|
|
17
|
+
/** A dark tone of the same hue, which always reads on `bg`. */
|
|
18
|
+
text: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* The colours a participant of a shared session is shown in, picked from its display name.
|
|
22
|
+
*
|
|
23
|
+
* The name, not the connection's peer id: the same person gets the same colours on every client, in every session,
|
|
24
|
+
* and in everything that shows them. The pick is a hash of the name (case and outer spaces aside) into a palette of
|
|
25
|
+
* twelve hues, so every client agrees on it. An empty name is grey.
|
|
26
|
+
*
|
|
27
|
+
* @param name - The display name: an invite's name, `Host`, `unnamed`, or a name the user set.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* import { viewpoints } from '@classcad/react-cad'
|
|
32
|
+
*
|
|
33
|
+
* // a name tag in a participant's colours: the same on every client
|
|
34
|
+
* function NameTag({ name }: { name: string }) {
|
|
35
|
+
* const { bg, text, accent } = viewpoints.identityColors(name)
|
|
36
|
+
* return <span style={{ background: bg, color: text, border: `1px solid ${accent}`, borderRadius: 4 }}>{name}</span>
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare const identityColors: (name: string) => IdentityColors;
|
|
41
|
+
/**
|
|
42
|
+
* The solid colour of a participant ({@link identityColors}`(name).solid`): for frustums, name tags, cursors, swatches.
|
|
43
|
+
*
|
|
44
|
+
* @param name - The display name.
|
|
45
|
+
*/
|
|
46
|
+
export declare const colorFor: (name: string) => string;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The session this page shares, for react-cad's components: which client it is, this page's role in it, and what its
|
|
3
|
+
* host offers.
|
|
4
|
+
*
|
|
5
|
+
* A thin React layer over the sharing API of `@classcad/client` (`session/share.ts`); any buerli app can build its
|
|
6
|
+
* own UI on that API without react-cad. Which client is "the session client" is decided by the app, with
|
|
7
|
+
* {@link setSessionClient}: a `WSClient` (the session is a ClassCAD server's, or a ClassCAD MCP's) or a `WASMClient`
|
|
8
|
+
* (the page hosts it itself). Both have the same surface (role, peers, invites, `createInvite`/`revokeInvite`,
|
|
9
|
+
* presence). The Session Management panel, read-only views for a viewer and the export menu's formats follow it.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { init, onClient, syncSelection, WSClient } from '@classcad/client'
|
|
14
|
+
* import { elements, sessionClient, SessionManagement, viewpoints } from '@classcad/react-cad'
|
|
15
|
+
*
|
|
16
|
+
* init((drawingId) => new WSClient('wss://classcad.example.com', drawingId), {
|
|
17
|
+
* elements,
|
|
18
|
+
* globalPlugins: [SessionManagement],
|
|
19
|
+
* })
|
|
20
|
+
* // every client, before it connects: its session is the page's; the peers' cameras and selections are heard
|
|
21
|
+
* onClient((client) => {
|
|
22
|
+
* sessionClient.setSessionClient(client)
|
|
23
|
+
* viewpoints.syncViewpoints(client)
|
|
24
|
+
* syncSelection(client)
|
|
25
|
+
* })
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @advanced
|
|
29
|
+
* @category Session
|
|
30
|
+
* @module
|
|
31
|
+
*/
|
|
32
|
+
import { AwvNodeClient, SessionRole } from '@classcad/client';
|
|
33
|
+
/**
|
|
34
|
+
* What a session's host says its guests are offered. It travels on the
|
|
35
|
+
* 'config' presence channel: only a host may publish there, and the server
|
|
36
|
+
* keeps the frame for those who join later. A session whose host says nothing
|
|
37
|
+
* offers everything the app can do.
|
|
38
|
+
*
|
|
39
|
+
* @see {@link useSessionConfig}
|
|
40
|
+
*/
|
|
41
|
+
export type SessionConfig = {
|
|
42
|
+
/**
|
|
43
|
+
* The formats a model may be saved in from this session (upper case: 'STP', 'STL', 'OFB'). A host
|
|
44
|
+
* whose engine saves formats beyond ClassCAD's names them too ('GLB', 'OBJ'): the apps offer them
|
|
45
|
+
* after their own and ask for them with v1.common.save.
|
|
46
|
+
*/
|
|
47
|
+
saveFormats?: string[];
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* The file types (lower case: 'stp') a menu offers for saving: the app's own, less what the
|
|
51
|
+
* session's host keeps back, then what the host offers beyond them.
|
|
52
|
+
*
|
|
53
|
+
* @param own - The types the app saves itself, such as `['ofb', 'stp', 'stl']`.
|
|
54
|
+
* @param saveFormats - What the host offers ({@link SessionConfig}.saveFormats); without it, the app's own.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```tsx
|
|
58
|
+
* import { createApi } from '@classcad/client'
|
|
59
|
+
* import type { DrawingID } from '@classcad/sdkjs'
|
|
60
|
+
* import { Menu, sessionClient } from '@classcad/react-cad'
|
|
61
|
+
* import type { MenuItems } from '@classcad/react-cad'
|
|
62
|
+
*
|
|
63
|
+
* // an export menu with what the app saves, as far as the session's host allows, and what the host adds
|
|
64
|
+
* function ExportMenu({ drawingId }: { drawingId: DrawingID }) {
|
|
65
|
+
* const { saveFormats } = sessionClient.useSessionConfig()
|
|
66
|
+
* const types = sessionClient.offeredTypes(['ofb', 'stp', 'stl'], saveFormats)
|
|
67
|
+
* const items: MenuItems = Object.fromEntries(
|
|
68
|
+
* types.map((type) => [type, { caption: type.toUpperCase(), callback: () => createApi(drawingId).v1.common.save({ format: type.toUpperCase() as 'STP', encoding: 'base64' }) }]),
|
|
69
|
+
* )
|
|
70
|
+
* return <Menu items={items} />
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare const offeredTypes: (own: readonly string[], saveFormats?: string[]) => string[];
|
|
75
|
+
/**
|
|
76
|
+
* Registers the client whose session this page shares (null: none). The app
|
|
77
|
+
* calls it when it creates the client, before connecting; from then on the
|
|
78
|
+
* hooks below follow that client, and what its session's host offers is heard.
|
|
79
|
+
*
|
|
80
|
+
* @param client - The drawing's client, such as the one `onClient` (`@classcad/client`) hands over.
|
|
81
|
+
*/
|
|
82
|
+
export declare const setSessionClient: (client: AwvNodeClient | null) => void;
|
|
83
|
+
/**
|
|
84
|
+
* Returns what the host of the session this page is in offers its guests ({@link SessionConfig}), and renders again
|
|
85
|
+
* when the host says otherwise.
|
|
86
|
+
*/
|
|
87
|
+
export declare const useSessionConfig: () => SessionConfig;
|
|
88
|
+
/**
|
|
89
|
+
* Returns the session client the app registered ({@link setSessionClient}), or null when it registered none; and
|
|
90
|
+
* renders again when another is registered.
|
|
91
|
+
*/
|
|
92
|
+
export declare const useSessionClient: () => AwvNodeClient | null;
|
|
93
|
+
/**
|
|
94
|
+
* This connection's role within a shared session, kept reactive. Guests get
|
|
95
|
+
* their role from the server's `SessionJoined` frame; hosts and non-sharing
|
|
96
|
+
* clients are always `'edit'`.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```tsx
|
|
100
|
+
* import type { DrawingID } from '@classcad/sdkjs'
|
|
101
|
+
* import { Drawing, sessionClient } from '@classcad/react-cad'
|
|
102
|
+
*
|
|
103
|
+
* // a viewer of a shared session browses the model, but has no tools to change it
|
|
104
|
+
* function Editor({ drawingId, children }: { drawingId: DrawingID; children: React.ReactNode }) {
|
|
105
|
+
* const readOnly = sessionClient.useSessionRole() === 'view'
|
|
106
|
+
* return (
|
|
107
|
+
* <Drawing drawingId={drawingId} readOnly={readOnly}>
|
|
108
|
+
* {children}
|
|
109
|
+
* </Drawing>
|
|
110
|
+
* )
|
|
111
|
+
* }
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
export declare const useSessionRole: () => SessionRole;
|
|
115
|
+
/**
|
|
116
|
+
* The share token this page was opened with, if any: then it is a guest in somebody else's session.
|
|
117
|
+
*/
|
|
118
|
+
export declare const getInviteFromUrl: () => string | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Builds a shareable URL for a token (`?invite=<token>`), preserving the current origin and path.
|
|
121
|
+
*
|
|
122
|
+
* @param token - An invite's token: its `invite`, as `createInvite` returns it and the client's `invites` list it.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```tsx
|
|
126
|
+
* import { sessionClient } from '@classcad/react-cad'
|
|
127
|
+
*
|
|
128
|
+
* // a button of the host's: an invite to view the session, its link copied
|
|
129
|
+
* function ShareButton() {
|
|
130
|
+
* const client = sessionClient.useSessionClient()
|
|
131
|
+
* if (!client?.shareKind || sessionClient.getInviteFromUrl()) return null
|
|
132
|
+
* const share = async () => {
|
|
133
|
+
* const { invite } = await client.createInvite('view', 'Review')
|
|
134
|
+
* await navigator.clipboard.writeText(sessionClient.buildInviteUrl(invite))
|
|
135
|
+
* }
|
|
136
|
+
* return <button onClick={share}>Share for review</button>
|
|
137
|
+
* }
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
export declare const buildInviteUrl: (token: string) => string;
|