hive-react-kit 0.8.4 → 0.8.5

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.
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { type PostingSignMessageFn } from '../../services/hiveImageUpload';
2
3
  export interface PostComposerProps {
3
4
  onSubmit: (body: string) => void | boolean | Promise<void | boolean>;
4
5
  onCancel?: () => void;
@@ -8,6 +9,10 @@ export interface PostComposerProps {
8
9
  parentPermlink?: string;
9
10
  /** Ecency image hosting token — enables image/video thumbnail upload and paste/drag upload */
10
11
  ecencyToken?: string;
12
+ /** Optional signer used when Ecency image uploads fail. Signs a posting-key message for images.hive.blog. */
13
+ onSignMessage?: PostingSignMessageFn;
14
+ /** Hive username used for the signed images.hive.blog fallback upload. */
15
+ signingUsername?: string;
11
16
  /** 3Speak API key — enables audio and video upload */
12
17
  threeSpeakApiKey?: string;
13
18
  /** GIPHY API key — enables GIF search */
@@ -65,8 +70,8 @@ export interface PostComposerProps {
65
70
  }
66
71
  /** @deprecated Use PostComposerProps instead */
67
72
  export type AddCommentInputProps = PostComposerProps;
68
- declare const PostComposer: ({ onSubmit, onCancel, currentUser, placeholder, parentAuthor, parentPermlink, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hideBold, hideItalic, hideLink, hideImage, hideAudio, hideVideo, hideEmoji, hideGif, hideCode, hideMention, hideTemplate, hidePreview, hidePoll, onPollChange, showCancel, submitLabel, title, defaultPreviewOn, value, onChange, disabled, hideSubmitArea, submitRef, hideUserHeader, bgColor, borderColor, disableAutoFocus, }: PostComposerProps) => import("react/jsx-runtime").JSX.Element;
73
+ declare const PostComposer: ({ onSubmit, onCancel, currentUser, placeholder, parentAuthor, parentPermlink, ecencyToken, onSignMessage, signingUsername, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hideBold, hideItalic, hideLink, hideImage, hideAudio, hideVideo, hideEmoji, hideGif, hideCode, hideMention, hideTemplate, hidePreview, hidePoll, onPollChange, showCancel, submitLabel, title, defaultPreviewOn, value, onChange, disabled, hideSubmitArea, submitRef, hideUserHeader, bgColor, borderColor, disableAutoFocus, }: PostComposerProps) => import("react/jsx-runtime").JSX.Element;
69
74
  /** @deprecated Use PostComposer instead */
70
- declare const AddCommentInput: ({ onSubmit, onCancel, currentUser, placeholder, parentAuthor, parentPermlink, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hideBold, hideItalic, hideLink, hideImage, hideAudio, hideVideo, hideEmoji, hideGif, hideCode, hideMention, hideTemplate, hidePreview, hidePoll, onPollChange, showCancel, submitLabel, title, defaultPreviewOn, value, onChange, disabled, hideSubmitArea, submitRef, hideUserHeader, bgColor, borderColor, disableAutoFocus, }: PostComposerProps) => import("react/jsx-runtime").JSX.Element;
75
+ declare const AddCommentInput: ({ onSubmit, onCancel, currentUser, placeholder, parentAuthor, parentPermlink, ecencyToken, onSignMessage, signingUsername, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hideBold, hideItalic, hideLink, hideImage, hideAudio, hideVideo, hideEmoji, hideGif, hideCode, hideMention, hideTemplate, hidePreview, hidePoll, onPollChange, showCancel, submitLabel, title, defaultPreviewOn, value, onChange, disabled, hideSubmitArea, submitRef, hideUserHeader, bgColor, borderColor, disableAutoFocus, }: PostComposerProps) => import("react/jsx-runtime").JSX.Element;
71
76
  export { PostComposer };
72
77
  export default AddCommentInput;
@@ -1,9 +1,14 @@
1
1
  import React from "react";
2
+ import { type PostingSignMessageFn } from "../../services/hiveImageUpload";
2
3
  export interface ImageUploaderProps {
3
4
  /** Called with the uploaded image URL */
4
5
  onImageUploaded: (imageUrl: string) => void;
5
6
  /** Ecency image hosting token for upload authentication */
6
7
  ecencyToken?: string;
8
+ /** Optional signer used when the Ecency upload fails. Signs a posting-key message. */
9
+ onSignMessage?: PostingSignMessageFn;
10
+ /** Hive username used for the signed images.hive.blog fallback upload. */
11
+ signingUsername?: string;
7
12
  disabled?: boolean;
8
13
  }
9
14
  declare const ImageUploader: React.FC<ImageUploaderProps>;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { type PostingSignMessageFn } from '../../services/hiveImageUpload';
2
3
  export interface VideoUploaderProps {
3
4
  /** Called with embed URL, upload URL, aspect ratio, and optional local file for preview */
4
5
  onVideoUploaded: (videoEmbedUrl: string, uploadUrl: string, aspectRatio: string, localPreviewFile?: File) => void;
@@ -6,6 +7,8 @@ export interface VideoUploaderProps {
6
7
  username?: string;
7
8
  /** Ecency image hosting token for thumbnail upload */
8
9
  ecencyToken?: string;
10
+ /** Optional signer used when the Ecency thumbnail upload fails. */
11
+ onSignMessage?: PostingSignMessageFn;
9
12
  /** 3Speak API key. Falls back to demo key if not provided. */
10
13
  threeSpeakApiKey?: string;
11
14
  disabled?: boolean;