react-listing-engine 0.1.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +21 -0
  3. package/README.md +161 -0
  4. package/dist/chunk-2T5PE5MB.js +2 -0
  5. package/dist/chunk-2VUHLHHX.cjs +2 -0
  6. package/dist/chunk-35KYEBAC.js +2 -0
  7. package/dist/chunk-5FBI2WIM.js +2 -0
  8. package/dist/chunk-5O36WI7H.cjs +2 -0
  9. package/dist/chunk-6PZHSHU3.js +2 -0
  10. package/dist/chunk-CHNUE46K.cjs +2 -0
  11. package/dist/chunk-LCQZIWBO.cjs +2 -0
  12. package/dist/chunk-N3OZ2HK2.cjs +2 -0
  13. package/dist/chunk-PFPHWJAA.js +2 -0
  14. package/dist/components-provider-CF0Mo0B8.d.cts +120 -0
  15. package/dist/components-provider-CjMxkxrP.d.ts +120 -0
  16. package/dist/entity-adapter.interface-BDgbSxhq.d.cts +33 -0
  17. package/dist/entity-adapter.interface-BDgbSxhq.d.ts +33 -0
  18. package/dist/index.cjs +2 -0
  19. package/dist/index.d.cts +674 -0
  20. package/dist/index.d.ts +674 -0
  21. package/dist/index.js +2 -0
  22. package/dist/listing-app-De6OqpUC.d.ts +199 -0
  23. package/dist/listing-app-pKMQBuQI.d.cts +199 -0
  24. package/dist/listing-config-options.interface-ZJYY_ZvR.d.cts +12 -0
  25. package/dist/listing-config-options.interface-ZJYY_ZvR.d.ts +12 -0
  26. package/dist/map-provider.interface-BMnwW3ob.d.cts +37 -0
  27. package/dist/map-provider.interface-BxexMT3X.d.ts +37 -0
  28. package/dist/maps/google/index.cjs +2 -0
  29. package/dist/maps/google/index.d.cts +39 -0
  30. package/dist/maps/google/index.d.ts +39 -0
  31. package/dist/maps/google/index.js +2 -0
  32. package/dist/presets/rental/index.cjs +2 -0
  33. package/dist/presets/rental/index.d.cts +266 -0
  34. package/dist/presets/rental/index.d.ts +266 -0
  35. package/dist/presets/rental/index.js +2 -0
  36. package/dist/shadcn/index.cjs +2 -0
  37. package/dist/shadcn/index.d.cts +261 -0
  38. package/dist/shadcn/index.d.ts +261 -0
  39. package/dist/shadcn/index.js +2 -0
  40. package/dist/styled/index.cjs +2 -0
  41. package/dist/styled/index.d.cts +123 -0
  42. package/dist/styled/index.d.ts +123 -0
  43. package/dist/styled/index.js +2 -0
  44. package/dist/styles.css +972 -0
  45. package/dist/testing/index.cjs +2 -0
  46. package/dist/testing/index.d.cts +51 -0
  47. package/dist/testing/index.d.ts +51 -0
  48. package/dist/testing/index.js +2 -0
  49. package/dist/url-sync.controller-CsU_QxoS.d.cts +89 -0
  50. package/dist/url-sync.controller-DX67JivW.d.ts +89 -0
  51. package/package.json +143 -0
