@oxy.so/services 12.5.0 → 12.6.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/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/client.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +27 -14
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/FollowTargetButton.js +39 -51
- package/lib/commonjs/ui/components/FollowTargetButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyConsentScreen.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/types.js.map +1 -1
- package/lib/commonjs/ui/components/followButtonAccessibility.js +24 -7
- package/lib/commonjs/ui/components/followButtonAccessibility.js.map +1 -1
- package/lib/commonjs/ui/components/followLabels.js +38 -0
- package/lib/commonjs/ui/components/followLabels.js.map +1 -0
- package/lib/commonjs/ui/components/followRules.js +29 -13
- package/lib/commonjs/ui/components/followRules.js.map +1 -1
- package/lib/commonjs/ui/hooks/useI18n.js +2 -0
- package/lib/commonjs/ui/hooks/useI18n.js.map +1 -1
- package/lib/commonjs/ui/utils/deviceSessionTitle.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/client.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +28 -15
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/FollowTargetButton.js +39 -51
- package/lib/module/ui/components/FollowTargetButton.js.map +1 -1
- package/lib/module/ui/components/OxyConsentScreen.js.map +1 -1
- package/lib/module/ui/components/authChooser/types.js.map +1 -1
- package/lib/module/ui/components/followButtonAccessibility.js +24 -7
- package/lib/module/ui/components/followButtonAccessibility.js.map +1 -1
- package/lib/module/ui/components/followLabels.js +35 -0
- package/lib/module/ui/components/followLabels.js.map +1 -0
- package/lib/module/ui/components/followRules.js +30 -13
- package/lib/module/ui/components/followRules.js.map +1 -1
- package/lib/module/ui/hooks/useI18n.js +2 -0
- package/lib/module/ui/hooks/useI18n.js.map +1 -1
- package/lib/module/ui/utils/deviceSessionTitle.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/client.d.ts +3 -1
- package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/FollowButton.d.ts +13 -0
- package/lib/typescript/commonjs/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/FollowTargetButton.d.ts +6 -18
- package/lib/typescript/commonjs/ui/components/FollowTargetButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyConsentScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +1 -2
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/followButtonAccessibility.d.ts +12 -2
- package/lib/typescript/commonjs/ui/components/followButtonAccessibility.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/followLabels.d.ts +28 -0
- package/lib/typescript/commonjs/ui/components/followLabels.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/followRules.d.ts +20 -9
- package/lib/typescript/commonjs/ui/components/followRules.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useI18n.d.ts +3 -1
- package/lib/typescript/commonjs/ui/hooks/useI18n.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/deviceSessionTitle.d.ts +1 -2
- package/lib/typescript/commonjs/ui/utils/deviceSessionTitle.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +3 -1
- package/lib/typescript/module/ui/client.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FollowButton.d.ts +13 -0
- package/lib/typescript/module/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FollowTargetButton.d.ts +6 -18
- package/lib/typescript/module/ui/components/FollowTargetButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyConsentScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/types.d.ts +1 -2
- package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/followButtonAccessibility.d.ts +12 -2
- package/lib/typescript/module/ui/components/followButtonAccessibility.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/followLabels.d.ts +28 -0
- package/lib/typescript/module/ui/components/followLabels.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/followRules.d.ts +20 -9
- package/lib/typescript/module/ui/components/followRules.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useI18n.d.ts +3 -1
- package/lib/typescript/module/ui/hooks/useI18n.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/deviceSessionTitle.d.ts +1 -2
- package/lib/typescript/module/ui/utils/deviceSessionTitle.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +2 -5
- package/src/ui/client.ts +7 -5
- package/src/ui/components/FollowButton.tsx +53 -23
- package/src/ui/components/FollowTargetButton.tsx +39 -52
- package/src/ui/components/OxyConsentScreen.tsx +1 -3
- package/src/ui/components/__tests__/followButtonAccessibility.test.tsx +32 -6
- package/src/ui/components/__tests__/followTargetButton.test.ts +7 -1
- package/src/ui/components/authChooser/types.ts +1 -2
- package/src/ui/components/followButtonAccessibility.ts +38 -25
- package/src/ui/components/followLabels.ts +48 -0
- package/src/ui/components/followRules.ts +29 -13
- package/src/ui/hooks/useI18n.ts +5 -3
- package/src/ui/utils/deviceSessionTitle.ts +1 -2
|
@@ -19,8 +19,10 @@ export type { OxyAuthPromptProps } from './components/OxyAuthPrompt';
|
|
|
19
19
|
export { LogoIcon } from './components/logo/LogoIcon';
|
|
20
20
|
export { LogoText } from './components/logo/LogoText';
|
|
21
21
|
export { default as FollowButton } from './components/FollowButton';
|
|
22
|
+
export type { FollowButtonProps, SingleFollowButtonProps, MultiFollowButtonProps, } from './components/FollowButton';
|
|
22
23
|
export { FollowTargetButton } from './components/FollowTargetButton';
|
|
23
|
-
export type { FollowTargetButtonProps
|
|
24
|
+
export type { FollowTargetButtonProps } from './components/FollowTargetButton';
|
|
25
|
+
export type { FollowVerb, FollowLabels } from './components/followLabels';
|
|
24
26
|
export { default as ProfileButton } from './components/ProfileButton';
|
|
25
27
|
export type { ProfileButtonProps } from './components/ProfileButton';
|
|
26
28
|
export { default as PeableButton } from './components/PeableButton';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/ui/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,qBAAqB,CAAC;AAG7B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,YAAY,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/ui/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,qBAAqB,CAAC;AAG7B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OA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C;AAClC,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/E,OAAO,EACL,SAAS,EACT,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { ViewStyle, TextStyle, StyleProp } from 'react-native';
|
|
3
3
|
import type { BulkFollowResult, BulkUnfollowResult } from '@oxy.so/core';
|
|
4
|
+
import { type FollowLabels, type FollowVerb } from './followLabels';
|
|
4
5
|
/** Props shared by both single- and multi-user follow modes. */
|
|
5
6
|
interface FollowButtonBaseProps {
|
|
6
7
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -22,13 +23,25 @@ export interface SingleFollowButtonProps extends FollowButtonBaseProps {
|
|
|
22
23
|
* still follows the state.
|
|
23
24
|
*/
|
|
24
25
|
username?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The word for following this account: a fediverse community reads
|
|
28
|
+
* "Join"/"Joined". Translated, like every default label here.
|
|
29
|
+
*/
|
|
30
|
+
verb?: FollowVerb;
|
|
31
|
+
/**
|
|
32
|
+
* Overrides for a verb the vocabulary does not carry. This button shows
|
|
33
|
+
* `idle` and `active`; a user follow has no pending or switched-off state.
|
|
34
|
+
*/
|
|
35
|
+
labels?: Partial<FollowLabels>;
|
|
25
36
|
userIds?: never;
|
|
26
37
|
}
|
|
27
38
|
/** Multi-user mode — follows MANY users in one "Follow all" action (follow-only). */
|
|
28
39
|
export interface MultiFollowButtonProps extends FollowButtonBaseProps {
|
|
29
40
|
userIds: string[];
|
|
30
41
|
initiallyAllFollowing?: boolean;
|
|
42
|
+
/** Default: "Follow all", translated. */
|
|
31
43
|
followAllLabel?: string;
|
|
44
|
+
/** Default: "Following", translated. */
|
|
32
45
|
followedAllLabel?: string;
|
|
33
46
|
onBulkFollow?: (result: BulkFollowResult) => void;
|
|
34
47
|
onBulkUnfollow?: (result: BulkUnfollowResult) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/FollowButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMpE,OAAO,KAAK,EAAe,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"FollowButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/FollowButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMpE,OAAO,KAAK,EAAe,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAItF,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAErF,gEAAgE;AAChE,UAAU,qBAAqB;IAC7B,IAAI,CAAC,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,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAsC7C,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,eAAe,YAAY,CAAC"}
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
* small vocabulary of defaults and a full override, rather than a lookup keyed
|
|
23
23
|
* on kind — a kind→verb table in this package would need a release every time
|
|
24
24
|
* an application invents a kind, which is exactly the coupling #809 removes.
|
|
25
|
+
* The vocabulary and its translated words live in `followLabels`, shared with
|
|
26
|
+
* `FollowButton`.
|
|
25
27
|
*
|
|
26
28
|
* ## Relationship to the legacy `FollowButton`
|
|
27
29
|
*
|
|
@@ -33,27 +35,12 @@
|
|
|
33
35
|
import type { FollowStatus } from '@oxy.so/contracts';
|
|
34
36
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
35
37
|
import { type FollowDuration } from './followRules';
|
|
36
|
-
|
|
37
|
-
* The small vocabulary of verbs the ecosystem actually uses. An application
|
|
38
|
-
* whose verb is not here passes `labels` instead — the escape hatch exists so
|
|
39
|
-
* this union never has to grow to accommodate one product's wording.
|
|
40
|
-
*/
|
|
41
|
-
export type FollowVerb = 'follow' | 'subscribe' | 'join' | 'watch';
|
|
42
|
-
export interface FollowLabels {
|
|
43
|
-
/** Not following yet. */
|
|
44
|
-
idle: string;
|
|
45
|
-
/** Following, and this application acts on it. */
|
|
46
|
-
active: string;
|
|
47
|
-
/** Asked, waiting for the other side to accept. */
|
|
48
|
-
pending: string;
|
|
49
|
-
/** Following globally, but switched off in this application. */
|
|
50
|
-
disabled: string;
|
|
51
|
-
}
|
|
38
|
+
import { type FollowLabels, type FollowVerb } from './followLabels';
|
|
52
39
|
export interface FollowTargetButtonProps {
|
|
53
40
|
/** The registered target's id. Registration is separate — see the SDK. */
|
|
54
41
|
targetId: string;
|
|
55
42
|
verb?: FollowVerb;
|
|
56
|
-
/** Full override, for a verb the vocabulary
|
|
43
|
+
/** Full override, for a verb the vocabulary does not carry. */
|
|
57
44
|
labels?: Partial<FollowLabels>;
|
|
58
45
|
size?: 'sm' | 'md' | 'lg';
|
|
59
46
|
style?: StyleProp<ViewStyle>;
|
|
@@ -65,7 +52,8 @@ export interface FollowTargetButtonProps {
|
|
|
65
52
|
showOptions?: boolean;
|
|
66
53
|
/**
|
|
67
54
|
* Offer timed follows. Pass `false` where a temporary follow makes no sense —
|
|
68
|
-
* a store you buy from, an account you know.
|
|
55
|
+
* a store you buy from, an account you know. Default: 24 hours, 72 hours and
|
|
56
|
+
* a week, translated.
|
|
69
57
|
*/
|
|
70
58
|
durations?: FollowDuration[] | false;
|
|
71
59
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowTargetButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/FollowTargetButton.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"FollowTargetButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/FollowTargetButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAkBzD,OAAO,EAIL,KAAK,cAAc,EAEpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAiBrF,MAAM,WAAW,uBAAuB;IACtC,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IACrC;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAED,eAAO,MAAM,kBAAkB,+DAsM7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyConsentScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyConsentScreen.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAQ7D,oFAAoF;AACpF,MAAM,WAAW,qBAAqB;IACpC,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,kFAAkF;AAClF,MAAM,WAAW,cAAc;IAC7B,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,4DAA4D;IAC5D,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;IACZ,6DAA6D;IAC7D,YAAY,EAAE,mBAAmB,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,qBAAqB;IACpC,2CAA2C;IAC3C,WAAW,EAAE,qBAAqB,CAAC;IACnC,wEAAwE;IACxE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,wEAAwE;IACxE,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,kDAAkD;IAClD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,iFAAiF;IACjF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"OxyConsentScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyConsentScreen.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAQ7D,oFAAoF;AACpF,MAAM,WAAW,qBAAqB;IACpC,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IA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,IAAY,EACZ,aAAqB,EACrB,KAAY,GACb,EAAE,qBAAqB,+BAmRvB;AAgKD,eAAe,gBAAgB,CAAC"}
|
|
@@ -9,9 +9,8 @@
|
|
|
9
9
|
import type { AccountStorageUsageResponse } from '@oxy.so/core';
|
|
10
10
|
import { type useTheme } from '@oxy.so/bloom/theme';
|
|
11
11
|
import type { AccountDialogMenuSection } from '../../navigation/accountDialogManager';
|
|
12
|
-
import type { useI18n } from '../../hooks/useI18n';
|
|
13
12
|
export type Theme = ReturnType<typeof useTheme>;
|
|
14
|
-
export type Translate
|
|
13
|
+
export type { Translate } from '../../hooks/useI18n';
|
|
15
14
|
/**
|
|
16
15
|
* One SUBORDINATE action on a sign-in surface — an alternative revealed behind
|
|
17
16
|
* "Having trouble?", or a non-competing link under the primary.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/authChooser/types.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/authChooser/types.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEtF,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChD,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;;GASG;AACH,MAAM,W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AAC;IAC5B,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,SAAS,wBAAwB,EAAE,CAAC;CAC/C;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,uEAAuE;IACvE,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,uEAAuE;IACvE,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,wCAAwC;IACxC,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAgB/E"}
|
|
@@ -8,9 +8,14 @@
|
|
|
8
8
|
* (OxyHQ/oxy#1375 item 22). The name now says the state, and who it is for
|
|
9
9
|
* when the caller knows the handle.
|
|
10
10
|
*
|
|
11
|
+
* The words follow the button's verb ("Joined @fediverse", hinted "Leaves
|
|
12
|
+
* @fediverse") and its language: every string is `@oxy.so/core`'s `follow.*`.
|
|
13
|
+
*
|
|
11
14
|
* Pure, and kept apart from the components, so every state is pinned by a
|
|
12
15
|
* table test rather than by a render that can only see one state at a time.
|
|
13
16
|
*/
|
|
17
|
+
import type { Translate } from '../hooks/useI18n';
|
|
18
|
+
import type { FollowLabels, FollowVerb } from './followLabels';
|
|
14
19
|
export interface FollowButtonAccessibility {
|
|
15
20
|
accessibilityLabel: string;
|
|
16
21
|
accessibilityHint?: string;
|
|
@@ -27,13 +32,18 @@ export declare function formatHandle(username: string | undefined): string | und
|
|
|
27
32
|
* because a press does nothing until the write settles.
|
|
28
33
|
* - Following: "Following @nate", hinted "Unfollows @nate", because pressing
|
|
29
34
|
* it unfollows, which the visible "Following" does not say.
|
|
35
|
+
*
|
|
36
|
+
* The name is the visible label (the caller's, when it passed `labels`) beside
|
|
37
|
+
* the handle; the checking line and the hint are the verb's.
|
|
30
38
|
*/
|
|
31
39
|
export declare function describeFollowButton(input: {
|
|
32
40
|
isKnown: boolean;
|
|
33
41
|
isFollowing: boolean;
|
|
34
42
|
isPending: boolean;
|
|
35
43
|
username?: string;
|
|
36
|
-
|
|
44
|
+
verb: FollowVerb;
|
|
45
|
+
labels: Pick<FollowLabels, 'idle' | 'active'>;
|
|
46
|
+
}, t: Translate): FollowButtonAccessibility;
|
|
37
47
|
/**
|
|
38
48
|
* The "Follow all" button. The labels are the caller's, since a starter pack
|
|
39
49
|
* and a feed's member list word it differently; the hint carries the count.
|
|
@@ -44,5 +54,5 @@ export declare function describeFollowAllButton(input: {
|
|
|
44
54
|
count: number;
|
|
45
55
|
followAllLabel: string;
|
|
46
56
|
followedAllLabel: string;
|
|
47
|
-
}): FollowButtonAccessibility;
|
|
57
|
+
}, t: Translate): FollowButtonAccessibility;
|
|
48
58
|
//# sourceMappingURL=followButtonAccessibility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followButtonAccessibility.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/followButtonAccessibility.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"followButtonAccessibility.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/followButtonAccessibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE/D,MAAM,WAAW,yBAAyB;IACxC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG7E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE;IACL,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,QAAQ,CAAC,CAAC;CAC/C,EACD,CAAC,EAAE,SAAS,GACX,yBAAyB,CAqB3B;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE;IACL,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,EACD,CAAC,EAAE,SAAS,GACX,yBAAyB,CAQ3B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The words on a follow button, for every verb the ecosystem uses.
|
|
3
|
+
*
|
|
4
|
+
* "Follow" is wrong for half the things an Oxy user can follow: you subscribe
|
|
5
|
+
* to a channel, you join a community, you watch a listing. Both follow buttons
|
|
6
|
+
* read their words here, translated through `@oxy.so/core`'s `follow.*`
|
|
7
|
+
* strings, so a verb reads the same — and in the same language — wherever it is
|
|
8
|
+
* drawn.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The small vocabulary of verbs the ecosystem actually uses. An application
|
|
12
|
+
* whose verb is not here passes `labels` instead — the escape hatch exists so
|
|
13
|
+
* this union never has to grow to accommodate one product's wording.
|
|
14
|
+
*/
|
|
15
|
+
export type FollowVerb = 'follow' | 'subscribe' | 'join' | 'watch';
|
|
16
|
+
export interface FollowLabels {
|
|
17
|
+
/** Not following yet. */
|
|
18
|
+
idle: string;
|
|
19
|
+
/** Following, and this application acts on it. */
|
|
20
|
+
active: string;
|
|
21
|
+
/** Asked, waiting for the other side to accept. */
|
|
22
|
+
pending: string;
|
|
23
|
+
/** Following globally, but switched off in this application. */
|
|
24
|
+
disabled: string;
|
|
25
|
+
}
|
|
26
|
+
/** The labels for `verb` in the current language, with the caller's `overrides` on top. */
|
|
27
|
+
export declare function useFollowLabels(verb?: FollowVerb, overrides?: Partial<FollowLabels>): FollowLabels;
|
|
28
|
+
//# sourceMappingURL=followLabels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"followLabels.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/followLabels.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnE,MAAM,WAAW,YAAY;IAC3B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,2FAA2F;AAC3F,wBAAgB,eAAe,CAC7B,IAAI,GAAE,UAAqB,EAC3B,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,YAAY,CAYd"}
|
|
@@ -5,10 +5,16 @@
|
|
|
5
5
|
* application drawing its own affordance (a chip grid, a compact row) imports
|
|
6
6
|
* them from here — through `@oxy.so/services/ui/client` — without paying for the
|
|
7
7
|
* button's dropdown menu.
|
|
8
|
+
*
|
|
9
|
+
* The menu's words are `@oxy.so/core`'s `follow.*` strings, read through the
|
|
10
|
+
* caller's `t`; without one they are English.
|
|
8
11
|
*/
|
|
9
12
|
import type { FollowApplicationMode } from '@oxy.so/contracts';
|
|
13
|
+
import type { Translate } from '../hooks/useI18n';
|
|
14
|
+
import type { FollowVerb } from './followLabels';
|
|
10
15
|
/** A timed-follow choice offered in the menu. */
|
|
11
16
|
export interface FollowDuration {
|
|
17
|
+
/** The duration as it reads inside a sentence: "24 hours", "a week". */
|
|
12
18
|
label: string;
|
|
13
19
|
seconds: number;
|
|
14
20
|
}
|
|
@@ -39,15 +45,6 @@ export interface FollowMenuItem {
|
|
|
39
45
|
type: 'unfollow';
|
|
40
46
|
};
|
|
41
47
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Which choices exist, given the state.
|
|
44
|
-
*
|
|
45
|
-
* Pure and exported because this is the product decision, not a rendering
|
|
46
|
-
* detail: a timed follow is only offered before following, turning it off here
|
|
47
|
-
* is only offered while following, and NEITHER is offered before the server has
|
|
48
|
-
* answered — every one of them addresses a relationship that does not exist
|
|
49
|
-
* yet, so offering them mid-write would mean sending a guessed id.
|
|
50
|
-
*/
|
|
51
48
|
/**
|
|
52
49
|
* What the main button should do for the current state.
|
|
53
50
|
*
|
|
@@ -59,13 +56,27 @@ export declare function resolveFollowPrimaryAction(input: {
|
|
|
59
56
|
isFollowing: boolean;
|
|
60
57
|
applicationMode: FollowApplicationMode;
|
|
61
58
|
}): 'follow' | 'unfollow' | 'enable-here';
|
|
59
|
+
/**
|
|
60
|
+
* Which choices exist, given the state.
|
|
61
|
+
*
|
|
62
|
+
* Pure and exported because this is the product decision, not a rendering
|
|
63
|
+
* detail: a timed follow is only offered before following, turning it off here
|
|
64
|
+
* is only offered while following, and NEITHER is offered before the server has
|
|
65
|
+
* answered — every one of them addresses a relationship that does not exist
|
|
66
|
+
* yet, so offering them mid-write would mean sending a guessed id.
|
|
67
|
+
*/
|
|
62
68
|
export declare function buildFollowMenuItems(input: {
|
|
63
69
|
following: boolean;
|
|
64
70
|
applicationMode: FollowApplicationMode;
|
|
65
71
|
hasRelationship: boolean;
|
|
66
72
|
isPending: boolean;
|
|
67
73
|
durations: FollowDuration[] | false;
|
|
74
|
+
/** The button's idle label, which a timed choice starts with: "Follow for 24 hours". */
|
|
68
75
|
idleVerb: string;
|
|
69
76
|
applicationName: string;
|
|
77
|
+
/** Words the "everywhere" line with this verb: "Leave everywhere". Default `follow`. */
|
|
78
|
+
verb?: FollowVerb;
|
|
79
|
+
/** `useI18n().t`, for the menu in the app's language. Default English. */
|
|
80
|
+
t?: Translate;
|
|
70
81
|
}): FollowMenuItem[];
|
|
71
82
|
//# sourceMappingURL=followRules.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followRules.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/followRules.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"followRules.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/followRules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,iDAAiD;AACjD,MAAM,WAAW,cAAc;IAC7B,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAKD;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAC9C,QAAQ,GAAG,cAAc,GAAG,aAAa,GAAG,cAAc,GAAG,UAAU,EACvE,OAAO,CAUR,CAAC;AAEF,uCAAuC;AACvC,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,MAAM,EACF;QAAE,IAAI,EAAE,cAAc,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,GAChE;QAAE,IAAI,EAAE,aAAa,CAAA;KAAE,GACvB;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,GACxB;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,qBAAqB,CAAC;CACxC,GAAG,QAAQ,GAAG,UAAU,GAAG,aAAa,CAIxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,qBAAqB,CAAC;IACvC,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IACpC,wFAAwF;IACxF,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,0EAA0E;IAC1E,CAAC,CAAC,EAAE,SAAS,CAAC;CACf,GAAG,cAAc,EAAE,CAwCnB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** `useI18n().t`: a key and its `{{placeholders}}` in, the current language's text out. */
|
|
2
|
+
export type Translate = (key: string, vars?: Record<string, string | number>) => string;
|
|
1
3
|
/**
|
|
2
4
|
* Display copy for SDK surfaces.
|
|
3
5
|
*
|
|
@@ -12,7 +14,7 @@
|
|
|
12
14
|
* Anything that reads or mutates session state uses `useOxy()`, which throws.
|
|
13
15
|
*/
|
|
14
16
|
export declare function useI18n(): {
|
|
15
|
-
t:
|
|
17
|
+
t: Translate;
|
|
16
18
|
locale: string;
|
|
17
19
|
};
|
|
18
20
|
//# sourceMappingURL=useI18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useI18n.ts"],"names":[],"mappings":"AAWA
|
|
1
|
+
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useI18n.ts"],"names":[],"mappings":"AAWA,2FAA2F;AAC3F,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;AAExF;;;;;;;;;;;;GAYG;AACH,wBAAgB,OAAO;;;EActB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DeviceLinkedSession } from '@oxy.so/core';
|
|
2
|
-
type Translate
|
|
2
|
+
import type { Translate } from '../hooks/useI18n';
|
|
3
3
|
/**
|
|
4
4
|
* The title of one row in "Sessions & devices".
|
|
5
5
|
*
|
|
@@ -14,5 +14,4 @@ type Translate = (key: string, vars?: Record<string, string | number>) => string
|
|
|
14
14
|
* response does carry. Never the string "undefined".
|
|
15
15
|
*/
|
|
16
16
|
export declare function deviceSessionTitle(session: Pick<DeviceLinkedSession, 'deviceName' | 'isCurrent' | 'user'>, t: Translate): string;
|
|
17
|
-
export {};
|
|
18
17
|
//# sourceMappingURL=deviceSessionTitle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceSessionTitle.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/deviceSessionTitle.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"deviceSessionTitle.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/deviceSessionTitle.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,YAAY,GAAG,WAAW,GAAG,MAAM,CAAC,EACvE,CAAC,EAAE,SAAS,GACX,MAAM,CAQR"}
|
|
@@ -85,7 +85,8 @@ export type { FollowButtonProps, SingleFollowButtonProps, MultiFollowButtonProps
|
|
|
85
85
|
export { FollowTargetButton } from './ui/components/FollowTargetButton.js';
|
|
86
86
|
export { buildFollowMenuItems, resolveFollowPrimaryAction, FOLLOW_ACTION_LEAVES_ACTIVE, } from './ui/components/followRules.js';
|
|
87
87
|
export type { FollowDuration, FollowMenuItem } from './ui/components/followRules.js';
|
|
88
|
-
export type { FollowTargetButtonProps
|
|
88
|
+
export type { FollowTargetButtonProps } from './ui/components/FollowTargetButton.js';
|
|
89
|
+
export type { FollowVerb, FollowLabels } from './ui/components/followLabels.js';
|
|
89
90
|
export { useFollowTarget } from './ui/hooks/useFollowTarget.js';
|
|
90
91
|
export type { UseFollowTargetResult } from './ui/hooks/useFollowTarget.js';
|
|
91
92
|
export { useFollowTargetStore, UNKNOWN_FOLLOW_STATUS, isFollowedGlobally, withApplicationMode, isCompleteFollowStatus, followRecordToStatus, followRecordsToStatusMap, } from './ui/stores/followTargetStore.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH,OAAO,uBAAoB,CAAC;AAU5B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gCAA6B,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAAyB,CAAC;AAIjD,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,4BAAyB,CAAC;AAKlF,OAAO,EACL,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,uBAAc,CAAC;AACtB,YAAY,EACV,aAAa,EACb,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,GACf,MAAM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,CAAC;AAE1F,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAAyC,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAA+B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA4B,CAAC"}
|
|
@@ -19,8 +19,10 @@ export type { OxyAuthPromptProps } from './components/OxyAuthPrompt.js';
|
|
|
19
19
|
export { LogoIcon } from './components/logo/LogoIcon.js';
|
|
20
20
|
export { LogoText } from './components/logo/LogoText.js';
|
|
21
21
|
export { default as FollowButton } from './components/FollowButton.js';
|
|
22
|
+
export type { FollowButtonProps, SingleFollowButtonProps, MultiFollowButtonProps, } from './components/FollowButton.js';
|
|
22
23
|
export { FollowTargetButton } from './components/FollowTargetButton.js';
|
|
23
|
-
export type { FollowTargetButtonProps
|
|
24
|
+
export type { FollowTargetButtonProps } from './components/FollowTargetButton.js';
|
|
25
|
+
export type { FollowVerb, FollowLabels } from './components/followLabels.js';
|
|
24
26
|
export { default as ProfileButton } from './components/ProfileButton.js';
|
|
25
27
|
export type { ProfileButtonProps } from './components/ProfileButton.js';
|
|
26
28
|
export { default as PeableButton } from './components/PeableButton.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/ui/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,wBAAqB,CAAC;AAG7B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,iCAA8B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,+BAA4B,CAAC;AACtE,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA4B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA4B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA4B,CAAC;AACtD,OA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,EAAE,MAAM,8BAA2B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAAyB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA4B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAAyB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAsC,CAAC;AAC/E,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAM9E,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,6BAA0B,CAAC;AAClC,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,6BAA0B,CAAC;AAG/E,OAAO,EACL,SAAS,EACT,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,8BAA2B,CAAC;AACnC,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,8BAA2B,CAAC;AACnC,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,8BAA2B,CAAC;AAGnC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAoB,CAAC;AAGlD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,0BAAuB,CAAC;AAC/B,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAAuB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { ViewStyle, TextStyle, StyleProp } from 'react-native';
|
|
3
3
|
import type { BulkFollowResult, BulkUnfollowResult } from '@oxy.so/core';
|
|
4
|
+
import { type FollowLabels, type FollowVerb } from './followLabels.js';
|
|
4
5
|
/** Props shared by both single- and multi-user follow modes. */
|
|
5
6
|
interface FollowButtonBaseProps {
|
|
6
7
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -22,13 +23,25 @@ export interface SingleFollowButtonProps extends FollowButtonBaseProps {
|
|
|
22
23
|
* still follows the state.
|
|
23
24
|
*/
|
|
24
25
|
username?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The word for following this account: a fediverse community reads
|
|
28
|
+
* "Join"/"Joined". Translated, like every default label here.
|
|
29
|
+
*/
|
|
30
|
+
verb?: FollowVerb;
|
|
31
|
+
/**
|
|
32
|
+
* Overrides for a verb the vocabulary does not carry. This button shows
|
|
33
|
+
* `idle` and `active`; a user follow has no pending or switched-off state.
|
|
34
|
+
*/
|
|
35
|
+
labels?: Partial<FollowLabels>;
|
|
25
36
|
userIds?: never;
|
|
26
37
|
}
|
|
27
38
|
/** Multi-user mode — follows MANY users in one "Follow all" action (follow-only). */
|
|
28
39
|
export interface MultiFollowButtonProps extends FollowButtonBaseProps {
|
|
29
40
|
userIds: string[];
|
|
30
41
|
initiallyAllFollowing?: boolean;
|
|
42
|
+
/** Default: "Follow all", translated. */
|
|
31
43
|
followAllLabel?: string;
|
|
44
|
+
/** Default: "Following", translated. */
|
|
32
45
|
followedAllLabel?: string;
|
|
33
46
|
onBulkFollow?: (result: BulkFollowResult) => void;
|
|
34
47
|
onBulkUnfollow?: (result: BulkUnfollowResult) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/FollowButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMpE,OAAO,KAAK,EAAe,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Follow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,OAAO,CAAC;IAChC,yCAAyC;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAClD,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACtD,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,sBAAsB,CAAC;AAwPjF,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAsC7C,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,eAAe,YAAY,CAAC"}
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
* small vocabulary of defaults and a full override, rather than a lookup keyed
|
|
23
23
|
* on kind — a kind→verb table in this package would need a release every time
|
|
24
24
|
* an application invents a kind, which is exactly the coupling #809 removes.
|
|
25
|
+
* The vocabulary and its translated words live in `followLabels`, shared with
|
|
26
|
+
* `FollowButton`.
|
|
25
27
|
*
|
|
26
28
|
* ## Relationship to the legacy `FollowButton`
|
|
27
29
|
*
|
|
@@ -33,27 +35,12 @@
|
|
|
33
35
|
import type { FollowStatus } from '@oxy.so/contracts';
|
|
34
36
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
35
37
|
import { type FollowDuration } from './followRules.js';
|
|
36
|
-
|
|
37
|
-
* The small vocabulary of verbs the ecosystem actually uses. An application
|
|
38
|
-
* whose verb is not here passes `labels` instead — the escape hatch exists so
|
|
39
|
-
* this union never has to grow to accommodate one product's wording.
|
|
40
|
-
*/
|
|
41
|
-
export type FollowVerb = 'follow' | 'subscribe' | 'join' | 'watch';
|
|
42
|
-
export interface FollowLabels {
|
|
43
|
-
/** Not following yet. */
|
|
44
|
-
idle: string;
|
|
45
|
-
/** Following, and this application acts on it. */
|
|
46
|
-
active: string;
|
|
47
|
-
/** Asked, waiting for the other side to accept. */
|
|
48
|
-
pending: string;
|
|
49
|
-
/** Following globally, but switched off in this application. */
|
|
50
|
-
disabled: string;
|
|
51
|
-
}
|
|
38
|
+
import { type FollowLabels, type FollowVerb } from './followLabels.js';
|
|
52
39
|
export interface FollowTargetButtonProps {
|
|
53
40
|
/** The registered target's id. Registration is separate — see the SDK. */
|
|
54
41
|
targetId: string;
|
|
55
42
|
verb?: FollowVerb;
|
|
56
|
-
/** Full override, for a verb the vocabulary
|
|
43
|
+
/** Full override, for a verb the vocabulary does not carry. */
|
|
57
44
|
labels?: Partial<FollowLabels>;
|
|
58
45
|
size?: 'sm' | 'md' | 'lg';
|
|
59
46
|
style?: StyleProp<ViewStyle>;
|
|
@@ -65,7 +52,8 @@ export interface FollowTargetButtonProps {
|
|
|
65
52
|
showOptions?: boolean;
|
|
66
53
|
/**
|
|
67
54
|
* Offer timed follows. Pass `false` where a temporary follow makes no sense —
|
|
68
|
-
* a store you buy from, an account you know.
|
|
55
|
+
* a store you buy from, an account you know. Default: 24 hours, 72 hours and
|
|
56
|
+
* a week, translated.
|
|
69
57
|
*/
|
|
70
58
|
durations?: FollowDuration[] | false;
|
|
71
59
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowTargetButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/FollowTargetButton.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"FollowTargetButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/FollowTargetButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAkBzD,OAAO,EAIL,KAAK,cAAc,EAEpB,MAAM,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E;IACxE,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,kDAAkD;IAClD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,iFAAiF;IACjF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAmHD,wBAAgB,gBAAgB,CAAC,EAC/B,WAAW,EACX,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,MAAM,EACN,IAAY,EACZ,aAAqB,EACrB,KAAY,GACb,EAAE,qBAAqB,+BAmRvB;AAgKD,eAAe,gBAAgB,CAAC"}
|
|
@@ -9,9 +9,8 @@
|
|
|
9
9
|
import type { AccountStorageUsageResponse } from '@oxy.so/core';
|
|
10
10
|
import { type useTheme } from '@oxy.so/bloom/theme';
|
|
11
11
|
import type { AccountDialogMenuSection } from '../../navigation/accountDialogManager.js';
|
|
12
|
-
import type { useI18n } from '../../hooks/useI18n.js';
|
|
13
12
|
export type Theme = ReturnType<typeof useTheme>;
|
|
14
|
-
export type Translate
|
|
13
|
+
export type { Translate } from '../../hooks/useI18n.js';
|
|
15
14
|
/**
|
|
16
15
|
* One SUBORDINATE action on a sign-in surface — an alternative revealed behind
|
|
17
16
|
* "Having trouble?", or a non-competing link under the primary.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/authChooser/types.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts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