Skip to content

SDK 기반 에디터 런타임 구조 정리#103

Merged
whdgur5717 merged 32 commits into
mainfrom
feat/sdk
Jun 7, 2026
Merged

SDK 기반 에디터 런타임 구조 정리#103
whdgur5717 merged 32 commits into
mainfrom
feat/sdk

Conversation

@whdgur5717

@whdgur5717 whdgur5717 commented Jun 7, 2026

Copy link
Copy Markdown
Owner

의도

SDK 사용자는 editor-shell 내부 store나 registry를 직접 다루는 것이 아니라, SDK가 제공하는 공개 에디터 API를 통해 문서, 선택, viewport, history, clipboard 동작을 사용해야 합니다. 이번 변경은 그 기준에 맞게 상태 보관, 상태 변경, 렌더링, SDK 노출 책임을 분리하는 작업입니다.

또한 기존 shell/canvas 분리 배포는 현재 SDK demo 검증 흐름과 맞지 않기 때문에, 실제 소비 예시인 demo를 배포 대상으로 바꿉니다.

변경 방식

  • editor-core는 에디터 상태 모델과 readonly snapshot contract를 정의하는 타입 계층으로 정리했습니다.
  • editor-shell은 상태를 store에 보관하고, 실제 변경은 repository/service/history/command 경로로 모았습니다.
  • editor-canvas는 상태를 소유하지 않고, snapshot을 렌더링하고 DOM 측정 결과와 입력 이벤트를 shell로 전달하는 역할로 제한했습니다.
  • sdk는 shell/canvas를 조합해서 외부 사용자가 접근할 public Editor API와 React provider/hooks를 제공합니다.
  • demo는 SDK 소비 앱으로 사용하고, GitHub Actions 배포도 기존 shell Pages 프로젝트에 demo build 결과를 올리도록 변경했습니다.

네이밍과 테스트 기준

  • public API 이름은 테스트명에 남겼습니다. 예를 들어 createEditor는 SDK 사용자가 직접 쓰는 API이므로 테스트명에 포함했습니다.
  • 내부 구현명은 테스트명에서 제거했습니다. EditorStateApi, PointerMachineDeps, ExtensionInstaller 같은 이름을 알아야 이해되는 테스트명은 동작 기준 이름으로 바꿨습니다.
  • 마이그레이션 과정만 확인하던 테스트는 제거하고, 남은 테스트는 공개 동작, 상태 변경 결과, undo/redo, clipboard, pointer interaction, canvas 측정, SDK 조합을 검증하도록 정리했습니다.

whdgur5717 added 30 commits May 3, 2026 15:57
Not needed for initial SDK release.
Reduces type complexity and maintenance burden.
Enables SDK users to control iframe lifecycle.
Required for programmatic editor initialization.
Provides components, hooks, and factory for building custom editors.
Users can now create <EditorRoot /> with full customization.
@claude

claude Bot commented Jun 7, 2026

Copy link
Copy Markdown

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

🚀 Preview deployed

https://d1eb6ab1.design-editor-shell.pages.dev

@claude

claude Bot commented Jun 7, 2026

Copy link
Copy Markdown

Claude encountered an error after 1s —— View job


I'll analyze this and get back to you.

@claude

claude Bot commented Jun 7, 2026

Copy link
Copy Markdown

Claude encountered an error after 7s —— View job


I'll analyze this and get back to you.

@whdgur5717
whdgur5717 merged commit 863dc9b into main Jun 7, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant