@bitsocial/bitsocial-react-hooks 0.1.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/LICENSE +674 -0
- package/README.md +1365 -0
- package/dist/hooks/accounts/accounts.d.ts +64 -0
- package/dist/hooks/accounts/accounts.d.ts.map +1 -0
- package/dist/hooks/accounts/accounts.js +706 -0
- package/dist/hooks/accounts/accounts.js.map +1 -0
- package/dist/hooks/accounts/index.d.ts +2 -0
- package/dist/hooks/accounts/index.d.ts.map +1 -0
- package/dist/hooks/accounts/index.js +2 -0
- package/dist/hooks/accounts/index.js.map +1 -0
- package/dist/hooks/accounts/utils.d.ts +6 -0
- package/dist/hooks/accounts/utils.d.ts.map +1 -0
- package/dist/hooks/accounts/utils.js +226 -0
- package/dist/hooks/accounts/utils.js.map +1 -0
- package/dist/hooks/actions/actions.d.ts +19 -0
- package/dist/hooks/actions/actions.d.ts.map +1 -0
- package/dist/hooks/actions/actions.js +552 -0
- package/dist/hooks/actions/actions.js.map +1 -0
- package/dist/hooks/actions/index.d.ts +2 -0
- package/dist/hooks/actions/index.d.ts.map +1 -0
- package/dist/hooks/actions/index.js +2 -0
- package/dist/hooks/actions/index.js.map +1 -0
- package/dist/hooks/authors/author-avatars.d.ts +28 -0
- package/dist/hooks/authors/author-avatars.d.ts.map +1 -0
- package/dist/hooks/authors/author-avatars.js +191 -0
- package/dist/hooks/authors/author-avatars.js.map +1 -0
- package/dist/hooks/authors/authors.d.ts +37 -0
- package/dist/hooks/authors/authors.d.ts.map +1 -0
- package/dist/hooks/authors/authors.js +509 -0
- package/dist/hooks/authors/authors.js.map +1 -0
- package/dist/hooks/authors/index.d.ts +2 -0
- package/dist/hooks/authors/index.d.ts.map +1 -0
- package/dist/hooks/authors/index.js +2 -0
- package/dist/hooks/authors/index.js.map +1 -0
- package/dist/hooks/authors/utils.d.ts +4 -0
- package/dist/hooks/authors/utils.d.ts.map +1 -0
- package/dist/hooks/authors/utils.js +21 -0
- package/dist/hooks/authors/utils.js.map +1 -0
- package/dist/hooks/comments.d.ts +17 -0
- package/dist/hooks/comments.d.ts.map +1 -0
- package/dist/hooks/comments.js +351 -0
- package/dist/hooks/comments.js.map +1 -0
- package/dist/hooks/communities.d.ts +31 -0
- package/dist/hooks/communities.d.ts.map +1 -0
- package/dist/hooks/communities.js +389 -0
- package/dist/hooks/communities.js.map +1 -0
- package/dist/hooks/feeds/feeds.d.ts +18 -0
- package/dist/hooks/feeds/feeds.d.ts.map +1 -0
- package/dist/hooks/feeds/feeds.js +315 -0
- package/dist/hooks/feeds/feeds.js.map +1 -0
- package/dist/hooks/feeds/index.d.ts +2 -0
- package/dist/hooks/feeds/index.d.ts.map +1 -0
- package/dist/hooks/feeds/index.js +2 -0
- package/dist/hooks/feeds/index.js.map +1 -0
- package/dist/hooks/pkc-rpc.d.ts +7 -0
- package/dist/hooks/pkc-rpc.d.ts.map +1 -0
- package/dist/hooks/pkc-rpc.js +88 -0
- package/dist/hooks/pkc-rpc.js.map +1 -0
- package/dist/hooks/replies.d.ts +5 -0
- package/dist/hooks/replies.d.ts.map +1 -0
- package/dist/hooks/replies.js +155 -0
- package/dist/hooks/replies.js.map +1 -0
- package/dist/hooks/states.d.ts +15 -0
- package/dist/hooks/states.d.ts.map +1 -0
- package/dist/hooks/states.js +213 -0
- package/dist/hooks/states.js.map +1 -0
- package/dist/hooks/utils/use-interval.d.ts +3 -0
- package/dist/hooks/utils/use-interval.d.ts.map +1 -0
- package/dist/hooks/utils/use-interval.js +36 -0
- package/dist/hooks/utils/use-interval.js.map +1 -0
- package/dist/hooks/utils/use-previous.d.ts +1 -0
- package/dist/hooks/utils/use-previous.js +10 -0
- package/dist/index.d.ts +82 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +128 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/chain/chain.d.ts +36 -0
- package/dist/lib/chain/chain.d.ts.map +1 -0
- package/dist/lib/chain/chain.js +195 -0
- package/dist/lib/chain/chain.js.map +1 -0
- package/dist/lib/chain/index.d.ts +4 -0
- package/dist/lib/chain/index.d.ts.map +1 -0
- package/dist/lib/chain/index.js +4 -0
- package/dist/lib/chain/index.js.map +1 -0
- package/dist/lib/community-address.d.ts +6 -0
- package/dist/lib/community-address.d.ts.map +1 -0
- package/dist/lib/community-address.js +26 -0
- package/dist/lib/community-address.js.map +1 -0
- package/dist/lib/community-ref.d.ts +23 -0
- package/dist/lib/community-ref.d.ts.map +1 -0
- package/dist/lib/community-ref.js +113 -0
- package/dist/lib/community-ref.js.map +1 -0
- package/dist/lib/debug-utils.d.ts +9 -0
- package/dist/lib/debug-utils.d.ts.map +1 -0
- package/dist/lib/debug-utils.js +21 -0
- package/dist/lib/debug-utils.js.map +1 -0
- package/dist/lib/feed-sort-type.d.ts +2 -0
- package/dist/lib/feed-sort-type.d.ts.map +1 -0
- package/dist/lib/feed-sort-type.js +22 -0
- package/dist/lib/feed-sort-type.js.map +1 -0
- package/dist/lib/localforage-lru/index.d.ts +3 -0
- package/dist/lib/localforage-lru/index.d.ts.map +1 -0
- package/dist/lib/localforage-lru/index.js +46 -0
- package/dist/lib/localforage-lru/index.js.map +1 -0
- package/dist/lib/localforage-lru/localforage-lru.d.ts +6 -0
- package/dist/lib/localforage-lru/localforage-lru.d.ts.map +1 -0
- package/dist/lib/localforage-lru/localforage-lru.js +182 -0
- package/dist/lib/localforage-lru/localforage-lru.js.map +1 -0
- package/dist/lib/pkc-compat.d.ts +25 -0
- package/dist/lib/pkc-compat.d.ts.map +1 -0
- package/dist/lib/pkc-compat.js +131 -0
- package/dist/lib/pkc-compat.js.map +1 -0
- package/dist/lib/pkc-js/fixtures/markdown-example.d.ts +3 -0
- package/dist/lib/pkc-js/fixtures/markdown-example.d.ts.map +1 -0
- package/dist/lib/pkc-js/fixtures/markdown-example.js +280 -0
- package/dist/lib/pkc-js/fixtures/markdown-example.js.map +1 -0
- package/dist/lib/pkc-js/index.d.ts +11 -0
- package/dist/lib/pkc-js/index.d.ts.map +1 -0
- package/dist/lib/pkc-js/index.js +85 -0
- package/dist/lib/pkc-js/index.js.map +1 -0
- package/dist/lib/pkc-js/pkc-js-mock-content.d.ts +3 -0
- package/dist/lib/pkc-js/pkc-js-mock-content.d.ts.map +1 -0
- package/dist/lib/pkc-js/pkc-js-mock-content.js +1235 -0
- package/dist/lib/pkc-js/pkc-js-mock-content.js.map +1 -0
- package/dist/lib/pkc-js/pkc-js-mock.d.ts +137 -0
- package/dist/lib/pkc-js/pkc-js-mock.d.ts.map +1 -0
- package/dist/lib/pkc-js/pkc-js-mock.js +644 -0
- package/dist/lib/pkc-js/pkc-js-mock.js.map +1 -0
- package/dist/lib/polyfill.d.ts +3 -0
- package/dist/lib/polyfill.d.ts.map +1 -0
- package/dist/lib/polyfill.js +14 -0
- package/dist/lib/polyfill.js.map +1 -0
- package/dist/lib/protocol-compat.d.ts +14 -0
- package/dist/lib/protocol-compat.d.ts.map +1 -0
- package/dist/lib/protocol-compat.js +67 -0
- package/dist/lib/protocol-compat.js.map +1 -0
- package/dist/lib/test-utils.d.ts +29 -0
- package/dist/lib/test-utils.d.ts.map +1 -0
- package/dist/lib/test-utils.js +184 -0
- package/dist/lib/test-utils.js.map +1 -0
- package/dist/lib/utils/comment-moderation.d.ts +4 -0
- package/dist/lib/utils/comment-moderation.d.ts.map +1 -0
- package/dist/lib/utils/comment-moderation.js +56 -0
- package/dist/lib/utils/comment-moderation.js.map +1 -0
- package/dist/lib/utils/index.d.ts +4 -0
- package/dist/lib/utils/index.d.ts.map +1 -0
- package/dist/lib/utils/index.js +4 -0
- package/dist/lib/utils/index.js.map +1 -0
- package/dist/lib/utils/utils.d.ts +23 -0
- package/dist/lib/utils/utils.d.ts.map +1 -0
- package/dist/lib/utils/utils.js +375 -0
- package/dist/lib/utils/utils.js.map +1 -0
- package/dist/lib/validator.d.ts +30 -0
- package/dist/lib/validator.d.ts.map +1 -0
- package/dist/lib/validator.js +307 -0
- package/dist/lib/validator.js.map +1 -0
- package/dist/stores/accounts/account-generator.d.ts +51 -0
- package/dist/stores/accounts/account-generator.d.ts.map +1 -0
- package/dist/stores/accounts/account-generator.js +160 -0
- package/dist/stores/accounts/account-generator.js.map +1 -0
- package/dist/stores/accounts/accounts-actions-internal.d.ts +8 -0
- package/dist/stores/accounts/accounts-actions-internal.d.ts.map +1 -0
- package/dist/stores/accounts/accounts-actions-internal.js +403 -0
- package/dist/stores/accounts/accounts-actions-internal.js.map +1 -0
- package/dist/stores/accounts/accounts-actions.d.ts +46 -0
- package/dist/stores/accounts/accounts-actions.d.ts.map +1 -0
- package/dist/stores/accounts/accounts-actions.js +1341 -0
- package/dist/stores/accounts/accounts-actions.js.map +1 -0
- package/dist/stores/accounts/accounts-database.d.ts +34 -0
- package/dist/stores/accounts/accounts-database.d.ts.map +1 -0
- package/dist/stores/accounts/accounts-database.js +685 -0
- package/dist/stores/accounts/accounts-database.js.map +1 -0
- package/dist/stores/accounts/accounts-store.d.ts +32 -0
- package/dist/stores/accounts/accounts-store.d.ts.map +1 -0
- package/dist/stores/accounts/accounts-store.js +169 -0
- package/dist/stores/accounts/accounts-store.js.map +1 -0
- package/dist/stores/accounts/index.d.ts +4 -0
- package/dist/stores/accounts/index.d.ts.map +1 -0
- package/dist/stores/accounts/index.js +4 -0
- package/dist/stores/accounts/index.js.map +1 -0
- package/dist/stores/accounts/utils.d.ts +49 -0
- package/dist/stores/accounts/utils.d.ts.map +1 -0
- package/dist/stores/accounts/utils.js +419 -0
- package/dist/stores/accounts/utils.js.map +1 -0
- package/dist/stores/authors-comments/authors-comments-store.d.ts +37 -0
- package/dist/stores/authors-comments/authors-comments-store.d.ts.map +1 -0
- package/dist/stores/authors-comments/authors-comments-store.js +338 -0
- package/dist/stores/authors-comments/authors-comments-store.js.map +1 -0
- package/dist/stores/authors-comments/index.d.ts +4 -0
- package/dist/stores/authors-comments/index.d.ts.map +1 -0
- package/dist/stores/authors-comments/index.js +4 -0
- package/dist/stores/authors-comments/index.js.map +1 -0
- package/dist/stores/authors-comments/utils.d.ts +14 -0
- package/dist/stores/authors-comments/utils.d.ts.map +1 -0
- package/dist/stores/authors-comments/utils.js +81 -0
- package/dist/stores/authors-comments/utils.js.map +1 -0
- package/dist/stores/comments/comments-store.d.ts +19 -0
- package/dist/stores/comments/comments-store.d.ts.map +1 -0
- package/dist/stores/comments/comments-store.js +385 -0
- package/dist/stores/comments/comments-store.js.map +1 -0
- package/dist/stores/comments/index.d.ts +4 -0
- package/dist/stores/comments/index.d.ts.map +1 -0
- package/dist/stores/comments/index.js +4 -0
- package/dist/stores/comments/index.js.map +1 -0
- package/dist/stores/communities/communities-store.d.ts +17 -0
- package/dist/stores/communities/communities-store.d.ts.map +1 -0
- package/dist/stores/communities/communities-store.js +304 -0
- package/dist/stores/communities/communities-store.js.map +1 -0
- package/dist/stores/communities/index.d.ts +4 -0
- package/dist/stores/communities/index.d.ts.map +1 -0
- package/dist/stores/communities/index.js +4 -0
- package/dist/stores/communities/index.js.map +1 -0
- package/dist/stores/communities-pages/communities-pages-store.d.ts +23 -0
- package/dist/stores/communities-pages/communities-pages-store.d.ts.map +1 -0
- package/dist/stores/communities-pages/communities-pages-store.js +316 -0
- package/dist/stores/communities-pages/communities-pages-store.js.map +1 -0
- package/dist/stores/communities-pages/index.d.ts +4 -0
- package/dist/stores/communities-pages/index.d.ts.map +1 -0
- package/dist/stores/communities-pages/index.js +4 -0
- package/dist/stores/communities-pages/index.js.map +1 -0
- package/dist/stores/feeds/feed-sorter.d.ts +5 -0
- package/dist/stores/feeds/feed-sorter.d.ts.map +1 -0
- package/dist/stores/feeds/feed-sorter.js +135 -0
- package/dist/stores/feeds/feed-sorter.js.map +1 -0
- package/dist/stores/feeds/feeds-store.d.ts +25 -0
- package/dist/stores/feeds/feeds-store.d.ts.map +1 -0
- package/dist/stores/feeds/feeds-store.js +459 -0
- package/dist/stores/feeds/feeds-store.js.map +1 -0
- package/dist/stores/feeds/index.d.ts +4 -0
- package/dist/stores/feeds/index.d.ts.map +1 -0
- package/dist/stores/feeds/index.js +4 -0
- package/dist/stores/feeds/index.js.map +1 -0
- package/dist/stores/feeds/utils.d.ts +43 -0
- package/dist/stores/feeds/utils.d.ts.map +1 -0
- package/dist/stores/feeds/utils.js +736 -0
- package/dist/stores/feeds/utils.js.map +1 -0
- package/dist/stores/replies/index.d.ts +4 -0
- package/dist/stores/replies/index.d.ts.map +1 -0
- package/dist/stores/replies/index.js +4 -0
- package/dist/stores/replies/index.js.map +1 -0
- package/dist/stores/replies/replies-comments-store.d.ts +8 -0
- package/dist/stores/replies/replies-comments-store.d.ts.map +1 -0
- package/dist/stores/replies/replies-comments-store.js +23 -0
- package/dist/stores/replies/replies-comments-store.js.map +1 -0
- package/dist/stores/replies/replies-store.d.ts +29 -0
- package/dist/stores/replies/replies-store.d.ts.map +1 -0
- package/dist/stores/replies/replies-store.js +413 -0
- package/dist/stores/replies/replies-store.js.map +1 -0
- package/dist/stores/replies/utils.d.ts +25 -0
- package/dist/stores/replies/utils.d.ts.map +1 -0
- package/dist/stores/replies/utils.js +549 -0
- package/dist/stores/replies/utils.js.map +1 -0
- package/dist/stores/replies-pages/index.d.ts +4 -0
- package/dist/stores/replies-pages/index.d.ts.map +1 -0
- package/dist/stores/replies-pages/index.js +4 -0
- package/dist/stores/replies-pages/index.js.map +1 -0
- package/dist/stores/replies-pages/replies-pages-store.d.ts +20 -0
- package/dist/stores/replies-pages/replies-pages-store.d.ts.map +1 -0
- package/dist/stores/replies-pages/replies-pages-store.js +270 -0
- package/dist/stores/replies-pages/replies-pages-store.js.map +1 -0
- package/dist/stores/replies-pages/utils.d.ts +3 -0
- package/dist/stores/replies-pages/utils.d.ts.map +1 -0
- package/dist/stores/replies-pages/utils.js +43 -0
- package/dist/stores/replies-pages/utils.js.map +1 -0
- package/dist/types.d.ts +638 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +160 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,sEAAsE","sourcesContent":["// Note: the commented out types are TODO functionalities to implement\n\n/**\n * Public interface\n */\n\nexport interface Options {\n accountName?: string;\n onError?(error: Error): void;\n}\n\nexport interface Result {\n state: string;\n error: Error | undefined;\n errors: Error[];\n}\n\nexport interface NameResolverInfo {\n key: string;\n nameSystem: string;\n chainTicker: string;\n provider: string;\n providerLabel: string;\n}\n\nexport type CommunityIdentifier =\n | {\n name: string;\n publicKey?: string;\n }\n | {\n name?: string;\n publicKey: string;\n };\n\n// useAccount(options): result\nexport interface UseAccountOptions extends Options {}\nexport interface UseAccountResult extends Result, Account {}\n\n// useAccounts(options): result\nexport interface UseAccountsOptions extends Options {}\nexport interface UseAccountsResult extends Result {\n accounts: Account[];\n}\n\n// useAccountComments(options): result\nexport interface UseAccountCommentsOptions extends Options {\n filter?: AccountPublicationsFilter;\n commentCid?: string;\n commentIndices?: number[];\n communityAddress?: string;\n parentCid?: string;\n newerThan?: number;\n page?: number;\n pageSize?: number;\n sortType?: \"new\" | \"old\";\n /** @deprecated use sortType */\n order?: \"asc\" | \"desc\";\n}\nexport interface UseAccountCommentsResult extends Result {\n accountComments: AccountComment[];\n}\n\n// useAccountComment(options): result\nexport interface UseAccountCommentOptions extends Options {\n commentIndex?: number;\n commentCid?: string;\n}\nexport interface UseAccountCommentResult extends Result, AccountComment {}\n\n// useAccountVotes(options): result\nexport interface UseAccountVotesOptions extends Options {\n filter?: AccountPublicationsFilter;\n vote?: number;\n commentCid?: string;\n communityAddress?: string;\n newerThan?: number;\n page?: number;\n pageSize?: number;\n sortType?: \"new\" | \"old\";\n /** @deprecated use sortType */\n order?: \"asc\" | \"desc\";\n}\nexport interface UseAccountVotesResult extends Result {\n accountVotes: AccountVote[];\n}\n\n// useAccountVote(options): result\nexport interface UseAccountVoteOptions extends Options {\n commentCid?: string;\n}\nexport interface UseAccountVoteResult extends Result, AccountVote {\n commentCid: string | undefined;\n vote: number | undefined;\n}\n\n// useAccountEdits(options): result\nexport interface UseAccountEditsOptions extends Options {\n filter?: AccountPublicationsFilter;\n}\nexport interface UseAccountEditsResult extends Result {\n accountEdits: AccountEdit[];\n}\n\n// useNotifications(options): result\nexport interface UseNotificationsOptions extends Options {}\nexport interface UseNotificationsResult extends Result {\n notifications: Notification[];\n markAsRead(): Promise<void>;\n}\n\n// useAccountCommunities(options): result\nexport interface UseAccountCommunitiesOptions extends Options {\n onlyIfCached?: boolean;\n}\nexport interface UseAccountCommunitiesResult extends Result {\n accountCommunities: { [communityAddress: string]: AccountCommunity & Partial<Community> };\n}\n\n// usePubsubSubscribe(options): result\nexport interface UsePubsubSubscribeOptions extends Options {\n communityAddress?: string;\n}\nexport interface UsePubsubSubscribeResult extends Result {}\n\n// useComment(options): result\nexport interface UseCommentOptions extends Options {\n commentCid?: string;\n onlyIfCached?: boolean;\n autoUpdate?: boolean;\n}\nexport interface UseCommentResult extends Result, Comment {\n refresh(): Promise<void>;\n}\n\n// useComments(options): result\nexport interface UseCommentsOptions extends Options {\n commentCids?: string[];\n onlyIfCached?: boolean;\n autoUpdate?: boolean;\n}\nexport interface UseCommentsResult extends Result {\n // TODO: remove | undefined, that shouldn't happen when comments have comment.state\n comments: (Comment | undefined)[];\n refresh(): Promise<void>;\n}\n\n// useValidateComment(options): result\nexport interface UseValidateCommentOptions extends Options {\n comment?: Comment;\n validateReplies?: boolean;\n}\nexport interface UseValidateCommentResult extends Result {\n valid: boolean;\n}\n\n// useCommentThumbnailUrl(options): result\n// export interface UseCommentThumbnailUrlOptions extends Options {\n// comment?: Comment\n// }\n// export interface UseCommentThumbnailUrlResult extends Result {\n// thumnbailUrl: string | undefined\n// }\n\n// useReplies(options): result\nexport interface UseRepliesOptions extends Options {\n comment?: Comment;\n onlyIfCached?: boolean;\n sortType?: string;\n repliesPerPage?: number;\n flat?: boolean;\n flatDepth?: number;\n accountComments?: FeedOptionsAccountComments;\n filter?: CommentsFilter;\n validateOptimistically?: boolean; // assume replies are valid to first render immediately, then validate, then remove invalid replies, generally safe because validation takes less than 100ms\n streamPage?: boolean; // by default, replies with depth > 1 won't continuously fill the page until repliesPerPage is reached, to not displace the UI\n}\nexport interface UseRepliesResult extends Result {\n replies: Comment[];\n bufferedReplies: Comment[];\n updatedReplies: Comment[];\n hasMore: boolean;\n loadMore(): Promise<void>;\n reset(): Promise<void>;\n}\n\n// useEditedComment(options): result\nexport interface UseEditedCommentOptions extends Options {\n comment?: Comment;\n}\nexport interface UseEditedCommentResult extends Result {\n // editedComment only contains the succeeded and pending props, failed props aren't added\n editedComment: Comment | undefined;\n succeededEdits: { [succeededEditPropertyName: string]: any };\n pendingEdits: { [pendingEditPropertyName: string]: any };\n failedEdits: { [failedEditPropertyName: string]: any };\n // state: 'initializing' | 'unedited' | 'succeeded' | 'pending' | 'failed'\n}\n\n// useCommunity(options): result\nexport interface UseCommunityOptions extends Options {\n community?: CommunityIdentifier;\n onlyIfCached?: boolean;\n}\nexport interface UseCommunityResult extends Result, Community {}\n\n// useCommunities(options): result\nexport interface UseCommunitiesOptions extends Options {\n communities?: CommunityIdentifier[];\n onlyIfCached?: boolean;\n}\nexport interface UseCommunitiesResult extends Result {\n communities: (Community | undefined)[];\n}\n\n// useCommunityStats(options): result\nexport interface UseCommunityStatsOptions extends Options {\n community?: CommunityIdentifier;\n onlyIfCached?: boolean;\n}\nexport interface UseCommunityStatsResult extends Result, CommunityStats {}\n\n// useResolvedCommunityAddress(options): result\nexport interface UseResolvedCommunityAddressOptions extends Options {\n communityAddress: string | undefined;\n cache?: boolean;\n}\nexport interface UseResolvedCommunityAddressResult extends Result {\n resolvedAddress: string | undefined;\n chainProvider: ChainProvider | undefined;\n}\n\n// useFeed(options): result\nexport interface UseFeedOptions extends Options {\n communities?: CommunityIdentifier[];\n sortType?: string;\n postsPerPage?: number;\n newerThan?: number;\n accountComments?: FeedOptionsAccountComments;\n filter?: CommentsFilter;\n modQueue?: string[];\n}\nexport interface UseFeedResult extends Result {\n feed: Comment[];\n hasMore: boolean;\n loadMore(): Promise<void>;\n expandTimeWindow(newerThan?: number): Promise<void>;\n communityKeysWithNewerPosts: string[];\n reset(): Promise<void>;\n}\n\n// useBufferedFeeds(options): result\nexport interface UseBufferedFeedsOptions extends Options {\n feedsOptions?: UseFeedOptions[];\n}\nexport interface UseBufferedFeedsResult extends Result {\n bufferedFeeds: Comment[][];\n}\n\n// useAuthor(options): result\nexport interface UseAuthorOptions extends Options {\n authorAddress?: string;\n // the last known comment cid of this author (required, can't fetch author from author address alone)\n commentCid?: string;\n}\nexport interface UseAuthorResult extends Result {\n author: Author | undefined;\n}\n\n// useAuthorComments(options): result\nexport interface UseAuthorCommentsOptions extends Options {\n authorAddress?: string;\n // the last known comment cid of this author (required, can't fetch author comment from author address alone)\n commentCid?: string;\n // TODO: add filter\n filter?: CommentsFilter;\n}\nexport interface UseAuthorCommentsResult extends Result {\n // TODO: remove | undefined, that shouldn't happen when comments have comment.state\n authorComments: (Comment | undefined)[];\n lastCommentCid: string | undefined;\n hasMore: boolean;\n loadMore(): Promise<void>;\n}\n\n// useResolvedAuthorAddress(options): result\nexport interface UseResolvedAuthorAddressOptions extends Options {\n author?: Author;\n cache?: boolean;\n}\nexport interface UseResolvedAuthorAddressResult extends Result {\n resolvedAddress: string | undefined;\n chainProvider: ChainProvider | undefined;\n nameResolver: NameResolverInfo | undefined;\n}\n\n// useAuthorAvatar(options): result\nexport interface UseAuthorAvatarOptions extends Options {\n author?: Author;\n}\nexport interface UseAuthorAvatarResult extends Result {\n imageUrl: string | undefined;\n metadataUrl: string | undefined;\n chainProvider: ChainProvider | undefined;\n}\n\n// useAuthorAddress(options): result\nexport interface UseAuthorAddressOptions extends Options {\n comment?: Comment;\n}\nexport interface UseAuthorAddressResult extends Result {\n authorAddress: string | undefined;\n shortAuthorAddress: string | undefined;\n authorAddressChanged: boolean;\n}\n\n// useCreateAccount(options): result\n// export interface UseCreateAccountOptions extends Options {}\n// export interface UseCreateAccountResult extends Result {\n// createdAccount: Account | undefined\n// createAccount(): Promise<void>\n// }\n\n// useDeleteAccount(options): result\n// export interface UseDeleteAccountOptions extends Options {}\n// export interface UseDeleteAccountResult extends Result {\n// deletedAccount: Account | undefined\n// deleteAccount(): Promise<void>\n// }\n\n// useSetAccount(options): result\n// export interface UseSetAccountOptions extends Options {\n// account?: Account\n// }\n// export interface UseSetAccountResult extends Result {\n// account: Account | undefined\n// setAccount(): Promise<void>\n// }\n\n// useSetActiveAccount(options): result\n// export interface UseSetActiveAccountOptions extends Options {\n// activeAccount?: string\n// }\n// export interface UseSetActiveAccountResult extends Result {\n// activeAccount: string | undefined\n// setActiveAccount(): Promise<void>\n// }\n\n// useSetAccountsOrder(options): result\n// export interface UseSetAccountsOrderOptions extends Options {\n// accountsOrder?: string[]\n// }\n// export interface UseSetAccountsOrderResult extends Result {\n// accountsOrder: string[]\n// setAccountsOrder(): Promise<void>\n// }\n\n// useImportAccount(options): result\n// export interface UseImportAccountOptions extends Options {\n// account?: string\n// }\n// export interface UseImportAccountResult extends Result {\n// importedAccount: Account | undefined\n// importAccount(): Promise<void>\n// }\n\n// useExportAccount(options): result\n// export interface UseExportAccountOptions extends Options {}\n// export interface UseExportAccountResult extends Result {\n// exportedAccount: string | undefined\n// exportAccount(): Promise<void>\n// }\n\n// usePublishComment(options): result\nexport interface UsePublishCommentOptions extends Options {\n onChallenge?(challenge: Challenge, comment?: Comment): Promise<void>;\n onChallengeVerification?(\n challengeVerification: ChallengeVerification,\n comment?: Comment,\n ): Promise<void>;\n [publishOption: string]: any;\n}\nexport interface UsePublishCommentResult extends Result {\n index: number | undefined;\n challenge: Challenge | undefined;\n challengeVerification: ChallengeVerification | undefined;\n publishComment(): Promise<void>;\n abandonPublish(): Promise<void>;\n publishChallengeAnswers(challengeAnswers: string[]): Promise<void>;\n}\n\n// usePublishVote(options): result\nexport interface UsePublishVoteOptions extends Options {\n onChallenge?(challenge: Challenge, comment?: Comment): Promise<void>;\n onChallengeVerification?(\n challengeVerification: ChallengeVerification,\n comment?: Comment,\n ): Promise<void>;\n [publishOption: string]: any;\n}\nexport interface UsePublishVoteResult extends Result {\n challenge: Challenge | undefined;\n challengeVerification: ChallengeVerification | undefined;\n publishVote(): Promise<void>;\n publishChallengeAnswers(challengeAnswers: string[]): Promise<void>;\n}\n\n// usePublishCommentEdit(options): result\nexport interface UsePublishCommentEditOptions extends Options {\n onChallenge?(challenge: Challenge, comment?: Comment): Promise<void>;\n onChallengeVerification?(\n challengeVerification: ChallengeVerification,\n comment?: Comment,\n ): Promise<void>;\n [publishOption: string]: any;\n}\nexport interface UsePublishCommentEditResult extends Result {\n challenge: Challenge | undefined;\n challengeVerification: ChallengeVerification | undefined;\n publishCommentEdit(): Promise<void>;\n publishChallengeAnswers(challengeAnswers: string[]): Promise<void>;\n}\n\n// usePublishCommentModeration(options): result\nexport interface UsePublishCommentModerationOptions extends Options {\n onChallenge?(challenge: Challenge, comment?: Comment): Promise<void>;\n onChallengeVerification?(\n challengeVerification: ChallengeVerification,\n comment?: Comment,\n ): Promise<void>;\n [publishOption: string]: any;\n}\nexport interface UsePublishCommentModerationResult extends Result {\n challenge: Challenge | undefined;\n challengeVerification: ChallengeVerification | undefined;\n publishCommentModeration(): Promise<void>;\n publishChallengeAnswers(challengeAnswers: string[]): Promise<void>;\n}\n\n// usePublishCommunityEdit(options): result\nexport interface UsePublishCommunityEditOptions extends Options {\n communityAddress?: string;\n onChallenge?(challenge: Challenge, comment?: Comment): Promise<void>;\n onChallengeVerification?(\n challengeVerification: ChallengeVerification,\n comment?: Comment,\n ): Promise<void>;\n [publishOption: string]: any;\n}\nexport interface UsePublishCommunityEditResult extends Result {\n challenge: Challenge | undefined;\n challengeVerification: ChallengeVerification | undefined;\n publishCommunityEdit(): Promise<void>;\n publishChallengeAnswers(challengeAnswers: string[]): Promise<void>;\n}\n\n// useCreateCommunity(options): result\nexport interface UseCreateCommunityOptions extends Options {\n [createCommunityOption: string]: any;\n}\nexport interface UseCreateCommunityResult extends Result {\n createdCommunity: Community | undefined;\n createCommunity(): Promise<void>;\n}\n\n// useDeleteCommunity(options): result\n// export interface UseDeleteCommunityOptions extends Options {\n// communityAddress?: string\n// }\n// export interface UseDeleteCommunityResult extends Result {\n// deletedCommunity: Community | undefined\n// deleteCommunity(): Promise<void>\n// }\n\n// useSubscribe(options): result\nexport interface UseSubscribeOptions extends Options {\n communityAddress?: string;\n multisubAddress?: string;\n authorAddress?: string;\n}\nexport interface UseSubscribeResult extends Result {\n subscribed: boolean | undefined;\n subscribe(): Promise<void>;\n unsubscribe(): Promise<void>;\n}\n\n// useBlock(options): result\nexport interface UseBlockOptions extends Options {\n address?: string;\n cid?: string;\n}\nexport interface UseBlockResult extends Result {\n blocked: boolean | undefined;\n block(): Promise<void>;\n unblock(): Promise<void>;\n}\n\n// useNotify(options): result\n// export interface UseNotifyOptions extends Options {\n// communityAddress?: string\n// multisubAddress?: string\n// authorAddress?: string\n// commentCid?: string\n// }\n// export interface UseNotifyCommunityResult extends Result {\n// notifying: boolean | undefined\n// notify(): Promise<void>\n// unnotify(): Promise<void>\n// }\n\n// useLimit(options): result\n// export interface UseLimitOptions extends Options {\n// address?: string\n// }\n// export interface UseLimitResult extends Result {\n// limited: number | undefined\n// limit(): Promise<void>\n// unlimit(): Promise<void>\n// }\n\n// useSave(options): result\n// export interface UseSaveOptions extends Options {\n// commentCid?: string\n// }\n// export interface UseSaveResult extends Result {\n// saved: boolean | undefined\n// save(): Promise<void>\n// unsave(): Promise<void>\n// }\n\n// useDeleteComment(options): result\n// export interface UseDeleteCommentOptions extends Options {\n// commentCid?: string\n// accountCommentIndex?: number\n// }\n// export interface UseDeleteCommentResult extends Result {\n// deletedComment: Comment | undefined\n// deleteComment(): Promise<void>\n// undeleteComment(): Promise<void>\n// }\n\nexport interface UseClientsStatesOptions extends Options {\n comment?: Comment;\n community?: Community;\n}\ntype ClientUrls = string[];\ntype Peer = string;\nexport interface UseClientsStatesResult extends Result {\n states: { [state: string]: ClientUrls };\n peers: { [clientUrl: string]: Peer[] };\n}\n\nexport interface UseCommunitiesStatesOptions extends Options {\n communities?: CommunityIdentifier[];\n}\nexport interface UseCommunitiesStatesResult extends Result {\n states: { [state: string]: { communityAddresses: string[]; clientUrls: string[] } };\n peers: { [clientUrl: string]: Peer[] };\n}\n\nexport type PkcRpcSettings = { [key: string]: any };\nexport interface UsePkcRpcSettingsOptions extends Options {}\nexport interface UsePkcRpcSettingsResult extends Result {\n pkcRpcSettings: PkcRpcSettings | undefined;\n setPkcRpcSettings(pkcRpcSettings: PkcRpcSettings): Promise<void>;\n}\n\n/**\n * TODO: define these types more in depth, most are already defined in:\n * https://github.com/pkcprotocol/pkc-js or\n * https://github.com/bitsocialnet/bitsocial-react-hooks/blob/master/docs/schema.md\n */\nexport type Account = { [key: string]: any };\nexport type AccountsActions = { [key: string]: any };\nexport type PublishCommentOptions = { [key: string]: any };\nexport type PublishVoteOptions = { [key: string]: any };\nexport type PublishCommentEditOptions = { [key: string]: any };\nexport type PublishCommentModerationOptions = { [key: string]: any };\nexport type PublishCommunityEditOptions = { [key: string]: any };\nexport type Challenge = { [key: string]: any };\nexport type ChallengeVerification = { [key: string]: any };\nexport type CreateCommentOptions = { [key: string]: any };\nexport type CreateCommunityOptions = { [key: string]: any };\nexport type CreateVoteOptions = { [key: string]: any };\nexport type Comment = { [key: string]: any };\nexport type Vote = { [key: string]: any };\nexport type CommentEdit = { [key: string]: any };\nexport type CommentModeration = { [key: string]: any };\nexport type CommunityEdit = { [key: string]: any };\nexport type Community = { [key: string]: any };\nexport type CommunityStats = { [key: string]: any };\nexport type Notification = { [key: string]: any };\nexport type Nft = { [key: string]: any };\nexport type Author = { [key: string]: any };\nexport type Wallet = { [key: string]: any };\n\n/**\n * Communities and comments store\n */\nexport type Communities = { [communityAddress: string]: Community };\nexport type Comments = { [commentCid: string]: Comment };\n\n/**\n * Accounts store\n */\nexport type Accounts = { [accountId: string]: Account };\nexport type AccountNamesToAccountIds = { [accountName: string]: string };\nexport interface AccountComment extends Comment {\n index: number;\n accountId: string;\n}\nexport type AccountComments = AccountComment[];\nexport type AccountsComments = { [accountId: string]: AccountComments };\nexport type AccountCommentsIndex = {\n byCommunityAddress: { [communityAddress: string]: number[] };\n byParentCid: { [parentCid: string]: number[] };\n};\nexport type AccountsCommentsIndexes = { [accountId: string]: AccountCommentsIndex };\nexport type CommentCidsToAccountsComments = {\n [commentCid: string]: { accountId: string; accountCommentIndex: number };\n};\nexport interface AccountCommentReply extends Comment {\n markedAsRead: boolean;\n}\nexport type AccountCommentsReplies = { [replyCid: string]: AccountCommentReply };\nexport type AccountsCommentsReplies = { [accountId: string]: AccountCommentsReplies };\nexport type AccountsNotifications = { [accountId: string]: Notification[] };\nexport type Role = {\n role: \"owner\" | \"admin\" | \"moderator\";\n};\nexport type AccountCommunity = {\n role: Role;\n};\nexport type AccountsVotes = { [accountId: string]: AccountVotes };\nexport type AccountVotes = { [commentCid: string]: AccountVote };\nexport type AccountVote = {\n // has all the publish options like commentCid, vote, timestamp, etc\n [publishOption: string]: any;\n};\nexport type AccountsEdits = { [accountId: string]: AccountEdits };\nexport type AccountEdits = { [commentCidOrCommunityAddress: string]: AccountEdit[] };\nexport type AccountEditPropertySummary = {\n timestamp: number;\n value: any;\n};\nexport type AccountEditsSummary = {\n [commentCidOrCommunityAddress: string]: {\n [propertyName: string]: AccountEditPropertySummary;\n };\n};\nexport type AccountsEditsSummaries = { [accountId: string]: AccountEditsSummary };\nexport type AccountEdit = {\n // has all the publish options like commentCid, vote, timestamp, etc (both comment edits and community edits)\n [publishOption: string]: any;\n};\nexport type AccountPublicationsFilter = (\n publication: AccountComment | AccountVote | AccountEdit,\n) => Boolean;\n\n/**\n * Feeds store\n */\nexport type Feed = Comment[];\nexport type Feeds = { [feedName: string]: Feed };\nexport type FeedOptions = {\n communities: CommunityIdentifier[];\n communityKeys: string[];\n sortType: string;\n requestedSortType: string;\n accountId: string;\n pageNumber: number;\n postsPerPage: number;\n filter: CommentsFilter;\n newerThan?: number;\n accountComments?: FeedOptionsAccountComments;\n modQueue?: string[];\n};\nexport type FeedOptionsAccountComments = {\n newerThan?: number;\n append?: boolean; // default to prepend, set append: true to append instead\n};\nexport type FeedsOptions = { [feedName: string]: FeedOptions };\nexport type FeedCommunitiesPostCounts = { [communityAddress: string]: number };\nexport type FeedsCommunitiesPostCounts = { [feedName: string]: FeedCommunitiesPostCounts };\nexport type CommunityPage = {\n nextCid?: string;\n comments: Comment[];\n};\nexport type CommunitiesPages = { [pageCid: string]: CommunityPage };\nexport type CommentsFilter = {\n filter(comment: Comment): Boolean;\n key: string;\n};\n\n/**\n * Replies store\n */\n// NOTE: to have different replies options for different depth, eg smaller repliesPerPage for depth > 1,\n// we will need another prop, eg `{depth: '>1': {repliesPerPage: 3}}`, because of how react renders work\nexport type RepliesFeedOptions = {\n commentCid: string;\n commentDepth: number;\n postCid: string;\n sortType: string;\n accountId: string;\n pageNumber: number;\n repliesPerPage: number;\n onlyIfCached?: boolean;\n flat?: boolean;\n accountComments?: FeedOptionsAccountComments;\n filter?: CommentsFilter;\n streamPage?: boolean; // by default, replies with depth > 1 won't continuously fill the page until repliesPerPage is reached, to not displace the UI\n};\nexport type RepliesFeedsOptions = { [feedName: string]: RepliesFeedOptions };\nexport type RepliesPage = CommunityPage;\nexport type RepliesPages = { [pageCid: string]: RepliesPage };\n\n/**\n * Authors comments store\n */\n// authorCommentsName is a string used a key to represent authorAddress + filter + accountId\nexport type AuthorsComments = { [authorCommentsName: string]: Comment[] };\nexport type AuthorCommentsOptions = {\n authorAddress: string;\n pageNumber: number;\n filter?: CommentsFilter;\n accountId: string;\n};\nexport type AuthorsCommentsOptions = { [authorCommentsName: string]: FeedOptions };\n\n/**\n * Other\n */\nexport type ChainProvider = {\n chainId?: number;\n urls?: string[];\n};\nexport type ChainProviders = { [chainTicker: string]: ChainProvider };\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bitsocial/bitsocial-react-hooks",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"author": "Bitsocial Forge",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"bitsocial"
|
|
7
|
+
],
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/bitsocialnet/bitsocial-react-hooks.git"
|
|
11
|
+
},
|
|
12
|
+
"license": "GPL-3.0-or-later",
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"version": "0.1.0",
|
|
17
|
+
"packageManager": "yarn@4.13.0",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"main": "dist/index.js",
|
|
22
|
+
"typings": "dist/index.d.ts",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"prebuild": "rm -rf dist",
|
|
25
|
+
"build": "node ./node_modules/typescript/bin/tsc --project config/tsconfig.json && node scripts/normalize-dist-esm.mjs && node scripts/verify-dist-esm.mjs",
|
|
26
|
+
"build:watch": "node ./node_modules/typescript/bin/tsc --project config/tsconfig.json --watch",
|
|
27
|
+
"knip": "knip --production --include dependencies,unlisted,binaries --no-progress",
|
|
28
|
+
"knip:full": "knip --no-progress --no-exit-code",
|
|
29
|
+
"test": "vitest run --config config/vitest.config.js",
|
|
30
|
+
"test:coverage": "vitest run --config config/vitest.config.js --coverage.enabled --coverage.provider=istanbul --coverage.reporter=text --coverage.reporter=json --coverage.reporter=json-summary --coverage.reportsDirectory=./coverage",
|
|
31
|
+
"test:coverage:hooks-stores": "yarn test:coverage && node scripts/verify-hooks-stores-coverage.mjs",
|
|
32
|
+
"test:e2e": "yarn test:e2e:mock && yarn test:e2e:chrome",
|
|
33
|
+
"test:e2e:mock": "cross-env MOCK=1 yarn test:e2e:chrome",
|
|
34
|
+
"test:e2e:mock-content": "cross-env MOCK_CONTENT=1 yarn test:e2e:chrome",
|
|
35
|
+
"test:e2e:chrome": "vitest run --config config/vitest-e2e.config.js",
|
|
36
|
+
"test:e2e:firefox": "cross-env FIREFOX=1 vitest run --config config/vitest-e2e.config.js",
|
|
37
|
+
"test:e2e:browser": "yarn test:e2e:chrome",
|
|
38
|
+
"test:server": "rm -rf .pkc/ .pkc/ && node test/test-server",
|
|
39
|
+
"test:server:wait-on": "wait-on http://localhost:59281 --timeout 120000",
|
|
40
|
+
"test:mock-content": "vitest run --config config/vitest.config.ts src/lib/pkc-js/pkc-js-mock-content.donttest.ts",
|
|
41
|
+
"lint": "oxlint src/**/*.{js,ts,tsx}",
|
|
42
|
+
"prettier": "oxfmt src/**/*.{js,ts,tsx} test/**/*.{js,ts,tsx} config/**/*.{js,ts,tsx}",
|
|
43
|
+
"type-check": "node ./node_modules/typescript/bin/tsc --noEmit --project config/tsconfig.json",
|
|
44
|
+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@bitsocial/bso-resolver": "0.0.6",
|
|
48
|
+
"@pkcprotocol/pkc-js": "0.0.18",
|
|
49
|
+
"@pkcprotocol/pkc-logger": "0.1.0",
|
|
50
|
+
"assert": "2.0.0",
|
|
51
|
+
"ethers": "5.8.0",
|
|
52
|
+
"localforage": "1.10.0",
|
|
53
|
+
"lodash.isequal": "4.5.0",
|
|
54
|
+
"memoizee": "0.4.15",
|
|
55
|
+
"multiformats": "13.4.2",
|
|
56
|
+
"peer-id": "0.16.0",
|
|
57
|
+
"quick-lru": "5.1.1",
|
|
58
|
+
"uint8arrays": "3.1.1",
|
|
59
|
+
"uuid": "11.1.0",
|
|
60
|
+
"viem": "2.45.0",
|
|
61
|
+
"zustand": "4.0.0"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"react": ">=16.8"
|
|
65
|
+
},
|
|
66
|
+
"resolutions": {
|
|
67
|
+
"follow-redirects": "1.16.0",
|
|
68
|
+
"protobufjs": "7.5.5",
|
|
69
|
+
"axios": "1.15.0",
|
|
70
|
+
"vite": "8.0.7",
|
|
71
|
+
"tar": "7.5.11",
|
|
72
|
+
"undici": "7.24.0",
|
|
73
|
+
"minimatch": "3.1.4",
|
|
74
|
+
"brace-expansion@npm:^1.1.7": "1.1.13",
|
|
75
|
+
"elliptic": "6.6.1",
|
|
76
|
+
"bn.js": "5.2.3",
|
|
77
|
+
"elliptic/bn.js": "4.12.3",
|
|
78
|
+
"handlebars@npm:^4.7.7": "4.7.9",
|
|
79
|
+
"jose": "4.15.5",
|
|
80
|
+
"lodash": "4.18.1",
|
|
81
|
+
"node-forge@npm:^1.2.1": "1.4.0",
|
|
82
|
+
"node-forge@npm:^1.3.1": "1.4.0",
|
|
83
|
+
"picomatch@npm:^2.3.1": "2.3.2",
|
|
84
|
+
"picomatch@npm:^4.0.1": "4.0.4",
|
|
85
|
+
"picomatch@npm:^4.0.3": "4.0.4",
|
|
86
|
+
"tmp": "0.2.4",
|
|
87
|
+
"@tootallnate/once": "3.0.1"
|
|
88
|
+
},
|
|
89
|
+
"devDependencies": {
|
|
90
|
+
"@testing-library/dom": "10.4.1",
|
|
91
|
+
"@testing-library/react": "16.3.2",
|
|
92
|
+
"@tsconfig/recommended": "1.0.13",
|
|
93
|
+
"@types/lodash.isequal": "4.5.6",
|
|
94
|
+
"@types/memoizee": "0.4.8",
|
|
95
|
+
"@types/node": "22.19.13",
|
|
96
|
+
"@types/react": "19.1.6",
|
|
97
|
+
"@types/react-dom": "19.1.6",
|
|
98
|
+
"@types/uuid": "11.0.0",
|
|
99
|
+
"@vitest/browser": "4.0.18",
|
|
100
|
+
"@vitest/browser-playwright": "4.0.18",
|
|
101
|
+
"@vitest/coverage-istanbul": "4.0.18",
|
|
102
|
+
"commitizen": "4.3.1",
|
|
103
|
+
"conventional-changelog-cli": "4.1.0",
|
|
104
|
+
"cross-env": "10.0.0",
|
|
105
|
+
"cz-conventional-changelog": "3.3.0",
|
|
106
|
+
"husky": "4.3.8",
|
|
107
|
+
"jsdom": "27.3.0",
|
|
108
|
+
"knip": "6.1.0",
|
|
109
|
+
"kubo": "0.39.0",
|
|
110
|
+
"lint-staged": "12.3.8",
|
|
111
|
+
"oxfmt": "0.36.0",
|
|
112
|
+
"oxlint": "1.51.0",
|
|
113
|
+
"playwright": "1.56.1",
|
|
114
|
+
"react": "19.1.0",
|
|
115
|
+
"react-dom": "19.1.0",
|
|
116
|
+
"tcp-port-used": "1.0.2",
|
|
117
|
+
"tempy": "1.0.1",
|
|
118
|
+
"typescript": "6.0.2",
|
|
119
|
+
"vite": "8.0.7",
|
|
120
|
+
"vitest": "4.0.18",
|
|
121
|
+
"wait-on": "9.0.3"
|
|
122
|
+
},
|
|
123
|
+
"lint-staged": {
|
|
124
|
+
"{src,test,config}/**/*.{cjs,js,jsx,ts,tsx}": [
|
|
125
|
+
"oxfmt --write"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"husky": {
|
|
129
|
+
"hooks": {
|
|
130
|
+
"prepare-commit-msg": "exec < /dev/tty && cz --hook || true",
|
|
131
|
+
"pre-commit": "lint-staged"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"config": {
|
|
135
|
+
"commitizen": {
|
|
136
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"knip": {
|
|
140
|
+
"ignoreDependencies": [
|
|
141
|
+
"assert",
|
|
142
|
+
"@vitest/browser",
|
|
143
|
+
"vite"
|
|
144
|
+
],
|
|
145
|
+
"ignoreFiles": [
|
|
146
|
+
"config/vitest-empty-alias.js",
|
|
147
|
+
"scripts/coverage-gaps.mjs",
|
|
148
|
+
"scripts/coverage-triage.mjs",
|
|
149
|
+
"src/global.d.ts",
|
|
150
|
+
"src/lib/pkc-js/pkc-js-mock-content.donttest.ts",
|
|
151
|
+
"test/browser-pkc-js-mock/**/*.test.js",
|
|
152
|
+
"test/browser-pkc-js-mock-content/**/*.test.js"
|
|
153
|
+
],
|
|
154
|
+
"ignoreIssues": {
|
|
155
|
+
"src/lib/debug-utils.ts": [
|
|
156
|
+
"exports"
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|