@buyingbuddy/react 0.3.3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,181 @@
1
+ /**
2
+ * Types for the server-rendering entry point (`@buyingbuddy/react/server`).
3
+ *
4
+ * Deliberately separate from ../types: nothing here is usable in a browser, and
5
+ * keeping the two files apart is what lets the client barrel stay `"use client"`
6
+ * while this one stays server-only.
7
+ */
8
+ /**
9
+ * Widget types that can be server-rendered.
10
+ *
11
+ * This is NOT every widget type. Three groups are excluded, for three different
12
+ * reasons, and all three are properties of the widget runtime rather than choices
13
+ * made here:
14
+ *
15
+ * 1. **Search-based widgets** - `ListingResults`, `SearchResults`, `ResultsMap`,
16
+ * `OpenMap`, `InteractiveMap`. These always load live from the Buying Buddy
17
+ * server even when the page declares `seo="true"`, so a prerender of one is
18
+ * discarded and the request wasted.
19
+ * 2. **Widgets with no server markup** - `Disclaimer` renders nothing by design
20
+ * (its text arrives through the widget config instead), so there is nothing to
21
+ * prerender. The masks and popouts are client-only surfaces.
22
+ * 3. **`PropertyDetails`** - a live server type whose client element is missing
23
+ * from the runtime's type map, so the mount cannot upgrade. Server-side it
24
+ * renders fine; client-side it warns and produces nothing. Tracked upstream;
25
+ * it will become renderable here without a change to this package.
26
+ *
27
+ * Use `<BuyingBuddyWidget>` from the package root for anything not on this list.
28
+ */
29
+ export type SsrWidgetType = "Brokers" | "Calculator" | "Communities" | "FeaturedGallery" | "FeaturedList" | "LcForm" | "ListingDetails" | "ListingShowcase" | "LoginPanel" | "MarketReport" | "MarketStats" | "OfficeRoster" | "QuickSearch" | "SearchDetails" | "SearchForm";
30
+ /**
31
+ * Per-request visitor context.
32
+ *
33
+ * REQUIRED for correct rate limiting, and the reason it cannot be discovered
34
+ * automatically: this package is framework-agnostic, so it has no request object
35
+ * of its own. A server render makes every visitor's request come from your
36
+ * server's IP, so without the visitor's address every visitor to your site shares
37
+ * one rate-limit bucket. Supplying it moves each visitor back into their own,
38
+ * and your server gets a much larger allowance instead.
39
+ *
40
+ * Omit it entirely for a render that has no visitor - a build-time render, a cron
41
+ * job, a warm-up script. Sending your own server's address as the visitor would
42
+ * put your whole site in a single bucket, which is worse than sending nothing.
43
+ */
44
+ export interface VisitorContext {
45
+ /**
46
+ * The visitor's IP address, as your platform reports it.
47
+ *
48
+ * Next.js App Router: `(await headers()).get("x-forwarded-for")?.split(",")[0]`
49
+ * Express: `req.ip`
50
+ */
51
+ ip?: string;
52
+ /**
53
+ * The visitor's Buying Buddy session id, from the `mbb-mbbid` cookie.
54
+ *
55
+ * Pass it when you have it. Requests with no session id look like automated
56
+ * traffic after enough of them, which tightens the limits that apply. This
57
+ * package never sets the cookie - it has no response to set it on - so if you
58
+ * want one minted, see `createVisitorId()`.
59
+ */
60
+ mbbid?: string;
61
+ /**
62
+ * The visitor's lead id, from the `mbb-lacid` cookie, when they are signed in.
63
+ * Passing it lets the render reflect their saved properties and searches.
64
+ */
65
+ lacid?: string;
66
+ }
67
+ /** Options for {@link renderWidget}. */
68
+ export interface RenderWidgetOptions {
69
+ /** The widget to render. */
70
+ type: SsrWidgetType;
71
+ /** Your Buying Buddy activation key - the same value the provider takes. */
72
+ activationKey: string;
73
+ /**
74
+ * The domain this widget is embedded on, which must be authorized on your
75
+ * account. This is what the Buying Buddy server checks, and it cannot be
76
+ * detected from inside a server render, so it has to be stated.
77
+ *
78
+ * Use your site's public hostname - `www.example.com` - not `localhost`.
79
+ */
80
+ domain: string;
81
+ /**
82
+ * Property filter as `+`-joined tokens, the same syntax as the client
83
+ * component's `filter` prop. Example: `"FIELD(property_beds:3,4,5)+limit:9"`.
84
+ */
85
+ filter?: string;
86
+ /**
87
+ * Widget sub-page, for the widgets that have one. `OfficeRoster` uses
88
+ * `"roster/<office>"` and `"agent/name/<agent>"`; everything else wants the
89
+ * default.
90
+ *
91
+ * @default "index"
92
+ */
93
+ page?: string;
94
+ /** A single property, for the details widgets. Format `mls_id_number`. */
95
+ propertyId?: string;
96
+ /** Per-request visitor context. See {@link VisitorContext}. */
97
+ visitor?: VisitorContext;
98
+ /**
99
+ * Base URL of the Buying Buddy API.
100
+ *
101
+ * @default "https://www.mbb2.com"
102
+ */
103
+ baseUrl?: string;
104
+ /**
105
+ * How long to wait for the render before giving up, in milliseconds.
106
+ *
107
+ * The default is deliberately short because this request happens while your
108
+ * page is being generated - the visitor is waiting on it. A render that is
109
+ * slow enough to hit this is not going to produce a usable page by waiting
110
+ * longer, so failing quickly and not caching the result is the better outcome.
111
+ *
112
+ * @default 3000
113
+ */
114
+ timeoutMs?: number;
115
+ }
116
+ /** Page metadata the server resolved for this widget. */
117
+ export interface WidgetMetadata {
118
+ /** Page title. */
119
+ title?: string;
120
+ /** The widget's `<h1>` text. */
121
+ h1?: string;
122
+ /** Meta description. */
123
+ description?: string;
124
+ /** Meta keywords. */
125
+ keywords?: string;
126
+ /** Open Graph tags, as a ready-to-emit HTML string. */
127
+ ogTags?: string;
128
+ /** Canonical URL for this page. */
129
+ canonical?: string;
130
+ /** The property address, for a details render. */
131
+ propertyAddress?: string;
132
+ /** The listing's status, for a details render. */
133
+ listingStatus?: string;
134
+ }
135
+ /** A successful {@link renderWidget} result. */
136
+ export interface RenderedWidget {
137
+ /**
138
+ * The widget's server-rendered HTML. Pass it to `<BuyingBuddyServerWidget>`,
139
+ * or place it inside a `<bb-widget>` mount yourself.
140
+ */
141
+ html: string;
142
+ /**
143
+ * Page metadata for this widget - feed it to your framework's metadata API.
144
+ * On Next.js App Router that is `generateMetadata()`.
145
+ */
146
+ meta: WidgetMetadata;
147
+ /**
148
+ * The filter the server actually ran, which is not always the one you sent.
149
+ *
150
+ * A saved-search reference like `id:22` is a pointer only the server can
151
+ * resolve, and the resolved pairs come back here. The mount must carry THIS
152
+ * value, or the widget re-applies the pointer on the client and the resolved
153
+ * criteria are lost. `<BuyingBuddyServerWidget>` does that for you.
154
+ */
155
+ filterString: string;
156
+ /** Number of listings the render matched, where the widget reports one. */
157
+ total: number;
158
+ /** Map centre for a map-bearing render, when the server supplied one. */
159
+ mapCenter?: string;
160
+ }
161
+ /** Why a {@link renderWidget} call failed. */
162
+ export type BuyingBuddyErrorCode =
163
+ /** The activation key is not a live Buying Buddy account. */
164
+ "invalid_account"
165
+ /** This `domain` is not authorized on the account. */
166
+ | "domain_not_authorized"
167
+ /** Too many requests. See `retryAfter`. */
168
+ | "rate_limited"
169
+ /** The request exceeded `timeoutMs`. */
170
+ | "timeout"
171
+ /** The request never completed - DNS, TLS, connection reset. */
172
+ | "network"
173
+ /** The server answered with something that was not the expected JSON. */
174
+ | "invalid_response"
175
+ /** The server declined the render for a reason it stated but we do not model. */
176
+ | "render_refused"
177
+ /** This widget type cannot be server-rendered. See {@link SsrWidgetType}. */
178
+ | "unsupported_widget"
179
+ /** A required option was missing or empty. */
180
+ | "invalid_request";
181
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/server/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,YAAY,GACZ,aAAa,GACb,iBAAiB,GACjB,cAAc,GACd,QAAQ,GACR,gBAAgB,GAChB,iBAAiB,GACjB,YAAY,GACZ,cAAc,GACd,aAAa,GACb,cAAc,GACd,aAAa,GACb,eAAe,GACf,YAAY,CAAC;AAEjB;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wCAAwC;AACxC,MAAM,WAAW,mBAAmB;IAClC,4BAA4B;IAC5B,IAAI,EAAE,aAAa,CAAC;IAEpB,4EAA4E;IAC5E,aAAa,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C,cAAc;AAChB,wCAAwC;GACtC,SAAS;AACX,gEAAgE;GAC9D,SAAS;AACX,yEAAyE;GACvE,kBAAkB;AACpB,iFAAiF;GAC/E,gBAAgB;AAClB,6EAA6E;GAC3E,oBAAoB;AACtB,8CAA8C;GAC5C,iBAAiB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Types for the server-rendering entry point (`@buyingbuddy/react/server`).
3
+ *
4
+ * Deliberately separate from ../types: nothing here is usable in a browser, and
5
+ * keeping the two files apart is what lets the client barrel stay `"use client"`
6
+ * while this one stays server-only.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/server/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
package/dist/types.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * These map to internal custom elements via `getComponentType()` in MbbComponent.
5
5
  * Use the PascalCase form (e.g., "FeaturedGallery") for consistency.
