@florasync/leaflet-geokit 0.2.0 → 0.4.0

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 (89) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +666 -59
  3. package/dist/django/index.js +9517 -0
  4. package/dist/django/index.js.map +1 -0
  5. package/dist/leaflet-geokit.es.js +2039 -1871
  6. package/dist/leaflet-geokit.es.js.map +1 -1
  7. package/dist/leaflet-geokit.external.es.js +2201 -0
  8. package/dist/leaflet-geokit.external.es.js.map +1 -0
  9. package/dist/leaflet-geokit.umd.js +36 -16
  10. package/dist/leaflet-geokit.umd.js.map +1 -1
  11. package/dist/preact/index-BM2U4rKn.js +2188 -0
  12. package/dist/preact/index-BM2U4rKn.js.map +1 -0
  13. package/dist/preact/index.js +109 -0
  14. package/dist/preact/index.js.map +1 -0
  15. package/dist/preact-bundled/index.js +9496 -0
  16. package/dist/preact-bundled/index.js.map +1 -0
  17. package/dist/react/index-BM2U4rKn.js +2188 -0
  18. package/dist/react/index-BM2U4rKn.js.map +1 -0
  19. package/dist/react/index.js +109 -0
  20. package/dist/react/index.js.map +1 -0
  21. package/dist/react-bundled/index.js +9496 -0
  22. package/dist/react-bundled/index.js.map +1 -0
  23. package/dist/types/e2e/component.spec.d.ts +1 -0
  24. package/dist/types/e2e/dummy.spec.d.ts +1 -0
  25. package/dist/types/src/components/LeafletDrawMapElement.d.ts +94 -0
  26. package/dist/types/src/django/index.d.ts +35 -0
  27. package/dist/types/src/external.d.ts +4 -0
  28. package/dist/types/src/index.d.ts +4 -0
  29. package/dist/types/src/lib/FeatureStore.d.ts +48 -0
  30. package/dist/types/src/lib/MapController.d.ts +116 -0
  31. package/dist/types/src/lib/draw/L.Draw.Cake.d.ts +9 -0
  32. package/dist/types/src/lib/draw/toolbar-patch.d.ts +2 -0
  33. package/dist/types/src/lib/layer-cake/CakeBaker.d.ts +12 -0
  34. package/dist/types/src/lib/layer-cake/LayerCakeManager.d.ts +29 -0
  35. package/dist/types/src/lib/layer-cake/bindCakeControls.d.ts +8 -0
  36. package/dist/types/src/lib/layer-cake/ensureCircleEditable.d.ts +2 -0
  37. package/dist/types/src/lib/leaflet-assets.d.ts +23 -0
  38. package/dist/types/src/preact/core.d.ts +36 -0
  39. package/dist/types/src/preact/index.d.ts +8 -0
  40. package/dist/types/src/preact-bundled/index.d.ts +9 -0
  41. package/dist/types/src/react/core.d.ts +36 -0
  42. package/dist/types/src/react/index.d.ts +7 -0
  43. package/dist/types/src/react-bundled/index.d.ts +8 -0
  44. package/dist/types/src/shims/ensure-element.d.ts +2 -0
  45. package/dist/types/src/state/types.d.ts +7 -0
  46. package/dist/types/src/types/events.d.ts +71 -0
  47. package/dist/types/src/types/public.d.ts +106 -0
  48. package/dist/types/src/utils/geodesic.d.ts +8 -0
  49. package/dist/types/src/utils/geojson.d.ts +70 -0
  50. package/dist/types/src/utils/leaflet-guards.d.ts +9 -0
  51. package/dist/types/src/utils/logger.d.ts +12 -0
  52. package/dist/types/src/utils/ruler.d.ts +31 -0
  53. package/dist/types/tests/bbox-more.spec.d.ts +1 -0
  54. package/dist/types/tests/component-api-more.spec.d.ts +1 -0
  55. package/dist/types/tests/component-delegation.spec.d.ts +1 -0
  56. package/dist/types/tests/component-events.spec.d.ts +1 -0
  57. package/dist/types/tests/component-io.spec.d.ts +1 -0
  58. package/dist/types/tests/django-shim.spec.d.ts +1 -0
  59. package/dist/types/tests/draw-cake.spec.d.ts +1 -0
  60. package/dist/types/tests/eachcoord.spec.d.ts +1 -0
  61. package/dist/types/tests/element.spec.d.ts +1 -0
  62. package/dist/types/tests/featureStore-more.spec.d.ts +1 -0
  63. package/dist/types/tests/featureStore.spec.d.ts +1 -0
  64. package/dist/types/tests/framework-runtime-externalization.spec.d.ts +1 -0
  65. package/dist/types/tests/geodesic.spec.d.ts +1 -0
  66. package/dist/types/tests/geojson-merge.spec.d.ts +1 -0
  67. package/dist/types/tests/geojson-more.spec.d.ts +1 -0
  68. package/dist/types/tests/geojson.spec.d.ts +1 -0
  69. package/dist/types/tests/layer-cake-baker.spec.d.ts +1 -0
  70. package/dist/types/tests/layer-cake-controls.spec.d.ts +1 -0
  71. package/dist/types/tests/layer-cake-editing.spec.d.ts +1 -0
  72. package/dist/types/tests/layer-cake-manager.spec.d.ts +1 -0
  73. package/dist/types/tests/leaflet-assets.spec.d.ts +1 -0
  74. package/dist/types/tests/leaflet-draw-circle-resize-patch.spec.d.ts +1 -0
  75. package/dist/types/tests/logger-more.spec.d.ts +1 -0
  76. package/dist/types/tests/logger.spec.d.ts +1 -0
  77. package/dist/types/tests/map-controller.spec.d.ts +1 -0
  78. package/dist/types/tests/mapcontroller-merge.spec.d.ts +1 -0
  79. package/dist/types/tests/preact-bundled-shim.spec.d.ts +1 -0
  80. package/dist/types/tests/react-bundled-shim.spec.d.ts +1 -0
  81. package/dist/types/tests/react-shim.spec.d.ts +1 -0
  82. package/dist/types/tests/ruler.spec.d.ts +1 -0
  83. package/dist/types/vite.config.d.ts +2 -0
  84. package/dist/types/vite.config.external.d.ts +2 -0
  85. package/dist/types/vite.config.preact-bundled.d.ts +2 -0
  86. package/dist/types/vite.config.preact.d.ts +2 -0
  87. package/dist/types/vite.config.react-bundled.d.ts +2 -0
  88. package/dist/types/vite.config.react.d.ts +2 -0
  89. package/package.json +61 -5
