{"version":3,"sources":["../../../src/size/serializer/html.ts"],"sourcesContent":["import { HTMLSerializerWithTransform } from '@editablejs/serializer/html'\nimport { FontSize } from '../interfaces/font-size'\n\nexport const withFontSizeHTMLSerializerTransform: HTMLSerializerWithTransform = (\n  next,\n  serializer,\n  customOptions = {},\n) => {\n  const { attributes: customAttributes, style: customStyle } = customOptions\n  return (node, options) => {\n    const { attributes, style } = options ?? {}\n    if (FontSize.isFontSize(node)) {\n      const { fontSize, text } = node\n      return serializer.create(\n        'span',\n        serializer.mergeOptions(node, attributes, customAttributes),\n        serializer.mergeOptions(node, style, customStyle, { fontSize }),\n        text,\n      )\n    }\n    return next(node, options)\n  }\n}\n"],"mappings":";;;;;AAGO,IAAM,sCAAmE,CAC9E,MACA,YACA,gBAAgB,CAAC,MACd;AACH,QAAM,EAAE,YAAY,kBAAkB,OAAO,YAAY,IAAI;AAC7D,SAAO,CAAC,MAAM,YAAY;AACxB,UAAM,EAAE,YAAY,MAAM,IAAI,WAAW,CAAC;AAC1C,QAAI,SAAS,WAAW,IAAI,GAAG;AAC7B,YAAM,EAAE,UAAU,KAAK,IAAI;AAC3B,aAAO,WAAW;AAAA,QAChB;AAAA,QACA,WAAW,aAAa,MAAM,YAAY,gBAAgB;AAAA,QAC1D,WAAW,aAAa,MAAM,OAAO,aAAa,EAAE,SAAS,CAAC;AAAA,QAC9D;AAAA,MACF;AAAA,IACF;AACA,WAAO,KAAK,MAAM,OAAO;AAAA,EAC3B;AACF;","names":[]}