feat(zpl-core): 순수 ZPL 코어 패키지 추가 및 react-zpl 어댑터 분리#15
Merged
Conversation
- commands, constants를 react-zpl에서 분리 - ZplElementContext 타입 추출 (React import 제거) - renderLabel, renderText, renderLine 등 7개 순수 renderer 함수 구현
- LabelNode, ChildLabelNode, LabelRootNode 타입 추가 - renderChildNode, renderChildren 추가 (node.type 기반 dispatch) - renderLabel이 LabelRootNode를 받아 ZPL 생성 - react-zpl: toLabelNode 유틸로 ReactElement → LabelNode 변환 - Text, Line 등 자식 컴포넌트에서 print() 제거, displayName만 유지 - ZplLabel.print = toLabelNode + renderLabel 단 두 단계로 단순화 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- guide 사이드바에 @zpl-kit/zpl-core 섹션 추가 - 설치하기, 시작하기, react-zpl과의 관계 페이지 작성 - API 레퍼런스를 renderer별 개별 파일로 분리 (API 하위 그룹) - zpl-core/ 섹션에 overview 페이지 추가 - getting-started.mdx → quick-start.mdx 리네임 반영 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
- Test 워크플로에 zpl-core 경로 및 빌드 단계 추가 - 루트 build에서 zpl-core를 먼저 빌드해 .d.ts 의존성 보장
- zpl-core 의존성 추가 (tests/package.json) - fixtures/context.ts를 @zpl-kit/zpl-core에서 import하도록 변경 - 각 테스트에서 createElement + Component.print() 제거 → renderLine, renderCircle, renderDiagonalLine, renderEllipse, renderQrCode 직접 호출 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 작업 내용
@zpl-kit/zpl-core패키지:defineCommand기반 ZPL 명령·상수,renderLabel·도형·텍스트·QR 등 순수 renderer,LabelNode·renderChildNode파이프라인react-zpl:toNode로 노드 변환 후 zpl-core로 ZPL 생성, 컴포넌트 단순화 (print.ts제거)react-zpl빌드 전zpl-core선행 빌드, PR path에apps/zpl-core포함. 루트build:zpl-core선행 후 나머지 apps·데모 빌드Component.print()대신renderXxx()·픽스처 정리로 zpl-core 경로에 맞게 전환🔍 변경 범위
apps/react-zpl- React ZPL 라이브러리docs- 문서 사이트tests- 테스트 코드demos- 데모 애플리케이션apps/zpl-core,.github/workflows, 루트package.json,pnpm-lock.yaml📸 스크린샷 (선택사항)
문서·네비 변경 위주이며 데모 UI 시각적 변경은 없습니다.
📚 추가 정보
react-zpl빌드 시@zpl-kit/zpl-core의dist/*.d.ts가 필요하므로zpl-core를 먼저 빌드합니다.react-zpl의 이전element타입 등에 의존한다면 확인이 필요합니다.