reactjs-tiptap-editor 1.0.19 → 1.0.20
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-D3b_bcin.cjs → ActionMenuButton-BPgqKDXT.cjs} +1 -1
- package/lib/{ActionMenuButton-B1Nfn5Hm.js → ActionMenuButton-CMXWxvWu.js} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.js +3 -3
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.js +2 -2
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +2 -2
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +2 -2
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.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 +2 -2
- package/lib/CodeBlock.cjs +20 -44
- package/lib/CodeBlock.js +1385 -4011
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +2 -2
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +3 -3
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +2 -2
- package/lib/{Drawer-kEO7KzzC.cjs → Drawer-BivLAzMN.cjs} +1 -1
- package/lib/{Drawer-B1-7Y4HB.js → Drawer-BmVmgJsc.js} +3 -3
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +4 -4
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +8 -8
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +3 -3
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +2 -2
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +2 -2
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +4 -4
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +4 -4
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +4 -4
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +3 -3
- package/lib/History.cjs +1 -1
- package/lib/History.js +3 -3
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +2 -2
- package/lib/{Iframe-XlAb03_r.js → Iframe-CAUrccA0.js} +3 -3
- package/lib/{Iframe-Bk5OIlvy.cjs → Iframe-hwg9FxhU.cjs} +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +3 -3
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +3 -3
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +4 -4
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +2 -2
- package/lib/{Indent-ruPuj5xn.js → Indent-3MoIatX1.js} +2 -2
- package/lib/{Indent-XaZNTsOk.cjs → Indent-MuSU0kXz.cjs} +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +2 -2
- package/lib/Katex-BPQ7_A3w.cjs +4 -0
- package/lib/{Katex-DKspCn-p.js → Katex-xS-XZKQc.js} +400 -422
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +3 -3
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +3 -3
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/{LinkEditBlock-DhesHreq.cjs → LinkEditBlock-DLDY-8Ax.cjs} +1 -1
- package/lib/{LinkEditBlock-BWm2Ypt2.js → LinkEditBlock-Dhvz7DCA.js} +3 -3
- package/lib/MarkdownPaste.cjs +1 -1
- package/lib/MarkdownPaste.js +1 -1
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.js +4 -4
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +3 -3
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +3 -3
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +2 -2
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +3 -3
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +6 -6
- package/lib/{SlashCommandNodeView-CojfS61Q.cjs → SlashCommandNodeView-CavaOSwo.cjs} +1 -1
- package/lib/{SlashCommandNodeView-Hf2DX4km.js → SlashCommandNodeView-RnDRm4Z1.js} +1 -1
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +2 -2
- package/lib/{Table-BTkFUATL.js → Table-DN4TuDz1.js} +35 -35
- package/lib/{Table-C1_xLqV0.cjs → Table-m32ZhtxF.cjs} +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +2 -2
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +3 -3
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +3 -3
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +2 -2
- package/lib/{Twitter-D5mUTILj.js → Twitter-B2FDarxE.js} +4 -4
- package/lib/{Twitter-Cj-0yyQQ.cjs → Twitter-CJhQLKYS.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +3 -3
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +2 -2
- package/lib/_commonjsHelpers-B4e78b8K.js +28 -0
- package/lib/_commonjsHelpers-BTDuMlIz.cjs +1 -0
- package/lib/bubble.cjs +6 -6
- package/lib/bubble.js +1796 -1683
- package/lib/{clsx-OumA9x-8.js → clsx-Bg-2aTKh.js} +11 -11
- package/lib/{clsx-BSBE1eoY.cjs → clsx-DSAWW32g.cjs} +1 -1
- package/lib/components/Bubble/RichTextBubbleCodeBlock.d.ts +1 -0
- package/lib/components/Bubble/index.d.ts +1 -0
- package/lib/{dropdown-menu-CUeq1boX.cjs → dropdown-menu-C0VlKIZC.cjs} +1 -1
- package/lib/{dropdown-menu-Bragdu5m.js → dropdown-menu-CWd8VVRO.js} +1 -1
- package/lib/extensions/CodeBlock/CodeBlock.d.ts +3 -18
- package/lib/{index-CDFAs4RT.js → index-B2a7NqnN.js} +3 -3
- package/lib/{index-CnePcUeF.cjs → index-C3dgmjIF.cjs} +1 -1
- package/lib/{index-DwSnESy-.cjs → index-C4WLt4NA.cjs} +4 -4
- package/lib/{index-BKlbc8Qo.js → index-CbkpBnTX.js} +1 -1
- package/lib/{index-CZ1_8JQQ.js → index-CjLxMm5d.js} +1 -1
- package/lib/{index-BVRHx_ha.js → index-D0EmqTpe.js} +74 -64
- package/lib/{index-cPEuL4Zr.js → index-DXtVL0al.js} +1 -1
- package/lib/{index-CMLwKzI0.cjs → index-DlxZt4_j.cjs} +1 -1
- package/lib/{index-B-7eHzaO.js → index-P5_MyY0i.js} +1 -1
- package/lib/{index-D7wfvzJg.cjs → index-TcJ2UKnv.cjs} +1 -1
- package/lib/{index-BLrMslr7.cjs → index-czmcFIW7.cjs} +1 -1
- package/lib/{index-COCTP78Y.cjs → index-fbGGohBT.cjs} +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.js +2 -2
- package/lib/{popover-C2BbhsXH.js → popover-BrSDMb_n.js} +1 -1
- package/lib/{popover-DCJpsZx0.cjs → popover-UUKfPWue.cjs} +1 -1
- package/lib/{renderNodeView-CmnUEfby.js → renderNodeView-CbxCTni3.js} +2 -2
- package/lib/{renderNodeView-DQjWzXDA.cjs → renderNodeView-DFVrJy0l.cjs} +1 -1
- package/lib/{separator-BuG1zwKa.cjs → separator-LH5EzF0T.cjs} +1 -1
- package/lib/{separator-lkMWuUvf.js → separator-fpWkZkoh.js} +2 -2
- package/lib/style.css +1 -1
- package/lib/{updatePosition-DYuAiqx-.js → updatePosition-BGD41Hbg.js} +2 -2
- package/lib/{updatePosition-D6AScA-1.cjs → updatePosition-CQE1ct18.cjs} +1 -1
- package/package.json +4 -2
- package/lib/Katex-BFIYLrwm.cjs +0 -4
- package/lib/delete-node-CosiBes5.cjs +0 -1
- package/lib/delete-node-eQHsyyhR.js +0 -24
- package/lib/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),a=require("@radix-ui/react-slot"),d=require("react"),i=require("./index-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),a=require("@radix-ui/react-slot"),d=require("react"),i=require("./index-czmcFIW7.cjs");require("./theme.cjs");const s=d.forwardRef(({asChild:h=!1,tooltip:c,...t},l)=>{var n;const x=i.icons[t.icon],r=h?a.Slot:i.Button;return e.jsxs(i.Tooltip,{children:[e.jsx(i.TooltipTrigger,{asChild:!0,children:e.jsx(r,{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:l,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}),x&&e.jsx(x,{className:"richtext-ml-1 richtext-size-3 richtext-shrink-0 richtext-text-zinc-500"})]})})}),c&&e.jsx(i.TooltipContent,{children:e.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[c&&e.jsx("div",{children:c}),e.jsx("div",{className:"richtext-flex",children:!!((n=t==null?void 0:t.shortcutKeys)!=null&&n.length)&&e.jsx("span",{children:i.getShortcutKeys(t==null?void 0:t.shortcutKeys)})})]})})]})});exports.ActionMenuButton=s;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Slot as n } from "@radix-ui/react-slot";
|
|
3
3
|
import r from "react";
|
|
4
|
-
import { i as d, T as m, a as f, B as s, b as u, g } from "./index-
|
|
4
|
+
import { i as d, T as m, a as f, B as s, b as u, g } from "./index-B2a7NqnN.js";
|
|
5
5
|
import "./theme.js";
|
|
6
6
|
const C = r.forwardRef(
|
|
7
7
|
({ asChild: x = !1, tooltip: i, ...t }, l) => {
|
package/lib/Attachment.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index-C4WLt4NA.cjs"),u=require("./clsx-DSAWW32g.cjs"),s=require("./index-czmcFIW7.cjs"),e=require("react/jsx-runtime"),v=require("react");require("./theme.cjs");const x=require("lucide-react"),S=require("./index-BqL4vAWE.cjs"),d=require("./dom-dataset-BqoJhJXt.cjs"),B={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,6 +1,6 @@
|
|
|
1
|
-
import { N as j, m as D } from "./index-
|
|
2
|
-
import { N as x, c as y, a as P } from "./clsx-
|
|
3
|
-
import { Y as $, Z as R, _ as I, M as Z, $ as O, a0 as W, a1 as N, A as T, u as K, d as Y } from "./index-
|
|
1
|
+
import { N as j, m as D } from "./index-D0EmqTpe.js";
|
|
2
|
+
import { N as x, c as y, a as P } from "./clsx-Bg-2aTKh.js";
|
|
3
|
+
import { Y as $, Z as R, _ as I, M as Z, $ as O, a0 as W, a1 as N, A as T, u as K, d as Y } from "./index-B2a7NqnN.js";
|
|
4
4
|
import { jsx as e, Fragment as L, jsxs as f } from "react/jsx-runtime";
|
|
5
5
|
import { useRef as q, useState as G, useCallback as k, useEffect as J } from "react";
|
|
6
6
|
import "./theme.js";
|
package/lib/Blockquote.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-C4WLt4NA.cjs"),h=require("./jsx-runtime-C_NLcKys.cjs"),d=require("react/jsx-runtime"),p=require("./index-czmcFIW7.cjs");require("react");require("./theme.cjs");var m=/^\s*>\s$/,b=a.Node3.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return h.h("blockquote",{...a.mergeAttributes(this.options.HTMLAttributes,t),children:h.h("slot",{})})},parseMarkdown:(t,e)=>{var o;const n=(o=e.parseBlockChildren)!=null?o:e.parseChildren;return e.createNode("blockquote",void 0,n(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const o=">",n=[];return t.content.forEach((r,i)=>{var s,u;const l=((u=(s=e.renderChild)==null?void 0:s.call(e,r,i))!=null?u:e.renderChildren([r])).split(`
|
|
2
2
|
`).map(q=>q.trim()===""?o:`${o} ${q}`);n.push(l.join(`
|
|
3
3
|
`))}),n.join(`
|
|
4
4
|
${o}
|
package/lib/Blockquote.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { N as k, w as h, m as g } from "./index-
|
|
1
|
+
import { N as k, w as h, m as g } from "./index-D0EmqTpe.js";
|
|
2
2
|
import { h as p } from "./jsx-runtime-CT7Pcg-t.js";
|
|
3
3
|
import { jsx as m, Fragment as b } from "react/jsx-runtime";
|
|
4
|
-
import { u as f, d as q, A as v } from "./index-
|
|
4
|
+
import { u as f, d as q, A as v } from "./index-B2a7NqnN.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "./theme.js";
|
|
7
7
|
var B = /^\s*>\s$/, A = k.create({
|
package/lib/Bold.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-C4WLt4NA.cjs"),u=require("./jsx-runtime-C_NLcKys.cjs"),n=require("./index-czmcFIW7.cjs"),i=require("react/jsx-runtime");require("react");require("./theme.cjs");var y=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,_=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,B=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,k=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,v=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 u.h("strong",{...o.mergeAttributes(this.options.HTMLAttributes,t),children:u.h("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},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:y,type:this.type}),o.markInputRule({find:B,type:this.type})]},addPasteRules(){return[o.markPasteRule({find:_,type:this.type}),o.markPasteRule({find:k,type:this.type})]}});function M(){const t=n.useButtonProps(l.name),{icon:e=void 0,tooltip:r=void 0,shortcutKeys:s=void 0,tooltipOptions:c={},action:d=void 0,isActive:p=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:g,disabled:a,update:m}=n.useToggleActive(p),h=()=>{a||d&&(d(),m())};return t?i.jsx(n.ActionButton,{action:h,dataState:g,disabled:a,icon:e,shortcutKeys:s,tooltip:r,tooltipOptions:c}):i.jsx(i.Fragment,{})}const l=v.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:r,extension:s})=>({component:n.ActionButton,componentProps:{action:()=>e.commands.toggleBold(),isActive:()=>e.isActive("bold"),icon:"Bold",shortcutKeys:s.options.shortcutKeys??["mod","B"],tooltip:r("editor.bold.tooltip")}})}}});exports.Bold=l;exports.RichTextBold=M;
|
package/lib/Bold.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as _, f as a, h as i, m as y } from "./index-
|
|
1
|
+
import { M as _, f as a, h as i, m as y } from "./index-D0EmqTpe.js";
|
|
2
2
|
import { h as d } from "./jsx-runtime-CT7Pcg-t.js";
|
|
3
|
-
import { u as f, d as M, A as u } from "./index-
|
|
3
|
+
import { u as f, d as M, A as u } from "./index-B2a7NqnN.js";
|
|
4
4
|
import { jsx as l, Fragment as k } from "react/jsx-runtime";
|
|
5
5
|
import "react";
|
|
6
6
|
import "./theme.js";
|
package/lib/BulletList.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index-fbGGohBT.cjs"),s=require("react/jsx-runtime"),n=require("./index-czmcFIW7.cjs");require("react");require("./theme.cjs");function g(){const t=n.useButtonProps(l.name),{icon:e=void 0,tooltip:i=void 0,shortcutKeys:o=void 0,tooltipOptions:r={},action:c=void 0,isActive:d=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:a,disabled:u,update:p}=n.useToggleActive(d),m=()=>{u||c&&(c(),p())};return t?s.jsx(n.ActionButton,{action:m,dataState:a,disabled:u,icon:e,shortcutKeys:o,tooltip:i,tooltipOptions:r}):s.jsx(s.Fragment,{})}const l=v.BulletList.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:i,extension:o})=>({componentProps:{action:()=>e.commands.toggleBulletList(),isActive:()=>e.isActive("bulletList"),disabled:!1,shortcutKeys:o.options.shortcutKeys??["shift","mod","8"],icon:"List",tooltip:i("editor.bulletlist.tooltip")}})}}});exports.BulletList=l;exports.RichTextBulletList=g;
|
package/lib/BulletList.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as d } from "./index-
|
|
1
|
+
import { B as d } from "./index-DXtVL0al.js";
|
|
2
2
|
import { jsx as c, Fragment as m } from "react/jsx-runtime";
|
|
3
|
-
import { u as f, d as v, A } from "./index-
|
|
3
|
+
import { u as f, d as v, A } from "./index-B2a7NqnN.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "./theme.js";
|
|
6
6
|
function y() {
|
package/lib/Callout.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-C4WLt4NA.cjs"),h=require("./clsx-DSAWW32g.cjs"),e=require("./index-czmcFIW7.cjs"),t=require("react/jsx-runtime"),d=require("react");require("./theme.cjs");const n=require("lucide-react"),k=require("./index-BqL4vAWE.cjs"),j=[{value:"note",label:"Note",icon:n.Info,color:"#1f6feb",background:"#1f6feb1f"},{value:"tip",label:"Tip",icon:n.Lightbulb,color:"#238636",background:"#2386361f"},{value:"important",label:"Important",icon:n.AlertCircle,color:"#ab7df8",background:"#ab7df81f"},{value:"warning",label:"Warning",icon:n.TriangleAlert,color:"#d29922",background:"#d299221f"},{value:"caution",label:"Caution",icon:n.OctagonAlert,color:"#f85149",background:"#f851491f"}];function q({node:l}){const{type:o="note",title:i="",body:c=""}=l.attrs,s=(j.find(u=>u.value===o)||j[0]).icon;return t.jsx(h.NodeViewWrapper,{children:t.jsxs("div",{className:h.clsx("richtext-relative richtext-my-4 richtext-rounded-lg richtext-border richtext-p-4",{"richtext-bg-[#1f6feb1f] richtext-border-[#1f6feb]":o==="note","richtext-bg-[#2386361f] richtext-border-[#238636]":o==="tip","richtext-bg-[#ab7df81f] richtext-border-[#ab7df8]":o==="important","richtext-bg-[#d299221f] richtext-border-[#d29922]":o==="warning","richtext-bg-[#f851491f] richtext-border-[#f85149]":o==="caution"}),children:[t.jsxs("div",{className:h.clsx("richtext-mb-2 richtext-flex richtext-items-center richtext-gap-2",{"richtext-text-[#1f6feb]":o==="note","richtext-text-[#238636]":o==="tip","richtext-text-[#ab7df8]":o==="important","richtext-text-[#d29922]":o==="warning","richtext-text-[#f85149]":o==="caution"}),children:[t.jsx(s,{className:"richtext-size-5"}),t.jsx("span",{className:"richtext-font-semibold",children:i})]}),c&&t.jsx("p",{className:"richtext-pl-[28px]",children:c})]})})}const w=[{value:"note",label:"Note",icon:"Info"},{value:"tip",label:"Tip",icon:"Lightbulb"},{value:"important",label:"Important",icon:"AlertCircle"},{value:"warning",label:"Warning",icon:"TriangleAlert"},{value:"caution",label:"Caution",icon:"OctagonAlert"}];function M(){const{t:l}=k.useLocale(),o=e.useEditorInstance(),i=e.useButtonProps(C.name),[c,a]=d.useState(!1),[s,u]=d.useState("note"),[p,b]=d.useState(""),[g,f]=d.useState(""),{icon:y=void 0,tooltip:T=void 0,shortcutKeys:A=void 0,tooltipOptions:L={},isActive:N=void 0}=(i==null?void 0:i.componentProps)??{},{dataState:S,disabled:v}=e.useToggleActive(N),I=()=>{o&&(o.chain().focus().setCallout({type:s,title:p,body:g}).run(),a(!1),u("note"),b(""),f(""))},O=()=>{v||a(!0)};return i?t.jsxs(e.Dialog,{onOpenChange:a,open:c,children:[t.jsx(e.DialogTrigger,{asChild:!0,children:t.jsx(e.ActionButton,{action:O,dataState:S,disabled:v,icon:y,shortcutKeys:A,tooltip:T,tooltipOptions:L})}),t.jsxs(e.DialogContent,{children:[t.jsx(e.DialogTitle,{children:l("editor.callout.dialog.title")}),t.jsxs("div",{className:"richtext-space-y-4 richtext-py-4",children:[t.jsxs("div",{className:"richtext-space-y-2",children:[t.jsx(e.Label,{children:l("editor.callout.dialog.type")}),t.jsxs(e.Select,{onValueChange:u,value:s,children:[t.jsx(e.SelectTrigger,{children:t.jsx(e.SelectValue,{placeholder:l("editor.callout.dialog.type.placeholder")})}),t.jsx(e.SelectContent,{children:w.map(r=>t.jsx(e.SelectItem,{value:r.value,children:l(`editor.callout.type.${r.value}`)},r.value))})]})]}),t.jsxs("div",{className:"richtext-space-y-2",children:[t.jsx(e.Label,{children:l("editor.callout.dialog.title.label")}),t.jsx(e.Input,{onChange:r=>b(r.target.value),placeholder:l("editor.callout.dialog.title.placeholder"),value:p})]}),t.jsxs("div",{className:"richtext-space-y-2",children:[t.jsx(e.Label,{children:l("editor.callout.dialog.body.label")}),t.jsx(e.Input,{onChange:r=>f(r.target.value),placeholder:l("editor.callout.dialog.body.placeholder"),value:g})]})]}),t.jsxs(e.DialogFooter,{children:[t.jsx(e.Button,{onClick:()=>a(!1),variant:"outline",children:l("editor.callout.dialog.button.cancel")}),t.jsx(e.Button,{onClick:I,children:l("editor.callout.dialog.button.apply")})]})]})]}):t.jsx(t.Fragment,{})}function x(l){return o=>o.getAttribute(l)}const C=m.Node3.create({name:"callout",group:"block",selectable:!0,atom:!0,draggable:!0,inline:!1,addOptions(){var l;return{...(l=this.parent)==null?void 0:l.call(this),HTMLAttributes:{class:"callout"},button:({editor:o,t:i})=>({component:e.ActionButton,componentProps:{action:()=>!0,isActive:()=>o.isActive("callout"),disabled:!1,icon:"Callout",tooltip:i("editor.callout.tooltip")}})}},parseHTML(){return[{tag:"div.callout"}]},renderHTML({HTMLAttributes:l}){return["div",m.mergeAttributes(this.options&&this.options.HTMLAttributes||{},l)]},addAttributes(){return{type:{default:"",parseHTML:x("type")},title:{default:"",parseHTML:x("title")},body:{default:"",parseHTML:x("body")}}},addCommands(){return{setCallout:l=>({chain:o})=>o().insertContent({type:this.name,attrs:l}).run()}},addNodeView(){return h.ReactNodeViewRenderer(q)}});exports.Callout=C;exports.RichTextCallout=M;
|
package/lib/Callout.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { N as D, m as H } from "./index-
|
|
2
|
-
import { N as M, c as x, a as B } from "./clsx-
|
|
3
|
-
import { h as V, u as P, d as j, D as E, m as R, A as T, n as W, o as F, L as u, S as U, p as Y, q as _, r as $, s as q, j as v, t as z, B as C } from "./index-
|
|
1
|
+
import { N as D, m as H } from "./index-D0EmqTpe.js";
|
|
2
|
+
import { N as M, c as x, a as B } from "./clsx-Bg-2aTKh.js";
|
|
3
|
+
import { h as V, u as P, d as j, D as E, m as R, A as T, n as W, o as F, L as u, S as U, p as Y, q as _, r as $, s as q, j as v, t as z, B as C } from "./index-B2a7NqnN.js";
|
|
4
4
|
import { jsx as o, jsxs as l, Fragment as K } from "react/jsx-runtime";
|
|
5
5
|
import { useState as s } from "react";
|
|
6
6
|
import "./theme.js";
|
package/lib/Clear.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./index-C4WLt4NA.cjs"),n=require("react/jsx-runtime"),i=require("./index-czmcFIW7.cjs");function v(){const t=i.useButtonProps(s.name),{icon:e=void 0,tooltip:o=void 0,shortcutKeys:a=void 0,tooltipOptions:u={},action:r=void 0,isActive:l=void 0}=(t==null?void 0:t.componentProps)??{},{disabled:c}=i.useActive(l),d=()=>{c||r&&r()};return t?n.jsx(i.ActionButton,{action:d,disabled:c,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=v;
|
package/lib/Clear.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { N as l } from "./index-
|
|
1
|
+
import { N as l } from "./index-D0EmqTpe.js";
|
|
2
2
|
import { jsx as r, Fragment as p } from "react/jsx-runtime";
|
|
3
|
-
import { u as d, e as m, A as f } from "./index-
|
|
3
|
+
import { u as d, e as m, A as f } from "./index-B2a7NqnN.js";
|
|
4
4
|
function x() {
|
|
5
5
|
const o = d(v.name), {
|
|
6
6
|
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-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-C4WLt4NA.cjs"),i=require("react/jsx-runtime"),d=require("./index-czmcFIW7.cjs");require("react");require("./theme.cjs");var h=/(^|[^`])`([^`]+)`(?!`)$/,x=/(^|[^`])`([^`]+)`(?!`)/g,C=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:h,type:this.type})]},addPasteRules(){return[o.markPasteRule({find:x,type:this.type})]}});function v(){const e=d.useButtonProps(u.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:a,update:m}=d.useToggleActive(p),g=()=>{a||s&&(s(),m())};return e?i.jsx(d.ActionButton,{action:g,dataState:l,disabled:a,icon:t,shortcutKeys:n,tooltip:r,tooltipOptions:c}):i.jsx(i.Fragment,{})}const u=C.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=u;exports.RichTextCode=v;
|
package/lib/Code.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as m, f as l, h as g, m as h } from "./index-
|
|
1
|
+
import { M as m, f as l, h as g, m as h } from "./index-D0EmqTpe.js";
|
|
2
2
|
import { jsx as a, Fragment as M } from "react/jsx-runtime";
|
|
3
|
-
import { u as v, d as C, A as f } from "./index-
|
|
3
|
+
import { u as v, d as C, A as f } from "./index-B2a7NqnN.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "./theme.js";
|
|
6
6
|
var k = /(^|[^`])`([^`]+)`(?!`)$/, x = /(^|[^`])`([^`]+)`(?!`)/g, y = m.create({
|