Skip to content

feat: add extract-code-connect package - #726

Open
noahchoii wants to merge 24 commits into
mainfrom
extract-figma-code-connect
Open

feat: add extract-code-connect package#726
noahchoii wants to merge 24 commits into
mainfrom
extract-figma-code-connect

Conversation

@noahchoii

Copy link
Copy Markdown
Contributor

Description of Changes

@coderabbitai summary

  • code-connect 추출용 인터널 패키지를 추가했습니다.
  • 사용이 필요한 패키지에서 직접 설치 후 사용할 수 있습니다.
# 설치
pnpm --filter @vapor-ui/composites add @vapor-ui/extract-code-connect --workspace

# 사용
pnpm --filter @vapor-ui/composites exec extract-code-connect <figma-url>

규칙

  • 루트에서 DFS 방식으로 자식 노드를 탐색합니다.
  • 자식 노드를 탐색하며 중첩 인스턴스를 탐색하고, 💙, 🟨 등의 계약 이모지를 만나면 순회를 중단하고 다음 노드를 탐색합니다.
  • 괄호 인스턴스 (Instance Name)
    • 변수명은 괄호 제거 후 lower case로 변환한다. (Popup)popup
  • 속성 매핑 시에는 다음과 같은 규칙을 따른다.
    • TEXT→string, BOOLEAN→boolean, VARIANT→enum, SLOT→slot, INSTANCE_SWAP→TODO 주석.
    • 이름이 (로 시작하는 속성은 추출하지 않는다.
    • 다만, SLOT은 이름 무관하게 항상 children에 포함시킨다.
    • variantOptions가 존재하는 경우 identity 매핑 { md: 'md', lg: 'lg' }. 빈 배열이면 에러.
  • 비괄호 인스턴스 (Assistive)
    • 인스턴스로 직접 추가한다.

Checklist

Before submitting the PR, please make sure you have checked all of the following items.

  • The PR title follows the Conventional Commits convention. (e.g., feat, fix, docs, style, refactor, test, chore)
  • I have added tests for my changes.
  • I have updated the Storybook or relevant documentation.
  • I have added a changeset for this change. (e.g., for any changes that affect users, such as component prop changes or new features).
  • I have performed a self-code review.
  • I have followed the project's coding conventions and component patterns.

@changeset-bot

changeset-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 21c169f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
vapor-ui Ready Ready Preview Sep 9, 2026 12:27am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: aebee5d3-ee61-49d2-9b0b-321da0533b83

📥 Commits

Reviewing files that changed from the base of the PR and between f35e202 and 21c169f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
📒 Files selected for processing (30)
  • packages/composites/package.json
  • packages/composites/src/components/dialog/dialog.figma.ts
  • packages/composites/src/utils/figma-utils.ts
  • pnpm-workspace.yaml
  • scripts/extract-code-connect/README.md
  • scripts/extract-code-connect/bin/extract-code-connect.mjs
  • scripts/extract-code-connect/eslint.config.mjs
  • scripts/extract-code-connect/package.json
  • scripts/extract-code-connect/src/adapters/mcp.test.ts
  • scripts/extract-code-connect/src/adapters/mcp.ts
  • scripts/extract-code-connect/src/adapters/rest.test.ts
  • scripts/extract-code-connect/src/adapters/rest.ts
  • scripts/extract-code-connect/src/cli/cmdGenerate.ts
  • scripts/extract-code-connect/src/cli/context.ts
  • scripts/extract-code-connect/src/cli/index.ts
  • scripts/extract-code-connect/src/extract.test.ts
  • scripts/extract-code-connect/src/extract.ts
  • scripts/extract-code-connect/src/figma-url.test.ts
  • scripts/extract-code-connect/src/figma-url.ts
  • scripts/extract-code-connect/src/fixtures/dialog.mcp.json
  • scripts/extract-code-connect/src/generate.test.ts
  • scripts/extract-code-connect/src/generate.ts
  • scripts/extract-code-connect/src/model.ts
  • scripts/extract-code-connect/src/naming.test.ts
  • scripts/extract-code-connect/src/naming.ts
  • scripts/extract-code-connect/src/render.test.ts
  • scripts/extract-code-connect/src/render.ts
  • scripts/extract-code-connect/tsconfig.json
  • scripts/extract-code-connect/tsup.config.ts
  • scripts/extract-code-connect/vitest.config.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Base automatically changed from correct-dialog-code-connect to main September 9, 2026 00:24
@vapor-ui

vapor-ui commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

All tests passed!

Tests Passed Failed Duration Report
180 180 0 1m 20s Open report ↗︎

Click here if you need to update snapshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants