@superwall/cli 1.4.0 → 1.6.0

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.
Files changed (103) hide show
  1. package/README.md +21 -5
  2. package/dist/{actions-EfP8phmb.js → actions-Dt35nIi8.js} +3 -2
  3. package/dist/{api-CEwXCCoC.js → api-BOR-uXZe.js} +9 -9
  4. package/dist/{app-D8mEVlQo.js → app-BU27SLPX.js} +9 -9
  5. package/dist/{asa-BFWehnTA.js → asa-2ykGnjaV.js} +11 -11
  6. package/dist/{asc-DJqQmtmR.js → asc-r3xmFT0L.js} +14 -14
  7. package/dist/{auth-CT2DWX8r.js → auth-BWZfguI8.js} +9 -9
  8. package/dist/auth.js +2 -2
  9. package/dist/{billing-BzEnVPD2.js → billing-BsQgXXYh.js} +1 -1
  10. package/dist/{bind-BZxVyt9P.js → bind-BSTAinn6.js} +5 -4
  11. package/dist/{command-DP96_gmP.js → command-DMoMn7uc.js} +39 -16
  12. package/dist/{create-Q8TqqjZt.js → create-CSo6XjSm.js} +118 -91
  13. package/dist/dev-B0MF6z3L.js +21 -0
  14. package/dist/{dev-DlCcwFu5.js → dev-CuXa3J4Z.js} +29 -24
  15. package/dist/{doctor-CJsjHpCZ.js → doctor-DXJaDqsx.js} +10 -10
  16. package/dist/{drivers-UT36AnOw.js → drivers-Cr252DOJ.js} +3 -3
  17. package/dist/entry.js +84 -50
  18. package/dist/{existing-Cak1WxWB.js → existing-Ckx_g7Be.js} +6 -3
  19. package/dist/{feedback-DDRzoqPx.js → feedback-Dt5yebMS.js} +6 -6
  20. package/dist/{hosted-CEH78QVn.js → hosted-Cjekn8oJ.js} +2 -2
  21. package/dist/{integrate-D8jyhDzk.js → integrate-DVqhvPVq.js} +25 -66
  22. package/dist/{login-kneYhhk0.js → login-Bjj8QvIN.js} +6 -6
  23. package/dist/migrate-qmvOtp3l.js +283 -0
  24. package/dist/open-studio-CpHqjovS.js +1299 -0
  25. package/dist/{org-Cg25bcsj.js → org-CV8c849b.js} +3 -3
  26. package/dist/{output-csAtR6kJ.js → output-CiELrN8w.js} +15 -2
  27. package/dist/{pipeline-DAeI9tHs.js → pipeline-DSCHL9KA.js} +482 -9
  28. package/dist/{print-skill-BHVPP9cX.js → print-skill-CaHRJ8xW.js} +7 -7
  29. package/dist/{promote-Boek5K2d.js → promote-UMTh8Q33.js} +17 -18
  30. package/dist/publish-DWX8S9yZ.js +34 -0
  31. package/dist/push-Dox4_5Dq.js +34 -0
  32. package/dist/{query-B8G6T8Ba.js → query-CnSsDZ7Q.js} +10 -10
  33. package/dist/reports-C0xHCLnt.js +27 -0
  34. package/dist/{resource-DjsWVka-.js → resource-5bgyyL9B.js} +15 -15
  35. package/dist/{resources-s64mBHaC.js → resources-Bf9O1JNM.js} +28 -2
  36. package/dist/{run-BtcQJCP8.js → run-BVeZWbXx.js} +39 -22
  37. package/dist/{scan-DJixvuHn.js → scan-CAObNRgc.js} +44 -4
  38. package/dist/skills/superwall/SKILL.md +146 -0
  39. package/dist/skills/superwall/references/api.md +275 -0
  40. package/dist/skills/superwall/references/asa.md +160 -0
  41. package/dist/skills/superwall/references/asc.md +96 -0
  42. package/dist/skills/superwall/references/dashboard-links.md +57 -0
  43. package/dist/skills/superwall/references/data-analytics.md +893 -0
  44. package/dist/skills/superwall/references/docs.md +51 -0
  45. package/dist/skills/superwall/references/sdk-integration.md +105 -0
  46. package/dist/skills/superwall/references/sdk-source.md +18 -0
  47. package/{skills/superwall-dashboard/SKILL.md → dist/skills/superwall/workflows/dashboard/playbook.md} +3 -9
  48. package/{skills/superwall-dashboard/references → dist/skills/superwall/workflows/dashboard}/setup.md +1 -3
  49. package/dist/skills/superwall/workflows/integrate/android.md +292 -0
  50. package/{skills/superwall-integrate/SKILL.md → dist/skills/superwall/workflows/integrate/playbook.md} +16 -11
  51. package/{skills/superwall-migrate/references → dist/skills/superwall/workflows/migrate}/adapty.md +4 -4
  52. package/{skills/superwall-migrate/SKILL.md → dist/skills/superwall/workflows/migrate/playbook.md} +4 -10
  53. package/{skills/superwall-migrate/references → dist/skills/superwall/workflows/migrate}/qonversion.md +4 -4
  54. package/{skills/superwall-migrate/references → dist/skills/superwall/workflows/migrate}/revenuecat.md +4 -4
  55. package/dist/skills/superwall/workflows/placements/android.md +175 -0
  56. package/{skills/superwall-placements/references → dist/skills/superwall/workflows/placements}/expo.md +1 -1
  57. package/{skills/superwall-placements/references → dist/skills/superwall/workflows/placements}/flutter.md +1 -1
  58. package/{skills/superwall-placements/references → dist/skills/superwall/workflows/placements}/ios.md +1 -1
  59. package/{skills/superwall-placements/SKILL.md → dist/skills/superwall/workflows/placements/playbook.md} +6 -10
  60. package/{skills/superwall-placements/references → dist/skills/superwall/workflows/placements}/react-native.md +2 -2
  61. package/{skills/superwall-placements/references → dist/skills/superwall/workflows/placements}/strategy.md +4 -3
  62. package/dist/skills/superwall/workflows/review/android.md +120 -0
  63. package/{skills/superwall-review/references → dist/skills/superwall/workflows/review}/expo.md +1 -1
  64. package/{skills/superwall-review/references → dist/skills/superwall/workflows/review}/flutter.md +1 -1
  65. package/{skills/superwall-review/references → dist/skills/superwall/workflows/review}/ios.md +1 -1
  66. package/{skills/superwall-review/SKILL.md → dist/skills/superwall/workflows/review/playbook.md} +2 -7
  67. package/{skills/superwall-review/references → dist/skills/superwall/workflows/review}/react-native.md +1 -1
  68. package/dist/skills/superwall-framework/SKILL.md +253 -0
  69. package/dist/skills/superwall-framework/references/cli.md +340 -0
  70. package/dist/skills/superwall-framework/references/examples.md +123 -0
  71. package/dist/skills/superwall-framework/references/layout.md +295 -0
  72. package/dist/skills/superwall-framework/references/migrate-from-editor.md +208 -0
  73. package/dist/skills/superwall-framework/references/migrate-from-native.md +193 -0
  74. package/dist/skills/superwall-framework/references/mobile-design.md +371 -0
  75. package/dist/skills/superwall-framework/references/native/android.md +83 -0
  76. package/dist/skills/superwall-framework/references/native/flutter.md +65 -0
  77. package/dist/skills/superwall-framework/references/native/ios.md +77 -0
  78. package/dist/skills/superwall-framework/references/native/react-native.md +67 -0
  79. package/dist/skills/superwall-framework/references/responsive.md +162 -0
  80. package/dist/{skills-CRG1xk0G.js → skills-Cu41i-Az.js} +12 -12
  81. package/dist/{skills-CODut1Hn.js → skills-grTDuHlc.js} +134 -36
  82. package/dist/{spinner-B9dT3DBY.js → spinner-DFctF_Jw.js} +1 -1
  83. package/dist/{telemetry-BtkMdT-5.js → telemetry-BuCbmoux.js} +3 -3
  84. package/dist/{token-hM7V1KMG.js → token-mju3Q-vc.js} +3 -3
  85. package/dist/{ui-Lqt_zFOr.js → ui-4gLyfrgl.js} +76 -46
  86. package/dist/{update-CeylIjx5.js → update-DnGfpCD7.js} +2 -2
  87. package/dist/{upgrade-DRqUfCBT.js → upgrade-PMoj3yqJ.js} +6 -6
  88. package/package.json +8 -7
  89. package/prompts/actions/paywall-migrate.xml +24 -0
  90. package/prompts/actions/screen-migrate.xml +26 -0
  91. package/dist/git-ZwA3Mx8m.js +0 -433
  92. package/dist/migrate-D_x1oyTk.js +0 -114
  93. package/dist/publish-C-zEUnO9.js +0 -35
  94. package/dist/push-DUDQG-EO.js +0 -35
  95. package/skills/README.md +0 -118
  96. /package/dist/{api-output-D9ggXQIr.js → api-output-CEhN-U_N.js} +0 -0
  97. /package/dist/{asc-products-C6MvSy8H.js → asc-products-1e1DoGeL.js} +0 -0
  98. /package/dist/{params-B1zeElGa.js → params-BxgTuCzr.js} +0 -0
  99. /package/{skills/superwall-integrate/references → dist/skills/superwall/workflows/integrate}/expo.md +0 -0
  100. /package/{skills/superwall-integrate/references → dist/skills/superwall/workflows/integrate}/flutter.md +0 -0
  101. /package/{skills/superwall-integrate/references → dist/skills/superwall/workflows/integrate}/ios.md +0 -0
  102. /package/{skills/superwall-integrate/references → dist/skills/superwall/workflows/integrate}/react-native.md +0 -0
  103. /package/dist/{storekit-DPonXSwe.js → storekit-Dlpbq5Wv.js} +0 -0
