@buyingbuddy/react 0.2.0 → 0.2.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuyingBuddyProvider.d.ts","sourceRoot":"","sources":["../src/BuyingBuddyProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"BuyingBuddyProvider.d.ts","sourceRoot":"","sources":["../src/BuyingBuddyProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAKjF;;;GAGG;AACH,wBAAgB,cAAc,IAAI,uBAAuB,CAQxD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,GAAG,CAAC,EAAE;YACJ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAC7B,UAAU,EAAE,MAAM,CAAC;YACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;SACxB,CAAC;KACH;CACF;AAcD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,aAAa,EACb,MAAuB,EACvB,UAAU,EACV,QAAQ,EACR,QAAe,GAChB,EAAE,wBAAwB,+BA4G1B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useContext, useEffect, useState } from "react";
|
|
3
|
+
import { PKG_VERSION } from "./version";
|
|
3
4
|
const BuyingBuddyContext = createContext(null);
|
|
4
5
|
/**
|
|
5
6
|
* Hook to access the BuyingBuddy context.
|
|
@@ -60,12 +61,18 @@ export function BuyingBuddyProvider({ activationKey, domain = "www.mbb2.com", ap
|
|
|
60
61
|
theme.id = themeId;
|
|
61
62
|
theme.src = `https://${domain}/version3/css/theme/acid/${activationKey}`;
|
|
62
63
|
theme.async = true;
|
|
64
|
+
// Stamped on BOTH scripts deliberately. The runtime tag below is skipped
|
|
65
|
+
// when the bundle is already present, so the theme tag is the only one
|
|
66
|
+
// guaranteed to exist on every provider mount — a diagnostic must be able
|
|
67
|
+
// to read the version off either.
|
|
68
|
+
theme.dataset.bbReact = PKG_VERSION;
|
|
63
69
|
document.head.appendChild(theme);
|
|
64
70
|
}
|
|
65
71
|
// If the runtime global already exists (a script tag in the page, or a
|
|
66
72
|
// prior mount), point data requests at the resolved base now.
|
|
67
73
|
if (window.MBB) {
|
|
68
74
|
window.MBB.apiBaseUrl = resolvedApiBaseUrl;
|
|
75
|
+
window.MBB.reactPackageVersion = PKG_VERSION;
|
|
69
76
|
}
|
|
70
77
|
// Already loaded for this account — nothing more to do.
|
|
71
78
|
if (window.MBB && LOADED_ACCOUNTS.has(activationKey)) {
|
|
@@ -93,6 +100,7 @@ export function BuyingBuddyProvider({ activationKey, domain = "www.mbb2.com", ap
|
|
|
93
100
|
seo: "false",
|
|
94
101
|
data: { acid: activationKey },
|
|
95
102
|
apiBaseUrl: resolvedApiBaseUrl,
|
|
103
|
+
reactPackageVersion: PKG_VERSION,
|
|
96
104
|
};
|
|
97
105
|
}
|
|
98
106
|
// Load the v5 runtime directly from the CDN.
|
|
@@ -100,6 +108,7 @@ export function BuyingBuddyProvider({ activationKey, domain = "www.mbb2.com", ap
|
|
|
100
108
|
script.id = scriptId;
|
|
101
109
|
script.src = MBB_BUNDLE_URL;
|
|
102
110
|
script.async = true;
|
|
111
|
+
script.dataset.bbReact = PKG_VERSION;
|
|
103
112
|
script.onload = markLoaded;
|
|
104
113
|
script.onerror = () => {
|
|
105
114
|
if (cancelled)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuyingBuddyProvider.js","sourceRoot":"","sources":["../src/BuyingBuddyProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,E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KAAK,EAAE,aAAa,EAAE,CAAC;IAE1E,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACtC,KAAK,CAAC,CAAC,CAAC,CACP,eAAK,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,aACtL,kDAAmC,OAAE,KAAK,CAAC,OAAO,IAC9C,CACP,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,GACN,CAC/B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The published version of this package, stamped onto the runtime script tag
|
|
3
|
+
* the provider injects (`data-bb-react`) and onto `window.MBB.reactPackageVersion`.
|
|
4
|
+
*
|
|
5
|
+
* WHY THIS EXISTS
|
|
6
|
+
* ---------------
|
|
7
|
+
* Nothing about a compiled site reveals which version of `@buyingbuddy/react` built
|
|
8
|
+
* it — the package name is erased by the bundler, and the provider used to leave no
|
|
9
|
+
* fingerprint at all. So a support diagnostic could not tell a healthy current install
|
|
10
|
+
* from a stale one, and could not tell either apart from third-party code that merely
|
|
11
|
+
* imitates our API. Stamping the version fixes all three.
|
|
12
|
+
*
|
|
13
|
+
* This is a hand-maintained constant because the package builds with plain `tsc` —
|
|
14
|
+
* there is no bundler `define` to inject it from package.json. `version.test.ts`
|
|
15
|
+
* asserts the two stay in step, so a bump that misses this file fails the suite.
|
|
16
|
+
*/
|
|
17
|
+
export declare const PKG_VERSION = "0.2.1";
|
|
18
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,UAAU,CAAC"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The published version of this package, stamped onto the runtime script tag
|
|
3
|
+
* the provider injects (`data-bb-react`) and onto `window.MBB.reactPackageVersion`.
|
|
4
|
+
*
|
|
5
|
+
* WHY THIS EXISTS
|
|
6
|
+
* ---------------
|
|
7
|
+
* Nothing about a compiled site reveals which version of `@buyingbuddy/react` built
|
|
8
|
+
* it — the package name is erased by the bundler, and the provider used to leave no
|
|
9
|
+
* fingerprint at all. So a support diagnostic could not tell a healthy current install
|
|
10
|
+
* from a stale one, and could not tell either apart from third-party code that merely
|
|
11
|
+
* imitates our API. Stamping the version fixes all three.
|
|
12
|
+
*
|
|
13
|
+
* This is a hand-maintained constant because the package builds with plain `tsc` —
|
|
14
|
+
* there is no bundler `define` to inject it from package.json. `version.test.ts`
|
|
15
|
+
* asserts the two stay in step, so a bump that misses this file fails the suite.
|
|
16
|
+
*/
|
|
17
|
+
export const PKG_VERSION = "0.2.1";
|
|
18
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buyingbuddy/react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
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.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|