@oxy.so/services 12.5.0 → 12.7.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 +13 -0
- 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/useAccountColor.js +56 -0
- package/lib/commonjs/ui/hooks/useAccountColor.js.map +1 -0
- 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 +1 -0
- 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/useAccountColor.js +51 -0
- package/lib/module/ui/hooks/useAccountColor.js.map +1 -0
- 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 +4 -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/useAccountColor.d.ts +25 -0
- package/lib/typescript/commonjs/ui/hooks/useAccountColor.d.ts.map +1 -0
- 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 +4 -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/useAccountColor.d.ts +25 -0
- package/lib/typescript/module/ui/hooks/useAccountColor.d.ts.map +1 -0
- 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 +5 -5
- package/src/index.ts +2 -5
- package/src/ui/client.ts +8 -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/useAccountColor.ts +52 -0
- package/src/ui/hooks/useI18n.ts +5 -3
- package/src/ui/utils/deviceSessionTitle.ts +1 -2
|
@@ -16,6 +16,9 @@ exports.formatHandle = formatHandle;
|
|
|
16
16
|
* (OxyHQ/oxy#1375 item 22). The name now says the state, and who it is for
|
|
17
17
|
* when the caller knows the handle.
|
|
18
18
|
*
|
|
19
|
+
* The words follow the button's verb ("Joined @fediverse", hinted "Leaves
|
|
20
|
+
* @fediverse") and its language: every string is `@oxy.so/core`'s `follow.*`.
|
|
21
|
+
*
|
|
19
22
|
* Pure, and kept apart from the components, so every state is pinned by a
|
|
20
23
|
* table test rather than by a render that can only see one state at a time.
|
|
21
24
|
*/
|
|
@@ -36,21 +39,33 @@ function formatHandle(username) {
|
|
|
36
39
|
* because a press does nothing until the write settles.
|
|
37
40
|
* - Following: "Following @nate", hinted "Unfollows @nate", because pressing
|
|
38
41
|
* it unfollows, which the visible "Following" does not say.
|
|
42
|
+
*
|
|
43
|
+
* The name is the visible label (the caller's, when it passed `labels`) beside
|
|
44
|
+
* the handle; the checking line and the hint are the verb's.
|
|
39
45
|
*/
|
|
40
|
-
function describeFollowButton(input) {
|
|
46
|
+
function describeFollowButton(input, t) {
|
|
41
47
|
const handle = formatHandle(input.username);
|
|
48
|
+
const words = `follow.verbs.${input.verb}`;
|
|
42
49
|
if (!input.isKnown) {
|
|
43
50
|
return {
|
|
44
|
-
accessibilityLabel: handle ?
|
|
51
|
+
accessibilityLabel: handle ? t(`${words}.checkingNamed`, {
|
|
52
|
+
name: handle
|
|
53
|
+
}) : t(`${words}.checking`)
|
|
45
54
|
};
|
|
46
55
|
}
|
|
47
|
-
const
|
|
56
|
+
const label = input.isFollowing ? input.labels.active : input.labels.idle;
|
|
57
|
+
const accessibilityLabel = handle ? t('follow.named', {
|
|
58
|
+
label,
|
|
59
|
+
name: handle
|
|
60
|
+
}) : label;
|
|
48
61
|
if (input.isPending || !input.isFollowing) return {
|
|
49
62
|
accessibilityLabel
|
|
50
63
|
};
|
|
51
64
|
return {
|
|
52
65
|
accessibilityLabel,
|
|
53
|
-
accessibilityHint: handle ?
|
|
66
|
+
accessibilityHint: handle ? t(`${words}.undoNamed`, {
|
|
67
|
+
name: handle
|
|
68
|
+
}) : t(`${words}.undo`)
|
|
54
69
|
};
|
|
55
70
|
}
|
|
56
71
|
|
|
@@ -58,15 +73,17 @@ function describeFollowButton(input) {
|
|
|
58
73
|
* The "Follow all" button. The labels are the caller's, since a starter pack
|
|
59
74
|
* and a feed's member list word it differently; the hint carries the count.
|
|
60
75
|
*/
|
|
61
|
-
function describeFollowAllButton(input) {
|
|
76
|
+
function describeFollowAllButton(input, t) {
|
|
62
77
|
const accessibilityLabel = input.allFollowing ? input.followedAllLabel : input.followAllLabel;
|
|
63
78
|
if (input.isPending) return {
|
|
64
79
|
accessibilityLabel
|
|
65
80
|
};
|
|
66
|
-
const
|
|
81
|
+
const hint = input.allFollowing ? 'follow.all.undoHint' : 'follow.all.hint';
|
|
67
82
|
return {
|
|
68
83
|
accessibilityLabel,
|
|
69
|
-
accessibilityHint: input.
|
|
84
|
+
accessibilityHint: t(input.count === 1 ? `${hint}One` : hint, {
|
|
85
|
+
count: input.count
|
|
86
|
+
})
|
|
70
87
|
};
|
|
71
88
|
}
|
|
72
89
|
//# sourceMappingURL=followButtonAccessibility.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["formatHandle","username","bare","trim","replace","undefined","describeFollowButton","input","handle","isKnown","accessibilityLabel","isFollowing","isPending","accessibilityHint","describeFollowAllButton","allFollowing","followedAllLabel","followAllLabel","
|
|
1
|
+
{"version":3,"names":["formatHandle","username","bare","trim","replace","undefined","describeFollowButton","input","t","handle","words","verb","isKnown","accessibilityLabel","name","label","isFollowing","labels","active","idle","isPending","accessibilityHint","describeFollowAllButton","allFollowing","followedAllLabel","followAllLabel","hint","count"],"sourceRoot":"../../../../src","sources":["ui/components/followButtonAccessibility.ts"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACO,SAASA,YAAYA,CAACC,QAA4B,EAAsB;EAC7E,MAAMC,IAAI,GAAGD,QAAQ,EAAEE,IAAI,CAAC,CAAC,CAACC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;EAChD,OAAOF,IAAI,GAAG,IAAIA,IAAI,EAAE,GAAGG,SAAS;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,oBAAoBA,CAClCC,KAOC,EACDC,CAAY,EACe;EAC3B,MAAMC,MAAM,GAAGT,YAAY,CAACO,KAAK,CAACN,QAAQ,CAAC;EAC3C,MAAMS,KAAK,GAAG,gBAAgBH,KAAK,CAACI,IAAI,EAAE;EAE1C,IAAI,CAACJ,KAAK,CAACK,OAAO,EAAE;IAClB,OAAO;MACLC,kBAAkB,EAAEJ,MAAM,GACtBD,CAAC,CAAC,GAAGE,KAAK,gBAAgB,EAAE;QAAEI,IAAI,EAAEL;MAAO,CAAC,CAAC,GAC7CD,CAAC,CAAC,GAAGE,KAAK,WAAW;IAC3B,CAAC;EACH;EAEA,MAAMK,KAAK,GAAGR,KAAK,CAACS,WAAW,GAAGT,KAAK,CAACU,MAAM,CAACC,MAAM,GAAGX,KAAK,CAACU,MAAM,CAACE,IAAI;EACzE,MAAMN,kBAAkB,GAAGJ,MAAM,GAAGD,CAAC,CAAC,cAAc,EAAE;IAAEO,KAAK;IAAED,IAAI,EAAEL;EAAO,CAAC,CAAC,GAAGM,KAAK;EAEtF,IAAIR,KAAK,CAACa,SAAS,IAAI,CAACb,KAAK,CAACS,WAAW,EAAE,OAAO;IAAEH;EAAmB,CAAC;EAExE,OAAO;IACLA,kBAAkB;IAClBQ,iBAAiB,EAAEZ,MAAM,GAAGD,CAAC,CAAC,GAAGE,KAAK,YAAY,EAAE;MAAEI,IAAI,EAAEL;IAAO,CAAC,CAAC,GAAGD,CAAC,CAAC,GAAGE,KAAK,OAAO;EAC3F,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACO,SAASY,uBAAuBA,CACrCf,KAMC,EACDC,CAAY,EACe;EAC3B,MAAMK,kBAAkB,GAAGN,KAAK,CAACgB,YAAY,GAAGhB,KAAK,CAACiB,gBAAgB,GAAGjB,KAAK,CAACkB,cAAc;EAC7F,IAAIlB,KAAK,CAACa,SAAS,EAAE,OAAO;IAAEP;EAAmB,CAAC;EAClD,MAAMa,IAAI,GAAGnB,KAAK,CAACgB,YAAY,GAAG,qBAAqB,GAAG,iBAAiB;EAC3E,OAAO;IACLV,kBAAkB;IAClBQ,iBAAiB,EAAEb,CAAC,CAACD,KAAK,CAACoB,KAAK,KAAK,CAAC,GAAG,GAAGD,IAAI,KAAK,GAAGA,IAAI,EAAE;MAAEC,KAAK,EAAEpB,KAAK,CAACoB;IAAM,CAAC;EACtF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFollowLabels = useFollowLabels;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _useI18n = require("../hooks/useI18n.js");
|
|
9
|
+
/**
|
|
10
|
+
* The words on a follow button, for every verb the ecosystem uses.
|
|
11
|
+
*
|
|
12
|
+
* "Follow" is wrong for half the things an Oxy user can follow: you subscribe
|
|
13
|
+
* to a channel, you join a community, you watch a listing. Both follow buttons
|
|
14
|
+
* read their words here, translated through `@oxy.so/core`'s `follow.*`
|
|
15
|
+
* strings, so a verb reads the same — and in the same language — wherever it is
|
|
16
|
+
* drawn.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The small vocabulary of verbs the ecosystem actually uses. An application
|
|
21
|
+
* whose verb is not here passes `labels` instead — the escape hatch exists so
|
|
22
|
+
* this union never has to grow to accommodate one product's wording.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/** The labels for `verb` in the current language, with the caller's `overrides` on top. */
|
|
26
|
+
function useFollowLabels(verb = 'follow', overrides) {
|
|
27
|
+
const {
|
|
28
|
+
t
|
|
29
|
+
} = (0, _useI18n.useI18n)();
|
|
30
|
+
return (0, _react.useMemo)(() => ({
|
|
31
|
+
idle: t(`follow.verbs.${verb}.idle`),
|
|
32
|
+
active: t(`follow.verbs.${verb}.active`),
|
|
33
|
+
pending: t('follow.pending'),
|
|
34
|
+
disabled: t('follow.disabled'),
|
|
35
|
+
...overrides
|
|
36
|
+
}), [t, verb, overrides]);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=followLabels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_useI18n","useFollowLabels","verb","overrides","t","useI18n","useMemo","idle","active","pending","disabled"],"sourceRoot":"../../../../src","sources":["ui/components/followLabels.ts"],"mappings":";;;;;;AAUA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;;AAcA;AACO,SAASE,eAAeA,CAC7BC,IAAgB,GAAG,QAAQ,EAC3BC,SAAiC,EACnB;EACd,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,gBAAO,EAAC,CAAC;EACvB,OAAO,IAAAC,cAAO,EACZ,OAAO;IACLC,IAAI,EAAEH,CAAC,CAAC,gBAAgBF,IAAI,OAAO,CAAC;IACpCM,MAAM,EAAEJ,CAAC,CAAC,gBAAgBF,IAAI,SAAS,CAAC;IACxCO,OAAO,EAAEL,CAAC,CAAC,gBAAgB,CAAC;IAC5BM,QAAQ,EAAEN,CAAC,CAAC,iBAAiB,CAAC;IAC9B,GAAGD;EACL,CAAC,CAAC,EACF,CAACC,CAAC,EAAEF,IAAI,EAAEC,SAAS,CACrB,CAAC;AACH","ignoreList":[]}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.FOLLOW_ACTION_LEAVES_ACTIVE = void 0;
|
|
7
7
|
exports.buildFollowMenuItems = buildFollowMenuItems;
|
|
8
8
|
exports.resolveFollowPrimaryAction = resolveFollowPrimaryAction;
|
|
9
|
+
var _core = require("@oxy.so/core");
|
|
9
10
|
/**
|
|
10
11
|
* The follow button's product rules, without the button.
|
|
11
12
|
*
|
|
@@ -13,10 +14,16 @@ exports.resolveFollowPrimaryAction = resolveFollowPrimaryAction;
|
|
|
13
14
|
* application drawing its own affordance (a chip grid, a compact row) imports
|
|
14
15
|
* them from here — through `@oxy.so/services/ui/client` — without paying for the
|
|
15
16
|
* button's dropdown menu.
|
|
17
|
+
*
|
|
18
|
+
* The menu's words are `@oxy.so/core`'s `follow.*` strings, read through the
|
|
19
|
+
* caller's `t`; without one they are English.
|
|
16
20
|
*/
|
|
17
21
|
|
|
18
22
|
/** A timed-follow choice offered in the menu. */
|
|
19
23
|
|
|
24
|
+
/** The fallback language for a caller that passes no translator. */
|
|
25
|
+
const english = (key, vars) => (0, _core.translate)(undefined, key, vars);
|
|
26
|
+
|
|
20
27
|
/**
|
|
21
28
|
* Whether an action leaves the target ACTIVE in this application.
|
|
22
29
|
*
|
|
@@ -39,15 +46,6 @@ const FOLLOW_ACTION_LEAVES_ACTIVE = exports.FOLLOW_ACTION_LEAVES_ACTIVE = {
|
|
|
39
46
|
|
|
40
47
|
/** One line in the disclosure menu. */
|
|
41
48
|
|
|
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
49
|
/**
|
|
52
50
|
* What the main button should do for the current state.
|
|
53
51
|
*
|
|
@@ -60,14 +58,28 @@ function resolveFollowPrimaryAction(input) {
|
|
|
60
58
|
if (input.applicationMode === 'disabled') return 'enable-here';
|
|
61
59
|
return 'unfollow';
|
|
62
60
|
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Which choices exist, given the state.
|
|
64
|
+
*
|
|
65
|
+
* Pure and exported because this is the product decision, not a rendering
|
|
66
|
+
* detail: a timed follow is only offered before following, turning it off here
|
|
67
|
+
* is only offered while following, and NEITHER is offered before the server has
|
|
68
|
+
* answered — every one of them addresses a relationship that does not exist
|
|
69
|
+
* yet, so offering them mid-write would mean sending a guessed id.
|
|
70
|
+
*/
|
|
63
71
|
function buildFollowMenuItems(input) {
|
|
72
|
+
const t = input.t ?? english;
|
|
64
73
|
const items = [];
|
|
65
74
|
if (!input.following) {
|
|
66
75
|
if (input.durations === false) return items;
|
|
67
76
|
for (const d of input.durations) {
|
|
68
77
|
items.push({
|
|
69
78
|
key: `for-${d.seconds}`,
|
|
70
|
-
label:
|
|
79
|
+
label: t('follow.menu.forDuration', {
|
|
80
|
+
label: input.idleVerb,
|
|
81
|
+
duration: d.label
|
|
82
|
+
}),
|
|
71
83
|
action: {
|
|
72
84
|
type: 'follow-timed',
|
|
73
85
|
seconds: d.seconds,
|
|
@@ -80,13 +92,17 @@ function buildFollowMenuItems(input) {
|
|
|
80
92
|
if (!input.hasRelationship || input.isPending) return items;
|
|
81
93
|
items.push(input.applicationMode === 'disabled' ? {
|
|
82
94
|
key: 'enable-here',
|
|
83
|
-
label:
|
|
95
|
+
label: t('follow.menu.showIn', {
|
|
96
|
+
app: input.applicationName
|
|
97
|
+
}),
|
|
84
98
|
action: {
|
|
85
99
|
type: 'enable-here'
|
|
86
100
|
}
|
|
87
101
|
} : {
|
|
88
102
|
key: 'disable-here',
|
|
89
|
-
label:
|
|
103
|
+
label: t('follow.menu.hideIn', {
|
|
104
|
+
app: input.applicationName
|
|
105
|
+
}),
|
|
90
106
|
action: {
|
|
91
107
|
type: 'disable-here'
|
|
92
108
|
}
|
|
@@ -95,7 +111,7 @@ function buildFollowMenuItems(input) {
|
|
|
95
111
|
// Named for what it does. "Unfollow" beside "don't show here" would read as
|
|
96
112
|
// the same action twice, and the user would pick the wrong one.
|
|
97
113
|
key: 'unfollow-everywhere',
|
|
98
|
-
label: '
|
|
114
|
+
label: t(`follow.verbs.${input.verb ?? 'follow'}.everywhere`),
|
|
99
115
|
action: {
|
|
100
116
|
type: 'unfollow'
|
|
101
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FOLLOW_ACTION_LEAVES_ACTIVE","exports","follow","unfollow","resolveFollowPrimaryAction","input","isFollowing","applicationMode","buildFollowMenuItems","items","following","durations","d","push","
|
|
1
|
+
{"version":3,"names":["_core","require","english","key","vars","translate","undefined","FOLLOW_ACTION_LEAVES_ACTIVE","exports","follow","unfollow","resolveFollowPrimaryAction","input","isFollowing","applicationMode","buildFollowMenuItems","t","items","following","durations","d","push","seconds","label","idleVerb","duration","action","type","durationLabel","hasRelationship","isPending","app","applicationName","verb"],"sourceRoot":"../../../../src","sources":["ui/components/followRules.ts"],"mappings":";;;;;;;;AAaA,IAAAA,KAAA,GAAAC,OAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;;AAOA;AACA,MAAMC,OAAkB,GAAGA,CAACC,GAAG,EAAEC,IAAI,KAAK,IAAAC,eAAS,EAACC,SAAS,EAAEH,GAAG,EAAEC,IAAI,CAAC;;AAEzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,2BAGZ,GAAAC,OAAA,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,KAAK,CAACE,eAAe,KAAK,UAAU,GAChC;IACEX,GAAG,EAAE,aAAa;IAClBoB,KAAK,EAAEP,CAAC,CAAC,oBAAoB,EAAE;MAAEe,GAAG,EAAEnB,KAAK,CAACoB;IAAgB,CAAC,CAAC;IAC9DN,MAAM,EAAE;MAAEC,IAAI,EAAE;IAAc;EAChC,CAAC,GACD;IACExB,GAAG,EAAE,cAAc;IACnBoB,KAAK,EAAEP,CAAC,CAAC,oBAAoB,EAAE;MAAEe,GAAG,EAAEnB,KAAK,CAACoB;IAAgB,CAAC,CAAC;IAC9DN,MAAM,EAAE;MAAEC,IAAI,EAAE;IAAe;EACjC,CACN,CAAC;EACDV,KAAK,CAACI,IAAI,CAAC;IACT;IACA;IACAlB,GAAG,EAAE,qBAAqB;IAC1BoB,KAAK,EAAEP,CAAC,CAAC,gBAAgBJ,KAAK,CAACqB,IAAI,IAAI,QAAQ,aAAa,CAAC;IAC7DP,MAAM,EAAE;MAAEC,IAAI,EAAE;IAAW;EAC7B,CAAC,CAAC;EAEF,OAAOV,KAAK;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.resolveAccountColor = resolveAccountColor;
|
|
7
|
+
exports.useAccountColor = useAccountColor;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _theme = require("@oxy.so/bloom/theme");
|
|
10
|
+
var _useAuth = require("./useAuth.js");
|
|
11
|
+
/**
|
|
12
|
+
* useAccountColor
|
|
13
|
+
*
|
|
14
|
+
* The account's colour is one value that every Oxy app wears: `users.color`, a
|
|
15
|
+
* Bloom preset NAME the API only stores after its entitlement check (`oxy` and
|
|
16
|
+
* `faircoin` belong to the account with that handle, `mono` to an active
|
|
17
|
+
* benefit). This hook is the single place an app turns that stored name into its
|
|
18
|
+
* Bloom theme, so two apps cannot disagree about which field wins.
|
|
19
|
+
*
|
|
20
|
+
* The portable `themePreference.colorPreset` is the fallback for an account that
|
|
21
|
+
* has no `color` yet. Mode (light/dark) is deliberately out of scope: whether to
|
|
22
|
+
* follow the account's mode is each app's own choice, the colour is not.
|
|
23
|
+
*
|
|
24
|
+
* An app with a stricter rule of its own (a plan the SDK cannot see) passes
|
|
25
|
+
* `canUse`; a name it refuses is simply not applied, so the app keeps its own
|
|
26
|
+
* default instead of a colour the viewer is not entitled to.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
function isAppColorName(value) {
|
|
30
|
+
return typeof value === 'string' && Object.prototype.hasOwnProperty.call(_theme.APP_COLOR_PRESETS, value);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** The preset an account wears, or `null` when it has none Bloom knows. */
|
|
34
|
+
function resolveAccountColor(user) {
|
|
35
|
+
const stored = user?.color ?? user?.themePreference?.colorPreset;
|
|
36
|
+
return isAppColorName(stored) ? stored : null;
|
|
37
|
+
}
|
|
38
|
+
function useAccountColor({
|
|
39
|
+
canUse
|
|
40
|
+
} = {}) {
|
|
41
|
+
const {
|
|
42
|
+
isAuthenticated,
|
|
43
|
+
user
|
|
44
|
+
} = (0, _useAuth.useAuth)();
|
|
45
|
+
const {
|
|
46
|
+
colorPreset,
|
|
47
|
+
setColorPreset
|
|
48
|
+
} = (0, _theme.useBloomTheme)();
|
|
49
|
+
const accountColor = resolveAccountColor(user);
|
|
50
|
+
const allowed = accountColor !== null && (canUse?.(accountColor) ?? true);
|
|
51
|
+
(0, _react.useEffect)(() => {
|
|
52
|
+
if (!isAuthenticated || !accountColor || !allowed || accountColor === colorPreset) return;
|
|
53
|
+
setColorPreset(accountColor);
|
|
54
|
+
}, [isAuthenticated, accountColor, allowed, colorPreset, setColorPreset]);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=useAccountColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_theme","_useAuth","isAppColorName","value","Object","prototype","hasOwnProperty","call","APP_COLOR_PRESETS","resolveAccountColor","user","stored","color","themePreference","colorPreset","useAccountColor","canUse","isAuthenticated","useAuth","setColorPreset","useBloomTheme","accountColor","allowed","useEffect"],"sourceRoot":"../../../../src","sources":["ui/hooks/useAccountColor.ts"],"mappings":";;;;;;;AAkBA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AArBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASG,cAAcA,CAACC,KAAc,EAAyB;EAC7D,OACE,OAAOA,KAAK,KAAK,QAAQ,IAAIC,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACC,wBAAiB,EAAEL,KAAK,CAAC;AAE/F;;AAEA;AACO,SAASM,mBAAmBA,CACjCC,IAAgE,EAC3C;EACrB,MAAMC,MAAM,GAAGD,IAAI,EAAEE,KAAK,IAAIF,IAAI,EAAEG,eAAe,EAAEC,WAAW;EAChE,OAAOZ,cAAc,CAACS,MAAM,CAAC,GAAGA,MAAM,GAAG,IAAI;AAC/C;AAEO,SAASI,eAAeA,CAAC;EAC9BC;AAGF,CAAC,GAAG,CAAC,CAAC,EAAQ;EACZ,MAAM;IAAEC,eAAe;IAAEP;EAAK,CAAC,GAAG,IAAAQ,gBAAO,EAAC,CAAC;EAC3C,MAAM;IAAEJ,WAAW;IAAEK;EAAe,CAAC,GAAG,IAAAC,oBAAa,EAAC,CAAC;EACvD,MAAMC,YAAY,GAAGZ,mBAAmB,CAACC,IAAI,CAAC;EAC9C,MAAMY,OAAO,GAAGD,YAAY,KAAK,IAAI,KAAKL,MAAM,GAAGK,YAAY,CAAC,IAAI,IAAI,CAAC;EAEzE,IAAAE,gBAAS,EAAC,MAAM;IACd,IAAI,CAACN,eAAe,IAAI,CAACI,YAAY,IAAI,CAACC,OAAO,IAAID,YAAY,KAAKP,WAAW,EAAE;IACnFK,cAAc,CAACE,YAAY,CAAC;EAC9B,CAAC,EAAE,CAACJ,eAAe,EAAEI,YAAY,EAAEC,OAAO,EAAER,WAAW,EAAEK,cAAc,CAAC,CAAC;AAC3E","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_oxyRuntimeContext","_core","FALLBACK_LOCALE","useI18n","oxy","useOptionalOxy","currentLanguage","localesVersion","useSyncExternalStore","subscribeLocales","getLocalesVersion","t","useMemo","key","vars","translate","locale"],"sourceRoot":"../../../../src","sources":["ui/hooks/useI18n.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMG,eAAe,GAAG,OAAO;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,OAAOA,CAAA,EAAG;EACxB,MAAMC,GAAG,GAAG,IAAAC,iCAAc,EAAC,CAAC;EAC5B,MAAMC,eAAe,GAAGF,GAAG,EAAEE,eAAe,IAAIJ,eAAe;EAC/D;EACA,MAAMK,cAAc,GAAG,IAAAC,2BAAoB,EACzCC,sBAAgB,EAChBC,uBAAiB,EACjBA,uBACF,CAAC;EACD;EACA,MAAMC,CAAC,GAAG,IAAAC,cAAO,
|
|
1
|
+
{"version":3,"names":["_react","require","_oxyRuntimeContext","_core","FALLBACK_LOCALE","useI18n","oxy","useOptionalOxy","currentLanguage","localesVersion","useSyncExternalStore","subscribeLocales","getLocalesVersion","t","useMemo","key","vars","translate","locale"],"sourceRoot":"../../../../src","sources":["ui/hooks/useI18n.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMG,eAAe,GAAG,OAAO;;AAE/B;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,OAAOA,CAAA,EAAG;EACxB,MAAMC,GAAG,GAAG,IAAAC,iCAAc,EAAC,CAAC;EAC5B,MAAMC,eAAe,GAAGF,GAAG,EAAEE,eAAe,IAAIJ,eAAe;EAC/D;EACA,MAAMK,cAAc,GAAG,IAAAC,2BAAoB,EACzCC,sBAAgB,EAChBC,uBAAiB,EACjBA,uBACF,CAAC;EACD;EACA,MAAMC,CAAC,GAAG,IAAAC,cAAO,EAAY,MAAM;IACjC,OAAO,CAACC,GAAG,EAAEC,IAAI,KAAK,IAAAC,eAAS,EAACT,eAAe,EAAEO,GAAG,EAAEC,IAAI,CAAC;EAC7D,CAAC,EAAE,CAACR,eAAe,EAAEC,cAAc,CAAC,CAAC;EACrC,OAAO;IAAEI,CAAC;IAAEK,MAAM,EAAEV;EAAgB,CAAC;AACvC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","deviceSessionTitle","session","t","thisDevice","deviceName","trim","isCurrent","user","name","displayName","getNormalizedUserHandle"],"sourceRoot":"../../../../src","sources":["ui/utils/deviceSessionTitle.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_core","require","deviceSessionTitle","session","t","thisDevice","deviceName","trim","isCurrent","user","name","displayName","getNormalizedUserHandle"],"sourceRoot":"../../../../src","sources":["ui/utils/deviceSessionTitle.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkBA,CAChCC,OAAuE,EACvEC,CAAY,EACJ;EACR,MAAMC,UAAU,GAAGD,CAAC,CAAC,mCAAmC,CAAC;EACzD,MAAME,UAAU,GAAG,OAAOH,OAAO,CAACG,UAAU,KAAK,QAAQ,GAAGH,OAAO,CAACG,UAAU,CAACC,IAAI,CAAC,CAAC,GAAG,EAAE;EAC1F,IAAID,UAAU,EAAE,OAAOH,OAAO,CAACK,SAAS,GAAG,GAAGF,UAAU,KAAKD,UAAU,GAAG,GAAGC,UAAU;EACvF,IAAIH,OAAO,CAACK,SAAS,EAAE,OAAOH,UAAU;EACxC,MAAMI,IAAI,GAAGN,OAAO,CAACM,IAAI;EACzB,MAAMC,IAAI,GAAGD,IAAI,EAAEC,IAAI,EAAEC,WAAW,EAAEJ,IAAI,CAAC,CAAC,KAAKE,IAAI,GAAG,IAAAG,6BAAuB,EAACH,IAAI,CAAC,GAAG,IAAI,CAAC;EAC7F,OAAOC,IAAI,IAAIN,CAAC,CAAC,qCAAqC,CAAC;AACzD","ignoreList":[]}
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["registerScreens","screenComponents","default","OxyProvider","useOxy","useOptionalOxy","OxyProviderMissingError","useOxyRuntime","useOxySnapshot","useActiveAccount","useDeviceDirectory","OxyRuntimeMissingError","useAuth","useAppAssertion","AppAssertionProviderMissingError","createDeferredProductAnalytics","IdentityBoundSessionError","useAuthStore","useAssetStore","useAssets","useAssetsStore","useAsset","useUploadProgress","useAssetLoading","useAssetErrors","useAssetsByApp","useAssetsByEntity","useAssetUsageCount","useIsAssetLinked","setOxyAssetInstance","useFileDownloadUrl","useFollow","useFollowerCounts","useSeedFollowStatuses","useStorage","useUserProfile","useUserProfiles","useCurrentUser","useUserById","useUserByUsername","useUsersBySessions","usePrivacySettings","useConnectedApps","useSessions","useSession","useDeviceSessions","useUserDevices","useSecurityInfo","useAccountStorageUsage","useSecurityActivity","useRecentSecurityActivity","useInfiniteSecurityActivity","useAuthMethods","useSignInMethods","useUserSubscription","useUserPayments","useUserWallet","useUserWalletTransactions","useUpdateProfile","useUploadAvatar","useUpdateAccountSettings","useUpdatePrivacySettings","useUpdateNotificationPreferences","useUpdateUserPreferences","useRevokeConnectedApp","useUploadFile","useSwitchSession","useLogoutSession","useLogoutAll","useUpdateDeviceName","useRemoveDevice","createProfileMutation","createGenericMutation","mutationKeys","queryKeys","invalidateAccountQueries","invalidateUserQueries","invalidateSessionQueries","invalidateDeviceQueries","invalidatePrivacyQueries","invalidateSecurityQueries","invalidateStorageQueries","invalidatePaymentsQueries","invalidateConnectedAppsQueries","invalidateAuthMethodsQueries","upsertCachedUser","upsertCachedUsers","CLEARABLE_USER_FIELDS","clearedFieldsFromProfileUpdate","clearedFieldsFromAccountUpdate","useMutationStatus","useOnlineStatus","useOxyEvent","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage","useFileFiltering","OXY_OAUTH_STATE_STORAGE_KEY","OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY","OxySignInButton","openOAuthPopup","OxyAuthPrompt","OxyOAuthCallback","OxyConsentScreen","RequireOxyAuth","FollowButton","FollowTargetButton","buildFollowMenuItems","resolveFollowPrimaryAction","FOLLOW_ACTION_LEAVES_ACTIVE","useFollowTarget","useFollowTargetStore","UNKNOWN_FOLLOW_STATUS","isFollowedGlobally","withApplicationMode","isCompleteFollowStatus","followRecordToStatus","followRecordsToStatusMap","PeableButton","OxyPayButton","LogoIcon","LogoText","ProfileButton","OxySignInPanel","OxySignUpPanel","OxyAccountPicker","OxySignInSecurityPanel","OxyEmailPanel","OxyDeleteAccountPanel","OxyLinkCommonsPanel","OxyPasswordPanel","OxyAuthenticatorPanel","OxyAuthScreen","OxyAuthScreenHeader","OxyAuthLoading","OxyAuthTerms","OxySignInRequestSurface","useDeviceSwitcher","showBottomSheet","closeBottomSheet","useSurfaceHeader","SurfaceHeaderAction","openAccountDialog","closeAccountDialog","subscribeToAccountDialog","usePersonalPlans","usePersonalPlanSubscriptions","AccountInvitationAcceptance","DisplayCurrencySelector","useDisplayCurrency","useDisplayPrice"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;A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AGjC;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,gCAA6B;AAG9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SACEC,2BAA2B,EAC3BC,mCAAmC,QAC9B,cAAc;AACrB,SAASjG,OAAO,IAAIkG,eAAe,QAAQ,oCAAiC;AAG5E;AACA;AACA;AACA;AACA,SAASC,cAAc,QAAQ,0BAAuB;AAgBtD,SAASC,aAAa,QAAQ,kCAA+B;AAE7D,SAASC,gBAAgB,QAAQ,qCAAkC;AAEnE,SAASC,gBAAgB,QAAQ,qCAAkC;AAQnE;AACA;AACA;AACA;AACA;AACA,SAASC,cAAc,QAAQ,mCAAgC;;AAE/D;;AAGA,SAASvG,OAAO,IAAIwG,YAAY,QAAQ,iCAA8B;AAMtE;AACA,SAASC,kBAAkB,QAAQ,uCAAoC;AACvE;AACE;AACA;AACA;AACA;AACA;AACAC,oBAAoB,EACpBC,0BAA0B,EAC1BC,2BAA2B,QACtB,gCAA6B;
|
|
1
|
+
{"version":3,"names":["registerScreens","screenComponents","default","OxyProvider","useOxy","useOptionalOxy","OxyProviderMissingError","useOxyRuntime","useOxySnapshot","useActiveAccount","useDeviceDirectory","OxyRuntimeMissingError","useAuth","useAppAssertion","AppAssertionProviderMissingError","createDeferredProductAnalytics","IdentityBoundSessionError","useAuthStore","useAssetStore","useAssets","useAssetsStore","useAsset","useUploadProgress","useAssetLoading","useAssetErrors","useAssetsByApp","useAssetsByEntity","useAssetUsageCount","useIsAssetLinked","setOxyAssetInstance","useFileDownloadUrl","useFollow","useFollowerCounts","useSeedFollowStatuses","useStorage","useUserProfile","useUserProfiles","useCurrentUser","useUserById","useUserByUsername","useUsersBySessions","usePrivacySettings","useConnectedApps","useSessions","useSession","useDeviceSessions","useUserDevices","useSecurityInfo","useAccountStorageUsage","useSecurityActivity","useRecentSecurityActivity","useInfiniteSecurityActivity","useAuthMethods","useSignInMethods","useUserSubscription","useUserPayments","useUserWallet","useUserWalletTransactions","useUpdateProfile","useUploadAvatar","useUpdateAccountSettings","useUpdatePrivacySettings","useUpdateNotificationPreferences","useUpdateUserPreferences","useRevokeConnectedApp","useUploadFile","useSwitchSession","useLogoutSession","useLogoutAll","useUpdateDeviceName","useRemoveDevice","createProfileMutation","createGenericMutation","mutationKeys","queryKeys","invalidateAccountQueries","invalidateUserQueries","invalidateSessionQueries","invalidateDeviceQueries","invalidatePrivacyQueries","invalidateSecurityQueries","invalidateStorageQueries","invalidatePaymentsQueries","invalidateConnectedAppsQueries","invalidateAuthMethodsQueries","upsertCachedUser","upsertCachedUsers","CLEARABLE_USER_FIELDS","clearedFieldsFromProfileUpdate","clearedFieldsFromAccountUpdate","useMutationStatus","useOnlineStatus","useOxyEvent","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage","useFileFiltering","OXY_OAUTH_STATE_STORAGE_KEY","OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY","OxySignInButton","openOAuthPopup","OxyAuthPrompt","OxyOAuthCallback","OxyConsentScreen","RequireOxyAuth","FollowButton","FollowTargetButton","buildFollowMenuItems","resolveFollowPrimaryAction","FOLLOW_ACTION_LEAVES_ACTIVE","useFollowTarget","useFollowTargetStore","UNKNOWN_FOLLOW_STATUS","isFollowedGlobally","withApplicationMode","isCompleteFollowStatus","followRecordToStatus","followRecordsToStatusMap","PeableButton","OxyPayButton","LogoIcon","LogoText","ProfileButton","OxySignInPanel","OxySignUpPanel","OxyAccountPicker","OxySignInSecurityPanel","OxyEmailPanel","OxyDeleteAccountPanel","OxyLinkCommonsPanel","OxyPasswordPanel","OxyAuthenticatorPanel","OxyAuthScreen","OxyAuthScreenHeader","OxyAuthLoading","OxyAuthTerms","OxySignInRequestSurface","useDeviceSwitcher","showBottomSheet","closeBottomSheet","useSurfaceHeader","SurfaceHeaderAction","openAccountDialog","closeAccountDialog","subscribeToAccountDialog","usePersonalPlans","usePersonalPlanSubscriptions","AccountInvitationAcceptance","DisplayCurrencySelector","useDisplayCurrency","useDisplayPrice"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,OAAO,uBAAoB;AAE3B,SAASA,eAAe,QAAQ,2BAAwB;AACxD,SAASC,gBAAgB,QAAQ,qCAAkC;AAEnED,eAAe,CAACC,gBAAgB,CAAC;;AAEjC;AACA;AACA;AACA,SAASC,OAAO,IAAIC,WAAW,QAAQ,gCAA6B;AACpE,SAASC,MAAM,QAAQ,4BAAyB;AAChD;AACA;AACA;AACA,SAASC,cAAc,EAAEC,uBAAuB,QAAQ,4BAAyB;;AAEjF;AACA;AACA;AACA,SACEC,aAAa,EACbC,cAAc,EACdC,gBAAgB,EAChBC,kBAAkB,EAClBC,sBAAsB,QACjB,uBAAc;AAUrB,SAASC,OAAO,QAAQ,uBAAoB;AAC5C;AACA;AACA;AACA,SACEC,eAAe,EACfC,gCAAgC,QAC3B,0CAAuC;AAO9C,SAASC,8BAA8B,QAAQ,oCAAiC;AAEhF;AACA;AACA;AACA,SAASC,yBAAyB,QAAQ,iCAA8B;;AAExE;AACA;AACA;AACA,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SACEC,aAAa,EACbC,SAAS,IAAIC,cAAc,EAC3BC,QAAQ,EACRC,iBAAiB,EACjBC,eAAe,EACfC,cAAc,EACdC,cAAc,EACdC,iBAAiB,EACjBC,kBAAkB,EAClBC,gBAAgB,QACX,2BAAwB;;AAE/B;AACA;AACA;AACA,SAAST,SAAS,EAAEU,mBAAmB,QAAQ,yBAAsB;AACrE,SAASC,kBAAkB,QAAQ,kCAA+B;AAClE,SAASC,SAAS,EAAEC,iBAAiB,EAAEC,qBAAqB,QAAQ,yBAAsB;AAC1F,SAASC,UAAU,QAAQ,0BAA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E;AACA;AACA;AACA,SAASC,cAAc,QAAQ,0CAAuC;AAEtE,SAASC,cAAc,QAAQ,0CAAuC;AAEtE,SAASC,gBAAgB,QAAQ,4CAAyC;AAE1E;AACA;AACA;AACA;AACA,SAASC,sBAAsB,QAAQ,kDAA+C;AAEtF,SAASC,aAAa,QAAQ,yCAAsC;AAEpE,SAASC,qBAAqB,QAAQ,iDAA8C;AAEpF,SAASC,mBAAmB,QAAQ,+CAA4C;AAEhF,SAASC,gBAAgB,QAAQ,4CAAyC;AAE1E,SAASC,qBAAqB,QAAQ,iDAA8C;AAEpF,SACEC,aAAa,EACbC,mBAAmB,EACnBC,cAAc,EACdC,YAAY,QACP,yCAAsC;AAG7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,uBAAuB,QAAQ,4CAAyC;AAIjF;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,iCAA8B;AAGhE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,uCAAoC;AAGtF;AACA;AACA;AACA,SAASC,gBAAgB,QAAmC,gCAA6B;AACzF,SACEC,mBAAmB,QAEd,wCAAqC;;AAE5C;AACA;AACA;AACA;AACA,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,wBAAwB,QACnB,yCAAsC;AAO7C,SACEC,gBAAgB,EAChBC,4BAA4B,QACvB,wCAAqC;AAC5C,SAASC,2BAA2B,QAAQ,gDAA6C;AAEzF,SAASC,uBAAuB,QAAQ,4CAAyC;AACjF,SAASC,kBAAkB,QAAQ,kCAA+B;AAClE,SAASC,eAAe,QAAQ,+BAA4B","ignoreList":[]}
|
package/lib/module/ui/client.js
CHANGED
|
@@ -36,6 +36,7 @@ export { useOxy, useOptionalOxy, OxyProviderMissingError } from "./context/OxyCo
|
|
|
36
36
|
|
|
37
37
|
// Hooks
|
|
38
38
|
export { useAuth } from "./hooks/useAuth.js";
|
|
39
|
+
export { useAccountColor, resolveAccountColor } from "./hooks/useAccountColor.js";
|
|
39
40
|
// This app's Oxy-signed assertion of which app it is (ADR 0045), for an SDK
|
|
40
41
|
// that attaches it to its own requests without pulling in the account screens.
|
|
41
42
|
export { useAppAssertion, AppAssertionProviderMissingError } from "./appAssertion/AppAssertionContext.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default","OxyProvider","OxySignInButton","OxyAuthPrompt","LogoIcon","LogoText","FollowButton","FollowTargetButton","ProfileButton","PeableButton","OxyPayButton","useOxy","useOptionalOxy","OxyProviderMissingError","useAuth","useAppAssertion","AppAssertionProviderMissingError","createDeferredProductAnalytics","useFollow","useFollowerCounts","useSeedFollowStatuses","useFollowTarget","useSupervision","supervisionQueryKeys","useUserProfile","useUserProfiles","useCurrentUser","useUserById","useUserByUsername","useStorage","useOxyEvent","useUpdateProfile","useUploadAvatar","useUploadFile","useFileDownloadUrl","useMutationStatus","useOnlineStatus","useDisplayCurrency","useDisplayPrice","DisplayCurrencySelector","buildFollowMenuItems","resolveFollowPrimaryAction","FOLLOW_ACTION_LEAVES_ACTIVE","queryKeys","invalidateAccountQueries","invalidateUserQueries","invalidateSessionQueries","invalidateDeviceQueries","invalidatePrivacyQueries","invalidateSecurityQueries","invalidateStorageQueries","invalidatePaymentsQueries","invalidateConnectedAppsQueries","invalidateAuthMethodsQueries","upsertCachedUser","upsertCachedUsers","CLEARABLE_USER_FIELDS","clearedFieldsFromProfileUpdate","clearedFieldsFromAccountUpdate","useAuthStore","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage"],"sourceRoot":"../../../src","sources":["ui/client.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,wBAAqB;;AAE5B;AACA,SAASA,OAAO,IAAIC,WAAW,QAAQ,6BAA0B;AACjE,SAASD,OAAO,IAAIE,eAAe,QAAQ,iCAA8B;AACzE,SAASF,OAAO,IAAIG,aAAa,QAAQ,+BAA4B;AAErE,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASL,OAAO,IAAIM,YAAY,QAAQ,8BAA2B;
|
|
1
|
+
{"version":3,"names":["default","OxyProvider","OxySignInButton","OxyAuthPrompt","LogoIcon","LogoText","FollowButton","FollowTargetButton","ProfileButton","PeableButton","OxyPayButton","useOxy","useOptionalOxy","OxyProviderMissingError","useAuth","useAccountColor","resolveAccountColor","useAppAssertion","AppAssertionProviderMissingError","createDeferredProductAnalytics","useFollow","useFollowerCounts","useSeedFollowStatuses","useFollowTarget","useSupervision","supervisionQueryKeys","useUserProfile","useUserProfiles","useCurrentUser","useUserById","useUserByUsername","useStorage","useOxyEvent","useUpdateProfile","useUploadAvatar","useUploadFile","useFileDownloadUrl","useMutationStatus","useOnlineStatus","useDisplayCurrency","useDisplayPrice","DisplayCurrencySelector","buildFollowMenuItems","resolveFollowPrimaryAction","FOLLOW_ACTION_LEAVES_ACTIVE","queryKeys","invalidateAccountQueries","invalidateUserQueries","invalidateSessionQueries","invalidateDeviceQueries","invalidatePrivacyQueries","invalidateSecurityQueries","invalidateStorageQueries","invalidatePaymentsQueries","invalidateConnectedAppsQueries","invalidateAuthMethodsQueries","upsertCachedUser","upsertCachedUsers","CLEARABLE_USER_FIELDS","clearedFieldsFromProfileUpdate","clearedFieldsFromAccountUpdate","useAuthStore","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage"],"sourceRoot":"../../../src","sources":["ui/client.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,wBAAqB;;AAE5B;AACA,SAASA,OAAO,IAAIC,WAAW,QAAQ,6BAA0B;AACjE,SAASD,OAAO,IAAIE,eAAe,QAAQ,iCAA8B;AACzE,SAASF,OAAO,IAAIG,aAAa,QAAQ,+BAA4B;AAErE,SAASC,QAAQ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BAA0B;AAGjC;AACA,SACEC,SAAS,EACTC,wBAAwB,EACxBC,qBAAqB,EACrBC,wBAAwB,EACxBC,uBAAuB,EACvBC,wBAAwB,EACxBC,yBAAyB,EACzBC,wBAAwB,EACxBC,yBAAyB,EACzBC,8BAA8B,EAC9BC,4BAA4B,QACvB,8BAA2B;AAClC,SACEC,gBAAgB,EAChBC,iBAAiB,EACjBC,qBAAqB,EACrBC,8BAA8B,EAC9BC,8BAA8B,QACzB,8BAA2B;AAOlC;AACA,SAASC,YAAY,QAAQ,uBAAoB;;AAEjD;AACA,SACEC,eAAe,EACfC,qBAAqB,EACrBC,uBAAuB,EACvBC,mBAAmB,QACd,0BAAuB","ignoreList":[]}
|
|
@@ -7,10 +7,9 @@ import { FollowButton as BloomFollowButton } from '@oxy.so/bloom/media-header';
|
|
|
7
7
|
import { useFollow, useFollowForButton } from "../hooks/useFollow.js";
|
|
8
8
|
import { useFollowStore } from "../stores/followStore.js";
|
|
9
9
|
import { useShallow } from 'zustand/react/shallow';
|
|
10
|
+
import { useI18n } from "../hooks/useI18n.js";
|
|
10
11
|
import { describeFollowAllButton, describeFollowButton } from "./followButtonAccessibility.js";
|
|
11
|
-
import {
|
|
12
|
-
const DEFAULT_FOLLOW_ALL_LABEL = 'Follow all';
|
|
13
|
-
const DEFAULT_FOLLOWED_ALL_LABEL = 'Following';
|
|
12
|
+
import { useFollowLabels } from "./followLabels.js";
|
|
14
13
|
|
|
15
14
|
/** Props shared by both single- and multi-user follow modes. */
|
|
16
15
|
|
|
@@ -22,13 +21,15 @@ const DEFAULT_FOLLOWED_ALL_LABEL = 'Following';
|
|
|
22
21
|
* FollowButton accepts EITHER single-user mode (`userId`) or multi-user mode
|
|
23
22
|
* (`userIds`), never both. Existing `{ userId, ... }` callers remain valid.
|
|
24
23
|
*/
|
|
25
|
-
|
|
24
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
25
|
const isMultiMode = props => 'userIds' in props && Array.isArray(props.userIds);
|
|
27
26
|
const FollowButtonInner = /*#__PURE__*/memo(function FollowButtonInner({
|
|
28
27
|
userId,
|
|
29
28
|
oxyServices,
|
|
30
29
|
initiallyFollowing,
|
|
31
30
|
username,
|
|
31
|
+
verb = 'follow',
|
|
32
|
+
labels,
|
|
32
33
|
size = 'md',
|
|
33
34
|
onFollowChange,
|
|
34
35
|
style,
|
|
@@ -37,6 +38,10 @@ const FollowButtonInner = /*#__PURE__*/memo(function FollowButtonInner({
|
|
|
37
38
|
showLoadingState = true,
|
|
38
39
|
preventParentActions = true
|
|
39
40
|
}) {
|
|
41
|
+
const {
|
|
42
|
+
t
|
|
43
|
+
} = useI18n();
|
|
44
|
+
const text = useFollowLabels(verb, labels);
|
|
40
45
|
const {
|
|
41
46
|
isFollowing,
|
|
42
47
|
isKnown,
|
|
@@ -56,9 +61,9 @@ const FollowButtonInner = /*#__PURE__*/memo(function FollowButtonInner({
|
|
|
56
61
|
if (accepted) onFollowChange?.(!isFollowing);
|
|
57
62
|
} catch (err) {
|
|
58
63
|
const error = err instanceof Error ? err : new Error(String(err));
|
|
59
|
-
toast.error(error.message || '
|
|
64
|
+
toast.error(error.message || t('follow.errors.update'));
|
|
60
65
|
}
|
|
61
|
-
}, [disabled, isLoading, isKnown, toggleFollow, onFollowChange, isFollowing, preventParentActions]);
|
|
66
|
+
}, [disabled, isLoading, isKnown, toggleFollow, onFollowChange, isFollowing, preventParentActions, t]);
|
|
62
67
|
|
|
63
68
|
// Enqueue a batched status fetch ONLY when the status is genuinely unknown
|
|
64
69
|
// (not seeded from `initiallyFollowing`, not already resolved). All buttons
|
|
@@ -80,8 +85,10 @@ const FollowButtonInner = /*#__PURE__*/memo(function FollowButtonInner({
|
|
|
80
85
|
isKnown,
|
|
81
86
|
isFollowing: showFollowing,
|
|
82
87
|
isPending: isLoading,
|
|
83
|
-
username
|
|
84
|
-
|
|
88
|
+
username,
|
|
89
|
+
verb,
|
|
90
|
+
labels: text
|
|
91
|
+
}, t);
|
|
85
92
|
return /*#__PURE__*/_jsx(BloomFollowButton, {
|
|
86
93
|
following: showFollowing,
|
|
87
94
|
onFollowChange: () => {
|
|
@@ -92,7 +99,8 @@ const FollowButtonInner = /*#__PURE__*/memo(function FollowButtonInner({
|
|
|
92
99
|
disabled: disabled || isBusy,
|
|
93
100
|
style: style,
|
|
94
101
|
textStyle: textStyle,
|
|
95
|
-
label: isKnown || showSpinner ?
|
|
102
|
+
label: isKnown || showSpinner ? text.idle : '',
|
|
103
|
+
followingLabel: text.active,
|
|
96
104
|
accessibilityLabel: accessibilityLabel,
|
|
97
105
|
accessibilityHint: accessibilityHint
|
|
98
106
|
});
|
|
@@ -101,8 +109,8 @@ const FollowButtonMultiInner = /*#__PURE__*/memo(function FollowButtonMultiInner
|
|
|
101
109
|
userIds,
|
|
102
110
|
initiallyAllFollowing = false,
|
|
103
111
|
size = 'md',
|
|
104
|
-
followAllLabel
|
|
105
|
-
followedAllLabel
|
|
112
|
+
followAllLabel: followAllLabelProp,
|
|
113
|
+
followedAllLabel: followedAllLabelProp,
|
|
106
114
|
onFollowChange,
|
|
107
115
|
onBulkFollow,
|
|
108
116
|
onBulkUnfollow,
|
|
@@ -112,6 +120,11 @@ const FollowButtonMultiInner = /*#__PURE__*/memo(function FollowButtonMultiInner
|
|
|
112
120
|
showLoadingState = true,
|
|
113
121
|
preventParentActions = true
|
|
114
122
|
}) {
|
|
123
|
+
const {
|
|
124
|
+
t
|
|
125
|
+
} = useI18n();
|
|
126
|
+
const followAllLabel = followAllLabelProp ?? t('follow.all.idle');
|
|
127
|
+
const followedAllLabel = followedAllLabelProp ?? t('follow.verbs.follow.active');
|
|
115
128
|
const follow = useFollow(userIds);
|
|
116
129
|
const followAllUsers = 'followAllUsers' in follow ? follow.followAllUsers : undefined;
|
|
117
130
|
const unfollowAllUsers = 'unfollowAllUsers' in follow ? follow.unfollowAllUsers : undefined;
|
|
@@ -161,7 +174,7 @@ const FollowButtonMultiInner = /*#__PURE__*/memo(function FollowButtonMultiInner
|
|
|
161
174
|
onBulkUnfollow?.(result);
|
|
162
175
|
} catch (err) {
|
|
163
176
|
const error = err instanceof Error ? err : new Error(String(err));
|
|
164
|
-
toast.error(error.message || '
|
|
177
|
+
toast.error(error.message || t('follow.errors.update'));
|
|
165
178
|
} finally {
|
|
166
179
|
setIsSubmitting(false);
|
|
167
180
|
}
|
|
@@ -182,11 +195,11 @@ const FollowButtonMultiInner = /*#__PURE__*/memo(function FollowButtonMultiInner
|
|
|
182
195
|
onBulkFollow?.(result);
|
|
183
196
|
} catch (err) {
|
|
184
197
|
const error = err instanceof Error ? err : new Error(String(err));
|
|
185
|
-
toast.error(error.message || '
|
|
198
|
+
toast.error(error.message || t('follow.errors.update'));
|
|
186
199
|
} finally {
|
|
187
200
|
setIsSubmitting(false);
|
|
188
201
|
}
|
|
189
|
-
}, [disabled, isLoading, allFollowing, followAllUsers, unfollowAllUsers, onFollowChange, onBulkFollow, onBulkUnfollow, preventParentActions]);
|
|
202
|
+
}, [disabled, isLoading, allFollowing, followAllUsers, unfollowAllUsers, onFollowChange, onBulkFollow, onBulkUnfollow, preventParentActions, t]);
|
|
190
203
|
const showSpinner = showLoadingState && isLoading;
|
|
191
204
|
const {
|
|
192
205
|
accessibilityLabel,
|
|
@@ -197,7 +210,7 @@ const FollowButtonMultiInner = /*#__PURE__*/memo(function FollowButtonMultiInner
|
|
|
197
210
|
count: userIds.length,
|
|
198
211
|
followAllLabel,
|
|
199
212
|
followedAllLabel
|
|
200
|
-
});
|
|
213
|
+
}, t);
|
|
201
214
|
return /*#__PURE__*/_jsx(BloomFollowButton, {
|
|
202
215
|
following: allFollowing,
|
|
203
216
|
accessibilityLabel: accessibilityLabel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useCallback","useMemo","useState","memo","useOxy","toast","FollowButton","BloomFollowButton","useFollow","useFollowForButton","useFollowStore","useShallow","
|
|
1
|
+
{"version":3,"names":["useEffect","useCallback","useMemo","useState","memo","useOxy","toast","FollowButton","BloomFollowButton","useFollow","useFollowForButton","useFollowStore","useShallow","useI18n","describeFollowAllButton","describeFollowButton","useFollowLabels","jsx","_jsx","isMultiMode","props","Array","isArray","userIds","FollowButtonInner","userId","oxyServices","initiallyFollowing","username","verb","labels","size","onFollowChange","style","textStyle","disabled","showLoadingState","preventParentActions","t","text","isFollowing","isKnown","isLoading","toggleFollow","resolveStatus","handlePress","event","preventDefault","stopPropagation","accepted","err","error","Error","String","message","isBusy","showFollowing","showSpinner","accessibilityLabel","accessibilityHint","isPending","following","loading","label","idle","followingLabel","active","FollowButtonMultiInner","initiallyAllFollowing","followAllLabel","followAllLabelProp","followedAllLabel","followedAllLabelProp","onBulkFollow","onBulkUnfollow","follow","followAllUsers","undefined","unfollowAllUsers","isAnyLoading","initialFollowStatuses","state","statuses","uid","Object","prototype","hasOwnProperty","call","followingUsers","hasKnownNotFollowing","some","storeAllFollowing","allFollowing","fetchAllStatuses","isSubmitting","setIsSubmitting","result","allAlreadyFollowing","followedCount","results","length","every","entry","alreadyFollowing","anyFollowed","success","Boolean","count","canUsePrivateApi","user","currentUser","currentUserId","id","trim","rawUserIds","multiUserIds","seen","Set","cleaned","raw","has","add","push","targetUserId"],"sourceRoot":"../../../../src","sources":["ui/components/FollowButton.tsx"],"mappings":";;AACA,SAASA,SAAS,EAAEC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,OAAO;AAEvE,SAASC,MAAM,QAAQ,iCAA8B;AACrD,SAASC,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,YAAY,IAAIC,iBAAiB,QAAQ,4BAA4B;AAC9E,SAASC,SAAS,EAAEC,kBAAkB,QAAQ,uBAAoB;AAClE,SAASC,cAAc,QAAQ,0BAAuB;AAEtD,SAASC,UAAU,QAAQ,uBAAuB;AAClD,SAASC,OAAO,QAAQ,qBAAkB;AAC1C,SAASC,uBAAuB,EAAEC,oBAAoB,QAAQ,gCAA6B;AAC3F,SAA6CC,eAAe,QAAQ,mBAAgB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