{ "version": 3, "sources": ["../../../../src/lib/ui/components/DebugPanel.tsx"], "sourcesContent": ["import {\n\tcreateShapeId,\n\tDebugFlag,\n\tdebugFlags,\n\tEditor,\n\tfeatureFlags,\n\thardResetEditor,\n\tTLShapePartial,\n\ttrack,\n\tuniqueId,\n\tuseEditor,\n\tuseValue,\n} from '@tldraw/editor'\nimport * as React from 'react'\nimport { useDialogs } from '../hooks/useDialogsProvider'\nimport { useToasts } from '../hooks/useToastsProvider'\nimport { useTranslation } from '../hooks/useTranslation/useTranslation'\nimport { Button } from './primitives/Button'\nimport * as Dialog from './primitives/Dialog'\nimport * as DropdownMenu from './primitives/DropdownMenu'\n\nlet t = 0\n\nfunction createNShapes(editor: Editor, n: number) {\n\tconst shapesToCreate: TLShapePartial[] = Array(n)\n\tconst cols = Math.floor(Math.sqrt(n))\n\n\tfor (let i = 0; i < n; i++) {\n\t\tt++\n\t\tshapesToCreate[i] = {\n\t\t\tid: createShapeId('box' + t),\n\t\t\ttype: 'geo',\n\t\t\tx: (i % cols) * 132,\n\t\t\ty: Math.floor(i / cols) * 132,\n\t\t}\n\t}\n\n\teditor.batch(() => {\n\t\teditor.createShapes(shapesToCreate).setSelectedShapes(shapesToCreate.map((s) => s.id))\n\t})\n}\n\n/** @internal */\nexport const DebugPanel = React.memo(function DebugPanel({\n\trenderDebugMenuItems,\n}: {\n\trenderDebugMenuItems: (() => React.ReactNode) | null\n}) {\n\tconst msg = useTranslation()\n\treturn (\n\t\t