@oxy.so/services 15.0.2 → 15.1.1

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 (98) hide show
  1. package/lib/commonjs/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  2. package/lib/commonjs/assets/assets/fonts/icons/manifest.json +4 -3
  3. package/lib/commonjs/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  4. package/lib/commonjs/assets/fonts/icons/manifest.json +4 -3
  5. package/lib/commonjs/ui/components/OxyDeviceSignIn.js +2 -3
  6. package/lib/commonjs/ui/components/OxyDeviceSignIn.js.map +1 -1
  7. package/lib/commonjs/ui/components/QRCode.js +86 -0
  8. package/lib/commonjs/ui/components/QRCode.js.map +1 -0
  9. package/lib/commonjs/ui/components/authChooser/requestSurfaces.js +2 -2
  10. package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -1
  11. package/lib/commonjs/ui/components/signIn/InlineCommonsQr.js +2 -3
  12. package/lib/commonjs/ui/components/signIn/InlineCommonsQr.js.map +1 -1
  13. package/lib/commonjs/ui/components/signIn/OxyAuthenticatorPanel.js +2 -3
  14. package/lib/commonjs/ui/components/signIn/OxyAuthenticatorPanel.js.map +1 -1
  15. package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js +2 -3
  16. package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -1
  17. package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js +3 -1
  18. package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js.map +1 -1
  19. package/lib/commonjs/ui/hooks/useUsernameAvailability.js +10 -4
  20. package/lib/commonjs/ui/hooks/useUsernameAvailability.js.map +1 -1
  21. package/lib/commonjs/ui/icons/subsetGlyphMaps.js +1 -0
  22. package/lib/commonjs/ui/icons/subsetGlyphMaps.js.map +1 -1
  23. package/lib/commonjs/ui/screens/CreateAccountScreen.js +6 -3
  24. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  25. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +2 -2
  26. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  27. package/lib/commonjs/ui/utils/usernamePolicy.js +7 -2
  28. package/lib/commonjs/ui/utils/usernamePolicy.js.map +1 -1
  29. package/lib/module/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  30. package/lib/module/assets/assets/fonts/icons/manifest.json +4 -3
  31. package/lib/module/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  32. package/lib/module/assets/fonts/icons/manifest.json +4 -3
  33. package/lib/module/ui/components/OxyDeviceSignIn.js +1 -1
  34. package/lib/module/ui/components/OxyDeviceSignIn.js.map +1 -1
  35. package/lib/module/ui/components/QRCode.js +79 -0
  36. package/lib/module/ui/components/QRCode.js.map +1 -0
  37. package/lib/module/ui/components/authChooser/requestSurfaces.js +1 -1
  38. package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -1
  39. package/lib/module/ui/components/signIn/InlineCommonsQr.js +1 -1
  40. package/lib/module/ui/components/signIn/InlineCommonsQr.js.map +1 -1
  41. package/lib/module/ui/components/signIn/OxyAuthenticatorPanel.js +1 -1
  42. package/lib/module/ui/components/signIn/OxyAuthenticatorPanel.js.map +1 -1
  43. package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js +1 -1
  44. package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -1
  45. package/lib/module/ui/components/signIn/OxySignUpPanel.js +3 -1
  46. package/lib/module/ui/components/signIn/OxySignUpPanel.js.map +1 -1
  47. package/lib/module/ui/hooks/useUsernameAvailability.js +11 -5
  48. package/lib/module/ui/hooks/useUsernameAvailability.js.map +1 -1
  49. package/lib/module/ui/icons/subsetGlyphMaps.js +1 -0
  50. package/lib/module/ui/icons/subsetGlyphMaps.js.map +1 -1
  51. package/lib/module/ui/screens/CreateAccountScreen.js +6 -3
  52. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  53. package/lib/module/ui/screens/PaymentGatewayScreen.js +1 -1
  54. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  55. package/lib/module/ui/utils/usernamePolicy.js +8 -3
  56. package/lib/module/ui/utils/usernamePolicy.js.map +1 -1
  57. package/lib/typescript/commonjs/ui/components/QRCode.d.ts +25 -0
  58. package/lib/typescript/commonjs/ui/components/QRCode.d.ts.map +1 -0
  59. package/lib/typescript/commonjs/ui/components/payment/PaymentDetailsStep.d.ts +1 -1
  60. package/lib/typescript/commonjs/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
  61. package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -1
  62. package/lib/typescript/commonjs/ui/hooks/useUsernameAvailability.d.ts.map +1 -1
  63. package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts +1 -1
  64. package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
  65. package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts +1 -0
  66. package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  68. package/lib/typescript/commonjs/ui/utils/usernamePolicy.d.ts +6 -1
  69. package/lib/typescript/commonjs/ui/utils/usernamePolicy.d.ts.map +1 -1
  70. package/lib/typescript/module/ui/components/QRCode.d.ts +25 -0
  71. package/lib/typescript/module/ui/components/QRCode.d.ts.map +1 -0
  72. package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts +1 -1
  73. package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
  74. package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -1
  75. package/lib/typescript/module/ui/hooks/useUsernameAvailability.d.ts.map +1 -1
  76. package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts +1 -1
  77. package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
  78. package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts +1 -0
  79. package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
  80. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  81. package/lib/typescript/module/ui/utils/usernamePolicy.d.ts +6 -1
  82. package/lib/typescript/module/ui/utils/usernamePolicy.d.ts.map +1 -1
  83. package/package.json +6 -4
  84. package/src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  85. package/src/assets/fonts/icons/manifest.json +4 -3
  86. package/src/ui/components/OxyDeviceSignIn.tsx +1 -1
  87. package/src/ui/components/QRCode.tsx +67 -0
  88. package/src/ui/components/authChooser/requestSurfaces.tsx +1 -1
  89. package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
  90. package/src/ui/components/signIn/InlineCommonsQr.tsx +1 -1
  91. package/src/ui/components/signIn/OxyAuthenticatorPanel.tsx +1 -1
  92. package/src/ui/components/signIn/OxyLinkCommonsPanel.tsx +1 -1
  93. package/src/ui/components/signIn/OxySignUpPanel.tsx +2 -1
  94. package/src/ui/hooks/useUsernameAvailability.ts +19 -11
  95. package/src/ui/icons/subsetGlyphMaps.ts +1 -0
  96. package/src/ui/screens/CreateAccountScreen.tsx +6 -3
  97. package/src/ui/screens/PaymentGatewayScreen.tsx +1 -1
  98. package/src/ui/utils/usernamePolicy.ts +8 -3
