@osrd-project/ui-charts 0.0.76 → 0.0.78

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.
@@ -1,4 +1,6 @@
1
- import type { OccupancyZone, Track } from '../types';
1
+ import { type PickingElement } from '../../../spaceTimeChart';
2
+ import type { OccupancyZone, OccupancyZonePickingElement, Track } from '../types';
3
+ export declare function isOccupancyPickingElement(element: PickingElement): element is OccupancyZonePickingElement;
2
4
  declare const OccupancyZonesLayer: ({ tracks, occupancyZones, position, topPadding, selectedTrainId, }: {
3
5
  tracks: Track[];
4
6
  occupancyZones: OccupancyZone[];
@@ -1,24 +1,25 @@
1
1
  import { type TICKS_PATTERN } from './consts';
2
+ import { type PickingElement } from '../../spaceTimeChart';
2
3
  export type Track = {
3
4
  id: string;
4
- name: string;
5
- line: string;
5
+ name?: string;
6
+ line?: string;
6
7
  };
7
8
  export type OccupancyZone = {
8
9
  trainId: string;
9
10
  trackId: string;
10
- arrivalTrainName: string;
11
- departureTrainName: string;
12
- arrivalDirection?: 'up' | 'down';
13
- departureDirection?: 'up' | 'down';
14
- color: string;
11
+ color?: string;
12
+ size?: number;
13
+ trainName: string;
15
14
  originStation?: string;
16
15
  destinationStation?: string;
17
- arrivalTime: number;
18
- departureTime: number;
16
+ startTime: number;
17
+ endTime: number;
18
+ startDirection?: 'up' | 'down';
19
+ endDirection?: 'up' | 'down';
19
20
  };
20
- export type OccupancyZonePickingElement = {
21
+ export type OccupancyZonePickingElement = PickingElement & {
21
22
  type: 'occupancyZone';
22
- trainId: string;
23
+ pathId: string;
23
24
  };
24
25
  export type TickPattern = keyof typeof TICKS_PATTERN;
@@ -1,6 +1,7 @@
1
1
  import './styles/main.css';
2
2
  export * from './components/types';
3
3
  export * from './components/consts';
4
+ export { isOccupancyPickingElement } from './components/layers/OccupancyZonesLayer';
4
5
  export { default as TrackOccupancyCanvas } from './components/TrackOccupancyCanvas';
5
6
  export { default as TrackOccupancyManchette } from './components/TrackOccupancyManchette';
6
7
  export { default as TrackOccupancyStandalone } from './components/TrackOccupancyStandalone';
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@osrd-project/ui-charts",
3
- "version": "0.0.76",
3
+ "version": "0.0.78",
4
4
  "license": "LGPL-3.0-or-later",
5
- "bugs": "https://github.com/osrd-project/osrd/issues",
5
+ "bugs": "https://github.com/OpenRailAssociation/osrd/issues",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/osrd-project/osrd.git",
8
+ "url": "https://github.com/OpenRailAssociation/osrd.git",
9
9
  "directory": "front/ui/ui-charts"
10
10
  },
11
11
  "publishConfig": {
@@ -37,13 +37,13 @@
37
37
  },
38
38
  "peerDependencies": {
39
39
  "classnames": ">=2.5",
40
- "react": ">=18.0",
41
- "react-dom": ">=18.0",
40
+ "react": "^18.0.0 || ^19.1.0",
41
+ "react-dom": "^18.0.0 || ^19.1.0",
42
42
  "tailwindcss": ">=3.4"
43
43
  },
44
44
  "dependencies": {
45
- "@osrd-project/ui-core": "^0.0.76",
46
- "@osrd-project/ui-icons": "^0.0.76",
45
+ "@osrd-project/ui-core": "^0.0.78",
46
+ "@osrd-project/ui-icons": "^0.0.78",
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": "35e01369198a1dda1d09eab9a14d5f70d04e95ec"
59
+ "gitHead": "24db3e20e98b272573d3157a207f2b646b45fd88"
60
60
  }