@osrd-project/ui-charts 0.0.68 → 0.0.69

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 (50) hide show
  1. package/dist/index.esm.js +1 -1
  2. package/dist/index.esm.js.map +1 -1
  3. package/dist/spaceTimeChart/components/Quadrilateral.d.ts +19 -0
  4. package/dist/spaceTimeChart/components/Tooltip.d.ts +7 -0
  5. package/dist/spaceTimeChart/index.d.ts +2 -0
  6. package/dist/spaceTimeChart/stories/quadrilateral.stories.d.ts +28 -0
  7. package/dist/spaceTimeChart/stories/tooltip.stories.d.ts +9 -0
  8. package/dist/speedSpaceChart/components/SpeedSpaceChart.d.ts +1 -1
  9. package/dist/speedSpaceChart/components/common/DetailsBox.d.ts +1 -1
  10. package/dist/speedSpaceChart/components/common/InteractionButtons.d.ts +1 -1
  11. package/dist/speedSpaceChart/components/common/SettingsPanel.d.ts +1 -1
  12. package/dist/speedSpaceChart/components/const.d.ts +1 -1
  13. package/dist/speedSpaceChart/components/helpers/drawElements/axisY.d.ts +1 -1
  14. package/dist/speedSpaceChart/components/helpers/drawElements/curve.d.ts +1 -1
  15. package/dist/speedSpaceChart/components/helpers/drawElements/declivity.d.ts +1 -1
  16. package/dist/speedSpaceChart/components/helpers/drawElements/electricalProfile.d.ts +1 -1
  17. package/dist/speedSpaceChart/components/helpers/drawElements/powerRestrictions.d.ts +1 -1
  18. package/dist/speedSpaceChart/components/helpers/drawElements/reticle.d.ts +1 -1
  19. package/dist/speedSpaceChart/components/helpers/drawElements/speedLimitTags.d.ts +1 -1
  20. package/dist/speedSpaceChart/components/helpers/drawElements/speedLimits.d.ts +1 -1
  21. package/dist/speedSpaceChart/components/helpers/drawElements/steps.d.ts +1 -1
  22. package/dist/speedSpaceChart/components/helpers/drawElements/tickX.d.ts +1 -1
  23. package/dist/speedSpaceChart/components/helpers/drawElements/tickYRight.d.ts +1 -1
  24. package/dist/speedSpaceChart/components/helpers/frontFrame.d.ts +1 -1
  25. package/dist/speedSpaceChart/components/helpers/layersManager.d.ts +1 -1
  26. package/dist/speedSpaceChart/components/hooks.d.ts +1 -1
  27. package/dist/speedSpaceChart/components/layers/CurveLayer.d.ts +1 -1
  28. package/dist/speedSpaceChart/components/layers/DeclivityLayer.d.ts +1 -1
  29. package/dist/speedSpaceChart/components/layers/ElectricalProfileLayer.d.ts +1 -1
  30. package/dist/speedSpaceChart/components/layers/FrontInteractivityLayer.d.ts +1 -1
  31. package/dist/speedSpaceChart/components/layers/PowerRestrictionsLayer.d.ts +1 -1
  32. package/dist/speedSpaceChart/components/layers/ReticleLayer.d.ts +1 -1
  33. package/dist/speedSpaceChart/components/layers/SpeedLimitTagsLayer.d.ts +1 -1
  34. package/dist/speedSpaceChart/components/layers/SpeedLimitsLayer.d.ts +1 -1
  35. package/dist/speedSpaceChart/components/layers/StepsLayer.d.ts +1 -1
  36. package/dist/speedSpaceChart/components/layers/TickLayerX.d.ts +1 -1
  37. package/dist/speedSpaceChart/components/layers/TickLayerY.d.ts +1 -1
  38. package/dist/speedSpaceChart/components/layers/TickLayerYRight.d.ts +1 -1
  39. package/dist/speedSpaceChart/components/utils.d.ts +19 -2
  40. package/dist/speedSpaceChart/index.d.ts +2 -1
  41. package/dist/speedSpaceChart/{types/chartTypes.d.ts → types.d.ts} +8 -7
  42. package/package.json +4 -4
  43. package/dist/speedSpaceChart/stories/SpeedSpaceChart.stories.d.ts +0 -8
  44. package/dist/speedSpaceChart/stories/assets/const.d.ts +0 -70
  45. package/dist/speedSpaceChart/stories/assets/path_properties_PMP_LM.d.ts +0 -2
  46. package/dist/speedSpaceChart/stories/assets/power_restrictions_PMP_LM.d.ts +0 -7
  47. package/dist/speedSpaceChart/stories/assets/simulation_PMP_LM.d.ts +0 -2
  48. package/dist/speedSpaceChart/stories/assets/speed_limit_tags_PMP_LM.d.ts +0 -9
  49. package/dist/speedSpaceChart/stories/utils.d.ts +0 -5
  50. package/dist/speedSpaceChart/types/simulationTypes.d.ts +0 -47
