@revenuecat/purchases-ui-js 3.5.3 → 3.5.4

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.
@@ -233,7 +233,17 @@
233
233
  type: "express_purchase_button",
234
234
  id: "express_purchase_button",
235
235
  name: "ExpressPurchaseButton",
236
-
236
+ size: {
237
+ width: { type: "fill" },
238
+ height: { type: "fit" },
239
+ },
240
+ padding: { top: 0, trailing: 0, bottom: 0, leading: 0 },
241
+ margin: { top: 0, trailing: 0, bottom: 0, leading: 0 },
242
+ shape: null,
243
+ shadow: null,
244
+ background: null,
245
+ border: null,
246
+ overrides: [],
237
247
  wallet_available_stack: {
238
248
  type: "stack",
239
249
  id: "wallet-available-stack",
@@ -366,3 +376,43 @@
366
376
  ]}
367
377
  args={{}}
368
378
  />
379
+
380
+ <Story
381
+ name="Parent Stack Props"
382
+ decorators={[
383
+ paywallDecorator(
384
+ createWalletButtonRender({ available: false, delay: 1000 }),
385
+ "some-package-id",
386
+ ),
387
+ ]}
388
+ args={{
389
+ background: {
390
+ type: "color",
391
+ value: {
392
+ light: {
393
+ type: "hex",
394
+ value: "#a229d2",
395
+ },
396
+ },
397
+ },
398
+ padding: { top: 10, leading: 20, bottom: 30, trailing: 40 },
399
+ margin: { top: 10, leading: 20, bottom: 30, trailing: 40 },
400
+ shape: {
401
+ type: "rectangle",
402
+ corners: {
403
+ top_leading: 10,
404
+ top_trailing: 20,
405
+ bottom_leading: 30,
406
+ bottom_trailing: 40,
407
+ },
408
+ },
409
+ border: { width: 3, color: { light: { type: "hex", value: "#000000" } } },
410
+ shadow: {
411
+ x: 10,
412
+ y: 20,
413
+ radius: 20,
414
+ color: { light: { type: "hex", value: "#000000" } },
415
+ },
416
+ size: { width: { type: "fixed", value: 500 }, height: { type: "fit" } },
417
+ }}
418
+ />
@@ -2,12 +2,15 @@
2
2
  import Stack from "../stack/Stack.svelte";
3
3
  import { getPaywallContext, setPaywallContext } from "../../stores/paywall";
4
4
  import type { ExpressPurchaseButtonProps } from "../../types/components/express-purchase-button-props";
5
+ import type { StackProps } from "../../types/components/stack";
5
6
 
6
7
  const props: ExpressPurchaseButtonProps = $props();
7
8
  const {
8
9
  wallet_unknown_stack,
9
10
  wallet_available_stack,
10
11
  wallet_unavailable_stack,
12
+ type,
13
+ ...partialStackProps
11
14
  } = props;
12
15
 
13
16
  const { walletButtonRender, ...rest } = getPaywallContext();
@@ -32,12 +35,30 @@
32
35
  !shouldShowWalletSkeleton,
33
36
  ),
34
37
  );
38
+
39
+ const wrapperStackProps: StackProps = {
40
+ components: [],
41
+ type: "stack",
42
+ visible: null,
43
+ dimension: {
44
+ type: "vertical",
45
+ distribution: "start",
46
+ alignment: "center",
47
+ },
48
+ background_color: null,
49
+ spacing: 0,
50
+ ...partialStackProps,
51
+ };
35
52
  </script>
36
53
 
37
- <Stack {...{ ...wallet_available_stack, visible: shouldShowAvailableStack }} />
54
+ <Stack {...wrapperStackProps}>
55
+ <Stack
56
+ {...{ ...wallet_available_stack, visible: shouldShowAvailableStack }}
57
+ />
38
58
 
39
- {#if shouldShowWalletSkeleton}
40
- <Stack {...wallet_unknown_stack} />
41
- {:else if shouldShowUnavailableStack}
42
- <Stack {...wallet_unavailable_stack} />
43
- {/if}
59
+ {#if shouldShowWalletSkeleton}
60
+ <Stack {...wallet_unknown_stack} />
61
+ {:else if shouldShowUnavailableStack}
62
+ <Stack {...wallet_unavailable_stack} />
63
+ {/if}
64
+ </Stack>
@@ -1207,6 +1207,31 @@ export declare const DUELINGUE_PAYWALL: {
1207
1207
  type: "express_purchase_button";
1208
1208
  id: string;
1209
1209
  name: string;
1210
+ size: {
1211
+ width: {
1212
+ type: "fill";
1213
+ };
1214
+ height: {
1215
+ type: "fit";
1216
+ };
1217
+ };
1218
+ padding: {
1219
+ top: number;
1220
+ leading: number;
1221
+ trailing: number;
1222
+ bottom: number;
1223
+ };
1224
+ margin: {
1225
+ top: number;
1226
+ trailing: number;
1227
+ bottom: number;
1228
+ leading: number;
1229
+ };
1230
+ shape: null;
1231
+ shadow: null;
1232
+ background: null;
1233
+ border: null;
1234
+ overrides: never[];
1210
1235
  wallet_available_stack: {
1211
1236
  type: "stack";
1212
1237
  id: string;
@@ -1226,6 +1226,31 @@ export const DUELINGUE_PAYWALL = {
1226
1226
  type: "express_purchase_button",
1227
1227
  id: "express_purchase_button",
1228
1228
  name: "ExpressPurchaseButton",
1229
+ size: {
1230
+ width: {
1231
+ type: "fill",
1232
+ },
1233
+ height: {
1234
+ type: "fit",
1235
+ },
1236
+ },
1237
+ padding: {
1238
+ top: 0,
1239
+ leading: 0,
1240
+ trailing: 0,
1241
+ bottom: 0,
1242
+ },
1243
+ margin: {
1244
+ top: 0,
1245
+ trailing: 0,
1246
+ bottom: 0,
1247
+ leading: 0,
1248
+ },
1249
+ shape: null,
1250
+ shadow: null,
1251
+ background: null,
1252
+ border: null,
1253
+ overrides: [],
1229
1254
  wallet_available_stack: {
1230
1255
  type: "stack",
1231
1256
  id: "wallet-available-stack",
@@ -1,8 +1,19 @@
1
1
  import type { BaseComponent } from "../base";
2
2
  import type { StackProps } from "./stack";
3
+ import type { BorderType, ShadowType, ShapeType, SizeType, Spacing } from "../..";
4
+ import type { Background } from "../background";
5
+ import type { Overrides } from "../overrides";
3
6
  export interface ExpressPurchaseButtonProps extends BaseComponent {
4
7
  type: "express_purchase_button";
5
8
  wallet_unknown_stack: StackProps;
6
9
  wallet_available_stack: StackProps;
7
10
  wallet_unavailable_stack: StackProps;
11
+ size: SizeType;
12
+ padding: Spacing;
13
+ margin: Spacing;
14
+ shape: ShapeType | null;
15
+ shadow: ShadowType | null;
16
+ background: Background | null;
17
+ border: BorderType | null;
18
+ overrides?: Overrides<StackProps>;
8
19
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@revenuecat/purchases-ui-js",
3
3
  "description": "Web components for Paywalls. Powered by RevenueCat",
4
4
  "private": false,
5
- "version": "3.5.3",
5
+ "version": "3.5.4",
6
6
  "author": {
7
7
  "name": "RevenueCat, Inc."
8
8
  },