{
  "version": 3,
  "sources": ["../../../../../src/lib/ui/components/Minimap/MinimapManager.ts"],
  "sourcesContent": ["import {\n\tBox,\n\tComputedCache,\n\tEditor,\n\tTLShape,\n\tVec,\n\tatom,\n\tbind,\n\tclamp,\n\tcomputed,\n\treact,\n\tuniqueId,\n} from '@tldraw/editor'\n\nexport class MinimapManager {\n\tdisposables = [] as (() => void)[]\n\n\t@bind\n\tclose() {\n\t\treturn this.disposables.forEach((d) => d())\n\t}\n\n\tprivate readonly ctx: CanvasRenderingContext2D\n\tprivate readonly shapeRectCache: ComputedCache<Box | null, TLShape>\n\n\tconstructor(\n\t\tpublic editor: Editor,\n\t\tpublic readonly elem: HTMLCanvasElement,\n\t\tpublic readonly container: HTMLElement\n\t) {\n\t\tconst ctx = elem.getContext('2d')\n\t\tif (!ctx) throw new Error('Minimap: could not get 2D canvas context')\n\t\tthis.ctx = ctx\n\t\t// Per-shape minimap rect cache. Each entry re-derives only when the\n\t\t// underlying shape record (or its masked page bounds) changes, so a\n\t\t// single shape edit invalidates one entry instead of the whole render.\n\t\t// `null` means \"do not draw this shape\" (hideInMinimap or no bounds).\n\t\tthis.shapeRectCache = editor.store.createComputedCache<Box | null, TLShape>(\n\t\t\t'minimap-shape-rect',\n\t\t\t(shape) => {\n\t\t\t\tconst util = editor.getShapeUtil(shape.type)\n\t\t\t\tif (util.hideInMinimap?.(shape)) return null\n\t\t\t\treturn editor.getShapeMaskedPageBounds(shape.id) ?? null\n\t\t\t}\n\t\t)\n\t\tthis.colors = this._getColors()\n\t\tthis.disposables.push(this._listenForCanvasResize(), react('minimap render', this.render))\n\t}\n\n\tprivate _getColors() {\n\t\tconst style = this.editor.getContainerWindow().getComputedStyle(this.editor.getContainer())\n\t\treturn {\n\t\t\tshapeFill: style.getPropertyValue('--tl-color-text-3').trim(),\n\t\t\tselectFill: style.getPropertyValue('--tl-color-selected').trim(),\n\t\t\tviewportFill: style.getPropertyValue('--tl-color-muted-1').trim(),\n\t\t\tbackground: style.getPropertyValue('--tl-color-low').trim(),\n\t\t}\n\t}\n\n\tprivate colors: ReturnType<MinimapManager['_getColors']>\n\t// this should be called after dark/light mode changes have propagated to the dom\n\tupdateColors() {\n\t\tthis.colors = this._getColors()\n\t}\n\n\treadonly id = uniqueId()\n\t@computed\n\tgetDpr() {\n\t\treturn this.editor.getInstanceState().devicePixelRatio\n\t}\n\n\t@computed\n\tgetContentPageBounds() {\n\t\tconst viewportPageBounds = this.editor.getViewportPageBounds()\n\t\tconst commonShapeBounds = this.editor.getCurrentPageBounds()\n\t\treturn commonShapeBounds\n\t\t\t? Box.Expand(commonShapeBounds, viewportPageBounds)\n\t\t\t: viewportPageBounds\n\t}\n\n\t@computed\n\tgetContentScreenBounds() {\n\t\tconst contentPageBounds = this.getContentPageBounds()\n\t\tconst topLeft = this.editor.pageToScreen(contentPageBounds.point)\n\t\tconst bottomRight = this.editor.pageToScreen(\n\t\t\tnew Vec(contentPageBounds.maxX, contentPageBounds.maxY)\n\t\t)\n\t\treturn new Box(topLeft.x, topLeft.y, bottomRight.x - topLeft.x, bottomRight.y - topLeft.y)\n\t}\n\n\tprivate _getCanvasBoundingRect() {\n\t\tconst { x, y, width, height } = this.elem.getBoundingClientRect()\n\t\treturn new Box(x, y, width, height)\n\t}\n\n\tprivate readonly canvasBoundingClientRect = atom('canvasBoundingClientRect', new Box())\n\n\tgetCanvasScreenBounds() {\n\t\treturn this.canvasBoundingClientRect.get()\n\t}\n\n\tprivate _listenForCanvasResize() {\n\t\tconst observer = new ResizeObserver(() => {\n\t\t\tconst rect = this._getCanvasBoundingRect()\n\t\t\tthis.canvasBoundingClientRect.set(rect)\n\t\t})\n\t\tobserver.observe(this.elem)\n\t\tobserver.observe(this.container)\n\t\treturn () => observer.disconnect()\n\t}\n\n\t@computed\n\tgetCanvasSize() {\n\t\tconst rect = this.canvasBoundingClientRect.get()\n\t\tconst dpr = this.getDpr()\n\t\treturn new Vec(rect.width * dpr, rect.height * dpr)\n\t}\n\n\t@computed\n\tgetCanvasClientPosition() {\n\t\treturn this.canvasBoundingClientRect.get().point\n\t}\n\n\toriginPagePoint = new Vec()\n\toriginPageCenter = new Vec()\n\n\tisInViewport = false\n\n\t/** Get the canvas's true bounds converted to page bounds. */\n\t@computed getCanvasPageBounds() {\n\t\tconst canvasScreenBounds = this.getCanvasScreenBounds()\n\t\tconst contentPageBounds = this.getContentPageBounds()\n\n\t\tconst aspectRatio = canvasScreenBounds.width / canvasScreenBounds.height\n\n\t\tlet targetWidth = contentPageBounds.width\n\t\tlet targetHeight = targetWidth / aspectRatio\n\t\tif (targetHeight < contentPageBounds.height) {\n\t\t\ttargetHeight = contentPageBounds.height\n\t\t\ttargetWidth = targetHeight * aspectRatio\n\t\t}\n\n\t\tconst box = new Box(0, 0, targetWidth, targetHeight)\n\t\tbox.center = contentPageBounds.center\n\t\treturn box\n\t}\n\n\t/** Minimap screen-pixels per page-unit \u2014 same convention as `editor.getCamera().z`. */\n\t@computed getZoom() {\n\t\treturn this.getCanvasScreenBounds().width / this.getCanvasPageBounds().width\n\t}\n\n\tgetMinimapPagePoint(clientX: number, clientY: number) {\n\t\tconst canvasPageBounds = this.getCanvasPageBounds()\n\t\tconst canvasScreenBounds = this.getCanvasScreenBounds()\n\n\t\t// first offset the canvas position\n\t\tlet x = clientX - canvasScreenBounds.x\n\t\tlet y = clientY - canvasScreenBounds.y\n\n\t\t// then multiply by the ratio between the page and screen bounds\n\t\tx *= canvasPageBounds.width / canvasScreenBounds.width\n\t\ty *= canvasPageBounds.height / canvasScreenBounds.height\n\n\t\t// then add the canvas page bounds' offset\n\t\tx += canvasPageBounds.minX\n\t\ty += canvasPageBounds.minY\n\n\t\treturn new Vec(x, y, 1)\n\t}\n\n\tminimapScreenPointToPagePoint(x: number, y: number, shiftKey = false, clampToBounds = false) {\n\t\tconst { editor } = this\n\t\tconst vpPageBounds = editor.getViewportPageBounds()\n\n\t\tlet { x: px, y: py } = this.getMinimapPagePoint(x, y)\n\n\t\tif (clampToBounds) {\n\t\t\tconst shapesPageBounds = this.editor.getCurrentPageBounds() ?? new Box()\n\n\t\t\tconst minX = shapesPageBounds.minX - vpPageBounds.width / 2\n\t\t\tconst maxX = shapesPageBounds.maxX + vpPageBounds.width / 2\n\t\t\tconst minY = shapesPageBounds.minY - vpPageBounds.height / 2\n\t\t\tconst maxY = shapesPageBounds.maxY + vpPageBounds.height / 2\n\n\t\t\tconst lx = Math.max(0, minX + vpPageBounds.width - px)\n\t\t\tconst rx = Math.max(0, -(maxX - vpPageBounds.width - px))\n\t\t\tconst ly = Math.max(0, minY + vpPageBounds.height - py)\n\t\t\tconst ry = Math.max(0, -(maxY - vpPageBounds.height - py))\n\n\t\t\tpx += (lx - rx) / 2\n\t\t\tpy += (ly - ry) / 2\n\n\t\t\tpx = clamp(px, minX, maxX)\n\t\t\tpy = clamp(py, minY, maxY)\n\t\t}\n\n\t\tif (shiftKey) {\n\t\t\tconst { originPagePoint } = this\n\t\t\tconst dx = Math.abs(px - originPagePoint.x)\n\t\t\tconst dy = Math.abs(py - originPagePoint.y)\n\t\t\tif (dx > dy) {\n\t\t\t\tpy = originPagePoint.y\n\t\t\t} else {\n\t\t\t\tpx = originPagePoint.x\n\t\t\t}\n\t\t}\n\n\t\treturn new Vec(px, py)\n\t}\n\n\t@bind\n\trender() {\n\t\tconst { ctx, editor, elem } = this\n\t\tconst canvasSize = this.getCanvasSize()\n\t\tconst canvasPageBounds = this.getCanvasPageBounds()\n\t\tconst dpr = this.getDpr()\n\t\tconst zoom = this.getZoom()\n\n\t\t// Size the backing canvas to device pixels. Assigning width/height\n\t\t// also resets the context transform and clears the canvas.\n\t\tif (elem.width !== canvasSize.x || elem.height !== canvasSize.y) {\n\t\t\telem.width = canvasSize.x\n\t\t\telem.height = canvasSize.y\n\t\t}\n\n\t\tctx.resetTransform()\n\t\t// Background fill (opaque \u2014 matches the WebGL clear color).\n\t\tctx.fillStyle = this.colors.background\n\t\tctx.fillRect(0, 0, canvasSize.x, canvasSize.y)\n\n\t\t// Transform: 1 page unit = `zoom * dpr` device pixels, with the minimap's\n\t\t// page bounds pinned to the top-left of the canvas.\n\t\tctx.scale(dpr * zoom, dpr * zoom)\n\t\tctx.translate(-canvasPageBounds.minX, -canvasPageBounds.minY)\n\n\t\t// Shapes \u2014 iterate sorted IDs and pull per-shape rects from the\n\t\t// computed cache so only *changed* shapes re-derive between renders.\n\t\tconst selectedIds = new Set<string>(editor.getSelectedShapeIds())\n\t\tconst ids = editor.getCurrentPageShapeIdsSorted()\n\n\t\tconst shapesPath = new Path2D()\n\t\tconst selectedPath = new Path2D()\n\n\t\tfor (let i = 0, len = ids.length; i < len; i++) {\n\t\t\tconst shapeId = ids[i]\n\t\t\tconst bounds = this.shapeRectCache.get(shapeId)\n\t\t\tif (!bounds) continue\n\t\t\tconst target = selectedIds.has(shapeId) ? selectedPath : shapesPath\n\t\t\ttarget.rect(bounds.x, bounds.y, bounds.w, bounds.h)\n\t\t}\n\n\t\tctx.fillStyle = this.colors.shapeFill\n\t\tctx.fill(shapesPath)\n\n\t\tctx.fillStyle = this.colors.selectFill\n\t\tctx.fill(selectedPath)\n\n\t\t// Viewport rounded rect\n\t\tconst viewport = editor.getViewportPageBounds()\n\t\tconst { minX: vx, minY: vy, width: vw, height: vh } = viewport\n\t\tconst r = Math.min(vw / 4, vh / 4, 4 / zoom)\n\t\tctx.beginPath()\n\t\troundedRect(ctx, vx, vy, vw, vh, r)\n\t\tctx.closePath()\n\t\tctx.fillStyle = this.colors.viewportFill\n\t\tctx.fill()\n\n\t\t// Let active overlay utils contribute to the minimap. The ctx is already\n\t\t// in page space, matching the main-canvas overlay render contract.\n\t\tconst entries = editor.overlays.getActiveOverlayEntries()\n\t\tfor (const { util, overlays } of entries) {\n\t\t\tctx.save()\n\t\t\tutil.renderMinimap(ctx, overlays, zoom)\n\t\t\tctx.restore()\n\t\t}\n\t}\n}\n\nfunction roundedRect(\n\tctx: CanvasRenderingContext2D | Path2D,\n\tx: number,\n\ty: number,\n\tw: number,\n\th: number,\n\tr: number\n) {\n\tif (r < 1) {\n\t\tctx.rect(x, y, w, h)\n\t\treturn\n\t}\n\tctx.moveTo(x + r, y)\n\tctx.lineTo(x + w - r, y)\n\tctx.quadraticCurveTo(x + w, y, x + w, y + r)\n\tctx.lineTo(x + w, y + h - r)\n\tctx.quadraticCurveTo(x + w, y + h, x + w - r, y + h)\n\tctx.lineTo(x + r, y + h)\n\tctx.quadraticCurveTo(x, y + h, x, y + h - r)\n\tctx.lineTo(x, y + r)\n\tctx.quadraticCurveTo(x, y, x + r, y)\n}\n"],
  "mappings": ";;;;;;;;;;AAAA;AAAA,EACC;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAEA,MAAM,eAAe;AAAA,EAW3B,YACQ,QACS,MACA,WACf;AAHM;AACS;AACA;AAEhB,UAAM,MAAM,KAAK,WAAW,IAAI;AAChC,QAAI,CAAC,IAAK,OAAM,IAAI,MAAM,0CAA0C;AACpE,SAAK,MAAM;AAKX,SAAK,iBAAiB,OAAO,MAAM;AAAA,MAClC;AAAA,MACA,CAAC,UAAU;AACV,cAAM,OAAO,OAAO,aAAa,MAAM,IAAI;AAC3C,YAAI,KAAK,gBAAgB,KAAK,EAAG,QAAO;AACxC,eAAO,OAAO,yBAAyB,MAAM,EAAE,KAAK;AAAA,MACrD;AAAA,IACD;AACA,SAAK,SAAS,KAAK,WAAW;AAC9B,SAAK,YAAY,KAAK,KAAK,uBAAuB,GAAG,MAAM,kBAAkB,KAAK,MAAM,CAAC;AAAA,EAC1F;AAAA,EArBQ;AAAA,EACS;AAAA,EACA;AAAA,EAbjB,cAAc,CAAC;AAAA,EAGf,QAAQ;AACP,WAAO,KAAK,YAAY,QAAQ,CAAC,MAAM,EAAE,CAAC;AAAA,EAC3C;AAAA,EAEiB;AAAA,EACA;AAAA,EA0BT,aAAa;AACpB,UAAM,QAAQ,KAAK,OAAO,mBAAmB,EAAE,iBAAiB,KA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