@@ -0,0 +1,19 @@
1
+ import { type DataPoint } from '../lib/types';
2
+ export type QuadrilateralProps = {
3
+ vertices: [DataPoint, DataPoint, DataPoint, DataPoint];
4
+ style: {
5
+ backgroundColor: string;
6
+ borderColor: string;
7
+ borderWidth: number;
8
+ };
9
+ };
10
+ /**
11
+ * Draws a quadrilateral in the space time chart
12
+ * Position correspond to each point of the quadrilateral
13
+ *
14
+ * vertices[0] ________ vertices[1]
15
+ * / /
16
+ * vertices[3] /________/ vertices[2]
17
+ *
18
+ */
19
+ export declare const Quadrilateral: ({ vertices, style }: QuadrilateralProps) => null;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { Point } from '../lib/types';
3
+ export type TooltipProps = {
4
+ position: Point;
5
+ children: React.ReactNode;
6
+ };
7
+ export declare const Tooltip: ({ position, children }: TooltipProps) => React.JSX.Element;
@@ -4,6 +4,8 @@ export * from './components/SpaceTimeChart';
4
4
  export * from './components/PathLayer';
5
5
  export * from './components/ConflictLayer';
6
6
  export * from './components/ConflictTooltip';
7
+ export * from './components/Tooltip';
7
8
  export * from './components/OccupancyBlockLayer';
8
9
  export * from './components/WorkScheduleLayer';
9
10
  export * from './components/PatternRect';
