@sangheepark/figma-ds-mcp 0.2.14 → 0.2.15

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.
@@ -89,6 +89,21 @@ function enrichSpec(traversal, mapping) {
89
89
  }
90
90
  const spec = deepClone(traversal);
91
91
  function walk(node, path) {
92
+ // 6-G: absolute CSS constraints → Figma sizing
93
+ // Step 0 (LAYOUT_KEYS 필터링) 전에 실행해야 CSS 좌표(left/right/top/bottom) 활용 가능
94
+ if (node.layout) {
95
+ const lay = node.layout;
96
+ if (lay['positioning'] === 'absolute' || lay['positioning'] === 'fixed') {
97
+ const l = String(lay['left'] || ''), r = String(lay['right'] || '');
98
+ const t = String(lay['top'] || ''), b = String(lay['bottom'] || '');
99
+ if ((l === '0' || l === '0px') && (r === '0' || r === '0px') && !lay['width']) {
100
+ lay['width'] = 'fill';
101
+ }
102
+ if ((t === '0' || t === '0px') && (b === '0' || b === '0px') && !lay['height']) {
103
+ lay['height'] = 'fill';
104
+ }
105
+ }
106
+ }
92
107
  // Step 0: 속성 위치 교정 (layout에 있으면 안 되는 key → style로 이동)
93
108
  if (node.layout) {
94
109
  const keysToMove = [];
@@ -298,23 +313,7 @@ function enrichSpec(traversal, mapping) {
298
313
  node.layout['clip-content'] = true;
299
314
  delete node.layout['overflow'];
300
315
  }
301
- // 6-G: absolute CSS constraints Figma sizing
302
- // CSS left:0+right:0 = "stretch to parent width" → width:fill
303
- // CSS top:0+bottom:0 = "stretch to parent height" → height:fill
304
- // 6-A 필터링 전에 실행해야 CSS 좌표 정보를 활용 가능
305
- if (node.layout) {
306
- const lay = node.layout;
307
- if (lay['positioning'] === 'absolute' || lay['positioning'] === 'fixed') {
308
- const l = String(lay['left'] || ''), r = String(lay['right'] || '');
309
- const t = String(lay['top'] || ''), b = String(lay['bottom'] || '');
310
- if ((l === '0' || l === '0px') && (r === '0' || r === '0px') && !lay['width']) {
311
- lay['width'] = 'fill';
312
- }
313
- if ((t === '0' || t === '0px') && (b === '0' || b === '0px') && !lay['height']) {
314
- lay['height'] = 'fill';
315
- }
316
- }
317
- }
316
+ // (6-G Step 0 앞으로 이동 — CSS 좌표가 LAYOUT_KEYS 필터링으로 사라지기 전에 처리)
318
317
  // 6-A: CSS-only 속성 필터링 (Figma가 지원하지 않는 CSS 속성 제거)
319
318
  if (node.style) {
320
319
  for (const key of Object.keys(node.style)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sangheepark/figma-ds-mcp",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "description": "MCP server for Code to Figma Bridge — bridges Claude Code to Figma plugin via WebSocket",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",