@welshman/app 0.0.7 → 0.0.9
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/build/src/context.cjs +1 -0
- package/build/src/context.cjs.map +1 -1
- package/build/src/context.mjs +1 -0
- package/build/src/context.mjs.map +1 -1
- package/build/src/core.cjs +0 -3
- package/build/src/core.cjs.map +1 -1
- package/build/src/core.mjs +0 -3
- package/build/src/core.mjs.map +1 -1
- package/build/src/follows.cjs +3 -1
- package/build/src/follows.cjs.map +1 -1
- package/build/src/follows.d.ts +1 -0
- package/build/src/follows.mjs +2 -1
- package/build/src/follows.mjs.map +1 -1
- package/build/src/index.cjs +4 -0
- package/build/src/index.cjs.map +1 -1
- package/build/src/index.d.ts +4 -0
- package/build/src/index.mjs +4 -0
- package/build/src/mutes.cjs +3 -1
- package/build/src/mutes.cjs.map +1 -1
- package/build/src/mutes.d.ts +1 -0
- package/build/src/mutes.mjs +2 -1
- package/build/src/mutes.mjs.map +1 -1
- package/build/src/plaintext.cjs +4 -1
- package/build/src/plaintext.cjs.map +1 -1
- package/build/src/plaintext.mjs +4 -1
- package/build/src/plaintext.mjs.map +1 -1
- package/build/src/profiles.cjs +18 -1
- package/build/src/profiles.cjs.map +1 -1
- package/build/src/profiles.d.ts +2 -0
- package/build/src/profiles.mjs +17 -0
- package/build/src/profiles.mjs.map +1 -1
- package/build/src/relaySelections.cjs +1 -1
- package/build/src/relaySelections.cjs.map +1 -1
- package/build/src/relaySelections.mjs +1 -1
- package/build/src/relaySelections.mjs.map +1 -1
- package/build/src/session.cjs +2 -0
- package/build/src/session.cjs.map +1 -1
- package/build/src/session.d.ts +4 -3
- package/build/src/session.mjs +3 -1
- package/build/src/session.mjs.map +1 -1
- package/build/src/storage.cjs +6 -9
- package/build/src/storage.cjs.map +1 -1
- package/build/src/storage.d.ts +2 -5
- package/build/src/storage.mjs +6 -9
- package/build/src/storage.mjs.map +1 -1
- package/build/src/sync.cjs +39 -0
- package/build/src/sync.cjs.map +1 -0
- package/build/src/sync.d.ts +9 -0
- package/build/src/sync.mjs +32 -0
- package/build/src/sync.mjs.map +1 -0
- package/build/src/tags.cjs +94 -0
- package/build/src/tags.cjs.map +1 -0
- package/build/src/tags.d.ts +6 -0
- package/build/src/tags.mjs +86 -0
- package/build/src/tags.mjs.map +1 -0
- package/build/src/user.cjs +45 -0
- package/build/src/user.cjs.map +1 -0
- package/build/src/user.d.ts +8 -0
- package/build/src/user.mjs +40 -0
- package/build/src/user.mjs.map +1 -0
- package/build/src/util.cjs +29 -2
- package/build/src/util.cjs.map +1 -1
- package/build/src/util.d.ts +2 -0
- package/build/src/util.mjs +28 -2
- package/build/src/util.mjs.map +1 -1
- package/build/src/wot.cjs +62 -0
- package/build/src/wot.cjs.map +1 -0
- package/build/src/wot.d.ts +8 -0
- package/build/src/wot.mjs +54 -0
- package/build/src/wot.mjs.map +1 -0
- package/package.json +6 -6
package/build/src/util.cjs
CHANGED
|
@@ -3,14 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.formatTimestampAsTime = exports.formatTimestampAsDate = exports.formatTimestamp = exports.getLocale = exports.createLocalDate = exports.getTimeZone = exports.dateToSeconds = exports.secondsToDate = exports.createSearch = void 0;
|
|
6
|
+
exports.formatTimestampRelative = exports.formatTimestampAsTime = exports.formatTimestampAsDate = exports.formatTimestamp = exports.getLocale = exports.createLocalDate = exports.getTimeZone = exports.dateToSeconds = exports.secondsToDate = exports.createSearch = void 0;
|
|
7
7
|
const fuse_js_1 = __importDefault(require("fuse.js"));
|
|
8
8
|
const lib_1 = require("@welshman/lib");
|
|
9
9
|
const createSearch = (options, opts) => {
|
|
10
10
|
const fuse = new fuse_js_1.default(options, { ...opts.fuseOptions, includeScore: true });
|
|
11
11
|
const map = new Map(options.map(item => [opts.getValue(item), item]));
|
|
12
12
|
const search = (term) => {
|
|
13
|
-
|
|
13
|
+
var _a;
|
|
14
|
+
(_a = opts.onSearch) === null || _a === void 0 ? void 0 : _a.call(opts, term);
|
|
15
|
+
let results = term ? fuse.search(term) : options.map(item => ({ item }));
|
|
14
16
|
if (opts.sortFn) {
|
|
15
17
|
results = (0, lib_1.sortBy)(opts.sortFn, results);
|
|
16
18
|
}
|
|
@@ -59,4 +61,29 @@ const formatTimestampAsTime = (ts) => {
|
|
|
59
61
|
return formatter.format((0, exports.secondsToDate)(ts));
|
|
60
62
|
};
|
|
61
63
|
exports.formatTimestampAsTime = formatTimestampAsTime;
|
|
64
|
+
const formatTimestampRelative = (ts) => {
|
|
65
|
+
let unit;
|
|
66
|
+
let delta = (0, lib_1.now)() - ts;
|
|
67
|
+
if (delta < (0, lib_1.int)(lib_1.MINUTE)) {
|
|
68
|
+
unit = "second";
|
|
69
|
+
}
|
|
70
|
+
else if (delta < (0, lib_1.int)(lib_1.HOUR)) {
|
|
71
|
+
unit = "minute";
|
|
72
|
+
delta = Math.round(delta / (0, lib_1.int)(lib_1.MINUTE));
|
|
73
|
+
}
|
|
74
|
+
else if (delta < (0, lib_1.int)(lib_1.DAY, 2)) {
|
|
75
|
+
unit = "hour";
|
|
76
|
+
delta = Math.round(delta / (0, lib_1.int)(lib_1.HOUR));
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
unit = "day";
|
|
80
|
+
delta = Math.round(delta / (0, lib_1.int)(lib_1.DAY));
|
|
81
|
+
}
|
|
82
|
+
const locale = new Intl.RelativeTimeFormat().resolvedOptions().locale;
|
|
83
|
+
const formatter = new Intl.RelativeTimeFormat(locale, {
|
|
84
|
+
numeric: "auto",
|
|
85
|
+
});
|
|
86
|
+
return formatter.format(-delta, unit);
|
|
87
|
+
};
|
|
88
|
+
exports.formatTimestampRelative = formatTimestampRelative;
|
|
62
89
|
//# sourceMappingURL=util.cjs.map
|
package/build/src/util.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.cjs","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA0B;AAE1B,
|
|
1
|
+
{"version":3,"file":"util.cjs","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA0B;AAE1B,uCAAiE;AAiB1D,MAAM,YAAY,GAAG,CAAO,OAAY,EAAE,IAAyB,EAAgB,EAAE;IAC1F,MAAM,IAAI,GAAG,IAAI,iBAAI,CAAC,OAAO,EAAE,EAAC,GAAG,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,IAAI,EAAC,CAAC,CAAA;IACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IAE3E,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,EAAE;;QAC9B,MAAA,IAAI,CAAC,QAAQ,qDAAG,IAAI,CAAC,CAAA;QAErB,IAAI,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAC,IAAI,EAAC,CAAkB,CAAC,CAAA;QAEvF,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,GAAG,IAAA,YAAM,EAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;SACvC;QAED,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC3C,CAAC,CAAA;IAED,OAAO;QACL,OAAO;QACP,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,SAAS,EAAE,CAAC,KAAQ,EAAE,EAAE,CAAC,G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B,IAAI,GAAG,MAAM,CAAA;QACb,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAA,SAAG,EAAC,UAAI,CAAC,CAAC,CAAA;KACtC;SAAM;QACL,IAAI,GAAG,KAAK,CAAA;QACZ,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAA,SAAG,EAAC,SAAG,CAAC,CAAC,CAAA;KACrC;IAED,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC,eAAe,EAAE,CAAC,MAAM,CAAA;IACrE,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE;QACpD,OAAO,EAAE,MAAM;KAChB,CAAC,CAAA;IAEF,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,IAAmC,CAAC,CAAA;AACtE,CAAC,CAAA;AAtBY,QAAA,uBAAuB,2BAsBnC"}
|
package/build/src/util.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { IFuseOptions, FuseResult } from "fuse.js";
|
|
|
2
2
|
export type SearchOptions<V, T> = {
|
|
3
3
|
getValue: (item: T) => V;
|
|
4
4
|
fuseOptions?: IFuseOptions<T>;
|
|
5
|
+
onSearch?: (term: string) => void;
|
|
5
6
|
sortFn?: (items: FuseResult<T>) => any;
|
|
6
7
|
};
|
|
7
8
|
export type Search<V, T> = {
|
|
@@ -20,3 +21,4 @@ export declare const getLocale: () => string;
|
|
|
20
21
|
export declare const formatTimestamp: (ts: number) => string;
|
|
21
22
|
export declare const formatTimestampAsDate: (ts: number) => string;
|
|
22
23
|
export declare const formatTimestampAsTime: (ts: number) => string;
|
|
24
|
+
export declare const formatTimestampRelative: (ts: number) => string;
|
package/build/src/util.mjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import Fuse from "fuse.js";
|
|
2
|
-
import { sortBy } from "@welshman/lib";
|
|
2
|
+
import { now, int, sortBy, DAY, HOUR, MINUTE } from "@welshman/lib";
|
|
3
3
|
export const createSearch = (options, opts) => {
|
|
4
4
|
const fuse = new Fuse(options, { ...opts.fuseOptions, includeScore: true });
|
|
5
5
|
const map = new Map(options.map(item => [opts.getValue(item), item]));
|
|
6
6
|
const search = (term) => {
|
|
7
|
-
|
|
7
|
+
var _a;
|
|
8
|
+
(_a = opts.onSearch) === null || _a === void 0 ? void 0 : _a.call(opts, term);
|
|
9
|
+
let results = term ? fuse.search(term) : options.map(item => ({ item }));
|
|
8
10
|
if (opts.sortFn) {
|
|
9
11
|
results = sortBy(opts.sortFn, results);
|
|
10
12
|
}
|
|
@@ -44,4 +46,28 @@ export const formatTimestampAsTime = (ts) => {
|
|
|
44
46
|
});
|
|
45
47
|
return formatter.format(secondsToDate(ts));
|
|
46
48
|
};
|
|
49
|
+
export const formatTimestampRelative = (ts) => {
|
|
50
|
+
let unit;
|
|
51
|
+
let delta = now() - ts;
|
|
52
|
+
if (delta < int(MINUTE)) {
|
|
53
|
+
unit = "second";
|
|
54
|
+
}
|
|
55
|
+
else if (delta < int(HOUR)) {
|
|
56
|
+
unit = "minute";
|
|
57
|
+
delta = Math.round(delta / int(MINUTE));
|
|
58
|
+
}
|
|
59
|
+
else if (delta < int(DAY, 2)) {
|
|
60
|
+
unit = "hour";
|
|
61
|
+
delta = Math.round(delta / int(HOUR));
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
unit = "day";
|
|
65
|
+
delta = Math.round(delta / int(DAY));
|
|
66
|
+
}
|
|
67
|
+
const locale = new Intl.RelativeTimeFormat().resolvedOptions().locale;
|
|
68
|
+
const formatter = new Intl.RelativeTimeFormat(locale, {
|
|
69
|
+
numeric: "auto",
|
|
70
|
+
});
|
|
71
|
+
return formatter.format(-delta, unit);
|
|
72
|
+
};
|
|
47
73
|
//# sourceMappingURL=util.mjs.map
|
package/build/src/util.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.mjs","sourceRoot":"","sources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,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;KACrC;IAED,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC,eAAe,EAAE,CAAC,MAAM,CAAA;IACrE,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE;QACpD,OAAO,EAAE,MAAM;KAChB,CAAC,CAAA;IAEF,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,IAAmC,CAAC,CAAA;AACtE,CAAC,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWotScore = exports.wotGraph = exports.getFollowsWhoMute = exports.getFollowsWhoFollow = exports.getMuters = exports.getFollowers = exports.mutersByPubkey = exports.followersByPubkey = void 0;
|
|
4
|
+
const throttle_debounce_1 = require("throttle-debounce");
|
|
5
|
+
const store_1 = require("svelte/store");
|
|
6
|
+
const lib_1 = require("@welshman/lib");
|
|
7
|
+
const util_1 = require("@welshman/util");
|
|
8
|
+
const store_2 = require("@welshman/store");
|
|
9
|
+
const session_1 = require("./session.cjs");
|
|
10
|
+
const follows_1 = require("./follows.cjs");
|
|
11
|
+
const mutes_1 = require("./mutes.cjs");
|
|
12
|
+
exports.followersByPubkey = (0, store_2.withGetter)((0, store_1.derived)((0, store_2.throttled)(1000, follows_1.follows), lists => {
|
|
13
|
+
const $followersByPubkey = new Map();
|
|
14
|
+
for (const list of lists) {
|
|
15
|
+
for (const pubkey of (0, util_1.getListValues)("p", list)) {
|
|
16
|
+
(0, lib_1.addToMapKey)($followersByPubkey, pubkey, list.event.pubkey);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return $followersByPubkey;
|
|
20
|
+
}));
|
|
21
|
+
exports.mutersByPubkey = (0, store_2.withGetter)((0, store_1.derived)((0, store_2.throttled)(1000, mutes_1.mutes), lists => {
|
|
22
|
+
const $mutersByPubkey = new Map();
|
|
23
|
+
for (const list of lists) {
|
|
24
|
+
for (const pubkey of (0, util_1.getListValues)("p", list)) {
|
|
25
|
+
(0, lib_1.addToMapKey)($mutersByPubkey, pubkey, list.event.pubkey);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return $mutersByPubkey;
|
|
29
|
+
}));
|
|
30
|
+
const getFollowers = (pubkey) => Array.from(exports.followersByPubkey.get().get(pubkey) || []);
|
|
31
|
+
exports.getFollowers = getFollowers;
|
|
32
|
+
const getMuters = (pubkey) => Array.from(exports.mutersByPubkey.get().get(pubkey) || []);
|
|
33
|
+
exports.getMuters = getMuters;
|
|
34
|
+
const getFollowsWhoFollow = (pubkey, target) => (0, follows_1.getFollows)(pubkey).filter(other => (0, follows_1.getFollows)(other).includes(target));
|
|
35
|
+
exports.getFollowsWhoFollow = getFollowsWhoFollow;
|
|
36
|
+
const getFollowsWhoMute = (pubkey, target) => (0, follows_1.getFollows)(pubkey).filter(other => (0, mutes_1.getMutes)(other).includes(target));
|
|
37
|
+
exports.getFollowsWhoMute = getFollowsWhoMute;
|
|
38
|
+
exports.wotGraph = (0, store_2.withGetter)((0, store_1.writable)(new Map()));
|
|
39
|
+
const buildGraph = (0, throttle_debounce_1.throttle)(1000, () => {
|
|
40
|
+
const $pubkey = session_1.pubkey.get();
|
|
41
|
+
const $graph = new Map();
|
|
42
|
+
const $follows = $pubkey ? (0, follows_1.getFollows)($pubkey) : follows_1.followsByPubkey.get().keys();
|
|
43
|
+
for (const follow of $follows) {
|
|
44
|
+
for (const pubkey of (0, follows_1.getFollows)(follow)) {
|
|
45
|
+
$graph.set(pubkey, (0, lib_1.inc)($graph.get(pubkey)));
|
|
46
|
+
}
|
|
47
|
+
for (const pubkey of (0, mutes_1.getMutes)(follow)) {
|
|
48
|
+
$graph.set(pubkey, (0, lib_1.dec)($graph.get(pubkey)));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.wotGraph.set($graph);
|
|
52
|
+
});
|
|
53
|
+
session_1.pubkey.subscribe(buildGraph);
|
|
54
|
+
follows_1.follows.subscribe(buildGraph);
|
|
55
|
+
mutes_1.mutes.subscribe(buildGraph);
|
|
56
|
+
const getWotScore = (pubkey, target) => {
|
|
57
|
+
const follows = pubkey ? (0, exports.getFollowsWhoFollow)(pubkey, target) : (0, exports.getFollowers)(target);
|
|
58
|
+
const mutes = pubkey ? (0, exports.getFollowsWhoMute)(pubkey, target) : (0, exports.getMuters)(target);
|
|
59
|
+
return follows.length - mutes.length;
|
|
60
|
+
};
|
|
61
|
+
exports.getWotScore = getWotScore;
|
|
62
|
+
//# sourceMappingURL=wot.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wot.cjs","sourceRoot":"","sources":["../../src/wot.ts"],"names":[],"mappings":";;;AAAA,yDAA0C;AAC1C,wCAA8C;AAC9C,uCAAmD;AACnD,yCAA4C;AAC5C,2CAAqD;AACrD,2CAAgC;AAChC,2CAA8D;AAC9D,uCAAuC;AAE1B,QAAA,iBAAiB,GAAG,IAAA,kBAAU,EACzC,IAAA,eAAO,EACL,IAAA,iBAAS,EAAC,IAAI,EAAE,iBAAO,CAAC,EACxB,KAAK,CAAC,EAAE;IACN,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAuB,CAAA;IAEzD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,KAAK,MAAM,MAAM,IAAI,IAAA,oBAAa,EAAC,GAAG,EAAE,IAAI,CAAC,EAAE;YAC7C,IAAA,iBAAW,EAAC,kBAAkB,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;SAC3D;KACF;IAED,OAAO,kBAAkB,CAAA;AAC3B,CAAC,CACF,CACF,CAAA;AAEY,QAAA,cAAc,GAAG,IAAA,kBAAU,EACtC,IAAA,eAAO,EACL,IAAA,iBAAS,EAAC,IAA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AAC,CAAC,CAAC,CAAC,IAAA,oBAAY,EAAC,MAAM,CAAC,CAAA;IACnF,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,IAAA,yBAAiB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAA,iBAAS,EAAC,MAAM,CAAC,CAAA;IAE5E,OAAO,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;AACtC,CAAC,CAAA;AALY,QAAA,WAAW,eAKvB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const followersByPubkey: import("@welshman/store").ReadableWithGetter<Map<string, Set<string>>>;
|
|
2
|
+
export declare const mutersByPubkey: import("@welshman/store").ReadableWithGetter<Map<string, Set<string>>>;
|
|
3
|
+
export declare const getFollowers: (pubkey: string) => string[];
|
|
4
|
+
export declare const getMuters: (pubkey: string) => string[];
|
|
5
|
+
export declare const getFollowsWhoFollow: (pubkey: string, target: string) => string[];
|
|
6
|
+
export declare const getFollowsWhoMute: (pubkey: string, target: string) => string[];
|
|
7
|
+
export declare const wotGraph: import("@welshman/store").WritableWithGetter<Map<string, number>>;
|
|
8
|
+
export declare const getWotScore: (pubkey: string, target: string) => number;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { throttle } from 'throttle-debounce';
|
|
2
|
+
import { derived, writable } from 'svelte/store';
|
|
3
|
+
import { addToMapKey, inc, dec } from '@welshman/lib';
|
|
4
|
+
import { getListValues } from '@welshman/util';
|
|
5
|
+
import { throttled, withGetter } from '@welshman/store';
|
|
6
|
+
import { pubkey } from "./session.mjs";
|
|
7
|
+
import { follows, getFollows, followsByPubkey } from "./follows.mjs";
|
|
8
|
+
import { mutes, getMutes } from "./mutes.mjs";
|
|
9
|
+
export const followersByPubkey = withGetter(derived(throttled(1000, follows), lists => {
|
|
10
|
+
const $followersByPubkey = new Map();
|
|
11
|
+
for (const list of lists) {
|
|
12
|
+
for (const pubkey of getListValues("p", list)) {
|
|
13
|
+
addToMapKey($followersByPubkey, pubkey, list.event.pubkey);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return $followersByPubkey;
|
|
17
|
+
}));
|
|
18
|
+
export const mutersByPubkey = withGetter(derived(throttled(1000, mutes), lists => {
|
|
19
|
+
const $mutersByPubkey = new Map();
|
|
20
|
+
for (const list of lists) {
|
|
21
|
+
for (const pubkey of getListValues("p", list)) {
|
|
22
|
+
addToMapKey($mutersByPubkey, pubkey, list.event.pubkey);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return $mutersByPubkey;
|
|
26
|
+
}));
|
|
27
|
+
export const getFollowers = (pubkey) => Array.from(followersByPubkey.get().get(pubkey) || []);
|
|
28
|
+
export const getMuters = (pubkey) => Array.from(mutersByPubkey.get().get(pubkey) || []);
|
|
29
|
+
export const getFollowsWhoFollow = (pubkey, target) => getFollows(pubkey).filter(other => getFollows(other).includes(target));
|
|
30
|
+
export const getFollowsWhoMute = (pubkey, target) => getFollows(pubkey).filter(other => getMutes(other).includes(target));
|
|
31
|
+
export const wotGraph = withGetter(writable(new Map()));
|
|
32
|
+
const buildGraph = throttle(1000, () => {
|
|
33
|
+
const $pubkey = pubkey.get();
|
|
34
|
+
const $graph = new Map();
|
|
35
|
+
const $follows = $pubkey ? getFollows($pubkey) : followsByPubkey.get().keys();
|
|
36
|
+
for (const follow of $follows) {
|
|
37
|
+
for (const pubkey of getFollows(follow)) {
|
|
38
|
+
$graph.set(pubkey, inc($graph.get(pubkey)));
|
|
39
|
+
}
|
|
40
|
+
for (const pubkey of getMutes(follow)) {
|
|
41
|
+
$graph.set(pubkey, dec($graph.get(pubkey)));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
wotGraph.set($graph);
|
|
45
|
+
});
|
|
46
|
+
pubkey.subscribe(buildGraph);
|
|
47
|
+
follows.subscribe(buildGraph);
|
|
48
|
+
mutes.subscribe(buildGraph);
|
|
49
|
+
export const getWotScore = (pubkey, target) => {
|
|
50
|
+
const follows = pubkey ? getFollowsWhoFollow(pubkey, target) : getFollowers(target);
|
|
51
|
+
const mutes = pubkey ? getFollowsWhoMute(pubkey, target) : getMuters(target);
|
|
52
|
+
return follows.length - mutes.length;
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=wot.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wot.mjs","sourceRoot":"","sources":["../../src/wot.ts"],"names":[],"mappings":"OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB;OACnC,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,cAAc;OACvC,EAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAC,MAAM,eAAe;OAC5C,EAAC,aAAa,EAAC,MAAM,gBAAgB;OACrC,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,iBAAiB;OAC9C,EAAC,MAAM,EAAC;OACR,EAAC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAC;OACtC,EAAC,KAAK,EAAE,QAAQ,EAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CACzC,OAAO,CACL,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,EACxB,KAAK,CAAC,EAAE;IACN,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAuB,CAAA;IAEzD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,KAAK,MAAM,MAAM,IAAI,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE;YAC7C,WAAW,CAAC,kBAAkB,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;SAC3D;KACF;IAED,OAAO,kBAAkB,CAAA;AAC3B,CAAC,CACF,CACF,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CACtC,OAAO,CACL,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,EACtB,KAAK,CAAC,EAAE;IACN,MAAM,eAAe,GAAG,IAAI,GAAG,EAAu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,MAAM,CAAA;AACtC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@welshman/app",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"author": "hodlbod",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "A collection of svelte stores for use in building nostr client applications.",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"typescript": "~5.1.6"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@welshman/lib": "0.0.
|
|
35
|
-
"@welshman/net": "0.0.
|
|
36
|
-
"@welshman/signer": "0.0.
|
|
37
|
-
"@welshman/store": "0.0.
|
|
38
|
-
"@welshman/util": "0.0.
|
|
34
|
+
"@welshman/lib": "^0.0.18",
|
|
35
|
+
"@welshman/net": "^0.0.23",
|
|
36
|
+
"@welshman/signer": "^0.0.6",
|
|
37
|
+
"@welshman/store": "^0.0.8",
|
|
38
|
+
"@welshman/util": "^0.0.34",
|
|
39
39
|
"fuse.js": "^7.0.0",
|
|
40
40
|
"idb": "^8.0.0",
|
|
41
41
|
"svelte": "^4.2.18",
|