@frontify/fondue 11.0.0 → 11.1.0

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.
Files changed (78) hide show
  1. package/dist/components/AssetInput/SingleAsset/SelectedAsset.es.js +51 -50
  2. package/dist/components/AssetInput/SingleAsset/SelectedAsset.es.js.map +1 -1
  3. package/dist/components/RichTextEditor/components/bold.d.ts +1 -0
  4. package/dist/components/RichTextEditor/components/bold.es.js +6 -5
  5. package/dist/components/RichTextEditor/components/bold.es.js.map +1 -1
  6. package/dist/components/RichTextEditor/components/code.d.ts +1 -0
  7. package/dist/components/RichTextEditor/components/code.es.js +4 -3
  8. package/dist/components/RichTextEditor/components/code.es.js.map +1 -1
  9. package/dist/components/RichTextEditor/components/italic.d.ts +1 -0
  10. package/dist/components/RichTextEditor/components/italic.es.js +4 -3
  11. package/dist/components/RichTextEditor/components/italic.es.js.map +1 -1
  12. package/dist/components/RichTextEditor/components/link.d.ts +1 -1
  13. package/dist/components/RichTextEditor/components/link.es.js +24 -24
  14. package/dist/components/RichTextEditor/components/link.es.js.map +1 -1
  15. package/dist/components/RichTextEditor/components/ordered-list.d.ts +1 -0
  16. package/dist/components/RichTextEditor/components/ordered-list.es.js +4 -3
  17. package/dist/components/RichTextEditor/components/ordered-list.es.js.map +1 -1
  18. package/dist/components/RichTextEditor/components/strikethrough.d.ts +1 -0
  19. package/dist/components/RichTextEditor/components/strikethrough.es.js +4 -3
  20. package/dist/components/RichTextEditor/components/strikethrough.es.js.map +1 -1
  21. package/dist/components/RichTextEditor/components/underline.d.ts +1 -0
  22. package/dist/components/RichTextEditor/components/underline.es.js +5 -4
  23. package/dist/components/RichTextEditor/components/underline.es.js.map +1 -1
  24. package/dist/components/RichTextEditor/components/unordered-list.d.ts +1 -0
  25. package/dist/components/RichTextEditor/components/unordered-list.es.js +7 -6
  26. package/dist/components/RichTextEditor/components/unordered-list.es.js.map +1 -1
  27. package/dist/components/RichTextEditor/index.d.ts +1 -1
  28. package/dist/components/RichTextEditor/plugins/linkChooserPlugin/ui/EditLinkChooserButton.es.js +2 -4
  29. package/dist/components/RichTextEditor/plugins/linkChooserPlugin/ui/EditLinkChooserButton.es.js.map +1 -1
  30. package/dist/components/RichTextEditor/plugins/linkChooserPlugin/ui/LinkChooserPreviewFlyout.es.js +3 -3
  31. package/dist/components/RichTextEditor/plugins/linkChooserPlugin/ui/LinkChooserPreviewFlyout.es.js.map +1 -1
  32. package/dist/components/RichTextEditor/serializer/serializeToHtml.d.ts +4 -0
  33. package/dist/components/RichTextEditor/serializer/serializeToHtml.es.js +13 -0
  34. package/dist/components/RichTextEditor/serializer/serializeToHtml.es.js.map +1 -0
  35. package/dist/components/RichTextEditor/serializer/utils/convertCamelCaseToKebabCase.d.ts +1 -0
  36. package/dist/components/RichTextEditor/serializer/utils/convertCamelCaseToKebabCase.es.js +5 -0
  37. package/dist/components/RichTextEditor/serializer/utils/convertCamelCaseToKebabCase.es.js.map +1 -0
  38. package/dist/components/RichTextEditor/serializer/utils/reactCssPropsToCss.d.ts +1 -0
  39. package/dist/components/RichTextEditor/serializer/utils/reactCssPropsToCss.es.js +6 -0
  40. package/dist/components/RichTextEditor/serializer/utils/reactCssPropsToCss.es.js.map +1 -0
  41. package/dist/components/RichTextEditor/serializer/utils/serializeLeafToHtml.d.ts +1 -0
  42. package/dist/components/RichTextEditor/serializer/utils/serializeLeafToHtml.es.js +1656 -0
  43. package/dist/components/RichTextEditor/serializer/utils/serializeLeafToHtml.es.js.map +1 -0
  44. package/dist/components/RichTextEditor/serializer/utils/serializeNodeToHtmlRecursive.d.ts +2 -0
  45. package/dist/components/RichTextEditor/serializer/utils/serializeNodeToHtmlRecursive.es.js +51 -0
  46. package/dist/components/RichTextEditor/serializer/utils/serializeNodeToHtmlRecursive.es.js.map +1 -0
  47. package/dist/components/RichTextEditor/serializer/utils/setDefaultDesignTokensIfNull.d.ts +2 -0
  48. package/dist/components/RichTextEditor/serializer/utils/setDefaultDesignTokensIfNull.es.js +11 -0
  49. package/dist/components/RichTextEditor/serializer/utils/setDefaultDesignTokensIfNull.es.js.map +1 -0
  50. package/dist/components/ScrollWrapper/ScrollWrapper.es.js +2 -4
  51. package/dist/components/ScrollWrapper/ScrollWrapper.es.js.map +1 -1
  52. package/dist/components/Table/Table.d.ts +8 -4
  53. package/dist/components/Table/Table.es.js +78 -80
  54. package/dist/components/Table/Table.es.js.map +1 -1
  55. package/dist/components/Table/TableCell.d.ts +6 -4
  56. package/dist/components/Table/TableCell.es.js +1731 -35
  57. package/dist/components/Table/TableCell.es.js.map +1 -1
  58. package/dist/components/Table/TableColumnHeader.d.ts +9 -4
  59. package/dist/components/Table/TableColumnHeader.es.js +112 -52
  60. package/dist/components/Table/TableColumnHeader.es.js.map +1 -1
  61. package/dist/components/Table/TableHeaderRow.d.ts +5 -6
  62. package/dist/components/Table/TableHeaderRow.es.js +7 -8
  63. package/dist/components/Table/TableHeaderRow.es.js.map +1 -1
  64. package/dist/components/Table/TableRow.d.ts +4 -5
  65. package/dist/components/Table/TableRow.es.js +12 -17
  66. package/dist/components/Table/TableRow.es.js.map +1 -1
  67. package/dist/components/Tree/utils/mocks.es.js +0 -2
  68. package/dist/components/Tree/utils/mocks.es.js.map +1 -1
  69. package/dist/index.cjs.js +20 -20
  70. package/dist/index.cjs.js.map +1 -1
  71. package/dist/index.es.js +3257 -3256
  72. package/dist/index.umd.js +19 -19
  73. package/dist/index.umd.js.map +1 -1
  74. package/dist/styles.css +1 -1
  75. package/package.json +1 -1
  76. package/dist/components/RichTextEditor/utils/serializeToHtml.d.ts +0 -3
  77. package/dist/components/RichTextEditor/utils/serializeToHtml.es.js +0 -56
  78. package/dist/components/RichTextEditor/utils/serializeToHtml.es.js.map +0 -1
@@ -1,73 +1,74 @@
1
- import { ActionMenu as R } from "../../ActionMenu/ActionMenu/ActionMenu.es.js";
1
+ import { ActionMenu as T } from "../../ActionMenu/ActionMenu/ActionMenu.es.js";
2
2
  import I from "../../../foundation/Icon/Generated/IconCaretDown.es.js";
3
3
  import { IconSize as P } from "../../../foundation/Icon/IconSize.es.js";
4
- import { useMemoizedId as p } from "../../../hooks/useMemoizedId.es.js";
5
- import { useButton as T } from "@react-aria/button";
6
- import { useFocusRing as B, FocusScope as D } from "@react-aria/focus";
7
- import { useMenuTrigger as z } from "@react-aria/menu";
8
- import { useOverlay as M, DismissButton as h } from "@react-aria/overlays";
9
- import { mergeProps as W } from "@react-aria/utils";
10
- import { useMenuTriggerState as j } from "@react-stately/menu";
11
- import { FOCUS_STYLE as L } from "../../../utilities/focusStyle.es.js";
4
+ import { useMemoizedId as h } from "../../../hooks/useMemoizedId.es.js";
5
+ import { useButton as B } from "@react-aria/button";
6
+ import { useFocusRing as D, FocusScope as z } from "@react-aria/focus";
7
+ import { useMenuTrigger as M } from "@react-aria/menu";
8
+ import { useOverlay as W, DismissButton as g } from "@react-aria/overlays";
9
+ import { mergeProps as j } from "@react-aria/utils";
10
+ import { useMenuTriggerState as L } from "@react-stately/menu";
11
+ import { FOCUS_STYLE as Y } from "../../../utilities/focusStyle.es.js";
12
12
  import { merge as s } from "../../../utilities/merge.es.js";
