Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

All notable changes to MarkdownEngine are documented in this file.
All notable changes to swift-markdown-engine are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Expand All @@ -17,13 +17,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

```swift
var config = MarkdownEditorConfiguration.default
config.contentInsets = ContentInsets(top: 55.4)
config.safeAreaInsets = SafeAreaInsets(top: 55.4)
```

### Added
- `ContentInsets` struct exposing `top` / `leading` / `trailing` / `bottom`
- `SafeAreaInsets` struct exposing `top` / `leading` / `trailing` / `bottom`
inset knobs for the editor's enclosing scroll view, configurable via
`MarkdownEditorConfiguration.contentInsets`.
`MarkdownEditorConfiguration.safeAreaInsets`.

### Fixed
- `NativeTextViewWrapper` now applies its initial styling pass even when
Expand Down
30 changes: 22 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,28 @@ documentation tweaks are welcome as PRs directly.

## Development Setup

Start by forking the repository on GitHub, then clone your fork locally:

```bash
git clone https://github.com/luca-chen198/MarkdownEngine.git
cd MarkdownEngine
git clone https://github.com/YOUR-USERNAME/swift-markdown-engine.git
cd swift-markdown-engine
git remote add upstream https://github.com/nodes-app/swift-markdown-engine.git
git fetch upstream
swift build
swift test
```

Open `Package.swift` in Xcode for a graphical environment, or use the
command line — both work.

Before starting work, create a branch from the latest upstream `main`:

```bash
git checkout main
git pull upstream main
git checkout -b your-change-name
```

### Generating documentation locally

To preview the DocC catalog locally, add the swift-docc plugin to
Expand All @@ -48,8 +60,8 @@ Then run:
swift package --disable-sandbox preview-documentation --target MarkdownEngine
```

The plugin is intentionally **not** a permanent dependency to keep the
shipped package's transitive deps at zero.
The plugin is intentionally **not** a permanent dependency. The core
`MarkdownEngine` product stays free of optional documentation tooling.

## Coding Conventions

Expand All @@ -60,8 +72,9 @@ shipped package's transitive deps at zero.
- Keep file headers minimal; the file path implies what it contains
- Favor `internal` over `public` — the smaller the public surface, the
easier the package is to evolve
- Avoid adding external dependencies. The engine ships with zero deps; that
is a design constraint, not an accident
- Avoid adding external dependencies to the core `MarkdownEngine` product;
keeping the editor itself dependency-light is a design constraint, not an
accident

## Tests

Expand All @@ -72,7 +85,8 @@ shipped package's transitive deps at zero.

## Pull Requests

- Branch from `main`
- Fork the repository and open pull requests from a branch in your fork
- Branch from the latest upstream `main`
- Keep the change focused — one logical change per PR
- Include test coverage for new behavior
- Update `CHANGELOG.md` under `[Unreleased]` with a one-line summary
Expand All @@ -98,4 +112,4 @@ A short subject line, an empty line, then a paragraph (or two) explaining
## License

By contributing, you agree that your contributions will be licensed under
the [MIT License](LICENSE).
the [Apache 2.0 License](LICENSE).
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright [2026] [Luca Chen]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Swift 5.9](https://img.shields.io/badge/Swift-5.9+-F05138?logo=swift&logoColor=white)](https://swift.org)
[![Platforms macOS 14+](https://img.shields.io/badge/Platforms-macOS%2014+-lightgrey)](https://developer.apple.com/macos/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-yellow.svg)](LICENSE)
[![CI](https://github.com/nodes-app/swift-markdown-engine/actions/workflows/ci.yml/badge.svg)](https://github.com/nodes-app/swift-markdown-engine/actions/workflows/ci.yml)


Expand Down Expand Up @@ -230,14 +230,16 @@ a local path, so any engine edit rebuilds into the demo on the next run.

## Documentation

Full API documentation is available via DocC:
Full API documentation is available via DocC. In Xcode, use
**Product → Build Documentation** (`⇧⌃⌘D`).

For local CLI preview, temporarily add the Swift DocC plugin as described in
[CONTRIBUTING.md](CONTRIBUTING.md), then run:

```bash
swift package generate-documentation --target MarkdownEngine
swift package --disable-sandbox preview-documentation --target MarkdownEngine
```

In Xcode: **Product → Build Documentation** (`⇧⌃⌘D`).

Once the package is hosted on Swift Package Index, the docs will live at
`https://swiftpackageindex.com/nodes-app/swift-markdown-engine/documentation`.

Expand All @@ -258,7 +260,7 @@ conventions, and PR process.

## License

MarkdownEngine is released under the MIT License. See [LICENSE](LICENSE)
MarkdownEngine is released under the Apache 2.0 License. See [LICENSE](LICENSE)
for the full text.

---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# ``MarkdownEngine``
# ``MarkdownEngine``

A TextKit 2-backed Markdown editor view for macOS, bridged to SwiftUI.

Expand Down
Loading