{"version":3,"sources":["../../../src/size/deserializer/html.ts"],"sourcesContent":["import { HTMLDeserializerWithTransform } from '@editablejs/deserializer/html'\nimport { isDOMHTMLElement } from '@editablejs/models'\nimport { FontSize } from '../interfaces/font-size'\n\nexport const withFontSizeHTMLDeserializerTransform: HTMLDeserializerWithTransform = next => {\n  return (node, options = {}) => {\n    const { text } = options\n    if (isDOMHTMLElement(node)) {\n      const { fontSize } = node.style\n      if (fontSize) {\n        const fontsize: Partial<FontSize> = {\n          ...text,\n          fontSize,\n        }\n        return next(node, {\n          ...options,\n          text: fontsize,\n        })\n      }\n    }\n    return next(node, options)\n  }\n}\n"],"mappings":";AACA,SAAS,wBAAwB;AAG1B,IAAM,wCAAuE,UAAQ;AAC1F,SAAO,CAAC,MAAM,UAAU,CAAC,MAAM;AAC7B,UAAM,EAAE,KAAK,IAAI;AACjB,QAAI,iBAAiB,IAAI,GAAG;AAC1B,YAAM,EAAE,SAAS,IAAI,KAAK;AAC1B,UAAI,UAAU;AACZ,cAAM,WAA8B;AAAA,UAClC,GAAG;AAAA,UACH;AAAA,QACF;AACA,eAAO,KAAK,MAAM;AAAA,UAChB,GAAG;AAAA,UACH,MAAM;AAAA,QACR,CAAC;AAAA,MACH;AAAA,IACF;AACA,WAAO,KAAK,MAAM,OAAO;AAAA,EAC3B;AACF;","names":[]}