react-listing-engine 0.6.3 → 0.6.5

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 (43) hide show
  1. package/README.md +37 -40
  2. package/dist/{chunk-KLKVHYH3.js → chunk-CGT3RHJ7.js} +1 -1
  3. package/dist/{chunk-3FOG7ENO.cjs → chunk-RXHR66FS.cjs} +1 -1
  4. package/dist/{components-provider-CjMxkxrP.d.ts → components-provider-FinfaqUT.d.cts} +13 -2
  5. package/dist/{components-provider-CF0Mo0B8.d.cts → components-provider-cWVWEDXC.d.ts} +13 -2
  6. package/dist/index.cjs +1 -1
  7. package/dist/index.d.cts +7 -10
  8. package/dist/index.d.ts +7 -10
  9. package/dist/index.js +1 -1
  10. package/dist/{listing-app-DDKZ6Inn.d.ts → listing-app-BMoMKD4c.d.cts} +12 -11
  11. package/dist/{listing-app-D2UB9ru3.d.cts → listing-app-BSJKGh7k.d.ts} +12 -11
  12. package/dist/map-provider.interface-DT-v1plm.d.cts +67 -0
  13. package/dist/map-provider.interface-DT-v1plm.d.ts +67 -0
  14. package/dist/maps/google/index.d.cts +1 -2
  15. package/dist/maps/google/index.d.ts +1 -2
  16. package/dist/shadcn/index.cjs +1 -1
  17. package/dist/shadcn/index.d.cts +5 -7
  18. package/dist/shadcn/index.d.ts +5 -7
  19. package/dist/shadcn/index.js +1 -1
  20. package/dist/styled/index.cjs +1 -1
  21. package/dist/styled/index.d.cts +3 -5
  22. package/dist/styled/index.d.ts +3 -5
  23. package/dist/styled/index.js +1 -1
  24. package/dist/styles.css +20 -7
  25. package/dist/testing/index.d.cts +1 -2
  26. package/dist/testing/index.d.ts +1 -2
  27. package/dist/{url-sync.controller-DX67JivW.d.ts → url-sync.controller-DK5W_0OZ.d.ts} +1 -1
  28. package/dist/{url-sync.controller-CsU_QxoS.d.cts → url-sync.controller-DXSIWgTa.d.cts} +1 -1
  29. package/package.json +1 -6
  30. package/dist/chunk-5FBI2WIM.js +0 -2
  31. package/dist/chunk-6PZHSHU3.js +0 -2
  32. package/dist/chunk-CHNUE46K.cjs +0 -2
  33. package/dist/chunk-LCQZIWBO.cjs +0 -2
  34. package/dist/entity-adapter.interface-BDgbSxhq.d.cts +0 -33
  35. package/dist/entity-adapter.interface-BDgbSxhq.d.ts +0 -33
  36. package/dist/listing-config-options.interface-ZJYY_ZvR.d.cts +0 -12
  37. package/dist/listing-config-options.interface-ZJYY_ZvR.d.ts +0 -12
  38. package/dist/map-provider.interface-BMnwW3ob.d.cts +0 -37
  39. package/dist/map-provider.interface-BxexMT3X.d.ts +0 -37
  40. package/dist/presets/rental/index.cjs +0 -2
  41. package/dist/presets/rental/index.d.cts +0 -266
  42. package/dist/presets/rental/index.d.ts +0 -266
  43. package/dist/presets/rental/index.js +0 -2
@@ -0,0 +1,67 @@
1
+ type EntityId = string | number;
2
+ interface Bounds {
3
+ west: number;
4
+ south: number;
5
+ east: number;
6
+ north: number;
7
+ }
8
+ interface LatLng {
9
+ lat: number;
10
+ lng: number;
11
+ }
12
+ interface PageRequest {
13
+ cursor?: string | null;
14
+ limit: number;
15
+ }
16
+ interface Page<T> {
17
+ items: T[];
18
+ nextCursor: string | null;
19
+ total?: number;
20
+ }
21
+ interface MapPoint<TEntity = unknown> {
22
+ id: EntityId;
23
+ position: LatLng;
24
+ entity: TEntity;
25
+ }
26
+ type QueryParams = Record<string, string | undefined>;
27
+ interface EntityAdapter<TEntity, TFilters> {
28
+ list(filters: TFilters, page: PageRequest): Promise<Page<TEntity>>;
29
+ getPoints(filters: TFilters, bounds: Bounds): Promise<MapPoint<TEntity>[]>;
30
+ getById?(id: EntityId): Promise<TEntity>;
31
+ }
32
+
33
+ /**
34
+ * Providers that need an API key take it via their factory (e.g. `googleProvider({ apiKey })`),
35
+ * not per-mount.
36
+ */
37
+ interface MapInitOptions {
38
+ apiKey?: string;
39
+ center?: LatLng;
40
+ zoom?: number;
41
+ }
42
+ interface MapHandle {
43
+ readonly raw: unknown;
44
+ }
45
+ interface RenderedLayer {
46
+ id: string;
47
+ markers: Array<{
48
+ id: string | number;
49
+ position: LatLng;
50
+ iconUrl?: string;
51
+ element?: HTMLElement;
52
+ }>;
53
+ clustering?: {
54
+ maxZoom?: number;
55
+ } | false;
56
+ onMarkerClick?(id: string | number): void;
57
+ }
58
+ type Unsubscribe = () => void;
59
+ interface MapProvider {
60
+ mount(el: HTMLElement, opts: MapInitOptions): Promise<MapHandle> | MapHandle;
61
+ renderLayer(handle: MapHandle, layer: RenderedLayer): Unsubscribe;
62
+ onBoundsChange(handle: MapHandle, cb: (b: Bounds) => void): Unsubscribe;
63
+ fitBounds(handle: MapHandle, b: Bounds): void;
64
+ destroy(handle: MapHandle): void;
65
+ }
66
+
67
+ export type { Bounds as B, EntityId as E, LatLng as L, MapPoint as M, Page as P, QueryParams as Q, RenderedLayer as R, Unsubscribe as U, MapProvider as a, EntityAdapter as b, MapHandle as c, MapInitOptions as d, PageRequest as e };
@@ -0,0 +1,67 @@
1
+ type EntityId = string | number;
2
+ interface Bounds {
3
+ west: number;
4
+ south: number;
5
+ east: number;
6
+ north: number;
7
+ }
8
+ interface LatLng {
9
+ lat: number;
10
+ lng: number;
11
+ }
12
+ interface PageRequest {
13
+ cursor?: string | null;
14
+ limit: number;
15
+ }
16
+ interface Page<T> {
17
+ items: T[];
18
+ nextCursor: string | null;
19
+ total?: number;
20
+ }
21
+ interface MapPoint<TEntity = unknown> {
22
+ id: EntityId;
23
+ position: LatLng;
24
+ entity: TEntity;
25
+ }
26
+ type QueryParams = Record<string, string | undefined>;
27
+ interface EntityAdapter<TEntity, TFilters> {
28
+ list(filters: TFilters, page: PageRequest): Promise<Page<TEntity>>;
29
+ getPoints(filters: TFilters, bounds: Bounds): Promise<MapPoint<TEntity>[]>;
30
+ getById?(id: EntityId): Promise<TEntity>;
31
+ }
32
+
33
+ /**
34
+ * Providers that need an API key take it via their factory (e.g. `googleProvider({ apiKey })`),
35
+ * not per-mount.
36
+ */
37
+ interface MapInitOptions {
38
+ apiKey?: string;
39
+ center?: LatLng;
40
+ zoom?: number;
41
+ }
42
+ interface MapHandle {
43
+ readonly raw: unknown;
44
+ }
45
+ interface RenderedLayer {
46
+ id: string;
47
+ markers: Array<{
48
+ id: string | number;
49
+ position: LatLng;
50
+ iconUrl?: string;
51
+ element?: HTMLElement;
52
+ }>;
53
+ clustering?: {
54
+ maxZoom?: number;
55
+ } | false;
56
+ onMarkerClick?(id: string | number): void;
57
+ }
58
+ type Unsubscribe = () => void;
59
+ interface MapProvider {
60
+ mount(el: HTMLElement, opts: MapInitOptions): Promise<MapHandle> | MapHandle;
61
+ renderLayer(handle: MapHandle, layer: RenderedLayer): Unsubscribe;
62
+ onBoundsChange(handle: MapHandle, cb: (b: Bounds) => void): Unsubscribe;
63
+ fitBounds(handle: MapHandle, b: Bounds): void;
64
+ destroy(handle: MapHandle): void;
65
+ }
66
+
67
+ export type { Bounds as B, EntityId as E, LatLng as L, MapPoint as M, Page as P, QueryParams as Q, RenderedLayer as R, Unsubscribe as U, MapProvider as a, EntityAdapter as b, MapHandle as c, MapInitOptions as d, PageRequest as e };
@@ -1,6 +1,5 @@
1
1
  import { APIOptions } from '@googlemaps/js-api-loader';
2
- import { M as MapProvider } from '../../map-provider.interface-BMnwW3ob.cjs';
3
- import '../../entity-adapter.interface-BDgbSxhq.cjs';
2
+ import { a as MapProvider } from '../../map-provider.interface-DT-v1plm.cjs';
4
3
 