11
+ export * from './components/Quadrilateral';
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import type { Meta } from '@storybook/react';
3
+ import '@osrd-project/ui-charts/dist/theme.css';
4
+ type WrapperProps = {
5
+ xZoomLevel: number;
6
+ yZoomLevel: number;
7
+ xOffset: number;
8
+ yOffset: number;
9
+ spaceScaleType: 'linear' | 'proportional';
10
+ emptyData: boolean;
11
+ };
12
+ /**
13
+ * This story aims at showcasing how to render a SpaceTimeChart.
14
+ */
15
+ declare const Wrapper: ({ xZoomLevel, yZoomLevel, xOffset, yOffset, spaceScaleType, emptyData, }: WrapperProps) => React.JSX.Element;
16
+ declare const _default: Meta<typeof Wrapper>;
17
+ export default _default;
18
+ export declare const DefaultArgs: {
19
+ name: string;
20
+ args: {
21
+ xZoomLevel: number;
22
+ yZoomLevel: number;
23
+ xOffset: number;
24
+ yOffset: number;
25
+ spaceScaleType: string;
26
+ emptyData: boolean;
27
+ };
28
+ };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { StoryObj } from '@storybook/react';
3
+ import '@osrd-project/ui-charts/dist/theme.css';
4
+ declare const meta: {
5
+ title: string;
6
+ component: () => React.JSX.Element;
7
+ };
8
+ export default meta;
9
+ export declare const Default: StoryObj<typeof meta>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Data } from '../types/chartTypes';
2
+ import type { Data } from '../types';
3
3
  export type SpeedSpaceChartProps = {
4
4
  width: number;
5
5
  height: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type DetailsBoxProps = {
4
4
  width: number;
5
5
  height: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type InteractionButtonsProps = {
4
4
  reset: () => void;
5
5
  openSettingsPanel: () => void;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  import type { SpeedSpaceChartProps } from '../SpeedSpaceChart';
4
4
  type SettingsPanelProps = {
5
5
  globalHeight: number;
@@ -1,5 +1,5 @@
1
1
  import chroma from 'chroma-js';
2
- import { type ColorDictionary, type Store } from '../types/chartTypes';
2
+ import { type ColorDictionary, type Store } from '../types';
3
3
  export declare const SLOPE_FILL_COLOR = "#CFDDCE";
4
4
  export declare const RIGHT_TICK_HEIGHT_OFFSET = 2;
5
5
  export declare const TICK_TITLE_MARGINS: {
@@ -1,2 +1,2 @@
1
- import type { DrawFunctionParams } from '../../../types/chartTypes';
1
+ import type { DrawFunctionParams } from '../../../types';
2
2
  export declare const drawAxisY: ({ ctx, width, height, store }: DrawFunctionParams) => void;
@@ -1,2 +1,2 @@
1
- import type { DrawFunctionParams } from '../../../types/chartTypes';
1
+ import type { DrawFunctionParams } from '../../../types';
2
2
  export declare const drawCurve: ({ ctx, width, height, store }: DrawFunctionParams) => void;
@@ -1,2 +1,2 @@
1
- import type { DrawFunctionParams } from '../../../types/chartTypes';
1
+ import type { DrawFunctionParams } from '../../../types';
2
2
  export declare const drawDeclivity: ({ ctx, width, height, store }: DrawFunctionParams) => void;
@@ -1,2 +1,2 @@
1
- import type { DrawFunctionParams } from '../../../types/chartTypes';
1
+ import type { DrawFunctionParams } from '../../../types';
2
2
  export declare const drawElectricalProfile: ({ ctx, width, height, store }: DrawFunctionParams) => void;
@@ -1,2 +1,2 @@
1
- import type { DrawFunctionParams } from '../../../types/chartTypes';
1
+ import type { DrawFunctionParams } from '../../../types';
2
2
  export declare const drawPowerRestrictions: ({ ctx, width, height: marginTop, store, }: DrawFunctionParams) => void;
@@ -1,4 +1,4 @@
1
- import type { DrawFunctionParams } from '../../../types/chartTypes';
1
+ import type { DrawFunctionParams } from '../../../types';
2
2
  export declare const drawCursor: ({ ctx, width, height, store }: DrawFunctionParams) => {
3
3
  curveX: number;
4
4
  curveY: number;
@@ -1,3 +1,3 @@
1
- import type { DrawFunctionParams, SpeedLimitTagsLayerDrawFunctionParams, tooltipInfos } from '../../../types/chartTypes';
1
+ import type { DrawFunctionParams, SpeedLimitTagsLayerDrawFunctionParams, tooltipInfos } from '../../../types';
2
2
  export declare const drawSpeedLimitTags: ({ ctx, width, height: marginTop, store, images, }: SpeedLimitTagsLayerDrawFunctionParams) => void;
3
3
  export declare const computeTooltip: ({ width, height: marginTop, store, }: DrawFunctionParams) => tooltipInfos | null;
@@ -1,2 +1,2 @@
1
- import type { DrawFunctionParams } from '../../../types/chartTypes';
1
+ import type { DrawFunctionParams } from '../../../types';
2
2
  export declare const drawSpeedLimits: ({ ctx, width, height, store }: DrawFunctionParams) => void;
@@ -1,2 +1,2 @@
1
- import type { DrawFunctionParams } from '../../../types/chartTypes';
1
+ import type { DrawFunctionParams } from '../../../types';
2
2
  export declare const drawSteps: ({ ctx, width, height, store }: DrawFunctionParams) => void;
@@ -1,2 +1,2 @@
1
- import type { DrawFunctionParams } from '../../../types/chartTypes';
1
+ import type { DrawFunctionParams } from '../../../types';
2
2
  export declare const drawTickX: ({ ctx, width, height, store }: DrawFunctionParams) => void;
@@ -1,2 +1,2 @@
1
- import type { DrawFunctionParams } from '../../../types/chartTypes';
1
+ import type { DrawFunctionParams } from '../../../types';
2
2
  export declare const drawTickYRight: ({ ctx, width, height, store }: DrawFunctionParams) => void;
@@ -1,2 +1,2 @@
1
- import type { DrawFunctionParams } from '../../types/chartTypes';
1
+ import type { DrawFunctionParams } from '../../types';
2
2
  export declare const drawFrame: ({ ctx, width, height, store, setStore }: DrawFunctionParams) => void;
@@ -1,4 +1,4 @@
1
1
  import * as d3zoom from 'd3-zoom';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  export declare const resetZoom: () => void;
4
4
  export declare const zoom: (setStore: React.Dispatch<React.SetStateAction<Store>>) => d3zoom.ZoomBehavior<Element, unknown>;
@@ -1,4 +1,4 @@
1
- import type { DrawFunctionParams, Store } from '../types/chartTypes';
1
+ import type { DrawFunctionParams, Store } from '../types';
2
2
  type DrawFunction = (params: DrawFunctionParams) => void;
3
3
  type UseCanvasParams = {
4
4
  width: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type CurveLayerProps = {
4
4
  width: number;
5
5
  height: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type DeclivityLayerProps = {
4
4
  width: number;
5
5
  height: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type ElectricalProfileLayerProps = {
4
4
  width: number;
5
5
  height: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type FrontInteractivityLayerProps = {
4
4
  width: number;
5
5
  height: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type PowerRestrictionsLayerProps = {
4
4
  width: number;
5
5
  marginTop: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type ReticleLayerProps = {
4
4
  width: number;
5
5
  height: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type SpeedLimitTagsLayerProps = {
4
4
  width: number;
5
5
  marginTop: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type SpeedLimitsLayerProps = {
4
4
  width: number;
5
5
  height: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type StepsLayerProps = {
4
4
  width: number;
5
5
  height: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type TickLayerXProps = {
4
4
  width: number;
5
5
  height: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type TickLayerYProps = {
4
4
  width: number;
5
5
  height: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Store } from '../../types/chartTypes';
2
+ import type { Store } from '../../types';
3
3
  type TickLayerYRightProps = {
4
4
  width: number;
5
5
  height: number;
@@ -1,5 +1,5 @@
1
1
  import { MARGINS, type LAYERS_SELECTION } from './const';
2
- import type { LayerData, OperationalPoints, Store } from '../types/chartTypes';
2
+ import type { LayerData, OperationalPoints, Store } from '../types';
3
3
  type SlopesValues = {
4
4
  minGradient: number;
5
5
  maxGradient: number;
@@ -74,7 +74,24 @@ export declare const drawLinearLayerBackground: (ctx: CanvasRenderingContext2D,
74
74
  * Return wether a layer should be active or not.
75
75
  * Depending on the available data, some layers should be disabled.
76
76
  */
77
- export declare const isLayerActive: (store: Store, selection: (typeof LAYERS_SELECTION)[number]) => true | import("../types/chartTypes").ValuesAlongPath<import("../types/chartTypes").SpeedLimit> | LayerData<import("../types/chartTypes").ElectricalPofilelValues>[] | LayerData<import("../types/chartTypes").PowerRestrictionValues>[] | LayerData<import("../types/chartTypes").SpeedLimitTagValues>[] | undefined;
77
+ export declare const isLayerActive: (store: Store, selection: (typeof LAYERS_SELECTION)[number]) => true | {
78
+ boundaries: number[];
79
+ values: {
80
+ speed: number;
81
+ isTemporary: boolean;
82
+ }[];
83
+ } | LayerData<{
84
+ electricalProfile: string;
85
+ color?: string;
86
+ heightLevel?: number;
87
+ handled?: boolean;
88
+ }>[] | LayerData<{
89
+ powerRestriction: string;
90
+ handled: boolean;
91
+ }>[] | LayerData<{
92
+ tag: string;
93
+ color: string;
94
+ }>[] | undefined;
78
95
  /**
79
96
  * Given a store including a list of slopes, return the position and value of min and max slopes
80
97
  * @param store
@@ -1,3 +1,4 @@
1
1
  import '@osrd-project/ui-core/dist/theme.css';
2
2
  import './styles/main.css';
3
- export { default as SpeedSpaceChart } from './components/SpeedSpaceChart';
3
+ export { default as SpeedSpaceChart, type SpeedSpaceChartProps, } from './components/SpeedSpaceChart';
4
+ export type { Data as SpeedSpaceChartData } from './types';
@@ -1,18 +1,18 @@
1
- export type ElectricalPofilelValues = {
1
+ type ElectricalProfileValues = {
2
2
  electricalProfile: string;
3
3
  color?: string;
4
4
  heightLevel?: number;
5
5
  handled?: boolean;
6
6
  };
7
- export type PowerRestrictionValues = {
7
+ type PowerRestrictionValues = {
8
8
  powerRestriction: string;
9
9
  handled: boolean;
10
10
  };
11
- export type SpeedLimitTagValues = {
11
+ type SpeedLimitTagValues = {
12
12
  tag: string;
13
13
  color: string;
14
14
  };
15
- export type ElectrificationValues = {
15
+ type ElectrificationValues = {
16
16
  type: 'electrification' | 'neutral_section' | 'non_electrified';
17
17
  voltage?: '1500V' | '25000V';
18
18
  lowerPantograph?: boolean;
@@ -28,11 +28,11 @@ export type OperationalPoints = {
28
28
  name: string;
29
29
  weight?: number;
30
30
  };
31
- export type ValuesAlongPath<T> = {
31
+ type ValuesAlongPath<T> = {
32
32
  boundaries: number[];
33
33
  values: T[];
34
34
  };
35
- export type SpeedLimit = {
35
+ type SpeedLimit = {
36
36
  speed: number;
37
37
  isTemporary: boolean;
38
38
  };
@@ -43,7 +43,7 @@ export type Data = {
43
43
  electrifications: LayerData<ElectrificationValues>[];
44
44
  slopes: LayerData<number>[];
45
45
  mrsp?: ValuesAlongPath<SpeedLimit>;
46
- electricalProfiles?: LayerData<ElectricalPofilelValues>[];
46
+ electricalProfiles?: LayerData<ElectricalProfileValues>[];
47
47
  powerRestrictions?: LayerData<PowerRestrictionValues>[];
48
48
  speedLimitTags?: LayerData<SpeedLimitTagValues>[];
49
49
  trainLength: number;
@@ -112,3 +112,4 @@ export type tooltipInfos = {
112
112
  export type ColorDictionary = {
113
113
  [key: string]: string;
114
114
  };
115
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osrd-project/ui-charts",
3
- "version": "0.0.68",
3
+ "version": "0.0.69",
4
4
  "license": "LGPL-3.0-or-later",
5
5
  "bugs": "https://github.com/osrd-project/osrd-ui/issues",
6
6
  "repository": {
@@ -42,8 +42,8 @@
42
42
  "tailwindcss": ">=3.4"
43
43
  },
44
44
  "dependencies": {
45
- "@osrd-project/ui-core": "^0.0.68",
46
- "@osrd-project/ui-icons": "^0.0.68",
45
+ "@osrd-project/ui-core": "^0.0.69",
46
+ "@osrd-project/ui-icons": "^0.0.69",
47
47
  "chroma-js": "^3.1.1",
48
48
  "d3-selection": "^3.0.0",
49
49
  "d3-zoom": "^3.0.0",
@@ -56,5 +56,5 @@
56
56
  "@types/file-saver": "^2.0.7",
57
57
  "file-saver": "^2.0.5"
58
58
  },
59
- "gitHead": "103772f804d13da248ad6dcfd73d81f1cfc02aa9"
59
+ "gitHead": "0a6ed7aa8f92825e774a95b404e2e95e7b8a794c"
60
60
  }
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import '@osrd-project/ui-core/dist/theme.css';
3
- import '@osrd-project/ui-charts/dist/theme.css';
4
- import SpeedSpaceChart from '../components/SpeedSpaceChart';
5
- declare const meta: Meta<typeof SpeedSpaceChart>;
6
- export default meta;
7
- type Story = StoryObj<typeof SpeedSpaceChart>;
8
- export declare const SpeedSpaceChartDefault: Story;
@@ -1,70 +0,0 @@
1
- export declare const translations: {
2
- detailsBoxDisplay: {
3
- reticleInfos: string;
4
- energySource: string;
5
- tractionStatus: string;
6
- declivities: string;
7
- electricalProfiles: string;
8
- powerRestrictions: string;
9
- };
10
- layersDisplay: {
11
- context: string;
12
- steps: string;
13
- declivities: string;
14
- speedLimits: string;
15
- temporarySpeedLimits: string;
16
- electricalProfiles: string;
17
- powerRestrictions: string;
18
- speedLimitTags: string;
19
- };
20
- };
21
- export declare const electricalProfilesDesignValues: {
22
- BB01: {
23
- color: string;
24
- heightLevel: number;
25
- };
26
- BB02: {
27
- color: string;
28
- heightLevel: number;
29
- };
30
- BB03: {
31
- color: string;
32
- heightLevel: number;
33
- };
34
- AA01: {
35
- color: string;
36
- heightLevel: number;
37
- };
38
- AA02: {
39
- color: string;
40
- heightLevel: number;
41
- };
42
- AA03: {
43
- color: string;
44
- heightLevel: number;
45
- };
46
- AA04: {
47
- color: string;
48
- heightLevel: number;
49
- };
50
- AA05: {
51
- color: string;
52
- heightLevel: number;
53
- };
54
- AA06: {
55
- color: string;
56
- heightLevel: number;
57
- };
58
- AA07: {
59
- color: string;
60
- heightLevel: number;
61
- };
62
- AA08: {
63
- color: string;
64
- heightLevel: number;
65
- };
66
- AA09: {
67
- color: string;
68
- heightLevel: number;
69
- };
70
- };
@@ -1,2 +0,0 @@
1
- import type { PathProperties } from '../../types/simulationTypes';
2
- export declare const pathPropertiesPmpLm: PathProperties;
@@ -1,7 +0,0 @@
1
- export type PowerRestriction = {
2
- code: string;
3
- handled: boolean;
4
- start: number;
5
- stop: number;
6
- };
7
- export declare const powerRestrictionsPmpLm: PowerRestriction[];
@@ -1,2 +0,0 @@
1
- import type { Simulation } from '../../types/simulationTypes';
2
- export declare const simulationPmpLm: Simulation;
@@ -1,9 +0,0 @@
1
- export type SpeedLimitTags = {
2
- boundaries: number[];
3
- values: {
4
- speed_limit_tags_type: string;
5
- tag_name: string;
6
- color: string;
7
- }[];
8
- };
9
- export declare const speedLimitTags: SpeedLimitTags;
@@ -1,5 +0,0 @@
1
- import type { PowerRestriction } from './assets/power_restrictions_PMP_LM';
2
- import type { SpeedLimitTags } from './assets/speed_limit_tags_PMP_LM';
3
- import type { Data } from '../types/chartTypes';
4
- import type { PathProperties, Simulation } from '../types/simulationTypes';
5
- export declare const formatData: (simulation: Simulation, pathProperties: PathProperties, powerRestrictionsData: PowerRestriction[], speedLimitTagsData: SpeedLimitTags) => Data;
@@ -1,47 +0,0 @@
1
- import { type electricalProfilesDesignValues } from '../stories/assets/const';
2
- export type Simulation = {
3
- base: {
4
- positions: number[];
5
- speeds: number[];
6
- };
7
- final_output: {
8
- positions: number[];
9
- speeds: number[];
10
- };
11
- electrical_profiles: {
12
- boundaries: number[];
13
- values: {
14
- electrical_profile_type: 'profile' | 'no_profile';
15
- profile?: keyof typeof electricalProfilesDesignValues | null;
16
- handled?: boolean;
17
- }[];
18
- };
19
- mrsp: {
20
- boundaries: number[];
21
- values: number[];
22
- };
23
- };
24
- export type PathProperties = {
25
- slopes: {
26
- boundaries: number[];
27
- values: number[];
28
- };
29
- electrifications: {
30
- boundaries: number[];
31
- values: {
32
- type: 'electrification' | 'neutral_section';
33
- voltage?: '1500V' | '25000V';
34
- lower_pantograph?: boolean;
35
- }[];
36
- };
37
- operational_points: {
38
- extensions: {
39
- ch: string;
40
- identifier: {
41
- name: string;
42
- };
43
- weight?: number;
44
- };
45
- position: number;
46
- }[];
47
- };