@excalidraw/common 0.18.0-7876ee524 → 0.18.0-7f66e1f
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/dev/index.js +286 -44
- package/dist/dev/index.js.map +3 -3
- package/dist/prod/index.js +3 -3
- package/dist/types/common/src/constants.d.ts +18 -15
- package/dist/types/common/src/editorInterface.d.ts +34 -0
- package/dist/types/common/src/index.d.ts +2 -0
- package/dist/types/common/src/utils.d.ts +2 -1
- package/dist/types/common/src/visualdebug.d.ts +41 -0
- package/dist/types/element/src/bounds.d.ts +1 -1
- package/dist/types/element/src/delta.d.ts +1 -2
- package/dist/types/element/src/index.d.ts +1 -0
- package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
- package/dist/types/element/src/renderElement.d.ts +4 -1
- package/dist/types/element/src/resizeTest.d.ts +5 -4
- package/dist/types/element/src/store.d.ts +3 -2
- package/dist/types/element/src/textElement.d.ts +1 -1
- package/dist/types/element/src/transformHandles.d.ts +5 -4
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +21 -9
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +14 -6
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +94 -41
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +42 -18
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +7 -3
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +22 -10
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +7 -3
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +14 -6
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +7 -3
- package/dist/types/excalidraw/actions/actionExport.d.ts +63 -27
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +14 -6
- package/dist/types/excalidraw/actions/actionFrame.d.ts +28 -12
- package/dist/types/excalidraw/actions/actionGroup.d.ts +14 -6
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +8 -4
- package/dist/types/excalidraw/actions/actionLink.d.ts +5 -1
- package/dist/types/excalidraw/actions/actionMenu.d.ts +7 -369
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +14 -6
- package/dist/types/excalidraw/actions/actionProperties.d.ts +122 -53
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +7 -3
- package/dist/types/excalidraw/actions/actionStyles.d.ts +7 -3
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +7 -3
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +7 -3
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +7 -3
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +7 -3
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +7 -3
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +8 -4
- package/dist/types/excalidraw/actions/index.d.ts +2 -2
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +5 -1
- package/dist/types/excalidraw/clipboard.d.ts +64 -1
- package/dist/types/excalidraw/components/Actions.d.ts +21 -4
- package/dist/types/excalidraw/components/App.d.ts +27 -23
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +2 -0
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +2 -1
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
- package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
- package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +1 -1
- package/dist/types/excalidraw/components/FilledButton.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
- package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
- package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
- package/dist/types/excalidraw/components/LayerUI.d.ts +2 -1
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
- package/dist/types/excalidraw/components/MobileMenu.d.ts +3 -5
- package/dist/types/excalidraw/components/MobileToolBar.d.ts +11 -0
- package/dist/types/excalidraw/components/Popover.d.ts +2 -1
- package/dist/types/excalidraw/components/PropertiesPopover.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +1 -2
- package/dist/types/excalidraw/components/TextField.d.ts +1 -0
- package/dist/types/excalidraw/components/ToolPopover.d.ts +25 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +6 -3
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +4 -2
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +2 -1
- package/dist/types/excalidraw/components/icons.d.ts +10 -0
- package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +13 -1
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +0 -3
- package/dist/types/excalidraw/components/shapes.d.ts +129 -1
- package/dist/types/excalidraw/data/blob.d.ts +3 -7
- package/dist/types/excalidraw/data/types.d.ts +4 -1
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +3 -1
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
- package/dist/types/excalidraw/index.d.ts +2 -3
- package/dist/types/excalidraw/renderer/animation.d.ts +12 -0
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +5 -13
- package/dist/types/excalidraw/scene/types.d.ts +11 -3
- package/dist/types/excalidraw/shortcut.d.ts +1 -0
- package/dist/types/excalidraw/types.d.ts +18 -15
- package/dist/types/math/src/segment.d.ts +1 -0
- package/package.json +1 -1
package/dist/prod/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var he=Object.create;var Y=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var ge=Object.getOwnPropertyNames;var Le=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty;var Re=(e,t)=>()=>(e&&(t=e(e=0)),t);var V=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Oe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ge(t))!Se.call(e,s)&&s!==n&&Y(e,s,{get:()=>t[s],enumerable:!(r=ye(t,s))||r.enumerable});return e};var X=(e,t,n)=>(n=e!=null?he(Le(e)):{},Oe(t||!e||!e.__esModule?Y(n,"default",{value:e,enumerable:!0}):n,e));var f,c=Re(()=>{f={PROD:!0}});var le=V((G,ae)=>{c();(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof G=="object"?ae.exports=t():(e.PromisePool=t(),e.promisePool=e.PromisePool)})(G,function(){"use strict";var e=function(){this._listeners={}};e.prototype.addEventListener=function(o,a){this._listeners[o]=this._listeners[o]||[],this._listeners[o].indexOf(a)<0&&this._listeners[o].push(a)},e.prototype.removeEventListener=function(o,a){if(this._listeners[o]){var p=this._listeners[o].indexOf(a);p>=0&&this._listeners[o].splice(p,1)}},e.prototype.dispatchEvent=function(o){if(this._listeners[o.type]&&this._listeners[o.type].length)for(var a=this._listeners[o.type].slice(),p=0,m=a.length;p<m;++p)a[p].call(this,o)};var t=function(o){return typeof o.constructor=="function"&&o.constructor.name==="GeneratorFunction"},n=function(o){return{next:function(){var a=o();return a?{value:a}:{done:!0}}}},r=function(o){var a=!1;return{next:function(){return a?{done:!0}:(a=!0,{value:o})}}},s=function(o,a){var p=typeof o;if(p==="object"){if(typeof o.next=="function")return o;if(typeof o.then=="function")return r(o)}return p==="function"?t(o)?o():n(o):r(a.resolve(o))},l=function(o,a,p){this.target=o,this.type=a,this.data=p},i=function(o,a,p){if(e.call(this),typeof a!="number"||Math.floor(a)!==a||a<1)throw new Error("Invalid concurrency");this._concurrency=a,this._options=p||{},this._options.promise=this._options.promise||Promise,this._iterator=s(o,this._options.promise),this._done=!1,this._size=0,this._promise=null,this._callbacks=null};return i.prototype=new e,i.prototype.constructor=i,i.prototype.concurrency=function(o){return typeof o<"u"&&(this._concurrency=o,this.active()&&this._proceed()),this._concurrency},i.prototype.size=function(){return this._size},i.prototype.active=function(){return!!this._promise},i.prototype.promise=function(){return this._promise},i.prototype.start=function(){var o=this,a=this._options.promise;return this._promise=new a(function(p,m){o._callbacks={reject:m,resolve:p},o._proceed()}),this._promise},i.prototype._fireEvent=function(o,a){this.dispatchEvent(new l(this,o,a))},i.prototype._settle=function(o){o?this._callbacks.reject(o):this._callbacks.resolve(),this._promise=null,this._callbacks=null},i.prototype._onPooledPromiseFulfilled=function(o,a){this._size--,this.active()&&(this._fireEvent("fulfilled",{promise:o,result:a}),this._proceed())},i.prototype._onPooledPromiseRejected=function(o,a){this._size--,this.active()&&(this._fireEvent("rejected",{promise:o,error:a}),this._settle(a||new Error("Unknown error")))},i.prototype._trackPromise=function(o){var a=this;o.then(function(p){a._onPooledPromiseFulfilled(o,p)},function(p){a._onPooledPromiseRejected(o,p)}).catch(function(p){a._settle(new Error("Promise processing failed: "+p))})},i.prototype._proceed=function(){if(!this._done){for(var o={done:!1};this._size<this._concurrency&&!(o=this._iterator.next()).done;)this._size++,this._trackPromise(o.value);this._done=o===null||!!o.done}this._done&&this._size===0&&this._settle()},i.PromisePoolEvent=l,i.PromisePool=i,i})});var be=V(U=>{"use strict";c();Object.defineProperty(U,"__esModule",{value:!0});U.sanitizeUrl=void 0;var tt=/^([^\w]*)(javascript|data|vbscript)/im,nt=/&#(\w+)(^\w|;)?/g,rt=/&(newline|tab);/gi,ot=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,st=/^.+(:|:)/gim,it=[".","/"];function at(e){return it.indexOf(e[0])>-1}function lt(e){return e.replace(nt,function(t,n){return String.fromCharCode(n)})}function ct(e){var t=lt(e||"").replace(rt,"").replace(ot,"").trim();if(!t)return"about:blank";if(at(t))return t;var n=t.match(st);if(!n)return t;var r=n[0];return tt.test(r)?"about:blank":t}U.sanitizeUrl=ct});c();c();var $=class{constructor(t){this.scoreFunction=t}content=[];sinkDown(t){let n=this.content[t];for(;t>0;){let r=(t+1>>1)-1,s=this.content[r];if(this.scoreFunction(n)<this.scoreFunction(s))this.content[r]=n,this.content[t]=s,t=r;else break}}bubbleUp(t){let n=this.content.length,r=this.content[t],s=this.scoreFunction(r);for(;;){let l=t+1<<1,i=l-1,o=null,a=0;if(i<n){let p=this.content[i];a=this.scoreFunction(p),a<s&&(o=i)}if(l<n){let p=this.content[l];this.scoreFunction(p)<(o===null?s:a)&&(o=l)}if(o!==null)this.content[t]=this.content[o],this.content[o]=r,t=o;else break}}push(t){this.content.push(t),this.sinkDown(this.content.length-1)}pop(){if(this.content.length===0)return null;let t=this.content[0],n=this.content.pop();return this.content.length>0&&(this.content[0]=n,this.bubbleUp(0)),t}remove(t){if(this.content.length===0)return;let n=this.content.indexOf(t),r=this.content.pop();n<this.content.length&&(this.content[n]=r,this.scoreFunction(r)<this.scoreFunction(t)?this.sinkDown(n):this.bubbleUp(n))}size(){return this.content.length}rescoreElement(t){this.sinkDown(this.content.indexOf(t))}};c();var z={white:"#ffffff",black:"#000000",gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};var xt=240,Fe=(e,t)=>t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{}),bt=5,_t=5,At=4,C=4,F=1,E=[0,2,4,6,8],ht=[0,1,2,3,4],x=(e,t)=>t.map(n=>z[e][n]),u={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:x("gray",E),red:x("red",E),pink:x("pink",E),grape:x("grape",E),violet:x("violet",E),blue:x("blue",E),cyan:x("cyan",E),teal:x("teal",E),green:x("green",E),yellow:x("yellow",E),orange:x("orange",E),bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},j=Fe(u,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"]),yt=[u.black,u.red[C],u.green[C],u.blue[C],u.yellow[C]],gt=[u.transparent,u.red[F],u.green[F],u.blue[F],u.yellow[F]],Lt=[u.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],St={transparent:u.transparent,white:u.white,gray:u.gray,black:u.black,bronze:u.bronze,...j},Rt={transparent:u.transparent,white:u.white,gray:u.gray,black:u.black,bronze:u.bronze,...j},Ot=e=>[u.cyan[e],u.blue[e],u.violet[e],u.grape[e],u.pink[e],u.green[e],u.teal[e],u.yellow[e],u.orange[e],u.red[e]],vt=(e,t,n)=>`#${((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}`;c();var w=/Mac|iPod|iPhone|iPad/.test(navigator.platform),It=/^Win/.test(navigator.platform),Mt=/\b(android)\b/i.test(navigator.userAgent),Pt=typeof window<"u"&&"netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,we=navigator.userAgent.indexOf("Chrome")!==-1,Dt=!we&&navigator.userAgent.indexOf("Safari")!==-1,Ut=/iPad|iPhone/.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,Nt=()=>navigator.brave?.isBrave?.name==="isBrave",kt=typeof window<"u"&&"ResizeObserver"in window,Ht="Excalidraw",Kt=36,Bt=10,Gt=20,Wt=8,Yt=5,Vt=1,Xt=30,$t=Math.PI/12,zt="red",jt={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},Zt={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1,ERASER:5},qt={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"},Ie=(d=>(d.COPY="copy",d.PASTE="paste",d.CUT="cut",d.KEYDOWN="keydown",d.KEYUP="keyup",d.MOUSE_MOVE="mousemove",d.RESIZE="resize",d.UNLOAD="unload",d.FOCUS="focus",d.BLUR="blur",d.DRAG_OVER="dragover",d.DROP="drop",d.GESTURE_END="gestureend",d.BEFORE_UNLOAD="beforeunload",d.GESTURE_START="gesturestart",d.GESTURE_CHANGE="gesturechange",d.POINTER_MOVE="pointermove",d.POINTER_DOWN="pointerdown",d.POINTER_UP="pointerup",d.STATE_CHANGE="statechange",d.WHEEL="wheel",d.TOUCH_START="touchstart",d.TOUCH_END="touchend",d.HASHCHANGE="hashchange",d.VISIBILITY_CHANGE="visibilitychange",d.SCROLL="scroll",d.EXCALIDRAW_LINK="excalidraw-link",d.MENU_ITEM_SELECT="menu.itemSelect",d.MESSAGE="message",d.FULLSCREENCHANGE="fullscreenchange",d))(Ie||{}),Qt={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},I={TEST:"test",DEVELOPMENT:"development",PRODUCTION:"production"},Jt={SHAPE_ACTIONS_MENU:"App-menu__left",ZOOM_ACTIONS:"zoom-actions",SEARCH_MENU_INPUT_WRAPPER:"layer-ui__search-inputWrapper",CONVERT_ELEMENT_TYPE_POPUP:"ConvertElementTypePopup"},q="Xiaolai",L="Segoe UI Emoji",T={Virgil:1,Helvetica:2,Cascadia:3,Excalifont:5,Nunito:6,"Lilita One":7,"Comic Shanns":8,"Liberation Sans":9,Assistant:10},Q="sans-serif",J="monospace",Me={[Q]:998,[J]:999},B={[q]:100,...Me,[L]:1e3};function Pe(e){switch(e){case T.Cascadia:case T["Comic Shanns"]:return J;default:return Q}}var ee=e=>{let t=Pe(e);switch(e){case T.Excalifont:return[q,t,L];default:return[t,L]}},en={LIGHT:"light",DARK:"dark"},tn={strokeColor:"#bbb",strokeWidth:2,strokeStyle:"solid",fillStyle:"solid",roughness:0,roundness:null,backgroundColor:"transparent",radius:8,nameOffsetY:3,nameColorLightTheme:"#999999",nameColorDarkTheme:"#7a7a7a",nameFontSize:14,nameLineHeight:1.25},nn=1,rn=20,on=T.Excalifont,sn="left",an="top",te="{version}",De=2,Ue=2*De,Ne=1e-5,ln=2*Ue-Ne,cn="#ffffff",un="#1e1e1e",pn="#a2f1a6",dn=["selectAll"],fn=20,Tn=5,ne={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif",jfif:"image/jfif"},Z={text:"text/plain",html:"text/html",json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json","excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream",...ne},mn=[Z.text,Z.html,...Object.values(ne)],En={png:"png",svg:"svg",clipboard:"clipboard"},xn={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},bn=()=>window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,_n=500,An=300,hn=500,yn=1e4,gn=3e4,Ln=100,Sn=.1,Rn=.1,On=30,vn=300,Cn=6e4,Fn=3e3,wn="invert(93%) hue-rotate(180deg)",In={addLibrary:"addLibrary"},Mn={addLibrary:"addLibrary"},Pn={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},Dn=730,Un=1e3,Nn=500,kn=1229,Hn=2,Kn=[1,2,3],Bn=10,Gn=1440,Wn=4*1024*1024,Yn="http://www.w3.org/2000/svg",Vn=`<?xml version="1.0" standalone="no"?>
|
|
1
|
+
var Re=Object.create;var X=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Me=Object.getOwnPropertyNames;var Pe=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty;var Ie=(e,t)=>()=>(e&&(t=e(e=0)),t);var z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Fe=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Me(t))!Ce.call(e,r)&&r!==n&&X(e,r,{get:()=>t[r],enumerable:!(o=we(t,r))||o.enumerable});return e};var $=(e,t,n)=>(n=e!=null?Re(Pe(e)):{},Fe(t||!e||!e.__esModule?X(n,"default",{value:e,enumerable:!0}):n,e));var f,c=Ie(()=>{f={PROD:!0}});var me=z((W,fe)=>{c();(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof W=="object"?fe.exports=t():(e.PromisePool=t(),e.promisePool=e.PromisePool)})(W,function(){"use strict";var e=function(){this._listeners={}};e.prototype.addEventListener=function(s,i){this._listeners[s]=this._listeners[s]||[],this._listeners[s].indexOf(i)<0&&this._listeners[s].push(i)},e.prototype.removeEventListener=function(s,i){if(this._listeners[s]){var p=this._listeners[s].indexOf(i);p>=0&&this._listeners[s].splice(p,1)}},e.prototype.dispatchEvent=function(s){if(this._listeners[s.type]&&this._listeners[s.type].length)for(var i=this._listeners[s.type].slice(),p=0,E=i.length;p<E;++p)i[p].call(this,s)};var t=function(s){return typeof s.constructor=="function"&&s.constructor.name==="GeneratorFunction"},n=function(s){return{next:function(){var i=s();return i?{value:i}:{done:!0}}}},o=function(s){var i=!1;return{next:function(){return i?{done:!0}:(i=!0,{value:s})}}},r=function(s,i){var p=typeof s;if(p==="object"){if(typeof s.next=="function")return s;if(typeof s.then=="function")return o(s)}return p==="function"?t(s)?s():n(s):o(i.resolve(s))},l=function(s,i,p){this.target=s,this.type=i,this.data=p},a=function(s,i,p){if(e.call(this),typeof i!="number"||Math.floor(i)!==i||i<1)throw new Error("Invalid concurrency");this._concurrency=i,this._options=p||{},this._options.promise=this._options.promise||Promise,this._iterator=r(s,this._options.promise),this._done=!1,this._size=0,this._promise=null,this._callbacks=null};return a.prototype=new e,a.prototype.constructor=a,a.prototype.concurrency=function(s){return typeof s<"u"&&(this._concurrency=s,this.active()&&this._proceed()),this._concurrency},a.prototype.size=function(){return this._size},a.prototype.active=function(){return!!this._promise},a.prototype.promise=function(){return this._promise},a.prototype.start=function(){var s=this,i=this._options.promise;return this._promise=new i(function(p,E){s._callbacks={reject:E,resolve:p},s._proceed()}),this._promise},a.prototype._fireEvent=function(s,i){this.dispatchEvent(new l(this,s,i))},a.prototype._settle=function(s){s?this._callbacks.reject(s):this._callbacks.resolve(),this._promise=null,this._callbacks=null},a.prototype._onPooledPromiseFulfilled=function(s,i){this._size--,this.active()&&(this._fireEvent("fulfilled",{promise:s,result:i}),this._proceed())},a.prototype._onPooledPromiseRejected=function(s,i){this._size--,this.active()&&(this._fireEvent("rejected",{promise:s,error:i}),this._settle(i||new Error("Unknown error")))},a.prototype._trackPromise=function(s){var i=this;s.then(function(p){i._onPooledPromiseFulfilled(s,p)},function(p){i._onPooledPromiseRejected(s,p)}).catch(function(p){i._settle(new Error("Promise processing failed: "+p))})},a.prototype._proceed=function(){if(!this._done){for(var s={done:!1};this._size<this._concurrency&&!(s=this._iterator.next()).done;)this._size++,this._trackPromise(s.value);this._done=s===null||!!s.done}this._done&&this._size===0&&this._settle()},a.PromisePoolEvent=l,a.PromisePool=a,a})});var Se=z(N=>{"use strict";c();Object.defineProperty(N,"__esModule",{value:!0});N.sanitizeUrl=void 0;var ft=/^([^\w]*)(javascript|data|vbscript)/im,mt=/&#(\w+)(^\w|;)?/g,Tt=/&(newline|tab);/gi,Et=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,bt=/^.+(:|:)/gim,xt=[".","/"];function _t(e){return xt.indexOf(e[0])>-1}function ht(e){return e.replace(mt,function(t,n){return String.fromCharCode(n)})}function At(e){var t=ht(e||"").replace(Tt,"").replace(Et,"").trim();if(!t)return"about:blank";if(_t(t))return t;var n=t.match(bt);if(!n)return t;var o=n[0];return ft.test(o)?"about:blank":t}N.sanitizeUrl=At});c();c();var j=class{constructor(t){this.scoreFunction=t}content=[];sinkDown(t){let n=this.content[t],o=this.scoreFunction(n);for(;t>0;){let r=(t+1>>1)-1,l=this.content[r];if(o<this.scoreFunction(l))this.content[t]=l,t=r;else break}this.content[t]=n}bubbleUp(t){let n=this.content.length,o=this.content[t],r=this.scoreFunction(o);for(;;){let l=(t+1<<1)-1,a=l+1,s=t,i=r;if(l<n){let p=this.scoreFunction(this.content[l]);p<i&&(s=l,i=p)}if(a<n&&this.scoreFunction(this.content[a])<i&&(s=a),s===t)break;this.content[t]=this.content[s],t=s}this.content[t]=o}push(t){this.content.push(t),this.sinkDown(this.content.length-1)}pop(){if(this.content.length===0)return null;let t=this.content[0],n=this.content.pop();return this.content.length>0&&(this.content[0]=n,this.bubbleUp(0)),t}remove(t){if(this.content.length===0)return;let n=this.content.indexOf(t),o=this.content.pop();n<this.content.length&&(this.content[n]=o,this.scoreFunction(o)<this.scoreFunction(t)?this.sinkDown(n):this.bubbleUp(n))}size(){return this.content.length}rescoreElement(t){this.sinkDown(this.content.indexOf(t))}};c();var Q={white:"#ffffff",black:"#000000",gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};var Ct=240,Ne=(e,t)=>t.reduce((n,o)=>(o in e&&(n[o]=e[o]),n),{}),It=5,Ft=5,Dt=4,P=4,C=1,b=[0,2,4,6,8],Ut=[0,1,2,3,4],x=(e,t)=>t.map(n=>Q[e][n]),u={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:x("gray",b),red:x("red",b),pink:x("pink",b),grape:x("grape",b),violet:x("violet",b),blue:x("blue",b),cyan:x("cyan",b),teal:x("teal",b),green:x("green",b),yellow:x("yellow",b),orange:x("orange",b),bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},Z=Ne(u,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"]),Nt=[u.black,u.red[P],u.green[P],u.blue[P],u.yellow[P]],kt=[u.transparent,u.red[C],u.green[C],u.blue[C],u.yellow[C]],Ht=[u.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],Gt={transparent:u.transparent,white:u.white,gray:u.gray,black:u.black,bronze:u.bronze,...Z},Bt={transparent:u.transparent,white:u.white,gray:u.gray,black:u.black,bronze:u.bronze,...Z},Kt=e=>[u.cyan[e],u.blue[e],u.violet[e],u.grape[e],u.pink[e],u.green[e],u.teal[e],u.yellow[e],u.orange[e],u.red[e]],Wt=(e,t,n)=>`#${((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}`;c();var zt=typeof window<"u"&&"ResizeObserver"in window,$t="Excalidraw",jt=36,Qt=10,Zt=20,qt=8,Jt=5,en=1,tn=30,nn=Math.PI/12,on="red",rn={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},sn={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1,ERASER:5},an={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"},ke=(d=>(d.COPY="copy",d.PASTE="paste",d.CUT="cut",d.KEYDOWN="keydown",d.KEYUP="keyup",d.MOUSE_MOVE="mousemove",d.RESIZE="resize",d.UNLOAD="unload",d.FOCUS="focus",d.BLUR="blur",d.DRAG_OVER="dragover",d.DROP="drop",d.GESTURE_END="gestureend",d.BEFORE_UNLOAD="beforeunload",d.GESTURE_START="gesturestart",d.GESTURE_CHANGE="gesturechange",d.POINTER_MOVE="pointermove",d.POINTER_DOWN="pointerdown",d.POINTER_UP="pointerup",d.STATE_CHANGE="statechange",d.WHEEL="wheel",d.TOUCH_START="touchstart",d.TOUCH_END="touchend",d.HASHCHANGE="hashchange",d.VISIBILITY_CHANGE="visibilitychange",d.SCROLL="scroll",d.EXCALIDRAW_LINK="excalidraw-link",d.MENU_ITEM_SELECT="menu.itemSelect",d.MESSAGE="message",d.FULLSCREENCHANGE="fullscreenchange",d))(ke||{}),ln={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},I={TEST:"test",DEVELOPMENT:"development",PRODUCTION:"production"},cn={SIDEBAR:"sidebar",SHAPE_ACTIONS_MENU:"App-menu__left",ZOOM_ACTIONS:"zoom-actions",SEARCH_MENU_INPUT_WRAPPER:"layer-ui__search-inputWrapper",CONVERT_ELEMENT_TYPE_POPUP:"ConvertElementTypePopup",SHAPE_ACTIONS_THEME_SCOPE:"shape-actions-theme-scope"},J="Xiaolai",O="Segoe UI Emoji",m={Virgil:1,Helvetica:2,Cascadia:3,Excalifont:5,Nunito:6,"Lilita One":7,"Comic Shanns":8,"Liberation Sans":9,Assistant:10},ee="sans-serif",te="monospace",He={[ee]:998,[te]:999},K={[J]:100,...He,[O]:1e3};function Ge(e){switch(e){case m.Cascadia:case m["Comic Shanns"]:return te;default:return ee}}var ne=e=>{let t=Ge(e);switch(e){case m.Excalifont:return[J,t,O];default:return[t,O]}},un={LIGHT:"light",DARK:"dark"},pn={strokeColor:"#bbb",strokeWidth:2,strokeStyle:"solid",fillStyle:"solid",roughness:0,roundness:null,backgroundColor:"transparent",radius:8,nameOffsetY:3,nameColorLightTheme:"#999999",nameColorDarkTheme:"#7a7a7a",nameFontSize:14,nameLineHeight:1.25},dn=1,fn=20,mn=m.Excalifont,Tn="left",En="top",oe="{version}",Be=2,Ke=2*Be,We=1e-5,bn=2*Ke-We,xn="#ffffff",_n="#1e1e1e",hn="#a2f1a6",An=["selectAll"],yn=20,gn=5,re={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif",jfif:"image/jfif"},Ye={text:"text/plain",html:"text/html",json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json",excalidrawlibIds:"application/vnd.excalidrawlib.ids+json"},q={...Ye,"excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream",...re},Sn=[q.text,q.html,...Object.values(re)],Ln={png:"png",svg:"svg",clipboard:"clipboard"},On={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},vn=()=>window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,Rn=500,wn=300,Mn=500,Pn=1e4,Cn=3e4,In=100,Fn=.1,Dn=.1,Un=30,Nn=300,kn=6e4,Hn=3e3,Gn="invert(93%) hue-rotate(180deg)",Bn={addLibrary:"addLibrary"},Kn={addLibrary:"addLibrary"},Wn={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},Yn=2,Vn=[1,2,3],Xn=10,zn=1440,$n=4*1024*1024,jn="http://www.w3.org/2000/svg",Qn=`<?xml version="1.0" standalone="no"?>
|
|
2
2
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
3
|
-
`,Xn=128,$n={excalidraw:2,excalidrawLibrary:2},zn=5,jn=.7,Zn=11,qn={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},Qn={LEFT:"left",CENTER:"center",RIGHT:"right"},Jn=20,er=.25,tr=32,nr={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},ke={architect:0,artist:1,cartoonist:2},rr={thin:1,bold:2,extraBold:4},or={strokeColor:u.black,backgroundColor:u.transparent,fillStyle:"solid",strokeWidth:2,strokeStyle:"solid",roughness:ke.artist,opacity:100,locked:!1},He="library",sr="search",ir={name:"default",defaultTab:He},ar=new Set(["iframe","embeddable","image"]),lr={selection:"selection",lasso:"lasso",rectangle:"rectangle",diamond:"diamond",ellipse:"ellipse",arrow:"arrow",line:"line",freedraw:"freedraw",text:"text",image:"image",eraser:"eraser",hand:"hand",frame:"frame",magicframe:"magicframe",embeddable:"embeddable",laser:"laser"},cr={OAI_API_KEY:"excalidraw-oai-api-key",MERMAID_TO_EXCALIDRAW:"mermaid-to-excalidraw",PUBLISH_LIBRARY:"publish-library-data"},ur="Untitled",pr={generalStats:1,elementProperties:2},dr=1,fr={sharp:"sharp",round:"round",elbow:"elbow"},Tr=.3,mr="element",Er=Symbol.for("__test__originalId__"),Ke=(r=>(r.ACTIVE="active",r.AWAY="away",r.IDLE="idle",r))(Ke||{}),xr=20;c();var M={[T.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25}},[T.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.25}},[T["Lilita One"]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15}},[T["Comic Shanns"]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25}},[T.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},deprecated:!0},[T.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},deprecated:!0,local:!0},[T.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},deprecated:!0},[T["Liberation Sans"]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},private:!0},[T.Assistant]:{metrics:{unitsPerEm:2048,ascender:1021,descender:-287,lineHeight:1.25},private:!0},[B.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.25},fallback:!0},[B["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},hr={LATIN:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",LATIN_EXT:"U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF",CYRILIC_EXT:"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F",CYRILIC:"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116",VIETNAMESE:"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB"},yr="local:",gr=(e,t,n)=>{let{unitsPerEm:r,ascender:s,descender:l}=M[e]?.metrics||M[T.Excalifont].metrics,i=t/r,o=(n-i*s+i*l)/2;return i*s+o},Lr=e=>{let{lineHeight:t}=M[e]?.metrics||M[T.Excalifont].metrics;return t};c();var re=class{jobs=[];running=!1;tick(){if(this.running)return;let t=this.jobs.shift();t?(this.running=!0,t.promise.resolve(se(t.jobFactory,...t.args).finally(()=>{this.running=!1,this.tick()}))):this.running=!1}push(t,...n){let r=oe();return this.jobs.push({jobFactory:t,promise:r,args:n}),this.tick(),r}};c();var ie={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",THREE:"Digit3",NINE:"Digit9",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",H:"KeyH",V:"KeyV",Z:"KeyZ",Y:"KeyY",R:"KeyR",S:"KeyS"},y={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:w?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SUBTRACT:"-",SLASH:"/",A:"a",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",W:"w",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},Be=new Map([[y.Z,ie.Z],[y.Y,ie.Y]]),Ge=e=>/^[a-z]$/.test(e.toLowerCase()),wr=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=Be.get(t);return!!(n&&!Ge(e.key)&&e.code===n)},Ir=e=>e===y.ARROW_LEFT||e===y.ARROW_RIGHT||e===y.ARROW_DOWN||e===y.ARROW_UP,Mr=e=>e.altKey,Pr=e=>e.shiftKey,Dr=e=>e.shiftKey;c();import{pointFromPair as We}from"@excalidraw/math";var Hr=e=>{let t=e.map(r=>r[0]),n=e.map(r=>r[1]);return{width:Math.max(...t)-Math.min(...t),height:Math.max(...n)-Math.min(...n)}},Kr=(e,t,n,r)=>{let s=n.map(b=>b[e]),l=Math.max(...s),i=Math.min(...s),o=l-i,a=o===0?1:t/o,p=1/0,m=n.map(b=>{let _=b[e]*a,A=[...b];return A[e]=_,_<p&&(p=_),A});if(!r||m.length===2)return m;let R=i-p;return m.map(b=>We(b.map((_,A)=>A===e?_+R:_)))},Br=(e,t,n)=>n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t];c();var ue=X(le(),1),ce=class{pool;entries={};constructor(t,n){this.pool=new ue.default(t,n)}all(){let t=n=>{if(n.data.result){let[r,s]=n.data.result;this.entries[r]=s}};return this.pool.addEventListener("fulfilled",t),this.pool.start().then(()=>(setTimeout(()=>{this.pool.removeEventListener("fulfilled",t)}),Object.values(this.entries)))}};c();c();c();var pe=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");c();var S=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};c();import{average as P}from"@excalidraw/math";var W=null,oo=e=>{W=e},so=()=>{if(W)return W;let e=new Date,t=e.getFullYear(),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0"),s=`${e.getHours()}`.padStart(2,"0"),l=`${e.getMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}-${s}${l}`},io=e=>e.charAt(0).toUpperCase()+e.slice(1),ao=e=>e instanceof HTMLElement&&e.className.includes("ToolIcon"),Ye=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement,lo=e=>Ye(e)||e instanceof Element&&!!e.closest("label, button"),co=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&(e.type==="text"||e.type==="number"||e.type==="password"),Ve=({fontFamily:e})=>{for(let[t,n]of Object.entries(T))if(n===e)return`${t}${ee(n).map(r=>`, ${r}`).join("")}`;return L},uo=({fontSize:e,fontFamily:t})=>`${e}px ${Ve({fontFamily:t})}`,po=(e,t)=>{let n=0,r=null,s=(...l)=>{r=l,clearTimeout(n),n=window.setTimeout(()=>{r=null,e(...l)},t)};return s.flush=()=>{if(clearTimeout(n),r){let l=r;r=null,e(...l)}},s.cancel=()=>{r=null,clearTimeout(n)},s},fo=(e,t)=>{let n=null,r=null,s=null,l=o=>{n=window.requestAnimationFrame(()=>{n=null,e(...o),r=null,s&&(r=s,s=null,l(r))})},i=(...o)=>{if(D()){e(...o);return}r=o,n===null?l(r):t?.trailing&&(s=o)};return i.flush=()=>{n!==null&&(cancelAnimationFrame(n),n=null),r&&(e(...s||r),r=s=null)},i.cancel=()=>{r=s=null,n!==null&&(cancelAnimationFrame(n),n=null)},i},Te=e=>1-Math.pow(1-e,4),de=(e,t,n)=>(t-e)*Te(n)+e,To=({fromValues:e,toValues:t,onStep:n,duration:r=250,interpolateValue:s,onStart:l,onEnd:i,onCancel:o})=>{let a=!1,p=0,m;function R(N){if(a)return;m===void 0&&(m=N,l?.());let b=Math.min(N-m,r),_=Te(b/r),A={};if(Object.keys(e).forEach(g=>{let h=g,k=(t[h]-e[h])*_+e[h];A[h]=k}),n(A),b<r){let g=b/r,h={};Object.keys(e).forEach(k=>{let O=k,H=e[O],K=t[O],v;v=s?s(H,K,g,O):de(H,K,g),v==null&&(v=de(H,K,g)),h[O]=v}),n(h),p=window.requestAnimationFrame(R)}else n(t),i?.()}return p=window.requestAnimationFrame(R),()=>{o?.(),a=!0,window.cancelAnimationFrame(p)}},mo=(e,t)=>{if(!e.length||t<1)return[];let n=0,r=0,s=Array(Math.ceil(e.length/t));for(;n<e.length;)s[r++]=e.slice(n,n+=t);return s},Eo=e=>{let t=window.getSelection();if(t){let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}},xo=()=>{let e=window.getSelection();e&&e.removeAllRanges()},bo=(e,t)=>Math.abs(e-t),_o=(e,t)=>t.type==="custom"?{...e.activeTool,type:"custom",customType:t.customType,locked:t.locked??e.activeTool.locked}:{...e.activeTool,lastActiveTool:t.lastActiveToolBeforeEraser===void 0?e.activeTool.lastActiveTool:t.lastActiveToolBeforeEraser,type:t.type,customType:null,locked:t.locked??e.activeTool.locked,fromSelection:t.fromSelection??!1},Ao=()=>document.fullscreenElement?.nodeName==="HTML",ho=()=>document.documentElement.requestFullscreen(),yo=()=>document.exitFullscreen(),go=e=>(e=e.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter"),w?e.replace(/\bCtrlOrCmd\b/gi,"Cmd").replace(/\bAlt\b/i,"Option"):e.replace(/\bCtrlOrCmd\b/gi,"Ctrl")),Lo=({clientX:e,clientY:t},{zoom:n,offsetLeft:r,offsetTop:s,scrollX:l,scrollY:i})=>{let o=(e-r)/n.value-l,a=(t-s)/n.value-i;return{x:o,y:a}},So=({sceneX:e,sceneY:t},{zoom:n,offsetLeft:r,offsetTop:s,scrollX:l,scrollY:i})=>{let o=(e+l)*n.value+r,a=(t+i)*n.value+s;return{x:o,y:a}},Ro=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),Xe="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",$e="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",ze=new RegExp(`^[^${Xe}]*[${$e}]`),Oo=e=>ze.test(e),vo=e=>{let[t,n]=e;return{x:t,y:n}},Co=e=>{if(e?.name==="AbortError"){console.warn(e);return}throw e},Fo=(e,t,n=0)=>{n<0&&(n=e.length+n),n=Math.min(e.length,Math.max(n,0));let r=n-1;for(;++r<e.length;)if(t(e[r],r,e))return r;return-1},wo=(e,t,n=e.length-1)=>{n<0&&(n=e.length+n),n=Math.min(e.length-1,Math.max(n,0));let r=n+1;for(;--r>-1;)if(t(e[r],r,e))return r;return-1},Io=(e,t)=>{for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r!=null)return r}},je=e=>{let t=e.length===5&&e.substr(4,1)==="0",n=e.length===9&&e.substr(7,2)==="00";return t||n||e===u.transparent},Mo=e=>e.fillStyle!=="solid"||je(e.backgroundColor),oe=()=>{let e,t,n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},Po=(e,t)=>{let n=[{value:1,symbol:"b"},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"},{value:1e9,symbol:"G"}],r=/\.0+$|(\.[0-9]*[1-9])0+$/,s;for(s=n.length-1;s>0&&!(e>=n[s].value);s--);return(e/n[s].value).toFixed(t).replace(r,"$1")+n[s].symbol},Do=()=>document.querySelector('meta[name="version"]')?.content||te,Uo=()=>{let t=document.createElement("canvas").getContext("2d");if(!t)return!1;let n=12;return t.fillStyle="#f00",t.textBaseline="top",t.font="32px Arial",t.fillText("\u{1F600}",0,0),t.getImageData(n,n,1,1).data[0]!==0},No=e=>{let t=e.parentElement;for(;t;){if(t===document.body)return document;let{overflowY:n}=window.getComputedStyle(t);if(t.scrollHeight>t.clientHeight&&(n==="auto"||n==="scroll"||n==="overlay"))return t;t=t.parentElement}return document},ko=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1){t.focus();return}t=t.parentElement}},Ho=e=>{e.preventDefault(),e.returnValue=""},Ko=e=>Array.from(e).map(t=>`0${t.toString(16)}`.slice(-2)).join(""),Bo=()=>D()?1:Date.now(),Go=e=>e instanceof Map?e:e.reduce((t,n)=>(t.set(typeof n=="string"?n:n.id,n),t),new Map),Wo=e=>e.reduce((t,n,r)=>(t.set(n.id,[n,r]),t),new Map),Yo=(e,t)=>e.reduce((n,r,s)=>(n[t?t(r):s]=r,n),{}),Vo=e=>e.reduce((t,n,r)=>{let s={...n,prev:null,next:null};if(r!==0){let l=t[r-1];if(s.prev=l,l.next=s,r===e.length-1){let i=t[0];s.next=i,i.prev=s}}return t.push(s),t},[]),Ze=e=>Array.isArray(e)?e:e.values(),Xo=e=>Array.isArray(e)?e:Array.from(Ze(e)),D=()=>f.MODE===I.TEST,$o=()=>f.MODE===I.DEVELOPMENT,zo=()=>f.MODE===I.PRODUCTION,jo=()=>typeof process<"u"&&!0,Zo=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),qo=(e,t)=>{let n=!1;for(let r in t){let s=t[r];if(typeof s<"u"){if(e[r]===s&&(typeof s!="object"||s===null))continue;n=!0}}return n?{...e,...t}:e},Qo=e=>{let t=typeof e;return e==null||t!=="object"&&t!=="function"},qe=()=>{try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}},Jo=()=>qe()==="iframe",es=e=>!!e&&typeof e=="object"&&"then"in e&&"catch"in e&&"finally"in e,ts=e=>{let t=e?.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter(n=>n.tabIndex>-1&&!n.disabled):[]},fe=(e,t)=>Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t,Qe=(e,t,n,r=!1)=>{let s=Object.keys(e),l=Object.keys(t);if(s.length!==l.length)return r&&console.warn("%cisShallowEqual: objects don't have same properties ->","color: #8B4000",e,t),!1;if(n&&Array.isArray(n)){for(let i of n)if(!(e[i]===t[i]||fe(e[i],t[i])))return r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),!1;return!0}return s.every(i=>{let o=n?.[i],a=o?o(e[i],t[i]):e[i]===t[i]||fe(e[i],t[i]);return!a&&r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),a})},ns=(e,t,{checkForDefaultPrevented:n=!0}={})=>function(s){if(e?.(s),!n||!s?.defaultPrevented)return t?.(s)},rs=(e,t,n)=>{if(!t)return e;if(n)return console.error(t),e;throw new Error(t)};function os(e,t){if(!e)throw new Error(t)}var ss=e=>{let t,n,r=function(s){let l=Object.entries(s);if(t){let o=!0;for(let[a,p]of l)if(t.get(a)!==p){o=!1;break}if(o)return n}let i=e(s);return t=new Map(l),n=i,i};return r.clear=()=>{t=void 0,n=void 0},r},is=(e,t)=>e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t),as=e=>JSON.parse(JSON.stringify(e)),ls=(e,t)=>Qe(e,t)?e:t;function cs(e,t,n,r){return e?(e?.addEventListener?.(t,n,r),()=>{e?.removeEventListener?.(t,n,r)}):()=>{}}function us(e,t=!0){let n=e.length;if(n<4)return"";let r=e[0],s=e[1],l=e[2],i=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${s[0].toFixed(2)},${s[1].toFixed(2)} ${P(s[0],l[0]).toFixed(2)},${P(s[1],l[1]).toFixed(2)} T`;for(let o=2,a=n-1;o<a;o++)r=e[o],s=e[o+1],i+=`${P(r[0],s[0]).toFixed(2)},${P(r[1],s[1]).toFixed(2)} `;return t&&(i+="Z"),i}var ps=e=>e.replace(/\r?\n|\r/g,`
|
|
4
|
-
`),
|
|
3
|
+
`,Zn=128,qn={excalidraw:2,excalidrawLibrary:2},Jn=5,eo=.7,to=11,no={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},oo={LEFT:"left",CENTER:"center",RIGHT:"right"},ro=20,so=.25,ao=32,io={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},Ve={architect:0,artist:1,cartoonist:2},lo={thin:1,bold:2,extraBold:4},co={strokeColor:u.black,backgroundColor:u.transparent,fillStyle:"solid",strokeWidth:2,strokeStyle:"solid",roughness:Ve.artist,opacity:100,locked:!1},Xe="library",uo="search",po={name:"default",defaultTab:Xe},fo=new Set(["iframe","embeddable","image"]),mo={selection:"selection",lasso:"lasso",rectangle:"rectangle",diamond:"diamond",ellipse:"ellipse",arrow:"arrow",line:"line",freedraw:"freedraw",text:"text",image:"image",eraser:"eraser",hand:"hand",frame:"frame",magicframe:"magicframe",embeddable:"embeddable",laser:"laser"},To={OAI_API_KEY:"excalidraw-oai-api-key",MERMAID_TO_EXCALIDRAW:"mermaid-to-excalidraw",PUBLISH_LIBRARY:"publish-library-data"},Eo="Untitled",bo={generalStats:1,elementProperties:2},xo=1,_o={sharp:"sharp",round:"round",elbow:"elbow"},ho=.3,Ao="element",yo=Symbol.for("__test__originalId__"),ze=(o=>(o.ACTIVE="active",o.AWAY="away",o.IDLE="idle",o))(ze||{}),go=20,So=35,Lo={background:"var(--mobile-action-button-bg)"};c();var F={[m.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25}},[m.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.25}},[m["Lilita One"]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15}},[m["Comic Shanns"]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25}},[m.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},deprecated:!0},[m.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},deprecated:!0,local:!0},[m.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},deprecated:!0},[m["Liberation Sans"]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},private:!0},[m.Assistant]:{metrics:{unitsPerEm:2048,ascender:1021,descender:-287,lineHeight:1.25},private:!0},[K.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.25},fallback:!0},[K["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},wo={LATIN:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",LATIN_EXT:"U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF",CYRILIC_EXT:"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F",CYRILIC:"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116",VIETNAMESE:"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB"},Mo="local:",Po=(e,t,n)=>{let{unitsPerEm:o,ascender:r,descender:l}=F[e]?.metrics||F[m.Excalifont].metrics,a=t/o,s=(n-a*r+a*l)/2;return a*r+s},Co=e=>{let{lineHeight:t}=F[e]?.metrics||F[m.Excalifont].metrics;return t};c();var se=class{jobs=[];running=!1;tick(){if(this.running)return;let t=this.jobs.shift();t?(this.running=!0,t.promise.resolve(ie(t.jobFactory,...t.args).finally(()=>{this.running=!1,this.tick()}))):this.running=!1}push(t,...n){let o=ae();return this.jobs.push({jobFactory:t,promise:o,args:n}),this.tick(),o}};c();c();var le="excalidraw.desktopUIMode",ko=599,Ho=1e3,Go=500,Bo=600,Ko=1400,Wo=1440,Yo=1229,ce=/Mac|iPod|iPhone|iPad/.test(navigator.platform),Vo=/^Win/.test(navigator.platform),ue=/\b(android)\b/i.test(navigator.userAgent),Xo=typeof window<"u"&&"netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,$e=navigator.userAgent.indexOf("Chrome")!==-1,zo=!$e&&navigator.userAgent.indexOf("Safari")!==-1,pe=/iPad|iPhone/i.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,$o=()=>navigator.brave?.isBrave?.name==="isBrave",je=(e,t)=>e<=599||t<500&&e<1e3,Qe=(e,t)=>{let n=Math.min(e,t),o=Math.max(e,t);return n>=600&&o<=1400},Ze=()=>{let e=navigator.userAgent||"",t=navigator.platform||"",n=navigator.userAgentData;if(n){let r=(n.platform||"").toLowerCase(),l=r==="windows"||r==="macos"||r==="linux"||r==="chrome os";if(n.mobile===!0)return!0;if(n.mobile===!1&&r==="android")return matchMedia?.("(hover: none)").matches&&matchMedia?.("(pointer: coarse)").matches;if(l)return!1}if(pe)return!0;if(ue){let r=/Mobile/i.test(e);if(r||!r)return matchMedia?.("(hover: none)").matches&&matchMedia?.("(pointer: coarse)").matches}return/Win|Linux|CrOS|Mac/.test(t)||/Windows NT|X11|CrOS|Macintosh/.test(e),!1},jo=(e,t)=>je(e,t)?"phone":Qe(e,t)?"tablet":"desktop",Qo=e=>e.formFactor==="phone"?"mobile":e.formFactor==="tablet"?"compact":e.desktopUIMode,Zo=e=>{let t=e??"",n="unknown";return pe?n="ios":ue?n="android":t&&(n="other"),{isMobileDevice:Ze(),platform:n}},qo=()=>{if(typeof window>"u")return null;try{let e=window.localStorage.getItem(le);if(e==="compact"||e==="full")return e}catch{}return null},qe=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(le,e)}catch{}},Jo=e=>{if(!(e!=="compact"&&e!=="full"))return qe(e),e};var de={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",THREE:"Digit3",NINE:"Digit9",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",H:"KeyH",V:"KeyV",Z:"KeyZ",Y:"KeyY",R:"KeyR",S:"KeyS"},g={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:ce?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SUBTRACT:"-",SLASH:"/",A:"a",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",W:"w",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},Je=new Map([[g.Z,de.Z],[g.Y,de.Y]]),et=e=>/^[a-z]$/.test(e.toLowerCase()),or=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=Je.get(t);return!!(n&&!et(e.key)&&e.code===n)},rr=e=>e===g.ARROW_LEFT||e===g.ARROW_RIGHT||e===g.ARROW_DOWN||e===g.ARROW_UP,sr=e=>e.altKey,ar=e=>e.shiftKey,ir=e=>e.shiftKey;c();import{pointFromPair as tt}from"@excalidraw/math";var pr=e=>{let t=e.map(o=>o[0]),n=e.map(o=>o[1]);return{width:Math.max(...t)-Math.min(...t),height:Math.max(...n)-Math.min(...n)}},dr=(e,t,n,o)=>{let r=n.map(_=>_[e]),l=Math.max(...r),a=Math.min(...r),s=l-a,i=s===0?1:t/s,p=1/0,E=n.map(_=>{let h=_[e]*i,A=[..._];return A[e]=h,h<p&&(p=h),A});if(!o||E.length===2)return E;let R=a-p;return E.map(_=>tt(_.map((h,A)=>A===e?h+R:h)))},fr=(e,t,n)=>n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t];c();var Ee=$(me(),1),Te=class{pool;entries={};constructor(t,n){this.pool=new Ee.default(t,n)}all(){let t=n=>{if(n.data.result){let[o,r]=n.data.result;this.entries[o]=r}};return this.pool.addEventListener("fulfilled",t),this.pool.start().then(()=>(setTimeout(()=>{this.pool.removeEventListener("fulfilled",t)}),Object.values(this.entries)))}};c();c();c();var be=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");c();var v=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};c();import{average as D}from"@excalidraw/math";var Y=null,Mr=e=>{Y=e},Pr=()=>{if(Y)return Y;let e=new Date,t=e.getFullYear(),n=`${e.getMonth()+1}`.padStart(2,"0"),o=`${e.getDate()}`.padStart(2,"0"),r=`${e.getHours()}`.padStart(2,"0"),l=`${e.getMinutes()}`.padStart(2,"0");return`${t}-${n}-${o}-${r}${l}`},Cr=e=>e.charAt(0).toUpperCase()+e.slice(1),Ir=e=>e instanceof HTMLElement&&e.className.includes("ToolIcon"),nt=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement,Fr=e=>nt(e)||e instanceof Element&&!!e.closest("label, button"),Dr=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&(e.type==="text"||e.type==="number"||e.type==="password"||e.type==="search"),ot=({fontFamily:e})=>{for(let[t,n]of Object.entries(m))if(n===e)return`${t}${ne(n).map(o=>`, ${o}`).join("")}`;return O},Ur=({fontSize:e,fontFamily:t})=>`${e}px ${ot({fontFamily:t})}`,Nr=async e=>{requestAnimationFrame(()=>requestAnimationFrame(e))},kr=(e,t)=>{let n=0,o=null,r=(...l)=>{o=l,clearTimeout(n),n=window.setTimeout(()=>{o=null,e(...l)},t)};return r.flush=()=>{if(clearTimeout(n),o){let l=o;o=null,e(...l)}},r.cancel=()=>{o=null,clearTimeout(n)},r},Hr=(e,t)=>{let n=null,o=null,r=null,l=s=>{n=window.requestAnimationFrame(()=>{n=null,e(...s),o=null,r&&(o=r,r=null,l(o))})},a=(...s)=>{if(U()){e(...s);return}o=s,n===null?l(o):t?.trailing&&(r=s)};return a.flush=()=>{n!==null&&(cancelAnimationFrame(n),n=null),o&&(e(...r||o),o=r=null)},a.cancel=()=>{o=r=null,n!==null&&(cancelAnimationFrame(n),n=null)},a},he=e=>1-Math.pow(1-e,4),xe=(e,t,n)=>(t-e)*he(n)+e,Gr=({fromValues:e,toValues:t,onStep:n,duration:o=250,interpolateValue:r,onStart:l,onEnd:a,onCancel:s})=>{let i=!1,p=0,E;function R(k){if(i)return;E===void 0&&(E=k,l?.());let _=Math.min(k-E,o),h=he(_/o),A={};if(Object.keys(e).forEach(L=>{let y=L,H=(t[y]-e[y])*h+e[y];A[y]=H}),n(A),_<o){let L=_/o,y={};Object.keys(e).forEach(H=>{let w=H,G=e[w],B=t[w],M;M=r?r(G,B,L,w):xe(G,B,L),M==null&&(M=xe(G,B,L)),y[w]=M}),n(y),p=window.requestAnimationFrame(R)}else n(t),a?.()}return p=window.requestAnimationFrame(R),()=>{s?.(),i=!0,window.cancelAnimationFrame(p)}},Br=(e,t)=>{if(!e.length||t<1)return[];let n=0,o=0,r=Array(Math.ceil(e.length/t));for(;n<e.length;)r[o++]=e.slice(n,n+=t);return r},Kr=e=>{let t=window.getSelection();if(t){let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}},Wr=()=>{let e=window.getSelection();e&&e.removeAllRanges()},Yr=(e,t)=>Math.abs(e-t),Vr=(e,t)=>t.type==="custom"?{...e.activeTool,type:"custom",customType:t.customType,locked:t.locked??e.activeTool.locked}:{...e.activeTool,lastActiveTool:t.lastActiveToolBeforeEraser===void 0?e.activeTool.lastActiveTool:t.lastActiveToolBeforeEraser,type:t.type,customType:null,locked:t.locked??e.activeTool.locked,fromSelection:t.fromSelection??!1},Xr=()=>document.fullscreenElement?.nodeName==="HTML",zr=()=>document.documentElement.requestFullscreen(),$r=()=>document.exitFullscreen(),jr=({clientX:e,clientY:t},{zoom:n,offsetLeft:o,offsetTop:r,scrollX:l,scrollY:a})=>{let s=(e-o)/n.value-l,i=(t-r)/n.value-a;return{x:s,y:i}},Qr=({sceneX:e,sceneY:t},{zoom:n,offsetLeft:o,offsetTop:r,scrollX:l,scrollY:a})=>{let s=(e+l)*n.value+o,i=(t+a)*n.value+r;return{x:s,y:i}},Zr=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),rt="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",st="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",at=new RegExp(`^[^${rt}]*[${st}]`),qr=e=>at.test(e),Jr=e=>{let[t,n]=e;return{x:t,y:n}},es=e=>{if(e?.name==="AbortError"){console.warn(e);return}throw e},ts=(e,t,n=0)=>{n<0&&(n=e.length+n),n=Math.min(e.length,Math.max(n,0));let o=n-1;for(;++o<e.length;)if(t(e[o],o,e))return o;return-1},ns=(e,t,n=e.length-1)=>{n<0&&(n=e.length+n),n=Math.min(e.length-1,Math.max(n,0));let o=n+1;for(;--o>-1;)if(t(e[o],o,e))return o;return-1},os=(e,t)=>{for(let n=0;n<e.length;n++){let o=t(e[n],n);if(o!=null)return o}},it=e=>{let t=e.length===5&&e.substr(4,1)==="0",n=e.length===9&&e.substr(7,2)==="00";return t||n||e===u.transparent},rs=e=>e.fillStyle!=="solid"||it(e.backgroundColor),ae=()=>{let e,t,n=new Promise((o,r)=>{e=o,t=r});return n.resolve=e,n.reject=t,n},ss=(e,t)=>{let n=[{value:1,symbol:"b"},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"},{value:1e9,symbol:"G"}],o=/\.0+$|(\.[0-9]*[1-9])0+$/,r;for(r=n.length-1;r>0&&!(e>=n[r].value);r--);return(e/n[r].value).toFixed(t).replace(o,"$1")+n[r].symbol},as=()=>document.querySelector('meta[name="version"]')?.content||oe,is=()=>{let t=document.createElement("canvas").getContext("2d");if(!t)return!1;let n=12;return t.fillStyle="#f00",t.textBaseline="top",t.font="32px Arial",t.fillText("\u{1F600}",0,0),t.getImageData(n,n,1,1).data[0]!==0},ls=e=>{let t=e.parentElement;for(;t;){if(t===document.body)return document;let{overflowY:n}=window.getComputedStyle(t);if(t.scrollHeight>t.clientHeight&&(n==="auto"||n==="scroll"||n==="overlay"))return t;t=t.parentElement}return document},cs=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1){t.focus();return}t=t.parentElement}},us=e=>{e.preventDefault(),e.returnValue=""},ps=e=>Array.from(e).map(t=>`0${t.toString(16)}`.slice(-2)).join(""),ds=()=>U()?1:Date.now(),fs=e=>e instanceof Map?e:e.reduce((t,n)=>(t.set(typeof n=="string"?n:n.id,n),t),new Map),ms=e=>e.reduce((t,n,o)=>(t.set(n.id,[n,o]),t),new Map),Ts=(e,t)=>e.reduce((n,o,r)=>(n[t?t(o):r]=o,n),{}),Es=e=>e.reduce((t,n,o)=>{let r={...n,prev:null,next:null};if(o!==0){let l=t[o-1];if(r.prev=l,l.next=r,o===e.length-1){let a=t[0];r.next=a,a.prev=r}}return t.push(r),t},[]),lt=e=>Array.isArray(e)?e:e.values(),bs=e=>Array.isArray(e)?e:Array.from(lt(e)),U=()=>f.MODE===I.TEST,xs=()=>f.MODE===I.DEVELOPMENT,_s=()=>f.MODE===I.PRODUCTION,hs=()=>typeof process<"u"&&!0,As=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),ys=(e,t)=>{let n=!1;for(let o in t){let r=t[o];if(typeof r<"u"){if(e[o]===r&&(typeof r!="object"||r===null))continue;n=!0}}return n?{...e,...t}:e},gs=e=>{let t=typeof e;return e==null||t!=="object"&&t!=="function"},ct=()=>{try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}},Ss=()=>ct()==="iframe",Ls=e=>!!e&&typeof e=="object"&&"then"in e&&"catch"in e&&"finally"in e,Os=e=>{let t=e?.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter(n=>n.tabIndex>-1&&!n.disabled):[]},_e=(e,t)=>Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t,ut=(e,t,n,o=!1)=>{let r=Object.keys(e),l=Object.keys(t);if(r.length!==l.length)return o&&console.warn("%cisShallowEqual: objects don't have same properties ->","color: #8B4000",e,t),!1;if(n&&Array.isArray(n)){for(let a of n)if(!(e[a]===t[a]||_e(e[a],t[a])))return o&&console.warn(`%cisShallowEqual: ${a} not equal ->`,"color: #8B4000",e[a],t[a]),!1;return!0}return r.every(a=>{let s=n?.[a],i=s?s(e[a],t[a]):e[a]===t[a]||_e(e[a],t[a]);return!i&&o&&console.warn(`%cisShallowEqual: ${a} not equal ->`,"color: #8B4000",e[a],t[a]),i})},vs=(e,t,{checkForDefaultPrevented:n=!0}={})=>function(r){if(e?.(r),!n||!r?.defaultPrevented)return t?.(r)},Rs=(e,t,n)=>{if(!t)return e;if(n)return console.error(t),e;throw new Error(t)};function ws(e,t){if(!e)throw new Error(t)}var Ms=e=>{let t,n,o=function(r){let l=Object.entries(r);if(t){let s=!0;for(let[i,p]of l)if(t.get(i)!==p){s=!1;break}if(s)return n}let a=e(r);return t=new Map(l),n=a,a};return o.clear=()=>{t=void 0,n=void 0},o},Ps=(e,t)=>e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t),Cs=e=>JSON.parse(JSON.stringify(e)),Is=(e,t)=>ut(e,t)?e:t;function Fs(e,t,n,o){return e?(e?.addEventListener?.(t,n,o),()=>{e?.removeEventListener?.(t,n,o)}):()=>{}}function Ds(e,t=!0){let n=e.length;if(n<4)return"";let o=e[0],r=e[1],l=e[2],a=`M${o[0].toFixed(2)},${o[1].toFixed(2)} Q${r[0].toFixed(2)},${r[1].toFixed(2)} ${D(r[0],l[0]).toFixed(2)},${D(r[1],l[1]).toFixed(2)} T`;for(let s=2,i=n-1;s<i;s++)o=e[s],r=e[s+1],a+=`${D(o[0],r[0]).toFixed(2)},${D(o[1],r[1]).toFixed(2)} `;return t&&(a+="Z"),a}var Us=e=>e.replace(/\r?\n|\r/g,`
|
|
4
|
+
`),Ns=e=>e,ie=async(e,...t)=>new Promise(n=>{n(e(...t))}),ks=(...e)=>Math.max(...e.map(t=>t?1:0))>0,Hs=e=>{try{return JSON.parse(e)}catch{return null}},Ae=e=>e.replace(/"/g,"""),Gs=e=>Array.isArray(e)?e:[e],pt=e=>Array.isArray(e),dt=e=>pt(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length,Bs=(e,t)=>{if(dt(e)===0)return null;let n=t||(r=>r),o=null;for(let r of e){let l=n(r);if((o===null||o===l)&&l!=null)o=l;else return null}return o};var ye=new v(Date.now()),ge=0,zs=()=>Math.floor(ye.next()*2**31),$s=e=>{ye=new v(e),ge=0},js=()=>U()?`id${ge++}`:be();c();var Le=$(Se(),1);var yt=e=>(e=e.trim(),e&&(0,Le.sanitizeUrl)(Ae(e))),ta=e=>!!(e?.includes(location.origin)||e?.startsWith("/")),na=e=>{if(e=yt(e),e.startsWith("/"))return`${location.origin}${e}`;try{new URL(e)}catch{return"about:blank"}return e};c();var Oe=class{subscribers=[];on(...t){let n=t.flat().filter(o=>typeof o=="function");return this.subscribers.push(...n),()=>this.off(n)}once(...t){let n=t.flat().filter(r=>typeof r=="function");n.push(()=>o());let o=this.on(...n);return o}off(...t){let n=t.flat();this.subscribers=this.subscribers.filter(o=>!n.includes(o))}trigger(...t){for(let n of this.subscribers)n(...t);return this}clear(){this.subscribers=[]}};c();import{isLineSegment as gt,lineSegment as S,pointFrom as T}from"@excalidraw/math";import{isBounds as St}from"@excalidraw/element";var ca=(e,t)=>{ve({color:t?.color??"purple",permanent:!!t?.permanent,data:e})},V=(e,t)=>{(gt(e)?[e]:e).forEach(o=>ve({color:t?.color??"red",data:o,permanent:!!t?.permanent}))},Lt=(e,t)=>{let n=t?.fuzzy?Math.random()*3:0,o=t?.fuzzy?Math.random()*3:0;V(S(T(e[0]+n-10,e[1]+o-10),T(e[0]+n+10,e[1]+o+10)),{color:t?.color??"cyan",permanent:t?.permanent}),V(S(T(e[0]+n-10,e[1]+o+10),T(e[0]+n+10,e[1]+o-10)),{color:t?.color??"cyan",permanent:t?.permanent})},ua=(e,t)=>{(St(e)?[e]:e).forEach(n=>V([S(T(n[0],n[1]),T(n[2],n[1])),S(T(n[2],n[1]),T(n[2],n[3])),S(T(n[2],n[3]),T(n[0],n[3])),S(T(n[0],n[3]),T(n[0],n[1]))],{color:t?.color??"green",permanent:!!t?.permanent}))},pa=({x:e,y:t,points:n},o)=>{n.forEach(r=>Lt(T(e+r[0],t+r[1]),o))},da=()=>{window.visualDebug?.data.push([])},fa=()=>{window.visualDebug?.data&&(window.visualDebug.data=[])},ve=e=>{window.visualDebug?.data&&window.visualDebug.data.length===0&&(window.visualDebug.data[0]=[]),window.visualDebug?.data&&window.visualDebug.data[window.visualDebug.data.length-1].push(e)};export{Hn as ACTIVE_THRESHOLD,Sn as ALLOWED_PASTE_MIME_TYPES,$t as APP_NAME,to as ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO,eo as ARROW_LABEL_WIDTH_FRACTION,_o as ARROW_TYPE,Jn as BOUND_TEXT_PADDING,j as BinaryHeap,An as CANVAS_ONLY_ACTIONS,Ut as CANVAS_PALETTE_SHADE_INDEXES,uo as CANVAS_SEARCH_TAB,J as CJK_HAND_DRAWN_FALLBACK_FONT,cn as CLASSES,de as CODES,Ft as COLORS_PER_ROW,_n as COLOR_CHARCOAL_BLACK,Ct as COLOR_OUTLINE_CONTRAST_THRESHOLD,u as COLOR_PALETTE,hn as COLOR_VOICE_CALL,xn as COLOR_WHITE,rn as CURSOR_TYPE,ao as DEFAULT_ADAPTIVE_RADIUS,Ht as DEFAULT_CANVAS_BACKGROUND_PICKS,Dt as DEFAULT_CHART_COLOR_INDEX,bn as DEFAULT_COLLISION_THRESHOLD,C as DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX,Bt as DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE,kt as DEFAULT_ELEMENT_BACKGROUND_PICKS,co as DEFAULT_ELEMENT_PROPS,P as DEFAULT_ELEMENT_STROKE_COLOR_INDEX,Gt as DEFAULT_ELEMENT_STROKE_COLOR_PALETTE,Nt as DEFAULT_ELEMENT_STROKE_PICKS,Xn as DEFAULT_EXPORT_PADDING,Eo as DEFAULT_FILENAME,mn as DEFAULT_FONT_FAMILY,fn as DEFAULT_FONT_SIZE,yn as DEFAULT_GRID_SIZE,gn as DEFAULT_GRID_STEP,on as DEFAULT_LASER_COLOR,zn as DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT,so as DEFAULT_PROPORTIONAL_RADIUS,ho as DEFAULT_REDUCED_GLOBAL_ALPHA,po as DEFAULT_SIDEBAR,Tn as DEFAULT_TEXT_ALIGN,Be as DEFAULT_TRANSFORM_HANDLE_SPACING,Wn as DEFAULT_UI_OPTIONS,oe as DEFAULT_VERSION,En as DEFAULT_VERTICAL_ALIGN,So as DOUBLE_TAP_POSITION_THRESHOLD,Qt as DRAGGING_THRESHOLD,To as EDITOR_LS_KEYS,b as ELEMENTS_PALETTE_SHADE_INDEXES,Ao as ELEMENT_LINK_KEY,ro as ELEMENT_READY_TO_ERASE_OPACITY,Jt as ELEMENT_SHIFT_TRANSLATE_AMOUNT,en as ELEMENT_TRANSLATE_AMOUNT,Zn as ENCRYPTION_KEY_BITS,I as ENV,We as EPSILON,ke as EVENT,On as EXPORT_DATA_TYPES,Ln as EXPORT_IMAGE_TYPES,Vn as EXPORT_SCALES,Oe as Emitter,m as FONT_FAMILY,K as FONT_FAMILY_FALLBACKS,He as FONT_FAMILY_GENERIC_FALLBACKS,F as FONT_METADATA,pn as FRAME_STYLE,wo as GOOGLE_FONTS_RANGES,Nn as HYPERLINK_TOOLTIP_DELAY,kn as IDLE_THRESHOLD,re as IMAGE_MIME_TYPES,Rn as IMAGE_RENDER_TIMEOUT,g as KEYS,Je as KeyCodeMap,fo as LIBRARY_DISABLED_TYPES,Xe as LIBRARY_SIDEBAR_TAB,qt as LINE_CONFIRM_THRESHOLD,go as LINE_POLYGON_POINT_MERGE_DISTANCE,Mo as LOCAL_FONT_PROTOCOL,$n as MAX_ALLOWED_FILE_BYTES,It as MAX_CUSTOM_COLORS_USED_IN_CANVAS,Yn as MAX_DECIMALS_FOR_SVG_EXPORT,Un as MAX_ZOOM,q as MIME_TYPES,Zt as MINIMUM_ARROW_SIZE,dn as MIN_FONT_SIZE,xo as MIN_WIDTH_OR_HEIGHT,Dn as MIN_ZOOM,Lo as MOBILE_ACTION_BUTTON_BG,te as MONOSPACE_GENERIC_FONT,Go as MQ_MAX_HEIGHT_LANDSCAPE,ko as MQ_MAX_MOBILE,Ko as MQ_MAX_TABLET,Ho as MQ_MAX_WIDTH_LANDSCAPE,Bo as MQ_MIN_TABLET,Wo as MQ_MIN_WIDTH_DESKTOP,Yo as MQ_RIGHT_SIDEBAR_MIN_WIDTH,yo as ORIG_ID,sn as POINTER_BUTTON,an as POINTER_EVENTS,Te as PromisePool,se as Queue,Ve as ROUGHNESS,io as ROUNDNESS,ee as SANS_SERIF_GENERIC_FONT,In as SCROLL_TIMEOUT,nn as SHIFT_LOCKING_ANGLE,Ke as SIDE_RESIZING_THRESHOLD,bo as STATS_PANELS,Ye as STRING_MIME_TYPES,lo as STROKE_WIDTH,Qn as SVG_DOCUMENT_PREAMBLE,jn as SVG_NS,wn as TAP_TWICE_TIMEOUT,oo as TEXT_ALIGN,jt as TEXT_AUTOWRAP_THRESHOLD,tn as TEXT_TO_CENTER_SNAP_THRESHOLD,un as THEME,Gn as THEME_FILTER,Pn as TITLE_TIMEOUT,mo as TOOL_TYPE,Mn as TOUCH_CTX_MENU_TIMEOUT,Kn as URL_HASH_KEYS,Bn as URL_QUERY_KEYS,ze as UserIdleState,qn as VERSIONS,Cn as VERSION_TIMEOUT,no as VERTICAL_ALIGN,O as WINDOWS_EMOJI_FALLBACK_FONT,ln as YOUTUBE_STATES,Fn as ZOOM_STEP,Fs as addEventListener,zr as allowFullScreen,Es as arrayToList,fs as arrayToMap,ms as arrayToMapWithIndex,Ts as arrayToObject,Rs as assertNever,ps as bytesToHexString,Cr as capitalizeString,Gs as castArray,Br as chunk,Cs as cloneJSON,vs as composeEventHandlers,Zo as createUserAgentDescriptor,kr as debounce,fa as debugClear,da as debugCloseFrame,ua as debugDrawBounds,ca as debugDrawCubicBezier,V as debugDrawLine,Lt as debugDrawPoint,pa as debugDrawPoints,Qo as deriveStylesPanelMode,Yr as distance,he as easeOut,Gr as easeToValuesRAF,Ae as escapeDoubleQuotes,$r as exitFullScreen,ts as findIndex,ns as findLastIndex,cs as focusNearestParent,Kt as getAllColorsSpecificShade,Pr as getDateTime,vn as getExportSource,ne as getFontFamilyFallbacks,ot as getFontFamilyString,Ur as getFontString,jo as getFormFactor,ct as getFrame,Ge as getGenericFontFamilyFallback,Zr as getGlobalCSSVariable,fr as getGridPoint,Co as getLineHeight,ls as getNearestScrollableContainer,pr as getSizeFromPoints,x as getSpecificColorShades,Ds as getSvgPathFromStroke,ds as getUpdatedTimestamp,as as getVersion,Po as getVerticalOffset,ws as invariant,ue as isAndroid,ks as isAnyTrue,rr as isArrowKey,rs as isBindingFallthroughEnabled,$o as isBrave,$e as isChrome,ce as isDarwin,xs as isDevEnv,Xo as isFirefox,Xr as isFullScreen,pe as isIOS,nt as isInputLike,Fr as isInteractive,et as isLatinChar,ta as isLocalLink,Ps as isMemberOf,je as isMobileBreakpoint,gs as isPrimitive,_s as isProdEnv,Ls as isPromiseLike,qr as isRTL,pt as isReadonlyArray,Ss as isRunningInIframe,zo as isSafari,hs as isServerEnv,ut as isShallowEqual,Qe as isTabletBreakpoint,U as isTestEnv,Ir as isToolIcon,it as isTransparent,Vo as isWindows,Dr as isWritableElement,qo as loadDesktopUIModePreference,os as mapFind,or as matchKey,Ms as memoize,es as muteFSAbortError,ss as nFormatter,Nr as nextAnimationFrame,Us as normalizeEOL,yt as normalizeLink,us as preventUnload,ie as promiseTry,Os as queryFocusableElements,js as randomId,zs as randomInteger,Bs as reduceToCommonValue,Wr as removeSelection,dr as rescalePoints,$s as reseed,ae as resolvablePromise,Wt as rgbToHex,Hs as safelyParseJSON,Qr as sceneCoordsToViewportCoords,Kr as selectNode,Mr as setDateTimeForTests,Jo as setDesktopUIMode,ar as shouldMaintainAspectRatio,sr as shouldResizeFromCenter,ir as shouldRotateWithDiscreteAngle,dt as sizeOf,is as supportsEmoji,zt as supportsResizeObserver,Hr as throttleRAF,bs as toArray,Ns as toBrandedType,lt as toIterable,na as toValidURL,Jr as tupleToCoors,Vr as updateActiveTool,ys as updateObject,Is as updateStable,jr as viewportCoordsToSceneCoords,As as wrapEvent};
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement, FontFamilyValues } from "@excalidraw/element/types";
|
|
2
2
|
import type { AppProps, AppState } from "@excalidraw/excalidraw/types";
|
|
3
|
-
export declare const isDarwin: boolean;
|
|
4
|
-
export declare const isWindows: boolean;
|
|
5
|
-
export declare const isAndroid: boolean;
|
|
6
|
-
export declare const isFirefox: boolean;
|
|
7
|
-
export declare const isChrome: boolean;
|
|
8
|
-
export declare const isSafari: boolean;
|
|
9
|
-
export declare const isIOS: boolean;
|
|
10
|
-
export declare const isBrave: () => boolean;
|
|
11
3
|
export declare const supportsResizeObserver: boolean;
|
|
12
4
|
export declare const APP_NAME = "Excalidraw";
|
|
13
5
|
export declare const TEXT_AUTOWRAP_THRESHOLD = 36;
|
|
@@ -86,10 +78,12 @@ export declare const ENV: {
|
|
|
86
78
|
PRODUCTION: string;
|
|
87
79
|
};
|
|
88
80
|
export declare const CLASSES: {
|
|
81
|
+
SIDEBAR: string;
|
|
89
82
|
SHAPE_ACTIONS_MENU: string;
|
|
90
83
|
ZOOM_ACTIONS: string;
|
|
91
84
|
SEARCH_MENU_INPUT_WRAPPER: string;
|
|
92
85
|
CONVERT_ELEMENT_TYPE_POPUP: string;
|
|
86
|
+
SHAPE_ACTIONS_THEME_SCOPE: string;
|
|
93
87
|
};
|
|
94
88
|
export declare const CJK_HAND_DRAWN_FALLBACK_FONT = "Xiaolai";
|
|
95
89
|
export declare const WINDOWS_EMOJI_FALLBACK_FONT = "Segoe UI Emoji";
|
|
@@ -175,6 +169,14 @@ export declare const IMAGE_MIME_TYPES: {
|
|
|
175
169
|
readonly avif: "image/avif";
|
|
176
170
|
readonly jfif: "image/jfif";
|
|
177
171
|
};
|
|
172
|
+
export declare const STRING_MIME_TYPES: {
|
|
173
|
+
readonly text: "text/plain";
|
|
174
|
+
readonly html: "text/html";
|
|
175
|
+
readonly json: "application/json";
|
|
176
|
+
readonly excalidraw: "application/vnd.excalidraw+json";
|
|
177
|
+
readonly excalidrawlib: "application/vnd.excalidrawlib+json";
|
|
178
|
+
readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
|
|
179
|
+
};
|
|
178
180
|
export declare const MIME_TYPES: {
|
|
179
181
|
readonly svg: "image/svg+xml";
|
|
180
182
|
readonly png: "image/png";
|
|
@@ -185,14 +187,15 @@ export declare const MIME_TYPES: {
|
|
|
185
187
|
readonly ico: "image/x-icon";
|
|
186
188
|
readonly avif: "image/avif";
|
|
187
189
|
readonly jfif: "image/jfif";
|
|
190
|
+
readonly "excalidraw.svg": "image/svg+xml";
|
|
191
|
+
readonly "excalidraw.png": "image/png";
|
|
192
|
+
readonly binary: "application/octet-stream";
|
|
188
193
|
readonly text: "text/plain";
|
|
189
194
|
readonly html: "text/html";
|
|
190
195
|
readonly json: "application/json";
|
|
191
196
|
readonly excalidraw: "application/vnd.excalidraw+json";
|
|
192
197
|
readonly excalidrawlib: "application/vnd.excalidrawlib+json";
|
|
193
|
-
readonly
|
|
194
|
-
readonly "excalidraw.png": "image/png";
|
|
195
|
-
readonly binary: "application/octet-stream";
|
|
198
|
+
readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
|
|
196
199
|
};
|
|
197
200
|
export declare const ALLOWED_PASTE_MIME_TYPES: readonly ["text/plain", "text/html", ...("image/svg+xml" | "image/png" | "image/jpeg" | "image/gif" | "image/webp" | "image/bmp" | "image/x-icon" | "image/avif" | "image/jfif")[]];
|
|
198
201
|
export declare const EXPORT_IMAGE_TYPES: {
|
|
@@ -227,10 +230,6 @@ export declare const URL_HASH_KEYS: {
|
|
|
227
230
|
readonly addLibrary: "addLibrary";
|
|
228
231
|
};
|
|
229
232
|
export declare const DEFAULT_UI_OPTIONS: AppProps["UIOptions"];
|
|
230
|
-
export declare const MQ_MAX_WIDTH_PORTRAIT = 730;
|
|
231
|
-
export declare const MQ_MAX_WIDTH_LANDSCAPE = 1000;
|
|
232
|
-
export declare const MQ_MAX_HEIGHT_LANDSCAPE = 500;
|
|
233
|
-
export declare const MQ_RIGHT_SIDEBAR_MIN_WIDTH = 1229;
|
|
234
233
|
export declare const MAX_DECIMALS_FOR_SVG_EXPORT = 2;
|
|
235
234
|
export declare const EXPORT_SCALES: number[];
|
|
236
235
|
export declare const DEFAULT_EXPORT_PADDING = 10;
|
|
@@ -342,3 +341,7 @@ export declare enum UserIdleState {
|
|
|
342
341
|
* the start and end points)
|
|
343
342
|
*/
|
|
344
343
|
export declare const LINE_POLYGON_POINT_MERGE_DISTANCE = 20;
|
|
344
|
+
export declare const DOUBLE_TAP_POSITION_THRESHOLD = 35;
|
|
345
|
+
export declare const MOBILE_ACTION_BUTTON_BG: {
|
|
346
|
+
readonly background: "var(--mobile-action-button-bg)";
|
|
347
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type StylesPanelMode = "compact" | "full" | "mobile";
|
|
2
|
+
export type EditorInterface = Readonly<{
|
|
3
|
+
formFactor: "phone" | "tablet" | "desktop";
|
|
4
|
+
desktopUIMode: "compact" | "full";
|
|
5
|
+
userAgent: Readonly<{
|
|
6
|
+
isMobileDevice: boolean;
|
|
7
|
+
platform: "ios" | "android" | "other" | "unknown";
|
|
8
|
+
}>;
|
|
9
|
+
isTouchScreen: boolean;
|
|
10
|
+
canFitSidebar: boolean;
|
|
11
|
+
isLandscape: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const MQ_MAX_MOBILE = 599;
|
|
14
|
+
export declare const MQ_MAX_WIDTH_LANDSCAPE = 1000;
|
|
15
|
+
export declare const MQ_MAX_HEIGHT_LANDSCAPE = 500;
|
|
16
|
+
export declare const MQ_MIN_TABLET: number;
|
|
17
|
+
export declare const MQ_MAX_TABLET = 1400;
|
|
18
|
+
export declare const MQ_MIN_WIDTH_DESKTOP = 1440;
|
|
19
|
+
export declare const MQ_RIGHT_SIDEBAR_MIN_WIDTH = 1229;
|
|
20
|
+
export declare const isDarwin: boolean;
|
|
21
|
+
export declare const isWindows: boolean;
|
|
22
|
+
export declare const isAndroid: boolean;
|
|
23
|
+
export declare const isFirefox: boolean;
|
|
24
|
+
export declare const isChrome: boolean;
|
|
25
|
+
export declare const isSafari: boolean;
|
|
26
|
+
export declare const isIOS: boolean;
|
|
27
|
+
export declare const isBrave: () => boolean;
|
|
28
|
+
export declare const isMobileBreakpoint: (width: number, height: number) => boolean;
|
|
29
|
+
export declare const isTabletBreakpoint: (editorWidth: number, editorHeight: number) => boolean;
|
|
30
|
+
export declare const getFormFactor: (editorWidth: number, editorHeight: number) => EditorInterface["formFactor"];
|
|
31
|
+
export declare const deriveStylesPanelMode: (editorInterface: EditorInterface) => StylesPanelMode;
|
|
32
|
+
export declare const createUserAgentDescriptor: (userAgentString: string) => EditorInterface["userAgent"];
|
|
33
|
+
export declare const loadDesktopUIModePreference: () => "compact" | "full" | null;
|
|
34
|
+
export declare const setDesktopUIMode: (mode: EditorInterface["desktopUIMode"]) => "compact" | "full" | undefined;
|
|
@@ -17,6 +17,8 @@ export declare const getFontString: ({ fontSize, fontFamily, }: {
|
|
|
17
17
|
fontSize: number;
|
|
18
18
|
fontFamily: FontFamilyValues;
|
|
19
19
|
}) => FontString;
|
|
20
|
+
/** executes callback in the frame that's after the current one */
|
|
21
|
+
export declare const nextAnimationFrame: (cb: () => any) => Promise<void>;
|
|
20
22
|
export declare const debounce: <T extends any[]>(fn: (...args: T) => void, timeout: number) => {
|
|
21
23
|
(...args: T): void;
|
|
22
24
|
flush(): void;
|
|
@@ -94,7 +96,6 @@ export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">,
|
|
|
94
96
|
export declare const isFullScreen: () => boolean;
|
|
95
97
|
export declare const allowFullScreen: () => Promise<void>;
|
|
96
98
|
export declare const exitFullScreen: () => Promise<void>;
|
|
97
|
-
export declare const getShortcutKey: (shortcut: string) => string;
|
|
98
99
|
export declare const viewportCoordsToSceneCoords: ({ clientX, clientY }: {
|
|
99
100
|
clientX: number;
|
|
100
101
|
clientY: number;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
|
|
2
|
+
import type { Curve } from "@excalidraw/math";
|
|
3
|
+
import type { LineSegment } from "@excalidraw/utils";
|
|
4
|
+
import type { Bounds } from "@excalidraw/element";
|
|
5
|
+
declare global {
|
|
6
|
+
interface Window {
|
|
7
|
+
visualDebug?: {
|
|
8
|
+
data: DebugElement[][];
|
|
9
|
+
currentFrame?: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export type DebugElement = {
|
|
14
|
+
color: string;
|
|
15
|
+
data: LineSegment<GlobalPoint> | Curve<GlobalPoint>;
|
|
16
|
+
permanent: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const debugDrawCubicBezier: (c: Curve<GlobalPoint>, opts?: {
|
|
19
|
+
color?: string;
|
|
20
|
+
permanent?: boolean;
|
|
21
|
+
}) => void;
|
|
22
|
+
export declare const debugDrawLine: (segment: LineSegment<GlobalPoint> | LineSegment<GlobalPoint>[], opts?: {
|
|
23
|
+
color?: string;
|
|
24
|
+
permanent?: boolean;
|
|
25
|
+
}) => void;
|
|
26
|
+
export declare const debugDrawPoint: (p: GlobalPoint, opts?: {
|
|
27
|
+
color?: string;
|
|
28
|
+
permanent?: boolean;
|
|
29
|
+
fuzzy?: boolean;
|
|
30
|
+
}) => void;
|
|
31
|
+
export declare const debugDrawBounds: (box: Bounds | Bounds[], opts?: {
|
|
32
|
+
color?: string;
|
|
33
|
+
permanent?: boolean;
|
|
34
|
+
}) => void;
|
|
35
|
+
export declare const debugDrawPoints: ({ x, y, points, }: {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
points: LocalPoint[];
|
|
39
|
+
}, options?: any) => void;
|
|
40
|
+
export declare const debugCloseFrame: () => void;
|
|
41
|
+
export declare const debugClear: () => void;
|
|
@@ -74,7 +74,7 @@ export interface BoundingBox {
|
|
|
74
74
|
width: number;
|
|
75
75
|
height: number;
|
|
76
76
|
}
|
|
77
|
-
export declare const getCommonBoundingBox: (elements: ExcalidrawElement[] | readonly NonDeleted<ExcalidrawElement>[]) => BoundingBox;
|
|
77
|
+
export declare const getCommonBoundingBox: (elements: readonly ExcalidrawElement[] | readonly NonDeleted<ExcalidrawElement>[]) => BoundingBox;
|
|
78
78
|
/**
|
|
79
79
|
* returns scene coords of user's editor viewport (visible canvas area) bounds
|
|
80
80
|
*/
|
|
@@ -105,7 +105,7 @@ export interface DeltaContainer<T> {
|
|
|
105
105
|
*
|
|
106
106
|
* @returns a tuple of the next object `T` with applied `Delta`s, and `boolean`, indicating whether the applied deltas resulted in a visible change.
|
|
107
107
|
*/
|
|
108
|
-
applyTo(previous: T, ...options: unknown[]): [T, boolean
|
|
108
|
+
applyTo(previous: T, ...options: unknown[]): [T, boolean];
|
|
109
109
|
/**
|
|
110
110
|
* Squashes the current delta with the given one.
|
|
111
111
|
*/
|
|
@@ -224,6 +224,5 @@ export declare class ElementsDelta implements DeltaContainer<SceneElementsMap> {
|
|
|
224
224
|
*/
|
|
225
225
|
private static postProcess;
|
|
226
226
|
private static stripIrrelevantProps;
|
|
227
|
-
private static stripVersionProps;
|
|
228
227
|
}
|
|
229
228
|
export {};
|
|
@@ -38,6 +38,7 @@ export * from "./image";
|
|
|
38
38
|
export * from "./linearElementEditor";
|
|
39
39
|
export * from "./mutateElement";
|
|
40
40
|
export * from "./newElement";
|
|
41
|
+
export * from "./positionElementsOnGrid";
|
|
41
42
|
export * from "./renderElement";
|
|
42
43
|
export * from "./resizeElements";
|
|
43
44
|
export * from "./resizeTest";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type GlobalPoint } from "@excalidraw/math";
|
|
1
2
|
import type { AppState, StaticCanvasAppState, InteractiveCanvasAppState, ElementsPendingErasure, PendingExcalidrawElements } from "@excalidraw/excalidraw/types";
|
|
2
3
|
import type { StaticCanvasRenderConfig, RenderableElementsMap, InteractiveCanvasRenderConfig } from "@excalidraw/excalidraw/scene/types";
|
|
3
|
-
import type { ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawImageElement, ExcalidrawFrameLikeElement, NonDeletedSceneElementsMap } from "./types";
|
|
4
|
+
import type { ExcalidrawElement, ExcalidrawTextElement, NonDeletedExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawImageElement, ExcalidrawFrameLikeElement, NonDeletedSceneElementsMap, ElementsMap } from "./types";
|
|
4
5
|
import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
5
6
|
export declare const IMAGE_INVERT_FILTER = "invert(100%) hue-rotate(180deg) saturate(1.25)";
|
|
6
7
|
export declare const getRenderOpacity: (element: ExcalidrawElement, containingFrame: ExcalidrawFrameLikeElement | null, elementsPendingErasure: ElementsPendingErasure, pendingNodes: Readonly<PendingExcalidrawElements> | null, globalAlpha?: number) => number;
|
|
@@ -26,3 +27,5 @@ export declare const pathsCache: WeakMap<ExcalidrawFreeDrawElement, Path2D>;
|
|
|
26
27
|
export declare function generateFreeDrawShape(element: ExcalidrawFreeDrawElement): Path2D;
|
|
27
28
|
export declare function getFreeDrawPath2D(element: ExcalidrawFreeDrawElement): Path2D | undefined;
|
|
28
29
|
export declare function getFreeDrawSvgPath(element: ExcalidrawFreeDrawElement): string;
|
|
30
|
+
export declare function getFreedrawOutlineAsSegments(element: ExcalidrawFreeDrawElement, points: [number, number][], elementsMap: ElementsMap): import("@excalidraw/math").LineSegment<GlobalPoint>[];
|
|
31
|
+
export declare function getFreedrawOutlinePoints(element: ExcalidrawFreeDrawElement): [number, number][];
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { type EditorInterface } from "@excalidraw/common";
|
|
1
2
|
import type { GlobalPoint, LocalPoint } from "@excalidraw/math";
|
|
2
|
-
import type { AppState,
|
|
3
|
+
import type { AppState, Zoom } from "@excalidraw/excalidraw/types";
|
|
3
4
|
import type { Bounds } from "./bounds";
|
|
4
5
|
import type { MaybeTransformHandleType } from "./transformHandles";
|
|
5
6
|
import type { ExcalidrawElement, PointerType, NonDeletedExcalidrawElement, ElementsMap } from "./types";
|
|
6
|
-
export declare const resizeTest: <Point extends GlobalPoint | LocalPoint>(element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, x: number, y: number, zoom: Zoom, pointerType: PointerType,
|
|
7
|
-
export declare const getElementWithTransformHandleType: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState, scenePointerX: number, scenePointerY: number, zoom: Zoom, pointerType: PointerType, elementsMap: ElementsMap,
|
|
7
|
+
export declare const resizeTest: <Point extends GlobalPoint | LocalPoint>(element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, x: number, y: number, zoom: Zoom, pointerType: PointerType, editorInterface: EditorInterface) => MaybeTransformHandleType;
|
|
8
|
+
export declare const getElementWithTransformHandleType: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState, scenePointerX: number, scenePointerY: number, zoom: Zoom, pointerType: PointerType, elementsMap: ElementsMap, editorInterface: EditorInterface) => {
|
|
8
9
|
element: NonDeletedExcalidrawElement;
|
|
9
10
|
transformHandleType: MaybeTransformHandleType;
|
|
10
11
|
} | null;
|
|
11
|
-
export declare const getTransformHandleTypeFromCoords: <Point extends GlobalPoint | LocalPoint>([x1, y1, x2, y2]: Bounds, scenePointerX: number, scenePointerY: number, zoom: Zoom, pointerType: PointerType,
|
|
12
|
+
export declare const getTransformHandleTypeFromCoords: <Point extends GlobalPoint | LocalPoint>([x1, y1, x2, y2]: Bounds, scenePointerX: number, scenePointerY: number, zoom: Zoom, pointerType: PointerType, editorInterface: EditorInterface) => MaybeTransformHandleType;
|
|
12
13
|
export declare const getCursorForResizingElement: (resizingElement: {
|
|
13
14
|
element?: ExcalidrawElement;
|
|
14
15
|
transformHandleType: MaybeTransformHandleType;
|
|
@@ -171,9 +171,9 @@ export declare class StoreDelta {
|
|
|
171
171
|
*/
|
|
172
172
|
static load({ id, elements: { added, removed, updated }, appState: { delta: appStateDelta }, }: DTO<StoreDelta>): StoreDelta;
|
|
173
173
|
/**
|
|
174
|
-
* Squash the passed
|
|
174
|
+
* Squash the passed deltas into the aggregated delta instance.
|
|
175
175
|
*/
|
|
176
|
-
squash(
|
|
176
|
+
static squash(...deltas: StoreDelta[]): StoreDelta;
|
|
177
177
|
/**
|
|
178
178
|
* Inverse store delta, creates new instance of `StoreDelta`.
|
|
179
179
|
*/
|
|
@@ -186,6 +186,7 @@ export declare class StoreDelta {
|
|
|
186
186
|
* Apply latest (remote) changes to the delta, creates new instance of `StoreDelta`.
|
|
187
187
|
*/
|
|
188
188
|
static applyLatestChanges(delta: StoreDelta, prevElements: SceneElementsMap, nextElements: SceneElementsMap, modifierOptions?: "deleted" | "inserted"): StoreDelta;
|
|
189
|
+
static empty(): StoreDelta;
|
|
189
190
|
isEmpty(): boolean;
|
|
190
191
|
}
|
|
191
192
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type Radians } from "@excalidraw/math";
|
|
1
2
|
import type { AppState } from "@excalidraw/excalidraw/types";
|
|
2
3
|
import type { ExtractSetType } from "@excalidraw/common/utility-types";
|
|
3
|
-
import type { Radians } from "@excalidraw/math";
|
|
4
4
|
import type { Scene } from "./Scene";
|
|
5
5
|
import type { MaybeTransformHandleType } from "./transformHandles";
|
|
6
6
|
import type { ElementsMap, ExcalidrawElement, ExcalidrawElementType, ExcalidrawTextContainer, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, NonDeletedExcalidrawElement } from "./types";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { type EditorInterface } from "@excalidraw/common";
|
|
1
2
|
import type { Radians } from "@excalidraw/math";
|
|
2
|
-
import type {
|
|
3
|
+
import type { InteractiveCanvasAppState, Zoom } from "@excalidraw/excalidraw/types";
|
|
3
4
|
import type { Bounds } from "./bounds";
|
|
4
5
|
import type { ElementsMap, ExcalidrawElement, NonDeletedExcalidrawElement, PointerType } from "./types";
|
|
5
6
|
export type TransformHandleDirection = "n" | "s" | "w" | "e" | "nw" | "ne" | "sw" | "se";
|
|
@@ -28,8 +29,8 @@ export declare const OMIT_SIDES_FOR_FRAME: {
|
|
|
28
29
|
w: boolean;
|
|
29
30
|
rotation: boolean;
|
|
30
31
|
};
|
|
31
|
-
export declare const canResizeFromSides: (
|
|
32
|
-
export declare const
|
|
32
|
+
export declare const canResizeFromSides: (editorInterface: EditorInterface) => boolean;
|
|
33
|
+
export declare const getOmitSidesForEditorInterface: (editorInterface: EditorInterface) => {};
|
|
33
34
|
export declare const getTransformHandlesFromCoords: ([x1, y1, x2, y2, cx, cy]: [number, number, number, number, number, number], angle: Radians, zoom: Zoom, pointerType: PointerType, omitSides?: {
|
|
34
35
|
s?: boolean | undefined;
|
|
35
36
|
e?: boolean | undefined;
|
|
@@ -52,4 +53,4 @@ export declare const getTransformHandles: (element: ExcalidrawElement, zoom: Zoo
|
|
|
52
53
|
se?: boolean | undefined;
|
|
53
54
|
rotation?: boolean | undefined;
|
|
54
55
|
}) => TransformHandles;
|
|
55
|
-
export declare const
|
|
56
|
+
export declare const hasBoundingBox: (elements: readonly NonDeletedExcalidrawElement[], appState: InteractiveCanvasAppState, editorInterface: EditorInterface) => boolean;
|
|
@@ -44,6 +44,10 @@ export declare const actionAddToLibrary: {
|
|
|
44
44
|
locked: boolean;
|
|
45
45
|
fromSelection: boolean;
|
|
46
46
|
} & import("../types").ActiveTool;
|
|
47
|
+
preferredSelectionTool: {
|
|
48
|
+
type: "selection" | "lasso";
|
|
49
|
+
initialized: boolean;
|
|
50
|
+
};
|
|
47
51
|
penMode: boolean;
|
|
48
52
|
penDetected: boolean;
|
|
49
53
|
exportBackground: boolean;
|
|
@@ -76,8 +80,8 @@ export declare const actionAddToLibrary: {
|
|
|
76
80
|
zoom: Readonly<{
|
|
77
81
|
value: import("../types").NormalizedZoomValue;
|
|
78
82
|
}>;
|
|
79
|
-
openMenu: "canvas" |
|
|
80
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
83
|
+
openMenu: "canvas" | null;
|
|
84
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
81
85
|
openSidebar: {
|
|
82
86
|
name: string;
|
|
83
87
|
tab?: string | undefined;
|
|
@@ -153,7 +157,7 @@ export declare const actionAddToLibrary: {
|
|
|
153
157
|
shown: true;
|
|
154
158
|
data: import("../charts").Spreadsheet;
|
|
155
159
|
};
|
|
156
|
-
showHyperlinkPopup: false | "
|
|
160
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
157
161
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
158
162
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
159
163
|
originSnapOffset: {
|
|
@@ -211,6 +215,10 @@ export declare const actionAddToLibrary: {
|
|
|
211
215
|
locked: boolean;
|
|
212
216
|
fromSelection: boolean;
|
|
213
217
|
} & import("../types").ActiveTool;
|
|
218
|
+
preferredSelectionTool: {
|
|
219
|
+
type: "selection" | "lasso";
|
|
220
|
+
initialized: boolean;
|
|
221
|
+
};
|
|
214
222
|
penMode: boolean;
|
|
215
223
|
penDetected: boolean;
|
|
216
224
|
exportBackground: boolean;
|
|
@@ -243,8 +251,8 @@ export declare const actionAddToLibrary: {
|
|
|
243
251
|
zoom: Readonly<{
|
|
244
252
|
value: import("../types").NormalizedZoomValue;
|
|
245
253
|
}>;
|
|
246
|
-
openMenu: "canvas" |
|
|
247
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
254
|
+
openMenu: "canvas" | null;
|
|
255
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
248
256
|
openSidebar: {
|
|
249
257
|
name: string;
|
|
250
258
|
tab?: string | undefined;
|
|
@@ -325,7 +333,7 @@ export declare const actionAddToLibrary: {
|
|
|
325
333
|
shown: true;
|
|
326
334
|
data: import("../charts").Spreadsheet;
|
|
327
335
|
};
|
|
328
|
-
showHyperlinkPopup: false | "
|
|
336
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
329
337
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
330
338
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
331
339
|
originSnapOffset: {
|
|
@@ -383,6 +391,10 @@ export declare const actionAddToLibrary: {
|
|
|
383
391
|
locked: boolean;
|
|
384
392
|
fromSelection: boolean;
|
|
385
393
|
} & import("../types").ActiveTool;
|
|
394
|
+
preferredSelectionTool: {
|
|
395
|
+
type: "selection" | "lasso";
|
|
396
|
+
initialized: boolean;
|
|
397
|
+
};
|
|
386
398
|
penMode: boolean;
|
|
387
399
|
penDetected: boolean;
|
|
388
400
|
exportBackground: boolean;
|
|
@@ -415,8 +427,8 @@ export declare const actionAddToLibrary: {
|
|
|
415
427
|
zoom: Readonly<{
|
|
416
428
|
value: import("../types").NormalizedZoomValue;
|
|
417
429
|
}>;
|
|
418
|
-
openMenu: "canvas" |
|
|
419
|
-
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | null;
|
|
430
|
+
openMenu: "canvas" | null;
|
|
431
|
+
openPopup: "fontFamily" | "canvasBackground" | "elementBackground" | "elementStroke" | "compactTextProperties" | "compactStrokeStyles" | "compactOtherProperties" | "compactArrowProperties" | null;
|
|
420
432
|
openSidebar: {
|
|
421
433
|
name: string;
|
|
422
434
|
tab?: string | undefined;
|
|
@@ -497,7 +509,7 @@ export declare const actionAddToLibrary: {
|
|
|
497
509
|
shown: true;
|
|
498
510
|
data: import("../charts").Spreadsheet;
|
|
499
511
|
};
|
|
500
|
-
showHyperlinkPopup: false | "
|
|
512
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
501
513
|
selectedLinearElement: import("@excalidraw/element").LinearElementEditor | null;
|
|
502
514
|
snapLines: readonly import("../snapping").SnapLine[];
|
|
503
515
|
originSnapOffset: {
|