publ-echo-test 0.0.367 โ†’ 0.0.369

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.
@@ -1,3 +1,4 @@
1
+ import { ComponentBlock, GroupBlock } from "./group";
1
2
  import { LayoutItem } from "./types";
2
3
  type PlaceholderProps = {
3
4
  device: "DESKTOP" | "MOBILE";
@@ -10,6 +11,8 @@ type PlaceholderProps = {
10
11
  selectedBlockId: string | null;
11
12
  totalCols: number;
12
13
  activeRows: number[];
14
+ activeBlock?: ComponentBlock | GroupBlock | null;
13
15
  };
14
- export declare function GridBackgroundPlaceholder({ device, margin, rowHeight, colWidth, backgroundWidth, backgroundHeight, activeDrag, selectedBlockId, activeRows, totalCols, }: PlaceholderProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function GridBackgroundPlaceholder({ device, margin, rowHeight, colWidth, backgroundWidth, backgroundHeight, activeDrag, selectedBlockId, activeRows, totalCols, // ๐Ÿ’ก ์ƒˆ๋กœ ๋ฐ›์€ totalCols ์‚ฌ์šฉ
17
+ activeBlock, }: PlaceholderProps): import("react/jsx-runtime").JSX.Element;
15
18
  export {};
@@ -7,7 +7,8 @@ export function GridBackgroundPlaceholder(_a) {
7
7
  // );
8
8
  var device = _a.device, margin = _a.margin,
9
9
  // width, // ๐Ÿšจ ์ œ๊ฑฐ
10
- rowHeight = _a.rowHeight, colWidth = _a.colWidth, backgroundWidth = _a.backgroundWidth, backgroundHeight = _a.backgroundHeight, activeDrag = _a.activeDrag, selectedBlockId = _a.selectedBlockId, activeRows = _a.activeRows, totalCols = _a.totalCols;
10
+ rowHeight = _a.rowHeight, colWidth = _a.colWidth, backgroundWidth = _a.backgroundWidth, backgroundHeight = _a.backgroundHeight, activeDrag = _a.activeDrag, selectedBlockId = _a.selectedBlockId, activeRows = _a.activeRows, totalCols = _a.totalCols, // ๐Ÿ’ก ์ƒˆ๋กœ ๋ฐ›์€ totalCols ์‚ฌ์šฉ
11
+ activeBlock = _a.activeBlock;
11
12
  // ๐Ÿšจ activeCols๋„ totalCols prop์œผ๋กœ ๋ฐ›์•„์„œ ์‚ฌ์šฉ
12
13
  // const activeCols = Array.from({ length: 24 }, (_, i) => 0 + i);
13
14
  var activeCols = Array.from({ length: totalCols }, function (_, i) { return 0 + i; });
@@ -18,12 +19,9 @@ export function GridBackgroundPlaceholder(_a) {
18
19
  // ๋˜๋Š”, ๋งˆ์ง€๋ง‰ ์š”์†Œ์—๋Š” margin[0]์ด ์—†๋‹ค๊ณ  ๊ฐ€์ •ํ•˜๊ณ  ๊ณ„์‚ฐํ•ฉ๋‹ˆ๋‹ค.
19
20
  var gridContentWidth = totalCols * (colWidth + margin[0]) - margin[0];
20
21
  var isHeightVariable = device === "DESKTOP"
21
- ? !!activeDrag.isHeightVariableDesktop
22
- : !!activeDrag.isHeightVariableMobile;
22
+ ? !!(activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.isHeightVariableDesktop)
23
+ : !!(activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.isHeightVariableMobile);
23
24
  var showActiveRows = !!activeDrag.heightFitContent || isHeightVariable;
24
- console.log("activeDrag in Placeholder", activeDrag); // --- IGNORE ---
25
- console.log("isHeightVariable in Placeholder", isHeightVariable); // --- IGNORE ---
26
- console.log("showActiveRows in Placeholder", showActiveRows); // --- IGNORE ---
27
25
  return (_jsx("div", { className: "grid-placeholder", style: {
28
26
  marginTop: margin[1] + "px",
29
27
  marginBottom: margin[1] + "px",
@@ -39,8 +37,6 @@ export function GridBackgroundPlaceholder(_a) {
39
37
  return (_jsxs("g", { children: [activeCols.map(function (col) {
40
38
  var x = col * (colWidth + margin[0]) + 0.5;
41
39
  return (_jsx("rect", { x: x, y: y_top, width: colWidth, height: rowHeight, className: "grid-active-cell-placeholder" }, "active-".concat(row, "-").concat(col)));
42
- }), _jsx("text", {
43
- // ๐Ÿ’ก ํ…์ŠคํŠธ x ์œ„์น˜๋„ gridContentWidth๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๊ณ„์‚ฐ
44
- x: gridContentWidth + textPadding, y: y_center, className: "grid-indicator-text", children: "\u2195 \uAC00\uBCC0" })] }, "active-row-".concat(row)));
40
+ }), _jsx("foreignObject", { x: gridContentWidth + textPadding, y: y_center, children: _jsx("div", { className: "grid-indicator-text" }) })] }, "active-row-".concat(row)));
45
41
  })] }) }));
46
42
  }
@@ -773,6 +773,6 @@ var ReactGridLayout = function (_a) {
773
773
  : activeRows;
774
774
  return (_jsxs("div", { ref: innerRef, className: mergedClassName, style: mergedStyle, onDrop: isDroppable ? onDropHandler : noop, onDragLeave: isDroppable ? onDragLeaveHandler : noop, onDragEnter: isDroppable ? onDragEnterHandler : noop, onDragOver: isDroppable ? onDragOverHandler : noop, "data-grid-row-height": rowHeight, "data-grid-cols": cols, "data-section-id": sectionId, children: [currentGroupBlocks.map(function (each) { return processGroup(each); }), React.Children.map(children, function (child) { return processGridItem(child); }), placeholder(), activeDrag && _jsx("div", { className: "grid-guide-line-center" }), activeDragItemOrSelectedItem && (_jsx(GridBackgroundPlaceholder, { device: device, backgroundWidth: getBackgroundWidth(), backgroundHeight: getBackgroundHeight(), margin: margin,
775
775
  // width={width}
776
- rowHeight: rowHeight, activeRows: activeRowsFiltered !== null && activeRowsFiltered !== void 0 ? activeRowsFiltered : [], colWidth: colWidth, activeDrag: activeDragItemOrSelectedItem, selectedBlockId: selectedBlockId, totalCols: cols }))] }));
776
+ rowHeight: rowHeight, activeRows: activeRowsFiltered !== null && activeRowsFiltered !== void 0 ? activeRowsFiltered : [], colWidth: colWidth, activeDrag: activeDragItemOrSelectedItem, activeBlock: activeBlock, selectedBlockId: selectedBlockId, totalCols: cols }))] }));
777
777
  };
778
778
  export default ReactGridLayout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.367",
3
+ "version": "0.0.369",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",