5
4
  interface GoogleMapsProviderConfig {
6
5
  /** Google Maps JavaScript API key. Required -- there is no hardcoded fallback. */
@@ -1,6 +1,5 @@
1
1
  import { APIOptions } from '@googlemaps/js-api-loader';
2
- import { M as MapProvider } from '../../map-provider.interface-BxexMT3X.js';
3
- import '../../entity-adapter.interface-BDgbSxhq.js';
2
+ import { a as MapProvider } from '../../map-provider.interface-DT-v1plm.js';
4
3
 
5
4
  interface GoogleMapsProviderConfig {
6
5
  /** Google Maps JavaScript API key. Required -- there is no hardcoded fallback. */
@@ -1,2 +1,2 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
- var _chunkEYXV5OMYcjs = require('../chunk-EYXV5OMY.cjs');var _chunkLCQZIWBOcjs = require('../chunk-LCQZIWBO.cjs');var _chunk2VUHLHHXcjs = require('../chunk-2VUHLHHX.cjs');var _jsxruntime = require('react/jsx-runtime');function oe(e){return typeof e!="number"?e:new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(e)}function w({item:e,selected:i,onSelect:t}){let r=_nullishCoalesce(e, () => ({})),l=_chunkLCQZIWBOcjs.a.call(void 0, "flex w-full flex-col overflow-hidden rounded-lg border bg-card text-left text-card-foreground shadow-sm","motion-safe:transition-shadow",t&&"hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",i&&"ring-2 ring-ring"),a=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[r.imageUrl&&_jsxruntime.jsx.call(void 0, "img",{src:r.imageUrl,alt:_nullishCoalesce(r.title, () => ("")),className:"aspect-video w-full rounded-t-lg object-cover"}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-1 flex-col gap-1 p-3",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-start justify-between gap-2",children:[r.title&&_jsxruntime.jsx.call(void 0, "span",{className:"font-medium",children:r.title}),r.badge&&_jsxruntime.jsx.call(void 0, "span",{className:"shrink-0 rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:r.badge})]}),r.subtitle&&_jsxruntime.jsx.call(void 0, "span",{className:"text-sm text-muted-foreground",children:r.subtitle}),r.price!=null&&_jsxruntime.jsx.call(void 0, "span",{className:"mt-1 font-semibold tabular-nums",children:oe(r.price)})]})]});return t?_jsxruntime.jsx.call(void 0, "button",{type:"button",onClick:t,"aria-pressed":_nullishCoalesce(i, () => (!1)),className:l,children:a}):_jsxruntime.jsx.call(void 0, "article",{className:l,children:a})}function C(e){return _jsxruntime.jsxs.call(void 0, "div",{role:"status",className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:"h-8 w-8","aria-hidden":"true",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"11",cy:"11",r:"7"}),_jsxruntime.jsx.call(void 0, "path",{d:"m21 21-4.3-4.3"})]}),_jsxruntime.jsx.call(void 0, "p",{className:"text-sm font-medium text-foreground",children:"No results"}),_jsxruntime.jsx.call(void 0, "p",{className:"text-xs text-muted-foreground",children:"Try adjusting your filters or search terms."})]})}function I({children:e}){return _jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col gap-3",children:e})}function D(e){return _jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col gap-3 p-3",role:"status","aria-busy":"true","aria-label":"Loading results",children:Array.from({length:3}).map((i,t)=>_jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-col gap-2 motion-safe:animate-pulse",children:[_jsxruntime.jsx.call(void 0, "div",{className:"aspect-video w-full rounded-md bg-muted"}),_jsxruntime.jsx.call(void 0, "div",{className:"h-4 w-2/3 rounded-md bg-muted"}),_jsxruntime.jsx.call(void 0, "div",{className:"h-3 w-1/3 rounded-md bg-muted"})]},t))})}function M({point:e}){let i=_nullishCoalesce(e.entity, () => ({}));return _jsxruntime.jsx.call(void 0, "span",{className:"rounded-full border bg-background px-2 py-0.5 text-xs font-medium tabular-nums shadow-sm",children:_nullishCoalesce(i.price, () => (""))})}function F({entity:e,onClose:i}){let t=_nullishCoalesce(e, () => ({}));return _jsxruntime.jsxs.call(void 0, "div",{className:"relative w-64 rounded-lg border bg-popover p-3 text-popover-foreground shadow-md",role:"group","aria-label":"Location details",children:[_jsxruntime.jsx.call(void 0, "button",{type:"button",onClick:i,"aria-label":"Close",className:"absolute right-2 top-2 rounded-md p-1 text-muted-foreground motion-safe:transition-colors hover:bg-foreground/[0.06] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4","aria-hidden":"true",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M18 6 6 18"}),_jsxruntime.jsx.call(void 0, "path",{d:"m6 6 12 12"})]})}),_jsxruntime.jsxs.call(void 0, "div",{className:"pr-6",children:[t.title&&_jsxruntime.jsx.call(void 0, "div",{className:"font-medium",children:t.title}),t.subtitle&&_jsxruntime.jsx.call(void 0, "div",{className:"text-sm text-muted-foreground",children:t.subtitle}),t.price!=null&&_jsxruntime.jsx.call(void 0, "div",{className:"mt-1 font-semibold tabular-nums",children:t.price})]})]})}function S({count:e,total:i}){let t=i!=null&&i!==e?`${e} of ${i} results`:`${e} results`;return _jsxruntime.jsx.call(void 0, "div",{className:"text-sm tabular-nums text-muted-foreground",children:t})}function T({value:e,onChange:i,placeholder:t}){return _jsxruntime.jsx.call(void 0, "input",{type:"search",value:e,placeholder:t,onChange:r=>i(r.target.value),"aria-label":_nullishCoalesce(t, () => ("Search")),className:_chunkLCQZIWBOcjs.a.call(void 0, "h-9 w-full rounded-md border bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground","focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring")})}function R({children:e}){return _jsxruntime.jsx.call(void 0, "aside",{className:"flex w-full flex-col gap-4 p-4 md:border-r md:border-border",children:e})}function A({children:e}){return _jsxruntime.jsx.call(void 0, "div",{className:"flex items-center gap-2 border-b p-2",children:e})}var g={Card:w,Marker:M,Popup:F,Sidebar:R,FilterPanel:I,Search:T,Empty:C,Loading:D,ResultHeader:S,Toolbar:A};function fe({children:e}){return _jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.p,{...g,children:e})}var _react = require('react');var ve=_jsxruntime.jsx.call(void 0, "p",{className:"px-4 text-center text-sm text-muted-foreground",children:"Map unavailable - provide a Google Maps API key"});function E({search:e,className:i,toolbarEnd:t,autoFetch:r=!0,mapCenter:l,mapZoom:a}){let p=_chunkEYXV5OMYcjs.s.call(void 0, ),{Search:u}=_chunkEYXV5OMYcjs.q.call(void 0, ),[f,y]=_react.useState.call(void 0, "list");_react.useEffect.call(void 0, ()=>{r!==!1&&p.applyFilters({})},[p,r]);let h=f==="map"?"hidden md:block":"block",P=f==="list"?"hidden md:block":"block";return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkLCQZIWBOcjs.a.call(void 0, "flex h-full min-h-0 w-full flex-col bg-background text-foreground",i),"data-slot":"listing-layout",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"sticky top-0 z-10 flex flex-wrap items-end gap-3 border-b border-border bg-background p-3","data-slot":"listing-layout-filter-bar",children:[e&&_jsxruntime.jsx.call(void 0, "div",{className:"w-full min-w-0 sm:w-auto sm:max-w-xs sm:flex-1",children:_jsxruntime.jsx.call(void 0, u,{value:e.value,onChange:e.onChange,placeholder:e.placeholder})}),_jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.v,{className:"flex flex-wrap items-end gap-3",groupClassName:"min-w-0"}),_jsxruntime.jsxs.call(void 0, "div",{className:"ml-auto flex items-center gap-3",children:[_jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.A,{}),t]})]}),_jsxruntime.jsx.call(void 0, "div",{className:"flex items-center justify-center gap-1 border-b border-border bg-background p-2 md:hidden","data-slot":"listing-layout-mobile-toggle",children:_jsxruntime.jsx.call(void 0, "div",{role:"group","aria-label":"View",className:"inline-flex rounded-md border border-border p-0.5",children:[{view:"list",label:"List"},{view:"map",label:"Map"}].map(({view:d,label:n})=>_jsxruntime.jsx.call(void 0, "button",{type:"button","aria-pressed":f===d,onClick:()=>y(d),className:_chunkLCQZIWBOcjs.a.call(void 0, "rounded-[5px] px-3 py-1 text-sm font-medium motion-safe:transition-colors",f===d?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground"),children:n},d))})}),_jsxruntime.jsxs.call(void 0, "div",{className:"grid min-h-0 flex-1 md:grid-cols-[minmax(340px,42%)_1fr]","data-slot":"listing-layout-split",children:[_jsxruntime.jsxs.call(void 0, "div",{className:_chunkLCQZIWBOcjs.a.call(void 0, "min-h-0 overflow-y-auto p-3",h),"data-slot":"listing-layout-list",children:[_jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.x,{className:"grid content-start gap-3 [grid-template-columns:repeat(auto-fill,minmax(200px,1fr))]"}),_jsxruntime.jsx.call(void 0, "div",{className:"mt-4 flex justify-center",children:_jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.z,{})})]}),_jsxruntime.jsx.call(void 0, "div",{className:_chunkLCQZIWBOcjs.a.call(void 0, "min-h-0 md:sticky md:top-0",P),"data-slot":"listing-layout-map",children:_jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.y,{center:l,zoom:a,fallback:ve})})]})]})}function ee(e){return"provider"in e}function ye(e){let i=e!=null&&!ee(e),t=i?e.apiKey:void 0,r=i?e.mapId:void 0,[l,a]=_react.useState.call(void 0, ()=>!e||ee(e)?{ready:!0,provider:_optionalChain([e, 'optionalAccess', _2 => _2.provider])}:{ready:!1});return _react.useEffect.call(void 0, ()=>{if(!t)return;let p=!1;return Promise.resolve().then(() => _interopRequireWildcard(require("../maps/google/index.cjs"))).then(({googleProvider:u})=>{p||a({ready:!0,provider:u({apiKey:t,mapId:r})})}),()=>{p=!0}},[t,r]),l}function he(e){let{datasets:i,filters:t,map:r,components:l,urlSync:a,initialFilters:p,config:u,className:f,search:y,autoFetch:h}=e,{ready:P,provider:d}=ye(r);if(!P)return null;let n=[];for(let ie of i)n.push(_chunkEYXV5OMYcjs.k.call(void 0, ie));t&&n.push(_chunkEYXV5OMYcjs.l.call(void 0, t)),d&&n.push(_chunkEYXV5OMYcjs.j.call(void 0, d)),a instanceof _chunk2VUHLHHXcjs.a&&n.push(_chunkEYXV5OMYcjs.m.call(void 0, a)),p&&n.push(_chunkEYXV5OMYcjs.n.call(void 0, p)),u&&n.push(_chunkEYXV5OMYcjs.i.call(void 0, u));let te=_chunkEYXV5OMYcjs.h.call(void 0, ...n),re={...g,...l};return _jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.B,{...te,children:_jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.p,{...re,children:_jsxruntime.jsx.call(void 0, E,{className:f,search:y,autoFetch:h,mapCenter:_optionalChain([r, 'optionalAccess', _3 => _3.center]),mapZoom:_optionalChain([r, 'optionalAccess', _4 => _4.zoom])})})})}exports.DefaultCard = w; exports.DefaultEmpty = C; exports.DefaultFilterPanel = I; exports.DefaultLoading = D; exports.DefaultMarker = M; exports.DefaultPopup = F; exports.DefaultResultHeader = S; exports.DefaultSearch = T; exports.DefaultSidebar = R; exports.DefaultToolbar = A; exports.ListingApp = he; exports.ListingComponentsProviderWithDefaults = fe; exports.ListingLayout = E; exports.cn = _chunkLCQZIWBOcjs.a; exports.shadcnDefaultComponents = g;
2
+ var _chunk2VUHLHHXcjs = require('../chunk-2VUHLHHX.cjs');var _chunkEYXV5OMYcjs = require('../chunk-EYXV5OMY.cjs');var _clsx = require('clsx');var _tailwindmerge = require('tailwind-merge');function s(...e){return _tailwindmerge.twMerge.call(void 0, _clsx.clsx.call(void 0, e))}var _jsxruntime = require('react/jsx-runtime');function ae(e){return typeof e!="number"?e:new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(e)}function w({item:e,selected:o,onSelect:t}){let r=_nullishCoalesce(e, () => ({})),l=s("flex w-full flex-col overflow-hidden rounded-lg border bg-card text-left text-card-foreground shadow-sm","motion-safe:transition-shadow",t&&"hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",o&&"ring-2 ring-ring"),a=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[r.imageUrl&&_jsxruntime.jsx.call(void 0, "img",{src:r.imageUrl,alt:_nullishCoalesce(r.title, () => ("")),className:"aspect-video w-full rounded-t-lg object-cover"}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-1 flex-col gap-1 p-3",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-start justify-between gap-2",children:[r.title&&_jsxruntime.jsx.call(void 0, "span",{className:"font-medium",children:r.title}),r.badge&&_jsxruntime.jsx.call(void 0, "span",{className:"shrink-0 rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:r.badge})]}),r.subtitle&&_jsxruntime.jsx.call(void 0, "span",{className:"text-sm text-muted-foreground",children:r.subtitle}),r.price!=null&&_jsxruntime.jsx.call(void 0, "span",{className:"mt-1 font-semibold tabular-nums",children:ae(r.price)})]})]});return t?_jsxruntime.jsx.call(void 0, "button",{type:"button",onClick:t,"aria-pressed":_nullishCoalesce(o, () => (!1)),className:l,children:a}):_jsxruntime.jsx.call(void 0, "article",{className:l,children:a})}function C(e){return _jsxruntime.jsxs.call(void 0, "div",{role:"status",className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:"h-8 w-8","aria-hidden":"true",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"11",cy:"11",r:"7"}),_jsxruntime.jsx.call(void 0, "path",{d:"m21 21-4.3-4.3"})]}),_jsxruntime.jsx.call(void 0, "p",{className:"text-sm font-medium text-foreground",children:"No results"}),_jsxruntime.jsx.call(void 0, "p",{className:"text-xs text-muted-foreground",children:"Try adjusting your filters or search terms."})]})}function I({children:e}){return _jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col gap-3",children:e})}function D(e){return _jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col gap-3 p-3",role:"status","aria-busy":"true","aria-label":"Loading results",children:Array.from({length:3}).map((o,t)=>_jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-col gap-2 motion-safe:animate-pulse",children:[_jsxruntime.jsx.call(void 0, "div",{className:"aspect-video w-full rounded-md bg-muted"}),_jsxruntime.jsx.call(void 0, "div",{className:"h-4 w-2/3 rounded-md bg-muted"}),_jsxruntime.jsx.call(void 0, "div",{className:"h-3 w-1/3 rounded-md bg-muted"})]},t))})}function M({point:e}){let o=_nullishCoalesce(e.entity, () => ({}));return _jsxruntime.jsx.call(void 0, "span",{className:"rounded-full border bg-background px-2 py-0.5 text-xs font-medium tabular-nums shadow-sm",children:_nullishCoalesce(o.price, () => (""))})}function F({entity:e,onClose:o}){let t=_nullishCoalesce(e, () => ({}));return _jsxruntime.jsxs.call(void 0, "div",{className:"relative w-64 rounded-lg border bg-popover p-3 text-popover-foreground shadow-md",role:"group","aria-label":"Location details",children:[_jsxruntime.jsx.call(void 0, "button",{type:"button",onClick:o,"aria-label":"Close",className:"absolute right-2 top-2 rounded-md p-1 text-muted-foreground motion-safe:transition-colors hover:bg-foreground/[0.06] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4","aria-hidden":"true",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M18 6 6 18"}),_jsxruntime.jsx.call(void 0, "path",{d:"m6 6 12 12"})]})}),_jsxruntime.jsxs.call(void 0, "div",{className:"pr-6",children:[t.title&&_jsxruntime.jsx.call(void 0, "div",{className:"font-medium",children:t.title}),t.subtitle&&_jsxruntime.jsx.call(void 0, "div",{className:"text-sm text-muted-foreground",children:t.subtitle}),t.price!=null&&_jsxruntime.jsx.call(void 0, "div",{className:"mt-1 font-semibold tabular-nums",children:t.price})]})]})}function S({count:e,total:o}){let t=o!=null&&o!==e?`${e} of ${o} results`:`${e} results`;return _jsxruntime.jsx.call(void 0, "div",{className:"text-sm tabular-nums text-muted-foreground",children:t})}function T({value:e,onChange:o,placeholder:t}){return _jsxruntime.jsx.call(void 0, "input",{type:"search",value:e,placeholder:t,onChange:r=>o(r.target.value),"aria-label":_nullishCoalesce(t, () => ("Search")),className:s("h-9 w-full rounded-md border bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground","focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring")})}function R({children:e}){return _jsxruntime.jsx.call(void 0, "aside",{className:"flex w-full flex-col gap-4 p-4 md:border-r md:border-border",children:e})}function A({children:e}){return _jsxruntime.jsx.call(void 0, "div",{className:"flex items-center gap-2 border-b p-2",children:e})}var g={Card:w,Marker:M,Popup:F,Sidebar:R,FilterPanel:I,Search:T,Empty:C,Loading:D,ResultHeader:S,Toolbar:A};function ge({children:e}){return _jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.p,{...g,children:e})}var _react = require('react');var Le=_jsxruntime.jsx.call(void 0, "p",{className:"px-4 text-center text-sm text-muted-foreground",children:"Map unavailable - provide a Google Maps API key"});function E({search:e,className:o,toolbarEnd:t,autoFetch:r=!0,mapCenter:l,mapZoom:a}){let p=_chunkEYXV5OMYcjs.s.call(void 0, ),{Search:u}=_chunkEYXV5OMYcjs.q.call(void 0, ),[f,y]=_react.useState.call(void 0, "list");_react.useEffect.call(void 0, ()=>{r!==!1&&p.applyFilters({})},[p,r]);let h=f==="map"?"hidden md:block":"block",P=f==="list"?"hidden md:block":"block";return _jsxruntime.jsxs.call(void 0, "div",{className:s("flex h-full min-h-0 w-full flex-col bg-background text-foreground",o),"data-slot":"listing-layout",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"sticky top-0 z-10 flex flex-wrap items-end gap-3 border-b border-border bg-background p-3","data-slot":"listing-layout-filter-bar",children:[e&&_jsxruntime.jsx.call(void 0, "div",{className:"w-full min-w-0 sm:w-auto sm:max-w-xs sm:flex-1",children:_jsxruntime.jsx.call(void 0, u,{value:e.value,onChange:e.onChange,placeholder:e.placeholder})}),_jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.v,{className:"flex flex-wrap items-end gap-3",groupClassName:"min-w-0"}),_jsxruntime.jsxs.call(void 0, "div",{className:"ml-auto flex items-center gap-3",children:[_jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.A,{}),t]})]}),_jsxruntime.jsx.call(void 0, "div",{className:"flex items-center justify-center gap-1 border-b border-border bg-background p-2 md:hidden","data-slot":"listing-layout-mobile-toggle",children:_jsxruntime.jsx.call(void 0, "div",{role:"group","aria-label":"View",className:"inline-flex rounded-md border border-border p-0.5",children:[{view:"list",label:"List"},{view:"map",label:"Map"}].map(({view:d,label:n})=>_jsxruntime.jsx.call(void 0, "button",{type:"button","aria-pressed":f===d,onClick:()=>y(d),className:s("rounded-[5px] px-3 py-1 text-sm font-medium motion-safe:transition-colors",f===d?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground"),children:n},d))})}),_jsxruntime.jsxs.call(void 0, "div",{className:"grid min-h-0 flex-1 md:grid-cols-[minmax(340px,42%)_1fr]","data-slot":"listing-layout-split",children:[_jsxruntime.jsxs.call(void 0, "div",{className:s("min-h-0 overflow-y-auto p-3",h),"data-slot":"listing-layout-list",children:[_jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.x,{className:"grid content-start gap-3 [grid-template-columns:repeat(auto-fill,minmax(200px,1fr))]"}),_jsxruntime.jsx.call(void 0, "div",{className:"mt-4 flex justify-center",children:_jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.z,{})})]}),_jsxruntime.jsx.call(void 0, "div",{className:s("min-h-0 md:sticky md:top-0",P),"data-slot":"listing-layout-map",children:_jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.y,{center:l,zoom:a,fallback:Le})})]})]})}function ee(e){return"provider"in e}function Pe(e){let o=e!=null&&!ee(e),t=o?e.apiKey:void 0,r=o?e.mapId:void 0,[l,a]=_react.useState.call(void 0, ()=>!e||ee(e)?{ready:!0,provider:_optionalChain([e, 'optionalAccess', _2 => _2.provider])}:{ready:!1});return _react.useEffect.call(void 0, ()=>{if(!t)return;let p=!1;return Promise.resolve().then(() => _interopRequireWildcard(require("../maps/google/index.cjs"))).then(({googleProvider:u})=>{p||a({ready:!0,provider:u({apiKey:t,mapId:r})})}),()=>{p=!0}},[t,r]),l}function Ne(e){let{datasets:o,filters:t,map:r,components:l,urlSync:a,initialFilters:p,config:u,className:f,search:y,autoFetch:h}=e,{ready:P,provider:d}=Pe(r);if(!P)return null;let n=[];for(let oe of o)n.push(_chunkEYXV5OMYcjs.k.call(void 0, oe));t&&n.push(_chunkEYXV5OMYcjs.l.call(void 0, t)),d&&n.push(_chunkEYXV5OMYcjs.j.call(void 0, d)),a instanceof _chunk2VUHLHHXcjs.a&&n.push(_chunkEYXV5OMYcjs.m.call(void 0, a)),p&&n.push(_chunkEYXV5OMYcjs.n.call(void 0, p)),u&&n.push(_chunkEYXV5OMYcjs.i.call(void 0, u));let te=_chunkEYXV5OMYcjs.h.call(void 0, ...n),re={...g,...l};return _jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.B,{...te,children:_jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.p,{...re,children:_jsxruntime.jsx.call(void 0, E,{className:f,search:y,autoFetch:h,mapCenter:_optionalChain([r, 'optionalAccess', _3 => _3.center]),mapZoom:_optionalChain([r, 'optionalAccess', _4 => _4.zoom])})})})}exports.DefaultCard = w; exports.DefaultEmpty = C; exports.DefaultFilterPanel = I; exports.DefaultLoading = D; exports.DefaultMarker = M; exports.DefaultPopup = F; exports.DefaultResultHeader = S; exports.DefaultSearch = T; exports.DefaultSidebar = R; exports.DefaultToolbar = A; exports.ListingApp = Ne; exports.ListingComponentsProviderWithDefaults = ge; exports.ListingLayout = E; exports.cn = s; exports.shadcnDefaultComponents = g;
@@ -1,10 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { c as IListingCardProps, d as IListingComponents, e as IListingEmptyProps, f as IListingFilterPanelProps, g as IListingLoadingProps, h as IListingMarkerProps, i as IListingPopupProps, j as IListingResultHeaderProps, k as IListingSearchProps, l as IListingSidebarProps, I as IListingToolbarProps, D as DatasetDefinition, F as FilterRegistry } from '../components-provider-CF0Mo0B8.cjs';
4
- import { L as LatLng } from '../entity-adapter.interface-BDgbSxhq.cjs';
5
- import { M as MapProvider } from '../map-provider.interface-BMnwW3ob.cjs';
6
- import { I as IListingConfigOptions } from '../listing-config-options.interface-ZJYY_ZvR.cjs';
7
- import { U as UrlSyncController } from '../url-sync.controller-CsU_QxoS.cjs';
3
+ import { d as IListingCardProps, e as IListingComponents, f as IListingEmptyProps, g as IListingFilterPanelProps, h as IListingLoadingProps, i as IListingMarkerProps, j as IListingPopupProps, k as IListingResultHeaderProps, l as IListingSearchProps, m as IListingSidebarProps, a as IListingToolbarProps, D as DatasetDefinition, F as FilterRegistry, I as IListingConfigOptions } from '../components-provider-FinfaqUT.cjs';
4
+ import { L as LatLng, a as MapProvider } from '../map-provider.interface-DT-v1plm.cjs';
5
+ import { U as UrlSyncController } from '../url-sync.controller-DXSIWgTa.cjs';
8
6
  import { ClassValue } from 'clsx';
