@revenuecat/purchases-ui-js 3.5.1 → 3.5.2

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.
@@ -232,62 +232,58 @@
232
232
  }
233
233
 
234
234
  :global {
235
- *,
236
- *::before,
237
- *::after {
235
+ /* Scoped reset - same as original but only affects .paywall descendants */
236
+ .paywall *,
237
+ .paywall *::before,
238
+ .paywall *::after {
238
239
  box-sizing: border-box;
239
240
  margin: 0;
240
241
  padding: 0;
241
242
  font-family: sans-serif;
242
243
  }
243
244
 
244
- body {
245
+ .paywall {
245
246
  line-height: 1.5;
246
247
  -webkit-font-smoothing: antialiased;
247
248
  }
248
249
 
249
- img,
250
- picture,
251
- video,
252
- canvas,
253
- svg {
250
+ .paywall img,
251
+ .paywall picture,
252
+ .paywall video,
253
+ .paywall canvas,
254
+ .paywall svg {
254
255
  display: block;
255
256
  max-width: 100%;
256
257
  }
257
258
 
258
- input,
259
- button,
260
- textarea,
261
- select {
259
+ .paywall input,
260
+ .paywall button,
261
+ .paywall textarea,
262
+ .paywall select {
262
263
  font: inherit;
263
264
  }
264
265
 
265
- p,
266
- h1,
267
- h2,
268
- h3,
269
- h4,
270
- h5,
271
- h6 {
266
+ .paywall p,
267
+ .paywall h1,
268
+ .paywall h2,
269
+ .paywall h3,
270
+ .paywall h4,
271
+ .paywall h5,
272
+ .paywall h6 {
272
273
  overflow-wrap: break-word;
273
274
  }
274
275
 
275
- p {
276
+ .paywall p {
276
277
  text-wrap: pretty;
277
278
  }
278
279
 
279
- h1,
280
- h2,
281
- h3,
282
- h4,
283
- h5,
284
- h6 {
280
+ .paywall h1,
281
+ .paywall h2,
282
+ .paywall h3,
283
+ .paywall h4,
284
+ .paywall h5,
285
+ .paywall h6 {
285
286
  text-wrap: balance;
286
287
  }
287
-
288
- #root,
289
- #__next {
290
- isolation: isolate;
291
- }
292
288
  }
293
289
  </style>
@@ -0,0 +1,2 @@
1
+ import type { DecoratorFunction, Renderer } from "storybook/internal/csf";
2
+ export declare function paywallWrapperDecorator<TRenderer extends Renderer, TArgs>(): DecoratorFunction<TRenderer, TArgs>;
@@ -0,0 +1,7 @@
1
+ import PaywallWrapper from "./paywall-wrapper.svelte";
2
+ export function paywallWrapperDecorator() {
3
+ return (Story) => ({
4
+ Component: PaywallWrapper,
5
+ Slot: Story(),
6
+ });
7
+ }
@@ -0,0 +1,20 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from "svelte";
3
+
4
+ interface Props {
5
+ children: Snippet;
6
+ }
7
+
8
+ const { children }: Props = $props();
9
+ </script>
10
+
11
+ <div class="paywall" style="display: contents;">
12
+ {@render children()}
13
+ </div>
14
+
15
+ <style>
16
+ /* The wrapper should not affect layout - it's just for CSS scoping */
17
+ .paywall {
18
+ display: contents;
19
+ }
20
+ </style>
@@ -0,0 +1,7 @@
1
+ import type { Snippet } from "svelte";
2
+ interface Props {
3
+ children: Snippet;
4
+ }
5
+ declare const PaywallWrapper: import("svelte").Component<Props, {}, "">;
6
+ type PaywallWrapper = ReturnType<typeof PaywallWrapper>;
7
+ export default PaywallWrapper;
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.1",
5
+ "version": "3.5.2",
6
6
  "author": {
7
7
  "name": "RevenueCat, Inc."
8
8
  },