chore(deps): replace plebbit/plebbit-react-hooks with bitsocialhq/pkc-react-hooks

bitsocialhq/pkc-react-hooks is a fork of plebbit-react-hooks that we're maintaining temporarily as an attempt to modernize the original repository using AI tools, possibly merging changes back into plebbit-react-hooks, which should also be rebranded to pkc-react-hooks eventually, under the org pkcprotocol.
This commit is contained in:
plebeius
2026-02-28 15:02:56 +08:00
parent 8d36673ad1
commit e556a9e662
64 changed files with 638 additions and 946 deletions
@@ -1,4 +1,4 @@
import useAccountsStore from '@plebbit/plebbit-react-hooks/dist/stores/accounts';
import useAccountsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/accounts';
import { DirectoryCommunity } from './use-directories';
export const useAccountSubplebbitsWithMetadata = (): DirectoryCommunity[] => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { useAccount } from '@plebbit/plebbit-react-hooks';
import { useAccount } from '@bitsocialhq/pkc-react-hooks';
import { useSubplebbitField } from './use-stable-subplebbit';
interface AuthorPrivilegesProps {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { useAccountComments, Subplebbit } from '@plebbit/plebbit-react-hooks';
import { useAccountComments, Subplebbit } from '@bitsocialhq/pkc-react-hooks';
const useCatalogFeedRows = (columnCount: number, feed: any, isFeedLoaded: boolean, subplebbit: Subplebbit) => {
const { address } = subplebbit || {};
+2 -2
View File
@@ -1,6 +1,6 @@
import { useMemo } from 'react';
import { Comment } from '@plebbit/plebbit-react-hooks';
import { flattenCommentsPages } from '@plebbit/plebbit-react-hooks/dist/lib/utils';
import { Comment } from '@bitsocialhq/pkc-react-hooks';
import { flattenCommentsPages } from '@bitsocialhq/pkc-react-hooks/dist/lib/utils';
const useCountLinksInReplies = (comment: Comment, firstXReplies?: number) => {
let linkCount = 0;
+1 -1
View File
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import localForageLru from '@plebbit/plebbit-react-hooks/dist/lib/localforage-lru/index.js';
import localForageLru from '@bitsocialhq/pkc-react-hooks/dist/lib/localforage-lru/index.js';
const gifFrameDb = localForageLru.createInstance({ name: '5chanGifFrames', size: 500 });
const failedUrls = new Set<string>();
+1 -1
View File
@@ -1,6 +1,6 @@
import { useCallback, useMemo } from 'react';
import { create } from 'zustand';
import localForageLru from '@plebbit/plebbit-react-hooks/dist/lib/localforage-lru/index.js';
import localForageLru from '@bitsocialhq/pkc-react-hooks/dist/lib/localforage-lru/index.js';
interface HideStoreState {
hiddenCids: { [key: string]: boolean };
+1 -1
View File
@@ -1,6 +1,6 @@
import { useTranslation } from 'react-i18next';
import { useEffect } from 'react';
import { Subplebbit } from '@plebbit/plebbit-react-hooks';
import { Subplebbit } from '@bitsocialhq/pkc-react-hooks';
import { getFormattedTimeAgo } from '../lib/utils/time-utils';
import useSubplebbitOfflineStore from '../stores/use-subplebbit-offline-store';
import useSubplebbitsLoadingStartTimestamps from '../stores/use-subplebbits-loading-start-timestamps-store';
+1 -1
View File
@@ -1,5 +1,5 @@
import { useMemo, useRef } from 'react';
import { Comment, Subplebbit } from '@plebbit/plebbit-react-hooks';
import { Comment, Subplebbit } from '@bitsocialhq/pkc-react-hooks';
import { getCommentMediaInfo, getHasThumbnail } from '../lib/utils/media-utils';
const MAX_POSTS = 8;
+2 -2
View File
@@ -1,6 +1,6 @@
import { useMemo } from 'react';
import { useFeed } from '@plebbit/plebbit-react-hooks';
import useFeedsStore from '@plebbit/plebbit-react-hooks/dist/stores/feeds';
import { useFeed } from '@bitsocialhq/pkc-react-hooks';
import useFeedsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/feeds';
import { useDirectoryByAddress } from './use-directories';
import { useBoardFeedPageSize } from './use-board-feed-page-size';
import { findPostPageInFeed, findPostPageInLoadedBoardFeeds, type FeedsOptionsLike, type LoadedFeedsLike } from '../lib/utils/post-page-resolution';
+1 -1
View File
@@ -1,5 +1,5 @@
import { useCallback } from 'react';
import { Comment, useAccount, usePublishComment } from '@plebbit/plebbit-react-hooks';
import { Comment, useAccount, usePublishComment } from '@bitsocialhq/pkc-react-hooks';
import usePublishPostStore from '../stores/use-publish-post-store';
const usePublishPost = ({ subplebbitAddress }: { subplebbitAddress?: string }) => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useCallback, useMemo } from 'react';
import { Comment, useAccount, usePublishComment } from '@plebbit/plebbit-react-hooks';
import { Comment, useAccount, usePublishComment } from '@bitsocialhq/pkc-react-hooks';
import usePublishReplyStore from '../stores/use-publish-reply-store';
import usePostNumberStore from '../stores/use-post-number-store';
import { getQuotedCidsFromContent, mergeQuotedCids } from '../lib/utils/reply-quote-utils';
+1 -1
View File
@@ -1,5 +1,5 @@
import { useCallback, useMemo, useRef } from 'react';
import { Comment } from '@plebbit/plebbit-react-hooks';
import { Comment } from '@bitsocialhq/pkc-react-hooks';
import { QUOTE_NUMBER_REGEX } from '../lib/utils/url-utils';
import usePostNumberStore from '../stores/use-post-number-store';
+1 -1
View File
@@ -1,4 +1,4 @@
import useSubplebbitsStore from '@plebbit/plebbit-react-hooks/dist/stores/subplebbits';
import useSubplebbitsStore from '@bitsocialhq/pkc-react-hooks/dist/stores/subplebbits';
/**
* Shallow compare two objects by keys and values.
+1 -1
View File
@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { useClientsStates, useSubplebbit, useSubplebbitsStates } from '@plebbit/plebbit-react-hooks';
import { useClientsStates, useSubplebbit, useSubplebbitsStates } from '@bitsocialhq/pkc-react-hooks';
import debounce from 'lodash/debounce';
interface CommentOrSubplebbit {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useEffect } from 'react';
import { useSubplebbitStats } from '@plebbit/plebbit-react-hooks';
import { useSubplebbitStats } from '@bitsocialhq/pkc-react-hooks';
import { create } from 'zustand';
export type SubplebbitsStatsState = {
+1 -1
View File
@@ -4,7 +4,7 @@ import { isAllView, isSubscriptionsView, isModView } from '../lib/utils/view-uti
import useThemeStore from '../stores/use-theme-store';
import { useDirectories } from './use-directories';
import { useResolvedSubplebbitAddress } from './use-resolved-subplebbit-address';
import { useAccountComment } from '@plebbit/plebbit-react-hooks';
import { useAccountComment } from '@bitsocialhq/pkc-react-hooks';
import useSpecialThemeStore from '../stores/use-special-theme-store';
import { isChristmas } from '../lib/utils/time-utils';