Skip to content

Commit 428eb33

Browse files
committed
Rename applyBlur to showBlurredChildren for semantic clarity
Breaking change: Rename the applyBlur prop to showBlurredChildren in both PaywallGate and AuthGate components. The new name better conveys the prop's purpose of controlling whether blurred children are shown behind the gate overlay. Changes: - Update prop name in PaywallGate and AuthGate TypeScript interfaces - Update all documentation and examples to use showBlurredChildren - Update demo app to use the new prop name - Add migration notes to CHANGELOG - Bump package version to 0.3.0 - Remove npm downloads badge from README files
1 parent baff2c4 commit 428eb33

File tree

16 files changed

+90
-38
lines changed

16 files changed

+90
-38
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Milkie
22

33
[![npm version](https://img.shields.io/npm/v/@milkie/react.svg)](https://www.npmjs.com/package/@milkie/react)
4-
[![npm downloads](https://img.shields.io/npm/dm/@milkie/react.svg)](https://www.npmjs.com/package/@milkie/react)
54
[![license](https://img.shields.io/npm/l/@milkie/react.svg)](https://github.com/akcho/milkie/blob/main/LICENSE)
65

76
> Drop-in paywall infrastructure for Next.js apps

demo/app/dashboard/billing/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ import { ImplementationTip } from "@/components/implementation-tip";
77
import { PageHeader } from "@/components/page-header";
88
import { useCheckout } from "@/hooks/use-checkout";
99
import { useCancelSubscription } from "@/hooks/use-cancel-subscription";
10+
import { useIsMobile } from "@/hooks/use-is-mobile";
1011

1112
export default function BillingPage() {
1213
const { status, email, hasAccess, checkSubscription } = usePaywall();
1314
const { startCheckout, isCheckingOut } = useCheckout();
1415
const { cancelSubscription, isCanceling } = useCancelSubscription();
16+
const isMobile = useIsMobile();
1517

1618
const handleSubscribe = () => {
1719
if (!email) return;
@@ -24,7 +26,7 @@ export default function BillingPage() {
2426
};
2527

2628
return (
27-
<AuthGate>
29+
<AuthGate showBlurredChildren={!isMobile}>
2830
<div className="space-y-8 max-w-3xl mx-auto">
2931
<PageHeader
3032
title="Billing"

demo/app/dashboard/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function DashboardPage() {
3131
const isMobile = useIsMobile();
3232

3333
return (
34-
<PaywallGate applyBlur={!isMobile}>
34+
<PaywallGate showBlurredChildren={!isMobile}>
3535
<div className="space-y-8 max-w-5xl mx-auto">
3636
<PageHeader
3737
title="Dashboard"

demo/app/dashboard/settings/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ import { ImplementationTip } from "@/components/implementation-tip";
55
import { PageHeader } from "@/components/page-header";
66
import { AccountSettingsCard } from "./components/account-settings-card";
77
import { useSettings } from "@/hooks/use-settings";
8+
import { useIsMobile } from "@/hooks/use-is-mobile";
89

910
export default function SettingsPage() {
1011
const { isSaving, isSigningOut, handleSave, handleSignOut } = useSettings();
12+
const isMobile = useIsMobile();
1113

1214
return (
13-
<AuthGate>
15+
<AuthGate showBlurredChildren={!isMobile}>
1416
<div className="space-y-8 max-w-3xl mx-auto">
1517
<PageHeader
1618
title="Settings"

demo/app/metered/components/article-view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function ArticleView({ article, canView, onBack }: ArticleViewProps) {
5656
subtitle="Subscribe for unlimited access to all premium content"
5757
subscribeButtonText="Get unlimited access"
5858
overlayClassName="py-8"
59-
applyBlur={!isMobile}
59+
showBlurredChildren={!isMobile}
6060
position="top"
6161
>
6262
<ArticleContent />

docs/AUTH_INTEGRATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Both components support extensive customization:
223223
subscribeButtonText="Subscribe now"
224224
signInUrl="/signin"
225225
showBranding={true} // Show "Powered by milkie" footer
226-
applyBlur={true} // Show blurred content preview
226+
showBlurredChildren={true} // Show blurred content preview
227227
overlayClassName="pt-8" // Custom overlay positioning
228228
onSignIn={() => {
229229
// Custom sign-in logic

docs/FAQ.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ PaywallGate renders your protected content in the background with a `blur-sm` ef
6767

6868
### Q: Can I disable the blur effect?
6969

70-
Yes! Use `applyBlur={false}`:
70+
Yes! Use `showBlurredChildren={false}`:
7171

7272
```tsx
73-
<PaywallGate applyBlur={false}>
73+
<PaywallGate showBlurredChildren={false}>
7474
<PremiumContent /> {/* Paywall card shown inline without blur */}
7575
</PaywallGate>
7676
```

docs/reference/best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ export default function ArticlePage() {
298298
return (
299299
<PaywallGate
300300
position="top"
301-
applyBlur={!isMobile}
301+
showBlurredChildren={!isMobile}
302302
>
303303
<LongNewsArticle />
304304
</PaywallGate>

docs/reference/customization.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ All available props for customizing the paywall experience:
2222
onToast={(message, type) => toast[type](message)}
2323
// Visual customization
2424
showBranding={false}
25-
applyBlur={false}
25+
showBlurredChildren={false}
2626
overlayClassName="pt-8"
2727
position="top"
2828
>
@@ -52,12 +52,12 @@ All available props for customizing the paywall experience:
5252

5353
### Visual Props
5454

55-
| Prop | Type | Default | Description |
56-
| ------------------ | --------------------- | ---------- | --------------------------------------- |
57-
| `showBranding` | `boolean` | true | Show "Powered by milkie" footer |
58-
| `applyBlur` | `boolean` | true | Show blurred content preview |
59-
| `overlayClassName` | `string` | "" | Custom className for overlay element |
60-
| `position` | `"center" \| "top"` | `"center"` | Vertical position of paywall card |
55+
| Prop | Type | Default | Description |
56+
| ---------------------- | --------------------- | ---------- | --------------------------------------- |
57+
| `showBranding` | `boolean` | true | Show "Powered by milkie" footer |
58+
| `showBlurredChildren` | `boolean` | true | Show blurred content preview |
59+
| `overlayClassName` | `string` | "" | Custom className for overlay element |
60+
| `position` | `"center" \| "top"` | `"center"` | Vertical position of paywall card |
6161

6262
## Visual Design Features
6363

@@ -81,7 +81,7 @@ PaywallGate renders protected content behind the overlay with a blur effect:
8181
**Disable blur:**
8282

8383
```tsx
84-
<PaywallGate applyBlur={false}>
84+
<PaywallGate showBlurredChildren={false}>
8585
<PremiumContent /> {/* Paywall card shown inline without blur */}
8686
</PaywallGate>
8787
```
@@ -304,7 +304,7 @@ export default function ArticlePage() {
304304
return (
305305
<PaywallGate
306306
position="top"
307-
applyBlur={!isMobile}
307+
showBlurredChildren={!isMobile}
308308
>
309309
<LongNewsArticle />
310310
</PaywallGate>

packages/react/CHANGELOG.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.3.0] - 2025-10-19
9+
10+
### Changed
11+
12+
- Enhanced `AuthGate` documentation in package README with complete props list including `showBlurredChildren`, `onSignIn`, and `signInButtonText`
13+
- Added inline card example to AuthGate component README
14+
15+
---
16+
17+
## [0.2.0] - 2025-10-19
18+
19+
### Breaking Changes
20+
21+
- **BREAKING:** Renamed `applyBlur` prop to `showBlurredChildren` in both `PaywallGate` and `AuthGate` components for better semantic clarity
22+
- Migration: Replace all instances of `applyBlur={value}` with `showBlurredChildren={value}` in your code
23+
- The prop controls whether blurred content is shown behind the gate overlay (default: true)
24+
- This change affects both `PaywallGate` and `AuthGate` components
25+
26+
### Changed
27+
28+
- Updated all documentation and examples to use `showBlurredChildren` prop
29+
- Updated TypeScript definitions to reflect the new prop name
30+
31+
---
32+
833
## [0.1.0] - 2025-10-19
934

1035
Initial release of Milkie - Stripe-powered paywall SDK for Next.js apps.
@@ -20,7 +45,7 @@ Initial release of Milkie - Stripe-powered paywall SDK for Next.js apps.
2045
- Error handling with retry capability
2146
- Loading states with skeleton loaders
2247
- Optional toast notification integration
23-
- `applyBlur` prop to control blur effect (enabled by default)
48+
- `showBlurredChildren` prop to control blur effect (enabled by default)
2449
- `position` prop for vertical card positioning ("center" or "top")
2550
- Full TypeScript support with comprehensive JSDoc documentation
2651

0 commit comments

Comments
 (0)