@revenuecat/purchases-ui-js 0.0.17 → 0.0.18
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/components/button/Button.svelte +0 -13
- package/dist/components/button/ButtonNode.stories.svelte +16 -9
- package/dist/components/button/ButtonNode.svelte +26 -1
- package/dist/components/button/button-utils.d.ts +2 -0
- package/dist/components/button/button-utils.js +19 -0
- package/dist/components/footer/Footer.stories.svelte +2 -0
- package/dist/components/footer/Footer.svelte +5 -5
- package/dist/components/image/Image.stories.svelte +6 -2
- package/dist/components/image/Image.svelte +20 -17
- package/dist/components/image/image-utils.d.ts +2 -12
- package/dist/components/image/image-utils.js +27 -10
- package/dist/components/package/Package.stories.svelte +5 -3
- package/dist/components/package/Package.svelte +15 -6
- package/dist/components/paywall/Node.svelte +72 -19
- package/dist/components/paywall/Node.svelte.d.ts +18 -1
- package/dist/components/paywall/Paywall.stories.svelte +14 -0
- package/dist/components/paywall/Paywall.svelte +73 -70
- package/dist/components/paywall/paywall-utils.d.ts +1 -1
- package/dist/components/paywall/paywall-utils.js +11 -9
- package/dist/components/purchase-button/PurchaseButton.stories.svelte +7 -6
- package/dist/components/purchase-button/PurchaseButton.svelte +24 -10
- package/dist/components/purchase-button/purchase-button-utils.d.ts +2 -0
- package/dist/components/purchase-button/purchase-button-utils.js +20 -0
- package/dist/components/stack/Stack.stories.svelte +1138 -4
- package/dist/components/stack/Stack.svelte +160 -45
- package/dist/components/stack/stack-utils.d.ts +24 -24
- package/dist/components/stack/stack-utils.js +244 -11
- package/dist/components/text/Text.svelte +24 -19
- package/dist/components/text/TextNode.stories.svelte +12 -11
- package/dist/components/text/TextNode.svelte +21 -24
- package/dist/components/text/text-utils.d.ts +9 -15
- package/dist/components/text/text-utils.js +121 -6
- package/dist/components/timeline/Timeline.svelte +10 -10
- package/dist/components/timeline/TimelineItem.svelte +45 -33
- package/dist/components/timeline/timeline-utils.d.ts +3 -20
- package/dist/components/timeline/timeline-utils.js +46 -11
- package/dist/data/entities.d.ts +33 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/stories/fixtures.d.ts +2 -0
- package/dist/stories/fixtures.js +5346 -1412
- package/dist/types.d.ts +4 -3
- package/dist/utils/style-utils.d.ts +66 -59
- package/dist/utils/style-utils.js +114 -96
- package/dist/utils/variable-utils.d.ts +27 -0
- package/dist/utils/variable-utils.js +37 -0
- package/package.json +3 -2
- package/dist/components/paywall/global-styles.css +0 -9
package/dist/data/entities.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { BorderType, CircleShape, ColorType, CornerRadiusType, DimensionType, FitTypes, FontSizeTags, FontWeights, RectangleShape, ShadowType, ShapeType, SizeType, Spacing, TextAlignments } from "../types";
|
|
1
|
+
import type { AlignmentType, BorderType, CircleShape, ColorType, CornerRadiusType, DimensionType, FitTypes, FontSizeTags, FontWeights, RectangleShape, ShadowType, ShapeType, SizeType, Spacing, TextAlignments } from "../types";
|
|
2
2
|
import type { PurchaseState } from "./state";
|
|
3
3
|
import type { VariableDictionary } from "../utils/variable-utils";
|
|
4
|
+
import type { ZStackChildStyles } from "../components/stack/stack-utils";
|
|
4
5
|
export interface Extra {
|
|
5
6
|
[key: string]: unknown;
|
|
6
7
|
}
|
|
@@ -9,6 +10,7 @@ export interface PaywallComponent extends Extra {
|
|
|
9
10
|
type: ComponentTypes;
|
|
10
11
|
id: string;
|
|
11
12
|
name: string;
|
|
13
|
+
fallback?: PaywallComponent;
|
|
12
14
|
}
|
|
13
15
|
export interface Stack extends PaywallComponent {
|
|
14
16
|
spacing: number;
|
|
@@ -21,6 +23,8 @@ type BaseNodeBackgroundColor = {
|
|
|
21
23
|
export type BaseNodeBackgroundImage = {
|
|
22
24
|
type: "image";
|
|
23
25
|
value: ImageSourceType;
|
|
26
|
+
color_overlay?: ColorType;
|
|
27
|
+
fit_mode?: FitTypes;
|
|
24
28
|
};
|
|
25
29
|
export type BaseNodeBackgroundType = BaseNodeBackgroundColor | BaseNodeBackgroundImage;
|
|
26
30
|
export interface ComponentConfig {
|
|
@@ -70,6 +74,7 @@ interface SharedComponentProps extends PaywallComponent, ActionsProps, PurchaseS
|
|
|
70
74
|
name: string;
|
|
71
75
|
variableDictionary?: VariableDictionary;
|
|
72
76
|
componentState?: ComponentState;
|
|
77
|
+
zStackChildStyles?: ZStackChildStyles;
|
|
73
78
|
}
|
|
74
79
|
interface Action {
|
|
75
80
|
type: "restore_purchases" | "navigate_to" | "navigate_back" | "purchase" | "select_package";
|
|
@@ -126,6 +131,24 @@ export interface StackProps extends SharedComponentProps {
|
|
|
126
131
|
size: SizeType;
|
|
127
132
|
spacing?: number;
|
|
128
133
|
type: "stack";
|
|
134
|
+
badge?: {
|
|
135
|
+
stack: {
|
|
136
|
+
components: PaywallComponent[];
|
|
137
|
+
type: "stack";
|
|
138
|
+
};
|
|
139
|
+
style: "overlay" | "edge_to_edge" | "nested";
|
|
140
|
+
alignment: Exclude<AlignmentType, "center">;
|
|
141
|
+
shape: ShapeType;
|
|
142
|
+
padding: Spacing;
|
|
143
|
+
margin: Spacing;
|
|
144
|
+
text_lid: string;
|
|
145
|
+
color: ColorType;
|
|
146
|
+
font_name?: string;
|
|
147
|
+
font_weight: keyof typeof FontWeights;
|
|
148
|
+
font_size: keyof typeof FontSizeTags;
|
|
149
|
+
horizontal_alignment: keyof typeof TextAlignments;
|
|
150
|
+
background_color: ColorType;
|
|
151
|
+
};
|
|
129
152
|
overrides?: {
|
|
130
153
|
[state: string]: StackProps;
|
|
131
154
|
};
|
|
@@ -148,7 +171,15 @@ export interface TextNodeProps extends SharedComponentProps {
|
|
|
148
171
|
[state: string]: TextNodeProps;
|
|
149
172
|
};
|
|
150
173
|
}
|
|
151
|
-
type ImageSourceDictionaryType =
|
|
174
|
+
type ImageSourceDictionaryType = {
|
|
175
|
+
original: string;
|
|
176
|
+
heic: string;
|
|
177
|
+
heic_low_res: string;
|
|
178
|
+
webp: string;
|
|
179
|
+
webp_low_res: string;
|
|
180
|
+
width?: number;
|
|
181
|
+
height?: number;
|
|
182
|
+
};
|
|
152
183
|
type ImageSourceType = {
|
|
153
184
|
light: ImageSourceDictionaryType;
|
|
154
185
|
dark?: ImageSourceDictionaryType;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { type PaywallData as PaywallData } from "./data/entities";
|
|
2
1
|
export * from "./types";
|
|
2
|
+
export { type PaywallData as PaywallData } from "./data/entities";
|
|
3
|
+
export { type VariableDictionary } from "./utils/variable-utils";
|
|
3
4
|
export { default as Paywall } from "./components/paywall/Paywall.svelte";
|
|
4
5
|
export { default as Stack } from "./components/stack/Stack.svelte";
|
|
5
6
|
export { default as Button } from "./components/button/Button.svelte";
|
|
@@ -8,5 +9,4 @@ export { default as Image } from "./components/image/Image.svelte";
|
|
|
8
9
|
export { default as PurchaseButton } from "./components/purchase-button/PurchaseButton.svelte";
|
|
9
10
|
export { default as Package } from "./components/package/Package.svelte";
|
|
10
11
|
export { default as Footer } from "./components/footer/Footer.svelte";
|
|
11
|
-
export { type VariableDictionary } from "./utils/variable-utils";
|
|
12
12
|
export { default as Timeline } from "./components/timeline/Timeline.svelte";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Reexport your entry components here
|
|
2
|
-
export {} from "./data/entities";
|
|
3
2
|
export * from "./types";
|
|
3
|
+
export {} from "./data/entities";
|
|
4
|
+
export {} from "./utils/variable-utils";
|
|
4
5
|
export { default as Paywall } from "./components/paywall/Paywall.svelte";
|
|
5
6
|
export { default as Stack } from "./components/stack/Stack.svelte";
|
|
6
7
|
export { default as Button } from "./components/button/Button.svelte";
|
|
@@ -9,5 +10,4 @@ export { default as Image } from "./components/image/Image.svelte";
|
|
|
9
10
|
export { default as PurchaseButton } from "./components/purchase-button/PurchaseButton.svelte";
|
|
10
11
|
export { default as Package } from "./components/package/Package.svelte";
|
|
11
12
|
export { default as Footer } from "./components/footer/Footer.svelte";
|
|
12
|
-
export {} from "./utils/variable-utils";
|
|
13
13
|
export { default as Timeline } from "./components/timeline/Timeline.svelte";
|
|
@@ -15,8 +15,10 @@ export declare const labelsData: {
|
|
|
15
15
|
id1: string;
|
|
16
16
|
id2: string;
|
|
17
17
|
id3: string;
|
|
18
|
+
badge: string;
|
|
18
19
|
};
|
|
19
20
|
};
|
|
20
21
|
export declare const colorModeOverrideTemplate: PaywallData;
|
|
21
22
|
export declare const paywallWithFooter: PaywallData;
|
|
22
23
|
export declare const errorPaywallData: PaywallData;
|
|
24
|
+
export declare const fallbackPaywallData: PaywallData;
|