@bravely-studios/account-web 0.3.4 → 0.3.5
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/README.md +31 -0
- package/dist/BravelyAccountManager.js +1 -1
- package/dist/components/BravelyProviderButtons.d.ts +36 -0
- package/dist/components/BravelyProviderButtons.d.ts.map +1 -0
- package/dist/components/BravelyProviderButtons.js +124 -0
- package/dist/components/BravelyProviderButtons.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -77,6 +77,7 @@ window.open(portal.url, "_blank");
|
|
|
77
77
|
| `displayName.ts` | Slug → display-name lookup (`diskaroo` → `Diskaroo`). |
|
|
78
78
|
| `components/ActivationLadder.tsx` | **M3** — post-checkout 4-phase ladder (`Activating <App> Pro…`). |
|
|
79
79
|
| `components/CrossAppCard.tsx` | **M4** — third-quadrant card (`You own N Bravely Pro apps on this account.`). |
|
|
80
|
+
| `components/BravelyProviderButtons.tsx` | Canonical Apple/Google/Email picker — mirrors the Swift SwiftUI surface. |
|
|
80
81
|
| `hooks/useActivationLaneFromUrl.ts` | **M3** — detect `?upgraded` / `?checkout` / `?subscription` return params. |
|
|
81
82
|
| `hooks/useFreshLaunchRestoration.ts` | **M2** — silent rehydrate + brief `Synced N items from your <device>.` toast. |
|
|
82
83
|
|
|
@@ -142,6 +143,26 @@ Detects the three observed post-checkout return URL patterns:
|
|
|
142
143
|
`manager.notifyCheckoutCompleted()` and, if `autoStartPolling`, kicks
|
|
143
144
|
off `manager.pollForActivation()`.
|
|
144
145
|
|
|
146
|
+
### `<BravelyProviderButtons>` (0.3.5)
|
|
147
|
+
|
|
148
|
+
```tsx
|
|
149
|
+
import { BravelyProviderButtons } from "@bravely-studios/account-web";
|
|
150
|
+
|
|
151
|
+
<BravelyProviderButtons
|
|
152
|
+
style={{ variant: "dark", accent: "#0ea5e9" }}
|
|
153
|
+
isBusy={isAuthorizing}
|
|
154
|
+
onTap={(provider) => manager.signIn({ loginHint: provider })}
|
|
155
|
+
/>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Drop-in 3-button provider picker (Apple / Google / Email) sized to the
|
|
159
|
+
hosted shell at `auth.bravely.dev`: 48px height, 12px radius, 10px stack
|
|
160
|
+
gap, 14px label. Web-mirror of the Swift `BravelyProviderButtons`
|
|
161
|
+
component, so the iOS/Mac/Web surfaces of the same app look identical.
|
|
162
|
+
Pure React + inline SVG; no UI-library or CSS-file dependency. Pass
|
|
163
|
+
`style.accent` as any CSS color string — `color-mix` handles the email
|
|
164
|
+
button tint at runtime.
|
|
165
|
+
|
|
145
166
|
### `useFreshLaunchRestoration()` (M2)
|
|
146
167
|
|
|
147
168
|
```tsx
|
|
@@ -210,6 +231,16 @@ Host pages render UI off the `name` (`restoring_session`, `verifying_entitlement
|
|
|
210
231
|
|
|
211
232
|
## Changelog
|
|
212
233
|
|
|
234
|
+
### 0.3.5 — 2026-05-14
|
|
235
|
+
|
|
236
|
+
- **Feature:** added `<BravelyProviderButtons>` — the canonical 3-button
|
|
237
|
+
provider picker (Apple / Google / Email) used across the Bravely web
|
|
238
|
+
family. Mirrors the SwiftUI surface in `bravely-account-swift` so the
|
|
239
|
+
iOS/Mac/Web variants of the same utility share visual treatment. Pure
|
|
240
|
+
React + inline SVGs; no runtime dependency, no CSS file.
|
|
241
|
+
- **Types:** exported `BravelyProviderButtonsProps`,
|
|
242
|
+
`BravelyProviderButtonStyle`, and `ProviderHint`.
|
|
243
|
+
|
|
213
244
|
### 0.3.4 — 2026-05-13
|
|
214
245
|
|
|
215
246
|
- **Infra:** package now publishes to `registry.npmjs.org` (public scope).
|
|
@@ -52,7 +52,7 @@ export class BravelyAccountManager {
|
|
|
52
52
|
redirectUri,
|
|
53
53
|
scope: config.scope ?? DEFAULT_SCOPE,
|
|
54
54
|
libName: config.libName ?? "bravely-account-web",
|
|
55
|
-
libVersion: config.libVersion ?? "0.3.
|
|
55
|
+
libVersion: config.libVersion ?? "0.3.5",
|
|
56
56
|
};
|
|
57
57
|
this.storage = config.storage ?? defaultStorage();
|
|
58
58
|
this.cache = new EntitlementCache({ storage: this.storage });
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement } from "react";
|
|
2
|
+
/** Which provider the user picked. */
|
|
3
|
+
export type ProviderHint = "apple" | "google" | "email";
|
|
4
|
+
/**
|
|
5
|
+
* Theme variant for the provider buttons. `accent` is any CSS color string
|
|
6
|
+
* (hex `#0ea5e9`, named color, `rgb(...)`, etc.) — the email button uses it
|
|
7
|
+
* as both the border and a low-opacity background tint.
|
|
8
|
+
*
|
|
9
|
+
* `light` = light-themed host surfaces (sticki.ly).
|
|
10
|
+
* `dark` = dark-themed host surfaces (everything else in the family).
|
|
11
|
+
*/
|
|
12
|
+
export type BravelyProviderButtonStyle = {
|
|
13
|
+
variant: "light";
|
|
14
|
+
accent: string;
|
|
15
|
+
} | {
|
|
16
|
+
variant: "dark";
|
|
17
|
+
accent: string;
|
|
18
|
+
};
|
|
19
|
+
export interface BravelyProviderButtonsProps {
|
|
20
|
+
/** Theme + accent color. */
|
|
21
|
+
style: BravelyProviderButtonStyle;
|
|
22
|
+
/** True while an auth attempt is in flight; disables clicks and dims. */
|
|
23
|
+
isBusy?: boolean;
|
|
24
|
+
/** Click handler — receives the picked provider hint. */
|
|
25
|
+
onTap: (provider: ProviderHint) => void;
|
|
26
|
+
/** Optional class name applied to the outer container. */
|
|
27
|
+
className?: string;
|
|
28
|
+
/** Optional inline style applied to the outer container. */
|
|
29
|
+
containerStyle?: CSSProperties;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Render the canonical 3-button provider picker. Buttons stack vertically
|
|
33
|
+
* with 10px spacing. Renders Apple → Google → Email in that order.
|
|
34
|
+
*/
|
|
35
|
+
export declare function BravelyProviderButtons(props: BravelyProviderButtonsProps): ReactElement;
|
|
36
|
+
//# sourceMappingURL=BravelyProviderButtons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BravelyProviderButtons.d.ts","sourceRoot":"","sources":["../../src/components/BravelyProviderButtons.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAEzD,sCAAsC;AACtC,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,MAAM,0BAA0B,GAClC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAExC,MAAM,WAAW,2BAA2B;IAC1C,4BAA4B;IAC5B,KAAK,EAAE,0BAA0B,CAAC;IAClC,yEAAyE;IACzE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,KAAK,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IACxC,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,cAAc,CAAC,EAAE,aAAa,CAAC;CAChC;AAyJD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,2BAA2B,GACjC,YAAY,CAkGd"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const SYSTEM_FONT = '-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif';
|
|
3
|
+
const BUTTON_HEIGHT = 48;
|
|
4
|
+
const CORNER_RADIUS = 12;
|
|
5
|
+
const STACK_GAP = 10;
|
|
6
|
+
const LABEL_FONT_SIZE = 14;
|
|
7
|
+
const LABEL_FONT_WEIGHT = 600;
|
|
8
|
+
/**
|
|
9
|
+
* Compose the base style every provider button shares. Per-button overrides
|
|
10
|
+
* (bg, border, text color) layer on top.
|
|
11
|
+
*/
|
|
12
|
+
function baseButtonStyle(isBusy) {
|
|
13
|
+
return {
|
|
14
|
+
boxSizing: "border-box",
|
|
15
|
+
width: "100%",
|
|
16
|
+
minHeight: BUTTON_HEIGHT,
|
|
17
|
+
padding: "0 14px",
|
|
18
|
+
display: "inline-flex",
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
justifyContent: "center",
|
|
21
|
+
gap: 10,
|
|
22
|
+
borderRadius: CORNER_RADIUS,
|
|
23
|
+
fontFamily: SYSTEM_FONT,
|
|
24
|
+
fontSize: LABEL_FONT_SIZE,
|
|
25
|
+
fontWeight: LABEL_FONT_WEIGHT,
|
|
26
|
+
lineHeight: 1,
|
|
27
|
+
letterSpacing: "-0.01em",
|
|
28
|
+
cursor: isBusy ? "default" : "pointer",
|
|
29
|
+
appearance: "none",
|
|
30
|
+
WebkitAppearance: "none",
|
|
31
|
+
border: "1px solid transparent",
|
|
32
|
+
transition: "opacity 120ms ease, transform 120ms ease",
|
|
33
|
+
opacity: isBusy ? 0.55 : 1,
|
|
34
|
+
userSelect: "none",
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Compose the email button background tint. Prefers `color-mix` for
|
|
39
|
+
* accurate alpha blending in modern browsers; falls back to the accent
|
|
40
|
+
* color with the same opacity via a layered approach. We don't try to
|
|
41
|
+
* parse the accent client-side (could be any CSS color form); `color-mix`
|
|
42
|
+
* handles every form the consumer might pass in.
|
|
43
|
+
*/
|
|
44
|
+
function emailBackground(accent, isLight) {
|
|
45
|
+
const pct = isLight ? 18 : 16;
|
|
46
|
+
return `color-mix(in srgb, ${accent} ${pct}%, transparent)`;
|
|
47
|
+
}
|
|
48
|
+
function emailBorder(accent) {
|
|
49
|
+
return `color-mix(in srgb, ${accent} 55%, transparent)`;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Apple logo glyph. Path data ported from the Swift `AppleGlyph` Canvas
|
|
53
|
+
* impl. Coordinate space is 17×24 (matches Swift); rendered into a 16×18
|
|
54
|
+
* box so the visual size matches the SF Symbol `apple.logo` at 16pt.
|
|
55
|
+
*/
|
|
56
|
+
function AppleGlyph({ fill }) {
|
|
57
|
+
return (_jsxs("svg", { width: 16, height: 18, viewBox: "0 0 17 24", role: "presentation", "aria-hidden": "true", focusable: "false", children: [_jsx("path", { fill: fill, d: "M14.13 11.86C14.12 10.24 14.85 9.02 16.34 8.13C15.51 6.94 14.26 6.29 12.6 6.16C11.04 6.04 9.33 7.07 8.71 7.07C8.05 7.07 6.53 6.22 5.34 6.22C2.79 6.22 0.18 8.14 0.18 12.06C0.18 13.79 0.82 15.64 0.82 15.64C1.39 17.26 3.43 21.14 5.55 21.16C6.66 21.13 7.45 20.37 8.89 20.37C10.29 20.37 11.02 21.16 12.26 21.16C14.4 21.13 16.24 17.51 16.78 15.92C13.91 14.57 14.05 11.91 14.13 11.86Z" }), _jsx("path", { fill: fill, d: "M11.6 4.65C12.42 3.66 12.85 2.31 12.73 0.92C11.53 0.97 10.07 1.72 9.21 2.7C8.45 3.58 7.93 4.93 8.07 6.29C9.41 6.39 10.78 5.63 11.6 4.65Z" })] }));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* 4-color Google "G" logomark per Google Identity Branding Guidelines.
|
|
61
|
+
* Inline so the icon stays crisp at every density and the package doesn't
|
|
62
|
+
* carry the redistribution weight of a trademark PNG.
|
|
63
|
+
*/
|
|
64
|
+
function GoogleGGlyph() {
|
|
65
|
+
return (_jsxs("svg", { width: 18, height: 18, viewBox: "0 0 24 24", role: "presentation", "aria-hidden": "true", focusable: "false", children: [_jsx("path", { fill: "#4285F4", d: "M22.56 12.25C22.56 11.47 22.49 10.72 22.36 10H12V14.26H17.92C17.66 15.63 16.88 16.79 15.71 17.57V20.34H19.28C21.36 18.42 22.56 15.6 22.56 12.25Z" }), _jsx("path", { fill: "#34A853", d: "M12 23C14.97 23 17.46 22.02 19.28 20.34L15.71 17.57C14.72 18.23 13.48 18.63 12 18.63C9.14 18.63 6.71 16.7 5.84 14.1L2.18 16.94C4.0 20.53 7.7 23 12 23Z" }), _jsx("path", { fill: "#FBBC05", d: "M5.84 14.09C5.62 13.43 5.49 12.73 5.49 12C5.49 11.27 5.62 10.57 5.84 9.91L2.18 7.07C1.43 8.55 1 10.22 1 12C1 13.78 1.43 15.45 2.18 16.93L5.84 14.09Z" }), _jsx("path", { fill: "#EA4335", d: "M12 5.38C13.62 5.38 15.06 5.94 16.21 7.02L19.36 3.87C17.45 2.09 14.97 1 12 1C7.7 1 3.99 3.47 2.18 7.07L5.84 9.91C6.71 7.31 9.14 5.38 12 5.38Z" })] }));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Envelope glyph for the email button. Stroke-based so it reads at low
|
|
69
|
+
* contrast against the tinted accent background. `currentColor` so the
|
|
70
|
+
* label color from the parent button controls the glyph too.
|
|
71
|
+
*/
|
|
72
|
+
function EmailGlyph() {
|
|
73
|
+
return (_jsxs("svg", { width: 16, height: 16, viewBox: "0 0 16 16", role: "presentation", "aria-hidden": "true", focusable: "false", children: [_jsx("path", { d: "M2 4.5C2 3.67 2.67 3 3.5 3H12.5C13.33 3 14 3.67 14 4.5V11.5C14 12.33 13.33 13 12.5 13H3.5C2.67 13 2 12.33 2 11.5V4.5Z", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinejoin: "round" }), _jsx("path", { d: "M2.5 4.75L8 8.75L13.5 4.75", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Render the canonical 3-button provider picker. Buttons stack vertically
|
|
77
|
+
* with 10px spacing. Renders Apple → Google → Email in that order.
|
|
78
|
+
*/
|
|
79
|
+
export function BravelyProviderButtons(props) {
|
|
80
|
+
const { style, isBusy = false, onTap, className, containerStyle } = props;
|
|
81
|
+
const isLight = style.variant === "light";
|
|
82
|
+
const accent = style.accent;
|
|
83
|
+
// --- Apple ---------------------------------------------------------------
|
|
84
|
+
// Light theme = black button + white text (Apple HIG `black` style).
|
|
85
|
+
// Dark theme = white button + black text (Apple HIG `white` style).
|
|
86
|
+
const appleBg = isLight ? "#000000" : "#ffffff";
|
|
87
|
+
const appleFg = isLight ? "#ffffff" : "#000000";
|
|
88
|
+
// --- Google --------------------------------------------------------------
|
|
89
|
+
// Light theme = white surface + neutral border + dark text (per Google Identity).
|
|
90
|
+
// Dark theme = near-black surface + dark border + light text.
|
|
91
|
+
const googleBg = isLight ? "#ffffff" : "#131316";
|
|
92
|
+
const googleBorder = isLight ? "#dbdde0" : "#3c4043";
|
|
93
|
+
const googleFg = isLight ? "#1e1f20" : "#e3e3e3";
|
|
94
|
+
// --- Email ---------------------------------------------------------------
|
|
95
|
+
// Accent-tinted. Text color picks high-contrast on the chosen surface.
|
|
96
|
+
const emailFg = isLight ? "#1f1a16" : "#ffffff";
|
|
97
|
+
const emailBg = emailBackground(accent, isLight);
|
|
98
|
+
const emailBd = emailBorder(accent);
|
|
99
|
+
const containerStyleResolved = {
|
|
100
|
+
display: "flex",
|
|
101
|
+
flexDirection: "column",
|
|
102
|
+
gap: STACK_GAP,
|
|
103
|
+
width: "100%",
|
|
104
|
+
...containerStyle,
|
|
105
|
+
};
|
|
106
|
+
const base = baseButtonStyle(isBusy);
|
|
107
|
+
return (_jsxs("div", { className: className, style: containerStyleResolved, "data-bravely-component": "provider-buttons", "data-variant": style.variant, children: [_jsxs("button", { type: "button", onClick: () => onTap("apple"), disabled: isBusy, "aria-label": "Sign in with Apple", "data-bravely-provider": "apple", style: {
|
|
108
|
+
...base,
|
|
109
|
+
background: appleBg,
|
|
110
|
+
color: appleFg,
|
|
111
|
+
borderColor: appleBg,
|
|
112
|
+
}, children: [_jsx(AppleGlyph, { fill: appleFg }), _jsx("span", { children: "Sign in with Apple" })] }), _jsxs("button", { type: "button", onClick: () => onTap("google"), disabled: isBusy, "aria-label": "Sign in with Google", "data-bravely-provider": "google", style: {
|
|
113
|
+
...base,
|
|
114
|
+
background: googleBg,
|
|
115
|
+
color: googleFg,
|
|
116
|
+
borderColor: googleBorder,
|
|
117
|
+
}, children: [_jsx(GoogleGGlyph, {}), _jsx("span", { children: "Sign in with Google" })] }), _jsxs("button", { type: "button", onClick: () => onTap("email"), disabled: isBusy, "aria-label": "Continue with email", "data-bravely-provider": "email", "data-bravely-accent": accent, "data-bravely-email-tint-percent": isLight ? 18 : 16, style: {
|
|
118
|
+
...base,
|
|
119
|
+
background: emailBg,
|
|
120
|
+
color: emailFg,
|
|
121
|
+
borderColor: emailBd,
|
|
122
|
+
}, children: [_jsx(EmailGlyph, {}), _jsx("span", { children: "Continue with email" })] })] }));
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=BravelyProviderButtons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BravelyProviderButtons.js","sourceRoot":"","sources":["../../src/components/BravelyProviderButtons.tsx"],"names":[],"mappings":";AAmEA,MAAM,WAAW,GACf,0HAA0H,CAAC;AAE7H,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAE9B;;;GAGG;AACH,SAAS,eAAe,CAAC,MAAe;IACtC,OAAO;QACL,SAAS,EAAE,YAAY;QACvB,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,aAAa;QACxB,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE,aAAa;QACtB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,GAAG,EAAE,EAAE;QACP,YAAY,EAA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ET,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAC9B,QAAQ,EAAE,MAAM,gBACL,qBAAqB,2BACV,QAAQ,EAC9B,KAAK,EAAE;oBACL,GAAG,IAAI;oBACP,UAAU,EAAE,QAAQ;oBACpB,KAAK,EAAE,QAAQ;oBACf,WAAW,EAAE,YAAY;iBAC1B,aAED,KAAC,YAAY,KAAG,EAChB,iDAAgC,IACzB,EAET,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,EAC7B,QAAQ,EAAE,MAAM,gBACL,qBAAqB,2BACV,OAAO,yBAIR,MAAM,qCACM,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAClD,KAAK,EAAE;oBACL,GAAG,IAAI;oBACP,UAAU,EAAE,OAAO;oBACnB,KAAK,EAAE,OAAO;oBACd,WAAW,EAAE,OAAO;iBACrB,aAED,KAAC,UAAU,KAAG,EACd,iDAAgC,IACzB,IACL,CACP,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { generateKeypair, computeJwkThumbprint, generateProof, accessTokenHash,
|
|
|
10
10
|
export type { AppSlug, Entitlement, EntitlementSnapshot, OAuthTokenResponse, BasResponse, BravelyAccountState, ActivationState, ActivationStateName, ManagerConfig, LibVersionPolicy, DeprecationDirective, DeprecationEndpoint, DeprecationClient, CheckoutPlan, PaddlePortalSession, CachedEntitlements, DPoPProof, } from "./types.js";
|
|
11
11
|
export { ActivationLadder, ACTIVATION_LADDER_PHASE_TEMPLATES, ladderPhaseForElapsed, renderLadderCopy, buildResolvedLadder, type ActivationLadderProps, type ActivationLadderPhase, } from "./components/ActivationLadder.js";
|
|
12
12
|
export { CrossAppCard, filterCrossAppEntitlements, countCrossAppEntitlements, renderCrossAppCopy, type CrossAppCardProps, } from "./components/CrossAppCard.js";
|
|
13
|
+
export { BravelyProviderButtons, type BravelyProviderButtonsProps, type BravelyProviderButtonStyle, type ProviderHint, } from "./components/BravelyProviderButtons.js";
|
|
13
14
|
export { useActivationLaneFromUrl, detectActivationLane, type ActivationLaneResult, type ActivationLaneSource, type UseActivationLaneFromUrlOptions, } from "./hooks/useActivationLaneFromUrl.js";
|
|
14
15
|
export { useFreshLaunchRestoration, renderFreshLaunchToastCopy, type FreshLaunchRestorationResult, type UseFreshLaunchRestorationOptions, } from "./hooks/useFreshLaunchRestoration.js";
|
|
15
16
|
export { displayNameFor, DISPLAY_NAMES } from "./displayName.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACzG,YAAY,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACxF,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,KAAK,eAAe,GACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,eAAe,EACf,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,oBAAoB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACtH,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,eAAe,EACf,KAAK,WAAW,GACjB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A0B,EAC1B,KAAK,4BAA4B,EACjC,KAAK,gCAAgC,GACtC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export { generateKeypair, computeJwkThumbprint, generateProof, accessTokenHash,
|
|
|
9
9
|
// ---- C-ux M2/M3/M4 surfaces (Wave A) ---------------------------------------
|
|
10
10
|
export { ActivationLadder, ACTIVATION_LADDER_PHASE_TEMPLATES, ladderPhaseForElapsed, renderLadderCopy, buildResolvedLadder, } from "./components/ActivationLadder.js";
|
|
11
11
|
export { CrossAppCard, filterCrossAppEntitlements, countCrossAppEntitlements, renderCrossAppCopy, } from "./components/CrossAppCard.js";
|
|
12
|
+
export { BravelyProviderButtons, } from "./components/BravelyProviderButtons.js";
|
|
12
13
|
export { useActivationLaneFromUrl, detectActivationLane, } from "./hooks/useActivationLaneFromUrl.js";
|
|
13
14
|
export { useFreshLaunchRestoration, renderFreshLaunchToastCopy, } from "./hooks/useFreshLaunchRestoration.js";
|
|
14
15
|
export { displayNameFor, DISPLAY_NAMES } from "./displayName.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEzG,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACxF,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,mBAAmB,GAEpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,WAAW,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E,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEtH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,eAAe,GAEhB,MAAM,WAAW,CAAC;AAqBnB,+EAA+E;AAC/E,OAAO,EACL,gBAAgB,EAChB,iCAAiC,EACjC,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,GAGpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,YAAY,EACZ,0BAA0B,EAC1B,yBAAyB,EACzB,kBAAkB,GAEnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sBAAsB,GAIvB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,wBAAwB,EACxB,oBAAoB,GAIrB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,yBAAyB,EACzB,0BAA0B,GAG3B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bravely-studios/account-web",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Bravely Account web facade: OAuth 2.1 + PKCE sign-in, BAS lifecycle, entitlement cache, activation state machine, C-ux M2/M3/M4 components. Used by all 9 utility web variants + bravely.dev.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|