@@ -0,0 +1,123 @@
1
+ import * as react from 'react';
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-pKMQBuQI.cjs';
5
+ import '../entity-adapter.interface-BDgbSxhq.cjs';
6
+ import '../map-provider.interface-BMnwW3ob.cjs';
7
+ import '../listing-config-options.interface-ZJYY_ZvR.cjs';
8
+
9
+ /**
10
+ * Default `/styled` `Card` slot. Renders an optional image, title, subtitle,
11
+ * badge and price from a plain view-model item -- image -> title -> address
12
+ * (subtitle) -> info line (badge) -> price, using only `.rle-*` classes (see
13
+ * `styles.css`). Doubles as the clickable/selectable surface (`onSelect`):
14
+ * when given, the card is a `<button type="button">` so it's keyboard
15
+ * operable and announces as a toggle (`aria-pressed`) for free; the
16
+ * `[type='button']` attribute selector in `styles.css` is what gives it the
17
+ * pointer/hover/focus affordances the plain `<article>` variant doesn't get.
18
+ */
19
+ declare function StyledCard({ item, selected, onSelect }: IListingCardProps): react.JSX.Element;
20
+
21
+ /** Default `/styled` `Empty` slot: a centered empty state with an icon, heading and hint. */
22
+ declare function StyledEmpty(_props: IListingEmptyProps): react.JSX.Element;
23
+
24
+ /** Default `/styled` `FilterPanel` slot (`.rle-filter-panel`): stacks one filter control per row inside `Sidebar`. */
25
+ declare function StyledFilterPanel({ children }: IListingFilterPanelProps): react.JSX.Element;
26
+
27
+ /** Default `/styled` `Loading` slot: a shimmering `.rle-skeleton` grid, announced via `role="status"`. */
28
+ declare function StyledLoading(_props: IListingLoadingProps): react.JSX.Element;
29
+
30
+ /** Default `/styled` `Marker` slot: a teardrop price pin (`.rle-pin`, Rentler-style, pointer via CSS `::after`) for a map point. */
31
+ declare function StyledMarker({ point }: IListingMarkerProps): react.JSX.Element;
32
+
33
+ /**
34
+ * Default `/styled` `Popup` slot: a small `.rle-popup` card with an
35
+ * accessible close button. `role="group"` + `aria-label` (rather than
36
+ * `role="dialog"`) since this is a non-modal, non-focus-trapped popup
37
+ * anchored to a map marker -- `dialog` without modality/focus management
38
+ * would misrepresent it to AT users. Mirrors `/shadcn`'s `DefaultPopup`.
39
+ */
40
+ declare function StyledPopup({ entity, onClose }: IListingPopupProps): react.JSX.Element;
41
+
42
+ /** Default `/styled` `ResultHeader` slot: `"{count} results"`, or `"{count} of {total} results"` when a distinct total is known. */
43
+ declare function StyledResultHeader({ count, total }: IListingResultHeaderProps): react.JSX.Element;
44
+
45
+ /** Default `/styled` `Search` slot: a plain `.rle-input` text input. */
46
+ declare function StyledSearch({ value, onChange, placeholder }: IListingSearchProps): react.JSX.Element;
47
+
48
+ /** Default `/styled` `Sidebar` slot (`.rle-sidebar`): the outer chrome for the filters column. */
49
+ declare function StyledSidebar({ children }: IListingSidebarProps): react.JSX.Element;
50
+
51
+ /** Default `/styled` `Toolbar` slot: a bordered bar (`.rle-toolbar`) wrapping arbitrary children. */
52
+ declare function StyledToolbar({ children }: IListingToolbarProps): react.JSX.Element;
53
+
54
+ /**
55
+ * Convenience wrapper around `ListingComponentsProvider` that wires in every
56
+ * package-shipped `Styled*` component (via `styledDefaultComponents`, the
57
+ * shared source of truth). Use this for a fully styled, Tailwind-free UI out
58
+ * of the box -- pair it with `import 'react-listing-engine/styles.css'`; use
59
+ * `ListingComponentsProvider` directly (with your own components for some or
60
+ * all slots) otherwise -- the two compose fine since `ListingComponentsProvider`
61
+ * falls back per-slot. Mirrors `/shadcn`'s `ListingComponentsProviderWithDefaults`.
62
+ */
63
+ declare function StyledComponentsProviderWithDefaults({ children }: {
64
+ children: ReactNode;
65
+ }): react.JSX.Element;
66
+
67
+ /**
68
+ * Every `/styled` default, keyed by slot -- the single source of truth for
69
+ * `StyledComponentsProviderWithDefaults`, mirroring `/shadcn`'s
70
+ * `shadcnDefaultComponents`.
71
+ *
72
+ * Kept as a plain object, not JSX, so a caller can merge it with
73
+ * `{ ...styledDefaultComponents, ...overrides }` and hand the result to ONE
74
+ * `ListingComponentsProvider`. This matters because `ListingComponentsProvider`
75
+ * merges `provided ?? ITS OWN private, UNSTYLED fallbacks` per slot -- it does
76
+ * not read the parent context (see `~/react/components-provider.tsx`).
77
+ * Nesting a bare `ListingComponentsProvider` (with only the overrides) INSIDE
78
+ * a `StyledComponentsProviderWithDefaults` would therefore silently reset
79
+ * every un-overridden slot back to the bare fallback instead of the styled
80
+ * default -- exactly the bug this object exists to avoid.
81
+ */
82
+ declare const styledDefaultComponents: IListingComponents;
83
+
84
+ interface IBottomSheetProps {
85
+ open: boolean;
86
+ onOpenChange(open: boolean): void;
87
+ title?: string;
88
+ children?: ReactNode;
89
+ footer?: ReactNode;
90
+ }
91
+ /**
92
+ * Dependency-free mobile bottom sheet -- the `/styled` adapter's own modal
93
+ * primitive, used by `StyledListingLayout` for the mobile filters panel.
94
+ * Deliberately NOT the `~/shadcn` adapter's Radix-based `Sheet`: `/styled`
95
+ * ships zero UI dependencies beyond `react`/`react-dom`, so this is a small
96
+ * hand-rolled implementation covering just what a filters sheet needs --
97
+ * portal, backdrop-click/Escape-to-close, a body-scroll lock, and the
98
+ * `.rle-sheet--open` slide-up transition. Not a full focus trap (Tab can
99
+ * still escape to the rest of the page while open) -- only initial focus
100
+ * placement, which is enough for this component's scope; a real focus trap
101
+ * is a documented future enhancement if/when this needs to satisfy a
102
+ * stricter modal-dialog a11y bar.
103
+ *
104
+ * MOUNT/ANIMATE: rendering is driven by two pieces of state instead of one --
105
+ * `rendered` (is the sheet in the DOM at all) flips synchronously with
106
+ * `open`, but `animateOpen` (does it carry the `.rle-sheet--open` class) is
107
+ * deferred one animation frame past mount. That gap is what lets the
108
+ * transform transition actually run: mounting directly with `.rle-sheet--open`
109
+ * already applied would paint the very first frame already in its final
110
+ * (slid-up) position, and a CSS transition never animates a property that
111
+ * never visibly changes. On close, both flags drop together and the sheet
112
+ * unmounts immediately -- no exit animation. Simpler than tracking an
113
+ * exit-in-progress phase, and an acceptable trade-off for a filters sheet
114
+ * (see the task brief: "keep it mounted briefly for exit or just unmount --
115
+ * simple is fine").
116
+ *
117
+ * SSR-safe: `document` is only ever touched inside effects/the portal-target
118
+ * check below, never during the render body itself, so this component is
119
+ * inert (renders nothing) until it has mounted client-side.
120
+ */
121
+ declare function BottomSheet({ open, onOpenChange, title, children, footer }: IBottomSheetProps): react.ReactPortal | null;
122
+
123
+ export { BottomSheet, type IBottomSheetProps, StyledCard, StyledComponentsProviderWithDefaults, StyledEmpty, StyledFilterPanel, StyledLoading, StyledMarker, StyledPopup, StyledResultHeader, StyledSearch, StyledSidebar, StyledToolbar, styledDefaultComponents };
@@ -0,0 +1,123 @@
1
+ import * as react from 'react';
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-De6OqpUC.js';
5
+ import '../entity-adapter.interface-BDgbSxhq.js';
6
+ import '../map-provider.interface-BxexMT3X.js';
7
+ import '../listing-config-options.interface-ZJYY_ZvR.js';
8
+
9
+ /**
10
+ * Default `/styled` `Card` slot. Renders an optional image, title, subtitle,
11
+ * badge and price from a plain view-model item -- image -> title -> address
12
+ * (subtitle) -> info line (badge) -> price, using only `.rle-*` classes (see
13
+ * `styles.css`). Doubles as the clickable/selectable surface (`onSelect`):
14
+ * when given, the card is a `<button type="button">` so it's keyboard
15
+ * operable and announces as a toggle (`aria-pressed`) for free; the
16
+ * `[type='button']` attribute selector in `styles.css` is what gives it the
17
+ * pointer/hover/focus affordances the plain `<article>` variant doesn't get.
18
+ */
19
+ declare function StyledCard({ item, selected, onSelect }: IListingCardProps): react.JSX.Element;
20
+
21
+ /** Default `/styled` `Empty` slot: a centered empty state with an icon, heading and hint. */
22
+ declare function StyledEmpty(_props: IListingEmptyProps): react.JSX.Element;
23
+
24
+ /** Default `/styled` `FilterPanel` slot (`.rle-filter-panel`): stacks one filter control per row inside `Sidebar`. */
25
+ declare function StyledFilterPanel({ children }: IListingFilterPanelProps): react.JSX.Element;
26
+
27
+ /** Default `/styled` `Loading` slot: a shimmering `.rle-skeleton` grid, announced via `role="status"`. */
28
+ declare function StyledLoading(_props: IListingLoadingProps): react.JSX.Element;
29
+
30
+ /** Default `/styled` `Marker` slot: a teardrop price pin (`.rle-pin`, Rentler-style, pointer via CSS `::after`) for a map point. */
31
+ declare function StyledMarker({ point }: IListingMarkerProps): react.JSX.Element;
32
+
33
+ /**
34
+ * Default `/styled` `Popup` slot: a small `.rle-popup` card with an
35
+ * accessible close button. `role="group"` + `aria-label` (rather than
36
+ * `role="dialog"`) since this is a non-modal, non-focus-trapped popup
37
+ * anchored to a map marker -- `dialog` without modality/focus management
38
+ * would misrepresent it to AT users. Mirrors `/shadcn`'s `DefaultPopup`.
39
+ */
40
+ declare function StyledPopup({ entity, onClose }: IListingPopupProps): react.JSX.Element;
41
+
42
+ /** Default `/styled` `ResultHeader` slot: `"{count} results"`, or `"{count} of {total} results"` when a distinct total is known. */
43
+ declare function StyledResultHeader({ count, total }: IListingResultHeaderProps): react.JSX.Element;
44
+
45
+ /** Default `/styled` `Search` slot: a plain `.rle-input` text input. */
46
+ declare function StyledSearch({ value, onChange, placeholder }: IListingSearchProps): react.JSX.Element;
47
+
48
+ /** Default `/styled` `Sidebar` slot (`.rle-sidebar`): the outer chrome for the filters column. */
49
+ declare function StyledSidebar({ children }: IListingSidebarProps): react.JSX.Element;
50
+
51
+ /** Default `/styled` `Toolbar` slot: a bordered bar (`.rle-toolbar`) wrapping arbitrary children. */
52
+ declare function StyledToolbar({ children }: IListingToolbarProps): react.JSX.Element;
53
+
54
+ /**
55
+ * Convenience wrapper around `ListingComponentsProvider` that wires in every
56
+ * package-shipped `Styled*` component (via `styledDefaultComponents`, the
57
+ * shared source of truth). Use this for a fully styled, Tailwind-free UI out
58
+ * of the box -- pair it with `import 'react-listing-engine/styles.css'`; use
59
+ * `ListingComponentsProvider` directly (with your own components for some or
60
+ * all slots) otherwise -- the two compose fine since `ListingComponentsProvider`
61
+ * falls back per-slot. Mirrors `/shadcn`'s `ListingComponentsProviderWithDefaults`.
62
+ */
63
+ declare function StyledComponentsProviderWithDefaults({ children }: {
64
+ children: ReactNode;
65
+ }): react.JSX.Element;
66
+
67
+ /**
68
+ * Every `/styled` default, keyed by slot -- the single source of truth for
69
+ * `StyledComponentsProviderWithDefaults`, mirroring `/shadcn`'s
70
+ * `shadcnDefaultComponents`.
71
+ *
72
+ * Kept as a plain object, not JSX, so a caller can merge it with
73
+ * `{ ...styledDefaultComponents, ...overrides }` and hand the result to ONE
74
+ * `ListingComponentsProvider`. This matters because `ListingComponentsProvider`
75
+ * merges `provided ?? ITS OWN private, UNSTYLED fallbacks` per slot -- it does
76
+ * not read the parent context (see `~/react/components-provider.tsx`).
77
+ * Nesting a bare `ListingComponentsProvider` (with only the overrides) INSIDE
78
+ * a `StyledComponentsProviderWithDefaults` would therefore silently reset
79
+ * every un-overridden slot back to the bare fallback instead of the styled
80
+ * default -- exactly the bug this object exists to avoid.
81
+ */
82
+ declare const styledDefaultComponents: IListingComponents;
83
+
84
+ interface IBottomSheetProps {
85
+ open: boolean;
86
+ onOpenChange(open: boolean): void;
87
+ title?: string;
88
+ children?: ReactNode;
89
+ footer?: ReactNode;
90
+ }
91
+ /**
92
+ * Dependency-free mobile bottom sheet -- the `/styled` adapter's own modal
93
+ * primitive, used by `StyledListingLayout` for the mobile filters panel.
94
+ * Deliberately NOT the `~/shadcn` adapter's Radix-based `Sheet`: `/styled`
95
+ * ships zero UI dependencies beyond `react`/`react-dom`, so this is a small
96
+ * hand-rolled implementation covering just what a filters sheet needs --
97
+ * portal, backdrop-click/Escape-to-close, a body-scroll lock, and the
98
+ * `.rle-sheet--open` slide-up transition. Not a full focus trap (Tab can
99
+ * still escape to the rest of the page while open) -- only initial focus
100
+ * placement, which is enough for this component's scope; a real focus trap
101
+ * is a documented future enhancement if/when this needs to satisfy a
102
+ * stricter modal-dialog a11y bar.
103
+ *
104
+ * MOUNT/ANIMATE: rendering is driven by two pieces of state instead of one --
105
+ * `rendered` (is the sheet in the DOM at all) flips synchronously with
106
+ * `open`, but `animateOpen` (does it carry the `.rle-sheet--open` class) is
107
+ * deferred one animation frame past mount. That gap is what lets the
108
+ * transform transition actually run: mounting directly with `.rle-sheet--open`
109
+ * already applied would paint the very first frame already in its final
110
+ * (slid-up) position, and a CSS transition never animates a property that
111
+ * never visibly changes. On close, both flags drop together and the sheet
112
+ * unmounts immediately -- no exit animation. Simpler than tracking an
113
+ * exit-in-progress phase, and an acceptable trade-off for a filters sheet
114
+ * (see the task brief: "keep it mounted briefly for exit or just unmount --
115
+ * simple is fine").
116
+ *
117
+ * SSR-safe: `document` is only ever touched inside effects/the portal-target
118
+ * check below, never during the render body itself, so this component is
119
+ * inert (renders nothing) until it has mounted client-side.
120
+ */
121
+ declare function BottomSheet({ open, onOpenChange, title, children, footer }: IBottomSheetProps): react.ReactPortal | null;
122
+
123
+ export { BottomSheet, type IBottomSheetProps, StyledCard, StyledComponentsProviderWithDefaults, StyledEmpty, StyledFilterPanel, StyledLoading, StyledMarker, StyledPopup, StyledResultHeader, StyledSearch, StyledSidebar, StyledToolbar, styledDefaultComponents };
@@ -0,0 +1,2 @@
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-2T5PE5MB.js";import{p as e}from"../chunk-PFPHWJAA.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};