@sangheepark/figma-ds-mcp 0.2.11 → 0.2.13

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.
@@ -309,6 +309,15 @@ function enrichSpec(traversal, mapping) {
309
309
  // 6-A2: layout에서 CSS position 키 → Figma x/y 변환 후 non-layout 키 제거
310
310
  if (node.layout) {
311
311
  const lay = node.layout;
312
+ // 6-A2a: CSS position values → Figma positioning 정규화
313
+ // relative/sticky → 삭제 (normal flow = auto 기본값)
314
+ // fixed → absolute (가장 유사한 Figma 동작)
315
+ if (lay['positioning'] === 'relative' || lay['positioning'] === 'sticky') {
316
+ delete lay['positioning'];
317
+ }
318
+ else if (lay['positioning'] === 'fixed') {
319
+ lay['positioning'] = 'absolute';
320
+ }
312
321
  // CSS top/left → Figma y/x (absolute positioning만)
313
322
  if (lay['positioning'] === 'absolute') {
314
323
  if (lay['top'] !== undefined && lay['y'] === undefined) {
@@ -381,6 +390,20 @@ function enrichSpec(traversal, mapping) {
381
390
  }
382
391
  }
383
392
  }
393
+ // 6-F: sticky-like absolute → normal flow 복원
394
+ // CSS position:sticky → traversal이 positioning:absolute로 변환하는 경우가 있음
395
+ // 정적 화면에서 sticky = normal flow. name 패턴으로 감지하여 복원.
396
+ // 조건: absolute + name이 header/sticky/nav/toolbar 패턴 + 원점 위치 (x:0/없음, y:0/없음)
397
+ if (node.layout?.positioning === 'absolute' && node.name) {
398
+ const isHeaderLike = /header|sticky|nav|toolbar/i.test(node.name);
399
+ const atOrigin = (!node.layout.x || node.layout.x === '0')
400
+ && (!node.layout.y || node.layout.y === '0');
401
+ if (isHeaderLike && atOrigin) {
402
+ delete node.layout['positioning'];
403
+ delete node.layout['x'];
404
+ delete node.layout['y'];
405
+ }
406
+ }
384
407
  // children 재귀
385
408
  if (node.children) {
386
409
  node.children.forEach((child, i) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sangheepark/figma-ds-mcp",
3
- "version": "0.2.11",
3
+ "version": "0.2.13",
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",