@clevertask/scribe 0.1.9 → 0.1.10

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 (27) hide show
  1. package/README.md +10 -9
  2. package/dist/{BarMenu-BG_w4DVo.js → BarMenu-5S2vKAtc.js} +1 -1
  3. package/dist/components/Menu/BarMenu.js +1 -1
  4. package/dist/components/Menu/BubbleMenu.js +2 -2
  5. package/dist/components/Menu/LinkBubbleMenu.js +2 -2
  6. package/dist/components/Menu/Mobile/ListOptionBar.js +1 -1
  7. package/dist/components/Menu/linkBubbleMenuPlugin.js +1 -1
  8. package/dist/components/Scribe/extension/emoji/suggest.js +1 -1
  9. package/dist/components/Scribe/extension/extension-link.js +1 -1
  10. package/dist/components/Scribe/extension/extension-markdown-paste.js +11 -11
  11. package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
  12. package/dist/components/Scribe/extension/index.js +1 -1
  13. package/dist/components/Scribe/extension/slashCommand/index.js +1 -1
  14. package/dist/components/Scribe/extension/slashCommand/renderItems.js +1 -1
  15. package/dist/components/Scribe/extension/tableOfContents.js +4 -4
  16. package/dist/components/Scribe/index.js +3 -3
  17. package/dist/dist-DErUltkU.js +3245 -0
  18. package/dist/{dist-BgEySLwo.js → dist-wYqYXEOz.js} +1 -1
  19. package/dist/{extension-BVGWENts.js → extension-6I5t1ZxQ.js} +1744 -2294
  20. package/dist/{extension-link-CMRfHUc5.js → extension-link-DJy7XDoj.js} +62 -62
  21. package/dist/{menus-D9OsP28c.js → menus-m_EkiaUN.js} +66 -66
  22. package/dist/{slashCommand-B6Iz1i0d.js → slashCommand-DuSH9sXJ.js} +46 -45
  23. package/dist/utils/index.js +2 -2
  24. package/package.json +3 -2
  25. package/dist/dist-BMKyBtRa.js +0 -7023
  26. package/dist/dist-FrapLVQu.js +0 -3513
  27. package/dist/tables-CXpUVKdw.js +0 -1347
package/README.md CHANGED
@@ -34,9 +34,12 @@ A versatile, block-based rich text editor for diverse applications, built with T
34
34
  ## Installation
35
35
 
36
36
  ```bash
37
- npm install @clevertask/scribe
37
+ npm install --save-exact @clevertask/scribe @tiptap/pm@3.29.2
38
38
  ```
39
39
 
40
+ Scribe shares this exact ProseMirror runtime with consumer extensions. Keeping one
41
+ installed version prevents identity conflicts between built-in and custom plugins.
42
+
40
43
  ## Usage
41
44
 
42
45
  ### Basic usage
@@ -297,15 +300,13 @@ We're excited about these upcoming features and welcome any feedback or contribu
297
300
 
298
301
  ## Release Process
299
302
 
300
- This package is automatically published to npm when a new release is created on GitHub. To create a new release:
301
-
302
- 1. Update the version in `package.json` according to semantic versioning rules.
303
- 2. Commit the version change: `git commit -am "Bump version to x.x.x"`
304
- 3. Create a new tag: `git tag x.x.x`
305
- 4. Push the changes and the tag: `git push && git push --tags`
306
- 5. Go to the GitHub repository and create a new release, selecting the tag you just created.
303
+ Publishing is split into two explicit GitHub Actions after a change reaches `main`:
307
304
 
308
- The GitHub Action will automatically build, test, and publish the new version to npm.
305
+ 1. Run **Create Release Version** from `main` and enter the version to release.
306
+ 2. Wait for it to commit the version, create the tag, and create the GitHub release.
307
+ 3. Run **Publish Package** from the immutable `v<version>` tag and choose the `latest` or
308
+ `next` npm tag.
309
+ 4. Confirm the new version is available in the npm registry before updating consumers.
309
310
 
310
311
  ## License
311
312
 
@@ -1,4 +1,4 @@
1
- import { a as e } from "./dist-BgEySLwo.js";
1
+ import { a as e } from "./dist-wYqYXEOz.js";
2
2
  import { getPopupMountTarget as t } from "./components/Scribe/extension/getPopupMountTarget.js";
3
3
  import n from "./components/Menu/LinkEditor.js";
4
4
  import { hideLinkBubbleMenu as r } from "./components/Menu/linkBubbleMenuPlugin.js";
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../BarMenu-BG_w4DVo.js";
1
+ import { t as e } from "../../BarMenu-5S2vKAtc.js";
2
2
  export { e as default };
