@openleaf-editor/core 0.1.0-beta.2 → 0.1.0-beta.3
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 +115 -0
- package/dist/autolink.d.ts.map +1 -1
- package/dist/autolink.js +45 -7
- package/dist/autolink.js.map +1 -1
- package/dist/command-helpers.d.ts +8 -0
- package/dist/command-helpers.d.ts.map +1 -0
- package/dist/command-helpers.js +36 -0
- package/dist/command-helpers.js.map +1 -0
- package/dist/commands.d.ts +15 -61
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +295 -343
- package/dist/commands.js.map +1 -1
- package/dist/css.d.ts +1 -175
- package/dist/css.d.ts.map +1 -1
- package/dist/css.js +1 -516
- package/dist/css.js.map +1 -1
- package/dist/disclosure.d.ts +21 -0
- package/dist/disclosure.d.ts.map +1 -0
- package/dist/disclosure.js +144 -0
- package/dist/disclosure.js.map +1 -0
- package/dist/elements.d.ts +2 -0
- package/dist/elements.d.ts.map +1 -0
- package/dist/elements.js +2 -0
- package/dist/elements.js.map +1 -0
- package/dist/embed.d.ts +1 -51
- package/dist/embed.d.ts.map +1 -1
- package/dist/embed.js +1 -115
- package/dist/embed.js.map +1 -1
- package/dist/errors.d.ts +38 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +40 -0
- package/dist/errors.js.map +1 -0
- package/dist/extensions.d.ts +46 -5
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +272 -52
- package/dist/extensions.js.map +1 -1
- package/dist/formats.d.ts.map +1 -1
- package/dist/formats.js +19 -7
- package/dist/formats.js.map +1 -1
- package/dist/html.d.ts +32 -2
- package/dist/html.d.ts.map +1 -1
- package/dist/html.js +185 -31
- package/dist/html.js.map +1 -1
- package/dist/index.d.ts +21 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -6
- package/dist/index.js.map +1 -1
- package/dist/insert-commands.d.ts +172 -0
- package/dist/insert-commands.d.ts.map +1 -0
- package/dist/insert-commands.js +560 -0
- package/dist/insert-commands.js.map +1 -0
- package/dist/isolating-selection.d.ts +41 -0
- package/dist/isolating-selection.d.ts.map +1 -0
- package/dist/isolating-selection.js +162 -0
- package/dist/isolating-selection.js.map +1 -0
- package/dist/noneditable.d.ts.map +1 -1
- package/dist/noneditable.js +18 -4
- package/dist/noneditable.js.map +1 -1
- package/dist/plugins.d.ts +20 -2
- package/dist/plugins.d.ts.map +1 -1
- package/dist/plugins.js +27 -2
- package/dist/plugins.js.map +1 -1
- package/dist/preserve.d.ts +48 -17
- package/dist/preserve.d.ts.map +1 -1
- package/dist/preserve.js +214 -43
- package/dist/preserve.js.map +1 -1
- package/dist/schema.d.ts +15 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +157 -28
- package/dist/schema.js.map +1 -1
- package/dist/structure.d.ts +32 -0
- package/dist/structure.d.ts.map +1 -1
- package/dist/structure.js +53 -10
- package/dist/structure.js.map +1 -1
- package/dist/tables.d.ts +47 -1
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +417 -40
- package/dist/tables.js.map +1 -1
- package/dist/testing.d.ts +3 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +3 -0
- package/dist/testing.js.map +1 -0
- package/dist/tokens.d.ts +8 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +54 -6
- package/dist/tokens.js.map +1 -1
- package/dist/url.d.ts +1 -25
- package/dist/url.d.ts.map +1 -1
- package/dist/url.js +1 -77
- package/dist/url.js.map +1 -1
- package/dist/visual-aids.d.ts +11 -1
- package/dist/visual-aids.d.ts.map +1 -1
- package/dist/visual-aids.js +124 -36
- package/dist/visual-aids.js.map +1 -1
- package/package.json +15 -1
package/README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# @openleaf-editor/core
|
|
2
|
+
|
|
3
|
+
The schema, commands, HTML input and output, and the content-preservation
|
|
4
|
+
layer. No UI, no framework dependencies.
|
|
5
|
+
|
|
6
|
+
> **Editor output is untrusted input.** Whatever the editor produces — and
|
|
7
|
+
> whatever a user pasted into it — must be sanitized **on your server** before it
|
|
8
|
+
> is stored or rendered as HTML. Client-side sanitization is a user-experience
|
|
9
|
+
> feature, not a security control: anything the editor strips can be put back
|
|
10
|
+
> with developer tools, because the editor runs under the user's control.
|
|
11
|
+
>
|
|
12
|
+
> [`@openleaf-editor/sanitize`](https://github.com/PeytonNowlin/openleaf/tree/main/packages/sanitize) ships the
|
|
13
|
+
> canonical allowlist as data and generates configuration for DOMPurify, Python
|
|
14
|
+
> `bleach` and PHP HTMLPurifier from it, so client and server enforce the same
|
|
15
|
+
> rules. Read [SECURITY.md](https://github.com/PeytonNowlin/openleaf/blob/main/SECURITY.md) before you ship.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm install @openleaf-editor/core@beta
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Keep every `@openleaf-editor/*` package on the same version. They pin each other
|
|
24
|
+
exactly, so mixing versions installs two copies of the schema and the toolbar
|
|
25
|
+
registry -- and a node built by one is not a node type the other accepts.
|
|
26
|
+
|
|
27
|
+
## What it is for
|
|
28
|
+
|
|
29
|
+
Most integrations never import this directly -- they use
|
|
30
|
+
[`@openleaf-editor/element`](../element), which builds an editor out of it. You
|
|
31
|
+
want `core` when you are embedding ProseMirror yourself, running HTML through the
|
|
32
|
+
schema on a server, or writing a plugin.
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { coreSchema, parseHtml, serializeHtml, roundTrip } from '@openleaf-editor/core'
|
|
36
|
+
|
|
37
|
+
roundTrip('<p style="text-align:center">hi</p>')
|
|
38
|
+
// '<p style="text-align:center">hi</p>'
|
|
39
|
+
roundTrip('<p><strong class="brand-name">Acme</strong></p>')
|
|
40
|
+
// '<p><strong class="brand-name">Acme</strong></p>'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## The preservation layer is the point
|
|
44
|
+
|
|
45
|
+
A schema-based editor has to decide what it understands, and the usual answer for
|
|
46
|
+
everything else is to delete it. `core` keeps unrecognised markup as a
|
|
47
|
+
selectable, movable atom that round-trips byte-for-byte instead.
|
|
48
|
+
|
|
49
|
+
Block-level tags the HTML parser will not keep inside a `<p>` (`div`, `section`,
|
|
50
|
+
and the rest of `CLOSES_OPEN_P`) are stored as block atoms even when they appear
|
|
51
|
+
inside a blockquote or list item. Treating them as inline would wrap them in a
|
|
52
|
+
paragraph the next parse splits, growing two empty paragraphs on every save.
|
|
53
|
+
|
|
54
|
+
That is why the schema is larger than it might look: `<table>`, `<figure>`,
|
|
55
|
+
`<details>`, `<video>`, allowlisted `<iframe>` embeds and the typography marks are
|
|
56
|
+
all modelled here rather than in an opt-in plugin. Not because every deployment
|
|
57
|
+
edits them, but because a node type that is absent is content that becomes an
|
|
58
|
+
atom -- and "we kept your tables and you may not touch them" is not something you
|
|
59
|
+
can tell a CMS with a fifteen-year archive. A `<figcaption>` is only a modelled
|
|
60
|
+
node inside a modelled `<figure>`; outside one it is that same atom, so it is
|
|
61
|
+
never emitted inside a `<p>` the next parse would split.
|
|
62
|
+
|
|
63
|
+
The editing chrome for those things is opt-in. The storage format is not.
|
|
64
|
+
|
|
65
|
+
## Commands and predicates
|
|
66
|
+
|
|
67
|
+
Commands take ProseMirror's `(state, dispatch, view)` shape. Every one has a
|
|
68
|
+
matching predicate, so a control can show its state without duplicating the
|
|
69
|
+
logic:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import { setFontFamily, activeFontFamily } from '@openleaf-editor/core'
|
|
73
|
+
|
|
74
|
+
activeFontFamily(view.state) // 'Georgia' | null
|
|
75
|
+
setFontFamily('Georgia')(view.state, view.dispatch) // boolean
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`selectedImage` / `updateImage` (and the matching media pair) are how the
|
|
79
|
+
insert-image control also edits: a `NodeSelection` on the picture or its
|
|
80
|
+
`<figure>` prefills the dialog, and Save uses `setNodeMarkup` so caption,
|
|
81
|
+
class and dimensions survive.
|
|
82
|
+
|
|
83
|
+
A predicate returns `null` for a mixed selection rather than the first value it
|
|
84
|
+
finds -- a dropdown showing "Georgia" for a range that is half Georgia would be
|
|
85
|
+
worse than showing nothing.
|
|
86
|
+
|
|
87
|
+
Block-type commands (`setHeading`, `setParagraph`, `toggleCodeBlock`) refuse a
|
|
88
|
+
textblock whose content the destination cannot hold. A captioned `<figure>` is a
|
|
89
|
+
textblock in the schema (`content: 'inline+'`) but not a paragraph: converting it
|
|
90
|
+
used to produce an `<h2>` holding an image and a `<figcaption>`, and
|
|
91
|
+
`toggleCodeBlock` threw. `canInsert` also stops at an isolating node, so
|
|
92
|
+
inserting an `<hr>` cannot split a figure.
|
|
93
|
+
|
|
94
|
+
## Isolating selections
|
|
95
|
+
|
|
96
|
+
If you construct a ProseMirror editor yourself, install
|
|
97
|
+
`isolatingSelectionPlugin()` next to `history()` and the keymap. A
|
|
98
|
+
`TextSelection` that starts in a `<blockquote>` and ends inside a following
|
|
99
|
+
`<details>` otherwise throws on the next keystroke (`Cannot join details onto
|
|
100
|
+
blockquote`), and the recovery rewrites the document with no undo entry.
|
|
101
|
+
`<openleaf-editor>` already installs the plugin. Details are in
|
|
102
|
+
[authoring-plugins.md §4.11](../../docs/authoring-plugins.md#411-isolating-nodes-clamp-the-selection-at-their-boundary).
|
|
103
|
+
|
|
104
|
+
## Safety
|
|
105
|
+
|
|
106
|
+
URL, CSS and embed rules come from
|
|
107
|
+
[`@openleaf-editor/content-policy`](../content-policy), shared with
|
|
108
|
+
[`@openleaf-editor/sanitize`](../sanitize) so the editor and your server cannot
|
|
109
|
+
disagree. `javascript:` URLs, `on*` handlers and unallowlisted iframes are dropped
|
|
110
|
+
on the way in, with tests. Sanitize on the server anyway -- anything a client
|
|
111
|
+
strips can be put back with developer tools.
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
Apache-2.0.
|
package/dist/autolink.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autolink.d.ts","sourceRoot":"","sources":["../src/autolink.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAiD,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"autolink.d.ts","sourceRoot":"","sources":["../src/autolink.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAiD,MAAM,mBAAmB,CAAA;AA8CzF,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK3D;AAuCD,wBAAgB,cAAc,IAAI,MAAM,CA0BvC"}
|
package/dist/autolink.js
CHANGED
|
@@ -10,13 +10,47 @@ import { Plugin, PluginKey } from 'prosemirror-state';
|
|
|
10
10
|
import { isSafeUrl } from './url.js';
|
|
11
11
|
const key = new PluginKey('openleaf-autolink');
|
|
12
12
|
/**
|
|
13
|
-
* A URL at the end of a typed run.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* A URL at the end of a typed run. Parentheses are in the match so
|
|
14
|
+
* `(www.example.com)` and `Foo_(bar)` can both be considered; the strip below
|
|
15
|
+
* decides which trailing `)` is prose and which is the URL. Angle brackets stay
|
|
16
|
+
* out because they are HTML delimiters, not URL characters we want to mark.
|
|
16
17
|
*/
|
|
17
|
-
const TRAILING_URL = /(?:https?:\/\/|www\.)[^\s<>
|
|
18
|
+
const TRAILING_URL = /(?:https?:\/\/|www\.)[^\s<>]+$/i;
|
|
19
|
+
/**
|
|
20
|
+
* Closers that end a URL in a sentence, a citation, or quotes. `)` is handled
|
|
21
|
+
* separately: a trailing one is prose when unmatched, and part of the URL when
|
|
22
|
+
* it balances an earlier `(`.
|
|
23
|
+
*/
|
|
24
|
+
const TRAILING_PUNCTUATION = /[.,;:!?\]}'"]/;
|
|
25
|
+
function stripTrailingUrlPunctuation(token) {
|
|
26
|
+
let s = token;
|
|
27
|
+
while (s.length > 0) {
|
|
28
|
+
const last = s.charAt(s.length - 1);
|
|
29
|
+
if (TRAILING_PUNCTUATION.test(last)) {
|
|
30
|
+
s = s.slice(0, -1);
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (last === ')') {
|
|
34
|
+
let opens = 0;
|
|
35
|
+
let closes = 0;
|
|
36
|
+
for (let i = 0; i < s.length; i++) {
|
|
37
|
+
const ch = s.charAt(i);
|
|
38
|
+
if (ch === '(')
|
|
39
|
+
opens++;
|
|
40
|
+
else if (ch === ')')
|
|
41
|
+
closes++;
|
|
42
|
+
}
|
|
43
|
+
if (closes > opens) {
|
|
44
|
+
s = s.slice(0, -1);
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
return s;
|
|
51
|
+
}
|
|
18
52
|
export function hrefFromTypedUrl(raw) {
|
|
19
|
-
const trimmed = raw
|
|
53
|
+
const trimmed = stripTrailingUrlPunctuation(raw);
|
|
20
54
|
if (!trimmed)
|
|
21
55
|
return null;
|
|
22
56
|
const href = /^www\./i.test(trimmed) ? `https://${trimmed}` : trimmed;
|
|
@@ -32,11 +66,15 @@ function trailingUrl(state, end) {
|
|
|
32
66
|
const match = TRAILING_URL.exec(trimmed);
|
|
33
67
|
if (!match)
|
|
34
68
|
return null;
|
|
35
|
-
const
|
|
69
|
+
const token = match[0];
|
|
70
|
+
const bare = stripTrailingUrlPunctuation(token);
|
|
71
|
+
if (!bare)
|
|
72
|
+
return null;
|
|
73
|
+
const href = hrefFromTypedUrl(bare);
|
|
36
74
|
if (!href)
|
|
37
75
|
return null;
|
|
38
76
|
const from = parentStart + (match.index ?? 0);
|
|
39
|
-
const to =
|
|
77
|
+
const to = from + bare.length;
|
|
40
78
|
if (from >= to)
|
|
41
79
|
return null;
|
|
42
80
|
const link = state.schema.marks['link'];
|
package/dist/autolink.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autolink.js","sourceRoot":"","sources":["../src/autolink.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAsC,MAAM,mBAAmB,CAAA;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpC,MAAM,GAAG,GAAG,IAAI,SAAS,CAAC,mBAAmB,CAAC,CAAA;AAE9C;;;;GAIG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"autolink.js","sourceRoot":"","sources":["../src/autolink.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAsC,MAAM,mBAAmB,CAAA;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpC,MAAM,GAAG,GAAG,IAAI,SAAS,CAAC,mBAAmB,CAAC,CAAA;AAE9C;;;;;GAKG;AACH,MAAM,YAAY,GAAG,iCAAiC,CAAA;AAEtD;;;;GAIG;AACH,MAAM,oBAAoB,GAAG,eAAe,CAAA;AAE5C,SAAS,2BAA2B,CAAC,KAAa;IAChD,IAAI,CAAC,GAAG,KAAK,CAAA;IACb,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QACnC,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACpC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;YAClB,SAAQ;QACV,CAAC;QACD,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,IAAI,KAAK,GAAG,CAAC,CAAA;YACb,IAAI,MAAM,GAAG,CAAC,CAAA;YACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE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AC,CAAA;YAC7C,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;QAC1C,CAAC;QACD,KAAK,EAAE;YACL,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI;gBACnC,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,QAAQ;oBAAE,OAAO,KAAK,CAAA;gBACnD,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;gBACzB,OAAO,KAAK,CAAA;YACd,CAAC;YACD,aAAa,CAAC,IAAI,EAAE,KAAK;gBACvB,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,IAAI,KAAK,CAAC,QAAQ;oBAAE,OAAO,KAAK,CAAA;gBACzD,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;gBAC9C,OAAO,KAAK,CAAA;YACd,CAAC;SACF;KACF,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MarkType, NodeType } from 'prosemirror-model';
|
|
2
|
+
import type { Command, EditorState } from 'prosemirror-state';
|
|
3
|
+
export declare function markIn(state: EditorState, name: string): MarkType | undefined;
|
|
4
|
+
export declare function nodeIn(state: EditorState, name: string): NodeType | undefined;
|
|
5
|
+
export declare function markCommand(name: string, build: (type: MarkType) => Command): Command;
|
|
6
|
+
export declare function nodeCommand(name: string, build: (type: NodeType) => Command): Command;
|
|
7
|
+
export declare function canInsertNode(state: EditorState, nodeName: string): boolean;
|
|
8
|
+
//# sourceMappingURL=command-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-helpers.d.ts","sourceRoot":"","sources":["../src/command-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE7D,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAE7E;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAE7E;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,GAAG,OAAO,CAKrF;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,GAAG,OAAO,CAKrF;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAa3E"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export function markIn(state, name) {
|
|
2
|
+
return state.schema.marks[name];
|
|
3
|
+
}
|
|
4
|
+
export function nodeIn(state, name) {
|
|
5
|
+
return state.schema.nodes[name];
|
|
6
|
+
}
|
|
7
|
+
export function markCommand(name, build) {
|
|
8
|
+
return (state, dispatch, view) => {
|
|
9
|
+
const type = markIn(state, name);
|
|
10
|
+
return type ? build(type)(state, dispatch, view) : false;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export function nodeCommand(name, build) {
|
|
14
|
+
return (state, dispatch, view) => {
|
|
15
|
+
const type = nodeIn(state, name);
|
|
16
|
+
return type ? build(type)(state, dispatch, view) : false;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export function canInsertNode(state, nodeName) {
|
|
20
|
+
const type = nodeIn(state, nodeName);
|
|
21
|
+
if (!type)
|
|
22
|
+
return false;
|
|
23
|
+
const { $from } = state.selection;
|
|
24
|
+
for (let depth = $from.depth; depth >= 0; depth -= 1) {
|
|
25
|
+
const index = $from.index(depth);
|
|
26
|
+
if ($from.node(depth).canReplaceWith(index, index, type))
|
|
27
|
+
return true;
|
|
28
|
+
// Isolating nodes (figure, table cells, details, preserved atoms) must not
|
|
29
|
+
// be split to make room for a sibling. Walking past them is how
|
|
30
|
+
// insertHorizontalRule used to bisect a captioned image.
|
|
31
|
+
if ($from.node(depth).type.spec.isolating)
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=command-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-helpers.js","sourceRoot":"","sources":["../src/command-helpers.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,MAAM,CAAC,KAAkB,EAAE,IAAY;IACrD,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,KAAkB,EAAE,IAAY;IACrD,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,KAAkC;IAC1E,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;QAC/B,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;QAChC,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;IAC1D,CAAC,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,KAAkC;IAC1E,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;QAC/B,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;QAChC,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;IAC1D,CAAC,CAAA;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAkB,EAAE,QAAgB;IAChE,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IACpC,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAA;IACvB,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,SAAS,CAAA;IACjC,KAAK,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACrD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QAChC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC;YAAE,OAAO,IAAI,CAAA;QACrE,2EAA2E;QAC3E,gEAAgE;QAChE,yDAAyD;QACzD,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS;YAAE,OAAO,KAAK,CAAA;IACzD,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
|
package/dist/commands.d.ts
CHANGED
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
import { type Attrs } from 'prosemirror-model';
|
|
16
16
|
import type { Command, EditorState } from 'prosemirror-state';
|
|
17
17
|
import { type Align, type Dir, type ListStyle } from './css.js';
|
|
18
|
-
import { type ImageAlign } from './tokens.js';
|
|
19
18
|
/**
|
|
20
19
|
* Is this mark active at the cursor, or across the selection?
|
|
21
20
|
*
|
|
@@ -41,6 +40,16 @@ export declare const toggleInlineCode: Command;
|
|
|
41
40
|
export declare const toggleSubscript: Command;
|
|
42
41
|
export declare const toggleSuperscript: Command;
|
|
43
42
|
export declare const setParagraph: Command;
|
|
43
|
+
/**
|
|
44
|
+
* `level` is the only attribute this command decides; everything else about the
|
|
45
|
+
* block is the author's and travels with it.
|
|
46
|
+
*
|
|
47
|
+
* `id` needs no special case any more, and that is a property of the schema
|
|
48
|
+
* rather than a shortcut: `paragraph` does not declare an `id`, so `carryOver`
|
|
49
|
+
* cannot promote one from a paragraph, while a heading's own `id` is declared
|
|
50
|
+
* and does come across. A paragraph stored as `<p id="x">` keeps its id anyway,
|
|
51
|
+
* through the carried residue, which is where an unmodelled attribute belongs.
|
|
52
|
+
*/
|
|
44
53
|
export declare function setHeading(level: number): Command;
|
|
45
54
|
/**
|
|
46
55
|
* Toggle a heading level: applying the level you are already in returns the
|
|
@@ -122,68 +131,13 @@ export declare function activeLanguage(state: EditorState): string | null;
|
|
|
122
131
|
* Strip character formatting and block decoration from the selection.
|
|
123
132
|
*
|
|
124
133
|
* Links stay: they are a destination, not a look. Direction stays: it is
|
|
125
|
-
* content.
|
|
126
|
-
*
|
|
134
|
+
* content. Language stays: it is the same kind of fact as direction, only
|
|
135
|
+
* modelled as a mark (`<span lang>`) rather than a node attribute. Headings
|
|
136
|
+
* and lists stay: they are structure. Alignment, indent, line height, fonts,
|
|
137
|
+
* colours, and the common character marks go.
|
|
127
138
|
*/
|
|
128
139
|
export declare const clearFormatting: Command;
|
|
129
|
-
export
|
|
130
|
-
href: string;
|
|
131
|
-
title?: string | null;
|
|
132
|
-
target?: string | null;
|
|
133
|
-
rel?: string | null;
|
|
134
|
-
id?: string | null;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Apply or update a link across the selection.
|
|
138
|
-
*
|
|
139
|
-
* Removes any existing link first: without that, updating a link that only
|
|
140
|
-
* partially overlaps the selection leaves two adjacent links with different
|
|
141
|
-
* hrefs, which looks fine and is wrong.
|
|
142
|
-
*/
|
|
143
|
-
export declare function setLink(attrs: LinkAttrs): Command;
|
|
144
|
-
export declare const unsetLink: Command;
|
|
145
|
-
export interface ImageAttrs {
|
|
146
|
-
src: string;
|
|
147
|
-
alt?: string | null;
|
|
148
|
-
title?: string | null;
|
|
149
|
-
width?: string | null;
|
|
150
|
-
height?: string | null;
|
|
151
|
-
align?: ImageAlign | null;
|
|
152
|
-
className?: string | null;
|
|
153
|
-
/**
|
|
154
|
-
* When present, the image is wrapped in `<figure>` with this caption.
|
|
155
|
-
* An empty string still wraps: a figure with no caption text is how an
|
|
156
|
-
* author says "this will have a caption" without writing one yet.
|
|
157
|
-
*/
|
|
158
|
-
caption?: string | null;
|
|
159
|
-
}
|
|
160
|
-
export declare function insertImage(attrs: ImageAttrs): Command;
|
|
161
|
-
export declare function insertText(text: string): Command;
|
|
162
|
-
export declare const insertNonBreakingSpace: Command;
|
|
163
|
-
export declare const insertPageBreak: Command;
|
|
164
|
-
export declare function insertNamedAnchor(id: string): Command;
|
|
165
|
-
export declare function setHeadingId(id: string | null): Command;
|
|
166
|
-
export declare function insertDetails(summaryText?: string): Command;
|
|
167
|
-
export interface MediaAttrs {
|
|
168
|
-
src: string;
|
|
169
|
-
title?: string | null;
|
|
170
|
-
width?: string | null;
|
|
171
|
-
height?: string | null;
|
|
172
|
-
controls?: boolean;
|
|
173
|
-
poster?: string | null;
|
|
174
|
-
allow?: string | null;
|
|
175
|
-
allowfullscreen?: boolean;
|
|
176
|
-
}
|
|
177
|
-
export declare function insertVideo(attrs: MediaAttrs): Command;
|
|
178
|
-
export declare function insertAudio(attrs: MediaAttrs): Command;
|
|
179
|
-
export declare function insertIframe(attrs: MediaAttrs): Command;
|
|
180
|
-
/**
|
|
181
|
-
* Parse HTML against the live schema and insert it.
|
|
182
|
-
*
|
|
183
|
-
* Used by the snippet picker. The HTML still goes through the same parse
|
|
184
|
-
* pipeline as stored content, so a snippet cannot smuggle in a `<script>`.
|
|
185
|
-
*/
|
|
186
|
-
export declare function insertHtml(html: string): Command;
|
|
140
|
+
export { insertAudio, insertDetails, insertHtml, insertIframe, insertImage, insertNamedAnchor, insertNonBreakingSpace, insertPageBreak, insertText, insertVideo, selectedImage, selectedMedia, setHeadingId, setLink, unsetLink, updateImage, updateMedia, type ImageAttrs, type LinkAttrs, type MediaAttrs, type MediaSource, type SelectedImage, type SelectedMedia, } from './insert-commands.js';
|
|
187
141
|
export { redo, undo } from 'prosemirror-history';
|
|
188
142
|
export declare const canUndo: (state: EditorState) => boolean;
|
|
189
143
|
export declare const canRedo: (state: EditorState) => boolean;
|
package/dist/commands.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EAAE,KAAK,KAAK,EAAqD,MAAM,mBAAmB,CAAA;AAOjG,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAA+B,MAAM,mBAAmB,CAAA;AAC1F,OAAO,EASL,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,SAAS,EACf,MAAM,UAAU,CAAA;AAgNjB;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAQ1E;AAED,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAiBzF;AAED,oEAAoE;AACpE,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEvE;AAED,sEAAsE;AACtE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CASpE;A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