@cyberskill/cyber-editor 3.8.3 → 3.8.4
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/cyber-editor.cjs.js +1 -1
- package/dist/cyber-editor.css +1 -1
- package/dist/cyber-editor.es.js +12 -12
- package/package.json +1 -1
package/dist/cyber-editor.cjs.js
CHANGED
|
@@ -665,4 +665,4 @@ html body {
|
|
|
665
665
|
|
|
666
666
|
`);return!i||!a?!1:t.chain().command(({tr:s})=>(s.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const s=o.after();return s===void 0?!1:r.nodeAt(s)?t.commands.command(({tr:c})=>(c.setSelection(vt.near(r.resolve(s))),!0)):t.commands.exitCode()}}},addInputRules(){return[tf({find:g4,type:this.type,getAttributes:t=>({language:t[1]})}),tf({find:v4,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Qn({key:new vr("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o==null?void 0:o.mode;if(!n||!i)return!1;const{tr:a,schema:s}=t.state,l=s.text(n.replace(/\r\n?/g,`
|
|
667
667
|
`));return a.replaceSelectionWith(this.type.create({language:i},l)),a.selection.$from.parent.type!==this.type&&a.setSelection(gt.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),t.dispatch(a),!0}}})]}}),y4=Sn.create({name:"doc",topNode:!0,content:"block+"});function C4(t={}){return new Qn({view(e){return new S4(e,t)}})}class S4{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=a=>{this[o](a)};return e.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r;if(n){let s=e.nodeBefore,l=e.nodeAfter;if(s||l){let c=this.editorView.nodeDOM(this.cursorPos-(s?s.nodeSize:0));if(c){let u=c.getBoundingClientRect(),d=s?u.bottom:u.top;s&&l&&(d=(d+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:u.left,right:u.right,top:d-this.width/2,bottom:d+this.width/2}}}}if(!r){let s=this.editorView.coordsAtPos(this.cursorPos);r={left:s.left-this.width/2,right:s.left+this.width/2,top:s.top,bottom:s.bottom}}let o=this.editorView.dom.offsetParent;this.element||(this.element=o.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let i,a;if(!o||o==document.body&&getComputedStyle(o).position=="static")i=-pageXOffset,a=-pageYOffset;else{let s=o.getBoundingClientRect();i=s.left-o.scrollLeft,a=s.top-o.scrollTop}this.element.style.left=r.left-i+"px",this.element.style.top=r.top-a+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,e):o;if(n&&!i){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=ty(this.editorView.state.doc,a,this.editorView.dragging.slice);s!=null&&(a=s)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const x4=Hn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[C4(this.options)]}});class yn extends vt{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return yn.valid(r)?new yn(r):vt.near(r)}content(){return Ge.empty}eq(e){return e instanceof yn&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new yn(e.resolve(n.pos))}getBookmark(){return new tm(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!w4(e)||!E4(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&yn.valid(e))return e;let o=e.pos,i=null;for(let a=e.depth;;a--){let s=e.node(a);if(n>0?e.indexAfter(a)<s.childCount:e.index(a)>0){i=s.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;o+=n;let l=e.doc.resolve(o);if(yn.valid(l))return l}for(;;){let a=n>0?i.firstChild:i.lastChild;if(!a){if(i.isAtom&&!i.isText&&!mt.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=a,o+=n;let s=e.doc.resolve(o);if(yn.valid(s))return s}return null}}}yn.prototype.visible=!1;yn.findFrom=yn.findGapCursorFrom;vt.jsonID("gapcursor",yn);class tm{constructor(e){this.pos=e}map(e){return new tm(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return yn.valid(n)?new yn(n):vt.near(n)}}function w4(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function E4(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function N4(){return new Qn({props:{decorations:R4,createSelectionBetween(t,e,n){return e.pos==n.pos&&yn.valid(n)?new yn(n):null},handleClick:$4,handleKeyDown:O4,handleDOMEvents:{beforeinput:M4}}})}const O4=Bh({ArrowLeft:Nl("horiz",-1),ArrowRight:Nl("horiz",1),ArrowUp:Nl("vert",-1),ArrowDown:Nl("vert",1)});function Nl(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,i){let a=r.selection,s=e>0?a.$to:a.$from,l=a.empty;if(a instanceof gt){if(!i.endOfTextblock(n)||s.depth==0)return!1;l=!1,s=r.doc.resolve(e>0?s.after():s.before())}let c=yn.findGapCursorFrom(s,e,l);return c?(o&&o(r.tr.setSelection(new yn(c))),!0):!1}}function $4(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!yn.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&mt.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new yn(r))),!0)}function M4(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof yn))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=Re.empty;for(let a=r.length-1;a>=0;a--)o=Re.from(r[a].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new Ge(o,0,0));return i.setSelection(gt.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function R4(t){if(!(t.selection instanceof yn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",bn.create(t.doc,[Zn.widget(t.selection.head,e,{key:"gapcursor"})])}const I4=Hn.create({name:"gapCursor",addProseMirrorPlugins(){return[N4()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Mt(ut(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),T4=Sn.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Zt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
668
|
-
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:s}=r.extensionManager,l=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&a){const d=l.filter(f=>s.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),P4=Sn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Zt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>tf({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var $c=200,Bn=function(){};Bn.prototype.append=function(e){return e.length?(e=Bn.from(e),!this.length&&e||e.length<$c&&this.leafAppend(e)||this.length<$c&&e.leafPrepend(this)||this.appendInner(e)):this};Bn.prototype.prepend=function(e){return e.length?Bn.from(e).append(this):this};Bn.prototype.appendInner=function(e){return new A4(this,e)};Bn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Bn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Bn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Bn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};Bn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,a){return o.push(e(i,a))},n,r),o};Bn.from=function(e){return e instanceof Bn?e:e&&e.length?new Xw(e):Bn.empty};var Xw=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,a,s){for(var l=i;l<a;l++)if(o(this.values[l],s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,a,s){for(var l=i-1;l>=a;l--)if(o(this.values[l],s+l)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=$c)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=$c)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Bn);Bn.empty=new Xw([]);var A4=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,i,a){var s=this.left.length;if(o<s&&this.left.forEachInner(r,o,Math.min(i,s),a)===!1||i>s&&this.right.forEachInner(r,Math.max(o-s,0),Math.min(this.length,i)-s,a+s)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,a){var s=this.left.length;if(o>s&&this.right.forEachInvertedInner(r,o-s,Math.max(i,s)-s,a+s)===!1||i<s&&this.left.forEachInvertedInner(r,Math.min(o,s),i,a)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Bn);const k4=500;class Ar{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let a=e.tr,s,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,u.push(d);return}if(o){u.push(new qr(d.map));let p=d.step.map(o.slice(i)),m;p&&a.maybeStep(p).doc&&(m=a.mapping.maps[a.mapping.maps.length-1],c.push(new qr(m,void 0,void 0,c.length+u.length))),i--,m&&o.appendMap(m,i)}else a.maybeStep(d.step);if(d.selection)return s=o?d.selection.map(o.slice(i)):d.selection,l=new Ar(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:a,selection:s}}addTransform(e,n,r,o){let i=[],a=this.eventCount,s=this.items,l=!o&&s.length?s.get(s.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),f=new qr(e.mapping.maps[u],d,n),p;(p=l&&l.merge(f))&&(f=p,u?i.pop():s=s.slice(0,s.length-1)),i.push(f),n&&(a++,n=void 0),o||(l=f)}let c=a-r.depth;return c>_4&&(s=D4(s,c),a-=c),new Ar(s.append(i),a)}remapping(e,n){let r=new as;return this.items.forEach((o,i)=>{let a=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new Ar(this.items.append(e.map(n=>new qr(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,a=e.steps.length,s=this.eventCount;this.items.forEach(f=>{f.selection&&s--},o);let l=n;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;a=Math.min(a,p);let m=i.maps[p];if(f.step){let v=e.steps[p].invert(e.docs[p]),g=f.selection&&f.selection.map(i.slice(l+1,p));g&&s++,r.push(new qr(m,v,g))}else r.push(new qr(m))},o);let c=[];for(let f=n;f<a;f++)c.push(new qr(i.maps[f]));let u=this.items.slice(0,o).append(c).append(r),d=new Ar(u,s);return d.emptyItemCount()>k4&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((a,s)=>{if(s>=e)o.push(a),a.selection&&i++;else if(a.step){let l=a.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=a.selection&&a.selection.map(n.slice(r));u&&i++;let d=new qr(c.invert(),l,u),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else a.map&&r--},this.items.length,0),new Ar(Bn.from(o.reverse()),i)}}Ar.empty=new Ar(Bn.empty,0);function D4(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class qr{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new qr(n.getMap().invert(),n,this.selection)}}}class Io{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const _4=20;function B4(t,e,n,r){let o=n.getMeta(Ci),i;if(o)return o.historyState;n.getMeta(L4)&&(t=new Io(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(Ci))return a.getMeta(Ci).redo?new Io(t.done.addTransform(n,void 0,r,Ul(e)),t.undone,w0(n.mapping.maps),t.prevTime,t.prevComposition):new Io(t.done,t.undone.addTransform(n,void 0,r,Ul(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),l=t.prevTime==0||!a&&t.prevComposition!=s&&(t.prevTime<(n.time||0)-r.newGroupDelay||!j4(n,t.prevRanges)),c=a?kd(t.prevRanges,n.mapping):w0(n.mapping.maps);return new Io(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Ul(e)),Ar.empty,c,n.time,s??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Io(t.done.rebased(n,i),t.undone.rebased(n,i),kd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Io(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),kd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function j4(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&o>=e[i]&&(n=!0)}),n}function w0(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,i,a)=>e.push(i,a));return e}function kd(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function z4(t,e,n){let r=Ul(e),o=Ci.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let a=i.selection.resolve(i.transform.doc),s=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),l=new Io(n?s:i.remaining,n?i.remaining:s,null,0,-1);return i.transform.setSelection(a).setMeta(Ci,{redo:n,historyState:l})}let Dd=!1,E0=null;function Ul(t){let e=t.plugins;if(E0!=e){Dd=!1,E0=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Dd=!0;break}}return Dd}const Ci=new vr("history"),L4=new vr("closeHistory");function V4(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Qn({key:Ci,state:{init(){return new Io(Ar.empty,Ar.empty,null,0,-1)},apply(e,n,r){return B4(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?Jw:r=="historyRedo"?Qw:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function Yw(t,e){return(n,r)=>{let o=Ci.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=z4(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const Jw=Yw(!1,!0),Qw=Yw(!0,!0),F4=Hn.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Jw(t,e),redo:()=>({state:t,dispatch:e})=>Qw(t,e)}},addProseMirrorPlugins(){return[V4(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),H4=Sn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Zt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:o}=n,i=t();return r.parentOffset===0?i.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):kM(n)?i.insertContentAt(o.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({tr:a,dispatch:s})=>{var l;if(s){const{$to:c}=a.selection,u=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(gt.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(mt.create(a.doc,c.pos)):a.setSelection(gt.create(a.doc,c.pos));else{const d=(l=c.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(a.insert(u,d),a.setSelection(gt.create(a.doc,u+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[dR({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),W4=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,q4=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,K4=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,U4=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,G4=to.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ei({find:W4,type:this.type}),Ei({find:K4,type:this.type})]},addPasteRules(){return[Ni({find:q4,type:this.type}),Ni({find:U4,type:this.type})]}}),X4="listItem",N0="textStyle",O0=/^(\d+)\.\s$/,Y4=Sn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Zt(this.options.HTMLAttributes,n),0]:["ol",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(X4,this.editor.getAttributes(N0)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=fa({find:O0,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=fa({find:O0,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(N0)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),J4=Sn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Q4=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Z4=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,e6=to.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ei({find:Q4,type:this.type})]},addPasteRules(){return[Ni({find:Z4,type:this.type})]}}),t6=Sn.create({name:"text",group:"inline"}),n6=Hn.create({name:"starterKit",addExtensions(){var t,e,n,r,o,i,a,s,l,c,u,d,f,p,m,v,g,y;const b=[];return this.options.bold!==!1&&b.push(u4.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.blockquote!==!1&&b.push(i4.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&b.push(f4.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&b.push(m4.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&b.push(b4.configure((o=this.options)===null||o===void 0?void 0:o.codeBlock)),this.options.document!==!1&&b.push(y4.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&b.push(x4.configure((a=this.options)===null||a===void 0?void 0:a.dropcursor)),this.options.gapcursor!==!1&&b.push(I4.configure((s=this.options)===null||s===void 0?void 0:s.gapcursor)),this.options.hardBreak!==!1&&b.push(T4.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&b.push(P4.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&b.push(F4.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&b.push(H4.configure((d=this.options)===null||d===void 0?void 0:d.horizontalRule)),this.options.italic!==!1&&b.push(G4.configure((f=this.options)===null||f===void 0?void 0:f.italic)),this.options.listItem!==!1&&b.push(zw.configure((p=this.options)===null||p===void 0?void 0:p.listItem)),this.options.orderedList!==!1&&b.push(Y4.configure((m=this.options)===null||m===void 0?void 0:m.orderedList)),this.options.paragraph!==!1&&b.push(J4.configure((v=this.options)===null||v===void 0?void 0:v.paragraph)),this.options.strike!==!1&&b.push(e6.configure((g=this.options)===null||g===void 0?void 0:g.strike)),this.options.text!==!1&&b.push(t6.configure((y=this.options)===null||y===void 0?void 0:y.text)),b}});function Zw({title:t,childrenContent:e,editable:n,childrenEdit:r}){const[o,i]=N.useState(!1),a=n?ve.jsxDEV(Go,{children:ve.jsxDEV(Go.Item,{onClick:()=>i(!0),children:"Edit"},"edit",!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:17,columnNumber:21},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:16,columnNumber:17},this):null;return ve.jsxDEV("div",{children:[n&&a?ve.jsxDEV(yu,{dropdownRender:()=>a,trigger:["contextMenu"],children:e},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:28,columnNumber:25},this):e,ve.jsxDEV(Mr,{title:`Edit ${t}`,open:o,onOk:()=>i(!1),onCancel:()=>i(!1),children:r},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:36,columnNumber:13},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:25,columnNumber:9},this)}function r6({node:t,editor:e}){const[n,r]=N.useState(!1),[o,i]=N.useState(t.attrs.bgColor||"#f3f4f6"),[a,s]=N.useState(t.attrs.titleColor||"#000000"),l=d=>{d.preventDefault()},c=d=>{i(d.toHexString())},u=d=>{s(d.toHexString())};return ve.jsxDEV(gC,{className:"accordion-wrapper",children:ve.jsxDEV(Zw,{title:"Accordion",childrenContent:ve.jsxDEV("div",{className:"ce:my-4 ce:transition-all ce:duration-300 ce:border ce:rounded-lg ce:shadow-sm",onContextMenu:l,children:[ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:justify-between ce:p-4 ce:transition-colors ce:accordion-header",style:{backgroundColor:o},onClick:()=>r(!n),children:[ve.jsxDEV("input",{className:"ce:w-full ce:text-lg ce:font-medium ce:bg-transparent ce:border-none ce:outline-none",style:{color:a},defaultValue:t.attrs.title||"Accordion Title",disabled:!e.isEditable,suppressContentEditableWarning:!0,contentEditable:!0,placeholder:"Accordion title"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:43,columnNumber:29},this),ve.jsxDEV(jH,{className:`ce:transition-transform ce:duration-300 ${n?"ce:rotate-180":""}`,size:20},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:54,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:38,columnNumber:25},this),ve.jsxDEV("div",{className:`ce:overflow-hidden ce:duration-300 ce:ease-in-out ${n?"ce:max-h-96 ce:opacity-100":"ce:max-h-0 ce:opacity-0"} `,children:ve.jsxDEV("div",{className:"ce:p-4 ce:border-t",children:ve.jsxDEV(AR,{contentEditable:e.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:70,columnNumber:33},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:69,columnNumber:29},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:62,columnNumber:25},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:34,columnNumber:21},this),editable:e.isEditable,childrenEdit:ve.jsxDEV("div",{className:"ce:px-6 ce:py-4 ce:space-y-6 ce:rounded-lg ce:bg-gray-50",children:[ve.jsxDEV("div",{className:"ce:grid ce:grid-cols-1 ce:gap-6",children:[ve.jsxDEV("div",{className:"ce:flex ce:flex-col ce:space-y-2",children:[ve.jsxDEV("label",{className:"ce:font-medium ce:text-gray-700",children:"Background Color"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:82,columnNumber:33},this),ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:space-x-3",children:[ve.jsxDEV("div",{className:"ce:w-8 ce:h-8 ce:border ce:rounded ce:shadow",style:{backgroundColor:o}},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:86,columnNumber:37},this),ve.jsxDEV(Oc,{value:o,onChange:c},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:90,columnNumber:37},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:85,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:81,columnNumber:29},this),ve.jsxDEV("div",{className:"ce:flex ce:flex-col ce:space-y-2",children:[ve.jsxDEV("label",{className:"ce:font-medium ce:text-gray-700",children:"Title Color"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:98,columnNumber:33},this),ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:space-x-3",children:[ve.jsxDEV("div",{className:"ce:w-8 ce:h-8 ce:border ce:rounded ce:shadow",style:{backgroundColor:a}},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:102,columnNumber:37},this),ve.jsxDEV(Oc,{value:a,onChange:u},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:106,columnNumber:37},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:101,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:97,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:80,columnNumber:25},this),ve.jsxDEV("div",{className:"ce:pt-4 ce:border-t ce:border-gray-200",children:ve.jsxDEV("div",{className:"ce:p-3 ce:bg-white ce:border ce:rounded-md",children:[ve.jsxDEV("div",{className:"ce:text-sm ce:text-gray-600",children:"Preview"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:116,columnNumber:33},this),ve.jsxDEV("div",{className:"ce:p-2 ce:mt-2 ce:rounded",style:{backgroundColor:o},children:ve.jsxDEV("span",{style:{color:a,fontWeight:500},children:"Accordion Title"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:123,columnNumber:37},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:119,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:115,columnNumber:29},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:114,columnNumber:25},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:79,columnNumber:21},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:31,columnNumber:13},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:30,columnNumber:9},this)}const o6=Sn.create({name:"accordion",group:"block",content:"block+",atom:!1,draggable:!0,selectable:!0,inline:!1,defining:!0,addAttributes(){return{title:{default:"Accordion Title"},bgColor:{default:"#f3f4f6"},titleColor:{default:"#000000"}}},parseHTML(){return[{tag:"accordion"}]},renderHTML({HTMLAttributes:t}){return["accordion",Zt(t)]},addNodeView(){return vC(r6)},addCommands(){return{setAccordion:t=>({chain:e})=>e().insertContent({type:"accordion",attrs:t,content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()}}});function i6({node:t,updateAttributes:e,editor:n}){const[r,o]=N.useState({width:t.attrs.width??50,height:t.attrs.height??"auto"}),[i,a]=N.useState({left:t.attrs.marginLeft??"0%",right:t.attrs.marginRight??"0%"}),[s,l]=N.useState(t.attrs.src||""),c=N.useRef(null);N.useEffect(()=>{if(t.attrs.src&&c.current){const f=new Image;f.onload=()=>{t.attrs.width===void 0&&o({width:100,height:"auto"})},f.src=t.attrs.src}},[t.attrs.src,t.attrs.width,t.attrs.height]);const u=()=>{e({src:s,width:r.width,height:r.height,marginLeft:i.left,marginRight:i.right})},d=f=>{f.preventDefault()};return ve.jsxDEV(gC,{className:"image-wrapper ce:w-full",children:ve.jsxDEV(Zw,{title:"Image",childrenContent:ve.jsxDEV("div",{className:"ce:relative ce:w-full ce:max-w-full ce:overflow-hidden",style:{marginLeft:i.left+"%",marginRight:i.right+"%"},onContextMenu:d,children:ve.jsxDEV("img",{ref:c,src:t.attrs.src,alt:"Uploaded",className:"ce:w-full ce:h-auto ce:object-contain ce:inline-block",style:{width:r.width+"%",height:r.height==="auto"?"auto":r.height+"%",maxWidth:"100%"},draggable:!1},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:68,columnNumber:25},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:60,columnNumber:21},this),editable:n.isEditable,childrenEdit:ve.jsxDEV("div",{className:"ce:space-y-4",children:[ve.jsxDEV("div",{children:[ve.jsxDEV("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Image URL"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:89,columnNumber:29},this),ve.jsxDEV(ho,{type:"text",value:s,onChange:f=>l(f.target.value),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 focus:ring-opacity-50",disabled:!n.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:92,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:88,columnNumber:25},this),ve.jsxDEV("div",{className:"ce:flex ce:gap-4",children:[ve.jsxDEV("div",{className:"ce:flex-1",children:[ve.jsxDEV("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Width (%)"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:103,columnNumber:33},this),ve.jsxDEV(ho,{type:"number",value:r.width,onChange:f=>o({...r,width:Number(f.target.value)}),className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50",disabled:!n.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:106,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:102,columnNumber:29},this),ve.jsxDEV("div",{className:"flex-1",children:[ve.jsxDEV("label",{className:"block text-sm font-medium text-gray-700",children:"Height"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:120,columnNumber:33},this),ve.jsxDEV(ur,{value:r.height,onChange:f=>o({...r,height:f}),className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50",disabled:!n.isEditable,children:[ve.jsxDEV(ur.Option,{value:"auto",children:"Auto"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:134,columnNumber:37},this),ve.jsxDEV(ur.Option,{value:"25",children:"25%"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:137,columnNumber:37},this),ve.jsxDEV(ur.Option,{value:"50",children:"50%"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:140,columnNumber:37},this),ve.jsxDEV(ur.Option,{value:"75",children:"75%"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:143,columnNumber:37},this),ve.jsxDEV(ur.Option,{value:"100",children:"100%"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:146,columnNumber:37},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:123,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:119,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:101,columnNumber:25},this),ve.jsxDEV("div",{className:"flex gap-4",children:[ve.jsxDEV("div",{className:"flex-1",children:[ve.jsxDEV("label",{className:"block text-sm font-medium text-gray-700",children:"Margin Left (%)"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:155,columnNumber:33},this),ve.jsxDEV(ho,{type:"number",value:i.left,onChange:f=>a({...i,left:String(Number(f.target.value))}),className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50",disabled:!n.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:158,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:154,columnNumber:29},this),ve.jsxDEV("div",{className:"flex-1",children:[ve.jsxDEV("label",{className:"block text-sm font-medium text-gray-700",children:"Margin Right (%)"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:174,columnNumber:33},this),ve.jsxDEV(ho,{type:"number",value:i.right,onChange:f=>a({...i,right:String(Number(f.target.value))}),className:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50",disabled:!n.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:177,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:173,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:153,columnNumber:25},this),ve.jsxDEV("button",{type:"button",onClick:u,className:"w-full py-2 px-4 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",disabled:!n.isEditable,children:"Update Image"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:194,columnNumber:25},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:87,columnNumber:21},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:57,columnNumber:13},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:56,columnNumber:9},this)}const a6=Sn.create({name:"image",group:"block",content:"inline*",atom:!0,draggable:!0,selectable:!0,addAttributes(){return{src:{default:null},width:{default:50},height:{default:"auto"},marginLeft:{default:0},marginRight:{default:0}}},parseHTML(){return[{tag:"img",getAttrs:t=>t instanceof HTMLElement?{src:t.getAttribute("src"),width:t.getAttribute("width")?Number(t.getAttribute("width")):50,height:t.getAttribute("height")||"auto",marginLeft:t.getAttribute("marginleft")?Number(t.getAttribute("marginleft")):0,marginRight:t.getAttribute("marginright")?Number(t.getAttribute("marginright")):0}:null}]},renderHTML({HTMLAttributes:t}){return["img",Zt(t)]},addNodeView(){return vC(i6)},addCommands(){return{setImage:t=>({chain:e})=>e().insertContent({type:"image",attrs:{...t,width:(t==null?void 0:t.width)??50,height:(t==null?void 0:t.height)??"auto"}}).run()}}}),s6=[V5.configure({types:[a0.name,zw.name]}),a0,W5.configure({multicolor:!0}),n6.configure({bulletList:{keepMarks:!0,keepAttributes:!1},orderedList:{keepMarks:!0,keepAttributes:!1}}),r4,q5,K5,n4.configure({types:["heading","paragraph"]}),t4,e4,X3.configure({resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!0,HTMLAttributes:{class:"table-wrapper"}}),Q3,J3,Y3.configure({HTMLAttributes:{class:"table-cell"}}),a6,o6];function l6({content:t="",slotBefore:e=!1,className:n="",editorClassName:r="",editable:o=!0,onChange:i}){const a=TR({extensions:s6,content:t,editable:o,onUpdate:({editor:s})=>{i==null||i(s.getHTML())}});return N.useEffect(()=>{a&&t!==a.getHTML()&&a.commands.setContent(t,!1)},[a,t]),a?ve.jsxDEV("div",{className:re(eE["cyber-editor"],n),children:[e&&ve.jsxDEV(z5,{editor:a},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/providers/editor.tsx",lineNumber:43,columnNumber:28},this),ve.jsxDEV(SR,{editor:a,className:r},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/providers/editor.tsx",lineNumber:44,columnNumber:13},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/shared/providers/editor.tsx",lineNumber:42,columnNumber:9},this):ve.jsxDEV(xE,{full:!0},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/providers/editor.tsx",lineNumber:38,columnNumber:16},this)}exports.EditorProvider=l6;
|
|
668
|
+
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:s}=r.extensionManager,l=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&a){const d=l.filter(f=>s.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),P4=Sn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Zt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>tf({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var $c=200,Bn=function(){};Bn.prototype.append=function(e){return e.length?(e=Bn.from(e),!this.length&&e||e.length<$c&&this.leafAppend(e)||this.length<$c&&e.leafPrepend(this)||this.appendInner(e)):this};Bn.prototype.prepend=function(e){return e.length?Bn.from(e).append(this):this};Bn.prototype.appendInner=function(e){return new A4(this,e)};Bn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Bn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Bn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Bn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};Bn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,a){return o.push(e(i,a))},n,r),o};Bn.from=function(e){return e instanceof Bn?e:e&&e.length?new Xw(e):Bn.empty};var Xw=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,a,s){for(var l=i;l<a;l++)if(o(this.values[l],s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,a,s){for(var l=i-1;l>=a;l--)if(o(this.values[l],s+l)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=$c)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=$c)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Bn);Bn.empty=new Xw([]);var A4=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,i,a){var s=this.left.length;if(o<s&&this.left.forEachInner(r,o,Math.min(i,s),a)===!1||i>s&&this.right.forEachInner(r,Math.max(o-s,0),Math.min(this.length,i)-s,a+s)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,a){var s=this.left.length;if(o>s&&this.right.forEachInvertedInner(r,o-s,Math.max(i,s)-s,a+s)===!1||i<s&&this.left.forEachInvertedInner(r,Math.min(o,s),i,a)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Bn);const k4=500;class Ar{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let a=e.tr,s,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,u.push(d);return}if(o){u.push(new qr(d.map));let p=d.step.map(o.slice(i)),m;p&&a.maybeStep(p).doc&&(m=a.mapping.maps[a.mapping.maps.length-1],c.push(new qr(m,void 0,void 0,c.length+u.length))),i--,m&&o.appendMap(m,i)}else a.maybeStep(d.step);if(d.selection)return s=o?d.selection.map(o.slice(i)):d.selection,l=new Ar(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:a,selection:s}}addTransform(e,n,r,o){let i=[],a=this.eventCount,s=this.items,l=!o&&s.length?s.get(s.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),f=new qr(e.mapping.maps[u],d,n),p;(p=l&&l.merge(f))&&(f=p,u?i.pop():s=s.slice(0,s.length-1)),i.push(f),n&&(a++,n=void 0),o||(l=f)}let c=a-r.depth;return c>_4&&(s=D4(s,c),a-=c),new Ar(s.append(i),a)}remapping(e,n){let r=new as;return this.items.forEach((o,i)=>{let a=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new Ar(this.items.append(e.map(n=>new qr(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,a=e.steps.length,s=this.eventCount;this.items.forEach(f=>{f.selection&&s--},o);let l=n;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;a=Math.min(a,p);let m=i.maps[p];if(f.step){let v=e.steps[p].invert(e.docs[p]),g=f.selection&&f.selection.map(i.slice(l+1,p));g&&s++,r.push(new qr(m,v,g))}else r.push(new qr(m))},o);let c=[];for(let f=n;f<a;f++)c.push(new qr(i.maps[f]));let u=this.items.slice(0,o).append(c).append(r),d=new Ar(u,s);return d.emptyItemCount()>k4&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((a,s)=>{if(s>=e)o.push(a),a.selection&&i++;else if(a.step){let l=a.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=a.selection&&a.selection.map(n.slice(r));u&&i++;let d=new qr(c.invert(),l,u),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else a.map&&r--},this.items.length,0),new Ar(Bn.from(o.reverse()),i)}}Ar.empty=new Ar(Bn.empty,0);function D4(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class qr{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new qr(n.getMap().invert(),n,this.selection)}}}class Io{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const _4=20;function B4(t,e,n,r){let o=n.getMeta(Ci),i;if(o)return o.historyState;n.getMeta(L4)&&(t=new Io(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(Ci))return a.getMeta(Ci).redo?new Io(t.done.addTransform(n,void 0,r,Ul(e)),t.undone,w0(n.mapping.maps),t.prevTime,t.prevComposition):new Io(t.done,t.undone.addTransform(n,void 0,r,Ul(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),l=t.prevTime==0||!a&&t.prevComposition!=s&&(t.prevTime<(n.time||0)-r.newGroupDelay||!j4(n,t.prevRanges)),c=a?kd(t.prevRanges,n.mapping):w0(n.mapping.maps);return new Io(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Ul(e)),Ar.empty,c,n.time,s??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Io(t.done.rebased(n,i),t.undone.rebased(n,i),kd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Io(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),kd(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function j4(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&o>=e[i]&&(n=!0)}),n}function w0(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,i,a)=>e.push(i,a));return e}function kd(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function z4(t,e,n){let r=Ul(e),o=Ci.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let a=i.selection.resolve(i.transform.doc),s=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),l=new Io(n?s:i.remaining,n?i.remaining:s,null,0,-1);return i.transform.setSelection(a).setMeta(Ci,{redo:n,historyState:l})}let Dd=!1,E0=null;function Ul(t){let e=t.plugins;if(E0!=e){Dd=!1,E0=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Dd=!0;break}}return Dd}const Ci=new vr("history"),L4=new vr("closeHistory");function V4(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Qn({key:Ci,state:{init(){return new Io(Ar.empty,Ar.empty,null,0,-1)},apply(e,n,r){return B4(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?Jw:r=="historyRedo"?Qw:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function Yw(t,e){return(n,r)=>{let o=Ci.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=z4(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const Jw=Yw(!1,!0),Qw=Yw(!0,!0),F4=Hn.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Jw(t,e),redo:()=>({state:t,dispatch:e})=>Qw(t,e)}},addProseMirrorPlugins(){return[V4(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),H4=Sn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Zt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:o}=n,i=t();return r.parentOffset===0?i.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):kM(n)?i.insertContentAt(o.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({tr:a,dispatch:s})=>{var l;if(s){const{$to:c}=a.selection,u=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(gt.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(mt.create(a.doc,c.pos)):a.setSelection(gt.create(a.doc,c.pos));else{const d=(l=c.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(a.insert(u,d),a.setSelection(gt.create(a.doc,u+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[dR({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),W4=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,q4=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,K4=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,U4=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,G4=to.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ei({find:W4,type:this.type}),Ei({find:K4,type:this.type})]},addPasteRules(){return[Ni({find:q4,type:this.type}),Ni({find:U4,type:this.type})]}}),X4="listItem",N0="textStyle",O0=/^(\d+)\.\s$/,Y4=Sn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Zt(this.options.HTMLAttributes,n),0]:["ol",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(X4,this.editor.getAttributes(N0)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=fa({find:O0,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=fa({find:O0,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(N0)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),J4=Sn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Q4=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Z4=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,e6=to.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ei({find:Q4,type:this.type})]},addPasteRules(){return[Ni({find:Z4,type:this.type})]}}),t6=Sn.create({name:"text",group:"inline"}),n6=Hn.create({name:"starterKit",addExtensions(){var t,e,n,r,o,i,a,s,l,c,u,d,f,p,m,v,g,y;const b=[];return this.options.bold!==!1&&b.push(u4.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.blockquote!==!1&&b.push(i4.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&b.push(f4.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&b.push(m4.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&b.push(b4.configure((o=this.options)===null||o===void 0?void 0:o.codeBlock)),this.options.document!==!1&&b.push(y4.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&b.push(x4.configure((a=this.options)===null||a===void 0?void 0:a.dropcursor)),this.options.gapcursor!==!1&&b.push(I4.configure((s=this.options)===null||s===void 0?void 0:s.gapcursor)),this.options.hardBreak!==!1&&b.push(T4.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&b.push(P4.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&b.push(F4.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&b.push(H4.configure((d=this.options)===null||d===void 0?void 0:d.horizontalRule)),this.options.italic!==!1&&b.push(G4.configure((f=this.options)===null||f===void 0?void 0:f.italic)),this.options.listItem!==!1&&b.push(zw.configure((p=this.options)===null||p===void 0?void 0:p.listItem)),this.options.orderedList!==!1&&b.push(Y4.configure((m=this.options)===null||m===void 0?void 0:m.orderedList)),this.options.paragraph!==!1&&b.push(J4.configure((v=this.options)===null||v===void 0?void 0:v.paragraph)),this.options.strike!==!1&&b.push(e6.configure((g=this.options)===null||g===void 0?void 0:g.strike)),this.options.text!==!1&&b.push(t6.configure((y=this.options)===null||y===void 0?void 0:y.text)),b}});function Zw({title:t,childrenContent:e,editable:n,childrenEdit:r}){const[o,i]=N.useState(!1),a=n?ve.jsxDEV(Go,{children:ve.jsxDEV(Go.Item,{onClick:()=>i(!0),children:"Edit"},"edit",!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:17,columnNumber:21},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:16,columnNumber:17},this):null;return ve.jsxDEV("div",{children:[n&&a?ve.jsxDEV(yu,{dropdownRender:()=>a,trigger:["contextMenu"],children:e},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:28,columnNumber:25},this):e,ve.jsxDEV(Mr,{title:`Edit ${t}`,open:o,onOk:()=>i(!1),onCancel:()=>i(!1),children:r},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:36,columnNumber:13},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/shared/components/modal-edit/modal-edit.component.tsx",lineNumber:25,columnNumber:9},this)}function r6({node:t,editor:e}){const[n,r]=N.useState(!1),[o,i]=N.useState(t.attrs.bgColor||"#f3f4f6"),[a,s]=N.useState(t.attrs.titleColor||"#000000"),l=d=>{d.preventDefault()},c=d=>{i(d.toHexString())},u=d=>{s(d.toHexString())};return ve.jsxDEV(gC,{className:"accordion-wrapper",children:ve.jsxDEV(Zw,{title:"Accordion",childrenContent:ve.jsxDEV("div",{className:"ce:my-4 ce:transition-all ce:duration-300 ce:border ce:rounded-lg ce:shadow-sm",onContextMenu:l,children:[ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:justify-between ce:p-4 ce:transition-colors ce:accordion-header",style:{backgroundColor:o},onClick:()=>r(!n),children:[ve.jsxDEV("input",{className:"ce:w-full ce:text-lg ce:font-medium ce:bg-transparent ce:border-none ce:outline-none",style:{color:a},defaultValue:t.attrs.title||"Accordion Title",disabled:!e.isEditable,suppressContentEditableWarning:!0,contentEditable:!0,placeholder:"Accordion title"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:43,columnNumber:29},this),ve.jsxDEV(jH,{className:`ce:transition-transform ce:duration-300 ${n?"ce:rotate-180":""}`,size:20},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:54,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:38,columnNumber:25},this),ve.jsxDEV("div",{className:`ce:overflow-hidden ce:duration-300 ce:ease-in-out ${n?"ce:max-h-96 ce:opacity-100":"ce:max-h-0 ce:opacity-0"} `,children:ve.jsxDEV("div",{className:"ce:p-4 ce:border-t",children:ve.jsxDEV(AR,{contentEditable:e.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:70,columnNumber:33},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:69,columnNumber:29},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:62,columnNumber:25},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:34,columnNumber:21},this),editable:e.isEditable,childrenEdit:ve.jsxDEV("div",{className:"ce:px-6 ce:py-4 ce:space-y-6 ce:rounded-lg ce:bg-gray-50",children:[ve.jsxDEV("div",{className:"ce:grid ce:grid-cols-1 ce:gap-6",children:[ve.jsxDEV("div",{className:"ce:flex ce:flex-col ce:space-y-2",children:[ve.jsxDEV("label",{className:"ce:font-medium ce:text-gray-700",children:"Background Color"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:82,columnNumber:33},this),ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:space-x-3",children:[ve.jsxDEV("div",{className:"ce:w-8 ce:h-8 ce:border ce:rounded ce:shadow",style:{backgroundColor:o}},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:86,columnNumber:37},this),ve.jsxDEV(Oc,{value:o,onChange:c},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:90,columnNumber:37},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:85,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:81,columnNumber:29},this),ve.jsxDEV("div",{className:"ce:flex ce:flex-col ce:space-y-2",children:[ve.jsxDEV("label",{className:"ce:font-medium ce:text-gray-700",children:"Title Color"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:98,columnNumber:33},this),ve.jsxDEV("div",{className:"ce:flex ce:items-center ce:space-x-3",children:[ve.jsxDEV("div",{className:"ce:w-8 ce:h-8 ce:border ce:rounded ce:shadow",style:{backgroundColor:a}},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:102,columnNumber:37},this),ve.jsxDEV(Oc,{value:a,onChange:u},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:106,columnNumber:37},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:101,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:97,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:80,columnNumber:25},this),ve.jsxDEV("div",{className:"ce:pt-4 ce:border-t ce:border-gray-200",children:ve.jsxDEV("div",{className:"ce:p-3 ce:bg-white ce:border ce:rounded-md",children:[ve.jsxDEV("div",{className:"ce:text-sm ce:text-gray-600",children:"Preview"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:116,columnNumber:33},this),ve.jsxDEV("div",{className:"ce:p-2 ce:mt-2 ce:rounded",style:{backgroundColor:o},children:ve.jsxDEV("span",{style:{color:a,fontWeight:500},children:"Accordion Title"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:123,columnNumber:37},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:119,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:115,columnNumber:29},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:114,columnNumber:25},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:79,columnNumber:21},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:31,columnNumber:13},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/accordion/accordion-view.component.tsx",lineNumber:30,columnNumber:9},this)}const o6=Sn.create({name:"accordion",group:"block",content:"block+",atom:!1,draggable:!0,selectable:!0,inline:!1,defining:!0,addAttributes(){return{title:{default:"Accordion Title"},bgColor:{default:"#f3f4f6"},titleColor:{default:"#000000"}}},parseHTML(){return[{tag:"accordion"}]},renderHTML({HTMLAttributes:t}){return["accordion",Zt(t)]},addNodeView(){return vC(r6)},addCommands(){return{setAccordion:t=>({chain:e})=>e().insertContent({type:"accordion",attrs:t,content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()}}});function i6({node:t,updateAttributes:e,editor:n}){const[r,o]=N.useState({width:t.attrs.width??50,height:t.attrs.height??"auto"}),[i,a]=N.useState({left:t.attrs.marginLeft??"0%",right:t.attrs.marginRight??"0%"}),[s,l]=N.useState(t.attrs.src||""),c=N.useRef(null);N.useEffect(()=>{if(t.attrs.src&&c.current){const f=new Image;f.onload=()=>{t.attrs.width===void 0&&o({width:100,height:"auto"})},f.src=t.attrs.src}},[t.attrs.src,t.attrs.width,t.attrs.height]);const u=()=>{e({src:s,width:r.width,height:r.height,marginLeft:i.left,marginRight:i.right})},d=f=>{f.preventDefault()};return ve.jsxDEV(gC,{className:"image-wrapper ce:w-full",children:ve.jsxDEV(Zw,{title:"Image",childrenContent:ve.jsxDEV("div",{className:"ce:relative ce:w-full ce:max-w-full ce:overflow-hidden",style:{marginLeft:i.left+"%",marginRight:i.right+"%"},onContextMenu:d,children:ve.jsxDEV("img",{ref:c,src:t.attrs.src,alt:"Uploaded",className:"ce:w-full ce:h-auto ce:object-contain ce:inline-block",style:{width:r.width+"%",height:r.height==="auto"?"auto":r.height+"%",maxWidth:"100%"},draggable:!1},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:68,columnNumber:25},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:60,columnNumber:21},this),editable:n.isEditable,childrenEdit:ve.jsxDEV("div",{className:"ce:space-y-4",children:[ve.jsxDEV("div",{children:[ve.jsxDEV("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Image URL"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:89,columnNumber:29},this),ve.jsxDEV(ho,{type:"text",value:s,onChange:f=>l(f.target.value),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 focus:ring-opacity-50",disabled:!n.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:92,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:88,columnNumber:25},this),ve.jsxDEV("div",{className:"ce:flex ce:gap-4",children:[ve.jsxDEV("div",{className:"ce:flex-1",children:[ve.jsxDEV("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Width (%)"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:103,columnNumber:33},this),ve.jsxDEV(ho,{type:"number",value:r.width,onChange:f=>o({...r,width:Number(f.target.value)}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:106,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:102,columnNumber:29},this),ve.jsxDEV("div",{className:"ce:flex-1",children:[ve.jsxDEV("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Height"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:120,columnNumber:33},this),ve.jsxDEV(ur,{value:r.height,onChange:f=>o({...r,height:f}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable,children:[ve.jsxDEV(ur.Option,{value:"auto",children:"Auto"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:134,columnNumber:37},this),ve.jsxDEV(ur.Option,{value:"25",children:"25%"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:137,columnNumber:37},this),ve.jsxDEV(ur.Option,{value:"50",children:"50%"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:140,columnNumber:37},this),ve.jsxDEV(ur.Option,{value:"75",children:"75%"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:143,columnNumber:37},this),ve.jsxDEV(ur.Option,{value:"100",children:"100%"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:146,columnNumber:37},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:123,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:119,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:101,columnNumber:25},this),ve.jsxDEV("div",{className:"ce:flex ce:gap-4",children:[ve.jsxDEV("div",{className:"ce:flex-1",children:[ve.jsxDEV("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Margin Left (%)"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:155,columnNumber:33},this),ve.jsxDEV(ho,{type:"number",value:i.left,onChange:f=>a({...i,left:String(Number(f.target.value))}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:158,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:154,columnNumber:29},this),ve.jsxDEV("div",{className:"ce:flex-1",children:[ve.jsxDEV("label",{className:"ce:block ce:text-sm ce:font-medium ce:text-gray-700",children:"Margin Right (%)"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:174,columnNumber:33},this),ve.jsxDEV(ho,{type:"number",value:i.right,onChange:f=>a({...i,right:String(Number(f.target.value))}),className:"ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",disabled:!n.isEditable},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:177,columnNumber:33},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:173,columnNumber:29},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:153,columnNumber:25},this),ve.jsxDEV("button",{type:"button",onClick:u,className:"ce:w-full ce:py-2 ce:px-4 ce:bg-indigo-600 ce:text-white ce:rounded-md ce:hover:bg-indigo-700 ce:focus:outline-none ce:focus:ring-2 ce:focus:ring-indigo-500 ce:focus:ring-offset-2",disabled:!n.isEditable,children:"Update Image"},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:194,columnNumber:25},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:87,columnNumber:21},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:57,columnNumber:13},this)},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",lineNumber:56,columnNumber:9},this)}const a6=Sn.create({name:"image",group:"block",content:"inline*",atom:!0,draggable:!0,selectable:!0,addAttributes(){return{src:{default:null},width:{default:50},height:{default:"auto"},marginLeft:{default:0},marginRight:{default:0}}},parseHTML(){return[{tag:"img",getAttrs:t=>t instanceof HTMLElement?{src:t.getAttribute("src"),width:t.getAttribute("width")?Number(t.getAttribute("width")):50,height:t.getAttribute("height")||"auto",marginLeft:t.getAttribute("marginleft")?Number(t.getAttribute("marginleft")):0,marginRight:t.getAttribute("marginright")?Number(t.getAttribute("marginright")):0}:null}]},renderHTML({HTMLAttributes:t}){return["img",Zt(t)]},addNodeView(){return vC(i6)},addCommands(){return{setImage:t=>({chain:e})=>e().insertContent({type:"image",attrs:{...t,width:(t==null?void 0:t.width)??50,height:(t==null?void 0:t.height)??"auto"}}).run()}}}),s6=[V5.configure({types:[a0.name,zw.name]}),a0,W5.configure({multicolor:!0}),n6.configure({bulletList:{keepMarks:!0,keepAttributes:!1},orderedList:{keepMarks:!0,keepAttributes:!1}}),r4,q5,K5,n4.configure({types:["heading","paragraph"]}),t4,e4,X3.configure({resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!0,HTMLAttributes:{class:"table-wrapper"}}),Q3,J3,Y3.configure({HTMLAttributes:{class:"table-cell"}}),a6,o6];function l6({content:t="",slotBefore:e=!1,className:n="",editorClassName:r="",editable:o=!0,onChange:i}){const a=TR({extensions:s6,content:t,editable:o,onUpdate:({editor:s})=>{i==null||i(s.getHTML())}});return N.useEffect(()=>{a&&t!==a.getHTML()&&a.commands.setContent(t,!1)},[a,t]),a?ve.jsxDEV("div",{className:re(eE["cyber-editor"],n),children:[e&&ve.jsxDEV(z5,{editor:a},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/providers/editor.tsx",lineNumber:43,columnNumber:28},this),ve.jsxDEV(SR,{editor:a,className:r},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/providers/editor.tsx",lineNumber:44,columnNumber:13},this)]},void 0,!0,{fileName:"E:/CyberSkill/cyber-editor/src/shared/providers/editor.tsx",lineNumber:42,columnNumber:9},this):ve.jsxDEV(xE,{full:!0},void 0,!1,{fileName:"E:/CyberSkill/cyber-editor/src/shared/providers/editor.tsx",lineNumber:38,columnNumber:16},this)}exports.EditorProvider=l6;
|
package/dist/cyber-editor.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._cyber-editor_q6ohd_1 .ProseMirror:focus{outline:none!important;box-shadow:none!important}._cyber-editor_q6ohd_1 .is-active{background-color:#6c5ce7;color:#fff;padding:2px 12px;border-radius:6px;box-shadow:0 2px 4px #0003;transition:background-color .3s ease,color .3s ease;transform:scale(1.05)}._cyber-editor_q6ohd_1 .tiptap :first-child{margin-top:0}._cyber-editor_q6ohd_1 .tiptap strong{font-weight:700}._cyber-editor_q6ohd_1 .tiptap em{font-style:italic}._cyber-editor_q6ohd_1 .tiptap u{text-decoration:underline}._cyber-editor_q6ohd_1 .tiptap s{text-decoration:line-through}._cyber-editor_q6ohd_1 .tiptap sub{vertical-align:sub;font-size:.875rem}._cyber-editor_q6ohd_1 .tiptap sup{vertical-align:super;font-size:.875rem}._cyber-editor_q6ohd_1 .tiptap code{background-color:#f3e8ff;color:#581c87;border-radius:.25rem;padding:.125rem .375rem;font-size:.875rem;font-family:ui-monospace,monospace}._cyber-editor_q6ohd_1 .tiptap pre{background-color:#111827;color:#fff;border-radius:.5rem;padding:1rem;margin:1rem 0;font-family:ui-monospace,monospace;font-size:.875rem;overflow-x:auto}._cyber-editor_q6ohd_1 .tiptap pre code{background-color:transparent;color:inherit;padding:0}._cyber-editor_q6ohd_1 .tiptap h1,._cyber-editor_q6ohd_1 .tiptap h2,._cyber-editor_q6ohd_1 .tiptap h3,._cyber-editor_q6ohd_1 .tiptap h4,._cyber-editor_q6ohd_1 .tiptap h5,._cyber-editor_q6ohd_1 .tiptap h6{font-weight:700;line-height:1.25;margin-top:1.5rem;margin-bottom:1rem}._cyber-editor_q6ohd_1 .tiptap h1{font-size:1.875rem}._cyber-editor_q6ohd_1 .tiptap h2{font-size:1.5rem}._cyber-editor_q6ohd_1 .tiptap h3{font-size:1.25rem}._cyber-editor_q6ohd_1 .tiptap h4{font-size:1.125rem}._cyber-editor_q6ohd_1 .tiptap h5,._cyber-editor_q6ohd_1 .tiptap h6{font-size:1rem}._cyber-editor_q6ohd_1 .tiptap ul,._cyber-editor_q6ohd_1 .tiptap ol{padding-left:1.5rem;margin:1rem 0}._cyber-editor_q6ohd_1 .tiptap ul{list-style-type:disc}._cyber-editor_q6ohd_1 .tiptap ol{list-style-type:decimal}._cyber-editor_q6ohd_1 .tiptap li,._cyber-editor_q6ohd_1 .tiptap li p{margin:.25rem 0}._cyber-editor_q6ohd_1 .tiptap ul[data-type=taskList]{list-style:none;padding-left:.5rem}._cyber-editor_q6ohd_1 .tiptap ul[data-type=taskList] li{display:flex;gap:.5rem;align-items:flex-start}._cyber-editor_q6ohd_1 .tiptap ul[data-type=taskList] input[type=checkbox]{margin-top:.25rem}._cyber-editor_q6ohd_1 .tiptap blockquote{border-left:4px solid rgb(209,213,219);padding-left:1rem;margin:1rem 0;font-style:italic}._cyber-editor_q6ohd_1 .tiptap hr{border:none;border-top:2px solid rgb(229,231,235);margin:2rem 0}._cyber-editor_q6ohd_1 .tiptap table{width:100%;border-collapse:collapse;margin:1rem 0;border:1px solid rgb(229,231,235)}._cyber-editor_q6ohd_1 .tiptap th{background-color:#f9fafb;font-weight:600}._cyber-editor_q6ohd_1 .tiptap td,._cyber-editor_q6ohd_1 .tiptap th{padding:.5rem;text-align:left;border:1px solid rgb(229,231,235);min-width:100px}._cyber-editor_q6ohd_1 .tiptap .tableWrapper{position:relative;margin:1rem 0;overflow-x:auto}._cyber-editor_q6ohd_1 .tiptap .selectedCell{background-color:#eff6ff}._cyber-editor_q6ohd_1 .tiptap .column-resize-handle{position:absolute;top:0;right:0;width:4px;height:100%;background-color:#3b82f6;opacity:0;cursor:col-resize;transition:opacity .2s}._cyber-editor_q6ohd_1 .tiptap .column-resize-handle:hover{opacity:1}._cyber-editor_q6ohd_1 .tiptap .text-left{text-align:left}._cyber-editor_q6ohd_1 .tiptap .text-center{text-align:center}._cyber-editor_q6ohd_1 .tiptap .text-right{text-align:right}._cyber-editor_q6ohd_1 .tiptap .text-justify{text-align:justify}._cyber-editor_q6ohd_1 .ProseMirror{outline:none}._cyber-editor_q6ohd_1 .ProseMirror:focus{outline:none;box-shadow:0 0 0 3px #3b82f680}._cyber-editor_q6ohd_1 .editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;padding:.5rem;background-color:#fff;border-bottom:1px solid rgb(229,231,235)}._cyber-editor_q6ohd_1 .editor-toolbar button{padding:.5rem;border-radius:.375rem;transition:all .2s}._cyber-editor_q6ohd_1 .editor-toolbar button:hover,._cyber-editor_q6ohd_1 .editor-toolbar button.is-active{background-color:#dbeafe;color:#2563eb}._cyber-editor_q6ohd_1 .editor-toolbar button:disabled{opacity:.5;cursor:not-allowed}._cyber-editor_q6ohd_1 .editor-toolbar .divider{height:1.25rem;width:1px;background-color:#d1d5db;margin:0 .5rem}@media (max-width: 640px){._cyber-editor_q6ohd_1 .tiptap table{display:block;overflow-x:auto}._cyber-editor_q6ohd_1 .editor-toolbar{justify-content:center}}._cyber-editor_q6ohd_1 .animate-slide-up{animation:slide-up .3s ease-out}@keyframes _slide-up_q6ohd_1{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}._cyber-editor_q6ohd_1 .accordion-header:hover{opacity:.8;transition:all .2s ease}._overlay_giq1a_2,._fullscreen_giq1a_2,._block_giq1a_3{z-index:50;background:linear-gradient(135deg,#ffffff80,#fffc);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);display:flex;justify-content:center;align-items:center;width:100%;height:100%;animation:_overlay-fade-in_giq1a_1 .5s ease-out}._fullscreen_giq1a_2{position:fixed;top:0;right:0;bottom:0;left:0}._block_giq1a_3{position:relative;width:auto;height:auto}._container_giq1a_31{display:flex;justify-content:center;align-items:center;position:relative}._ring_giq1a_39{width:clamp(60px,10vw,190px);height:clamp(60px,10vw,190px);border:2px solid transparent;border-radius:50%;position:absolute;transition:transform .3s ease}._ring_giq1a_39:nth-child(1){border-bottom:8px solid rgb(240,42,230);animation:_rotate1_giq1a_1 1s linear infinite}._ring_giq1a_39:nth-child(2){border-bottom:8px solid rgb(240,19,67);animation:_rotate2_giq1a_1 1s linear infinite}._ring_giq1a_39:nth-child(3){border-bottom:8px solid rgb(3,170,170);animation:_rotate3_giq1a_1 1s linear infinite}._ring_giq1a_39:nth-child(4){border-bottom:8px solid rgb(207,135,1);animation:_rotate4_giq1a_1 1s linear infinite}._message_giq1a_70{color:#524f4f;font-weight:700;letter-spacing:5px;animation:_text-fade_giq1a_1 2s ease-in-out infinite alternate;font-size:1rem}@keyframes _rotate1_giq1a_1{0%{transform:rotateX(50deg) rotate(110deg)}to{transform:rotateX(50deg) rotate(470deg)}}@keyframes _rotate2_giq1a_1{0%{transform:rotateX(20deg) rotateY(50deg) rotate(20deg)}to{transform:rotateX(20deg) rotateY(50deg) rotate(380deg)}}@keyframes _rotate3_giq1a_1{0%{transform:rotateX(40deg) rotateY(130deg) rotate(450deg)}to{transform:rotateX(40deg) rotateY(130deg) rotate(90deg)}}@keyframes _rotate4_giq1a_1{0%{transform:rotateX(70deg) rotate(270deg)}to{transform:rotateX(70deg) rotate(630deg)}}@keyframes _text-fade_giq1a_1{0%{opacity:.6}to{opacity:1}}@keyframes _overlay-fade-in_giq1a_1{0%{opacity:0}to{opacity:1}}/*! tailwindcss v4.0.17 | MIT License | https://tailwindcss.com */@layer theme{:root,:host{--ce-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--ce-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ce-color-blue-50:oklch(.97 .014 254.604);--ce-color-blue-100:oklch(.932 .032 255.585);--ce-color-blue-400:oklch(.707 .165 254.624);--ce-color-blue-600:oklch(.546 .245 262.881);--ce-color-blue-700:oklch(.488 .243 264.376);--ce-color-indigo-200:oklch(.87 .065 274.039);--ce-color-indigo-300:oklch(.785 .115 274.713);--ce-color-gray-50:oklch(.985 .002 247.839);--ce-color-gray-200:oklch(.928 .006 264.531);--ce-color-gray-300:oklch(.872 .01 258.338);--ce-color-gray-600:oklch(.446 .03 256.802);--ce-color-gray-700:oklch(.373 .034 259.733);--ce-color-black:#000;--ce-color-white:#fff;--ce-spacing:.25rem;--ce-text-sm:.875rem;--ce-text-sm--line-height:calc(1.25/.875);--ce-text-lg:1.125rem;--ce-text-lg--line-height:calc(1.75/1.125);--ce-font-weight-medium:500;--ce-font-weight-bold:700;--ce-radius-sm:.25rem;--ce-radius-md:.375rem;--ce-radius-lg:.5rem;--ce-ease-in-out:cubic-bezier(.4,0,.2,1);--ce-default-transition-duration:.15s;--ce-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--ce-default-font-family:var(--ce-font-sans);--ce-default-mono-font-family:var(--ce-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--ce-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--ce-default-font-feature-settings,normal);font-variation-settings:var(--ce-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--ce-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--ce-default-mono-font-feature-settings,normal);font-variation-settings:var(--ce-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:color-mix(in oklab,currentColor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.ce\:fixed{position:fixed}.ce\:relative{position:relative}.ce\:right-4{right:calc(var(--ce-spacing)*4)}.ce\:bottom-20{bottom:calc(var(--ce-spacing)*20)}.ce\:z-40{z-index:40}.ce\:mx-2{margin-inline:calc(var(--ce-spacing)*2)}.ce\:my-4{margin-block:calc(var(--ce-spacing)*4)}.ce\:mt-1{margin-top:calc(var(--ce-spacing)*1)}.ce\:mt-2{margin-top:calc(var(--ce-spacing)*2)}.ce\:mt-3{margin-top:calc(var(--ce-spacing)*3)}.ce\:mb-3{margin-bottom:calc(var(--ce-spacing)*3)}.ce\:block{display:block}.ce\:flex{display:flex}.ce\:grid{display:grid}.ce\:inline-block{display:inline-block}.ce\:h-5{height:calc(var(--ce-spacing)*5)}.ce\:h-8{height:calc(var(--ce-spacing)*8)}.ce\:h-auto{height:auto}.ce\:max-h-0{max-height:calc(var(--ce-spacing)*0)}.ce\:max-h-96{max-height:calc(var(--ce-spacing)*96)}.ce\:w-5{width:calc(var(--ce-spacing)*5)}.ce\:w-8{width:calc(var(--ce-spacing)*8)}.ce\:w-56{width:calc(var(--ce-spacing)*56)}.ce\:w-64{width:calc(var(--ce-spacing)*64)}.ce\:w-\[1px\]{width:1px}.ce\:w-full{width:100%}.ce\:max-w-full{max-width:100%}.ce\:flex-1{flex:1}.ce\:scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.ce\:rotate-180{rotate:180deg}.ce\:cursor-not-allowed{cursor:not-allowed}.ce\:cursor-pointer{cursor:pointer}.ce\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.ce\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.ce\:flex-col{flex-direction:column}.ce\:flex-wrap{flex-wrap:wrap}.ce\:items-center{align-items:center}.ce\:justify-between{justify-content:space-between}.ce\:justify-center{justify-content:center}.ce\:gap-1{gap:calc(var(--ce-spacing)*1)}.ce\:gap-2{gap:calc(var(--ce-spacing)*2)}.ce\:gap-4{gap:calc(var(--ce-spacing)*4)}.ce\:gap-6{gap:calc(var(--ce-spacing)*6)}:where(.ce\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--ce-spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--ce-spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.ce\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--ce-spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--ce-spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.ce\:space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--ce-spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--ce-spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.ce\:space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--ce-spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--ce-spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}.ce\:overflow-hidden{overflow:hidden}.ce\:rounded{border-radius:.25rem}.ce\:rounded-lg{border-radius:var(--ce-radius-lg)}.ce\:rounded-md{border-radius:var(--ce-radius-md)}.ce\:rounded-sm{border-radius:var(--ce-radius-sm)}.ce\:rounded-t-lg{border-top-left-radius:var(--ce-radius-lg);border-top-right-radius:var(--ce-radius-lg)}.ce\:border{border-style:var(--tw-border-style);border-width:1px}.ce\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.ce\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.ce\:border-none{--tw-border-style:none;border-style:none}.ce\:border-gray-200{border-color:var(--ce-color-gray-200)}.ce\:border-gray-300{border-color:var(--ce-color-gray-300)}.ce\:border-white{border-color:var(--ce-color-white)}.ce\:bg-blue-50{background-color:var(--ce-color-blue-50)}.ce\:bg-blue-100{background-color:var(--ce-color-blue-100)}.ce\:bg-blue-400{background-color:var(--ce-color-blue-400)}.ce\:bg-gray-50{background-color:var(--ce-color-gray-50)}.ce\:bg-gray-200{background-color:var(--ce-color-gray-200)}.ce\:bg-gray-300{background-color:var(--ce-color-gray-300)}.ce\:bg-transparent{background-color:#0000}.ce\:bg-white{background-color:var(--ce-color-white)}.ce\:object-contain{object-fit:contain}.ce\:p-1{padding:calc(var(--ce-spacing)*1)}.ce\:p-2{padding:calc(var(--ce-spacing)*2)}.ce\:p-3{padding:calc(var(--ce-spacing)*3)}.ce\:p-4{padding:calc(var(--ce-spacing)*4)}.ce\:px-3{padding-inline:calc(var(--ce-spacing)*3)}.ce\:px-6{padding-inline:calc(var(--ce-spacing)*6)}.ce\:py-1{padding-block:calc(var(--ce-spacing)*1)}.ce\:py-4{padding-block:calc(var(--ce-spacing)*4)}.ce\:pt-4{padding-top:calc(var(--ce-spacing)*4)}.ce\:text-center{text-align:center}.ce\:text-lg{font-size:var(--ce-text-lg);line-height:var(--tw-leading,var(--ce-text-lg--line-height))}.ce\:text-sm{font-size:var(--ce-text-sm);line-height:var(--tw-leading,var(--ce-text-sm--line-height))}.ce\:font-bold{--tw-font-weight:var(--ce-font-weight-bold);font-weight:var(--ce-font-weight-bold)}.ce\:font-medium{--tw-font-weight:var(--ce-font-weight-medium);font-weight:var(--ce-font-weight-medium)}.ce\:text-black{color:var(--ce-color-black)}.ce\:text-blue-600{color:var(--ce-color-blue-600)}.ce\:text-gray-600{color:var(--ce-color-gray-600)}.ce\:text-gray-700{color:var(--ce-color-gray-700)}.ce\:opacity-0{opacity:0}.ce\:opacity-50{opacity:.5}.ce\:opacity-100{opacity:1}.ce\:shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ce\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ce\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ce\:shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ce\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--ce-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ce-default-transition-duration))}.ce\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--ce-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ce-default-transition-duration))}.ce\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--ce-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ce-default-transition-duration))}.ce\:duration-200{--tw-duration:.2s;transition-duration:.2s}.ce\:duration-300{--tw-duration:.3s;transition-duration:.3s}.ce\:ease-in-out{--tw-ease:var(--ce-ease-in-out);transition-timing-function:var(--ce-ease-in-out)}.ce\:outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.ce\:hover\:bg-blue-100:hover{background-color:var(--ce-color-blue-100)}.ce\:hover\:bg-gray-300:hover{background-color:var(--ce-color-gray-300)}.ce\:hover\:text-blue-600:hover{color:var(--ce-color-blue-600)}.ce\:hover\:text-blue-700:hover{color:var(--ce-color-blue-700)}}.ce\:focus\:border-indigo-300:focus{border-color:var(--ce-color-indigo-300)}.ce\:focus\:ring:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ce\:focus\:ring-indigo-200:focus{--tw-ring-color:var(--ce-color-indigo-200)}}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
|
1
|
+
._cyber-editor_q6ohd_1 .ProseMirror:focus{outline:none!important;box-shadow:none!important}._cyber-editor_q6ohd_1 .is-active{background-color:#6c5ce7;color:#fff;padding:2px 12px;border-radius:6px;box-shadow:0 2px 4px #0003;transition:background-color .3s ease,color .3s ease;transform:scale(1.05)}._cyber-editor_q6ohd_1 .tiptap :first-child{margin-top:0}._cyber-editor_q6ohd_1 .tiptap strong{font-weight:700}._cyber-editor_q6ohd_1 .tiptap em{font-style:italic}._cyber-editor_q6ohd_1 .tiptap u{text-decoration:underline}._cyber-editor_q6ohd_1 .tiptap s{text-decoration:line-through}._cyber-editor_q6ohd_1 .tiptap sub{vertical-align:sub;font-size:.875rem}._cyber-editor_q6ohd_1 .tiptap sup{vertical-align:super;font-size:.875rem}._cyber-editor_q6ohd_1 .tiptap code{background-color:#f3e8ff;color:#581c87;border-radius:.25rem;padding:.125rem .375rem;font-size:.875rem;font-family:ui-monospace,monospace}._cyber-editor_q6ohd_1 .tiptap pre{background-color:#111827;color:#fff;border-radius:.5rem;padding:1rem;margin:1rem 0;font-family:ui-monospace,monospace;font-size:.875rem;overflow-x:auto}._cyber-editor_q6ohd_1 .tiptap pre code{background-color:transparent;color:inherit;padding:0}._cyber-editor_q6ohd_1 .tiptap h1,._cyber-editor_q6ohd_1 .tiptap h2,._cyber-editor_q6ohd_1 .tiptap h3,._cyber-editor_q6ohd_1 .tiptap h4,._cyber-editor_q6ohd_1 .tiptap h5,._cyber-editor_q6ohd_1 .tiptap h6{font-weight:700;line-height:1.25;margin-top:1.5rem;margin-bottom:1rem}._cyber-editor_q6ohd_1 .tiptap h1{font-size:1.875rem}._cyber-editor_q6ohd_1 .tiptap h2{font-size:1.5rem}._cyber-editor_q6ohd_1 .tiptap h3{font-size:1.25rem}._cyber-editor_q6ohd_1 .tiptap h4{font-size:1.125rem}._cyber-editor_q6ohd_1 .tiptap h5,._cyber-editor_q6ohd_1 .tiptap h6{font-size:1rem}._cyber-editor_q6ohd_1 .tiptap ul,._cyber-editor_q6ohd_1 .tiptap ol{padding-left:1.5rem;margin:1rem 0}._cyber-editor_q6ohd_1 .tiptap ul{list-style-type:disc}._cyber-editor_q6ohd_1 .tiptap ol{list-style-type:decimal}._cyber-editor_q6ohd_1 .tiptap li,._cyber-editor_q6ohd_1 .tiptap li p{margin:.25rem 0}._cyber-editor_q6ohd_1 .tiptap ul[data-type=taskList]{list-style:none;padding-left:.5rem}._cyber-editor_q6ohd_1 .tiptap ul[data-type=taskList] li{display:flex;gap:.5rem;align-items:flex-start}._cyber-editor_q6ohd_1 .tiptap ul[data-type=taskList] input[type=checkbox]{margin-top:.25rem}._cyber-editor_q6ohd_1 .tiptap blockquote{border-left:4px solid rgb(209,213,219);padding-left:1rem;margin:1rem 0;font-style:italic}._cyber-editor_q6ohd_1 .tiptap hr{border:none;border-top:2px solid rgb(229,231,235);margin:2rem 0}._cyber-editor_q6ohd_1 .tiptap table{width:100%;border-collapse:collapse;margin:1rem 0;border:1px solid rgb(229,231,235)}._cyber-editor_q6ohd_1 .tiptap th{background-color:#f9fafb;font-weight:600}._cyber-editor_q6ohd_1 .tiptap td,._cyber-editor_q6ohd_1 .tiptap th{padding:.5rem;text-align:left;border:1px solid rgb(229,231,235);min-width:100px}._cyber-editor_q6ohd_1 .tiptap .tableWrapper{position:relative;margin:1rem 0;overflow-x:auto}._cyber-editor_q6ohd_1 .tiptap .selectedCell{background-color:#eff6ff}._cyber-editor_q6ohd_1 .tiptap .column-resize-handle{position:absolute;top:0;right:0;width:4px;height:100%;background-color:#3b82f6;opacity:0;cursor:col-resize;transition:opacity .2s}._cyber-editor_q6ohd_1 .tiptap .column-resize-handle:hover{opacity:1}._cyber-editor_q6ohd_1 .tiptap .text-left{text-align:left}._cyber-editor_q6ohd_1 .tiptap .text-center{text-align:center}._cyber-editor_q6ohd_1 .tiptap .text-right{text-align:right}._cyber-editor_q6ohd_1 .tiptap .text-justify{text-align:justify}._cyber-editor_q6ohd_1 .ProseMirror{outline:none}._cyber-editor_q6ohd_1 .ProseMirror:focus{outline:none;box-shadow:0 0 0 3px #3b82f680}._cyber-editor_q6ohd_1 .editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;padding:.5rem;background-color:#fff;border-bottom:1px solid rgb(229,231,235)}._cyber-editor_q6ohd_1 .editor-toolbar button{padding:.5rem;border-radius:.375rem;transition:all .2s}._cyber-editor_q6ohd_1 .editor-toolbar button:hover,._cyber-editor_q6ohd_1 .editor-toolbar button.is-active{background-color:#dbeafe;color:#2563eb}._cyber-editor_q6ohd_1 .editor-toolbar button:disabled{opacity:.5;cursor:not-allowed}._cyber-editor_q6ohd_1 .editor-toolbar .divider{height:1.25rem;width:1px;background-color:#d1d5db;margin:0 .5rem}@media (max-width: 640px){._cyber-editor_q6ohd_1 .tiptap table{display:block;overflow-x:auto}._cyber-editor_q6ohd_1 .editor-toolbar{justify-content:center}}._cyber-editor_q6ohd_1 .animate-slide-up{animation:slide-up .3s ease-out}@keyframes _slide-up_q6ohd_1{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}._cyber-editor_q6ohd_1 .accordion-header:hover{opacity:.8;transition:all .2s ease}._overlay_giq1a_2,._fullscreen_giq1a_2,._block_giq1a_3{z-index:50;background:linear-gradient(135deg,#ffffff80,#fffc);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);display:flex;justify-content:center;align-items:center;width:100%;height:100%;animation:_overlay-fade-in_giq1a_1 .5s ease-out}._fullscreen_giq1a_2{position:fixed;top:0;right:0;bottom:0;left:0}._block_giq1a_3{position:relative;width:auto;height:auto}._container_giq1a_31{display:flex;justify-content:center;align-items:center;position:relative}._ring_giq1a_39{width:clamp(60px,10vw,190px);height:clamp(60px,10vw,190px);border:2px solid transparent;border-radius:50%;position:absolute;transition:transform .3s ease}._ring_giq1a_39:nth-child(1){border-bottom:8px solid rgb(240,42,230);animation:_rotate1_giq1a_1 1s linear infinite}._ring_giq1a_39:nth-child(2){border-bottom:8px solid rgb(240,19,67);animation:_rotate2_giq1a_1 1s linear infinite}._ring_giq1a_39:nth-child(3){border-bottom:8px solid rgb(3,170,170);animation:_rotate3_giq1a_1 1s linear infinite}._ring_giq1a_39:nth-child(4){border-bottom:8px solid rgb(207,135,1);animation:_rotate4_giq1a_1 1s linear infinite}._message_giq1a_70{color:#524f4f;font-weight:700;letter-spacing:5px;animation:_text-fade_giq1a_1 2s ease-in-out infinite alternate;font-size:1rem}@keyframes _rotate1_giq1a_1{0%{transform:rotateX(50deg) rotate(110deg)}to{transform:rotateX(50deg) rotate(470deg)}}@keyframes _rotate2_giq1a_1{0%{transform:rotateX(20deg) rotateY(50deg) rotate(20deg)}to{transform:rotateX(20deg) rotateY(50deg) rotate(380deg)}}@keyframes _rotate3_giq1a_1{0%{transform:rotateX(40deg) rotateY(130deg) rotate(450deg)}to{transform:rotateX(40deg) rotateY(130deg) rotate(90deg)}}@keyframes _rotate4_giq1a_1{0%{transform:rotateX(70deg) rotate(270deg)}to{transform:rotateX(70deg) rotate(630deg)}}@keyframes _text-fade_giq1a_1{0%{opacity:.6}to{opacity:1}}@keyframes _overlay-fade-in_giq1a_1{0%{opacity:0}to{opacity:1}}/*! tailwindcss v4.0.17 | MIT License | https://tailwindcss.com */@layer theme{:root,:host{--ce-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--ce-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ce-color-blue-50:oklch(.97 .014 254.604);--ce-color-blue-100:oklch(.932 .032 255.585);--ce-color-blue-400:oklch(.707 .165 254.624);--ce-color-blue-600:oklch(.546 .245 262.881);--ce-color-blue-700:oklch(.488 .243 264.376);--ce-color-indigo-200:oklch(.87 .065 274.039);--ce-color-indigo-300:oklch(.785 .115 274.713);--ce-color-indigo-500:oklch(.585 .233 277.117);--ce-color-indigo-600:oklch(.511 .262 276.966);--ce-color-indigo-700:oklch(.457 .24 277.023);--ce-color-gray-50:oklch(.985 .002 247.839);--ce-color-gray-200:oklch(.928 .006 264.531);--ce-color-gray-300:oklch(.872 .01 258.338);--ce-color-gray-600:oklch(.446 .03 256.802);--ce-color-gray-700:oklch(.373 .034 259.733);--ce-color-black:#000;--ce-color-white:#fff;--ce-spacing:.25rem;--ce-text-sm:.875rem;--ce-text-sm--line-height:calc(1.25/.875);--ce-text-lg:1.125rem;--ce-text-lg--line-height:calc(1.75/1.125);--ce-font-weight-medium:500;--ce-font-weight-bold:700;--ce-radius-sm:.25rem;--ce-radius-md:.375rem;--ce-radius-lg:.5rem;--ce-ease-in-out:cubic-bezier(.4,0,.2,1);--ce-default-transition-duration:.15s;--ce-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--ce-default-font-family:var(--ce-font-sans);--ce-default-mono-font-family:var(--ce-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--ce-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--ce-default-font-feature-settings,normal);font-variation-settings:var(--ce-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--ce-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--ce-default-mono-font-feature-settings,normal);font-variation-settings:var(--ce-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:color-mix(in oklab,currentColor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.ce\:fixed{position:fixed}.ce\:relative{position:relative}.ce\:right-4{right:calc(var(--ce-spacing)*4)}.ce\:bottom-20{bottom:calc(var(--ce-spacing)*20)}.ce\:z-40{z-index:40}.ce\:mx-2{margin-inline:calc(var(--ce-spacing)*2)}.ce\:my-4{margin-block:calc(var(--ce-spacing)*4)}.ce\:mt-1{margin-top:calc(var(--ce-spacing)*1)}.ce\:mt-2{margin-top:calc(var(--ce-spacing)*2)}.ce\:mt-3{margin-top:calc(var(--ce-spacing)*3)}.ce\:mb-3{margin-bottom:calc(var(--ce-spacing)*3)}.ce\:block{display:block}.ce\:flex{display:flex}.ce\:grid{display:grid}.ce\:inline-block{display:inline-block}.ce\:h-5{height:calc(var(--ce-spacing)*5)}.ce\:h-8{height:calc(var(--ce-spacing)*8)}.ce\:h-auto{height:auto}.ce\:max-h-0{max-height:calc(var(--ce-spacing)*0)}.ce\:max-h-96{max-height:calc(var(--ce-spacing)*96)}.ce\:w-5{width:calc(var(--ce-spacing)*5)}.ce\:w-8{width:calc(var(--ce-spacing)*8)}.ce\:w-56{width:calc(var(--ce-spacing)*56)}.ce\:w-64{width:calc(var(--ce-spacing)*64)}.ce\:w-\[1px\]{width:1px}.ce\:w-full{width:100%}.ce\:max-w-full{max-width:100%}.ce\:flex-1{flex:1}.ce\:scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.ce\:rotate-180{rotate:180deg}.ce\:cursor-not-allowed{cursor:not-allowed}.ce\:cursor-pointer{cursor:pointer}.ce\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.ce\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.ce\:flex-col{flex-direction:column}.ce\:flex-wrap{flex-wrap:wrap}.ce\:items-center{align-items:center}.ce\:justify-between{justify-content:space-between}.ce\:justify-center{justify-content:center}.ce\:gap-1{gap:calc(var(--ce-spacing)*1)}.ce\:gap-2{gap:calc(var(--ce-spacing)*2)}.ce\:gap-4{gap:calc(var(--ce-spacing)*4)}.ce\:gap-6{gap:calc(var(--ce-spacing)*6)}:where(.ce\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--ce-spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--ce-spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.ce\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--ce-spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--ce-spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.ce\:space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--ce-spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--ce-spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.ce\:space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--ce-spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--ce-spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}.ce\:overflow-hidden{overflow:hidden}.ce\:rounded{border-radius:.25rem}.ce\:rounded-lg{border-radius:var(--ce-radius-lg)}.ce\:rounded-md{border-radius:var(--ce-radius-md)}.ce\:rounded-sm{border-radius:var(--ce-radius-sm)}.ce\:rounded-t-lg{border-top-left-radius:var(--ce-radius-lg);border-top-right-radius:var(--ce-radius-lg)}.ce\:border{border-style:var(--tw-border-style);border-width:1px}.ce\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.ce\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.ce\:border-none{--tw-border-style:none;border-style:none}.ce\:border-gray-200{border-color:var(--ce-color-gray-200)}.ce\:border-gray-300{border-color:var(--ce-color-gray-300)}.ce\:border-white{border-color:var(--ce-color-white)}.ce\:bg-blue-50{background-color:var(--ce-color-blue-50)}.ce\:bg-blue-100{background-color:var(--ce-color-blue-100)}.ce\:bg-blue-400{background-color:var(--ce-color-blue-400)}.ce\:bg-gray-50{background-color:var(--ce-color-gray-50)}.ce\:bg-gray-200{background-color:var(--ce-color-gray-200)}.ce\:bg-gray-300{background-color:var(--ce-color-gray-300)}.ce\:bg-indigo-600{background-color:var(--ce-color-indigo-600)}.ce\:bg-transparent{background-color:#0000}.ce\:bg-white{background-color:var(--ce-color-white)}.ce\:object-contain{object-fit:contain}.ce\:p-1{padding:calc(var(--ce-spacing)*1)}.ce\:p-2{padding:calc(var(--ce-spacing)*2)}.ce\:p-3{padding:calc(var(--ce-spacing)*3)}.ce\:p-4{padding:calc(var(--ce-spacing)*4)}.ce\:px-3{padding-inline:calc(var(--ce-spacing)*3)}.ce\:px-4{padding-inline:calc(var(--ce-spacing)*4)}.ce\:px-6{padding-inline:calc(var(--ce-spacing)*6)}.ce\:py-1{padding-block:calc(var(--ce-spacing)*1)}.ce\:py-2{padding-block:calc(var(--ce-spacing)*2)}.ce\:py-4{padding-block:calc(var(--ce-spacing)*4)}.ce\:pt-4{padding-top:calc(var(--ce-spacing)*4)}.ce\:text-center{text-align:center}.ce\:text-lg{font-size:var(--ce-text-lg);line-height:var(--tw-leading,var(--ce-text-lg--line-height))}.ce\:text-sm{font-size:var(--ce-text-sm);line-height:var(--tw-leading,var(--ce-text-sm--line-height))}.ce\:font-bold{--tw-font-weight:var(--ce-font-weight-bold);font-weight:var(--ce-font-weight-bold)}.ce\:font-medium{--tw-font-weight:var(--ce-font-weight-medium);font-weight:var(--ce-font-weight-medium)}.ce\:text-black{color:var(--ce-color-black)}.ce\:text-blue-600{color:var(--ce-color-blue-600)}.ce\:text-gray-600{color:var(--ce-color-gray-600)}.ce\:text-gray-700{color:var(--ce-color-gray-700)}.ce\:text-white{color:var(--ce-color-white)}.ce\:opacity-0{opacity:0}.ce\:opacity-50{opacity:.5}.ce\:opacity-100{opacity:1}.ce\:shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ce\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ce\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ce\:shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ce\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--ce-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ce-default-transition-duration))}.ce\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--ce-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ce-default-transition-duration))}.ce\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--ce-default-transition-timing-function));transition-duration:var(--tw-duration,var(--ce-default-transition-duration))}.ce\:duration-200{--tw-duration:.2s;transition-duration:.2s}.ce\:duration-300{--tw-duration:.3s;transition-duration:.3s}.ce\:ease-in-out{--tw-ease:var(--ce-ease-in-out);transition-timing-function:var(--ce-ease-in-out)}.ce\:outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.ce\:hover\:bg-blue-100:hover{background-color:var(--ce-color-blue-100)}.ce\:hover\:bg-gray-300:hover{background-color:var(--ce-color-gray-300)}.ce\:hover\:bg-indigo-700:hover{background-color:var(--ce-color-indigo-700)}.ce\:hover\:text-blue-600:hover{color:var(--ce-color-blue-600)}.ce\:hover\:text-blue-700:hover{color:var(--ce-color-blue-700)}}.ce\:focus\:border-indigo-300:focus{border-color:var(--ce-color-indigo-300)}.ce\:focus\:ring:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ce\:focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ce\:focus\:ring-indigo-200:focus{--tw-ring-color:var(--ce-color-indigo-200)}.ce\:focus\:ring-indigo-500:focus{--tw-ring-color:var(--ce-color-indigo-500)}.ce\:focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ce\:focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
package/dist/cyber-editor.es.js
CHANGED
|
@@ -49550,7 +49550,7 @@ function w6({
|
|
|
49550
49550
|
...r,
|
|
49551
49551
|
width: Number(f.target.value)
|
|
49552
49552
|
}),
|
|
49553
|
-
className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50",
|
|
49553
|
+
className: "ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",
|
|
49554
49554
|
disabled: !n.isEditable
|
|
49555
49555
|
},
|
|
49556
49556
|
void 0,
|
|
@@ -49567,8 +49567,8 @@ function w6({
|
|
|
49567
49567
|
lineNumber: 102,
|
|
49568
49568
|
columnNumber: 29
|
|
49569
49569
|
}, this),
|
|
49570
|
-
/* @__PURE__ */ ve.jsxDEV("div", { className: "flex-1", children: [
|
|
49571
|
-
/* @__PURE__ */ ve.jsxDEV("label", { className: "block text-sm font-medium text-gray-700", children: "Height" }, void 0, !1, {
|
|
49570
|
+
/* @__PURE__ */ ve.jsxDEV("div", { className: "ce:flex-1", children: [
|
|
49571
|
+
/* @__PURE__ */ ve.jsxDEV("label", { className: "ce:block ce:text-sm ce:font-medium ce:text-gray-700", children: "Height" }, void 0, !1, {
|
|
49572
49572
|
fileName: "E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",
|
|
49573
49573
|
lineNumber: 120,
|
|
49574
49574
|
columnNumber: 33
|
|
@@ -49581,7 +49581,7 @@ function w6({
|
|
|
49581
49581
|
...r,
|
|
49582
49582
|
height: f
|
|
49583
49583
|
}),
|
|
49584
|
-
className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50",
|
|
49584
|
+
className: "ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",
|
|
49585
49585
|
disabled: !n.isEditable,
|
|
49586
49586
|
children: [
|
|
49587
49587
|
/* @__PURE__ */ ve.jsxDEV(gr.Option, { value: "auto", children: "Auto" }, void 0, !1, {
|
|
@@ -49630,9 +49630,9 @@ function w6({
|
|
|
49630
49630
|
lineNumber: 101,
|
|
49631
49631
|
columnNumber: 25
|
|
49632
49632
|
}, this),
|
|
49633
|
-
/* @__PURE__ */ ve.jsxDEV("div", { className: "flex gap-4", children: [
|
|
49634
|
-
/* @__PURE__ */ ve.jsxDEV("div", { className: "flex-1", children: [
|
|
49635
|
-
/* @__PURE__ */ ve.jsxDEV("label", { className: "block text-sm font-medium text-gray-700", children: "Margin Left (%)" }, void 0, !1, {
|
|
49633
|
+
/* @__PURE__ */ ve.jsxDEV("div", { className: "ce:flex ce:gap-4", children: [
|
|
49634
|
+
/* @__PURE__ */ ve.jsxDEV("div", { className: "ce:flex-1", children: [
|
|
49635
|
+
/* @__PURE__ */ ve.jsxDEV("label", { className: "ce:block ce:text-sm ce:font-medium ce:text-gray-700", children: "Margin Left (%)" }, void 0, !1, {
|
|
49636
49636
|
fileName: "E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",
|
|
49637
49637
|
lineNumber: 155,
|
|
49638
49638
|
columnNumber: 33
|
|
@@ -49648,7 +49648,7 @@ function w6({
|
|
|
49648
49648
|
Number(f.target.value)
|
|
49649
49649
|
)
|
|
49650
49650
|
}),
|
|
49651
|
-
className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50",
|
|
49651
|
+
className: "ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring focus:ring-indigo-200 ce:focus:ring-opacity-50",
|
|
49652
49652
|
disabled: !n.isEditable
|
|
49653
49653
|
},
|
|
49654
49654
|
void 0,
|
|
@@ -49665,8 +49665,8 @@ function w6({
|
|
|
49665
49665
|
lineNumber: 154,
|
|
49666
49666
|
columnNumber: 29
|
|
49667
49667
|
}, this),
|
|
49668
|
-
/* @__PURE__ */ ve.jsxDEV("div", { className: "flex-1", children: [
|
|
49669
|
-
/* @__PURE__ */ ve.jsxDEV("label", { className: "block text-sm font-medium text-gray-700", children: "Margin Right (%)" }, void 0, !1, {
|
|
49668
|
+
/* @__PURE__ */ ve.jsxDEV("div", { className: "ce:flex-1", children: [
|
|
49669
|
+
/* @__PURE__ */ ve.jsxDEV("label", { className: "ce:block ce:text-sm ce:font-medium ce:text-gray-700", children: "Margin Right (%)" }, void 0, !1, {
|
|
49670
49670
|
fileName: "E:/CyberSkill/cyber-editor/src/modules/image/image-view.component.tsx",
|
|
49671
49671
|
lineNumber: 174,
|
|
49672
49672
|
columnNumber: 33
|
|
@@ -49682,7 +49682,7 @@ function w6({
|
|
|
49682
49682
|
Number(f.target.value)
|
|
49683
49683
|
)
|
|
49684
49684
|
}),
|
|
49685
|
-
className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50",
|
|
49685
|
+
className: "ce:mt-1 ce:block ce:w-full ce:rounded-md ce:border-gray-300 ce:shadow-sm ce:focus:border-indigo-300 ce:focus:ring ce:focus:ring-indigo-200 ce:focus:ring-opacity-50",
|
|
49686
49686
|
disabled: !n.isEditable
|
|
49687
49687
|
},
|
|
49688
49688
|
void 0,
|
|
@@ -49709,7 +49709,7 @@ function w6({
|
|
|
49709
49709
|
{
|
|
49710
49710
|
type: "button",
|
|
49711
49711
|
onClick: u,
|
|
49712
|
-
className: "w-full py-2 px-4 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",
|
|
49712
|
+
className: "ce:w-full ce:py-2 ce:px-4 ce:bg-indigo-600 ce:text-white ce:rounded-md ce:hover:bg-indigo-700 ce:focus:outline-none ce:focus:ring-2 ce:focus:ring-indigo-500 ce:focus:ring-offset-2",
|
|
49713
49713
|
disabled: !n.isEditable,
|
|
49714
49714
|
children: "Update Image"
|
|
49715
49715
|
},
|