@oxy.so/services 14.10.1 → 14.12.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 (160) hide show
  1. package/lib/commonjs/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  2. package/lib/commonjs/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  3. package/lib/commonjs/assets/assets/fonts/icons/manifest.json +5 -4
  4. package/lib/commonjs/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  5. package/lib/commonjs/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  6. package/lib/commonjs/assets/fonts/icons/manifest.json +5 -4
  7. package/lib/commonjs/index.js +10 -0
  8. package/lib/commonjs/index.js.map +1 -1
  9. package/lib/commonjs/ui/boot/runProviderColdBoot.js +3 -1
  10. package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
  11. package/lib/commonjs/ui/components/OxyProvider.js +52 -18
  12. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  13. package/lib/commonjs/ui/context/OxyContext.js +15 -5
  14. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  15. package/lib/commonjs/ui/context/OxyHostedContext.js +515 -0
  16. package/lib/commonjs/ui/context/OxyHostedContext.js.map +1 -0
  17. package/lib/commonjs/ui/context/oxyRuntimeContext.js.map +1 -1
  18. package/lib/commonjs/ui/hooks/useAuth.js +13 -2
  19. package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
  20. package/lib/commonjs/ui/hooks/useOxyEvent.js +9 -5
  21. package/lib/commonjs/ui/hooks/useOxyEvent.js.map +1 -1
  22. package/lib/commonjs/ui/icons/subsetGlyphMaps.js +1 -0
  23. package/lib/commonjs/ui/icons/subsetGlyphMaps.js.map +1 -1
  24. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +16 -63
  25. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  26. package/lib/commonjs/ui/screens/ProfileLinkForm.js +125 -0
  27. package/lib/commonjs/ui/screens/ProfileLinkForm.js.map +1 -0
  28. package/lib/commonjs/ui/screens/ProfileLinksEditor.js +85 -0
  29. package/lib/commonjs/ui/screens/ProfileLinksEditor.js.map +1 -0
  30. package/lib/commonjs/ui/screens/linkFormat.js +22 -10
  31. package/lib/commonjs/ui/screens/linkFormat.js.map +1 -1
  32. package/lib/commonjs/ui/session/hostSession.js +474 -0
  33. package/lib/commonjs/ui/session/hostSession.js.map +1 -0
  34. package/lib/module/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  35. package/lib/module/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  36. package/lib/module/assets/assets/fonts/icons/manifest.json +5 -4
  37. package/lib/module/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  38. package/lib/module/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  39. package/lib/module/assets/fonts/icons/manifest.json +5 -4
  40. package/lib/module/index.js +3 -0
  41. package/lib/module/index.js.map +1 -1
  42. package/lib/module/ui/boot/runProviderColdBoot.js +3 -1
  43. package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
  44. package/lib/module/ui/components/OxyProvider.js +53 -19
  45. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  46. package/lib/module/ui/context/OxyContext.js +15 -5
  47. package/lib/module/ui/context/OxyContext.js.map +1 -1
  48. package/lib/module/ui/context/OxyHostedContext.js +510 -0
  49. package/lib/module/ui/context/OxyHostedContext.js.map +1 -0
  50. package/lib/module/ui/context/oxyRuntimeContext.js.map +1 -1
  51. package/lib/module/ui/hooks/useAuth.js +13 -2
  52. package/lib/module/ui/hooks/useAuth.js.map +1 -1
  53. package/lib/module/ui/hooks/useOxyEvent.js +9 -5
  54. package/lib/module/ui/hooks/useOxyEvent.js.map +1 -1
  55. package/lib/module/ui/icons/subsetGlyphMaps.js +1 -0
  56. package/lib/module/ui/icons/subsetGlyphMaps.js.map +1 -1
  57. package/lib/module/ui/screens/EditProfileFieldScreen.js +17 -65
  58. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  59. package/lib/module/ui/screens/ProfileLinkForm.js +121 -0
  60. package/lib/module/ui/screens/ProfileLinkForm.js.map +1 -0
  61. package/lib/module/ui/screens/ProfileLinksEditor.js +81 -0
  62. package/lib/module/ui/screens/ProfileLinksEditor.js.map +1 -0
  63. package/lib/module/ui/screens/linkFormat.js +21 -9
  64. package/lib/module/ui/screens/linkFormat.js.map +1 -1
  65. package/lib/module/ui/session/hostSession.js +467 -0
  66. package/lib/module/ui/session/hostSession.js.map +1 -0
  67. package/lib/typescript/commonjs/index.d.ts +1 -0
  68. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +6 -0
  70. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  72. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/ui/context/OxyHostedContext.d.ts +40 -0
  74. package/lib/typescript/commonjs/ui/context/OxyHostedContext.d.ts.map +1 -0
  75. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +19 -2
  76. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
  77. package/lib/typescript/commonjs/ui/context/oxyRuntimeContext.d.ts +6 -0
  78. package/lib/typescript/commonjs/ui/context/oxyRuntimeContext.d.ts.map +1 -1
  79. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +3 -0
  80. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/ui/hooks/useOxyEvent.d.ts.map +1 -1
  82. package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts +1 -1
  83. package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts +1 -0
  85. package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
  86. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/ui/screens/ProfileLinkForm.d.ts +18 -0
  88. package/lib/typescript/commonjs/ui/screens/ProfileLinkForm.d.ts.map +1 -0
  89. package/lib/typescript/commonjs/ui/screens/ProfileLinksEditor.d.ts +14 -0
  90. package/lib/typescript/commonjs/ui/screens/ProfileLinksEditor.d.ts.map +1 -0
  91. package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts +14 -2
  92. package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts.map +1 -1
  93. package/lib/typescript/commonjs/ui/session/hostSession.d.ts +69 -0
  94. package/lib/typescript/commonjs/ui/session/hostSession.d.ts.map +1 -0
  95. package/lib/typescript/commonjs/ui/types/navigation.d.ts +24 -1
  96. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  97. package/lib/typescript/commonjs/ui/utils/identityCrypto.d.ts +4 -0
  98. package/lib/typescript/commonjs/ui/utils/identityCrypto.d.ts.map +1 -1
  99. package/lib/typescript/module/index.d.ts +1 -0
  100. package/lib/typescript/module/index.d.ts.map +1 -1
  101. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +6 -0
  102. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  103. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  104. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  105. package/lib/typescript/module/ui/context/OxyHostedContext.d.ts +40 -0
  106. package/lib/typescript/module/ui/context/OxyHostedContext.d.ts.map +1 -0
  107. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +19 -2
  108. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
  109. package/lib/typescript/module/ui/context/oxyRuntimeContext.d.ts +6 -0
  110. package/lib/typescript/module/ui/context/oxyRuntimeContext.d.ts.map +1 -1
  111. package/lib/typescript/module/ui/hooks/useAuth.d.ts +3 -0
  112. package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
  113. package/lib/typescript/module/ui/hooks/useOxyEvent.d.ts.map +1 -1
  114. package/lib/typescript/module/ui/icons/Ionicons.d.ts +1 -1
  115. package/lib/typescript/module/ui/icons/Ionicons.d.ts.map +1 -1
  116. package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts +1 -0
  117. package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
  118. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  119. package/lib/typescript/module/ui/screens/ProfileLinkForm.d.ts +18 -0
  120. package/lib/typescript/module/ui/screens/ProfileLinkForm.d.ts.map +1 -0
  121. package/lib/typescript/module/ui/screens/ProfileLinksEditor.d.ts +14 -0
  122. package/lib/typescript/module/ui/screens/ProfileLinksEditor.d.ts.map +1 -0
  123. package/lib/typescript/module/ui/screens/linkFormat.d.ts +14 -2
  124. package/lib/typescript/module/ui/screens/linkFormat.d.ts.map +1 -1
  125. package/lib/typescript/module/ui/session/hostSession.d.ts +69 -0
  126. package/lib/typescript/module/ui/session/hostSession.d.ts.map +1 -0
  127. package/lib/typescript/module/ui/types/navigation.d.ts +24 -1
  128. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  129. package/lib/typescript/module/ui/utils/identityCrypto.d.ts +4 -0
  130. package/lib/typescript/module/ui/utils/identityCrypto.d.ts.map +1 -1
  131. package/package.json +7 -7
  132. package/src/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  133. package/src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  134. package/src/assets/fonts/icons/manifest.json +5 -4
  135. package/src/index.ts +3 -0
  136. package/src/ui/boot/runProviderColdBoot.ts +12 -1
  137. package/src/ui/components/OxyProvider.tsx +77 -34
  138. package/src/ui/context/OxyContext.tsx +19 -4
  139. package/src/ui/context/OxyHostedContext.tsx +678 -0
  140. package/src/ui/context/oxyContextTypes.ts +21 -2
  141. package/src/ui/context/oxyRuntimeContext.ts +9 -1
  142. package/src/ui/hooks/useAuth.ts +13 -1
  143. package/src/ui/hooks/useOxyEvent.ts +8 -5
  144. package/src/ui/icons/subsetGlyphMaps.ts +1 -0
  145. package/src/ui/screens/EditProfileFieldScreen.tsx +19 -85
  146. package/src/ui/screens/ProfileLinkForm.tsx +131 -0
  147. package/src/ui/screens/ProfileLinksEditor.tsx +98 -0
  148. package/src/ui/screens/__tests__/linkFormat.test.ts +51 -8
  149. package/src/ui/screens/linkFormat.ts +28 -9
  150. package/src/ui/session/hostSession.ts +515 -0
  151. package/src/ui/types/navigation.ts +24 -1
  152. package/lib/commonjs/ui/screens/LinkListEditor.js +0 -105
  153. package/lib/commonjs/ui/screens/LinkListEditor.js.map +0 -1
  154. package/lib/module/ui/screens/LinkListEditor.js +0 -99
  155. package/lib/module/ui/screens/LinkListEditor.js.map +0 -1
  156. package/lib/typescript/commonjs/ui/screens/LinkListEditor.d.ts +0 -25
  157. package/lib/typescript/commonjs/ui/screens/LinkListEditor.d.ts.map +0 -1
  158. package/lib/typescript/module/ui/screens/LinkListEditor.d.ts +0 -25
  159. package/lib/typescript/module/ui/screens/LinkListEditor.d.ts.map +0 -1
  160. package/src/ui/screens/LinkListEditor.tsx +0 -113
