@superwall/studio 2.4.0 → 2.5.1
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 +13 -0
- 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 +2114 -2059
- package/dist/lib/lib/canvas.d.ts +4 -3
- 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/screens/SurfaceEditor.tsx +0 -33
- package/dist/assets/index-DYECTotv.js +0 -11
- package/dist/assets/index-xuSjpy2B.css +0 -1
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.
|