veo-sdk 0.6.4 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -915,7 +915,7 @@ ${o}
915
915
  .veo-mnp-sw { bottom: -4px; left: -4px; width: 12px; height: 12px; cursor: nesw-resize; }
916
916
  .veo-mnp-banner { outline: 1.5px dashed rgba(255, 91, 53, 0.75); outline-offset: -2px; cursor: grab; }
917
917
  .veo-mnp-banner:active { cursor: grabbing; }
918
- `;function Ot(o,e,t){return Math.min(Math.max(o,e),t)}function cr(o){return Math.round(o*1e3)/1e3}function pr(o){return !!(o instanceof Element&&o.closest("button, a, input, textarea, select, label"))}function ur(o){let e=o.host.shadowRoot;if(!e)return null;let t=e.querySelector(".veo-modal-card");if(t)return $a(o,e,t);let n=e.querySelector(".veo-banner");return n&&!n.classList.contains("veo-banner-embedded")?Na(o,e,n):null}function $a(o,e,t){if(t.dataset.veoManipulated==="1")return null;t.dataset.veoManipulated="1",t.classList.add("veo-mnp-card");let n=t.ownerDocument,i=n.createElement("style");i.textContent=dr,e.appendChild(i);let r=[];for(let h of Ia){let v=n.createElement("div");v.className=`veo-mnp-handle veo-mnp-${h}`,v.dataset.veoDir=h,t.appendChild(v),r.push(v);}let s=false,l=false,a={},c=h=>{let v=o.host;h.px!==void 0&&v.style.setProperty("--veo-pos-x",`${h.px*100}%`),h.py!==void 0&&v.style.setProperty("--veo-pos-y",`${h.py*100}%`),h.w!==void 0&&v.style.setProperty("--veo-width",`${h.w}px`),h.h!==void 0&&v.style.setProperty("--veo-min-h",`${h.h}px`);},p=(h,v)=>{h.preventDefault(),h.stopPropagation(),s=true,a={};let y=t.getBoundingClientRect(),E=h.clientX,T=h.clientY,b=0,C=null,R=()=>{if(b=0,!C)return;let I=v(C.clientX-E,C.clientY-T,y);a={...a,...I},c({...I.posX!==void 0?{px:I.posX}:{},...I.posY!==void 0?{py:I.posY}:{},...I.width!==void 0?{w:I.width}:{},...I.height!==void 0?{h:I.height}:{}});},k=I=>{C=I,typeof window.requestAnimationFrame!="function"?R():b||(b=window.requestAnimationFrame(R));},P=()=>{window.removeEventListener("mousemove",k),window.removeEventListener("mouseup",P),b&&window.cancelAnimationFrame(b),R(),s=false,Object.keys(a).length>0&&!l&&o.onCommit({stepIndex:o.stepIndex,style:a}),o.onGestureEnd?.();};window.addEventListener("mousemove",k),window.addEventListener("mouseup",P);},m=(h,v)=>{let y=window.innerWidth-v;return y<=0?.5:cr(Ot(h/y,0,1))},u=(h,v)=>{let y=window.innerHeight-v;return y<=0?.5:cr(Ot(h/y,0,1))},d=h=>{pr(h.target)||h.target instanceof Element&&h.target.closest(".veo-mnp-handle")||p(h,(v,y,E)=>({posX:m(E.left+v,E.width),posY:u(E.top+y,E.height)}));},f=h=>{let v=h.currentTarget.dataset.veoDir;p(h,(y,E,T)=>{let b={};return v.includes("e")&&(b.width=Math.round(Ot(T.width+y,220,720))),v.includes("w")&&(b.width=Math.round(Ot(T.width-y,220,720)),b.posX=m(T.right-b.width,b.width)),v.includes("s")&&(b.height=Math.round(Ot(T.height+E,120,900))),v.includes("n")&&(b.height=Math.round(Ot(T.height-E,120,900)),b.posY=u(T.bottom-b.height,b.height)),b});};t.addEventListener("mousedown",d);for(let h of r)h.addEventListener("mousedown",f);return {isDragging:()=>s,detach:()=>{if(!l){l=true,t.removeEventListener("mousedown",d);for(let h of r)h.remove();i.remove(),t.classList.remove("veo-mnp-card"),delete t.dataset.veoManipulated;}}}}function Na(o,e,t){if(t.dataset.veoManipulated==="1")return null;t.dataset.veoManipulated="1",t.classList.add("veo-mnp-banner");let i=t.ownerDocument.createElement("style");i.textContent=dr,e.appendChild(i);let r=false,s=false,l=()=>t.classList.contains("veo-banner-bottom")?"bottom":"top",a=c=>{if(pr(c.target))return;c.preventDefault(),r=true;let p=l(),m=p,u=f=>{let h=f.clientY<window.innerHeight/2?"top":"bottom";h!==m&&(m=h,t.classList.remove("veo-banner-top","veo-banner-bottom"),t.classList.add(`veo-banner-${h}`));},d=()=>{window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",d),r=false,m!==p&&!s&&o.onCommit({stepIndex:o.stepIndex,style:{position:m}}),o.onGestureEnd?.();};window.addEventListener("mousemove",u),window.addEventListener("mouseup",d);};return t.addEventListener("mousedown",a),{isDragging:()=>r,detach:()=>{s||(s=true,t.removeEventListener("mousedown",a),i.remove(),t.classList.remove("veo-mnp-banner"),delete t.dataset.veoManipulated);}}}var Ba=["button","link","tab","menuitem","menuitemcheckbox","menuitemradio","checkbox","radio","switch","option","combobox","textbox","searchbox","slider","spinbutton"],gn=["button","a[href]",'input:not([type="hidden"])',"select","textarea","form","summary",'[contenteditable="true"]',"[onclick]","[data-veo-tag]",...Ba.map(o=>`[role="${o}"]`)].join(", ");function mr(o){try{return o.closest(gn)}catch{return null}}var Ha=/\p{Extended_Pictographic}|\p{Emoji_Modifier}|\u{FE0F}|\u{200D}|\u{20E3}/gu;function No(o,e=120){let t=r=>(r??"").replace(Ha,"").replace(/\s+/g," ").trim(),n=t(o.textContent);return n?n.slice(0,e):(t(o.getAttribute("aria-label"))||t(o.getAttribute("title"))).slice(0,e)}var vn=2147483646,Da="data-veo-picker",fr=5,_a=`
918
+ `;function Ot(o,e,t){return Math.min(Math.max(o,e),t)}function cr(o){return Math.round(o*1e3)/1e3}function pr(o){return !!(o instanceof Element&&o.closest("button, a, input, textarea, select, label"))}function ur(o){let e=o.host.shadowRoot;if(!e)return null;let t=e.querySelector(".veo-modal-card");if(t)return $a(o,e,t);let n=e.querySelector(".veo-banner");return n&&!n.classList.contains("veo-banner-embedded")?Na(o,e,n):null}function $a(o,e,t){if(t.dataset.veoManipulated==="1")return null;t.dataset.veoManipulated="1",t.classList.add("veo-mnp-card");let n=t.ownerDocument,i=n.createElement("style");i.textContent=dr,e.appendChild(i);let r=[];for(let h of Ia){let v=n.createElement("div");v.className=`veo-mnp-handle veo-mnp-${h}`,v.dataset.veoDir=h,t.appendChild(v),r.push(v);}let s=false,l=false,a={},c=h=>{let v=o.host;h.px!==void 0&&v.style.setProperty("--veo-pos-x",`${h.px*100}%`),h.py!==void 0&&v.style.setProperty("--veo-pos-y",`${h.py*100}%`),h.w!==void 0&&v.style.setProperty("--veo-width",`${h.w}px`),h.h!==void 0&&v.style.setProperty("--veo-min-h",`${h.h}px`);},p=(h,v)=>{h.preventDefault(),h.stopPropagation(),s=true,a={};let y=t.getBoundingClientRect(),E=h.clientX,T=h.clientY,b=0,C=null,R=()=>{if(b=0,!C)return;let I=v(C.clientX-E,C.clientY-T,y);a={...a,...I},c({...I.posX!==void 0?{px:I.posX}:{},...I.posY!==void 0?{py:I.posY}:{},...I.width!==void 0?{w:I.width}:{},...I.height!==void 0?{h:I.height}:{}});},k=I=>{C=I,typeof window.requestAnimationFrame!="function"?R():b||(b=window.requestAnimationFrame(R));},P=()=>{window.removeEventListener("mousemove",k),window.removeEventListener("mouseup",P),b&&window.cancelAnimationFrame(b),R(),s=false,Object.keys(a).length>0&&!l&&o.onCommit({stepIndex:o.stepIndex,style:a}),o.onGestureEnd?.();};window.addEventListener("mousemove",k),window.addEventListener("mouseup",P);},m=(h,v)=>{let y=window.innerWidth-v;return y<=0?.5:cr(Ot(h/y,0,1))},u=(h,v)=>{let y=window.innerHeight-v;return y<=0?.5:cr(Ot(h/y,0,1))},d=h=>{pr(h.target)||h.target instanceof Element&&h.target.closest(".veo-mnp-handle")||p(h,(v,y,E)=>({posX:m(E.left+v,E.width),posY:u(E.top+y,E.height)}));},f=h=>{let v=h.currentTarget.dataset.veoDir;p(h,(y,E,T)=>{let b={};return v.includes("e")&&(b.width=Math.round(Ot(T.width+y,220,720))),v.includes("w")&&(b.width=Math.round(Ot(T.width-y,220,720)),b.posX=m(T.right-b.width,b.width)),v.includes("s")&&(b.height=Math.round(Ot(T.height+E,120,900))),v.includes("n")&&(b.height=Math.round(Ot(T.height-E,120,900)),b.posY=u(T.bottom-b.height,b.height)),b});};t.addEventListener("mousedown",d);for(let h of r)h.addEventListener("mousedown",f);return {isDragging:()=>s,detach:()=>{if(!l){l=true,t.removeEventListener("mousedown",d);for(let h of r)h.remove();i.remove(),t.classList.remove("veo-mnp-card"),delete t.dataset.veoManipulated;}}}}function Na(o,e,t){if(t.dataset.veoManipulated==="1")return null;t.dataset.veoManipulated="1",t.classList.add("veo-mnp-banner");let i=t.ownerDocument.createElement("style");i.textContent=dr,e.appendChild(i);let r=false,s=false,l=()=>t.classList.contains("veo-banner-bottom")?"bottom":"top",a=c=>{if(pr(c.target))return;c.preventDefault(),r=true;let p=l(),m=p,u=f=>{let h=f.clientY<window.innerHeight/2?"top":"bottom";h!==m&&(m=h,t.classList.remove("veo-banner-top","veo-banner-bottom"),t.classList.add(`veo-banner-${h}`));},d=()=>{window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",d),r=false,m!==p&&!s&&o.onCommit({stepIndex:o.stepIndex,style:{position:m}}),o.onGestureEnd?.();};window.addEventListener("mousemove",u),window.addEventListener("mouseup",d);};return t.addEventListener("mousedown",a),{isDragging:()=>r,detach:()=>{s||(s=true,t.removeEventListener("mousedown",a),i.remove(),t.classList.remove("veo-mnp-banner"),delete t.dataset.veoManipulated);}}}var Ba=["button","link","tab","menuitem","menuitemcheckbox","menuitemradio","checkbox","radio","switch","option","combobox","textbox","searchbox","slider","spinbutton"],gn=["button","a[href]",'input:not([type="hidden"])',"select","textarea","form","summary",'[contenteditable="true"]',"[onclick]","[data-veo-tag]","[aria-expanded]","[aria-haspopup]","[aria-controls]","[aria-pressed]","[aria-selected]","[data-state]",'[tabindex]:not([tabindex="-1"])',...Ba.map(o=>`[role="${o}"]`)].join(", ");function mr(o){try{let t=o.closest(gn);if(t)return t}catch{return null}let e=o;for(let t=0;e&&t<5;t++,e=e.parentElement)if(e instanceof HTMLElement)try{if(e.ownerDocument.defaultView?.getComputedStyle(e).cursor==="pointer")return e}catch{}return null}var Ha=/\p{Extended_Pictographic}|\p{Emoji_Modifier}|\u{FE0F}|\u{200D}|\u{20E3}/gu;function No(o,e=120){let t=r=>(r??"").replace(Ha,"").replace(/\s+/g," ").trim(),n=t(o.textContent);return n?n.slice(0,e):(t(o.getAttribute("aria-label"))||t(o.getAttribute("title"))).slice(0,e)}var vn=2147483646,Da="data-veo-picker",fr=5,_a=`
919
919
  :host { all: initial; }
920
920
  .veo-pick-box {
921
921
  position: fixed;