@superwall/studio 2.5.0 → 2.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.
package/README.md CHANGED
@@ -110,6 +110,19 @@ version? }, onStep)` performs one and streams its steps, `status(surface)`
110
110
  has no project on disk) offers `["promote"]` and a `pick` that switches the
111
111
  surface, so the menu collapses to the picker and one button; the local
112
112
  studio keeps its own pick and sends a `version` only when one was chosen.
113
+ - `Canvas` is the zoomable stage the studio previews on, with
114
+ `useCanvasScale` for what it draws and a `CanvasHandle` ref (`fit`,
115
+ `actualSize`, `zoomStep`, `zoomTo`, `zoom()`, `pan`, `hold`). `inset` sets
116
+ the fit margin (48px by default). `contained` is for a stage inside a page
117
+ that scrolls, such as a chat: a plain wheel scrolls the page, a pinch or
118
+ ctrl-wheel zooms, a finger scrolls the page until the stage is zoomed in,
119
+ and the zoom keys and Space reach it only while it is hovered or focused.
120
+ Resizing the stage refits it, or re-centres it at the zoom it was left at.
121
+ `percent` formats a scale for a zoom readout.
122
+ - `chromeFor`, `deviceVariablesFor`, `isWebOnly` and `webViewportFor` are the
123
+ device rules the studio draws with: the frame chrome for a device (none on
124
+ web), the `device` variables a paywall reads, whether a paywall targets only
125
+ web, and the viewport a browser leaves on a device.
113
126
  - `StudioShell` (`position="absolute"` when the host owns the viewport) is
114
127
  the ink stage every screen expects, and it carries the `sw-studio` class
115
128
  the stylesheet scopes its base rules to.
@@ -119,8 +132,9 @@ version? }, onStep)` performs one and streams its steps, `status(surface)`
119
132
  the sheet's `@property` rules at document level, where browsers expect them.
120
133
  - `@superwall/studio/products` is the pure mapping from a dashboard product
121
134
  (the v2 API shape) to the variables a paywall reads (`price`, `periodly`,
122
- `trialPeriodDays`, …). The CLI and the hosted studio share it, so the
123
- Variables panel shows the same numbers in both.
135
+ `trialPeriodDays`, `trialPeriodPrice`, …), with amounts in the currency's
136
+ own minor units. `superwall dev` uses it; the dashboard builds its samples
137
+ with its own pricing engine, so the two must be kept in step by hand.
124
138
  - `@superwall/studio/contract` is a types-only entry: the action, status,
125
139
  samples and app-scheme shapes the CLI implements for the framework's
126
140
  preview server, importable from node without DOM types.