@oxyhq/services 22.0.0 → 22.1.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.
Files changed (69) hide show
  1. package/lib/commonjs/index.js +12 -0
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/ui/components/OxyAccountDialog.js +27 -529
  4. package/lib/commonjs/ui/components/OxyAccountDialog.js.map +1 -1
  5. package/lib/commonjs/ui/components/OxyAuthChooser.js +881 -0
  6. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -0
  7. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +158 -0
  8. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -0
  9. package/lib/commonjs/ui/context/OxyContext.js +28 -3
  10. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  11. package/lib/commonjs/ui/context/useOxyAccountGraph.js +6 -2
  12. package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
  13. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +2 -1
  14. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js.map +1 -1
  15. package/lib/commonjs/ui/utils/commonsStoreLinks.js +42 -0
  16. package/lib/commonjs/ui/utils/commonsStoreLinks.js.map +1 -0
  17. package/lib/module/index.js +5 -0
  18. package/lib/module/index.js.map +1 -1
  19. package/lib/module/ui/components/OxyAccountDialog.js +29 -533
  20. package/lib/module/ui/components/OxyAccountDialog.js.map +1 -1
  21. package/lib/module/ui/components/OxyAuthChooser.js +878 -0
  22. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -0
  23. package/lib/module/ui/components/oxyAuthChooserStyles.js +155 -0
  24. package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -0
  25. package/lib/module/ui/context/OxyContext.js +28 -3
  26. package/lib/module/ui/context/OxyContext.js.map +1 -1
  27. package/lib/module/ui/context/useOxyAccountGraph.js +6 -2
  28. package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
  29. package/lib/module/ui/hooks/useSwitchableAccounts.js +2 -1
  30. package/lib/module/ui/hooks/useSwitchableAccounts.js.map +1 -1
  31. package/lib/module/ui/utils/commonsStoreLinks.js +37 -0
  32. package/lib/module/ui/utils/commonsStoreLinks.js.map +1 -0
  33. package/lib/typescript/commonjs/index.d.ts +2 -0
  34. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  35. package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts +10 -20
  36. package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +1 -1
  37. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +60 -0
  38. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -0
  39. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +148 -0
  40. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -0
  41. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  42. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +1 -0
  43. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  44. package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
  45. package/lib/typescript/commonjs/ui/utils/commonsStoreLinks.d.ts +24 -0
  46. package/lib/typescript/commonjs/ui/utils/commonsStoreLinks.d.ts.map +1 -0
  47. package/lib/typescript/module/index.d.ts +2 -0
  48. package/lib/typescript/module/index.d.ts.map +1 -1
  49. package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts +10 -20
  50. package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +1 -1
  51. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +60 -0
  52. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -0
  53. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +148 -0
  54. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -0
  55. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  56. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +1 -0
  57. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  58. package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
  59. package/lib/typescript/module/ui/utils/commonsStoreLinks.d.ts +24 -0
  60. package/lib/typescript/module/ui/utils/commonsStoreLinks.d.ts.map +1 -0
  61. package/package.json +4 -4
  62. package/src/index.ts +7 -0
  63. package/src/ui/components/OxyAccountDialog.tsx +33 -557
  64. package/src/ui/components/OxyAuthChooser.tsx +883 -0
  65. package/src/ui/components/oxyAuthChooserStyles.ts +152 -0
  66. package/src/ui/context/OxyContext.tsx +31 -3
  67. package/src/ui/context/useOxyAccountGraph.ts +4 -2
  68. package/src/ui/hooks/useSwitchableAccounts.ts +1 -0
  69. package/src/ui/utils/commonsStoreLinks.ts +38 -0
