{"version":3,"file":"Quote.mjs","sources":["../../../../../../../../admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Quote.tsx"],"sourcesContent":["import { Quotes } from '@strapi/icons';\nimport { styled } from 'styled-components';\n\nimport { type BlocksStore } from '../BlocksEditor';\nimport { baseHandleConvert } from '../utils/conversions';\nimport { pressEnterTwiceToExit } from '../utils/enterKey';\nimport { type Block } from '../utils/types';\n\nconst Blockquote = styled.blockquote.attrs({ role: 'blockquote' })`\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n border-left: ${({ theme }) => `${theme.spaces[1]} solid ${theme.colors.neutral200}`};\n padding: ${({ theme }) => theme.spaces[2]} ${({ theme }) => theme.spaces[4]};\n color: ${({ theme }) => theme.colors.neutral600};\n`;\n\nconst quoteBlocks: Pick = {\n quote: {\n renderElement: (props) => (\n // The div is needed to make sure the padding bottom from BlocksContent is applied properly\n // when the quote is the last block in the editor\n
\n
{props.children}
\n
\n ),\n icon: Quotes,\n label: {\n id: 'components.Blocks.blocks.quote',\n defaultMessage: 'Quote',\n },\n matchNode: (node) => node.type === 'quote',\n isInBlocksSelector: true,\n handleConvert(editor) {\n baseHandleConvert>(editor, { type: 'quote' });\n },\n handleEnterKey(editor) {\n pressEnterTwiceToExit(editor);\n },\n snippets: ['>'],\n },\n};\n\nexport { quoteBlocks };\n"],"names":["Blockquote","styled","blockquote","attrs","role","theme","fontWeights","regular","spaces","colors","neutral200","neutral600","quoteBlocks","quote","renderElement","props","_jsx","div","attributes","children","icon","Quotes","label","id","defaultMessage","matchNode","node","type","isInBlocksSelector","handleConvert","editor","baseHandleConvert","handleEnterKey","pressEnterTwiceToExit","snippets"],"mappings":";;;;;;AAQA,MAAMA,UAAAA,GAAaC,MAAAA,CAAOC,UAAU,CAACC,KAAK,CAAC;IAAEC,IAAAA,EAAM;AAAa,CAAA,CAAE;eACnD,EAAE,CAAC,EAAEC,KAAK,EAAE,GAAKA,KAAAA,CAAMC,WAAW,CAACC,OAAO,CAAC;AAC3C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