Skip to content

Commit b4ef72d

Browse files
committed
๐Ÿ›fix: CI ๋นŒ๋“œ์˜ค๋ฅ˜ ์ˆ˜์ •
1 parent b44866a commit b4ef72d

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

โ€Žapps/editor/src/shared/lib/component-defaults.tsโ€Ž

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ const DEFAULT_FLEX_STYLE: NodeStyle = {
1717
alignItems: 'center',
1818
};
1919

20+
const DEFAULT_LAYOUT_MODE = {
21+
widthMode: 'fixed' as const,
22+
heightMode: 'fixed' as const,
23+
widthUnit: 'px' as const,
24+
heightUnit: 'px' as const,
25+
};
26+
2027
export const COMPONENT_DEFAULTS: Record<WcxNode['type'], ComponentDefaults> = {
2128
Image: {
2229
props: {
@@ -33,6 +40,7 @@ export const COMPONENT_DEFAULTS: Record<WcxNode['type'], ComponentDefaults> = {
3340
width: 400,
3441
height: 300,
3542
zIndex: 0,
43+
...DEFAULT_LAYOUT_MODE,
3644
},
3745
},
3846
Heading: {
@@ -52,6 +60,7 @@ export const COMPONENT_DEFAULTS: Record<WcxNode['type'], ComponentDefaults> = {
5260
width: 200,
5361
height: 50,
5462
zIndex: 1,
63+
...DEFAULT_LAYOUT_MODE,
5564
},
5665
},
5766
Text: {
@@ -72,6 +81,7 @@ export const COMPONENT_DEFAULTS: Record<WcxNode['type'], ComponentDefaults> = {
7281
width: 300,
7382
height: 100,
7483
zIndex: 1,
84+
...DEFAULT_LAYOUT_MODE,
7585
},
7686
},
7787
Button: {
@@ -90,6 +100,7 @@ export const COMPONENT_DEFAULTS: Record<WcxNode['type'], ComponentDefaults> = {
90100
width: 120,
91101
height: 40,
92102
zIndex: 2,
103+
...DEFAULT_LAYOUT_MODE,
93104
},
94105
},
95106
Container: {
@@ -107,6 +118,7 @@ export const COMPONENT_DEFAULTS: Record<WcxNode['type'], ComponentDefaults> = {
107118
width: 500,
108119
height: 200,
109120
zIndex: 0,
121+
...DEFAULT_LAYOUT_MODE,
110122
},
111123
},
112124
Modal: {
@@ -127,6 +139,7 @@ export const COMPONENT_DEFAULTS: Record<WcxNode['type'], ComponentDefaults> = {
127139
width: 400,
128140
height: 300,
129141
zIndex: 100,
142+
...DEFAULT_LAYOUT_MODE,
130143
},
131144
},
132145
Stack: {
@@ -144,6 +157,7 @@ export const COMPONENT_DEFAULTS: Record<WcxNode['type'], ComponentDefaults> = {
144157
width: 300,
145158
height: 300,
146159
zIndex: 0,
160+
...DEFAULT_LAYOUT_MODE,
147161
},
148162
},
149163
Group: {
@@ -157,6 +171,7 @@ export const COMPONENT_DEFAULTS: Record<WcxNode['type'], ComponentDefaults> = {
157171
width: 200,
158172
height: 200,
159173
zIndex: 0,
174+
...DEFAULT_LAYOUT_MODE,
160175
},
161176
},
162177
};

โ€Žapps/editor/src/stores/useEditorStore.tsโ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ const useEditorStore = create(
128128

129129
// 1. ์ตœ์ƒ์œ„ ์†์„ฑ ์—…๋ฐ์ดํŠธ (type ๋“ฑ)
130130
// (์ฃผ์˜: ๊ฐ์ฒด ํƒ€์ž…์ธ style, props, layout์„ ํ†ต์งธ๋กœ ๋ฎ์–ด์“ฐ์ง€ ์•Š๋„๋ก ๋ณ„๋„ ์ฒ˜๋ฆฌ)
131-
const { style, props, layout, ...rest } = updates;
131+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
132+
const { style, props, layout: _layout, ...rest } = updates;
132133
Object.assign(targetNode, rest);
133134

134135
// 2. ํ•˜์œ„ ๊ฐ์ฒด ๋ณ‘ํ•ฉ ์—…๋ฐ์ดํŠธ

0 commit comments

Comments
ย (0)