@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,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A peer's camera, broadcast on the 'view' presence channel: where it is, what it looks at, and its name.
|
|
3
|
+
*
|
|
4
|
+
* {@link viewpoints} keeps the last of every peer's (`viewpoints.useViewpoints()`).
|
|
5
|
+
*
|
|
6
|
+
* @advanced
|
|
7
|
+
* @category Session
|
|
8
|
+
*/
|
|
9
|
+
export type ViewData = {
|
|
10
|
+
/** The peer's name, for its name tag. */
|
|
11
|
+
name?: string;
|
|
12
|
+
/** Where the camera is (world coordinates). */
|
|
13
|
+
position?: [number, number, number];
|
|
14
|
+
/** What it looks at: the orbit's target. */
|
|
15
|
+
target?: [number, number, number];
|
|
16
|
+
/** Its up. */
|
|
17
|
+
up?: [number, number, number];
|
|
18
|
+
/** Its zoom (an orthographic camera's). */
|
|
19
|
+
zoom?: number;
|
|
20
|
+
/** Visible world height of the sender's viewport (viewportPx / zoom). */
|
|
21
|
+
height?: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Whose camera this page looks through, if anyone's: the peer that is followed (`viewpoints.useFollow()`).
|
|
25
|
+
*
|
|
26
|
+
* @advanced
|
|
27
|
+
* @category Session
|
|
28
|
+
*/
|
|
29
|
+
export type FollowState = {
|
|
30
|
+
/** The followed peer's connection id. */
|
|
31
|
+
peerId: string;
|
|
32
|
+
/** Its name. */
|
|
33
|
+
name: string;
|
|
34
|
+
} | null;
|
|
35
|
+
/**
|
|
36
|
+
* A peer's pointer, broadcast on the 'cursor' presence channel. `point` is
|
|
37
|
+
* world-space, projected onto the sender's view plane (the plane through the
|
|
38
|
+
* orbit target perpendicular to the view direction) — meaningful for any
|
|
39
|
+
* receiver, and exact when the receiver follows the sender's camera.
|
|
40
|
+
*
|
|
41
|
+
* @advanced
|
|
42
|
+
* @category Session
|
|
43
|
+
*/
|
|
44
|
+
export type CursorData = {
|
|
45
|
+
/** Where the pointer is, in world coordinates on the sender's view plane. */
|
|
46
|
+
point?: [number, number, number];
|
|
47
|
+
/** Whether the pointer is over the sender's stage. */
|
|
48
|
+
active?: boolean;
|
|
49
|
+
/** Pressed mouse buttons, PointerEvent.buttons bitmask (1=left, 2=right).
|
|
50
|
+
* Lets receivers animate the cursor while the peer clicks or drags. */
|
|
51
|
+
buttons?: number;
|
|
52
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the peers of a shared session show of themselves besides the model: their cameras and pointers, and whose
|
|
3
|
+
* camera this page follows.
|
|
4
|
+
*
|
|
5
|
+
* A small store for the whole page, fed by the session's presence frames once {@link syncViewpoints} is attached to
|
|
6
|
+
* the client: 'view' (a peer's camera, {@link ViewData}), 'cursor' (its pointer, {@link CursorData}) and 'leave'.
|
|
7
|
+
* The canvas components (a peer's camera as a marker, a camera that follows one) and the page around the canvas (a
|
|
8
|
+
* banner that says whom it follows) read the same store with its hooks, across the canvas' boundary. The colours a
|
|
9
|
+
* peer is drawn in are {@link identityColors} of its name.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { viewpoints } from '@classcad/react-cad'
|
|
14
|
+
*
|
|
15
|
+
* // the peers of the session, each in its colour; a click looks through that peer's camera
|
|
16
|
+
* function Peers() {
|
|
17
|
+
* const views = viewpoints.useViewpoints()
|
|
18
|
+
* const follow = viewpoints.useFollow()
|
|
19
|
+
* return (
|
|
20
|
+
* <ul>
|
|
21
|
+
* {Object.entries(views).map(([peerId, view]) => (
|
|
22
|
+
* <li key={peerId} style={{ color: viewpoints.colorFor(view.name ?? '') }}
|
|
23
|
+
* onClick={() => (follow?.peerId === peerId ? viewpoints.clearFollow() : viewpoints.setFollow(peerId, view.name ?? 'unnamed'))}>
|
|
24
|
+
* {view.name ?? 'unnamed'} {follow?.peerId === peerId && '(following)'}
|
|
25
|
+
* </li>
|
|
26
|
+
* ))}
|
|
27
|
+
* </ul>
|
|
28
|
+
* )
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @advanced
|
|
33
|
+
* @category Session
|
|
34
|
+
* @module
|
|
35
|
+
*/
|
|
36
|
+
import { AwvNodeClient } from '@classcad/client';
|
|
37
|
+
import { CursorData, ViewData, FollowState } from './types';
|
|
38
|
+
export { colorFor, identityColors } from './identity';
|
|
39
|
+
export type { IdentityColors } from './identity';
|
|
40
|
+
/** The last camera of every peer, by peer id, outside of a component ({@link useViewpoints} in one). */
|
|
41
|
+
export declare const getViewpoints: () => Record<string, ViewData>;
|
|
42
|
+
/** The last pointer of every peer, by peer id, outside of a component ({@link useCursors} in one). */
|
|
43
|
+
export declare const getCursors: () => Record<string, CursorData>;
|
|
44
|
+
/** Whose camera this page follows, outside of a component ({@link useFollow} in one). */
|
|
45
|
+
export declare const getFollow: () => FollowState;
|
|
46
|
+
/** The radius of the sphere around the model, as {@link setModelRadius} gave it, outside of a component. */
|
|
47
|
+
export declare const getModelRadius: () => number | null;
|
|
48
|
+
/**
|
|
49
|
+
* Says how large the model is: the radius of the sphere around it (world units), or null while there is none.
|
|
50
|
+
*
|
|
51
|
+
* The peers' camera markers are placed on a ring of that size around the model, not where their zoom would put them.
|
|
52
|
+
* The app feeds it from the drawing's structure (`api.structure.calculateProductBounds`).
|
|
53
|
+
*/
|
|
54
|
+
export declare const setModelRadius: (radius: number | null) => void;
|
|
55
|
+
/** Returns the model's radius ({@link setModelRadius}), and renders again when it changes. */
|
|
56
|
+
export declare const useModelRadius: () => number | null;
|
|
57
|
+
/** Returns the last camera of every peer, by peer id, and renders again when one moves, comes or goes. */
|
|
58
|
+
export declare const useViewpoints: () => Record<string, ViewData>;
|
|
59
|
+
/** Returns the last pointer of every peer, by peer id, and renders again when one moves, comes or goes. */
|
|
60
|
+
export declare const useCursors: () => Record<string, CursorData>;
|
|
61
|
+
/** Returns whose camera this page follows (null: no one's), and renders again when that changes. */
|
|
62
|
+
export declare const useFollow: () => FollowState;
|
|
63
|
+
/**
|
|
64
|
+
* Follows a peer's camera: this page's camera is to look through it, until {@link clearFollow}, or until the peer
|
|
65
|
+
* leaves.
|
|
66
|
+
*
|
|
67
|
+
* The store only says whom to follow; the canvas component that moves the camera reads it with {@link useFollow}.
|
|
68
|
+
*
|
|
69
|
+
* @param peerId - The peer's connection id, as {@link useViewpoints} keys it.
|
|
70
|
+
* @param name - Its name, for whatever says whom the page follows.
|
|
71
|
+
*/
|
|
72
|
+
export declare const setFollow: (peerId: string, name: string) => void;
|
|
73
|
+
/** Stops following a peer's camera. */
|
|
74
|
+
export declare const clearFollow: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* Attaches the store to a WSClient: 'view' presence updates the peer's
|
|
77
|
+
* viewpoint, 'cursor' its pointer, 'leave' removes both (and exits follow
|
|
78
|
+
* mode if that peer was being followed). Returns a detach function.
|
|
79
|
+
*
|
|
80
|
+
* Only one client is attached at a time: attaching a new one detaches the
|
|
81
|
+
* previous client and clears the store first, so peers of a replaced session
|
|
82
|
+
* (new file / new drawing) never linger as stale markers.
|
|
83
|
+
*
|
|
84
|
+
* Attach it before the client connects: the peers' cameras arrive right after it has joined, before any component
|
|
85
|
+
* has mounted. (See the example of {@link sessionClient}.)
|
|
86
|
+
*
|
|
87
|
+
* @param client - The session's client: a `WSClient` or a `WASMClient` of `@classcad/client`.
|
|
88
|
+
* @returns A function that detaches it again, and clears the store.
|
|
89
|
+
*/
|
|
90
|
+
export declare const syncViewpoints: (client: AwvNodeClient) => (() => void);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Mounts the app's tokens and styles, as global stylesheets that live as long as it is mounted.
|
|
4
|
+
*
|
|
5
|
+
* The tokens are the colours of the current theme ({@link ThemeColors}), each a custom property on `:root`,
|
|
6
|
+
* `--rcad-<kebab-case>` (`--rcad-ink`, `--rcad-accent-fill`), with the app's metrics (`--rcad-row-h`, …) and its face,
|
|
7
|
+
* JetBrains Mono, which the library carries. The styles name only those properties, so they follow the theme.
|
|
8
|
+
*
|
|
9
|
+
* {@link Drawing} renders it. A host that composes the pieces itself (a {@link ModelTree} here, a {@link ToolBar}
|
|
10
|
+
* there) renders one `<AppStyle />` beside them, and puts them inside an element with the class `rcad`, which sets
|
|
11
|
+
* the app's type.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* import type { DrawingID } from '@classcad/sdkjs'
|
|
16
|
+
* import { AppStyle, ModelTree, ToolBar } from '@classcad/react-cad'
|
|
17
|
+
*
|
|
18
|
+
* // two pieces in a page of the app's own: one stylesheet, and the class that sets the app's type
|
|
19
|
+
* const Pieces = ({ drawingId }: { drawingId: DrawingID }) => (
|
|
20
|
+
* <div className="rcad">
|
|
21
|
+
* <AppStyle />
|
|
22
|
+
* <ToolBar drawingId={drawingId} />
|
|
23
|
+
* <div style={{ height: 400 }}>
|
|
24
|
+
* <ModelTree drawingId={drawingId} />
|
|
25
|
+
* </div>
|
|
26
|
+
* <p style={{ color: 'var(--rcad-mute)' }}>The tokens are custom properties too.</p>
|
|
27
|
+
* </div>
|
|
28
|
+
* )
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @category Theme
|
|
32
|
+
*/
|
|
33
|
+
export declare const AppStyle: React.FC;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Latin, the weights 100 to 800 in one file (woff2): what the page is set in. */
|
|
2
|
+
export declare const monoPage: string;
|
|
3
|
+
/**
|
|
4
|
+
* The face of what is written on the stage (a dimension, a readout), as a `data:` url: JetBrains Mono, latin, weight
|
|
5
|
+
* 500, without ligatures (woff).
|
|
6
|
+
*
|
|
7
|
+
* It is what drei's `<Text font={stageFont}>` takes, so that a label of the app's own on the stage is set in the
|
|
8
|
+
* app's face. (JetBrains Mono is under the SIL Open Font License.)
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { Text } from '@react-three/drei'
|
|
13
|
+
* import { stageFont, useStage } from '@classcad/react-cad'
|
|
14
|
+
*
|
|
15
|
+
* // a label of the app's own on the stage, set as a dimension is
|
|
16
|
+
* function Label({ text, position }: { text: string; position: [number, number, number] }) {
|
|
17
|
+
* const stage = useStage()
|
|
18
|
+
* return (
|
|
19
|
+
* <Text font={stageFont} fontSize={4} color={stage.dimText} position={position}>
|
|
20
|
+
* {text}
|
|
21
|
+
* </Text>
|
|
22
|
+
* )
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @advanced
|
|
27
|
+
* @category Theme
|
|
28
|
+
*/
|
|
29
|
+
export declare const monoStage: string;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { ThemeMode } from './themeStore';
|
|
2
|
+
/**
|
|
3
|
+
* The colours of what is drawn on the stage: the model, what lies over it, a sketch on its sheet.
|
|
4
|
+
*
|
|
5
|
+
* They are written down in BRANDING.md, "The stage". The model is a solid grey body with ink edges. What a sketch's
|
|
6
|
+
* colours say is the editor's own code (how far a curve is defined), in the family's tones. {@link useStage} gives
|
|
7
|
+
* them for the current theme; they are CSS colour strings (`#rrggbb`), which three.js takes as they are.
|
|
8
|
+
*
|
|
9
|
+
* @category Theme
|
|
10
|
+
*/
|
|
11
|
+
export type StageColors = {
|
|
12
|
+
/** A body the model gives no colour of its own: a neutral grey, clearly off the ground. */
|
|
13
|
+
body: string;
|
|
14
|
+
/** Its edges: ink, in either theme. */
|
|
15
|
+
edge: string;
|
|
16
|
+
/** Under the pointer: the highlight, held back. */
|
|
17
|
+
hover: string;
|
|
18
|
+
/** In hand: the highlight. */
|
|
19
|
+
select: string;
|
|
20
|
+
/** Taken by the feature being made: red. */
|
|
21
|
+
pick: string;
|
|
22
|
+
/** Stands in for the highlight on a body of nearly its colour. */
|
|
23
|
+
alt: string;
|
|
24
|
+
/** The X axis: red. */
|
|
25
|
+
axisX: string;
|
|
26
|
+
/** The Y axis: green. */
|
|
27
|
+
axisY: string;
|
|
28
|
+
/** The Z axis: blue. */
|
|
29
|
+
axisZ: string;
|
|
30
|
+
/** A point or an axis of the part's own, and the origin. */
|
|
31
|
+
datum: string;
|
|
32
|
+
/** A plane: the outline, and the same colour, thinned, as its fill. */
|
|
33
|
+
plane: string;
|
|
34
|
+
/** A curve the solver can still move (under-defined): blue. */
|
|
35
|
+
sketchFree: string;
|
|
36
|
+
/** A curve that is fully defined: ink. */
|
|
37
|
+
sketchSolved: string;
|
|
38
|
+
/** A curve, or a constraint, that is defined more than once: red. */
|
|
39
|
+
sketchOver: string;
|
|
40
|
+
/** A construction curve that is not fully defined: grey. */
|
|
41
|
+
sketchConstruction: string;
|
|
42
|
+
/** Geometry that cannot be picked for the constraint being made: faded towards the ground. */
|
|
43
|
+
sketchDimmed: string;
|
|
44
|
+
/** A sketch that is not being edited: teal. */
|
|
45
|
+
sketchIdle: string;
|
|
46
|
+
/** The points of a sketch that is not being edited: a shade deeper. */
|
|
47
|
+
sketchIdlePoint: string;
|
|
48
|
+
/** Under the pointer: green. */
|
|
49
|
+
sketchHover: string;
|
|
50
|
+
/** Pointed at from a list: the same green, paler. */
|
|
51
|
+
sketchHoverSoft: string;
|
|
52
|
+
/** A curve or a point in hand: amber. */
|
|
53
|
+
sketchSelect: string;
|
|
54
|
+
/** A constraint or a region in hand: yellow. */
|
|
55
|
+
sketchMark: string;
|
|
56
|
+
/** A constraint that says what is already so: orange. */
|
|
57
|
+
sketchRedundant: string;
|
|
58
|
+
/** The squared sheet's rule around every cell. */
|
|
59
|
+
gridMinor: string;
|
|
60
|
+
/** Its rule around every fifth. */
|
|
61
|
+
gridMajor: string;
|
|
62
|
+
/** A constraint's badge at rest: its disc. */
|
|
63
|
+
badgeDisc: string;
|
|
64
|
+
/** A constraint's badge at rest: the faint shadow around its disc. */
|
|
65
|
+
badgeRing: string;
|
|
66
|
+
/** A constraint's badge: its glyph, in whatever state the badge is. */
|
|
67
|
+
badgeInk: string;
|
|
68
|
+
/** A dimension's lines and arrows. */
|
|
69
|
+
dimLine: string;
|
|
70
|
+
/** A dimension's value, a readout's text. */
|
|
71
|
+
dimText: string;
|
|
72
|
+
/** A value that is an expression. */
|
|
73
|
+
dimExpr: string;
|
|
74
|
+
/** What its text stands on. */
|
|
75
|
+
dimHalo: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* The stage's colours in the light theme. {@link useStage} gives the current theme's; see also {@link stageColors}.
|
|
79
|
+
*
|
|
80
|
+
* @advanced
|
|
81
|
+
* @category Theme
|
|
82
|
+
*/
|
|
83
|
+
export declare const lightStage: StageColors;
|
|
84
|
+
/**
|
|
85
|
+
* The stage's colours in the dark theme. {@link useStage} gives the current theme's; see also {@link stageColors}.
|
|
86
|
+
*
|
|
87
|
+
* @advanced
|
|
88
|
+
* @category Theme
|
|
89
|
+
*/
|
|
90
|
+
export declare const darkStage: StageColors;
|
|
91
|
+
/**
|
|
92
|
+
* The stage's colours in a theme: {@link lightStage} or {@link darkStage}.
|
|
93
|
+
*
|
|
94
|
+
* @param mode - The theme.
|
|
95
|
+
* @example
|
|
96
|
+
* ```tsx
|
|
97
|
+
* import { stageColors } from '@classcad/react-cad'
|
|
98
|
+
*
|
|
99
|
+
* // the stage's colours of both themes, side by side: a legend of what a sketch's colours say
|
|
100
|
+
* const legend = (['light', 'dark'] as const).map((mode) => {
|
|
101
|
+
* const s = stageColors(mode)
|
|
102
|
+
* return { mode, free: s.sketchFree, solved: s.sketchSolved, over: s.sketchOver }
|
|
103
|
+
* })
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* @advanced
|
|
107
|
+
* @category Theme
|
|
108
|
+
*/
|
|
109
|
+
export declare const stageColors: (mode: ThemeMode) => StageColors;
|
|
110
|
+
/**
|
|
111
|
+
* Returns the stage's colours in the current theme, and renders again when the theme changes.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```tsx
|
|
115
|
+
* import { Line } from '@react-three/drei'
|
|
116
|
+
* import { useStage } from '@classcad/react-cad'
|
|
117
|
+
*
|
|
118
|
+
* // a guide of the app's own on the stage, in the stage's colours: it follows the theme
|
|
119
|
+
* function Guide({ from, to }: { from: [number, number, number]; to: [number, number, number] }) {
|
|
120
|
+
* const stage = useStage()
|
|
121
|
+
* return <Line points={[from, to]} color={stage.datum} lineWidth={1.5} dashed dashSize={2} gapSize={2} />
|
|
122
|
+
* }
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
125
|
+
* @category Theme
|
|
126
|
+
*/
|
|
127
|
+
export declare const useStage: () => StageColors;
|
|
128
|
+
/**
|
|
129
|
+
* The stage's colours in the current theme, outside of a component (as {@link useStage}, without rendering again).
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```tsx
|
|
133
|
+
* import { init, WASMClient } from '@classcad/client'
|
|
134
|
+
* import { elements, getStage } from '@classcad/react-cad'
|
|
135
|
+
*
|
|
136
|
+
* // the SDK's highlight colours from the stage's, as Buerligons sets them
|
|
137
|
+
* const stage = getStage()
|
|
138
|
+
* init((drawingId) => new WASMClient(drawingId, { token: 'ccpk_…' }), {
|
|
139
|
+
* elements,
|
|
140
|
+
* theme: { primary: stage.pick, secondary: stage.hover, dark: stage.datum, highlightedGeom: stage.select, hoveredGeom: stage.hover },
|
|
141
|
+
* })
|
|
142
|
+
* ```
|
|
143
|
+
*
|
|
144
|
+
* @category Theme
|
|
145
|
+
*/
|
|
146
|
+
export declare const getStage: () => StageColors;
|
|
147
|
+
/** A colour as the number three.js code likes to pass around. */
|
|
148
|
+
export declare const hex: (color: string) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const antdChoices: import("styled-components").RuleSet<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const antdControls: import("styled-components").RuleSet<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const antdSurfaces: import("styled-components").RuleSet<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const editorsStyle: import("styled-components").RuleSet<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fieldsStyle: import("styled-components").RuleSet<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const frameStyle: import("styled-components").RuleSet<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const panesStyle: import("styled-components").RuleSet<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const restStyle: import("styled-components").RuleSet<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sketchStyle: import("styled-components").RuleSet<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const toolbarStyle: import("styled-components").RuleSet<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const toolsStyle: import("styled-components").RuleSet<object>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const windowsStyle: import("styled-components").RuleSet<object>;
|