9
7
 
10
8
  /**
@@ -216,13 +214,13 @@ interface ListingAppProps<TFilters> {
216
214
  * -- see `compose-listing-providers.ts`'s `withDataset` doc comment.
217
215
  */
218
216
  datasets: DatasetDefinition<any, TFilters>[];
219
- /** e.g. `withRentalFilters()`, or any `(reg) => { reg.add(...); }` callback -- forwarded verbatim to `withFilters`. */
217
+ /** A `(reg) => { reg.add(...); }` callback that registers your filters -- forwarded verbatim to `withFilters`. */
220
218
  filters?: (reg: FilterRegistry<TFilters>) => void;
221
219
  /** A ready `MapProvider`, or `{ apiKey, mapId? }` to build a `googleProvider` internally. Omit for no map (the styled layout shows a "Map unavailable" fallback). */
222
220
  map?: ListingAppMapProp;
223
221
  /** Slot overrides, merged OVER the shadcn styled defaults -- see this file's doc comment for how the merge works. */
224
222
  components?: Partial<IListingComponents>;
225
- /** A `UrlSyncController<TFilters>` (e.g. `rentalUrlSync()`), or `true`. `true` is a documented no-op: the library is filters-shape-erased and cannot generically derive a `TFilters <-> QueryParams` mapping, which is exactly why domain presets (like `rentalUrlSync`) exist to build a real controller. */
223
+ /** A `UrlSyncController<TFilters>`, or `true`. `true` is a documented no-op: the library is filters-shape-erased and cannot generically derive a `TFilters <-> QueryParams` mapping, so build a real controller for your own filter shape. */
226
224
  urlSync?: UrlSyncController<TFilters> | boolean;
