@element-editor/react 0.0.0-stage → 0.2.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 (58) hide show
  1. package/AGENTS.md +429 -0
  2. package/LICENSE +21 -0
  3. package/README.md +49 -2
  4. package/dist/element-editor-leaflet.css +1 -0
  5. package/dist/element-editor.cjs +1 -0
  6. package/dist/element-editor.css +1 -0
  7. package/dist/element-editor.es.js +178 -0
  8. package/dist/index.d.cts +4 -0
  9. package/dist/index.d.ts +4 -0
  10. package/dist/leaflet/CompactAttribution.d.cts +23 -0
  11. package/dist/leaflet/CompactAttribution.d.ts +23 -0
  12. package/dist/leaflet/ElementEditor.d.cts +81 -0
  13. package/dist/leaflet/ElementEditor.d.ts +81 -0
  14. package/dist/leaflet/MapView.d.cts +28 -0
  15. package/dist/leaflet/MapView.d.ts +28 -0
  16. package/dist/leaflet/index.d.cts +3 -0
  17. package/dist/leaflet/index.d.ts +3 -0
  18. package/dist/leaflet.cjs +1 -0
  19. package/dist/leaflet.d.cts +2 -0
  20. package/dist/leaflet.d.ts +2 -0
  21. package/dist/leaflet.es.js +181 -0
  22. package/dist/maplibre/ElementEditor.d.cts +68 -0
  23. package/dist/maplibre/ElementEditor.d.ts +68 -0
  24. package/dist/maplibre/MapLibreMapView.d.cts +34 -0
  25. package/dist/maplibre/MapLibreMapView.d.ts +34 -0
  26. package/dist/maplibre/index.d.cts +2 -0
  27. package/dist/maplibre/index.d.ts +2 -0
  28. package/dist/shared.d.cts +13 -0
  29. package/dist/shared.d.ts +13 -0
  30. package/dist/shell/ElementEditorShell.d.cts +32 -0
  31. package/dist/shell/ElementEditorShell.d.ts +32 -0
  32. package/dist/shell/FileDropBox.d.cts +13 -0
  33. package/dist/shell/FileDropBox.d.ts +13 -0
  34. package/dist/shell/ShellControl.d.cts +19 -0
  35. package/dist/shell/ShellControl.d.ts +19 -0
  36. package/dist/shell/ShellPanels.d.cts +13 -0
  37. package/dist/shell/ShellPanels.d.ts +13 -0
  38. package/dist/shell/savedView.d.cts +49 -0
  39. package/dist/shell/savedView.d.ts +49 -0
  40. package/dist/shell/types.d.cts +253 -0
  41. package/dist/shell/types.d.ts +253 -0
  42. package/dist/shell/useAttributionAutoCollapse.d.cts +17 -0
  43. package/dist/shell/useAttributionAutoCollapse.d.ts +17 -0
  44. package/dist/shell/useBasemapState.d.cts +20 -0
  45. package/dist/shell/useBasemapState.d.ts +20 -0
  46. package/dist/shell/useDevChecks.d.cts +11 -0
  47. package/dist/shell/useDevChecks.d.ts +11 -0
  48. package/dist/shell/useResolvedTheme.d.cts +14 -0
  49. package/dist/shell/useResolvedTheme.d.ts +14 -0
  50. package/dist/shell/useSlotAutoLayout.d.cts +23 -0
  51. package/dist/shell/useSlotAutoLayout.d.ts +23 -0
  52. package/dist/store/StoreContext.d.cts +1 -0
  53. package/dist/store/StoreContext.d.ts +1 -0
  54. package/dist/types/geojson.d.cts +1 -0
  55. package/dist/types/geojson.d.ts +1 -0
  56. package/dist/useBasemapState-8bWJK84f.cjs +1 -0
  57. package/dist/useBasemapState-DChxz3lv.js +682 -0
  58. package/package.json +150 -3
package/package.json CHANGED
@@ -1,6 +1,153 @@
1
1
  {
2
2
  "name": "@element-editor/react",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "description": "Drop-in React map editor: one component with drawing tools, vertex editing, snapping, a data table and a GeoJSON inspector, on MapLibre GL or Leaflet.",
5
+ "keywords": [
6
+ "element-editor",
7
+ "react",
8
+ "map-editor",
9
+ "geojson",
10
+ "geojson-editor",
11
+ "maplibre",
12
+ "leaflet",
13
+ "drawing",
14
+ "vertex-editing",
15
+ "snapping",
16
+ "gis"
17
+ ],
18
+ "homepage": "https://elementeditor.dev",
19
+ "bugs": {
20
+ "url": "https://github.com/spatibase/element/issues"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/spatibase/element.git",
25
+ "directory": "packages/react"
26
+ },
27
+ "license": "MIT",
28
+ "author": "Michal Acler",
29
+ "private": false,
30
+ "type": "module",
31
+ "sideEffects": [
32
+ "*.css"
33
+ ],
34
+ "main": "./dist/element-editor.cjs",
35
+ "module": "./dist/element-editor.es.js",
36
+ "types": "./dist/index.d.ts",
37
+ "typesVersions": {
38
+ "*": {
39
+ "leaflet": [
40
+ "./dist/leaflet.d.ts"
41
+ ]
42
+ }
43
+ },
44
+ "exports": {
45
+ ".": {
46
+ "import": {
47
+ "types": "./dist/index.d.ts",
48
+ "default": "./dist/element-editor.es.js"
49
+ },
50
+ "require": {
51
+ "types": "./dist/index.d.cts",
52
+ "default": "./dist/element-editor.cjs"
53
+ }
54
+ },
55
+ "./leaflet": {
56
+ "import": {
57
+ "types": "./dist/leaflet.d.ts",
58
+ "default": "./dist/leaflet.es.js"
59
+ },
60
+ "require": {
61
+ "types": "./dist/leaflet.d.cts",
62
+ "default": "./dist/leaflet.cjs"
63
+ }
64
+ },
65
+ "./style.css": "./dist/element-editor.css",
66
+ "./leaflet/style.css": "./dist/element-editor-leaflet.css"
67
+ },
68
+ "files": [
69
+ "dist",
70
+ "LICENSE",
71
+ "README.md",
72
+ "AGENTS.md"
73
+ ],
74
+ "engines": {
75
+ "node": ">=18"
76
+ },
77
+ "publishConfig": {
78
+ "access": "public",
79
+ "provenance": true
80
+ },
81
+ "dependencies": {
82
+ "@phosphor-icons/react": "^2.1.10",
83
+ "sonner": "^2.0.7",
84
+ "@element-editor/adapter-maplibre": "0.2.0",
85
+ "@element-editor/ui": "0.2.0",
86
+ "@element-editor/core": "0.2.0"
87
+ },
88
+ "devDependencies": {
89
+ "@playwright/test": "^1.58.2",
90
+ "@tailwindcss/vite": "^4.2.1",
91
+ "@testing-library/dom": "^10.4.1",
92
+ "@testing-library/jest-dom": "^6.9.1",
93
+ "@testing-library/react": "^16.3.2",
94
+ "@testing-library/user-event": "^14.6.1",
95
+ "@types/geojson": "^7946.0.16",
96
+ "@types/leaflet": "^1.9.21",
97
+ "@types/node": "^25.5.2",
98
+ "@types/react": "^19.0.2",
99
+ "@types/react-dom": "^19.0.2",
100
+ "@vitejs/plugin-react": "^4.3.4",
101
+ "@vitest/coverage-v8": "^4.1.0",
102
+ "jsdom": "^29.0.0",
103
+ "leaflet": "^1.9.0",
104
+ "maplibre-gl": "^5.0.0",
105
+ "playwright": "^1.59.1",
106
+ "react-data-grid": "7.0.0-beta.57",
107
+ "react-leaflet": "^5.0.0",
108
+ "tailwindcss": "^4.2.1",
109
+ "typescript": "~5.7.2",
110
+ "vite": "^6.0.5",
111
+ "vite-plugin-dts": "^4.5.4",
112
+ "vitest": "^4.1.0",
113
+ "@element-editor/adapter-leaflet": "0.2.0"
114
+ },
115
+ "peerDependencies": {
116
+ "leaflet": "^1.9.0",
117
+ "maplibre-gl": "^5.5.0",
118
+ "react": "^19.2.0",
119
+ "react-dom": "^19.2.0",
120
+ "react-leaflet": "^5.0.0",
121
+ "@element-editor/adapter-leaflet": "^0.2.0"
122
+ },
123
+ "peerDependenciesMeta": {
124
+ "@element-editor/adapter-leaflet": {
125
+ "optional": true
126
+ },
127
+ "leaflet": {
128
+ "optional": true
129
+ },
130
+ "react-leaflet": {
131
+ "optional": true
132
+ },
133
+ "maplibre-gl": {
134
+ "optional": true
135
+ }
136
+ },
137
+ "scripts": {
138
+ "dev": "vite",
139
+ "build": "vite build && node ../../scripts/fix-dts.mjs",
140
+ "preview": "vite preview",
141
+ "test": "vitest",
142
+ "test:run": "vitest run",
143
+ "test:coverage": "vitest run --coverage",
144
+ "test:e2e": "playwright test",
145
+ "test:e2e:ui": "playwright test --ui",
146
+ "test:e2e:headed": "playwright test --headed",
147
+ "test:e2e:report": "playwright show-report",
148
+ "test:e2e:debug": "PWDEBUG=1 playwright test",
149
+ "test:perf": "playwright test -c playwright.perf.config.ts",
150
+ "validate": "tsc -b && vitest run && playwright test",
151
+ "typecheck": "tsc -b"
152
+ }
6
153
  }