{"version":3,"file":"Image.cjs","sourceRoot":"","sources":["../../../src/jsx/components/Image.ts"],"names":[],"mappings":";;;AACA,gDAAmD;AAoBnD,MAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;;;;;;;;;;;;;;;;GAkBG;AACU,QAAA,KAAK,GAAG,IAAA,+BAAmB,EAA0B,IAAI,CAAC,CAAC","sourcesContent":["import type { BorderRadius } from './utils';\nimport { createSnapComponent } from '../component';\n\n/**\n * The props of the {@link Image} component.\n *\n * @property src - The SVG image to display. This should be an SVG string, and\n * other formats such as PNG and JPEG are not supported directly. You can use\n * the `data:` URL scheme to embed images inside the SVG.\n * @property alt - The alternative text of the image, which describes the image\n * for users who cannot see it.\n * @category Component Props\n */\ntype ImageProps = {\n  src: string;\n  alt?: string | undefined;\n  borderRadius?: BorderRadius | undefined;\n  height?: number | undefined;\n  width?: number | undefined;\n};\n\nconst TYPE = 'Image';\n\n/**\n * An image component, which is used to display an image.\n *\n * This component does not accept any children.\n *\n * @param props - The props of the component.\n * @param props.src - The URL of the image to display. This should be an SVG\n * string, and other formats such as PNG and JPEG are not supported directly.\n * You can use the `data:` URL scheme to embed images inside the SVG.\n * @param props.alt - The alternative text of the image, which describes the\n * image for users who cannot see it.\n * @param props.borderRadius - The border radius applied to the image.\n * @param props.width - The width of the image.\n * @param props.height - The height of the image.\n * @returns An image element.\n * @example\n * <Image src=\"<svg>...</svg>\" alt=\"An example image\" />\n * @category Components\n */\nexport const Image = createSnapComponent<ImageProps, typeof TYPE>(TYPE);\n\n/**\n * An image element.\n *\n * @see {@link Image}\n * @category Elements\n */\nexport type ImageElement = ReturnType<typeof Image>;\n"]}