react-mail-inbox 1.5.2 → 1.5.3
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/dist/index.d.mts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -24,16 +24,35 @@ interface EmailData {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
interface GmailInboxProps {
|
|
27
|
+
/** Function to fetch recipient suggestions based on input. */
|
|
27
28
|
fetchEmailOptions: (currentEmail: string) => Promise<EmailOption[]>;
|
|
29
|
+
/** Callback triggered when the email is "sent" or updated. */
|
|
28
30
|
handleChange: (emailData: EmailData) => void;
|
|
31
|
+
/** Initial values for the email fields (to, subject, body, etc.). */
|
|
29
32
|
initialData?: Partial<EmailData>;
|
|
33
|
+
/** Default theme for the inbox component ('light' or 'dark'). Defaults to 'dark'. */
|
|
30
34
|
initialTheme?: Theme;
|
|
35
|
+
/** Callback triggered when the theme is toggled. */
|
|
31
36
|
onThemeChange?: (theme: Theme) => void;
|
|
37
|
+
/** Component to render on the left side of the toolbar. */
|
|
32
38
|
leftChildren?: ReactNode;
|
|
39
|
+
/** Component to render on the right side of the toolbar. */
|
|
33
40
|
rightChildren?: ReactNode;
|
|
41
|
+
/** If true, only the editor body is rendered, hiding the to/cc/bcc/subject fields. */
|
|
34
42
|
showOnlyBody?: boolean;
|
|
43
|
+
/** Optional: Configuration for Google Drive integration. */
|
|
44
|
+
googleDriveConfig?: {
|
|
45
|
+
/** The OAuth 2.0 Client ID for your Google Cloud project. */
|
|
46
|
+
clientId: string;
|
|
47
|
+
/** The API Key for your Google Cloud project. */
|
|
48
|
+
apiKey: string;
|
|
49
|
+
/** Optional: Scopes required for the Drive picker. */
|
|
50
|
+
scopes?: string;
|
|
51
|
+
/** Optional: Discovery doc URLs for Google APIs. */
|
|
52
|
+
discoveryDocs?: string[];
|
|
53
|
+
};
|
|
35
54
|
}
|
|
36
|
-
declare function GmailInbox({ fetchEmailOptions, handleChange, initialData, initialTheme, onThemeChange, leftChildren, rightChildren, showOnlyBody, }: GmailInboxProps): react_jsx_runtime.JSX.Element;
|
|
55
|
+
declare function GmailInbox({ fetchEmailOptions, handleChange, initialData, initialTheme, onThemeChange, leftChildren, rightChildren, showOnlyBody, googleDriveConfig, }: GmailInboxProps): react_jsx_runtime.JSX.Element;
|
|
37
56
|
|
|
38
57
|
type Alignment = "left" | "center" | "right";
|
|
39
58
|
|
package/dist/index.d.ts
CHANGED
|
@@ -24,16 +24,35 @@ interface EmailData {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
interface GmailInboxProps {
|
|
27
|
+
/** Function to fetch recipient suggestions based on input. */
|
|
27
28
|
fetchEmailOptions: (currentEmail: string) => Promise<EmailOption[]>;
|
|
29
|
+
/** Callback triggered when the email is "sent" or updated. */
|
|
28
30
|
handleChange: (emailData: EmailData) => void;
|
|
31
|
+
/** Initial values for the email fields (to, subject, body, etc.). */
|
|
29
32
|
initialData?: Partial<EmailData>;
|
|
33
|
+
/** Default theme for the inbox component ('light' or 'dark'). Defaults to 'dark'. */
|
|
30
34
|
initialTheme?: Theme;
|
|
35
|
+
/** Callback triggered when the theme is toggled. */
|
|
31
36
|
onThemeChange?: (theme: Theme) => void;
|
|
37
|
+
/** Component to render on the left side of the toolbar. */
|
|
32
38
|
leftChildren?: ReactNode;
|
|
39
|
+
/** Component to render on the right side of the toolbar. */
|
|
33
40
|
rightChildren?: ReactNode;
|
|
41
|
+
/** If true, only the editor body is rendered, hiding the to/cc/bcc/subject fields. */
|
|
34
42
|
showOnlyBody?: boolean;
|
|
43
|
+
/** Optional: Configuration for Google Drive integration. */
|
|
44
|
+
googleDriveConfig?: {
|
|
45
|
+
/** The OAuth 2.0 Client ID for your Google Cloud project. */
|
|
46
|
+
clientId: string;
|
|
47
|
+
/** The API Key for your Google Cloud project. */
|
|
48
|
+
apiKey: string;
|
|
49
|
+
/** Optional: Scopes required for the Drive picker. */
|
|
50
|
+
scopes?: string;
|
|
51
|
+
/** Optional: Discovery doc URLs for Google APIs. */
|
|
52
|
+
discoveryDocs?: string[];
|
|
53
|
+
};
|
|
35
54
|
}
|
|
36
|
-
declare function GmailInbox({ fetchEmailOptions, handleChange, initialData, initialTheme, onThemeChange, leftChildren, rightChildren, showOnlyBody, }: GmailInboxProps): react_jsx_runtime.JSX.Element;
|
|
55
|
+
declare function GmailInbox({ fetchEmailOptions, handleChange, initialData, initialTheme, onThemeChange, leftChildren, rightChildren, showOnlyBody, googleDriveConfig, }: GmailInboxProps): react_jsx_runtime.JSX.Element;
|
|
37
56
|
|
|
38
57
|
type Alignment = "left" | "center" | "right";
|
|
39
58
|
|