@measured/puck 0.14.1 → 0.14.2-canary.4dbd487
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +6 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -29296,10 +29296,10 @@ var setupZone = (data, zoneKey) => {
|
|
29296
29296
|
var getItem = (selector, data, dynamicProps = {}) => {
|
29297
29297
|
if (!selector.zone || selector.zone === rootDroppableId) {
|
29298
29298
|
const item2 = data.content[selector.index];
|
29299
|
-
return __spreadProps(__spreadValues({}, item2), { props: dynamicProps[item2.props.id] || item2.props });
|
29299
|
+
return (item2 == null ? void 0 : item2.props) ? __spreadProps(__spreadValues({}, item2), { props: dynamicProps[item2.props.id] || item2.props }) : void 0;
|
29300
29300
|
}
|
29301
29301
|
const item = setupZone(data, selector.zone).zones[selector.zone][selector.index];
|
29302
|
-
return __spreadProps(__spreadValues({}, item), { props: dynamicProps[item.props.id] || item.props });
|
29302
|
+
return (item == null ? void 0 : item.props) ? __spreadProps(__spreadValues({}, item), { props: dynamicProps[item.props.id] || item.props }) : void 0;
|
29303
29303
|
};
|
29304
29304
|
|
29305
29305
|
// components/ViewportControls/default-viewports.ts
|
@@ -32535,10 +32535,11 @@ var useComponentList = (config, ui) => {
|
|
32535
32535
|
children: category.components.map((componentName, i) => {
|
32536
32536
|
var _a2;
|
32537
32537
|
matchedComponents.push(componentName);
|
32538
|
+
const componentConf = config.components[componentName] || {};
|
32538
32539
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
32539
32540
|
ComponentList.Item,
|
32540
32541
|
{
|
32541
|
-
label: (_a2 =
|
32542
|
+
label: (_a2 = componentConf["label"]) != null ? _a2 : componentName,
|
32542
32543
|
name: componentName,
|
32543
32544
|
index: i
|
32544
32545
|
},
|
@@ -32562,11 +32563,12 @@ var useComponentList = (config, ui) => {
|
|
32562
32563
|
title: ((_c = ui.componentList.other) == null ? void 0 : _c.title) || "Other",
|
32563
32564
|
children: remainingComponents.map((componentName, i) => {
|
32564
32565
|
var _a2;
|
32566
|
+
const componentConf = config.components[componentName] || {};
|
32565
32567
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
32566
32568
|
ComponentList.Item,
|
32567
32569
|
{
|
32568
32570
|
name: componentName,
|
32569
|
-
label: (_a2 =
|
32571
|
+
label: (_a2 = componentConf["label"]) != null ? _a2 : componentName,
|
32570
32572
|
index: i
|
32571
32573
|
},
|
32572
32574
|
componentName
|
package/package.json
CHANGED