@clevertask/scribe 0.0.15 → 0.1.1
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 +77 -27
- package/dist/BarMenu-DaKIz3zZ.js +327 -0
- package/dist/assets/index.css +1 -1
- package/dist/components/Menu/BarMenu.d.ts +0 -1
- package/dist/components/Menu/BarMenu.d.ts.map +1 -1
- package/dist/components/Menu/BarMenu.js +8 -140
- package/dist/components/Menu/BubbleMenu.d.ts.map +1 -1
- package/dist/components/Menu/BubbleMenu.js +2074 -159
- package/dist/components/Menu/Mobile/ListOptionBar.d.ts.map +1 -1
- package/dist/components/Menu/Mobile/ListOptionBar.js +42 -22
- package/dist/components/Scribe/extension/emoji/EmojiList.d.ts +19 -1
- package/dist/components/Scribe/extension/emoji/EmojiList.d.ts.map +1 -1
- package/dist/components/Scribe/extension/emoji/EmojiList.js +42 -42
- package/dist/components/Scribe/extension/emoji/suggest.d.ts +2 -4
- package/dist/components/Scribe/extension/emoji/suggest.d.ts.map +1 -1
- package/dist/components/Scribe/extension/emoji/suggest.js +20 -15
- package/dist/components/Scribe/extension/extension-link.js +2 -984
- package/dist/components/Scribe/extension/extension-markdown-paste.js +4 -4
- package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
- package/dist/components/Scribe/extension/getPopupMountTarget.d.ts +3 -0
- package/dist/components/Scribe/extension/getPopupMountTarget.d.ts.map +1 -0
- package/dist/components/Scribe/extension/getPopupMountTarget.js +16 -0
- package/dist/components/Scribe/extension/index.d.ts +16 -2
- package/dist/components/Scribe/extension/index.d.ts.map +1 -1
- package/dist/components/Scribe/extension/index.js +37122 -34
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.d.ts +4 -1
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.d.ts.map +1 -1
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +3730 -14
- package/dist/components/Scribe/extension/slashCommand/index.js +2 -2
- package/dist/components/Scribe/extension/slashCommand/renderItems.d.ts +1 -1
- package/dist/components/Scribe/extension/slashCommand/renderItems.d.ts.map +1 -1
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +21 -16
- package/dist/components/Scribe/extension/tableOfContents.d.ts +48 -0
- package/dist/components/Scribe/extension/tableOfContents.d.ts.map +1 -0
- package/dist/components/Scribe/extension/tableOfContents.js +180 -0
- package/dist/components/Scribe/index.d.ts +12 -1
- package/dist/components/Scribe/index.d.ts.map +1 -1
- package/dist/components/Scribe/index.js +133 -87
- package/dist/extension-link-Ch_T7WWG.js +1030 -0
- package/dist/icons/ToolbarIcons.d.ts +19 -0
- package/dist/icons/ToolbarIcons.d.ts.map +1 -0
- package/dist/icons/ToolbarIcons.js +135 -0
- package/dist/{index-BKFDqQPh.js → index-BiBV5TQx.js} +6598 -5432
- package/dist/index-CqzMmrnw.js +1410 -0
- package/dist/index-DxF-1P4n.js +834 -0
- package/dist/index-V-gN11Y9.js +249 -0
- package/dist/main.css +200 -1123
- package/dist/main.js +1 -1
- package/dist/markdown-to-html-pL7ckd-m.js +1135 -0
- package/dist/purify.es-exIQuqhb.js +595 -0
- package/dist/tippy.esm-DLHdsnfG.js +1711 -0
- package/dist/utils/create-scribe-editor.d.ts +2 -2
- package/dist/utils/create-scribe-editor.d.ts.map +1 -1
- package/dist/utils/create-scribe-editor.js +3 -3
- package/dist/utils/html-to-markdown.d.ts.map +1 -1
- package/dist/utils/html-to-markdown.js +583 -18
- package/dist/utils/index.js +1 -1
- package/dist/utils/markdown-to-html.js +2 -2
- package/package.json +34 -37
- package/dist/clsx-OuTLNxxd.js +0 -16
- package/dist/index-CL2WLiGu.js +0 -159
- package/dist/index-Cxf4VEm1.js +0 -50957
- package/dist/index-PzbCrHp0.js +0 -2349
- package/dist/markdown-to-html-__93dwok.js +0 -1557
- package/dist/purify.es-BPDBzHtc.js +0 -552
- package/dist/turndown.browser.es-RmA_HBaI.js +0 -649
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { P as d, a as u, b as f } from "../../../index-
|
|
2
|
-
import { m,
|
|
1
|
+
import { P as d, a as u, b as f } from "../../../index-BiBV5TQx.js";
|
|
2
|
+
import { m as h, g as m } from "../../../markdown-to-html-pL7ckd-m.js";
|
|
3
3
|
const p = new d("markdownPaste"), k = /* @__PURE__ */ new Set(["blockquote", "code", "heading", "hr", "list", "table"]), y = /* @__PURE__ */ new Set(["codespan", "del", "em", "strong"]), T = (e) => e.type === "image" ? e.raw.startsWith("![") : e.type === "link" ? e.raw.startsWith("[") : !1, i = (e) => e.some((t) => k.has(t.type) || y.has(t.type) || T(t) || "tokens" in t && Array.isArray(t.tokens) && i(t.tokens) ? !0 : "items" in t && Array.isArray(t.items) ? t.items.some((s) => i(s.tokens)) : !1), b = (e) => {
|
|
4
4
|
const t = e.trim();
|
|
5
|
-
return t ? i(
|
|
5
|
+
return t ? i(m.lexer(t)) : !1;
|
|
6
6
|
}, w = (e) => {
|
|
7
7
|
const t = e.firstElementChild;
|
|
8
8
|
return !(t instanceof HTMLInputElement) || t.type !== "checkbox" ? null : t;
|
|
@@ -34,7 +34,7 @@ const p = new d("markdownPaste"), k = /* @__PURE__ */ new Set(["blockquote", "co
|
|
|
34
34
|
props: {
|
|
35
35
|
handlePaste: (e, t) => {
|
|
36
36
|
const s = t.clipboardData?.getData("text/html"), n = t.clipboardData?.getData("text/plain");
|
|
37
|
-
return !n || s || !b(n) ? !1 : (t.preventDefault(), this.editor.chain().focus().insertContent(x(
|
|
37
|
+
return !n || s || !b(n) ? !1 : (t.preventDefault(), this.editor.chain().focus().insertContent(x(h(n))).run(), !0);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPopupMountTarget.d.ts","sourceRoot":"","sources":["../../../../lib/components/Scribe/extension/getPopupMountTarget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAQvC,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,KAAG,WA4BpD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const c = "[data-scribe-root]", i = "[data-scribe-popup-root]", E = ".rt-BaseDialogContent", a = ".rt-BaseDialogOverlay", l = ".radix-themes", R = (r) => {
|
|
2
|
+
const t = r.view.dom, e = t?.closest(c)?.querySelector(i);
|
|
3
|
+
if (e instanceof HTMLElement)
|
|
4
|
+
return e;
|
|
5
|
+
const o = t?.closest(E);
|
|
6
|
+
if (o instanceof HTMLElement)
|
|
7
|
+
return o;
|
|
8
|
+
const n = t?.closest(a);
|
|
9
|
+
if (n instanceof HTMLElement)
|
|
10
|
+
return n;
|
|
11
|
+
const s = t?.closest(l);
|
|
12
|
+
return s instanceof HTMLElement ? s : t?.ownerDocument?.body ?? document.body;
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
R as getPopupMountTarget
|
|
16
|
+
};
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
import { ScribeProps } from "..";
|
|
2
|
-
export declare const initExtensions: (props: ScribeProps) => (import("@tiptap/core").Mark<import("@tiptap/extension-link").LinkOptions, any> | import("@tiptap/core").Extension<any, any> | import("@tiptap/core").
|
|
1
|
+
import type { ScribeProps } from "..";
|
|
2
|
+
export declare const initExtensions: (props: ScribeProps) => (import("@tiptap/core").Mark<import("@tiptap/extension-link").LinkOptions, any> | import("@tiptap/core").Extension<any, any> | import("@tiptap/core").Extension<{
|
|
3
|
+
anchorTypes: string[];
|
|
4
|
+
onUpdate?: import("./tableOfContents").ScribeTableOfContentsChangeHandler;
|
|
5
|
+
}, {
|
|
6
|
+
anchors: HTMLElement[];
|
|
7
|
+
content: import("./tableOfContents").ScribeTableOfContentsItem[];
|
|
8
|
+
hasCreated: boolean;
|
|
9
|
+
lastSignature: string;
|
|
10
|
+
rafId: number | null;
|
|
11
|
+
refresh: () => void;
|
|
12
|
+
scheduleRefresh: () => void;
|
|
13
|
+
scrollHandler: () => void;
|
|
14
|
+
scrollParent: (HTMLElement | Window) | null;
|
|
15
|
+
updateScrollParent: () => void;
|
|
16
|
+
}> | import("@tiptap/core").Extension<import("@tiptap/starter-kit").StarterKitOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-task-list").TaskListOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-task-item").TaskItemOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-table").TableKitOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-placeholder").PlaceholderOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-focus").FocusOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-highlight").HighlightOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-image").ImageOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-emoji").EmojiOptions, import("@tiptap/extension-emoji").EmojiStorage> | import("@tiptap/core").Extension<import("@tiptap/extension-mathematics").MathematicsOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-typography").TypographyOptions, any>)[];
|
|
3
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/Scribe/extension/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/Scribe/extension/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAqBtC,eAAO,MAAM,cAAc,GAAI,OAAO,WAAW;;;;;;;;;;;;;;2hCAmEhD,CAAC"}
|