@trackunit/react-map 0.2.134 → 0.2.136

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/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@trackunit/react-map",
3
- "version": "0.2.134",
3
+ "version": "0.2.136",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
7
7
  "node": ">=24.x"
8
8
  },
9
9
  "dependencies": {
10
- "@trackunit/react-components": "2.13.7",
11
- "@trackunit/css-class-variance-utilities": "2.0.5",
12
- "@trackunit/react-form-components": "2.6.55",
13
- "@trackunit/react-core-hooks": "1.21.48",
14
- "@trackunit/geo-json-utils": "1.15.37",
15
- "@trackunit/i18n-library-translation": "2.4.48",
10
+ "@trackunit/react-components": "2.13.9",
11
+ "@trackunit/css-class-variance-utilities": "2.0.6",
12
+ "@trackunit/react-form-components": "2.6.57",
13
+ "@trackunit/react-core-hooks": "1.21.50",
14
+ "@trackunit/geo-json-utils": "1.15.38",
15
+ "@trackunit/i18n-library-translation": "2.4.50",
16
16
  "react-minimal-pie-chart": "^8.4.0",
17
- "@trackunit/react-map-adapter-shared": "0.0.118",
18
- "@trackunit/react-map-color-utils": "0.0.98",
19
- "@trackunit/ui-design-tokens": "1.15.24",
17
+ "@trackunit/react-map-adapter-shared": "0.0.119",
18
+ "@trackunit/react-map-color-utils": "0.0.99",
19
+ "@trackunit/ui-design-tokens": "1.15.25",
20
20
  "@floating-ui/react": "^0.26.25",
21
21
  "es-toolkit": "^1.39.10",
22
22
  "tailwind-merge": "^2.0.0",
@@ -0,0 +1,50 @@
1
+ import type { GeoJsonBbox } from "../../../core/types";
2
+ import type { GeoJsonFeatureCollection } from "../../types";
3
+ /** Distinct, print-safe fills; index with `i % FILL_PALETTE.length`. */
4
+ export declare const FILL_PALETTE: ReadonlyArray<string>;
5
+ export declare const SHOWCASE_BOUNDS: GeoJsonBbox;
6
+ export declare const SHOWCASE_COLORS: Readonly<Record<string, string>>;
7
+ /**
8
+ * Three mutually overlapping zones with a small zone nested inside the first, and
9
+ * a fifth zone that only overlaps the second. The same scene is used tiled and
10
+ * compounding so the two renderings can be compared like for like.
11
+ */
12
+ export declare const SHOWCASE_FEATURES: GeoJsonFeatureCollection;
13
+ export declare const DENSE_BOUNDS: GeoJsonBbox;
14
+ export type DenseGeofenceOptions = Readonly<{
15
+ /** PRNG seed; the same seed always yields the same scene. */
16
+ seed?: number;
17
+ /** Add three region-sized polygons that each overlap dozens of sites. */
18
+ regionalPolygons?: boolean;
19
+ }>;
20
+ /**
21
+ * `count` seeded geofences — half circles, half axis-aligned rectangles — spread
22
+ * over a Jutland-sized area so that a realistic share of them overlap. Every
23
+ * feature carries `properties.color` so `resolveStyle` needs no lookup table.
24
+ */
25
+ export declare const denseGeofences: (count: number, options?: DenseGeofenceOptions) => GeoJsonFeatureCollection;
26
+ export type DegenerateCase = Readonly<{
27
+ id: string;
28
+ title: string;
29
+ /** Feature ids that make up the case, in the order they are described. */
30
+ featureIds: ReadonlyArray<string>;
31
+ /** Whether the case's features should end up in one overlap group. */
32
+ expectOverlap: boolean;
33
+ /** What the reader should see on the map and in the readout. */
34
+ expectation: string;
35
+ }>;
36
+ export declare const DEGENERATE_CASES: ReadonlyArray<DegenerateCase>;
37
+ /** Hosts and larger shapes are blue, tenants and smaller shapes orange, the invalid ring red. */
38
+ export declare const DEGENERATE_COLORS: Readonly<Record<string, string>>;
39
+ /**
40
+ * The one schema-invalid feature, kept apart: `useShapes` validates a collection
41
+ * as a whole and renders nothing when any feature fails, so it must not share a
42
+ * layer with the valid cases. The tiling pass is run over all features together.
43
+ */
44
+ export declare const DEGENERATE_INVALID_FEATURES: GeoJsonFeatureCollection;
45
+ /** Every degenerate case that passes the GeoJSON schema; rendered as one layer. */
46
+ export declare const DEGENERATE_FEATURES: GeoJsonFeatureCollection;
47
+ /** All degenerate features, valid and invalid, as the tiling pass sees them. */
48
+ export declare const DEGENERATE_ALL_FEATURES: GeoJsonFeatureCollection;
49
+ /** Derived from the scene, so the opening camera can never drift from the cases it frames. */
50
+ export declare const DEGENERATE_BOUNDS: GeoJsonBbox;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Deterministic PRNG (mulberry32) for story fixtures, so a seeded scene renders
3
+ * identically on every load and in every environment.
4
+ */
5
+ export declare const mulberry32: (seed: number) => (() => number);
@@ -1 +0,0 @@
1
- {"version":3,"file":"entry.js","sourceRoot":"","sources":["../../../../../libs/react/map/migrations/entry.ts"],"names":[],"mappings":"","sourcesContent":["export {};\n"]}