@element-editor/react 0.0.0-stage → 0.2.1

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 (60) 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 +190 -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 +35 -0
  25. package/dist/maplibre/MapLibreMapView.d.ts +35 -0
  26. package/dist/maplibre/index.d.cts +2 -0
  27. package/dist/maplibre/index.d.ts +2 -0
  28. package/dist/maplibre/workerUrl.d.cts +21 -0
  29. package/dist/maplibre/workerUrl.d.ts +21 -0
  30. package/dist/shared.d.cts +13 -0
  31. package/dist/shared.d.ts +13 -0
  32. package/dist/shell/ElementEditorShell.d.cts +32 -0
  33. package/dist/shell/ElementEditorShell.d.ts +32 -0
  34. package/dist/shell/FileDropBox.d.cts +13 -0
  35. package/dist/shell/FileDropBox.d.ts +13 -0
  36. package/dist/shell/ShellControl.d.cts +19 -0
  37. package/dist/shell/ShellControl.d.ts +19 -0
  38. package/dist/shell/ShellPanels.d.cts +13 -0
  39. package/dist/shell/ShellPanels.d.ts +13 -0
  40. package/dist/shell/savedView.d.cts +49 -0
  41. package/dist/shell/savedView.d.ts +49 -0
  42. package/dist/shell/types.d.cts +253 -0
  43. package/dist/shell/types.d.ts +253 -0
  44. package/dist/shell/useAttributionAutoCollapse.d.cts +17 -0
  45. package/dist/shell/useAttributionAutoCollapse.d.ts +17 -0
  46. package/dist/shell/useBasemapState.d.cts +20 -0
  47. package/dist/shell/useBasemapState.d.ts +20 -0
  48. package/dist/shell/useDevChecks.d.cts +11 -0
  49. package/dist/shell/useDevChecks.d.ts +11 -0
  50. package/dist/shell/useResolvedTheme.d.cts +14 -0
  51. package/dist/shell/useResolvedTheme.d.ts +14 -0
  52. package/dist/shell/useSlotAutoLayout.d.cts +23 -0
  53. package/dist/shell/useSlotAutoLayout.d.ts +23 -0
  54. package/dist/store/StoreContext.d.cts +1 -0
  55. package/dist/store/StoreContext.d.ts +1 -0
  56. package/dist/types/geojson.d.cts +1 -0
  57. package/dist/types/geojson.d.ts +1 -0
  58. package/dist/useBasemapState-8bWJK84f.cjs +1 -0
  59. package/dist/useBasemapState-DChxz3lv.js +682 -0
  60. package/package.json +154 -3
package/package.json CHANGED
@@ -1,6 +1,157 @@
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.1",
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
+ "module": {
47
+ "types": "./dist/index.d.ts",
48
+ "default": "./dist/element-editor.es.js"
49
+ },
50
+ "import": {
51
+ "types": "./dist/index.d.ts",
52
+ "default": "./dist/element-editor.es.js"
53
+ },
54
+ "require": {
55
+ "types": "./dist/index.d.cts",
56
+ "default": "./dist/element-editor.cjs"
57
+ }
58
+ },
59
+ "./leaflet": {
60
+ "import": {
61
+ "types": "./dist/leaflet.d.ts",
62
+ "default": "./dist/leaflet.es.js"
63
+ },
64
+ "require": {
65
+ "types": "./dist/leaflet.d.cts",
66
+ "default": "./dist/leaflet.cjs"
67
+ }
68
+ },
69
+ "./style.css": "./dist/element-editor.css",
70
+ "./leaflet/style.css": "./dist/element-editor-leaflet.css"
71
+ },
72
+ "files": [
73
+ "dist",
74
+ "LICENSE",
75
+ "README.md",
76
+ "AGENTS.md"
77
+ ],
78
+ "engines": {
79
+ "node": ">=18"
80
+ },
81
+ "publishConfig": {
82
+ "access": "public",
83
+ "provenance": true
84
+ },
85
+ "dependencies": {
86
+ "@phosphor-icons/react": "^2.1.10",
87
+ "sonner": "^2.0.7",
88
+ "@element-editor/adapter-maplibre": "0.2.1",
89
+ "@element-editor/ui": "0.2.1",
90
+ "@element-editor/core": "0.2.1"
91
+ },
92
+ "devDependencies": {
93
+ "@playwright/test": "^1.58.2",
94
+ "@tailwindcss/vite": "^4.2.1",
95
+ "@testing-library/dom": "^10.4.1",
96
+ "@testing-library/jest-dom": "^6.9.1",
97
+ "@testing-library/react": "^16.3.2",
98
+ "@testing-library/user-event": "^14.6.1",
99
+ "@types/geojson": "^7946.0.16",
100
+ "@types/leaflet": "^1.9.21",
101
+ "@types/node": "^25.5.2",
102
+ "@types/react": "^19.0.2",
103
+ "@types/react-dom": "^19.0.2",
104
+ "@vitejs/plugin-react": "^4.3.4",
105
+ "@vitest/coverage-v8": "^4.1.0",
106
+ "jsdom": "^29.0.0",
107
+ "leaflet": "^1.9.0",
108
+ "maplibre-gl": "^6.18.0",
109
+ "playwright": "^1.59.1",
110
+ "react-data-grid": "7.0.0-beta.57",
111
+ "react-leaflet": "^5.0.0",
112
+ "tailwindcss": "^4.2.1",
113
+ "typescript": "~5.7.2",
114
+ "vite": "^6.0.5",
115
+ "vite-plugin-dts": "^4.5.4",
116
+ "vitest": "^4.1.0",
117
+ "@element-editor/adapter-leaflet": "0.2.1"
118
+ },
119
+ "peerDependencies": {
120
+ "leaflet": "^1.9.0",
121
+ "maplibre-gl": "^5.5.0 || ^6.0.0",
122
+ "react": "^19.2.0",
123
+ "react-dom": "^19.2.0",
124
+ "react-leaflet": "^5.0.0",
125
+ "@element-editor/adapter-leaflet": "^0.2.1"
126
+ },
127
+ "peerDependenciesMeta": {
128
+ "@element-editor/adapter-leaflet": {
129
+ "optional": true
130
+ },
131
+ "leaflet": {
132
+ "optional": true
133
+ },
134
+ "react-leaflet": {
135
+ "optional": true
136
+ },
137
+ "maplibre-gl": {
138
+ "optional": true
139
+ }
140
+ },
141
+ "scripts": {
142
+ "dev": "vite",
143
+ "build": "vite build && node ../../scripts/fix-dts.mjs",
144
+ "preview": "vite preview",
145
+ "test": "vitest",
146
+ "test:run": "vitest run",
147
+ "test:coverage": "vitest run --coverage",
148
+ "test:e2e": "playwright test",
149
+ "test:e2e:ui": "playwright test --ui",
150
+ "test:e2e:headed": "playwright test --headed",
151
+ "test:e2e:report": "playwright show-report",
152
+ "test:e2e:debug": "PWDEBUG=1 playwright test",
153
+ "test:perf": "playwright test -c playwright.perf.config.ts",
154
+ "validate": "tsc -b && vitest run && playwright test",
155
+ "typecheck": "tsc -b"
156
+ }
6
157
  }