{"version":3,"file":"index.mjs","names":["React","React","React","Root","Item","React","React","React","Root","Select.Root","Select.Item","React","Tooltip.Root","Tooltip.Trigger","Tooltip.Content","React","Select.Root","Select.Item","React","ToggleGroup.Root","Tooltip.Root","Tooltip.Trigger","ToggleGroup.Item","Tooltip.Content","Select.Root","Select.Item","React","ToggleGroup.Root","Tooltip.Root","Tooltip.Trigger","ToggleGroup.Item","Tooltip.Content","React","ToggleGroup.Root","Tooltip.Root","Tooltip.Trigger","ToggleGroup.Item","Tooltip.Content","Tooltip.Root","Tooltip.Trigger","Tooltip.Content","ToggleGroup.Root","ToggleGroup.Item","React"],"sources":["../../src/ui/icons/align-center-vertical.tsx","../../src/ui/icons/align-end-vertical.tsx","../../src/ui/icons/align-start-vertical.tsx","../../src/ui/icons/box.tsx","../../src/ui/icons/corner-bottom-left.tsx","../../src/ui/icons/corner-bottom-right.tsx","../../src/ui/icons/corner-top-left.tsx","../../src/ui/icons/corner-top-right.tsx","../../src/ui/icons/layout.tsx","../../src/ui/icons/minus.tsx","../../src/ui/icons/mouse-pointer-click.tsx","../../src/ui/icons/panel-bottom.tsx","../../src/ui/icons/panel-left.tsx","../../src/ui/icons/panel-right.tsx","../../src/ui/icons/panel-top.tsx","../../src/ui/icons/plus.tsx","../../src/ui/icons/square.tsx","../../src/ui/icons/square-dashed.tsx","../../src/ui/icons/square-round-corner.tsx","../../src/ui/icons/table.tsx","../../src/ui/icons/type.tsx","../../src/ui/icons/x.tsx","../../src/ui/inspector/config/node-meta.ts","../../src/ui/inspector/root.tsx","../../src/ui/inspector/breadcrumb.tsx","../../src/ui/inspector/hooks/use-drag-to-change.ts","../../src/ui/inspector/hooks/use-numeric-input.ts","../../src/ui/inspector/utils/is-valid-hex-color.ts","../../src/ui/inspector/primitives/color-input.tsx","../../src/ui/inspector/primitives/icon-button.tsx","../../src/ui/inspector/primitives/label.tsx","../../src/ui/inspector/primitives/select.tsx","../../src/ui/inspector/primitives/text.tsx","../../src/ui/inspector/primitives/text-field.tsx","../../src/ui/inspector/primitives/textarea.tsx","../../src/ui/inspector/primitives/toggle-group.tsx","../../src/ui/inspector/primitives/tooltip.tsx","../../src/ui/inspector/components/number-input.tsx","../../src/ui/inspector/components/prop-row.tsx","../../src/ui/inspector/components/section.tsx","../../src/ui/inspector/document.tsx","../../src/ui/inspector/hooks/use-document-colors.ts","../../src/ui/inspector/config/attribute-schema.ts","../../src/ui/inspector/sections/attributes.tsx","../../src/ui/inspector/sections/background.tsx","../../src/ui/inspector/components/border-picker.tsx","../../src/ui/inspector/components/border-radius-picker.tsx","../../src/ui/inspector/sections/border.tsx","../../src/ui/inspector/sections/column-spacing.tsx","../../src/ui/inspector/components/padding-picker.tsx","../../src/ui/inspector/sections/padding.tsx","../../src/ui/inspector/sections/size.tsx","../../src/ui/inspector/config/text-config.tsx","../../src/ui/inspector/sections/typography.tsx","../../src/ui/inspector/utils/resolve-theme-defaults.ts","../../src/ui/inspector/utils/get-node-at-pos.ts","../../src/ui/inspector/utils/style-updates.ts","../../src/ui/inspector/node.tsx","../../src/ui/inspector/sections/link.tsx","../../src/ui/inspector/hooks/use-link-mark.ts","../../src/ui/inspector/utils/text-block-utils.ts","../../src/ui/inspector/text.tsx","../../src/ui/inspector/index.tsx"],"sourcesContent":["import type { IconProps } from './types';\n\nexport function AlignCenterVerticalIcon({\n  size,\n  width,\n  height,\n  ...props\n}: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <path d=\"M12 2v20\" />\n      <path d=\"M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4\" />\n      <path d=\"M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4\" />\n      <path d=\"M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1\" />\n      <path d=\"M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function AlignEndVerticalIcon({\n  size,\n  width,\n  height,\n  ...props\n}: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <rect width=\"9\" height=\"6\" x=\"9\" y=\"14\" rx=\"2\" />\n      <rect width=\"16\" height=\"6\" x=\"2\" y=\"4\" rx=\"2\" />\n      <path d=\"M22 2v20\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function AlignStartVerticalIcon({\n  size,\n  width,\n  height,\n  ...props\n}: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <rect width=\"9\" height=\"6\" x=\"6\" y=\"14\" rx=\"2\" />\n      <rect width=\"16\" height=\"6\" x=\"6\" y=\"4\" rx=\"2\" />\n      <path d=\"M2 2v20\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function BoxIcon({ size, width, height, ...props }: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <path d=\"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z\" />\n      <path d=\"m3.3 7 8.7 5 8.7-5\" />\n      <path d=\"M12 22V12\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function CornerBottomLeftIcon({\n  size,\n  width,\n  height,\n  ...props\n}: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 15}\n      height={size ?? height ?? 15}\n      viewBox=\"0 0 15 15\"\n      fill=\"none\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <path\n        d=\"M9.87737 12H9.9H11.5C11.7761 12 12 11.7761 12 11.5C12 11.2239 11.7761 11 11.5 11H9.9C8.77164 11 7.95545 10.9996 7.31352 10.9472C6.67744 10.8952 6.25662 10.7946 5.91103 10.6185C5.25247 10.283 4.71703 9.74753 4.38148 9.08897C4.20539 8.74338 4.10481 8.32256 4.05284 7.68648C4.00039 7.04455 4 6.22836 4 5.1V3.5C4 3.22386 3.77614 3 3.5 3C3.22386 3 3 3.22386 3 3.5V5.1V5.12263C3 6.22359 3 7.08052 3.05616 7.76791C3.11318 8.46584 3.23058 9.0329 3.49047 9.54296C3.9219 10.3897 4.61031 11.0781 5.45704 11.5095C5.9671 11.7694 6.53416 11.8868 7.23209 11.9438C7.91948 12 8.77641 12 9.87737 12Z\"\n        fill=\"currentColor\"\n        fillRule=\"evenodd\"\n        clipRule=\"evenodd\"\n      />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function CornerBottomRightIcon({\n  size,\n  width,\n  height,\n  ...props\n}: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 15}\n      height={size ?? height ?? 15}\n      viewBox=\"0 0 15 15\"\n      fill=\"none\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <path\n        d=\"M5.12263 12H5.1H3.5C3.22386 12 3 11.7761 3 11.5C3 11.2239 3.22386 11 3.5 11H5.1C6.22836 11 7.04455 10.9996 7.68648 10.9472C8.32256 10.8952 8.74338 10.7946 9.08897 10.6185C9.74753 10.283 10.283 9.74753 10.6185 9.08897C10.7946 8.74338 10.8952 8.32256 10.9472 7.68648C10.9996 7.04455 11 6.22836 11 5.1V3.5C11 3.22386 11.2239 3 11.5 3C11.7761 3 12 3.22386 12 3.5V5.1V5.12263C12 6.22359 12 7.08052 11.9438 7.76791C11.8868 8.46584 11.7694 9.0329 11.5095 9.54296C11.0781 10.3897 10.3897 11.0781 9.54296 11.5095C9.0329 11.7694 8.46584 11.8868 7.76791 11.9438C7.08052 12 6.22359 12 5.12263 12Z\"\n        fill=\"currentColor\"\n        fillRule=\"evenodd\"\n        clipRule=\"evenodd\"\n      />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function CornerTopLeftIcon({\n  size,\n  width,\n  height,\n  ...props\n}: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 15}\n      height={size ?? height ?? 15}\n      viewBox=\"0 0 15 15\"\n      fill=\"none\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <path\n        d=\"M9.87737 3H9.9H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H9.9C8.77164 4 7.95545 4.00039 7.31352 4.05284C6.67744 4.10481 6.25662 4.20539 5.91103 4.38148C5.25247 4.71703 4.71703 5.25247 4.38148 5.91103C4.20539 6.25662 4.10481 6.67744 4.05284 7.31352C4.00039 7.95545 4 8.77164 4 9.9V11.5C4 11.7761 3.77614 12 3.5 12C3.22386 12 3 11.7761 3 11.5V9.9V9.87737C3 8.77641 3 7.91948 3.05616 7.23209C3.11318 6.53416 3.23058 5.9671 3.49047 5.45704C3.9219 4.61031 4.61031 3.9219 5.45704 3.49047C5.9671 3.23058 6.53416 3.11318 7.23209 3.05616C7.91948 3 8.77641 3 9.87737 3Z\"\n        fill=\"currentColor\"\n        fillRule=\"evenodd\"\n        clipRule=\"evenodd\"\n      />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function CornerTopRightIcon({\n  size,\n  width,\n  height,\n  ...props\n}: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 15}\n      height={size ?? height ?? 15}\n      viewBox=\"0 0 15 15\"\n      fill=\"none\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <path\n        d=\"M5.12263 3H5.1H3.5C3.22386 3 3 3.22386 3 3.5C3 3.77614 3.22386 4 3.5 4H5.1C6.22836 4 7.04455 4.00039 7.68648 4.05284C8.32256 4.10481 8.74338 4.20539 9.08897 4.38148C9.74753 4.71703 10.283 5.25247 10.6185 5.91103C10.7946 6.25662 10.8952 6.67744 10.9472 7.31352C10.9996 7.95545 11 8.77164 11 9.9V11.5C11 11.7761 11.2239 12 11.5 12C11.7761 12 12 11.7761 12 11.5V9.9V9.87737C12 8.77641 12 7.91948 11.9438 7.23209C11.8868 6.53416 11.7694 5.9671 11.5095 5.45704C11.0781 4.61031 10.3897 3.9219 9.54296 3.49047C9.0329 3.23058 8.46584 3.11318 7.76791 3.05616C7.08052 3 6.22359 3 5.12263 3Z\"\n        fill=\"currentColor\"\n        fillRule=\"evenodd\"\n        clipRule=\"evenodd\"\n      />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function LayoutIcon({ size, width, height, ...props }: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" ry=\"2\" />\n      <path d=\"M3 9h18\" />\n      <path d=\"M9 21V9\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function MinusIcon({ size, width, height, ...props }: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <path d=\"M5 12h14\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function MousePointerClickIcon({\n  size,\n  width,\n  height,\n  ...props\n}: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <path d=\"M14 4.1 12 6\" />\n      <path d=\"m5.1 8-2.9-.8\" />\n      <path d=\"m6 12-1.9 2\" />\n      <path d=\"M7.2 2.2 8 5.1\" />\n      <path d=\"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function PanelBottomIcon({ size, width, height, ...props }: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n      <path d=\"M3 15h18\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function PanelLeftIcon({ size, width, height, ...props }: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n      <path d=\"M9 3v18\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function PanelRightIcon({ size, width, height, ...props }: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n      <path d=\"M15 3v18\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function PanelTopIcon({ size, width, height, ...props }: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n      <path d=\"M3 9h18\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function PlusIcon({ size, width, height, ...props }: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <path d=\"M5 12h14\" />\n      <path d=\"M12 5v14\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function SquareIcon({ size, width, height, ...props }: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function SquareDashedIcon({ size, width, height, ...props }: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <path d=\"M5 3a2 2 0 0 0-2 2\" />\n      <path d=\"M19 3a2 2 0 0 1 2 2\" />\n      <path d=\"M21 19a2 2 0 0 1-2 2\" />\n      <path d=\"M5 21a2 2 0 0 1-2-2\" />\n      <path d=\"M9 3h1\" />\n      <path d=\"M9 21h1\" />\n      <path d=\"M14 3h1\" />\n      <path d=\"M14 21h1\" />\n      <path d=\"M3 9v1\" />\n      <path d=\"M21 9v1\" />\n      <path d=\"M3 14v1\" />\n      <path d=\"M21 14v1\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function SquareRoundCornerIcon({\n  size,\n  width,\n  height,\n  ...props\n}: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <path d=\"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\" />\n      <path d=\"M14 3a8 8 0 0 1 8 8\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function TableIcon({ size, width, height, ...props }: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <path d=\"M12 3v18\" />\n      <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n      <path d=\"M3 9h18\" />\n      <path d=\"M3 15h18\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function TypeIcon({ size, width, height, ...props }: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <polyline points=\"4 7 4 4 20 4 20 7\" />\n      <line x1=\"9\" x2=\"15\" y1=\"20\" y2=\"20\" />\n      <line x1=\"12\" x2=\"12\" y1=\"4\" y2=\"20\" />\n    </svg>\n  );\n}\n","import type { IconProps } from './types';\n\nexport function XIcon({ size, width, height, ...props }: IconProps) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size ?? width ?? 24}\n      height={size ?? height ?? 24}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth={2}\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      <path d=\"M18 6 6 18\" />\n      <path d=\"m6 6 12 12\" />\n    </svg>\n  );\n}\n","import type { ElementType } from 'react';\nimport {\n  BoxIcon,\n  CodeIcon,\n  Heading1Icon,\n  ImageIcon,\n  LayoutIcon,\n  LinkIcon,\n  ListIcon,\n  MinusIcon,\n  MousePointerClickIcon,\n  SquareRoundCornerIcon,\n  TableIcon,\n  TextQuoteIcon,\n  TypeIcon,\n} from '../../icons';\n\nexport interface NodeMeta {\n  icon: ElementType;\n  label: string;\n}\n\nconst NODE_META: Record<string, NodeMeta> = {\n  body: { icon: LayoutIcon, label: 'Body' },\n  paragraph: { icon: TypeIcon, label: 'Text' },\n  heading: { icon: Heading1Icon, label: 'Heading' },\n  image: { icon: ImageIcon, label: 'Image' },\n  button: { icon: MousePointerClickIcon, label: 'Button' },\n  link: { icon: LinkIcon, label: 'Link' },\n  codeBlock: { icon: CodeIcon, label: 'Code Block' },\n  section: { icon: LayoutIcon, label: 'Section' },\n  div: { icon: BoxIcon, label: 'Container' },\n  footer: { icon: BoxIcon, label: 'Footer' },\n  blockquote: { icon: TextQuoteIcon, label: 'Blockquote' },\n  bulletList: { icon: ListIcon, label: 'Bullet List' },\n  orderedList: { icon: ListIcon, label: 'Ordered List' },\n  listItem: { icon: MinusIcon, label: 'List Item' },\n  table: { icon: TableIcon, label: 'Table' },\n  tableRow: { icon: MinusIcon, label: 'Table Row' },\n  tableCell: { icon: BoxIcon, label: 'Table Cell' },\n  tableHeader: { icon: BoxIcon, label: 'Table Header' },\n  horizontalRule: { icon: MinusIcon, label: 'Divider' },\n  global: { icon: SquareRoundCornerIcon, label: 'Layout' },\n};\n\nconst DEFAULT_NODE_META: NodeMeta = { icon: BoxIcon, label: 'Element' };\n\nexport function getNodeMeta(nodeType: string): NodeMeta {\n  return NODE_META[nodeType] ?? DEFAULT_NODE_META;\n}\n","import { Slot } from '@radix-ui/react-slot';\nimport type { Attrs } from '@tiptap/pm/model';\nimport { NodeSelection, TextSelection } from '@tiptap/pm/state';\nimport { useCurrentEditor, useEditorState } from '@tiptap/react';\nimport * as React from 'react';\nimport type { NodeClickedEvent } from '../../core';\nimport {\n  EditorFocusScope,\n  EditorFocusScopeProvider,\n  FocusScopeContext,\n} from '../editor-focus-scope';\n\nconst IGNORED_NODES = ['doc', 'text'];\n\nfunction isHiddenFromHierarchy(node: {\n  type: { name: string; spec: { selectable?: boolean } };\n}) {\n  // Skip structural/auto-wrapped nodes: doc/text wrappers plus anything the\n  // schema marks as non-selectable (container, globalContent, previewText).\n  return (\n    IGNORED_NODES.includes(node.type.name) ||\n    node.type.spec.selectable === false\n  );\n}\n\nconst BODY_FOCUSED: FocusedNode = {\n  nodeType: 'body',\n  nodeAttrs: {},\n  nodePos: { pos: 0, inside: 0 },\n};\n\nexport function computePathFromRoot(\n  editor: ReturnType<typeof useCurrentEditor>['editor'],\n  target: InspectorTarget,\n): FocusedNode[] {\n  if (!editor) {\n    return [];\n  }\n  // Prepend the synthetic body root unless the hierarchy already starts\n  // with a real body node (only possible when source HTML had an explicit\n  // <body> tag).\n  const withBody = (path: FocusedNode[]) =>\n    path[0]?.nodeType === 'body' ? path : [BODY_FOCUSED, ...path];\n\n  if (typeof target === 'object') {\n    if (target.nodeType === 'body') {\n      return [BODY_FOCUSED];\n    }\n    const atPos = getHierarchyAtPosition(editor, target.nodePos.pos);\n    const path = [...atPos].reverse();\n    return withBody(path.length > 0 ? path : [target]);\n  }\n  const hierarchy = getNodeHierarchy(editor);\n  return withBody(hierarchy.reverse());\n}\n\nfunction getHierarchyAtPosition(\n  editor: ReturnType<typeof useCurrentEditor>['editor'],\n  pos: number,\n): NodeClickedEvent[] {\n  if (!editor) {\n    return [];\n  }\n\n  const { doc } = editor.state;\n  const hierarchy: NodeClickedEvent[] = [];\n\n  const nodeAtPos = doc.nodeAt(pos);\n  if (nodeAtPos && !isHiddenFromHierarchy(nodeAtPos)) {\n    hierarchy.push({\n      nodeType: nodeAtPos.type.name,\n      nodeAttrs: { ...nodeAtPos.attrs },\n      nodePos: { pos, inside: pos },\n    });\n  }\n\n  const resolvedPos = doc.resolve(pos);\n  for (let depth = resolvedPos.depth; depth > 0; depth--) {\n    const node = resolvedPos.node(depth);\n    const nodePos = resolvedPos.before(depth);\n\n    if (node && !isHiddenFromHierarchy(node)) {\n      const isDuplicate = hierarchy.some((h) => h.nodePos.pos === nodePos);\n      if (!isDuplicate) {\n        hierarchy.push({\n          nodeType: node.type.name,\n          nodeAttrs: { ...node.attrs },\n          nodePos: { pos: nodePos, inside: nodePos },\n        });\n      }\n    }\n  }\n\n  return hierarchy;\n}\n\nfunction getNodeHierarchy(\n  editor: ReturnType<typeof useCurrentEditor>['editor'],\n): NodeClickedEvent[] {\n  if (!editor) {\n    return [];\n  }\n\n  const { selection } = editor.state;\n  const hierarchy: NodeClickedEvent[] = [];\n\n  if (selection instanceof NodeSelection) {\n    const node = selection.node;\n    if (node && !isHiddenFromHierarchy(node)) {\n      hierarchy.push({\n        nodeType: node.type.name,\n        nodeAttrs: { ...node.attrs },\n        nodePos: { pos: selection.from, inside: selection.from },\n      });\n    }\n  }\n\n  const { from } = selection;\n  const resolvedPos = editor.state.doc.resolve(from);\n\n  for (let depth = resolvedPos.depth; depth > 0; depth--) {\n    const node = resolvedPos.node(depth);\n    const pos = resolvedPos.before(depth);\n\n    if (node && !isHiddenFromHierarchy(node)) {\n      const isDuplicate = hierarchy.some((h) => h.nodePos.pos === pos);\n      if (!isDuplicate) {\n        hierarchy.push({\n          nodeType: node.type.name,\n          nodeAttrs: { ...node.attrs },\n          nodePos: { pos, inside: pos },\n        });\n      }\n    }\n  }\n\n  return hierarchy;\n}\n\nexport interface FocusedNode {\n  nodeType: string;\n  nodeAttrs: Attrs;\n  nodePos: { pos: number; inside: number };\n}\n\nexport type InspectorTarget = FocusedNode | 'text';\n\nexport interface RootProps extends React.ComponentPropsWithRef<'aside'> {\n  asChild?: boolean;\n}\n\nexport interface InspectorContextValue {\n  target: InspectorTarget;\n  pathFromRoot: FocusedNode[];\n}\n\nexport const InspectorContext =\n  React.createContext<InspectorContextValue | null>(null);\n\nexport function useInspector() {\n  const context = React.useContext(InspectorContext);\n  if (!context) {\n    throw new Error(\n      'useInspector can only be called from inside the InspectorContext. This probably means you forgot the <Inspector.Provider>',\n    );\n  }\n  return context;\n}\n\nexport const InspectorRoot = React.forwardRef<HTMLElement, RootProps>(\n  function InspectorRoot({ children, asChild, ...restProps }, forwardedRef) {\n    const { editor } = useCurrentEditor();\n    const existingFocusScope = React.useContext(FocusScopeContext);\n\n    if (editor) {\n      const hasEmailTheming = editor.extensionManager.extensions.some(\n        (extension) => extension.name === 'theming',\n      );\n      if (!hasEmailTheming) {\n        throw new Error(\n          'Inspector.Provider requires the EmailTheming extension. ' +\n            'Add EmailTheming (or EmailTheming.configure({ ... })) to your editor extensions.',\n        );\n      }\n    }\n\n    const target =\n      useEditorState({\n        editor,\n        selector(context): InspectorTarget {\n          if (!context.editor) {\n            return BODY_FOCUSED;\n          }\n\n          if (!context.editor.isFocused) {\n            return BODY_FOCUSED;\n          }\n\n          const { selection } = context.editor.state;\n\n          if (\n            selection.content().size > 0 &&\n            selection instanceof TextSelection\n          ) {\n            const { $from } = selection;\n            for (let depth = $from.depth; depth > 0; depth--) {\n              if ($from.node(depth).type.name === 'button') {\n                const pos = $from.before(depth);\n                const node = context.editor.state.doc.nodeAt(pos);\n                if (node) {\n                  return {\n                    nodeType: 'button',\n                    nodeAttrs: { ...node.attrs },\n                    nodePos: { pos, inside: pos },\n                  };\n                }\n                break;\n              }\n            }\n\n            return 'text';\n          }\n\n          const hierarchy = getNodeHierarchy(context.editor);\n\n          if (hierarchy.length > 0) {\n            const innermost = hierarchy[0];\n            const columnEntry = hierarchy.find(\n              (h) => h.nodeType === 'columnsColumn',\n            );\n            const preferColumn =\n              columnEntry && innermost.nodeType === 'paragraph';\n            return preferColumn ? columnEntry : innermost;\n          }\n\n          return BODY_FOCUSED;\n        },\n      }) ?? BODY_FOCUSED;\n\n    const pathFromRoot = React.useMemo(\n      () => computePathFromRoot(editor, target),\n      [editor, target],\n    );\n\n    const contextValue: InspectorContextValue = { target, pathFromRoot };\n\n    const Component = asChild ? Slot : 'aside';\n\n    const inspectorContent = (\n      <EditorFocusScope>\n        <Component ref={forwardedRef} {...restProps} tabIndex={-1}>\n          {children}\n        </Component>\n      </EditorFocusScope>\n    );\n\n    return (\n      <InspectorContext.Provider value={contextValue}>\n        {existingFocusScope ? (\n          inspectorContent\n        ) : (\n          <EditorFocusScopeProvider>\n            {inspectorContent}\n          </EditorFocusScopeProvider>\n        )}\n      </InspectorContext.Provider>\n    );\n  },\n);\n","import { useCurrentEditor } from '@tiptap/react';\nimport React from 'react';\nimport { getNodeMeta } from './config/node-meta';\nimport { type FocusedNode, useInspector } from './root';\n\nexport interface InspectorBreadcrumbSegment {\n  node: FocusedNode;\n  focus: () => void;\n}\n\nexport interface InspectorBreadcrumbProps {\n  children?: (segments: InspectorBreadcrumbSegment[]) => React.ReactNode;\n}\n\nexport function InspectorBreadcrumb({ children }: InspectorBreadcrumbProps) {\n  const { editor } = useCurrentEditor();\n  const { pathFromRoot } = useInspector();\n\n  const segments = React.useMemo(() => {\n    if (!editor || pathFromRoot.length === 0) {\n      return [];\n    }\n    return pathFromRoot.map((focusedNode) => ({\n      node: focusedNode,\n      focus() {\n        if (focusedNode.nodeType === 'body') {\n          // Body is a logical root, not always a concrete ProseMirror node —\n          // blur to surface the document-level inspector rather than risk\n          // selecting whatever is at pos 0.\n          if (typeof document !== 'undefined') {\n            const active = document.activeElement;\n            if (active instanceof HTMLElement) {\n              active.blur();\n            }\n          }\n          editor.commands.blur();\n          return;\n        }\n        editor.commands.setNodeSelection(focusedNode.nodePos.pos);\n        editor.commands.focus();\n      },\n    })) satisfies InspectorBreadcrumbSegment[];\n  }, [editor, pathFromRoot]);\n\n  if (children) {\n    return children(segments);\n  }\n\n  return <BreadcrumbDefault segments={segments} />;\n}\n\nconst MAX_VISIBLE = 3;\n\nfunction getVisibleSegments(segments: InspectorBreadcrumbSegment[]) {\n  if (segments.length <= MAX_VISIBLE) {\n    return {\n      items: segments.map((s, i) => ({ segment: s, index: i })),\n      hasEllipsis: false,\n    };\n  }\n\n  const first = { segment: segments[0], index: 0 };\n  const last = segments.slice(-2).map((s, i) => ({\n    segment: s,\n    index: segments.length - 2 + i,\n  }));\n\n  return { items: [first, ...last], hasEllipsis: true };\n}\n\nfunction BreadcrumbDefault({\n  segments,\n}: {\n  segments: InspectorBreadcrumbSegment[];\n}) {\n  const { items, hasEllipsis } = getVisibleSegments(segments);\n\n  return (\n    <nav data-re-inspector-breadcrumb=\"\">\n      <ol data-re-inspector-breadcrumb-list=\"\">\n        {items.map(({ segment, index }, i) => {\n          const label = getNodeMeta(segment.node.nodeType).label;\n          const isLast = index === segments.length - 1;\n\n          return (\n            <li key={index} data-re-inspector-breadcrumb-item=\"\">\n              {i !== 0 && (\n                <span data-re-inspector-breadcrumb-separator=\"\">/</span>\n              )}\n              {i === 1 && hasEllipsis && (\n                <>\n                  <span data-re-inspector-breadcrumb-ellipsis=\"\">&hellip;</span>\n                  <span data-re-inspector-breadcrumb-separator=\"\">/</span>\n                </>\n              )}\n              <button\n                type=\"button\"\n                data-re-inspector-breadcrumb-button=\"\"\n                {...(!isLast ? { 'data-clickable': '' } : {})}\n                onClick={() => segment.focus()}\n              >\n                {label}\n              </button>\n            </li>\n          );\n        })}\n      </ol>\n    </nav>\n  );\n}\n","import * as React from 'react';\n\ninterface UseDragToChangeOptions {\n  value: string | number | undefined | null;\n  onCommit: (value: number | '') => void;\n  min?: number;\n  step?: number;\n}\n\nexport function useDragToChange({\n  value,\n  onCommit,\n  min,\n  step = 1,\n}: UseDragToChangeOptions) {\n  const startXRef = React.useRef(0);\n  const startValueRef = React.useRef(0);\n  const isDraggingRef = React.useRef(false);\n\n  React.useEffect(() => {\n    return () => {\n      document.body.style.removeProperty('cursor');\n      document.body.style.removeProperty('user-select');\n    };\n  }, []);\n\n  const onPointerDown = React.useCallback(\n    (e: React.PointerEvent) => {\n      e.preventDefault();\n      isDraggingRef.current = true;\n      startXRef.current = e.clientX;\n      startValueRef.current = Number(value) || 0;\n\n      document.body.style.cursor = 'ew-resize';\n      document.body.style.userSelect = 'none';\n\n      const target = e.currentTarget as HTMLElement;\n      target.setPointerCapture(e.pointerId);\n    },\n    [value],\n  );\n\n  const onPointerMove = React.useCallback(\n    (e: React.PointerEvent) => {\n      if (!isDraggingRef.current) {\n        return;\n      }\n\n      const dx = e.clientX - startXRef.current;\n      const effectiveStep = e.shiftKey ? step * 10 : step;\n      const delta = Math.round(dx / 2) * effectiveStep;\n      const next = Math.max(\n        min ?? Number.NEGATIVE_INFINITY,\n        startValueRef.current + delta,\n      );\n      onCommit(next);\n    },\n    [onCommit, min, step],\n  );\n\n  const onPointerUp = React.useCallback(() => {\n    isDraggingRef.current = false;\n    document.body.style.removeProperty('cursor');\n    document.body.style.removeProperty('user-select');\n  }, []);\n\n  return {\n    dragProps: {\n      onPointerDown,\n      onPointerMove,\n      onPointerUp,\n      onPointerCancel: onPointerUp,\n      style: { cursor: 'ew-resize' } as React.CSSProperties,\n    },\n  };\n}\n","import * as React from 'react';\n\ninterface UseNumericInputOptions {\n  value: string | number | undefined | null;\n  onCommit: (value: number | '') => void;\n  allowEmpty?: boolean;\n  min?: number;\n  fallbackValue?: number;\n}\n\ninterface UseNumericInputReturn {\n  displayValue: string;\n  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n  onBlur: () => void;\n  onFocus: (e: React.FocusEvent<HTMLInputElement>) => void;\n  onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n}\n\nfunction toDisplayString(v: string | number | undefined | null): string {\n  if (v === '' || v === undefined || v === null || Number.isNaN(v)) {\n    return '';\n  }\n  return String(v);\n}\n\nexport function useNumericInput({\n  value,\n  onCommit,\n  allowEmpty = true,\n  min,\n  fallbackValue,\n}: UseNumericInputOptions): UseNumericInputReturn {\n  const [displayValue, setDisplayValue] = React.useState(() =>\n    toDisplayString(value),\n  );\n  const isFocusedRef = React.useRef(false);\n  const cancelledRef = React.useRef(false);\n\n  React.useEffect(() => {\n    if (!isFocusedRef.current) {\n      setDisplayValue(toDisplayString(value));\n    }\n  }, [value]);\n\n  const commit = React.useCallback(\n    (raw: string) => {\n      const trimmed = raw.trim();\n\n      if (trimmed === '') {\n        if (allowEmpty) {\n          onCommit('');\n        } else {\n          setDisplayValue('0');\n          onCommit(0);\n        }\n        return;\n      }\n\n      const num = Number(trimmed);\n\n      if (Number.isNaN(num)) {\n        setDisplayValue(toDisplayString(value));\n        return;\n      }\n\n      const clamped = Math.max(num, min ?? Number.NEGATIVE_INFINITY);\n      setDisplayValue(String(clamped));\n      onCommit(clamped);\n    },\n    [value, onCommit, allowEmpty, min],\n  );\n\n  const onChange = React.useCallback(\n    (e: React.ChangeEvent<HTMLInputElement>) => {\n      setDisplayValue(e.target.value);\n    },\n    [],\n  );\n\n  const onBlur = React.useCallback(() => {\n    isFocusedRef.current = false;\n    if (cancelledRef.current) {\n      cancelledRef.current = false;\n      return;\n    }\n    commit(displayValue);\n  }, [commit, displayValue]);\n\n  const onFocus = React.useCallback((e: React.FocusEvent<HTMLInputElement>) => {\n    isFocusedRef.current = true;\n    e.target.select();\n  }, []);\n\n  const onKeyDown = React.useCallback(\n    (e: React.KeyboardEvent<HTMLInputElement>) => {\n      if (e.key === 'Enter') {\n        commit(displayValue);\n        (e.target as HTMLInputElement).blur();\n      }\n\n      if (e.key === 'Escape') {\n        cancelledRef.current = true;\n        setDisplayValue(toDisplayString(value));\n        (e.target as HTMLInputElement).blur();\n      }\n\n      if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n        e.preventDefault();\n        const step = e.shiftKey ? 10 : 1;\n        const trimmed = displayValue.trim();\n        const parsed = Number(trimmed);\n        const current =\n          trimmed === '' || Number.isNaN(parsed)\n            ? (fallbackValue ?? 0)\n            : parsed;\n        const next = Math.max(\n          min ?? Number.NEGATIVE_INFINITY,\n          e.key === 'ArrowUp' ? current + step : current - step,\n        );\n        setDisplayValue(String(next));\n        onCommit(next);\n      }\n    },\n    [commit, displayValue, value, onCommit, min, fallbackValue],\n  );\n\n  return { displayValue, onChange, onBlur, onFocus, onKeyDown };\n}\n","export function isValidHexColor(value: string): boolean {\n  return /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(value);\n}\n\nexport function normalizeHex(value: string): string {\n  if (!value) return '#000000';\n  const v = value.trim();\n  const shortHex = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(v);\n  if (shortHex) {\n    return `#${shortHex[1]}${shortHex[1]}${shortHex[2]}${shortHex[2]}${shortHex[3]}${shortHex[3]}`;\n  }\n  if (/^#[0-9a-f]{6}([0-9a-f]{2})?$/i.test(v)) return v;\n  return '#000000';\n}\n","import type * as React from 'react';\nimport { normalizeHex } from '../utils/is-valid-hex-color';\n\nexport interface ColorInputProps {\n  value: string;\n  onChange: (value: string) => void;\n  className?: string;\n}\n\nexport function ColorInput({ value, onChange, className }: ColorInputProps) {\n  return (\n    <span data-re-inspector-color-control=\"\" className={className}>\n      <input\n        type=\"color\"\n        data-re-inspector-color-trigger=\"\"\n        value={normalizeHex(value)}\n        onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n          onChange(e.target.value)\n        }\n      />\n      <input\n        type=\"text\"\n        data-re-inspector-color-hex=\"\"\n        value={value}\n        onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n          onChange(e.target.value)\n        }\n      />\n    </span>\n  );\n}\n","import type * as React from 'react';\n\nexport interface IconButtonProps extends React.ComponentProps<'button'> {}\n\nexport function IconButton({ className, children, ...rest }: IconButtonProps) {\n  return (\n    <button\n      type=\"button\"\n      data-re-inspector-icon-button=\"\"\n      className={className}\n      {...rest}\n    >\n      {children}\n    </button>\n  );\n}\n","import type * as React from 'react';\n\nexport interface LabelProps extends React.ComponentProps<'label'> {}\n\nexport function Label({ className, ...rest }: LabelProps) {\n  // biome-ignore lint/a11y/noLabelWithoutControl: consumer provides htmlFor\n  return <label data-re-inspector-label=\"\" className={className} {...rest} />;\n}\n","import type * as React from 'react';\n\nfunction SelectRoot({ children, ...rest }: React.ComponentProps<'select'>) {\n  return (\n    <select data-re-inspector-select=\"\" {...rest}>\n      {children}\n    </select>\n  );\n}\n\nfunction SelectItem(props: React.ComponentProps<'option'>) {\n  return <option {...props} />;\n}\n\nexport const Root = SelectRoot;\nexport const Item = SelectItem;\n","import type * as React from 'react';\n\nexport interface TextProps extends React.ComponentProps<'span'> {\n  size?: 'sm' | 'base';\n  color?: 'default' | 'muted';\n}\n\nexport function Text({ size, color, className, ...rest }: TextProps) {\n  return (\n    <span\n      data-re-inspector-text=\"\"\n      {...(size ? { 'data-size': size } : {})}\n      {...(color ? { 'data-color': color } : {})}\n      className={className}\n      {...rest}\n    />\n  );\n}\n","import * as React from 'react';\n\nexport interface TextFieldProps extends React.ComponentProps<'input'> {}\n\nexport const TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(\n  function TextField({ className, ...rest }, ref) {\n    return (\n      <input\n        ref={ref}\n        data-re-inspector-input=\"\"\n        className={className}\n        {...rest}\n      />\n    );\n  },\n);\n","import * as React from 'react';\n\nexport interface TextareaProps extends React.ComponentProps<'textarea'> {}\n\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n  function Textarea({ className, ...rest }, ref) {\n    return (\n      <textarea\n        ref={ref}\n        data-re-inspector-input=\"\"\n        data-type=\"textarea\"\n        className={className}\n        {...rest}\n      />\n    );\n  },\n);\n","import * as React from 'react';\n\nexport interface RootProps {\n  value: string;\n  onValueChange: (value: string) => void;\n  children: React.ReactNode;\n  className?: string;\n}\n\nexport interface ItemProps extends React.ComponentProps<'button'> {\n  value: string;\n}\n\nconst ToggleGroupContext = React.createContext<{\n  value: string;\n  onValueChange: (value: string) => void;\n} | null>(null);\n\nexport function Root({ value, onValueChange, children, className }: RootProps) {\n  return (\n    <ToggleGroupContext.Provider value={{ value, onValueChange }}>\n      {/* biome-ignore lint/a11y/useSemanticElements: div with role is intentional for styling */}\n      <div data-re-inspector-toggle-group=\"\" className={className} role=\"group\">\n        {children}\n      </div>\n    </ToggleGroupContext.Provider>\n  );\n}\n\nexport function Item({ value, children, ...rest }: ItemProps) {\n  const ctx = React.useContext(ToggleGroupContext);\n  const isActive = ctx?.value === value;\n  return (\n    <button\n      type=\"button\"\n      data-re-inspector-toggle-item=\"\"\n      {...(isActive ? { 'data-active': '' } : {})}\n      aria-pressed={isActive}\n      {...rest}\n      onClick={(e) => {\n        ctx?.onValueChange(value);\n        rest.onClick?.(e);\n      }}\n    >\n      {children}\n    </button>\n  );\n}\n","import type * as React from 'react';\n\nfunction TooltipRoot({ children, ...rest }: React.ComponentProps<'span'>) {\n  return (\n    <span data-re-inspector-tooltip=\"\" {...rest}>\n      {children}\n    </span>\n  );\n}\n\nfunction TooltipTrigger({ children, ...rest }: React.ComponentProps<'span'>) {\n  return (\n    <span data-re-inspector-tooltip-trigger=\"\" {...rest}>\n      {children}\n    </span>\n  );\n}\n\nfunction TooltipContent({ children, ...rest }: React.ComponentProps<'span'>) {\n  return (\n    <span data-re-inspector-tooltip-content=\"\" {...rest}>\n      {children}\n    </span>\n  );\n}\n\nexport const Root = TooltipRoot;\nexport const Trigger = TooltipTrigger;\nexport const Content = TooltipContent;\n","'use client';\n\nimport { useDragToChange } from '../hooks/use-drag-to-change';\nimport { useNumericInput } from '../hooks/use-numeric-input';\nimport { Select, TextField } from '../primitives';\n\ninterface NumberInputProps {\n  icon?: React.ReactNode;\n  value: string | number;\n  onChange: (value: number | '') => void;\n  placeholder?: string;\n  unit?: 'px' | '%';\n  min?: number;\n  unitOptions?: string[];\n  onUnitChange?: (unit: string) => void;\n}\n\nexport function NumberInput({\n  icon,\n  value,\n  onChange,\n  placeholder,\n  unit,\n  min,\n  unitOptions,\n  onUnitChange,\n}: NumberInputProps) {\n  const { displayValue, ...handlers } = useNumericInput({\n    value,\n    onCommit: onChange,\n    min,\n    fallbackValue: placeholder ? Number(placeholder) : undefined,\n  });\n\n  const { dragProps } = useDragToChange({\n    value,\n    onCommit: onChange,\n    min,\n  });\n\n  const hasUnitSelect = unitOptions && unitOptions.length > 1 && onUnitChange;\n\n  return (\n    <span data-re-inspector-number=\"\">\n      {icon && (\n        <span className=\"pointer-events-none\" aria-hidden>\n          {icon}\n        </span>\n      )}\n      <TextField\n        value={displayValue}\n        placeholder={placeholder}\n        type=\"text\"\n        inputMode=\"numeric\"\n        data-type=\"number\"\n        {...handlers}\n      />\n      {hasUnitSelect ? (\n        <Select.Root\n          value={unit}\n          onChange={(e) => onUnitChange(e.target.value)}\n        >\n          {unitOptions.map((opt) => (\n            <Select.Item key={opt} value={opt}>\n              {opt}\n            </Select.Item>\n          ))}\n        </Select.Root>\n      ) : (\n        unit && (\n          <span data-re-inspector-unit=\"\" {...dragProps}>\n            {unit}\n          </span>\n        )\n      )}\n    </span>\n  );\n}\n","interface PropRowProps {\n  children: React.ReactNode;\n  className?: string;\n}\n\nexport function PropRow({ children, className }: PropRowProps) {\n  return (\n    <div data-re-inspector-prop-row=\"\" className={className}>\n      {children}\n    </div>\n  );\n}\n","'use client';\n\nimport * as React from 'react';\nimport { MinusIcon, PlusIcon } from '../../icons';\nimport { IconButton, Text, Tooltip } from '../primitives';\n\ninterface SectionProps {\n  title?: string;\n  children?: React.ReactNode;\n  onAdd?: () => void;\n  onRemove?: () => void;\n}\n\nexport function Section({ title, children, onAdd, onRemove }: SectionProps) {\n  const [collapsed, setCollapsed] = React.useState(false);\n\n  return (\n    <div\n      data-re-inspector-section=\"\"\n      {...(title ? { 'data-has-title': '' } : {})}\n    >\n      {title && (\n        <div data-re-inspector-section-header=\"\">\n          <button\n            type=\"button\"\n            data-re-inspector-section-toggle=\"\"\n            onClick={() => setCollapsed((c) => !c)}\n          >\n            <Text>{title}</Text>\n          </button>\n          {collapsed && onAdd && (\n            <Tooltip.Root>\n              <Tooltip.Trigger>\n                <IconButton onClick={onAdd} aria-label={`Add ${title}`}>\n                  <PlusIcon size={16} />\n                </IconButton>\n              </Tooltip.Trigger>\n              <Tooltip.Content>{`Add ${title}`}</Tooltip.Content>\n            </Tooltip.Root>\n          )}\n          {!collapsed && onRemove && (\n            <Tooltip.Root>\n              <Tooltip.Trigger>\n                <IconButton onClick={onRemove} aria-label={`Remove ${title}`}>\n                  <MinusIcon size={16} />\n                </IconButton>\n              </Tooltip.Trigger>\n              <Tooltip.Content>{`Remove ${title}`}</Tooltip.Content>\n            </Tooltip.Root>\n          )}\n        </div>\n      )}\n      {!collapsed && children && (\n        <div data-re-inspector-section-body=\"\">{children}</div>\n      )}\n    </div>\n  );\n}\n","import { useCurrentEditor } from '@tiptap/react';\nimport {\n  setGlobalStyles,\n  useEmailTheming,\n} from '../../plugins/email-theming/extension';\nimport {\n  EDITOR_THEMES,\n  SUPPORTED_CSS_PROPERTIES,\n} from '../../plugins/email-theming/themes';\nimport type {\n  KnownCssProperties,\n  KnownThemeComponents,\n  PanelGroup,\n} from '../../plugins/email-theming/types';\nimport { NumberInput } from './components/number-input';\nimport { PropRow } from './components/prop-row';\nimport { Section } from './components/section';\nimport { ColorInput, Label } from './primitives';\nimport { useInspector } from './root';\n\nfunction ensureAllProperties(\n  currentStyles: PanelGroup[],\n  themeDefaults: PanelGroup[],\n): PanelGroup[] {\n  return currentStyles.map((group) => {\n    const defaultGroup = themeDefaults.find((g) =>\n      group.id ? g.id === group.id : g.title === group.title,\n    );\n\n    if (!defaultGroup || defaultGroup.inputs.length === 0) {\n      return group;\n    }\n\n    const existingProps = new Set(\n      group.inputs.map((i) => `${i.classReference}:${i.prop}`),\n    );\n\n    const missingInputs = defaultGroup.inputs\n      .filter(\n        (defaultInput) =>\n          !existingProps.has(\n            `${defaultInput.classReference}:${defaultInput.prop}`,\n          ),\n      )\n      .map((defaultInput) => {\n        const propDef = SUPPORTED_CSS_PROPERTIES[defaultInput.prop];\n\n        if (propDef && propDef.type === 'number') {\n          return {\n            ...defaultInput,\n            value: '' as string | number,\n            placeholder: String(propDef.defaultValue),\n          };\n        }\n\n        return { ...defaultInput };\n      });\n\n    if (missingInputs.length === 0) {\n      return group;\n    }\n\n    return {\n      ...group,\n      inputs: [...group.inputs, ...missingInputs],\n    };\n  });\n}\n\nfunction applyStyleChange(\n  styles: PanelGroup[],\n  themeName: 'basic' | 'minimal',\n  {\n    classReference,\n    prop,\n    newValue,\n  }: {\n    classReference?: string;\n    prop: string;\n    newValue: string | number;\n  },\n): PanelGroup[] {\n  let found = false;\n\n  const updatedStyles = styles.map((styleGroup) => {\n    const matchingInput = styleGroup.inputs.find(\n      (input) => input.classReference === classReference && input.prop === prop,\n    );\n\n    if (matchingInput) {\n      found = true;\n      return {\n        ...styleGroup,\n        inputs: styleGroup.inputs.map((input) => {\n          if (input.classReference === classReference && input.prop === prop) {\n            return { ...input, value: newValue };\n          }\n          return input;\n        }),\n      };\n    }\n\n    return styleGroup;\n  });\n\n  if (found) {\n    return updatedStyles;\n  }\n\n  const propDef = SUPPORTED_CSS_PROPERTIES[prop as KnownCssProperties] ?? null;\n\n  return updatedStyles.map((styleGroup) => {\n    if (styleGroup.classReference !== classReference) {\n      return styleGroup;\n    }\n\n    const themeDefaults = EDITOR_THEMES[themeName];\n    const defaultGroup = themeDefaults.find((g) =>\n      styleGroup.id ? g.id === styleGroup.id : g.title === styleGroup.title,\n    );\n    const defaultInput = defaultGroup?.inputs.find(\n      (i) => i.prop === prop && i.classReference === classReference,\n    );\n\n    if (defaultInput) {\n      return {\n        ...styleGroup,\n        inputs: [...styleGroup.inputs, { ...defaultInput, value: newValue }],\n      };\n    }\n\n    if (propDef) {\n      return {\n        ...styleGroup,\n        inputs: [\n          ...styleGroup.inputs,\n          {\n            label: propDef.label,\n            type: propDef.type,\n            value: newValue,\n            prop: prop as KnownCssProperties,\n            classReference: classReference as KnownThemeComponents | undefined,\n            unit: propDef.unit,\n            options: propDef.options,\n          },\n        ],\n      };\n    }\n\n    return styleGroup;\n  });\n}\n\nexport type SetGlobalStyle = (\n  classReference: KnownThemeComponents,\n  property: KnownCssProperties,\n  value: unknown,\n) => void;\n\nexport type BatchSetGlobalStyle = (\n  changes: Array<{\n    classReference: KnownThemeComponents;\n    property: KnownCssProperties;\n    value: unknown;\n  }>,\n) => void;\n\nexport type FindStyleValue = (\n  classReference: KnownThemeComponents,\n  prop: KnownCssProperties,\n) => string | number;\n\nexport interface InspectorDocumentContext {\n  styles: PanelGroup[];\n  setGlobalStyle: SetGlobalStyle;\n  batchSetGlobalStyle: BatchSetGlobalStyle;\n  findStyleValue: FindStyleValue;\n}\n\nexport interface InspectorDocumentProps {\n  children?: (context: InspectorDocumentContext) => React.ReactNode;\n}\n\nexport function InspectorDocument({ children }: InspectorDocumentProps) {\n  const { editor } = useCurrentEditor();\n  const theming = useEmailTheming(editor);\n  const { target } = useInspector();\n\n  if (!editor || !theming) {\n    return null;\n  }\n\n  const themeDefaults = EDITOR_THEMES[theming.theme];\n\n  const groups = ensureAllProperties(theming.styles, themeDefaults);\n\n  function setGlobalStyle(\n    classReference: KnownThemeComponents,\n    property: KnownCssProperties,\n    value: unknown,\n  ) {\n    const newStyles = applyStyleChange(theming!.styles, theming!.theme, {\n      classReference,\n      prop: property,\n      newValue: value as string | number,\n    });\n    setGlobalStyles(editor!, newStyles);\n  }\n\n  function batchSetGlobalStyle(\n    changes: Array<{\n      classReference: KnownThemeComponents;\n      property: KnownCssProperties;\n      value: unknown;\n    }>,\n  ) {\n    let styles = theming!.styles;\n    for (const change of changes) {\n      styles = applyStyleChange(styles, theming!.theme, {\n        classReference: change.classReference,\n        prop: change.property,\n        newValue: change.value as string | number,\n      });\n    }\n    setGlobalStyles(editor!, styles);\n  }\n\n  function findStyleValue(\n    classReference: KnownThemeComponents,\n    prop: KnownCssProperties,\n  ): string | number {\n    for (const group of groups) {\n      const input = group.inputs.find(\n        (i) => i.classReference === classReference && i.prop === prop,\n      );\n      if (input && input.value !== undefined) return input.value;\n    }\n\n    for (const group of themeDefaults) {\n      const input = group.inputs.find(\n        (i) => i.classReference === classReference && i.prop === prop,\n      );\n      if (input && input.value !== undefined) return input.value;\n    }\n\n    const propDef = SUPPORTED_CSS_PROPERTIES[prop];\n    return propDef?.defaultValue ?? '';\n  }\n\n  if (typeof target !== 'object' || target.nodeType !== 'body') {\n    return null;\n  }\n\n  const context: InspectorDocumentContext = {\n    styles: groups,\n    setGlobalStyle,\n    batchSetGlobalStyle,\n    findStyleValue,\n  };\n\n  if (children) {\n    return <>{children(context)}</>;\n  }\n\n  return <InspectorDocumentDefaults context={context} />;\n}\n\nfunction InspectorDocumentDefaults({\n  context,\n}: {\n  context: InspectorDocumentContext;\n}) {\n  const { findStyleValue, setGlobalStyle } = context;\n\n  return (\n    <>\n      <Section title=\"Background\">\n        <PropRow>\n          <Label>Color</Label>\n          <ColorInput\n            value={String(findStyleValue('body', 'backgroundColor') ?? '')}\n            onChange={(v) => setGlobalStyle('body', 'backgroundColor', v)}\n          />\n        </PropRow>\n        <PropRow>\n          <Label>Padding</Label>\n          <NumberInput\n            value={findStyleValue('body', 'padding') ?? ''}\n            onChange={(v) => setGlobalStyle('body', 'padding', v)}\n            unit=\"px\"\n          />\n        </PropRow>\n      </Section>\n\n      <Section title=\"Container\">\n        <PropRow>\n          <Label>Color</Label>\n          <ColorInput\n            value={String(findStyleValue('container', 'backgroundColor') ?? '')}\n            onChange={(v) => setGlobalStyle('container', 'backgroundColor', v)}\n          />\n        </PropRow>\n        <PropRow>\n          <Label>Width</Label>\n          <NumberInput\n            value={findStyleValue('container', 'width') ?? ''}\n            onChange={(v) => setGlobalStyle('container', 'width', v)}\n            unit=\"px\"\n          />\n        </PropRow>\n        <PropRow>\n          <Label>Padding</Label>\n          <NumberInput\n            value={findStyleValue('container', 'padding') ?? ''}\n            onChange={(v) => setGlobalStyle('container', 'padding', v)}\n            unit=\"px\"\n          />\n        </PropRow>\n        <PropRow>\n          <Label>Rounded</Label>\n          <NumberInput\n            value={findStyleValue('container', 'borderRadius') ?? ''}\n            onChange={(v) => setGlobalStyle('container', 'borderRadius', v)}\n            unit=\"px\"\n          />\n        </PropRow>\n      </Section>\n    </>\n  );\n}\n","import type { useCurrentEditor } from '@tiptap/react';\nimport { useEditorState } from '@tiptap/react';\nimport * as React from 'react';\nimport {\n  stylesToCss,\n  useEmailTheming,\n} from '../../../plugins/email-theming/extension';\nimport { isValidHexColor } from '../utils/is-valid-hex-color';\n\ntype Editor = ReturnType<typeof useCurrentEditor>['editor'];\n\nconst COLOR_CSS_PROPERTIES = [\n  'color',\n  'backgroundColor',\n  'borderColor',\n  'borderTopColor',\n  'borderRightColor',\n  'borderBottomColor',\n  'borderLeftColor',\n] as const;\n\nexport function useDocumentColors(editor: Editor): string[] {\n  const theming = useEmailTheming(editor)!;\n\n  const globalColors = React.useMemo(() => {\n    const colors = new Set<string>();\n    const cssJs = stylesToCss(theming.styles, theming.theme);\n\n    for (const componentStyles of Object.values(cssJs)) {\n      if (!componentStyles || typeof componentStyles !== 'object') {\n        continue;\n      }\n      for (const prop of COLOR_CSS_PROPERTIES) {\n        const value = (componentStyles as Record<string, unknown>)[prop];\n        if (typeof value === 'string') {\n          addColor(colors, value);\n        }\n      }\n    }\n\n    return Array.from(colors);\n  }, [theming]);\n\n  const inlineColors =\n    useEditorState({\n      editor,\n      selector: ({ editor: ed }: { editor: Editor }): string[] => {\n        if (!ed) {\n          return [];\n        }\n\n        const colors = new Set<string>();\n\n        ed.state.doc.descendants((node) => {\n          for (const mark of node.marks) {\n            if (mark.type.name === 'textStyle' && mark.attrs.color) {\n              addColor(colors, mark.attrs.color);\n            }\n          }\n\n          const style = node.attrs.style as string | undefined;\n          if (style) {\n            extractColorsFromInlineStyle(colors, style);\n          }\n        });\n\n        return Array.from(colors);\n      },\n      equalityFn: (a: string[] | null, b: string[] | null) => {\n        if (a === b) {\n          return true;\n        }\n        if (!a || !b) {\n          return false;\n        }\n        return arrayShallowEqual(a, b);\n      },\n    }) ?? [];\n\n  return React.useMemo(() => {\n    if (globalColors.length === 0) {\n      return inlineColors;\n    }\n    if (inlineColors.length === 0) {\n      return globalColors;\n    }\n    const merged = new Set([...globalColors, ...inlineColors]);\n    return Array.from(merged);\n  }, [globalColors, inlineColors]);\n}\n\nconst COLOR_STYLE_PROPS = [\n  'color',\n  'background-color',\n  'border-color',\n  'border-top-color',\n  'border-right-color',\n  'border-bottom-color',\n  'border-left-color',\n];\n\nfunction extractColorsFromInlineStyle(\n  colors: Set<string>,\n  style: string,\n): void {\n  for (const prop of COLOR_STYLE_PROPS) {\n    const regex = new RegExp(`${prop}\\\\s*:\\\\s*([^;]+)`, 'i');\n    const match = style.match(regex);\n    if (match) {\n      addColor(colors, match[1].trim());\n    }\n  }\n}\n\nfunction addColor(colors: Set<string>, raw: string): void {\n  const value = raw.trim().toLowerCase();\n  if (!value || value === '#000000' || value === '#ffffff') {\n    return;\n  }\n  if (isValidHexColor(value)) {\n    const normalized = expandToSix(value);\n    colors.add(normalized);\n  }\n}\n\nfunction expandToSix(hex: string): string {\n  const h = hex.slice(1);\n  if (h.length === 3) {\n    return `#${h[0]}${h[0]}${h[1]}${h[1]}${h[2]}${h[2]}`;\n  }\n  if (h.length === 4) {\n    return `#${h[0]}${h[0]}${h[1]}${h[1]}${h[2]}${h[2]}`;\n  }\n  if (h.length === 8) {\n    return `#${h.slice(0, 6)}`;\n  }\n  return hex;\n}\n\nfunction arrayShallowEqual(a: string[], b: string[]): boolean {\n  if (a.length !== b.length) {\n    return false;\n  }\n  for (let i = 0; i < a.length; i++) {\n    if (a[i] !== b[i]) {\n      return false;\n    }\n  }\n  return true;\n}\n","import { loadPrismTheme } from '../../../utils/prism-utils';\n\ninterface LocalPropConfig {\n  label: string;\n  type: 'text' | 'number' | 'select' | 'textarea';\n  defaultValue: string | number;\n  unit?: 'px' | '%';\n  placeholder?: string;\n  options?: Record<string, string | boolean>;\n  customUpdate?: (context: { newValue: string }) => void;\n}\n\nexport const LOCAL_PROPS_SCHEMA: Record<string, LocalPropConfig> = {\n  class: {\n    label: 'Class',\n    type: 'text',\n    defaultValue: '',\n  },\n  width: {\n    label: 'Width',\n    type: 'number',\n    unit: 'px',\n    placeholder: 'auto',\n    defaultValue: 100,\n  },\n  height: {\n    label: 'Height',\n    type: 'number',\n    unit: 'px',\n    placeholder: 'auto',\n    defaultValue: 100,\n  },\n  alt: {\n    label: 'Alt',\n    type: 'textarea',\n    defaultValue: '',\n  },\n  align: {\n    label: 'Align',\n    type: 'select',\n    defaultValue: 'left',\n    options: {\n      left: 'Left',\n      center: 'Center',\n      right: 'Right',\n    },\n  },\n  alignment: {\n    label: 'Alignment',\n    type: 'select',\n    defaultValue: 'left',\n    options: {\n      left: 'Left',\n      center: 'Center',\n      right: 'Right',\n    },\n  },\n  level: {\n    label: 'Level',\n    type: 'number',\n    defaultValue: 1,\n  },\n  src: {\n    label: 'Source',\n    type: 'text',\n    defaultValue: '',\n    options: {\n      enableVariables: true,\n    },\n  },\n  href: {\n    label: 'Link',\n    type: 'text',\n    defaultValue: '',\n  },\n  title: {\n    label: 'Title',\n    type: 'text',\n    defaultValue: '',\n  },\n  language: {\n    label: 'Language',\n    type: 'select',\n    defaultValue: 'javascript',\n    options: {\n      css: 'CSS',\n      go: 'Go',\n      html: 'HTML',\n      javascript: 'JavaScript',\n      jsx: 'JSX',\n      json: 'JSON',\n      markdown: 'Markdown',\n      php: 'PHP',\n      plaintext: 'Plain text',\n      python: 'Python',\n      ruby: 'Ruby',\n      shell: 'Shell',\n      sql: 'SQL',\n      svg: 'svg',\n      typescript: 'TypeScript',\n    },\n  },\n  theme: {\n    label: 'Theme',\n    type: 'select',\n    defaultValue: 'default',\n    options: {\n      default: 'Default',\n      atomDark: 'Atom Dark',\n      oneLight: 'One Light',\n      dracula: 'Dracula',\n      nord: 'Nord',\n      duotoneDark: 'Duotone Dark',\n      duotoneForest: 'Duotone Forest',\n      duotoneLight: 'Duotone Light',\n      duotoneSea: 'Duotone Sea',\n      duotoneSpace: 'Duotone Space',\n      vesper: 'Vesper',\n      vs: 'VSCode Light',\n      vscDarkPlus: 'VSCode Dark',\n    },\n    customUpdate: ({ newValue }: { newValue: string }) => {\n      loadPrismTheme(newValue);\n    },\n  },\n};\n\nexport const EXCLUDED_ATTRIBUTES = [\n  'style',\n  'class',\n  'width',\n  'height',\n  'align',\n  'alignment',\n  'href',\n  'id',\n  'title',\n  'lang',\n  'dir',\n  'data-id',\n];\n\nexport const LIVEBLOCKS_INTERNAL_PROPS = ['ychange'];\n","'use client';\n\nimport { NumberInput } from '../components/number-input';\nimport { PropRow } from '../components/prop-row';\nimport { Section } from '../components/section';\nimport {\n  EXCLUDED_ATTRIBUTES,\n  LIVEBLOCKS_INTERNAL_PROPS,\n  LOCAL_PROPS_SCHEMA,\n} from '../config/attribute-schema';\nimport type { InspectorNodeContext } from '../node';\nimport { Label, Select, Textarea, TextField } from '../primitives';\n\ntype InspectorAttributesProps = InspectorNodeContext;\n\nexport function AttributesSection({\n  nodeType,\n  getAttr,\n  setAttr,\n}: InspectorAttributesProps) {\n  const nodeAttrs = getVisibleAttributes(nodeType, getAttr);\n\n  if (nodeAttrs.length === 0) {\n    return null;\n  }\n\n  return (\n    <Section title=\"Attributes\">\n      {nodeAttrs.map(({ name, config, value }) => (\n        <PropRow key={name}>\n          <Label>{config.label}</Label>\n          {config.type === 'select' && config.options ? (\n            <Select.Root\n              value={String(value ?? config.defaultValue)}\n              onChange={(e) => {\n                const newValue = e.target.value;\n                setAttr(name, newValue);\n                config.customUpdate?.({ newValue });\n              }}\n            >\n              {Object.entries(config.options)\n                .filter(([, v]) => typeof v === 'string')\n                .map(([val, label]) => (\n                  <Select.Item key={val} value={val}>\n                    {label as string}\n                  </Select.Item>\n                ))}\n            </Select.Root>\n          ) : config.type === 'number' ? (\n            <NumberInput\n              value={(value ?? config.defaultValue) as string | number}\n              onChange={(v) => setAttr(name, v)}\n              unit={config.unit}\n              min={0}\n            />\n          ) : config.type === 'textarea' ? (\n            <Textarea\n              value={String(value ?? config.defaultValue)}\n              onChange={(e) => setAttr(name, e.target.value)}\n            />\n          ) : (\n            <TextField\n              type=\"text\"\n              value={String(value ?? config.defaultValue)}\n              onChange={(e) => setAttr(name, e.target.value)}\n            />\n          )}\n        </PropRow>\n      ))}\n    </Section>\n  );\n}\n\nfunction getVisibleAttributes(\n  _nodeType: string,\n  getAttr: (name: string) => unknown,\n) {\n  const results: Array<{\n    name: string;\n    config: (typeof LOCAL_PROPS_SCHEMA)[string];\n    value: unknown;\n  }> = [];\n\n  for (const [name, config] of Object.entries(LOCAL_PROPS_SCHEMA)) {\n    if (EXCLUDED_ATTRIBUTES.includes(name)) continue;\n    if (LIVEBLOCKS_INTERNAL_PROPS.includes(name)) continue;\n\n    const value = getAttr(name);\n    if (value !== undefined && value !== null) {\n      results.push({ name, config, value });\n    }\n  }\n\n  return results;\n}\n","'use client';\n\nimport { PropRow } from '../components/prop-row';\nimport { Section } from '../components/section';\nimport type { InspectorNodeContext } from '../node';\nimport { ColorInput, Label } from '../primitives';\n\ntype InspectorBackgroundProps = InspectorNodeContext;\n\nexport function BackgroundSection({\n  getStyle,\n  setStyle,\n}: InspectorBackgroundProps) {\n  const value = String(getStyle('backgroundColor') ?? '');\n\n  return (\n    <Section title=\"Background\">\n      <PropRow>\n        <Label>Color</Label>\n        <ColorInput\n          value={value}\n          onChange={(v) => setStyle('backgroundColor', v)}\n        />\n      </PropRow>\n    </Section>\n  );\n}\n","'use client';\n\nimport * as React from 'react';\nimport { SUPPORTED_CSS_PROPERTIES } from '../../../plugins/email-theming/themes';\nimport {\n  PanelBottomIcon,\n  PanelLeftIcon,\n  PanelRightIcon,\n  PanelTopIcon,\n  SquareDashedIcon,\n  SquareIcon,\n  XIcon,\n} from '../../icons';\nimport { useDragToChange } from '../hooks/use-drag-to-change';\nimport { useNumericInput } from '../hooks/use-numeric-input';\nimport {\n  ColorInput,\n  IconButton,\n  Label,\n  Select,\n  TextField,\n  ToggleGroup,\n  Tooltip,\n} from '../primitives';\nimport { PropRow } from './prop-row';\n\nexport type BatchableChangeFn = (\n  propOrChanges: string | [string, string | number][],\n  value?: string | number,\n) => void;\n\ntype Side = 'Top' | 'Right' | 'Bottom' | 'Left';\n\nconst SIDES: { side: Side; icon: React.ReactNode }[] = [\n  { side: 'Top', icon: <PanelTopIcon size={14} /> },\n  { side: 'Right', icon: <PanelRightIcon size={14} /> },\n  { side: 'Bottom', icon: <PanelBottomIcon size={14} /> },\n  { side: 'Left', icon: <PanelLeftIcon size={14} /> },\n];\n\ninterface BorderPickerProps {\n  styleObject: Record<string, string | number | undefined>;\n  onChange: BatchableChangeFn;\n}\n\nfunction getSideValue(\n  styleObject: Record<string, string | number | undefined>,\n  side: Side,\n  prop: 'Width' | 'Color' | 'Style',\n): string | number | undefined {\n  const sideKey = `border${side}${prop}`;\n  const shorthandKey = `border${prop}`;\n  return styleObject[sideKey] ?? styleObject[shorthandKey];\n}\n\nfunction allSidesEqual(\n  styleObject: Record<string, string | number | undefined>,\n): boolean {\n  const topWidth = getSideValue(styleObject, 'Top', 'Width');\n  const topColor = getSideValue(styleObject, 'Top', 'Color');\n  const topStyle = getSideValue(styleObject, 'Top', 'Style');\n\n  return SIDES.every(({ side }) => {\n    return (\n      getSideValue(styleObject, side, 'Width') === topWidth &&\n      getSideValue(styleObject, side, 'Color') === topColor &&\n      getSideValue(styleObject, side, 'Style') === topStyle\n    );\n  });\n}\n\nconst BORDER_STYLE_OPTIONS = SUPPORTED_CSS_PROPERTIES.borderStyle\n  .options as Record<string, string>;\n\nexport function BorderPicker({ styleObject, onChange }: BorderPickerProps) {\n  const [expanded, setExpanded] = React.useState(\n    () => !allSidesEqual(styleObject),\n  );\n\n  const handleModeChange = (mode: string) => {\n    if (mode === 'uniform' && expanded) {\n      const width =\n        getSideValue(styleObject, 'Top', 'Width') ??\n        String(SUPPORTED_CSS_PROPERTIES.borderWidth.defaultValue);\n      const color =\n        getSideValue(styleObject, 'Top', 'Color') ??\n        String(SUPPORTED_CSS_PROPERTIES.borderColor.defaultValue);\n      const style =\n        getSideValue(styleObject, 'Top', 'Style') ??\n        String(SUPPORTED_CSS_PROPERTIES.borderStyle.defaultValue);\n\n      const changes: [string, string | number][] = [\n        ['borderWidth', width],\n        ['borderColor', color],\n        ['borderStyle', style],\n      ];\n      for (const { side } of SIDES) {\n        changes.push(\n          [`border${side}Width`, ''],\n          [`border${side}Color`, ''],\n          [`border${side}Style`, ''],\n        );\n      }\n\n      onChange(changes);\n      setExpanded(false);\n    } else if (mode === 'individual' && !expanded) {\n      const width =\n        styleObject.borderWidth ??\n        String(SUPPORTED_CSS_PROPERTIES.borderWidth.defaultValue);\n      const color =\n        styleObject.borderColor ??\n        String(SUPPORTED_CSS_PROPERTIES.borderColor.defaultValue);\n      const style =\n        styleObject.borderStyle ??\n        String(SUPPORTED_CSS_PROPERTIES.borderStyle.defaultValue);\n\n      const changes: [string, string | number][] = [];\n      for (const { side } of SIDES) {\n        changes.push(\n          [`border${side}Width`, styleObject[`border${side}Width`] ?? width],\n          [`border${side}Color`, styleObject[`border${side}Color`] ?? color],\n          [`border${side}Style`, styleObject[`border${side}Style`] ?? style],\n        );\n      }\n      changes.push(\n        ['borderWidth', ''],\n        ['borderColor', ''],\n        ['borderStyle', ''],\n      );\n\n      onChange(changes);\n      setExpanded(true);\n    }\n  };\n\n  const modeToggle = (\n    <ToggleGroup.Root\n      value={expanded ? 'individual' : 'uniform'}\n      onValueChange={handleModeChange}\n    >\n      <Tooltip.Root>\n        <Tooltip.Trigger>\n          <ToggleGroup.Item value=\"uniform\">\n            <SquareIcon size={16} />\n          </ToggleGroup.Item>\n        </Tooltip.Trigger>\n        <Tooltip.Content>Uniform</Tooltip.Content>\n      </Tooltip.Root>\n      <Tooltip.Root>\n        <Tooltip.Trigger>\n          <ToggleGroup.Item value=\"individual\">\n            <SquareDashedIcon size={16} />\n          </ToggleGroup.Item>\n        </Tooltip.Trigger>\n        <Tooltip.Content>Per side</Tooltip.Content>\n      </Tooltip.Root>\n    </ToggleGroup.Root>\n  );\n\n  if (expanded) {\n    return (\n      <div className=\"flex flex-col gap-2\">\n        <PropRow>\n          <Label>Border</Label>\n          {modeToggle}\n        </PropRow>\n\n        <div className=\"flex flex-col gap-1.5\">\n          {SIDES.map(({ side, icon }) => (\n            <div key={side} className=\"flex flex-col items-center gap-1\">\n              <div className=\"flex gap-1 w-full\">\n                <BorderWidthInput\n                  icon={icon}\n                  value={getSideValue(styleObject, side, 'Width')}\n                  onChange={(v) => onChange(`border${side}Width`, v)}\n                  className=\"w-full\"\n                />\n\n                <ColorInput\n                  value={String(\n                    getSideValue(styleObject, side, 'Color') ??\n                      SUPPORTED_CSS_PROPERTIES.borderColor.defaultValue,\n                  )}\n                  onChange={(v) => onChange(`border${side}Color`, v)}\n                  className=\"w-full\"\n                />\n              </div>\n\n              <div className=\"flex gap-1 w-full\">\n                <Select.Root\n                  className=\"w-full\"\n                  value={String(\n                    getSideValue(styleObject, side, 'Style') ??\n                      SUPPORTED_CSS_PROPERTIES.borderStyle.defaultValue,\n                  )}\n                  onChange={(e) =>\n                    onChange(`border${side}Style`, e.target.value)\n                  }\n                >\n                  {Object.entries(BORDER_STYLE_OPTIONS).map(([val, label]) => (\n                    <Select.Item key={val} value={val}>\n                      {label}\n                    </Select.Item>\n                  ))}\n                </Select.Root>\n\n                <IconButton\n                  onClick={() => {\n                    onChange([\n                      [`border${side}Width`, ''],\n                      [`border${side}Style`, ''],\n                      [`border${side}Color`, ''],\n                    ]);\n                  }}\n                  aria-label={`Clear ${side.toLowerCase()} border`}\n                >\n                  <XIcon size={14} />\n                </IconButton>\n              </div>\n            </div>\n          ))}\n        </div>\n      </div>\n    );\n  }\n\n  const uniformColor = String(\n    styleObject.borderColor ??\n      SUPPORTED_CSS_PROPERTIES.borderColor.defaultValue,\n  );\n\n  return (\n    <div className=\"flex flex-col gap-3 w-full\">\n      <PropRow>\n        <Label>Border</Label>\n        <div className=\"flex items-center gap-1\">\n          <BorderWidthInput\n            value={styleObject.borderWidth ?? ''}\n            onChange={(v) => onChange('borderWidth', v)}\n          />\n          {modeToggle}\n        </div>\n      </PropRow>\n\n      <PropRow>\n        <Label>Border color</Label>\n        <ColorInput\n          value={uniformColor}\n          onChange={(v) => onChange('borderColor', v)}\n        />\n      </PropRow>\n    </div>\n  );\n}\n\nfunction BorderWidthInput({\n  icon,\n  value,\n  onChange,\n  className,\n}: {\n  icon?: React.ReactNode;\n  value: string | number | undefined;\n  onChange: (value: number | '') => void;\n  className?: string;\n}) {\n  const { displayValue, ...handlers } = useNumericInput({\n    value,\n    onCommit: onChange,\n    allowEmpty: true,\n    min: 0,\n  });\n\n  const { dragProps } = useDragToChange({\n    value,\n    onCommit: onChange,\n    min: 0,\n  });\n\n  return (\n    <span data-re-inspector-number=\"\" className={className}>\n      {icon && (\n        <span className=\"pointer-events-none\" aria-hidden>\n          {icon}\n        </span>\n      )}\n      <TextField\n        type=\"text\"\n        inputMode=\"numeric\"\n        data-type=\"number\"\n        value={displayValue}\n        placeholder={String(SUPPORTED_CSS_PROPERTIES.borderWidth.defaultValue)}\n        {...handlers}\n      />\n      <span data-re-inspector-unit=\"\" {...dragProps}>\n        px\n      </span>\n    </span>\n  );\n}\n","'use client';\n\nimport * as React from 'react';\nimport {\n  CornerBottomLeftIcon,\n  CornerBottomRightIcon,\n  CornerTopLeftIcon,\n  CornerTopRightIcon,\n  SquareDashedIcon,\n  SquareIcon,\n} from '../../icons';\nimport { useDragToChange } from '../hooks/use-drag-to-change';\nimport { useNumericInput } from '../hooks/use-numeric-input';\nimport { Label, TextField, ToggleGroup, Tooltip } from '../primitives';\nimport { PropRow } from './prop-row';\n\ninterface BorderRadiusPickerProps {\n  value: string | number;\n  onChange: (values: string) => void;\n  unit?: 'px' | '%';\n}\n\nexport function BorderRadiusPicker({\n  value,\n  onChange,\n  unit = 'px',\n}: BorderRadiusPickerProps) {\n  const expandedValues = expandShorthand(value);\n  const allEqual = Object.values(expandedValues).every(\n    (v) => v === expandedValues.borderTopLeftRadius,\n  );\n\n  const [expanded, setExpanded] = React.useState(!allEqual);\n\n  const handleModeChange = (mode: string) => {\n    if (mode === 'uniform' && expanded) {\n      const uniform =\n        expandedValues.borderTopLeftRadius ??\n        expandedValues.borderTopRightRadius ??\n        expandedValues.borderBottomRightRadius ??\n        expandedValues.borderBottomLeftRadius ??\n        0;\n      onChange(`${uniform}${unit}`);\n      setExpanded(false);\n    } else if (mode === 'individual' && !expanded) {\n      setExpanded(true);\n    }\n  };\n\n  const modeToggle = (\n    <ToggleGroup.Root\n      value={expanded ? 'individual' : 'uniform'}\n      onValueChange={handleModeChange}\n    >\n      <Tooltip.Root>\n        <Tooltip.Trigger>\n          <ToggleGroup.Item value=\"uniform\">\n            <SquareIcon size={16} />\n          </ToggleGroup.Item>\n        </Tooltip.Trigger>\n        <Tooltip.Content>Uniform</Tooltip.Content>\n      </Tooltip.Root>\n      <Tooltip.Root>\n        <Tooltip.Trigger>\n          <ToggleGroup.Item value=\"individual\">\n            <SquareDashedIcon size={16} />\n          </ToggleGroup.Item>\n        </Tooltip.Trigger>\n        <Tooltip.Content>Per corner</Tooltip.Content>\n      </Tooltip.Root>\n    </ToggleGroup.Root>\n  );\n\n  if (expanded) {\n    return (\n      <div className=\"flex flex-col gap-2\">\n        <PropRow>\n          <Label>Rounded</Label>\n          {modeToggle}\n        </PropRow>\n\n        <div className=\"flex flex-col items-center gap-1.5\">\n          <div className=\"flex items-center gap-1.5\">\n            <RadiusInput\n              icon={<CornerTopLeftIcon size={14} />}\n              value={expandedValues.borderTopLeftRadius}\n              onChange={(v) =>\n                onChange(\n                  collapseToShorthand({\n                    ...expandedValues,\n                    borderTopLeftRadius: v,\n                    unit,\n                  }),\n                )\n              }\n              unit={unit}\n            />\n            <RadiusInput\n              icon={<CornerTopRightIcon size={14} />}\n              value={expandedValues.borderTopRightRadius}\n              onChange={(v) =>\n                onChange(\n                  collapseToShorthand({\n                    ...expandedValues,\n                    borderTopRightRadius: v,\n                    unit,\n                  }),\n                )\n              }\n              unit={unit}\n            />\n          </div>\n          <div className=\"flex items-center gap-1.5\">\n            <RadiusInput\n              icon={<CornerBottomLeftIcon size={14} />}\n              value={expandedValues.borderBottomLeftRadius}\n              onChange={(v) =>\n                onChange(\n                  collapseToShorthand({\n                    ...expandedValues,\n                    borderBottomLeftRadius: v,\n                    unit,\n                  }),\n                )\n              }\n              unit={unit}\n            />\n            <RadiusInput\n              icon={<CornerBottomRightIcon size={14} />}\n              value={expandedValues.borderBottomRightRadius}\n              onChange={(v) =>\n                onChange(\n                  collapseToShorthand({\n                    ...expandedValues,\n                    borderBottomRightRadius: v,\n                    unit,\n                  }),\n                )\n              }\n              unit={unit}\n            />\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  return (\n    <PropRow>\n      <Label>Rounded</Label>\n      <div className=\"flex items-center gap-1\">\n        <RadiusInput\n          value={expandedValues.borderTopLeftRadius}\n          onChange={(v) => onChange(`${v}${unit}`)}\n          unit={unit}\n        />\n        {modeToggle}\n      </div>\n    </PropRow>\n  );\n}\n\nfunction RadiusInput({\n  icon,\n  value,\n  onChange,\n  unit,\n}: {\n  icon?: React.ReactNode;\n  value: number | undefined;\n  onChange: (value: number) => void;\n  unit: string;\n}) {\n  const onCommit = (v: number | '') => onChange(v === '' ? 0 : v);\n  const { displayValue, ...handlers } = useNumericInput({\n    value,\n    onCommit,\n    allowEmpty: false,\n    min: 0,\n  });\n\n  const { dragProps } = useDragToChange({\n    value,\n    onCommit,\n    min: 0,\n  });\n\n  return (\n    <span data-re-inspector-number=\"\">\n      {icon && (\n        <span className=\"pointer-events-none\" aria-hidden>\n          {icon}\n        </span>\n      )}\n      <TextField\n        type=\"text\"\n        inputMode=\"numeric\"\n        data-type=\"number\"\n        value={displayValue}\n        {...handlers}\n      />\n      <span data-re-inspector-unit=\"\" {...dragProps}>\n        {unit}\n      </span>\n    </span>\n  );\n}\n\nfunction expandShorthand(value: string | number): {\n  borderTopLeftRadius: number;\n  borderTopRightRadius: number;\n  borderBottomRightRadius: number;\n  borderBottomLeftRadius: number;\n} {\n  if (typeof value === 'number') {\n    return {\n      borderTopLeftRadius: value,\n      borderTopRightRadius: value,\n      borderBottomRightRadius: value,\n      borderBottomLeftRadius: value,\n    };\n  }\n\n  const [topLeft, topRight, bottomRight, bottomLeft] = value\n    .split(' ')\n    .map((v) => Number.parseInt(v, 10));\n\n  return {\n    borderTopLeftRadius: topLeft,\n    borderTopRightRadius: topRight ?? topLeft,\n    borderBottomRightRadius: bottomRight ?? topLeft,\n    borderBottomLeftRadius: bottomLeft ?? topRight ?? topLeft,\n  };\n}\n\nfunction collapseToShorthand(values: {\n  borderTopLeftRadius: number;\n  borderTopRightRadius: number;\n  borderBottomRightRadius: number;\n  borderBottomLeftRadius: number;\n  unit: string;\n}): string {\n  const {\n    borderTopLeftRadius,\n    borderTopRightRadius,\n    borderBottomRightRadius,\n    borderBottomLeftRadius,\n    unit,\n  } = values;\n\n  if (\n    borderTopLeftRadius === borderTopRightRadius &&\n    borderTopLeftRadius === borderBottomRightRadius &&\n    borderTopLeftRadius === borderBottomLeftRadius\n  ) {\n    return `${borderTopLeftRadius}${unit}`;\n  }\n\n  if (\n    borderTopLeftRadius === borderBottomRightRadius &&\n    borderTopRightRadius === borderBottomLeftRadius\n  ) {\n    return `${borderTopLeftRadius}${unit} ${borderTopRightRadius}${unit}`;\n  }\n\n  if (borderTopRightRadius === borderBottomLeftRadius) {\n    return `${borderTopLeftRadius}${unit} ${borderTopRightRadius}${unit} ${borderBottomRightRadius}${unit}`;\n  }\n\n  return `${borderTopLeftRadius}${unit} ${borderTopRightRadius}${unit} ${borderBottomRightRadius}${unit} ${borderBottomLeftRadius}${unit}`;\n}\n","'use client';\n\nimport { BorderPicker } from '../components/border-picker';\nimport { BorderRadiusPicker } from '../components/border-radius-picker';\nimport { Section } from '../components/section';\nimport type { InspectorNodeContext } from '../node';\n\ntype InspectorBorderProps = InspectorNodeContext;\n\nconst BORDER_PROPS = [\n  'borderWidth',\n  'borderColor',\n  'borderStyle',\n  'borderTopWidth',\n  'borderTopColor',\n  'borderTopStyle',\n  'borderRightWidth',\n  'borderRightColor',\n  'borderRightStyle',\n  'borderBottomWidth',\n  'borderBottomColor',\n  'borderBottomStyle',\n  'borderLeftWidth',\n  'borderLeftColor',\n  'borderLeftStyle',\n  'borderRadius',\n] as const;\n\nexport function BorderSection({\n  getStyle,\n  setStyle,\n  batchSetStyle,\n}: InspectorBorderProps) {\n  const styleObject: Record<string, string | number | undefined> = {};\n  for (const prop of BORDER_PROPS) {\n    styleObject[prop] = getStyle(prop);\n  }\n\n  return (\n    <Section title=\"Border\">\n      <BorderPicker\n        styleObject={styleObject}\n        onChange={(propOrChanges, value) => {\n          if (Array.isArray(propOrChanges)) {\n            batchSetStyle(\n              propOrChanges.map(([p, v]) => ({\n                prop: p as (typeof BORDER_PROPS)[number],\n                value: v,\n              })),\n            );\n          } else {\n            setStyle(propOrChanges as (typeof BORDER_PROPS)[number], value!);\n          }\n        }}\n      />\n      <BorderRadiusPicker\n        value={getStyle('borderRadius') ?? 0}\n        onChange={(v) => setStyle('borderRadius', v)}\n      />\n    </Section>\n  );\n}\n","'use client';\n\nimport { NumberInput } from '../components/number-input';\nimport { PropRow } from '../components/prop-row';\nimport { Section } from '../components/section';\nimport type { InspectorNodeContext } from '../node';\nimport { Label } from '../primitives';\n\nconst COLUMN_PARENT_TYPES = new Set([\n  'twoColumns',\n  'threeColumns',\n  'fourColumns',\n]);\n\ntype InspectorColumnSpacingProps = InspectorNodeContext;\n\nexport function ColumnSpacingSection({\n  nodeType,\n  getAttr,\n  setAttr,\n}: InspectorColumnSpacingProps) {\n  if (!COLUMN_PARENT_TYPES.has(nodeType)) {\n    return null;\n  }\n\n  const rawCellspacing = getAttr('cellspacing');\n  const cellspacing =\n    rawCellspacing === undefined ||\n    rawCellspacing === null ||\n    rawCellspacing === ''\n      ? 0\n      : (rawCellspacing as string | number);\n\n  return (\n    <Section title=\"Column spacing\">\n      <PropRow>\n        <Label>Cell spacing</Label>\n        <NumberInput\n          value={cellspacing}\n          onChange={(value) => setAttr('cellspacing', value === '' ? 0 : value)}\n          unit=\"px\"\n          placeholder=\"0\"\n          min={0}\n        />\n      </PropRow>\n    </Section>\n  );\n}\n","'use client';\n\nimport * as React from 'react';\nimport {\n  PanelBottomIcon,\n  PanelLeftIcon,\n  PanelRightIcon,\n  PanelTopIcon,\n  SquareDashedIcon,\n  SquareIcon,\n} from '../../icons';\nimport { useDragToChange } from '../hooks/use-drag-to-change';\nimport { useNumericInput } from '../hooks/use-numeric-input';\nimport { Label, TextField, ToggleGroup, Tooltip } from '../primitives';\nimport { PropRow } from './prop-row';\n\ninterface PaddingValues {\n  paddingTop: number;\n  paddingRight: number;\n  paddingBottom: number;\n  paddingLeft: number;\n}\n\ninterface PaddingPickerProps {\n  value: Partial<PaddingValues>;\n  onChange: (values: Partial<PaddingValues>) => void;\n  unit?: 'px' | '%';\n}\n\nexport function PaddingPicker({\n  value,\n  onChange,\n  unit = 'px',\n}: PaddingPickerProps) {\n  const allEqual =\n    value.paddingTop === value.paddingBottom &&\n    value.paddingTop === value.paddingLeft &&\n    value.paddingTop === value.paddingRight;\n\n  const [expanded, setExpanded] = React.useState(!allEqual);\n\n  const handleChange = (key: keyof PaddingValues, newValue: number) => {\n    onChange({\n      paddingTop: value.paddingTop ?? 0,\n      paddingRight: value.paddingRight ?? 0,\n      paddingBottom: value.paddingBottom ?? 0,\n      paddingLeft: value.paddingLeft ?? 0,\n      [key]: newValue,\n    });\n  };\n\n  const handleUniformChange = (newValue: number) => {\n    onChange({\n      paddingTop: newValue,\n      paddingRight: newValue,\n      paddingBottom: newValue,\n      paddingLeft: newValue,\n    });\n  };\n\n  const handleModeChange = (mode: string) => {\n    if (mode === 'uniform' && expanded) {\n      const uniform = value.paddingTop ?? 0;\n      onChange({\n        paddingTop: uniform,\n        paddingRight: uniform,\n        paddingBottom: uniform,\n        paddingLeft: uniform,\n      });\n      setExpanded(false);\n    } else if (mode === 'individual' && !expanded) {\n      setExpanded(true);\n    }\n  };\n\n  const modeToggle = (\n    <ToggleGroup.Root\n      value={expanded ? 'individual' : 'uniform'}\n      onValueChange={handleModeChange}\n    >\n      <Tooltip.Root>\n        <Tooltip.Trigger>\n          <ToggleGroup.Item value=\"uniform\">\n            <SquareIcon size={16} />\n          </ToggleGroup.Item>\n        </Tooltip.Trigger>\n        <Tooltip.Content>Uniform</Tooltip.Content>\n      </Tooltip.Root>\n      <Tooltip.Root>\n        <Tooltip.Trigger>\n          <ToggleGroup.Item value=\"individual\">\n            <SquareDashedIcon size={16} />\n          </ToggleGroup.Item>\n        </Tooltip.Trigger>\n        <Tooltip.Content>Per side</Tooltip.Content>\n      </Tooltip.Root>\n    </ToggleGroup.Root>\n  );\n\n  if (expanded) {\n    return (\n      <div className=\"flex flex-col gap-2\">\n        <PropRow>\n          <Label>Padding</Label>\n          {modeToggle}\n        </PropRow>\n\n        <div className=\"flex flex-col items-center gap-1.5\">\n          <div className=\"flex items-center gap-1\">\n            <PaddingInput\n              icon={<PanelTopIcon size={14} />}\n              value={value.paddingTop}\n              onChange={(v) => handleChange('paddingTop', v)}\n              unit={unit}\n            />\n            <PaddingInput\n              icon={<PanelRightIcon size={14} />}\n              value={value.paddingRight}\n              onChange={(v) => handleChange('paddingRight', v)}\n              unit={unit}\n            />\n          </div>\n          <div className=\"flex items-center gap-1\">\n            <PaddingInput\n              icon={<PanelBottomIcon size={14} />}\n              value={value.paddingBottom}\n              onChange={(v) => handleChange('paddingBottom', v)}\n              unit={unit}\n            />\n            <PaddingInput\n              icon={<PanelLeftIcon size={14} />}\n              value={value.paddingLeft}\n              onChange={(v) => handleChange('paddingLeft', v)}\n              unit={unit}\n            />\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  return (\n    <PropRow>\n      <Label>Padding</Label>\n      <div className=\"flex items-center gap-1\">\n        <PaddingInput\n          value={value.paddingTop}\n          onChange={handleUniformChange}\n          unit={unit}\n        />\n        {modeToggle}\n      </div>\n    </PropRow>\n  );\n}\n\nfunction PaddingInput({\n  icon,\n  value,\n  onChange,\n  unit,\n}: {\n  icon?: React.ReactNode;\n  value: number | undefined;\n  onChange: (value: number) => void;\n  unit: string;\n}) {\n  const onCommit = (v: number | '') => onChange(v === '' ? 0 : v);\n  const { displayValue, ...handlers } = useNumericInput({\n    value,\n    onCommit,\n    allowEmpty: false,\n    min: 0,\n  });\n\n  const { dragProps } = useDragToChange({\n    value,\n    onCommit,\n    min: 0,\n  });\n\n  return (\n    <span data-re-inspector-number=\"\">\n      {icon && (\n        <span className=\"pointer-events-none\" aria-hidden>\n          {icon}\n        </span>\n      )}\n      <TextField\n        type=\"text\"\n        inputMode=\"numeric\"\n        data-type=\"number\"\n        value={displayValue}\n        {...handlers}\n      />\n      <span data-re-inspector-unit=\"\" {...dragProps}>\n        {unit}\n      </span>\n    </span>\n  );\n}\n","'use client';\n\nimport { PaddingPicker } from '../components/padding-picker';\nimport { Section } from '../components/section';\nimport type { InspectorNodeContext } from '../node';\n\ntype InspectorPaddingProps = InspectorNodeContext;\n\nexport function PaddingSection({\n  getStyle,\n  batchSetStyle,\n}: InspectorPaddingProps) {\n  const value = {\n    paddingTop: Number(getStyle('paddingTop')) || 0,\n    paddingRight: Number(getStyle('paddingRight')) || 0,\n    paddingBottom: Number(getStyle('paddingBottom')) || 0,\n    paddingLeft: Number(getStyle('paddingLeft')) || 0,\n  };\n\n  return (\n    <Section title=\"Spacing\">\n      <PaddingPicker\n        value={value}\n        onChange={(values) => {\n          const changes = Object.entries(values).map(([prop, val]) => ({\n            prop: prop as\n              | 'paddingTop'\n              | 'paddingRight'\n              | 'paddingBottom'\n              | 'paddingLeft',\n            value: val,\n          }));\n          batchSetStyle(changes);\n        }}\n      />\n    </Section>\n  );\n}\n","'use client';\n\nimport { NumberInput } from '../components/number-input';\nimport { PropRow } from '../components/prop-row';\nimport { Section } from '../components/section';\nimport type { InspectorNodeContext } from '../node';\nimport { Label } from '../primitives';\n\nconst SIZE_AS_ATTRIBUTES = ['image'];\n\ntype InspectorSizeProps = InspectorNodeContext;\n\nexport function SizeSection({\n  nodeType,\n  getStyle,\n  setStyle,\n  getAttr,\n  setAttr,\n}: InspectorSizeProps) {\n  const useAttrs = SIZE_AS_ATTRIBUTES.includes(nodeType);\n\n  const width = useAttrs\n    ? ((getAttr('width') as string | number) ?? '')\n    : (getStyle('width') ?? '');\n  const height = useAttrs\n    ? ((getAttr('height') as string | number) ?? '')\n    : (getStyle('height') ?? '');\n\n  const setWidth = (v: number | '') => {\n    if (useAttrs) {\n      setAttr('width', v === '' ? '' : v);\n    } else {\n      setStyle('width', v);\n    }\n  };\n\n  const setHeight = (v: number | '') => {\n    if (useAttrs) {\n      setAttr('height', v === '' ? '' : v);\n    } else {\n      setStyle('height', v);\n    }\n  };\n\n  return (\n    <Section title=\"Size\">\n      <PropRow>\n        <Label>Width</Label>\n        <NumberInput\n          value={width}\n          onChange={setWidth}\n          unit=\"px\"\n          placeholder=\"auto\"\n          min={0}\n        />\n      </PropRow>\n      <PropRow>\n        <Label>Height</Label>\n        <NumberInput\n          value={height}\n          onChange={setHeight}\n          unit=\"px\"\n          placeholder=\"auto\"\n          min={0}\n        />\n      </PropRow>\n    </Section>\n  );\n}\n","import type { ElementType } from 'react';\nimport {\n  AlignCenterIcon,\n  AlignCenterVerticalIcon,\n  AlignEndVerticalIcon,\n  AlignLeftIcon,\n  AlignRightIcon,\n  AlignStartVerticalIcon,\n  BoldIcon,\n  CaseUpperIcon,\n  CodeIcon,\n  ItalicIcon,\n  ListIcon,\n  ListOrderedIcon,\n  StrikethroughIcon,\n  UnderlineIcon,\n} from '../../icons';\n\nexport interface ParentBlockInfo {\n  alignment: string;\n  pos: number;\n  nodeType: string;\n  attrs: Record<string, unknown>;\n}\n\nexport interface EditorSnapshot {\n  isBoldActive: boolean;\n  isItalicActive: boolean;\n  isUnderlineActive: boolean;\n  isStrikeActive: boolean;\n  isCodeActive: boolean;\n  isUppercaseActive: boolean;\n  isBulletListActive: boolean;\n  isOrderedListActive: boolean;\n  isBlockquoteActive: boolean;\n  currentColor: string | undefined;\n  parentBlock: ParentBlockInfo;\n  blockStyle: Record<string, string | number | undefined>;\n}\n\nexport const PADDING_KEYS = [\n  'paddingTop',\n  'paddingRight',\n  'paddingBottom',\n  'paddingLeft',\n] as const;\n\nexport const CSS_UNIT_MAP: Record<string, string> = {\n  fontSize: 'px',\n  borderWidth: 'px',\n  borderRadius: 'px',\n  paddingTop: 'px',\n  paddingRight: 'px',\n  paddingBottom: 'px',\n  paddingLeft: 'px',\n  lineHeight: '%',\n};\n\nexport const TEXT_TYPE_OPTIONS = [\n  { value: 'title', label: 'Title', nodeType: 'heading', level: 1 },\n  { value: 'subtitle', label: 'Subtitle', nodeType: 'heading', level: 2 },\n  { value: 'heading', label: 'Heading', nodeType: 'heading', level: 3 },\n  { value: 'body', label: 'Body', nodeType: 'paragraph' },\n] as const;\n\nexport interface FormatItem {\n  value: string;\n  icon: ElementType;\n  iconClassName?: string;\n  label: string;\n}\n\nexport interface AlignmentItem {\n  value: string;\n  icon: ElementType;\n  alternativeIcon?: ElementType;\n  iconClassName?: string;\n  alternativeIconClassName?: string;\n}\n\nexport interface ListItem {\n  value: string;\n  icon: ElementType;\n  iconClassName?: string;\n  label: string;\n}\n\nexport const MARK_TOGGLES = [\n  {\n    value: 'bold',\n    active: (s: EditorSnapshot) => s.isBoldActive,\n    toggle: 'toggleBold',\n  },\n  {\n    value: 'italic',\n    active: (s: EditorSnapshot) => s.isItalicActive,\n    toggle: 'toggleItalic',\n  },\n  {\n    value: 'underline',\n    active: (s: EditorSnapshot) => s.isUnderlineActive,\n    toggle: 'toggleUnderline',\n  },\n  {\n    value: 'line-through',\n    active: (s: EditorSnapshot) => s.isStrikeActive,\n    toggle: 'toggleStrike',\n  },\n  {\n    value: 'code',\n    active: (s: EditorSnapshot) => s.isCodeActive,\n    toggle: 'toggleCode',\n  },\n  {\n    value: 'uppercase',\n    active: (s: EditorSnapshot) => s.isUppercaseActive,\n    toggle: 'toggleUppercase',\n  },\n  {\n    value: 'blockquote',\n    active: (s: EditorSnapshot) => s.isBlockquoteActive,\n    toggle: 'toggleBlockquote',\n  },\n] as const;\n\nexport const FORMAT_ITEMS: FormatItem[] = [\n  { value: 'bold', icon: BoldIcon, label: 'Bold' },\n  { value: 'italic', icon: ItalicIcon, label: 'Italic' },\n  { value: 'underline', icon: UnderlineIcon, label: 'Underline' },\n  { value: 'line-through', icon: StrikethroughIcon, label: 'Strikethrough' },\n  { value: 'code', icon: CodeIcon, label: 'Code' },\n  { value: 'uppercase', icon: CaseUpperIcon, label: 'Uppercase' },\n];\n\nexport const ALIGNMENT_ITEMS: AlignmentItem[] = [\n  {\n    value: 'left',\n    alternativeIcon: AlignLeftIcon,\n    icon: AlignStartVerticalIcon,\n  },\n  {\n    value: 'center',\n    alternativeIcon: AlignCenterIcon,\n    icon: AlignCenterVerticalIcon,\n  },\n  {\n    value: 'right',\n    alternativeIcon: AlignRightIcon,\n    icon: AlignEndVerticalIcon,\n  },\n];\n\nexport const JUSTIFY_AND_LIST_ITEMS: ListItem[] = [\n  { value: 'bulletList', icon: ListIcon, label: 'Bullet list' },\n  { value: 'orderedList', icon: ListOrderedIcon, label: 'Ordered list' },\n];\n\nexport const TEXT_DECORATION_ITEMS: FormatItem[] = [\n  { value: 'none', icon: () => null, label: 'None' },\n  { value: 'underline', icon: UnderlineIcon, label: 'Underline' },\n  { value: 'line-through', icon: StrikethroughIcon, label: 'Strikethrough' },\n];\n","'use client';\n\nimport type { KnownCssProperties } from '../../../plugins/email-theming/types';\nimport { NumberInput } from '../components/number-input';\nimport { PropRow } from '../components/prop-row';\nimport { Section } from '../components/section';\nimport { ALIGNMENT_ITEMS, FORMAT_ITEMS } from '../config/text-config';\nimport type { InspectorNodeContext } from '../node';\nimport {\n  ColorInput,\n  IconButton,\n  Label,\n  ToggleGroup,\n  Tooltip,\n} from '../primitives';\nimport type { InspectorTextContext } from '../text';\n\ntype TypographyContext = Pick<\n  InspectorNodeContext | InspectorTextContext,\n  'getStyle' | 'setStyle' | 'presetColors'\n> &\n  Partial<\n    Pick<\n      InspectorTextContext,\n      'marks' | 'toggleMark' | 'alignment' | 'setAlignment'\n    >\n  >;\n\nexport function TypographySection({\n  getStyle,\n  setStyle,\n  marks,\n  toggleMark,\n  alignment,\n  setAlignment,\n}: TypographyContext) {\n  const color = String(getStyle('color') ?? '');\n  const fontSize = getStyle('fontSize') ?? '';\n  const lineHeight = getStyle('lineHeight') ?? '';\n\n  return (\n    <Section title=\"Typography\">\n      <PropRow>\n        <Label>Color</Label>\n        <ColorInput value={color} onChange={(v) => setStyle('color', v)} />\n      </PropRow>\n\n      <PropRow>\n        <Label>Size</Label>\n        <NumberInput\n          value={fontSize}\n          onChange={(v) => setStyle('fontSize', v)}\n          unit=\"px\"\n          min={1}\n        />\n      </PropRow>\n\n      <PropRow>\n        <Label>Line height</Label>\n        <NumberInput\n          value={lineHeight}\n          onChange={(v) => setStyle('lineHeight' as KnownCssProperties, v)}\n          unit=\"%\"\n        />\n      </PropRow>\n\n      {marks && toggleMark && (\n        <PropRow>\n          <Label>Format</Label>\n          <div className=\"flex items-center gap-0.5\">\n            {FORMAT_ITEMS.map((item) => (\n              <Tooltip.Root key={item.value}>\n                <Tooltip.Trigger>\n                  <IconButton\n                    onClick={() => toggleMark(item.value)}\n                    aria-pressed={marks[item.value] ?? false}\n                    aria-label={item.label}\n                  >\n                    <item.icon size={16} />\n                  </IconButton>\n                </Tooltip.Trigger>\n                <Tooltip.Content>{item.label}</Tooltip.Content>\n              </Tooltip.Root>\n            ))}\n          </div>\n        </PropRow>\n      )}\n\n      {alignment && setAlignment && (\n        <PropRow>\n          <Label>Align</Label>\n          <ToggleGroup.Root value={alignment} onValueChange={setAlignment}>\n            {ALIGNMENT_ITEMS.map((item) => (\n              <Tooltip.Root key={item.value}>\n                <Tooltip.Trigger>\n                  <ToggleGroup.Item value={item.value}>\n                    <item.icon size={16} />\n                  </ToggleGroup.Item>\n                </Tooltip.Trigger>\n                <Tooltip.Content>\n                  {item.value.charAt(0).toUpperCase() + item.value.slice(1)}\n                </Tooltip.Content>\n              </Tooltip.Root>\n            ))}\n          </ToggleGroup.Root>\n        </PropRow>\n      )}\n    </Section>\n  );\n}\n","import { getThemeComponentKey } from '../../../plugins/email-theming/extension';\nimport type { KnownThemeComponents } from '../../../plugins/email-theming/types';\n\nfunction expandPaddingShorthand(\n  value: string | number,\n): Record<string, string> {\n  const parts = String(value).trim().split(/\\s+/);\n  const [top, right = top, bottom = top, left = right] = parts;\n  return {\n    paddingTop: top,\n    paddingRight: right,\n    paddingBottom: bottom,\n    paddingLeft: left,\n  };\n}\n\nexport function parseCssValue(\n  value: string | number | undefined,\n): { numeric: number; unit: string } | null {\n  if (value === undefined || value === null) {\n    return null;\n  }\n\n  const strValue = String(value).trim();\n  const match = strValue.match(/^(-?\\d*\\.?\\d+)(px|em|%|rem)?$/);\n\n  if (match) {\n    return {\n      numeric: Number.parseFloat(match[1]),\n      unit: match[2] || '',\n    };\n  }\n\n  return null;\n}\n\nexport function convertToInspectorUnit(\n  value: string | number | undefined,\n  bodyFontSize: number,\n  targetUnit: 'px' | '%',\n): number | string {\n  const parsed = parseCssValue(value);\n  if (!parsed) {\n    return '';\n  }\n\n  if (parsed.unit === 'em' || parsed.unit === 'rem') {\n    return Math.round(parsed.numeric * bodyFontSize);\n  }\n\n  if (parsed.unit === '%') {\n    return targetUnit === '%' ? parsed.numeric : parsed.numeric;\n  }\n\n  if (parsed.unit === 'px' || parsed.unit === '') {\n    return parsed.numeric;\n  }\n\n  return '';\n}\n\nconst BASE_FONT_SIZE_PX = 16;\n\nexport function normalizeInlineStyleUnits(\n  expanded: Record<string, string>,\n): Record<string, string> {\n  const result = { ...expanded };\n\n  if (result.fontSize !== undefined) {\n    const converted = convertToInspectorUnit(\n      result.fontSize,\n      BASE_FONT_SIZE_PX,\n      'px',\n    );\n    if (converted !== '') {\n      result.fontSize = String(converted);\n    }\n  }\n\n  if (result.lineHeight !== undefined) {\n    const parsed = parseCssValue(result.lineHeight);\n    if (parsed && (parsed.unit === 'em' || parsed.unit === 'rem')) {\n      result.lineHeight = String(Math.round(parsed.numeric * 100));\n    } else if (parsed && parsed.unit === '%') {\n      result.lineHeight = String(parsed.numeric);\n    }\n  }\n\n  return result;\n}\n\nexport function resolveThemeDefaults(\n  nodeType: string,\n  attrs: Record<string, unknown>,\n  themeStyles: Record<KnownThemeComponents, React.CSSProperties>,\n): Record<string, string | number> {\n  const componentKey = getThemeComponentKey(nodeType, 0, attrs);\n  if (!componentKey) {\n    return {};\n  }\n\n  const componentStyles = themeStyles[componentKey];\n  if (!componentStyles) {\n    return {};\n  }\n  const resolvedDefaults: Record<string, string | number> = {};\n\n  if (componentStyles.color) {\n    resolvedDefaults.color = componentStyles.color;\n  } else if (themeStyles.body?.color) {\n    resolvedDefaults.color = themeStyles.body.color;\n  }\n\n  if (componentStyles.fontWeight !== undefined) {\n    resolvedDefaults.fontWeight = componentStyles.fontWeight;\n  }\n\n  if (componentStyles.textDecoration !== undefined) {\n    resolvedDefaults.textDecoration = componentStyles.textDecoration;\n  }\n\n  if (componentStyles.backgroundColor !== undefined) {\n    resolvedDefaults.backgroundColor = componentStyles.backgroundColor;\n  }\n\n  if (componentStyles.borderRadius !== undefined) {\n    const converted = convertToInspectorUnit(\n      componentStyles.borderRadius,\n      BASE_FONT_SIZE_PX,\n      'px',\n    );\n    if (converted !== '') {\n      resolvedDefaults.borderRadius = converted;\n    }\n  }\n\n  if (componentStyles.borderWidth !== undefined) {\n    const converted = convertToInspectorUnit(\n      componentStyles.borderWidth,\n      BASE_FONT_SIZE_PX,\n      'px',\n    );\n    if (converted !== '') {\n      resolvedDefaults.borderWidth = converted;\n    }\n  }\n\n  if (componentStyles.borderColor !== undefined) {\n    resolvedDefaults.borderColor = componentStyles.borderColor;\n  }\n\n  if (componentStyles.borderStyle !== undefined) {\n    resolvedDefaults.borderStyle = componentStyles.borderStyle;\n  }\n\n  const shorthandPadding =\n    componentStyles.padding === undefined\n      ? {}\n      : expandPaddingShorthand(componentStyles.padding);\n\n  const paddingSides = [\n    'paddingTop',\n    'paddingRight',\n    'paddingBottom',\n    'paddingLeft',\n  ] as const;\n  for (const prop of paddingSides) {\n    const value = componentStyles[prop] ?? shorthandPadding[prop];\n    if (value !== undefined) {\n      const converted = convertToInspectorUnit(value, BASE_FONT_SIZE_PX, 'px');\n      if (converted !== '') {\n        resolvedDefaults[prop] = converted;\n      }\n    }\n  }\n\n  return resolvedDefaults;\n}\n","import type { Node as ProseMirrorNode } from '@tiptap/pm/model';\nimport type { useCurrentEditor } from '@tiptap/react';\n\nexport function getNodeAtExactPos(\n  editor: NonNullable<ReturnType<typeof useCurrentEditor>['editor']>,\n  nodePos: { pos: number; inside: number },\n): { node: ProseMirrorNode; pos: number } | null {\n  const doc = editor.state.doc;\n\n  const nodeAtPos = doc.nodeAt(nodePos.pos);\n  if (nodeAtPos) {\n    return { node: nodeAtPos, pos: nodePos.pos };\n  }\n\n  const resolved = doc.resolve(nodePos.pos);\n  if (resolved.nodeAfter) {\n    return { node: resolved.nodeAfter, pos: nodePos.pos };\n  }\n\n  if (resolved.parent && resolved.parent.type.name !== 'doc') {\n    const parentPos = resolved.before(resolved.depth);\n    return { node: resolved.parent, pos: parentPos };\n  }\n\n  return null;\n}\n","import { NodeSelection } from '@tiptap/pm/state';\nimport type { useCurrentEditor } from '@tiptap/react';\nimport type { NodeClickedEvent } from '../../../core/event-bus';\nimport { SUPPORTED_CSS_PROPERTIES } from '../../../plugins/email-theming/themes';\nimport type { KnownCssProperties } from '../../../plugins/email-theming/types';\nimport {\n  ensureBorderStyleFallback,\n  inlineCssToJs,\n  jsToInlineCss,\n} from '../../../utils/styles';\nimport { getNodeAtExactPos } from './get-node-at-pos';\n\nexport function customUpdateAttributes(\n  {\n    editor,\n    nodePos,\n    prop,\n    newValue,\n  }: {\n    editor: NonNullable<ReturnType<typeof useCurrentEditor>['editor']>;\n    nodePos: { pos: number; inside: number };\n    prop: string;\n    newValue: string | number;\n  },\n  setLocalAttr: (value: NodeClickedEvent['nodeAttrs']) => void,\n) {\n  const result = getNodeAtExactPos(editor, nodePos);\n  if (!result?.node) {\n    return;\n  }\n\n  const { node, pos } = result;\n  const attributes = { ...node.attrs };\n  attributes[prop] = newValue;\n\n  setLocalAttr(attributes);\n\n  const wasNodeSelected =\n    editor.state.selection instanceof NodeSelection &&\n    editor.state.selection.from === pos;\n  const transaction = editor.state.tr.setNodeMarkup(pos, null, attributes);\n  if (wasNodeSelected) {\n    transaction.setSelection(NodeSelection.create(transaction.doc, pos));\n  }\n  editor.view.dispatch(transaction);\n}\n\ntype StyleUpdateBase = {\n  editor: NonNullable<ReturnType<typeof useCurrentEditor>['editor']>;\n  nodePos: { pos: number; inside: number };\n};\n\ntype SingleStyleUpdate = StyleUpdateBase & {\n  prop: string;\n  newValue: string | number;\n};\n\ntype BatchStyleUpdate = StyleUpdateBase & {\n  changes: [string, string | number][];\n};\n\nexport function customUpdateStyles(\n  params: SingleStyleUpdate | BatchStyleUpdate,\n  setLocalAttr: (value: NodeClickedEvent['nodeAttrs']) => void,\n) {\n  const result = getNodeAtExactPos(params.editor, params.nodePos);\n  if (!result?.node) {\n    return;\n  }\n\n  const { node, pos } = result;\n  const currentStyle = inlineCssToJs(node.attrs.style);\n\n  const changes: [string, string | number][] =\n    'changes' in params ? params.changes : [[params.prop, params.newValue]];\n\n  for (const [prop, value] of changes) {\n    if (value === '' || value === undefined) {\n      delete currentStyle[prop];\n    } else {\n      const unit = SUPPORTED_CSS_PROPERTIES[prop as KnownCssProperties]?.unit;\n      currentStyle[prop] =\n        unit && typeof value === 'number' ? `${value}${unit}` : String(value);\n    }\n  }\n\n  ensureBorderStyleFallback(currentStyle);\n  const newStyle = jsToInlineCss(currentStyle);\n  const attributes = { ...node.attrs, style: newStyle };\n\n  setLocalAttr(attributes);\n\n  const wasNodeSelected =\n    params.editor.state.selection instanceof NodeSelection &&\n    params.editor.state.selection.from === pos;\n  const transaction = params.editor.state.tr.setNodeMarkup(\n    pos,\n    null,\n    attributes,\n  );\n  if (wasNodeSelected) {\n    transaction.setSelection(NodeSelection.create(transaction.doc, pos));\n  }\n  params.editor.view.dispatch(transaction);\n}\n","'use client';\n\nimport { useCurrentEditor } from '@tiptap/react';\nimport * as React from 'react';\nimport {\n  stylesToCss,\n  useEmailTheming,\n} from '../../plugins/email-theming/extension';\nimport { SUPPORTED_CSS_PROPERTIES } from '../../plugins/email-theming/themes';\nimport type { KnownCssProperties } from '../../plugins/email-theming/types';\nimport { inlineCssToJs } from '../../utils/styles';\nimport { useDocumentColors } from './hooks/use-document-colors';\nimport type { FocusedNode } from './root';\nimport { useInspector } from './root';\nimport { AttributesSection } from './sections/attributes';\nimport { BackgroundSection } from './sections/background';\nimport { BorderSection } from './sections/border';\nimport { ColumnSpacingSection } from './sections/column-spacing';\nimport { PaddingSection } from './sections/padding';\nimport { SizeSection } from './sections/size';\nimport { TypographySection } from './sections/typography';\nimport { resolveThemeDefaults } from './utils/resolve-theme-defaults';\nimport {\n  customUpdateAttributes,\n  customUpdateStyles,\n} from './utils/style-updates';\n\nexport interface InspectorNodeContext {\n  nodeType: string;\n  nodePos: { pos: number; inside: number };\n  getStyle: (prop: KnownCssProperties) => string | number | undefined;\n  setStyle: (prop: KnownCssProperties, value: string | number) => void;\n  batchSetStyle: (\n    changes: Array<{ prop: KnownCssProperties; value: string | number }>,\n  ) => void;\n  getAttr: (name: string) => unknown;\n  setAttr: (name: string, value: unknown) => void;\n  themeDefaults: Record<string, string | number | undefined>;\n  presetColors: string[];\n}\n\nexport interface InspectorNodeProps {\n  children?: (context: InspectorNodeContext) => React.ReactNode;\n}\n\nexport function InspectorNode({ children }: InspectorNodeProps) {\n  const { editor } = useCurrentEditor();\n  const theming = useEmailTheming(editor);\n  const { target } = useInspector();\n  const documentColors = useDocumentColors(editor);\n\n  const [localAttr, setLocalAttr] = React.useState<\n    FocusedNode['nodeAttrs'] | null\n  >(null);\n\n  const focusedNode =\n    typeof target === 'object' && target.nodeType !== 'body' ? target : null;\n\n  React.useEffect(() => {\n    if (focusedNode) {\n      setLocalAttr(focusedNode.nodeAttrs);\n    }\n  }, [focusedNode]);\n\n  if (!editor || !theming || !focusedNode) {\n    return null;\n  }\n\n  const attrs = localAttr ?? focusedNode.nodeAttrs;\n  const inlineStyles = inlineCssToJs(attrs.style || '');\n\n  const css = stylesToCss(theming.styles, theming.theme);\n  const themeDefaults = resolveThemeDefaults(\n    focusedNode.nodeType,\n    attrs as Record<string, unknown>,\n    css,\n  );\n\n  const mergedStyles: Record<string, string | number | undefined> = {\n    ...themeDefaults,\n    ...inlineStyles,\n  };\n\n  const getStyle = (prop: KnownCssProperties) => {\n    const value = mergedStyles[prop];\n    // Strip the trailing CSS unit only for numeric properties so that\n    // numeric inputs receive a parseable number. Non-numeric properties\n    // (colors, gradients, etc.) are returned verbatim — stripping `%`/`px`\n    // globally would corrupt values like `hsl(200, 50%, 40%)`.\n    const isNumericProperty = Boolean(SUPPORTED_CSS_PROPERTIES[prop]?.unit);\n    if (isNumericProperty && typeof value === 'string') {\n      return value.replace(/(px|%)$/, '');\n    }\n    return value;\n  };\n\n  const setStyle = (prop: KnownCssProperties, value: string | number) => {\n    customUpdateStyles(\n      {\n        editor,\n        nodePos: focusedNode.nodePos,\n        prop,\n        newValue: value,\n      },\n      setLocalAttr,\n    );\n  };\n\n  const batchSetStyle = (\n    changes: Array<{ prop: KnownCssProperties; value: string | number }>,\n  ) => {\n    customUpdateStyles(\n      {\n        editor,\n        nodePos: focusedNode.nodePos,\n        changes: changes.map((c) => [c.prop, c.value]),\n      },\n      setLocalAttr,\n    );\n  };\n\n  const getAttr = (name: string) => attrs[name];\n\n  const setAttr = (name: string, value: unknown) => {\n    customUpdateAttributes(\n      {\n        editor,\n        nodePos: focusedNode.nodePos,\n        prop: name,\n        newValue: value as string | number,\n      },\n      setLocalAttr,\n    );\n  };\n\n  const context: InspectorNodeContext = {\n    nodeType: focusedNode.nodeType,\n    nodePos: focusedNode.nodePos,\n    getStyle,\n    setStyle,\n    batchSetStyle,\n    getAttr,\n    setAttr,\n    themeDefaults,\n    presetColors: documentColors,\n  };\n\n  if (children) {\n    return <>{children(context)}</>;\n  }\n\n  return <InspectorNodeDefaults context={context} />;\n}\n\ninterface NodeLayout {\n  sections: Array<{\n    type:\n      | 'attributes'\n      | 'size'\n      | 'link'\n      | 'typography'\n      | 'padding'\n      | 'columnSpacing'\n      | 'background'\n      | 'border';\n  }>;\n}\n\nfunction getDefaultLayout(nodeType: string): NodeLayout {\n  switch (nodeType) {\n    case 'image':\n      return {\n        sections: [\n          { type: 'attributes' },\n          { type: 'size' },\n          { type: 'link' },\n          { type: 'padding' },\n          { type: 'border' },\n        ],\n      };\n    case 'button':\n      return {\n        sections: [\n          { type: 'link' },\n          { type: 'typography' },\n          { type: 'size' },\n          { type: 'padding' },\n          { type: 'border' },\n          { type: 'background' },\n        ],\n      };\n    case 'section':\n    case 'div':\n      return {\n        sections: [\n          { type: 'background' },\n          { type: 'padding' },\n          { type: 'border' },\n        ],\n      };\n    case 'codeBlock':\n      return {\n        sections: [\n          { type: 'attributes' },\n          { type: 'padding' },\n          { type: 'border' },\n        ],\n      };\n    case 'footer':\n      return {\n        sections: [\n          { type: 'typography' },\n          { type: 'padding' },\n          { type: 'background' },\n        ],\n      };\n    case 'twoColumns':\n    case 'threeColumns':\n    case 'fourColumns':\n      return {\n        sections: [\n          { type: 'columnSpacing' },\n          { type: 'typography' },\n          { type: 'padding' },\n          { type: 'background' },\n          { type: 'border' },\n        ],\n      };\n    default:\n      return {\n        sections: [\n          { type: 'typography' },\n          { type: 'padding' },\n          { type: 'background' },\n          { type: 'border' },\n        ],\n      };\n  }\n}\n\nfunction InspectorNodeDefaults({ context }: { context: InspectorNodeContext }) {\n  const layout = getDefaultLayout(context.nodeType);\n\n  return (\n    <>\n      {layout.sections.map((section) => {\n        switch (section.type) {\n          case 'attributes':\n            return <AttributesSection key={section.type} {...context} />;\n          case 'size':\n            return <SizeSection key={section.type} {...context} />;\n          case 'typography':\n            return <TypographySection key={section.type} {...context} />;\n          case 'padding':\n            return <PaddingSection key={section.type} {...context} />;\n          case 'columnSpacing':\n            return <ColumnSpacingSection key={section.type} {...context} />;\n          case 'background':\n            return <BackgroundSection key={section.type} {...context} />;\n          case 'border':\n            return <BorderSection key={section.type} {...context} />;\n          default:\n            return null;\n        }\n      })}\n    </>\n  );\n}\n","'use client';\n\nimport { PropRow } from '../components/prop-row';\nimport { Section } from '../components/section';\nimport { ColorInput, Label, TextField } from '../primitives';\nimport type { InspectorTextContext } from '../text';\n\ntype InspectorLinkProps = Pick<\n  InspectorTextContext,\n  'linkHref' | 'linkColor' | 'setLinkColor' | 'isLinkActive' | 'presetColors'\n>;\n\nexport function LinkSection({\n  linkHref,\n  linkColor,\n  setLinkColor,\n  isLinkActive,\n}: InspectorLinkProps) {\n  if (!isLinkActive) {\n    return null;\n  }\n\n  return (\n    <Section title=\"Link\">\n      <PropRow>\n        <Label>URL</Label>\n        <TextField type=\"text\" value={linkHref} readOnly />\n      </PropRow>\n      <PropRow>\n        <Label>Color</Label>\n        <ColorInput value={linkColor} onChange={setLinkColor} />\n      </PropRow>\n    </Section>\n  );\n}\n","import type { Editor } from '@tiptap/core';\nimport { useEditorState } from '@tiptap/react';\nimport { inlineCssToJs, jsToInlineCss } from '../../../utils/styles';\n\ninterface LinkMarkState {\n  href: string;\n  style: string;\n  isActive: boolean;\n}\n\nexport function useLinkMark(editor: Editor | null): LinkMarkState {\n  return (\n    useEditorState({\n      editor,\n      selector: ({ editor }) => {\n        if (!editor) {\n          return { href: '', style: '', isActive: false };\n        }\n        const { from } = editor.state.selection;\n        const mark =\n          editor.state.doc\n            .resolve(from)\n            .marks()\n            .find((m) => m.type.name === 'link') ?? null;\n        return {\n          href: (mark?.attrs?.href as string) ?? '',\n          style: (mark?.attrs?.style as string) ?? '',\n          isActive: !!mark,\n        };\n      },\n    }) ?? { href: '', style: '', isActive: false }\n  );\n}\n\nexport function getLinkColor(\n  linkStyle: string,\n  themeLinkColor: string | undefined,\n  fallback = '#000000',\n): string {\n  return inlineCssToJs(linkStyle).color || themeLinkColor || fallback;\n}\n\nexport function updateLinkColor(\n  editor: Editor,\n  linkStyle: string,\n  color: string,\n): void {\n  const styleObj = inlineCssToJs(linkStyle);\n  styleObj.color = color;\n  const newStyle = jsToInlineCss(styleObj);\n  const { from, to } = editor.state.selection;\n  editor\n    .chain()\n    .extendMarkRange('link')\n    .updateAttributes('link', { style: newStyle })\n    .setTextSelection({ from, to })\n    .run();\n}\n","import type { useCurrentEditor } from '@tiptap/react';\nimport type { NodeClickedEvent } from '../../../core/event-bus';\nimport {\n  ensureBorderStyleFallback,\n  expandShorthandProperties,\n  inlineCssToJs,\n  jsToInlineCss,\n} from '../../../utils/styles';\nimport {\n  CSS_UNIT_MAP,\n  type EditorSnapshot,\n  MARK_TOGGLES,\n  PADDING_KEYS,\n  type ParentBlockInfo,\n} from '../config/text-config';\n\ntype Editor = NonNullable<ReturnType<typeof useCurrentEditor>['editor']>;\n\nexport function getBlockInfoFromNodeData(\n  editor: Editor | null,\n  nodeData: NodeClickedEvent,\n): ParentBlockInfo {\n  if (!editor) {\n    return { alignment: 'left', pos: 0, nodeType: 'paragraph', attrs: {} };\n  }\n  const node = editor.state.doc.nodeAt(nodeData.nodePos.pos);\n  if (!node) {\n    return {\n      alignment: 'left',\n      pos: nodeData.nodePos.pos,\n      nodeType: nodeData.nodeType,\n      attrs: { ...nodeData.nodeAttrs },\n    };\n  }\n  const alignment =\n    (node.attrs.align as string) || (node.attrs.alignment as string) || 'left';\n  return {\n    alignment,\n    pos: nodeData.nodePos.pos,\n    nodeType: node.type.name,\n    attrs: { ...node.attrs },\n  };\n}\n\nexport function getParentBlockInfo(editor: Editor | null): ParentBlockInfo {\n  if (!editor) {\n    return {\n      alignment: 'left',\n      pos: 0,\n      nodeType: 'paragraph',\n      attrs: {},\n    };\n  }\n\n  const { from } = editor.state.selection;\n  const resolvedPos = editor.state.doc.resolve(from);\n\n  for (let depth = resolvedPos.depth; depth > 0; depth--) {\n    const node = resolvedPos.node(depth);\n    if (node.isBlock) {\n      const alignment =\n        (node.attrs.align as string) ||\n        (node.attrs.alignment as string) ||\n        'left';\n      return {\n        alignment,\n        pos: resolvedPos.before(depth),\n        nodeType: node.type.name,\n        attrs: { ...node.attrs },\n      };\n    }\n  }\n\n  return {\n    alignment: 'left',\n    pos: 0,\n    nodeType: 'paragraph',\n    attrs: {},\n  };\n}\n\nexport function updateParentBlockStyle(\n  editor: Editor | null,\n  parentPos: number,\n  styleKeyOrChanges: string | [string, string | number][],\n  value?: string | number,\n): void {\n  if (!editor || parentPos < 0) {\n    return;\n  }\n  const node = editor.state.doc.nodeAt(parentPos);\n  if (!node) {\n    return;\n  }\n  const currentStyle = (node.attrs.style as string) || '';\n  const parsed = inlineCssToJs(currentStyle, { removeUnit: false });\n  const expanded = expandShorthandProperties(parsed) as Record<\n    string,\n    string | number\n  >;\n\n  const changes: [string, string | number][] = Array.isArray(styleKeyOrChanges)\n    ? styleKeyOrChanges\n    : [[styleKeyOrChanges, value!]];\n\n  for (const [styleKey, v] of changes) {\n    if (v === '' || v === undefined) {\n      delete expanded[styleKey];\n    } else {\n      const unit = CSS_UNIT_MAP[styleKey];\n      expanded[styleKey] = unit && typeof v === 'number' ? `${v}${unit}` : v;\n    }\n  }\n\n  ensureBorderStyleFallback(expanded);\n\n  const newStyle = jsToInlineCss(expanded);\n  const tr = editor.state.tr.setNodeMarkup(parentPos, null, {\n    ...node.attrs,\n    style: newStyle,\n  });\n  editor.view.dispatch(tr);\n}\n\nexport function updateParentBlockPadding(\n  editor: Editor | null,\n  parentPos: number,\n  values: Record<string, number | undefined>,\n): void {\n  if (!editor || parentPos < 0) {\n    return;\n  }\n  const node = editor.state.doc.nodeAt(parentPos);\n  if (!node) {\n    return;\n  }\n  const currentStyle = (node.attrs.style as string) || '';\n  const parsed = inlineCssToJs(currentStyle, { removeUnit: false });\n  const expanded = expandShorthandProperties(parsed) as Record<\n    string,\n    string | number\n  >;\n  for (const key of PADDING_KEYS) {\n    if (values[key] === undefined) {\n      delete expanded[key];\n    } else {\n      expanded[key] = `${values[key]}px`;\n    }\n  }\n  const newStyle = jsToInlineCss(expanded);\n  const tr = editor.state.tr.setNodeMarkup(parentPos, null, {\n    ...node.attrs,\n    style: newStyle,\n  });\n  editor.view.dispatch(tr);\n}\n\nexport function textTypeValue(nodeType: string, level?: number): string {\n  if (nodeType === 'paragraph') {\n    return 'body';\n  }\n  if (nodeType === 'heading') {\n    if (level === 1) {\n      return 'title';\n    }\n    if (level === 2) {\n      return 'subtitle';\n    }\n    if (level === 3) {\n      return 'heading';\n    }\n  }\n  return 'body';\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function applyMarkToggles(\n  chain: any,\n  arr: string[],\n  state: EditorSnapshot,\n) {\n  let result = chain;\n  for (const { value, active, toggle } of MARK_TOGGLES) {\n    if (arr.includes(value) !== active(state)) {\n      result = result[toggle]();\n    }\n  }\n  return result;\n}\n","'use client';\n\nimport { useCurrentEditor, useEditorState } from '@tiptap/react';\nimport type * as React from 'react';\nimport {\n  stylesToCss,\n  useEmailTheming,\n} from '../../plugins/email-theming/extension';\nimport type { KnownCssProperties } from '../../plugins/email-theming/types';\nimport { inlineCssToJs } from '../../utils/styles';\nimport { useDocumentColors } from './hooks/use-document-colors';\nimport {\n  getLinkColor,\n  updateLinkColor,\n  useLinkMark,\n} from './hooks/use-link-mark';\nimport { useInspector } from './root';\nimport { LinkSection } from './sections/link';\nimport { TypographySection } from './sections/typography';\nimport { resolveThemeDefaults } from './utils/resolve-theme-defaults';\nimport {\n  getParentBlockInfo,\n  updateParentBlockStyle,\n} from './utils/text-block-utils';\n\nexport interface InspectorTextContext {\n  marks: Record<string, boolean>;\n  toggleMark: (mark: string) => void;\n  alignment: string;\n  setAlignment: (value: string) => void;\n  linkHref: string;\n  linkColor: string;\n  setLinkColor: (color: string) => void;\n  isLinkActive: boolean;\n  getStyle: (prop: KnownCssProperties) => string | number | undefined;\n  setStyle: (prop: KnownCssProperties, value: string | number) => void;\n  presetColors: string[];\n}\n\nexport interface InspectorTextProps {\n  children?: (context: InspectorTextContext) => React.ReactNode;\n}\n\nconst MARK_NAMES = ['bold', 'italic', 'underline', 'strike', 'code'] as const;\n\nexport function InspectorText({ children }: InspectorTextProps) {\n  const { editor } = useCurrentEditor();\n  const theming = useEmailTheming(editor);\n  const { target } = useInspector();\n  const documentColors = useDocumentColors(editor);\n  const linkMark = useLinkMark(editor);\n\n  const activeMarks =\n    useEditorState({\n      editor,\n      selector: ({ editor: ed }) => {\n        if (!ed) return {} as Record<string, boolean>;\n        const result: Record<string, boolean> = {};\n        for (const mark of MARK_NAMES) {\n          result[mark] = ed.isActive(mark);\n        }\n        return result;\n      },\n    }) ?? ({} as Record<string, boolean>);\n\n  const parentBlock = useEditorState({\n    editor,\n    selector: ({ editor: ed }) => getParentBlockInfo(ed),\n  });\n\n  if (!editor || !theming || target !== 'text') {\n    return null;\n  }\n\n  const css = stylesToCss(theming.styles, theming.theme);\n  const parentAttrs = parentBlock?.attrs ?? {};\n  const parentNodeType = parentBlock?.nodeType ?? 'paragraph';\n  const parentPos = parentBlock?.pos ?? 0;\n\n  const themeDefaults = resolveThemeDefaults(\n    parentNodeType,\n    parentAttrs as Record<string, unknown>,\n    css,\n  );\n\n  const parentStyle = inlineCssToJs(String(parentAttrs.style || ''));\n  const mergedStyles: Record<string, string | number | undefined> = {\n    ...themeDefaults,\n    ...parentStyle,\n  };\n\n  const themeLinkColor = css.link?.color ? String(css.link.color) : undefined;\n\n  const context: InspectorTextContext = {\n    marks: activeMarks,\n    toggleMark: (mark: string) => {\n      editor.chain().focus().toggleMark(mark).run();\n    },\n    alignment: parentBlock?.alignment ?? 'left',\n    setAlignment: (value: string) => {\n      if (!parentBlock) return;\n      editor\n        .chain()\n        .focus()\n        .updateAttributes(parentNodeType, { alignment: value })\n        .run();\n    },\n    linkHref: linkMark.href,\n    linkColor: getLinkColor(linkMark.style, themeLinkColor),\n    setLinkColor: (color: string) => {\n      updateLinkColor(editor, linkMark.style, color);\n    },\n    isLinkActive: linkMark.isActive,\n    getStyle: (prop: KnownCssProperties) => mergedStyles[prop],\n    setStyle: (prop: KnownCssProperties, value: string | number) => {\n      updateParentBlockStyle(editor, parentPos, prop, value);\n    },\n    presetColors: documentColors,\n  };\n\n  if (children) {\n    return <>{children(context)}</>;\n  }\n\n  return <InspectorTextDefaults context={context} />;\n}\n\nfunction InspectorTextDefaults({ context }: { context: InspectorTextContext }) {\n  return (\n    <>\n      <TypographySection {...context} />\n      {context.isLinkActive && <LinkSection {...context} />}\n    </>\n  );\n}\n","'use client';\n\nimport { InspectorBreadcrumb } from './breadcrumb';\nimport { InspectorDocument } from './document';\nimport { InspectorNode } from './node';\nimport { InspectorRoot } from './root';\nimport { AttributesSection } from './sections/attributes';\nimport { BackgroundSection } from './sections/background';\nimport { BorderSection } from './sections/border';\nimport { ColumnSpacingSection } from './sections/column-spacing';\nimport { LinkSection } from './sections/link';\nimport { PaddingSection } from './sections/padding';\nimport { SizeSection } from './sections/size';\nimport { TypographySection } from './sections/typography';\nimport { InspectorText } from './text';\n\nexport const Inspector = {\n  Root: InspectorRoot,\n  Breadcrumb: InspectorBreadcrumb,\n  Document: InspectorDocument,\n  Node: InspectorNode,\n  Text: InspectorText,\n  Attributes: AttributesSection,\n  Background: BackgroundSection,\n  Border: BorderSection,\n  ColumnSpacing: ColumnSpacingSection,\n  Link: LinkSection,\n  Padding: PaddingSection,\n  Size: SizeSection,\n  Typography: TypographySection,\n};\n\nexport type { NodeMeta } from './config/node-meta';\nexport { getNodeMeta } from './config/node-meta';\nexport type { InspectorDocumentProps } from './document';\nexport type { InspectorNodeContext, InspectorNodeProps } from './node';\nexport type { InspectorTextContext, InspectorTextProps } from './text';\n"],"mappings":";;;;;;;;;;;;AAEA,SAAgB,wBAAwB,EACtC,MACA,OACA,QACA,GAAG,SACS;AACZ,QACE,qBAAC,OAAD;EACE,OAAM;EACN,OAAO,QAAQ,SAAS;EACxB,QAAQ,QAAQ,UAAU;EAC1B,SAAQ;EACR,MAAK;EACL,QAAO;EACP,aAAa;EACb,eAAc;EACd,gBAAe;EACf,eAAY;EACZ,GAAI;YAXN;GAaE,oBAAC,QAAD,EAAM,GAAE,YAAa,CAAA;GACrB,oBAAC,QAAD,EAAM,GAAE,2CAA4C,CAAA;GACpD,oBAAC,QAAD,EAAM,GAAE,6CAA8C,CAAA;GACtD,oBAAC,QAAD,EAAM,GAAE,4CAA6C,CAAA;GACrD,oBAAC,QAAD,EAAM,GAAE,6CAA8C,CAAA;GAClD;;;;;ACzBV,SAAgB,qBAAqB,EACnC,MACA,OACA,QACA,GAAG,SACS;AACZ,QACE,qBAAC,OAAD;EACE,OAAM;EACN,OAAO,QAAQ,SAAS;EACxB,QAAQ,QAAQ,UAAU;EAC1B,SAAQ;EACR,MAAK;EACL,QAAO;EACP,aAAa;EACb,eAAc;EACd,gBAAe;EACf,eAAY;EACZ,GAAI;YAXN;GAaE,oBAAC,QAAD;IAAM,OAAM;IAAI,QAAO;IAAI,GAAE;IAAI,GAAE;IAAK,IAAG;IAAM,CAAA;GACjD,oBAAC,QAAD;IAAM,OAAM;IAAK,QAAO;IAAI,GAAE;IAAI,GAAE;IAAI,IAAG;IAAM,CAAA;GACjD,oBAAC,QAAD,EAAM,GAAE,YAAa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