@redsift/products 12.5.9-muiv7 → 12.5.9

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/bimi-checker.d.ts CHANGED
@@ -1,8 +1,67 @@
1
1
  import * as _redsift_design_system from '@redsift/design-system';
2
- import React, { ComponentProps, ReactNode } from 'react';
2
+ import React, { ReactNode, ComponentProps } from 'react';
3
3
  import { CardStatus } from '@redsift/signal-logic';
4
4
  export { BIMI_CHECKER_SIGNAL_TYPES, BimiCheckerSignalType, CARD_STATUS, SIGNAL_TYPES, STATUS_COLORS, STATUS_ICONS, STATUS_ICON_STYLES, SignalType, getStatusColor, getStatusIcon, getStatusIconStyle, isCardStatus, isFailureStatus, isSuccessStatus, isWarningStatus, mapStatusToDetailedCardColor, normalizeStatus } from '@redsift/signal-logic';
5
5
 
6
+ /**
7
+ * Signal Cards Theme Configuration
8
+ *
9
+ * This context provides theme configuration to signal card components,
10
+ * eliminating the need to pass `useInvestigateColors` through every component layer.
11
+ */
12
+ interface SignalCardTheme {
13
+ /**
14
+ * Whether to use Investigate-specific colors and fonts.
15
+ * When true, applies custom fonts and color palette for the Investigate tool.
16
+ */
17
+ useInvestigateColors: boolean;
18
+ }
19
+ interface SignalCardThemeProviderProps {
20
+ children: ReactNode;
21
+ /**
22
+ * Theme configuration to apply to all signal card descendants
23
+ */
24
+ theme?: Partial<SignalCardTheme>;
25
+ }
26
+ /**
27
+ * Provider component for Signal Card theming.
28
+ *
29
+ * Wrap signal card components with this provider to set theme options
30
+ * without passing props through every component level.
31
+ *
32
+ * This provider injects CSS custom properties (--sc-*) that components use for styling.
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * <SignalCardThemeProvider theme={{ useInvestigateColors: true }}>
37
+ * <SignalCardList signals={signals} />
38
+ * </SignalCardThemeProvider>
39
+ * ```
40
+ */
41
+ declare const SignalCardThemeProvider: React.FC<SignalCardThemeProviderProps>;
42
+ /**
43
+ * Hook to access the current signal card theme.
44
+ *
45
+ * Components can use this hook to access theme configuration
46
+ * without requiring explicit props.
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * const { useInvestigateColors } = useSignalCardTheme();
51
+ * ```
52
+ */
53
+ declare const useSignalCardTheme: () => SignalCardTheme;
54
+ /**
55
+ * Hook that combines prop value with context value.
56
+ * Prop value takes precedence over context when explicitly provided.
57
+ *
58
+ * Components can receive useInvestigateColors via props or context.
59
+ *
60
+ * @param propValue - Explicitly passed prop value (takes precedence)
61
+ * @returns Resolved theme configuration
62
+ */
63
+ declare const useResolvedTheme: (propValue?: boolean) => SignalCardTheme;
64
+
6
65
  /**
7
66
  * Common props shared by all signal card components. These cover layout options
8
67
  * that ultimately map to `SignalCardNormal`.
@@ -35,34 +94,22 @@ interface SignalCardSharedProps extends Omit<ComponentProps<'div'>, 'children' |
35
94
  }
36
95
 
37
96
  /**
38
- * SPF report item from the BIMI Checker API
39
- */
40
- interface SpfReportItem {
41
- status?: string;
42
- message?: string;
43
- spfError?: string;
44
- }
45
- interface SpfDetails {
46
- raw?: string | string[] | null;
47
- status?: string | null;
48
- txtExtractedFrom?: string | null;
49
- report?: SpfReportItem[];
50
- [key: string]: unknown;
51
- }
52
- /**
53
- * Props for the SignalCardSpfDomain component.
54
- *
55
- * Simplified SPF Domain Card for BIMI Checker - shows only pass/fail status and raw SPF record.
97
+ * Component props.
56
98
  */
