@nuniapp/widget 0.1.10 → 0.1.12

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.
@@ -1,4 +1,4 @@
1
- (function(){let e={bodyMaxLength:2e3,nameMaxLength:50,unclaimedCommentCap:500,maxOriginsPerProject:20,sessionTtlMs:2592e6,cliSessionTtlMs:7776e6,transferTtlMs:6048e5,bulkMax:100,pinReportMax:200,lostCountMax:99,cliLoginTtlMs:6e5,anchorTextMaxLength:120,quoteMaxLength:500,quoteContextLength:32,pageOpenLimit:1e3,pageResolvedLimit:200,yoursLimit:100,contextEntryMax:20,contextMessageMaxLength:500,domSnippetMaxLength:4e3,screenshotMaxBytes:6e5,imagesPerComment:3,imageMaxBytes:6e5,imageMaxSide:1600,repliesPerComment:200,reactionsPerComment:2e3,screenshotUploadWindowMs:3e5},t=`data-nuni-mask`;function n(e,t={},...n){let r=document.createElement(e);for(let[e,n]of Object.entries(t))n!=null&&n!==!1&&(e.startsWith(`on`)&&typeof n==`function`?r.addEventListener(e.slice(2).toLowerCase(),n):e===`class`?r.className=String(n):n===!0?r.setAttribute(e,``):r.setAttribute(e,String(n)));for(let e of n.flat())e!=null&&e!==!1&&r.append(typeof e==`string`?document.createTextNode(e):e);return r}function r(e,t,n){return new Promise(r=>e.toBlob(r,t,n))}async function i(e,t){for(let[n,i]of[[`image/webp`,.82],[`image/jpeg`,.8],[`image/jpeg`,.55]]){let a=await r(e,n,i);if(a&&a.type===n&&a.size<=t)return a}return null}function a(e){return Math.max(3,Math.round(Math.max(e.width,e.height)/250))}function o(e,t,n){let[r,i]=t.points;if(r){if(e.beginPath(),t.tool===`pen`){e.moveTo(r.x,r.y);for(let n of t.points.slice(1))e.lineTo(n.x,n.y)}else if(i&&t.tool===`box`)e.rect(r.x,r.y,i.x-r.x,i.y-r.y);else if(i){let t=Math.atan2(i.y-r.y,i.x-r.x),a=n*4;e.moveTo(r.x,r.y),e.lineTo(i.x,i.y);for(let n of[-1,1])e.moveTo(i.x,i.y),e.lineTo(i.x-a*Math.cos(t+n*Math.PI/7),i.y-a*Math.sin(t+n*Math.PI/7))}e.stroke()}}function s(e){let[t,n]=e.points;return!t||!n?!1:e.tool===`pen`?e.points.length>2:Math.hypot(n.x-t.x,n.y-t.y)>6}let c=async(t,{container:r,labels:c,color:l})=>{let u;try{u=await createImageBitmap(t)}catch{return null}let d=r.getRootNode();if(!d.querySelector(`style[data-nuni-markup]`)){let e=n(`style`,{"data-nuni-markup":``},`
1
+ (function(){let e={bodyMaxLength:2e3,nameMaxLength:50,unclaimedCommentCap:500,maxOriginsPerProject:20,sessionTtlMs:2592e6,cliSessionTtlMs:7776e6,transferTtlMs:6048e5,bulkMax:100,pinReportMax:200,lostCountMax:99,cliLoginTtlMs:6e5,anchorTextMaxLength:120,quoteMaxLength:500,quoteContextLength:32,pageOpenLimit:1e3,pageResolvedLimit:200,siteOpenLimit:300,siteResolvedLimit:100,yoursLimit:100,contextEntryMax:20,contextMessageMaxLength:500,domSnippetMaxLength:4e3,screenshotMaxBytes:6e5,imagesPerComment:3,imageMaxBytes:6e5,imageMaxSide:1600,repliesPerComment:200,reactionsPerComment:2e3,screenshotUploadWindowMs:3e5},t=`data-nuni-mask`;function n(e,t={},...n){let r=document.createElement(e);for(let[e,n]of Object.entries(t))n!=null&&n!==!1&&(e.startsWith(`on`)&&typeof n==`function`?r.addEventListener(e.slice(2).toLowerCase(),n):e===`class`?r.className=String(n):n===!0?r.setAttribute(e,``):r.setAttribute(e,String(n)));for(let e of n.flat())e!=null&&e!==!1&&r.append(typeof e==`string`?document.createTextNode(e):e);return r}function r(e,t,n){return new Promise(r=>e.toBlob(r,t,n))}async function i(e,t){for(let[n,i]of[[`image/webp`,.82],[`image/jpeg`,.8],[`image/jpeg`,.55]]){let a=await r(e,n,i);if(a&&a.type===n&&a.size<=t)return a}return null}function a(e){return Math.max(3,Math.round(Math.max(e.width,e.height)/250))}function o(e,t,n){let[r,i]=t.points;if(r){if(e.beginPath(),t.tool===`pen`){e.moveTo(r.x,r.y);for(let n of t.points.slice(1))e.lineTo(n.x,n.y)}else if(i&&t.tool===`box`)e.rect(r.x,r.y,i.x-r.x,i.y-r.y);else if(i){let t=Math.atan2(i.y-r.y,i.x-r.x),a=n*4;e.moveTo(r.x,r.y),e.lineTo(i.x,i.y);for(let n of[-1,1])e.moveTo(i.x,i.y),e.lineTo(i.x-a*Math.cos(t+n*Math.PI/7),i.y-a*Math.sin(t+n*Math.PI/7))}e.stroke()}}function s(e){let[t,n]=e.points;return!t||!n?!1:e.tool===`pen`?e.points.length>2:Math.hypot(n.x-t.x,n.y-t.y)>6}let c=async(t,{container:r,labels:c,color:l})=>{let u;try{u=await createImageBitmap(t)}catch{return null}let d=r.getRootNode();if(!d.querySelector(`style[data-nuni-markup]`)){let e=n(`style`,{"data-nuni-markup":``},`
2
2
  .mk {
3
3
  position: fixed;
4
4
  inset: 0;