@@ -1,6 +1,6 @@
1
- import { a as e } from "../../dist-BgEySLwo.js";
1
+ import { a as e } from "../../dist-wYqYXEOz.js";
2
2
  import { getPopupMountTarget as t } from "../Scribe/extension/getPopupMountTarget.js";
3
- import { t as n } from "../../menus-D9OsP28c.js";
3
+ import { t as n } from "../../menus-m_EkiaUN.js";
4
4
  import { Flex as r, IconButton as i } from "@radix-ui/themes";
5
5
  import { useCallback as a } from "react";
6
6
  import { jsx as o } from "react/jsx-runtime";
@@ -1,8 +1,8 @@
1
- import { a as e } from "../../dist-BgEySLwo.js";
1
+ import { a as e } from "../../dist-wYqYXEOz.js";
2
2
  import { getPopupMountTarget as t } from "../Scribe/extension/getPopupMountTarget.js";
3
3
  import n from "./LinkEditor.js";
4
4
  import { hideLinkBubbleMenu as r, linkBubbleMenuPluginKey as i, showLinkBubbleMenu as a } from "./linkBubbleMenuPlugin.js";
5
- import { t as o } from "../../menus-D9OsP28c.js";
5
+ import { t as o } from "../../menus-m_EkiaUN.js";
6
6
  import { Box as s } from "@radix-ui/themes";
