@revenuecat/purchases-ui-js 0.0.18 → 0.0.20

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.
@@ -79,6 +79,11 @@ interface SharedComponentProps extends PaywallComponent, ActionsProps, PurchaseS
79
79
  interface Action {
80
80
  type: "restore_purchases" | "navigate_to" | "navigate_back" | "purchase" | "select_package";
81
81
  }
82
+ type OverrideProps<T> = {
83
+ states?: {
84
+ [state: string]: T;
85
+ };
86
+ };
82
87
  export interface RestorePurchasesAction extends Action {
83
88
  type: "restore_purchases";
84
89
  }
@@ -149,9 +154,7 @@ export interface StackProps extends SharedComponentProps {
149
154
  horizontal_alignment: keyof typeof TextAlignments;
150
155
  background_color: ColorType;
151
156
  };
152
- overrides?: {
153
- [state: string]: StackProps;
154
- };
157
+ overrides?: OverrideProps<StackProps>;
155
158
  }
156
159
  export interface TextNodeProps extends SharedComponentProps {
157
160
  background_color?: ColorType;
@@ -167,9 +170,7 @@ export interface TextNodeProps extends SharedComponentProps {
167
170
  type: "text";
168
171
  size: SizeType;
169
172
  variableDictionary?: VariableDictionary;
170
- overrides?: {
171
- [state: string]: TextNodeProps;
172
- };
173
+ overrides?: OverrideProps<TextNodeProps>;
173
174
  }
174
175
  type ImageSourceDictionaryType = {
175
176
  original: string;
@@ -193,13 +194,11 @@ export interface ImageProps extends SharedComponentProps {
193
194
  fit_mode: FitTypes;
194
195
  size: SizeType;
195
196
  source: ImageSourceType;
196
- gradient_colors?: ColorType[];
197
+ color_overlay?: ColorType;
197
198
  mask_shape?: ImageMaskShapeType;
198
199
  max_height?: number;
199
200
  override_source_lid?: string;
200
- overrides?: {
201
- [state: string]: ImageProps;
202
- };
201
+ overrides?: OverrideProps<ImageProps>;
203
202
  }
204
203
  export type ItemProps = {
205
204
  title: {
@@ -8,7 +8,6 @@ export declare const gradientPaywallData: PaywallData;
8
8
  export declare const calmPaywallData: PaywallData;
9
9
  export declare const stateTemplate: PaywallData;
10
10
  export declare const posterMakerTemplate: PaywallData;
11
- export declare const e2eTestTemplate: PaywallData;
12
11
  export declare const zStackTemplate: PaywallData;
13
12
  export declare const labelsData: {
14
13
  en_US: {
@@ -22,3 +21,4 @@ export declare const colorModeOverrideTemplate: PaywallData;
22
21
  export declare const paywallWithFooter: PaywallData;
23
22
  export declare const errorPaywallData: PaywallData;
24
23
  export declare const fallbackPaywallData: PaywallData;
24
+ export declare const e2eTestTemplate: PaywallData;