@openleaf-editor/core 0.1.0-beta.1 → 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.
Files changed (101) hide show
  1. package/README.md +115 -0
  2. package/dist/autolink.d.ts +12 -0
  3. package/dist/autolink.d.ts.map +1 -0
  4. package/dist/autolink.js +136 -0
  5. package/dist/autolink.js.map +1 -0
  6. package/dist/command-helpers.d.ts +8 -0
  7. package/dist/command-helpers.d.ts.map +1 -0
  8. package/dist/command-helpers.js +36 -0
  9. package/dist/command-helpers.js.map +1 -0
  10. package/dist/commands.d.ts +43 -22
  11. package/dist/commands.d.ts.map +1 -1
  12. package/dist/commands.js +513 -115
  13. package/dist/commands.js.map +1 -1
  14. package/dist/css.d.ts +1 -123
  15. package/dist/css.d.ts.map +1 -1
  16. package/dist/css.js +1 -214
  17. package/dist/css.js.map +1 -1
  18. package/dist/disclosure.d.ts +21 -0
  19. package/dist/disclosure.d.ts.map +1 -0
  20. package/dist/disclosure.js +144 -0
  21. package/dist/disclosure.js.map +1 -0
  22. package/dist/elements.d.ts +2 -0
  23. package/dist/elements.d.ts.map +1 -0
  24. package/dist/elements.js +2 -0
  25. package/dist/elements.js.map +1 -0
  26. package/dist/embed.d.ts +2 -0
  27. package/dist/embed.d.ts.map +1 -0
  28. package/dist/embed.js +2 -0
  29. package/dist/embed.js.map +1 -0
  30. package/dist/errors.d.ts +38 -0
  31. package/dist/errors.d.ts.map +1 -0
  32. package/dist/errors.js +40 -0
  33. package/dist/errors.js.map +1 -0
  34. package/dist/extensions.d.ts +46 -5
  35. package/dist/extensions.d.ts.map +1 -1
  36. package/dist/extensions.js +292 -65
  37. package/dist/extensions.js.map +1 -1
  38. package/dist/formats.d.ts +44 -0
  39. package/dist/formats.d.ts.map +1 -0
  40. package/dist/formats.js +123 -0
  41. package/dist/formats.js.map +1 -0
  42. package/dist/html.d.ts +32 -2
  43. package/dist/html.d.ts.map +1 -1
  44. package/dist/html.js +185 -31
  45. package/dist/html.js.map +1 -1
  46. package/dist/index.d.ts +27 -6
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +44 -10
  49. package/dist/index.js.map +1 -1
  50. package/dist/insert-commands.d.ts +172 -0
  51. package/dist/insert-commands.d.ts.map +1 -0
  52. package/dist/insert-commands.js +560 -0
  53. package/dist/insert-commands.js.map +1 -0
  54. package/dist/isolating-selection.d.ts +41 -0
  55. package/dist/isolating-selection.d.ts.map +1 -0
  56. package/dist/isolating-selection.js +162 -0
  57. package/dist/isolating-selection.js.map +1 -0
  58. package/dist/keymap.d.ts.map +1 -1
  59. package/dist/keymap.js +6 -3
  60. package/dist/keymap.js.map +1 -1
  61. package/dist/noneditable.d.ts +14 -0
  62. package/dist/noneditable.d.ts.map +1 -0
  63. package/dist/noneditable.js +107 -0
  64. package/dist/noneditable.js.map +1 -0
  65. package/dist/plugins.d.ts +20 -2
  66. package/dist/plugins.d.ts.map +1 -1
  67. package/dist/plugins.js +27 -2
  68. package/dist/plugins.js.map +1 -1
  69. package/dist/preserve.d.ts +76 -0
  70. package/dist/preserve.d.ts.map +1 -1
  71. package/dist/preserve.js +308 -58
  72. package/dist/preserve.js.map +1 -1
  73. package/dist/schema.d.ts +15 -0
  74. package/dist/schema.d.ts.map +1 -1
  75. package/dist/schema.js +356 -76
  76. package/dist/schema.js.map +1 -1
  77. package/dist/structure.d.ts +76 -0
  78. package/dist/structure.d.ts.map +1 -0
  79. package/dist/structure.js +422 -0
  80. package/dist/structure.js.map +1 -0
  81. package/dist/tables.d.ts +60 -1
  82. package/dist/tables.d.ts.map +1 -1
  83. package/dist/tables.js +617 -35
  84. package/dist/tables.js.map +1 -1
  85. package/dist/testing.d.ts +3 -0
  86. package/dist/testing.d.ts.map +1 -0
  87. package/dist/testing.js +3 -0
  88. package/dist/testing.js.map +1 -0
  89. package/dist/tokens.d.ts +36 -0
  90. package/dist/tokens.d.ts.map +1 -0
  91. package/dist/tokens.js +116 -0
  92. package/dist/tokens.js.map +1 -0
  93. package/dist/url.d.ts +1 -25
  94. package/dist/url.d.ts.map +1 -1
  95. package/dist/url.js +1 -77
  96. package/dist/url.js.map +1 -1
  97. package/dist/visual-aids.d.ts +20 -0
  98. package/dist/visual-aids.d.ts.map +1 -0
  99. package/dist/visual-aids.js +149 -0
  100. package/dist/visual-aids.js.map +1 -0
  101. package/package.json +16 -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.
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Turn a typed URL into a link when the author finishes it.
3
+ *
4
+ * Space and Enter are the commit keys, matching the behaviour authors already
5
+ * have in mail clients and office software. The plugin never rewrites a range
6
+ * that is already a link, and it refuses anything `isSafeUrl` would drop, so
7
+ * typing `javascript:` cannot become a mark the serializer would then emit.
8
+ */
9
+ import { Plugin } from 'prosemirror-state';
10
+ export declare function hrefFromTypedUrl(raw: string): string | null;
11
+ export declare function autolinkPlugin(): Plugin;
12
+ //# sourceMappingURL=autolink.d.ts.map
@@ -0,0 +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;AA8CzF,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK3D;AAuCD,wBAAgB,cAAc,IAAI,MAAM,CA0BvC"}
@@ -0,0 +1,136 @@
1
+ /**
2
+ * Turn a typed URL into a link when the author finishes it.
3
+ *
4
+ * Space and Enter are the commit keys, matching the behaviour authors already
5
+ * have in mail clients and office software. The plugin never rewrites a range
6
+ * that is already a link, and it refuses anything `isSafeUrl` would drop, so
7
+ * typing `javascript:` cannot become a mark the serializer would then emit.
8
+ */
9
+ import { Plugin, PluginKey } from 'prosemirror-state';
10
+ import { isSafeUrl } from './url.js';
11
+ const key = new PluginKey('openleaf-autolink');
12
+ /**
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.
17
+ */
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
+ }
52
+ export function hrefFromTypedUrl(raw) {
53
+ const trimmed = stripTrailingUrlPunctuation(raw);
54
+ if (!trimmed)
55
+ return null;
56
+ const href = /^www\./i.test(trimmed) ? `https://${trimmed}` : trimmed;
57
+ return isSafeUrl(href) ? href : null;
58
+ }
59
+ function trailingUrl(state, end) {
60
+ const $end = state.doc.resolve(end);
61
+ if (!$end.parent.isTextblock)
62
+ return null;
63
+ const parentStart = $end.start();
64
+ const raw = $end.parent.textBetween(0, $end.parentOffset, undefined, '\ufffc');
65
+ const trimmed = raw.replace(/[\s\u00a0]+$/, '');
66
+ const match = TRAILING_URL.exec(trimmed);
67
+ if (!match)
68
+ return null;
69
+ const token = match[0];
70
+ const bare = stripTrailingUrlPunctuation(token);
71
+ if (!bare)
72
+ return null;
73
+ const href = hrefFromTypedUrl(bare);
74
+ if (!href)
75
+ return null;
76
+ const from = parentStart + (match.index ?? 0);
77
+ const to = from + bare.length;
78
+ if (from >= to)
79
+ return null;
80
+ const link = state.schema.marks['link'];
81
+ if (!link)
82
+ return null;
83
+ if (state.doc.rangeHasMark(from, to, link))
84
+ return null;
85
+ return { from, to, href };
86
+ }
87
+ function applyAutolink(state, end) {
88
+ const found = trailingUrl(state, end);
89
+ if (!found)
90
+ return null;
91
+ const link = state.schema.marks['link'];
92
+ if (!link)
93
+ return null;
94
+ return state.tr.addMark(found.from, found.to, link.create({ href: found.href }));
95
+ }
96
+ function maybeAutolink(view, end) {
97
+ const tr = applyAutolink(view.state, end);
98
+ if (!tr)
99
+ return false;
100
+ view.dispatch(tr);
101
+ return true;
102
+ }
103
+ export function autolinkPlugin() {
104
+ return new Plugin({
105
+ key,
106
+ appendTransaction(transactions, _oldState, newState) {
107
+ if (!transactions.some((tr) => tr.docChanged))
108
+ return null;
109
+ if (transactions.some((tr) => tr.getMeta(key)))
110
+ return null;
111
+ const $from = newState.selection.$from;
112
+ if (!$from.parent.isTextblock || $from.parentOffset === 0)
113
+ return null;
114
+ const prev = $from.parent.textBetween($from.parentOffset - 1, $from.parentOffset);
115
+ if (prev !== ' ' && prev !== '\u00a0')
116
+ return null;
117
+ const tr = applyAutolink(newState, $from.pos);
118
+ return tr ? tr.setMeta(key, true) : null;
119
+ },
120
+ props: {
121
+ handleTextInput(view, from, _to, text) {
122
+ if (text !== ' ' && text !== '\u00a0')
123
+ return false;
124
+ maybeAutolink(view, from);
125
+ return false;
126
+ },
127
+ handleKeyDown(view, event) {
128
+ if (event.key !== 'Enter' || event.shiftKey)
129
+ return false;
130
+ maybeAutolink(view, view.state.selection.from);
131
+ return false;
132
+ },
133
+ },
134
+ });
135
+ }
136
+ //# sourceMappingURL=autolink.js.map
@@ -0,0 +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;;;;;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;Y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,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,QAAQ;gBAAE,OAAO,IAAI,CAAA;YAClD,MAAM,EAAE,GAAG,aAAa,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,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"}
@@ -12,9 +12,9 @@
12
12
  * reports whether it *could* apply, without doing anything. That is what makes
13
13
  * button disabled-state free -- the same function answers "can I?" and "do it".
14
14
  */
15
- import type { Attrs } from 'prosemirror-model';
15
+ import { type Attrs } from 'prosemirror-model';
16
16
  import type { Command, EditorState } from 'prosemirror-state';
17
- import { type Align } from './css.js';
17
+ import { type Align, type Dir, type ListStyle } from './css.js';
18
18
  /**
19
19
  * Is this mark active at the cursor, or across the selection?
20
20
  *
@@ -37,7 +37,19 @@ export declare const toggleItalic: Command;
37
37
  export declare const toggleUnderline: Command;
38
38
  export declare const toggleStrike: Command;
39
39
  export declare const toggleInlineCode: Command;
40
+ export declare const toggleSubscript: Command;
41
+ export declare const toggleSuperscript: Command;
40
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
+ */
41
53
  export declare function setHeading(level: number): Command;
42
54
  /**
43
55
  * Toggle a heading level: applying the level you are already in returns the
@@ -54,6 +66,16 @@ export declare const toggleOrderedList: Command;
54
66
  export declare const splitListItemCommand: Command;
55
67
  export declare const indentListItem: Command;
56
68
  export declare const outdentListItem: Command;
69
+ /**
70
+ * Indent: nest a list item when the selection is in a list, otherwise add a
71
+ * `padding-inline-start` step on the text blocks. Outdent is the reverse, and
72
+ * lifting a top-level list item out of its list is still how you leave a list.
73
+ */
74
+ export declare const indent: Command;
75
+ export declare const outdent: Command;
76
+ export declare function activeIndent(state: EditorState): number | null;
77
+ export declare function setListStyle(style: ListStyle | null): Command;
78
+ export declare function activeListStyle(state: EditorState): ListStyle | null;
57
79
  /**
58
80
  * The alignment of the selection, or null when it has none or is mixed.
59
81
  *
@@ -88,35 +110,34 @@ export declare function setTextAlign(align: Align | null): Command;
88
110
  * un-centre button that does not exist.
89
111
  */
90
112
  export declare function toggleTextAlign(align: Align): Command;
113
+ export declare function setLineHeight(value: string | null): Command;
114
+ export declare function activeLineHeight(state: EditorState): string | null;
115
+ export declare function setDir(dir: Dir | null): Command;
116
+ export declare function toggleDir(dir: Dir): Command;
117
+ export declare function activeDir(state: EditorState): Dir | null;
91
118
  export declare function setTextColor(color: string): Command;
92
119
  export declare function setBackgroundColor(color: string): Command;
93
120
  export declare const clearTextColor: Command;
94
121
  export declare const clearBackgroundColor: Command;
95
122
  export declare function activeTextColor(state: EditorState): string | null;
96
123
  export declare function activeBackgroundColor(state: EditorState): string | null;
97
- export interface LinkAttrs {
98
- href: string;
99
- title?: string | null;
100
- target?: string | null;
101
- rel?: string | null;
102
- }
124
+ export declare function setFontFamily(family: string | null): Command;
125
+ export declare function setFontSize(size: string | null): Command;
126
+ export declare function setLanguage(lang: string | null): Command;
127
+ export declare function activeFontFamily(state: EditorState): string | null;
128
+ export declare function activeFontSize(state: EditorState): string | null;
129
+ export declare function activeLanguage(state: EditorState): string | null;
103
130
  /**
104
- * Apply or update a link across the selection.
131
+ * Strip character formatting and block decoration from the selection.
105
132
  *
106
- * Removes any existing link first: without that, updating a link that only
107
- * partially overlaps the selection leaves two adjacent links with different
108
- * hrefs, which looks fine and is wrong.
133
+ * Links stay: they are a destination, not a look. Direction stays: it is
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.
109
138
  */
110
- export declare function setLink(attrs: LinkAttrs): Command;
111
- export declare const unsetLink: Command;
112
- export interface ImageAttrs {
113
- src: string;
114
- alt?: string | null;
115
- title?: string | null;
116
- width?: string | null;
117
- height?: string | null;
118
- }
119
- export declare function insertImage(attrs: ImageAttrs): Command;
139
+ export declare const clearFormatting: 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';
120
141
  export { redo, undo } from 'prosemirror-history';
121
142
  export declare const canUndo: (state: EditorState) => boolean;
122
143
  export declare const canRedo: (state: EditorState) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAsC,MAAM,mBAAmB,CAAA;AAOlF,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CA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