@withmarfa/inkkit 0.0.0-stage → 0.8.0-alpha.1
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/LICENSE +21 -0
- package/NOTICE +41 -0
- package/README.md +47 -2
- package/dist/THIRD-PARTY-NOTICES-FULL.txt +3377 -0
- package/dist/THIRD-PARTY-NOTICES.txt +3377 -0
- package/dist/chunks/core-DZmgpf9J.js +38254 -0
- package/dist/chunks/front-matter-yaml-Bh_a5HA2.js +5834 -0
- package/dist/chunks/highlight-C_1DEhlN.js +14069 -0
- package/dist/chunks/lib-CO2Iv0U3.js +28347 -0
- package/dist/core.d.ts +7 -0
- package/dist/core.js +2 -0
- package/dist/diagnostics.d.ts +109 -0
- package/dist/editor.d.ts +592 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +32793 -0
- package/dist/link-address.d.ts +11 -0
- package/dist/style.css +2193 -0
- package/dist/themes/calm.css +36 -0
- package/dist/themes/essential.css +36 -0
- package/dist/themes/standard.css +39 -0
- package/dist/types.d.ts +577 -0
- package/package.json +96 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 August Cayzer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
The scoped table styles in src/style.css are adapted from prosemirror-tables.
|
|
2
|
+
Source: https://github.com/ProseMirror/prosemirror-tables
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2015-2016 by Marijn Haverbeke <marijnh@gmail.com> and others
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
The published package bundles Milkdown, ProseMirror and other packages. Each
|
|
25
|
+
keeps its own license. dist/THIRD-PARTY-NOTICES.txt lists their versions,
|
|
26
|
+
licenses and notice texts for both entries, including the core entry.
|
|
27
|
+
|
|
28
|
+
The main entry bundles Pele and DOMPurify. The generated third-party
|
|
29
|
+
notices include Pele's complete license file and its Lucide ISC notice.
|
|
30
|
+
dist/THIRD-PARTY-NOTICES-FULL.txt contains the same notices and remains
|
|
31
|
+
available for existing host build recipes. The core entry includes neither
|
|
32
|
+
Pele nor DOMPurify.
|
|
33
|
+
|
|
34
|
+
When distributing an inlined page, carry Inkkit's LICENSE, this NOTICE and
|
|
35
|
+
dist/THIRD-PARTY-NOTICES.txt alongside the page. Also generate notices from
|
|
36
|
+
the host's bundle for any other host dependencies. Making one HTML file
|
|
37
|
+
does not remove the dependencies' license requirements.
|
|
38
|
+
Review the license terms, including any applicable source obligations;
|
|
39
|
+
a list of notices alone does not establish compliance.
|
|
40
|
+
|
|
41
|
+
Build recipe: https://inkkit.withmarfa.com/guides/web-view#build-one-offline-page
|
package/README.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
-
#
|
|
1
|
+
# InkKit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A Markdown editor for web pages and for apps that host a web view. People edit formatted text, and your app saves the Markdown as it was written: an unedited document is saved unchanged, and an edit rewrites only the blocks it touches.
|
|
4
|
+
|
|
5
|
+
<details>
|
|
6
|
+
<summary>How InkKit preserves Markdown</summary>
|
|
7
|
+
|
|
8
|
+
<picture>
|
|
9
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/how-inkkit-works-dark.svg">
|
|
10
|
+
<img src="docs/images/how-inkkit-works.svg" alt="InkKit keeps unchanged source and checks edited blocks before your app saves them.">
|
|
11
|
+
</picture>
|
|
12
|
+
|
|
13
|
+
</details>
|
|
14
|
+
|
|
15
|
+
## Get started
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm install @withmarfa/inkkit
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { InkKitEditor } from '@withmarfa/inkkit'
|
|
23
|
+
import '@withmarfa/inkkit/style.css'
|
|
24
|
+
|
|
25
|
+
const editor = await InkKitEditor.mount(document.getElementById('editor')!, {
|
|
26
|
+
changed() {},
|
|
27
|
+
error(error) {
|
|
28
|
+
console.error(error.code, error.message)
|
|
29
|
+
},
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
editor.loadDocument({
|
|
33
|
+
documentId: 'note',
|
|
34
|
+
generation: 1,
|
|
35
|
+
format: 'md',
|
|
36
|
+
text: '# Hello\n\nStart writing.\n',
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const { text } = editor.snapshot(1)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Documentation
|
|
43
|
+
|
|
44
|
+
[inkkit.withmarfa.com](https://inkkit.withmarfa.com) covers how InkKit works, integration guides and the API reference, with a Markdown copy of each page and [`llms.txt`](https://inkkit.withmarfa.com/llms.txt) for agents.
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
[MIT](LICENSE). Third-party notices are in [NOTICE](NOTICE).
|