@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 +16 -2
- package/dist/assets/index-CrvkmzpL.js +11 -0
- package/dist/assets/index-DKNVIOVd.css +1 -0
- package/dist/index.html +2 -2
- package/dist/lib/components/preview/Canvas.d.ts +5 -1
- package/dist/lib/index.d.ts +4 -2
- package/dist/lib/index.js +1768 -1688
- package/dist/lib/lib/canvas.d.ts +4 -3
- package/dist/lib/products.js +55 -32
- package/dist/lib/studio.css +1 -1
- package/package.json +2 -2
- package/src/components/preview/Canvas.tsx +171 -42
- package/src/index.ts +17 -2
- package/src/lib/canvas.ts +22 -11
- package/src/lib/products.ts +40 -5
- package/dist/assets/index-D4O5zguy.css +0 -1
- package/dist/assets/index-DeUTvSWa.js +0 -11
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`, …)
|
|
123
|
-
|
|
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.
|