57
- interface SignalCardSpfDomainProps extends SignalCardSharedProps {
99
+ interface SignalCardBimiProps extends SignalCardSharedProps {
58
100
  /**
59
- * JMAP data containing SPF authentication results
101
+ * JMAP data containing BIMI and DMARC information from the email security report.
60
102
  */
61
- jmap?: {
62
- extsecrep?: {
63
- spf?: SpfDetails | null;
64
- } | null;
65
- } | null;
103
+ jmap: {
104
+ extsecrep: {
105
+ bimi?: any;
106
+ dmarc?: any;
107
+ };
108
+ };
109
+ /**
110
+ * Optional callback invoked when the component mounts.
111
+ */
112
+ onComponentMount?: () => void;
66
113
  }
67
114
 
68
115
  type DmarcResult = {
@@ -91,82 +138,35 @@ interface SignalCardDmarcDomainProps extends SignalCardSharedProps {
91
138
  }
92
139
 
93
140
  /**
94
- * Component props.
141
+ * SPF report item from the BIMI Checker API
95
142
  */
96
- interface SignalCardBimiProps extends SignalCardSharedProps {
97
- /**
98
- * JMAP data containing BIMI and DMARC information from the email security report.
99
- */
100
- jmap: {
101
- extsecrep: {
102
- bimi?: any;
103
- dmarc?: any;
104
- };
105
- };
106
- /**
107
- * Optional callback invoked when the component mounts.
108
- */
109
- onComponentMount?: () => void;
143
+ interface SpfReportItem {
144
+ status?: string;
145
+ message?: string;
146
+ spfError?: string;
147
+ }
148
+ interface SpfDetails {
149
+ raw?: string | string[] | null;
150
+ status?: string | null;
151
+ txtExtractedFrom?: string | null;
152
+ report?: SpfReportItem[];
153
+ [key: string]: unknown;
110
154
  }
111
-
112
155
  /**
113
- * Signal Cards Theme Configuration
156
+ * Props for the SignalCardSpfDomain component.
114
157
  *
115
- * This context provides theme configuration to signal card components,
116
- * eliminating the need to pass `useInvestigateColors` through every component layer.
158
+ * Simplified SPF Domain Card for BIMI Checker - shows only pass/fail status and raw SPF record.
117
159
  */
118
- interface SignalCardTheme {
119
- /**
120
- * Whether to use Investigate-specific colors and fonts.
121
- * When true, applies custom fonts and color palette for the Investigate tool.
122
- */
123
- useInvestigateColors: boolean;
124
- }
125
- interface SignalCardThemeProviderProps {
126
- children: ReactNode;
160
+ interface SignalCardSpfDomainProps extends SignalCardSharedProps {
127
161
  /**
128
- * Theme configuration to apply to all signal card descendants
162
+ * JMAP data containing SPF authentication results
129
163
  */
130
- theme?: Partial<SignalCardTheme>;
164
+ jmap?: {
165
+ extsecrep?: {
166
+ spf?: SpfDetails | null;
167
+ } | null;
168
+ } | null;
131
169
  }
132
- /**
133
- * Provider component for Signal Card theming.
134
- *
135
- * Wrap signal card components with this provider to set theme options
136
- * without passing props through every component level.
137
- *
138
- * This provider injects CSS custom properties (--sc-*) that components use for styling.
139
- *
140
- * @example
141
- * ```tsx
142
- * <SignalCardThemeProvider theme={{ useInvestigateColors: true }}>
143
- * <SignalCardList signals={signals} />
144
- * </SignalCardThemeProvider>
145
- * ```
146
- */
147
- declare const SignalCardThemeProvider: React.FC<SignalCardThemeProviderProps>;
148
- /**
149
- * Hook to access the current signal card theme.
150
- *
151
- * Components can use this hook to access theme configuration
152
- * without requiring explicit props.
153
- *
154
- * @example
155
- * ```tsx
156
- * const { useInvestigateColors } = useSignalCardTheme();
157
- * ```
158
- */
159
- declare const useSignalCardTheme: () => SignalCardTheme;
160
- /**
161
- * Hook that combines prop value with context value.
162
- * Prop value takes precedence over context when explicitly provided.
163
- *
164
- * Components can receive useInvestigateColors via props or context.
165
- *
166
- * @param propValue - Explicitly passed prop value (takes precedence)
167
- * @returns Resolved theme configuration
168
- */
169
- declare const useResolvedTheme: (propValue?: boolean) => SignalCardTheme;
170
170
 
171
171
  /**
172
172
  * BIMI signal card - displays Brand Indicators for Message Identification status.