@measured/puck 0.20.1 → 0.20.2-canary.84aae8ef

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.
@@ -6760,7 +6760,13 @@ var useComponentList = () => {
6760
6760
  let _componentList;
6761
6761
  _componentList = Object.entries(uiComponentList).map(
6762
6762
  ([categoryKey, category]) => {
6763
- if (category.visible === false || !category.components) {
6763
+ if (!category.components) {
6764
+ return null;
6765
+ }
6766
+ category.components.forEach((componentName) => {
6767
+ matchedComponents.push(componentName);
6768
+ });
6769
+ if (category.visible === false) {
6764
6770
  return null;
6765
6771
  }
6766
6772
  return /* @__PURE__ */ jsx31(
@@ -6770,7 +6776,6 @@ var useComponentList = () => {
6770
6776
  title: category.title || categoryKey,
6771
6777
  children: category.components.map((componentName, i) => {
6772
6778
  var _a2;
6773
- matchedComponents.push(componentName);
6774
6779
  const componentConf = config.components[componentName] || {};
6775
6780
  return /* @__PURE__ */ jsx31(
6776
6781
  ComponentList.Item,
@@ -7643,6 +7648,9 @@ var ViewportControls = ({
7643
7648
  {
7644
7649
  className: getClassName25("zoomSelect"),
7645
7650
  value: zoom.toString(),
7651
+ onClick: (e) => {
7652
+ e.stopPropagation();
7653
+ },
7646
7654
  onChange: (e) => {
7647
7655
  onZoom(parseFloat(e.currentTarget.value));
7648
7656
  },
@@ -7828,8 +7836,7 @@ var Canvas = () => {
7828
7836
  zoom: zoomConfig.zoom
7829
7837
  });
7830
7838
  const newUi = {
7831
- viewports: __spreadProps(__spreadValues({}, viewports), { current: uiViewport }),
7832
- itemSelector: null
7839
+ viewports: __spreadProps(__spreadValues({}, viewports), { current: uiViewport })
7833
7840
  };
7834
7841
  setUi(newUi);
7835
7842
  if (ZOOM_ON_CHANGE) {
package/dist/index.js CHANGED
@@ -7381,7 +7381,13 @@ var useComponentList = () => {
7381
7381
  let _componentList;
7382
7382
  _componentList = Object.entries(uiComponentList).map(
7383
7383
  ([categoryKey, category]) => {
7384
- if (category.visible === false || !category.components) {
7384
+ if (!category.components) {
7385
+ return null;
7386
+ }
7387
+ category.components.forEach((componentName) => {
7388
+ matchedComponents.push(componentName);
7389
+ });
7390
+ if (category.visible === false) {
7385
7391
  return null;
7386
7392
  }
7387
7393
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
@@ -7391,7 +7397,6 @@ var useComponentList = () => {
7391
7397
  title: category.title || categoryKey,
7392
7398
  children: category.components.map((componentName, i) => {
7393
7399
  var _a2;
7394
- matchedComponents.push(componentName);
7395
7400
  const componentConf = config.components[componentName] || {};
7396
7401
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
7397
7402
  ComponentList.Item,
@@ -8253,6 +8258,9 @@ var ViewportControls = ({
8253
8258
  {
8254
8259
  className: getClassName25("zoomSelect"),
8255
8260
  value: zoom.toString(),
8261
+ onClick: (e) => {
8262
+ e.stopPropagation();
8263
+ },
8256
8264
  onChange: (e) => {
8257
8265
  onZoom(parseFloat(e.currentTarget.value));
8258
8266
  },
@@ -8433,8 +8441,7 @@ var Canvas = () => {
8433
8441
  zoom: zoomConfig.zoom
8434
8442
  });
8435
8443
  const newUi = {
8436
- viewports: __spreadProps(__spreadValues({}, viewports), { current: uiViewport }),
8437
- itemSelector: null
8444
+ viewports: __spreadProps(__spreadValues({}, viewports), { current: uiViewport })
8438
8445
  };
8439
8446
  setUi(newUi);
8440
8447
  if (ZOOM_ON_CHANGE) {
package/dist/index.mjs CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  setDeep,
19
19
  useGetPuck,
20
20
  usePuck
21
- } from "./chunk-V7Y7BFEC.mjs";
21
+ } from "./chunk-DWJLTNJ7.mjs";
22
22
  import {
23
23
  init_react_import,
24
24
  migrate,
@@ -7381,7 +7381,13 @@ var useComponentList = () => {
7381
7381
  let _componentList;
7382
7382
  _componentList = Object.entries(uiComponentList).map(
7383
7383
  ([categoryKey, category]) => {
7384
- if (category.visible === false || !category.components) {
7384
+ if (!category.components) {
7385
+ return null;
7386
+ }
7387
+ category.components.forEach((componentName) => {
7388
+ matchedComponents.push(componentName);
7389
+ });
7390
+ if (category.visible === false) {
7385
7391
  return null;
7386
7392
  }
7387
7393
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
@@ -7391,7 +7397,6 @@ var useComponentList = () => {
7391
7397
  title: category.title || categoryKey,
7392
7398
  children: category.components.map((componentName, i) => {
7393
7399
  var _a2;
7394
- matchedComponents.push(componentName);
7395
7400
  const componentConf = config.components[componentName] || {};
7396
7401
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
7397
7402
  ComponentList.Item,
@@ -8253,6 +8258,9 @@ var ViewportControls = ({
8253
8258
  {
8254
8259
  className: getClassName25("zoomSelect"),
8255
8260
  value: zoom.toString(),
8261
+ onClick: (e) => {
8262
+ e.stopPropagation();
8263
+ },
8256
8264
  onChange: (e) => {
8257
8265
  onZoom(parseFloat(e.currentTarget.value));
8258
8266
  },
@@ -8433,8 +8441,7 @@ var Canvas = () => {
8433
8441
  zoom: zoomConfig.zoom
8434
8442
  });
8435
8443
  const newUi = {
8436
- viewports: __spreadProps(__spreadValues({}, viewports), { current: uiViewport }),
8437
- itemSelector: null
8444
+ viewports: __spreadProps(__spreadValues({}, viewports), { current: uiViewport })
8438
8445
  };
8439
8446
  setUi(newUi);
8440
8447
  if (ZOOM_ON_CHANGE) {
@@ -18,7 +18,7 @@ import {
18
18
  setDeep,
19
19
  useGetPuck,
20
20
  usePuck
21
- } from "./chunk-V7Y7BFEC.mjs";
21
+ } from "./chunk-DWJLTNJ7.mjs";
22
22
  import {
23
23
  init_react_import,
24
24
  migrate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.20.1",
3
+ "version": "0.20.2-canary.84aae8ef",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Chris Villa <chris@puckeditor.com>",
6
6
  "repository": "measuredco/puck",