@oxy.so/services 14.22.0 → 14.24.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 (57) hide show
  1. package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js +77 -9
  2. package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js.map +1 -1
  3. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +4 -11
  4. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  5. package/lib/commonjs/ui/screens/SupervisionScreen.js +12 -0
  6. package/lib/commonjs/ui/screens/SupervisionScreen.js.map +1 -1
  7. package/lib/commonjs/ui/screens/UserListScreen.js +13 -40
  8. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  9. package/lib/commonjs/ui/utils/apiErrorMessage.js +4 -0
  10. package/lib/commonjs/ui/utils/apiErrorMessage.js.map +1 -1
  11. package/lib/commonjs/ui/utils/calendarDate.js +30 -0
  12. package/lib/commonjs/ui/utils/calendarDate.js.map +1 -0
  13. package/lib/commonjs/ui/utils/persistedDataVersion.js +1 -1
  14. package/lib/module/ui/components/signIn/OxySignUpPanel.js +80 -12
  15. package/lib/module/ui/components/signIn/OxySignUpPanel.js.map +1 -1
  16. package/lib/module/ui/screens/EditProfileFieldScreen.js +4 -11
  17. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  18. package/lib/module/ui/screens/SupervisionScreen.js +12 -0
  19. package/lib/module/ui/screens/SupervisionScreen.js.map +1 -1
  20. package/lib/module/ui/screens/UserListScreen.js +13 -40
  21. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  22. package/lib/module/ui/utils/apiErrorMessage.js +5 -1
  23. package/lib/module/ui/utils/apiErrorMessage.js.map +1 -1
  24. package/lib/module/ui/utils/calendarDate.js +25 -0
  25. package/lib/module/ui/utils/calendarDate.js.map +1 -0
  26. package/lib/module/ui/utils/persistedDataVersion.js +1 -1
  27. package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts +4 -1
  28. package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -1
  29. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +1 -0
  30. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  31. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  32. package/lib/typescript/commonjs/ui/screens/SupervisionScreen.d.ts.map +1 -1
  33. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
  34. package/lib/typescript/commonjs/ui/utils/apiErrorMessage.d.ts.map +1 -1
  35. package/lib/typescript/commonjs/ui/utils/calendarDate.d.ts +13 -0
  36. package/lib/typescript/commonjs/ui/utils/calendarDate.d.ts.map +1 -0
  37. package/lib/typescript/commonjs/ui/utils/persistedDataVersion.d.ts +1 -1
  38. package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts +4 -1
  39. package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -1
  40. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +1 -0
  41. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  42. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  43. package/lib/typescript/module/ui/screens/SupervisionScreen.d.ts.map +1 -1
  44. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  45. package/lib/typescript/module/ui/utils/apiErrorMessage.d.ts.map +1 -1
  46. package/lib/typescript/module/ui/utils/calendarDate.d.ts +13 -0
  47. package/lib/typescript/module/ui/utils/calendarDate.d.ts.map +1 -0
  48. package/lib/typescript/module/ui/utils/persistedDataVersion.d.ts +1 -1
  49. package/package.json +6 -6
  50. package/src/ui/components/signIn/OxySignUpPanel.tsx +91 -10
  51. package/src/ui/screens/EditProfileFieldScreen.tsx +4 -18
  52. package/src/ui/screens/SupervisionScreen.tsx +11 -0
  53. package/src/ui/screens/UserListScreen.tsx +12 -38
  54. package/src/ui/utils/__tests__/calendarDate.test.ts +26 -0
  55. package/src/ui/utils/apiErrorMessage.ts +9 -1
  56. package/src/ui/utils/calendarDate.ts +22 -0
  57. package/src/ui/utils/persistedDataVersion.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"OxySignUpPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignUpPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoC/B,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1B;AAUD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwOxD,CAAC"}