227
225
  initialFilters?: TFilters;
228
226
  config?: Partial<IListingConfigOptions>;
@@ -1,10 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { c as IListingCardProps, d as IListingComponents, e as IListingEmptyProps, f as IListingFilterPanelProps, g as IListingLoadingProps, h as IListingMarkerProps, i as IListingPopupProps, j as IListingResultHeaderProps, k as IListingSearchProps, l as IListingSidebarProps, I as IListingToolbarProps, D as DatasetDefinition, F as FilterRegistry } from '../components-provider-CjMxkxrP.js';
4
- import { L as LatLng } from '../entity-adapter.interface-BDgbSxhq.js';
5
- import { M as MapProvider } from '../map-provider.interface-BxexMT3X.js';
6
- import { I as IListingConfigOptions } from '../listing-config-options.interface-ZJYY_ZvR.js';
7
- import { U as UrlSyncController } from '../url-sync.controller-DX67JivW.js';
3
+ import { d as IListingCardProps, e as IListingComponents, f as IListingEmptyProps, g as IListingFilterPanelProps, h as IListingLoadingProps, i as IListingMarkerProps, j as IListingPopupProps, k as IListingResultHeaderProps, l as IListingSearchProps, m as IListingSidebarProps, a as IListingToolbarProps, D as DatasetDefinition, F as FilterRegistry, I as IListingConfigOptions } from '../components-provider-cWVWEDXC.js';
4
+ import { L as LatLng, a as MapProvider } from '../map-provider.interface-DT-v1plm.js';
5
+ import { U as UrlSyncController } from '../url-sync.controller-DK5W_0OZ.js';
8
6
  import { ClassValue } from 'clsx';
9
7
 
10
8
  /**
@@ -216,13 +214,13 @@ interface ListingAppProps<TFilters> {
216
214
  * -- see `compose-listing-providers.ts`'s `withDataset` doc comment.
217
215
  */
218
216
  datasets: DatasetDefinition<any, TFilters>[];