@@ -0,0 +1,65 @@
1
+ # Flutter source screens
2
+
3
+ How the screen you are rebuilding was wired, what each construct becomes,
4
+ and what the user changes in the app once the rebuild is reviewed.
5
+
6
+ ## Reading the source
7
+
8
+ | In the source | Becomes |
9
+ | --- | --- |
10
+ | `Text('…')`, `title:`, `label:`, `hintText:`, `semanticsLabel:`, `AppLocalizations.of(context).key` | a `messages/en.ts` entry read with `t()`; copy every `.arb` locale the app has into `messages/<locale>.ts` |
11
+ | `'$value'` / `'${value}'` in text | a `t()` parameter |
12
+ | `Column`, `Row`, `Stack`, `Padding`, `SizedBox` | flex layout in CSS |
13
+ | `ThemeData`, `Theme.of(context)`, `ColorScheme` | `:root` / `:root.dark` variables, both brightnesses from the theme |
14
+ | `Image.asset('assets/x.png')`, `AssetImage` | the file from `pubspec.yaml`'s assets copied into `assets/`, imported relatively |
15
+ | `Icon(Icons.x)` | an SVG in `assets/`; there are no Material icons on the web unless you add them |
16
+ | `Lottie.asset`, `RiveAnimation` | the framework's Lottie / Rive support (`assets.md`) |
17
+ | `MediaQuery.platformBrightnessOf` | `useColorScheme()` from the framework, or `:root.dark` CSS |
18
+ | `in_app_purchase` `buyNonConsumable`, RevenueCat `purchasePackage` | `usePurchase()` with the slot from `config.ts` |
19
+ | `restorePurchases` | `useActions().restore()` |
20
+ | `url_launcher` `launchUrl` (App Store links included) | `useActions().openUrl(url)` |
21
+ | `in_app_review` `requestReview` | `useActions().requestStoreReview()` |
22
+ | `Permission.notification.request()`, `FirebaseMessaging.requestPermission` | `useActions().requestPermission("notification")` |
23
+ | `Navigator.pop`, `context.pop()` | `useActions().close()` |
24
+ | `Navigator.push` / `context.push` to a screen in the same flow | a second route under `app/` and `useRouter().push()` |
25
+ | `Navigator.push` to something outside the flow | close and let the app's placement handler route; note it |
26
+ | `setState`, providers, blocs feeding the widget | React state; fetched data becomes a placement param or a user attribute the app sets before `registerPlacement` |
27
+ | `package_info_plus` version reads | `useDevice()` and `useVariables()`; the SDK reports app and OS versions |
28
+ | `SafeArea`, `MediaQuery.padding` | nothing; the framework insets the screen (`layout.md`) |
29
+
30
+ ## Wiring the app afterwards (the user does this, with you, after review)
31
+
32
+ This is a placement at a feature gate — the `superwall` skill's
33
+ `workflows/placements/` playbook (`superwall integrate --skill` includes it)
34
+ is the full playbook for
35
+ where and how to register, and the SDK docs are the reference for the
36
+ API; fetch them rather than working from memory:
37
+
38
+ ```bash
39
+ curl -sL https://superwall.com/docs/flutter/quickstart/feature-gating.md # Superwall.shared.registerPlacement
40
+ curl -sL https://superwall.com/docs/llms.txt # every other page
41
+ ```
42
+
43
+ Where the app pushed the screen:
44
+
45
+ ```dart
46
+ // before
47
+ if (needsUpdate) Navigator.of(context).push(MaterialPageRoute(builder: (_) => const UpdateRequiredScreen()));
48
+
49
+ // after
50
+ if (needsUpdate) Superwall.shared.registerPlacement('update_required');
51
+ ```
52
+
53
+ - The placement name is in the brief. Register it with the same condition
54
+ the app used; pass what the screen needs as `params` instead of reading
55
+ it in the screen.
56
+ - A screen the user must not dismiss (a forced update) is a **gated**
57
+ surface: the campaign's paywall is set to gated, and the `feature`
58
+ callback of `registerPlacement` only runs when the surface reports the
59
+ user through. Keep the app's own hard block until the surface is live.
60
+ - Create the campaign and placement on the dashboard for that placement
61
+ name and point it at the pushed surface; `superwall integrate` and the
62
+ `superwall` skill's `workflows/dashboard/` playbook cover it.
63
+ - Delete the screen widget, its route and its assets once the campaign is
64
+ live and verified on a device. Keep a release with both for one cycle
65
+ if users on old builds still need the native one.
@@ -0,0 +1,77 @@
1
+ # iOS source screens (SwiftUI and UIKit)
2
+
3
+ How the screen you are rebuilding was wired, what each construct becomes,
4
+ and what the user changes in the app once the rebuild is reviewed.
5
+
6
+ ## Reading the source
7
+
8
+ | In the source | Becomes |
9
+ | --- | --- |
10
+ | `Text("…")`, `Button("…")`, `Label("…")`, `.navigationTitle`, `String(localized:)`, `NSLocalizedString`, `UILabel.text` | a `messages/en.ts` entry read with `t()` |
11
+ | `"\(value)"` interpolation, `String(format:)` | a `t()` parameter |
12
+ | `Image("name")`, `UIImage(named:)` | the asset from `Assets.xcassets/name.imageset` (take the `@3x` or the PDF/SVG) copied into `assets/` |
13
+ | `Image(systemName:)` | an SVG in `assets/`; there are no SF Symbols on the web |
14
+ | `.font(.custom("Name", size:))`, `UIFont(name:)` | the font file from the bundle, subset, in `assets/`; `@font-face` in `theme.css` |
15
+ | `Color("name")`, asset catalog colors | a `:root` / `:root.dark` variable, both appearances from the catalog |
16
+ | `@Environment(\.colorScheme)`, `traitCollection.userInterfaceStyle` | `useColorScheme()` or plain `:root.dark` CSS |
17
+ | `Product.purchase`, `SKPaymentQueue`, `.buy()` | `usePurchase()` with the slot from `config.ts` |
18
+ | `AppStore.sync()`, `restoreCompletedTransactions` | `useActions().restore()` |
19
+ | `openURL`, `UIApplication.shared.open` (App Store links included) | `useActions().openUrl(url)` |
20
+ | `SKStoreReviewController`, `requestReview` | `useActions().requestStoreReview()` |
21
+ | `UNUserNotificationCenter.requestAuthorization` | `useActions().requestPermission("notification")` |
22
+ | `dismiss()`, `isPresented = false`, `dismiss(animated:)` | `useActions().close()` |
23
+ | `NavigationLink`, `.sheet`, `pushViewController` to another view in the same flow | a second route under `app/` and `useRouter().push()`; a sheet is a route with a custom `sheet` transition (see the abandonment-offer example) |
24
+ | `.sheet` / `present` to something outside the flow (settings, a web view) | close and let the app's placement handler route; note it |
25
+ | `@State`, `@Binding`, `@ObservedObject` view models | React state; data the view model fetched becomes a placement param or a user attribute the app sets before `register()` |
26
+ | `Bundle.main` version checks, `UIDevice` reads | `useDevice()` and `useVariables()`; the SDK reports app and OS versions |
27
+ | `.safeAreaInset`, `ignoresSafeArea`, `GeometryReader` for insets | nothing; the framework insets the screen (`layout.md`) |
28
+
29
+ A UIKit screen usually splits across a view controller, a storyboard or
30
+ XIB, and a view; read all three. Strings in a storyboard live in
31
+ `Main.strings` per language.
32
+
33
+ ## Wiring the app afterwards (the user does this, with you, after review)
34
+
35
+ This is a placement at a feature gate — the `superwall` skill's
36
+ `workflows/placements/` playbook (`superwall integrate --skill` includes it)
37
+ is the full playbook for
38
+ where and how to register, and the SDK docs are the reference for the
39
+ API; fetch them rather than working from memory:
40
+
41
+ ```bash
42
+ curl -sL https://superwall.com/docs/ios/quickstart/feature-gating.md # Superwall.shared.register(placement:)
43
+ curl -sL https://superwall.com/docs/llms.txt # every other page
44
+ ```
45
+
46
+ Where the app presented the screen:
47
+
48
+ ```swift
49
+ // before
50
+ if needsUpdate { present(UpdateRequiredViewController(), animated: true) }
51
+
52
+ // after
53
+ if needsUpdate {
54
+ Superwall.shared.register(placement: "update_required")
55
+ }
56
+ ```
57
+
58
+ or in SwiftUI:
59
+
60
+ ```swift
61
+ .fullScreenCover(isPresented: $needsUpdate) { UpdateRequiredView() } // before
62
+ .onChange(of: needsUpdate) { if $0 { Superwall.shared.register(placement: "update_required") } } // after
63
+ ```
64
+
65
+ - The placement name is in the brief. Register it with the same condition
66
+ the app used; pass what the screen needs as params
67
+ (`register(placement:params:)`) instead of reading it in the screen.
68
+ - A screen the user must not dismiss (a forced update) is a **gated**
69
+ surface: the campaign's paywall is set to gated, and the `feature`
70
+ closure passed to `register` only runs when the surface reports the
71
+ user through. Keep the app's own hard block until the surface is live.
72
+ - Create the campaign and placement on the dashboard for that placement
73
+ name and point it at the pushed surface; `superwall integrate` and the
74
+ `superwall` skill's `workflows/dashboard/` playbook cover it.
75
+ - Delete the native screen, its assets and its strings once the campaign
76
+ is live and verified on a device. Keep a release with both for one
77
+ cycle if users on old builds still need the native one.
@@ -0,0 +1,67 @@
1
+ # React Native and Expo source screens
2
+
3
+ How the screen you are rebuilding was wired, what each construct becomes,
4
+ and what the user changes in the app once the rebuild is reviewed. The
5
+ surface is React too, so most of the tree carries over; the differences
6
+ are the primitives, the styling and the hooks.
7
+
8
+ ## Reading the source
9
+
10
+ | In the source | Becomes |
11
+ | --- | --- |
12
+ | JSX text, `title=`, `placeholder=`, `accessibilityLabel=`, `i18n.t("key")` | a `messages/en.ts` entry read with `t()`; copy every locale file the app has into `messages/<locale>.ts` |
13
+ | `` `${value}` `` in text | a `t()` parameter |
14
+ | `<View>`, `<Text>`, `<Pressable>`, `<ScrollView>` | `div`, `p`/`span`, `button`, a scrolling page (`layout.md`) |
15
+ | `StyleSheet.create`, Tamagui / NativeWind classes | CSS in `theme.css` and modules; Tailwind works in the project if the app used NativeWind |
16
+ | `require("./x.png")`, `source={{ uri }}` | the file copied into `assets/`, imported relatively |
17
+ | `expo-image`, `SvgXml`, `lottie-react-native` | `img`, inline SVG, the framework's Lottie support (`assets.md`) |
18
+ | `useColorScheme()` | `useColorScheme()` from the framework, or `:root.dark` CSS |
19
+ | `react-native-iap` `requestPurchase`, RevenueCat `purchasePackage` | `usePurchase()` with the slot from `config.ts` |
20
+ | `restorePurchases`, `getAvailablePurchases` | `useActions().restore()` |
21
+ | `Linking.openURL`, `WebBrowser.openBrowserAsync` (App Store links included) | `useActions().openUrl(url)` |
22
+ | `expo-store-review` `requestReview` | `useActions().requestStoreReview()` |
23
+ | `Notifications.requestPermissionsAsync`, `messaging().requestPermission` | `useActions().requestPermission("notification")` |
24
+ | `navigation.goBack()`, `router.back()`, `dismiss()` | `useActions().close()` |
25
+ | `navigation.navigate` / `router.push` to a screen in the same flow | a second route under `app/` and `useRouter().push()` |
26
+ | `navigation.navigate` to something outside the flow | close and let the app's placement handler route; note it |
27
+ | `useState`, `useEffect` fetching data, context | React state; fetched data becomes a placement param or a user attribute the app sets before `register()` |
28
+ | `expo-application` / `DeviceInfo` version reads | `useDevice()` and `useVariables()`; the SDK reports app and OS versions |
29
+ | `SafeAreaView`, `useSafeAreaInsets` | nothing; the framework insets the screen (`layout.md`) |
30
+
31
+ ## Wiring the app afterwards (the user does this, with you, after review)
32
+
33
+ This is a placement at a feature gate — the `superwall` skill's
34
+ `workflows/placements/` playbook (`superwall integrate --skill` includes it)
35
+ is the full playbook for
36
+ where and how to register, and the SDK docs are the reference for the
37
+ API; fetch them rather than working from memory:
38
+
39
+ ```bash
40
+ curl -sL https://superwall.com/docs/expo/quickstart/feature-gating.md # registerPlacement / usePlacement
41
+ curl -sL https://superwall.com/docs/llms.txt # every other page
42
+ ```
43
+
44
+ Where the app rendered or navigated to the screen:
45
+
46
+ ```tsx
47
+ // before
48
+ if (needsUpdate) router.replace("/update-required");
49
+
50
+ // after (expo-superwall)
51
+ const { registerPlacement } = usePlacement();
52
+ if (needsUpdate) await registerPlacement({ placement: "update_required" });
53
+ ```
54
+
55
+ - The placement name is in the brief. Register it with the same condition
56
+ the app used; pass what the screen needs as `params` instead of reading
57
+ it in the screen.
58
+ - A screen the user must not dismiss (a forced update) is a **gated**
59
+ surface: the campaign's paywall is set to gated, and `feature` in
60
+ `registerPlacement` only runs when the surface reports the user
61
+ through. Keep the app's own hard block until the surface is live.
62
+ - Create the campaign and placement on the dashboard for that placement
63
+ name and point it at the pushed surface; `superwall integrate` and the
64
+ `superwall` skill's `workflows/dashboard/` playbook cover it.
65
+ - Delete the screen component, its route and its assets once the
66
+ campaign is live and verified on a device. Keep a release with both for
67
+ one cycle if users on old builds still need the native one.
@@ -0,0 +1,162 @@
1
+ # Responsive — every screen the paywall ships to
2
+
3
+ A paywall is designed at one size and shipped to dozens. The studio's
4
+ device presets are the contract: a paywall is finished when it is right
5
+ on every one of them, in both schemes, in the presentation style its
6
+ `config.ts` declares. This file says what "right" means at each size and
7
+ how to get there without a second design.
8
+
9
+ ## The sizes that matter
10
+
11
+ | Preset | Logical size | What it tests |
12
+ | --- | --- | --- |
13
+ | iPhone SE | 375 × 667, no cutout | The shortest phone: does the pinned CTA still leave room for the content? 20px status bar, no home indicator |
14
+ | Responsive at 320 | 320 wide (drag the frame's edge or type the width) | Narrowest width in the wild (older phones, split view). Nothing may overflow; display type must have shrunk. Keep dragging narrower and taller to find where the layout breaks |
15
+ | iPhone 17 / Air / Pro Max | 402–440 × 874–956, island | The default. The tallest phones: does the layout use the height or leave a void above the CTA? |
16
+ | Pixel 10 / Galaxy S25 | 412 × 915 / 360 × 780, Android | Android conventions, 24px status-bar floor, no bottom inset, 360-wide Galaxy is the second-narrowest common width |
17
+ | iPad mini / iPad Pro 11″ | 744 × 1133 / 834 × 1194 | Tablet: a phone layout stretched to 800px is wrong; a centered column or a two-column reflow is right |
18
+ | Desktop (web only) | 1440 × 900 | A web funnel in a browser: a phone-width column, centered; hover states; real keyboard focus |
19
+ | Landscape | any preset rotated | Only where the app allows it. Cutout on the sides, 21px indicator, no status bar |
20
+
21
+ The studio also switches what the paywall is *told* — platform, model,
22
+ OS — so the inset floors and any `data-sw-*`-keyed CSS follow the preset.
23
+
24
+ ## Width
25
+
26
+ - **Fluid by default.** `width: 100%`, `max-width` for the reading
27
+ column, `padding-inline: 20px` (16px at 320 if the design is tight).
28
+ Never a fixed pixel width on anything wider than an icon.
29
+ - **Type scales with `clamp()`**: a 40px display size on the reference is
30
+ `clamp(2rem, 8vw, 2.5rem)` — 32px at 320, 40px at 393+, capped on
31
+ tablets. Body text does not scale; it stays 15–17px everywhere.
32
+ - **Rows of options** (plan cards, feature bullets) stack vertically on
33
+ phones; side-by-side plan cards fit three across at 393 only when each
34
+ is under 110px wide — check 320 and 360, where they usually can't.
35
+ - **Pills and badges** ("Most popular", "Save 40%") wrap or truncate
36
+ before they push the row wider; give them `white-space: nowrap` and
37
+ the row `min-width: 0`, and check the longest locale.
38
+ - `min-width: 0` on flex children with text, or a long product name
39
+ breaks the row instead of wrapping.
40
+
41
+ ## Height — the short phone is the hard one
42
+
43
+ The iPhone SE's 667px, minus 20 status bar, minus a 120px pinned footer,
44
+ leaves under 530px for everything else. Design for that, and the tall
45
+ phones get more air, not a different layout.
46
+
47
+ - **Content scrolls; the CTA never does.** With the footer sticky at the
48
+ page's end, a page that doesn't fit simply scrolls under it. That is
49
+ the entire strategy for short screens; do not shrink the CTA or hide
50
+ the legal links to "make it fit".
51
+ - **The shell is `flex: 1 1 auto`, never a viewport-height box.** The
52
+ framework's wrapper is the one element sized to the viewport (with
53
+ `100dvh`, so Safari's collapsing toolbar can't make it taller than what
54
+ is visible); a shell with `min-height: 100dvh` of its own overflows the
55
+ insets and scrolls.
56
+ - **Vertical rhythm compresses before content is cut**: `gap`s of
57
+ 24→16, a hero of `clamp(160px, 30dvh, 280px)` rather than a fixed 280,
58
+ feature lists that lose a row of *spacing* at 667 rather than a
59
+ feature. `@media (max-height: 700px)` is the switch for that.
60
+ - A tall phone should not end with a void above the CTA: `margin-top:
61
+ auto` on the actions block, or a hero that grows with `dvh`, uses the
62
+ height.
63
+ - A **short page** (three lines and a button) centers its content or
64
+ pins it to the top by design; it does not stretch a card to fill the
65
+ screen.
66
+
67
+ ## Tablets
68
+
69
+ - An iPad is not a big phone. Either **center a column** (`max-width:
70
+ 34rem`, the same layout as the phone with more margin) or **reflow**
71
+ (hero beside the copy, plan cards in a row) — the design reference
72
+ decides; the column is the safe default when it says nothing.
73
+ - Insets are small (24px top, 20px bottom) and a `modal` floats in the
74
+ middle with 0 on every side; the framework sets both, so the phone CSS
75
+ usually just works.
76
+ - Tap targets can stay 44px; type does not grow much (cap display at the
77
+ reference size); images do grow, so ship a 2× asset that survives
78
+ 834px wide or cap the hero's width.
79
+ - `data-sw-idiom="tablet"` on `:root` is the hook for tablet-only rules
80
+ when a media query on width isn't the right question (a narrow iPad
81
+ split view is still a tablet).
82
+
83
+ ## Landscape
84
+
85
+ Most apps lock portrait; `useDevice().orientation` says which state the
86
+ paywall is in, live. Where landscape is allowed:
87
+
88
+ - **The cutout moves to the sides** and the framework moves the insets
89
+ with it (44/59px on both sides, top 0, bottom 21px), so the paywall's
90
+ padding already clears the camera. Only a full-bleed design
91
+ (`insets: "none"`) has to handle it, with `--sw-safe-area-inset-left`
92
+ and `-right` on the chrome over the bleed.
93
+ - Reflow to **two columns** (hero left, copy and CTA right) rather than
94
+ shrinking the portrait layout; the `orientation` example is the
95
+ reference.
96
+ - Keep the CTA pinned; in landscape there is even less height, and the
97
+ content scrolls in its column.
98
+
99
+ ## Sheets, drawers and popups
100
+
101
+ `presentation.style` changes the viewport the paywall lives in, and the
102
+ studio shows it that way:
103
+
104
+ - **`modal`** rises as a sheet below the status bar on phones, so the
105
+ framework's top inset is 0 and the sheet's own grabber sits at the top:
106
+ leave 16–20px above the first element, and don't draw a close button
107
+ where the grabber is unless the design does. On iPad the sheet floats,
108
+ and both insets are 0.
109
+ - **`drawer`** takes the height you declared (`drawer.height`, a
110
+ percentage); the paywall's viewport is that drawer, not the screen.
111
+ Design for the declared height and check the tallest locale's copy
112
+ fits or scrolls inside it.
113
+ - **`popup`** is centered with the declared width and height and inset by
114
+ the SDK; the framework's insets are 0 and the page is the popup's
115
+ interior.
116
+ No pinned footer with a gradient here — the popup is short enough that
117
+ the CTA is simply the last element.
118
+ - **Fullscreen and push** are the full screen: everything in
119
+ [mobile-design.md](mobile-design.md) applies as written.
120
+
121
+ ## Dynamic type and font scale
122
+
123
+ - The host reports `fontScale` (Android) and
124
+ `preferredContentSizeCategory` (iOS) in `useDevice()`. A paywall does
125
+ not have to honor them — a webview doesn't scale text on its own — but
126
+ a design that wants to should use `rem` for type and scale the root
127
+ with the reported value, clamped to the range the layout survives
128
+ (0.85–1.3 is a safe band).
129
+ - Whatever the strategy, the pinned CTA keeps its height and the legal
130
+ text stays legible; if anything gives, it is the hero.
131
+
132
+ ## Locales are a responsive axis
133
+
134
+ German and Finnish run 30% longer than English; Japanese runs shorter
135
+ but taller. The studio's locale switch is part of the size matrix:
136
+
137
+ - Buttons wrap to two lines rather than clip; set `min-height`, not
138
+ `height`, on every button.
139
+ - Plan cards with a price and a period per line need the longest
140
+ formatted price (`$1,299.99/year`) checked, not `$9.99`.
141
+ - Never `text-overflow: ellipsis` on a price, a CTA label or a legal
142
+ line.
143
+
144
+ ## The verification matrix
145
+
146
+ Before hand-off, in the studio, walk every cell. Each takes seconds; a
147
+ device bug found after promote takes a release.
148
+
149
+ | | iPhone SE | 320 wide | Island phone | Pixel / Galaxy | iPad | Landscape\* | Desktop\*\* |
150
+ | --- | --- | --- | --- | --- | --- | --- | --- |
151
+ | Light | | | | | | | |
152
+ | Dark | | | | | | | |
153
+ | Longest locale | | | | | | | |
154
+ | Configured presentation | | | | | | | |
155
+ | Trial toggle (if any) | | | | | | | |
156
+
157
+ \* where the app allows rotation · \*\* web platforms only
158
+
159
+ What to look at in each cell: the close/back control against the bar and
160
+ cutout, the CTA against the bottom edge, horizontal overflow, the last
161
+ content row scrolling clear of the footer, and the unpriced state if the
162
+ products aren't resolving.
@@ -1,12 +1,12 @@
1
- import "./output-csAtR6kJ.js";
2
- import "./telemetry-BtkMdT-5.js";
3
- import "./update-CeylIjx5.js";
4
- import "./token-hM7V1KMG.js";
5
- import { t as defineCommand } from "./command-DP96_gmP.js";
6
- import { n as ui } from "./ui-Lqt_zFOr.js";
7
- import { a as skillsOutOfDate, o as syncSkills, r as fetchPublicSkills, t as SUPERWALL_SKILLS_SOURCE } from "./skills-CODut1Hn.js";
1
+ import "./output-CiELrN8w.js";
2
+ import "./telemetry-BuCbmoux.js";
3
+ import "./update-DnGfpCD7.js";
4
+ import "./token-mju3Q-vc.js";
5
+ import { t as defineCommand } from "./command-DMoMn7uc.js";
6
+ import { n as ui } from "./ui-4gLyfrgl.js";
7
+ import { a as skillsOutOfDate, o as syncSkills, r as fetchPublicSkills, t as SKILLS_INSTALL_SOURCE } from "./skills-grTDuHlc.js";
8
8
  import "./spawn-DSoTXy_j.js";