@@ -0,0 +1,106 @@
1
+ import type { Feature, FeatureCollection, Geometry } from "geojson";
2
+ import type { LogLevel } from "@src/utils/logger";
3
+ import type * as Leaflet from "leaflet";
4
+ /**
5
+ * Basic map configuration derived from element attributes.
6
+ */
7
+ export interface MapConfig {
8
+ latitude: number;
9
+ longitude: number;
10
+ zoom: number;
11
+ minZoom?: number;
12
+ maxZoom?: number;
13
+ tileUrl: string;
14
+ tileAttribution?: string;
15
+ readOnly?: boolean;
16
+ fitToDataOnLoad?: boolean;
17
+ logLevel?: LogLevel;
18
+ devOverlay?: boolean;
19
+ polygonAllowIntersection?: boolean;
20
+ /** Use Canvas rendering instead of SVG for better performance with large datasets. Default: true */
21
+ preferCanvas?: boolean;
22
+ /**
23
+ * If true, attempt to use an externally provided Leaflet/Leaflet.draw instead of bundled imports.
24
+ * When enabled, MapController will validate the presence of window.L and Draw APIs; if absent, it may fall back to bundled.
25
+ */
26
+ useExternalLeaflet?: boolean;
27
+ /**
28
+ * If true, skip injecting Leaflet/Draw CSS and default icon wiring (host is responsible).
29
+ * Ignored when useExternalLeaflet is false (bundled path still injects by default).
30
+ */
31
+ skipLeafletStyles?: boolean;
32
+ }
33
+ export type MeasurementSystem = "metric" | "imperial";
34
+ /**
35
+ * Draw controls toggles (presence = true on the element).
36
+ */
37
+ export interface DrawControlsConfig {
38
+ polygon?: boolean;
39
+ polyline?: boolean;
40
+ rectangle?: boolean;
41
+ circle?: boolean;
42
+ /** Draw a Layer Cake base circle + manager to create concentric donut polygons. */
43
+ cake?: boolean;
44
+ marker?: boolean;
45
+ edit?: boolean;
46
+ delete?: boolean;
47
+ ruler?: boolean;
48
+ }
49
+ /**
50
+ * Public API that the custom element exposes (methods/properties).
51
+ * This is provided for typing in TS consumers who may cast the element.
52
+ */
53
+ export interface LeafletDrawMapElementAPI {
54
+ latitude: number;
55
+ longitude: number;
56
+ zoom: number;
57
+ minZoom?: number;
58
+ maxZoom?: number;
59
+ tileUrl: string;
60
+ tileAttribution?: string;
61
+ readOnly: boolean;
62
+ logLevel: LogLevel;
63
+ devOverlay: boolean;
64
+ themeCss: string;
65
+ /** Prefer external Leaflet/Draw if available (falls back to bundled if missing). */
66
+ useExternalLeaflet?: boolean;
67
+ /** Disable our CSS/icon injection when host supplies styles. */
68
+ skipLeafletStyles?: boolean;
69
+ /** Optional injection of a pre-existing Leaflet namespace to use instead of bundled import. */
70
+ leafletInstance?: typeof Leaflet;
71
+ getGeoJSON(): Promise<FeatureCollection>;
72
+ loadGeoJSON(fc: FeatureCollection): Promise<void>;
73
+ clearLayers(): Promise<void>;
74
+ addFeatures(fc: FeatureCollection): Promise<string[]>;
75
+ updateFeature(id: string, feature: Feature): Promise<void>;
76
+ removeFeature(id: string): Promise<void>;
77
+ fitBoundsToData(padding?: number): Promise<void>;
78
+ /**
79
+ * Fit the map view to an arbitrary bounds tuple [[south, west], [north, east]].
80
+ * Optional padding is a ratio of the bounds size (e.g., 0.05 for 5%).
81
+ */
82
+ fitBounds(bounds: [[number, number], [number, number]], padding?: number): Promise<void>;
83
+ setView(lat: number, lng: number, zoom?: number): Promise<void>;
84
+ loadGeoJSONFromUrl(url: string): Promise<void>;
85
+ loadGeoJSONFromText(text: string): Promise<void>;
86
+ /**
87
+ * Emits 'leaflet-draw:export' with the current FeatureCollection.
88
+ * Returns the exported FeatureCollection for convenience.
89
+ */
90
+ exportGeoJSON(): Promise<FeatureCollection>;
91
+ /**
92
+ * Merge all visible polygon layers into a single polygon.
93
+ * This removes the original polygon features and adds a new merged feature.
94
+ * @param options Optional configuration for the merge operation
95
+ * @returns Promise resolving to the ID of the newly created merged feature, or null if no polygons to merge
96
+ */
97
+ mergePolygons(options?: {
98
+ /** Properties to apply to the merged feature (defaults to properties from first polygon) */
99
+ properties?: Record<string, any>;
100
+ }): Promise<string | null>;
101
+ /**
102
+ * Change the measurement system for the Leaflet ruler tool.
103
+ */
104
+ setMeasurementUnits(system: MeasurementSystem): Promise<void>;
105
+ }
106
+ export type { Feature, FeatureCollection, Geometry };
@@ -0,0 +1,8 @@
1
+ export declare function magicRound(value: number): number;
2
+ export interface PreciseDistanceResult {
3
+ meters: number;
4
+ bearingDegrees: number;
5
+ algorithm: "vincenty" | "karney";
6
+ iterations: number;
7
+ }
8
+ export declare function computePreciseDistance(lat1: number, lon1: number, lat2: number, lon2: number): PreciseDistanceResult;
@@ -0,0 +1,70 @@
1
+ import type { Feature, FeatureCollection, Geometry, Position, Polygon, MultiPolygon, GeoJsonProperties } from "geojson";
2
+ export type BBox = [
3
+ minLng: number,
4
+ minLat: number,
5
+ maxLng: number,
6
+ maxLat: number
7
+ ];
8
+ export type BoundsPair = [[number, number], [number, number]];
9
+ export declare function normalizeId(feature: Feature): string | undefined;
10
+ /**
11
+ * Callback function for processing a single coordinate position
12
+ */
13
+ export type CoordinateProcessor = (coord: Position) => void;
14
+ /**
15
+ * Iterate all coordinates of a Geometry and call the processor function for each Position.
16
+ */
17
+ export declare function eachCoord(geom: Geometry, cb: CoordinateProcessor): void;
18
+ /**
19
+ * Compute bounding box [minLng, minLat, maxLng, maxLat] for a single feature.
20
+ * Returns null when the feature has no geometry.
21
+ */
22
+ export declare function bboxOfFeature(feature: Feature): BBox | null;
23
+ /**
24
+ * Compute bounding box for a FeatureCollection. Returns null if no features have geometry.
25
+ */
26
+ export declare function bboxOfFeatureCollection(fc: FeatureCollection): BBox | null;
27
+ /**
28
+ * Convert a bbox to [[south, west], [north, east]] tuple.
29
+ */
30
+ export declare function bboxToBoundsPair(b: BBox): BoundsPair;
31
+ /**
32
+ * Expand Multi* geometries and GeometryCollections into multiple single-geometry Features.
33
+ * - MultiPolygon → multiple Polygon features
34
+ * - MultiLineString → multiple LineString features
35
+ * - MultiPoint → multiple Point features
36
+ * - GeometryCollection → one feature per child geometry
37
+ * Other geometry types are returned unchanged.
38
+ */
39
+ export declare function expandMultiGeometries(fc: FeatureCollection): FeatureCollection;
40
+ /**
41
+ * Check if a geometry is a Polygon
42
+ */
43
+ export declare function isPolygon(geometry: Geometry | null): geometry is Polygon;
44
+ /**
45
+ * Check if a geometry is a MultiPolygon
46
+ */
47
+ export declare function isMultiPolygon(geometry: Geometry | null): geometry is MultiPolygon;
48
+ /**
49
+ * Extract polygon coordinates from a feature
50
+ * Returns array of rings for each polygon (outer + inner rings)
51
+ */
52
+ export declare function extractPolygonCoordinates(feature: Feature): Position[][][];
53
+ /**
54
+ * Merge multiple polygon features into a single polygon feature.
55
+ * Attempts to create a topological union of the polygons, falling back to
56
+ * a MultiPolygon if the union operation fails.
57
+ *
58
+ * @param features Array of features to merge (only polygon features will be used)
59
+ * @param properties Properties for the resulting feature (defaults to first feature's properties)
60
+ * @returns A new Feature with a unified Polygon or MultiPolygon, or null if no valid polygons found
61
+ */
62
+ export declare function mergePolygons(features: Feature[], properties?: GeoJsonProperties): Feature | null;
63
+ /**
64
+ * Merge polygons from a FeatureCollection into a single polygon feature.
65
+ *
66
+ * @param fc FeatureCollection containing polygons to merge
67
+ * @param properties Properties for the resulting feature (defaults to first feature's properties)
68
+ * @returns A Feature with a merged Polygon/MultiPolygon, or null if no polygon features found
69
+ */
70
+ export declare function mergePolygonsFromCollection(fc: FeatureCollection, properties?: GeoJsonProperties): Feature | null;
@@ -0,0 +1,9 @@
1
+ import type * as LType from "leaflet";
2
+ export interface AssertDrawOptions {
3
+ onError?: (message: string) => void;
4
+ }
5
+ /**
6
+ * Validate that Leaflet.draw APIs exist on the provided Leaflet namespace.
7
+ * Returns true when present, false otherwise.
8
+ */
9
+ export declare function assertDrawPresent(L: typeof LType, opts?: AssertDrawOptions): boolean;
@@ -0,0 +1,12 @@
1
+ export type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "silent";
2
+ export interface Logger {
3
+ level: LogLevel;
4
+ trace: (...args: unknown[]) => void;
5
+ debug: (...args: unknown[]) => void;
6
+ info: (...args: unknown[]) => void;
7
+ warn: (...args: unknown[]) => void;
8
+ error: (...args: unknown[]) => void;
9
+ child: (childName: string) => Logger;
10
+ setLevel: (level: LogLevel) => void;
11
+ }
12
+ export declare function createLogger(name: string, level?: LogLevel, sink?: Console): Logger;
@@ -0,0 +1,31 @@
1
+ export type MeasurementSystem = "metric" | "imperial";
2
+ export interface RulerLengthUnitOptions {
3
+ display: string;
4
+ decimal: number;
5
+ factor: number | null;
6
+ label: string;
7
+ }
8
+ export interface RulerAngleUnitOptions {
9
+ display: string;
10
+ decimal: number;
11
+ factor: number | null;
12
+ label: string;
13
+ }
14
+ export interface RulerOptions {
15
+ position: string;
16
+ circleMarker: {
17
+ color: string;
18
+ radius: number;
19
+ };
20
+ lineStyle: {
21
+ color: string;
22
+ dashArray: string;
23
+ };
24
+ lengthUnit: RulerLengthUnitOptions;
25
+ angleUnit: RulerAngleUnitOptions;
26
+ }
27
+ /**
28
+ * Build Leaflet-ruler options for a given measurement system.
29
+ */
30
+ export declare function getRulerOptions(system: MeasurementSystem): RulerOptions;
31
+ export declare const measurementSystemDescriptions: Record<MeasurementSystem, string>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import "@src/index";
@@ -0,0 +1 @@
1
+ import "@src/index";
@@ -0,0 +1 @@
1
+ import "@src/index";
@@ -0,0 +1 @@
1
+ import "@src/index";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import "@src/index";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import "@src/index";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@florasync/leaflet-geokit",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Framework-agnostic Leaflet + Leaflet.draw web component with TypeScript, verbose logging, and tests.",
5
5
  "type": "module",