@@ -1,24 +1,13 @@
1
1
  /**
2
2
  * OxyAccountDialog — the ONE unified account dialog for `@oxyhq/services`.
3
3
  *
4
- * A thin React Native binding over the headless `AccountDialogController` in
5
- * `@oxyhq/core` (bound via `useSyncExternalStore`), presented as a Bloom `<Dialog>`.
6
- * One surface for account switching and sign-in data and state machine live in core.
7
- *
8
- * Views (from `snapshot.view`):
9
- * - `accounts` the unified `SwitchableAccount[]` list (device sign-ins graph
10
- * accounts). Tapping a row switches through `controller.switchTo(accountId)`
11
- * (the uniform switch), the active row is flagged, and a "+ Add account" row
12
- * opens the sign-in entry. This is what `ProfileButton` opens.
13
- * - `add` / `signin` — the sign-in entry: primary "Sign in with Oxy" (device
14
- * flow), "Scan a QR", and a secondary "Use a password" hand-off that opens
15
- * auth.oxy.so (password + 2FA are NOT in the SDK).
16
- * - `qr` — the cross-device QR handoff + its waiting state.
17
- *
18
- * Per-account color re-theming uses Bloom's `APP_COLOR_PRESETS` + `BloomColorScope`
19
- * (same visual language auth.oxy.so uses). Base theming is `useTheme()` + a
20
- * `StyleSheet`, so the dialog renders correctly in EVERY consumer — including apps
21
- * that do not use NativeWind (e.g. the accounts app).
4
+ * Bloom `<Dialog>` chrome (header, back button, placement, scroll body) around
5
+ * the headless chooser logic, which lives in `OxyAuthChooser` — the account
6
+ * switcher, sign-in, sign-up, and QR views are ALL there, extracted so the
7
+ * same chooser can be mounted bare by a future host with no Dialog chrome
8
+ * (e.g. an auth.oxy.so hub page driving the cross-origin passkey popup, b2).
9
+ * This file owns ONLY the chrome: the title/subtitle per view, the back
10
+ * button, and the Bloom `<Dialog>` surface itself.
22
11
  *
23
12
  * The surface is Bloom's `<Dialog>` (`@oxyhq/bloom/dialog`) with a responsive
24
13
  * `placement` — a bottom sheet on narrow viewports, a centered card on wide ones.
@@ -34,8 +23,9 @@
34
23
  * Backdrop / swipe-to-dismiss is disabled (`dismissOnBackdrop={false}`) on purpose:
35
24
  * Bloom's controlled `bottom` placement does not fire `onClose` on a gesture or
36
25
  * backdrop dismissal, so allowing it would desync `isAccountDialogOpen` from the
37
- * sheet and block reopening. The header close button (and a successful switch)
38
- * drive `closeAccountDialog`, which flips `open` and runs the exit animation.
26
+ * sheet and block reopening. The header close button (and `OxyAuthChooser`'s
27
+ * `onComplete`) drive `closeAccountDialog`, which flips `open` and runs the exit
28
+ * animation.
39
29
  */
40
30
  import type React from 'react';
