@revenuecat/purchases-ui-js 4.9.0 → 4.10.1

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.
@@ -155,8 +155,9 @@
155
155
 
156
156
  <style>
157
157
  .backdrop {
158
- position: absolute;
158
+ position: fixed;
159
159
  inset: 0 0 0 0;
160
+ z-index: 1000;
160
161
  width: 100%;
161
162
  height: 100%;
162
163
  background-color: #0000003f;
@@ -172,18 +173,18 @@
172
173
  transition-duration: 225ms;
173
174
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
174
175
  transform: translateY(100%);
176
+ }
175
177
 
176
- &::before {
177
- content: "";
178
- position: absolute;
179
- inset: 0;
180
- background: var(--overlay);
181
- pointer-events: none;
182
- }
178
+ .sheet::before {
179
+ content: "";
180
+ position: absolute;
181
+ inset: 0;
182
+ background: var(--overlay);
183
+ pointer-events: none;
184
+ }
183
185
 
184
- &.visible {
185
- transform: translateY(0);
186
- }
186
+ .sheet.visible {
187
+ transform: translateY(0);
187
188
  }
188
189
 
189
190
  .sheet.rc-sheet-video-bg::before {
@@ -1,11 +1,24 @@
1
1
  import type { BaseComponent } from "../base";
2
2
  import type { Overrides } from "../overrides";
3
3
  import type { StackProps } from "./stack";
4
+ export interface PlayStoreOfferConfig {
5
+ offer_id: string;
6
+ }
7
+ /**
8
+ * Paddle discount to apply to this package on web. `discount_id` is the
9
+ * Paddle discount id (`dsc_...`); hosts resolve it through Paddle.js before
10
+ * rendering and pass it to Paddle checkout when purchasing.
11
+ */
12
+ export interface PaddleDiscountConfig {
13
+ discount_id: string;
14
+ }
4
15
  export interface PackageProps extends BaseComponent {
5
16
  type: "package";
6
17
  package_id: string;
7
18
  is_selected_by_default: boolean;
8
19
  apple_promo_offer_product_code?: string | null;
20
+ play_store_offer?: PlayStoreOfferConfig | null;
21
+ paddle_discount?: PaddleDiscountConfig | null;
9
22
  stack: StackProps;
10
23
  overrides?: Overrides<PackageProps>;
11
24
  }
package/dist/types.d.ts CHANGED
@@ -129,3 +129,4 @@ export type { WorkflowScreen } from "./types/workflow";
129
129
  export type { ColorScheme } from "./types/colors";
130
130
  export type { ComponentInteractionData, ComponentInteractionType, OnComponentInteraction, } from "./types/paywall-component-interaction";
131
131
  export type { InputTextValidation, InputTextValidationErrorLids, InputTextValidationFormat, InputTextValidationRule, ReservedAttribute, } from "./types/components/input-text";
132
+ export type { PackageProps, PaddleDiscountConfig, PlayStoreOfferConfig, } from "./types/components/package";
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": "4.9.0",
5
+ "version": "4.10.1",
6
6
  "author": {
7
7
  "name": "RevenueCat, Inc."
8
8
  },