sykpcomposer 1.20.113 → 1.20.114

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/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { O as a, Q as m } from "./index-3e601592.js";
1
+ import { O as a, Q as m } from "./index-eb176ae4.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  export {
package/dist/index.umd.js CHANGED
@@ -1563,10 +1563,15 @@ Valid keys: `+JSON.stringify(Object.keys(U),null," "));var Y=X(J,Z,$,P,W+"."+Z,
1563
1563
  font-size: 14.5px !important;
1564
1564
  }
1565
1565
 
1566
+ // .PlaygroundEditorTheme__h6 {
1567
+ // background: rgba(255, 212, 0, 0.14);
1568
+ // border-bottom: 2px solid rgba(255, 212, 0, 0.3);
1569
+ // padding-bottom: 2px;
1570
+ // }
1571
+
1566
1572
  .PlaygroundEditorTheme__h6 {
1567
- background: rgba(255, 212, 0, 0.14);
1568
- border-bottom: 2px solid rgba(255, 212, 0, 0.3);
1569
- padding-bottom: 2px;
1573
+ font-size: 0.2px;
1574
+ opacity: 0;
1570
1575
  }
1571
1576
  `})})},WS=po(),K5=l=>{let t=5381;const n=l.trim().replace(/\s+/g," ");for(let e=0;e<n.length;e++)t=(t<<5)+t+n.charCodeAt(e);return`h-${Math.abs(t%1e9)}`},JS=({references:l,setReferences:t,position:n,onClose:e,IsexistingIdPresent:s})=>{const[o]=yn(),[r,a]=fe.useState([]),[c,i]=fe.useState("");fe.useEffect(()=>{if(!o)return;function f(h,m,g,b,v,_){var x,C,T;const E=(x=h.getTextContent)==null?void 0:x.call(h),S=(C=h.getKey)==null?void 0:C.call(h),w=Up(h),y=gr(h);if(!v&&E&&E.trim()&&S){const D=m.getElementByKey(S);if(D){let F=((T=D.getAttribute("data-ref-id"))==null?void 0:T.replace("ref-",""))||D.getAttribute("id");if(!F&&w)F=K5(E),D.setAttribute("data-ref-id",`ref-${F}`),D.setAttribute("id",F);else if(!F&&y&&!(D.getAttribute("id")||D.getAttribute("data-ref-id"))){const B=D.querySelector("span[id]");F=(B==null?void 0:B.getAttribute("id"))||null}F&&!_.has(F)&&(_.add(F),b.push({element:D,id:F,label:E}),g.push({id:F,label:E}))}}if(Tt(h))for(const D of h.getChildren())f(D,m,g,b,v,_)}const p=()=>{o.update(()=>{const h=In(),m=[],g=[];f(h,o,m,g,s,new Set),a(g),t(m)})};return p(),o.registerUpdateListener(p)},[o,t]),fe.useEffect(()=>o?o.registerUpdateListener(({editorState:p})=>{p.read(()=>{const h=kt();if(St(h)&&h.isCollapsed()){const m=h.anchor.getNode();if(m.getTextContent){const g=m.getTextContent(),b=g.lastIndexOf("#");if(b!==-1){const v=g.slice(b+1);if(v.length>0&&v[0]===" ")i("");else{const _=v.indexOf(" "),E=_!==-1?v.slice(0,_):v;i(E.trim())}}else i("")}}})}):void 0,[o]);const u=c?r.filter(f=>f.label.toLowerCase().includes(c.toLowerCase())):r;if(!n)return null;const d=f=>{o.focus(),o.update(()=>{const p=kt();if(St(p)&&p.isCollapsed()){const h=p.anchor.getNode();if(h.getTextContent){const m=h.getTextContent(),g=m.lastIndexOf("#");if(g!==-1){const b=m.indexOf(" ",g);let v;b!==-1?v=m.slice(0,g)+m.slice(b):v=m.slice(0,g),h.setTextContent(v)}}}}),i(""),o.dispatchCommand(WS,f),e()};return u.length>0?re.jsx("div",{className:"reference-toolbar",style:{position:"fixed",top:n.y,left:n.x,background:"rgba(255, 255, 255, 0.8)",border:"1px solid rgba(255, 255, 255, 0.3)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",padding:"8px",borderRadius:"8px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:1e3,transition:"opacity 0.2s ease-out, transform 0.2s ease-out",transform:"scale(1.02)",maxHeight:"150px",overflowY:"auto"},children:re.jsx("ul",{style:{margin:0,padding:"5px",listStyle:"none"},children:u.map(f=>re.jsx("li",{style:{cursor:"pointer",padding:"8px 12px",borderRadius:"6px",fontSize:"14px",fontWeight:"500",color:"#333",transition:"background 0.2s ease-in-out, transform 0.1s ease-in-out"},onMouseEnter:p=>p.currentTarget.style.background="#f0f0f0",onMouseLeave:p=>p.currentTarget.style.background="transparent",onClick:()=>d(f),children:f.label},f.id))})}):re.jsx("div",{className:"reference-toolbar",style:{position:"fixed",top:n.y,left:n.x,background:"rgba(255, 255, 255, 0.8)",border:"1px solid rgba(255, 255, 255, 0.3)",WebkitBackdropFilter:"blur(10px)",padding:"8px",borderRadius:"8px",boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.15)",zIndex:1e3,transition:"opacity 0.2s ease-out, transform 0.2s ease-out",transform:"scale(1.02)"},children:re.jsx("p",{style:{fontSize:14,color:"#666"},children:"No references found"})})};function VS({containerRef:l,setContextMenu:t}){const[n]=yn();return fe.useEffect(()=>{const e=n.registerCommand(Pv,s=>{if(s.key==="#"||s.key==="3"&&s.shiftKey){const o=window.getSelection();if(o&&o.rangeCount>0){const r=o.getRangeAt(0);let a=r.getBoundingClientRect();if(r.collapsed){const c=r.cloneRange(),i=document.createElement("span");i.style.display="inline-block",i.textContent="​",r==null||r.insertNode(i),a=i==null?void 0:i.getBoundingClientRect();const u=i.parentNode;i==null||i.remove(),u&&(u==null||u.normalize()),o==null||o.removeAllRanges(),o==null||o.addRange(c)}t({x:a.left,y:a.bottom})}return!1}return!1},0);return()=>{e()}},[n,t,l]),null}const KS=()=>{const[l]=yn();return fe.useEffect(()=>{const t=s=>{const r=s.target.getAttribute("data-ref-id");r&&(s.preventDefault(),s.stopPropagation(),document.querySelectorAll(`[data-ref-id="${r}"]`).forEach(c=>{c.scrollIntoView({behavior:"smooth",block:"center"});const i=c.style.backgroundColor;setTimeout(()=>{c.style.backgroundColor=i},2e3)}))};document.addEventListener("click",t);const n=l.registerCommand(WS,s=>(l.update(()=>{const o=kt();if(St(o)){const r=document.getElementById(s.id||"");r!=null&&r.textContent||s.label;const a=P1(s.id||"",s.label||"");o.insertNodes([a])}}),!0),0),e=document.createElement("style");return e.textContent=`
1572
1577
  .reference-tooltip {