41
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"OxyAccountDialog.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgE/B;;;GAGG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAwJ7B,CAAC;AA0fF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"OxyAccountDialog.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B;;;GAGG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAgD7B,CAAC;AAgJF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * OxyAuthChooser — the account switcher + sign-in/sign-up surface, WITHOUT
3
+ * any dialog chrome.
4
+ *
5
+ * A thin React Native binding over the headless `AccountDialogController` in
6
+ * `@oxyhq/core` (bound via `useSyncExternalStore`) — the same data/state
7
+ * machine {@link OxyAccountDialog} renders, extracted so it can be mounted in
8
+ * TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialog` (the normal
9
+ * in-app surface), and mounted bare by a future auth.oxy.so hub page for the
10
+ * cross-origin passkey popup (b2) — same chooser, two hosts, two completion
11
+ * strategies via the `onComplete` prop. Neither host duplicates view logic.
12
+ *
13
+ * Views (from `snapshot.view`):
14
+ * - `accounts` — the unified `SwitchableAccount[]` list. Tapping a row
15
+ * switches through `controller.switchTo(accountId)`, the active row is
16
+ * flagged, and a "+ Add account" row opens the sign-in entry.
17
+ * - `add` / `signin` — the sign-in entry. On WEB this auto-starts "Sign in
18
+ * with Oxy" (native shared-keychain silently, else the QR handoff) the
19
+ * instant the view is entered — the QR is the PRIMARY web surface, not a
20
+ * button behind a click. On NATIVE it stays button-driven (unchanged):
21
+ * primary "Sign in with Oxy", secondary "Scan a QR from another device".
22
+ * Both platforms get a footer entry into `signup`.
23
+ * - `signup` — account creation. Commons is ALWAYS the priority path (owner
24
+ * mandate) and leads everywhere it appears: native shows only "Create your
25
+ * identity in Commons" (or "Get Commons" first, if not installed); web on
26
+ * a first-party Oxy origin leads with the SAME "Get Commons" CTA, with
27
+ * inline passkey creation (username + `registerWithPasskey`) offered
28
+ * UNDERNEATH as the de-emphasized "don't want to install anything"
29
+ * alternative — never co-equal, never a competing button. Anywhere else (a
30
+ * non-Oxy web origin, before the b2 hub-relay ships) shows an honest "not
31
+ * available here yet" message instead of a broken button.
32
+ * - `qr` — the cross-device Commons handoff, and the PRIMARY web sign-in
33
+ * surface. On a first-party Oxy origin this ALSO carries a "No Commons?"
34
+ * passkey link — identity is ONE thing (Commons key or browser passkey,
35
+ * same Oxy ID), so there is no separate "sign in with a passkey" button
36
+ * anywhere in this file, but passkey is explicitly the LIGHTWEIGHT
37
+ * ALTERNATIVE for someone who doesn't want to install Commons, never
38
+ * co-equal: same small-text-link subordination, same framing, wherever it
39
+ * appears. Native additionally branches on `commonsAvailability`: when
40
+ * Commons isn't installed, this leads with a "Get Commons" CTA instead of
41
+ * a same-device dead-end QR.
42
+ *
43
+ * Per-account color re-theming uses Bloom's `APP_COLOR_PRESETS` + `BloomColorScope`
44
+ * (same visual language auth.oxy.so uses). Base theming is `useTheme()` + a
45
+ * `StyleSheet`, so this renders correctly in EVERY consumer — including apps
46
+ * that do not use NativeWind (e.g. the accounts app).
47
+ */
48
+ import type React from 'react';
49
+ export interface OxyAuthChooserProps {
50
+ /** Called after a completed switch, sign-in, or sign-up. */
51
+ onComplete?: () => void;
52
+ }
53
+ /**
54
+ * The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialog`
55
+ * (wrapped in Bloom's `<Dialog>`) today; mountable bare by any future host that
56
+ * supplies its own `onComplete`.
57
+ */
58
+ declare const OxyAuthChooser: React.FC<OxyAuthChooserProps>;
59
+ export default OxyAuthChooser;
60
+ //# sourceMappingURL=OxyAuthChooser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OxyAuthChooser.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAuthChooser.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyC/B,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AA8BD;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwLjD,CAAC;AA2jBF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,148 @@
1
+ /**
2
+ * Shared styles for `OxyAuthChooser`'s views. Extracted from `OxyAccountDialog`
3
+ * so both the Dialog-wrapped host and any bare host (e.g. a future
4
+ * auth.oxy.so hub page) render identically without duplicating a StyleSheet.
5
+ */
6
+ export declare const authChooserStyles: {
7
+ rows: {
8
+ width: "100%";
9
+ gap: number;
10
+ };
11
+ accountRow: {
12
+ flexDirection: "row";
13
+ alignItems: "center";
14
+ gap: number;
15
+ borderWidth: number;
16
+ borderRadius: number;
17
+ paddingVertical: number;
18
+ paddingHorizontal: number;
19
+ };
20
+ rowDisabled: {
21
+ opacity: number;
22
+ };
23
+ avatarRing: {
24
+ borderRadius: number;
25
+ borderWidth: number;
26
+ padding: number;
27
+ };
28
+ rowMeta: {
29
+ flex: number;
30
+ minWidth: number;
31
+ };
32
+ rowName: {
33
+ fontSize: number;
34
+ fontWeight: "600";
35
+ };
36
+ rowHandle: {
37
+ fontSize: number;
38
+ marginTop: number;
39
+ };
40
+ addRow: {
41
+ flexDirection: "row";
42
+ alignItems: "center";
43
+ gap: number;
44
+ borderWidth: number;
45
+ borderStyle: "dashed";
46
+ borderRadius: number;
47
+ paddingVertical: number;
48
+ paddingHorizontal: number;
49
+ marginTop: number;
50
+ };
51
+ addBadge: {
52
+ width: number;
53
+ height: number;
54
+ borderRadius: number;
55
+ borderWidth: number;
56
+ alignItems: "center";
57
+ justifyContent: "center";
58
+ };
59
+ footerLinks: {
60
+ alignItems: "center";
61
+ marginTop: number;
62
+ };
63
+ footerLink: {
64
+ alignSelf: "center";
65
+ paddingVertical: number;
66
+ marginTop: number;
67
+ };
68
+ linkText: {
69
+ fontSize: number;
70
+ fontWeight: "600";
71
+ };
72
+ signInBlock: {
73
+ width: "100%";
74
+ };
75
+ primaryButton: {
76
+ width: "100%";
77
+ borderRadius: number;
78
+ marginTop: number;
79
+ };
80
+ secondaryButton: {
81
+ width: "100%";
82
+ borderRadius: number;
83
+ marginTop: number;
84
+ };
85
+ usernameInput: {
86
+ width: "100%";
87
+ borderWidth: number;
88
+ borderRadius: number;
89
+ paddingVertical: number;
90
+ paddingHorizontal: number;
91
+ fontSize: number;
92
+ marginTop: number;
93
+ };
94
+ dividerRow: {
95
+ flexDirection: "row";
96
+ alignItems: "center";
97
+ width: "100%";
98
+ marginVertical: number;
99
+ };
100
+ dividerLine: {
101
+ flex: number;
102
+ height: number;
103
+ };
104
+ dividerText: {
105
+ marginHorizontal: number;
106
+ fontSize: number;
107
+ };
108
+ centeredBlock: {
109
+ alignItems: "center";
110
+ justifyContent: "center";
111
+ gap: number;
112
+ paddingVertical: number;
113
+ };
114
+ mutedText: {
115
+ fontSize: number;
116
+ textAlign: "center";
117
+ };
118
+ qrHeadline: {
119
+ fontSize: number;
120
+ fontWeight: "700";
121
+ textAlign: "center";
122
+ };
123
+ errorText: {
124
+ fontSize: number;
125
+ textAlign: "center";
126
+ };
127
+ errorBanner: {
128
+ flexDirection: "row";
129
+ alignItems: "center";
130
+ gap: number;
131
+ width: "100%";
132
+ borderRadius: number;
133
+ paddingVertical: number;
134
+ paddingHorizontal: number;
135
+ marginBottom: number;
136
+ };
137
+ errorBannerText: {
138
+ flex: number;
139
+ fontSize: number;
140
+ lineHeight: number;
141
+ };
142
+ qrPlate: {
143
+ padding: number;
144
+ borderRadius: number;
145
+ backgroundColor: string;
146
+ };
147
+ };
148
+ //# sourceMappingURL=oxyAuthChooserStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oxyAuthChooserStyles.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/oxyAuthChooserStyles.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6I5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0D/B,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EAExB,MAAM,mBAAmB,CAAC;AAY3B,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAIlF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAg5BzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,mCAAc,CAAC;AAmE9C,eAAO,MAAM,MAAM,QAAO,eAMzB,CAAC"}
1
+ {"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0D/B,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EAExB,MAAM,mBAAmB,CAAC;AAY3B,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAIlF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA46BzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,mCAAc,CAAC;AAmE9C,eAAO,MAAM,MAAM,QAAO,eAMzB,CAAC"}
@@ -11,6 +11,7 @@ interface UseOxyAccountGraphParams {
11
11
  syncFromClient: () => Promise<void>;
12
12
  commitSession: (input: CommitInput, options: {
13
13
  activate: boolean;
14
+ hubSync?: boolean;
14
15
  }) => Promise<void>;
15
16
  queryClient: QueryClient;
16
17
  accountDialogControllerRef: RefObject<AccountDialogController | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"useOxyAccountGraph.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/useOxyAccountGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIxH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,UAAU,wBAAwB;IAChC,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,aAAa,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrF,WAAW,EAAE,WAAW,CAAC;IACzB,0BAA0B,EAAE,SAAS,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;IACtE,oBAAoB,EAAE,SAAS,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CACtD;AAED,wBAAgB,kBAAkB,CAAC,EACjC,eAAe,EACf,UAAU,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,cAAc,EACd,aAAa,EACb,WAAW,EACX,0BAA0B,EAC1B,oBAAoB,GACrB,EAAE,wBAAwB;;2BAGqB,OAAO,CAAC,IAAI,CAAC;iCAiCvC,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;0BA+B3B,kBAAkB,KAAG,OAAO,CAA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AAG,OAAO,CAAC,WAAW,CAAC;EAczD"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSwitchableAccounts.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useSwitchableAccounts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAyB,MAAM,aAAa,CAAC;AAG5E,MAAM,WAAW,2BAA2B;IACxC,0EAA0E;IAC1E,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,0EAA0E;IAC1E,SAAS,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAgBD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,IAAI,2BAA2B,CAuBnE"}
1
+ {"version":3,"file":"useSwitchableAccounts.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useSwitchableAccounts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAyB,MAAM,aAAa,CAAC;AAG5E,MAAM,WAAW,2BAA2B;IACxC,0EAA0E;IAC1E,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,0EAA0E;IAC1E,SAAS,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAiBD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,IAAI,2BAA2B,CAuBnE"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Where to send a user who doesn't have Commons installed yet.
3
+ *
4
+ * Commons is not published to either app store as of this writing (no submit
5
+ * profile in its `eas.json`, no store listing) — so these are ALWAYS
6
+ * env-overridable and NEVER hardcoded, and the landing-page fallback exists
7
+ * precisely so a "Get Commons" affordance is never a dead link in the
8
+ * meantime. Once Commons ships to TestFlight/Play, set the two store env vars
9
+ * and every consumer picks them up with no code change.
10
+ */
11
+ /** Real per-platform store URLs, or `undefined` where not yet configured. */
12
+ export interface CommonsStoreLinks {
13
+ ios: string | undefined;
14
+ android: string | undefined;
15
+ }
16
+ /** Per-platform Commons store URLs, from env — `undefined` when unset. */
17
+ export declare function getCommonsStoreLinks(): CommonsStoreLinks;
18
+ /**
19
+ * Resolve the "Get Commons" href for the current platform. Never `undefined`
20
+ * — falls back to a landing page so the affordance is always a working link,
21
+ * store listing or not.
22
+ */
23
+ export declare function getCommonsAcquisitionUrl(platformOS: 'ios' | 'android' | string): string;
24
+ //# sourceMappingURL=commonsStoreLinks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commonsStoreLinks.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/commonsStoreLinks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,6EAA6E;AAC7E,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,0EAA0E;AAC1E,wBAAgB,oBAAoB,IAAI,iBAAiB,CAKxD;AAKD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAIvF"}
@@ -72,6 +72,8 @@ export { LogoIcon } from './ui/components/logo/LogoIcon.js';
72
72
  export { LogoText } from './ui/components/logo/LogoText.js';
73
73
  export { default as ProfileButton } from './ui/components/ProfileButton.js';
74
74
  export type { ProfileButtonProps } from './ui/components/ProfileButton.js';
75
+ export { default as OxyAuthChooser } from './ui/components/OxyAuthChooser.js';
76
+ export type { OxyAuthChooserProps } from './ui/components/OxyAuthChooser.js';
75
77
  export { useSwitchableAccounts } from './ui/hooks/useSwitchableAccounts.js';
76
78
  export type { UseSwitchableAccountsResult } from './ui/hooks/useSwitchableAccounts.js';
77
79
  export { default as ProfileScreen } from './ui/screens/ProfileScreen.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"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EAAE,MAAM,mCAAgC,CAAC;AAC3E,YAAY,EAAE,mBAAmB,EAAE,MAAM,mCAAgC,CAAC;AAQ1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAkC,CAAC;AACzE,YAAY,EAAE,2BAA2B,EAAE,MAAM,qCAAkC,CAAC;AAGpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,+BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,qCAAkC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,qCAAkC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,mCAAgC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,qCAAkC,CAAC;AAGlF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,qCAAkC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,uCAAoC,CAAC;AAKtF,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uCAAoC,CAAC;AACvF,YAAY,EAAE,SAAS,EAAE,MAAM,2BAAwB,CAAC;AAMxD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,yCAAsC,CAAC"}
@@ -1,24 +1,13 @@
1
1
  /**
2
2
  * OxyAccountDialog — the ONE unified account dialog for `@oxyhq/services`.
3
3
  *
4
- * A thin React Native binding over the headless `AccountDialogController` in
5
- * `@oxyhq/core` (bound via `useSyncExternalStore`), presented as a Bloom `<Dialog>`.
6
- * One surface for account switching and sign-in data and state machine live in core.
7
- *
8
- * Views (from `snapshot.view`):
9
- * - `accounts` the unified `SwitchableAccount[]` list (device sign-ins graph
10
- * accounts). Tapping a row switches through `controller.switchTo(accountId)`
11
- * (the uniform switch), the active row is flagged, and a "+ Add account" row
12
- * opens the sign-in entry. This is what `ProfileButton` opens.
13
- * - `add` / `signin` — the sign-in entry: primary "Sign in with Oxy" (device
14
- * flow), "Scan a QR", and a secondary "Use a password" hand-off that opens
15
- * auth.oxy.so (password + 2FA are NOT in the SDK).
16
- * - `qr` — the cross-device QR handoff + its waiting state.
17
- *
18
- * Per-account color re-theming uses Bloom's `APP_COLOR_PRESETS` + `BloomColorScope`
19
- * (same visual language auth.oxy.so uses). Base theming is `useTheme()` + a
20
- * `StyleSheet`, so the dialog renders correctly in EVERY consumer — including apps
21
- * that do not use NativeWind (e.g. the accounts app).
4
+ * Bloom `<Dialog>` chrome (header, back button, placement, scroll body) around
5
+ * the headless chooser logic, which lives in `OxyAuthChooser` — the account
6
+ * switcher, sign-in, sign-up, and QR views are ALL there, extracted so the
7
+ * same chooser can be mounted bare by a future host with no Dialog chrome
8
+ * (e.g. an auth.oxy.so hub page driving the cross-origin passkey popup, b2).
9
+ * This file owns ONLY the chrome: the title/subtitle per view, the back
10
+ * button, and the Bloom `<Dialog>` surface itself.
22
11
  *
23
12
  * The surface is Bloom's `<Dialog>` (`@oxyhq/bloom/dialog`) with a responsive
24
13
  * `placement` — a bottom sheet on narrow viewports, a centered card on wide ones.
@@ -34,8 +23,9 @@
34
23
  * Backdrop / swipe-to-dismiss is disabled (`dismissOnBackdrop={false}`) on purpose:
35
24
  * Bloom's controlled `bottom` placement does not fire `onClose` on a gesture or
36
25
  * backdrop dismissal, so allowing it would desync `isAccountDialogOpen` from the
37
- * sheet and block reopening. The header close button (and a successful switch)
38
- * drive `closeAccountDialog`, which flips `open` and runs the exit animation.
26
+ * sheet and block reopening. The header close button (and `OxyAuthChooser`'s
27
+ * `onComplete`) drive `closeAccountDialog`, which flips `open` and runs the exit
28
+ * animation.
39
29
  */
40
30
  import type React from 'react';
41
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"OxyAccountDialog.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgE/B;;;GAGG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAwJ7B,CAAC;AA0fF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"OxyAccountDialog.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B;;;GAGG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAgD7B,CAAC;AAgJF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * OxyAuthChooser — the account switcher + sign-in/sign-up surface, WITHOUT
3
+ * any dialog chrome.
4
+ *
5
+ * A thin React Native binding over the headless `AccountDialogController` in
6
+ * `@oxyhq/core` (bound via `useSyncExternalStore`) — the same data/state
7
+ * machine {@link OxyAccountDialog} renders, extracted so it can be mounted in
8
+ * TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialog` (the normal
9
+ * in-app surface), and mounted bare by a future auth.oxy.so hub page for the
10
+ * cross-origin passkey popup (b2) — same chooser, two hosts, two completion
11
+ * strategies via the `onComplete` prop. Neither host duplicates view logic.
12
+ *
13
+ * Views (from `snapshot.view`):
14
+ * - `accounts` — the unified `SwitchableAccount[]` list. Tapping a row
15
+ * switches through `controller.switchTo(accountId)`, the active row is
16
+ * flagged, and a "+ Add account" row opens the sign-in entry.
17
+ * - `add` / `signin` — the sign-in entry. On WEB this auto-starts "Sign in
18
+ * with Oxy" (native shared-keychain silently, else the QR handoff) the
19
+ * instant the view is entered — the QR is the PRIMARY web surface, not a
20
+ * button behind a click. On NATIVE it stays button-driven (unchanged):
21
+ * primary "Sign in with Oxy", secondary "Scan a QR from another device".
22
+ * Both platforms get a footer entry into `signup`.
23
+ * - `signup` — account creation. Commons is ALWAYS the priority path (owner
24
+ * mandate) and leads everywhere it appears: native shows only "Create your
25
+ * identity in Commons" (or "Get Commons" first, if not installed); web on
26
+ * a first-party Oxy origin leads with the SAME "Get Commons" CTA, with
27
+ * inline passkey creation (username + `registerWithPasskey`) offered
28
+ * UNDERNEATH as the de-emphasized "don't want to install anything"
29
+ * alternative — never co-equal, never a competing button. Anywhere else (a
30
+ * non-Oxy web origin, before the b2 hub-relay ships) shows an honest "not
31
+ * available here yet" message instead of a broken button.
32
+ * - `qr` — the cross-device Commons handoff, and the PRIMARY web sign-in
33
+ * surface. On a first-party Oxy origin this ALSO carries a "No Commons?"
34
+ * passkey link — identity is ONE thing (Commons key or browser passkey,
35
+ * same Oxy ID), so there is no separate "sign in with a passkey" button
36
+ * anywhere in this file, but passkey is explicitly the LIGHTWEIGHT
37
+ * ALTERNATIVE for someone who doesn't want to install Commons, never
38
+ * co-equal: same small-text-link subordination, same framing, wherever it
39
+ * appears. Native additionally branches on `commonsAvailability`: when
40
+ * Commons isn't installed, this leads with a "Get Commons" CTA instead of
41
+ * a same-device dead-end QR.
42
+ *
43
+ * Per-account color re-theming uses Bloom's `APP_COLOR_PRESETS` + `BloomColorScope`
44
+ * (same visual language auth.oxy.so uses). Base theming is `useTheme()` + a
45
+ * `StyleSheet`, so this renders correctly in EVERY consumer — including apps
46
+ * that do not use NativeWind (e.g. the accounts app).
47
+ */
48
+ import type React from 'react';
49
+ export interface OxyAuthChooserProps {
50
+ /** Called after a completed switch, sign-in, or sign-up. */
51
+ onComplete?: () => void;
52
+ }
53
+ /**
54
+ * The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialog`
55
+ * (wrapped in Bloom's `<Dialog>`) today; mountable bare by any future host that
56
+ * supplies its own `onComplete`.
57
+ */
58
+ declare const OxyAuthChooser: React.FC<OxyAuthChooserProps>;
59
+ export default OxyAuthChooser;
60
+ //# sourceMappingURL=OxyAuthChooser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OxyAuthChooser.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAuthChooser.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyC/B,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AA8BD;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwLjD,CAAC;AA2jBF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,148 @@
1
+ /**
2
+ * Shared styles for `OxyAuthChooser`'s views. Extracted from `OxyAccountDialog`
3
+ * so both the Dialog-wrapped host and any bare host (e.g. a future
4
+ * auth.oxy.so hub page) render identically without duplicating a StyleSheet.
5
+ */
6
+ export declare const authChooserStyles: {
7
+ rows: {
8
+ width: "100%";
9
+ gap: number;
10
+ };
11
+ accountRow: {
12
+ flexDirection: "row";
13
+ alignItems: "center";
14
+ gap: number;
15
+ borderWidth: number;
16
+ borderRadius: number;
17
+ paddingVertical: number;
18
+ paddingHorizontal: number;
19
+ };
20
+ rowDisabled: {
21
+ opacity: number;
22
+ };
23
+ avatarRing: {
24
+ borderRadius: number;
25
+ borderWidth: number;
26
+ padding: number;
27
+ };
28
+ rowMeta: {
29
+ flex: number;
30
+ minWidth: number;
31
+ };
32
+ rowName: {
33
+ fontSize: number;
34
+ fontWeight: "600";
35
+ };
36
+ rowHandle: {
37
+ fontSize: number;
38
+ marginTop: number;
39
+ };
40
+ addRow: {
41
+ flexDirection: "row";
42
+ alignItems: "center";
43
+ gap: number;
44
+ borderWidth: number;
45
+ borderStyle: "dashed";
46
+ borderRadius: number;
47
+ paddingVertical: number;
48
+ paddingHorizontal: number;
49
+ marginTop: number;
50
+ };
51
+ addBadge: {
52
+ width: number;
53
+ height: number;
54
+ borderRadius: number;
55
+ borderWidth: number;
56
+ alignItems: "center";
57
+ justifyContent: "center";
58
+ };
59
+ footerLinks: {
60
+ alignItems: "center";
61
+ marginTop: number;
62
+ };
63
+ footerLink: {
64
+ alignSelf: "center";
65
+ paddingVertical: number;
66
+ marginTop: number;
67
+ };
68
+ linkText: {
69
+ fontSize: number;
70
+ fontWeight: "600";
71
+ };
72
+ signInBlock: {
73
+ width: "100%";
74
+ };
75
+ primaryButton: {
76
+ width: "100%";
77
+ borderRadius: number;
78
+ marginTop: number;
79
+ };
80
+ secondaryButton: {
81
+ width: "100%";
82
+ borderRadius: number;
83
+ marginTop: number;
84
+ };
85
+ usernameInput: {
86
+ width: "100%";
87
+ borderWidth: number;
88
+ borderRadius: number;
89
+ paddingVertical: number;
90
+ paddingHorizontal: number;
91
+ fontSize: number;
92
+ marginTop: number;
93
+ };
94
+ dividerRow: {
95
+ flexDirection: "row";
96
+ alignItems: "center";
97
+ width: "100%";
98
+ marginVertical: number;
99
+ };
100
+ dividerLine: {
101
+ flex: number;
102
+ height: number;
103
+ };
104
+ dividerText: {
105
+ marginHorizontal: number;
106
+ fontSize: number;
107
+ };
108
+ centeredBlock: {
109
+ alignItems: "center";
110
+ justifyContent: "center";
111
+ gap: number;
112
+ paddingVertical: number;
113
+ };
114
+ mutedText: {
115
+ fontSize: number;
116
+ textAlign: "center";
117
+ };
118
+ qrHeadline: {
119
+ fontSize: number;
120
+ fontWeight: "700";
121
+ textAlign: "center";
122
+ };
123
+ errorText: {
124
+ fontSize: number;
125
+ textAlign: "center";
126
+ };
127
+ errorBanner: {
128
+ flexDirection: "row";
129
+ alignItems: "center";
130
+ gap: number;
131
+ width: "100%";
132
+ borderRadius: number;
133
+ paddingVertical: number;
134
+ paddingHorizontal: number;
135
+ marginBottom: number;
136
+ };
137
+ errorBannerText: {
138
+ flex: number;
139
+ fontSize: number;
140
+ lineHeight: number;
141
+ };
142
+ qrPlate: {
143
+ padding: number;
144
+ borderRadius: number;
145
+ backgroundColor: string;
146
+ };
147
+ };
148
+ //# sourceMappingURL=oxyAuthChooserStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oxyAuthChooserStyles.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/oxyAuthChooserStyles.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6I5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0D/B,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EAExB,MAAM,sBAAmB,CAAC;AAY3B,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,sBAAmB,CAAC;AAIlF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAg5BzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,mCAAc,CAAC;AAmE9C,eAAO,MAAM,MAAM,QAAO,eAMzB,CAAC"}
1
+ {"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0D/B,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EAExB,MAAM,sBAAmB,CAAC;AAY3B,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,sBAAmB,CAAC;AAIlF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA46BzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,mCAAc,CAAC;AAmE9C,eAAO,MAAM,MAAM,QAAO,eAMzB,CAAC"}
@@ -11,6 +11,7 @@ interface UseOxyAccountGraphParams {
11
11
  syncFromClient: () => Promise<void>;
12
12
  commitSession: (input: CommitInput, options: {
13
13
  activate: boolean;
14
+ hubSync?: boolean;
14
15
  }) => Promise<void>;
15
16
  queryClient: QueryClient;
16
17
  accountDialogControllerRef: RefObject<AccountDialogController | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"useOxyAccountGraph.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/useOxyAccountGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIxH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAmB,CAAC;AAErD,UAAU,wBAAwB;IAChC,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,aAAa,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrF,WAAW,EAAE,WAAW,CAAC;IACzB,0BAA0B,EAAE,SAAS,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;IACtE,oBAAoB,EAAE,SAAS,CAAC,MAAM,OAAO,CAAC,IA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