@puckeditor/core 0.21.2-canary.72cdad9d → 0.21.2-canary.e16ff6b5

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
@@ -9,7 +9,7 @@
9
9
  </picture>
10
10
  </a>
11
11
 
12
- _The visual editor for React_
12
+ _Create your own AI page builder_
13
13
 
14
14
  [Documentation](https://puckeditor.com/docs?utm_source=readme&utm_medium=code&utm_campaign=repo&utm_contents=docs_link) • [Demo](https://demo.puckeditor.com/edit?utm_source=readme&utm_medium=code&utm_campaign=repo&utm_contents=demo_link) • [Discord](https://discord.gg/V9mDAhuxyZ) • [Contributing](https://github.com/puckeditor/puck/blob/main/CONTRIBUTING.md)
15
15
 
@@ -6979,11 +6979,13 @@ var getClassName27 = get_class_name_factory_default("PuckCanvas", styles_module_
6979
6979
  var ZOOM_ON_CHANGE = true;
6980
6980
  var TRANSITION_DURATION = 150;
6981
6981
  var Canvas = () => {
6982
+ var _a;
6982
6983
  const { frameRef } = useCanvasFrame();
6983
6984
  const resetAutoZoom = useResetAutoZoom(frameRef);
6984
6985
  const {
6985
6986
  _experimentalFullScreenCanvas,
6986
- viewports: viewportOptions = defaultViewports
6987
+ viewports: viewportOptions = defaultViewports,
6988
+ ui: uiProp
6987
6989
  } = usePropsContext();
6988
6990
  const {
6989
6991
  dispatch,
@@ -7080,10 +7082,11 @@ var Canvas = () => {
7080
7082
  }, []);
7081
7083
  const appStoreApi = useAppStoreApi();
7082
7084
  useEffect25(() => {
7083
- var _a;
7085
+ var _a2, _b;
7084
7086
  if (typeof window === "undefined") return;
7087
+ if ((_a2 = uiProp == null ? void 0 : uiProp.viewports) == null ? void 0 : _a2.current) return;
7085
7088
  const viewportWidth = window.innerWidth;
7086
- const frameWidth = (_a = frameRef.current) == null ? void 0 : _a.getBoundingClientRect().width;
7089
+ const frameWidth = (_b = frameRef.current) == null ? void 0 : _b.getBoundingClientRect().width;
7087
7090
  if (!viewportWidth) return;
7088
7091
  if (!frameWidth) return;
7089
7092
  if (viewportOptions.length === 0) return;
@@ -7122,7 +7125,13 @@ var Canvas = () => {
7122
7125
  }
7123
7126
  appStoreApi.setState(__spreadProps(__spreadValues({}, appState), { history }));
7124
7127
  }
7125
- }, [viewportOptions, frameRef.current, iframe, appStoreApi]);
7128
+ }, [
7129
+ viewportOptions,
7130
+ frameRef.current,
7131
+ iframe,
7132
+ appStoreApi,
7133
+ (_a = uiProp == null ? void 0 : uiProp.viewports) == null ? void 0 : _a.current
7134
+ ]);
7126
7135
  return /* @__PURE__ */ jsxs18(
7127
7136
  "div",
7128
7137
  {
package/dist/index.js CHANGED
@@ -12774,11 +12774,13 @@ var getClassName36 = get_class_name_factory_default("PuckCanvas", styles_module_
12774
12774
  var ZOOM_ON_CHANGE = true;
12775
12775
  var TRANSITION_DURATION = 150;
12776
12776
  var Canvas = () => {
12777
+ var _a;
12777
12778
  const { frameRef } = useCanvasFrame();
12778
12779
  const resetAutoZoom = useResetAutoZoom(frameRef);
12779
12780
  const {
12780
12781
  _experimentalFullScreenCanvas,
12781
- viewports: viewportOptions = defaultViewports
12782
+ viewports: viewportOptions = defaultViewports,
12783
+ ui: uiProp
12782
12784
  } = usePropsContext();
12783
12785
  const {
12784
12786
  dispatch,
@@ -12875,10 +12877,11 @@ var Canvas = () => {
12875
12877
  }, []);
12876
12878
  const appStoreApi = useAppStoreApi();
12877
12879
  (0, import_react88.useEffect)(() => {
12878
- var _a;
12880
+ var _a2, _b;
12879
12881
  if (typeof window === "undefined") return;
12882
+ if ((_a2 = uiProp == null ? void 0 : uiProp.viewports) == null ? void 0 : _a2.current) return;
12880
12883
  const viewportWidth = window.innerWidth;
12881
- const frameWidth = (_a = frameRef.current) == null ? void 0 : _a.getBoundingClientRect().width;
12884
+ const frameWidth = (_b = frameRef.current) == null ? void 0 : _b.getBoundingClientRect().width;
12882
12885
  if (!viewportWidth) return;
12883
12886
  if (!frameWidth) return;
12884
12887
  if (viewportOptions.length === 0) return;
@@ -12917,7 +12920,13 @@ var Canvas = () => {
12917
12920
  }
12918
12921
  appStoreApi.setState(__spreadProps(__spreadValues({}, appState), { history }));
12919
12922
  }
12920
- }, [viewportOptions, frameRef.current, iframe, appStoreApi]);
12923
+ }, [
12924
+ viewportOptions,
12925
+ frameRef.current,
12926
+ iframe,
12927
+ appStoreApi,
12928
+ (_a = uiProp == null ? void 0 : uiProp.viewports) == null ? void 0 : _a.current
12929
+ ]);
12921
12930
  return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
12922
12931
  "div",
12923
12932
  {
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  setDeep,
18
18
  useGetPuck,
19
19
  usePuck
20
- } from "./chunk-SAWVRSPE.mjs";
20
+ } from "./chunk-5OW6KNWG.mjs";
21
21
  import "./chunk-RHVK562Z.mjs";