6
6
  */
7
- export type BuyingBuddyWidgetType = "Communities" | "FeaturedGallery" | "FeaturedList" | "InteractiveMap" | "SearchForm" | "SearchFormNLS" | "SearchResults" | "ListingResults" | "SearchDetails" | "QuickSearch" | "InteractiveMap2" | "OpenMap" | "ResultsMap" | "LcForm" | "LoginPanel" | "Brokers" | "OfficeRoster" | "Calculator" | "MarketReport" | "MarketStats" | "Disclaimer" | (string & {});
7
+ export type BuyingBuddyWidgetType = "Communities" | "FeaturedGallery" | "FeaturedList" | "InteractiveMap" | "SearchForm" | "SearchFormNLS" | "SearchResults" | "ListingResults" | "SearchDetails" | "QuickSearch" | "OpenMap" | "LcForm" | "LoginPanel" | "Brokers" | "OfficeRoster" | "Calculator" | "MarketReport" | "MarketStats" | "Disclaimer" | (string & {});
8
8
  /**
9
9
  * Common attributes accepted by all BuyingBuddy widgets.
10
10
  *
@@ -56,6 +56,30 @@ export interface BuyingBuddyProviderProps {
56
56
  * Example: "https://preview.mbb2.com".
57
57
  */
58
58
  apiBaseUrl?: string;
