@alpaca-headless/alpaca-headless-nextjs 1.0.3928 → 1.0.3930

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.
@@ -25,7 +25,7 @@ export function MultiComponentEditor({ children, component, placeholderName, thu
25
25
  const filteredChildren = childrenArray.filter((child) => child.type !== "script");
26
26
  return (_jsxs(_Fragment, { children: [filteredChildren[selectedIndex < 0 ? 0 : selectedIndex], _jsxs("div", { className: "a-editor-mce", children: [_jsx("script", { "data-placeholder-start": placeholder.key, "data-orientation": "horizontal" }), filteredChildren.map((x, index) => thumbnail(x, index)), _jsx("script", { "data-placeholder-end": placeholder.key })] })] }));
27
27
  function thumbnail(x, index) {
28
- var _a, _b, _c, _d, _e;
28
+ var _a, _b, _c, _d, _e, _f, _g;
29
29
  const style = {};
30
30
  if (thumbHeight) {
31
31
  style.height = thumbHeight;
@@ -33,12 +33,12 @@ export function MultiComponentEditor({ children, component, placeholderName, thu
33
33
  if (thumbWidth) {
34
34
  style.width = thumbWidth;
35
35
  }
36
- const componentArray = (_a = x.props) === null || _a === void 0 ? void 0 : _a.children;
36
+ const componentArray = (_c = (_b = (_a = x.props) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.props) === null || _c === void 0 ? void 0 : _c.children;
37
37
  const component = components[index];
38
38
  return (_jsxs(Fragment, { children: [_jsxs("div", { className: "a-editor-mce-thumbnail" +
39
39
  (index === selectedIndex ? " a-editor-mce-thumbnail--selected" : ""), style: style, onClick: () => {
40
40
  selectComponents([components[index].id]);
41
- }, children: [_jsx("script", { "data-component-start": component.id, "data-itemid": ((_c = (_b = component._editor) === null || _b === void 0 ? void 0 : _b.linkedComponentItem) === null || _c === void 0 ? void 0 : _c.id) || component.id, "data-layoutid": (_e = (_d = component._editor) === null || _d === void 0 ? void 0 : _d.hostingPageItem) === null || _e === void 0 ? void 0 : _e.id }), _jsx("div", { style: { pointerEvents: "none", zoom: thumbZoom || 0.25 }, children: componentArray.slice(1, -1) }), _jsx("script", { "data-component-end": component.id })] }), _jsx("div", { "data-dropzone": components[index].id })] }, index));
41
+ }, children: [_jsx("script", { "data-component-start": component.id, "data-itemid": ((_e = (_d = component._editor) === null || _d === void 0 ? void 0 : _d.linkedComponentItem) === null || _e === void 0 ? void 0 : _e.id) || component.id, "data-layoutid": (_g = (_f = component._editor) === null || _f === void 0 ? void 0 : _f.hostingPageItem) === null || _g === void 0 ? void 0 : _g.id }), _jsx("div", { style: { pointerEvents: "none", zoom: thumbZoom || 0.25 }, children: componentArray.slice(1, -1) }), _jsx("script", { "data-component-end": component.id })] }), _jsx("div", { "data-dropzone": components[index].id })] }, index));
42
42
  }
43
43
  }
44
44
  function selectComponents(componentIds) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpaca-headless/alpaca-headless-nextjs",
3
- "version": "1.0.3928",
3
+ "version": "1.0.3930",
4
4
  "type": "module",
5
5
  "description": "Alpaca Headless",
6
6
  "main": "dist/index.js",
@@ -52,7 +52,7 @@
52
52
  "typescript": "^5"
53
53
  },
54
54
  "dependencies": {
55
- "@alpaca-headless/alpaca-headless": "^1.0.3928",
55
+ "@alpaca-headless/alpaca-headless": "^1.0.3930",
56
56
  "axios": "^1.8.1",
57
57
  "https-proxy-agent": "^7.0.4",
58
58
  "next": "^14.2.4",
@@ -91,7 +91,7 @@ export function MultiComponentEditor({
91
91
  style.width = thumbWidth;
92
92
  }
93
93
 
94
- const componentArray = (x as any).props?.children;
94
+ const componentArray = (x as any).props?.children?.props?.children;
95
95
 
96
96
  const component = components![index];
97
97