@@ -1,4 +1,4 @@
1
1
  /** Glyphs are decorative: hidden from assistive technology (see `decorativeIconSet`). */
2
- declare const MaterialCommunityIcons: import("@expo/vector-icons/build/createIconSet").Icon<"function" | "android" | "web" | "account" | "message" | "email" | "bio" | "phone" | "key" | "network" | "logout" | "label" | "group" | "loading" | "link" | "solid" | "text" | "translate" | "scale" | "wrap" | "ellipse" | "image" | "card" | "alert" | "radio" | "grid" | "presentation" | "numeric" | "decimal" | "alert-circle" | "alert-circle-outline" | "apps" | "archive" | "arrow-down" | "arrow-up" | "at" | "briefcase-outline" | "bug" | "calendar" | "calendar-outline" | "camera" | "camera-outline" | "card-outline" | "cart-outline" | "chevron-down" | "chevron-up" | "close" | "close-circle" | "cloud-outline" | "cloud-upload" | "cloud-upload-outline" | "cog" | "cog-outline" | "cube-outline" | "download" | "download-outline" | "earth" | "ellipse-outline" | "eye" | "eye-off-outline" | "filter-outline" | "flash" | "folder" | "folder-open-outline" | "folder-outline" | "gift" | "gift-outline" | "heart" | "heart-outline" | "help-circle" | "help-circle-outline" | "image-outline" | "information" | "information-outline" | "leaf" | "library" | "mail" | "pencil-outline" | "play" | "pulse" | "receipt-outline" | "resize" | "rocket" | "school-outline" | "server" | "share-outline" | "shield" | "star" | "sync" | "trophy" | "trophy-outline" | "volume-off" | "wallet-outline" | "watch" | "wifi" | "delete" | "cancel" | "account-circle" | "account-cog-outline" | "account-eye-outline" | "account-group" | "account-multiple" | "account-outline" | "account-plus" | "account-search" | "account-switch" | "account-voice" | "archive-arrow-down" | "arrow-left" | "bell" | "bell-outline" | "bullhorn" | "cake-variant" | "cake-variant-outline" | "cellphone" | "cellphone-basic" | "cellphone-message" | "cellphone-screenshot" | "chart-line" | "check-all" | "check-circle" | "chip" | "circle-outline" | "clock" | "clock-outline" | "code-tags" | "contain" | "content-copy" | "controller" | "cookie" | "credit-card" | "database-outline" | "delete-outline" | "dots-horizontal" | "email-outline" | "file" | "file-document" | "file-document-edit-outline" | "file-document-outline" | "file-excel-outline" | "file-outline" | "file-pdf-box" | "folder-image" | "folder-zip-outline" | "forward" | "ghost" | "history" | "image-multiple-outline" | "inbox" | "link-variant" | "lock-outline" | "magnify" | "map-marker" | "map-marker-multiple" | "map-marker-outline" | "message-outline" | "minus-circle" | "motion" | "music-note-outline" | "null" | "open-in-app" | "openid" | "palette" | "palette-outline" | "pan" | "phone-outline" | "plus" | "plus-circle" | "post" | "react" | "read" | "shield-account-outline" | "shield-check" | "shield-search" | "signature" | "sort-alphabetical-variant" | "sort-numeric-variant" | "store" | "tag" | "tag-outline" | "text-box-outline" | "theme-light-dark" | "transfer" | "trash-can-outline" | "tray-arrow-down" | "upload" | "video-outline" | "wifi-off" | "wrench" | "xml", "OxyServicesMaterialCommunityIcons">;
2
+ declare const MaterialCommunityIcons: import("@expo/vector-icons/build/createIconSet").Icon<"function" | "android" | "web" | "account" | "message" | "email" | "bio" | "phone" | "key" | "network" | "logout" | "label" | "group" | "loading" | "link" | "solid" | "text" | "translate" | "scale" | "wrap" | "ellipse" | "image" | "card" | "alert" | "radio" | "grid" | "presentation" | "numeric" | "decimal" | "alert-circle" | "alert-circle-outline" | "apps" | "archive" | "arrow-down" | "arrow-up" | "at" | "briefcase-outline" | "bug" | "calendar" | "calendar-outline" | "camera" | "camera-outline" | "card-outline" | "cart-outline" | "chevron-down" | "chevron-up" | "close" | "close-circle" | "cloud-outline" | "cloud-upload" | "cloud-upload-outline" | "cog" | "cog-outline" | "cube-outline" | "download" | "download-outline" | "earth" | "ellipse-outline" | "eye" | "eye-off-outline" | "filter-outline" | "flash" | "folder" | "folder-open-outline" | "folder-outline" | "gift" | "gift-outline" | "heart" | "heart-outline" | "help-circle" | "help-circle-outline" | "image-outline" | "information" | "information-outline" | "leaf" | "library" | "mail" | "pencil-outline" | "play" | "pulse" | "receipt-outline" | "resize" | "rocket" | "school-outline" | "server" | "share-outline" | "shield" | "star" | "sync" | "trophy" | "trophy-outline" | "volume-off" | "wallet-outline" | "watch" | "wifi" | "delete" | "cancel" | "account-circle" | "account-cog-outline" | "account-eye-outline" | "account-group" | "account-multiple" | "account-outline" | "account-plus" | "account-search" | "account-switch" | "account-voice" | "archive-arrow-down" | "arrow-left" | "bell" | "bell-outline" | "bullhorn" | "cake-variant" | "cake-variant-outline" | "cellphone" | "cellphone-basic" | "cellphone-message" | "cellphone-screenshot" | "chart-line" | "check-all" | "check-circle" | "chip" | "circle-outline" | "clock" | "clock-outline" | "code-tags" | "contain" | "content-copy" | "controller" | "cookie" | "credit-card" | "database-outline" | "delete-outline" | "dots-horizontal" | "email-outline" | "file" | "file-document" | "file-document-edit-outline" | "file-document-outline" | "file-excel-outline" | "file-outline" | "file-pdf-box" | "folder-image" | "folder-zip-outline" | "forward" | "ghost" | "history" | "image-multiple-outline" | "inbox" | "link-variant" | "lock-outline" | "magnify" | "map-marker" | "map-marker-multiple" | "map-marker-outline" | "message-outline" | "minus-circle" | "motion" | "music-note-outline" | "null" | "open-in-app" | "openid" | "palette" | "palette-outline" | "pan" | "phone-outline" | "plus" | "plus-circle" | "post" | "qrcode" | "react" | "read" | "shield-account-outline" | "shield-check" | "shield-search" | "signature" | "sort-alphabetical-variant" | "sort-numeric-variant" | "store" | "tag" | "tag-outline" | "text-box-outline" | "theme-light-dark" | "transfer" | "trash-can-outline" | "tray-arrow-down" | "upload" | "video-outline" | "wifi-off" | "wrench" | "xml", "OxyServicesMaterialCommunityIcons">;
3
3
  export default MaterialCommunityIcons;
