@measured/puck 0.21.0-canary.5c9698fb → 0.21.0-canary.b6ed9789

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.
@@ -9098,12 +9098,12 @@ function PuckProvider({ children }) {
9098
9098
  const viewportDifferences = Object.entries(viewports).filter(([_, value]) => value.width !== "100%").map(([key, value]) => ({
9099
9099
  key,
9100
9100
  diff: Math.abs(
9101
- viewportWidth - (typeof value.width === "string" ? viewportWidth : value.width)
9101
+ viewportWidth - (typeof value.width === "string" ? viewportWidth : viewportWidth)
9102
9102
  ),
9103
9103
  value
9104
9104
  })).sort((a, b) => a.diff > b.diff ? 1 : -1);
9105
9105
  let closestViewport = viewportDifferences[0].value;
9106
- if (closestViewport.width < viewportWidth && containsFullWidthViewport) {
9106
+ if (closestViewport.width > viewportWidth && containsFullWidthViewport) {
9107
9107
  closestViewport = fullWidthViewport;
9108
9108
  }
9109
9109
  if (iframe.enabled) {
package/dist/index.js CHANGED
@@ -9785,12 +9785,12 @@ function PuckProvider({ children }) {
9785
9785
  const viewportDifferences = Object.entries(viewports).filter(([_, value]) => value.width !== "100%").map(([key, value]) => ({
9786
9786
  key,
9787
9787
  diff: Math.abs(
9788
- viewportWidth - (typeof value.width === "string" ? viewportWidth : value.width)
9788
+ viewportWidth - (typeof value.width === "string" ? viewportWidth : viewportWidth)
9789
9789
  ),
9790
9790
  value
9791
9791
  })).sort((a, b) => a.diff > b.diff ? 1 : -1);
9792
9792
  let closestViewport = viewportDifferences[0].value;
9793
- if (closestViewport.width < viewportWidth && containsFullWidthViewport) {
9793
+ if (closestViewport.width > viewportWidth && containsFullWidthViewport) {
9794
9794
  closestViewport = fullWidthViewport;
9795
9795
  }
9796
9796
  if (iframe.enabled) {
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  setDeep,
22
22
  useGetPuck,
23
23
  usePuck
24
- } from "./chunk-TRQBUMQH.mjs";
24
+ } from "./chunk-VVS2EUKT.mjs";
25
25
  import {
26
26
  init_react_import,
27
27
  migrate,
@@ -9785,12 +9785,12 @@ function PuckProvider({ children }) {
9785
9785
  const viewportDifferences = Object.entries(viewports).filter(([_, value]) => value.width !== "100%").map(([key, value]) => ({
9786
9786
  key,
9787
9787
  diff: Math.abs(
9788
- viewportWidth - (typeof value.width === "string" ? viewportWidth : value.width)
9788
+ viewportWidth - (typeof value.width === "string" ? viewportWidth : viewportWidth)
9789
9789
  ),
9790
9790
  value
9791
9791
  })).sort((a, b) => a.diff > b.diff ? 1 : -1);
9792
9792
  let closestViewport = viewportDifferences[0].value;
9793
- if (closestViewport.width < viewportWidth && containsFullWidthViewport) {
9793
+ if (closestViewport.width > viewportWidth && containsFullWidthViewport) {
9794
9794
  closestViewport = fullWidthViewport;
9795
9795
  }
9796
9796
  if (iframe.enabled) {
@@ -21,7 +21,7 @@ import {
21
21
  setDeep,
22
22
  useGetPuck,
23
23
  usePuck
24
- } from "./chunk-TRQBUMQH.mjs";
24
+ } from "./chunk-VVS2EUKT.mjs";
25
25
  import {
26
26
  init_react_import,
27
27
  migrate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.21.0-canary.5c9698fb",
3
+ "version": "0.21.0-canary.b6ed9789",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Chris Villa <chris@puckeditor.com>",
6
6
  "repository": "measuredco/puck",