feat: the document API limited alpha#2087
Merged
harbournick merged 27 commits intomainfrom Feb 18, 2026
Merged
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Contributor
Visual diffs detectedPixel differences were found in visual tests. This is not blocking — reproduce locally with |
…avior, and text-find totals
…iguous text targets
…extract mutation helpers
…ty, and safety fixes
9fcc21d to
ea7cc47
Compare
…registry
Adds `api.invoke({ operationId, input, options })` for dynamic/AI callers
alongside type-safe overloads for TypeScript consumers. Includes:
- OperationRegistry with bidirectional compile-time completeness checks
- Runtime dispatch table mapping all 36 operations to direct API methods
- DynamicInvokeRequest overload accepting unknown input
- hasOwnProperty guard with clear error for unknown operation IDs
- Contract parity check extended to verify dispatch table keys
- 13 new tests covering completeness, parity, error handling, and dynamic dispatch
Contributor
|
🎉 This PR is included in superdoc v1.15.0-next.5 The release is available on GitHub release |
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.
Summary
This PR establishes a contract-first Document API alpha baseline with working Super Editor adapters, generated contract/docs outputs, and conformance coverage.
Included
@superdoc/document-apicontract + typed API surface (read + mutation operations).packages/document-api/generated/**+ docs reference outputs), with explicit generated-vs-manual ownership docs.Alpha Operation Scope
find,getNode,getNodeById,getText,info,insert,replace,deletecapabilities.getcomments.add,comments.edit,comments.reply,comments.move,comments.resolve,comments.remove,comments.setInternal,comments.setActive,comments.goTo,comments.get,comments.listtrackChanges.list,trackChanges.get,trackChanges.accept,trackChanges.reject,trackChanges.acceptAll,trackChanges.rejectAllformat.bold,create.paragraph,lists.list,lists.get,lists.insert,lists.setType,lists.indent,lists.outdent,lists.restart,lists.exitValidation
pnpm exec vitest run packages/super-editor/src/document-api-adapters/__conformance__/contract-conformance.test.tspnpm exec tsx packages/document-api/scripts/check-contract-parity.tspnpm exec tsx packages/document-api/scripts/check-contract-outputs.tsOut of Scope