@processandtools/rp-article-designer 1.0.15 → 1.0.17

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.
Files changed (126) hide show
  1. package/README.md +0 -0
  2. package/dist/components/article_designer/ArticleDesigner.d.ts +2 -10
  3. package/dist/components/article_designer/Designer.d.ts +0 -0
  4. package/dist/components/article_designer/Zone.d.ts +0 -0
  5. package/dist/components/article_designer/zoneElems/Back.d.ts +0 -0
  6. package/dist/components/article_designer/zoneElems/Bottom.d.ts +0 -0
  7. package/dist/components/article_designer/zoneElems/Divider.d.ts +0 -0
  8. package/dist/components/article_designer/zoneElems/Front.d.ts +0 -0
  9. package/dist/components/article_designer/zoneElems/Left.d.ts +0 -0
  10. package/dist/components/article_designer/zoneElems/Right.d.ts +0 -0
  11. package/dist/components/article_designer/zoneElems/Top.d.ts +0 -0
  12. package/dist/components/article_designer/zoneElems/sub_construction/LinearDividerRender.d.ts +0 -0
  13. package/dist/components/article_designer/zoneElems/sub_construction/SubArticleRender.d.ts +0 -0
  14. package/dist/components/dimensions/DimensionLines.d.ts +7 -0
  15. package/dist/components/elements_manager/PD_2D.d.ts +4 -2
  16. package/dist/components/elements_manager/PD_3D.d.ts +0 -0
  17. package/dist/components/ui/Canvas2D.d.ts +2 -7
  18. package/dist/components/ui/Canvas3D.d.ts +2 -5
  19. package/dist/components/ui/CanvasManager.d.ts +2 -4
  20. package/dist/components/ui/DimensionControl.d.ts +0 -0
  21. package/dist/components/ui/LoadingIndicator.d.ts +3 -1
  22. package/dist/components/ui/PerformanceMonitor.d.ts +0 -0
  23. package/dist/components/ui/controls/VarController.d.ts +0 -0
  24. package/dist/components/ui/test/CustomShaderMaterial.d.ts +0 -0
  25. package/dist/components/ui/test/DataFieldsViewer.d.ts +0 -0
  26. package/dist/components/ui/test/ExtrudGeo.d.ts +0 -0
  27. package/dist/components/ui/test/GeneralTester.d.ts +0 -0
  28. package/dist/components/ui/test/MyParser.d.ts +0 -0
  29. package/dist/components/ui/test/PropertiesPanel.d.ts +0 -0
  30. package/dist/components/ui/test/TestDescriptorComparison.d.ts +0 -0
  31. package/dist/components/ui/test/TestDescriptorHooks.d.ts +0 -0
  32. package/dist/components/ui/test/TestDescriptorManager.d.ts +0 -0
  33. package/dist/components/ui/test/TestImageRender.d.ts +0 -0
  34. package/dist/components/ui/test/Test_KMS.d.ts +0 -0
  35. package/dist/components/ui/test/Test_MatSurfFetching.d.ts +0 -0
  36. package/dist/conditions/helpers/ComparisonMap.d.ts +0 -0
  37. package/dist/conditions/helpers/ConditionTreeEvaluator.d.ts +0 -0
  38. package/dist/conditions/helpers/KeyMap.d.ts +0 -0
  39. package/dist/conditions/types/condition.types.d.ts +0 -0
  40. package/dist/config/dimensionConfig.d.ts +28 -0
  41. package/dist/constants/Constants.d.ts +0 -0
  42. package/dist/constants/RalColors.d.ts +0 -0
  43. package/dist/construction_principle/cabin/CabinHelper.d.ts +0 -0
  44. package/dist/construction_principle/cabin/cabin.types.d.ts +0 -0
  45. package/dist/construction_principle/kms/KmsHelper.d.ts +0 -0
  46. package/dist/construction_principle/kms/KmsRenderSelector.d.ts +0 -0
  47. package/dist/construction_principle/kms/kms.types.d.ts +0 -0
  48. package/dist/construction_principle/material/MatHelper.d.ts +0 -0
  49. package/dist/construction_principle/material/material.types.d.ts +0 -0
  50. package/dist/construction_principle/render/RenderHelper.d.ts +0 -0
  51. package/dist/construction_principle/render/render.types.d.ts +0 -0
  52. package/dist/construction_principle/side_panel/CSideHelper.d.ts +0 -0
  53. package/dist/construction_principle/side_panel/cside.types.d.ts +0 -0
  54. package/dist/construction_principle/surface/SurfHelper.d.ts +0 -0
  55. package/dist/construction_principle/surface/surface.types.d.ts +0 -0
  56. package/dist/contexts/article/ArticleContext.d.ts +0 -0
  57. package/dist/contexts/article/ArticleProvider.d.ts +0 -0
  58. package/dist/contexts/article-data/DataContext.d.ts +0 -0
  59. package/dist/contexts/article-data/DataProvider.d.ts +0 -0
  60. package/dist/contexts/descriptor/DescriptorContext.d.ts +0 -0
  61. package/dist/contexts/descriptor/DescriptorProvider.d.ts +0 -0
  62. package/dist/contexts/mat-surf/MatSurfContext.d.ts +0 -0
  63. package/dist/contexts/mat-surf/MatSurfProvider.d.ts +0 -0
  64. package/dist/contexts/texture/TextureConfig.d.ts +0 -0
  65. package/dist/descriptor/Descriptor.d.ts +0 -0
  66. package/dist/descriptor/helper/DescriptorEvaluator.d.ts +0 -0
  67. package/dist/descriptor/helper/descriptor-type-guards.d.ts +0 -0
  68. package/dist/descriptor/services/DescriptorManager.d.ts +0 -0
  69. package/dist/descriptor/types/descriptor-data.types.d.ts +0 -0
  70. package/dist/descriptor/types/descriptor.types.d.ts +0 -0
  71. package/dist/helpers/CheckUrlExists.d.ts +0 -0
  72. package/dist/helpers/CpDispatcher.d.ts +0 -0
  73. package/dist/helpers/ExpressionResolver.d.ts +0 -0
  74. package/dist/helpers/GroupWrapper.d.ts +0 -0
  75. package/dist/helpers/LinDivHelper.d.ts +0 -0
  76. package/dist/helpers/LinDivPatternTransform.d.ts +0 -0
  77. package/dist/helpers/LindivResolver.d.ts +5 -0
  78. package/dist/helpers/MitreCalc.d.ts +0 -0
  79. package/dist/helpers/PositionHelper.d.ts +0 -0
  80. package/dist/helpers/VariableHelper.d.ts +0 -0
  81. package/dist/helpers/WallTransform.d.ts +0 -0
  82. package/dist/helpers/WallTransformGeo.d.ts +0 -0
  83. package/dist/helpers/ZoneCalculations.d.ts +0 -0
  84. package/dist/helpers/angls/UseClieHelper.d.ts +0 -0
  85. package/dist/helpers/angls/UseElemHelper.d.ts +0 -0
  86. package/dist/helpers/angls/UseGrtxHelper.d.ts +0 -0
  87. package/dist/helpers/angls/UsePrimHelper.d.ts +3 -3
  88. package/dist/helpers/angls/UseZoneHelper.d.ts +0 -0
  89. package/dist/hooks/useAPI.d.ts +0 -0
  90. package/dist/hooks/useArticle.d.ts +0 -0
  91. package/dist/hooks/useData.d.ts +0 -0
  92. package/dist/hooks/useDescriptor.d.ts +0 -0
  93. package/dist/hooks/useDescriptorManager.d.ts +0 -0
  94. package/dist/hooks/useMaterialLoader.d.ts +2 -1
  95. package/dist/hooks/useZoneSelection.d.ts +0 -0
  96. package/dist/hooks/zoneDescriptor.d.ts +0 -0
  97. package/dist/index.cjs +1 -1
  98. package/dist/index.d.ts +0 -0
  99. package/dist/index.js +1 -1
  100. package/dist/rp-article-designer.css +0 -0
  101. package/dist/services/ApiFactory.d.ts +0 -0
  102. package/dist/services/GenericApi.d.ts +0 -0
  103. package/dist/types/Elem.types.d.ts +0 -0
  104. package/dist/types/annotation.types.d.ts +6 -0
  105. package/dist/types/canvas.types.d.ts +8 -4
  106. package/dist/types/cp.types.d.ts +0 -0
  107. package/dist/types/data.types.d.ts +0 -0
  108. package/dist/types/divider.types.d.ts +0 -0
  109. package/dist/types/geometry.types.d.ts +0 -0
  110. package/dist/types/helper.types.d.ts +0 -0
  111. package/dist/types/pd.types.d.ts +0 -0
  112. package/dist/types/primitives.types.d.ts +0 -0
  113. package/dist/types/shape.types.d.ts +0 -0
  114. package/dist/types/view.types.d.ts +0 -0
  115. package/dist/types/wall.types.d.ts +0 -0
  116. package/dist/types/zone.types.d.ts +0 -0
  117. package/dist/variables/TestVariable.d.ts +0 -0
  118. package/dist/variables/TestVariableProvider.d.ts +0 -0
  119. package/dist/variables/VariableContext.d.ts +0 -0
  120. package/dist/variables/VariableProvider.d.ts +0 -0
  121. package/dist/variables/VariableResolver.d.ts +0 -0
  122. package/dist/variables/useVariables.d.ts +0 -0
  123. package/dist/variables/variable.types.d.ts +0 -0
  124. package/dist/vite.svg +0 -0
  125. package/package.json +1 -1
  126. package/dist/components/ui/UnifiedCanvas.d.ts +0 -6
package/README.md CHANGED
File without changes
@@ -1,10 +1,2 @@
1
- import { ArticleData } from '../../types/data.types';
2
- import { VIEW } from '../../types/view.types';
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, articleVariables, debugMode, dimensionsOverrides }: CanvasProps): import("react/jsx-runtime").JSX.Element;
File without changes
File without changes
@@ -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, fill, text, stroke_width, rotate, isSelected, isHovered, onClick, onMouseEnter, onMouseLeave, startPanelThk, endPanelThk }: PD2DProps): import("react/jsx-runtime").JSX.Element;
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;
File without changes
@@ -1,7 +1,2 @@
1
- import { VIEW } from '../../types/view.types';
2
- import { ArticleData } from '../../types/data.types';
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, dimensionsOverrides, articleVariables }: CanvasProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,2 @@
1
- import { ArticleData } from '../../types/data.types';
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, articleVariables, dimensionsOverrides, debugMode }: CanvasProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,2 @@
1
- import { VIEW } from '../../types/view.types';
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, articleVariables, dimensionsOverrides }: CanvasProps): import("react/jsx-runtime").JSX.Element;
File without changes
@@ -1,11 +1,13 @@
1
+ import { VIEW } from '../../types/view.types';
1
2
  interface LoadingIndicatorProps {
2
3
  message?: string;
4
+ view: VIEW;
3
5
  insideCanvas?: boolean;
4
6
  }
5
7
  /**
6
8
  * Loading indicator that can be used inside or outside Canvas
7
9
  */
8
- export declare function LoadingIndicator({ message, insideCanvas }: LoadingIndicatorProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function LoadingIndicator({ view }: LoadingIndicatorProps): import("react/jsx-runtime").JSX.Element;
9
11
  /**
10
12
  * Error display component
11
13
  */
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -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;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -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
  /**
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -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
  };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -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;
File without changes
File without changes