@processandtools/rp-article-designer 1.0.16 → 1.0.18
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/dist/components/article_designer/ArticleDesigner.d.ts +2 -10
- package/dist/components/dimensions/DimensionLines.d.ts +7 -0
- package/dist/components/elements_manager/PD_2D.d.ts +4 -2
- package/dist/components/ui/Canvas2D.d.ts +2 -7
- package/dist/components/ui/Canvas3D.d.ts +2 -5
- package/dist/components/ui/CanvasManager.d.ts +2 -4
- package/dist/components/ui/LoadingIndicator.d.ts +1 -1
- package/dist/config/dimensionConfig.d.ts +28 -0
- package/dist/helpers/LindivResolver.d.ts +5 -0
- package/dist/helpers/angls/UsePrimHelper.d.ts +3 -3
- package/dist/hooks/useMaterialLoader.d.ts +2 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/annotation.types.d.ts +6 -0
- package/dist/types/canvas.types.d.ts +10 -4
- package/package.json +1 -1
- package/dist/components/ui/UnifiedCanvas.d.ts +0 -6
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface ADProps {
|
|
4
|
-
view: VIEW;
|
|
5
|
-
data?: ArticleData;
|
|
6
|
-
articleName: string;
|
|
7
|
-
articleVariables?: Record<string, string | number>;
|
|
8
|
-
debugMode?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export default function ArticleDesigner({ view, data, articleName, articleVariables, debugMode }: ADProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { CanvasProps } from '../../types/canvas.types';
|
|
2
|
+
export default function ArticleDesigner({ view, data, articleName, articleValues, debugMode }: CanvasProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DimensionRule } from '../../config/dimensionConfig';
|
|
2
|
+
export interface DimensionLinesProps {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
rules: DimensionRule;
|
|
6
|
+
}
|
|
7
|
+
export default function DimensionLines({ width, height, rules }: DimensionLinesProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { ElemHelperType } from '../../types/helper.types';
|
|
1
2
|
export interface PD2DProps {
|
|
2
3
|
treeId?: string;
|
|
3
4
|
dim_x: number;
|
|
4
5
|
dim_y: number;
|
|
5
|
-
fill?: string;
|
|
6
6
|
text?: string;
|
|
7
7
|
stroke_width?: number;
|
|
8
8
|
rotate?: number;
|
|
@@ -13,5 +13,7 @@ export interface PD2DProps {
|
|
|
13
13
|
onMouseLeave?: () => void;
|
|
14
14
|
startPanelThk?: number;
|
|
15
15
|
endPanelThk?: number;
|
|
16
|
+
cp?: ElemHelperType;
|
|
17
|
+
render_mat?: string;
|
|
16
18
|
}
|
|
17
|
-
export default function PD_2D({ dim_x, dim_y,
|
|
19
|
+
export default function PD_2D({ dim_x, dim_y, text, stroke_width, rotate, isSelected, isHovered, onClick, onMouseEnter, onMouseLeave, startPanelThk, endPanelThk, cp, render_mat, }: PD2DProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export default function Canvas2D({ view, data, articleName }: {
|
|
4
|
-
view: VIEW._2D_FRONT | VIEW._2D_TOP;
|
|
5
|
-
data?: ArticleData;
|
|
6
|
-
articleName: string;
|
|
7
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { CanvasProps } from '../../types/canvas.types';
|
|
2
|
+
export default function Canvas2D({ view, data, articleName, articleValues }: CanvasProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function Canvas3D({ data, articleName }:
|
|
3
|
-
data?: ArticleData;
|
|
4
|
-
articleName: string;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { CanvasProps } from '../../types/canvas.types';
|
|
2
|
+
export default function Canvas3D({ data, articleName, articleValues, debugMode }: CanvasProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function CanvasManager({ view }:
|
|
3
|
-
view: VIEW;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { CanvasProps } from '../../types/canvas.types';
|
|
2
|
+
export default function CanvasManager({ data, articleName, view, articleValues }: CanvasProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,7 +7,7 @@ interface LoadingIndicatorProps {
|
|
|
7
7
|
/**
|
|
8
8
|
* Loading indicator that can be used inside or outside Canvas
|
|
9
9
|
*/
|
|
10
|
-
export declare function LoadingIndicator({
|
|
10
|
+
export declare function LoadingIndicator({ view }: LoadingIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
/**
|
|
12
12
|
* Error display component
|
|
13
13
|
*/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface DimensionLineStyle {
|
|
2
|
+
color?: string;
|
|
3
|
+
strokeWidth?: number;
|
|
4
|
+
arrowSize?: number;
|
|
5
|
+
fontSize?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface DimensionPosition {
|
|
8
|
+
horizontal?: 'top' | 'bottom' | 'both' | 'none';
|
|
9
|
+
vertical?: 'left' | 'right' | 'both' | 'none';
|
|
10
|
+
}
|
|
11
|
+
export interface DimensionRule {
|
|
12
|
+
cpNames: string[];
|
|
13
|
+
showHorizontal?: boolean;
|
|
14
|
+
showVertical?: boolean;
|
|
15
|
+
position?: DimensionPosition;
|
|
16
|
+
offset?: number;
|
|
17
|
+
lineStyle?: DimensionLineStyle;
|
|
18
|
+
showLabel?: boolean;
|
|
19
|
+
labelSuffix?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const dimensionRules: DimensionRule[];
|
|
22
|
+
export declare function getDimensionRules(cpName: string): DimensionRule | null;
|
|
23
|
+
/**
|
|
24
|
+
* Check if dimensions should be shown for a CPNAME
|
|
25
|
+
* @param cpName - The construction principle name
|
|
26
|
+
* @returns boolean
|
|
27
|
+
*/
|
|
28
|
+
export declare function shouldShowDimensions(cpName: string): boolean;
|
|
@@ -16,6 +16,7 @@ export interface LindivResult {
|
|
|
16
16
|
* - Expressions: "(round(4000/1200 -0.5)*1200)mm:1" → "3600mm:1"
|
|
17
17
|
* - Reverse format: "1:((round(2700/150))*150)mm" → "1:1800mm"
|
|
18
18
|
* - With braces: "(round(X/150))*{1}" → "24*{1}"
|
|
19
|
+
* - With n* markers: "expr1 mm:n*expr2 mm:1" → "3600mm:n*3598mm:1"
|
|
19
20
|
* - With variables: Assumes variables are already resolved
|
|
20
21
|
*
|
|
21
22
|
* @example
|
|
@@ -29,6 +30,10 @@ export interface LindivResult {
|
|
|
29
30
|
* @example
|
|
30
31
|
* resolveLindiv("#RP_LD_P_T100")
|
|
31
32
|
* // → "RP_LD_P_T100" (removes #)
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* resolveLindiv("expr1 mm:n*expr2 mm:1", variableTree)
|
|
36
|
+
* // → "3600mm:n*3598mm:1"
|
|
32
37
|
*/
|
|
33
38
|
export declare function resolveLindiv(lindiv: string, variableTree?: VariableTree): LindivResult;
|
|
34
39
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export default function usePrimHelper(): {
|
|
2
2
|
current_prim: import('../../types/data.types.js').AnglPrim;
|
|
3
3
|
prim_dims: {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
depth: number;
|
|
4
|
+
width: string | number | undefined;
|
|
5
|
+
height: string | number | undefined;
|
|
6
|
+
depth: string | number | undefined;
|
|
7
7
|
};
|
|
8
8
|
};
|
|
@@ -2,7 +2,8 @@ import { Texture } from 'three';
|
|
|
2
2
|
export interface MaterialLoaderResult {
|
|
3
3
|
texture: Texture | null;
|
|
4
4
|
color: string | null;
|
|
5
|
-
type: 'ral-color' | 'texture' | 'fallback';
|
|
5
|
+
type: 'ral-color' | 'texture' | 'fallback' | 'glass';
|
|
6
6
|
isLoading: boolean;
|
|
7
|
+
opacity?: number;
|
|
7
8
|
}
|
|
8
9
|
export declare function useMaterialLoader(renderValue?: string): MaterialLoaderResult;
|