@clevertask/scribe 0.1.16 → 0.1.18
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 +14 -1
- package/dist/{BarMenu-x4sf3ECS.js → BarMenu-C9tCdvyV.js} +1 -1
- package/dist/components/Menu/BarMenu.js +1 -1
- package/dist/components/Menu/BubbleMenu.js +2 -2
- package/dist/components/Menu/CalloutBubbleMenu.js +2 -2
- package/dist/components/Menu/LinkBubbleMenu.d.ts.map +1 -1
- package/dist/components/Menu/LinkBubbleMenu.js +2 -2
- package/dist/components/Menu/LinkEditor.d.ts.map +1 -1
- package/dist/components/Menu/Mobile/ListOptionBar.js +1 -1
- package/dist/components/Menu/TableBubbleMenu.js +2 -2
- package/dist/components/Menu/linkBubbleMenuPlugin.js +1 -1
- package/dist/components/Scribe/extension/callout.js +1 -1
- package/dist/components/Scribe/extension/emoji/suggest.js +1 -1
- package/dist/components/Scribe/extension/extension-link.js +1 -1
- package/dist/components/Scribe/extension/extension-markdown-paste.js +2 -2
- package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/commands.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/index.js +2 -2
- package/dist/components/Scribe/extension/external-link-preview/node-view.js +1 -1
- package/dist/components/Scribe/extension/external-link-preview/render-html.js +1 -1
- package/dist/components/Scribe/extension/index.d.ts.map +1 -1
- package/dist/components/Scribe/extension/index.js +1 -1
- package/dist/components/Scribe/extension/resizable-table.js +1 -1
- package/dist/components/Scribe/extension/slashCommand/index.js +1 -1
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +1 -1
- package/dist/components/Scribe/extension/tableOfContents.js +1 -1
- package/dist/components/Scribe/index.d.ts +8 -0
- package/dist/components/Scribe/index.d.ts.map +1 -1
- package/dist/components/Scribe/index.js +4 -4
- package/dist/{dist-tNcpTcFT.js → dist-CkWsQ5Lj.js} +197 -185
- package/dist/{dist-DDjaA1Pn.js → dist-DRPH9MfF.js} +1 -1
- package/dist/{extension-dRUfQQo6.js → extension-DOo9QT6U.js} +1169 -1160
- package/dist/{extension-link-RYtPpHwt.js → extension-link-yMrg9JOz.js} +2 -2
- package/dist/{html-to-markdown-nbQ6qHyO.js → html-to-markdown-CnlA8pb8.js} +1 -1
- package/dist/main.js +2 -2
- package/dist/{markdown-to-html-B-KKCZRs.js → markdown-to-html-BLzYd3Fu.js} +10 -11
- package/dist/{menus-U2HdvQnu.js → menus-Dy2dj4QT.js} +5 -5
- package/dist/purify.es-DGv0-Lid.js +805 -0
- package/dist/{resizable-table-m0AzovsZ.js → resizable-table-D0mls3aB.js} +2 -2
- package/dist/{slashCommand-CtvgnL0Z.js → slashCommand-D35jcSNp.js} +2 -2
- package/dist/utils/create-scribe-editor.d.ts +6 -1
- package/dist/utils/create-scribe-editor.d.ts.map +1 -1
- package/dist/utils/html-to-markdown.js +1 -1
- package/dist/utils/index.js +10 -7
- package/dist/utils/markdown-to-html.js +1 -1
- package/package.json +51 -51
- package/dist/purify.es-BES4pJF7.js +0 -774
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { L as e, _ as t, a as n, l as r, m as i, n as a } from "./dist-
|
|
1
|
+
import { L as e, _ as t, a as n, l as r, m as i, n as a } from "./dist-CkWsQ5Lj.js";
|
|
2
2
|
import { TextSelection as o } from "@tiptap/pm/state";
|
|
3
3
|
import { CellSelection as s, addColumnAfter as c, addColumnBefore as l, addRowAfter as u, addRowBefore as d, columnResizing as f, columnResizingPluginKey as p, deleteColumn as m, deleteRow as h, deleteTable as g, fixTables as _, goToNextCell as v, mergeCells as y, setCellAttr as b, splitCell as x, tableEditing as S, toggleHeader as C, toggleHeaderCell as w } from "@tiptap/pm/tables";
|
|
4
|
-
//#region node_modules/.pnpm/@tiptap+extension-table@3.30.
|
|
4
|
+
//#region node_modules/.pnpm/@tiptap+extension-table@3.30.2_@tiptap+core@3.30.2_@tiptap+pm@3.30.2__@tiptap+pm@3.30.2/node_modules/@tiptap/extension-table/dist/index.js
|
|
5
5
|
function T(e) {
|
|
6
6
|
return e === "left" || e === "right" || e === "center" ? e : null;
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as e, n as t } from "./dist-
|
|
1
|
+
import { f as e, n as t } from "./dist-CkWsQ5Lj.js";
|
|
2
2
|
import { a as n, c as r, i, r as a } from "./floating-ui.dom-CmJ6iBdh.js";
|
|
3
3
|
import { Plugin as o, PluginKey as s } from "@tiptap/pm/state";
|
|
4
4
|
import { Decoration as c, DecorationSet as l } from "@tiptap/pm/view";
|
|
5
|
-
//#region node_modules/.pnpm/@tiptap+suggestion@3.30.
|
|
5
|
+
//#region node_modules/.pnpm/@tiptap+suggestion@3.30.2_@floating-ui+dom@1.8.0_@tiptap+core@3.30.2_@tiptap+pm@3.30.2__@tiptap+pm@3.30.2/node_modules/@tiptap/suggestion/dist/index.js
|
|
6
6
|
function u(t) {
|
|
7
7
|
let { char: n, allowSpaces: r, allowToIncludeChar: i, allowedPrefixes: a, startOfLine: o, $position: s } = t, c = r && !i, l = e(n), u = RegExp(`\\s${l}$`), d = o ? "^" : "", f = i ? "" : l, p = RegExp(c ? `${d}${l}.*?(?=\\s${f}|$)` : `${d}(?:^)?${l}[^\\s${f}]*`, "gm"), m = s.nodeBefore?.isText && s.nodeBefore.text;
|
|
8
8
|
if (!m) return null;
|
|
@@ -3,6 +3,11 @@ import type { ExternalLinkPreviewOptions } from "../components/Scribe/extension/
|
|
|
3
3
|
export type CreateEditorOptions = {
|
|
4
4
|
content?: string;
|
|
5
5
|
editable?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Enables Scribe's built-in undo and redo history. Disable this when another
|
|
8
|
+
* extension owns history for the editor.
|
|
9
|
+
*/
|
|
10
|
+
enableUndoRedo?: boolean;
|
|
6
11
|
/** @experimental The link-preview API and built-in UI may change while this feature is tested. */
|
|
7
12
|
externalLinkPreview?: Partial<ExternalLinkPreviewOptions>;
|
|
8
13
|
onContentChange?: (content: {
|
|
@@ -11,5 +16,5 @@ export type CreateEditorOptions = {
|
|
|
11
16
|
markdownContent: string;
|
|
12
17
|
}) => void;
|
|
13
18
|
};
|
|
14
|
-
export declare function createScribeEditor({ content, editable, externalLinkPreview, onContentChange, }: CreateEditorOptions): Editor;
|
|
19
|
+
export declare function createScribeEditor({ content, editable, enableUndoRedo, externalLinkPreview, onContentChange, }: CreateEditorOptions): Editor;
|
|
15
20
|
//# sourceMappingURL=create-scribe-editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-scribe-editor.d.ts","sourceRoot":"","sources":["../../lib/utils/create-scribe-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;AAEvG,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kGAAkG;IAClG,mBAAmB,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC1D,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE;QAC1B,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,WAAW,CAAC;QACzB,eAAe,EAAE,MAAM,CAAC;KACzB,KAAK,IAAI,CAAC;CACZ,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,OAAY,EACZ,QAAgB,EAChB,mBAAmB,EACnB,eAAe,GAChB,EAAE,mBAAmB,GAAG,MAAM,CAoB9B"}
|
|
1
|
+
{"version":3,"file":"create-scribe-editor.d.ts","sourceRoot":"","sources":["../../lib/utils/create-scribe-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;AAEvG,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kGAAkG;IAClG,mBAAmB,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC1D,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE;QAC1B,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,WAAW,CAAC;QACzB,eAAe,EAAE,MAAM,CAAC;KACzB,KAAK,IAAI,CAAC;CACZ,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,OAAY,EACZ,QAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,eAAe,GAChB,EAAE,mBAAmB,GAAG,MAAM,CAoB9B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../html-to-markdown-
|
|
1
|
+
import { t as e } from "../html-to-markdown-CnlA8pb8.js";
|
|
2
2
|
export { e as html2md };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { t as e } from "../dist-
|
|
2
|
-
import { t } from "../html-to-markdown-
|
|
3
|
-
import { t as n } from "../markdown-to-html-
|
|
1
|
+
import { t as e } from "../dist-CkWsQ5Lj.js";
|
|
2
|
+
import { t } from "../html-to-markdown-CnlA8pb8.js";
|
|
3
|
+
import { t as n } from "../markdown-to-html-BLzYd3Fu.js";
|
|
4
4
|
import { isInViewport as r } from "./is-in-viewport.js";
|
|
5
5
|
import { convertLegacyMathDelimiters as i } from "./convert-legacy-math-delimiters.js";
|
|
6
|
-
import { t as a } from "../extension-
|
|
6
|
+
import { t as a } from "../extension-DOo9QT6U.js";
|
|
7
7
|
//#region lib/utils/create-scribe-editor.ts
|
|
8
|
-
function o({ content: n = "", editable: r = !1,
|
|
8
|
+
function o({ content: n = "", editable: r = !1, enableUndoRedo: i, externalLinkPreview: o, onContentChange: s }) {
|
|
9
9
|
return new e({
|
|
10
10
|
content: n,
|
|
11
11
|
editable: r,
|
|
12
|
-
extensions: a({
|
|
12
|
+
extensions: a({
|
|
13
|
+
enableUndoRedo: i,
|
|
14
|
+
externalLinkPreview: o
|
|
15
|
+
}),
|
|
13
16
|
onUpdate({ editor: e }) {
|
|
14
|
-
|
|
17
|
+
s && s({
|
|
15
18
|
htmlContent: e.getHTML(),
|
|
16
19
|
jsonContent: e.getJSON(),
|
|
17
20
|
markdownContent: t(e.getHTML())
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../markdown-to-html-
|
|
1
|
+
import { t as e } from "../markdown-to-html-BLzYd3Fu.js";
|
|
2
2
|
export { e as md2html };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clevertask/scribe",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Radix-based Tiptap 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.",
|
|
6
6
|
"keywords": [
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
"registry": "https://registry.npmjs.org/"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@tiptap/core": "3.30.
|
|
49
|
-
"@tiptap/extension-bubble-menu": "3.30.
|
|
50
|
-
"@tiptap/extension-floating-menu": "3.30.
|
|
51
|
-
"@tiptap/react": "3.30.
|
|
52
|
-
"@tiptap/suggestion": "3.30.
|
|
48
|
+
"@tiptap/core": "3.30.2",
|
|
49
|
+
"@tiptap/extension-bubble-menu": "3.30.2",
|
|
50
|
+
"@tiptap/extension-floating-menu": "3.30.2",
|
|
51
|
+
"@tiptap/react": "3.30.2",
|
|
52
|
+
"@tiptap/suggestion": "3.30.2",
|
|
53
53
|
"clsx": "^2.1.1",
|
|
54
|
-
"dompurify": "^3.4.
|
|
54
|
+
"dompurify": "^3.4.14",
|
|
55
55
|
"katex": "^0.18.4",
|
|
56
|
-
"marked": "^18.0.
|
|
56
|
+
"marked": "^18.0.10",
|
|
57
57
|
"tippy.js": "^6.3.7",
|
|
58
58
|
"turndown": "^7.2.4"
|
|
59
59
|
},
|
|
@@ -63,62 +63,62 @@
|
|
|
63
63
|
"@testing-library/dom": "^10.4.1",
|
|
64
64
|
"@testing-library/jest-dom": "^7.0.1",
|
|
65
65
|
"@testing-library/react": "^16.3.2",
|
|
66
|
-
"@tiptap/extension-blockquote": "3.30.
|
|
67
|
-
"@tiptap/extension-bold": "3.30.
|
|
68
|
-
"@tiptap/extension-bullet-list": "3.30.
|
|
69
|
-
"@tiptap/extension-code": "3.30.
|
|
70
|
-
"@tiptap/extension-code-block": "3.30.
|
|
71
|
-
"@tiptap/extension-document": "3.30.
|
|
72
|
-
"@tiptap/extension-dropcursor": "3.30.
|
|
73
|
-
"@tiptap/extension-emoji": "3.30.
|
|
74
|
-
"@tiptap/extension-focus": "3.30.
|
|
75
|
-
"@tiptap/extension-gapcursor": "3.30.
|
|
76
|
-
"@tiptap/extension-hard-break": "3.30.
|
|
77
|
-
"@tiptap/extension-heading": "3.30.
|
|
78
|
-
"@tiptap/extension-highlight": "3.30.
|
|
79
|
-
"@tiptap/extension-horizontal-rule": "3.30.
|
|
80
|
-
"@tiptap/extension-image": "3.30.
|
|
81
|
-
"@tiptap/extension-italic": "3.30.
|
|
82
|
-
"@tiptap/extension-link": "3.30.
|
|
83
|
-
"@tiptap/extension-list": "3.30.
|
|
84
|
-
"@tiptap/extension-list-item": "3.30.
|
|
85
|
-
"@tiptap/extension-list-keymap": "3.30.
|
|
86
|
-
"@tiptap/extension-mathematics": "3.30.
|
|
87
|
-
"@tiptap/extension-ordered-list": "3.30.
|
|
88
|
-
"@tiptap/extension-paragraph": "3.30.
|
|
89
|
-
"@tiptap/extension-placeholder": "3.30.
|
|
90
|
-
"@tiptap/extension-strike": "3.30.
|
|
91
|
-
"@tiptap/extension-table": "3.30.
|
|
92
|
-
"@tiptap/extension-table-cell": "3.30.
|
|
93
|
-
"@tiptap/extension-table-header": "3.30.
|
|
94
|
-
"@tiptap/extension-table-row": "3.30.
|
|
95
|
-
"@tiptap/extension-task-item": "3.30.
|
|
96
|
-
"@tiptap/extension-task-list": "3.30.
|
|
97
|
-
"@tiptap/extension-text": "3.30.
|
|
98
|
-
"@tiptap/extension-typography": "3.30.
|
|
99
|
-
"@tiptap/extension-underline": "3.30.
|
|
100
|
-
"@tiptap/extensions": "3.30.
|
|
101
|
-
"@tiptap/pm": "3.30.
|
|
102
|
-
"@tiptap/starter-kit": "3.30.
|
|
66
|
+
"@tiptap/extension-blockquote": "3.30.2",
|
|
67
|
+
"@tiptap/extension-bold": "3.30.2",
|
|
68
|
+
"@tiptap/extension-bullet-list": "3.30.2",
|
|
69
|
+
"@tiptap/extension-code": "3.30.2",
|
|
70
|
+
"@tiptap/extension-code-block": "3.30.2",
|
|
71
|
+
"@tiptap/extension-document": "3.30.2",
|
|
72
|
+
"@tiptap/extension-dropcursor": "3.30.2",
|
|
73
|
+
"@tiptap/extension-emoji": "3.30.2",
|
|
74
|
+
"@tiptap/extension-focus": "3.30.2",
|
|
75
|
+
"@tiptap/extension-gapcursor": "3.30.2",
|
|
76
|
+
"@tiptap/extension-hard-break": "3.30.2",
|
|
77
|
+
"@tiptap/extension-heading": "3.30.2",
|
|
78
|
+
"@tiptap/extension-highlight": "3.30.2",
|
|
79
|
+
"@tiptap/extension-horizontal-rule": "3.30.2",
|
|
80
|
+
"@tiptap/extension-image": "3.30.2",
|
|
81
|
+
"@tiptap/extension-italic": "3.30.2",
|
|
82
|
+
"@tiptap/extension-link": "3.30.2",
|
|
83
|
+
"@tiptap/extension-list": "3.30.2",
|
|
84
|
+
"@tiptap/extension-list-item": "3.30.2",
|
|
85
|
+
"@tiptap/extension-list-keymap": "3.30.2",
|
|
86
|
+
"@tiptap/extension-mathematics": "3.30.2",
|
|
87
|
+
"@tiptap/extension-ordered-list": "3.30.2",
|
|
88
|
+
"@tiptap/extension-paragraph": "3.30.2",
|
|
89
|
+
"@tiptap/extension-placeholder": "3.30.2",
|
|
90
|
+
"@tiptap/extension-strike": "3.30.2",
|
|
91
|
+
"@tiptap/extension-table": "3.30.2",
|
|
92
|
+
"@tiptap/extension-table-cell": "3.30.2",
|
|
93
|
+
"@tiptap/extension-table-header": "3.30.2",
|
|
94
|
+
"@tiptap/extension-table-row": "3.30.2",
|
|
95
|
+
"@tiptap/extension-task-item": "3.30.2",
|
|
96
|
+
"@tiptap/extension-task-list": "3.30.2",
|
|
97
|
+
"@tiptap/extension-text": "3.30.2",
|
|
98
|
+
"@tiptap/extension-typography": "3.30.2",
|
|
99
|
+
"@tiptap/extension-underline": "3.30.2",
|
|
100
|
+
"@tiptap/extensions": "3.30.2",
|
|
101
|
+
"@tiptap/pm": "3.30.2",
|
|
102
|
+
"@tiptap/starter-kit": "3.30.2",
|
|
103
103
|
"@types/lodash": "^4.17.25",
|
|
104
104
|
"@types/node": "^24.13.3",
|
|
105
105
|
"@types/react": "^19.2.18",
|
|
106
106
|
"@types/react-dom": "^19.2.4",
|
|
107
107
|
"@types/turndown": "^5.0.6",
|
|
108
|
-
"@vitejs/plugin-react": "^6.0
|
|
108
|
+
"@vitejs/plugin-react": "^6.1.0",
|
|
109
109
|
"glob": "^13.0.6",
|
|
110
110
|
"jsdom": "^30.0.1",
|
|
111
111
|
"lodash": "^4.18.1",
|
|
112
|
-
"oxfmt": "^0.
|
|
113
|
-
"oxlint": "^1.
|
|
112
|
+
"oxfmt": "^0.64.0",
|
|
113
|
+
"oxlint": "^1.79.0",
|
|
114
114
|
"typescript": "~7.0.2",
|
|
115
|
-
"vite": "^8.2.
|
|
115
|
+
"vite": "^8.2.2",
|
|
116
116
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
117
|
-
"vitest": "^4.1.
|
|
117
|
+
"vitest": "^4.1.11"
|
|
118
118
|
},
|
|
119
119
|
"peerDependencies": {
|
|
120
120
|
"@radix-ui/themes": ">=3.3.0",
|
|
121
|
-
"@tiptap/pm": "3.30.
|
|
121
|
+
"@tiptap/pm": "3.30.2",
|
|
122
122
|
"react": ">=18.3.1 <20.0.0",
|
|
123
123
|
"react-dom": ">=18.3.1 <20.0.0"
|
|
124
124
|
},
|