219
- /** e.g. `withRentalFilters()`, or any `(reg) => { reg.add(...); }` callback -- forwarded verbatim to `withFilters`. */
217
+ /** A `(reg) => { reg.add(...); }` callback that registers your filters -- forwarded verbatim to `withFilters`. */
220
218
  filters?: (reg: FilterRegistry<TFilters>) => void;
221
219
  /** A ready `MapProvider`, or `{ apiKey, mapId? }` to build a `googleProvider` internally. Omit for no map (the styled layout shows a "Map unavailable" fallback). */
222
220
  map?: ListingAppMapProp;
223
221
  /** Slot overrides, merged OVER the shadcn styled defaults -- see this file's doc comment for how the merge works. */
224
222
  components?: Partial<IListingComponents>;
225
- /** A `UrlSyncController<TFilters>` (e.g. `rentalUrlSync()`), or `true`. `true` is a documented no-op: the library is filters-shape-erased and cannot generically derive a `TFilters <-> QueryParams` mapping, which is exactly why domain presets (like `rentalUrlSync`) exist to build a real controller. */
223
+ /** A `UrlSyncController<TFilters>`, or `true`. `true` is a documented no-op: the library is filters-shape-erased and cannot generically derive a `TFilters <-> QueryParams` mapping, so build a real controller for your own filter shape. */
226
224
  urlSync?: UrlSyncController<TFilters> | boolean;
227
225
  initialFilters?: TFilters;