@@ -1,99 +0,0 @@
1
- "use strict";
2
-
3
- import React, { useCallback } from 'react';
4
- import { View } from 'react-native';
5
- import { Button } from '@oxy.so/bloom/button';
6
- import { TextField, TextFieldInput, TextFieldLabel } from '@oxy.so/bloom/text-field';
7
- import { Text } from '@oxy.so/bloom/typography';
8
- import { useTheme } from '@oxy.so/bloom/theme';
9
- import { PROFILE_LINK_TITLE_MAX } from '@oxy.so/contracts/client';
10
- import Ionicons from "../icons/Ionicons.js";
11
- import { clampLinkTitle, moveLinkItem } from "./linkFormat.js";
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- /**
14
- * The profile's ordered link list. Each link has an editable title and can move
15
- * up or down; order is the profile's display order, and the server stores it as
16
- * the array's index. Reordering uses buttons rather than drag: a drag gesture
17
- * would not reach a screen reader, and a button does.
18
- */
19
- export function LinkListEditor({
20
- items,
21
- onChange,
22
- disabled,
23
- labels
24
- }) {
25
- const bloomTheme = useTheme();
26
- const setTitle = useCallback((id, title) => {
27
- onChange(items.map(item => item.id === id ? {
28
- ...item,
29
- title: clampLinkTitle(title)
30
- } : item));
31
- }, [items, onChange]);
32
- const move = useCallback((index, delta) => onChange(moveLinkItem(items, index, delta)), [items, onChange]);
33
- const remove = useCallback(id => onChange(items.filter(item => item.id !== id)), [items, onChange]);
34
- return /*#__PURE__*/_jsx(View, {
35
- className: "gap-space-12",
36
- children: items.map((item, index) => {
37
- const shownTitle = item.title || item.url;
38
- return /*#__PURE__*/_jsxs(View, {
39
- className: "gap-space-8 pb-space-12 border-b border-border",
40
- children: [/*#__PURE__*/_jsxs(TextField, {
41
- disabled: disabled,
42
- children: [/*#__PURE__*/_jsx(TextFieldLabel, {
43
- children: labels.title
44
- }), /*#__PURE__*/_jsx(TextFieldInput, {
45
- label: labels.title,
46
- value: item.title,
47
- onChangeText: value => setTitle(item.id, value),
48
- maxLength: PROFILE_LINK_TITLE_MAX,
49
- autoCorrect: true
50
- })]
51
- }), /*#__PURE__*/_jsxs(View, {
52
- className: "flex-row items-center gap-space-8",
53
- children: [/*#__PURE__*/_jsx(Text, {
54
- className: "flex-1 text-muted-foreground",
55
- numberOfLines: 1,
56
- children: item.url
57
- }), /*#__PURE__*/_jsx(Button, {
58
- onPress: () => move(index, -1),
59
- disabled: disabled || index === 0,
60
- accessibilityLabel: labels.moveUp,
61
- icon: /*#__PURE__*/_jsx(Ionicons, {
62
- name: "chevron-up",
63
- size: 18,
64
- color: bloomTheme.colors.textSecondary
65
- }),
66
- iconOnly: true,
67
- tone: "neutral",
68
- appearance: "plain"
69
- }), /*#__PURE__*/_jsx(Button, {
70
- onPress: () => move(index, 1),
71
- disabled: disabled || index === items.length - 1,
72
- accessibilityLabel: labels.moveDown,
73
- icon: /*#__PURE__*/_jsx(Ionicons, {
74
- name: "chevron-down",
75
- size: 18,
76
- color: bloomTheme.colors.textSecondary
77
- }),
78
- iconOnly: true,
79
- tone: "neutral",
80
- appearance: "plain"
81
- }), /*#__PURE__*/_jsx(Button, {
82
- onPress: () => remove(item.id),
83
- disabled: disabled,
84
- accessibilityLabel: labels.removeNamed(shownTitle),
85
- icon: /*#__PURE__*/_jsx(Ionicons, {
86
- name: "trash-outline",
87
- size: 18,
88
- color: bloomTheme.colors.negative
89
- }),
90
- iconOnly: true,
91
- tone: "danger",
92
- appearance: "plain"
93
- })]
94
- })]
95
- }, item.id);
96
- })
97
- });
98
- }
99
- //# sourceMappingURL=LinkListEditor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useCallback","View","Button","TextField","TextFieldInput","TextFieldLabel","Text","useTheme","PROFILE_LINK_TITLE_MAX","Ionicons","clampLinkTitle","moveLinkItem","jsx","_jsx","jsxs","_jsxs","LinkListEditor","items","onChange","disabled","labels","bloomTheme","setTitle","id","title","map","item","move","index","delta","remove","filter","className","children","shownTitle","url","label","value","onChangeText","maxLength","autoCorrect","numberOfLines","onPress","accessibilityLabel","moveUp","icon","name","size","color","colors","textSecondary","iconOnly","tone","appearance","length","moveDown","removeNamed","negative"],"sourceRoot":"../../../../src","sources":["ui/screens/LinkListEditor.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,SAAS,EAAEC,cAAc,EAAEC,cAAc,QAAQ,0BAA0B;AACpF,SAASC,IAAI,QAAQ,0BAA0B;AAC/C,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,sBAAsB,QAAQ,0BAA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Q,EAAEA,QAAQ,IAAIS,KAAK,KAAKX,KAAK,CAACqC,MAAM,GAAG,CAAE;YACjDX,kBAAkB,EAAEvB,MAAM,CAACmC,QAAS;YACpCV,IAAI,eACFhC,IAAA,CAACJ,QAAQ;cAACqC,IAAI,EAAC,cAAc;cAACC,IAAI,EAAE,EAAG;cAACC,KAAK,EAAE3B,UAAU,CAAC4B,MAAM,CAACC;YAAc,CAAE,CAClF;YACDC,QAAQ;YACRC,IAAI,EAAC,SAAS;YACdC,UAAU,EAAC;UAAO,CACnB,CAAC,eACFxC,IAAA,CAACX,MAAM;YACLwC,OAAO,EAAEA,CAAA,KAAMZ,MAAM,CAACJ,IAAI,CAACH,EAAE,CAAE;YAC/BJ,QAAQ,EAAEA,QAAS;YACnBwB,kBAAkB,EAAEvB,MAAM,CAACoC,WAAW,CAACtB,UAAU,CAAE;YACnDW,IAAI,eACFhC,IAAA,CAACJ,QAAQ;cAACqC,IAAI,EAAC,eAAe;cAACC,IAAI,EAAE,EAAG;cAACC,KAAK,EAAE3B,UAAU,CAAC4B,MAAM,CAACQ;YAAS,CAAE,CAC9E;YACDN,QAAQ;YACRC,IAAI,EAAC,QAAQ;YACbC,UAAU,EAAC;UAAO,CACnB,CAAC;QAAA,CACE,CAAC;MAAA,GAhDE3B,IAAI,CAACH,EAiDV,CAAC;IAEX,CAAC;EAAC,CACE,CAAC;AAEX","ignoreList":[]}
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- import { type LinkListItem } from './linkFormat';
3
- interface LinkListEditorProps {
4
- items: LinkListItem[];
5
- onChange: (items: LinkListItem[]) => void;
6
- disabled?: boolean;
7
- /** Visible and accessible strings, resolved by the caller. */
8
- labels: {
9
- title: string;
10
- moveUp: string;
11
- moveDown: string;
12
- remove: string;
13
- /** `{{title}}` is replaced with the link's title. */
14
- removeNamed: (title: string) => string;
15
- };
16
- }
17
- /**
18
- * The profile's ordered link list. Each link has an editable title and can move
19
- * up or down; order is the profile's display order, and the server stores it as
20
- * the array's index. Reordering uses buttons rather than drag: a drag gesture
21
- * would not reach a screen reader, and a button does.
22
- */
23
- export declare function LinkListEditor({ items, onChange, disabled, labels }: LinkListEditorProps): React.JSX.Element;
24
- export {};
25
- //# sourceMappingURL=LinkListEditor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LinkListEditor.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/LinkListEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAQ3C,OAAO,EAAgC,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAE/E,UAAU,mBAAmB;IAC3B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,qDAAqD;QACrD,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;KACxC,CAAC;CACH;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,mBAAmB,qBAiFxF"}
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- import { type LinkListItem } from './linkFormat.js';
3
- interface LinkListEditorProps {
4
- items: LinkListItem[];
5
- onChange: (items: LinkListItem[]) => void;
6
- disabled?: boolean;
7
- /** Visible and accessible strings, resolved by the caller. */
8
- labels: {
9
- title: string;
10
- moveUp: string;
11
- moveDown: string;
12
- remove: string;
13
- /** `{{title}}` is replaced with the link's title. */
14
- removeNamed: (title: string) => string;
15
- };
16
- }
17
- /**
18
- * The profile's ordered link list. Each link has an editable title and can move
19
- * up or down; order is the profile's display order, and the server stores it as
20
- * the array's index. Reordering uses buttons rather than drag: a drag gesture
21
- * would not reach a screen reader, and a button does.
22
- */
23
- export declare function LinkListEditor({ items, onChange, disabled, labels }: LinkListEditorProps): React.JSX.Element;
24
- export {};
25
- //# sourceMappingURL=LinkListEditor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LinkListEditor.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/LinkListEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAQ3C,OAAO,EAAgC,KAAK,YAAY,EAAE,MAAM,iBAAc,CAAC;AAE/E,UAAU,mBAAmB;IAC3B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,qDAAqD;QACrD,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;KACxC,CAAC;CACH;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,mBAAmB,qBAiFxF"}
@@ -1,113 +0,0 @@
1
- import React, { useCallback } from 'react';
2
- import { View } from 'react-native';
3
- import { Button } from '@oxy.so/bloom/button';
4
- import { TextField, TextFieldInput, TextFieldLabel } from '@oxy.so/bloom/text-field';
5
- import { Text } from '@oxy.so/bloom/typography';
6
- import { useTheme } from '@oxy.so/bloom/theme';
7
- import { PROFILE_LINK_TITLE_MAX } from '@oxy.so/contracts/client';
8
- import Ionicons from '../icons/Ionicons';
9
- import { clampLinkTitle, moveLinkItem, type LinkListItem } from './linkFormat';
10
-
11
- interface LinkListEditorProps {
12
- items: LinkListItem[];
13
- onChange: (items: LinkListItem[]) => void;
14
- disabled?: boolean;
15
- /** Visible and accessible strings, resolved by the caller. */
16
- labels: {
17
- title: string;
18
- moveUp: string;
19
- moveDown: string;
20
- remove: string;
21
- /** `{{title}}` is replaced with the link's title. */
22
- removeNamed: (title: string) => string;
23
- };
24
- }
25
-
26
- /**
27
- * The profile's ordered link list. Each link has an editable title and can move
28
- * up or down; order is the profile's display order, and the server stores it as
29
- * the array's index. Reordering uses buttons rather than drag: a drag gesture
30
- * would not reach a screen reader, and a button does.
31
- */
32
- export function LinkListEditor({ items, onChange, disabled, labels }: LinkListEditorProps) {
33
- const bloomTheme = useTheme();
34
-
35
- const setTitle = useCallback(
36
- (id: string, title: string) => {
37
- onChange(
38
- items.map((item) => (item.id === id ? { ...item, title: clampLinkTitle(title) } : item)),
39
- );
40
- },
41
- [items, onChange],
42
- );
43
-
44
- const move = useCallback(
45
- (index: number, delta: -1 | 1) => onChange(moveLinkItem(items, index, delta)),
46
- [items, onChange],
47
- );
48
-
49
- const remove = useCallback(
50
- (id: string) => onChange(items.filter((item) => item.id !== id)),
51
- [items, onChange],
52
- );
53
-
54
- return (
55
- <View className="gap-space-12">
56
- {items.map((item, index) => {
57
- const shownTitle = item.title || item.url;
58
- return (
59
- <View key={item.id} className="gap-space-8 pb-space-12 border-b border-border">
60
- <TextField disabled={disabled}>
61
- <TextFieldLabel>{labels.title}</TextFieldLabel>
62
- <TextFieldInput
63
- label={labels.title}
64
- value={item.title}
65
- onChangeText={(value) => setTitle(item.id, value)}
66
- maxLength={PROFILE_LINK_TITLE_MAX}
67
- autoCorrect
68
- />
69
- </TextField>
70
- <View className="flex-row items-center gap-space-8">
71
- <Text className="flex-1 text-muted-foreground" numberOfLines={1}>
72
- {item.url}
73
- </Text>
74
- <Button
75
- onPress={() => move(index, -1)}
76
- disabled={disabled || index === 0}
77
- accessibilityLabel={labels.moveUp}
78
- icon={
79
- <Ionicons name="chevron-up" size={18} color={bloomTheme.colors.textSecondary} />
80
- }
81
- iconOnly
82
- tone="neutral"
83
- appearance="plain"
84
- />
85
- <Button
86
- onPress={() => move(index, 1)}
87
- disabled={disabled || index === items.length - 1}
88
- accessibilityLabel={labels.moveDown}
89
- icon={
90
- <Ionicons name="chevron-down" size={18} color={bloomTheme.colors.textSecondary} />
91
- }
92
- iconOnly
93
- tone="neutral"
94
- appearance="plain"
95
- />
96
- <Button
97
- onPress={() => remove(item.id)}
98
- disabled={disabled}
99
- accessibilityLabel={labels.removeNamed(shownTitle)}
100
- icon={
101
- <Ionicons name="trash-outline" size={18} color={bloomTheme.colors.negative} />
102
- }
103
- iconOnly
104
- tone="danger"
105
- appearance="plain"
106
- />
107
- </View>
108
- </View>
109
- );
110
- })}
111
- </View>
112
- );
113
- }