22
22
  import {
23
23
  migrate,
@@ -12777,11 +12777,13 @@ var getClassName36 = get_class_name_factory_default("PuckCanvas", styles_module_
12777
12777
  var ZOOM_ON_CHANGE = true;
12778
12778
  var TRANSITION_DURATION = 150;
12779
12779
  var Canvas = () => {
12780
+ var _a;
12780
12781
  const { frameRef } = useCanvasFrame();
12781
12782
  const resetAutoZoom = useResetAutoZoom(frameRef);
12782
12783
  const {
12783
12784
  _experimentalFullScreenCanvas,
12784
- viewports: viewportOptions = defaultViewports
12785
+ viewports: viewportOptions = defaultViewports,
12786
+ ui: uiProp
12785
12787
  } = usePropsContext();
12786
12788
  const {
12787
12789
  dispatch,
@@ -12878,10 +12880,11 @@ var Canvas = () => {
12878
12880
  }, []);
12879
12881
  const appStoreApi = useAppStoreApi();
12880
12882
  (0, import_react88.useEffect)(() => {
12881
- var _a;
12883
+ var _a2, _b;
12882
12884
  if (typeof window === "undefined") return;
12885
+ if ((_a2 = uiProp == null ? void 0 : uiProp.viewports) == null ? void 0 : _a2.current) return;
12883
12886
  const viewportWidth = window.innerWidth;
12884
- const frameWidth = (_a = frameRef.current) == null ? void 0 : _a.getBoundingClientRect().width;
12887
+ const frameWidth = (_b = frameRef.current) == null ? void 0 : _b.getBoundingClientRect().width;
12885
12888
  if (!viewportWidth) return;
12886
12889
  if (!frameWidth) return;
12887
12890
  if (viewportOptions.length === 0) return;
@@ -12920,7 +12923,13 @@ var Canvas = () => {
12920
12923
  }
12921
12924
  appStoreApi.setState(__spreadProps(__spreadValues({}, appState), { history }));
12922
12925
  }
12923
- }, [viewportOptions, frameRef.current, iframe, appStoreApi]);
12926
+ }, [
12927
+ viewportOptions,
12928
+ frameRef.current,
12929
+ iframe,
12930
+ appStoreApi,
12931
+ (_a = uiProp == null ? void 0 : uiProp.viewports) == null ? void 0 : _a.current
12932
+ ]);
12924
12933
  return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
12925
12934
  "div",
12926
12935
  {
@@ -17,7 +17,7 @@ import {
17
17
  setDeep,
18
18
  useGetPuck,
19
19
  usePuck
20
- } from "./chunk-SAWVRSPE.mjs";
20
+ } from "./chunk-5OW6KNWG.mjs";
21
21
  import "./chunk-RHVK562Z.mjs";
22
22
  import {
23
23
  migrate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puckeditor/core",
3
- "version": "0.21.2-canary.72cdad9d",
3
+ "version": "0.21.2-canary.e16ff6b5",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Chris Villa <chris@puckeditor.com>",
6
6
  "repository": "puckeditor/puck",