6
6
  "main": "./dist/leaflet-geokit.umd.js",
@@ -11,6 +11,30 @@
11
11
  "types": "./dist/types/index.d.ts",
12
12
  "import": "./dist/leaflet-geokit.es.js",
13
13
  "require": "./dist/leaflet-geokit.umd.js"
14
+ },
15
+ "./django": {
16
+ "types": "./dist/types/django/index.d.ts",
17
+ "import": "./dist/django/index.js"
18
+ },
19
+ "./external": {
20
+ "types": "./dist/types/src/external.d.ts",
21
+ "import": "./dist/leaflet-geokit.external.es.js"
22
+ },
23
+ "./preact": {
24
+ "types": "./dist/types/preact/index.d.ts",
25
+ "import": "./dist/preact/index.js"
26
+ },
27
+ "./preact-bundled": {
28
+ "types": "./dist/types/preact-bundled/index.d.ts",
29
+ "import": "./dist/preact-bundled/index.js"
30
+ },
31
+ "./react": {
32
+ "types": "./dist/types/react/index.d.ts",
33
+ "import": "./dist/react/index.js"
34
+ },
35
+ "./react-bundled": {
36
+ "types": "./dist/types/react-bundled/index.d.ts",
37
+ "import": "./dist/react-bundled/index.js"
14
38
  }
