feat: v0.5.0 map subpath exports + DatePickerCard [BDOK-155]#19
Conversation
- Split map provider adapters into separate subpath exports so consumers
only pay for the adapter they use:
@bagdock/hive-react/map — core HiveMapView + types
@bagdock/hive-react/map/mapbox — Mapbox GL adapter
@bagdock/hive-react/map/maptiler — MapTiler adapter
@bagdock/hive-react/map/stadia — Stadia adapter
@bagdock/hive-react/map/radar — Radar adapter
@bagdock/hive-react/map/google — Google Maps adapter
The map exports are dropped from the root bundle; consumers must update
their imports to the subpaths.
- Add DatePickerCard tool card for move-in / move-out date selection in
the agent sidebar.
- Normalise facility address handling in SearchResultsCard and
FacilityDetailCard so both string and object shapes (with line1/street,
city, postcode) render consistently.
- Guard optional price/cover fields in HiveCheckoutFlow with ?? 0 so
undefined plan entries no longer crash.
- Switch tsup to a config-driven entry map and move map SDK externals
(mapbox-gl, @maptiler/sdk, maplibre-gl, radar-sdk-js) into
tsup.config.ts so build/dev scripts stay in sync.
Bumps package.json to 0.5.0. No @bagdock/types imports — the package
owns its own public types via dist/types-*.d.ts.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (11)
WalkthroughThe pull request restructures module exports to support granular imports via dedicated entry points for map providers (mapbox, maptiler, stadia, radar, Google), updates the build configuration to generate multiple distribution bundles, consolidates main barrel exports, adds a new DatePickerCard component for date selection workflows, and implements defensive null-handling in price/coverage display logic. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ToolSystem as Tool Rendering<br/>System
participant DatePicker as DatePickerCard
participant MessageHandler as Message<br/>Handler
User->>ToolSystem: Receives collectDates tool with suggested dates
ToolSystem->>DatePicker: Renders DatePickerCard with suggestedMoveIn/Out
DatePicker->>DatePicker: User selects dates or flexibility option
User->>DatePicker: Clicks confirm
DatePicker->>MessageHandler: onConfirm({moveIn, moveOut}) via onSendMessage
MessageHandler->>MessageHandler: Formats message with selected dates
MessageHandler->>User: Sends move-in/move-out confirmation message
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~28 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
apps/customer'sAgentSidebarPanel).SearchResultsCardandFacilityDetailCardso both string and object shapes render consistently.plan.coverAmount/plan.pricePerMonth/addon.pricePerMonthinHiveCheckoutFlow(fixes runtime crashes when plan entries are partial).tsup.config.tssobuildanddevscripts stay in sync.New subpath exports
@bagdock/hive-react/mapHiveMapView+ shared types (HiveMapAdapter,HiveMapViewProps,MapFacility,MapAppearance)@bagdock/hive-react/map/mapboxmapboxAdapter+MapboxAdapterOptions@bagdock/hive-react/map/maptilermaptilerAdapter+MapTilerAdapterOptions@bagdock/hive-react/map/stadiastadiaAdapter+StadiaAdapterOptions@bagdock/hive-react/map/radarradarAdapter+RadarAdapterOptions@bagdock/hive-react/map/googlegoogleMapsAdapter+GoogleMapsAdapterOptionsBreaking change
Consumers importing map adapters from the root bundle must switch to the new subpaths:
Types hygiene
This package owns its own public types via
dist/types-*.d.ts. It does not import from@bagdock/types(verified — zero matches insrc/).Why now
Monorepo apps (
apps/operator,apps/customer,apps/customer-platform,apps/web,packages/ui) pin@bagdock/hive-react@^0.5.0. The current npm max is0.4.2, sobun install --frozen-lockfilein the Hono deploy workflow fails with:This release unblocks those deploys. A follow-up monorepo PR (BDOK-156) will also DRY the CI clone loop.
Test plan
bun run typecheck— cleanbun run build— emits 7 entry bundles (index + 6 map subpaths) in CJS + ESM + DTS.github/workflows/ci.yml) passes on the PRgh release create v0.5.0 --target maintriggerspublish.ymlnpm view @bagdock/hive-react@0.5.0 versionreturns0.5.0Linear
Closes BDOK-155
Summary by CodeRabbit
New Features
Bug Fixes
Chores