@yoopta/callout 4.9.8 → 6.0.0-beta.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/dist/commands/{index.d.ts → callout-commands.d.ts} +3 -3
- package/dist/commands/callout-commands.d.ts.map +1 -0
- package/dist/extensions/with-callout-normalize.d.ts +3 -0
- package/dist/extensions/with-callout-normalize.d.ts.map +1 -0
- package/dist/extensions/with-callout-normalize.test.d.ts +2 -0
- package/dist/extensions/with-callout-normalize.test.d.ts.map +1 -0
- package/dist/extensions/with-callout.d.ts +3 -0
- package/dist/extensions/with-callout.d.ts.map +1 -0
- package/dist/index.d.ts +2 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin/{index.d.ts → callout-plugin.d.ts} +2 -2
- package/dist/plugin/callout-plugin.d.ts.map +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -6
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/plugin/index.d.ts.map +0 -1
- package/dist/ui/Callout.d.ts +0 -8
- package/dist/ui/Callout.d.ts.map +0 -1
- package/dist/ui/CalloutBlockOptions.d.ts +0 -10
- package/dist/ui/CalloutBlockOptions.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/index.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { YooEditor, YooptaPathIndex } from '@yoopta/editor';
|
|
2
|
-
import { CalloutElement, CalloutElementProps, CalloutTheme } from '../types';
|
|
1
|
+
import type { YooEditor, YooptaPathIndex } from '@yoopta/editor';
|
|
2
|
+
import type { CalloutElement, CalloutElementProps, CalloutTheme } from '../types';
|
|
3
3
|
type CalloutElementOptions = {
|
|
4
4
|
text?: string;
|
|
5
5
|
props?: Omit<CalloutElementProps, 'nodeType'>;
|
|
@@ -16,4 +16,4 @@ export type CalloutCommands = {
|
|
|
16
16
|
};
|
|
17
17
|
export declare const CalloutCommands: CalloutCommands;
|
|
18
18
|
export {};
|
|
19
|
-
//# sourceMappingURL=
|
|
19
|
+
//# sourceMappingURL=callout-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callout-commands.d.ts","sourceRoot":"","sources":["../../src/commands/callout-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EAEnB,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,KAAK,qBAAqB,GAAG;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC;CAC/C,CAAC;AAEF,KAAK,oBAAoB,GAAG,qBAAqB,GAAG;IAClD,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,oBAAoB,EAAE,CACpB,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,KACrC,cAAc,CAAC;IACpB,aAAa,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,KAAK,IAAI,CAAC;IACpF,aAAa,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,kBAAkB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CACvF,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAyB7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with-callout-normalize.d.ts","sourceRoot":"","sources":["../../src/extensions/with-callout-normalize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG7D,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,qCAmEzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with-callout-normalize.test.d.ts","sourceRoot":"","sources":["../../src/extensions/with-callout-normalize.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with-callout.d.ts","sourceRoot":"","sources":["../../src/extensions/with-callout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAI7D,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,qCAIhE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { Callout } from './plugin';
|
|
1
|
+
import { Callout } from './plugin/callout-plugin';
|
|
2
2
|
import { CalloutElement, CalloutElementProps } from './types';
|
|
3
|
-
|
|
4
|
-
declare module 'slate' {
|
|
5
|
-
interface CustomTypes {
|
|
6
|
-
Element: CalloutElement;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export { CalloutCommands } from './commands';
|
|
3
|
+
export { CalloutCommands } from './commands/callout-commands';
|
|
10
4
|
export default Callout;
|
|
11
5
|
export { CalloutElement, CalloutElementProps };
|
|
12
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{generateId as o,buildBlockData as t,Blocks as e,Elements as r,UI as l,useBlockData as a,useYooptaEditor as c,useYooptaReadOnly as n,YooptaPlugin as i,deserializeTextNodes as s,serializeTextNodes as d,serializeTextNodesIntoMarkdown as u}from"@yoopta/editor";import{jsxs as p,jsx as h}from"react/jsx-runtime";import*as b from"react";const g={buildCalloutElements:(t,e={})=>({id:o(),type:"callout",children:[{text:(null==e?void 0:e.text)||""}],props:e.props}),insertCallout:(o,r={})=>{const{at:l,focus:a,text:c,props:n}=r,i=g.buildCalloutElements(o,{text:c,props:n}),s=t({value:[i],type:"Callout"});e.insertBlock(o,s.type,{at:l,focus:a,blockData:s})},deleteCallout:(o,t)=>{e.deleteBlock(o,{blockId:t})},updateCalloutTheme:(o,t,e)=>{r.updateElement(o,t,{type:"callout",props:{theme:e}})}};function y(o,t){var e={};for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&t.indexOf(r)<0&&(e[r]=o[r]);if(null!=o&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(r=Object.getOwnPropertySymbols(o);l<r.length;l++)t.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(o,r[l])&&(e[r[l]]=o[r[l]])}return e}var m,f;function w(){return w=Object.assign?Object.assign.bind():function(o){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r])}return o},w.apply(this,arguments)}"function"==typeof SuppressedError&&SuppressedError;var v,k=function(o){return b.createElement("svg",w({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"success_svg__lucide success_svg__lucide-circle-check"},o),m||(m=b.createElement("circle",{cx:12,cy:12,r:10})),f||(f=b.createElement("path",{d:"m9 12 2 2 4-4"})))};function x(){return x=Object.assign?Object.assign.bind():function(o){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r])}return o},x.apply(this,arguments)}var O,j,C=function(o){return b.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"warning_svg__lucide warning_svg__lucide-triangle-alert"},o),v||(v=b.createElement("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4M12 17h.01"})))};function N(){return N=Object.assign?Object.assign.bind():function(o){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r])}return o},N.apply(this,arguments)}var _,E,$=function(o){return b.createElement("svg",N({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"error_svg__lucide error_svg__lucide-circle-x"},o),O||(O=b.createElement("circle",{cx:12,cy:12,r:10})),j||(j=b.createElement("path",{d:"m15 9-6 6M9 9l6 6"})))};function L(){return L=Object.assign?Object.assign.bind():function(o){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r])}return o},L.apply(this,arguments)}var B,M=function(o){return b.createElement("svg",L({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"default_svg__lucide default_svg__lucide-info"},o),_||(_=b.createElement("circle",{cx:12,cy:12,r:10})),E||(E=b.createElement("path",{d:"M12 16v-4M12 8h.01"})))};function P(){return P=Object.assign?Object.assign.bind():function(o){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r])}return o},P.apply(this,arguments)}var S,z=function(o){return b.createElement("svg",P({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor","aria-label":"Note"},o),B||(B=b.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 1.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 7c0-3.14 2.56-5.7 5.7-5.7ZM7 0C3.14 0 0 3.14 0 7s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7Zm1 3H6v5h2V3Zm0 6H6v2h2V9Z"})))};function A(){return A=Object.assign?Object.assign.bind():function(o){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r])}return o},A.apply(this,arguments)}var I=function(o){return b.createElement("svg",A({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"checkmark_svg__lucide checkmark_svg__lucide-check"},o),S||(S=b.createElement("path",{d:"M20 6 9 17l-5-5"})))};const D={default:{backgroundColor:"#f5f7f9",color:"#000"},info:{backgroundColor:"#e1f3fe",color:"#08a2e7",borderLeft:"4px solid #08a2e7"},success:{backgroundColor:"#d1fae5",color:"#12b77f",borderLeft:"4px solid #12b77f"},warning:{backgroundColor:"#fef3c9",color:"#f97415",borderLeft:"4px solid #f97415"},error:{backgroundColor:"#fee1e2",color:"#ee4443",borderLeft:"4px solid #ee4443"}},{ExtendedBlockActions:T,BlockOptionsMenuGroup:W,BlockOptionsMenuItem:R,BlockOptionsSeparator:Z}=l,H=({editor:o,block:t,props:e})=>{const l=e=>{r.updateElement(o,t.id,{type:"callout",props:{theme:e}})},a=o=>(null==e?void 0:e.theme)===o;return p(T,Object.assign({onClick:()=>o.setPath({current:t.meta.order}),className:"yoopta-callout-options"},{children:[h(Z,{}),p(W,{children:[h(R,{children:p("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-callout-justify-between",onClick:()=>l("default"),style:{backgroundColor:a("default")?D.default.backgroundColor:void 0}},{children:[p("span",Object.assign({className:"yoo-callout-flex"},{children:[h(M,{width:16,height:16,color:D.default.color,className:"yoo-callout-w-4 yoo-callout-h-4 yoo-callout-mr-2"}),"Default"]})),a("default")&&h(I,{width:16,height:16,color:"#000",className:"yoo-callout-w-4 yoo-callout-h-4"})]}))}),h(R,{children:p("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-callout-justify-between",onClick:()=>l("info"),style:{backgroundColor:a("info")?D.info.backgroundColor:void 0}},{children:[p("span",Object.assign({className:"yoo-callout-flex"},{children:[h(z,{width:16,height:16,color:D.info.color,className:"yoo-callout-w-4 yoo-callout-h-4 yoo-callout-mr-2"}),"Info"]})),a("info")&&h(I,{width:16,height:16,color:"#000",className:"yoo-callout-w-4 yoo-callout-h-4"})]}))}),h(R,{children:p("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-callout-justify-between",onClick:()=>l("success"),style:{backgroundColor:a("success")?D.success.backgroundColor:void 0}},{children:[p("span",Object.assign({className:"yoo-callout-flex"},{children:[h(k,{width:16,height:16,color:D.success.color,className:"yoo-callout-w-4 yoo-callout-h-4 yoo-callout-mr-2"}),"Success"]})),a("success")&&h(I,{width:16,height:16,color:"#000",className:"yoo-callout-w-4 yoo-callout-h-4"})]}))}),h(R,{children:p("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-callout-justify-between",onClick:()=>l("warning"),style:{backgroundColor:a("warning")?D.warning.backgroundColor:void 0}},{children:[p("span",Object.assign({className:"yoo-callout-flex"},{children:[h(C,{width:16,height:16,color:D.warning.color,className:"yoo-callout-w-4 yoo-callout-h-4 yoo-callout-mr-2"}),"Warning"]})),a("warning")&&h(I,{width:16,height:16,color:"#000",className:"yoo-callout-w-4 yoo-callout-h-4"})]}))}),h(R,{children:p("button",Object.assign({type:"button",className:"yoopta-block-options-button yoo-callout-justify-between",onClick:()=>l("error"),style:{backgroundColor:a("error")?D.error.backgroundColor:void 0}},{children:[p("span",Object.assign({className:"yoo-callout-flex"},{children:[h($,{width:16,height:16,color:D.error.color,className:"yoo-callout-w-4 yoo-callout-h-4 yoo-callout-mr-2"}),"Error"]})),a("error")&&h(I,{width:16,height:16,color:"#000",className:"yoo-callout-w-4 yoo-callout-h-4"})]}))})]})]}))},V={default:M,success:k,warning:C,error:$,info:z},G=o=>{var{extendRender:t}=o,e=y(o,["extendRender"]);const{element:r,attributes:l,children:i,blockId:s,HTMLAttributes:d={}}=e,{className:u=""}=d,b=y(d,["className"]),g=a(s),m=c(),f=n(),{theme:w="default"}=r.props||{};if(t)return t(e);const v=V[w];return p("div",Object.assign({className:`yoopta-callout yoopta-callout-theme-${w} ${u}`},b,l,{children:[h("div",Object.assign({className:"yoopta-callout-icon"},{children:h(v,{})})),!f&&h(H,{block:g,editor:m,props:r.props}),i]}))};G.displayName="Callout";const q=new i({type:"Callout",elements:{callout:{render:G,props:{theme:"default"}}},commands:g,options:{display:{title:"Callout",description:"Make writing stand out"},shortcuts:["<"]},parsers:{html:{deserialize:{nodeNames:["DL"],parse(t,e){if("DL"===t.nodeName||"DIV"===t.nodeName){const r=t.getAttribute("data-theme");return{id:o(),type:"callout",children:s(e,t.childNodes),props:{theme:r}}}}},serialize:(o,t,e)=>{var r,l;const a=D[(null===(r=o.props)||void 0===r?void 0:r.theme)||"default"],{align:c="left",depth:n=0}=e||{};return`<dl data-theme="${(null===(l=o.props)||void 0===l?void 0:l.theme)||"default"}" data-meta-align="${c}" data-meta-depth="${n}" style="margin-left: ${20*n}px; text-align: ${c}; padding: .5rem .5rem .5rem 1rem; margin-top: .5rem; border-radius: .375rem; color: ${a.color}; border-left: ${a.borderLeft||0}; background-color: ${a.backgroundColor}">${d(o.children)}</dl>`}},markdown:{serialize:(o,t)=>`> ${u(o.children)}`},email:{serialize:(o,t,e)=>{var r,l;const a=D[(null===(r=o.props)||void 0===r?void 0:r.theme)||"default"],{align:c="left",depth:n=0}=e||{};return`\n <table style="width: 100%; ">\n <tbody style="width: 100%;">\n <tr>\n <td data-theme="${(null===(l=o.props)||void 0===l?void 0:l.theme)||"default"}" data-meta-align="${c}" data-meta-depth="${n}" style="\n font-size: 16px;\n line-height: 1.75rem;\n margin-left: ${20*n}px; text-align: ${c}; padding: .5rem .5rem .5rem 1rem; margin-top: .5rem; border-radius: .375rem; color: ${a.color}; border-left: ${a.borderLeft||0}; background-color: ${a.backgroundColor};">${d(o.children)}\n </td>\n </tr>\n </tbody>\n </table>`}}}});!function(o,t){void 0===t&&(t={});var e=t.insertAt;if(o&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===e&&r.firstChild?r.insertBefore(l,r.firstChild):r.appendChild(l),l.styleSheet?l.styleSheet.cssText=o:l.appendChild(document.createTextNode(o))}}(".yoo-callout-mr-2{margin-right:.5rem}.yoo-callout-flex{display:flex}.yoo-callout-h-4{height:1rem}.yoo-callout-w-4{width:1rem}.yoo-callout-justify-between{justify-content:space-between}.yoopta-callout .yoopta-callout-options{opacity:0;transition:opacity .15s ease-in-out}.yoopta-callout:hover .yoopta-callout-options{opacity:1}.yoopta-callout{border-radius:.375rem;font-size:16px;gap:.75rem;line-height:1.75rem;margin-top:.5rem;padding:.5rem .5rem .5rem 2.5rem;position:relative}.yoopta-callout-icon{left:1rem;margin-top:.375rem;position:absolute;top:.5rem;width:1rem}.yoopta-callout-theme-default{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(245 247 249/var(--tw-bg-opacity));color:rgb(0 0 0/var(--tw-text-opacity))}.yoopta-callout-theme-info{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(225 243 254/var(--tw-bg-opacity));border-left-color:rgb(8 162 231/var(--tw-border-opacity));border-left-width:4px;color:rgb(8 162 231/var(--tw-text-opacity))}.yoopta-callout-theme-success{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity));border-left-color:rgb(18 183 127/var(--tw-border-opacity));border-left-width:4px;color:rgb(18 183 127/var(--tw-text-opacity))}.yoopta-callout-theme-warning{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(254 243 201/var(--tw-bg-opacity));border-left-color:rgb(249 116 21/var(--tw-border-opacity));border-left-width:4px;color:rgb(249 116 21/var(--tw-text-opacity))}.yoopta-callout-theme-error{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(254 225 226/var(--tw-bg-opacity));border-left-color:rgb(238 68 67/var(--tw-border-opacity));border-left-width:4px;color:rgb(238 68 67/var(--tw-text-opacity))}");export{g as CalloutCommands,q as default};
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{generateId as t,buildBlockData as r,Blocks as n,Elements as o,YooptaPlugin as i,deserializeTextNodes as a,serializeTextNodes as s,serializeTextNodesIntoMarkdown as l}from"@yoopta/editor";const c={buildCalloutElements:(e,r={})=>({id:t(),type:"callout",children:[{text:(null==r?void 0:r.text)||""}],props:r.props}),insertCallout:(e,t={})=>{const{at:o,focus:i,text:a,props:s}=t,l=c.buildCalloutElements(e,{text:a,props:s}),f=r({value:[l],type:"Callout"});n.insertBlock(e,f.type,{at:o,focus:i,blockData:f})},deleteCallout:(e,t)=>{n.deleteBlock(e,{blockId:t})},updateCalloutTheme:(e,t,r)=>{o.updateElement(e,t,{type:"callout",props:{theme:r}})}};var f={ancestors(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,n=f.levels(e,t);return n=r?n.slice(1):n.slice(0,-1)},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n];if(o!==t[n])break;r.push(o)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return f.equals(n,o)&&i>a},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return f.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return f.equals(n,o)&&i<a},equals:(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>1===f.compare(e,t),isAncestor:(e,t)=>e.length<t.length&&0===f.compare(e,t),isBefore:(e,t)=>-1===f.compare(e,t),isChild:(e,t)=>e.length===t.length+1&&0===f.compare(e,t),isCommon:(e,t)=>e.length<=t.length&&0===f.compare(e,t),isDescendant:(e,t)=>e.length>t.length&&0===f.compare(e,t),isParent:(e,t)=>e.length+1===t.length&&0===f.compare(e,t),isPath:e=>Array.isArray(e)&&(0===e.length||"number"==typeof e[0]),isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&f.equals(r,n)},levels(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!f.isAncestor(t,e)&&!f.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return null;var n=[...e],{affinity:o="forward"}=r;if(0===e.length)return n;switch(t.type){case"insert_node":var{path:i}=t;(f.equals(i,n)||f.endsBefore(i,n)||f.isAncestor(i,n))&&(n[i.length-1]+=1);break;case"remove_node":var{path:a}=t;if(f.equals(a,n)||f.isAncestor(a,n))return null;f.endsBefore(a,n)&&(n[a.length-1]-=1);break;case"merge_node":var{path:s,position:l}=t;f.equals(s,n)||f.endsBefore(s,n)?n[s.length-1]-=1:f.isAncestor(s,n)&&(n[s.length-1]-=1,n[s.length]+=l);break;case"split_node":var{path:c,position:p}=t;if(f.equals(c,n)){if("forward"===o)n[n.length-1]+=1;else if("backward"!==o)return null}else f.endsBefore(c,n)?n[c.length-1]+=1:f.isAncestor(c,n)&&e[c.length]>=p&&(n[c.length-1]+=1,n[c.length]-=p);break;case"move_node":var{path:u,newPath:d}=t;if(f.equals(u,d))return n;if(f.isAncestor(u,n)||f.equals(u,n)){var h=d.slice();return f.endsBefore(u,d)&&u.length<d.length&&(h[u.length-1]-=1),h.concat(n.slice(u.length))}f.isSibling(u,d)&&(f.isAncestor(d,n)||f.equals(d,n))?f.endsBefore(u,n)?n[u.length-1]-=1:n[u.length-1]+=1:f.endsBefore(d,n)||f.equals(d,n)||f.isAncestor(d,n)?(f.endsBefore(u,n)&&(n[u.length-1]-=1),n[d.length-1]+=1):f.endsBefore(u,n)&&(f.equals(d,n)&&(n[d.length-1]+=1),n[u.length-1]-=1)}return n}};function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function u(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===p(t)?t:String(t)}function d(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var g=["anchor","focus"];function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var y={edges(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return y.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=y.edges(e);return t},equals:(e,t)=>B.equals(e.anchor,t.anchor)&&B.equals(e.focus,t.focus),surrounds(e,t){var r=y.intersection(e,t);return!!r&&y.equals(r,t)},includes(e,t){if(y.isRange(t)){if(y.includes(e,t.anchor)||y.includes(e,t.focus))return!0;var[r,n]=y.edges(e),[o,i]=y.edges(t);return B.isBefore(r,o)&&B.isAfter(n,i)}var[a,s]=y.edges(e),l=!1,c=!1;return B.isPoint(t)?(l=B.compare(t,a)>=0,c=B.compare(t,s)<=0):(l=f.compare(t,a.path)>=0,c=f.compare(t,s.path)<=0),l&&c},intersection(e,t){var r=h(e,g),[n,o]=y.edges(e),[i,a]=y.edges(t),s=B.isBefore(n,i)?i:n,l=B.isBefore(o,a)?o:a;return B.isBefore(l,s)?null:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({anchor:s,focus:l},r)},isBackward(e){var{anchor:t,focus:r}=e;return B.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return B.equals(t,r)},isExpanded:e=>!y.isCollapsed(e),isForward:e=>!y.isBackward(e),isRange:e=>S(e)&&B.isPoint(e.anchor)&&B.isPoint(e.focus),*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=y.edges(e);return t},transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var n,o,{affinity:i="inward"}=r;if("inward"===i){var a=y.isCollapsed(e);y.isForward(e)?(n="forward",o=a?n:"backward"):(n="backward",o=a?n:"forward")}else"outward"===i?y.isForward(e)?(n="backward",o="forward"):(n="forward",o="backward"):(n=i,o=i);var s=B.transform(e.anchor,t,{affinity:n}),l=B.transform(e.focus,t,{affinity:o});return s&&l?{anchor:s,focus:l}:null}},m=function(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!S(e)&&("function"!=typeof e.apply&&(t?j.isNodeList(e.children):Array.isArray(e.children)))},b={isAncestor(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return S(e)&&j.isNodeList(e.children,{deep:t})},isElement:m,isElementList(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Array.isArray(e)&&e.every(e=>b.isElement(e,{deep:t}))},isElementProps:e=>void 0!==e.children,isElementType:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return m(e)&&e[r]===t},matches(e,t){for(var r in t)if("children"!==r&&e[r]!==t[r])return!1;return!0}},w=["children"],O=["text"];function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var j={ancestor(e,t){var r=j.get(e,t);if(M.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(L.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var n of f.ancestors(t,r)){var o=[j.ancestor(e,n),n];yield o}}()},child(e,t){if(M.isText(e))throw new Error("Cannot get the child of a text node: ".concat(L.stringify(e)));var r=e.children[t];if(null==r)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(L.stringify(e)));return r},children(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var{reverse:n=!1}=r,o=j.ancestor(e,t),{children:i}=o,a=n?i.length-1:0;n?a>=0:a<i.length;){var s=j.child(o,a),l=t.concat(a);yield[s,l],a=n?a-1:a+1}}()},common(e,t,r){var n=f.common(t,r);return[j.get(e,n),n]},descendant(e,t){var r=j.get(e,t);if(C.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(L.stringify(r)));return r},descendants(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of j.nodes(e,t))0!==n.length&&(yield[r,n])}()},elements(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of j.nodes(e,t))b.isElement(r)&&(yield[r,n])}()},extractProps:e=>b.isAncestor(e)?h(e,w):h(e,O),first(e,t){for(var r=t.slice(),n=j.get(e,r);n&&!M.isText(n)&&0!==n.children.length;)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){var r={children:e.children},[n,o]=y.edges(t),i=j.nodes(r,{reverse:!0,pass:e=>{var[,r]=e;return!y.includes(t,r)}}),a=function(){if(!y.includes(t,s)){var e=s[s.length-1];K(r,f.parent(s),t=>G(t,e,1))}f.equals(s,o.path)&&Q(r,s,e=>{var t=e.text.slice(0,o.offset);return P(P({},e),{},{text:t})}),f.equals(s,n.path)&&Q(r,s,e=>{var t=e.text.slice(n.offset);return P(P({},e),{},{text:t})})};for(var[,s]of i)a();return r.children},get(e,t){var r=j.getIf(e,t);if(void 0===r)throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(L.stringify(e)));return r},getIf(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(M.isText(r)||!r.children[o])return;r=r.children[o]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(M.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return M.isText(e)||b.isElement(e,{deep:t})||C.isEditor(e,{deep:t})},isNodeList(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Array.isArray(e)&&e.every(e=>j.isNode(e,{deep:t}))},last(e,t){for(var r=t.slice(),n=j.get(e,r);n&&!M.isText(n)&&0!==n.children.length;){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf(e,t){var r=j.get(e,t);if(!M.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(L.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var n of f.levels(t,r)){var o=j.get(e,n);yield[o,n]}}()},matches:(e,t)=>b.isElement(e)&&b.isElementProps(t)&&b.matches(e,t)||M.isText(e)&&M.isTextProps(t)&&M.matches(e,t),nodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var{pass:r,reverse:n=!1}=t,{from:o=[],to:i}=t,a=new Set,s=[],l=e;!i||!(n?f.isBefore(s,i):f.isAfter(s,i));)if(a.has(l)||(yield[l,s]),a.has(l)||M.isText(l)||0===l.children.length||null!=r&&!1!==r([l,s])){if(0===s.length)break;if(!n){var c=f.next(s);if(j.has(e,c)){s=c,l=j.get(e,s);continue}}if(n&&0!==s[s.length-1])s=f.previous(s),l=j.get(e,s);else s=f.parent(s),l=j.get(e,s),a.add(l)}else{a.add(l);var p=n?l.children.length-1:0;f.isAncestor(s,o)&&(p=o[s.length]),s=s.concat(p),l=j.get(e,s)}}()},parent(e,t){var r=f.parent(t),n=j.get(e,r);if(M.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string:e=>M.isText(e)?e.text:e.children.map(j.string).join(""),texts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of j.nodes(e,t))M.isText(r)&&(yield[r,n])}()}};function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var _,N={isNodeOperation:e=>N.isOperation(e)&&e.type.endsWith("_node"),isOperation(e){if(!S(e))return!1;switch(e.type){case"insert_node":case"remove_node":return f.isPath(e.path)&&j.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&f.isPath(e.path);case"merge_node":return"number"==typeof e.position&&f.isPath(e.path)&&S(e.properties);case"move_node":return f.isPath(e.path)&&f.isPath(e.newPath);case"set_node":return f.isPath(e.path)&&S(e.properties)&&S(e.newProperties);case"set_selection":return null===e.properties&&y.isRange(e.newProperties)||null===e.newProperties&&y.isRange(e.properties)||S(e.properties)&&S(e.newProperties);case"split_node":return f.isPath(e.path)&&"number"==typeof e.position&&S(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every(e=>N.isOperation(e)),isSelectionOperation:e=>N.isOperation(e)&&e.type.endsWith("_selection"),isTextOperation:e=>N.isOperation(e)&&e.type.endsWith("_text"),inverse(e){switch(e.type){case"insert_node":return k(k({},e),{},{type:"remove_node"});case"insert_text":return k(k({},e),{},{type:"remove_text"});case"merge_node":return k(k({},e),{},{type:"split_node",path:f.previous(e.path)});case"move_node":var{newPath:t,path:r}=e;if(f.equals(t,r))return e;if(f.isSibling(r,t))return k(k({},e),{},{path:t,newPath:r});var n=f.transform(r,e),o=f.transform(f.next(r),e);return k(k({},e),{},{path:n,newPath:o});case"remove_node":return k(k({},e),{},{type:"insert_node"});case"remove_text":return k(k({},e),{},{type:"insert_text"});case"set_node":var{properties:i,newProperties:a}=e;return k(k({},e),{},{properties:a,newProperties:i});case"set_selection":var{properties:s,newProperties:l}=e;return k(k({},e),{},null==s?{properties:l,newProperties:null}:null==l?{properties:null,newProperties:s}:{properties:l,newProperties:s});case"split_node":return k(k({},e),{},{type:"merge_node",path:f.next(e.path)})}}},S=e=>"object"==typeof e&&null!==e,A=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++)if(n[i]!==o[i])return!1}else if(S(n)&&S(o)){if(!A(n,o))return!1}else if(n!==o)return!1}for(var a in t)if(void 0===e[a]&&void 0!==t[a])return!1;return!0},T=e=>e.selection?e.selection:e.children.length>0?C.end(e,[]):[0];!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(_||(_={})),_.L,_.L,_.V,_.LV,_.LVT,_.LV,_.V,_.V,_.T,_.LVT,_.T,_.T,_.Any,_.Extend,_.ZWJ,_.Any,_.SpacingMark,_.Prepend,_.Any,_.ZWJ,_.ExtPict,_.RI,_.RI;var C={above:(e,t)=>e.above(t),addMark(e,t,r){e.addMark(t,r)},after:(e,t,r)=>e.after(t,r),before:(e,t,r)=>e.before(t,r),deleteBackward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e,t){e.deleteFragment(t)},edges:(e,t)=>e.edges(t),elementReadOnly(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.elementReadOnly(t)},end:(e,t)=>e.end(t),first:(e,t)=>e.first(t),fragment:(e,t)=>e.fragment(t),hasBlocks:(e,t)=>e.hasBlocks(t),hasInlines:(e,t)=>e.hasInlines(t),hasPath:(e,t)=>e.hasPath(t),hasTexts:(e,t)=>e.hasTexts(t),insertBreak(e){e.insertBreak()},insertFragment(e,t,r){e.insertFragment(t,r)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>e.isBlock(t),isEdge:(e,t,r)=>e.isEdge(t,r),isEditor:e=>function(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!S(e))return!1;var r="function"==typeof e.addMark&&"function"==typeof e.apply&&"function"==typeof e.deleteFragment&&"function"==typeof e.insertBreak&&"function"==typeof e.insertSoftBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertText&&"function"==typeof e.isElementReadOnly&&"function"==typeof e.isInline&&"function"==typeof e.isSelectable&&"function"==typeof e.isVoid&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.removeMark&&"function"==typeof e.getDirtyPaths&&(null===e.marks||S(e.marks))&&(null===e.selection||y.isRange(e.selection))&&(!t||j.isNodeList(e.children))&&N.isOperationList(e.operations);return r}(e),isElementReadOnly:(e,t)=>e.isElementReadOnly(t),isEmpty:(e,t)=>e.isEmpty(t),isEnd:(e,t,r)=>e.isEnd(t,r),isInline:(e,t)=>e.isInline(t),isNormalizing:e=>e.isNormalizing(),isSelectable:(e,t)=>e.isSelectable(t),isStart:(e,t,r)=>e.isStart(t,r),isVoid:(e,t)=>e.isVoid(t),last:(e,t)=>e.last(t),leaf:(e,t,r)=>e.leaf(t,r),levels:(e,t)=>e.levels(t),marks:e=>e.getMarks(),next:(e,t)=>e.next(t),node:(e,t,r)=>e.node(t,r),nodes:(e,t)=>e.nodes(t),normalize(e,t){e.normalize(t)},parent:(e,t,r)=>e.parent(t,r),path:(e,t,r)=>e.path(t,r),pathRef:(e,t,r)=>e.pathRef(t,r),pathRefs:e=>e.pathRefs(),point:(e,t,r)=>e.point(t,r),pointRef:(e,t,r)=>e.pointRef(t,r),pointRefs:e=>e.pointRefs(),positions:(e,t)=>e.positions(t),previous:(e,t)=>e.previous(t),range:(e,t,r)=>e.range(t,r),rangeRef:(e,t,r)=>e.rangeRef(t,r),rangeRefs:e=>e.rangeRefs(),removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start:(e,t)=>e.start(t),string:(e,t,r)=>e.string(t,r),unhangRange:(e,t,r)=>e.unhangRange(t,r),void:(e,t)=>e.void(t),withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,r)=>e.shouldMergeNodesRemovePrevNode(t,r)};function D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var B={compare(e,t){var r=f.compare(e.path,t.path);return 0===r?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter:(e,t)=>1===B.compare(e,t),isBefore:(e,t)=>-1===B.compare(e,t),equals:(e,t)=>e.offset===t.offset&&f.equals(e.path,t.path),isPoint:e=>S(e)&&"number"==typeof e.offset&&f.isPath(e.path),transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var{affinity:n="forward"}=r,{path:o,offset:i}=e;switch(t.type){case"insert_node":case"move_node":o=f.transform(o,t,r);break;case"insert_text":f.equals(t.path,o)&&(t.offset<i||t.offset===i&&"forward"===n)&&(i+=t.text.length);break;case"merge_node":f.equals(t.path,o)&&(i+=t.position),o=f.transform(o,t,r);break;case"remove_text":f.equals(t.path,o)&&t.offset<=i&&(i-=Math.min(i-t.offset,t.text.length));break;case"remove_node":if(f.equals(t.path,o)||f.isAncestor(t.path,o))return null;o=f.transform(o,t,r);break;case"split_node":if(f.equals(t.path,o)){if(t.position===i&&null==n)return null;(t.position<i||t.position===i&&"forward"===n)&&(i-=t.position,o=f.transform(o,t,q(q({},r),{},{affinity:"forward"})))}else o=f.transform(o,t,r);break;default:return e}return{path:o,offset:i}}},R=void 0,L={setScrubber(e){R=e},stringify:e=>JSON.stringify(e,R)},$=["text"],z=["anchor","focus","merge"];function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var M={equals(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{loose:n=!1}=r;function o(e){return h(e,$)}return A(n?o(e):e,n?o(t):t)},isText:e=>S(e)&&"string"==typeof e.text,isTextList:e=>Array.isArray(e)&&e.every(e=>M.isText(e)),isTextProps:e=>void 0!==e.text,matches(e,t){for(var r in t)if("text"!==r&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[{leaf:I({},e)}];for(var n of t){var{anchor:o,focus:i,merge:a}=n,s=h(n,z),[l,c]=y.edges(n),f=[],p=0,u=l.offset,d=c.offset,g=null!=a?a:Object.assign;for(var{leaf:v}of r){var{length:m}=v.text,b=p;if(p+=m,u<=b&&p<=d)g(v,s),f.push({leaf:v});else if(u!==d&&(u===p||d===b)||u>p||d<b||d===b&&0!==b)f.push({leaf:v});else{var w=v,O=void 0,x=void 0;if(d<p){var P=d-b;x={leaf:I(I({},w),{},{text:w.text.slice(P)})},w=I(I({},w),{},{text:w.text.slice(0,P)})}if(u>b){var j=u-b;O={leaf:I(I({},w),{},{text:w.text.slice(0,j)})},w=I(I({},w),{},{text:w.text.slice(j)})}g(w,s),O&&f.push(O),f.push({leaf:w}),x&&f.push(x)}}r=f}if(r.length>1){var E=0;for(var[k,_]of r.entries()){var N=E,S=N+_.leaf.text.length,A={start:N,end:S};0===k&&(A.isFirst=!0),k===r.length-1&&(A.isLast=!0),_.position=A,E=S}}return r}};function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function W(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var J=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return[...e.slice(0,t),...n,...e.slice(t)]},Z=function(e,t,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];return[...e.slice(0,t),...o,...e.slice(t+r)]},G=Z,H=(e,t,r)=>{if(0===t.length)throw new Error("Cannot modify the editor");for(var n=j.get(e,t),o=t.slice(),i=r(n);o.length>1;){var a=o.pop(),s=j.get(e,o);i=W(W({},s),{},{children:Z(s.children,a,1,i)})}var l=o.pop();e.children=Z(e.children,l,1,i)},K=(e,t,r)=>{0===t.length?e.children=r(e.children):H(e,t,e=>{if(M.isText(e))throw new Error("Cannot get the element at path [".concat(t,"] because it refers to a leaf node: ").concat(L.stringify(e)));return W(W({},e),{},{children:r(e.children)})})},Q=(e,t,r)=>H(e,t,e=>{if(!M.isText(e))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(L.stringify(e)));return r(e)});function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function X(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Y={transform(e,t){var r=!1;switch(t.type){case"insert_node":var{path:n,node:o}=t;K(e,f.parent(n),e=>{var t=n[n.length-1];if(t>e.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));return J(e,t,o)}),r=!0;break;case"insert_text":var{path:i,offset:a,text:s}=t;if(0===s.length)break;Q(e,i,e=>{var t=e.text.slice(0,a),r=e.text.slice(a);return X(X({},e),{},{text:t+s+r})}),r=!0;break;case"merge_node":var{path:l}=t,c=l[l.length-1],p=f.previous(l),u=p[p.length-1];K(e,f.parent(l),e=>{var t,r=e[c],n=e[u];if(M.isText(r)&&M.isText(n))t=X(X({},n),{},{text:n.text+r.text});else{if(M.isText(r)||M.isText(n))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(l,"] to nodes of different interfaces: ").concat(L.stringify(r)," ").concat(L.stringify(n)));t=X(X({},n),{},{children:n.children.concat(r.children)})}return Z(e,u,2,t)}),r=!0;break;case"move_node":var{path:d,newPath:h}=t,g=d[d.length-1];if(f.isAncestor(d,h))throw new Error("Cannot move a path [".concat(d,"] to new path [").concat(h,"] because the destination is inside itself."));var v=j.get(e,d);K(e,f.parent(d),e=>G(e,g,1));var m=f.transform(d,t),b=m[m.length-1];K(e,f.parent(m),e=>J(e,b,v)),r=!0;break;case"remove_node":var{path:w}=t,O=w[w.length-1];if(K(e,f.parent(w),e=>G(e,O,1)),e.selection){var x=X({},e.selection);for(var[P,E]of y.points(x)){var k=B.transform(P,t);if(null!=x&&null!=k)x[E]=k;else{var _=void 0,N=void 0;for(var[S,A]of j.texts(e)){if(-1!==f.compare(A,w)){N=[S,A];break}_=[S,A]}var T=!1;_&&N&&(T=!f.isSibling(_[1],w)&&(!!f.equals(N[1],w)||f.common(_[1],w).length<f.common(N[1],w).length)),_&&!T?x[E]={path:_[1],offset:_[0].text.length}:N?x[E]={path:N[1],offset:0}:x=null}}x&&y.equals(x,e.selection)||(e.selection=x)}break;case"remove_text":var{path:C,offset:D,text:q}=t;if(0===q.length)break;Q(e,C,e=>{var t=e.text.slice(0,D),r=e.text.slice(D+q.length);return X(X({},e),{},{text:t+r})}),r=!0;break;case"set_node":var{path:R,properties:$,newProperties:z}=t;if(0===R.length)throw new Error("Cannot set properties on the root node!");H(e,R,e=>{var t=X({},e);for(var r in z){if("children"===r||"text"===r)throw new Error('Cannot set the "'.concat(r,'" property of nodes!'));var n=z[r];null==n?delete t[r]:t[r]=n}for(var o in $)z.hasOwnProperty(o)||delete t[o];return t});break;case"set_selection":var{newProperties:V}=t;if(null==V){e.selection=null;break}if(null==e.selection){if(!y.isRange(V))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(L.stringify(V)," when there is no current selection."));e.selection=X({},V);break}var I=X({},e.selection);for(var F in V){var W=V[F];if(null==W){if("anchor"===F||"focus"===F)throw new Error('Cannot remove the "'.concat(F,'" selection property'));delete I[F]}else I[F]=W}e.selection=I;break;case"split_node":var{path:U,position:Y,properties:ee}=t,te=U[U.length-1];if(0===U.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(U,"] because the root node cannot be split."));K(e,f.parent(U),e=>{var t,r,n=e[te];if(M.isText(n)){var o=n.text.slice(0,Y),i=n.text.slice(Y);t=X(X({},n),{},{text:o}),r=X(X({},ee),{},{text:i})}else{var a=n.children.slice(0,Y),s=n.children.slice(Y);t=X(X({},n),{},{children:a}),r=X(X({},ee),{},{children:s})}return Z(e,te,1,t,r)}),r=!0}if(r&&e.selection){var re=X({},e.selection);for(var[ne,oe]of y.points(re))re[oe]=B.transform(ne,t);y.equals(re,e.selection)||(e.selection=re)}}},ee={insertNodes(e,t,r){e.insertNodes(t,r)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,r){e.setNodes(t,r)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,r){e.unsetNodes(t,r)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,r){e.wrapNodes(t,r)}},te={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,r){e.setPoint(t,r)},setSelection(e,t){e.setSelection(t)}},re={delete(e,t){e.delete(t)},insertFragment(e,t,r){e.insertFragment(t,r)},insertText(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};C.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=T(e)}=r;if(f.isPath(o)&&(o=C.range(e,o)),y.isRange(o))if(y.isCollapsed(o))o=o.anchor;else{var i=y.end(o);if(!n&&C.void(e,{at:i}))return;var a=y.start(o),s=C.pointRef(e,a),l=C.pointRef(e,i);ie.delete(e,{at:o,voids:n});var c=s.unref(),p=l.unref();o=c||p,ie.setSelection(e,{anchor:o,focus:o})}if(!(!n&&C.void(e,{at:o})||C.elementReadOnly(e,{at:o}))){var{path:u,offset:d}=o;t.length>0&&e.apply({type:"insert_text",path:u,offset:d,text:t})}})}};function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ie=oe(oe(oe(oe({},Y),ee),te),re);const ae=new i({type:"Callout",elements:e("callout",{render:t=>e("div",Object.assign({},t.attributes,{children:t.children})),props:{theme:"default"}}),commands:c,extensions:function(e,t){return e=function(e,t){const{normalizeNode:r}=e;return e.normalizeNode=n=>{const[o,i]=n;if(0===i.length&&C.isEditor(o)){const r=o.children.filter(e=>b.isElement(e)&&"callout"===e.type);if(r.length>1&&null!==t.path.current){const n=t.path.current,i=o.children.findIndex(e=>b.isElement(e)&&"callout"===e.type);if(-1===i)return;const a=r.slice(1).map(e=>b.isElement(e)?{id:e.id,type:"Callout",value:[e],meta:{align:"left",depth:0,order:n+1}}:null).filter(e=>!!e);for(let t=o.children.length-1;t>=0;t--){const r=o.children[t];b.isElement(r)&&"callout"===r.type&&t!==i&&ie.removeNodes(e,{at:[t]})}return void t.batchOperations(()=>{a.forEach((e,r)=>{t.insertBlock("Callout",{at:n+r+1,blockData:{id:e.id,value:e.value,meta:e.meta}})})})}}r(n)},e}(e,t)},options:{display:{title:"Callout",description:"Make writing stand out"},shortcuts:["<"]},parsers:{html:{deserialize:{nodeNames:["DL"],parse(e,r){if("DL"===e.nodeName||"DIV"===e.nodeName){const n=e.getAttribute("data-theme");return{id:t(),type:"callout",children:a(r,e.childNodes),props:{theme:n}}}}},serialize:(e,t,r)=>{var n;const o="inherit",i="inherit",a="inherit",{align:l="left",depth:c=0}=r||{};return`<dl data-theme="${(null===(n=e.props)||void 0===n?void 0:n.theme)||"default"}" data-meta-align="${l}" data-meta-depth="${c}" style="margin-left: ${20*c}px; text-align: ${l}; padding: .5rem .5rem .5rem 1rem; margin-top: .5rem; border-radius: .375rem; color: ${o}; border-left: ${i}; background-color: ${a}">${s(e.children)}</dl>`}},markdown:{serialize:e=>`> ${l(e.children)}`},email:{serialize:(e,t,r)=>{var n;const o="inherit",i="inherit",a="inherit",{align:l="left",depth:c=0}=r||{};return`\n <table style="width: 100%; ">\n <tbody style="width: 100%;">\n <tr>\n <td data-theme="${(null===(n=e.props)||void 0===n?void 0:n.theme)||"default"}" data-meta-align="${l}" data-meta-depth="${c}" style="\n font-size: 16px;\n line-height: 1.75rem;\n margin-left: ${20*c}px; text-align: ${l}; padding: .5rem .5rem .5rem 1rem; margin-top: .5rem; border-radius: .375rem; color: ${o}; border-left: ${i}; background-color: ${a};">${s(e.children)}\n </td>\n </tr>\n </tbody>\n </table>`}}}});export{c as CalloutCommands,ae as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { YooptaPlugin } from '@yoopta/editor';
|
|
2
|
-
import { CalloutElementMap } from '../types';
|
|
2
|
+
import type { CalloutElementMap } from '../types';
|
|
3
3
|
declare const Callout: YooptaPlugin<CalloutElementMap, Record<string, unknown>>;
|
|
4
4
|
export { Callout };
|
|
5
|
-
//# sourceMappingURL=
|
|
5
|
+
//# sourceMappingURL=callout-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callout-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/callout-plugin.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EAKb,MAAM,gBAAgB,CAAC;AAIxB,OAAO,KAAK,EAAE,iBAAiB,EAAqC,MAAM,UAAU,CAAC;AAMrF,QAAA,MAAM,OAAO,0DA0FX,CAAC;AAEH,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SlateElement } from '@yoopta/editor';
|
|
1
|
+
import type { SlateElement } from '@yoopta/editor';
|
|
2
2
|
export type CalloutPluginElementKeys = 'callout';
|
|
3
3
|
export type CalloutTheme = 'default' | 'success' | 'warning' | 'error' | 'info';
|
|
4
4
|
export type CalloutElementProps = {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAEjD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAChF,MAAM,MAAM,mBAAmB,GAAG;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;AAE1E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,cAAc,CAAC;CACzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/callout",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-beta.1",
|
|
4
4
|
"description": "Callout plugin for Yoopta Editor",
|
|
5
5
|
"author": "Darginec05 <devopsbanda@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Darginec05/Yoopta-Editor#readme",
|
|
@@ -14,12 +14,13 @@
|
|
|
14
14
|
"dist/"
|
|
15
15
|
],
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@yoopta/editor": ">=4.
|
|
18
|
-
"react": ">=
|
|
19
|
-
"react-dom": ">=
|
|
17
|
+
"@yoopta/editor": ">=4.9.9",
|
|
18
|
+
"react": ">=18.2.0",
|
|
19
|
+
"react-dom": ">=18.2.0"
|
|
20
20
|
},
|
|
21
21
|
"publishConfig": {
|
|
22
|
-
"registry": "https://registry.npmjs.org"
|
|
22
|
+
"registry": "https://registry.npmjs.org",
|
|
23
|
+
"access": "public"
|
|
23
24
|
},
|
|
24
25
|
"repository": {
|
|
25
26
|
"type": "git",
|
|
@@ -34,5 +35,5 @@
|
|
|
34
35
|
"bugs": {
|
|
35
36
|
"url": "https://github.com/Darginec05/Yoopta-Editor/issues"
|
|
36
37
|
},
|
|
37
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "ff6a5ae2937a56e0d1820df29fdfd6356171786c"
|
|
38
39
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAA4B,YAAY,EAAE,MAAM,UAAU,CAAC;AAEvG,KAAK,qBAAqB,GAAG;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC;CAC/C,CAAC;AAEF,KAAK,oBAAoB,GAAG,qBAAqB,GAAG;IAClD,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,oBAAoB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,cAAc,CAAC;IACtG,aAAa,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,KAAK,IAAI,CAAC;IACpF,aAAa,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,kBAAkB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CACvF,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAsB7B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,YAAY,EACb,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,iBAAiB,EAAgB,MAAM,UAAU,CAAC;AAI3D,QAAA,MAAM,OAAO,0DAqFX,CAAC;AAEH,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
package/dist/ui/Callout.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { PluginElementRenderProps } from '@yoopta/editor';
|
|
3
|
-
declare const CalloutRender: {
|
|
4
|
-
({ extendRender, ...props }: PluginElementRenderProps): JSX.Element;
|
|
5
|
-
displayName: string;
|
|
6
|
-
};
|
|
7
|
-
export { CalloutRender };
|
|
8
|
-
//# sourceMappingURL=Callout.d.ts.map
|
package/dist/ui/Callout.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../../src/ui/Callout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,wBAAwB,EAAoD,MAAM,gBAAgB,CAAC;AAiB5G,QAAA,MAAM,aAAa;iCAAgC,wBAAwB;;CAwB1E,CAAC;AAIF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { YooEditor, YooptaBlockData } from '@yoopta/editor';
|
|
2
|
-
import { CalloutElementProps } from '../types';
|
|
3
|
-
type Props = {
|
|
4
|
-
editor: YooEditor;
|
|
5
|
-
block: YooptaBlockData;
|
|
6
|
-
props?: CalloutElementProps;
|
|
7
|
-
};
|
|
8
|
-
declare const CalloutBlockOptions: ({ editor, block, props: calloutProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { CalloutBlockOptions };
|
|
10
|
-
//# sourceMappingURL=CalloutBlockOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutBlockOptions.d.ts","sourceRoot":"","sources":["../../src/ui/CalloutBlockOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAO1E,OAAO,EAAE,mBAAmB,EAA0C,MAAM,UAAU,CAAC;AAKvF,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC7B,CAAC;AAEF,QAAA,MAAM,mBAAmB,2CAA4C,KAAK,4CAqIzE,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,CAyBpE,CAAC"}
|