Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR wires the new saveDocument and closeDocument APIs from the updated markedit-api package through CoreEditor’s TypeScript surface, the generated native bridge, and the macOS delegate implementation so web modules can ask the host document to save or close.
Changes:
- Updates
markedit-apifromv0.21.0tov0.22.0and regenerates the native bridge surface for the new document APIs. - Exposes
saveDocumentandcloseDocumentin CoreEditor’s public MarkEdit API and native bridge typings. - Implements the new native delegate hooks in
EditorViewControllerand excludes generated native bridge code from SwiftLint.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
MarkEditMac/Sources/Editor/Controllers/EditorViewController+Delegate.swift |
Implements macOS-side handlers for save/close document requests from the web bridge. |
MarkEditKit/Sources/Bridge/Native/Modules/EditorModuleAPI.swift |
Adds the new delegate requirements and forwards new API calls into the native delegate. |
MarkEditKit/Sources/Bridge/Native/Generated/NativeModuleAPI.swift |
Regenerated native bridge protocol/dispatch code to expose saveDocument and closeDocument. |
CoreEditor/yarn.lock |
Locks the editor package update to markedit-api v0.22.0. |
CoreEditor/src/bridge/native/api.ts |
Extends the TypeScript native bridge interface with the new document APIs. |
CoreEditor/src/api/modules.ts |
Publishes the new APIs on the global MarkEdit object during module initialization. |
CoreEditor/src/api/methods.ts |
Adds JS wrappers that call the native saveDocument and closeDocument bridge methods. |
CoreEditor/package.json |
Bumps the markedit-api dependency to the version that defines the new APIs. |
.swiftlint.yml |
Excludes generated native bridge Swift sources from linting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Integrates MarkEdit-app/MarkEdit-api@6fcfcf4