@florasync/leaflet-geokit 0.4.0 → 0.6.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.
package/CHANGELOG.md CHANGED
@@ -1,17 +1,41 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.0
3
+ ## Unreleased
4
4
 
5
- - Initial release.
5
+ - Added optional Spec Kitty bootstrap scaffolding via [`.kittify/README.md`](.kittify/README.md) for future spec-driven workflows.
6
+ - Added non-blocking Spec Kitty helper scripts in [`package.json`](package.json) (`spec-kitty:init`, `spec-kitty:doctor`) with no impact on existing CI/release steps.
7
+ - Updated [`.gitignore`](.gitignore) to exclude Spec Kitty/agent runtime state while keeping source artifacts commit-friendly.
8
+ - Added `draw-move` support to all dev harness variants so the Move/Translate toolbar tool is visible in Bundled WC, External WC, React, React (Bundled), Preact, and Preact (Bundled) demos.
9
+ - Improved Move tool drag stability by anchoring translation to the initial drag-start pointer location, reducing jitter while repositioning GeoJSON features.
10
+ - Kept Move confirmation workflow (`Save`/`Cancel`) and ensured docs/examples now include `draw-move` in supported draw attributes.
11
+ - Expanded move-related test coverage for draw option wiring in `MapController`.
6
12
 
7
- ## Unreleased
13
+ ## 0.4.0
8
14
 
9
- - Django shim no longer auto-initializes; consumers must call `window.GeoKitDjango.init(...)` explicitly.
10
- - Added `elementAttributes` option to `initDjangoGeokit` for programmatic attribute overrides (takes precedence over textarea data attributes).
11
- - Corrected framework wrapper naming: removed mistaken React-named Preact wrapper entrypoints.
12
- - Added explicit Preact wrapper entrypoints: `@florasync/leaflet-geokit/preact` and `@florasync/leaflet-geokit/preact-bundled`.
15
+ - Added multi-page dev harness for live prototyping across all integration variants (Bundled WC, External WC, Preact, React).
16
+ - Added navigation menu to dev harness for easy switching between test scenarios.
17
+ - Improved dev harness UI with consistent geocoder, GeoJSON panel, and toast notifications across all pages.
18
+ - Added `rollup-plugin-visualizer` for bundle analysis across all entrypoints.
19
+ - Updated dependencies (Playwright, Preact, React).
20
+ - Reduced package size to ~130kb rendered (still requires leaflet and leaflet-draw as peer dependencies).
21
+
22
+ ## 0.3.0
23
+
24
+ - Added first-class Preact wrapper entrypoints: `@florasync/leaflet-geokit/preact` and `@florasync/leaflet-geokit/preact-bundled`.
13
25
  - Added first-class React wrapper entrypoints: `@florasync/leaflet-geokit/react` and `@florasync/leaflet-geokit/react-bundled`.
14
- - Added React shim docs and framework support entries in README.
15
26
  - Added real external entrypoint export: `@florasync/leaflet-geokit/external`.
16
27
  - Added dedicated external build artifact (`dist/leaflet-geokit.external.es.js`) with Leaflet stack externalized.
17
28
  - External mode now hard-falls back to bundled Leaflet/Draw when requested external Draw APIs are incomplete.
29
+ - Django shim no longer auto-initializes; consumers must call `window.GeoKitDjango.init(...)` explicitly.
30
+ - Added `elementAttributes` option to `initDjangoGeokit` for programmatic attribute overrides (takes precedence over textarea data attributes).
31
+ - Corrected framework wrapper naming: removed mistaken React-named Preact wrapper entrypoints.
32
+
33
+ ## 0.2.0
34
+
35
+ - Added thin Django shim layer for easy integration in Django templates without build tooling.
36
+ - Added `initDjangoGeokit` helper to initialize GeoKit on a textarea with data attributes for configuration.
37
+ - Added `django` export entrypoint for the Django shim.
38
+
39
+ ## 0.1.0
40
+
41
+ - Initial release.
package/README.md CHANGED
@@ -60,8 +60,18 @@ Documentation quick-links
60
60
  Inside this package directory:
61
61
 
62
62
  - npm install
63
- - npm run dev — starts Vite dev server
64
- - Open http://localhost:5173 in the browser (or whatever port VITE is using
63
+ - npm run dev — starts the multi-page dev harness (Vite)
64
+ - Open http://localhost:5173 to access the interactive test suite.
65
+
66
+ ### Dev Harness & Prototyping
67
+
68
+ The dev harness is a multi-page environment that allows you to prototype and test the component in various scenarios:
69
+
70
+ - **Bundled WC**: Standard web component with all dependencies included.
71
+ - **External WC**: Web component using external Leaflet/Draw from a CDN.
72
+ - **Preact / React**: First-class wrappers for Preact and React, testing both bundled and external dependency models.
73
+
74
+ Use the navigation bar at the top of the harness to switch between these environments. This is the best way to verify changes across different framework integrations and dependency models.
65
75
 
66
76
  For consumption from another app:
67
77
 
@@ -131,6 +141,13 @@ Scripts (see [package.json](package.json))
131
141
  - npm run format — Prettier write
132
142
  - npm run test:e2e — Playwright (currently a minimal smoke test under e2e/)
133
143
 
144
+ Optional workflow tooling
145
+
146
+ - Spec Kitty is pre-wired as an optional, non-blocking workflow bootstrap.
147
+ - `npm run spec-kitty:init` — initialize Spec Kitty in-place (requires `spec-kitty` CLI installed on your machine).
148
+ - `npm run spec-kitty:doctor` — validate local Spec Kitty setup (requires `spec-kitty` CLI).
149
+ - Build/test/publish scripts do **not** depend on Spec Kitty.
150
+
134
151
  Bundle analysis
135
152
 
136
153
  - The analyzer is opt-in and does not change normal production outputs.
@@ -221,6 +238,7 @@ Enable specific drawing tools by adding boolean attributes (presence = enabled):
221
238
  - **`draw-circle`**: Enable circle drawing tool
222
239
  - **`draw-layer-cake`**: Enable Layer Cake tool for creating concentric donut polygons
223
240
  - **`draw-marker`**: Enable point marker drawing tool
241
+ - **`draw-move`**: Enable move/translate tool for repositioning existing features (with Save/Cancel confirmation)
224
242
  - **`draw-ruler`**: Enable measurement/ruler tool for distances and areas
225
243
 
226
244
  ```html
@@ -231,6 +249,7 @@ Enable specific drawing tools by adding boolean attributes (presence = enabled):
231
249
  draw-circle
232
250
  draw-layer-cake
233
251
  draw-marker
252
+ draw-move
234
253
  draw-ruler
235
254
  ></leaflet-geokit>
236
255
  ```
@@ -707,6 +726,7 @@ A. Basic HTML, served by Vite (development)
707
726
  draw-circle
708
727
  draw-layer-cake
709
728
  draw-marker
729
+ draw-move
710
730
  edit-features
711
731
  delete-features
712
732
  log-level="debug"
@@ -803,14 +823,13 @@ import { initDjangoGeokit } from "@florasync/leaflet-geokit/django";
803
823
 
804
824
  ### Preact
805
825
 
806
- Use the Preact wrappers when you want component-level integration in Preact apps.
826
+ Use the Preact wrappers when you want component-level integration in Preact apps. We provide pre-baked wrappers that handle the custom element lifecycle and event synchronization.
807
827
 
808
- - Runtime dependency model: Preact is consumer-provided (peer dependency), so wrapper bundles stay thin.
828
+ - **Runtime dependency model**: Preact is consumer-provided (peer dependency), so wrapper bundles stay thin.
829
+ - **Shim docs**: [docs/shims/preact.md](docs/shims/preact.md)
830
+ - **Entrypoints**: [src/preact/index.tsx](src/preact/index.tsx), [src/preact-bundled/index.tsx](src/preact-bundled/index.tsx)
809
831
 
810
- - Shim docs: [docs/shims/preact.md](docs/shims/preact.md)
811
- - Entrypoints: [src/preact/index.tsx](src/preact/index.tsx), [src/preact-bundled/index.tsx](src/preact-bundled/index.tsx)
812
-
813
- ### Preact wrapper (additive Leaflet mode)
832
+ #### Preact wrapper (additive Leaflet mode)
814
833
 
815
834
  If your Preact app already loads Leaflet + Leaflet.draw, use the Preact shim:
816
835
 
@@ -847,14 +866,13 @@ See full Preact shim docs: [docs/shims/preact.md](docs/shims/preact.md)
847
866
 
848
867
  ### React
849
868
 
850
- Use the React wrappers when you want component-level integration in React apps.
851
-
852
- - Runtime dependency model: React/ReactDOM are consumer-provided (peer dependencies), so wrapper bundles stay thin.
869
+ Use the React wrappers when you want component-level integration in React apps. These wrappers provide a first-class React experience for the web component.
853
870
 
854
- - Shim docs: [docs/shims/react.md](docs/shims/react.md)
855
- - Entrypoints: [src/react/index.tsx](src/react/index.tsx), [src/react-bundled/index.tsx](src/react-bundled/index.tsx)
871
+ - **Runtime dependency model**: React/ReactDOM are consumer-provided (peer dependencies), so wrapper bundles stay thin.
872
+ - **Shim docs**: [docs/shims/react.md](docs/shims/react.md)
873
+ - **Entrypoints**: [src/react/index.tsx](src/react/index.tsx), [src/react-bundled/index.tsx](src/react-bundled/index.tsx)
856
874
 
857
- ### React wrapper (additive Leaflet mode)
875
+ #### React wrapper (additive Leaflet mode)
858
876
 
859
877
  If your React app already loads Leaflet + Leaflet.draw, use the React shim:
860
878