228
226
  config?: Partial<IListingConfigOptions>;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{A as X,B as Y,h as U,i as H,j as _,k as O,l as W,m as z,n as B,p as v,q as $,s as Z,v as G,x as q,y as J,z as Q}from"../chunk-R3FX2V3N.js";import{a as s}from"../chunk-6PZHSHU3.js";import{a as K}from"../chunk-35KYEBAC.js";import{Fragment as se,jsx as m,jsxs as N}from"react/jsx-runtime";function oe(e){return typeof e!="number"?e:new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(e)}function w({item:e,selected:i,onSelect:t}){let r=e??{},l=s("flex w-full flex-col overflow-hidden rounded-lg border bg-card text-left text-card-foreground shadow-sm","motion-safe:transition-shadow",t&&"hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",i&&"ring-2 ring-ring"),a=N(se,{children:[r.imageUrl&&m("img",{src:r.imageUrl,alt:r.title??"",className:"aspect-video w-full rounded-t-lg object-cover"}),N("div",{className:"flex flex-1 flex-col gap-1 p-3",children:[N("div",{className:"flex items-start justify-between gap-2",children:[r.title&&m("span",{className:"font-medium",children:r.title}),r.badge&&m("span",{className:"shrink-0 rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:r.badge})]}),r.subtitle&&m("span",{className:"text-sm text-muted-foreground",children:r.subtitle}),r.price!=null&&m("span",{className:"mt-1 font-semibold tabular-nums",children:oe(r.price)})]})]});return t?m("button",{type:"button",onClick:t,"aria-pressed":i??!1,className:l,children:a}):m("article",{className:l,children:a})}import{jsx as L,jsxs as j}from"react/jsx-runtime";function C(e){return j("div",{role:"status",className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[j("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:"h-8 w-8","aria-hidden":"true",children:[L("circle",{cx:"11",cy:"11",r:"7"}),L("path",{d:"m21 21-4.3-4.3"})]}),L("p",{className:"text-sm font-medium text-foreground",children:"No results"}),L("p",{className:"text-xs text-muted-foreground",children:"Try adjusting your filters or search terms."})]})}import{jsx as ae}from"react/jsx-runtime";function I({children:e}){return ae("div",{className:"flex flex-col gap-3",children:e})}import{jsx as x,jsxs as ne}from"react/jsx-runtime";function D(e){return x("div",{className:"flex flex-col gap-3 p-3",role:"status","aria-busy":"true","aria-label":"Loading results",children:Array.from({length:3}).map((i,t)=>ne("div",{className:"flex flex-col gap-2 motion-safe:animate-pulse",children:[x("div",{className:"aspect-video w-full rounded-md bg-muted"}),x("div",{className:"h-4 w-2/3 rounded-md bg-muted"}),x("div",{className:"h-3 w-1/3 rounded-md bg-muted"})]},t))})}import{jsx as le}from"react/jsx-runtime";function M({point:e}){let i=e.entity??{};return le("span",{className:"rounded-full border bg-background px-2 py-0.5 text-xs font-medium tabular-nums shadow-sm",children:i.price??""})}import{jsx as c,jsxs as k}from"react/jsx-runtime";function F({entity:e,onClose:i}){let t=e??{};return k("div",{className:"relative w-64 rounded-lg border bg-popover p-3 text-popover-foreground shadow-md",role:"group","aria-label":"Location details",children:[c("button",{type:"button",onClick:i,"aria-label":"Close",className:"absolute right-2 top-2 rounded-md p-1 text-muted-foreground motion-safe:transition-colors hover:bg-foreground/[0.06] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4","aria-hidden":"true",children:[c("path",{d:"M18 6 6 18"}),c("path",{d:"m6 6 12 12"})]})}),k("div",{className:"pr-6",children:[t.title&&c("div",{className:"font-medium",children:t.title}),t.subtitle&&c("div",{className:"text-sm text-muted-foreground",children:t.subtitle}),t.price!=null&&c("div",{className:"mt-1 font-semibold tabular-nums",children:t.price})]})]})}import{jsx as pe}from"react/jsx-runtime";function S({count:e,total:i}){let t=i!=null&&i!==e?`${e} of ${i} results`:`${e} results`;return pe("div",{className:"text-sm tabular-nums text-muted-foreground",children:t})}import{jsx as de}from"react/jsx-runtime";function T({value:e,onChange:i,placeholder:t}){return de("input",{type:"search",value:e,placeholder:t,onChange:r=>i(r.target.value),"aria-label":t??"Search",className:s("h-9 w-full rounded-md border bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground","focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring")})}import{jsx as me}from"react/jsx-runtime";function R({children:e}){return me("aside",{className:"flex w-full flex-col gap-4 p-4 md:border-r md:border-border",children:e})}import{jsx as ue}from"react/jsx-runtime";function A({children:e}){return ue("div",{className:"flex items-center gap-2 border-b p-2",children:e})}var g={Card:w,Marker:M,Popup:F,Sidebar:R,FilterPanel:I,Search:T,Empty:C,Loading:D,ResultHeader:S,Toolbar:A};import{jsx as ce}from"react/jsx-runtime";function fe({children:e}){return ce(v,{...g,children:e})}import{useEffect as Le,useState as xe}from"react";import{useEffect as ge,useState as be}from"react";import{jsx as o,jsxs as b}from"react/jsx-runtime";var ve=o("p",{className:"px-4 text-center text-sm text-muted-foreground",children:"Map unavailable - provide a Google Maps API key"});function E({search:e,className:i,toolbarEnd:t,autoFetch:r=!0,mapCenter:l,mapZoom:a}){let p=Z(),{Search:u}=$(),[f,y]=be("list");ge(()=>{r!==!1&&p.applyFilters({})},[p,r]);let h=f==="map"?"hidden md:block":"block",P=f==="list"?"hidden md:block":"block";return b("div",{className:s("flex h-full min-h-0 w-full flex-col bg-background text-foreground",i),"data-slot":"listing-layout",children:[b("div",{className:"sticky top-0 z-10 flex flex-wrap items-end gap-3 border-b border-border bg-background p-3","data-slot":"listing-layout-filter-bar",children:[e&&o("div",{className:"w-full min-w-0 sm:w-auto sm:max-w-xs sm:flex-1",children:o(u,{value:e.value,onChange:e.onChange,placeholder:e.placeholder})}),o(G,{className:"flex flex-wrap items-end gap-3",groupClassName:"min-w-0"}),b("div",{className:"ml-auto flex items-center gap-3",children:[o(X,{}),t]})]}),o("div",{className:"flex items-center justify-center gap-1 border-b border-border bg-background p-2 md:hidden","data-slot":"listing-layout-mobile-toggle",children:o("div",{role:"group","aria-label":"View",className:"inline-flex rounded-md border border-border p-0.5",children:[{view:"list",label:"List"},{view:"map",label:"Map"}].map(({view:d,label:n})=>o("button",{type:"button","aria-pressed":f===d,onClick:()=>y(d),className:s("rounded-[5px] px-3 py-1 text-sm font-medium motion-safe:transition-colors",f===d?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground"),children:n},d))})}),b("div",{className:"grid min-h-0 flex-1 md:grid-cols-[minmax(340px,42%)_1fr]","data-slot":"listing-layout-split",children:[b("div",{className:s("min-h-0 overflow-y-auto p-3",h),"data-slot":"listing-layout-list",children:[o(q,{className:"grid content-start gap-3 [grid-template-columns:repeat(auto-fill,minmax(200px,1fr))]"}),o("div",{className:"mt-4 flex justify-center",children:o(Q,{})})]}),o("div",{className:s("min-h-0 md:sticky md:top-0",P),"data-slot":"listing-layout-map",children:o(J,{center:l,zoom:a,fallback:ve})})]})]})}import{jsx as V}from"react/jsx-runtime";function ee(e){return"provider"in e}function ye(e){let i=e!=null&&!ee(e),t=i?e.apiKey:void 0,r=i?e.mapId:void 0,[l,a]=xe(()=>!e||ee(e)?{ready:!0,provider:e?.provider}:{ready:!1});return Le(()=>{if(!t)return;let p=!1;return import("../maps/google/index.js").then(({googleProvider:u})=>{p||a({ready:!0,provider:u({apiKey:t,mapId:r})})}),()=>{p=!0}},[t,r]),l}function he(e){let{datasets:i,filters:t,map:r,components:l,urlSync:a,initialFilters:p,config:u,className:f,search:y,autoFetch:h}=e,{ready:P,provider:d}=ye(r);if(!P)return null;let n=[];for(let ie of i)n.push(O(ie));t&&n.push(W(t)),d&&n.push(_(d)),a instanceof K&&n.push(z(a)),p&&n.push(B(p)),u&&n.push(H(u));let te=U(...n),re={...g,...l};return V(Y,{...te,children:V(v,{...re,children:V(E,{className:f,search:y,autoFetch:h,mapCenter:r?.center,mapZoom:r?.zoom})})})}export{w as DefaultCard,C as DefaultEmpty,I as DefaultFilterPanel,D as DefaultLoading,M as DefaultMarker,F as DefaultPopup,S as DefaultResultHeader,T as DefaultSearch,R as DefaultSidebar,A as DefaultToolbar,he as ListingApp,fe as ListingComponentsProviderWithDefaults,E as ListingLayout,s as cn,g as shadcnDefaultComponents};
2
+ import{a as K}from"../chunk-35KYEBAC.js";import{A as X,B as Y,h as U,i as H,j as _,k as O,l as W,m as z,n as B,p as v,q as $,s as Z,v as G,x as q,y as J,z as Q}from"../chunk-R3FX2V3N.js";import{clsx as ie}from"clsx";import{twMerge as se}from"tailwind-merge";function s(...e){return se(ie(e))}import{Fragment as ne,jsx as m,jsxs as N}from"react/jsx-runtime";function ae(e){return typeof e!="number"?e:new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(e)}function w({item:e,selected:o,onSelect:t}){let r=e??{},l=s("flex w-full flex-col overflow-hidden rounded-lg border bg-card text-left text-card-foreground shadow-sm","motion-safe:transition-shadow",t&&"hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",o&&"ring-2 ring-ring"),a=N(ne,{children:[r.imageUrl&&m("img",{src:r.imageUrl,alt:r.title??"",className:"aspect-video w-full rounded-t-lg object-cover"}),N("div",{className:"flex flex-1 flex-col gap-1 p-3",children:[N("div",{className:"flex items-start justify-between gap-2",children:[r.title&&m("span",{className:"font-medium",children:r.title}),r.badge&&m("span",{className:"shrink-0 rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:r.badge})]}),r.subtitle&&m("span",{className:"text-sm text-muted-foreground",children:r.subtitle}),r.price!=null&&m("span",{className:"mt-1 font-semibold tabular-nums",children:ae(r.price)})]})]});return t?m("button",{type:"button",onClick:t,"aria-pressed":o??!1,className:l,children:a}):m("article",{className:l,children:a})}import{jsx as x,jsxs as j}from"react/jsx-runtime";function C(e){return j("div",{role:"status",className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[j("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:"h-8 w-8","aria-hidden":"true",children:[x("circle",{cx:"11",cy:"11",r:"7"}),x("path",{d:"m21 21-4.3-4.3"})]}),x("p",{className:"text-sm font-medium text-foreground",children:"No results"}),x("p",{className:"text-xs text-muted-foreground",children:"Try adjusting your filters or search terms."})]})}import{jsx as le}from"react/jsx-runtime";function I({children:e}){return le("div",{className:"flex flex-col gap-3",children:e})}import{jsx as L,jsxs as pe}from"react/jsx-runtime";function D(e){return L("div",{className:"flex flex-col gap-3 p-3",role:"status","aria-busy":"true","aria-label":"Loading results",children:Array.from({length:3}).map((o,t)=>pe("div",{className:"flex flex-col gap-2 motion-safe:animate-pulse",children:[L("div",{className:"aspect-video w-full rounded-md bg-muted"}),L("div",{className:"h-4 w-2/3 rounded-md bg-muted"}),L("div",{className:"h-3 w-1/3 rounded-md bg-muted"})]},t))})}import{jsx as de}from"react/jsx-runtime";function M({point:e}){let o=e.entity??{};return de("span",{className:"rounded-full border bg-background px-2 py-0.5 text-xs font-medium tabular-nums shadow-sm",children:o.price??""})}import{jsx as c,jsxs as k}from"react/jsx-runtime";function F({entity:e,onClose:o}){let t=e??{};return k("div",{className:"relative w-64 rounded-lg border bg-popover p-3 text-popover-foreground shadow-md",role:"group","aria-label":"Location details",children:[c("button",{type:"button",onClick:o,"aria-label":"Close",className:"absolute right-2 top-2 rounded-md p-1 text-muted-foreground motion-safe:transition-colors hover:bg-foreground/[0.06] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4","aria-hidden":"true",children:[c("path",{d:"M18 6 6 18"}),c("path",{d:"m6 6 12 12"})]})}),k("div",{className:"pr-6",children:[t.title&&c("div",{className:"font-medium",children:t.title}),t.subtitle&&c("div",{className:"text-sm text-muted-foreground",children:t.subtitle}),t.price!=null&&c("div",{className:"mt-1 font-semibold tabular-nums",children:t.price})]})]})}import{jsx as me}from"react/jsx-runtime";function S({count:e,total:o}){let t=o!=null&&o!==e?`${e} of ${o} results`:`${e} results`;return me("div",{className:"text-sm tabular-nums text-muted-foreground",children:t})}import{jsx as ue}from"react/jsx-runtime";function T({value:e,onChange:o,placeholder:t}){return ue("input",{type:"search",value:e,placeholder:t,onChange:r=>o(r.target.value),"aria-label":t??"Search",className:s("h-9 w-full rounded-md border bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground","focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring")})}import{jsx as fe}from"react/jsx-runtime";function R({children:e}){return fe("aside",{className:"flex w-full flex-col gap-4 p-4 md:border-r md:border-border",children:e})}import{jsx as ce}from"react/jsx-runtime";function A({children:e}){return ce("div",{className:"flex items-center gap-2 border-b p-2",children:e})}var g={Card:w,Marker:M,Popup:F,Sidebar:R,FilterPanel:I,Search:T,Empty:C,Loading:D,ResultHeader:S,Toolbar:A};import{jsx as be}from"react/jsx-runtime";function ge({children:e}){return be(v,{...g,children:e})}import{useEffect as ye,useState as he}from"react";import{useEffect as ve,useState as xe}from"react";import{jsx as i,jsxs as b}from"react/jsx-runtime";var Le=i("p",{className:"px-4 text-center text-sm text-muted-foreground",children:"Map unavailable - provide a Google Maps API key"});function E({search:e,className:o,toolbarEnd:t,autoFetch:r=!0,mapCenter:l,mapZoom:a}){let p=Z(),{Search:u}=$(),[f,y]=xe("list");ve(()=>{r!==!1&&p.applyFilters({})},[p,r]);let h=f==="map"?"hidden md:block":"block",P=f==="list"?"hidden md:block":"block";return b("div",{className:s("flex h-full min-h-0 w-full flex-col bg-background text-foreground",o),"data-slot":"listing-layout",children:[b("div",{className:"sticky top-0 z-10 flex flex-wrap items-end gap-3 border-b border-border bg-background p-3","data-slot":"listing-layout-filter-bar",children:[e&&i("div",{className:"w-full min-w-0 sm:w-auto sm:max-w-xs sm:flex-1",children:i(u,{value:e.value,onChange:e.onChange,placeholder:e.placeholder})}),i(G,{className:"flex flex-wrap items-end gap-3",groupClassName:"min-w-0"}),b("div",{className:"ml-auto flex items-center gap-3",children:[i(X,{}),t]})]}),i("div",{className:"flex items-center justify-center gap-1 border-b border-border bg-background p-2 md:hidden","data-slot":"listing-layout-mobile-toggle",children:i("div",{role:"group","aria-label":"View",className:"inline-flex rounded-md border border-border p-0.5",children:[{view:"list",label:"List"},{view:"map",label:"Map"}].map(({view:d,label:n})=>i("button",{type:"button","aria-pressed":f===d,onClick:()=>y(d),className:s("rounded-[5px] px-3 py-1 text-sm font-medium motion-safe:transition-colors",f===d?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground"),children:n},d))})}),b("div",{className:"grid min-h-0 flex-1 md:grid-cols-[minmax(340px,42%)_1fr]","data-slot":"listing-layout-split",children:[b("div",{className:s("min-h-0 overflow-y-auto p-3",h),"data-slot":"listing-layout-list",children:[i(q,{className:"grid content-start gap-3 [grid-template-columns:repeat(auto-fill,minmax(200px,1fr))]"}),i("div",{className:"mt-4 flex justify-center",children:i(Q,{})})]}),i("div",{className:s("min-h-0 md:sticky md:top-0",P),"data-slot":"listing-layout-map",children:i(J,{center:l,zoom:a,fallback:Le})})]})]})}import{jsx as V}from"react/jsx-runtime";function ee(e){return"provider"in e}function Pe(e){let o=e!=null&&!ee(e),t=o?e.apiKey:void 0,r=o?e.mapId:void 0,[l,a]=he(()=>!e||ee(e)?{ready:!0,provider:e?.provider}:{ready:!1});return ye(()=>{if(!t)return;let p=!1;return import("../maps/google/index.js").then(({googleProvider:u})=>{p||a({ready:!0,provider:u({apiKey:t,mapId:r})})}),()=>{p=!0}},[t,r]),l}function Ne(e){let{datasets:o,filters:t,map:r,components:l,urlSync:a,initialFilters:p,config:u,className:f,search:y,autoFetch:h}=e,{ready:P,provider:d}=Pe(r);if(!P)return null;let n=[];for(let oe of o)n.push(O(oe));t&&n.push(W(t)),d&&n.push(_(d)),a instanceof K&&n.push(z(a)),p&&n.push(B(p)),u&&n.push(H(u));let te=U(...n),re={...g,...l};return V(Y,{...te,children:V(v,{...re,children:V(E,{className:f,search:y,autoFetch:h,mapCenter:r?.center,mapZoom:r?.zoom})})})}export{w as DefaultCard,C as DefaultEmpty,I as DefaultFilterPanel,D as DefaultLoading,M as DefaultMarker,F as DefaultPopup,S as DefaultResultHeader,T as DefaultSearch,R as DefaultSidebar,A as DefaultToolbar,Ne as ListingApp,ge as ListingComponentsProviderWithDefaults,E as ListingLayout,s as cn,g as shadcnDefaultComponents};
@@ -1,2 +1,2 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
- var _chunk3FOG7ENOcjs = require('../chunk-3FOG7ENO.cjs');var _chunkEYXV5OMYcjs = require('../chunk-EYXV5OMY.cjs');var _jsxruntime = require('react/jsx-runtime');function L({children:o}){return _jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.p,{..._chunk3FOG7ENOcjs.l,children:o})}exports.BottomNav = _chunk3FOG7ENOcjs.m; exports.BottomSheet = _chunk3FOG7ENOcjs.n; exports.ListingApp = _chunk3FOG7ENOcjs.p; exports.StyledCard = _chunk3FOG7ENOcjs.b; exports.StyledComponentsProviderWithDefaults = L; exports.StyledEmpty = _chunk3FOG7ENOcjs.c; exports.StyledFilterPanel = _chunk3FOG7ENOcjs.d; exports.StyledListingLayout = _chunk3FOG7ENOcjs.o; exports.StyledLoading = _chunk3FOG7ENOcjs.e; exports.StyledMarker = _chunk3FOG7ENOcjs.f; exports.StyledPopup = _chunk3FOG7ENOcjs.g; exports.StyledResultHeader = _chunk3FOG7ENOcjs.h; exports.StyledSearch = _chunk3FOG7ENOcjs.i; exports.StyledSidebar = _chunk3FOG7ENOcjs.j; exports.StyledToolbar = _chunk3FOG7ENOcjs.k; exports.styledDefaultComponents = _chunk3FOG7ENOcjs.l;
2
+ var _chunkRXHR66FScjs = require('../chunk-RXHR66FS.cjs');var _chunkEYXV5OMYcjs = require('../chunk-EYXV5OMY.cjs');var _jsxruntime = require('react/jsx-runtime');function L({children:o}){return _jsxruntime.jsx.call(void 0, _chunkEYXV5OMYcjs.p,{..._chunkRXHR66FScjs.l,children:o})}exports.BottomNav = _chunkRXHR66FScjs.m; exports.BottomSheet = _chunkRXHR66FScjs.n; exports.ListingApp = _chunkRXHR66FScjs.p; exports.StyledCard = _chunkRXHR66FScjs.b; exports.StyledComponentsProviderWithDefaults = L; exports.StyledEmpty = _chunkRXHR66FScjs.c; exports.StyledFilterPanel = _chunkRXHR66FScjs.d; exports.StyledListingLayout = _chunkRXHR66FScjs.o; exports.StyledLoading = _chunkRXHR66FScjs.e; exports.StyledMarker = _chunkRXHR66FScjs.f; exports.StyledPopup = _chunkRXHR66FScjs.g; exports.StyledResultHeader = _chunkRXHR66FScjs.h; exports.StyledSearch = _chunkRXHR66FScjs.i; exports.StyledSidebar = _chunkRXHR66FScjs.j; exports.StyledToolbar = _chunkRXHR66FScjs.k; exports.styledDefaultComponents = _chunkRXHR66FScjs.l;
@@ -1,10 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { c as IListingCardProps, e as IListingEmptyProps, f as IListingFilterPanelProps, g as IListingLoadingProps, h as IListingMarkerProps, i as IListingPopupProps, j as IListingResultHeaderProps, k as IListingSearchProps, l as IListingSidebarProps, I as IListingToolbarProps, d as IListingComponents } from '../components-provider-CF0Mo0B8.cjs';
4
- export { B as BottomNav, b as BottomNavView, I as IBottomNavAction, c as IBottomNavProps, d as IStyledListingLayoutProps, L as ListingApp, e as ListingAppMapProp, a as ListingAppProps, S as StyledListingLayout } from '../listing-app-D2UB9ru3.cjs';
5
- import '../entity-adapter.interface-BDgbSxhq.cjs';
6
- import '../map-provider.interface-BMnwW3ob.cjs';
7
- import '../listing-config-options.interface-ZJYY_ZvR.cjs';
3
+ import { d as IListingCardProps, f as IListingEmptyProps, g as IListingFilterPanelProps, h as IListingLoadingProps, i as IListingMarkerProps, j as IListingPopupProps, k as IListingResultHeaderProps, l as IListingSearchProps, m as IListingSidebarProps, a as IListingToolbarProps, e as IListingComponents } from '../components-provider-FinfaqUT.cjs';
4
+ export { B as BottomNav, b as BottomNavView, I as IBottomNavAction, c as IBottomNavProps, d as IStyledListingLayoutProps, L as ListingApp, e as ListingAppMapProp, a as ListingAppProps, S as StyledListingLayout } from '../listing-app-BMoMKD4c.cjs';
5
+ import '../map-provider.interface-DT-v1plm.cjs';
8
6
 
9
7
  /**
10
8
  * Default `/styled` `Card` slot. Renders an optional image, title, subtitle,
@@ -1,10 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { c as IListingCardProps, e as IListingEmptyProps, f as IListingFilterPanelProps, g as IListingLoadingProps, h as IListingMarkerProps, i as IListingPopupProps, j as IListingResultHeaderProps, k as IListingSearchProps, l as IListingSidebarProps, I as IListingToolbarProps, d as IListingComponents } from '../components-provider-CjMxkxrP.js';
4
- export { B as BottomNav, b as BottomNavView, I as IBottomNavAction, c as IBottomNavProps, d as IStyledListingLayoutProps, L as ListingApp, e as ListingAppMapProp, a as ListingAppProps, S as StyledListingLayout } from '../listing-app-DDKZ6Inn.js';
5
- import '../entity-adapter.interface-BDgbSxhq.js';
6
- import '../map-provider.interface-BxexMT3X.js';
7
- import '../listing-config-options.interface-ZJYY_ZvR.js';
3
+ import { d as IListingCardProps, f as IListingEmptyProps, g as IListingFilterPanelProps, h as IListingLoadingProps, i as IListingMarkerProps, j as IListingPopupProps, k as IListingResultHeaderProps, l as IListingSearchProps, m as IListingSidebarProps, a as IListingToolbarProps, e as IListingComponents } from '../components-provider-cWVWEDXC.js';
4
+ export { B as BottomNav, b as BottomNavView, I as IBottomNavAction, c as IBottomNavProps, d as IStyledListingLayoutProps, L as ListingApp, e as ListingAppMapProp, a as ListingAppProps, S as StyledListingLayout } from '../listing-app-BSJKGh7k.js';
5
+ import '../map-provider.interface-DT-v1plm.js';
8
6
 
9
7
  /**
10
8
  * Default `/styled` `Card` slot. Renders an optional image, title, subtitle,
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{b as r,c as p,d as i,e as d,f as y,g as l,h as n,i as m,j as s,k as a,l as t,m as S,n as f,o as P,p as u}from"../chunk-KLKVHYH3.js";import{p as e}from"../chunk-R3FX2V3N.js";import{jsx as g}from"react/jsx-runtime";function L({children:o}){return g(e,{...t,children:o})}export{S as BottomNav,f as BottomSheet,u as ListingApp,r as StyledCard,L as StyledComponentsProviderWithDefaults,p as StyledEmpty,i as StyledFilterPanel,P as StyledListingLayout,d as StyledLoading,y as StyledMarker,l as StyledPopup,n as StyledResultHeader,m as StyledSearch,s as StyledSidebar,a as StyledToolbar,t as styledDefaultComponents};
2
+ import{b as r,c as p,d as i,e as d,f as y,g as l,h as n,i as m,j as s,k as a,l as t,m as S,n as f,o as P,p as u}from"../chunk-CGT3RHJ7.js";import{p as e}from"../chunk-R3FX2V3N.js";import{jsx as g}from"react/jsx-runtime";function L({children:o}){return g(e,{...t,children:o})}export{S as BottomNav,f as BottomSheet,u as ListingApp,r as StyledCard,L as StyledComponentsProviderWithDefaults,p as StyledEmpty,i as StyledFilterPanel,P as StyledListingLayout,d as StyledLoading,y as StyledMarker,l as StyledPopup,n as StyledResultHeader,m as StyledSearch,s as StyledSidebar,a as StyledToolbar,t as styledDefaultComponents};
package/dist/styles.css CHANGED
@@ -704,13 +704,6 @@
704
704
  flex: 0 0 clamp(180px, 22vw, 280px);
705
705
  }
706
706
 
707
- .rle-filter-bar__end {
708
- display: flex;
709
- align-items: center;
710
- gap: var(--rle-space);
711
- margin-left: auto;
712
- }
713
-
714
707
  @media (max-width: 1023px) {
715
708
  .rle-filter-bar {
716
709
  display: none;
@@ -872,6 +865,26 @@
872
865
  padding: var(--rle-space);
873
866
  }
874
867
 
868
+ /* Header row at the top of the results column: the result header (title +
869
+ count) at the left, the optional `toolbarEnd` (sort control, save-search,
870
+ ...) at the right. Sits ABOVE the list -- moved here from the filter bar so
871
+ the count/sort read as a list heading, not another filter. Wraps to stack the
872
+ toolbar under the title on a narrow (split-view) column. */
873
+ .rle-list-header {
874
+ display: flex;
875
+ flex-wrap: wrap;
876
+ align-items: center;
877
+ justify-content: space-between;
878
+ gap: var(--rle-space);
879
+ margin-bottom: var(--rle-space);
880
+ }
881
+
882
+ .rle-list-header__toolbar {
883
+ display: flex;
884
+ align-items: center;
885
+ gap: var(--rle-space);
886
+ }
887
+
875
888
  .rle-list-grid {
876
889
  display: grid;
877
890
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
@@ -1,5 +1,4 @@
1
- import { B as Bounds, a as EntityAdapter, L as LatLng, E as EntityId, b as PageRequest, P as Page, M as MapPoint } from '../entity-adapter.interface-BDgbSxhq.cjs';
2
- import { M as MapProvider, a as MapHandle, R as RenderedLayer, b as MapInitOptions, U as Unsubscribe } from '../map-provider.interface-BMnwW3ob.cjs';
1
+ import { a as MapProvider, c as MapHandle, R as RenderedLayer, B as Bounds, d as MapInitOptions, U as Unsubscribe, b as EntityAdapter, L as LatLng, E as EntityId, e as PageRequest, P as Page, M as MapPoint } from '../map-provider.interface-DT-v1plm.cjs';
3
2
 
4
3
  type BoundsListener = (b: Bounds) => void;
5
4
  /**
@@ -1,5 +1,4 @@
1
- import { B as Bounds, a as EntityAdapter, L as LatLng, E as EntityId, b as PageRequest, P as Page, M as MapPoint } from '../entity-adapter.interface-BDgbSxhq.js';
2
- import { M as MapProvider, a as MapHandle, R as RenderedLayer, b as MapInitOptions, U as Unsubscribe } from '../map-provider.interface-BxexMT3X.js';
1
+ import { a as MapProvider, c as MapHandle, R as RenderedLayer, B as Bounds, d as MapInitOptions, U as Unsubscribe, b as EntityAdapter, L as LatLng, E as EntityId, e as PageRequest, P as Page, M as MapPoint } from '../map-provider.interface-DT-v1plm.js';
3
2
 
4
3
  type BoundsListener = (b: Bounds) => void;
5
4
  /**
@@ -1,4 +1,4 @@
1
- import { Q as QueryParams } from './entity-adapter.interface-BDgbSxhq.js';
1
+ import { Q as QueryParams } from './map-provider.interface-DT-v1plm.js';
2
2
 
3
3
  /**
4
4
  * DOM-agnostic abstraction over "the URL's query string" — or, in tests/SSR,
@@ -1,4 +1,4 @@
1
- import { Q as QueryParams } from './entity-adapter.interface-BDgbSxhq.cjs';
1
+ import { Q as QueryParams } from './map-provider.interface-DT-v1plm.cjs';
2
2
 
3
3
  /**
4
4
  * DOM-agnostic abstraction over "the URL's query string" — or, in tests/SSR,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-listing-engine",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "license": "MIT",
5
5
  "description": "Headless, composable listing engine for React: filterable list + Google-Maps multi-layer map, with pluggable data adapters, a filter/dataset registry, injectable components, and a shadcn-compatible styled adapter.",
6
6
  "funding": [
@@ -59,11 +59,6 @@
59
59
  "import": "./dist/maps/google/index.js",
60
60
  "require": "./dist/maps/google/index.cjs"
61
61
  },
62
- "./presets/rental": {
63
- "types": "./dist/presets/rental/index.d.ts",
64
- "import": "./dist/presets/rental/index.js",
65
- "require": "./dist/presets/rental/index.cjs"
66
- },
67
62
  "./testing": {
68
63
  "types": "./dist/testing/index.d.ts",
69
64
  "import": "./dist/testing/index.js",
@@ -1,2 +0,0 @@
1
- "use client";
2
- var i=class{mode;constructor(e={}){this.mode=e.mode??"replace"}getQuery(){if(typeof window>"u")return{};let e=new URLSearchParams(window.location.search),t={};for(let[r,o]of e)o!==""&&(t[r]=o);return t}setQuery(e){if(typeof window>"u")return;let t=new URLSearchParams;for(let[a,n]of Object.entries(e))n===void 0||n===""||t.set(a,n);let r=t.toString(),o=r?`?${r}`:"";if(o===window.location.search)return;let s=`${window.location.pathname}${o}${window.location.hash}`;this.mode==="push"?window.history.pushState(window.history.state,"",s):window.history.replaceState(window.history.state,"",s)}subscribe(e){return typeof window>"u"?()=>{}:(window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)})}};export{i as a};
@@ -1,2 +0,0 @@
1
- "use client";
2
- import{clsx as t}from"clsx";import{twMerge as e}from"tailwind-merge";function l(...r){return e(t(r))}export{l as a};
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }"use client";
2
- var i=class{constructor(e={}){this.mode=_nullishCoalesce(e.mode, () => ("replace"))}getQuery(){if(typeof window>"u")return{};let e=new URLSearchParams(window.location.search),t={};for(let[r,o]of e)o!==""&&(t[r]=o);return t}setQuery(e){if(typeof window>"u")return;let t=new URLSearchParams;for(let[a,n]of Object.entries(e))n===void 0||n===""||t.set(a,n);let r=t.toString(),o=r?`?${r}`:"";if(o===window.location.search)return;let s=`${window.location.pathname}${o}${window.location.hash}`;this.mode==="push"?window.history.pushState(window.history.state,"",s):window.history.replaceState(window.history.state,"",s)}subscribe(e){return typeof window>"u"?()=>{}:(window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)})}};exports.a = i;
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
- var _clsx = require('clsx');var _tailwindmerge = require('tailwind-merge');function l(...r){return _tailwindmerge.twMerge.call(void 0, _clsx.clsx.call(void 0, r))}exports.a = l;
@@ -1,33 +0,0 @@
1
- type EntityId = string | number;
2
- interface Bounds {
3
- west: number;
4
- south: number;
5
- east: number;
6
- north: number;
7
- }
8
- interface LatLng {
9
- lat: number;
10
- lng: number;
11
- }
12
- interface PageRequest {
13
- cursor?: string | null;
14
- limit: number;
15
- }
16
- interface Page<T> {
17
- items: T[];
18
- nextCursor: string | null;
19
- total?: number;
20
- }
21
- interface MapPoint<TEntity = unknown> {
22
- id: EntityId;
23
- position: LatLng;
24
- entity: TEntity;
25
- }
26
- type QueryParams = Record<string, string | undefined>;
27
- interface EntityAdapter<TEntity, TFilters> {
28
- list(filters: TFilters, page: PageRequest): Promise<Page<TEntity>>;
29
- getPoints(filters: TFilters, bounds: Bounds): Promise<MapPoint<TEntity>[]>;
30
- getById?(id: EntityId): Promise<TEntity>;
31
- }
32
-
33
- export type { Bounds as B, EntityId as E, LatLng as L, MapPoint as M, Page as P, QueryParams as Q, EntityAdapter as a, PageRequest as b };
@@ -1,33 +0,0 @@
1
- type EntityId = string | number;
2
- interface Bounds {
3
- west: number;
4
- south: number;
5
- east: number;
6
- north: number;
7
- }
8
- interface LatLng {
9
- lat: number;
10
- lng: number;
11
- }
12
- interface PageRequest {
13
- cursor?: string | null;
14
- limit: number;
15
- }
16
- interface Page<T> {
17
- items: T[];
18
- nextCursor: string | null;
19
- total?: number;
20
- }
21
- interface MapPoint<TEntity = unknown> {
22
- id: EntityId;
23
- position: LatLng;
24
- entity: TEntity;
25
- }
26
- type QueryParams = Record<string, string | undefined>;
27
- interface EntityAdapter<TEntity, TFilters> {
28
- list(filters: TFilters, page: PageRequest): Promise<Page<TEntity>>;
29
- getPoints(filters: TFilters, bounds: Bounds): Promise<MapPoint<TEntity>[]>;
30
- getById?(id: EntityId): Promise<TEntity>;
31
- }
32
-
33
- export type { Bounds as B, EntityId as E, LatLng as L, MapPoint as M, Page as P, QueryParams as Q, EntityAdapter as a, PageRequest as b };
@@ -1,12 +0,0 @@
1
- declare enum PaginationMode {
2
- Paged = "paged",
3
- Infinite = "infinite"
4
- }
5
-
6
- interface IListingConfigOptions {
7
- pagination: PaginationMode;
8
- pageSize: number;
9
- debounceMs: number;
10
- }
11
-
12
- export { type IListingConfigOptions as I, PaginationMode as P };
@@ -1,12 +0,0 @@
1
- declare enum PaginationMode {
2
- Paged = "paged",
3
- Infinite = "infinite"
4
- }
5
-
6
- interface IListingConfigOptions {
7
- pagination: PaginationMode;
8
- pageSize: number;
9
- debounceMs: number;
10
- }
11
-
12
- export { type IListingConfigOptions as I, PaginationMode as P };