publ-echo 0.0.132 → 0.0.133

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,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { getIsHeightVariable } from "./ReactGridLayout";
2
3
  import { getLayoutItem } from "./utils/renderHelpers";
3
4
  export function GridBackgroundPlaceholder(_a) {
4
5
  // 활성화된 행(row) 인덱스 배열
@@ -19,10 +20,11 @@ export function GridBackgroundPlaceholder(_a) {
19
20
  // 패턴은 colWidth + margin[0] 단위로 반복되므로, 마지막 열에서는 margin[0]이 필요 없습니다.
20
21
  // 또는, 마지막 요소에는 margin[0]이 없다고 가정하고 계산합니다.
21
22
  var gridContentWidth = totalCols * (colWidth + margin[0]) - margin[0];
22
- var isHeightVariable = device === "DESKTOP"
23
- ? !!(activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.isHeightVariableDesktop)
24
- : !!(activeBlock === null || activeBlock === void 0 ? void 0 : activeBlock.isHeightVariableMobile);
25
- // const showActiveRows = !!activeDrag.heightFitContent || isHeightVariable;
23
+ var isHeightVariable = activeBlock
24
+ ? getIsHeightVariable(activeBlock, device)
25
+ : false;
26
+ console.log("activeBlock", activeBlock);
27
+ console.log("isHeightVariable", isHeightVariable);
26
28
  var showActiveRows = activeBlock && activeBlock.type === "GROUP_BLOCK"
27
29
  ? getShowActiveRows(activeBlock, layout)
28
30
  : !!activeDrag.heightFitContent || isHeightVariable;
@@ -2,5 +2,7 @@ import * as React from "react";
2
2
  import type { ReactElement } from "react";
3
3
  import { PropsWithChildren } from "../types";
4
4
  import { ReactGridLayoutProps } from "./types";
5
+ import { Block } from "./group";
5
6
  declare const ReactGridLayout: ({ children, ...props }: PropsWithChildren<ReactGridLayoutProps>) => React.ReactElement;
7
+ export declare function getIsHeightVariable(block: Block, device: "DESKTOP" | "MOBILE"): boolean;
6
8
  export default ReactGridLayout;
@@ -819,6 +819,7 @@ var ReactGridLayout = function (_a) {
819
819
  ? generateGrouplayout(parsedSelectedBlockId.blockId)
820
820
  : null;
821
821
  var activeDragItemOrSelectedItem = activeDrag || selectedLayoutItem;
822
+ console.log("activeDragItemOrSelectedItem", parsedSelectedBlockId);
822
823
  var activeBlock = activeDragItemOrSelectedItem && parsedSelectedBlockId
823
824
  ? blockStructure
824
825
  ? findBlockByBlockId(blockStructure, parsedSelectedBlockId.blockId)
@@ -835,7 +836,7 @@ var ReactGridLayout = function (_a) {
835
836
  // width={width}
836
837
  rowHeight: rowHeight, activeRows: activeRowsFiltered !== null && activeRowsFiltered !== void 0 ? activeRowsFiltered : [], colWidth: colWidth, activeDrag: activeDragItemOrSelectedItem, activeBlock: activeBlock, selectedBlockId: selectedBlockId, totalCols: cols, layout: layout }))] }));
837
838
  };
838
- function getIsHeightVariable(block, device) {
839
+ export function getIsHeightVariable(block, device) {
839
840
  var heightVariable = device === "DESKTOP"
840
841
  ? block === null || block === void 0 ? void 0 : block.isHeightVariableDesktop
841
842
  : block === null || block === void 0 ? void 0 : block.isHeightVariableMobile;
@@ -22,8 +22,8 @@ export type ComponentBlock = {
22
22
  zOrderDesktopInternal: number | null;
23
23
  zOrderMobileInternal: number | null;
24
24
  componentBlockId: number;
25
- isHeightVariableDesktop: boolean;
26
- isHeightVariableMobile: boolean;
25
+ isHeightVariableDesktop: boolean | null;
26
+ isHeightVariableMobile: boolean | null;
27
27
  };
28
28
  export type GroupBlock = {
29
29
  blockId: string;
@@ -31,8 +31,8 @@ export type GroupBlock = {
31
31
  zOrderDesktopInternal: number | null;
32
32
  zOrderMobileInternal: number | null;
33
33
  children: (ComponentBlock | GroupBlock)[];
34
- isHeightVariableDesktop: boolean;
35
- isHeightVariableMobile: boolean;
34
+ isHeightVariableDesktop: boolean | null;
35
+ isHeightVariableMobile: boolean | null;
36
36
  };
37
37
  export type RootBlock = {
38
38
  blockId: "ROOT";
@@ -40,8 +40,8 @@ export type RootBlock = {
40
40
  zOrderDesktopInternal: number | null;
41
41
  zOrderMobileInternal: number | null;
42
42
  children: (ComponentBlock | GroupBlock)[];
43
- isHeightVariableDesktop: boolean;
44
- isHeightVariableMobile: boolean;
43
+ isHeightVariableDesktop: boolean | null;
44
+ isHeightVariableMobile: boolean | null;
45
45
  };
46
46
  export type BulkBlockInternal = {
47
47
  blockId: "BULK";
@@ -49,8 +49,8 @@ export type BulkBlockInternal = {
49
49
  zOrderDesktopInternal: number;
50
50
  zOrderMobileInternal: number;
51
51
  children: (ComponentBlock | GroupBlock)[];
52
- isHeightVariableDesktop: boolean;
53
- isHeightVariableMobile: boolean;
52
+ isHeightVariableDesktop: boolean | null;
53
+ isHeightVariableMobile: boolean | null;
54
54
  };
55
55
  export declare const findBlockByBlockId: (block: Block, blockId: string) => Block | null;
56
56
  export declare const findDirectChildrenCbIds: (block: Block, targetId: string) => number[];
@@ -265,6 +265,13 @@ export function getBlockIdKind(blockId) {
265
265
  blockId: blockId,
266
266
  };
267
267
  }
268
+ if (Number.isInteger(Number(blockId))) {
269
+ return {
270
+ type: "CB",
271
+ cbId: Number(blockId).toString(),
272
+ blockId: formatCbIdToBlockId(Number(blockId)),
273
+ };
274
+ }
268
275
  return null;
269
276
  }
270
277
  // export const findAccessibleChildrenBlocks = (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo",
3
- "version": "0.0.132",
3
+ "version": "0.0.133",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",