59
+ /**
60
+ * Declares that every Buying Buddy widget on this page is already
61
+ * server-rendered into its mount, so the widget runtime should adopt that
62
+ * markup instead of fetching its own.
63
+ *
64
+ * Set it when the page uses `<BuyingBuddyServerWidget>` or `renderWidget()`
65
+ * from `@buyingbuddy/react/server`. Leave it alone otherwise.
66
+ *
67
+ * **It applies to the whole page, not to one widget.** The widget runtime
68
+ * reads a single page-level value, so a page cannot mix server-rendered and
69
+ * browser-rendered Buying Buddy widgets:
70
+ *
71
+ * | | `seo` set | `seo` not set |
72
+ * | --- | --- | --- |
73
+ * | widget server-rendered | correct | the browser fetches and replaces markup that was already there |
74
+ * | widget not server-rendered | the widget renders blank | correct |
75
+ *
76
+ * Both wrong combinations log a warning in development, naming the widget.
77
+ * Neither can be detected in production, because the check costs a DOM read
78
+ * per widget and the information is only useful while you are building.
79
+ *
80
+ * @default false
81
+ */
82
+ seo?: boolean;
59
83
  /**
60
84
  * Your application. Rendered immediately and in every state — the provider
61
85
  * never withholds it, including while the runtime script is loading and
@@ -63,14 +87,14 @@ export interface BuyingBuddyProviderProps {
63
87
  */
64
88
  children: React.ReactNode;
65
89
  /**
66
- * @deprecated Since 0.3.2 this is accepted and ignored, and it will be
67
- * removed in a future release. Safe to delete from your call site.
90
+ * @deprecated Since 0.3.2 this is accepted and ignored, and is planned for
91
+ * removal in 2.0. Safe to delete from your call site.
68
92
  *
69
93
  * It used to hold the place of `children` while the runtime script loaded,
70
94
  * back when the provider withheld them. The provider no longer does, so
71
95
  * there is no longer a state for it to render in: individual widgets render
72
- * nothing until the runtime is ready, and everything else on the page —
73
- * your header, your copy, your other components — is never withheld in the
96
+ * nothing until the runtime is ready, and everything else on the page -
97
+ * your header, your copy, your other components - is never withheld in the
74
98
  * first place. The prop is kept in the type so existing call sites continue
75
99
  * to compile.
76
100
  */
