SDK 기반 에디터 런타임 구조 정리#103
Merged
Merged
Conversation
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 encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
🚀 Preview deployed |
|
Claude encountered an error after 1s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 7s —— View job I'll analyze this and get back to you. |
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.
의도
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 결과를 올리도록 변경했습니다.네이밍과 테스트 기준
createEditor는 SDK 사용자가 직접 쓰는 API이므로 테스트명에 포함했습니다.EditorStateApi,PointerMachineDeps,ExtensionInstaller같은 이름을 알아야 이해되는 테스트명은 동작 기준 이름으로 바꿨습니다.