reactjs-tiptap-editor 1.0.3 → 1.0.5
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/lib/{ActionMenuButton-BjQpCWBy.cjs → ActionMenuButton-BS1m0efQ.cjs} +1 -1
- package/lib/{ActionMenuButton-BFepb5pA.js → ActionMenuButton-CmYQziyT.js} +11 -11
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.js +4 -4
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.js +3 -3
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +3 -3
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +3 -3
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +2 -2
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +3 -3
- package/lib/CodeBlock.cjs +39 -39
- package/lib/CodeBlock.js +949 -841
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +3 -3
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +8 -8
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +3 -3
- package/lib/{Drawer-CJju6ecy.js → Drawer-BCMlTDss.js} +14 -14
- package/lib/{Drawer-CSueBqcB.cjs → Drawer-DPVStAKs.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +1 -1
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +13 -13
- package/lib/{Excalidraw-C6LNBBPI.js → Excalidraw-1dKmqI-3.js} +19 -19
- package/lib/{Excalidraw-sf65kOJo.cjs → Excalidraw-BP-xjF6S.cjs} +1 -1
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +3 -3
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +3 -3
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +5 -5
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +5 -5
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +13 -13
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +8 -8
- package/lib/History.cjs +1 -1
- package/lib/History.js +3 -3
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +3 -3
- package/lib/{Icon-CJomacaQ.cjs → Icon-BjR_or8V.cjs} +1 -1
- package/lib/{Icon-CNyAQ70L.js → Icon-C-qYUAS1.js} +1 -1
- package/lib/{Iframe-DjIPMesT.js → Iframe-B_GAN9lj.js} +11 -11
- package/lib/{Iframe-CkoadzVT.cjs → Iframe-CeasogsD.cjs} +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +45 -45
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +8 -8
- package/lib/ImportWord.cjs +2 -2
- package/lib/ImportWord.js +8 -8
- package/lib/{Indent-08e09DMj.cjs → Indent-BGmFt7Dc.cjs} +1 -1
- package/lib/{Indent-UDnZAurv.js → Indent-DCTAYr8i.js} +3 -3
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +3 -3
- package/lib/{Katex-zmcrp9k1.cjs → Katex-CFZB-dZq.cjs} +2 -2
- package/lib/{Katex-CXa45tyK.js → Katex-CxEAc1xw.js} +19 -19
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +1 -1
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +14 -14
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +1 -1
- package/lib/{LinkEditBlock-CB8dAmrf.js → LinkEditBlock-C8rPUoNH.js} +68 -68
- package/lib/{LinkEditBlock-Dif8KmZQ.cjs → LinkEditBlock-DiSXJpTN.cjs} +2 -2
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.js +20 -21
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +15 -15
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +3 -3
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +20 -20
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +8 -8
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +3 -3
- package/lib/{Table-BahHb0Ru.cjs → Table-B4s9CpR4.cjs} +1 -1
- package/lib/{Table-BnhgS_-w.js → Table-B9w1GsCg.js} +5 -5
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +3 -3
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +15 -15
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +15 -15
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +3 -3
- package/lib/{Twitter-Cb2gasLV.js → Twitter-B-GTNq1g.js} +19 -19
- package/lib/{Twitter-BWmvba2p.cjs → Twitter-BVlF0vEs.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +23 -23
- package/lib/bubble.cjs +1 -1
- package/lib/bubble.js +37 -37
- package/lib/{button-CG4usMxR.js → button-Crm67hfl.js} +1 -1
- package/lib/{button-CIneI3CY.cjs → button-xNppt_aK.cjs} +1 -1
- package/lib/{checkbox-C_n_ksgm.js → checkbox-DViVmgJ6.js} +1 -1
- package/lib/{checkbox-D71Mb18N.cjs → checkbox-NQC2MdGT.cjs} +1 -1
- package/lib/{dialog-NJmA61GX.js → dialog-Ce9Cjfft.js} +1 -1
- package/lib/{dialog-DOqHbj83.cjs → dialog-DaHBd2zw.cjs} +1 -1
- package/lib/{dropdown-menu-Lfbfr4dW.js → dropdown-menu-CQykJhBs.js} +1 -1
- package/lib/{dropdown-menu-C6sUfvGJ.cjs → dropdown-menu-CSCDQtq0.cjs} +1 -1
- package/lib/events.constant-DQYeJpu5.cjs +1 -0
- package/lib/{events.constant-CBPIqO_g.js → events.constant-wrlJ_7JZ.js} +5 -4
- package/lib/{index-DGihe-wH.js → index-0OnGZkVF.js} +19 -16
- package/lib/index-CNzHZDls.cjs +7 -0
- package/lib/{index-BY7ivGJJ.js → index-DuZCJJSp.js} +461 -550
- package/lib/{index-D4d-0Hqh.cjs → index-FSRjMsxW.cjs} +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.js +2 -2
- package/lib/{input-BP2Gxw3D.js → input-DfqFAyKo.js} +1 -1
- package/lib/{input-gHDudt4e.cjs → input-tU3H__39.cjs} +1 -1
- package/lib/{label-DJJuWtqE.js → label-DC33TZy_.js} +1 -1
- package/lib/{label-CVPLC4Zx.cjs → label-DkDE77kc.cjs} +1 -1
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.js +1 -1
- package/lib/locales/index.d.ts +2 -1
- package/lib/{popover-MfEQQFJ7.cjs → popover-CZWSQZ0q.cjs} +1 -1
- package/lib/{popover-BvQjtkQM.js → popover-CoepUobG.js} +1 -1
- package/lib/{separator-D_v6CJRt.js → separator-6SnwzytZ.js} +18 -18
- package/lib/{separator-BJzi4Ghx.cjs → separator-DCQD8P6s.cjs} +1 -1
- package/lib/store-726Zjszt.cjs +1 -0
- package/lib/store-ibARMQ3h.js +10 -0
- package/lib/style.css +1 -1
- package/lib/{tabs-CSLPqYK2.cjs → tabs-B_ArrG09.cjs} +1 -1
- package/lib/{tabs-C0zcytw3.js → tabs-DrkJL_C2.js} +1 -1
- package/lib/{textarea-Du5WiLd3.js → textarea-CIs52G8B.js} +1 -1
- package/lib/{textarea-CoUGzfC4.cjs → textarea-CmZVZKOo.cjs} +1 -1
- package/lib/theme/theme.d.ts +1 -1
- package/lib/theme.cjs +1 -1
- package/lib/theme.js +2 -2
- package/lib/{toggle-Bdrb8AZg.cjs → toggle-Bo07J-M7.cjs} +1 -1
- package/lib/{toggle-DifEFalS.js → toggle-MUGlaI1L.js} +8 -8
- package/lib/{tooltip-CY18LQet.js → tooltip-BTFcHrd9.js} +1 -1
- package/lib/{tooltip-nFyTogij.cjs → tooltip-DFjcKu9a.cjs} +1 -1
- package/lib/{useButtonProps-DEuoHLy_.js → useButtonProps-D0SrPzuG.js} +2 -2
- package/lib/{useButtonProps-5aSfh81v.cjs → useButtonProps-bei1vI37.cjs} +1 -1
- package/lib/utils/customEvents/events.constant.d.ts +1 -0
- package/package.json +1 -1
- package/lib/events.constant-B-VGURJp.cjs +0 -1
- package/lib/index-B7WkxZXU.cjs +0 -7
- package/lib/store-D0HwYEZ6.cjs +0 -1
- package/lib/store-DXwTyDFS.js +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),a=require("react"),s=require("@radix-ui/react-slot");require("./index-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),a=require("react"),s=require("@radix-ui/react-slot");require("./index-CNzHZDls.cjs");const d=require("./index-DmOTQudI.cjs"),u=require("./useButtonProps-bei1vI37.cjs"),m=require("./button-xNppt_aK.cjs"),c=require("./tooltip-DFjcKu9a.cjs"),f=a.forwardRef(({asChild:h=!1,tooltip:i,...t},r)=>{var x;const n=d.icons[t.icon],l=h?s.Slot:m.Button;return e.jsxs(c.Tooltip,{children:[e.jsx(c.TooltipTrigger,{asChild:!0,children:e.jsx(l,{className:"richtext-h-[32px] richtext-min-w-24 richtext-overflow-hidden richtext-px-[5px] richtext-py-0","data-state":t!=null&&t.dataState?"on":"off",disabled:t==null?void 0:t.disabled,ref:r,variant:"ghost",...t,children:e.jsxs("div",{className:"richtext-flex richtext-h-full richtext-items-center richtext-font-normal",children:[(t==null?void 0:t.title)&&e.jsx("div",{className:"richtext-grow richtext-truncate richtext-text-left richtext-text-sm",children:t==null?void 0:t.title}),n&&e.jsx(n,{className:"richtext-ml-1 richtext-size-3 richtext-shrink-0 richtext-text-zinc-500"})]})})}),i&&e.jsx(c.TooltipContent,{children:e.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[i&&e.jsx("div",{children:i}),e.jsx("div",{className:"richtext-flex",children:!!((x=t==null?void 0:t.shortcutKeys)!=null&&x.length)&&e.jsx("span",{children:u.getShortcutKeys(t==null?void 0:t.shortcutKeys)})})]})})]})});exports.ActionMenuButton=f;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import n from "react";
|
|
3
3
|
import { Slot as r } from "@radix-ui/react-slot";
|
|
4
|
-
import "./index-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import "./index-DuZCJJSp.js";
|
|
5
|
+
import { i as m } from "./index-BQ17A_37.js";
|
|
6
|
+
import { g as d } from "./useButtonProps-D0SrPzuG.js";
|
|
7
|
+
import { B as f } from "./button-Crm67hfl.js";
|
|
8
|
+
import { T as o, a as s, b as u } from "./tooltip-BTFcHrd9.js";
|
|
9
9
|
const K = n.forwardRef(
|
|
10
10
|
({ asChild: x = !1, tooltip: i, ...t }, l) => {
|
|
11
11
|
var a;
|
|
12
|
-
const h =
|
|
13
|
-
return /* @__PURE__ */ c(
|
|
14
|
-
/* @__PURE__ */ e(
|
|
15
|
-
x ? r :
|
|
12
|
+
const h = m[t.icon];
|
|
13
|
+
return /* @__PURE__ */ c(o, { children: [
|
|
14
|
+
/* @__PURE__ */ e(s, { asChild: !0, children: /* @__PURE__ */ e(
|
|
15
|
+
x ? r : f,
|
|
16
16
|
{
|
|
17
17
|
className: "richtext-h-[32px] richtext-min-w-24 richtext-overflow-hidden richtext-px-[5px] richtext-py-0",
|
|
18
18
|
"data-state": t != null && t.dataState ? "on" : "off",
|
|
@@ -26,9 +26,9 @@ const K = n.forwardRef(
|
|
|
26
26
|
] })
|
|
27
27
|
}
|
|
28
28
|
) }),
|
|
29
|
-
i && /* @__PURE__ */ e(
|
|
29
|
+
i && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ c("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
|
|
30
30
|
i && /* @__PURE__ */ e("div", { children: i }),
|
|
31
|
-
/* @__PURE__ */ e("div", { className: "richtext-flex", children: !!((a = t == null ? void 0 : t.shortcutKeys) != null && a.length) && /* @__PURE__ */ e("span", { children:
|
|
31
|
+
/* @__PURE__ */ e("div", { className: "richtext-flex", children: !!((a = t == null ? void 0 : t.shortcutKeys) != null && a.length) && /* @__PURE__ */ e("span", { children: d(t == null ? void 0 : t.shortcutKeys) }) })
|
|
32
32
|
] }) })
|
|
33
33
|
] });
|
|
34
34
|
}
|
package/lib/Attachment.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-DLqogznp.cjs"),A=require("./toggle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-DLqogznp.cjs"),A=require("./toggle-Bo07J-M7.cjs"),e=require("react/jsx-runtime"),m=require("react"),q=require("./index-CNzHZDls.cjs"),v=require("lucide-react"),L=require("./index-DmOTQudI.cjs"),f=require("./file-i7e4nQY2.cjs"),_=require("./index-FSRjMsxW.cjs"),d=require("./dom-dataset-BqoJhJXt.cjs"),C=require("./useButtonProps-bei1vI37.cjs"),R={audio:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-audio-lines"><path d="M2 10v3"/><path d="M6 6v11"/><path d="M10 3v18"/><path d="M14 8v7"/><path d="M18 5v13"/><path d="M22 10v3"/></svg>',video:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-video"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',file:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>',image:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-image"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>',pdf:`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32">
|
|
2
2
|
<path fill="currentColor" d="M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3z"></path>
|
|
3
3
|
<path fill="currentColor" d="M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z"></path>
|
|
4
4
|
</svg>`,word:`<svg
|
package/lib/Attachment.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { s as x, C as y, N as j, R as D, m as P } from "./index-nFjllrEl.js";
|
|
2
|
-
import { A as T } from "./toggle-
|
|
2
|
+
import { A as T } from "./toggle-MUGlaI1L.js";
|
|
3
3
|
import { jsx as e, Fragment as L, jsxs as f } from "react/jsx-runtime";
|
|
4
4
|
import { useRef as R, useState as $, useCallback as k, useEffect as I } from "react";
|
|
5
|
-
import { b as O } from "./index-
|
|
5
|
+
import { b as O } from "./index-DuZCJJSp.js";
|
|
6
6
|
import { LucideTableProperties as Z, LucideSheet as W, LucideImage as K, LucideFile as U, LucideVideo as q, LucideAudioLines as G } from "lucide-react";
|
|
7
7
|
import { E as J, a as Q } from "./index-BQ17A_37.js";
|
|
8
8
|
import { n as X, e as Y, a as ee, b } from "./file-BLas99n7.js";
|
|
9
|
-
import { u as te } from "./index-
|
|
9
|
+
import { u as te } from "./index-0OnGZkVF.js";
|
|
10
10
|
import { g as c } from "./dom-dataset-CIEeltF6.js";
|
|
11
|
-
import { u as re, a as ie } from "./useButtonProps-
|
|
11
|
+
import { u as re, a as ie } from "./useButtonProps-D0SrPzuG.js";
|
|
12
12
|
const oe = {
|
|
13
13
|
audio: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-audio-lines"><path d="M2 10v3"/><path d="M6 6v11"/><path d="M10 3v18"/><path d="M14 8v7"/><path d="M18 5v13"/><path d="M22 10v3"/></svg>',
|
|
14
14
|
video: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-video"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',
|
package/lib/Blockquote.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-DLqogznp.cjs"),a=require("./jsx-runtime-C_NLcKys.cjs"),l=require("react/jsx-runtime"),k=require("./toggle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-DLqogznp.cjs"),a=require("./jsx-runtime-C_NLcKys.cjs"),l=require("react/jsx-runtime"),k=require("./toggle-Bo07J-M7.cjs");require("react");require("./index-CNzHZDls.cjs");const p=require("./useButtonProps-bei1vI37.cjs");var m=/^\s*>\s$/,b=c.Node3.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return a.h("blockquote",{...c.mergeAttributes(this.options.HTMLAttributes,t),children:a.h("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";const o=">",n=[];return t.content.forEach(i=>{const u=e.renderChildren([i]).split(`
|
|
2
2
|
`).map(r=>r.trim()===""?o:`${o} ${r}`);n.push(u.join(`
|
|
3
3
|
`))}),n.join(`
|
|
4
4
|
${o}
|
package/lib/Blockquote.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { N as m, w as h, m as k } from "./index-nFjllrEl.js";
|
|
2
2
|
import { h as a } from "./jsx-runtime-CT7Pcg-t.js";
|
|
3
3
|
import { jsx as l, Fragment as f } from "react/jsx-runtime";
|
|
4
|
-
import { A as g } from "./toggle-
|
|
4
|
+
import { A as g } from "./toggle-MUGlaI1L.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import "./index-
|
|
7
|
-
import { u as b, a as q } from "./useButtonProps-
|
|
6
|
+
import "./index-DuZCJJSp.js";
|
|
7
|
+
import { u as b, a as q } from "./useButtonProps-D0SrPzuG.js";
|
|
8
8
|
var v = /^\s*>\s$/, B = m.create({
|
|
9
9
|
name: "blockquote",
|
|
10
10
|
addOptions() {
|
package/lib/Bold.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-DLqogznp.cjs"),a=require("./jsx-runtime-C_NLcKys.cjs"),l=require("./toggle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-DLqogznp.cjs"),a=require("./jsx-runtime-C_NLcKys.cjs"),l=require("./toggle-Bo07J-M7.cjs"),s=require("react/jsx-runtime");require("react");require("./index-CNzHZDls.cjs");const u=require("./useButtonProps-bei1vI37.cjs");var B=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,_=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,k=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,v=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,M=o.Mark.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return a.h("strong",{...o.mergeAttributes(this.options.HTMLAttributes,t),children:a.h("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[o.markInputRule({find:B,type:this.type}),o.markInputRule({find:k,type:this.type})]},addPasteRules(){return[o.markPasteRule({find:_,type:this.type}),o.markPasteRule({find:v,type:this.type})]}});function b(){const t=u.useButtonProps(c.name),{icon:e=void 0,tooltip:r=void 0,shortcutKeys:n=void 0,tooltipOptions:p={},action:i=void 0,isActive:g=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:m,disabled:d,update:h}=u.useToggleActive(g),y=()=>{d||i&&(i(),h())};return t?s.jsx(l.ActionButton,{action:y,dataState:m,disabled:d,icon:e,shortcutKeys:n,tooltip:r,tooltipOptions:p}):s.jsx(s.Fragment,{})}const c=M.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:r,extension:n})=>({component:l.ActionButton,componentProps:{action:()=>e.commands.toggleBold(),isActive:()=>e.isActive("bold"),icon:"Bold",shortcutKeys:n.options.shortcutKeys??["mod","B"],tooltip:r("editor.bold.tooltip")}})}}});exports.Bold=c;exports.RichTextBold=b;
|
package/lib/Bold.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { M as _, h as a, j as i, m as y } from "./index-nFjllrEl.js";
|
|
2
2
|
import { h as d } from "./jsx-runtime-CT7Pcg-t.js";
|
|
3
|
-
import { A as l } from "./toggle-
|
|
3
|
+
import { A as l } from "./toggle-MUGlaI1L.js";
|
|
4
4
|
import { jsx as u, Fragment as f } from "react/jsx-runtime";
|
|
5
5
|
import "react";
|
|
6
|
-
import "./index-
|
|
7
|
-
import { u as M, a as v } from "./useButtonProps-
|
|
6
|
+
import "./index-DuZCJJSp.js";
|
|
7
|
+
import { u as M, a as v } from "./useButtonProps-D0SrPzuG.js";
|
|
8
8
|
var B = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, k = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, b = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, A = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, R = _.create({
|
|
9
9
|
name: "bold",
|
|
10
10
|
addOptions() {
|
package/lib/BulletList.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-TMqmkmT6.cjs"),s=require("react/jsx-runtime"),m=require("./toggle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-TMqmkmT6.cjs"),s=require("react/jsx-runtime"),m=require("./toggle-Bo07J-M7.cjs");require("react");require("./index-CNzHZDls.cjs");const r=require("./useButtonProps-bei1vI37.cjs");function B(){const t=r.useButtonProps(c.name),{icon:e=void 0,tooltip:o=void 0,shortcutKeys:i=void 0,tooltipOptions:l={},action:n=void 0,isActive:d=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:a,disabled:u,update:p}=r.useToggleActive(d),v=()=>{u||n&&(n(),p())};return t?s.jsx(m.ActionButton,{action:v,dataState:a,disabled:u,icon:e,shortcutKeys:i,tooltip:o,tooltipOptions:l}):s.jsx(s.Fragment,{})}const c=g.BulletList.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:o,extension:i})=>({componentProps:{action:()=>e.commands.toggleBulletList(),isActive:()=>e.isActive("bulletList"),disabled:!1,shortcutKeys:i.options.shortcutKeys??["shift","mod","8"],icon:"List",tooltip:o("editor.bulletlist.tooltip")}})}}});exports.BulletList=c;exports.RichTextBulletList=B;
|
package/lib/BulletList.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { B as m } from "./index-D-FhWysc.js";
|
|
2
2
|
import { jsx as r, Fragment as d } from "react/jsx-runtime";
|
|
3
|
-
import { A as f } from "./toggle-
|
|
3
|
+
import { A as f } from "./toggle-MUGlaI1L.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./index-
|
|
6
|
-
import { u as v, a as A } from "./useButtonProps-
|
|
5
|
+
import "./index-DuZCJJSp.js";
|
|
6
|
+
import { u as v, a as A } from "./useButtonProps-D0SrPzuG.js";
|
|
7
7
|
function K() {
|
|
8
8
|
const t = v(B.name), {
|
|
9
9
|
icon: o = void 0,
|
package/lib/Clear.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-DLqogznp.cjs"),n=require("react/jsx-runtime"),v=require("./toggle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-DLqogznp.cjs"),n=require("react/jsx-runtime"),v=require("./toggle-Bo07J-M7.cjs"),c=require("./useButtonProps-bei1vI37.cjs");function f(){const t=c.useButtonProps(s.name),{icon:e=void 0,tooltip:o=void 0,shortcutKeys:a=void 0,tooltipOptions:u={},action:i=void 0,isActive:l=void 0}=(t==null?void 0:t.componentProps)??{},{disabled:r}=c.useActive(l),d=()=>{r||i&&i()};return t?n.jsx(v.ActionButton,{action:d,disabled:r,icon:e,shortcutKeys:a,tooltip:o,tooltipOptions:u}):n.jsx(n.Fragment,{})}const s=p.Node3.create({name:"clear",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:o})=>({componentProps:{action:()=>e.chain().focus().clearNodes().unsetAllMarks().run(),isActive:()=>e.can().chain().focus().clearNodes().unsetAllMarks().run(),icon:"Eraser",tooltip:o("editor.clear.tooltip")}})}}});exports.Clear=s;exports.RichTextClear=f;
|
package/lib/Clear.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { N as p } from "./index-nFjllrEl.js";
|
|
2
2
|
import { jsx as e, Fragment as l } from "react/jsx-runtime";
|
|
3
|
-
import { A as m } from "./toggle-
|
|
4
|
-
import { u as d, b as f } from "./useButtonProps-
|
|
3
|
+
import { A as m } from "./toggle-MUGlaI1L.js";
|
|
4
|
+
import { u as d, b as f } from "./useButtonProps-D0SrPzuG.js";
|
|
5
5
|
function b() {
|
|
6
6
|
const o = d(v.name), {
|
|
7
7
|
icon: t = void 0,
|
package/lib/Code.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-DLqogznp.cjs"),i=require("react/jsx-runtime"),h=require("./toggle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-DLqogznp.cjs"),i=require("react/jsx-runtime"),h=require("./toggle-Bo07J-M7.cjs");require("react");require("./index-CNzHZDls.cjs");const u=require("./useButtonProps-bei1vI37.cjs");var x=/(^|[^`])`([^`]+)`(?!`)$/,C=/(^|[^`])`([^`]+)`(?!`)/g,v=o.Mark.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",o.mergeAttributes(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[o.markInputRule({find:x,type:this.type})]},addPasteRules(){return[o.markPasteRule({find:C,type:this.type})]}});function M(){const e=u.useButtonProps(a.name),{icon:t=void 0,tooltip:r=void 0,shortcutKeys:n=void 0,tooltipOptions:c={},action:s=void 0,isActive:p=void 0}=(e==null?void 0:e.componentProps)??{},{dataState:l,disabled:d,update:g}=u.useToggleActive(p),m=()=>{d||s&&(s(),g())};return e?i.jsx(h.ActionButton,{action:m,dataState:l,disabled:d,icon:t,shortcutKeys:n,tooltip:r,tooltipOptions:c}):i.jsx(i.Fragment,{})}const a=v.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button:({editor:t,t:r,extension:n})=>({componentProps:{action:()=>t.commands.toggleCode(),isActive:()=>t.isActive("code"),disabled:!t.can().toggleCode(),icon:"Code",shortcutKeys:n.options.shortcutKeys??["mod","E"],tooltip:r("editor.code.tooltip")}})}}});exports.Code=a;exports.RichTextCode=M;
|
package/lib/Code.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { M as m, h as l, j as g, m as h } from "./index-nFjllrEl.js";
|
|
2
2
|
import { jsx as a, Fragment as M } from "react/jsx-runtime";
|
|
3
|
-
import { A as v } from "./toggle-
|
|
3
|
+
import { A as v } from "./toggle-MUGlaI1L.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./index-
|
|
6
|
-
import { u as C, a as f } from "./useButtonProps-
|
|
5
|
+
import "./index-DuZCJJSp.js";
|
|
6
|
+
import { u as C, a as f } from "./useButtonProps-D0SrPzuG.js";
|
|
7
7
|
var k = /(^|[^`])`([^`]+)`(?!`)$/, x = /(^|[^`])`([^`]+)`(?!`)/g, y = m.create({
|
|
8
8
|
name: "code",
|
|
9
9
|
addOptions() {
|