@base316/react 0.6.0 → 0.8.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.
- package/CHANGELOG.md +69 -0
- package/README.md +3 -3
- package/dist/index.cjs +1595 -998
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1553 -955
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +117 -9
- package/dist/src/CaptchaWidget.d.ts +22 -0
- package/dist/src/CaptchaWidget.d.ts.map +1 -0
- package/dist/src/SecondFactorStep.d.ts +2 -2
- package/dist/src/SignIn.d.ts +79 -18
- package/dist/src/SignIn.d.ts.map +1 -1
- package/dist/src/SignUp.d.ts +27 -1
- package/dist/src/SignUp.d.ts.map +1 -1
- package/dist/src/SocialButtons.d.ts +16 -0
- package/dist/src/SocialButtons.d.ts.map +1 -0
- package/dist/src/SocialSignIn.d.ts +32 -0
- package/dist/src/SocialSignIn.d.ts.map +1 -0
- package/dist/src/TeamMembers.d.ts +1 -1
- package/dist/src/TwoFactorManager.d.ts +1 -1
- package/dist/src/appearance.d.ts +4 -4
- package/dist/src/appearance.d.ts.map +1 -1
- package/dist/src/manifest.d.ts +1 -1
- package/dist/src/manifest.d.ts.map +1 -1
- package/dist/src/provider.d.ts +3 -3
- package/dist/src/provider.d.ts.map +1 -1
- package/dist/src/sign-in-methods.d.ts +66 -0
- package/dist/src/sign-in-methods.d.ts.map +1 -0
- package/dist/src/social-icons.d.ts +11 -0
- package/dist/src/social-icons.d.ts.map +1 -0
- package/dist/src/useAddons.d.ts +29 -0
- package/dist/src/useAddons.d.ts.map +1 -0
- package/dist/src/usePaymentLink.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
1
|
# @base316/react
|
|
2
2
|
|
|
3
|
+
## 0.8.0 — 2026-11-06
|
|
4
|
+
|
|
5
|
+
Published after `@base316/sdk` 0.10.0 (the workspace dependency pins it), so
|
|
6
|
+
release the SDK first.
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- `useAddons()`: the signed-in user's addons (`attached`, `available`) with
|
|
11
|
+
`attach`, `setQuantity` and `remove`, over the SDK's self-serve addon
|
|
12
|
+
methods. No markup, like `usePlans`; `lastError` is the API's code
|
|
13
|
+
(`no_payment_method`, `already_attached`, …).
|
|
14
|
+
|
|
15
|
+
- `SignUp` shows the environment's Cloudflare Turnstile check when the sign-up
|
|
16
|
+
CAPTCHA is on, and sends its token with the form. **Upgrade before setting the
|
|
17
|
+
CAPTCHA to refuse:** `SignUp` from 0.7.0 and earlier sends no token, so every
|
|
18
|
+
sign-up through it is refused (`CAPTCHA_FAILED`), or recorded as a failure in
|
|
19
|
+
record-only mode. If your site sets a Content-Security-Policy, allow
|
|
20
|
+
`https://challenges.cloudflare.com` for scripts and frames.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- `SignUp` with passwords off and no social provider showed a password form
|
|
25
|
+
the API refuses (`403 METHOD_DISABLED`); it now says creating an account is
|
|
26
|
+
not available (`labels.noMethods`). With a provider, it shows the provider
|
|
27
|
+
buttons alone, as before.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- US English throughout: component text, default labels, the component
|
|
32
|
+
manifest's descriptions and the type documentation now read "color",
|
|
33
|
+
"canceled", "enrollment", "behavior" and so on. Class names (such as
|
|
34
|
+
`b316-mfa-enrol`), element ids, props and label keys are unchanged.
|
|
35
|
+
|
|
36
|
+
## 0.7.0 — 2026-10-29
|
|
37
|
+
|
|
38
|
+
Needs `@base316/sdk` 0.9.0 (`auth.methods`, `socialSignInUrl`), so release the SDK first.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- **`<SignIn>` and `<SignUp>` follow the environment's sign-in settings.** They
|
|
43
|
+
read `GET /v1/auth/methods` and offer what the dashboard has switched on —
|
|
44
|
+
password, magic link, passkeys, text-message codes, social providers and SSO —
|
|
45
|
+
instead of what props turned on. Props can now only turn a method **off**
|
|
46
|
+
(`password`, `passkeys`, `magicLink`, `phone`, `social`, `sso` = `false`).
|
|
47
|
+
Two consequences to check when upgrading: passkeys appear only where the
|
|
48
|
+
environment allows them (they were on by default), and `phone` no longer turns
|
|
49
|
+
text messages on by itself. Until the answer arrives, or against an older API,
|
|
50
|
+
the form draws as before from its props.
|
|
51
|
+
- A magic link lands on the page rendering the form unless
|
|
52
|
+
`magicLinkRedirectUrl` says otherwise (it must be on the redirect allow-list).
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- Social sign-in buttons — "Continue with Google", "Continue with Apple" and the
|
|
57
|
+
rest — with each provider's mark and colours, on `<SignIn>` and `<SignUp>`,
|
|
58
|
+
when `socialRedirectUrl` names your server route that receives the `code`.
|
|
59
|
+
The button writes a `b316_oauth_state` cookie and sends the same value as
|
|
60
|
+
`state`; check them with `readOAuthState` before `exchangeCode`.
|
|
61
|
+
`socialState` carries a value of yours through.
|
|
62
|
+
- `<SocialSignIn socialRedirectUrl>`: the same buttons alone, for a sign-in or
|
|
63
|
+
sign-up form an application draws itself (`intent="sign-up"` hides them when
|
|
64
|
+
the environment is closed to new accounts; `divider` draws the "or" rule).
|
|
65
|
+
- "Sign in with SSO" on `<SignIn>` when an enterprise connection claims a
|
|
66
|
+
domain: the person types their work address and goes to their identity
|
|
67
|
+
provider.
|
|
68
|
+
- `labels` on `<SignIn>` (`SignInLabels`) for every string it shows, and new
|
|
69
|
+
`continueWith`, `or` and `closed` on `<SignUp>`. A closed sign-up says so
|
|
70
|
+
instead of offering a form, unless the page carries an invitation.
|
|
71
|
+
|
|
3
72
|
## 0.6.0 — Unreleased
|
|
4
73
|
|
|
5
74
|
Needs `@base316/sdk` 0.8.0 (`Base316Browser` `organizationId`), so release the SDK first.
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ export default function App({ children }) {
|
|
|
24
24
|
|
|
25
25
|
The provider holds one client and the signed-in user's session, and fetches the
|
|
26
26
|
branding you configured in the Base316 dashboard — so what you set there is what
|
|
27
|
-
these components look like here. No
|
|
27
|
+
these components look like here. No colors to keep in step in two places.
|
|
28
28
|
|
|
29
29
|
## Sign in, in your own page
|
|
30
30
|
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
|
|
60
60
|
Three ways, from least to most invasive. Use the first that works.
|
|
61
61
|
|
|
62
|
-
**1. The dashboard.** Whatever you set under _Sign-in pages_ — brand
|
|
62
|
+
**1. The dashboard.** Whatever you set under _Sign-in pages_ — brand color,
|
|
63
63
|
background, logo — arrives here automatically.
|
|
64
64
|
|
|
65
65
|
**2. `appearance` tokens.** No CSS to write:
|
|
@@ -74,7 +74,7 @@ background, logo — arrives here automatically.
|
|
|
74
74
|
**3. Your own CSS**, targeting the `b316-*` class names, or a `className` on any
|
|
75
75
|
component to hand it your utility classes.
|
|
76
76
|
|
|
77
|
-
Every
|
|
77
|
+
Every color, radius and font is behind a `--b316-*` custom property. Nothing
|
|
78
78
|
inherits your application's styles automatically — silently absorbing whatever
|
|
79
79
|
`body { font }` and `button { }` rules happen to exist produces components that
|
|
80
80
|
look broken in ways neither side can predict.
|