15
39
  },
16
40
  "files": [
@@ -35,10 +59,19 @@
35
59
  "homepage": "https://github.com/FloraSync/leaflet-geokit#readme",
36
60
  "scripts": {
37
61
  "dev": "vite",
38
- "build": "tsc -p tsconfig.json --emitDeclarationOnly && vite build",
62
+ "build": "tsc -p tsconfig.json --emitDeclarationOnly && vite build && vite build -c vite.config.external.ts && vite build -c vite.config.django.ts && vite build -c vite.config.preact.ts && vite build -c vite.config.preact-bundled.ts && vite build -c vite.config.react.ts && vite build -c vite.config.react-bundled.ts",
63
+ "build:analyze": "npm run build:analyze:main && npm run build:analyze:external && npm run build:analyze:django && npm run build:analyze:preact && npm run build:analyze:preact-bundled && npm run build:analyze:react && npm run build:analyze:react-bundled",
64
+ "build:analyze:main": "BUNDLE_ANALYZE=1 BUNDLE_ANALYZE_REPORT=dist/stats/main.html vite build",
65
+ "build:analyze:external": "BUNDLE_ANALYZE=1 BUNDLE_ANALYZE_REPORT=dist/stats/external.html vite build -c vite.config.external.ts",
66
+ "build:analyze:django": "BUNDLE_ANALYZE=1 BUNDLE_ANALYZE_REPORT=dist/stats/django.html vite build -c vite.config.django.ts",
67
+ "build:analyze:preact": "BUNDLE_ANALYZE=1 BUNDLE_ANALYZE_REPORT=dist/stats/preact.html vite build -c vite.config.preact.ts",
68
+ "build:analyze:preact-bundled": "BUNDLE_ANALYZE=1 BUNDLE_ANALYZE_REPORT=dist/stats/preact-bundled.html vite build -c vite.config.preact-bundled.ts",
69
+ "build:analyze:react": "BUNDLE_ANALYZE=1 BUNDLE_ANALYZE_REPORT=dist/stats/react.html vite build -c vite.config.react.ts",
70
+ "build:analyze:react-bundled": "BUNDLE_ANALYZE=1 BUNDLE_ANALYZE_REPORT=dist/stats/react-bundled.html vite build -c vite.config.react-bundled.ts",
39
71
  "preview": "vite preview",
40
72
  "typecheck": "tsc -p tsconfig.json --noEmit",
41
73
  "lint": "eslint . --ext .ts,.tsx,.js,.jsx",
74
+ "lint:fix": "eslint . --ext .ts,.tsx,.js,.jsx --fix",
42
75
  "format": "prettier --write .",
43
76
  "prettier:check": "prettier --check .",
44
77
  "test": "npm run test:unit && npm run test:e2e",
@@ -70,26 +103,49 @@
70
103
  "leaflet": "^1.9.4",
71
104
  "leaflet-draw": "^1.0.4",
72
105
  "leaflet-ruler": "^1.0.0",
73
- "preact": "^10.24.0",
74
106
  "uuid": "^9.0.1"
75
107
  },
108
+ "peerDependencies": {
109
+ "preact": "^10.24.0",
110
+ "react": "^18.3.1",
111
+ "react-dom": "^18.3.1"
112
+ },
113
+ "peerDependenciesMeta": {
114
+ "preact": {
115
+ "optional": true
116
+ },
117
+ "react": {
118
+ "optional": true
119
+ },
120
+ "react-dom": {
121
+ "optional": true
122
+ }
123
+ },
76
124
  "devDependencies": {
77
- "@playwright/test": "^1.47.0",
125
+ "@playwright/test": "^1.58.2",
78
126
  "@preact/preset-vite": "^2.8.0",
79
127
  "@testing-library/dom": "^10.4.0",
80
128
  "@testing-library/preact": "^3.2.4",
129
+ "@testing-library/react": "^16.1.0",
81
130
  "@types/geojson": "^7946.0.14",
82
131
  "@types/leaflet": "^1.9.9",
83
132
  "@types/leaflet-draw": "^1.0.10",
84
133
  "@types/node": "^22.0.0",
134
+ "@types/react": "^18.3.12",
135
+ "@types/react-dom": "^18.3.1",
85
136
  "@typescript-eslint/eslint-plugin": "^8.0.1",
86
137
  "@typescript-eslint/parser": "^8.0.1",
87
138
  "@vitest/coverage-v8": "^3.2.4",
139
+ "baseline-browser-mapping": "^2.9.17",
88
140
  "eslint": "^9.9.0",
89
141
  "happy-dom": "^18.0.1",
90
- "husky": "^9.0.11",
142
+ "husky": "^9.1.7",
91
143
  "lint-staged": "^15.2.10",
144
+ "preact": "^10.28.3",
92
145
  "prettier": "^3.3.2",
146
+ "react": "^18.3.1",
147
+ "react-dom": "^18.3.1",
148
+ "rollup-plugin-visualizer": "^6.0.5",
93
149
  "typescript": "^5.5.4",
94
150
  "vite": "^7.1.4",
95
151
  "vitest": "^3.2.4"