@gramps-connect/story 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/README.md CHANGED
@@ -16,7 +16,7 @@ writes them and presents them with this package's player.
16
16
  - **Change a story, or make one:** the Story Editor, at
17
17
  **https://dsblank.github.io/gramps-connect-stories/edit.html** (or
18
18
  **Edit** on an open story in the viewer). Titles, dates, text, photos,
19
- places and the order of slides; it saves a new `.story.zip`, back into
19
+ places, shapes and old maps on the map, and the order of slides; it saves a new `.story.zip`, back into
20
20
  the opened file in Chrome and Edge. Also entirely in the browser, except
21
21
  a place search on Wikidata when you ask for one.
22
22
  - **Put a story on a web page:** the [`<gramps-connect-story>`](#on-any-web-page-gramps-connect-story)
@@ -180,15 +180,24 @@ coordinates, or pick one of the story's other places to use the very same
180
180
  one (its shape and map overlays too). **Find on Wikidata** looks the name
181
181
  up and puts the pin there; it's the only thing the editor sends anywhere,
182
182
  the name only, and only when clicked. Pass `placeSearch` to use another
183
- service, or `placeSearch={null}` to leave it out. Shapes and overlays
184
- aren't edited yet, only kept.
183
+ service, or `placeSearch={null}` to leave it out.
184
+
185
+ **Edit map** opens the place's map full screen: draw shapes (points,
186
+ lines, areas) or import them from a KML, GPX or GeoJSON file, and lay
187
+ scans of old maps over it (stored at up to 2048px, PNG when they have
188
+ transparency), moving, resizing, rotating or dragging their corners to
189
+ line them up, with the years each one shows. The map editor itself is
190
+ `MapEditor`, which Gramps Connect's own map overlay editor uses too; the
191
+ plain functions behind it (map files, the shape model, overlay geometry)
192
+ are `@gramps-connect/story/map-edit`. The editor also needs `terra-draw`
193
+ and `terra-draw-maplibre-gl-adapter` (optional peer dependencies).
185
194
 
186
195
  The editor is built with [Mantine](https://mantine.dev) 8 (optional peer
187
196
  dependencies `@mantine/core` and `@mantine/hooks`, needed only by the
188
197
  editor): wrap it in a `MantineProvider` and load Mantine's stylesheet. The
189
198
  pieces it's made of (`SlideList`, `StoryTextField`, `DateField`,
190
- `PlaceField`, `PhotosField`) and its editing functions (`addSlide`, `moveSlide`,
191
- `updateSlide`, `addImage`, undo history, ...) are exported too.
199
+ `PlaceField`, `PhotosField`, `MapEditor`, `PlaceMapDialog`) and its editing functions (`addSlide`, `moveSlide`,
200
+ `updateSlide`, `addImage`, undo history (`History<T>`, for any document), ...) are exported too.
192
201
 
193
202
  ## Writing stories from Python: `python/gramps_connect_story.py`
194
203