@frontify/fondue 12.0.0-beta.314 → 12.0.0-beta.316

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- import s from "react";
1
+ import n from "react";
2
2
  import { useElementProps as i } from "@udecode/plate";
3
3
  import { LINK_PLUGIN as m } from "../id.es.js";
4
- import { getUrlFromLinkOrLegacyLink as a } from "../utils/getUrl.es.js";
5
- import { useRichTextEditorContext as p } from "../../../context/RichTextEditorContext.es.js";
4
+ import { getUrlFromLinkOrLegacyLink as p } from "../utils/getUrl.es.js";
5
+ import { useRichTextEditorContext as a } from "../../../context/RichTextEditorContext.es.js";
6
6
  const c = (r) => ({
7
7
  ...i({
8
8
  ...r,
9
9
  elementToAttributes: (t) => ({
10
- href: a(t),
11
- target: t.target || "_blank"
10
+ href: p(t),
11
+ target: t.target || "_self"
12
12
  })
13
13
  }),
14
14
  // quick fix: hovering <a> with href loses the editor focus
@@ -16,8 +16,8 @@ const c = (r) => ({
16
16
  t.stopPropagation();
17
17
  }
18
18
  }), h = (r) => {
19
- const e = c(r), { attributes: t, children: o } = r, { styles: n } = p();
20
- return /* @__PURE__ */ s.createElement("a", { ...t, href: e.href, target: e.target, style: n[m] }, o);
19
+ const e = c(r), { attributes: t, children: o } = r, { styles: s } = a();
20
+ return /* @__PURE__ */ n.createElement("a", { ...t, href: e.href, target: e.target, style: s[m] }, o);
21
21
  };
22
22
  export {
23
23
  h as LinkMarkupElementNode
@@ -1 +1 @@
1
- {"version":3,"file":"LinkMarkupElementNode.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React, { MouseEvent } from 'react';\nimport { HTMLPropsAs, LinkRootProps, useElementProps } from '@udecode/plate';\nimport { getUrlFromLinkOrLegacyLink } from '../utils';\nimport { TLinkElement } from '../types';\nimport { useRichTextEditorContext } from '@components/RichTextEditor/context';\nimport { LINK_PLUGIN } from '../id';\n\nconst useLink = (props: LinkRootProps): HTMLPropsAs<'a'> => {\n const _props = useElementProps<TLinkElement, 'a'>({\n ...props,\n elementToAttributes: (element) => ({\n href: getUrlFromLinkOrLegacyLink(element),\n target: element.target || '_blank',\n }),\n });\n\n return {\n ..._props,\n // quick fix: hovering <a> with href loses the editor focus\n onMouseOver: (e: MouseEvent) => {\n e.stopPropagation();\n },\n };\n};\n\nexport const LinkMarkupElementNode = (props: LinkRootProps) => {\n const htmlProps = useLink(props);\n const { attributes, children } = props;\n const { styles } = useRichTextEditorContext();\n\n return (\n <a {...attributes} href={htmlProps.href} target={htmlProps.target} style={styles[LINK_PLUGIN]}>\n {children}\n </a>\n );\n};\n"],"names":["useLink","props","useElementProps","element","getUrlFromLinkOrLegacyLink","e","LinkMarkupElementNode","htmlProps","attributes","children","styles","useRichTextEditorContext","React","LINK_PLUGIN"],"mappings":";;;;;AASA,MAAMA,IAAU,CAACC,OASN;AAAA,EACH,GATWC,EAAmC;AAAA,IAC9C,GAAGD;AAAA,IACH,qBAAqB,CAACE,OAAa;AAAA,MAC/B,MAAMC,EAA2BD,CAAO;AAAA,MACxC,QAAQA,EAAQ,UAAU;AAAA,IAAA;AAAA,EAC9B,CACH;AAAA;AAAA,EAKG,aAAa,CAACE,MAAkB;AAC5B,IAAAA,EAAE,gBAAgB;AAAA,EACtB;AAAA,IAIKC,IAAwB,CAACL,MAAyB;AACrD,QAAAM,IAAYP,EAAQC,CAAK,GACzB,EAAE,YAAAO,GAAY,UAAAC,EAAa,IAAAR,GAC3B,EAAE,QAAAS,MAAWC;AAEnB,SACK,gBAAAC,EAAA,cAAA,KAAA,EAAG,GAAGJ,GAAY,MAAMD,EAAU,MAAM,QAAQA,EAAU,QAAQ,OAAOG,EAAOG,CAAW,KACvFJ,CACL;AAER;"}
1
+ {"version":3,"file":"LinkMarkupElementNode.es.js","sources":["../../../../../../src/components/RichTextEditor/Plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React, { MouseEvent } from 'react';\nimport { HTMLPropsAs, LinkRootProps, useElementProps } from '@udecode/plate';\nimport { getUrlFromLinkOrLegacyLink } from '../utils';\nimport { TLinkElement } from '../types';\nimport { useRichTextEditorContext } from '@components/RichTextEditor/context';\nimport { LINK_PLUGIN } from '../id';\n\nconst useLink = (props: LinkRootProps): HTMLPropsAs<'a'> => {\n const _props = useElementProps<TLinkElement, 'a'>({\n ...props,\n elementToAttributes: (element) => ({\n href: getUrlFromLinkOrLegacyLink(element),\n target: element.target || '_self',\n }),\n });\n\n return {\n ..._props,\n // quick fix: hovering <a> with href loses the editor focus\n onMouseOver: (e: MouseEvent) => {\n e.stopPropagation();\n },\n };\n};\n\nexport const LinkMarkupElementNode = (props: LinkRootProps) => {\n const htmlProps = useLink(props);\n const { attributes, children } = props;\n const { styles } = useRichTextEditorContext();\n\n return (\n <a {...attributes} href={htmlProps.href} target={htmlProps.target} style={styles[LINK_PLUGIN]}>\n {children}\n </a>\n );\n};\n"],"names":["useLink","props","useElementProps","element","getUrlFromLinkOrLegacyLink","e","LinkMarkupElementNode","htmlProps","attributes","children","styles","useRichTextEditorContext","React","LINK_PLUGIN"],"mappings":";;;;;AASA,MAAMA,IAAU,CAACC,OASN;AAAA,EACH,GATWC,EAAmC;AAAA,IAC9C,GAAGD;AAAA,IACH,qBAAqB,CAACE,OAAa;AAAA,MAC/B,MAAMC,EAA2BD,CAAO;AAAA,MACxC,QAAQA,EAAQ,UAAU;AAAA,IAAA;AAAA,EAC9B,CACH;AAAA;AAAA,EAKG,aAAa,CAACE,MAAkB;AAC5B,IAAAA,EAAE,gBAAgB;AAAA,EACtB;AAAA,IAIKC,IAAwB,CAACL,MAAyB;AACrD,QAAAM,IAAYP,EAAQC,CAAK,GACzB,EAAE,YAAAO,GAAY,UAAAC,EAAa,IAAAR,GAC3B,EAAE,QAAAS,MAAWC;AAEnB,SACK,gBAAAC,EAAA,cAAA,KAAA,EAAG,GAAGJ,GAAY,MAAMD,EAAU,MAAM,QAAQA,EAAU,QAAQ,OAAOG,EAAOG,CAAW,KACvFJ,CACL;AAER;"}
@@ -1,3 +1,4 @@
1
1
  import { TElement } from '@udecode/plate';
2
2
  import { CSSPropertiesHover } from '../types';
3
- export declare const buttonNode: (node: TElement, children: string, defaultClassNames: string, styles: Record<string, CSSPropertiesHover>) => string;
3
+ export type ButtonStylesType = Record<string, Record<string, CSSPropertiesHover>>;
4
+ export declare const buttonNode: (node: TElement, children: string, defaultClassNames: string, styles: ButtonStylesType) => string;
@@ -1,8 +1,8 @@
1
1
  import { reactCssPropsToCss as s } from "../utils/reactCssPropsToCss.es.js";
2
- const b = (t, n, u, a) => {
3
- const o = t.buttonType ?? "primary", l = `button${o.charAt(0).toUpperCase()}${o.slice(1)}`, e = a[l], r = s(e);
2
+ const i = (t, n, u, l) => {
3
+ const a = l["button-plugin"], o = t.buttonStyle ?? "primary", b = `button${o.charAt(0).toUpperCase()}${o.slice(1)}`, e = a[b], r = s(e);
4
4
  return `<a href="${t.url}"
5
- target="${t.target ?? "_blank"}"
5
+ target="${t.target ?? "_self"}"
6
6
  dir="auto"
7
7
  style="${r}"
8
8
  class="${u}"
@@ -11,6 +11,6 @@ const b = (t, n, u, a) => {
11
11
  >${n}</a>`;
12
12
  };
13
13
  export {
14
- b as buttonNode
14
+ i as buttonNode
15
15
  };
16
16
  //# sourceMappingURL=button.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.es.js","sources":["../../../../../src/components/RichTextEditor/serializer/nodes/button.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { TElement } from '@udecode/plate';\nimport { reactCssPropsToCss } from '../utils/reactCssPropsToCss';\nimport { CSSPropertiesHover } from '../types';\n\nexport const buttonNode = (\n node: TElement,\n children: string,\n defaultClassNames: string,\n styles: Record<string, CSSPropertiesHover>,\n) => {\n const buttonTypeString = (node.buttonType as string) ?? 'primary';\n const buttonType = `button${buttonTypeString.charAt(0).toUpperCase()}${buttonTypeString.slice(1)}`;\n const buttonStyle = styles[buttonType];\n\n const defaultStyles = reactCssPropsToCss(buttonStyle);\n return `<a href=\"${node.url}\"\n target=\"${node.target ?? '_blank'}\"\n dir=\"auto\"\n style=\"${defaultStyles}\"\n class=\"${defaultClassNames}\"\n onmouseenter=\"this.setAttribute('style', '${defaultStyles} ${reactCssPropsToCss(buttonStyle.hover)}');\"\n onmouseleave=\"this.setAttribute('style', '${reactCssPropsToCss(buttonStyle)}');\"\n >${children}</a>`;\n};\n"],"names":["buttonNode","node","children","defaultClassNames","styles","buttonTypeString","buttonType","buttonStyle","defaultStyles","reactCssPropsToCss"],"mappings":";AAMO,MAAMA,IAAa,CACtBC,GACAC,GACAC,GACAC,MACC;AACK,QAAAC,IAAoBJ,EAAK,cAAyB,WAClDK,IAAa,SAASD,EAAiB,OAAO,CAAC,EAAE,YAAY,IAAIA,EAAiB,MAAM,CAAC,KACzFE,IAAcH,EAAOE,CAAU,GAE/BE,IAAgBC,EAAmBF,CAAW;AACpD,SAAO,YAAYN,EAAK;AAAA,0BACFA,EAAK,UAAU;AAAA;AAAA,yBAEhBO;AAAA,yBACAL;AAAA,4DACmCK,KAAiBC,EAAmBF,EAAY,KAAK;AAAA,4DACrDE,EAAmBF,CAAW;AAAA,mBACvEL;AACnB;"}
1
+ {"version":3,"file":"button.es.js","sources":["../../../../../src/components/RichTextEditor/serializer/nodes/button.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { TElement } from '@udecode/plate';\nimport { reactCssPropsToCss } from '../utils/reactCssPropsToCss';\nimport { CSSPropertiesHover } from '../types';\n\nexport type ButtonStylesType = Record<string, Record<string, CSSPropertiesHover>>;\n\nexport const buttonNode = (node: TElement, children: string, defaultClassNames: string, styles: ButtonStylesType) => {\n const buttonStyles = styles['button-plugin'];\n const buttonTypeString = (node.buttonStyle as string) ?? 'primary';\n const buttonType = `button${buttonTypeString.charAt(0).toUpperCase()}${buttonTypeString.slice(1)}`;\n const buttonStyle = buttonStyles[buttonType];\n\n const defaultStyles = reactCssPropsToCss(buttonStyle);\n return `<a href=\"${node.url}\"\n target=\"${node.target ?? '_self'}\"\n dir=\"auto\"\n style=\"${defaultStyles}\"\n class=\"${defaultClassNames}\"\n onmouseenter=\"this.setAttribute('style', '${defaultStyles} ${reactCssPropsToCss(buttonStyle.hover)}');\"\n onmouseleave=\"this.setAttribute('style', '${reactCssPropsToCss(buttonStyle)}');\"\n >${children}</a>`;\n};\n"],"names":["buttonNode","node","children","defaultClassNames","styles","buttonStyles","buttonTypeString","buttonType","buttonStyle","defaultStyles","reactCssPropsToCss"],"mappings":";AAQO,MAAMA,IAAa,CAACC,GAAgBC,GAAkBC,GAA2BC,MAA6B;AAC3G,QAAAC,IAAeD,EAAO,eAAe,GACrCE,IAAoBL,EAAK,eAA0B,WACnDM,IAAa,SAASD,EAAiB,OAAO,CAAC,EAAE,YAAY,IAAIA,EAAiB,MAAM,CAAC,KACzFE,IAAcH,EAAaE,CAAU,GAErCE,IAAgBC,EAAmBF,CAAW;AACpD,SAAO,YAAYP,EAAK;AAAA,0BACFA,EAAK,UAAU;AAAA;AAAA,yBAEhBQ;AAAA,yBACAN;AAAA,4DACmCM,KAAiBC,EAAmBF,EAAY,KAAK;AAAA,4DACrDE,EAAmBF,CAAW;AAAA,mBACvEN;AACnB;"}
@@ -1,13 +1,13 @@
1
- import p from "escape-html";
2
- import { reactCssPropsToCss as e } from "../utils/reactCssPropsToCss.es.js";
3
- import { LINK_PLUGIN as f } from "../../Plugins/LinkPlugin/id.es.js";
1
+ import e from "escape-html";
2
+ import { reactCssPropsToCss as f } from "../utils/reactCssPropsToCss.es.js";
3
+ import { LINK_PLUGIN as p } from "../../Plugins/LinkPlugin/id.es.js";
4
4
  const u = (r, a, s, $) => {
5
5
  var l;
6
6
  if (r.chosenLink) {
7
7
  const { chosenLink: t } = r;
8
- return `<a dir="auto" class="${s}" style="${e($[f])}" target=${t != null && t.openInNewTab ? "_blank" : "_self"} href="${p((l = t == null ? void 0 : t.searchResult) == null ? void 0 : l.link)}">${a}</a>`;
8
+ return `<a dir="auto" class="${s}" style="${f($[p])}" target=${t != null && t.openInNewTab ? "_blank" : "_self"} href="${e((l = t == null ? void 0 : t.searchResult) == null ? void 0 : l.link)}">${a}</a>`;
9
9
  }
10
- return `<a dir="auto" class="${s}" style="${e($[f])}" target="${(r == null ? void 0 : r.target) ?? "_blank"}" href="${p(r.url)}">${a}</a>`;
10
+ return `<a dir="auto" class="${s}" style="${f($[p])}" target="${(r == null ? void 0 : r.target) ?? "_self"}" href="${e(r.url)}">${a}</a>`;
11
11
  };
12
12
  export {
13
13
  u as linkNode
@@ -1 +1 @@
1
- {"version":3,"file":"link.es.js","sources":["../../../../../src/components/RichTextEditor/serializer/nodes/link.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { TLinkElement } from '@components/RichTextEditor/Plugins/LinkPlugin/types';\nimport { TElement } from '@udecode/plate';\nimport escapeHtml from 'escape-html';\nimport { reactCssPropsToCss } from '../utils/reactCssPropsToCss';\nimport { CSSPropertiesHover } from '../types';\nimport { LINK_PLUGIN } from '@components/RichTextEditor/Plugins/LinkPlugin/id';\n\nexport const linkNode = (\n node: TElement,\n children: string,\n defaultClassNames: string,\n styles: Record<string, CSSPropertiesHover>,\n) => {\n if (node.chosenLink) {\n const { chosenLink } = node as TLinkElement;\n return `<a dir=\"auto\" class=\"${defaultClassNames}\" style=\"${reactCssPropsToCss(styles[LINK_PLUGIN])}\" target=${\n chosenLink?.openInNewTab ? '_blank' : '_self'\n } href=\"${escapeHtml(chosenLink?.searchResult?.link)}\">${children}</a>`;\n }\n return `<a dir=\"auto\" class=\"${defaultClassNames}\" style=\"${reactCssPropsToCss(styles[LINK_PLUGIN])}\" target=\"${\n node?.target ?? '_blank'\n }\" href=\"${escapeHtml(node.url as string)}\">${children}</a>`;\n};\n"],"names":["linkNode","node","children","defaultClassNames","styles","chosenLink","reactCssPropsToCss","LINK_PLUGIN","escapeHtml","_a"],"mappings":";;;AASO,MAAMA,IAAW,CACpBC,GACAC,GACAC,GACAC,MACC;;AACD,MAAIH,EAAK,YAAY;AACX,UAAA,EAAE,YAAAI,EAAe,IAAAJ;AACvB,WAAO,wBAAwBE,aAA6BG,EAAmBF,EAAOG,CAAW,CAAC,aAC9FF,KAAA,QAAAA,EAAY,eAAe,WAAW,iBAChCG,GAAWC,IAAAJ,KAAA,gBAAAA,EAAY,iBAAZ,gBAAAI,EAA0B,IAAI,MAAMP;AAAA,EAC7D;AACA,SAAO,wBAAwBC,aAA6BG,EAAmBF,EAAOG,CAAW,CAAC,eAC9FN,KAAA,gBAAAA,EAAM,WAAU,mBACTO,EAAWP,EAAK,GAAa,MAAMC;AAClD;"}
1
+ {"version":3,"file":"link.es.js","sources":["../../../../../src/components/RichTextEditor/serializer/nodes/link.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { TLinkElement } from '@components/RichTextEditor/Plugins/LinkPlugin/types';\nimport { TElement } from '@udecode/plate';\nimport escapeHtml from 'escape-html';\nimport { reactCssPropsToCss } from '../utils/reactCssPropsToCss';\nimport { CSSPropertiesHover } from '../types';\nimport { LINK_PLUGIN } from '@components/RichTextEditor/Plugins/LinkPlugin/id';\n\nexport const linkNode = (\n node: TElement,\n children: string,\n defaultClassNames: string,\n styles: Record<string, CSSPropertiesHover>,\n) => {\n if (node.chosenLink) {\n const { chosenLink } = node as TLinkElement;\n return `<a dir=\"auto\" class=\"${defaultClassNames}\" style=\"${reactCssPropsToCss(styles[LINK_PLUGIN])}\" target=${\n chosenLink?.openInNewTab ? '_blank' : '_self'\n } href=\"${escapeHtml(chosenLink?.searchResult?.link)}\">${children}</a>`;\n }\n return `<a dir=\"auto\" class=\"${defaultClassNames}\" style=\"${reactCssPropsToCss(styles[LINK_PLUGIN])}\" target=\"${\n node?.target ?? '_self'\n }\" href=\"${escapeHtml(node.url as string)}\">${children}</a>`;\n};\n"],"names":["linkNode","node","children","defaultClassNames","styles","chosenLink","reactCssPropsToCss","LINK_PLUGIN","escapeHtml","_a"],"mappings":";;;AASO,MAAMA,IAAW,CACpBC,GACAC,GACAC,GACAC,MACC;;AACD,MAAIH,EAAK,YAAY;AACX,UAAA,EAAE,YAAAI,EAAe,IAAAJ;AACvB,WAAO,wBAAwBE,aAA6BG,EAAmBF,EAAOG,CAAW,CAAC,aAC9FF,KAAA,QAAAA,EAAY,eAAe,WAAW,iBAChCG,GAAWC,IAAAJ,KAAA,gBAAAA,EAAY,iBAAZ,gBAAAI,EAA0B,IAAI,MAAMP;AAAA,EAC7D;AACA,SAAO,wBAAwBC,aAA6BG,EAAmBF,EAAOG,CAAW,CAAC,eAC9FN,KAAA,gBAAAA,EAAM,WAAU,kBACTO,EAAWP,EAAK,GAAa,MAAMC;AAClD;"}
@@ -1,5 +1,6 @@
1
1
  import { MappedMentionableItems } from '../../../RichTextEditor/Plugins';
2
2
  import { TDescendant } from '@udecode/plate';
3
+ import { ButtonStylesType } from '../nodes/button';
3
4
  import { CSSPropertiesHover } from '../types';
4
5
  type NestingCount = {
5
6
  [type: string]: number;
@@ -8,5 +9,5 @@ type SerializeNodeToHtmlRecursiveOptions = {
8
9
  mappedMentionable?: MappedMentionableItems;
9
10
  nestingCount?: NestingCount;
10
11
  };
11
- export declare const serializeNodeToHtmlRecursive: (node: TDescendant, styles: Record<string, CSSPropertiesHover>, { mappedMentionable, nestingCount }: SerializeNodeToHtmlRecursiveOptions) => string;
12
+ export declare const serializeNodeToHtmlRecursive: (node: TDescendant, styles: Record<string, CSSPropertiesHover> | ButtonStylesType, { mappedMentionable, nestingCount }: SerializeNodeToHtmlRecursiveOptions) => string;
12
13
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"serializeNodeToHtmlRecursive.es.js","sources":["../../../../../src/components/RichTextEditor/serializer/utils/serializeNodeToHtmlRecursive.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n ELEMENT_BUTTON,\n ELEMENT_CHECK_ITEM,\n MappedMentionableItems,\n OL_STYLES,\n TextStyles,\n UL_CLASSES,\n alignmentClassnames,\n getOrderedListClasses,\n} from '@components/RichTextEditor/Plugins';\nimport { getLicElementClassNames } from '@components/RichTextEditor/Plugins/ListPlugin/ListItemContentMarkupElement';\nimport { LI_CLASSNAMES, getLiStyles } from '@components/RichTextEditor/Plugins/ListPlugin/ListItemMarkupElement';\nimport {\n ELEMENT_LI,\n ELEMENT_LIC,\n ELEMENT_LINK,\n ELEMENT_MENTION,\n ELEMENT_OL,\n ELEMENT_UL,\n TDescendant,\n TElement,\n isText,\n} from '@udecode/plate';\nimport { merge } from '@utilities/merge';\nimport { buttonNode } from '../nodes/button';\nimport { checkItemNode } from '../nodes/checkItem';\nimport { linkNode } from '../nodes/link';\nimport { mentionHtmlNode } from '../nodes/mentionHtmlNode';\nimport { reactCssPropsToCss } from './reactCssPropsToCss';\nimport { serializeLeafToHtml } from './serializeLeafToHtml';\nimport { CSSPropertiesHover } from '../types';\n\nconst countNodesOfType = (nodes: TDescendant[], type: string): number => {\n return nodes.reduce((acc, node) => {\n if (node.type === type) {\n acc++;\n }\n if (node.children) {\n return acc + countNodesOfType(node.children as TDescendant[], type);\n }\n return acc;\n }, 0);\n};\n\ntype NestingCount = {\n [type: string]: number;\n};\n\ntype SerializeNodeToHtmlRecursiveOptions = {\n mappedMentionable?: MappedMentionableItems;\n nestingCount?: NestingCount;\n};\n\nexport const serializeNodeToHtmlRecursive = (\n node: TDescendant,\n styles: Record<string, CSSPropertiesHover>,\n { mappedMentionable, nestingCount = {} }: SerializeNodeToHtmlRecursiveOptions,\n): string => {\n if (isText(node)) {\n return serializeLeafToHtml(node);\n }\n\n const rootNestingCount = nestingCount[node.type] || countNodesOfType([node], node.type);\n let children = '';\n for (const element of node.children) {\n children += serializeNodeToHtmlRecursive(element, styles, {\n nestingCount: {\n ...nestingCount,\n [element.type as string]: rootNestingCount,\n },\n mappedMentionable,\n });\n }\n\n const htmlMapper = MapNodeTypesToHtml[node.type];\n try {\n return (\n htmlMapper({\n classNames: getClassNames(\n node.breakAfterColumn as string | undefined,\n node.align as string | undefined,\n ),\n children,\n rootNestingCount,\n node,\n mappedMentionable,\n styles,\n }) ?? children\n );\n } catch (error) {\n console.warn(`The htmlMapper for node type: '${node.type}' does not exist.`);\n return children;\n }\n};\n\ntype Arguments = {\n classNames: string;\n children: string;\n rootNestingCount: number;\n node: TElement;\n mappedMentionable?: MappedMentionableItems;\n styles: Record<string, CSSPropertiesHover>;\n};\n\nconst MapNodeTypesToHtml: { [key: string]: ({ ...args }: Arguments) => string } = {\n [TextStyles.heading1]: (args) => getTextStyleHtml(TextStyles.heading1, args, 'h1'),\n [TextStyles.heading2]: (args) => getTextStyleHtml(TextStyles.heading2, args, 'h2'),\n [TextStyles.heading3]: (args) => getTextStyleHtml(TextStyles.heading3, args, 'h3'),\n [TextStyles.heading4]: (args) => getTextStyleHtml(TextStyles.heading4, args, 'h4'),\n [TextStyles.p]: (args) => getTextStyleHtml(TextStyles.p, args, 'p'),\n [TextStyles.custom1]: (args) => getTextStyleHtml(TextStyles.custom1, args, 'p'),\n [TextStyles.custom2]: (args) => getTextStyleHtml(TextStyles.custom2, args, 'p'),\n [TextStyles.custom3]: (args) => getTextStyleHtml(TextStyles.custom3, args, 'p'),\n [TextStyles.quote]: (args) => getTextStyleHtml(TextStyles.quote, args, 'p'),\n [TextStyles.imageTitle]: (args) => getTextStyleHtml(TextStyles.imageTitle, args, 'p'),\n [TextStyles.imageCaption]: (args) => getTextStyleHtml(TextStyles.imageCaption, args, 'p'),\n [ELEMENT_UL]: (args) => `<ul dir=\"auto\" class=\"${UL_CLASSES} ${args.classNames}\">${args.children}</ul>`,\n [ELEMENT_OL]: ({ classNames, children, node, rootNestingCount }) => {\n const nestingLevel = Math.max(rootNestingCount - countNodesOfType([node], ELEMENT_OL), 0);\n return `<ol dir=\"auto\" class=\"${getOrderedListClasses(nestingLevel)} ${classNames}\" style=\"${reactCssPropsToCss(\n OL_STYLES,\n )}\">${children}</ol>`;\n },\n [ELEMENT_LI]: ({ classNames, children, node, styles }) =>\n `<li dir=\"auto\" class=\"${classNames} ${LI_CLASSNAMES}\" style=\"${reactCssPropsToCss(\n getLiStyles(node, styles),\n )}\">${children}</li>`,\n [ELEMENT_LIC]: ({ classNames, children, node }) =>\n `<p dir=\"auto\" class=\"${classNames} ${getLicElementClassNames(node)}\"><span>${children}</span></p>`,\n [ELEMENT_LINK]: ({ node, children, classNames, styles }) => linkNode(node, children, classNames, styles),\n [ELEMENT_BUTTON]: ({ node, children, classNames, styles }) => buttonNode(node, children, classNames, styles),\n [ELEMENT_CHECK_ITEM]: ({ node, children, classNames, styles }) => checkItemNode(node, children, classNames, styles),\n [ELEMENT_MENTION]: ({ node, mappedMentionable }) => mentionHtmlNode(node, { mentionable: mappedMentionable }),\n};\n\nconst getTextStyleHtml = (\n tag: TextStyles,\n { classNames, styles, children }: Arguments,\n htmlTag: 'p' | 'h1' | 'h2' | 'h3' | 'h4',\n) => `<${htmlTag} dir=\"auto\" class=\"${classNames}\" style=\"${reactCssPropsToCss(styles[tag])}\">${children}</${htmlTag}>`;\n\nconst getClassNames = (breakAfterColumn?: string, align?: string) => {\n const breakWordsClass = 'tw-break-words';\n const columnBreakClasses =\n breakAfterColumn === 'active' ? 'tw-break-after-column tw-break-inside-avoid-column' : '';\n const alignClass = align ? alignmentClassnames[align] : '';\n return merge([alignClass, breakWordsClass, columnBreakClasses]);\n};\n"],"names":["countNodesOfType","nodes","type","acc","node","serializeNodeToHtmlRecursive","styles","mappedMentionable","nestingCount","isText","serializeLeafToHtml","rootNestingCount","children","element","htmlMapper","MapNodeTypesToHtml","getClassNames","TextStyles","args","getTextStyleHtml","ELEMENT_UL","UL_CLASSES","ELEMENT_OL","classNames","nestingLevel","getOrderedListClasses","reactCssPropsToCss","OL_STYLES","ELEMENT_LI","LI_CLASSNAMES","getLiStyles","ELEMENT_LIC","getLicElementClassNames","ELEMENT_LINK","linkNode","ELEMENT_BUTTON","buttonNode","ELEMENT_CHECK_ITEM","checkItemNode","ELEMENT_MENTION","mentionHtmlNode","tag","htmlTag","breakAfterColumn","align","breakWordsClass","columnBreakClasses","alignClass","alignmentClassnames","merge"],"mappings":";;;;;;;;;;;;;;;AAkCA,MAAMA,IAAmB,CAACC,GAAsBC,MACrCD,EAAM,OAAO,CAACE,GAAKC,OAClBA,EAAK,SAASF,KACdC,KAEAC,EAAK,WACED,IAAMH,EAAiBI,EAAK,UAA2BF,CAAI,IAE/DC,IACR,CAAC,GAYKE,IAA+B,CACxCD,GACAE,GACA,EAAE,mBAAAC,GAAmB,cAAAC,IAAe,CAAA,QAC3B;AACL,MAAAC,EAAOL,CAAI;AACX,WAAOM,EAAoBN,CAAI;AAG7B,QAAAO,IAAmBH,EAAaJ,EAAK,IAAI,KAAKJ,EAAiB,CAACI,CAAI,GAAGA,EAAK,IAAI;AACtF,MAAIQ,IAAW;AACJ,aAAAC,KAAWT,EAAK;AACX,IAAAQ,KAAAP,EAA6BQ,GAASP,GAAQ;AAAA,MACtD,cAAc;AAAA,QACV,GAAGE;AAAA,QACH,CAACK,EAAQ,IAAc,GAAGF;AAAA,MAC9B;AAAA,MACA,mBAAAJ;AAAA,IAAA,CACH;AAGC,QAAAO,IAAaC,EAAmBX,EAAK,IAAI;AAC3C,MAAA;AACA,WACIU,EAAW;AAAA,MACP,YAAYE;AAAA,QACRZ,EAAK;AAAA,QACLA,EAAK;AAAA,MACT;AAAA,MACA,UAAAQ;AAAA,MACA,kBAAAD;AAAA,MACA,MAAAP;AAAA,MACA,mBAAAG;AAAA,MACA,QAAAD;AAAA,IACH,CAAA,KAAKM;AAAA;AAGF,mBAAA,KAAK,kCAAkCR,EAAK,uBAAuB,GACpEQ;AAAA,EACX;AACJ,GAWMG,IAA4E;AAAA,EAC9E,CAACE,EAAW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kB,CAAC;AAClE;"}
1
+ {"version":3,"file":"serializeNodeToHtmlRecursive.es.js","sources":["../../../../../src/components/RichTextEditor/serializer/utils/serializeNodeToHtmlRecursive.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n ELEMENT_BUTTON,\n ELEMENT_CHECK_ITEM,\n MappedMentionableItems,\n OL_STYLES,\n TextStyles,\n UL_CLASSES,\n alignmentClassnames,\n getOrderedListClasses,\n} from '@components/RichTextEditor/Plugins';\nimport { getLicElementClassNames } from '@components/RichTextEditor/Plugins/ListPlugin/ListItemContentMarkupElement';\nimport { LI_CLASSNAMES, getLiStyles } from '@components/RichTextEditor/Plugins/ListPlugin/ListItemMarkupElement';\nimport {\n ELEMENT_LI,\n ELEMENT_LIC,\n ELEMENT_LINK,\n ELEMENT_MENTION,\n ELEMENT_OL,\n ELEMENT_UL,\n TDescendant,\n TElement,\n isText,\n} from '@udecode/plate';\nimport { merge } from '@utilities/merge';\nimport { ButtonStylesType, buttonNode } from '../nodes/button';\nimport { checkItemNode } from '../nodes/checkItem';\nimport { linkNode } from '../nodes/link';\nimport { mentionHtmlNode } from '../nodes/mentionHtmlNode';\nimport { reactCssPropsToCss } from './reactCssPropsToCss';\nimport { serializeLeafToHtml } from './serializeLeafToHtml';\nimport { CSSPropertiesHover } from '../types';\n\nconst countNodesOfType = (nodes: TDescendant[], type: string): number => {\n return nodes.reduce((acc, node) => {\n if (node.type === type) {\n acc++;\n }\n if (node.children) {\n return acc + countNodesOfType(node.children as TDescendant[], type);\n }\n return acc;\n }, 0);\n};\n\ntype NestingCount = {\n [type: string]: number;\n};\n\ntype SerializeNodeToHtmlRecursiveOptions = {\n mappedMentionable?: MappedMentionableItems;\n nestingCount?: NestingCount;\n};\n\nexport const serializeNodeToHtmlRecursive = (\n node: TDescendant,\n styles: Record<string, CSSPropertiesHover> | ButtonStylesType,\n { mappedMentionable, nestingCount = {} }: SerializeNodeToHtmlRecursiveOptions,\n): string => {\n if (isText(node)) {\n return serializeLeafToHtml(node);\n }\n\n const rootNestingCount = nestingCount[node.type] || countNodesOfType([node], node.type);\n let children = '';\n for (const element of node.children) {\n children += serializeNodeToHtmlRecursive(element, styles, {\n nestingCount: {\n ...nestingCount,\n [element.type as string]: rootNestingCount,\n },\n mappedMentionable,\n });\n }\n\n const htmlMapper = MapNodeTypesToHtml[node.type];\n try {\n return (\n htmlMapper({\n classNames: getClassNames(\n node.breakAfterColumn as string | undefined,\n node.align as string | undefined,\n ),\n children,\n rootNestingCount,\n node,\n mappedMentionable,\n styles,\n }) ?? children\n );\n } catch (error) {\n console.warn(`The htmlMapper for node type: '${node.type}' does not exist.`);\n return children;\n }\n};\n\ntype Arguments = {\n classNames: string;\n children: string;\n rootNestingCount: number;\n node: TElement;\n mappedMentionable?: MappedMentionableItems;\n styles: Record<string, CSSPropertiesHover>;\n};\n\nconst MapNodeTypesToHtml: { [key: string]: ({ ...args }: Arguments) => string } = {\n [TextStyles.heading1]: (args) => getTextStyleHtml(TextStyles.heading1, args, 'h1'),\n [TextStyles.heading2]: (args) => getTextStyleHtml(TextStyles.heading2, args, 'h2'),\n [TextStyles.heading3]: (args) => getTextStyleHtml(TextStyles.heading3, args, 'h3'),\n [TextStyles.heading4]: (args) => getTextStyleHtml(TextStyles.heading4, args, 'h4'),\n [TextStyles.p]: (args) => getTextStyleHtml(TextStyles.p, args, 'p'),\n [TextStyles.custom1]: (args) => getTextStyleHtml(TextStyles.custom1, args, 'p'),\n [TextStyles.custom2]: (args) => getTextStyleHtml(TextStyles.custom2, args, 'p'),\n [TextStyles.custom3]: (args) => getTextStyleHtml(TextStyles.custom3, args, 'p'),\n [TextStyles.quote]: (args) => getTextStyleHtml(TextStyles.quote, args, 'p'),\n [TextStyles.imageTitle]: (args) => getTextStyleHtml(TextStyles.imageTitle, args, 'p'),\n [TextStyles.imageCaption]: (args) => getTextStyleHtml(TextStyles.imageCaption, args, 'p'),\n [ELEMENT_UL]: (args) => `<ul dir=\"auto\" class=\"${UL_CLASSES} ${args.classNames}\">${args.children}</ul>`,\n [ELEMENT_OL]: ({ classNames, children, node, rootNestingCount }) => {\n const nestingLevel = Math.max(rootNestingCount - countNodesOfType([node], ELEMENT_OL), 0);\n return `<ol dir=\"auto\" class=\"${getOrderedListClasses(nestingLevel)} ${classNames}\" style=\"${reactCssPropsToCss(\n OL_STYLES,\n )}\">${children}</ol>`;\n },\n [ELEMENT_LI]: ({ classNames, children, node, styles }) =>\n `<li dir=\"auto\" class=\"${classNames} ${LI_CLASSNAMES}\" style=\"${reactCssPropsToCss(\n getLiStyles(node, styles),\n )}\">${children}</li>`,\n [ELEMENT_LIC]: ({ classNames, children, node }) =>\n `<p dir=\"auto\" class=\"${classNames} ${getLicElementClassNames(node)}\"><span>${children}</span></p>`,\n [ELEMENT_LINK]: ({ node, children, classNames, styles }) => linkNode(node, children, classNames, styles),\n [ELEMENT_BUTTON]: ({ node, children, classNames, styles }) =>\n buttonNode(node, children, classNames, styles as ButtonStylesType),\n [ELEMENT_CHECK_ITEM]: ({ node, children, classNames, styles }) => checkItemNode(node, children, classNames, styles),\n [ELEMENT_MENTION]: ({ node, mappedMentionable }) => mentionHtmlNode(node, { mentionable: mappedMentionable }),\n};\n\nconst getTextStyleHtml = (\n tag: TextStyles,\n { classNames, styles, children }: Arguments,\n htmlTag: 'p' | 'h1' | 'h2' | 'h3' | 'h4',\n) => `<${htmlTag} dir=\"auto\" class=\"${classNames}\" style=\"${reactCssPropsToCss(styles[tag])}\">${children}</${htmlTag}>`;\n\nconst getClassNames = (breakAfterColumn?: string, align?: string) => {\n const breakWordsClass = 'tw-break-words';\n const columnBreakClasses =\n breakAfterColumn === 'active' ? 'tw-break-after-column tw-break-inside-avoid-column' : '';\n const alignClass = align ? alignmentClassnames[align] : '';\n return merge([alignClass, breakWordsClass, columnBreakClasses]);\n};\n"],"names":["countNodesOfType","nodes","type","acc","node","serializeNodeToHtmlRecursive","styles","mappedMentionable","nestingCount","isText","serializeLeafToHtml","rootNestingCount","children","element","htmlMapper","MapNodeTypesToHtml","getClassNames","TextStyles","args","getTextStyleHtml","ELEMENT_UL","UL_CLASSES","ELEMENT_OL","classNames","nestingLevel","getOrderedListClasses","reactCssPropsToCss","OL_STYLES","ELEMENT_LI","LI_CLASSNAMES","getLiStyles","ELEMENT_LIC","getLicElementClassNames","ELEMENT_LINK","linkNode","ELEMENT_BUTTON","buttonNode","ELEMENT_CHECK_ITEM","checkItemNode","ELEMENT_MENTION","mentionHtmlNode","tag","htmlTag","breakAfterColumn","align","breakWordsClass","columnBreakClasses","alignClass","alignmentClassnames","merge"],"mappings":";;;;;;;;;;;;;;;AAkCA,MAAMA,IAAmB,CAACC,GAAsBC,MACrCD,EAAM,OAAO,CAACE,GAAKC,OAClBA,EAAK,SAASF,KACdC,KAEAC,EAAK,WACED,IAAMH,EAAiBI,EAAK,UAA2BF,CAAI,IAE/DC,IACR,CAAC,GAYKE,IAA+B,CACxCD,GACAE,GACA,EAAE,mBAAAC,GAAmB,cAAAC,IAAe,CAAA,QAC3B;AACL,MAAAC,EAAOL,CAAI;AACX,WAAOM,EAAoBN,CAAI;AAG7B,QAAAO,IAAmBH,EAAaJ,EAAK,IAAI,KAAKJ,EAAiB,CAACI,CAAI,GAAGA,EAAK,IAAI;AACtF,MAAIQ,IAAW;AACJ,aAAAC,KAAWT,EAAK;AACX,IAAAQ,KAAAP,EAA6BQ,GAASP,GAAQ;AAAA,MACtD,cAAc;AAAA,QACV,GAAGE;AAAA,QACH,CAACK,EAAQ,IAAc,GAAGF;AAAA,MAC9B;AAAA,MACA,mBAAAJ;AAAA,IAAA,CACH;AAGC,QAAAO,IAAaC,EAAmBX,EAAK,IAAI;AAC3C,MAAA;AACA,WACIU,EAAW;AAAA,MACP,YAAYE;AAAA,QACRZ,EAAK;AAAA,QACLA,EAAK;AAAA,MACT;AAAA,MACA,UAAAQ;AAAA,MACA,kBAAAD;AAAA,MACA,MAAAP;AAAA,MACA,mBAAAG;AAAA,MACA,QAAAD;AAAA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C,IAAkB,kBAClBC,IACFH,MAAqB,WAAW,uDAAuD,IACrFI,IAAaH,IAAQI,EAAoBJ,CAAK,IAAI;AACxD,SAAOK,EAAM,CAACF,GAAYF,GAAiBC,CAAkB,CAAC;AAClE;"}
@@ -1,2 +1,2 @@
1
1
  import type { CSSPropertiesHover } from '../serializer/types';
2
- export declare const defaultStyles: Record<string, CSSPropertiesHover>;
2
+ export declare const defaultStyles: Record<string, Record<string, CSSPropertiesHover> | CSSPropertiesHover>;
@@ -71,71 +71,73 @@ const o = {
71
71
  fontSize: "13.5px",
72
72
  lineHeight: "1.5"
73
73
  },
74
- buttonPrimary: {
75
- fontSize: "13px",
76
- color: "rgb(255, 255, 255)",
77
- paddingTop: "10px",
78
- paddingRight: "20px",
79
- paddingBottom: "10px",
80
- paddingLeft: "20px",
81
- fontFamily: "inherit",
82
- fontStyle: "",
83
- fontWeight: 400,
84
- textTransform: "none",
85
- hover: {
74
+ "button-plugin": {
75
+ buttonPrimary: {
76
+ fontSize: "13px",
86
77
  color: "rgb(255, 255, 255)",
87
- borderColor: "rgb(50, 0, 236)",
88
- backgroundColor: "rgb(61, 7, 255)"
78
+ paddingTop: "10px",
79
+ paddingRight: "20px",
80
+ paddingBottom: "10px",
81
+ paddingLeft: "20px",
82
+ fontFamily: "inherit",
83
+ fontStyle: "",
84
+ fontWeight: 400,
85
+ textTransform: "none",
86
+ hover: {
87
+ color: "rgb(255, 255, 255)",
88
+ borderColor: "rgb(50, 0, 236)",
89
+ backgroundColor: "rgb(61, 7, 255)"
90
+ },
91
+ lineHeight: "1.3",
92
+ borderColor: "rgb(102, 60, 255)",
93
+ borderWidth: "2px",
94
+ borderRadius: "5px",
95
+ backgroundColor: "rgb(130, 95, 255)"
89
96
  },
90
- lineHeight: "1.3",
91
- borderColor: "rgb(102, 60, 255)",
92
- borderWidth: "2px",
93
- borderRadius: "5px",
94
- backgroundColor: "rgb(130, 95, 255)"
95
- },
96
- buttonSecondary: {
97
- fontSize: "13px",
98
- color: "rgb(102, 102, 102)",
99
- paddingTop: "10px",
100
- paddingRight: "20px",
101
- paddingBottom: "10px",
102
- paddingLeft: "20px",
103
- fontFamily: "inherit",
104
- fontStyle: "",
105
- fontWeight: 400,
106
- textTransform: "none",
107
- hover: {
108
- color: "rgb(76, 76, 76)",
109
- borderColor: "rgb(155, 155, 155)",
110
- backgroundColor: "rgb(172, 172, 172)"
97
+ buttonSecondary: {
98
+ fontSize: "13px",
99
+ color: "rgb(102, 102, 102)",
100
+ paddingTop: "10px",
101
+ paddingRight: "20px",
102
+ paddingBottom: "10px",
103
+ paddingLeft: "20px",
104
+ fontFamily: "inherit",
105
+ fontStyle: "",
106
+ fontWeight: 400,
107
+ textTransform: "none",
108
+ hover: {
109
+ color: "rgb(76, 76, 76)",
110
+ borderColor: "rgb(155, 155, 155)",
111
+ backgroundColor: "rgb(172, 172, 172)"
112
+ },
113
+ lineHeight: "1.3",
114
+ borderColor: "rgb(207, 207, 207)",
115
+ borderWidth: "2px",
116
+ borderRadius: "5px",
117
+ backgroundColor: "rgb(230, 230, 230)"
111
118
  },
112
- lineHeight: "1.3",
113
- borderColor: "rgb(207, 207, 207)",
114
- borderWidth: "2px",
115
- borderRadius: "5px",
116
- backgroundColor: "rgb(230, 230, 230)"
117
- },
118
- buttonTertiary: {
119
- fontSize: "13px",
120
- color: "rgb(102, 60, 255)",
121
- paddingTop: "10px",
122
- paddingRight: "20px",
123
- paddingBottom: "10px",
124
- paddingLeft: "20px",
125
- fontFamily: "inherit",
126
- fontStyle: "",
127
- fontWeight: 400,
128
- textTransform: "none",
129
- hover: {
130
- color: "rgb(53, 0, 244)",
131
- borderColor: "rgb(61, 7, 255)",
119
+ buttonTertiary: {
120
+ fontSize: "13px",
121
+ color: "rgb(102, 60, 255)",
122
+ paddingTop: "10px",
123
+ paddingRight: "20px",
124
+ paddingBottom: "10px",
125
+ paddingLeft: "20px",
126
+ fontFamily: "inherit",
127
+ fontStyle: "",
128
+ fontWeight: 400,
129
+ textTransform: "none",
130
+ hover: {
131
+ color: "rgb(53, 0, 244)",
132
+ borderColor: "rgb(61, 7, 255)",
133
+ backgroundColor: "rgb(255, 255, 255)"
134
+ },
135
+ lineHeight: "1.3",
136
+ borderColor: "rgb(130, 95, 255)",
137
+ borderWidth: "2px",
138
+ borderRadius: "5px",
132
139
  backgroundColor: "rgb(255, 255, 255)"
133
- },
134
- lineHeight: "1.3",
135
- borderColor: "rgb(130, 95, 255)",
136
- borderWidth: "2px",
137
- borderRadius: "5px",
138
- backgroundColor: "rgb(255, 255, 255)"
140
+ }
139
141
  }
140
142
  };
141
143
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"defaultStyles.es.js","sources":["../../../../src/components/RichTextEditor/utils/defaultStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport type { CSSPropertiesHover } from '../serializer/types';\n\nexport const defaultStyles: Record<string, CSSPropertiesHover> = {\n heading1: {\n fontSize: '48px',\n fontWeight: 700,\n fontStyle: 'normal',\n },\n heading2: {\n fontSize: '32px',\n fontWeight: 700,\n fontStyle: 'normal',\n },\n heading3: {\n fontSize: '24px',\n fontWeight: 'normal',\n fontStyle: 'normal',\n },\n heading4: {\n fontSize: '18px',\n fontWeight: 'normal',\n fontStyle: 'normal',\n },\n custom1: {\n fontSize: '14px',\n fontWeight: 'normal',\n fontStyle: 'normal',\n },\n custom2: {\n fontSize: '14px',\n fontWeight: 600,\n fontStyle: 'normal',\n },\n custom3: {\n fontSize: '14px',\n fontWeight: 'normal',\n fontStyle: 'normal',\n textDecoration: 'underline',\n },\n quote: {\n fontSize: '16px',\n fontWeight: 'normal',\n fontStyle: 'italic',\n },\n 'link-plugin': {\n fontSize: '14px',\n fontStyle: 'normal',\n color: 'rgb(113, 89, 215)',\n textDecoration: 'underline',\n cursor: 'pointer',\n },\n p: {\n fontSize: '14px',\n fontStyle: 'normal',\n fontWeight: 'normal',\n },\n imageTitle: {\n color: 'rgb(0, 0, 0)',\n fontFamily: 'Droid Sans',\n fontSize: '15px',\n fontStyle: '',\n fontWeight: '400',\n letterSpacing: 'normal',\n lineHeight: '1.4',\n marginBottom: '3px',\n marginTop: '0',\n textDecoration: '',\n textTransform: 'none',\n },\n imageCaption: {\n color: 'rgb(153, 153, 153)',\n fontFamily: 'Droid Sans',\n fontSize: '13.5px',\n lineHeight: '1.5',\n },\n buttonPrimary: {\n fontSize: '13px',\n color: 'rgb(255, 255, 255)',\n paddingTop: '10px',\n paddingRight: '20px',\n paddingBottom: '10px',\n paddingLeft: '20px',\n fontFamily: 'inherit',\n fontStyle: '',\n fontWeight: 400,\n textTransform: 'none',\n hover: {\n color: 'rgb(255, 255, 255)',\n borderColor: 'rgb(50, 0, 236)',\n backgroundColor: 'rgb(61, 7, 255)',\n },\n lineHeight: '1.3',\n borderColor: 'rgb(102, 60, 255)',\n borderWidth: '2px',\n borderRadius: '5px',\n backgroundColor: 'rgb(130, 95, 255)',\n },\n buttonSecondary: {\n fontSize: '13px',\n color: 'rgb(102, 102, 102)',\n paddingTop: '10px',\n paddingRight: '20px',\n paddingBottom: '10px',\n paddingLeft: '20px',\n fontFamily: 'inherit',\n fontStyle: '',\n fontWeight: 400,\n textTransform: 'none',\n hover: {\n color: 'rgb(76, 76, 76)',\n borderColor: 'rgb(155, 155, 155)',\n backgroundColor: 'rgb(172, 172, 172)',\n },\n lineHeight: '1.3',\n borderColor: 'rgb(207, 207, 207)',\n borderWidth: '2px',\n borderRadius: '5px',\n backgroundColor: 'rgb(230, 230, 230)',\n },\n buttonTertiary: {\n fontSize: '13px',\n color: 'rgb(102, 60, 255)',\n paddingTop: '10px',\n paddingRight: '20px',\n paddingBottom: '10px',\n paddingLeft: '20px',\n fontFamily: 'inherit',\n fontStyle: '',\n fontWeight: 400,\n textTransform: 'none',\n hover: {\n color: 'rgb(53, 0, 244)',\n borderColor: 'rgb(61, 7, 255)',\n backgroundColor: 'rgb(255, 255, 255)',\n },\n lineHeight: '1.3',\n borderColor: 'rgb(130, 95, 255)',\n borderWidth: '2px',\n borderRadius: '5px',\n backgroundColor: 'rgb(255, 255, 255)',\n },\n};\n"],"names":["defaultStyles"],"mappings":"AAIO,MAAMA,IAAoD;AAAA,EAC7D,UAAU;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACL,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACL,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACL,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,gBAAgB;AAAA,EACpB;AAAA,EACA,OAAO;AAAA,IACH,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,EACf;AAAA,EACA,eAAe;AAAA,IACX,UAAU;AAAA,IACV,WAAW;AAAA,IACX,OAAO;AAAA,IACP,gBAAgB;AAAA,IAChB,QAAQ;AAAA,EACZ;AAAA,EACA,GAAG;AAAA,IACC,UAAU;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,EAChB;AAAA,EACA,YAAY;AAAA,IACR,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,eAAe;AAAA,EACnB;AAAA,EACA,cAAc;AAAA,IACV,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,YAAY;AAAA,EAChB;AAAA,EACA,eAAe;AAAA,IACX,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,eAAe;AAAA,IACf,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,OAAO;AAAA,MACH,OAAO;AAAA,MACP,aAAa;AAAA,MACb,iBAAiB;AAAA,IACrB;AAAA,IACA,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACrB;AAAA,EACA,iBAAiB;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,eAAe;AAAA,IACf,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,OAAO;AAAA,MACH,OAAO;AAAA,MACP,aAAa;AAAA,MACb,iBAAiB;AAAA,IACrB;AAAA,IACA,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACrB;AAAA,EACA,gBAAgB;AAAA,IACZ,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,eAAe;AAAA,IACf,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,OAAO;AAAA,MACH,OAAO;AAAA,MACP,aAAa;AAAA,MACb,iBAAiB;AAAA,IACrB;AAAA,IACA,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACrB;AACJ;"}
1
+ {"version":3,"file":"defaultStyles.es.js","sources":["../../../../src/components/RichTextEditor/utils/defaultStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport type { CSSPropertiesHover } from '../serializer/types';\n\nexport const defaultStyles: Record<string, Record<string, CSSPropertiesHover> | CSSPropertiesHover> = {\n heading1: {\n fontSize: '48px',\n fontWeight: 700,\n fontStyle: 'normal',\n },\n heading2: {\n fontSize: '32px',\n fontWeight: 700,\n fontStyle: 'normal',\n },\n heading3: {\n fontSize: '24px',\n fontWeight: 'normal',\n fontStyle: 'normal',\n },\n heading4: {\n fontSize: '18px',\n fontWeight: 'normal',\n fontStyle: 'normal',\n },\n custom1: {\n fontSize: '14px',\n fontWeight: 'normal',\n fontStyle: 'normal',\n },\n custom2: {\n fontSize: '14px',\n fontWeight: 600,\n fontStyle: 'normal',\n },\n custom3: {\n fontSize: '14px',\n fontWeight: 'normal',\n fontStyle: 'normal',\n textDecoration: 'underline',\n },\n quote: {\n fontSize: '16px',\n fontWeight: 'normal',\n fontStyle: 'italic',\n },\n 'link-plugin': {\n fontSize: '14px',\n fontStyle: 'normal',\n color: 'rgb(113, 89, 215)',\n textDecoration: 'underline',\n cursor: 'pointer',\n },\n p: {\n fontSize: '14px',\n fontStyle: 'normal',\n fontWeight: 'normal',\n },\n imageTitle: {\n color: 'rgb(0, 0, 0)',\n fontFamily: 'Droid Sans',\n fontSize: '15px',\n fontStyle: '',\n fontWeight: '400',\n letterSpacing: 'normal',\n lineHeight: '1.4',\n marginBottom: '3px',\n marginTop: '0',\n textDecoration: '',\n textTransform: 'none',\n },\n imageCaption: {\n color: 'rgb(153, 153, 153)',\n fontFamily: 'Droid Sans',\n fontSize: '13.5px',\n lineHeight: '1.5',\n },\n 'button-plugin': {\n buttonPrimary: {\n fontSize: '13px',\n color: 'rgb(255, 255, 255)',\n paddingTop: '10px',\n paddingRight: '20px',\n paddingBottom: '10px',\n paddingLeft: '20px',\n fontFamily: 'inherit',\n fontStyle: '',\n fontWeight: 400,\n textTransform: 'none',\n hover: {\n color: 'rgb(255, 255, 255)',\n borderColor: 'rgb(50, 0, 236)',\n backgroundColor: 'rgb(61, 7, 255)',\n },\n lineHeight: '1.3',\n borderColor: 'rgb(102, 60, 255)',\n borderWidth: '2px',\n borderRadius: '5px',\n backgroundColor: 'rgb(130, 95, 255)',\n },\n buttonSecondary: {\n fontSize: '13px',\n color: 'rgb(102, 102, 102)',\n paddingTop: '10px',\n paddingRight: '20px',\n paddingBottom: '10px',\n paddingLeft: '20px',\n fontFamily: 'inherit',\n fontStyle: '',\n fontWeight: 400,\n textTransform: 'none',\n hover: {\n color: 'rgb(76, 76, 76)',\n borderColor: 'rgb(155, 155, 155)',\n backgroundColor: 'rgb(172, 172, 172)',\n },\n lineHeight: '1.3',\n borderColor: 'rgb(207, 207, 207)',\n borderWidth: '2px',\n borderRadius: '5px',\n backgroundColor: 'rgb(230, 230, 230)',\n },\n buttonTertiary: {\n fontSize: '13px',\n color: 'rgb(102, 60, 255)',\n paddingTop: '10px',\n paddingRight: '20px',\n paddingBottom: '10px',\n paddingLeft: '20px',\n fontFamily: 'inherit',\n fontStyle: '',\n fontWeight: 400,\n textTransform: 'none',\n hover: {\n color: 'rgb(53, 0, 244)',\n borderColor: 'rgb(61, 7, 255)',\n backgroundColor: 'rgb(255, 255, 255)',\n },\n lineHeight: '1.3',\n borderColor: 'rgb(130, 95, 255)',\n borderWidth: '2px',\n borderRadius: '5px',\n backgroundColor: 'rgb(255, 255, 255)',\n },\n },\n};\n"],"names":["defaultStyles"],"mappings":"AAIO,MAAMA,IAAyF;AAAA,EAClG,UAAU;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACN,UAAU;AAAA,IACV,YA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