Skip to content

Implement saveDocument and closeDocument#1408

Merged
cyanzhong merged 1 commit intomainfrom
develop
May 2, 2026
Merged

Implement saveDocument and closeDocument#1408
cyanzhong merged 1 commit intomainfrom
develop

Conversation

@cyanzhong
Copy link
Copy Markdown
Contributor

@cyanzhong cyanzhong commented May 2, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-api from v0.21.0 to v0.22.0 and regenerates the native bridge surface for the new document APIs.
  • Exposes saveDocument and closeDocument in CoreEditor’s public MarkEdit API and native bridge typings.
  • Implements the new native delegate hooks in EditorViewController and 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.

@cyanzhong cyanzhong merged commit 0df01e4 into main May 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants