@doist/typist 1.5.0 → 2.0.0
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/CHANGELOG.md +13 -0
- package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content-at.d.ts +38 -0
- package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content-at.d.ts.map +1 -0
- package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content-at.js +49 -0
- package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content.d.ts +16 -8
- package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content.d.ts.map +1 -1
- package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content.js +6 -16
- package/dist/extensions/core/extra-editor-commands/extra-editor-commands.d.ts.map +1 -1
- package/dist/extensions/core/extra-editor-commands/extra-editor-commands.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [2.0.0](https://github.com/Doist/typist/compare/v1.5.0...v2.0.0) (2023-09-13)
|
|
2
|
+
|
|
3
|
+
### ⚠ BREAKING CHANGES
|
|
4
|
+
|
|
5
|
+
- **commands:** With the introduction of `insertMarkdownContentAt`, the
|
|
6
|
+
API for `insertMarkdownContent` was changed to match the Tiptap's
|
|
7
|
+
implementation of `insertContent`/`insertContentAt`, which the
|
|
8
|
+
`insertMarkdown*` commands draw inspiration from.
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
- **commands:** Add `insertMarkdownContentAt` command ([#439](https://github.com/Doist/typist/issues/439)) ([e87b892](https://github.com/Doist/typist/commit/e87b8929c2c77f1a6fbb065d865d73d45f62134f))
|
|
13
|
+
|
|
1
14
|
## [1.5.0](https://github.com/Doist/typist/compare/v1.4.12...v1.5.0) (2023-09-12)
|
|
2
15
|
|
|
3
16
|
### Features
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { RawCommands } from '@tiptap/core';
|
|
2
|
+
import type { Range } from '@tiptap/core';
|
|
3
|
+
import type { ParseOptions } from 'prosemirror-model';
|
|
4
|
+
/**
|
|
5
|
+
* Augment the official `@tiptap/core` module with extra commands so that the compiler knows about
|
|
6
|
+
* them. For this to work externally, a wildcard export needs to be added to the root `index.ts`.
|
|
7
|
+
*/
|
|
8
|
+
declare module '@tiptap/core' {
|
|
9
|
+
interface Commands<ReturnType> {
|
|
10
|
+
insertMarkdownContentAt: {
|
|
11
|
+
/**
|
|
12
|
+
* Inserts the provided Markdown content as HTML into the editor at a specific position.
|
|
13
|
+
*
|
|
14
|
+
* @param position The position or range the Markdown will be inserted in.
|
|
15
|
+
* @param markdown The Markdown content to parse and insert as HTML.
|
|
16
|
+
* @param options An optional object with the following parameters:
|
|
17
|
+
* @param options.parseOptions The parse options to use when the HTML content is parsed by ProseMirror.
|
|
18
|
+
* @param options.updateSelection Whether the selection should move to the newly inserted content.
|
|
19
|
+
*/
|
|
20
|
+
insertMarkdownContentAt: (position: number | Range, markdown: string, options?: {
|
|
21
|
+
parseOptions?: ParseOptions;
|
|
22
|
+
updateSelection?: boolean;
|
|
23
|
+
}) => ReturnType;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Inserts the provided Markdown content as HTML into the editor at a specific position.
|
|
29
|
+
*
|
|
30
|
+
* The solution for this function was inspired by how ProseMirror pastes content from the clipboard,
|
|
31
|
+
* and how Tiptap inserts content with the `insertContentAt` command.
|
|
32
|
+
*/
|
|
33
|
+
declare function insertMarkdownContentAt(position: number | Range, markdown: string, options?: {
|
|
34
|
+
parseOptions?: ParseOptions;
|
|
35
|
+
updateSelection?: boolean;
|
|
36
|
+
}): ReturnType<RawCommands['insertMarkdownContentAt']>;
|
|
37
|
+
export { insertMarkdownContentAt };
|
|
38
|
+
//# sourceMappingURL=insert-markdown-content-at.d.ts.map
|
package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content-at.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insert-markdown-content-at.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/core/extra-editor-commands/commands/insert-markdown-content-at.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2B,MAAM,cAAc,CAAA;AAMnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD;;;GAGG;AACH,OAAO,QAAQ,cAAc,CAAC;IAC1B,UAAU,QAAQ,CAAC,UAAU;QACzB,uBAAuB,EAAE;YACrB;;;;;;;;eAQG;YACH,uBAAuB,EAAE,CACrB,QAAQ,EAAE,MAAM,GAAG,KAAK,EACxB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;gBACN,YAAY,CAAC,EAAE,YAAY,CAAA;gBAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;aAC5B,KACA,UAAU,CAAA;SAClB,CAAA;KACJ;CACJ;AAED;;;;;GAKG;AACH,iBAAS,uBAAuB,CAC5B,QAAQ,EAAE,MAAM,GAAG,KAAK,EACxB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IACN,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC5B,GACF,UAAU,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC,CAgDpD;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { selectionToInsertionEnd } from '@tiptap/core';
|
|
2
|
+
import { DOMParser } from 'prosemirror-model';
|
|
3
|
+
import { parseHtmlToElement } from '../../../../helpers/dom';
|
|
4
|
+
import { getHTMLSerializerInstance } from '../../../../serializers/html/html';
|
|
5
|
+
/**
|
|
6
|
+
* Inserts the provided Markdown content as HTML into the editor at a specific position.
|
|
7
|
+
*
|
|
8
|
+
* The solution for this function was inspired by how ProseMirror pastes content from the clipboard,
|
|
9
|
+
* and how Tiptap inserts content with the `insertContentAt` command.
|
|
10
|
+
*/
|
|
11
|
+
function insertMarkdownContentAt(position, markdown, options) {
|
|
12
|
+
return ({ editor, tr, dispatch }) => {
|
|
13
|
+
// Check if the transaction should be dispatched
|
|
14
|
+
// ref: https://tiptap.dev/api/commands#dry-run-for-commands
|
|
15
|
+
if (dispatch) {
|
|
16
|
+
// Default values for command options must be set here
|
|
17
|
+
// (they do not work if set in the function signature)
|
|
18
|
+
options = {
|
|
19
|
+
parseOptions: {},
|
|
20
|
+
updateSelection: true,
|
|
21
|
+
...options,
|
|
22
|
+
};
|
|
23
|
+
// Get the start and end positions from the provided position
|
|
24
|
+
let { from, to } = typeof position === 'number'
|
|
25
|
+
? { from: position, to: position }
|
|
26
|
+
: { from: position.from, to: position.to };
|
|
27
|
+
// If the selection is empty, and we're in an empty textblock, expand the start and end
|
|
28
|
+
// positions to include the whole textblock (not leaving empty paragraphs behind)
|
|
29
|
+
if (from === to) {
|
|
30
|
+
const { parent } = tr.doc.resolve(from);
|
|
31
|
+
if (parent.isTextblock && parent.childCount === 0) {
|
|
32
|
+
from -= 1;
|
|
33
|
+
to += 1;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
// Parse the Markdown to HTML and then then into ProseMirror nodes
|
|
37
|
+
const htmlContent = getHTMLSerializerInstance(editor.schema).serialize(markdown);
|
|
38
|
+
const content = DOMParser.fromSchema(editor.schema).parse(parseHtmlToElement(htmlContent), options.parseOptions);
|
|
39
|
+
// Inserts the content into the editor while preserving the current selection
|
|
40
|
+
tr.replaceWith(from, to, content);
|
|
41
|
+
// Set the text cursor to the end of the inserted content
|
|
42
|
+
if (options.updateSelection) {
|
|
43
|
+
selectionToInsertionEnd(tr, tr.steps.length - 1, -1);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return true;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export { insertMarkdownContentAt };
|
|
@@ -8,21 +8,29 @@ declare module '@tiptap/core' {
|
|
|
8
8
|
interface Commands<ReturnType> {
|
|
9
9
|
insertMarkdownContent: {
|
|
10
10
|
/**
|
|
11
|
-
* Inserts the provided Markdown as HTML into the editor.
|
|
11
|
+
* Inserts the provided Markdown as HTML into the editor at the current position.
|
|
12
12
|
*
|
|
13
|
-
* @param markdown The Markdown to parse and insert as HTML.
|
|
14
|
-
* @param
|
|
13
|
+
* @param markdown The Markdown content to parse and insert as HTML.
|
|
14
|
+
* @param options An optional object with the following parameters:
|
|
15
|
+
* @param options.parseOptions The parse options to use when the HTML content is parsed by ProseMirror.
|
|
16
|
+
* @param options.updateSelection Whether the selection should move to the newly inserted content.
|
|
15
17
|
*/
|
|
16
|
-
insertMarkdownContent: (markdown: string,
|
|
18
|
+
insertMarkdownContent: (markdown: string, options?: {
|
|
19
|
+
parseOptions?: ParseOptions;
|
|
20
|
+
updateSelection?: boolean;
|
|
21
|
+
}) => ReturnType;
|
|
17
22
|
};
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
25
|
/**
|
|
21
|
-
* Inserts the provided Markdown as HTML into the editor.
|
|
26
|
+
* Inserts the provided Markdown as HTML into the editor at the current position.
|
|
22
27
|
*
|
|
23
|
-
* The solution for this function was inspired how
|
|
24
|
-
*
|
|
28
|
+
* The solution for this function was inspired by how Tiptap inserts content with the
|
|
29
|
+
* `insertContent` command.
|
|
25
30
|
*/
|
|
26
|
-
declare function insertMarkdownContent(markdown: string,
|
|
31
|
+
declare function insertMarkdownContent(markdown: string, options?: {
|
|
32
|
+
parseOptions?: ParseOptions;
|
|
33
|
+
updateSelection?: boolean;
|
|
34
|
+
}): ReturnType<RawCommands['insertMarkdownContent']>;
|
|
27
35
|
export { insertMarkdownContent };
|
|
28
36
|
//# sourceMappingURL=insert-markdown-content.d.ts.map
|
package/dist/extensions/core/extra-editor-commands/commands/insert-markdown-content.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insert-markdown-content.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/core/extra-editor-commands/commands/insert-markdown-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"insert-markdown-content.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/core/extra-editor-commands/commands/insert-markdown-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD;;;GAGG;AACH,OAAO,QAAQ,cAAc,CAAC;IAC1B,UAAU,QAAQ,CAAC,UAAU;QACzB,qBAAqB,EAAE;YACnB;;;;;;;eAOG;YACH,qBAAqB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;gBACN,YAAY,CAAC,EAAE,YAAY,CAAA;gBAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;aAC5B,KACA,UAAU,CAAA;SAClB,CAAA;KACJ;CACJ;AAED;;;;;GAKG;AACH,iBAAS,qBAAqB,CAC1B,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IACN,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC5B,GACF,UAAU,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC,CAQlD;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
|
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
import { DOMParser } from 'prosemirror-model';
|
|
2
|
-
import { parseHtmlToElement } from '../../../../helpers/dom';
|
|
3
|
-
import { getHTMLSerializerInstance } from '../../../../serializers/html/html';
|
|
4
1
|
/**
|
|
5
|
-
* Inserts the provided Markdown as HTML into the editor.
|
|
2
|
+
* Inserts the provided Markdown as HTML into the editor at the current position.
|
|
6
3
|
*
|
|
7
|
-
* The solution for this function was inspired how
|
|
8
|
-
*
|
|
4
|
+
* The solution for this function was inspired by how Tiptap inserts content with the
|
|
5
|
+
* `insertContent` command.
|
|
9
6
|
*/
|
|
10
|
-
function insertMarkdownContent(markdown,
|
|
11
|
-
return ({
|
|
12
|
-
|
|
13
|
-
// ref: https://tiptap.dev/api/commands#dry-run-for-commands
|
|
14
|
-
if (dispatch) {
|
|
15
|
-
const htmlContent = getHTMLSerializerInstance(editor.schema).serialize(markdown);
|
|
16
|
-
// Inserts the HTML content into the editor while preserving the current selection
|
|
17
|
-
tr.replaceSelection(DOMParser.fromSchema(editor.schema).parseSlice(parseHtmlToElement(htmlContent), parseOptions));
|
|
18
|
-
}
|
|
19
|
-
return true;
|
|
7
|
+
function insertMarkdownContent(markdown, options) {
|
|
8
|
+
return ({ commands, tr }) => {
|
|
9
|
+
return commands.insertMarkdownContentAt({ from: tr.selection.from, to: tr.selection.to }, markdown, options);
|
|
20
10
|
};
|
|
21
11
|
}
|
|
22
12
|
export { insertMarkdownContent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extra-editor-commands.d.ts","sourceRoot":"","sources":["../../../../src/extensions/core/extra-editor-commands/extra-editor-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"extra-editor-commands.d.ts","sourceRoot":"","sources":["../../../../src/extensions/core/extra-editor-commands/extra-editor-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAOxC;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,qBAUvB,CAAA;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -2,6 +2,7 @@ import { Extension } from '@tiptap/core';
|
|
|
2
2
|
import { createParagraphEnd } from './commands/create-paragraph-end';
|
|
3
3
|
import { extendWordRange } from './commands/extend-word-range';
|
|
4
4
|
import { insertMarkdownContent } from './commands/insert-markdown-content';
|
|
5
|
+
import { insertMarkdownContentAt } from './commands/insert-markdown-content-at';
|
|
5
6
|
/**
|
|
6
7
|
* The `ExtraEditorCommands` extension is a collection of editor commands that provide additional
|
|
7
8
|
* helper commands not available with the built-in commands. This extension was built similarly to
|
|
@@ -14,6 +15,7 @@ const ExtraEditorCommands = Extension.create({
|
|
|
14
15
|
createParagraphEnd,
|
|
15
16
|
extendWordRange,
|
|
16
17
|
insertMarkdownContent,
|
|
18
|
+
insertMarkdownContentAt,
|
|
17
19
|
};
|
|
18
20
|
},
|
|
19
21
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './constants/extension-priorities';
|
|
|
4
4
|
export * from './extensions/core/extra-editor-commands/commands/create-paragraph-end';
|
|
5
5
|
export * from './extensions/core/extra-editor-commands/commands/extend-word-range';
|
|
6
6
|
export * from './extensions/core/extra-editor-commands/commands/insert-markdown-content';
|
|
7
|
+
export * from './extensions/core/extra-editor-commands/commands/insert-markdown-content-at';
|
|
7
8
|
export { PlainTextKit } from './extensions/plain-text/plain-text-kit';
|
|
8
9
|
export type { RichTextImageAttributes, RichTextImageOptions, } from './extensions/rich-text/rich-text-image';
|
|
9
10
|
export { RichTextKit } from './extensions/rich-text/rich-text-kit';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,WAAW,GACd,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,cAAc,kCAAkC,CAAA;AAChD,cAAc,uEAAuE,CA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O,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAChF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC9D,YAAY,EACR,sBAAsB,EACtB,iBAAiB,IAAI,uBAAuB,GAC/C,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export * from './constants/extension-priorities';
|
|
|
3
3
|
export * from './extensions/core/extra-editor-commands/commands/create-paragraph-end';
|
|
4
4
|
export * from './extensions/core/extra-editor-commands/commands/extend-word-range';
|
|
5
5
|
export * from './extensions/core/extra-editor-commands/commands/insert-markdown-content';
|
|
6
|
+
export * from './extensions/core/extra-editor-commands/commands/insert-markdown-content-at';
|
|
6
7
|
export { PlainTextKit } from './extensions/plain-text/plain-text-kit';
|
|
7
8
|
export { RichTextKit } from './extensions/rich-text/rich-text-kit';
|
|
8
9
|
export { createSuggestionExtension } from './factories/create-suggestion-extension';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/typist",
|
|
3
3
|
"description": "The mighty Tiptap-based rich-text editor React component that powers Doist products.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://typist.doist.dev/",
|
|
7
7
|
"repository": "https://github.com/Doist/typist",
|