9
- import { t as withSpinner } from "./spinner-B9dT3DBY.js";
9
+ import { t as withSpinner } from "./spinner-DFctF_Jw.js";
10
10
 
11
11
  //#region src/commands/account/skills.ts
12
12
  const runSkills = defineCommand({
@@ -26,9 +26,9 @@ const runSkills = defineCommand({
26
26
  }
27
27
  }
28
28
  if (!skills && !dryRun && interactive) {
29
- const available = await withSpinner(`Fetching skills from ${SUPERWALL_SKILLS_SOURCE}`, fetchPublicSkills);
29
+ const available = await withSpinner(`Fetching skills from ${SKILLS_INSTALL_SOURCE()}`, fetchPublicSkills);
30
30
  const picked = await ui.multiselect({
31
- message: `Which skills from ${SUPERWALL_SKILLS_SOURCE}? (installs globally)`,
31
+ message: `Which skills from ${SKILLS_INSTALL_SOURCE()}? (installs globally)`,
32
32
  options: available.map((s) => ({
33
33
  value: s.name,
34
34
  label: s.name,
@@ -41,8 +41,8 @@ const runSkills = defineCommand({
41
41
  return;
42
42
  }
43
43
  skills = picked.length === available.length ? void 0 : picked;
44
- } else if (skills?.length) ui.info(`Installing \`${skills.join("`, `")}\` from ${SUPERWALL_SKILLS_SOURCE}`);
45
- else ui.info(`Installing every skill from ${SUPERWALL_SKILLS_SOURCE}`);
44
+ } else if (skills?.length) ui.info(`Installing \`${skills.join("`, `")}\` from ${SKILLS_INSTALL_SOURCE()}`);
45
+ else ui.info(`Installing every skill from ${SKILLS_INSTALL_SOURCE()}`);
46
46
  const spin = ui.spinner();
47
47
  spin.start(dryRun ? "Resolving" : "Installing skills globally");
48
48
  const { ok, commands } = await syncSkills({