@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 +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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/services",
3
- "version": "22.0.0",
3
+ "version": "22.1.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",
@@ -127,7 +127,7 @@
127
127
  },
128
128
  "dependencies": {
129
129
  "@oxyhq/contracts": "0.15.0",
130
- "@oxyhq/core": "^12.0.0",
130
+ "@oxyhq/core": "^12.1.0",
131
131
  "@simplewebauthn/browser": "^13.3.0",
132
132
  "color": "^4.2.3"
133
133
  },
@@ -135,7 +135,7 @@
135
135
  "@biomejs/biome": "^1.9.4",
136
136
  "@commitlint/cli": "^17.6.5",
137
137
  "@commitlint/config-conventional": "^17.6.5",
138
- "@oxyhq/core": "12.0.0",
138
+ "@oxyhq/core": "12.1.0",
139
139
  "@react-native-async-storage/async-storage": "^2.0.0",
140
140
  "@react-native-community/netinfo": "^11.4.1",
141
141
  "@react-native/babel-preset": "^0.86.0",
@@ -176,7 +176,7 @@
176
176
  "peerDependencies": {
177
177
  "@expo/vector-icons": "^15.0.3",
178
178
  "@oxyhq/bloom": ">=0.16.0",
179
- "@oxyhq/core": "^12.0.0",
179
+ "@oxyhq/core": "^12.1.0",
180
180
  "@react-native-async-storage/async-storage": "^2.0.0",
181
181
  "@react-native-community/netinfo": "^11.4.1",
182
182
  "@tanstack/query-async-storage-persister": "^5.101",
package/src/index.ts CHANGED
@@ -233,6 +233,13 @@ export { LogoText } from './ui/components/logo/LogoText';
233
233
  export { default as ProfileButton } from './ui/components/ProfileButton';
234
234
  export type { ProfileButtonProps } from './ui/components/ProfileButton';
235
235
 
236
+ // The account switcher/sign-in/sign-up chooser WITHOUT dialog chrome —
237
+ // `OxyAccountDialog` wraps this in Bloom's `<Dialog>` for the normal in-app
238
+ // surface; exported directly so a bare host (e.g. a future auth.oxy.so hub
239
+ // page) can mount the exact same chooser with its own completion strategy.
240
+ export { default as OxyAuthChooser } from './ui/components/OxyAuthChooser';
241
+ export type { OxyAuthChooserProps } from './ui/components/OxyAuthChooser';
242
+
236
243
  // Unified switchable-accounts hook — the single source of everything the user
237
244
  // can switch into: device sign-ins AND linked graph accounts (owned orgs +
238
245
  // shared-with-you), deduped by account id and hydrated with real