4
4
  //# sourceMappingURL=MaterialCommunityIcons.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MaterialCommunityIcons.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/MaterialCommunityIcons.ts"],"names":[],"mappings":"AAKA,yFAAyF;AACzF,QAAA,MAAM,sBAAsB,25FAG3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"MaterialCommunityIcons.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/MaterialCommunityIcons.ts"],"names":[],"mappings":"AAKA,yFAAyF;AACzF,QAAA,MAAM,sBAAsB,s6FAG3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -285,6 +285,7 @@ export declare const materialCommunityIconsGlyphMap: {
285
285
  readonly post: 987144;
286
286
  readonly presentation: 984104;
287
287
  readonly pulse: 984112;
288
+ readonly qrcode: 984114;
288
289
  readonly radio: 984121;
289
290
  readonly react: 984840;
290
291
  readonly read: 984135;
@@ -1 +1 @@
1
- {"version":3,"file":"subsetGlyphMaps.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/subsetGlyphMaps.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0InB,CAAC;AAEX,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+LjC,CAAC"}
1
+ {"version":3,"file":"subsetGlyphMaps.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/subsetGlyphMaps.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0InB,CAAC;AAEX,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgMjC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CreateAccountScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/CreateAccountScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAkF3D;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAiZlD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"CreateAccountScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/CreateAccountScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAkF3D;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoZlD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -18,7 +18,12 @@ export type UsernameDraftResult = {
18
18
  error: string;
19
19
  };
20
20
  /**
21
- * Hold a typed username to the policy for `kind` (`bot` handles end in `bot`).
21
+ * Hold a typed username to the SHAPE the policy requires for `kind` (`bot`
22
+ * handles end in `bot`).
23
+ *
24
+ * Reserved names are not judged here: the list belongs to the server, which
25
+ * answers for them (see {@link describeUsernameRefusal}), so a name it has
26
+ * released is never refused by a bundle that predates the release.
22
27
  * On success `username` is the trimmed handle to send; on failure `error` is
23
28
  * the localized reason, specific to the rule that failed.
24
29
  */
@@ -1 +1 @@
1
- {"version":3,"file":"usernamePolicy.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernamePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAWhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,SAAS,EACZ,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,GACxB,mBAAmB,CAMrB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,CAAC,EAAE,SAAS,GACX,MAAM,GAAG,IAAI,CAMf"}
1
+ {"version":3,"file":"usernamePolicy.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernamePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAWhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,SAAS,EACZ,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,GACxB,mBAAmB,CAMrB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,CAAC,EAAE,SAAS,GACX,MAAM,GAAG,IAAI,CAMf"}
@@ -0,0 +1,25 @@
1
+ export interface QRCodeProps {
2
+ /** The text the code holds. */
3
+ value: string;
4
+ /** Width and height, in points. */
5
+ size?: number;
6
+ /** The modules' colour. */
7
+ color?: string;
8
+ /** The plate behind them. */
9
+ backgroundColor?: string;
10
+ }
11
+ /**
12
+ * The QR matrix as one stroked path: a horizontal run per row of dark modules, each `cellSize` wide.
13
+ * Exactly what react-native-qrcode-svg 6.3 drew (`genMatrix` and `transformMatrixIntoPath`, MIT), at
14
+ * error correction level M on the same `qrcode` encoder, so a code is the same pixels. That package
15
+ * is not imported: its logo support links `react-native-svg/css` (css-tree, css-select, entities:
16
+ * about 200 KB of every Android bundle) whether or not a logo is drawn.
17
+ */
18
+ export declare function qrCodePath(value: string, size: number): {
19
+ path: string;
20
+ cellSize: number;
21
+ };
22
+ /** A QR code drawn with react-native-svg, on its plate. */
23
+ export declare function QRCode({ value, size, color, backgroundColor, }: QRCodeProps): import("react").JSX.Element;
24
+ export default QRCode;
25
+ //# sourceMappingURL=QRCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QRCode.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/QRCode.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAsB1F;AAED,2DAA2D;AAC3D,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,IAAU,EACV,KAAe,EACf,eAAyB,GAC1B,EAAE,WAAW,+BAYb;AAED,eAAe,MAAM,CAAC"}
@@ -12,7 +12,7 @@ interface PaymentDetailsStepProps {
12
12
  onBack: () => void;
13
13
  onNext: () => void;
14
14
  QRCodeComponent?: React.ComponentType<{
15
- value?: string;
15
+ value: string;
16
16
  size?: number;
17
17
  }>;
18
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentDetailsStep.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/payment/PaymentDetailsStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAS,CAAC;AAGjF,UAAU,uBAAuB;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,mBAAmB,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACpD,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,qBAAqB,CAAC;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1E;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA0OzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"PaymentDetailsStep.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/payment/PaymentDetailsStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAS,CAAC;AAGjF,UAAU,uBAAuB;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,mBAAmB,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACpD,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,qBAAqB,CAAC;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACzE;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA0OzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OxySignUpPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignUpPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuD/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;IACzB;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAYD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAmWxD,CAAC"}
1
+ {"version":3,"file":"OxySignUpPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignUpPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuD/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;IACzB;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAYD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoWxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useUsernameAvailability.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useUsernameAvailability.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,sFAAsF;AACtF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,2BAA2B;;;;;;EAgEtC"}
1
+ {"version":3,"file":"useUsernameAvailability.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useUsernameAvailability.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,sFAAsF;AACtF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,2BAA2B;;;;;;EAuEtC"}
@@ -1,4 +1,4 @@
1
1
  /** Glyphs are decorative: hidden from assistive technology (see `decorativeIconSet`). */
2
- declare const MaterialCommunityIcons: import("@expo/vector-icons/build/createIconSet").Icon<"function" | "android" | "web" | "account" | "message" | "email" | "bio" | "phone" | "key" | "network" | "logout" | "label" | "group" | "loading" | "link" | "solid" | "text" | "translate" | "scale" | "wrap" | "ellipse" | "image" | "card" | "alert" | "radio" | "grid" | "presentation" | "numeric" | "decimal" | "alert-circle" | "alert-circle-outline" | "apps" | "archive" | "arrow-down" | "arrow-up" | "at" | "briefcase-outline" | "bug" | "calendar" | "calendar-outline" | "camera" | "camera-outline" | "card-outline" | "cart-outline" | "chevron-down" | "chevron-up" | "close" | "close-circle" | "cloud-outline" | "cloud-upload" | "cloud-upload-outline" | "cog" | "cog-outline" | "cube-outline" | "download" | "download-outline" | "earth" | "ellipse-outline" | "eye" | "eye-off-outline" | "filter-outline" | "flash" | "folder" | "folder-open-outline" | "folder-outline" | "gift" | "gift-outline" | "heart" | "heart-outline" | "help-circle" | "help-circle-outline" | "image-outline" | "information" | "information-outline" | "leaf" | "library" | "mail" | "pencil-outline" | "play" | "pulse" | "receipt-outline" | "resize" | "rocket" | "school-outline" | "server" | "share-outline" | "shield" | "star" | "sync" | "trophy" | "trophy-outline" | "volume-off" | "wallet-outline" | "watch" | "wifi" | "delete" | "cancel" | "account-circle" | "account-cog-outline" | "account-eye-outline" | "account-group" | "account-multiple" | "account-outline" | "account-plus" | "account-search" | "account-switch" | "account-voice" | "archive-arrow-down" | "arrow-left" | "bell" | "bell-outline" | "bullhorn" | "cake-variant" | "cake-variant-outline" | "cellphone" | "cellphone-basic" | "cellphone-message" | "cellphone-screenshot" | "chart-line" | "check-all" | "check-circle" | "chip" | "circle-outline" | "clock" | "clock-outline" | "code-tags" | "contain" | "content-copy" | "controller" | "cookie" | "credit-card" | "database-outline" | "delete-outline" | "dots-horizontal" | "email-outline" | "file" | "file-document" | "file-document-edit-outline" | "file-document-outline" | "file-excel-outline" | "file-outline" | "file-pdf-box" | "folder-image" | "folder-zip-outline" | "forward" | "ghost" | "history" | "image-multiple-outline" | "inbox" | "link-variant" | "lock-outline" | "magnify" | "map-marker" | "map-marker-multiple" | "map-marker-outline" | "message-outline" | "minus-circle" | "motion" | "music-note-outline" | "null" | "open-in-app" | "openid" | "palette" | "palette-outline" | "pan" | "phone-outline" | "plus" | "plus-circle" | "post" | "react" | "read" | "shield-account-outline" | "shield-check" | "shield-search" | "signature" | "sort-alphabetical-variant" | "sort-numeric-variant" | "store" | "tag" | "tag-outline" | "text-box-outline" | "theme-light-dark" | "transfer" | "trash-can-outline" | "tray-arrow-down" | "upload" | "video-outline" | "wifi-off" | "wrench" | "xml", "OxyServicesMaterialCommunityIcons">;
2
+ declare const MaterialCommunityIcons: import("@expo/vector-icons/build/createIconSet").Icon<"function" | "android" | "web" | "account" | "message" | "email" | "bio" | "phone" | "key" | "network" | "logout" | "label" | "group" | "loading" | "link" | "solid" | "text" | "translate" | "scale" | "wrap" | "ellipse" | "image" | "card" | "alert" | "radio" | "grid" | "presentation" | "numeric" | "decimal" | "alert-circle" | "alert-circle-outline" | "apps" | "archive" | "arrow-down" | "arrow-up" | "at" | "briefcase-outline" | "bug" | "calendar" | "calendar-outline" | "camera" | "camera-outline" | "card-outline" | "cart-outline" | "chevron-down" | "chevron-up" | "close" | "close-circle" | "cloud-outline" | "cloud-upload" | "cloud-upload-outline" | "cog" | "cog-outline" | "cube-outline" | "download" | "download-outline" | "earth" | "ellipse-outline" | "eye" | "eye-off-outline" | "filter-outline" | "flash" | "folder" | "folder-open-outline" | "folder-outline" | "gift" | "gift-outline" | "heart" | "heart-outline" | "help-circle" | "help-circle-outline" | "image-outline" | "information" | "information-outline" | "leaf" | "library" | "mail" | "pencil-outline" | "play" | "pulse" | "receipt-outline" | "resize" | "rocket" | "school-outline" | "server" | "share-outline" | "shield" | "star" | "sync" | "trophy" | "trophy-outline" | "volume-off" | "wallet-outline" | "watch" | "wifi" | "delete" | "cancel" | "account-circle" | "account-cog-outline" | "account-eye-outline" | "account-group" | "account-multiple" | "account-outline" | "account-plus" | "account-search" | "account-switch" | "account-voice" | "archive-arrow-down" | "arrow-left" | "bell" | "bell-outline" | "bullhorn" | "cake-variant" | "cake-variant-outline" | "cellphone" | "cellphone-basic" | "cellphone-message" | "cellphone-screenshot" | "chart-line" | "check-all" | "check-circle" | "chip" | "circle-outline" | "clock" | "clock-outline" | "code-tags" | "contain" | "content-copy" | "controller" | "cookie" | "credit-card" | "database-outline" | "delete-outline" | "dots-horizontal" | "email-outline" | "file" | "file-document" | "file-document-edit-outline" | "file-document-outline" | "file-excel-outline" | "file-outline" | "file-pdf-box" | "folder-image" | "folder-zip-outline" | "forward" | "ghost" | "history" | "image-multiple-outline" | "inbox" | "link-variant" | "lock-outline" | "magnify" | "map-marker" | "map-marker-multiple" | "map-marker-outline" | "message-outline" | "minus-circle" | "motion" | "music-note-outline" | "null" | "open-in-app" | "openid" | "palette" | "palette-outline" | "pan" | "phone-outline" | "plus" | "plus-circle" | "post" | "qrcode" | "react" | "read" | "shield-account-outline" | "shield-check" | "shield-search" | "signature" | "sort-alphabetical-variant" | "sort-numeric-variant" | "store" | "tag" | "tag-outline" | "text-box-outline" | "theme-light-dark" | "transfer" | "trash-can-outline" | "tray-arrow-down" | "upload" | "video-outline" | "wifi-off" | "wrench" | "xml", "OxyServicesMaterialCommunityIcons">;
3
3
  export default MaterialCommunityIcons;
4
4
  //# sourceMappingURL=MaterialCommunityIcons.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MaterialCommunityIcons.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/MaterialCommunityIcons.ts"],"names":[],"mappings":"AAKA,yFAAyF;AACzF,QAAA,MAAM,sBAAsB,25FAG3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"MaterialCommunityIcons.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/MaterialCommunityIcons.ts"],"names":[],"mappings":"AAKA,yFAAyF;AACzF,QAAA,MAAM,sBAAsB,s6FAG3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -285,6 +285,7 @@ export declare const materialCommunityIconsGlyphMap: {
285
285
  readonly post: 987144;
286
286
  readonly presentation: 984104;
287
287
  readonly pulse: 984112;
288
+ readonly qrcode: 984114;
288
289
  readonly radio: 984121;
289
290
  readonly react: 984840;
290
291
  readonly read: 984135;
@@ -1 +1 @@
1
- {"version":3,"file":"subsetGlyphMaps.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/subsetGlyphMaps.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0InB,CAAC;AAEX,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+LjC,CAAC"}
1
+ {"version":3,"file":"subsetGlyphMaps.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/subsetGlyphMaps.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0InB,CAAC;AAEX,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgMjC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CreateAccountScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/CreateAccountScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAkF3D;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAiZlD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"CreateAccountScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/CreateAccountScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAkF3D;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoZlD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -18,7 +18,12 @@ export type UsernameDraftResult = {
18
18
  error: string;
19
19
  };
20
20
  /**
21
- * Hold a typed username to the policy for `kind` (`bot` handles end in `bot`).
21
+ * Hold a typed username to the SHAPE the policy requires for `kind` (`bot`
22
+ * handles end in `bot`).
23
+ *
24
+ * Reserved names are not judged here: the list belongs to the server, which
25
+ * answers for them (see {@link describeUsernameRefusal}), so a name it has
26
+ * released is never refused by a bundle that predates the release.
22
27
  * On success `username` is the trimmed handle to send; on failure `error` is
23
28
  * the localized reason, specific to the rule that failed.
24
29
  */
@@ -1 +1 @@
1
- {"version":3,"file":"usernamePolicy.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernamePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAWhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAkB,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,SAAS,EACZ,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,GACxB,mBAAmB,CAMrB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,CAAC,EAAE,SAAS,GACX,MAAM,GAAG,IAAI,CAMf"}
1
+ {"version":3,"file":"usernamePolicy.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernamePolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAWhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAkB,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,SAAS,EACZ,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,GACxB,mBAAmB,CAMrB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,CAAC,EAAE,SAAS,GACX,MAAM,GAAG,IAAI,CAMf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/services",
3
- "version": "15.0.2",
3
+ "version": "15.1.1",
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,16 @@
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.7.0",
179
+ "@oxy.so/contracts": "^7.8.0",
180
180
  "color": "^5.0.3",
181
- "@peable.to/sdk": "^4.0.0"
181
+ "@peable.to/sdk": "^4.0.0",
182
+ "qrcode": "^1.5.4",
183
+ "@types/qrcode": "^1.5.6"
182
184
  },
183
185
  "devDependencies": {
184
186
  "@expo/app-integrity": "~58.0.2",
185
187
  "@expo/vector-icons": "^15.1.1",
186
- "@oxy.so/core": "7.60.1",
188
+ "@oxy.so/core": "7.61.0",
187
189
  "@react-native-async-storage/async-storage": "^3.1.1",
188
190
  "@react-native-community/netinfo": "^12.0.1",
189
191
  "@react-native/babel-preset": "^0.88.1",
@@ -150,8 +150,8 @@
150
150
  "materialCommunityIcons": {
151
151
  "fontFamily": "OxyServicesMaterialCommunityIcons",
152
152
  "file": "src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf",
153
- "bytes": 28516,
154
- "sha256": "c5e7314182886fe878bce3d789010c102104bf5c92d2ecadad95d63cb3b78393",
153
+ "bytes": 28720,
154
+ "sha256": "575a808944902da9b8f54140aa33a17a95db27b3a14b8832d02923c230e974a7",
155
155
  "names": [
156
156
  "account",
157
157
  "account-circle",
@@ -300,6 +300,7 @@
300
300
  "post",
301
301
  "presentation",
302
302
  "pulse",
303
+ "qrcode",
303
304
  "radio",
304
305
  "react",
305
306
  "read",
@@ -347,5 +348,5 @@
347
348
  }
348
349
  },
349
350
  "glyphMapsFile": "src/ui/icons/subsetGlyphMaps.ts",
350
- "glyphMapsSha256": "75fe9abf0e02566d876c15fd5612284e7ab604c95f9b670df849f680f1129296"
351
+ "glyphMapsSha256": "df4256ee3243433eed204ca00896198f7960a91f5d45f74bb4052ba4fb5ce364"
351
352
  }
@@ -30,7 +30,7 @@
30
30
  import type React from 'react';
31
31
  import { useEffect } from 'react';
32
32
  import { StyleSheet, View } from 'react-native';
33
- import QRCode from 'react-native-qrcode-svg';
33
+ import { QRCode } from './QRCode';
34
34
  import { Button } from '@oxy.so/bloom/button';
35
35
  import { Code } from '@oxy.so/bloom/code';
36
36
  import { RiCheckboxCircleLine } from '@oxy.so/bloom/icons/RiCheckboxCircleLine';
@@ -0,0 +1,67 @@
1
+ import { create } from 'qrcode';
2
+ import { useMemo } from 'react';
3
+ import Svg, { G, Path, Rect } from 'react-native-svg';
4
+
5
+ export interface QRCodeProps {
6
+ /** The text the code holds. */
7
+ value: string;
8
+ /** Width and height, in points. */
9
+ size?: number;
10
+ /** The modules' colour. */
11
+ color?: string;
12
+ /** The plate behind them. */
13
+ backgroundColor?: string;
14
+ }
15
+
16
+ /**
17
+ * The QR matrix as one stroked path: a horizontal run per row of dark modules, each `cellSize` wide.
18
+ * Exactly what react-native-qrcode-svg 6.3 drew (`genMatrix` and `transformMatrixIntoPath`, MIT), at
19
+ * error correction level M on the same `qrcode` encoder, so a code is the same pixels. That package
20
+ * is not imported: its logo support links `react-native-svg/css` (css-tree, css-select, entities:
21
+ * about 200 KB of every Android bundle) whether or not a logo is drawn.
22
+ */
23
+ export function qrCodePath(value: string, size: number): { path: string; cellSize: number } {
24
+ const { modules } = create(value, { errorCorrectionLevel: 'M' });
25
+ const count = modules.size;
26
+ const cellSize = size / count;
27
+ let path = '';
28
+ for (let i = 0; i < count; i++) {
29
+ const y = cellSize / 2 + cellSize * i;
30
+ let drawing = false;
31
+ for (let j = 0; j < count; j++) {
32
+ if (modules.get(i, j)) {
33
+ if (!drawing) {
34
+ path += `M${cellSize * j} ${y} `;
35
+ drawing = true;
36
+ }
37
+ if (j === count - 1) path += `L${cellSize * (j + 1)} ${y} `;
38
+ } else if (drawing) {
39
+ path += `L${cellSize * j} ${y} `;
40
+ drawing = false;
41
+ }
42
+ }
43
+ }
44
+ return { path, cellSize };
45
+ }
46
+
47
+ /** A QR code drawn with react-native-svg, on its plate. */
48
+ export function QRCode({
49
+ value,
50
+ size = 100,
51
+ color = 'black',
52
+ backgroundColor = 'white',
53
+ }: QRCodeProps) {
54
+ const { path, cellSize } = useMemo(() => qrCodePath(value, size), [value, size]);
55
+ return (
56
+ <Svg viewBox={`0 0 ${size} ${size}`} width={size} height={size}>
57
+ <G>
58
+ <Rect x={0} y={0} width={size} height={size} fill={backgroundColor} />
59
+ </G>
60
+ <G>
61
+ <Path d={path} strokeLinecap="butt" stroke={color} strokeWidth={cellSize} />
62
+ </G>
63
+ </Svg>
64
+ );
65
+ }
66
+
67
+ export default QRCode;
@@ -15,7 +15,7 @@
15
15
  import type React from 'react';
16
16
  import { View } from 'react-native';
17
17
  import MaterialCommunityIcons from '../../icons/MaterialCommunityIcons';
18
- import QRCode from 'react-native-qrcode-svg';
18
+ import { QRCode } from '../QRCode';
19
19
  import { Button } from '@oxy.so/bloom/button';
20
20
  import { Loading } from '@oxy.so/bloom/loading';
21
21
  import { Text } from '@oxy.so/bloom/typography';
@@ -23,7 +23,7 @@ interface PaymentDetailsStepProps {
23
23
  qrSize: number;
24
24
  onBack: () => void;
25
25
  onNext: () => void;
26
- QRCodeComponent?: React.ComponentType<{ value?: string; size?: number }>;
26
+ QRCodeComponent?: React.ComponentType<{ value: string; size?: number }>;
27
27
  }
28
28
 
29
29
  const PaymentDetailsStep: React.FC<PaymentDetailsStepProps> = ({
@@ -16,7 +16,7 @@
16
16
  import type React from 'react';
17
17
  import { useEffect, useState } from 'react';
18
18
  import { StyleSheet, View } from 'react-native';
19
- import QRCode from 'react-native-qrcode-svg';
19
+ import { QRCode } from '../QRCode';
20
20
  import { Button } from '@oxy.so/bloom/button';
21
21
  import { RiCheckboxCircleLine } from '@oxy.so/bloom/icons/RiCheckboxCircleLine';
22
22
  import { RiRefreshLine } from '@oxy.so/bloom/icons/RiRefreshLine';
@@ -14,7 +14,7 @@
14
14
  import type React from 'react';
15
15
  import { useState } from 'react';
16
16
  import { StyleSheet, View } from 'react-native';
17
- import QRCode from 'react-native-qrcode-svg';
17
+ import { QRCode } from '../QRCode';
18
18
  import { CodeBlock } from '@oxy.so/bloom/code';
19
19
  import { useTheme } from '@oxy.so/bloom/theme';
20
20
  import { toast } from '@oxy.so/bloom/toast';
@@ -15,7 +15,7 @@
15
15
  import type React from 'react';
16
16
  import { useCallback, useEffect, useRef, useState } from 'react';
17
17
  import { StyleSheet, View } from 'react-native';
18
- import QRCode from 'react-native-qrcode-svg';
18
+ import { QRCode } from '../QRCode';
19
19
  import { Button } from '@oxy.so/bloom/button';
20
20
  import { Loading } from '@oxy.so/bloom/loading';
21
21
  import { useTheme } from '@oxy.so/bloom/theme';
@@ -162,7 +162,8 @@ export const OxySignUpPanel: React.FC<OxySignUpPanelProps> = ({
162
162
  setError(
163
163
  reason instanceof UsernameTakenError
164
164
  ? t('signup.username.taken')
165
- : describeApiError(reason, t),
165
+ : // A name the server refuses (reserved, say) is a rule to follow.
166
+ (describeUsernameRefusal(reason, username, t) ?? describeApiError(reason, t)),
166
167
  );
167
168
  })
168
169
  .finally(() => setPending(false));
@@ -1,13 +1,14 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import { useOxy } from '../context/oxyRuntimeContext';
3
3
  import { shareUsernameLookup } from '../utils/usernameLookupBudget';
4
- import { checkUsernameDraft } from '../utils/usernamePolicy';
4
+ import { checkUsernameDraft, describeUsernameRefusal } from '../utils/usernamePolicy';
5
5
  import { useI18n } from './useI18n';
6
6
 
7
- type CheckResult = {
8
- candidate: string;
9
- status: 'available' | 'taken' | 'error' | 'deferred';
10
- };
7
+ type CheckResult =
8
+ | { candidate: string; status: 'available' | 'taken' | 'error' | 'deferred' }
9
+ // The request failed; whether the server refused the NAME (reserved, say) is
10
+ // decided at render, where the localized copy is available.
11
+ | { candidate: string; status: 'rejected'; error: unknown };
11
12
 
12
13
  export interface UsernameAvailabilityOptions {
13
14
  /**
@@ -62,8 +63,8 @@ export function useUsernameAvailability(
62
63
  }
63
64
  setResult({ candidate, status: outcome.available ? 'available' : 'taken' });
64
65
  },
65
- () => {
66
- if (active) setResult({ candidate, status: 'error' });
66
+ (error: unknown) => {
67
+ if (active) setResult({ candidate, status: 'rejected', error });
67
68
  },
68
69
  );
69
70
  }, 350);
@@ -73,19 +74,26 @@ export function useUsernameAvailability(
73
74
  };
74
75
  }, [candidate, enabled, invalid, unchanged, oxyServices, attempt, reserveSubmit]);
75
76
 
77
+ // A failed request is either the server refusing the name itself (a rule the
78
+ // person can follow) or a failure of the check (which they can retry).
79
+ const current = result?.candidate === candidate ? result : undefined;
80
+ const refusal =
81
+ current?.status === 'rejected' ? describeUsernameRefusal(current.error, candidate, t) : null;
76
82
  const status = !enabled
77
83
  ? 'idle'
78
84
  : unchanged
79
85
  ? 'unchanged'
80
- : invalid
86
+ : invalid || refusal
81
87
  ? 'invalid'
82
- : result?.candidate === candidate
83
- ? result.status
88
+ : current
89
+ ? current.status === 'rejected'
90
+ ? 'error'
91
+ : current.status
84
92
  : 'checking';
85
93
  return {
86
94
  candidate,
87
95
  status,
88
- invalid,
96
+ invalid: invalid ?? refusal ?? undefined,
89
97
  canSave: status === 'available' || status === 'unchanged',
90
98
  retry: () => {
91
99
  setResult(undefined);
@@ -286,6 +286,7 @@ export const materialCommunityIconsGlyphMap = {
286
286
  "post": 987144,
287
287
  "presentation": 984104,
288
288
  "pulse": 984112,
289
+ "qrcode": 984114,
289
290
  "radio": 984121,
290
291
  "react": 984840,
291
292
  "read": 984135,
@@ -200,10 +200,13 @@ const CreateAccountScreen: React.FC<BaseScreenProps> = ({
200
200
  ? t('accounts.create.username.available')
201
201
  : t('accounts.create.username.taken'),
202
202
  );
203
- } catch {
203
+ } catch (error) {
204
204
  if (seq !== usernameCheckSeqRef.current) return;
205
- setUsernameStatus('idle');
206
- setUsernameMessage(t('accounts.create.username.checkFailed'));
205
+ // A name the server itself refuses (reserved) is a rule to follow,
206
+ // not a failed check: say which rule, as the format check does.
207
+ const reason = describeUsernameRefusal(error, value, t);
208
+ setUsernameStatus(reason === null ? 'idle' : 'invalid');
209
+ setUsernameMessage(reason ?? t('accounts.create.username.checkFailed'));
207
210
  }
208
211
  }, DEBOUNCE_MS);
209
212
  },
@@ -8,7 +8,7 @@ import { H4, Text } from '@oxy.so/bloom/typography';
8
8
  import Ionicons from '../icons/Ionicons';
9
9
  import { useI18n } from '../hooks/useI18n';
10
10
  import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
11
- import QRCode from 'react-native-qrcode-svg';
11
+ import { QRCode } from '../components/QRCode';
12
12
 
13
13
  import PaymentSummaryStep from '../components/payment/PaymentSummaryStep';
14
14
  import PaymentMethodStep from '../components/payment/PaymentMethodStep';
@@ -18,7 +18,7 @@ import {
18
18
  USERNAME_INVALID_MESSAGE,
19
19
  USERNAME_MAX_LENGTH,
20
20
  USERNAME_MIN_LENGTH,
21
- usernameCheckForAccountKind,
21
+ usernameFormatCheckForAccountKind,
22
22
  } from '@oxy.so/contracts/client';
23
23
  import type { Translate } from '../hooks/useI18n';
24
24
  import { errorCode } from './apiErrorMessage';
@@ -26,7 +26,12 @@ import { errorCode } from './apiErrorMessage';
26
26
  export type UsernameDraftResult = { ok: true; username: string } | { ok: false; error: string };
27
27
 
28
28
  /**
29
- * Hold a typed username to the policy for `kind` (`bot` handles end in `bot`).
29
+ * Hold a typed username to the SHAPE the policy requires for `kind` (`bot`
30
+ * handles end in `bot`).
31
+ *
32
+ * Reserved names are not judged here: the list belongs to the server, which
33
+ * answers for them (see {@link describeUsernameRefusal}), so a name it has
34
+ * released is never refused by a bundle that predates the release.
30
35
  * On success `username` is the trimmed handle to send; on failure `error` is
31
36
  * the localized reason, specific to the rule that failed.
32
37
  */
@@ -37,7 +42,7 @@ export function checkUsernameDraft(
37
42
  ): UsernameDraftResult {
38
43
  const username = value.trim();
39
44
  if (!username) return { ok: false, error: t('usernamePolicy.required') };
40
- const checked = usernameCheckForAccountKind(kind)(username, []);
45
+ const checked = usernameFormatCheckForAccountKind(kind)(username, []);
41
46
  if (checked.ok) return { ok: true, username: checked.value };
42
47
  return { ok: false, error: describeUsernameIssue(username, checked.issue.message, t) };
43
48
  }