{
  "version": 3,
  "sources": ["../../src/utils/tracing.ts", "../../src/canvas-sandbox/SandboxCommand.ts", "../../src/export/nodeForExporting.ts"],
  "sourcesContent": ["// In a non-production build, this provides a way for our end-to-end tests to install a\n// window[\"perf\"] object. Certain parts of our codebase use that object to track work. This file\n// mirrors what `engine.installPerformanceDebugging()` does.\n\ninterface Perf {\n\tnodeUpdated: (count?: number) => void\n\tcacheUpdated: (count?: number) => void\n\tcacheReset: (count?: number) => void\n\tnodeGetProps: (count?: number) => void\n\tnodeCreateElement: (count?: number) => void\n\tnodeRender: (count?: number) => void\n\tlayerPanelItem: (count?: number) => void\n}\n\ninterface Stats {\n\tnodeUpdated: number\n\tcacheUpdated: number\n\tcacheReset: number\n\tnodeGetProps: number\n\tnodeCreateElement: number\n\tnodeRender: number\n\tlayerPanelItem: number\n}\n\ndeclare global {\n\tinterface Window {\n\t\tinstallTracing?: () => void\n\t\tperf?: Perf\n\t\treadAndResetTracingData: () => Stats\n\t}\n}\n\nexport function loadTracing() {\n\tif (process.env.NODE_ENV === \"production\") return\n\n\twindow.installTracing = function installTracing() {\n\t\tconst stats: Stats = {\n\t\t\tnodeUpdated: 0,\n\t\t\tcacheUpdated: 0,\n\t\t\tcacheReset: 0,\n\t\t\tnodeGetProps: 0,\n\t\t\tnodeCreateElement: 0,\n\t\t\tnodeRender: 0,\n\t\t\tlayerPanelItem: 0,\n\t\t}\n\n\t\twindow.perf = {\n\t\t\tnodeUpdated: (count = 1) => {\n\t\t\t\tstats.nodeUpdated += count\n\t\t\t},\n\t\t\tcacheUpdated: (count = 1) => {\n\t\t\t\tstats.cacheUpdated += count\n\t\t\t},\n\t\t\tcacheReset: (count = 1) => {\n\t\t\t\tstats.cacheReset += count\n\t\t\t},\n\t\t\tnodeGetProps: (count = 1) => {\n\t\t\t\tstats.nodeGetProps += count\n\t\t\t},\n\t\t\tnodeCreateElement: (count = 1) => {\n\t\t\t\tstats.nodeCreateElement += count\n\t\t\t},\n\t\t\tnodeRender: (count = 1) => {\n\t\t\t\tstats.nodeRender += count\n\t\t\t},\n\t\t\tlayerPanelItem: (count = 1) => {\n\t\t\t\tstats.layerPanelItem += count\n\t\t\t},\n\t\t}\n\n\t\twindow.readAndResetTracingData = function readAndResetTracingData() {\n\t\t\tconst res = Object.assign({}, stats)\n\t\t\tstats.nodeUpdated = 0\n\t\t\tstats.cacheUpdated = 0\n\t\t\tstats.cacheReset = 0\n\t\t\tstats.nodeGetProps = 0\n\t\t\tstats.nodeCreateElement = 0\n\t\t\tstats.nodeRender = 0\n\t\t\tstats.layerPanelItem = 0\n\t\t\treturn res\n\t\t}\n\t}\n}\n", "import type { environment } from \"@framerjs/framer-environment\"\nimport type { DebugRenderingFeatures } from \"renderer/DebugRenderingFeatures.ts\"\nimport { isObject, isString } from \"utils/typeChecks.ts\"\n\nexport interface MinMaxSize {\n\tminX: number\n\tmaxX: number\n\tminY: number\n\tmaxY: number\n}\n\nexport function minMaxSizeEqual(a: MinMaxSize | null | undefined, b: MinMaxSize | null | undefined) {\n\tif (!a || !b) return false\n\tif (a === b) return true\n\treturn a.minX === b.minX && a.maxX === b.maxX && a.minY === b.minY && a.maxY === b.maxY\n}\n\nexport type SandboxCommand =\n\t| {\n\t\t\tcommand: \"clearCache\"\n\t\t\targs: undefined\n\t  }\n\t| {\n\t\t\tcommand: \"setEnvironment\"\n\t\t\targs: Partial<typeof environment>\n\t  }\n\t| {\n\t\t\tcommand: \"setLogLevel\"\n\t\t\targs: string\n\t  }\n\t| {\n\t\t\tcommand: \"setLogTimestamps\"\n\t\t\targs: boolean\n\t  }\n\t| {\n\t\t\tcommand: \"renderingFeatures\"\n\t\t\targs: Partial<DebugRenderingFeatures>\n\t  }\n\t| {\n\t\t\tcommand: \"updateGroundNodeOverflowSizes\"\n\t\t\targs: Record<string, MinMaxSize>\n\t  }\n\nexport function isSandboxCommand(msg: unknown): msg is SandboxCommand {\n\treturn isObject(msg) && isString(msg.command)\n}\n\nexport interface SandboxCommandInterface {\n\tcommand?(command: \"clearCache\", args: undefined): void\n\tcommand?(command: \"setEnvironment\", args: Partial<typeof environment>): void\n\tcommand?(command: \"setLogLevel\", args: string): void\n\tcommand?(command: \"setLogTimestamps\", args: boolean): void\n\tcommand?(command: \"renderingFeatures\", args: Partial<DebugRenderingFeatures>): void\n\tcommand?(command: \"updateGroundNodeOverflowSizes\", args: Record<string, MinMaxSize>): void\n}\n", "import type { SandboxComponentLoader } from \"@framerjs/framer-runtime/sandbox\"\nimport { assert } from \"@framerjs/shared\"\nimport type { CanvasNode, NodeID } from \"document/models/CanvasTree/index.ts\"\nimport { CanvasTree, isVectorNode } from \"document/models/CanvasTree/index.ts\"\nimport { CanvasChildList } from \"document/models/CanvasTree/nodes/ChildList.ts\"\nimport { isCodeComponentNode, isWebPageNode } from \"document/models/CanvasTree/nodes/utils/nodeCheck.ts\"\nimport { isFixedOrRelativeOverlay } from \"document/models/CanvasTree/nodes/utils/overlayHelpers.ts\"\nimport { getSlotNodeIdsBySlotKey } from \"document/models/CanvasTree/nodes/utils/slotUtils.ts\"\nimport { withBorder } from \"document/models/CanvasTree/traits/WithBorder.ts\"\nimport { withBoxShadow } from \"document/models/CanvasTree/traits/WithBoxShadow.ts\"\nimport { withChildren } from \"document/models/CanvasTree/traits/WithChildren.ts\"\nimport { withFill, withOptionalFill } from \"document/models/CanvasTree/traits/WithFill.ts\"\nimport { hasFloatingPosition } from \"document/models/CanvasTree/traits/WithFloatingPosition.ts\"\nimport { isOverflowVisuallyHidden } from \"document/models/CanvasTree/traits/WithOverflow.ts\"\nimport { isPinnable } from \"document/models/CanvasTree/traits/WithPins.ts\"\nimport { withPosition } from \"document/models/CanvasTree/traits/WithPosition.ts\"\nimport { withReplicaVariants } from \"document/models/CanvasTree/traits/WithReplicaVariants.ts\"\nimport { withTemplate } from \"document/models/CanvasTree/traits/WithTemplate.ts\"\nimport { isBreakpointVariant } from \"document/models/CanvasTree/traits/WithVariant.ts\"\nimport { convertCornerPointsToCanvas } from \"document/models/CanvasTree/utils/geometry.ts\"\nimport { getColorStyleTokenMap } from \"document/models/CanvasTree/utils/tokenMap.ts\"\nimport { removeTokensFromNode } from \"document/models/CanvasTree/utils/tokens.ts\"\nimport { Matrix } from \"document/models/Matrix.ts\"\nimport { localShadowFrame, withOpacity } from \"library/index.ts\"\nimport { Rect } from \"library/render/types/Rect.ts\"\nimport { getShadows } from \"utils/collectBoundingBox.ts\"\nimport { setOverlayAndDescendantVisibility } from \"utils/setOverlayAndDescendantVisibility.ts\"\n\n/**\n * Get a bounding box rect for the node that includes all points after transforms applied.\n * Either returns canvasRect from cache if available, or calculates it otherwise:\n * 1. Create points from the node rect\n * 2. Push each point through the nodes aggregate transformation matrix\n * 3. Create a bounding rect from the transformed points\n */\nfunction getNodeCanvasRect(tree: CanvasTree, node: CanvasNode, rect: Rect): Rect {\n\tif (node.cache.canvasRect) return node.cache.canvasRect\n\n\tconst transformedPoints = convertCornerPointsToCanvas(tree, node, true, rect)\n\treturn Rect.boundingRectFromPoints(transformedPoints)\n}\n\nfunction expandRectWithShadows(tree: CanvasTree, node: CanvasNode, rect: Rect): Rect {\n\tconst boundingRect = getNodeCanvasRect(tree, node, rect)\n\n\tconst shadows = getShadows(node)\n\tif (!shadows) return boundingRect\n\n\tconst matrix = tree.transformMatrixToNode(node)\n\n\t// Get a bounding box rect for the shadows that includes all points after transforms applied:\n\t// 1. Create points for each shadow rect\n\t// 2. Push each point through the nodes aggregate transformation matrix\n\t// 3. Create a bounding rect from the transformed points\n\t// Merge with the bounding rect and other shadows to get the expanded bounding rect\n\treturn shadows.reduce((merged, shadow) => {\n\t\tconst shadowRect = localShadowFrame(shadow, rect)\n\t\tif (!shadowRect) return merged\n\n\t\tconst transformedShadowPoints = Matrix.convertPointsWithClipping(matrix, Rect.cornerPoints(shadowRect))\n\t\tconst boundingShadowRect = Rect.boundingRectFromPoints(transformedShadowPoints)\n\n\t\treturn Rect.merge(merged, boundingShadowRect)\n\t}, boundingRect)\n}\n\nfunction getRecursiveExpandedRect(tree: CanvasTree, node: CanvasNode, root?: boolean): Rect {\n\tconst nodeRect = Rect.atOrigin(tree.getRect(node))\n\n\tconst expandedRect = expandRectWithShadows(tree, node, nodeRect)\n\tif (!withChildren(node) || isOverflowVisuallyHidden(node)) {\n\t\treturn expandedRect\n\t}\n\n\t// Recursively expand each child's node rect when they overflow and\n\t// merge all node's bounding rects\n\treturn node.children.reduce((merged, child) => {\n\t\tif (root && isFixedOrRelativeOverlay(child)) return merged\n\t\tif (!child.isVisible() || (withOpacity(child) && child.resolveValue(\"opacity\") === 0)) return merged\n\t\treturn Rect.merge(merged, getRecursiveExpandedRect(tree, child))\n\t}, expandedRect)\n}\n\n/** Get a bounding rectangle for a node, including shadows, including the overall rotation on the canvas. */\nexport function getExportBoundingBox(tree: CanvasTree, node: CanvasNode): Rect {\n\treturn getRecursiveExpandedRect(tree, node, true)\n}\n\nfunction gatherComponentChildren(\n\tcomponentLoader: SandboxComponentLoader,\n\toriginalTree: CanvasTree,\n\tnode: CanvasNode,\n\tchildren: Set<NodeID>,\n) {\n\tfor (const n of node.walk()) {\n\t\tif (isCodeComponentNode(n)) {\n\t\t\tconst nodeIdsForAllSlots = getSlotNodeIdsBySlotKey(originalTree, n, componentLoader)\n\n\t\t\tfor (const slotIds of Object.values(nodeIdsForAllSlots)) {\n\t\t\t\tfor (const slotId of slotIds) {\n\t\t\t\t\tif (children.has(slotId)) {\n\t\t\t\t\t\tcontinue // to break circles in child references ...\n\t\t\t\t\t}\n\t\t\t\t\tconst childNode = originalTree.get(slotId)\n\t\t\t\t\tif (childNode) {\n\t\t\t\t\t\tchildren.add(slotId)\n\t\t\t\t\t\t// recursive\n\t\t\t\t\t\tgatherComponentChildren(componentLoader, originalTree, childNode, children)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getGroundNodeForExporting(tree: CanvasTree, clonedGroundNode: CanvasNode, exportedNode: CanvasNode) {\n\tconst path = new Set(tree.getAncestors(exportedNode.id))\n\n\tconst isExportingFloatingNode = hasFloatingPosition(exportedNode)\n\n\tfor (const { node, skipChildren } of clonedGroundNode.walkWithSkipChildren()) {\n\t\tif (node.id === exportedNode.id) {\n\t\t\t// Hide the overlays of the exported node, even if they are active.\n\t\t\tif (withChildren(node)) {\n\t\t\t\tfor (const child of node.children) {\n\t\t\t\t\tif (!isFixedOrRelativeOverlay(child) || !withOpacity(child)) continue\n\t\t\t\t\tchild.set({ opacity: 0 })\n\t\t\t\t}\n\t\t\t}\n\t\t\tskipChildren()\n\t\t\tcontinue\n\t\t}\n\n\t\tif (!path.has(node.id)) {\n\t\t\tif (withOpacity(node)) node.set({ opacity: 0 })\n\t\t\tskipChildren()\n\t\t\tcontinue\n\t\t}\n\n\t\tif (withOptionalFill(node)) {\n\t\t\tnode.set({ fillEnabled: false })\n\t\t} else if (withFill(node)) {\n\t\t\tnode.set({ fillType: undefined })\n\t\t}\n\n\t\tif (withBoxShadow(node)) {\n\t\t\tnode.set({ boxShadows: undefined })\n\t\t}\n\n\t\tif (withBorder(node)) {\n\t\t\tnode.set({ borderEnabled: false })\n\t\t}\n\n\t\t// If we are exporting a floating node, ensure all ancestors are invisible.\n\t\tif (isExportingFloatingNode && withOpacity(node)) {\n\t\t\tnode.set({ opacity: 0 })\n\t\t}\n\t}\n\n\treturn clonedGroundNode\n}\n\nfunction positionForExporting(node: CanvasNode, rect: Rect) {\n\tif (withPosition(node)) {\n\t\treturn {\n\t\t\tx: rect.x,\n\t\t\ty: rect.y,\n\t\t}\n\t}\n\n\tassert(\n\t\tisPinnable(node),\n\t\t\"An exportable ground node must either support x,y position or be pinnable\",\n\t\tnode.id,\n\t\tnode.__class,\n\t)\n\n\treturn {\n\t\tleft: rect.x,\n\t\ttop: rect.y,\n\t}\n}\n\nfunction getTreeForExporting(tree: CanvasTree, originalNode: CanvasNode, rect: Rect) {\n\tconst originalGroundNode = tree.getGroundNodeFor(originalNode)\n\n\tconst groundNode = getGroundNodeForExporting(\n\t\ttree,\n\t\toriginalGroundNode.cloneWithIds(positionForExporting(originalGroundNode, rect)),\n\t\toriginalNode,\n\t)\n\tconst exportedNode = groundNode.find(n => n.id === originalNode.id)\n\tassert(exportedNode, \"The cloned ground node must contain the exported node.\")\n\n\treturn {\n\t\tgroundNode,\n\t\texportedNode,\n\t}\n}\n\n/**\n * Used to allow users to export nodes into images in the Desktop version of Framer.\n *\n * @returns A canvas node that can be rendered independently of anything else.\n */\nexport function nodeForExporting(\n\tcomponentLoader: SandboxComponentLoader,\n\toriginalTree: CanvasTree,\n\toriginalNode: CanvasNode,\n\trect: Rect,\n\tisDarkMode: boolean,\n\tactiveOverlayNodes: ReadonlySet<NodeID> | undefined,\n): CanvasNode {\n\tconst children = new Set<NodeID>()\n\tgatherComponentChildren(componentLoader, originalTree, originalNode, children)\n\n\tconst { groundNode, exportedNode } = getTreeForExporting(originalTree, originalNode, rect)\n\n\tconst tree = CanvasTree.createWithRouteSegmentRoot()\n\n\tconst scopeNode = originalTree.getScopeNodeFor(originalNode)\n\tassert(scopeNode, \"The original node must always be in a scope.\")\n\tconst newScopeNode = scopeNode.cloneWithIds({ children: new CanvasChildList() })\n\n\t// Strip replica/template info from the ground node and its descendants so that\n\t// preCommit does not trigger rebuildFromMaster. Without this, committing the\n\t// export tree would rebuild the breakpoint replica from the empty-children\n\t// invisible primary variant, wiping out all content.\n\tfor (const n of groundNode.walk()) {\n\t\tn.originalid = null\n\t\tif (withTemplate(n)) {\n\t\t\tn.replicaInfo = null\n\t\t}\n\t}\n\n\ttree.insertNode(newScopeNode)\n\ttree.insertNode(groundNode, newScopeNode.id)\n\n\t// When user exports a node that is not inside a ground node (e.g breakpoint),\n\t// the created tree that is sent to image generator sandbox\n\t// is only going to have root -> webPage -> nodeToExport (no breakpoint).\n\t// In that case, sandbox rendering asserts that scope node with\n\t// replica variants have primary variant in the tree (using `scope.getPrimaryVariant`).\n\t// This logic ensures that there is an empty and invisible primary variant\n\t// is in the tree.\n\tif (withReplicaVariants(scopeNode) && !tree.has(scopeNode.baseVariantId)) {\n\t\tconst primaryVariant = scopeNode.getPrimaryVariant()\n\t\ttree.insertNode(primaryVariant.cloneWithIds({ visible: false, children: new CanvasChildList() }), newScopeNode.id)\n\t}\n\n\t// Make sure the collection item id is preserved when exporting a web page node (CMS detail pages).\n\tif (isWebPageNode(scopeNode) && isWebPageNode(newScopeNode)) {\n\t\t// Render layout template to get correct position of the export\n\t\tnewScopeNode.layoutTemplateIdentifier = scopeNode.layoutTemplateIdentifier\n\t\tgroundNode.cache.isLayoutTemplateContentHiddenInExport = !isBreakpointVariant(exportedNode)\n\t}\n\n\t// Handle slots.\n\tchildren.forEach(childNodeId => {\n\t\t// We verify if the component child has already been appended in the tree.\n\t\t// The children Set verify code components connections to break any circle\n\t\t// references. But if the child already exists in the (new created) tree\n\t\t// and we try to re-insert without committing the CanvasTree will throw us an error.\n\t\tconst child = tree.get(childNodeId)\n\t\tif (child) return\n\n\t\tconst originalChildNode = originalTree.get(childNodeId)\n\n\t\tif (originalChildNode) {\n\t\t\tconst clonedChildNode = originalChildNode.cloneWithIds()\n\n\t\t\tfor (const n of clonedChildNode.walk()) {\n\t\t\t\tn.originalid = null\n\t\t\t\tif (withTemplate(n)) {\n\t\t\t\t\tn.replicaInfo = null\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttree.insertNode(clonedChildNode, newScopeNode.id)\n\t\t}\n\t})\n\n\t// Make sure we keep the cache for overlay visible as it was when exported\n\tif (activeOverlayNodes) {\n\t\tfor (const activeOverlayNodeId of activeOverlayNodes) {\n\t\t\tconst node = tree.get(activeOverlayNodeId)\n\t\t\tif (!isFixedOrRelativeOverlay(node)) continue\n\t\t\tsetOverlayAndDescendantVisibility(tree, node, true)\n\t\t}\n\t}\n\n\t// Replace all token references with the value\n\tconst tokens = Object.values(getColorStyleTokenMap(originalTree))\n\tconst shouldRemoveOriginalId = isVectorNode(exportedNode)\n\tfor (const node of exportedNode.walk()) {\n\t\tconst updated = removeTokensFromNode(node, tokens, isDarkMode)\n\n\t\tif (updated) {\n\t\t\tnode.set(updated)\n\t\t}\n\n\t\tif (shouldRemoveOriginalId && node.originalid) {\n\t\t\tnode.originalid = null\n\t\t}\n\t}\n\n\ttree.commit(componentLoader)\n\n\treturn groundNode.draftOrCurrent()\n}\n\nexport const testing = {\n\texpandRectWithShadows,\n\tgetRecursiveExpandedRect,\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCO,SAAS,cAAc;AAC7B,MAAI,MAAuC;AAE3C,SAAO,iBAAiB,SAAS,iBAAiB;AACjD,UAAM,QAAe;AAAA,MACpB,aAAa;AAAA,MACb,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,mBAAmB;AAAA,MACnB,YAAY;AAAA,MACZ,gBAAgB;AAAA,IACjB;AAEA,WAAO,OAAO;AAAA,MACb,aAAa,CAAC,QAAQ,MAAM;AAC3B,cAAM,eAAe;AAAA,MACtB;AAAA,MACA,cAAc,CAAC,QAAQ,MAAM;AAC5B,cAAM,gBAAgB;AAAA,MACvB;AAAA,MACA,YAAY,CAAC,QAAQ,MAAM;AAC1B,cAAM,cAAc;AAAA,MACrB;AAAA,MACA,cAAc,CAAC,QAAQ,MAAM;AAC5B,cAAM,gBAAgB;AAAA,MACvB;AAAA,MACA,mBAAmB,CAAC,QAAQ,MAAM;AACjC,cAAM,qBAAqB;AAAA,MAC5B;AAAA,MACA,YAAY,CAAC,QAAQ,MAAM;AAC1B,cAAM,cAAc;AAAA,MACrB;AAAA,MACA,gBAAgB,CAAC,QAAQ,MAAM;AAC9B,cAAM,kBAAkB;AAAA,MACzB;AAAA,IACD;AAEA,WAAO,0BAA0B,SAAS,0BAA0B;AACnE,YAAM,MAAM,OAAO,OAAO,CAAC,GAAG,KAAK;AACnC,YAAM,cAAc;AACpB,YAAM,eAAe;AACrB,YAAM,aAAa;AACnB,YAAM,eAAe;AACrB,YAAM,oBAAoB;AAC1B,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