@buildbase/sdk 0.0.58 → 0.0.60
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.
- package/CHANGELOG.md +22 -0
- package/dist/react/chunks/{SettingsDialog-B_7I4e7D.mjs → SettingsDialog-4yk6t4tT.mjs} +1 -1
- package/dist/react/chunks/{SettingsDialog-Y6Y8MzPi.cjs → SettingsDialog-DzcwBYsg.cjs} +1 -1
- package/dist/react/chunks/{SubscriptionDialog-CwDxl0IL.cjs → SubscriptionDialog-COw79gAi.cjs} +1 -1
- package/dist/react/chunks/{SubscriptionDialog-D2tAmz-0.mjs → SubscriptionDialog-DLM_WA84.mjs} +1 -1
- package/dist/react/chunks/{react-2_QlCyzs.cjs → react-D6q1fjoE.cjs} +1 -1
- package/dist/react/chunks/{react-DS9JF2Lc.mjs → react-DX2YGh4O.mjs} +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.ts +58 -3
- package/dist/react/index.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.0.60] - 2026-08-29
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **`coerceBadgeRef` is now actually exported from `/react`.** The 0.0.59 notes below said it was, and it was not: it reached only the package's internal badge index, so the import those notes told you to write failed to resolve. If you followed them, upgrade - there is no workaround on 0.0.59. `BadgeHrefOptions` is exported alongside it, since the badge's `params` prop is typed against it. Nothing else changed; `<BuildBaseBadge />`, `refCode` and `params` behave exactly as they did in 0.0.59.
|
|
15
|
+
|
|
16
|
+
## [0.0.59] - 2026-08-29
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **`<BuildBaseBadge refCode="..." />` — the badge can now credit whoever installed it.** Set `refCode` and the badge links to `buildbase.app/?utm_source=badge&utm_medium=<variant>&ref=<code>`, so visits it sends are attributable to you. The code is coerced, not validated - lowercased, narrowed to `a-z0-9-_`, truncated at 64 - because this runs in the render path of your footer: a code with a space in it should cost the attribution, never throw inside your layout. An unusable code falls back to the plain badge link. `coerceBadgeRef` is exported if you want to show a user what their code will become.
|
|
21
|
+
|
|
22
|
+
**The prop is `refCode`, not `ref`, and that is not a style choice.** React 18 intercepts a prop named `ref` and never passes it to a function component, and React 18 is still in this package's peer range - so a prop spelled `ref` would work on React 19 and silently send no attribution for every React 18 consumer, with the badge still rendering perfectly. The query param is `ref`; only the prop is renamed.
|
|
23
|
+
|
|
24
|
+
`refCode` sets `ref` and nothing else. It deliberately does not also set `utm_campaign`: a referral is _who sent someone_, a campaign is _which piece of marketing they clicked_, and writing one from the other turns campaign reporting into a list of customer names.
|
|
25
|
+
|
|
26
|
+
- **`params` — put anything else you need on the badge's link.** A plain object of key/value pairs appended verbatim: your own analytics params, a campaign, a click id, anything. Nothing is filtered for being unrecognised, keys and values are encoded so there is no character to avoid, and `null` / `undefined` entries are skipped so you can build the object conditionally. They are written last, so they can deliberately override the badge's own `utm_source` / `utm_medium` - your URL, your naming scheme.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- **The badge's anchor drops `noreferrer` and keeps `noopener`.** `noopener` is the half that carries the security value; `noreferrer` additionally strips the `Referer` header, which meant every install that never set `refCode` sent us traffic that could not be attributed to the site it came from. No behaviour changes on the host page.
|
|
31
|
+
|
|
10
32
|
## [0.0.58] - 2026-08-29
|
|
11
33
|
|
|
12
34
|
### Added
|