@embedreach/components 0.1.20 → 0.1.21

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.ts CHANGED
@@ -1,8 +1,187 @@
1
- import { default as ReachProvider } from './common/providers/ReachProvider';
2
- import { SegmentBuilder } from './common/components/automations/SegmentBuilder/SegmentBuilder';
1
+ import { default as default_2 } from 'react';
2
+ import { ForwardRefExoticComponent } from 'react';
3
+ import { LucideProps } from 'lucide-react';
4
+ import { RefAttributes } from 'react';
3
5
 
4
- export { ReachProvider }
6
+ export declare const CreateAutomationModal: default_2.FC<CreateAutomationModalProps>;
5
7
 
6
- export { SegmentBuilder }
8
+ declare interface CreateAutomationModalProps {
9
+ /**
10
+ * Optional callback when the segment builder is closed
11
+ * @param createdAutomation - The created automation id or false if the automation was not created, 'error' if there was an error
12
+ */
13
+ onClose?: (createdAutomation: string | false | 'error') => void;
14
+ /**
15
+ * Optional keys to override the default tailwind class definitions
16
+ */
17
+ tailwindClassDefinitions?: {
18
+ [key in (typeof TailwindClassDefinitionsKeys)[number]]?: string;
19
+ };
20
+ /**
21
+ * Optional keys to override the default icon definitions
22
+ */
23
+ iconDefinitions?: {
24
+ [key in (typeof IconDefinitionsKeys)[number]]?: default_2.ReactNode;
25
+ };
26
+ }
27
+
28
+ /**
29
+ * Represents the available features in our application.
30
+ * Each feature corresponds to a specific section of the marketing hub.
31
+ */
32
+ declare type FeatureKey = 'measure-dashboard' | 'measure-setup' | 'acquire-setup' | 'engage-segment-builder' | 'engage-automations-create-modal' | 'engage-automations-view-modal';
33
+
34
+ declare const IconDefinitions: {
35
+ CloseButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
36
+ DropdownMenuTrigger: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
37
+ UserIcon: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
38
+ ScheduleButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
39
+ SendButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
40
+ BackButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
41
+ NextButton: ForwardRefExoticComponent<Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
42
+ };
43
+
44
+ declare const IconDefinitionsKeys: string[];
45
+
46
+ declare type IconDefinitionsType = typeof IconDefinitions;
47
+
48
+ /**
49
+ * Complete SDK configuration interface
50
+ * @interface ReachConfig
51
+ */
52
+ export declare interface ReachConfig {
53
+ theme?: ThemeConfig;
54
+ authToken: string;
55
+ tenantExternalId: string;
56
+ /** Event callbacks */
57
+ callbacks?: SDKCallbacks;
58
+ /** Initial feature to load */
59
+ feature?: FeatureKey;
60
+ /** Debug configuration */
61
+ debug?: boolean;
62
+ }
63
+
64
+ export declare const ReachProvider: default_2.FC<ReachConfig & {
65
+ children?: default_2.ReactNode;
66
+ }>;
67
+
68
+ /**
69
+ * Callback function for requesting new token from parent
70
+ * @callback ReauthCallback@callback ReauthCallback
71
+ * @returns {Promise<string> | void} New JWT token or void if sending message from iframe
72
+ */
73
+ declare type ReauthCallback = () => Promise<string> | void;
74
+
75
+ /**
76
+ * Callback configuration for SDK events
77
+ * @interface SDKCallbacks
78
+ */
79
+ declare interface SDKCallbacks {
80
+ /** Called when reauthentication is required */
81
+ onReauthRequested: ReauthCallback;
82
+ /** Called when tenant information is requested */
83
+ onTenantInformationRequested: () => void;
84
+ }
85
+
86
+ export declare const SegmentBuilder: default_2.FC<SegmentBuilderProps>;
87
+
88
+ declare interface SegmentBuilderProps {
89
+ /**
90
+ * Optional callback when the segment builder is closed
91
+ * @param createdSegment - The created segment id or false if the segment was not created, 'error' if there was an error
92
+ */
93
+ onClose?: (createdSegment: string | false | 'error') => void;
94
+ /**
95
+ * Optional keys to override the default tailwind class definitions
96
+ */
97
+ tailwindClassDefinitions?: {
98
+ [key in (typeof TailwindClassDefinitionsKeys)[number]]?: string;
99
+ };
100
+ /**
101
+ * Optional keys to override the default icon definitions
102
+ */
103
+ iconDefinitions?: IconDefinitionsType;
104
+ }
105
+
106
+ declare const TailwindClassDefinitionsKeys: string[];
107
+
108
+ /**
109
+ * Theme initialization options that can be passed to ReachProvider
110
+ */
111
+ export declare interface ThemeConfig {
112
+ /** Optional overrides for theme styles */
113
+ styles: Partial<ThemeStyles>;
114
+ /** Dark mode toggle */
115
+ darkMode?: boolean;
116
+ }
117
+
118
+ /**
119
+ * Theme styles incorporating shadcn variables
120
+ *
121
+ * Matches what we say in our dev docs here:
122
+ * https://docs.embedreach.com/sdk/customization
123
+ *
124
+ * @interface ThemeStyles
125
+ */
126
+ declare interface ThemeStyles {
127
+ background?: string;
128
+ foreground?: string;
129
+ card?: string;
130
+ 'card-foreground'?: string;
131
+ popover?: string;
132
+ 'popover-foreground'?: string;
133
+ primary?: string;
134
+ 'primary-foreground'?: string;
135
+ secondary?: string;
136
+ 'secondary-foreground'?: string;
137
+ muted?: string;
138
+ 'muted-foreground'?: string;
139
+ accent?: string;
140
+ 'accent-foreground'?: string;
141
+ destructive?: string;
142
+ 'destructive-foreground'?: string;
143
+ border?: string;
144
+ input?: string;
145
+ ring?: string;
146
+ 'chart-1'?: string;
147
+ 'chart-2'?: string;
148
+ 'chart-3'?: string;
149
+ 'chart-4'?: string;
150
+ 'chart-5'?: string;
151
+ radius?: string;
152
+ }
153
+
154
+ export declare const ViewAutomationModal: default_2.FC<ViewAutomationModalProps>;
155
+
156
+ declare type ViewAutomationModalProps = {
157
+ /**
158
+ * The id of the automation to view
159
+ */
160
+ automationId: string;
161
+ /**
162
+ * Optionally auto open the edit automation popup
163
+ */
164
+ autoOpenEditPopup?: boolean;
165
+ /**
166
+ * Optional keys to override the default tailwind class definitions
167
+ */
168
+ tailwindClassDefinitions?: {
169
+ [key in (typeof TailwindClassDefinitionsKeys)[number]]?: string;
170
+ };
171
+ /**
172
+ * Optional keys to override the default icon definitions
173
+ */
174
+ iconDefinitions?: {
175
+ [key in (typeof IconDefinitionsKeys)[number]]?: default_2.ReactNode;
176
+ };
177
+ };
7
178
 
8
179
  export { }
180
+
181
+
182
+ declare module 'i18next' {
183
+ interface CustomTypeOptions {
184
+ defaultNS: 'common';
185
+ resources: typeof defaultTranslations;
186
+ }
187
+ }