@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
package/package.json
CHANGED
|
@@ -1,6 +1,111 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@classcad/react-cad",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "3.0.0-beta.20261119100608",
|
|
4
|
+
"homepage": "https://sdkjs.classcad.ch",
|
|
5
|
+
"description": "The CAD user interface on the ClassCAD SDK: feature dialogs, model tree, sketcher",
|
|
6
|
+
"author": "AWV Informatik AG <info@awv-informatik.ch>",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/awv-informatik/sdkjs.git",
|
|
10
|
+
"directory": "packages/react-cad"
|
|
11
|
+
},
|
|
12
|
+
"main": "build/index.cjs.js",
|
|
13
|
+
"module": "build/index.js",
|
|
14
|
+
"types": "build/index.d.ts",
|
|
15
|
+
"//": "Check https://github.com/rollup/plugins/issues/67",
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"**/*.css"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"prepack": "npm run build && npm run docs",
|
|
21
|
+
"build": "rimraf ./build && rollup -c",
|
|
22
|
+
"postbuild": "tsc -p tsconfig.build.json",
|
|
23
|
+
"test": "vitest run",
|
|
24
|
+
"testVerbose": "vitest run --reporter verbose",
|
|
25
|
+
"lint": "eslint \"./src/**/*.ts?(x)\"",
|
|
26
|
+
"compile": "tsc",
|
|
27
|
+
"prettify": "prettier --write \"./{src,tests}/**/*.{js,jsx,ts,tsx,json}\"",
|
|
28
|
+
"docs": "typedoc"
|
|
29
|
+
},
|
|
30
|
+
"license": "ISC",
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@ant-design/icons": "^6.3.4",
|
|
33
|
+
"@babel/core": "^7.29.7",
|
|
34
|
+
"@babel/plugin-transform-class-properties": "^7.29.7",
|
|
35
|
+
"@babel/plugin-transform-object-rest-spread": "^7.29.7",
|
|
36
|
+
"@babel/plugin-transform-private-methods": "^7.29.7",
|
|
37
|
+
"@babel/plugin-transform-private-property-in-object": "^7.29.7",
|
|
38
|
+
"@babel/plugin-transform-runtime": "^7.29.7",
|
|
39
|
+
"@babel/preset-env": "^7.29.7",
|
|
40
|
+
"@babel/preset-react": "^7.29.7",
|
|
41
|
+
"@babel/preset-typescript": "^7.29.7",
|
|
42
|
+
"@eslint/js": "^10.0.1",
|
|
43
|
+
"@react-three/drei": "^10.7.9",
|
|
44
|
+
"@react-three/fiber": "^9.8.1",
|
|
45
|
+
"@rollup/plugin-babel": "^5.3.0",
|
|
46
|
+
"@rollup/plugin-image": "^2.1.0",
|
|
47
|
+
"@rollup/plugin-node-resolve": "^13.0.4",
|
|
48
|
+
"@testing-library/dom": "^10.4.2",
|
|
49
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
50
|
+
"@testing-library/react": "^16.3.3",
|
|
51
|
+
"@testing-library/user-event": "^14.6.7",
|
|
52
|
+
"@types/node": "^24.10.0",
|
|
53
|
+
"@types/path-browserify": "^1.0.3",
|
|
54
|
+
"@types/react": "^19.3.0",
|
|
55
|
+
"@types/three": "~0.184.1",
|
|
56
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
57
|
+
"eslint": "^10.12.0",
|
|
58
|
+
"eslint-config-prettier": "^10.1.8",
|
|
59
|
+
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
60
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
61
|
+
"globals": "^17.6.0",
|
|
62
|
+
"immer": "^11.1.21",
|
|
63
|
+
"jsdom": "^30.1.2",
|
|
64
|
+
"postcss": "^8.5.6",
|
|
65
|
+
"prettier": "^3.9.10",
|
|
66
|
+
"react": "^19.3.0",
|
|
67
|
+
"react-dom": "^19.3.0",
|
|
68
|
+
"rimraf": "^6.1.3",
|
|
69
|
+
"rollup": "^2.56.2",
|
|
70
|
+
"rollup-plugin-postcss": "^4.0.1",
|
|
71
|
+
"rollup-plugin-size-snapshot": "^0.12.0",
|
|
72
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
73
|
+
"three": "~0.184.0",
|
|
74
|
+
"typescript": "~6.0.3",
|
|
75
|
+
"typescript-eslint": "^8.71.1",
|
|
76
|
+
"vite": "^8.3.4",
|
|
77
|
+
"vitest": "^5.0.4"
|
|
78
|
+
},
|
|
79
|
+
"peerDependencies": {
|
|
80
|
+
"@react-three/drei": ">=10",
|
|
81
|
+
"@react-three/fiber": ">=9",
|
|
82
|
+
"react": ">=19",
|
|
83
|
+
"three": ">=0.170"
|
|
84
|
+
},
|
|
85
|
+
"dependencies": {
|
|
86
|
+
"@babel/runtime": "^7.29.10",
|
|
87
|
+
"@classcad/client": "3.0.0-beta.20261119100608",
|
|
88
|
+
"@classcad/react": "3.0.0-beta.20261119100608",
|
|
89
|
+
"@dnd-kit/core": "^6.3.1",
|
|
90
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
|
91
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
92
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
93
|
+
"@react-three/postprocessing": "^3.2.0",
|
|
94
|
+
"antd": "^6.6.6",
|
|
95
|
+
"deepmerge": "^4.3.1",
|
|
96
|
+
"dompurify": "^3.4.17",
|
|
97
|
+
"path-browserify": "^1.0.1",
|
|
98
|
+
"postprocessing": "^6.39.5",
|
|
99
|
+
"react-colorful": "^5.8.1",
|
|
100
|
+
"react-uid": "^2.4.0",
|
|
101
|
+
"styled-components": "^6.5.3",
|
|
102
|
+
"three-stdlib": "^2.36.1",
|
|
103
|
+
"uuid": "^11.1.1",
|
|
104
|
+
"zustand": "^5.0.15"
|
|
105
|
+
},
|
|
106
|
+
"classcadEngine": {
|
|
107
|
+
"version": "21.2.1-alpha.185",
|
|
108
|
+
"quality": "alpha",
|
|
109
|
+
"url": "https://awvstatic.com/classcad/download/alpha/21.2.1-alpha.185"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# A stand-in for the brotli module, which fontTools needs to read WOFF2: node's zlib does the work.
|
|
2
|
+
# (pip install brotli makes this file unnecessary; python finds the real module first if this
|
|
3
|
+
# folder is not on PYTHONPATH.)
|
|
4
|
+
import subprocess
|
|
5
|
+
|
|
6
|
+
__version__ = '1.0.9'
|
|
7
|
+
MODE_FONT = 2
|
|
8
|
+
|
|
9
|
+
_DECOMPRESS = (
|
|
10
|
+
"const z=require('zlib');const c=[];"
|
|
11
|
+
"process.stdin.on('data',d=>c.push(d)).on('end',()=>process.stdout.write(z.brotliDecompressSync(Buffer.concat(c))))"
|
|
12
|
+
)
|
|
13
|
+
_COMPRESS = (
|
|
14
|
+
"const z=require('zlib');const c=[];"
|
|
15
|
+
"process.stdin.on('data',d=>c.push(d)).on('end',()=>process.stdout.write(z.brotliCompressSync(Buffer.concat(c),"
|
|
16
|
+
"{params:{[z.constants.BROTLI_PARAM_QUALITY]:11,[z.constants.BROTLI_PARAM_MODE]:z.constants.BROTLI_MODE_FONT}})))"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _run(code, data):
|
|
21
|
+
return subprocess.run(['node', '-e', code], input=data, stdout=subprocess.PIPE, check=True).stdout
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def decompress(data):
|
|
25
|
+
return _run(_DECOMPRESS, data)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def compress(data, mode=0, quality=11, lgwin=22, lgblock=0):
|
|
29
|
+
return _run(_COMPRESS, data)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Makes src/theme/fonts/mono.ts: JetBrains Mono, carried with the library.
|
|
3
|
+
|
|
4
|
+
PYTHONPATH=tools/fonts python3 tools/fonts/build.py <JetBrainsMono latin variable .woff2>
|
|
5
|
+
|
|
6
|
+
The source is the family's own file (websites: packages/brand/fonts/jetbrainsmono_v24_...xD7OwGtT0rU.woff2,
|
|
7
|
+
the latin subset, weights 100 to 800). Needs fontTools; PYTHONPATH lets it find the brotli stand-in
|
|
8
|
+
beside this script where the real module is not installed.
|
|
9
|
+
"""
|
|
10
|
+
import base64
|
|
11
|
+
import io
|
|
12
|
+
import os
|
|
13
|
+
import sys
|
|
14
|
+
|
|
15
|
+
from fontTools import subset
|
|
16
|
+
from fontTools.ttLib import TTFont
|
|
17
|
+
from fontTools.varLib import instancer
|
|
18
|
+
|
|
19
|
+
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
20
|
+
OUT = os.path.join(HERE, '..', '..', 'src', 'theme', 'fonts', 'mono.ts')
|
|
21
|
+
|
|
22
|
+
# what can stand in a dimension, a readout or a name on the stage
|
|
23
|
+
STAGE_TEXT = ''.join(chr(c) for c in range(0x20, 0x7F)) + '°Ø±×·µ²³«»©®§¶ÄÖÜäöüéèàçñß–—‘’“”…€'
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def stage_face(src):
|
|
27
|
+
"""One weight (500), no ligatures: a value is read letter by letter."""
|
|
28
|
+
font = instancer.instantiateVariableFont(TTFont(src), {'wght': 500})
|
|
29
|
+
opts = subset.Options()
|
|
30
|
+
opts.layout_features = []
|
|
31
|
+
opts.name_IDs = [1, 2, 4, 6]
|
|
32
|
+
opts.notdef_outline = True
|
|
33
|
+
opts.glyph_names = False
|
|
34
|
+
opts.hinting = False
|
|
35
|
+
sub = subset.Subsetter(opts)
|
|
36
|
+
sub.populate(text=STAGE_TEXT)
|
|
37
|
+
sub.subset(font)
|
|
38
|
+
font.flavor = 'woff'
|
|
39
|
+
buf = io.BytesIO()
|
|
40
|
+
font.save(buf)
|
|
41
|
+
return buf.getvalue()
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def lines(data):
|
|
45
|
+
s = base64.b64encode(data).decode()
|
|
46
|
+
step = 116
|
|
47
|
+
return '\n'.join(" '" + s[i : i + step] + "'" + (' +' if i + step < len(s) else '') for i in range(0, len(s), step))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def main():
|
|
51
|
+
src = sys.argv[1]
|
|
52
|
+
page = open(src, 'rb').read()
|
|
53
|
+
stage = stage_face(src)
|
|
54
|
+
with open(OUT, 'w') as f:
|
|
55
|
+
f.write(
|
|
56
|
+
f"""/* eslint-disable max-lines */
|
|
57
|
+
// JetBrains Mono (SIL Open Font License 1.1, https://www.jetbrains.com/lp/mono/), carried with the
|
|
58
|
+
// library so that the app is set in its own face wherever it is mounted. Made by tools/fonts/build.py
|
|
59
|
+
// from the family's own file; do not edit by hand.
|
|
60
|
+
|
|
61
|
+
/** Latin, the weights 100 to 800 in one file (woff2): what the page is set in. */
|
|
62
|
+
export const monoPage =
|
|
63
|
+
'data:font/woff2;base64,' +
|
|
64
|
+
{lines(page)}
|
|
65
|
+
|
|
66
|
+
/** Latin, weight 500, without ligatures (woff): what is written on the stage (a dimension, a readout). */
|
|
67
|
+
export const monoStage =
|
|
68
|
+
'data:font/woff;base64,' +
|
|
69
|
+
{lines(stage)}
|
|
70
|
+
"""
|
|
71
|
+
)
|
|
72
|
+
print(f'page {len(page)} bytes, stage {len(stage)} bytes -> {os.path.normpath(OUT)}')
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
if __name__ == '__main__':
|
|
76
|
+
main()
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// A contact sheet of the app's signs, to look at them: at the sizes the app shows them, in light
|
|
2
|
+
// and in dark, with the pens the app draws them with.
|
|
3
|
+
// node preview.mjs [--only <regex>] [--out preview.html] [--cols 8] [--build <dir>]
|
|
4
|
+
// The sheets are TypeScript (src/icons/*.ts): they are transpiled into .build/ and read from there.
|
|
5
|
+
import { mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs'
|
|
6
|
+
import { createRequire } from 'node:module'
|
|
7
|
+
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
8
|
+
import path from 'node:path'
|
|
9
|
+
|
|
10
|
+
const here = path.dirname(fileURLToPath(import.meta.url))
|
|
11
|
+
const src = path.resolve(here, '../../src/icons')
|
|
12
|
+
const arg = (name, value) => (process.argv.includes(name) ? process.argv[process.argv.indexOf(name) + 1] : value)
|
|
13
|
+
// (--build: where the transpiled sheets go; a run that shares the default with another may read half a file)
|
|
14
|
+
const out = arg('--build', path.join(here, '.build'))
|
|
15
|
+
const ts = createRequire(import.meta.url)('typescript')
|
|
16
|
+
|
|
17
|
+
mkdirSync(out, { recursive: true })
|
|
18
|
+
for (const file of readdirSync(src).filter(f => f.endsWith('.ts'))) {
|
|
19
|
+
const js = ts.transpileModule(readFileSync(path.join(src, file), 'utf8'), {
|
|
20
|
+
compilerOptions: { module: ts.ModuleKind.ESNext, target: ts.ScriptTarget.ES2020 },
|
|
21
|
+
}).outputText
|
|
22
|
+
writeFileSync(path.join(out, file.replace(/\.ts$/, '.mjs')), js.replace(/from '(\.\/[^']+)'/g, "from '$1.mjs'"))
|
|
23
|
+
}
|
|
24
|
+
const { drawings } = await import(pathToFileURL(path.join(out, 'sheets.mjs')).href + `?t=${Date.now()}`)
|
|
25
|
+
|
|
26
|
+
const only = arg('--only') ? new RegExp(arg('--only')) : null
|
|
27
|
+
const cols = +arg('--cols', 8)
|
|
28
|
+
const file = arg('--out', path.join(here, 'preview.html'))
|
|
29
|
+
const names = Object.keys(drawings).filter(n => !only || only.test(n))
|
|
30
|
+
|
|
31
|
+
const weight = size =>
|
|
32
|
+
size <= 14 ? 1.3 : size <= 16 ? 1.4 : size <= 18 ? 1.45 : size <= 24 ? 1.5 : size <= 40 ? 1.75 : 2
|
|
33
|
+
const layers = d => (typeof d === 'string' ? [['', d]] : d)
|
|
34
|
+
// (as the app draws a layer: what is in square brackets is solid, the rest is lines)
|
|
35
|
+
const layer = ([pen, d]) => {
|
|
36
|
+
let solid = ''
|
|
37
|
+
const lines = d.replace(/\[([^\]]*)\]/g, (_, part) => ((solid += part), ''))
|
|
38
|
+
const t = pen ? ` data-t="${pen}"` : ''
|
|
39
|
+
if (!solid) return `<path${t} d="${d}"/>`
|
|
40
|
+
return `<g${t}>${lines ? `<path d="${lines}"/>` : ''}<path data-solid d="${solid}"/></g>`
|
|
41
|
+
}
|
|
42
|
+
const svg = (name, size) =>
|
|
43
|
+
`<svg class="i" viewBox="0 0 20 20" width="${size}" height="${size}" style="--w:${(weight(size) * 20) / size}">` +
|
|
44
|
+
layers(drawings[name]).map(layer).join('') +
|
|
45
|
+
`</svg>`
|
|
46
|
+
const pens = c => `
|
|
47
|
+
.i{display:block;fill:none;stroke:${c.ink};stroke-width:var(--w);stroke-linecap:round;stroke-linejoin:round;overflow:visible}
|
|
48
|
+
.i [data-t='sub'],.i [data-t='sub-dash'],.i [data-t='axis']{opacity:.46}
|
|
49
|
+
.i [data-t='dash'],.i [data-t='sub-dash']{stroke-dasharray:2.1 2.1;stroke-linecap:butt}
|
|
50
|
+
.i [data-t='axis']{stroke-dasharray:3.4 1.7 .5 1.7;stroke-linecap:butt}
|
|
51
|
+
.i [data-t='fill'],.i [data-t='sub-fill']{fill:${c.ink};stroke:none} .i [data-t='sub-fill']{fill-opacity:.46}
|
|
52
|
+
.i [data-t='tone']{fill:${c.ink};fill-opacity:.14;stroke:none}
|
|
53
|
+
.i [data-t='x']{color:${c.x}} .i [data-t='y']{color:${c.y}} .i [data-t='z']{color:${c.z}}
|
|
54
|
+
.i [data-t='x'],.i [data-t='y'],.i [data-t='z']{stroke:currentColor}
|
|
55
|
+
.i [data-solid]{fill:currentColor;stroke-dasharray:none;stroke-linecap:round}`
|
|
56
|
+
const cell = name =>
|
|
57
|
+
`<div class="c">${svg(name, 96)}<div class="r">${svg(name, 32)}${svg(name, 20)}${svg(
|
|
58
|
+
name,
|
|
59
|
+
16,
|
|
60
|
+
)}</div><span>${name}</span></div>`
|
|
61
|
+
const theme = (cls, c) =>
|
|
62
|
+
`<section class="${cls}"><style>.${cls}{background:${c.bg};color:${c.ink}} .${cls} .c{border-color:${c.line}} ${pens(
|
|
63
|
+
c,
|
|
64
|
+
).replace(/\.i/g, `.${cls} .i`)}</style>${names.map(cell).join('')}</section>`
|
|
65
|
+
writeFileSync(
|
|
66
|
+
file,
|
|
67
|
+
`<!doctype html><meta charset="utf8"><style>
|
|
68
|
+
body{margin:0;font:500 10px/1 Menlo,monospace} section{display:grid;grid-template-columns:repeat(${cols},1fr);padding:10px}
|
|
69
|
+
.c{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 4px 10px;border:1px solid;margin:-1px 0 0 -1px}
|
|
70
|
+
.r{display:flex;align-items:center;gap:10px;height:34px} span{opacity:.6}</style>` +
|
|
71
|
+
theme('light', { bg: '#fff', ink: '#2a2f3a', x: '#e7000b', y: '#1fa35c', z: '#0060cc', line: '#e3e5ea' }) +
|
|
72
|
+
theme('dark', { bg: '#1f2227', ink: '#b9bdc5', x: '#ea6a64', y: '#60bb83', z: '#93b8e8', line: '#2b2f36' }),
|
|
73
|
+
)
|
|
74
|
+
console.log(`${names.length} icons → ${file}`)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
// The published declarations (yarn build): against buerli's own, so that only react-cad's are written.
|
|
3
|
+
"extends": "./tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"noEmit": false,
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"emitDeclarationOnly": true,
|
|
8
|
+
"outDir": "build",
|
|
9
|
+
"rootDir": "./src",
|
|
10
|
+
"paths": {
|
|
11
|
+
"@classcad/sdkjs": ["../core/build/types"],
|
|
12
|
+
"@classcad/client": ["../classcad/build/types"],
|
|
13
|
+
"@classcad/react": ["../react/build/types"]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/typedoc.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://typedoc-plugin-markdown.org/schema.json",
|
|
3
|
+
"extends": [
|
|
4
|
+
"../../typedoc.base.json"
|
|
5
|
+
],
|
|
6
|
+
"name": "@classcad/react-cad",
|
|
7
|
+
"entryPoints": [
|
|
8
|
+
"src/index.ts"
|
|
9
|
+
],
|
|
10
|
+
"tsconfig": "tsconfig.json",
|
|
11
|
+
"out": "doc/api",
|
|
12
|
+
"intentionallyNotDocumented": [
|
|
13
|
+
"Graphics.Outline.__type.width",
|
|
14
|
+
"Graphics.Outline.__type.edgeColor1",
|
|
15
|
+
"Graphics.Outline.__type.edgeColor2",
|
|
16
|
+
"Graphics.Outline.__type.edgeColor3"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import react from '@vitejs/plugin-react'
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
import { defineConfig } from 'vitest/config'
|
|
4
|
+
|
|
5
|
+
// buerli from its sources, the packages next to this one
|
|
6
|
+
const buerli = (pkg: string) => fileURLToPath(new URL(`../${pkg}/src`, import.meta.url))
|
|
7
|
+
|
|
8
|
+
export default defineConfig({
|
|
9
|
+
plugins: [react()],
|
|
10
|
+
resolve: {
|
|
11
|
+
alias: {
|
|
12
|
+
'@classcad/sdkjs': buerli('core'),
|
|
13
|
+
'@classcad/client': buerli('classcad'),
|
|
14
|
+
'@classcad/react': buerli('react'),
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
test: {
|
|
18
|
+
name: 'react-cad',
|
|
19
|
+
environment: 'jsdom',
|
|
20
|
+
globals: true,
|
|
21
|
+
include: ['tests/**/*.test.{ts,tsx}'],
|
|
22
|
+
exclude: ['**/*.ignore.test.*'],
|
|
23
|
+
setupFiles: ['./tests/setup.ts'],
|
|
24
|
+
},
|
|
25
|
+
})
|