hive-react-kit 1.12.6 → 1.12.8

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.
@@ -52,3 +52,4 @@ export declare function parseHiveFrontendUrl(href: string): HiveLinkTarget | nul
52
52
  */
53
53
  export declare function preLinkMentions(body: string, usertagUrlFn?: (username: string) => string): string;
54
54
  export declare function preLinkUrls(body: string): string;
55
+ export declare function preLinkHashtags(body: string, tagLinkUrlFn?: (tag: string) => string): string;
@@ -11,6 +11,14 @@ export declare function hasCurationVoterVoted(votes?: ActiveVote[] | null): bool
11
11
  * slider won't reopen for content the user already voted on, curation
12
12
  * needs a separate, vote-free entry point for that scenario. */
13
13
  export declare function hasUserVoted(votes: ActiveVote[] | null | undefined, username: string | null | undefined): boolean;
14
+ /** The vote weight (0–100) `username` already cast on this content, or 0
15
+ * if they haven't voted. Companion to `hasUserVoted` — the curation
16
+ * request needs the curator's own vote weight reported alongside it,
17
+ * and in the already-voted flow (see `VoteSlider`'s `alreadyVoted` mode)
18
+ * that vote already happened, so it has to be read back from
19
+ * `active_votes` rather than captured live from a slider. Hive's raw
20
+ * `percent` field is basis points (10000 = 100%), hence the /100. */
21
+ export declare function getUserVoteWeight(votes: ActiveVote[] | null | undefined, username: string | null | undefined): number;
14
22
  /** True when the content was published via the HiveSuite app. Checks,
15
23
  * in order:
16
24
  * - `json_metadata.app` names it (e.g. `"hivesuite/1.2.3"`)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hive-react-kit",
3
3
  "private": false,
4
- "version": "1.12.6",
4
+ "version": "1.12.8",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.esm.js",
@@ -1,29 +0,0 @@
1
- type CurationType = 'post' | 'snap' | 'comment';
2
- interface CurationStatus {
3
- maxWeight: number;
4
- alreadySubmitted: boolean;
5
- }
6
- interface CurationButtonProps {
7
- author: string;
8
- permlink: string;
9
- type: CurationType;
10
- onCurationRequest: (author: string, permlink: string, weight: number) => void | Promise<void>;
11
- /** Looks up the max slider weight for this content type, plus whether
12
- * it's already been submitted for curation by any curator. Checked
13
- * fresh every time the modal opens. */
14
- onFetchCurationStatus?: (author: string, permlink: string, type: CurationType) => Promise<CurationStatus>;
15
- }
16
- /**
17
- * Fallback curation entry point — for curators who already spent their
18
- * own vote on this content (before the curation feature existed, or
19
- * simply voted before deciding to curate). The vote slider's "Request
20
- * curation" toggle can't help there since it never reopens once you've
21
- * voted, so this is a separate, vote-free trigger.
22
- *
23
- * Only ever rendered by the caller when: `isCurator && onCurationRequest
24
- * && isHiveSuiteContent(...) && !hasCurationVoterVoted(...) &&
25
- * hasUserVoted(votes, currentUser)` — i.e. exactly the case the merged
26
- * vote-slider flow can't cover.
27
- */
28
- export declare function CurationButton({ author, permlink, type, onCurationRequest, onFetchCurationStatus }: CurationButtonProps): import("react/jsx-runtime").JSX.Element;
29
- export {};