@@ -84,7 +108,10 @@ export interface BuyingBuddyContextValue {
84
108
  isLoaded: boolean;
85
109
  /**
86
110
  * Set if the runtime script failed to load — a CDN outage, an ad blocker, a
87
- * CSP rule, a corporate proxy, or an offline client.
111
+ * CSP rule, a corporate proxy, or an offline client — or if this provider's
112
+ * `activationKey` conflicts with a different key already claimed on the
113
+ * page (see "One account per page" in the README; rendering two different
114
+ * accounts on one page is not supported).
88
115
  *
89
116
  * The provider does not render anything of its own in this state: your
90
117
  * application renders normally and Buying Buddy widgets are simply absent.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAC7B,aAAa,GACb,iBAAiB,GACjB,cAAc,GACd,gBAAgB,GAChB,YAAY,GACZ,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,iBAAiB,GACjB,SAAS,GACT,YAAY,GACZ,QAAQ,GACR,YAAY,GACZ,SAAS,GACT,cAAc,GACd,YAAY,GACZ,cAAc,GACd,aAAa,GACb,YAAY,GACZ,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,uCAAuC;IACvC,IAAI,EAAE,qBAAqB,CAAC;IAE5B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,gFAAgF;IAChF,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,yBAAyB;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;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ACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd;;;;OAIG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,mDAAmD;IACnD,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;;;;;;;;;OAYG;IACH,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAEpB,iDAAiD;IACjD,aAAa,EAAE,MAAM,CAAC;CACvB"}
package/dist/version.d.ts CHANGED
@@ -14,5 +14,5 @@
14
14
  * there is no bundler `define` to inject it from package.json. `version.test.ts`
15
15
  * asserts the two stay in step, so a bump that misses this file fails the suite.
16
16
  */
17
- export declare const PKG_VERSION = "0.3.3";
17
+ export declare const PKG_VERSION = "1.0.0";
18
18
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -14,5 +14,5 @@
14
14
  * there is no bundler `define` to inject it from package.json. `version.test.ts`
15
15
  * asserts the two stay in step, so a bump that misses this file fails the suite.
16
16
  */
17
- export const PKG_VERSION = "0.3.3";
17
+ export const PKG_VERSION = "1.0.0";
18
18
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@buyingbuddy/react",
3
- "version": "0.3.3",
4
- "description": "IDX MLS real estate integration for React, Next.js, and Framer — property search, map results, listings, lead capture, and CRM via Buying Buddy.",
3
+ "version": "1.0.0",
4
+ "description": "IDX for React, Next.js and Framer - MLS property search, listings, maps and lead capture. Needs an IDX license, not an MLS API.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -10,8 +10,25 @@
10
10
  ".": {
11
11
  "types": "./dist/index.d.ts",
12
12
  "import": "./dist/index.js"
13
+ },
14
+ "./server": {
15
+ "types": "./dist/server/index.d.ts",
16
+ "browser": "./dist/server/browser.js",
17
+ "import": "./dist/server/index.js",
18
+ "default": "./dist/server/index.js"
19
+ },
20
+ "./package.json": "./package.json"
21
+ },
22
+ "typesVersions": {
23
+ "*": {
24
+ "server": [
25
+ "./dist/server/index.d.ts"
26
+ ]
13
27
  }
14
28
  },
29
+ "engines": {
30
+ "node": ">=18"
31
+ },
15
32
  "files": [
16
33
  "dist",
17
34
  "CHANGELOG.md"
@@ -19,9 +36,10 @@
19
36
  "scripts": {
20
37
  "build": "tsc",
21
38
  "assert:use-client": "node scripts/assert-use-client.mjs",
39
+ "assert:server-only": "node scripts/assert-server-only.mjs",
22
40
  "dev": "tsc --watch",
23
41
  "test": "vitest run",
24
- "prepublishOnly": "npm run build && npm run assert:use-client"
42
+ "prepublishOnly": "npm run build && npm run assert:use-client && npm run assert:server-only"
25
43
  },
26
44
  "peerDependencies": {
27
45
  "react": ">=18",
@@ -50,7 +68,10 @@
50
68
  "property-listings",
51
69
  "property-search",
52
70
  "real-estate-crm",
53
- "real-estate-marketing"
71
+ "real-estate-marketing",
72
+ "mls-api",
73
+ "mls-feed",
74
+ "idx-plugin"
54
75
  ],
55
76
  "license": "MIT",
56
77
  "publishConfig": {