move @snort/nostr code into System

This commit is contained in:
2023-05-30 14:48:38 +01:00
parent baec8d6904
commit f86053c14f
119 changed files with 1071 additions and 163 deletions

View File

@ -1,5 +1,5 @@
import { useSyncExternalStore } from "react";
import { HexKey, u256 } from "@snort/nostr";
import { HexKey, u256 } from "System";
import { InteractionCache } from "Cache/EventInteractionCache";
import { EventInteraction } from "Db";

View File

@ -1,4 +1,4 @@
import { HexKey } from "@snort/nostr";
import { HexKey } from "System";
import useEventPublisher from "Feed/EventPublisher";
import useLogin from "Hooks/useLogin";
import { setBlocked, setMuted } from "Login";

View File

@ -1,5 +1,5 @@
import { useMemo } from "react";
import { HexKey, Lists, EventKind } from "@snort/nostr";
import { HexKey, Lists, EventKind } from "System";
import { FlatNoteStore, ParameterizedReplaceableNoteStore, RequestBuilder } from "System";
import useRequestBuilder from "Hooks/useRequestBuilder";

View File

@ -1,7 +1,8 @@
import { useSyncExternalStore } from "react";
import { RequestBuilder, System } from "System";
import { RequestBuilder } from "System";
import { EmptySnapshot, NoteStore, StoreSnapshot } from "System/NoteCollection";
import { unwrap } from "SnortUtils";
import { System } from "index";
const useRequestBuilder = <TStore extends NoteStore, TSnapshot = ReturnType<TStore["getSnapshotData"]>>(
type: { new (): TStore },

View File

@ -1,5 +1,6 @@
import { useSyncExternalStore } from "react";
import { System, SystemSnapshot } from "System";
import { SystemSnapshot } from "System";
import { System } from "index";
export default function useSystemState() {
return useSyncExternalStore<SystemSnapshot>(

View File

@ -1,9 +1,9 @@
import { useEffect, useSyncExternalStore } from "react";
import { HexKey } from "@snort/nostr";
import { HexKey } from "System";
import { MetadataCache } from "Cache";
import { UserCache } from "Cache/UserCache";
import { ProfileLoader } from "System/ProfileCache";
import { ProfileLoader } from "index";
export function useUserProfile(pubKey?: HexKey): MetadataCache | undefined {
const user = useSyncExternalStore<MetadataCache | undefined>(