{#each shapeSegments as segment (segment.id)} {@const box = screenBounds(camera, viewport, segment.bounds)} {@const kind = typeof segment.record.kind === 'string' ? segment.record.kind : 'shape'} {#if kind === 'ellipse'} {:else if kind === 'line' || kind === 'arrow'} {:else} {/if} {#if kind === 'text' || kind === 'markdown'} {stringProperty(segment.record, kind === 'text' ? 'text' : 'markdown') ?? 'Proposed content'} {/if} {/each} {#each bindingPreviews as preview (preview.record_id.id)} {@const box = bindingBox(camera, viewport, preview)} {#if box} {recordLabel(preview)} {/if} {/each} {#each legacyShapes as shape (shape.id)} {@const origin = Camera.worldToScreen(camera, shape.transform.translation, viewport)} {@const width = Math.abs(shape.properties.width as number)} {@const height = Math.abs(shape.properties.height as number)} {@const cos = Math.cos(shape.transform.rotation)} {@const sin = Math.sin(shape.transform.rotation)} {@const scaleX = shape.transform.scale_x * camera.zoom} {@const scaleY = shape.transform.scale_y * camera.zoom} {#if shape.kind === 'ellipse'} {:else} {/if} {/each} {#if needsRegionFallback} {#each proposal.affected_regions as region} {@const bounds = region.bounds} {@const box = screenBounds(camera, viewport, bounds)} {/each} {/if}