13
- import { AnimatePresence as Y, motion as U } from "framer-motion";
14
- import t, { useRef as g, useState as V, useEffect as _ } from "react";
15
- import { AssetInputSize as c } from "../AssetInput.es.js";
16
- import { AssetThumbnail as $ } from "../AssetThumbnail.es.js";
17
- import { AssetSubline as q } from "./AssetSubline.es.js";
18
- import { SpinningCircle as G } from "./SpinningCircle.es.js";
19
- const ut = ({ asset: e, size: n, actions: x, isLoading: a }) => {
20
- const E = p(), m = p(), r = g(null), o = j({ closeOnSelect: !0 }), { isOpen: l, focusStrategy: v } = o, { menuTriggerProps: k } = z({}, o, r), { buttonProps: y } = T(k, r), { isFocusVisible: i, focusProps: S } = B(), w = g(null), { overlayProps: N } = M({ onClose: () => o.close(), shouldCloseOnBlur: !0, isOpen: l, isDismissable: !0 }, w), u = (e == null ? void 0 : e.name) || "Your Asset", [A, C] = V(0);
21
- return _(() => {
22
- const F = () => {
23
- var d, b;
24
- const O = (b = (d = r.current) == null ? void 0 : d.getBoundingClientRect().width) != null ? b : 0;
25
- setTimeout(() => C(O), 0);
26
- }, f = new ResizeObserver(F);
27
- return r.current && f.observe(r.current), () => {
28
- f.disconnect();
13
+ import { AnimatePresence as U, motion as V } from "framer-motion";
14
+ import t, { useRef as x, useState as _, useEffect as $ } from "react";
15
+ import { AssetInputSize as a } from "../AssetInput.es.js";
16
+ import { AssetThumbnail as q } from "../AssetThumbnail.es.js";
17
+ import { AssetSubline as G } from "./AssetSubline.es.js";
18
+ import { SpinningCircle as H } from "./SpinningCircle.es.js";
19
+ const ft = ({ asset: e, size: n, actions: E, isLoading: m }) => {
20
+ const v = h(), w = h(), r = x(null), o = L({ closeOnSelect: !0 }), { isOpen: l, focusStrategy: k } = o, { menuTriggerProps: y } = M({}, o, r), { buttonProps: S } = B(y, r), { isFocusVisible: i, focusProps: N } = D(), u = x(null), { overlayProps: A } = W({ onClose: () => o.close(), shouldCloseOnBlur: !0, isOpen: l, isDismissable: !0 }, u), f = (e == null ? void 0 : e.name) || "Your Asset", [C, F] = _(0);
21
+ return $(() => {
22
+ let c = null;
23
+ const O = () => {
24
+ var b, p;
25
+ const R = (p = (b = r.current) == null ? void 0 : b.getBoundingClientRect().width) != null ? p : 0;
26
+ c = setTimeout(() => F(R), 0);
27
+ }, d = new ResizeObserver(O);
28
+ return r.current && d.observe(r.current), () => {
29
+ c && clearTimeout(c), d.disconnect();
29
30
  };
30
31
  }, []), /* @__PURE__ */ t.createElement("div", {
31
32
  className: "tw-font-sans tw-w-full tw-text-s tw-bg-transparent tw-font-normal tw-min-w-0",
32
- "aria-labelledby": m,
33
- title: u,
33
+ "aria-labelledby": w,
34
+ title: f,
34
35
  "data-test-id": "asset-single-input"
35
36
  }, /* @__PURE__ */ t.createElement("button", {
36
- ...W(y, S),
37
+ ...j(S, N),
37
38
  ref: r,
38
39
  className: s([
39
40
  "tw-w-full tw-flex tw-border tw-rounded tw-overflow-hidden hover:tw-border-black-90 dark:hover:tw-border-black-40 focus-visible:tw-outline-none",
40
- i && L,
41
- n === c.Large ? "tw-h-[11.5rem] tw-flex-col" : "tw-h-14",
41
+ i && Y,
42
+ n === a.Large ? "tw-h-[11.5rem] tw-flex-col" : "tw-h-14",
42
43
  l || i ? "tw-border-black-90 dark:tw-border-black-10" : "tw-border-black-20 dark:tw-border-black-80"
43
44
  ])
44
- }, a && !e && /* @__PURE__ */ t.createElement("div", {
45
+ }, m && !e && /* @__PURE__ */ t.createElement("div", {
45
46
  className: s([
46
47
  "tw-flex tw-justify-center tw-items-center",
47
- n === c.Large ? "tw-w-full tw-h-32" : "tw-w-14 tw-h-full"
48
+ n === a.Large ? "tw-w-full tw-h-32" : "tw-w-14 tw-h-full"
48
49
  ])
49
- }, /* @__PURE__ */ t.createElement(G, {
50
+ }, /* @__PURE__ */ t.createElement(H, {
50
51
  size: n
51
- })), e && /* @__PURE__ */ t.createElement($, {
52
+ })), e && /* @__PURE__ */ t.createElement(q, {
52
53
  asset: e,
53
54
  size: n,
54
55
  isActive: l || i
55
56
  }), /* @__PURE__ */ t.createElement("div", {
56
57
  className: s([
57
58
  "tw-min-w-0 tw-max-w-full tw-flex tw-flex-auto tw-self-stretch tw-border-black-100 tw-border-opacity-25",
58
- n === c.Large ? "tw-h-14 tw-border-t" : "tw-h-full tw-border-l"
59
+ n === a.Large ? "tw-h-14 tw-border-t" : "tw-h-full tw-border-l"
59
60
  ])
60
61
  }, /* @__PURE__ */ t.createElement("div", {
61
62
  className: "tw-min-w-0 tw-pr-3 tw-pl-4 tw-flex tw-flex-auto tw-flex-col tw-items-start tw-justify-center tw-h-full"
62
63
  }, /* @__PURE__ */ t.createElement("span", {
63
- id: m,
64
+ id: w,
64
65
  className: s([
65
66
  "tw-max-w-full tw-text-black-100 tw-text-s tw-truncate dark:tw-text-white",
66
67
  (l || i) && "tw-font-medium"
67
68
  ])
68
- }, u), /* @__PURE__ */ t.createElement(q, {
69
+ }, f), /* @__PURE__ */ t.createElement(G, {
69
70
  asset: e,
70
- isLoading: a
71
+ isLoading: m
71
72
  })), /* @__PURE__ */ t.createElement("div", {
72
73
  className: "tw-p-4 tw-flex tw-flex-none tw-items-center tw-justify-center"
73
74
  }, /* @__PURE__ */ t.createElement("span", {
@@ -77,33 +78,33 @@ const ut = ({ asset: e, size: n, actions: x, isLoading: a }) => {
77
78
  ])
78
79
  }, /* @__PURE__ */ t.createElement(I, {
79
80
  size: P.Size16
80
- }))))), /* @__PURE__ */ t.createElement(Y, null, l && /* @__PURE__ */ t.createElement(U.div, {
81
+ }))))), /* @__PURE__ */ t.createElement(U, null, l && /* @__PURE__ */ t.createElement(V.div, {
81
82
  style: {
82
- width: A
83
+ width: C
83
84
  },
84
85
  className: "tw-absolute tw-left-auto tw-w-full tw-overflow-hidden tw-box-border tw-p-0 tw-shadow-mid tw-list-none tw-m-0 tw-mt-2 tw-z-20",
85
86
  "data-test-id": "asset-single-input-flyout",
86
- key: `asset-input-menu-${E}`,
87
+ key: `asset-input-menu-${v}`,
87
88
  initial: { height: 0 },
88
89
  animate: { height: "auto" },
89
90
  exit: { height: 0 },
90
91
  transition: { ease: [0.04, 0.62, 0.23, 0.98], duration: 0.5 }
91
- }, /* @__PURE__ */ t.createElement(D, {
92
+ }, /* @__PURE__ */ t.createElement(z, {
92
93
  restoreFocus: !0
93
94
  }, /* @__PURE__ */ t.createElement("div", {
94
- ...N,
95
- ref: w
96
- }, /* @__PURE__ */ t.createElement(h, {
95
+ ...A,
96
+ ref: u
97
+ }, /* @__PURE__ */ t.createElement(g, {
97
98
  onDismiss: () => o.close()
98
- }), /* @__PURE__ */ t.createElement(R, {
99
- menuBlocks: x,
100
- focus: v,
99
+ }), /* @__PURE__ */ t.createElement(T, {
100
+ menuBlocks: E,
101
+ focus: k,
101
102
  onClick: () => o.close()
102
- }), /* @__PURE__ */ t.createElement(h, {
103
+ }), /* @__PURE__ */ t.createElement(g, {
103
104
  onDismiss: () => o.close()
104
105
  }))))));
105
106
  };
106
107
  export {
107
- ut as SelectedAsset
108
+ ft as SelectedAsset
108
109
  };
109
110
  //# sourceMappingURL=SelectedAsset.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectedAsset.es.js","sources":["../../../../src/components/AssetInput/SingleAsset/SelectedAsset.tsx"],"sourcesContent":["import { ActionMenu } from '@components/ActionMenu/ActionMenu/ActionMenu';\nimport IconCaretDown from '@foundation/Icon/Generated/IconCaretDown';\nimport { IconSize } from '@foundation/Icon/IconSize';\nimport { useMemoizedId } from '@hooks/useMemoizedId';\nimport { useButton } from '@react-aria/button';\nimport { FocusScope, useFocusRing } from '@react-aria/focus';\nimport { useMenuTrigger } from '@react-aria/menu';\nimport { DismissButton, useOverlay } from '@react-aria/overlays';\nimport { mergeProps } from '@react-aria/utils';\nimport { useMenuTriggerState } from '@react-stately/menu';\nimport { FOCUS_STYLE } from '@utilities/focusStyle';\nimport { merge } from '@utilities/merge';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport React, { FC, useEffect, useRef, useState } from 'react';\nimport { AssetInputProps, AssetInputSize, AssetType } from '../AssetInput';\nimport { AssetThumbnail } from '../AssetThumbnail';\nimport { AssetSubline } from './AssetSubline';\nimport { SpinningCircle } from './SpinningCircle';\n\nexport type SelectedAssetProps = Pick<AssetInputProps, 'actions' | 'isLoading' | 'size'> & {\n asset: AssetType;\n};\n\nexport const SelectedAsset: FC<Required<SelectedAssetProps>> = ({ asset, size, actions, isLoading }) => {\n const menuId = useMemoizedId();\n const labelId = useMemoizedId();\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n const menuState = useMenuTriggerState({ closeOnSelect: true });\n const { isOpen, focusStrategy } = menuState;\n const { menuTriggerProps } = useMenuTrigger({}, menuState, buttonRef);\n const { buttonProps } = useButton(menuTriggerProps, buttonRef);\n const { isFocusVisible, focusProps } = useFocusRing();\n const overlayRef = useRef<HTMLDivElement | null>(null);\n const { overlayProps } = useOverlay(\n { onClose: () => menuState.close(), shouldCloseOnBlur: true, isOpen, isDismissable: true },\n overlayRef,\n );\n const title = asset?.name || 'Your Asset';\n\n const [flyoutWidth, setFlyoutWidth] = useState(0);\n\n useEffect(() => {\n const calculateFlyoutWidth = () => {\n const calculatedWidth = buttonRef.current?.getBoundingClientRect().width ?? 0;\n setTimeout(() => setFlyoutWidth(calculatedWidth), 0);\n };\n const resizeObserver = new ResizeObserver(calculateFlyoutWidth);\n if (buttonRef.current) {\n resizeObserver.observe(buttonRef.current);\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n }, []);\n\n return (\n <div\n className=\"tw-font-sans tw-w-full tw-text-s tw-bg-transparent tw-font-normal tw-min-w-0\"\n aria-labelledby={labelId}\n title={title}\n data-test-id=\"asset-single-input\"\n >\n <button\n {...mergeProps(buttonProps, focusProps)}\n ref={buttonRef}\n className={merge([\n 'tw-w-full tw-flex tw-border tw-rounded tw-overflow-hidden hover:tw-border-black-90 dark:hover:tw-border-black-40 focus-visible:tw-outline-none',\n isFocusVisible && FOCUS_STYLE,\n size === AssetInputSize.Large ? 'tw-h-[11.5rem] tw-flex-col' : 'tw-h-14',\n isOpen || isFocusVisible\n ? 'tw-border-black-90 dark:tw-border-black-10'\n : 'tw-border-black-20 dark:tw-border-black-80',\n ])}\n >\n {isLoading && !asset && (\n <div\n className={merge([\n 'tw-flex tw-justify-center tw-items-center',\n size === AssetInputSize.Large ? 'tw-w-full tw-h-32' : 'tw-w-14 tw-h-full',\n ])}\n >\n <SpinningCircle size={size} />\n </div>\n )}\n {asset && <AssetThumbnail asset={asset} size={size} isActive={isOpen || isFocusVisible} />}\n <div\n className={merge([\n 'tw-min-w-0 tw-max-w-full tw-flex tw-flex-auto tw-self-stretch tw-border-black-100 tw-border-opacity-25',\n size === AssetInputSize.Large ? 'tw-h-14 tw-border-t' : 'tw-h-full tw-border-l',\n ])}\n >\n <div className=\"tw-min-w-0 tw-pr-3 tw-pl-4 tw-flex tw-flex-auto tw-flex-col tw-items-start tw-justify-center tw-h-full\">\n <span\n id={labelId}\n className={merge([\n 'tw-max-w-full tw-text-black-100 tw-text-s tw-truncate dark:tw-text-white',\n (isOpen || isFocusVisible) && 'tw-font-medium',\n ])}\n >\n {title}\n </span>\n <AssetSubline asset={asset} isLoading={isLoading} />\n </div>\n <div className=\"tw-p-4 tw-flex tw-flex-none tw-items-center tw-justify-center\">\n <span\n className={merge([\n 'tw-transition-transform',\n isOpen ? 'tw-rotate-180 tw-text-black-90' : 'tw-text-black-60',\n ])}\n >\n <IconCaretDown size={IconSize.Size16} />\n </span>\n </div>\n </div>\n </button>\n\n <AnimatePresence>\n {isOpen && (\n <motion.div\n style={{\n width: flyoutWidth,\n }}\n className=\"tw-absolute tw-left-auto tw-w-full tw-overflow-hidden tw-box-border tw-p-0 tw-shadow-mid tw-list-none tw-m-0 tw-mt-2 tw-z-20\"\n data-test-id=\"asset-single-input-flyout\"\n key={`asset-input-menu-${menuId}`}\n initial={{ height: 0 }}\n animate={{ height: 'auto' }}\n exit={{ height: 0 }}\n transition={{ ease: [0.04, 0.62, 0.23, 0.98], duration: 0.5 }}\n >\n <FocusScope restoreFocus>\n <div {...overlayProps} ref={overlayRef}>\n <DismissButton onDismiss={() => menuState.close()} />\n <ActionMenu\n menuBlocks={actions}\n focus={focusStrategy}\n onClick={() => menuState.close()}\n />\n <DismissButton onDismiss={() => menuState.close()} />\n </div>\n </FocusScope>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBO,MAAM,KAAkD,CAAC,EAAE,UAAO,SAAM,YAAS,mBAAgB;AACpG,QAAM,IAAS,KACT,IAAU,KACV,IAAY,EAAiC,IAAI,GACjD,IAAY,EAAoB,EAAE,eAAe,GAAM,CAAA,GACvD,EAAE,WAAQ,qBAAkB,GAC5B,EAAE,wBAAqB,EAAe,CAAA,GAAI,GAAW,CAAS,GAC9D,EAAE,mBAAgB,EAAU,GAAkB,CAAS,GACvD,EAAE,mBAAgB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P,SAAS,MAAM,EAAU,MAAM;AAAA,EAAA,CACnC,GACC,kBAAA,cAAA,GAAA;AAAA,IAAc,WAAW,MAAM,EAAU,MAAM;AAAA,EAAA,CAAG,CACvD,CACJ,CACJ,CAER,CACJ;AAER;"}
1
+ {"version":3,"file":"SelectedAsset.es.js","sources":["../../../../src/components/AssetInput/SingleAsset/SelectedAsset.tsx"],"sourcesContent":["import { ActionMenu } from '@components/ActionMenu/ActionMenu/ActionMenu';\nimport IconCaretDown from '@foundation/Icon/Generated/IconCaretDown';\nimport { IconSize } from '@foundation/Icon/IconSize';\nimport { useMemoizedId } from '@hooks/useMemoizedId';\nimport { useButton } from '@react-aria/button';\nimport { FocusScope, useFocusRing } from '@react-aria/focus';\nimport { useMenuTrigger } from '@react-aria/menu';\nimport { DismissButton, useOverlay } from '@react-aria/overlays';\nimport { mergeProps } from '@react-aria/utils';\nimport { useMenuTriggerState } from '@react-stately/menu';\nimport { FOCUS_STYLE } from '@utilities/focusStyle';\nimport { merge } from '@utilities/merge';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport React, { FC, useEffect, useRef, useState } from 'react';\nimport { AssetInputProps, AssetInputSize, AssetType } from '../AssetInput';\nimport { AssetThumbnail } from '../AssetThumbnail';\nimport { AssetSubline } from './AssetSubline';\nimport { SpinningCircle } from './SpinningCircle';\n\nexport type SelectedAssetProps = Pick<AssetInputProps, 'actions' | 'isLoading' | 'size'> & {\n asset: AssetType;\n};\n\nexport const SelectedAsset: FC<Required<SelectedAssetProps>> = ({ asset, size, actions, isLoading }) => {\n const menuId = useMemoizedId();\n const labelId = useMemoizedId();\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n const menuState = useMenuTriggerState({ closeOnSelect: true });\n const { isOpen, focusStrategy } = menuState;\n const { menuTriggerProps } = useMenuTrigger({}, menuState, buttonRef);\n const { buttonProps } = useButton(menuTriggerProps, buttonRef);\n const { isFocusVisible, focusProps } = useFocusRing();\n const overlayRef = useRef<HTMLDivElement | null>(null);\n const { overlayProps } = useOverlay(\n { onClose: () => menuState.close(), shouldCloseOnBlur: true, isOpen, isDismissable: true },\n overlayRef,\n );\n const title = asset?.name || 'Your Asset';\n\n const [flyoutWidth, setFlyoutWidth] = useState(0);\n\n useEffect(() => {\n let timer: NodeJS.Timeout | null = null;\n const calculateFlyoutWidth = () => {\n const calculatedWidth = buttonRef.current?.getBoundingClientRect().width ?? 0;\n timer = setTimeout(() => setFlyoutWidth(calculatedWidth), 0);\n };\n const resizeObserver = new ResizeObserver(calculateFlyoutWidth);\n if (buttonRef.current) {\n resizeObserver.observe(buttonRef.current);\n }\n\n return () => {\n timer && clearTimeout(timer);\n resizeObserver.disconnect();\n };\n }, []);\n\n return (\n <div\n className=\"tw-font-sans tw-w-full tw-text-s tw-bg-transparent tw-font-normal tw-min-w-0\"\n aria-labelledby={labelId}\n title={title}\n data-test-id=\"asset-single-input\"\n >\n <button\n {...mergeProps(buttonProps, focusProps)}\n ref={buttonRef}\n className={merge([\n 'tw-w-full tw-flex tw-border tw-rounded tw-overflow-hidden hover:tw-border-black-90 dark:hover:tw-border-black-40 focus-visible:tw-outline-none',\n isFocusVisible && FOCUS_STYLE,\n size === AssetInputSize.Large ? 'tw-h-[11.5rem] tw-flex-col' : 'tw-h-14',\n isOpen || isFocusVisible\n ? 'tw-border-black-90 dark:tw-border-black-10'\n : 'tw-border-black-20 dark:tw-border-black-80',\n ])}\n >\n {isLoading && !asset && (\n <div\n className={merge([\n 'tw-flex tw-justify-center tw-items-center',\n size === AssetInputSize.Large ? 'tw-w-full tw-h-32' : 'tw-w-14 tw-h-full',\n ])}\n >\n <SpinningCircle size={size} />\n </div>\n )}\n {asset && <AssetThumbnail asset={asset} size={size} isActive={isOpen || isFocusVisible} />}\n <div\n className={merge([\n 'tw-min-w-0 tw-max-w-full tw-flex tw-flex-auto tw-self-stretch tw-border-black-100 tw-border-opacity-25',\n size === AssetInputSize.Large ? 'tw-h-14 tw-border-t' : 'tw-h-full tw-border-l',\n ])}\n >\n <div className=\"tw-min-w-0 tw-pr-3 tw-pl-4 tw-flex tw-flex-auto tw-flex-col tw-items-start tw-justify-center tw-h-full\">\n <span\n id={labelId}\n className={merge([\n 'tw-max-w-full tw-text-black-100 tw-text-s tw-truncate dark:tw-text-white',\n (isOpen || isFocusVisible) && 'tw-font-medium',\n ])}\n >\n {title}\n </span>\n <AssetSubline asset={asset} isLoading={isLoading} />\n </div>\n <div className=\"tw-p-4 tw-flex tw-flex-none tw-items-center tw-justify-center\">\n <span\n className={merge([\n 'tw-transition-transform',\n isOpen ? 'tw-rotate-180 tw-text-black-90' : 'tw-text-black-60',\n ])}\n >\n <IconCaretDown size={IconSize.Size16} />\n </span>\n </div>\n </div>\n </button>\n\n <AnimatePresence>\n {isOpen && (\n <motion.div\n style={{\n width: flyoutWidth,\n }}\n className=\"tw-absolute tw-left-auto tw-w-full tw-overflow-hidden tw-box-border tw-p-0 tw-shadow-mid tw-list-none tw-m-0 tw-mt-2 tw-z-20\"\n data-test-id=\"asset-single-input-flyout\"\n key={`asset-input-menu-${menuId}`}\n initial={{ height: 0 }}\n animate={{ height: 'auto' }}\n exit={{ height: 0 }}\n transition={{ ease: [0.04, 0.62, 0.23, 0.98], duration: 0.5 }}\n >\n <FocusScope restoreFocus>\n <div {...overlayProps} ref={overlayRef}>\n <DismissButton onDismiss={() => menuState.close()} />\n <ActionMenu\n menuBlocks={actions}\n focus={focusStrategy}\n onClick={() => menuState.close()}\n />\n <DismissButton onDismiss={() => menuState.close()} />\n </div>\n </FocusScope>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBO,MAAM,KAAkD,CAAC,EAAE,UAAO,SAAM,YAAS,mBAAgB;AACpG,QAAM,IAAS,KACT,IAAU,KACV,IAAY,EAAiC,IAAI,GACjD,IAAY,EAAoB,EAAE,eAAe,GAAM,CAAA,GACvD,EAAE,WAAQ,qBAAkB,GAC5B,EAAE,wBAAqB,EAAe,CA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AA,GAAA;AAAA,IAAc,WAAW,MAAM,EAAU,MAAM;AAAA,EAAA,CAAG,GAClD,kBAAA,cAAA,GAAA;AAAA,IACG,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,SAAS,MAAM,EAAU,MAAM;AAAA,EAAA,CACnC,GACC,kBAAA,cAAA,GAAA;AAAA,IAAc,WAAW,MAAM,EAAU,MAAM;AAAA,EAAA,CAAG,CACvD,CACJ,CACJ,CAER,CACJ;AAER;"}
@@ -1,3 +1,4 @@
1
1
  import { PlateRenderLeafProps } from '@udecode/plate';
2
2
  import { FC } from 'react';
3
+ export declare const BOLD_CLASSES = "tw-font-bold";
3
4
  export declare const BoldMark: FC<PlateRenderLeafProps>;
@@ -1,9 +1,10 @@
1
- import o from "react";
2
- const r = ({ attributes: t, children: e }) => /* @__PURE__ */ o.createElement("span", {
1
+ import e from "react";
2
+ const a = "tw-font-bold", n = ({ attributes: t, children: o }) => /* @__PURE__ */ e.createElement("span", {
3
3
  ...t,
4
- className: "tw-font-bold"
5
- }, e);
4
+ className: a
5
+ }, o);
6
6
  export {
7
- r as BoldMark
7
+ a as BOLD_CLASSES,
8
+ n as BoldMark
8
9
  };
9
10
  //# sourceMappingURL=bold.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bold.es.js","sources":["../../../../src/components/RichTextEditor/components/bold.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderLeafProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const BoldMark: FC<PlateRenderLeafProps> = ({ attributes, children }) => (\n <span {...attributes} className=\"tw-font-bold\">\n {children}\n </span>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IAAqC,CAAC,EAAE,eAAY,kBAC5D,kBAAA,cAAA,QAAA;AAAA,EAAM,GAAG;AAAA,EAAY,WAAU;AAAA,GAC3B,CACL;"}
1
+ {"version":3,"file":"bold.es.js","sources":["../../../../src/components/RichTextEditor/components/bold.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderLeafProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const BOLD_CLASSES = 'tw-font-bold';\n\nexport const BoldMark: FC<PlateRenderLeafProps> = ({ attributes, children }) => (\n <span {...attributes} className={BOLD_CLASSES}>\n {children}\n </span>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IAAe,gBAEf,IAAqC,CAAC,EAAE,eAAY,kBAC5D,kBAAA,cAAA,QAAA;AAAA,EAAM,GAAG;AAAA,EAAY,WAAW;AAAA,GAC5B,CACL;"}
@@ -1,3 +1,4 @@
1
1
  import { PlateRenderLeafProps } from '@udecode/plate';
2
2
  import { FC } from 'react';
3
+ export declare const CODE_CLASSES = "tw-table-cell tw-rounded tw-bg-box-neutral tw-text-box-neutral-inverse tw-m-0 tw-px-2 tw-py-0.5";
3
4
  export declare const CodeMark: FC<PlateRenderLeafProps>;
@@ -1,9 +1,10 @@
1
1
  import a from "react";
2
- const o = ({ attributes: t, children: e }) => /* @__PURE__ */ a.createElement("span", {
2
+ const o = "tw-table-cell tw-rounded tw-bg-box-neutral tw-text-box-neutral-inverse tw-m-0 tw-px-2 tw-py-0.5", n = ({ attributes: t, children: e }) => /* @__PURE__ */ a.createElement("span", {
3
3
  ...t,
4
- className: "tw-table-cell tw-rounded tw-bg-box-neutral tw-text-box-neutral-inverse tw-m-0 tw-px-2 tw-py-0.5"
4
+ className: o
5
5
  }, e);
6
6
  export {
7
- o as CodeMark
7
+ o as CODE_CLASSES,
8
+ n as CodeMark
8
9
  };
9
10
  //# sourceMappingURL=code.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"code.es.js","sources":["../../../../src/components/RichTextEditor/components/code.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderLeafProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const CodeMark: FC<PlateRenderLeafProps> = ({ attributes, children }) => (\n <span\n {...attributes}\n className=\"tw-table-cell tw-rounded tw-bg-box-neutral tw-text-box-neutral-inverse tw-m-0 tw-px-2 tw-py-0.5\"\n >\n {children}\n </span>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IAAqC,CAAC,EAAE,eAAY,kBAC5D,kBAAA,cAAA,QAAA;AAAA,EACI,GAAG;AAAA,EACJ,WAAU;AAAA,GAET,CACL;"}
1
+ {"version":3,"file":"code.es.js","sources":["../../../../src/components/RichTextEditor/components/code.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderLeafProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const CODE_CLASSES =\n 'tw-table-cell tw-rounded tw-bg-box-neutral tw-text-box-neutral-inverse tw-m-0 tw-px-2 tw-py-0.5';\n\nexport const CodeMark: FC<PlateRenderLeafProps> = ({ attributes, children }) => (\n <span {...attributes} className={CODE_CLASSES}>\n {children}\n </span>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IACT,mGAES,IAAqC,CAAC,EAAE,eAAY,kBAC5D,kBAAA,cAAA,QAAA;AAAA,EAAM,GAAG;AAAA,EAAY,WAAW;AAAA,GAC5B,CACL;"}
@@ -1,3 +1,4 @@
1
1
  import { PlateRenderLeafProps } from '@udecode/plate';
2
2
  import { FC } from 'react';
3
+ export declare const ITALIC_CLASSES = "tw-italic";
3
4
  export declare const ItalicMark: FC<PlateRenderLeafProps>;
@@ -1,9 +1,10 @@
1
- import e from "react";
2
- const r = ({ attributes: t, children: a }) => /* @__PURE__ */ e.createElement("span", {
1
+ import c from "react";
2
+ const e = "tw-italic", r = ({ attributes: t, children: a }) => /* @__PURE__ */ c.createElement("span", {
3
3
  ...t,
4
- className: "tw-italic"
4
+ className: e
5
5
  }, a);
6
6
  export {
7
+ e as ITALIC_CLASSES,
7
8
  r as ItalicMark
8
9
  };
9
10
  //# sourceMappingURL=italic.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"italic.es.js","sources":["../../../../src/components/RichTextEditor/components/italic.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderLeafProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const ItalicMark: FC<PlateRenderLeafProps> = ({ attributes, children }) => (\n <span {...attributes} className=\"tw-italic\">\n {children}\n </span>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IAAuC,CAAC,EAAE,eAAY,kBAC9D,kBAAA,cAAA,QAAA;AAAA,EAAM,GAAG;AAAA,EAAY,WAAU;AAAA,GAC3B,CACL;"}
1
+ {"version":3,"file":"italic.es.js","sources":["../../../../src/components/RichTextEditor/components/italic.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderLeafProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const ITALIC_CLASSES = 'tw-italic';\n\nexport const ItalicMark: FC<PlateRenderLeafProps> = ({ attributes, children }) => (\n <span {...attributes} className={ITALIC_CLASSES}>\n {children}\n </span>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IAAiB,aAEjB,IAAuC,CAAC,EAAE,eAAY,kBAC9D,kBAAA,cAAA,QAAA;AAAA,EAAM,GAAG;AAAA,EAAY,WAAW;AAAA,GAC5B,CACL;"}
@@ -1,4 +1,4 @@
1
1
  import { PlateRenderElementProps } from '@udecode/plate';
2
2
  import { FC } from 'react';
3
- export declare const LINK_CHOOSER_CLASS_NAMES = "tw-text-text-interactive tw-underline tw-cursor-pointer";
3
+ export declare const LINK_CLASSES = "tw-text-text-interactive tw-underline tw-cursor-pointer";
4
4
  export declare const LinkElement: FC<PlateRenderElementProps>;
@@ -1,10 +1,10 @@
1
- import { useEditableProps as F, unwrapNodes as O } from "@udecode/plate";
1
+ import { useEditableProps as N, unwrapNodes as O } from "@udecode/plate";
2
2
  import e, { useState as a } from "react";
3
- import { LINK_CHANGE_CONFIRMED as R, LINK_CHANGE_CANCELED as _ } from "../plugins/linkChooserPlugin/events.es.js";
4
- import { getAndUpsertLink as w } from "../plugins/linkChooserPlugin/transforms/getAndUpsertLink.es.js";
5
- import { LinkChooserFlyout as A } from "../plugins/linkChooserPlugin/ui/LinkChooserFlyout.es.js";
6
- import { LinkChooserPreviewFlyout as I } from "../plugins/linkChooserPlugin/ui/LinkChooserPreviewFlyout.es.js";
7
- const L = "tw-text-text-interactive tw-underline tw-cursor-pointer", H = (k) => {
3
+ import { LINK_CHANGE_CONFIRMED as w, LINK_CHANGE_CANCELED as I } from "../plugins/linkChooserPlugin/events.es.js";
4
+ import { getAndUpsertLink as R } from "../plugins/linkChooserPlugin/transforms/getAndUpsertLink.es.js";
5
+ import { LinkChooserFlyout as v } from "../plugins/linkChooserPlugin/ui/LinkChooserFlyout.es.js";
6
+ import { LinkChooserPreviewFlyout as A } from "../plugins/linkChooserPlugin/ui/LinkChooserPreviewFlyout.es.js";
7
+ const L = "tw-text-text-interactive tw-underline tw-cursor-pointer", K = (k) => {
8
8
  const { children: l, element: c, editor: o } = k, {
9
9
  chosenLink: t = {
10
10
  searchResult: {
@@ -12,22 +12,22 @@ const L = "tw-text-text-interactive tw-underline tw-cursor-pointer", H = (k) =>
12
12
  },
13
13
  openInNewTab: !1
14
14
  }
15
- } = c, [E, s] = a(!1), [f, m] = a(!1), [h, u] = a(t), C = F(o).readOnly, i = () => !t || !t.searchResult ? "" : t.searchResult.link, p = () => {
15
+ } = c, [f, s] = a(!1), [h, m] = a(!1), [E, u] = a(t), d = N(o).readOnly, i = () => !t || !t.searchResult ? "" : t.searchResult.link, p = () => {
16
16
  const r = "_self", n = "_blank";
17
17
  return !t || !t.openInNewTab ? r : n;
18
- }, d = (r) => (u(r), m(!0), new Promise((n) => {
19
- document.addEventListener(R, (y) => {
20
- n(y.detail.chosenLink);
21
- }), document.addEventListener(_, () => n());
22
- })), N = () => {
23
- s(!1), o && w(o, d);
24
- }, g = () => {
18
+ }, C = (r) => (u(r), m(!0), new Promise((n) => {
19
+ document.addEventListener(w, (F) => {
20
+ n(F.detail.chosenLink);
21
+ }), document.addEventListener(I, () => n());
22
+ })), g = () => {
23
+ s(!1), o && R(o, C);
24
+ }, y = () => {
25
25
  !o.selection || O(o, {
26
26
  at: o.selection,
27
27
  match: { type: ["a"] }
28
28
  });
29
29
  };
30
- return /* @__PURE__ */ e.createElement(e.Fragment, null, C ? /* @__PURE__ */ e.createElement("a", {
30
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, d ? /* @__PURE__ */ e.createElement("a", {
31
31
  "data-chosen-link": JSON.stringify(t),
32
32
  href: i(),
33
33
  target: p(),
@@ -40,20 +40,20 @@ const L = "tw-text-text-interactive tw-underline tw-cursor-pointer", H = (k) =>
40
40
  target: p(),
41
41
  rel: "noreferrer",
42
42
  className: L
43
- }, l), /* @__PURE__ */ e.createElement(I, {
44
- isFlyoutOpen: E,
43
+ }, l), /* @__PURE__ */ e.createElement(A, {
44
+ isFlyoutOpen: f,
45
45
  setIsFlyoutOpen: s,
46
46
  trigger: ({ "aria-label": r }, n) => /* @__PURE__ */ e.createElement("span", {
47
47
  ref: n,
48
48
  "aria-label": r
49
49
  }),
50
50
  href: i(),
51
- onEditClick: N,
52
- onRemoveClick: g
53
- }), /* @__PURE__ */ e.createElement(A, {
54
- isFlyoutOpen: f,
51
+ onEditClick: g,
52
+ onRemoveClick: y
53
+ }), /* @__PURE__ */ e.createElement(v, {
54
+ isFlyoutOpen: h,
55
55
  setIsFlyoutOpen: m,
56
- chosenLink: h,
56
+ chosenLink: E,
57
57
  setChosenLink: u,
58
58
  trigger: ({ "aria-label": r }, n) => /* @__PURE__ */ e.createElement("span", {
59
59
  ref: n,
@@ -62,7 +62,7 @@ const L = "tw-text-text-interactive tw-underline tw-cursor-pointer", H = (k) =>
62
62
  })));
63
63
  };
64
64
  export {
65
- L as LINK_CHOOSER_CLASS_NAMES,
66
- H as LinkElement
65
+ L as LINK_CLASSES,
66
+ K as LinkElement
67
67
  };
68
68
  //# sourceMappingURL=link.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"link.es.js","sources":["../../../../src/components/RichTextEditor/components/link.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderElementProps, unwrapNodes, useEditableProps } from '@udecode/plate';\nimport React, { FC, MutableRefObject, useState } from 'react';\nimport { LINK_CHANGE_CANCELED, LINK_CHANGE_CONFIRMED } from '../plugins/linkChooserPlugin/events';\nimport { getAndUpsertLink } from '../plugins/linkChooserPlugin/transforms/getAndUpsertLink';\nimport { ChosenLink } from '../plugins/linkChooserPlugin/types';\nimport { LinkChooserFlyout } from '../plugins/linkChooserPlugin/ui/LinkChooserFlyout';\nimport { LinkChooserPreviewFlyout } from '../plugins/linkChooserPlugin/ui/LinkChooserPreviewFlyout';\n\nexport const LINK_CHOOSER_CLASS_NAMES = 'tw-text-text-interactive tw-underline tw-cursor-pointer';\n\nexport const LinkElement: FC<PlateRenderElementProps> = (props) => {\n const { children, element, editor } = props;\n\n // Because an old version was already used in clarify, it must be ensured that the element can also handle the old structure.\n const {\n chosenLink = {\n searchResult: {\n link: element.url,\n },\n openInNewTab: false,\n },\n } = element;\n\n const [isLinkChooserPreviewFlyoutOpen, setIsLinkChooserPreviewFlyoutOpen] = useState<boolean>(false);\n const [isLinkChooserFlyoutOpen, setIsLinkChooserFlyoutOpen] = useState<boolean>(false);\n const [prevChosenLink, setPrevChosenLink] = useState<ChosenLink>(chosenLink);\n\n const isReadOnly = useEditableProps(editor).readOnly;\n\n const getHref = () => {\n if (!chosenLink || !chosenLink.searchResult) {\n return '';\n }\n return chosenLink.searchResult.link;\n };\n\n const getTarget = () => {\n const TARGET_DEFAULT = '_self';\n const TARGET_BLANK = '_blank';\n if (!chosenLink || !chosenLink.openInNewTab) {\n return TARGET_DEFAULT;\n }\n return TARGET_BLANK;\n };\n\n const getLinkFromLinkChooser = (prevLink: ChosenLink): Promise<ChosenLink | void> => {\n setPrevChosenLink(prevLink);\n setIsLinkChooserFlyoutOpen(true);\n\n return new Promise<ChosenLink | void>((resolve) => {\n document.addEventListener(LINK_CHANGE_CONFIRMED, (event: any) => {\n resolve(event.detail.chosenLink);\n });\n document.addEventListener(LINK_CHANGE_CANCELED, () => resolve());\n });\n };\n\n const onEdit = () => {\n setIsLinkChooserPreviewFlyoutOpen(false);\n if (!editor) {\n return;\n }\n getAndUpsertLink(editor, getLinkFromLinkChooser);\n };\n\n const onRemove = () => {\n if (!editor.selection) {\n return;\n }\n unwrapNodes(editor, {\n at: editor.selection,\n match: { type: ['a'] },\n });\n };\n\n return (\n <>\n {isReadOnly ? (\n <a\n data-chosen-link={JSON.stringify(chosenLink)}\n href={getHref()}\n target={getTarget()}\n rel=\"noreferrer\"\n className={LINK_CHOOSER_CLASS_NAMES}\n >\n {children}\n </a>\n ) : (\n <>\n <a\n onClick={() => setIsLinkChooserPreviewFlyoutOpen(true)}\n data-chosen-link={JSON.stringify(chosenLink)}\n href={getHref()}\n target={getTarget()}\n rel=\"noreferrer\"\n className={LINK_CHOOSER_CLASS_NAMES}\n >\n {children}\n </a>\n <LinkChooserPreviewFlyout\n isFlyoutOpen={isLinkChooserPreviewFlyoutOpen}\n setIsFlyoutOpen={setIsLinkChooserPreviewFlyoutOpen}\n trigger={({ 'aria-label': ariaLabel }, ref: MutableRefObject<HTMLDivElement>) => (\n <span ref={ref} aria-label={ariaLabel}></span>\n )}\n href={getHref()}\n onEditClick={onEdit}\n onRemoveClick={onRemove}\n />\n <LinkChooserFlyout\n isFlyoutOpen={isLinkChooserFlyoutOpen}\n setIsFlyoutOpen={setIsLinkChooserFlyoutOpen}\n chosenLink={prevChosenLink}\n setChosenLink={setPrevChosenLink}\n trigger={({ 'aria-label': ariaLabel }, ref: MutableRefObject<HTMLDivElement>) => (\n <span ref={ref} aria-label={ariaLabel}></span>\n )}\n />\n </>\n )}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;AAUO,MAAM,IAA2B,2DAE3B,IAA2C,CAAC,MAAU;AACzD,QAAA,EAAE,aAAU,YAAS,cAAW,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AS,MAAM,EAAkC,EAAI;AAAA,IACrD,oBAAkB,KAAK,UAAU,CAAU;AAAA,IAC3C,MAAM,EAAQ;AAAA,IACd,QAAQ,EAAU;AAAA,IAClB,KAAI;AAAA,IACJ,WAAW;AAAA,EAEV,GAAA,CACL,GACC,kBAAA,cAAA,GAAA;AAAA,IACG,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,SAAS,CAAC,EAAE,cAAc,KAAa,MAClC,kBAAA,cAAA,QAAA;AAAA,MAAK;AAAA,MAAU,cAAY;AAAA,IAAA,CAAW;AAAA,IAE3C,MAAM,EAAQ;AAAA,IACd,aAAa;AAAA,IACb,eAAe;AAAA,EAAA,CACnB,GACC,kBAAA,cAAA,GAAA;AAAA,IACG,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,SAAS,CAAC,EAAE,cAAc,KAAa,MAClC,kBAAA,cAAA,QAAA;AAAA,MAAK;AAAA,MAAU,cAAY;AAAA,IAAA,CAAW;AAAA,EAE/C,CAAA,CACJ,CAER;AAER;"}
1
+ {"version":3,"file":"link.es.js","sources":["../../../../src/components/RichTextEditor/components/link.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderElementProps, unwrapNodes, useEditableProps } from '@udecode/plate';\nimport React, { FC, MutableRefObject, useState } from 'react';\nimport { LINK_CHANGE_CANCELED, LINK_CHANGE_CONFIRMED } from '../plugins/linkChooserPlugin/events';\nimport { getAndUpsertLink } from '../plugins/linkChooserPlugin/transforms/getAndUpsertLink';\nimport { ChosenLink } from '../plugins/linkChooserPlugin/types';\nimport { LinkChooserFlyout } from '../plugins/linkChooserPlugin/ui/LinkChooserFlyout';\nimport { LinkChooserPreviewFlyout } from '../plugins/linkChooserPlugin/ui/LinkChooserPreviewFlyout';\n\nexport const LINK_CLASSES = 'tw-text-text-interactive tw-underline tw-cursor-pointer';\n\nexport const LinkElement: FC<PlateRenderElementProps> = (props) => {\n const { children, element, editor } = props;\n\n // Because an old version was already used in clarify, it must be ensured that the element can also handle the old structure.\n const {\n chosenLink = {\n searchResult: {\n link: element.url,\n },\n openInNewTab: false,\n },\n } = element;\n\n const [isLinkChooserPreviewFlyoutOpen, setIsLinkChooserPreviewFlyoutOpen] = useState<boolean>(false);\n const [isLinkChooserFlyoutOpen, setIsLinkChooserFlyoutOpen] = useState<boolean>(false);\n const [prevChosenLink, setPrevChosenLink] = useState<ChosenLink>(chosenLink);\n\n const isReadOnly = useEditableProps(editor).readOnly;\n\n const getHref = () => {\n if (!chosenLink || !chosenLink.searchResult) {\n return '';\n }\n return chosenLink.searchResult.link;\n };\n\n const getTarget = () => {\n const TARGET_DEFAULT = '_self';\n const TARGET_BLANK = '_blank';\n if (!chosenLink || !chosenLink.openInNewTab) {\n return TARGET_DEFAULT;\n }\n return TARGET_BLANK;\n };\n\n const getLinkFromLinkChooser = (prevLink: ChosenLink): Promise<ChosenLink | void> => {\n setPrevChosenLink(prevLink);\n setIsLinkChooserFlyoutOpen(true);\n\n return new Promise<ChosenLink | void>((resolve) => {\n document.addEventListener(LINK_CHANGE_CONFIRMED, (event: any) => {\n resolve(event.detail.chosenLink);\n });\n document.addEventListener(LINK_CHANGE_CANCELED, () => resolve());\n });\n };\n\n const onEdit = () => {\n setIsLinkChooserPreviewFlyoutOpen(false);\n if (!editor) {\n return;\n }\n getAndUpsertLink(editor, getLinkFromLinkChooser);\n };\n\n const onRemove = () => {\n if (!editor.selection) {\n return;\n }\n unwrapNodes(editor, {\n at: editor.selection,\n match: { type: ['a'] },\n });\n };\n\n return (\n <>\n {isReadOnly ? (\n <a\n data-chosen-link={JSON.stringify(chosenLink)}\n href={getHref()}\n target={getTarget()}\n rel=\"noreferrer\"\n className={LINK_CLASSES}\n >\n {children}\n </a>\n ) : (\n <>\n <a\n onClick={() => setIsLinkChooserPreviewFlyoutOpen(true)}\n data-chosen-link={JSON.stringify(chosenLink)}\n href={getHref()}\n target={getTarget()}\n rel=\"noreferrer\"\n className={LINK_CLASSES}\n >\n {children}\n </a>\n <LinkChooserPreviewFlyout\n isFlyoutOpen={isLinkChooserPreviewFlyoutOpen}\n setIsFlyoutOpen={setIsLinkChooserPreviewFlyoutOpen}\n trigger={({ 'aria-label': ariaLabel }, ref: MutableRefObject<HTMLDivElement>) => (\n <span ref={ref} aria-label={ariaLabel}></span>\n )}\n href={getHref()}\n onEditClick={onEdit}\n onRemoveClick={onRemove}\n />\n <LinkChooserFlyout\n isFlyoutOpen={isLinkChooserFlyoutOpen}\n setIsFlyoutOpen={setIsLinkChooserFlyoutOpen}\n chosenLink={prevChosenLink}\n setChosenLink={setPrevChosenLink}\n trigger={({ 'aria-label': ariaLabel }, ref: MutableRefObject<HTMLDivElement>) => (\n <span ref={ref} aria-label={ariaLabel}></span>\n )}\n />\n </>\n )}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;AAUO,MAAM,IAAe,2DAEf,IAA2C,CAAC,MAAU;AACzD,QAAA,EAAE,aAAU,YAAS,cAAW,GAGhC;AAAA,IACF,gBAAa;AAAA,MACT,cAAc;AAAA,QACV,MAAM,EAAQ;AAAA,MAClB;AAAA,MACA,cAAc;AAAA,IAClB;AAAA,MACA,GAEE,CAAC,GAAgC,KAAqC,EAAkB,EAAK,GAC7F,CAAC,GAAyB,KAA8B,EAAkB,EAAK,GAC/E,CAAC,GAAgB,KAAqB,EAAqB,CAAU,GAErE,IAAa,EAAiB,CAAM,EAAE,UAEtC,IAAU,MACR,CAAC,KAAc,CAAC,EAAW,eACpB,KAEJ,EAAW,aAAa,MAG7B,IAAY,MAAM;AACpB,UAAM,IAAiB,SACjB,IAAe;AACrB,WAAI,CAAC,KAAc,CAAC,EAAW,eACpB,IAEJ;AAAA,EAAA,GAGL,IAAyB,CAAC,MAC5B,GAAkB,CAAQ,GAC1B,EAA2B,EAAI,GAExB,IAAI,QAA2B,CAAC,MAAY;AACtC,aAAA,iBAAiB,GAAuB,CAAC,MAAe;AACrD,QAAA,E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AK;AAAA,MAAU,cAAY;AAAA,IAAA,CAAW;AAAA,EAE/C,CAAA,CACJ,CAER;AAER;"}
@@ -1,3 +1,4 @@
1
1
  import { PlateRenderElementProps } from '@udecode/plate';
2
2
  import { FC } from 'react';
3
+ export declare const OL_CLASSES = "tw-list-decimal tw-pl-6";
3
4
  export declare const OrderedListElement: FC<PlateRenderElementProps>;
@@ -1,9 +1,10 @@
1
1
  import l from "react";
2
- const r = ({ attributes: e, children: t }) => /* @__PURE__ */ l.createElement("ol", {
3
- className: "tw-list-decimal tw-pl-6",
2
+ const c = "tw-list-decimal tw-pl-6", o = ({ attributes: e, children: t }) => /* @__PURE__ */ l.createElement("ol", {
3
+ className: c,
4
4
  ...e
5
5
  }, t);
6
6
  export {
7
- r as OrderedListElement
7
+ c as OL_CLASSES,
8
+ o as OrderedListElement
8
9
  };
9
10
  //# sourceMappingURL=ordered-list.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ordered-list.es.js","sources":["../../../../src/components/RichTextEditor/components/ordered-list.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderElementProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const OrderedListElement: FC<PlateRenderElementProps> = ({ attributes, children }) => (\n <ol className=\"tw-list-decimal tw-pl-6\" {...attributes}>\n {children}\n </ol>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IAAkD,CAAC,EAAE,eAAY,kBACzE,kBAAA,cAAA,MAAA;AAAA,EAAG,WAAU;AAAA,EAA2B,GAAG;AAAA,GACvC,CACL;"}
1
+ {"version":3,"file":"ordered-list.es.js","sources":["../../../../src/components/RichTextEditor/components/ordered-list.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderElementProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const OL_CLASSES = 'tw-list-decimal tw-pl-6';\n\nexport const OrderedListElement: FC<PlateRenderElementProps> = ({ attributes, children }) => (\n <ol className={OL_CLASSES} {...attributes}>\n {children}\n </ol>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IAAa,2BAEb,IAAkD,CAAC,EAAE,eAAY,kBACzE,kBAAA,cAAA,MAAA;AAAA,EAAG,WAAW;AAAA,EAAa,GAAG;AAAA,GAC1B,CACL;"}
@@ -1,3 +1,4 @@
1
1
  import { PlateRenderLeafProps } from '@udecode/plate';
2
2
  import { FC } from 'react';
3
+ export declare const STRIKETHROUGH_CLASSES = "tw-line-through";
3
4
  export declare const StrikethroughMark: FC<PlateRenderLeafProps>;
@@ -1,9 +1,10 @@
1
1
  import r from "react";
2
- const o = ({ attributes: t, children: e }) => /* @__PURE__ */ r.createElement("span", {
2
+ const o = "tw-line-through", c = ({ attributes: t, children: e }) => /* @__PURE__ */ r.createElement("span", {
3
3
  ...t,
4
- className: "tw-line-through"
4
+ className: o
5
5
  }, e);
6
6
  export {
7
- o as StrikethroughMark
7
+ o as STRIKETHROUGH_CLASSES,
8
+ c as StrikethroughMark
8
9
  };
9
10
  //# sourceMappingURL=strikethrough.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"strikethrough.es.js","sources":["../../../../src/components/RichTextEditor/components/strikethrough.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderLeafProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const StrikethroughMark: FC<PlateRenderLeafProps> = ({ attributes, children }) => (\n <span {...attributes} className=\"tw-line-through\">\n {children}\n </span>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IAA8C,CAAC,EAAE,eAAY,kBACrE,kBAAA,cAAA,QAAA;AAAA,EAAM,GAAG;AAAA,EAAY,WAAU;AAAA,GAC3B,CACL;"}
1
+ {"version":3,"file":"strikethrough.es.js","sources":["../../../../src/components/RichTextEditor/components/strikethrough.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderLeafProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const STRIKETHROUGH_CLASSES = 'tw-line-through';\n\nexport const StrikethroughMark: FC<PlateRenderLeafProps> = ({ attributes, children }) => (\n <span {...attributes} className={STRIKETHROUGH_CLASSES}>\n {children}\n </span>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IAAwB,mBAExB,IAA8C,CAAC,EAAE,eAAY,kBACrE,kBAAA,cAAA,QAAA;AAAA,EAAM,GAAG;AAAA,EAAY,WAAW;AAAA,GAC5B,CACL;"}
@@ -1,3 +1,4 @@
1
1
  import { PlateRenderLeafProps } from '@udecode/plate';
2
2
  import { FC } from 'react';
3
+ export declare const UNDERLINE_CLASSES = "tw-underline";
3
4
  export declare const UnderlineMark: FC<PlateRenderLeafProps>;
@@ -1,9 +1,10 @@
1
- import r from "react";
2
- const a = ({ attributes: e, children: n }) => /* @__PURE__ */ r.createElement("span", {
1
+ import t from "react";
2
+ const r = "tw-underline", c = ({ attributes: e, children: n }) => /* @__PURE__ */ t.createElement("span", {
3
3
  ...e,
4
- className: "tw-underline"
4
+ className: r
5
5
  }, n);
6
6
  export {
7
- a as UnderlineMark
7
+ r as UNDERLINE_CLASSES,
8
+ c as UnderlineMark
8
9
  };
9
10
  //# sourceMappingURL=underline.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"underline.es.js","sources":["../../../../src/components/RichTextEditor/components/underline.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderLeafProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const UnderlineMark: FC<PlateRenderLeafProps> = ({ attributes, children }) => (\n <span {...attributes} className=\"tw-underline\">\n {children}\n </span>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IAA0C,CAAC,EAAE,eAAY,kBACjE,kBAAA,cAAA,QAAA;AAAA,EAAM,GAAG;AAAA,EAAY,WAAU;AAAA,GAC3B,CACL;"}
1
+ {"version":3,"file":"underline.es.js","sources":["../../../../src/components/RichTextEditor/components/underline.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderLeafProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const UNDERLINE_CLASSES = 'tw-underline';\n\nexport const UnderlineMark: FC<PlateRenderLeafProps> = ({ attributes, children }) => (\n <span {...attributes} className={UNDERLINE_CLASSES}>\n {children}\n </span>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IAAoB,gBAEpB,IAA0C,CAAC,EAAE,eAAY,kBACjE,kBAAA,cAAA,QAAA;AAAA,EAAM,GAAG;AAAA,EAAY,WAAW;AAAA,GAC5B,CACL;"}
@@ -1,3 +1,4 @@
1
1
  import { PlateRenderElementProps } from '@udecode/plate';
2
2
  import { FC } from 'react';
3
+ export declare const UL_CLASSES = "tw-list-disc tw-pl-6";
3
4
  export declare const UnorderedListElement: FC<PlateRenderElementProps>;
@@ -1,9 +1,10 @@
1
- import l from "react";
2
- const s = ({ attributes: e, children: t }) => /* @__PURE__ */ l.createElement("ul", {
3
- className: "tw-list-disc tw-pl-6",
4
- ...e
5
- }, t);
1
+ import s from "react";
2
+ const c = "tw-list-disc tw-pl-6", o = ({ attributes: t, children: e }) => /* @__PURE__ */ s.createElement("ul", {
3
+ className: c,
4
+ ...t
5
+ }, e);
6
6
  export {
7
- s as UnorderedListElement
7
+ c as UL_CLASSES,
8
+ o as UnorderedListElement
8
9
  };
9
10
  //# sourceMappingURL=unordered-list.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unordered-list.es.js","sources":["../../../../src/components/RichTextEditor/components/unordered-list.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderElementProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const UnorderedListElement: FC<PlateRenderElementProps> = ({ attributes, children }) => (\n <ul className=\"tw-list-disc tw-pl-6\" {...attributes}>\n {children}\n </ul>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IAAoD,CAAC,EAAE,eAAY,kBAC3E,kBAAA,cAAA,MAAA;AAAA,EAAG,WAAU;AAAA,EAAwB,GAAG;AAAA,GACpC,CACL;"}
1
+ {"version":3,"file":"unordered-list.es.js","sources":["../../../../src/components/RichTextEditor/components/unordered-list.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { PlateRenderElementProps } from '@udecode/plate';\nimport React, { FC } from 'react';\n\nexport const UL_CLASSES = 'tw-list-disc tw-pl-6';\n\nexport const UnorderedListElement: FC<PlateRenderElementProps> = ({ attributes, children }) => (\n <ul className={UL_CLASSES} {...attributes}>\n {children}\n </ul>\n);\n"],"names":[],"mappings":";AAKO,MAAM,IAAa,wBAEb,IAAoD,CAAC,EAAE,eAAY,kBAC3E,kBAAA,cAAA,MAAA;AAAA,EAAG,WAAW;AAAA,EAAa,GAAG;AAAA,GAC1B,CACL;"}
@@ -2,4 +2,4 @@ export * from './RichTextEditor';
2
2
  export * from './utils';
3
3
  export { EditorActions } from './utils/actions';
4
4
  export { EMPTY_RICH_TEXT_VALUE } from './utils/parseRawValue';
5
- export * from './utils/serializeToHtml';
5
+ export * from './serializer/serializeToHtml';
@@ -1687,12 +1687,10 @@ import "../../../context/DesignTokensContext.es.js";
1687
1687
  import "slate-react";
1688
1688
  import "../createLinkChooserPlugin.es.js";
1689
1689
  import "slate";
1690
- import "@react-aria/table";
1691
1690
  import "@react-stately/table";
1692
- import "@react-stately/toggle";
1693
1691
  import "react-textarea-autosize";
1694
1692
  import "../../../../Tree/utils/mocks.es.js";
1695
- const VA = ({ id: m, styles: c, classNames: l }) => {
1693
+ const qA = ({ id: m, styles: c, classNames: l }) => {
1696
1694
  m = L(m);
1697
1695
  const t = f(m), [E, e] = a(!1), [n, s] = a({
1698
1696
  searchResult: null,
@@ -1726,6 +1724,6 @@ const VA = ({ id: m, styles: c, classNames: l }) => {
1726
1724
  });
1727
1725
  };
1728
1726
  export {
1729
- VA as EditLinkChooserButton
1727
+ qA as EditLinkChooserButton
1730
1728
  };
1731
1729
  //# sourceMappingURL=EditLinkChooserButton.es.js.map