7
7
  import { useCallback as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
8
8
  import { jsx as p } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { a as e } from "../../../dist-BgEySLwo.js";
1
+ import { a as e } from "../../../dist-wYqYXEOz.js";
2
2
  import { Button as t, Flex as n } from "@radix-ui/themes";
3
3
  import { useCallback as r } from "react";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { a as e } from "../../dist-FrapLVQu.js";
1
+ import { PluginKey as e } from "@tiptap/pm/state";
2
2
  //#region lib/components/Menu/linkBubbleMenuPlugin.ts
3
3
  var t = new e("scribeLinkBubbleMenu"), n = (e) => {
4
4
  e.isDestroyed || (e.view.dispatch(e.state.tr.setMeta(t, "show")), !e.isDestroyed && e.view.dispatch(e.state.tr.setMeta(t, "updatePosition")));
@@ -1,4 +1,4 @@
1
- import { n as e } from "../../../../dist-BgEySLwo.js";
1
+ import { n as e } from "../../../../dist-wYqYXEOz.js";
2
2
  import { getPopupMountTarget as t } from "../getPopupMountTarget.js";
3
3
  import { t as n } from "../../../../tippy.esm-DOXqN1Qm.js";
4
4
  import { EmojiList as r } from "./EmojiList.js";
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../../extension-link-CMRfHUc5.js";
1
+ import { t as e } from "../../../extension-link-DJy7XDoj.js";
2
2
  export { e as default };
@@ -1,8 +1,8 @@
1
- import { a as e, i as t } from "../../../dist-FrapLVQu.js";
2
- import { n } from "../../../dist-BMKyBtRa.js";
3
- import { n as r, t as i } from "../../../markdown-to-html-DwSNqq2i.js";
1
+ import { n as e } from "../../../dist-DErUltkU.js";
2
+ import { n as t, t as n } from "../../../markdown-to-html-DwSNqq2i.js";
3
+ import { Plugin as r, PluginKey as i } from "@tiptap/pm/state";
4
4
  //#region lib/components/Scribe/extension/extension-markdown-paste.ts
5
- var a = new e("markdownPaste"), o = /* @__PURE__ */ new Set([
5
+ var a = new i("markdownPaste"), o = /* @__PURE__ */ new Set([
6
6
  "blockquote",
7
7
  "code",
8
8
  "heading",
@@ -15,8 +15,8 @@ var a = new e("markdownPaste"), o = /* @__PURE__ */ new Set([
15
15
  "em",
16
16
  "strong"
17
17
  ]), c = (e) => e.type === "image" ? e.raw.startsWith("![") : e.type === "link" && e.raw.startsWith("["), l = (e) => e.some((e) => o.has(e.type) || s.has(e.type) || c(e) || "tokens" in e && Array.isArray(e.tokens) && l(e.tokens) ? !0 : "items" in e && Array.isArray(e.items) ? e.items.some((e) => l(e.tokens)) : !1), u = (e) => {
18
- let t = e.trim();
19
- return t ? l(r.lexer(t)) : !1;
18
+ let n = e.trim();
19
+ return n ? l(t.lexer(n)) : !1;
20
20
  }, d = (e) => {
21
21
  let t = e.firstElementChild;
22
22
  return !(t instanceof HTMLInputElement) || t.type !== "checkbox" ? null : t;
@@ -40,16 +40,16 @@ var a = new e("markdownPaste"), o = /* @__PURE__ */ new Set([
40
40
  return e.someProp("transformPastedHTML", (t) => {
41
41
  n = t(n, e);
42
42
  }), n;
43
- }, m = n.create({
43
+ }, m = e.create({
44
44
  name: "markdownPaste",
45
45
  addProseMirrorPlugins() {
46
- return [new t({
46
+ return [new r({
47
47
  key: a,
48
48
  props: { handlePaste: (e, t) => {
49
- let n = t.clipboardData?.getData("text/html"), r = t.clipboardData?.getData("text/plain");
50
- if (!r || n || !u(r)) return !1;
49
+ let r = t.clipboardData?.getData("text/html"), i = t.clipboardData?.getData("text/plain");
50
+ if (!i || r || !u(i)) return !1;
51
51
  t.preventDefault();
52
- let a = f(i(r));
52
+ let a = f(n(i));
53
53
  return this.editor.chain().focus().insertContent(p(e, a)).run(), !0;
54
54
  } }
55
55
  })];
@@ -1,4 +1,4 @@
1
- import { n as e } from "../../../dist-BMKyBtRa.js";
1
+ import { n as e } from "../../../dist-DErUltkU.js";
2
2
  //#region lib/components/Scribe/extension/extension-selectedText.ts
3
3
  var t = e.create({
4
4
  name: "SelectedText",
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../../extension-BVGWENts.js";
1
+ import { t as e } from "../../../extension-6I5t1ZxQ.js";
2
2
  export { e as initExtensions };
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../../../../slashCommand-B6Iz1i0d.js";
1
+ import { n as e, t } from "../../../../slashCommand-DuSH9sXJ.js";
2
2
  export { t as SlashCommand, e as slashMenuPluginKey };
@@ -1,4 +1,4 @@
1
- import { n as e } from "../../../../dist-BgEySLwo.js";
1
+ import { n as e } from "../../../../dist-wYqYXEOz.js";
2
2
  import { getPopupMountTarget as t } from "../getPopupMountTarget.js";
3
3
  import { t as n } from "../../../../tippy.esm-DOXqN1Qm.js";
4
4
  import { SlashCommandList as r } from "./SlashCommandList.js";
@@ -1,7 +1,7 @@
1
- import { a as e, i as t } from "../../../dist-FrapLVQu.js";
2
- import { n } from "../../../dist-BMKyBtRa.js";
1
+ import { n as e } from "../../../dist-DErUltkU.js";
2
+ import { Plugin as t, PluginKey as n } from "@tiptap/pm/state";
3
3
  //#region lib/components/Scribe/extension/tableOfContents.ts
4
- var r = "scribeTableOfContents", i = new e("scribeTableOfContents"), a = 10, o = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "heading", s = (e, t) => {
4
+ var r = "scribeTableOfContents", i = new n("scribeTableOfContents"), a = 10, o = (e) => e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "heading", s = (e, t) => {
5
5
  let n = t[t.length - 1], r = [...t].reverse().find((t) => t.originalLevel <= e.node.attrs.level)?.level || 1;
6
6
  return e.node.attrs.level > (n?.originalLevel || 1) ? (n?.level || 1) + 1 : e.node.attrs.level < (n?.originalLevel || 1) ? r : n?.level || 1;
7
7
  }, c = (e) => (e[e.length - 1]?.itemIndex || 0) + 1, l = (e, t, n) => {
@@ -81,7 +81,7 @@ var r = "scribeTableOfContents", i = new e("scribeTableOfContents"), a = 10, o =
81
81
  }))), S = (e, t, n) => {
82
82
  let r = x(n), i = !e.hasCreated;
83
83
  e.anchors = n.map((e) => e.dom), e.content = n, !(!i && r === e.lastSignature) && (e.hasCreated = !0, e.lastSignature = r, t.onUpdate?.(n, i));
84
- }, C = n.create({
84
+ }, C = e.create({
85
85
  name: "scribeTableOfContents",
86
86
  addOptions() {
87
87
  return { anchorTypes: ["heading"] };
@@ -1,8 +1,8 @@
1
- import { n as e, t } from "../../BarMenu-BG_w4DVo.js";
2
- import { i as n, t as r } from "../../dist-BgEySLwo.js";
1
+ import { n as e, t } from "../../BarMenu-5S2vKAtc.js";
2
+ import { i as n, t as r } from "../../dist-wYqYXEOz.js";
3
3
  import i from "../Menu/LinkBubbleMenu.js";
4
4
  import { t as a } from "../../html-to-markdown-Cta7-ssO.js";
5
- import { t as o } from "../../extension-BVGWENts.js";
5
+ import { t as o } from "../../extension-6I5t1ZxQ.js";
6
6
  import { SuggestionItemType as s } from "./extension/slashCommand/items.js";
7
7
  import "./extension/tableOfContents.js";
8
8
  import "../../utils/index.js";