@revenuecat/purchases-ui-js 0.0.15 → 0.0.16

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.
@@ -5,8 +5,9 @@ import { getActiveStateProps, getGradientStyle, getMaskStyle, getSizeStyle, } fr
5
5
  * @returns Object containing image style variables and gradient style variables
6
6
  */
7
7
  export const getImageComponentStyles = (props) => {
8
- const { gradient_colors, colorMode, mask_shape, size, max_height, // TODO: implement this. still waiting on spec
9
- override_source_lid, // TODO: Implement this once structure is defined
8
+ const { gradient_colors, colorMode, mask_shape, size,
9
+ // max_height, // TODO: implement this. still waiting on spec
10
+ // override_source_lid, // TODO: Implement this once structure is defined
10
11
  overrides, componentState, } = props;
11
12
  const activeStateProps = getActiveStateProps(overrides, componentState);
12
13
  const gradientStyles = getGradientStyle(colorMode, activeStateProps?.gradient_colors || gradient_colors);
@@ -16,7 +16,7 @@ type TextStyleVariables = {
16
16
  * @returns Object containing text style variables and the appropriate HTML tag to render
17
17
  */
18
18
  export declare const getTextComponentStyles: (props: TextNodeProps) => {
19
- textStyles: TextStyleVariables;
20
- tagToRender: TextComponentTags;
19
+ textStyles: Partial<TextStyleVariables>;
20
+ tagToRender: Partial<TextComponentTags>;
21
21
  };
22
22
  export {};
@@ -2,7 +2,7 @@ import type { BorderType, ColorMode, ColorType, CornerRadiusType, DimensionType,
2
2
  import type { PurchaseState } from "./state";
3
3
  import type { VariableDictionary } from "../utils/variable-utils";
4
4
  export interface Extra {
5
- [key: string]: any;
5
+ [key: string]: unknown;
6
6
  }
7
7
  export type ComponentTypes = "stack" | "text" | "image" | "button" | "purchase_button" | "footer" | "package";
8
8
  export interface PaywallComponent extends Extra {
@@ -10,8 +10,6 @@ export interface PaywallComponent extends Extra {
10
10
  id: string;
11
11
  name: string;
12
12
  }
13
- export interface Text extends PaywallComponent {
14
- }
15
13
  export interface Stack extends PaywallComponent {
16
14
  spacing: number;
17
15
  components: PaywallComponent[];
@@ -48,8 +46,8 @@ export interface ComponentConfig {
48
46
  };
49
47
  }
50
48
  export interface ComponentLocalizations extends Extra {
51
- en_US: {
52
- [key: string]: string;
49
+ [locale: string]: {
50
+ [label_id: string]: string;
53
51
  };
54
52
  }
55
53
  export interface PaywallData extends Extra {
@@ -130,9 +128,7 @@ export interface StackProps extends SharedComponentProps {
130
128
  spacing?: number;
131
129
  type: "stack";
132
130
  overrides?: {
133
- states: {
134
- [state: string]: StackProps;
135
- };
131
+ [state: string]: StackProps;
136
132
  };
137
133
  }
138
134
  export interface TextNodeProps extends SharedComponentProps {
@@ -150,9 +146,7 @@ export interface TextNodeProps extends SharedComponentProps {
150
146
  size: SizeType;
151
147
  variableDictionary?: VariableDictionary;
152
148
  overrides?: {
153
- states: {
154
- [state: string]: TextNodeProps;
155
- };
149
+ [state: string]: TextNodeProps;
156
150
  };
157
151
  }
158
152
  type ImageSourceDictionaryType = Record<"original" | "heic" | "heic_low_res" | "webp" | "webp_low_res", string>;
@@ -174,9 +168,7 @@ export interface ImageProps extends SharedComponentProps {
174
168
  max_height?: number;
175
169
  override_source_lid?: string;
176
170
  overrides?: {
177
- states: {
178
- [state: string]: ImageProps;
179
- };
171
+ [state: string]: ImageProps;
180
172
  };
181
173
  }
182
174
  export {};
@@ -8,6 +8,7 @@ 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 testTemplate: PaywallData;
11
12
  export declare const labelsData: {
12
13
  en_US: {
13
14
  id1: string;