@aicayzer/inkkit 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/THIRD-PARTY-NOTICES.txt +1 -1
- package/dist/chunks/{core-D7n0IhAZ.js → core-DkL-wDqy.js} +499 -244
- package/dist/chunks/{highlight-BIasnL-b.js → highlight-TSUdUlMi.js} +1 -1
- package/dist/core.js +1 -1
- package/dist/editor.d.ts +7 -0
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Inkkit
|
|
2
2
|
|
|
3
3
|
A Markdown editor for the web and for apps that host a web view. It edits formatted text and keeps your Markdown as you wrote it: a document you open and leave is saved unchanged, and an edit rewrites only the blocks it touches.
|
|
4
4
|
|
|
@@ -13,10 +13,10 @@ A Markdown editor for the web and for apps that host a web view. It edits format
|
|
|
13
13
|
|
|
14
14
|
<picture>
|
|
15
15
|
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/aicayzer/inkkit/main/docs/images/how-inkkit-works-dark.svg">
|
|
16
|
-
<img src="https://raw.githubusercontent.com/aicayzer/inkkit/main/docs/images/how-inkkit-works.svg" width="800" alt="An ordinary Markdown editor rebuilds the whole file when it saves, so list markers, spacing and escaping change.
|
|
16
|
+
<img src="https://raw.githubusercontent.com/aicayzer/inkkit/main/docs/images/how-inkkit-works.svg" width="800" alt="An ordinary Markdown editor rebuilds the whole file when it saves, so list markers, spacing and escaping change. Inkkit loads the file and edits it formatted with Milkdown. A preservation layer between Milkdown and the file saves a note you open and leave byte for byte unchanged. After an edit, it keeps unchanged blocks as their original bytes, writes only edited blocks with Milkdown, and reads the result back. If it reopens as the same document, the edit is kept and saved. If not, the edit is refused and the note stays as it was. Your app owns the files, storage, toolbar and appearance.">
|
|
17
17
|
</picture>
|
|
18
18
|
|
|
19
|
-
A formatted Markdown editor usually rebuilds the whole file when it saves, so opening and saving a note can change list markers, spacing and escaping that you never touched.
|
|
19
|
+
A formatted Markdown editor usually rebuilds the whole file when it saves, so opening and saving a note can change list markers, spacing and escaping that you never touched. Inkkit adds a preservation layer between [Milkdown](https://milkdown.dev) and the file. A note that you open and leave is saved byte for byte unchanged, and after an edit only the blocks you edited are rewritten. Inkkit reads the result of each edit back and refuses the edit if it would not reopen as the same document.
|
|
20
20
|
|
|
21
21
|
For the exact guarantees, see [Preservation](https://github.com/aicayzer/inkkit/blob/main/docs/preservation.md).
|
|
22
22
|
|
|
@@ -30,7 +30,7 @@ An app that does not render diagrams can import from `@aicayzer/inkkit/core` ins
|
|
|
30
30
|
|
|
31
31
|
## Supported engines
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Inkkit supports Safari and `WKWebView` 17.5 or later (iOS 17.5, macOS 14.5), Chrome and Edge 123 or later, and Firefox 125 or later. The host page must declare UTF-8. See [Supported engines](https://github.com/aicayzer/inkkit/blob/main/docs/integration.md#supported-engines) for the APIs behind these versions.
|
|
34
34
|
|
|
35
35
|
## Use
|
|
36
36
|
|
|
@@ -55,7 +55,7 @@ editor.loadDocument({
|
|
|
55
55
|
const { text } = editor.snapshot(1)
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
## Built with
|
|
58
|
+
## Built with Inkkit
|
|
59
59
|
|
|
60
60
|
- [Memos](https://github.com/aicayzer/memos): a small Mac app for memos, in one floating window
|
|
61
61
|
- [PadPad](https://github.com/aicayzer/padpad): a small Mac app for quick text and files
|
|
@@ -480,7 +480,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
480
480
|
|
|
481
481
|
------------------------------------------------------------------------
|
|
482
482
|
|
|
483
|
-
dompurify@3.4.
|
|
483
|
+
dompurify@3.4.17 ((MPL-2.0 OR Apache-2.0))
|
|
484
484
|
|
|
485
485
|
Apache License
|
|
486
486
|
Version 2.0, January 2004
|