@juv/codego-react-ui 1.1.7 → 3.0.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 +15 -0
- package/dist/index.cjs +680 -134
- package/dist/index.d.cts +33 -4
- package/dist/index.d.ts +33 -4
- package/dist/index.global.js +727 -164
- package/dist/index.js +681 -135
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -381,6 +381,9 @@ import { Button, Card, Modal } from "@juv/codego-react-ui"
|
|
|
381
381
|
| `maxBearing` | `number` | `180` | Maximum bearing constraint. |
|
|
382
382
|
| `flyTo` | `FlyToOptions` | | Triggers animated camera flight when reference changes. |
|
|
383
383
|
| `markers` | `MapLibreMarker[]` | `[]` | Array of markers to render. |
|
|
384
|
+
| `routes` | `MapLibreRoute[]` | `[]` | Array of routes to draw via OSRM. |
|
|
385
|
+
| `cluster` | `boolean` | `false` | Enable marker clustering. |
|
|
386
|
+
| `clusterVariant` | `"default" \| "bubble" \| "donut"` | `"default"` | Cluster icon style. |
|
|
384
387
|
| `height` | `string \| number` | `480` | Map height in px or CSS string. |
|
|
385
388
|
| `showControls` | `boolean` | `true` | Show navigation, scale, and fullscreen controls. |
|
|
386
389
|
| `showStyleSwitcher` | `boolean` | `true` | Show the bottom style switcher bar. |
|
|
@@ -388,6 +391,18 @@ import { Button, Card, Modal } from "@juv/codego-react-ui"
|
|
|
388
391
|
| `className` | `string` | | Additional CSS classes on the wrapper. |
|
|
389
392
|
| `onMarkerClick` | `(marker: MapLibreMarker) => void` | | Fired when a marker is clicked. |
|
|
390
393
|
|
|
394
|
+
### MapLibreRoute
|
|
395
|
+
|
|
396
|
+
| Prop | Type | Required | Description |
|
|
397
|
+
|---|---|---|---|
|
|
398
|
+
| `start` | `{ lat: number; lng: number }` | ✓ | Route start coordinate. |
|
|
399
|
+
| `end` | `{ lat: number; lng: number }` | ✓ | Route end coordinate. |
|
|
400
|
+
| `waypoints` | `{ lat: number; lng: number }[]` | | Optional intermediate stops. |
|
|
401
|
+
| `routeType` | `"drive" \| "walk"` | | OSRM routing profile. Default `"drive"`. |
|
|
402
|
+
| `color` | `string` | | Line color hex. Defaults to `#6366f1` (drive) or `#22c55e` (walk). |
|
|
403
|
+
| `weight` | `number` | | Line weight in px. Default `5`. |
|
|
404
|
+
| `label` | `string` | | Label shown in start/end popups. |
|
|
405
|
+
|
|
391
406
|
### MapLibreMarker
|
|
392
407
|
|
|
393
408
|
| Prop | Type | Required | Description |
|