1
+ {"version":3,"file":"OxySignUpPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignUpPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA8C/B,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1B;AAYD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0SxD,CAAC"}
@@ -164,6 +164,7 @@ export declare const useUpdateAccountSettings: () => {
164
164
  birthday?: string;
165
165
  dateOfBirth?: string | null;
166
166
  isAdult?: boolean;
167
+ ageBand?: import("@oxy.so/contracts").AgeBand;
167
168
  website?: string;
168
169
  createdAt?: string;
169
170
  updatedAt?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAG9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAoC3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,UAAU,GACV,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,GACP,UAAU,CAAC;AA4Bf,UAAU,2BAA4B,SAAQ,eAAe;IAC3D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;;AAgrBD,wBAAkD"}
1
+ {"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAG9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAsC3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,UAAU,GACV,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,GACP,UAAU,CAAC;AAqBf,UAAU,2BAA4B,SAAQ,eAAe;IAC3D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;;AAuqBD,wBAAkD"}
@@ -1 +1 @@
1
- {"version":3,"file":"SupervisionScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/SupervisionScreen.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAkjB3D,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,eAAe,+BAO/D"}
1
+ {"version":3,"file":"SupervisionScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/SupervisionScreen.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AA6jB3D,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,eAAe,+BAO/D"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserListScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/UserListScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAY3D,OAAO,KAAK,EAAQ,eAAe,EAAE,MAAM,cAAc,CAAC;AAE1D,KAAK,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC;AAE1C,UAAU,mBAAoB,SAAQ,eAAe;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAcD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+RjD,CAAC;AAyBF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"UserListScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/UserListScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAW3D,OAAO,KAAK,EAAQ,eAAe,EAAE,MAAM,cAAc,CAAC;AAE1D,KAAK,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC;AAE1C,UAAU,mBAAoB,SAAQ,eAAe;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAcD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAyQjD,CAAC;AAsBF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"apiErrorMessage.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/apiErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAkB,CAAC;AAElD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAG5D;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAIlD,CAAC;AAEH,yFAAyF;AACzF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGxD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAiDxF;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMvD"}
1
+ {"version":3,"file":"apiErrorMessage.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/apiErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAcH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAkB,CAAC;AAElD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAG5D;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAIlD,CAAC;AAEH,yFAAyF;AACzF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGxD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAqDxF;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMvD"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * A calendar date with no time of day (`YYYY-MM-DD`), to and from the local
3
+ * `Date` a picker works with.
4
+ *
5
+ * Local calendar components on purpose: `toISOString()` would shift the day for
6
+ * anyone east or west of UTC at the wrong hour, and the person picked a day on
7
+ * a calendar, not an instant.
8
+ */
9
+ /** The ISO calendar date of a picker's `Date`, read in the device's own zone. */
10
+ export declare function toCalendarDate(date: Date): string;
11
+ /** The local `Date` of an ISO calendar date, or `null` for anything else. */
12
+ export declare function fromCalendarDate(value: string | null | undefined): Date | null;
13
+ //# sourceMappingURL=calendarDate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendarDate.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/calendarDate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAIjD;AAED,6EAA6E;AAC7E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAI9E"}
@@ -6,5 +6,5 @@
6
6
  * `__tests__/hooks/persistedDataVersion.test.ts` keeps it equal to `package.json`'s `version`, so a
7
7
  * release cannot forget it.
8
8
  */
9
- export declare const SERVICES_PERSISTED_DATA_VERSION = "14.22.0";
9
+ export declare const SERVICES_PERSISTED_DATA_VERSION = "14.24.0";
10
10
  //# sourceMappingURL=persistedDataVersion.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/services",
3
- "version": "14.22.0",
3
+ "version": "14.24.0",
4
4
  "description": "OxyHQ Expo/React Native SDK — UI components, screens, and native features",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -176,14 +176,14 @@
176
176
  "delete-dts.js": "find ./lib/commonjs ./lib/module \\( -name '*.d.js*' -o -name '*.d.ts' \\) -delete"
177
177
  },
178
178
  "dependencies": {
179
- "@oxy.so/contracts": "^7.2.0",
179
+ "@oxy.so/contracts": "^7.3.0",
180
180
  "color": "^5.0.3",
181
181
  "@peable.to/sdk": "^4.0.0"
182
182
  },
183
183
  "devDependencies": {
184
184
  "@expo/app-integrity": "~58.0.2",
185
185
  "@expo/vector-icons": "^15.1.1",
186
- "@oxy.so/core": "7.52.0",
186
+ "@oxy.so/core": "7.53.0",
187
187
  "@react-native-async-storage/async-storage": "^3.1.1",
188
188
  "@react-native-community/netinfo": "^12.0.1",
189
189
  "@react-native/babel-preset": "^0.88.1",
@@ -196,7 +196,7 @@
196
196
  "@types/jest": "^30.0.0",
197
197
  "@types/node": "^26.6.6",
198
198
  "@types/react": "*",
199
- "@oxy.so/bloom": "21.0.0",
199
+ "@oxy.so/bloom": "22.1.1",
200
200
  "copyfiles": "^2.4.1",
201
201
  "expo-clipboard": "~58.0.4",
202
202
  "expo-constants": "~58.0.15",
@@ -229,13 +229,13 @@
229
229
  "zustand": "^5.0.16",
230
230
  "expo-video": "~58.0.13"
231
231
  },
232
- "//@oxy.so/bloom": "Bloom 21.0.0 is the tested minimum for the shared Button, HeaderActions and GroupedSection APIs. Services uses those owners directly, also supported by Bloom 22 after the named button and settings-list APIs were removed. First-party Bloom peers remain open above this tested minimum.",
232
+ "//@oxy.so/bloom": "Bloom 22.1.1 is required for ListItem person rows with supporting text, alongside the shared Button, HeaderActions and GroupedSection APIs. First-party Bloom peers remain open above this minimum.",
233
233
  "//@oxy.so/core": "Core 7.46.0 supplies `OxyHostAccount.languages` (ADR 0058 R10), the account's languages a session host gives; 7.34.0 supplies `@oxy.so/core/host` (the session host contract, ADR 0058), `createUserEventSocket` and `session.sessionId`, which the provider's host mode is built on; 7.13.0 supplies the `usernamePolicy.*`, `actionErrors.*` and `signin.errors.{network,invalidInput,server}` strings every username field and failure toast is worded with; 7.9.1 fences ordinary authenticated HTTP requests across session changes during auth preflight, which organization claim and creation require; 7.9.0 supplies `deviceComparisonCode`, the short code `OxyDeviceSignIn` prints; 7.8.0 supplies the device sign-in request's `approvalUrl` and the `signin.device.*` strings `OxyDeviceSignIn` shows; 7.7.0 supplies the bounded native asset file adapter and phase progress installed by OxyProvider; 7.6.0 forwards guest locale and first-touch campaign metadata through signup; 7.3.0 supplies `users.lookupMany`, with which the account members screen fails (and retries) a profile read whose chunk failed instead of caching those members as handle-less; 7.2.0 supplies `assets.cachedUrl`, with which `useFileDownloadUrl` answers an already-resolved URL in its first render; 6.16.0 supplies `requireServerVerdict` and `onHolderRejected`, with which the cold boot checks a session it painted from the cache; 6.13.0 supplies the `accounts.settings.*` strings (picture, categories) the account settings speak in every language; 6.12.0 supplies `fileManagement.contentLost` and the `lost` file status a lost file is listed with; 6.11.0 supplies the `follow.errors.*` strings the follow error codes are worded with; 6.4.0 the `follow.*` strings the follow buttons read for every verb and language; 6.1.0 the `oxy.auth.email.{startChange,change,remove}` and `oxy.auth.password.remove` the sign-in & security panels call. Keep one Core instance per app; raise this floor with the root catalogue when new runtime APIs are required.",
234
234
  "//react-native": "React Native 0.81 to 0.88, React 19.1+ and Expo SDK 54 to 58. The floors are the Expo SDK 54 stack (react-native 0.81.6, react 19.1.4, react-native-web 0.21.4, expo 54.0.38 and the module versions its bundledNativeModules.json pins), which compat/expo-54 installs as an external consumer and checks on every CI run (`bun check.mjs`): every peer here admits that stack, services' published src typechecks against its types, and <OxyProvider> mounts and settles its cold boot on iOS (React Native 0.81), web (react-native-web 0.21) and react-native-macos 0.81 with the native modules macOS lacks absent. Astro, Oxy's browser, runs react-native-macos 0.81 (0.83 is its latest release), which is why the floor is not 0.85. The SDK 56 floors these replaced were the versions current when the ranges were first written, not measurements.",
235
235
  "peerDependencies": {
236
236
  "@expo/app-integrity": ">=0.1.10 <59.0.0",
237
237
  "@expo/vector-icons": "^15.0.3",
238
- "@oxy.so/bloom": ">=21.0.0",
238
+ "@oxy.so/bloom": ">=22.1.1",
239
239
  "@oxy.so/core": "^7.49.0",
240
240
  "@react-native-async-storage/async-storage": ">=2.0.0 <4.0.0",
241
241
  "@react-native-community/netinfo": ">=11.4.1 <13.0.0",
@@ -2,7 +2,10 @@
2
2
  * Creating an Oxy account, in the account dialog of every app (web and native)
3
3
  * and on auth.oxy.so's `/login`:
4
4
  *
5
- * username → email → the code sent to it → signed in
5
+ * username → date of birth → email → the code sent to it → signed in
6
+ *
7
+ * The date of birth sets the account's age band (ADR 0067); below the minimum
8
+ * unsupervised age the account is created under supervision, awaiting a guardian.
6
9
  *
7
10
  * The email is confirmed before the account exists, and it is how the account
8
11
  * signs in (a code or a link each time). A password and an authenticator app
@@ -13,12 +16,16 @@
13
16
 
14
17
  import type React from 'react';
15
18
  import { useEffect, useState } from 'react';
16
- import { Linking, Platform } from 'react-native';
19
+ import { Linking, Platform, View } from 'react-native';
20
+ import { DatePicker } from '@oxy.so/bloom/date-picker';
21
+ import { TextFieldLabel } from '@oxy.so/bloom/text-field';
17
22
  import { toast } from '@oxy.so/bloom/toast';
18
23
  import type { EmailVerificationConfirmResponse } from '@oxy.so/contracts';
19
24
  import {
25
+ MIN_BIRTH_YEAR,
20
26
  SIGN_IN_ERROR_CODES,
21
27
  USERNAME_MAX_LENGTH,
28
+ ageBandOf,
22
29
  checkContract,
23
30
  emailAddressCheck,
24
31
  stripDisallowedUsernameCharacters,
@@ -28,12 +35,14 @@ import { useAccountDialogSnapshot } from '../../hooks/accountDialogSnapshot';
28
35
  import { useI18n } from '../../hooks/useI18n';
29
36
  import { getCommonsAcquisitionUrl } from '../../utils/commonsStoreLinks';
30
37
  import { isWebBrowser } from '../../utils/isWebBrowser';
38
+ import { fromCalendarDate, toCalendarDate } from '../../utils/calendarDate';
31
39
  import { checkUsernameDraft, describeUsernameRefusal } from '../../utils/usernamePolicy';
32
40
  import { SubtleLink } from '../authChooser/primitives';
33
41
  import { OxyAuthScreen, OxyAuthScreenHeader, OxyAuthTerms } from './OxyAuthScreen';
34
42
  import { readSignInFlow, writeSignInFlow } from './signInFlowStore';
35
43
  import {
36
44
  AccountFlowAction,
45
+ AccountFlowErrorLine,
37
46
  AccountFlowField,
38
47
  AccountFlowNote,
39
48
  AccountFlowProgress,
@@ -45,7 +54,11 @@ import { withoutWhitespace } from '../../utils/withoutWhitespace';
45
54
  /** Commons' own identity-creation deep link. */
46
55
  const COMMONS_CREATE_IDENTITY_URL = 'oxycommons://create-identity';
47
56
 
48
- type Step = { name: 'username' } | { name: 'email' } | { name: 'code'; verificationId: string };
57
+ type Step =
58
+ | { name: 'username' }
59
+ | { name: 'birthdate' }
60
+ | { name: 'email' }
61
+ | { name: 'code'; verificationId: string };
49
62
 
50
63
  export interface OxySignUpPanelProps {
51
64
  /** The account exists and this origin is signed in as it. */
@@ -64,6 +77,8 @@ interface SavedSignUpFlow {
64
77
  step: Step;
65
78
  username: string;
66
79
  email: string;
80
+ /** `YYYY-MM-DD`, or empty until the person has picked it. */
81
+ dateOfBirth?: string;
67
82
  }
68
83
  const SIGN_UP_FLOW_KEY = 'signup';
69
84
 
@@ -86,6 +101,7 @@ export const OxySignUpPanel: React.FC<OxySignUpPanelProps> = ({
86
101
  const [step, setStep] = useState<Step>(saved?.step ?? { name: 'username' });
87
102
  const [username, setUsername] = useState(saved?.username ?? '');
88
103
  const [email, setEmail] = useState(saved?.email ?? '');
104
+ const [dateOfBirth, setDateOfBirth] = useState(saved?.dateOfBirth ?? '');
89
105
  const [pending, setPending] = useState(false);
90
106
  const [error, setError] = useState<string | null>(null);
91
107
 
@@ -94,8 +110,9 @@ export const OxySignUpPanel: React.FC<OxySignUpPanelProps> = ({
94
110
  step,
95
111
  username,
96
112
  email,
113
+ dateOfBirth,
97
114
  } satisfies SavedSignUpFlow);
98
- }, [flowOwner, step, username, email]);
115
+ }, [flowOwner, step, username, email, dateOfBirth]);
99
116
 
100
117
  const run = (work: () => Promise<void>) => {
101
118
  if (pending) return;
@@ -127,10 +144,19 @@ export const OxySignUpPanel: React.FC<OxySignUpPanelProps> = ({
127
144
  run(async () => {
128
145
  const { available } = await oxyServices.auth.checkUsername(handle);
129
146
  if (!available) throw new UsernameTakenError();
130
- setStep({ name: 'email' });
147
+ setStep({ name: 'birthdate' });
131
148
  });
132
149
  };
133
150
 
151
+ const submitBirthdate = () => {
152
+ if (!dateOfBirth) {
153
+ setError(t('signup.birthdate.required'));
154
+ return;
155
+ }
156
+ setError(null);
157
+ setStep({ name: 'email' });
158
+ };
159
+
134
160
  const sendCode = async (address: string) => {
135
161
  const { verificationId } = await oxyServices.auth.email.startVerification({
136
162
  purpose: 'signup',
@@ -158,11 +184,18 @@ export const OxySignUpPanel: React.FC<OxySignUpPanelProps> = ({
158
184
  setError(draft.error);
159
185
  return;
160
186
  }
187
+ // A flow restored from before this step existed carries no date.
188
+ if (!dateOfBirth) {
189
+ setStep({ name: 'birthdate' });
190
+ setError(t('signup.birthdate.required'));
191
+ return;
192
+ }
161
193
  try {
162
194
  const session = await oxyServices.auth.signUp({
163
195
  username: draft.username,
164
196
  email,
165
197
  emailTicket: ticket,
198
+ dateOfBirth,
166
199
  languages: [currentLanguage],
167
200
  ...(campaignAttribution ? { campaignAttribution } : {}),
168
201
  });
@@ -202,8 +235,13 @@ export const OxySignUpPanel: React.FC<OxySignUpPanelProps> = ({
202
235
  .catch(() => toast.error(t('accountSwitcher.linkOpenFailed')));
203
236
  };
204
237
 
205
- // username → email → code, drawn as one segmented bar under each header.
206
- const progressSteps = [t('signup.username.label'), t('signup.email.label'), t('emailCode.title')];
238
+ // username → date of birth → email → code, drawn as one segmented bar under each header.
239
+ const progressSteps = [
240
+ t('signup.username.label'),
241
+ t('signup.birthdate.label'),
242
+ t('signup.email.label'),
243
+ t('emailCode.title'),
244
+ ];
207
245
  const progress = (current: number) => (
208
246
  <AccountFlowProgress steps={progressSteps} current={current} testID="signup-progress" />
209
247
  );
@@ -217,7 +255,7 @@ export const OxySignUpPanel: React.FC<OxySignUpPanelProps> = ({
217
255
  onConfirmed={createAccount}
218
256
  onResend={() => sendCode(email)}
219
257
  back={{ label: t('emailCode.changeEmail'), onPress: () => setStep({ name: 'email' }) }}
220
- progress={progress(2)}
258
+ progress={progress(3)}
221
259
  />
222
260
  );
223
261
  case 'email':
@@ -227,7 +265,7 @@ export const OxySignUpPanel: React.FC<OxySignUpPanelProps> = ({
227
265
  title={t('signup.email.title')}
228
266
  description={t('signup.email.subtitle')}
229
267
  />
230
- {progress(1)}
268
+ {progress(2)}
231
269
  <AccountFlowField
232
270
  label={t('signup.email.label')}
233
271
  value={email}
@@ -252,12 +290,55 @@ export const OxySignUpPanel: React.FC<OxySignUpPanelProps> = ({
252
290
  />
253
291
  <SubtleLink
254
292
  label={t('signin.actions.back')}
255
- onPress={() => setStep({ name: 'username' })}
293
+ onPress={() => setStep({ name: 'birthdate' })}
256
294
  testID="signup-back"
257
295
  />
258
296
  <OxyAuthTerms />
259
297
  </OxyAuthScreen>
260
298
  );
299
+ case 'birthdate':
300
+ return (
301
+ <OxyAuthScreen>
302
+ <OxyAuthScreenHeader
303
+ title={t('signup.birthdate.title')}
304
+ description={t('signup.birthdate.subtitle')}
305
+ />
306
+ {progress(1)}
307
+ <View style={{ gap: 8 }}>
308
+ <TextFieldLabel>{t('signup.birthdate.label')}</TextFieldLabel>
309
+ <DatePicker
310
+ value={fromCalendarDate(dateOfBirth)}
311
+ minDate={new Date(MIN_BIRTH_YEAR, 0, 1)}
312
+ maxDate={new Date()}
313
+ accessibilityLabel={t('signup.birthdate.label')}
314
+ placeholder={t('signup.birthdate.label')}
315
+ onChange={(date) => {
316
+ setDateOfBirth(date ? toCalendarDate(date) : '');
317
+ if (error) setError(null);
318
+ }}
319
+ testID="signup-birthdate"
320
+ />
321
+ {error ? <AccountFlowErrorLine message={error} /> : null}
322
+ </View>
323
+ {dateOfBirth && ageBandOf(dateOfBirth) === 'under13' ? (
324
+ <AccountFlowNote testID="signup-birthdate-guardian-note">
325
+ {t('signup.birthdate.guardianNote')}
326
+ </AccountFlowNote>
327
+ ) : null}
328
+ <AccountFlowAction
329
+ label={t('signin.actions.continue')}
330
+ onPress={submitBirthdate}
331
+ pending={pending}
332
+ testID="signup-birthdate-continue"
333
+ />
334
+ <SubtleLink
335
+ label={t('signin.actions.back')}
336
+ onPress={() => setStep({ name: 'username' })}
337
+ testID="signup-birthdate-back"
338
+ />
339
+ <OxyAuthTerms />
340
+ </OxyAuthScreen>
341
+ );
261
342
  default:
262
343
  return (
263
344
  <OxyAuthScreen>
@@ -20,6 +20,7 @@ import {
20
20
  SelectValue,
21
21
  } from '@oxy.so/bloom/select';
22
22
  import {
23
+ MIN_BIRTH_YEAR,
23
24
  PRONOUNS,
24
25
  USERNAME_MAX_LENGTH,
25
26
  stripDisallowedUsernameCharacters,
@@ -28,6 +29,7 @@ import { useUsernameAvailability } from '../hooks/useUsernameAvailability';
28
29
  import { GroupedSection, GroupedSectionItem } from '@oxy.so/bloom/grouped-section';
29
30
  import type { User } from '@oxy.so/core';
30
31
  import { useI18n } from '../hooks/useI18n';
32
+ import { fromCalendarDate, toCalendarDate } from '../utils/calendarDate';
31
33
  import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
32
34
  import { useOxy } from '../context/oxyRuntimeContext';
33
35
  import { useProfileEditing } from '../hooks/useProfileEditing';
@@ -71,13 +73,6 @@ interface FieldConfig {
71
73
  isDatePicker?: boolean;
72
74
  }
73
75
 
74
- /**
75
- * The earliest calendar year the birthday picker offers — matches the
76
- * platform's own lower bound (`dateOfBirthSchema`, `@oxy.so/contracts`) so a
77
- * value this picker can produce is never one the API would reject.
78
- */
79
- const MIN_BIRTH_YEAR = 1900;
80
-
81
76
  interface EditProfileFieldScreenProps extends BaseScreenProps {
82
77
  /** The field type to edit */
83
78
  fieldType?: ProfileFieldType;
@@ -647,26 +642,17 @@ const EditProfileFieldScreen: React.FC<EditProfileFieldScreenProps> = ({
647
642
 
648
643
  // Keep birthdays date-only: local calendar components avoid UTC day shifts.
649
644
  const renderBirthdayPicker = () => {
650
- const value = fieldValues.dateOfBirth;
651
- const parts = value ? value.split('-').map(Number) : null;
652
645
  return (
653
646
  <View className="gap-space-8">
654
647
  <TextFieldLabel>{fieldConfig.title}</TextFieldLabel>
655
648
  <DatePicker
656
- value={parts ? new Date(parts[0], parts[1] - 1, parts[2]) : null}
649
+ value={fromCalendarDate(fieldValues.dateOfBirth)}
657
650
  minDate={new Date(MIN_BIRTH_YEAR, 0, 1)}
658
651
  maxDate={new Date()}
659
652
  accessibilityLabel={fieldConfig.title}
660
653
  placeholder={fieldConfig.fields[0].placeholder}
661
654
  disabled={isSaving}
662
- onChange={(date) =>
663
- handleFieldChange(
664
- 'dateOfBirth',
665
- date
666
- ? `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`
667
- : '',
668
- )
669
- }
655
+ onChange={(date) => handleFieldChange('dateOfBirth', date ? toCalendarDate(date) : '')}
670
656
  />
671
657
  </View>
672
658
  );
@@ -271,6 +271,17 @@ function SupervisionBody({
271
271
  )}
272
272
  </Text>
273
273
  <AccountFlowNote>{t('supervision.activeDescription')}</AccountFlowNote>
274
+ {own.guardianAccountId ? null : (
275
+ // No guardian holds this account: one created under supervision
276
+ // that awaits its first (ADR 0067), or one whose guardian is gone.
277
+ // The same invitation serves both; the server decides its effect.
278
+ <>
279
+ <AccountFlowNote>{t('supervision.guardianNeeded')}</AccountFlowNote>
280
+ <Button onPress={() => setAddingGuardian(!addingGuardian)}>
281
+ {t('supervision.invite')}
282
+ </Button>
283
+ </>
284
+ )}
274
285
  <Button appearance="plain" onPress={() => navigate?.('HelpSupport')}>
275
286
  {t('supervision.transitionHelp')}
276
287
  </Button>
@@ -7,8 +7,7 @@ import type { BaseScreenProps } from '../types/navigation';
7
7
  import { useTheme } from '@oxy.so/bloom/theme';
8
8
  import { H6, Text } from '@oxy.so/bloom/typography';
9
9
  import { Button } from '@oxy.so/bloom/button';
10
- import { Avatar } from '@oxy.so/bloom/avatar';
11
- import { Item } from '@oxy.so/bloom/item';
10
+ import { ListItem } from '@oxy.so/bloom/list';
12
11
  import FollowButton from '../components/FollowButton';
13
12
  import Ionicons from '../icons/Ionicons';
14
13
  import { useI18n } from '../hooks/useI18n';
@@ -157,39 +156,17 @@ const UserListScreen: React.FC<UserListScreenProps> = ({ userId, mode, sort, nav
157
156
  const handle = getAccountFallbackHandle(item);
158
157
 
159
158
  return (
160
- <View className="px-screen-margin flex-row items-center gap-space-12">
161
- <Item
162
- leading={
163
- <Avatar
164
- name={displayName}
165
- source={
166
- item.avatar ? oxyServices.assets.publicUrl(item.avatar, 'thumb') : undefined
167
- }
168
- size={44}
169
- />
170
- }
171
- style={{ flex: 1, paddingLeft: 0, paddingRight: 0 }}
172
- accessibilityLabel={displayName}
173
- onPress={() => handleUserPress(item)}
174
- >
175
- <View style={styles.userInfo}>
176
- <Text variant="body-medium" numberOfLines={1}>
177
- {displayName}
178
- </Text>
179
- {handle ? (
180
- <Text className="text-text-secondary text-sm mt-space-2" numberOfLines={1}>
181
- {item.username ? `@${handle}` : handle}
182
- </Text>
183
- ) : null}
184
- {description ? (
185
- <Text className="text-text-secondary text-sm mt-space-4" numberOfLines={2}>
186
- {description}
187
- </Text>
188
- ) : null}
189
- </View>
190
- </Item>
191
- {!isCurrentUser && itemUserId ? <FollowButton userId={itemUserId} size="sm" /> : null}
192
- </View>
159
+ <ListItem
160
+ person={{
161
+ name: displayName,
162
+ subtitle: handle ? (item.username ? `@${handle}` : handle) : undefined,
163
+ avatar: item.avatar ? oxyServices.assets.publicUrl(item.avatar, 'thumb') : undefined,
164
+ }}
165
+ supporting={description || undefined}
166
+ supportingLines={2}
167
+ onPress={() => handleUserPress(item)}
168
+ trailing={!isCurrentUser && itemUserId ? <FollowButton userId={itemUserId} /> : null}
169
+ />
193
170
  );
194
171
  },
195
172
  [handleUserPress, currentUserId, oxyServices],
@@ -340,9 +317,6 @@ const styles = StyleSheet.create({
340
317
  listContent: {
341
318
  flexGrow: 1,
342
319
  },
343
- userInfo: {
344
- flex: 1,
345
- },
346
320
  emptyContainer: {
347
321
  flex: 1,
348
322
  justifyContent: 'center',
@@ -0,0 +1,26 @@
1
+ import { fromCalendarDate, toCalendarDate } from '../calendarDate';
2
+
3
+ describe('calendarDate', () => {
4
+ it('writes the day the person picked, in the device zone', () => {
5
+ expect(toCalendarDate(new Date(2012, 0, 5))).toBe('2012-01-05');
6
+ expect(toCalendarDate(new Date(1999, 11, 31, 23, 59))).toBe('1999-12-31');
7
+ });
8
+
9
+ it('reads an ISO calendar date back to the same local day', () => {
10
+ const date = fromCalendarDate('2012-01-05');
11
+ expect(date?.getFullYear()).toBe(2012);
12
+ expect(date?.getMonth()).toBe(0);
13
+ expect(date?.getDate()).toBe(5);
14
+ });
15
+
16
+ it('round-trips', () => {
17
+ expect(toCalendarDate(fromCalendarDate('2008-02-29') as Date)).toBe('2008-02-29');
18
+ });
19
+
20
+ it('reads nothing from an empty or malformed value', () => {
21
+ expect(fromCalendarDate('')).toBeNull();
22
+ expect(fromCalendarDate(null)).toBeNull();
23
+ expect(fromCalendarDate(undefined)).toBeNull();
24
+ expect(fromCalendarDate('5 January 2012')).toBeNull();
25
+ });
26
+ });
@@ -6,7 +6,11 @@
6
6
  * English, and for a validation failure it is "Validation failed".
7
7
  */
8
8
 
9
- import { EMAIL_VERIFICATION_ERROR_CODES, SIGN_IN_ERROR_CODES } from '@oxy.so/contracts/client';
9
+ import {
10
+ DATE_OF_BIRTH_REFUSALS,
11
+ EMAIL_VERIFICATION_ERROR_CODES,
12
+ SIGN_IN_ERROR_CODES,
13
+ } from '@oxy.so/contracts/client';
10
14
  import {
11
15
  ErrorCodes,
12
16
  getErrorStatus,
@@ -54,6 +58,10 @@ export function describeApiError(error: unknown, t: Translate, fallback?: string
54
58
  const code = errorCode(error);
55
59
  if (code !== undefined && OFFLINE_ERROR_CODES.has(code)) return t('signin.errors.network');
56
60
  switch (code) {
61
+ case DATE_OF_BIRTH_REFUSALS.locked:
62
+ return t('editProfile.items.birthday.locked');
63
+ case DATE_OF_BIRTH_REFUSALS.supervisionRequired:
64
+ return t('editProfile.items.birthday.supervisionRequired');
57
65
  case SIGN_IN_ERROR_CODES.invalidCredentials:
58
66
  return t('signin.errors.invalidCredentials');
59
67
  case SIGN_IN_ERROR_CODES.requestInvalid:
@@ -0,0 +1,22 @@
1
+ /**
2
+ * A calendar date with no time of day (`YYYY-MM-DD`), to and from the local
3
+ * `Date` a picker works with.
4
+ *
5
+ * Local calendar components on purpose: `toISOString()` would shift the day for
6
+ * anyone east or west of UTC at the wrong hour, and the person picked a day on
7
+ * a calendar, not an instant.
8
+ */
9
+
10
+ /** The ISO calendar date of a picker's `Date`, read in the device's own zone. */
11
+ export function toCalendarDate(date: Date): string {
12
+ const month = String(date.getMonth() + 1).padStart(2, '0');
13
+ const day = String(date.getDate()).padStart(2, '0');
14
+ return `${date.getFullYear()}-${month}-${day}`;
15
+ }
16
+
17
+ /** The local `Date` of an ISO calendar date, or `null` for anything else. */
18
+ export function fromCalendarDate(value: string | null | undefined): Date | null {
19
+ if (!value || !/^\d{4}-\d{2}-\d{2}$/.test(value)) return null;
20
+ const [year, month, day] = value.split('-').map(Number);
21
+ return new Date(year, month - 1, day);
22
+ }
@@ -6,4 +6,4 @@
6
6
  * `__tests__/hooks/persistedDataVersion.test.ts` keeps it equal to `package.json`'s `version`, so a
7
7
  * release cannot forget it.
8
8
  */
9
- export const SERVICES_PERSISTED_DATA_VERSION = '14.22.0';
9
+ export const SERVICES_PERSISTED_DATA_VERSION = '14.24.0';