@clevertask/scribe 0.0.7 → 0.0.8
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/dist/{browser-Ce149ePN.js → browser-DEobZXxB.js} +48 -48
- package/dist/components/Menu/BubbleMenu.js +1 -1
- package/dist/components/Scribe/extension/extension-link.js +1 -1
- package/dist/components/Scribe/extension/extension-selectedText.js +4 -4
- package/dist/components/Scribe/extension/index.js +28 -3853
- package/dist/components/Scribe/extension/math-extension.js +1 -1
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +7 -3
- package/dist/components/Scribe/extension/slashCommand/index.js +1 -1
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +2 -2
- package/dist/components/Scribe/index.d.ts +4 -2
- package/dist/components/Scribe/index.js +62 -60
- package/dist/index-C3_lI_rP.js +2269 -0
- package/dist/{index-o3ZWOEgq.js → index-Gm-3o3nq.js} +25 -25
- package/dist/index-NRgJVTH-.js +7576 -0
- package/dist/main.js +8 -6
- package/dist/utils/create-scribe-editor.d.ts +11 -0
- package/dist/utils/create-scribe-editor.js +26 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +6 -4
- package/dist/utils/markdown-to-html.js +1 -1
- package/package.json +1 -1
- package/dist/SlashCommandList-DLPd43Tg.js +0 -3733
- package/dist/index-dyNx8_Ul.js +0 -2509
package/dist/main.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { Scribe as
|
|
2
|
-
import { html2md as
|
|
1
|
+
import { Scribe as e } from "./components/Scribe/index.js";
|
|
2
|
+
import { html2md as m } from "./utils/html-to-markdown.js";
|
|
3
3
|
import { md2html as f } from "./utils/markdown-to-html.js";
|
|
4
|
-
import { isInViewport as
|
|
4
|
+
import { isInViewport as x } from "./utils/is-in-viewport.js";
|
|
5
|
+
import { createScribeEditor as d } from "./utils/create-scribe-editor.js";
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
e as Scribe,
|
|
8
|
+
d as createScribeEditor,
|
|
9
|
+
m as html2md,
|
|
10
|
+
x as isInViewport,
|
|
9
11
|
f as md2html
|
|
10
12
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
export type CreateEditorOptions = {
|
|
3
|
+
content?: string;
|
|
4
|
+
editable?: boolean;
|
|
5
|
+
onContentChange?: (content: {
|
|
6
|
+
htmlContent: string;
|
|
7
|
+
jsonContent: any;
|
|
8
|
+
markdownContent: string;
|
|
9
|
+
}) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function createScribeEditor({ content, editable, onContentChange }: CreateEditorOptions): Editor;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { E as i } from "../index-Gm-3o3nq.js";
|
|
2
|
+
import { initExtensions as n } from "../components/Scribe/extension/index.js";
|
|
3
|
+
import { html2md as s } from "./html-to-markdown.js";
|
|
4
|
+
import "../browser-DEobZXxB.js";
|
|
5
|
+
function c({ content: r = "", editable: e = !1, onContentChange: o }) {
|
|
6
|
+
return new i({
|
|
7
|
+
content: r,
|
|
8
|
+
editable: e,
|
|
9
|
+
extensions: n({}),
|
|
10
|
+
onUpdate({ editor: t }) {
|
|
11
|
+
o && o({
|
|
12
|
+
htmlContent: t.getHTML(),
|
|
13
|
+
jsonContent: t.getJSON(),
|
|
14
|
+
markdownContent: s(t.getHTML())
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
editorProps: {
|
|
18
|
+
attributes: {
|
|
19
|
+
class: "scribe"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
c as createScribeEditor
|
|
26
|
+
};
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { html2md as
|
|
2
|
-
import { md2html as
|
|
1
|
+
import { html2md as t } from "./html-to-markdown.js";
|
|
2
|
+
import { md2html as m } from "./markdown-to-html.js";
|
|
3
3
|
import { isInViewport as f } from "./is-in-viewport.js";
|
|
4
|
+
import { createScribeEditor as x } from "./create-scribe-editor.js";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
x as createScribeEditor,
|
|
7
|
+
t as html2md,
|
|
6
8
|
f as isInViewport,
|
|
7
|
-
|
|
9
|
+
m as md2html
|
|
8
10
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "A Tiptap-based rich text editor with a Notion-style block interface for viewing and creating content. Perfect for diverse needs like notes, documents, AI chat, Markdown parsing, and comments.",
|
|
4
4
|
"author": "CleverTask",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.8",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/main.js",
|
|
9
9
|
"types": "dist/main.d.ts",
|