@oxy.so/services 14.11.0 → 14.13.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.
- package/ios/OxyIdentityModule.swift +49 -1
- package/lib/commonjs/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/icons/manifest.json +5 -4
- package/lib/commonjs/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/commonjs/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/commonjs/assets/fonts/icons/manifest.json +5 -4
- package/lib/commonjs/ui/icons/subsetGlyphMaps.js +1 -0
- package/lib/commonjs/ui/icons/subsetGlyphMaps.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +16 -63
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileLinkForm.js +125 -0
- package/lib/commonjs/ui/screens/ProfileLinkForm.js.map +1 -0
- package/lib/commonjs/ui/screens/ProfileLinksEditor.js +85 -0
- package/lib/commonjs/ui/screens/ProfileLinksEditor.js.map +1 -0
- package/lib/commonjs/ui/screens/linkFormat.js +22 -10
- package/lib/commonjs/ui/screens/linkFormat.js.map +1 -1
- package/lib/module/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/module/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/module/assets/assets/fonts/icons/manifest.json +5 -4
- package/lib/module/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/module/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/module/assets/fonts/icons/manifest.json +5 -4
- package/lib/module/ui/icons/subsetGlyphMaps.js +1 -0
- package/lib/module/ui/icons/subsetGlyphMaps.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +17 -65
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileLinkForm.js +121 -0
- package/lib/module/ui/screens/ProfileLinkForm.js.map +1 -0
- package/lib/module/ui/screens/ProfileLinksEditor.js +81 -0
- package/lib/module/ui/screens/ProfileLinksEditor.js.map +1 -0
- package/lib/module/ui/screens/linkFormat.js +21 -9
- package/lib/module/ui/screens/linkFormat.js.map +1 -1
- package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts +1 -1
- package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts +1 -0
- package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileLinkForm.d.ts +18 -0
- package/lib/typescript/commonjs/ui/screens/ProfileLinkForm.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/ProfileLinksEditor.d.ts +14 -0
- package/lib/typescript/commonjs/ui/screens/ProfileLinksEditor.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts +14 -2
- package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/identityCrypto.d.ts +5 -0
- package/lib/typescript/commonjs/ui/utils/identityCrypto.d.ts.map +1 -1
- package/lib/typescript/module/ui/icons/Ionicons.d.ts +1 -1
- package/lib/typescript/module/ui/icons/Ionicons.d.ts.map +1 -1
- package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts +1 -0
- package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileLinkForm.d.ts +18 -0
- package/lib/typescript/module/ui/screens/ProfileLinkForm.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/ProfileLinksEditor.d.ts +14 -0
- package/lib/typescript/module/ui/screens/ProfileLinksEditor.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/linkFormat.d.ts +14 -2
- package/lib/typescript/module/ui/screens/linkFormat.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/identityCrypto.d.ts +5 -0
- package/lib/typescript/module/ui/utils/identityCrypto.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/src/assets/fonts/icons/manifest.json +5 -4
- package/src/ui/icons/subsetGlyphMaps.ts +1 -0
- package/src/ui/screens/EditProfileFieldScreen.tsx +19 -85
- package/src/ui/screens/ProfileLinkForm.tsx +131 -0
- package/src/ui/screens/ProfileLinksEditor.tsx +98 -0
- package/src/ui/screens/__tests__/linkFormat.test.ts +51 -8
- package/src/ui/screens/linkFormat.ts +28 -9
- package/lib/commonjs/ui/screens/LinkListEditor.js +0 -105
- package/lib/commonjs/ui/screens/LinkListEditor.js.map +0 -1
- package/lib/module/ui/screens/LinkListEditor.js +0 -99
- package/lib/module/ui/screens/LinkListEditor.js.map +0 -1
- package/lib/typescript/commonjs/ui/screens/LinkListEditor.d.ts +0 -25
- package/lib/typescript/commonjs/ui/screens/LinkListEditor.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/LinkListEditor.d.ts +0 -25
- package/lib/typescript/module/ui/screens/LinkListEditor.d.ts.map +0 -1
- package/src/ui/screens/LinkListEditor.tsx +0 -113
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { Button } from '@oxy.so/bloom/button';
|
|
6
|
+
import { Card } from '@oxy.so/bloom/card';
|
|
7
|
+
import { Field } from '@oxy.so/bloom/field';
|
|
8
|
+
import { TextField, TextFieldInput } from '@oxy.so/bloom/text-field';
|
|
9
|
+
import { PROFILE_LINK_TITLE_MAX } from '@oxy.so/contracts/client';
|
|
10
|
+
import { useI18n } from "../hooks/useI18n.js";
|
|
11
|
+
import { clampLinkTitle, linkIdentity, normalizeLinkInput } from "./linkFormat.js";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
* The form for one profile link: its address and an optional title. Saving
|
|
15
|
+
* dismisses the surface with the link to keep; removing dismisses it with a
|
|
16
|
+
* remove. A blank title is left blank, so the profile shows the address.
|
|
17
|
+
*/
|
|
18
|
+
export function ProfileLinkForm({
|
|
19
|
+
surface,
|
|
20
|
+
link,
|
|
21
|
+
existingUrls
|
|
22
|
+
}) {
|
|
23
|
+
const {
|
|
24
|
+
t
|
|
25
|
+
} = useI18n();
|
|
26
|
+
const [input, setInput] = useState(link?.url ?? '');
|
|
27
|
+
const [title, setTitle] = useState(link?.title ?? '');
|
|
28
|
+
const [error, setError] = useState(null);
|
|
29
|
+
const errorMessage = kind => {
|
|
30
|
+
switch (kind) {
|
|
31
|
+
case 'empty':
|
|
32
|
+
return t('editProfile.items.links.errors.empty') || 'Enter a link.';
|
|
33
|
+
case 'insecure':
|
|
34
|
+
return t('editProfile.items.links.errors.insecure') || 'Links must start with https://.';
|
|
35
|
+
case 'already-added':
|
|
36
|
+
return t('editProfile.items.links.errors.duplicate') || 'That link is already on your profile.';
|
|
37
|
+
default:
|
|
38
|
+
return t('editProfile.items.links.errors.invalid') || 'Enter a valid link.';
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const save = () => {
|
|
42
|
+
const normalized = normalizeLinkInput(input);
|
|
43
|
+
if ('error' in normalized) {
|
|
44
|
+
setError(normalized.error);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const identity = linkIdentity(normalized.url);
|
|
48
|
+
if (existingUrls.some(url => linkIdentity(url) === identity)) {
|
|
49
|
+
setError('already-added');
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const result = {
|
|
53
|
+
kind: 'save',
|
|
54
|
+
url: normalized.url,
|
|
55
|
+
title: clampLinkTitle(title.trim())
|
|
56
|
+
};
|
|
57
|
+
surface.dismiss(result);
|
|
58
|
+
};
|
|
59
|
+
const remove = () => {
|
|
60
|
+
const result = {
|
|
61
|
+
kind: 'remove'
|
|
62
|
+
};
|
|
63
|
+
surface.dismiss(result);
|
|
64
|
+
};
|
|
65
|
+
return /*#__PURE__*/_jsxs(Card, {
|
|
66
|
+
className: "gap-space-16 p-space-16",
|
|
67
|
+
children: [/*#__PURE__*/_jsx(Field, {
|
|
68
|
+
label: t('editProfile.items.links.form.urlLabel') || 'Link',
|
|
69
|
+
error: error ? errorMessage(error) : undefined,
|
|
70
|
+
children: /*#__PURE__*/_jsx(TextField, {
|
|
71
|
+
children: /*#__PURE__*/_jsx(TextFieldInput, {
|
|
72
|
+
label: t('editProfile.items.links.form.urlLabel') || 'Link',
|
|
73
|
+
placeholder: t('editProfile.items.links.placeholder') || 'Enter URL',
|
|
74
|
+
value: input,
|
|
75
|
+
onChangeText: value => {
|
|
76
|
+
setInput(value);
|
|
77
|
+
setError(null);
|
|
78
|
+
},
|
|
79
|
+
autoCapitalize: "none",
|
|
80
|
+
autoCorrect: false,
|
|
81
|
+
keyboardType: "url",
|
|
82
|
+
isInvalid: error !== null,
|
|
83
|
+
autoFocus: !link
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
}), /*#__PURE__*/_jsx(Field, {
|
|
87
|
+
label: t('editProfile.items.links.form.titleLabel') || 'Title',
|
|
88
|
+
children: /*#__PURE__*/_jsx(TextField, {
|
|
89
|
+
children: /*#__PURE__*/_jsx(TextFieldInput, {
|
|
90
|
+
label: t('editProfile.items.links.form.titleLabel') || 'Title',
|
|
91
|
+
placeholder: t('editProfile.items.links.form.titlePlaceholder') || 'Optional',
|
|
92
|
+
value: title,
|
|
93
|
+
onChangeText: value => setTitle(clampLinkTitle(value)),
|
|
94
|
+
maxLength: PROFILE_LINK_TITLE_MAX
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
98
|
+
className: "flex-row justify-between items-center gap-space-8",
|
|
99
|
+
children: [link ? /*#__PURE__*/_jsx(Button, {
|
|
100
|
+
appearance: "plain",
|
|
101
|
+
tone: "danger",
|
|
102
|
+
onPress: remove,
|
|
103
|
+
children: t('editProfile.items.links.form.remove') || 'Remove'
|
|
104
|
+
}) : /*#__PURE__*/_jsx(View, {}), /*#__PURE__*/_jsxs(View, {
|
|
105
|
+
className: "flex-row gap-space-8",
|
|
106
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
107
|
+
appearance: "subtle",
|
|
108
|
+
tone: "neutral",
|
|
109
|
+
onPress: () => surface.dismiss(),
|
|
110
|
+
children: t('common.cancel') || 'Cancel'
|
|
111
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
112
|
+
appearance: "solid",
|
|
113
|
+
tone: "accent",
|
|
114
|
+
onPress: save,
|
|
115
|
+
children: t('common.save') || 'Save'
|
|
116
|
+
})]
|
|
117
|
+
})]
|
|
118
|
+
})]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=ProfileLinkForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useState","View","Button","Card","Field","TextField","TextFieldInput","PROFILE_LINK_TITLE_MAX","useI18n","clampLinkTitle","linkIdentity","normalizeLinkInput","jsx","_jsx","jsxs","_jsxs","ProfileLinkForm","surface","link","existingUrls","t","input","setInput","url","title","setTitle","error","setError","errorMessage","kind","save","normalized","identity","some","result","trim","dismiss","remove","className","children","label","undefined","placeholder","value","onChangeText","autoCapitalize","autoCorrect","keyboardType","isInvalid","autoFocus","maxLength","appearance","tone","onPress"],"sourceRoot":"../../../../src","sources":["ui/screens/ProfileLinkForm.ts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O,CAACmB,OAAO,CAAC,CAAE;UAAAG,QAAA,EACzEnB,CAAC,CAAC,eAAe,CAAC,IAAI;QAAQ,CACzB,CAAC,eACTP,IAAA,CAACX,MAAM;UAACiD,UAAU,EAAC,OAAO;UAACC,IAAI,EAAC,QAAQ;UAACC,OAAO,EAAEvB,IAAK;UAAAS,QAAA,EACpDnB,CAAC,CAAC,aAAa,CAAC,IAAI;QAAM,CACrB,CAAC;MAAA,CACL,CAAC;IAAA,CACH,CAAC;EAAA,CACH,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { Button } from '@oxy.so/bloom/button';
|
|
5
|
+
import { Chip } from '@oxy.so/bloom/chip';
|
|
6
|
+
import { SortableChipRow } from '@oxy.so/bloom/sortable-chip-row';
|
|
7
|
+
import { surfaces } from '@oxy.so/bloom/surfaces';
|
|
8
|
+
import { PROFILE_LINKS_MAX } from '@oxy.so/contracts/client';
|
|
9
|
+
import { useI18n } from "../hooks/useI18n.js";
|
|
10
|
+
import { ProfileLinkForm } from "./ProfileLinkForm.js";
|
|
11
|
+
import { applyLinkFormResult, getLinkTitle } from "./linkFormat.js";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
let linkCounter = 0;
|
|
14
|
+
/** A fresh id for a link added in this editing session. */
|
|
15
|
+
const newLinkId = () => {
|
|
16
|
+
linkCounter += 1;
|
|
17
|
+
return `link-new-${Date.now().toString(36)}-${linkCounter}`;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** The text a link's pill shows: its title, else its address without the scheme. */
|
|
21
|
+
const pillLabel = item => item.title || getLinkTitle(item.url);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The profile's links as pills, in the order they are shown, reordered by
|
|
25
|
+
* dragging. Tapping a pill edits that link; "Add link" appears until the profile
|
|
26
|
+
* holds the maximum. Changes stay local until the profile is saved.
|
|
27
|
+
*/
|
|
28
|
+
export function ProfileLinksEditor({
|
|
29
|
+
items,
|
|
30
|
+
onChange,
|
|
31
|
+
disabled = false
|
|
32
|
+
}) {
|
|
33
|
+
const {
|
|
34
|
+
t
|
|
35
|
+
} = useI18n();
|
|
36
|
+
const openForm = async index => {
|
|
37
|
+
const link = index === null ? undefined : items[index];
|
|
38
|
+
const result = await surfaces.present(surface => /*#__PURE__*/_jsx(ProfileLinkForm, {
|
|
39
|
+
surface: surface,
|
|
40
|
+
link: link,
|
|
41
|
+
existingUrls: items.filter((_, i) => i !== index).map(item => item.url)
|
|
42
|
+
}));
|
|
43
|
+
if (!result) return;
|
|
44
|
+
onChange(applyLinkFormResult(items, index, result, PROFILE_LINKS_MAX, newLinkId));
|
|
45
|
+
};
|
|
46
|
+
const rowItems = items.map((item, index) => ({
|
|
47
|
+
key: item.id,
|
|
48
|
+
label: pillLabel(item),
|
|
49
|
+
node: /*#__PURE__*/_jsx(Chip, {
|
|
50
|
+
size: "md",
|
|
51
|
+
variant: "subtle",
|
|
52
|
+
accessibilityLabel: t('editProfile.items.links.editLink', {
|
|
53
|
+
defaultValue: 'Edit {{label}}',
|
|
54
|
+
label: pillLabel(item)
|
|
55
|
+
}),
|
|
56
|
+
onPress: () => void openForm(index),
|
|
57
|
+
disabled: disabled,
|
|
58
|
+
children: pillLabel(item)
|
|
59
|
+
})
|
|
60
|
+
}));
|
|
61
|
+
return /*#__PURE__*/_jsx(SortableChipRow, {
|
|
62
|
+
items: rowItems,
|
|
63
|
+
disabled: disabled,
|
|
64
|
+
onReorder: keys => {
|
|
65
|
+
const byKey = new Map(items.map(item => [item.id, item]));
|
|
66
|
+
onChange(keys.flatMap(key => byKey.has(key) ? [byKey.get(key)] : []));
|
|
67
|
+
},
|
|
68
|
+
accessibilityLabel: t('editProfile.items.links.title') || 'Links',
|
|
69
|
+
trailing: items.length < PROFILE_LINKS_MAX ? /*#__PURE__*/_jsx(View, {
|
|
70
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
71
|
+
appearance: "outline",
|
|
72
|
+
tone: "neutral",
|
|
73
|
+
size: "sm",
|
|
74
|
+
disabled: disabled,
|
|
75
|
+
onPress: () => void openForm(null),
|
|
76
|
+
children: t('editProfile.items.links.form.add') || 'Add link'
|
|
77
|
+
})
|
|
78
|
+
}) : null
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=ProfileLinksEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","Button","Chip","SortableChipRow","surfaces","PROFILE_LINKS_MAX","useI18n","ProfileLinkForm","applyLinkFormResult","getLinkTitle","jsx","_jsx","linkCounter","newLinkId","Date","now","toString","pillLabel","item","title","url","ProfileLinksEditor","items","onChange","disabled","t","openForm","index","link","undefined","result","present","surface","existingUrls","filter","_","i","map","rowItems","key","id","label","node","size","variant","accessibilityLabel","defaultValue","onPress","children","onReorder","keys","byKey","Map","flatMap","has","get","trailing","length","appearance","tone"],"sourceRoot":"../../../../src","sources":["ui/screens/ProfileLinksEditor.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,cAAc;AACnC,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,eAAe,QAAQ,iCAAiC;AACjE,SAASC,QAAQ,QAAQ,wBAAwB;AACjD,SAASC,iBAAiB,QAAQ,0BAA0B;AAC5D,SAASC,OAAO,QAAQ,qBAAkB;AAC1C,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SACEC,mBAAmB,EACnBC,YAAY,QAGP,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQtB,IAAIC,WAAW,GAAG,CAAC;AACnB;AACA,MAAMC,SAAS,GAAGA,CAAA,KAAc;EAC9BD,WAAW,IAAI,CAAC;EAChB,OAAO,YAAYE,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,IAA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,27 @@ export function clampLinkTitle(title) {
|
|
|
85
85
|
return Array.from(title).slice(0, PROFILE_LINK_TITLE_MAX).join('');
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
/** What the link form hands back when it is dismissed. */
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The list after a link form result. A save appends a new link (if the profile
|
|
92
|
+
* has room) or replaces the link at `index`; a remove drops it. `newId` makes
|
|
93
|
+
* the id of an appended link, so the caller decides how ids are minted.
|
|
94
|
+
*/
|
|
95
|
+
export function applyLinkFormResult(items, index, result, maxLinks, newId) {
|
|
96
|
+
if (result.kind === 'remove') {
|
|
97
|
+
return index === null ? [...items] : items.filter((_, i) => i !== index);
|
|
98
|
+
}
|
|
99
|
+
const title = clampLinkTitle(result.title.trim());
|
|
100
|
+
const saved = {
|
|
101
|
+
id: index === null ? newId() : items[index]?.id ?? newId(),
|
|
102
|
+
url: result.url,
|
|
103
|
+
title,
|
|
104
|
+
description: getLinkDescription(result.url)
|
|
105
|
+
};
|
|
106
|
+
if (index === null) {
|
|
107
|
+
return items.length >= maxLinks ? [...items] : [...items, saved];
|
|
93
108
|
}
|
|
94
|
-
|
|
95
|
-
const [moved] = next.splice(index, 1);
|
|
96
|
-
next.splice(target, 0, moved);
|
|
97
|
-
return next;
|
|
109
|
+
return items.map((item, i) => i === index ? saved : item);
|
|
98
110
|
}
|
|
99
111
|
//# sourceMappingURL=linkFormat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PROFILE_LINK_TITLE_MAX","getLinkTitle","url","replace","getLinkDescription","linksToListItems","links","map","item","i","String","id","title","description","normalizeLinkInput","input","trimmed","trim","error","hasScheme","test","parsed","URL","protocol","hostname","includes","toString","linkIdentity","host","toLowerCase","path","pathname","search","clampLinkTitle","Array","from","slice","join","
|
|
1
|
+
{"version":3,"names":["PROFILE_LINK_TITLE_MAX","getLinkTitle","url","replace","getLinkDescription","linksToListItems","links","map","item","i","String","id","title","description","normalizeLinkInput","input","trimmed","trim","error","hasScheme","test","parsed","URL","protocol","hostname","includes","toString","linkIdentity","host","toLowerCase","path","pathname","search","clampLinkTitle","Array","from","slice","join","applyLinkFormResult","items","index","result","maxLinks","newId","kind","filter","_","saved","length"],"sourceRoot":"../../../../src","sources":["ui/screens/linkFormat.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,SAASA,sBAAsB,QAAQ,0BAA0B;;AAEjE;AACA,OAAO,MAAMC,YAAY,GAAIC,GAAW,IACtCA,GAAG,CAACC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;;AAEpD;AACA,OAAO,MAAMC,kBAAkB,GAAIF,GAAW,IAAa,WAAWA,GAAG,EAAE;AAS3E;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,gBAAgBA,CAACC,KAAyB,EAAkB;EAC1E,OAAOA,KAAK,CAACC,GAAG,CAAC,CAACC,IAAI,EAAEC,CAAC,KAAK;IAC5B,MAAMP,GAAG,GAAGQ,MAAM,CAACF,IAAI,IAAI,EAAE,CAAC;IAC9B,OAAO;MACLG,EAAE,EAAE,QAAQF,CAAC,EAAE;MACfP,GAAG;MACHU,KAAK,EAAEX,YAAY,CAACC,GAAG,CAAC;MACxBW,WAAW,EAAET,kBAAkB,CAACF,GAAG;IACrC,CAAC;EACH,CAAC,CAAC;AACJ;;AAEA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASY,kBAAkBA,CAACC,KAAa,EAA+C;EAC7F,MAAMC,OAAO,GAAGD,KAAK,CAACE,IAAI,CAAC,CAAC;EAC5B,IAAI,CAACD,OAAO,EAAE,OAAO;IAAEE,KAAK,EAAE;EAAQ,CAAC;EAEvC,MAAMC,SAAS,GAAG,0BAA0B,CAACC,IAAI,CAACJ,OAAO,CAAC;EAC1D,IAAIK,MAAW;EACf,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AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CACjCC,KAA8B,EAC9BC,KAAoB,EACpBC,MAAsB,EACtBC,QAAgB,EAChBC,KAAmB,EACH;EAChB,IAAIF,MAAM,CAACG,IAAI,KAAK,QAAQ,EAAE;IAC5B,OAAOJ,KAAK,KAAK,IAAI,GAAG,CAAC,GAAGD,KAAK,CAAC,GAAGA,KAAK,CAACM,MAAM,CAAC,CAACC,CAAC,EAAErC,CAAC,KAAKA,CAAC,KAAK+B,KAAK,CAAC;EAC1E;EACA,MAAM5B,KAAK,GAAGqB,cAAc,CAACQ,MAAM,CAAC7B,KAAK,CAACK,IAAI,CAAC,CAAC,CAAC;EACjD,MAAM8B,KAAmB,GAAG;IAC1BpC,EAAE,EAAE6B,KAAK,KAAK,IAAI,GAAGG,KAAK,CAAC,CAAC,GAAIJ,KAAK,CAACC,KAAK,CAAC,EAAE7B,EAAE,IAAIgC,KAAK,CAAC,CAAE;IAC5DzC,GAAG,EAAEuC,MAAM,CAACvC,GAAG;IACfU,KAAK;IACLC,WAAW,EAAET,kBAAkB,CAACqC,MAAM,CAACvC,GAAG;EAC5C,CAAC;EACD,IAAIsC,KAAK,KAAK,IAAI,EAAE;IAClB,OAAOD,KAAK,CAACS,MAAM,IAAIN,QAAQ,GAAG,CAAC,GAAGH,KAAK,CAAC,GAAG,CAAC,GAAGA,KAAK,EAAEQ,KAAK,CAAC;EAClE;EACA,OAAOR,KAAK,CAAChC,GAAG,CAAC,CAACC,IAAI,EAAEC,CAAC,KAAMA,CAAC,KAAK+B,KAAK,GAAGO,KAAK,GAAGvC,IAAK,CAAC;AAC7D","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** Glyphs are decorative: hidden from assistive technology (see `decorativeIconSet`). */
|
|
2
|
-
declare const Ionicons: import("@expo/vector-icons/build/createIconSet").Icon<"push" | "infinite" | "code" | "business" | "navigate" | "key" | "open" | "add" | "search" | "list" | "settings" | "trash" | "wallet" | "link" | "text" | "scale" | "image" | "alert" | "radio" | "grid" | "warning" | "people" | "ellipse" | "add-circle-outline" | "alert-circle" | "alert-circle-outline" | "apps" | "archive" | "arrow-back" | "arrow-down" | "arrow-forward" | "arrow-undo" | "arrow-up" | "at" | "briefcase-outline" | "bug" | "bulb" | "business-outline" | "calendar" | "calendar-outline" | "camera" | "camera-outline" | "card" | "card-outline" | "cart-outline" | "cash-outline" | "chatbubble" | "checkmark" | "checkmark-circle" | "chevron-back" | "chevron-down" | "chevron-forward" | "chevron-up" | "close" | "close-circle" | "cloud-offline-outline" | "cloud-outline" | "cloud-upload" | "cloud-upload-outline" | "cog" | "cog-outline" | "construct-outline" | "copy-outline" | "cube-outline" | "desktop" | "document" | "document-outline" | "document-text" | "documents" | "download" | "download-outline" | "earth" | "ellipse-outline" | "ellipsis-horizontal" | "eye" | "eye-off-outline" | "filter-outline" | "flame" | "flash" | "folder" | "folder-open-outline" | "folder-outline" | "footsteps" | "gift" | "gift-outline" | "hand-left" | "hardware-chip-outline" | "heart" | "heart-outline" | "help-circle" | "help-circle-outline" | "hourglass-outline" | "image-outline" | "images" | "images-outline" | "information" | "information-circle" | "information-outline" | "leaf" | "library" | "link-outline" | "location" | "location-outline" | "lock-closed" | "log-out-outline" | "mail" | "musical-notes" | "pencil-outline" | "people-outline" | "play" | "pricetag-outline" | "pulse" | "qr-code-outline" | "receipt-outline" | "refresh-outline" | "remove" | "repeat-outline" | "resize" | "rocket" | "school-outline" | "search-outline" | "server" | "share-outline" | "shield" | "shield-checkmark" | "shield-checkmark-outline" | "star" | "swap-horizontal-outline" | "swap-vertical-outline" | "sync" | "time-outline" | "trash-outline" | "trophy" | "trophy-outline" | "videocam" | "volume-off" | "wallet-outline" | "watch" | "wifi", "OxyServicesIonicons">;
|
|
2
|
+
declare const Ionicons: import("@expo/vector-icons/build/createIconSet").Icon<"push" | "infinite" | "code" | "business" | "navigate" | "key" | "open" | "add" | "search" | "list" | "settings" | "trash" | "wallet" | "link" | "text" | "scale" | "image" | "alert" | "radio" | "grid" | "warning" | "people" | "ellipse" | "add-circle-outline" | "alert-circle" | "alert-circle-outline" | "apps" | "archive" | "arrow-back" | "arrow-down" | "arrow-forward" | "arrow-undo" | "arrow-up" | "at" | "briefcase-outline" | "bug" | "bulb" | "business-outline" | "calendar" | "calendar-outline" | "camera" | "camera-outline" | "card" | "card-outline" | "cart-outline" | "cash-outline" | "chatbubble" | "checkmark" | "checkmark-circle" | "chevron-back" | "chevron-down" | "chevron-forward" | "chevron-up" | "close" | "close-circle" | "cloud-offline-outline" | "cloud-outline" | "cloud-upload" | "cloud-upload-outline" | "cog" | "cog-outline" | "construct-outline" | "copy-outline" | "cube-outline" | "desktop" | "document" | "document-outline" | "document-text" | "documents" | "download" | "download-outline" | "earth" | "ellipse-outline" | "ellipsis-horizontal" | "eye" | "eye-off-outline" | "filter-outline" | "flame" | "flash" | "folder" | "folder-open-outline" | "folder-outline" | "footsteps" | "gift" | "gift-outline" | "hand-left" | "hardware-chip-outline" | "heart" | "heart-outline" | "help-circle" | "help-circle-outline" | "hourglass-outline" | "image-outline" | "images" | "images-outline" | "information" | "information-circle" | "information-outline" | "leaf" | "library" | "link-outline" | "location" | "location-outline" | "lock-closed" | "log-out-outline" | "mail" | "musical-notes" | "pencil-outline" | "people-outline" | "play" | "pricetag-outline" | "pulse" | "qr-code-outline" | "receipt-outline" | "refresh-outline" | "remove" | "repeat-outline" | "resize" | "rocket" | "save" | "school-outline" | "search-outline" | "server" | "share-outline" | "shield" | "shield-checkmark" | "shield-checkmark-outline" | "star" | "swap-horizontal-outline" | "swap-vertical-outline" | "sync" | "time-outline" | "trash-outline" | "trophy" | "trophy-outline" | "videocam" | "volume-off" | "wallet-outline" | "watch" | "wifi", "OxyServicesIonicons">;
|
|
3
3
|
export default Ionicons;
|
|
4
4
|
//# sourceMappingURL=Ionicons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ionicons.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/Ionicons.ts"],"names":[],"mappings":"AAKA,yFAAyF;AACzF,QAAA,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Ionicons.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/Ionicons.ts"],"names":[],"mappings":"AAKA,yFAAyF;AACzF,QAAA,MAAM,QAAQ,qqEAGb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subsetGlyphMaps.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/subsetGlyphMaps.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"subsetGlyphMaps.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/subsetGlyphMaps.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6InB,CAAC;AAEX,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoMjC,CAAC"}
|
|
@@ -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,qBAAqB,CAAC;
|
|
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,qBAAqB,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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SurfaceControls } from '@oxy.so/bloom/surfaces';
|
|
2
|
+
import { type LinkListItem } from './linkFormat';
|
|
3
|
+
interface ProfileLinkFormProps {
|
|
4
|
+
/** The presenting surface (from `surfaces.present`); its dismiss result is the form's answer. */
|
|
5
|
+
surface: SurfaceControls;
|
|
6
|
+
/** The link being edited. Absent when adding one. */
|
|
7
|
+
link?: LinkListItem;
|
|
8
|
+
/** The addresses already on the profile, other than this link's own. */
|
|
9
|
+
existingUrls: readonly string[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The form for one profile link: its address and an optional title. Saving
|
|
13
|
+
* dismisses the surface with the link to keep; removing dismisses it with a
|
|
14
|
+
* remove. A blank title is left blank, so the profile shows the address.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ProfileLinkForm({ surface, link, existingUrls }: ProfileLinkFormProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=ProfileLinkForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileLinkForm.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ProfileLinkForm.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,EAML,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAEtB,UAAU,oBAAoB;IAC5B,iGAAiG;IACjG,OAAO,EAAE,eAAe,CAAC;IACzB,qDAAqD;IACrD,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,wEAAwE;IACxE,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,oBAAoB,+BAkGpF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type LinkListItem } from './linkFormat';
|
|
2
|
+
interface ProfileLinksEditorProps {
|
|
3
|
+
items: LinkListItem[];
|
|
4
|
+
onChange: (items: LinkListItem[]) => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The profile's links as pills, in the order they are shown, reordered by
|
|
9
|
+
* dragging. Tapping a pill edits that link; "Add link" appears until the profile
|
|
10
|
+
* holds the maximum. Changes stay local until the profile is saved.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ProfileLinksEditor({ items, onChange, disabled }: ProfileLinksEditorProps): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ProfileLinksEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileLinksEditor.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ProfileLinksEditor.tsx"],"names":[],"mappings":"AAQA,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAEtB,UAAU,uBAAuB;IAC/B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAYD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAgB,EAAE,EAAE,uBAAuB,+BA6DhG"}
|
|
@@ -36,6 +36,18 @@ export declare function normalizeLinkInput(input: string): {
|
|
|
36
36
|
export declare function linkIdentity(url: string): string;
|
|
37
37
|
/** Trim a title to the editor's limit, counting characters rather than UTF-16 units. */
|
|
38
38
|
export declare function clampLinkTitle(title: string): string;
|
|
39
|
-
/**
|
|
40
|
-
export
|
|
39
|
+
/** What the link form hands back when it is dismissed. */
|
|
40
|
+
export type LinkFormResult = {
|
|
41
|
+
kind: 'save';
|
|
42
|
+
url: string;
|
|
43
|
+
title: string;
|
|
44
|
+
} | {
|
|
45
|
+
kind: 'remove';
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* The list after a link form result. A save appends a new link (if the profile
|
|
49
|
+
* has room) or replaces the link at `index`; a remove drops it. `newId` makes
|
|
50
|
+
* the id of an appended link, so the caller decides how ids are minted.
|
|
51
|
+
*/
|
|
52
|
+
export declare function applyLinkFormResult(items: readonly LinkListItem[], index: number | null, result: LinkFormResult, maxLinks: number, newId: () => string): LinkListItem[];
|
|
41
53
|
//# sourceMappingURL=linkFormat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linkFormat.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/linkFormat.ts"],"names":[],"mappings":"AAMA,6EAA6E;AAC7E,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,MACS,CAAC;AAErD,iDAAiD;AACjD,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,KAAG,MAA0B,CAAC;AAE5E,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG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cAAc,CAAA;CAAE,CAgB7F;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAShD;AAED,wFAAwF;AACxF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE/F;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,SAAS,YAAY,EAAE,EAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,MAAM,GAClB,YAAY,EAAE,CAehB"}
|
|
@@ -24,8 +24,10 @@ export declare const loadIdentityCrypto: () => Promise<{
|
|
|
24
24
|
listOrganizationKeys: typeof import("@oxy.so/core/crypto").listOrganizationKeys;
|
|
25
25
|
deleteOrganizationKey: typeof import("@oxy.so/core/crypto").deleteOrganizationKey;
|
|
26
26
|
syncOrganizationKeys: typeof import("@oxy.so/core/crypto").syncOrganizationKeys;
|
|
27
|
+
adoptOrganizationKeyFromRing: typeof import("@oxy.so/core/crypto").adoptOrganizationKeyFromRing;
|
|
27
28
|
isOrganizationAccountId: typeof import("@oxy.so/core/crypto").isOrganizationAccountId;
|
|
28
29
|
isHealthyOrganizationKeyPair: typeof import("@oxy.so/core/crypto").isHealthyOrganizationKeyPair;
|
|
30
|
+
OrganizationKeyIndexUnreadableError: typeof import("@oxy.so/core/crypto").OrganizationKeyIndexUnreadableError;
|
|
29
31
|
KEYCHAIN_ACCESS_GROUPS: {
|
|
30
32
|
readonly identity: "so.oxy.identity";
|
|
31
33
|
readonly wallet: "so.oxy.wallet";
|
|
@@ -57,6 +59,9 @@ export declare const loadIdentityCrypto: () => Promise<{
|
|
|
57
59
|
exportRetiredIdentityKeys: typeof import("@oxy.so/core/crypto").exportRetiredIdentityKeys;
|
|
58
60
|
claimRetiredIdentityKeys: typeof import("@oxy.so/core/crypto").claimRetiredIdentityKeys;
|
|
59
61
|
countQuarantinedRetiredKeys: typeof import("@oxy.so/core/crypto").countQuarantinedRetiredKeys;
|
|
62
|
+
claimRetiredOrganizationKeys: typeof import("@oxy.so/core/crypto").claimRetiredOrganizationKeys;
|
|
63
|
+
listQuarantinedOrganizationKeys: typeof import("@oxy.so/core/crypto").listQuarantinedOrganizationKeys;
|
|
64
|
+
holdsRetiredRing: typeof import("@oxy.so/core/crypto").holdsRetiredRing;
|
|
60
65
|
unmirrorPersonalRetiredKeys: typeof import("@oxy.so/core/crypto").unmirrorPersonalRetiredKeys;
|
|
61
66
|
RetiredKeyRingUnreadableError: typeof import("@oxy.so/core/crypto").RetiredKeyRingUnreadableError;
|
|
62
67
|
SignatureService: typeof import("@oxy.so/core/crypto").SignatureService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identityCrypto.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/identityCrypto.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"identityCrypto.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/identityCrypto.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAsC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** Glyphs are decorative: hidden from assistive technology (see `decorativeIconSet`). */
|
|
2
|
-
declare const Ionicons: import("@expo/vector-icons/build/createIconSet").Icon<"push" | "infinite" | "code" | "business" | "navigate" | "key" | "open" | "add" | "search" | "list" | "settings" | "trash" | "wallet" | "link" | "text" | "scale" | "image" | "alert" | "radio" | "grid" | "warning" | "people" | "ellipse" | "add-circle-outline" | "alert-circle" | "alert-circle-outline" | "apps" | "archive" | "arrow-back" | "arrow-down" | "arrow-forward" | "arrow-undo" | "arrow-up" | "at" | "briefcase-outline" | "bug" | "bulb" | "business-outline" | "calendar" | "calendar-outline" | "camera" | "camera-outline" | "card" | "card-outline" | "cart-outline" | "cash-outline" | "chatbubble" | "checkmark" | "checkmark-circle" | "chevron-back" | "chevron-down" | "chevron-forward" | "chevron-up" | "close" | "close-circle" | "cloud-offline-outline" | "cloud-outline" | "cloud-upload" | "cloud-upload-outline" | "cog" | "cog-outline" | "construct-outline" | "copy-outline" | "cube-outline" | "desktop" | "document" | "document-outline" | "document-text" | "documents" | "download" | "download-outline" | "earth" | "ellipse-outline" | "ellipsis-horizontal" | "eye" | "eye-off-outline" | "filter-outline" | "flame" | "flash" | "folder" | "folder-open-outline" | "folder-outline" | "footsteps" | "gift" | "gift-outline" | "hand-left" | "hardware-chip-outline" | "heart" | "heart-outline" | "help-circle" | "help-circle-outline" | "hourglass-outline" | "image-outline" | "images" | "images-outline" | "information" | "information-circle" | "information-outline" | "leaf" | "library" | "link-outline" | "location" | "location-outline" | "lock-closed" | "log-out-outline" | "mail" | "musical-notes" | "pencil-outline" | "people-outline" | "play" | "pricetag-outline" | "pulse" | "qr-code-outline" | "receipt-outline" | "refresh-outline" | "remove" | "repeat-outline" | "resize" | "rocket" | "school-outline" | "search-outline" | "server" | "share-outline" | "shield" | "shield-checkmark" | "shield-checkmark-outline" | "star" | "swap-horizontal-outline" | "swap-vertical-outline" | "sync" | "time-outline" | "trash-outline" | "trophy" | "trophy-outline" | "videocam" | "volume-off" | "wallet-outline" | "watch" | "wifi", "OxyServicesIonicons">;
|
|
2
|
+
declare const Ionicons: import("@expo/vector-icons/build/createIconSet").Icon<"push" | "infinite" | "code" | "business" | "navigate" | "key" | "open" | "add" | "search" | "list" | "settings" | "trash" | "wallet" | "link" | "text" | "scale" | "image" | "alert" | "radio" | "grid" | "warning" | "people" | "ellipse" | "add-circle-outline" | "alert-circle" | "alert-circle-outline" | "apps" | "archive" | "arrow-back" | "arrow-down" | "arrow-forward" | "arrow-undo" | "arrow-up" | "at" | "briefcase-outline" | "bug" | "bulb" | "business-outline" | "calendar" | "calendar-outline" | "camera" | "camera-outline" | "card" | "card-outline" | "cart-outline" | "cash-outline" | "chatbubble" | "checkmark" | "checkmark-circle" | "chevron-back" | "chevron-down" | "chevron-forward" | "chevron-up" | "close" | "close-circle" | "cloud-offline-outline" | "cloud-outline" | "cloud-upload" | "cloud-upload-outline" | "cog" | "cog-outline" | "construct-outline" | "copy-outline" | "cube-outline" | "desktop" | "document" | "document-outline" | "document-text" | "documents" | "download" | "download-outline" | "earth" | "ellipse-outline" | "ellipsis-horizontal" | "eye" | "eye-off-outline" | "filter-outline" | "flame" | "flash" | "folder" | "folder-open-outline" | "folder-outline" | "footsteps" | "gift" | "gift-outline" | "hand-left" | "hardware-chip-outline" | "heart" | "heart-outline" | "help-circle" | "help-circle-outline" | "hourglass-outline" | "image-outline" | "images" | "images-outline" | "information" | "information-circle" | "information-outline" | "leaf" | "library" | "link-outline" | "location" | "location-outline" | "lock-closed" | "log-out-outline" | "mail" | "musical-notes" | "pencil-outline" | "people-outline" | "play" | "pricetag-outline" | "pulse" | "qr-code-outline" | "receipt-outline" | "refresh-outline" | "remove" | "repeat-outline" | "resize" | "rocket" | "save" | "school-outline" | "search-outline" | "server" | "share-outline" | "shield" | "shield-checkmark" | "shield-checkmark-outline" | "star" | "swap-horizontal-outline" | "swap-vertical-outline" | "sync" | "time-outline" | "trash-outline" | "trophy" | "trophy-outline" | "videocam" | "volume-off" | "wallet-outline" | "watch" | "wifi", "OxyServicesIonicons">;
|
|
3
3
|
export default Ionicons;
|
|
4
4
|
//# sourceMappingURL=Ionicons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ionicons.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/Ionicons.ts"],"names":[],"mappings":"AAKA,yFAAyF;AACzF,QAAA,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Ionicons.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/Ionicons.ts"],"names":[],"mappings":"AAKA,yFAAyF;AACzF,QAAA,MAAM,QAAQ,qqEAGb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subsetGlyphMaps.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/subsetGlyphMaps.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"subsetGlyphMaps.d.ts","sourceRoot":"","sources":["../../../../../src/ui/icons/subsetGlyphMaps.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6InB,CAAC;AAEX,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoMjC,CAAC"}
|
|
@@ -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;
|
|
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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SurfaceControls } from '@oxy.so/bloom/surfaces';
|
|
2
|
+
import { type LinkListItem } from './linkFormat.js';
|
|
3
|
+
interface ProfileLinkFormProps {
|
|
4
|
+
/** The presenting surface (from `surfaces.present`); its dismiss result is the form's answer. */
|
|
5
|
+
surface: SurfaceControls;
|
|
6
|
+
/** The link being edited. Absent when adding one. */
|
|
7
|
+
link?: LinkListItem;
|
|
8
|
+
/** The addresses already on the profile, other than this link's own. */
|
|
9
|
+
existingUrls: readonly string[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The form for one profile link: its address and an optional title. Saving
|
|
13
|
+
* dismisses the surface with the link to keep; removing dismisses it with a
|
|
14
|
+
* remove. A blank title is left blank, so the profile shows the address.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ProfileLinkForm({ surface, link, existingUrls }: ProfileLinkFormProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=ProfileLinkForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileLinkForm.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ProfileLinkForm.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,EAML,KAAK,YAAY,EAClB,MAAM,iBAAc,CAAC;AAEtB,UAAU,oBAAoB;IAC5B,iGAAiG;IACjG,OAAO,EAAE,eAAe,CAAC;IACzB,qDAAqD;IACrD,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,wEAAwE;IACxE,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,oBAAoB,+BAkGpF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type LinkListItem } from './linkFormat.js';
|
|
2
|
+
interface ProfileLinksEditorProps {
|
|
3
|
+
items: LinkListItem[];
|
|
4
|
+
onChange: (items: LinkListItem[]) => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The profile's links as pills, in the order they are shown, reordered by
|
|
9
|
+
* dragging. Tapping a pill edits that link; "Add link" appears until the profile
|
|
10
|
+
* holds the maximum. Changes stay local until the profile is saved.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ProfileLinksEditor({ items, onChange, disabled }: ProfileLinksEditorProps): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ProfileLinksEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileLinksEditor.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ProfileLinksEditor.tsx"],"names":[],"mappings":"AAQA,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,iBAAc,CAAC;AAEtB,UAAU,uBAAuB;IAC/B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAYD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAgB,EAAE,EAAE,uBAAuB,+BA6DhG"}
|
|
@@ -36,6 +36,18 @@ export declare function normalizeLinkInput(input: string): {
|
|
|
36
36
|
export declare function linkIdentity(url: string): string;
|
|
37
37
|
/** Trim a title to the editor's limit, counting characters rather than UTF-16 units. */
|
|
38
38
|
export declare function clampLinkTitle(title: string): string;
|
|
39
|
-
/**
|
|
40
|
-
export
|
|
39
|
+
/** What the link form hands back when it is dismissed. */
|
|
40
|
+
export type LinkFormResult = {
|
|
41
|
+
kind: 'save';
|
|
42
|
+
url: string;
|
|
43
|
+
title: string;
|
|
44
|
+
} | {
|
|
45
|
+
kind: 'remove';
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* The list after a link form result. A save appends a new link (if the profile
|
|
49
|
+
* has room) or replaces the link at `index`; a remove drops it. `newId` makes
|
|
50
|
+
* the id of an appended link, so the caller decides how ids are minted.
|
|
51
|
+
*/
|
|
52
|
+
export declare function applyLinkFormResult(items: readonly LinkListItem[], index: number | null, result: LinkFormResult, maxLinks: number, newId: () => string): LinkListItem[];
|
|
41
53
|
//# sourceMappingURL=linkFormat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linkFormat.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/linkFormat.ts"],"names":[],"mappings":"AAMA,6EAA6E;AAC7E,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,MACS,CAAC;AAErD,iDAAiD;AACjD,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,KAAG,MAA0B,CAAC;AAE5E,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,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,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,cAAc,CAAA;CAAE,CAgB7F;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAShD;AAED,wFAAwF;AACxF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE/F;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,SAAS,YAAY,EAAE,EAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,MAAM,GAClB,YAAY,EAAE,CAehB"}
|
|
@@ -24,8 +24,10 @@ export declare const loadIdentityCrypto: () => Promise<{
|
|
|
24
24
|
listOrganizationKeys: typeof import("@oxy.so/core/crypto").listOrganizationKeys;
|
|
25
25
|
deleteOrganizationKey: typeof import("@oxy.so/core/crypto").deleteOrganizationKey;
|
|
26
26
|
syncOrganizationKeys: typeof import("@oxy.so/core/crypto").syncOrganizationKeys;
|
|
27
|
+
adoptOrganizationKeyFromRing: typeof import("@oxy.so/core/crypto").adoptOrganizationKeyFromRing;
|
|
27
28
|
isOrganizationAccountId: typeof import("@oxy.so/core/crypto").isOrganizationAccountId;
|
|
28
29
|
isHealthyOrganizationKeyPair: typeof import("@oxy.so/core/crypto").isHealthyOrganizationKeyPair;
|
|
30
|
+
OrganizationKeyIndexUnreadableError: typeof import("@oxy.so/core/crypto").OrganizationKeyIndexUnreadableError;
|
|
29
31
|
KEYCHAIN_ACCESS_GROUPS: {
|
|
30
32
|
readonly identity: "so.oxy.identity";
|
|
31
33
|
readonly wallet: "so.oxy.wallet";
|
|
@@ -57,6 +59,9 @@ export declare const loadIdentityCrypto: () => Promise<{
|
|
|
57
59
|
exportRetiredIdentityKeys: typeof import("@oxy.so/core/crypto").exportRetiredIdentityKeys;
|
|
58
60
|
claimRetiredIdentityKeys: typeof import("@oxy.so/core/crypto").claimRetiredIdentityKeys;
|
|
59
61
|
countQuarantinedRetiredKeys: typeof import("@oxy.so/core/crypto").countQuarantinedRetiredKeys;
|
|
62
|
+
claimRetiredOrganizationKeys: typeof import("@oxy.so/core/crypto").claimRetiredOrganizationKeys;
|
|
63
|
+
listQuarantinedOrganizationKeys: typeof import("@oxy.so/core/crypto").listQuarantinedOrganizationKeys;
|
|
64
|
+
holdsRetiredRing: typeof import("@oxy.so/core/crypto").holdsRetiredRing;
|
|
60
65
|
unmirrorPersonalRetiredKeys: typeof import("@oxy.so/core/crypto").unmirrorPersonalRetiredKeys;
|
|
61
66
|
RetiredKeyRingUnreadableError: typeof import("@oxy.so/core/crypto").RetiredKeyRingUnreadableError;
|
|
62
67
|
SignatureService: typeof import("@oxy.so/core/crypto").SignatureService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identityCrypto.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/identityCrypto.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"identityCrypto.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/identityCrypto.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAsC,CAAC"}
|