@contentful/field-editor-rich-text 2.0.0-next.41 → 2.0.0-next.42

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,6 +1,6 @@
1
- import React__default, { createContext, useContext, useMemo, useEffect, createElement, useState, memo, Fragment, useCallback } from 'react';
2
- import { useEntities, MissingEntityCard, WrappedAssetCard, WrappedEntryCard, ScheduledIconWithTooltip, EntityProvider, getScheduleTooltipContent } from '@contentful/field-editor-reference';
3
- import { entityHelpers, ModalDialogLauncher, FieldConnector } from '@contentful/field-editor-shared';
1
+ import React__default, { createContext, useContext, useMemo, createElement, useEffect, useState, memo, Fragment, useCallback } from 'react';
2
+ import { useEntities, ScheduledIconWithTooltip, MissingEntityCard, AssetThumbnail, EntityProvider, getScheduleTooltipContent } from '@contentful/field-editor-reference';
3
+ import { entityHelpers, shortenStorageUnit, isValidImage, ModalDialogLauncher, FieldConnector } from '@contentful/field-editor-shared';
4
4
  import { BLOCKS, INLINES, TEXT_CONTAINERS, HEADINGS, LIST_ITEM_BLOCKS, MARKS, CONTAINERS, TOP_LEVEL_BLOCKS, VOID_BLOCKS, EMPTY_DOCUMENT } from '@contentful/rich-text-types';
5
5
  import { usePlateEditorRef, usePlateEditorState, getNodes, toggleNodeType, getText, getAbove, setNodes, isAncestorEmpty, match, getLastChildPath, wrapNodes, getPluginType, unwrapNodes, isCollapsed, isRangeAcrossBlocks, ELEMENT_DEFAULT, findNode, getParent, getBlockAbove, isSelectionAtBlockStart, isSelectionAtBlockEnd, isFirstChild, insertNodes, moveChildren, isBlockAboveEmpty, mockPlugin, deleteFragment, isMarkActive, toggleMark, someHtmlElement, KEY_DESERIALIZE_HTML, hasSingleChild, isLastChild, someNode, getChildren as getChildren$1, queryNode, createDeserializeHtmlPlugin, createDeserializeAstPlugin, createPlateEditor, getPlateSelectors, getPlateActions, Plate } from '@udecode/plate-core';
6
6
  import { css, cx } from 'emotion';
@@ -13,12 +13,13 @@ import isHotkey from 'is-hotkey';
13
13
  import { Text, Element, Editor, Transforms, Range, Path, Node, Point } from 'slate';
14
14
  import { ReactEditor, useSelected, useReadOnly, useFocused } from 'slate-react';
15
15
  import constate from 'constate';
16
- import { AssetCard, EntryCard, Menu, Flex, Icon, InlineEntryCard, MenuItem, Text as Text$1, Button, Tooltip, ModalContent, Form, FormControl, TextInput, Select, FormLabel, TextLink, ModalControls, Card, IconButton } from '@contentful/f36-components';
17
- import find from 'lodash-es/find';
18
- import flow from 'lodash-es/flow';
16
+ import { AssetCard, Menu, Text as Text$1, Notification, EntryCard, MenuItem, Flex, Icon, InlineEntryCard, Button, Tooltip, ModalContent, Form, FormControl, TextInput, Select, FormLabel, TextLink, ModalControls, Card, IconButton } from '@contentful/f36-components';
17
+ import mimetype from '@contentful/mimetype';
19
18
  import get from 'lodash-es/get';
20
- import { AssetIcon, EmbeddedEntryBlockIcon, ClockIcon, EmbeddedEntryInlineIcon, ChevronDownIcon, HorizontalRuleIcon, LinkIcon, ListBulletedIcon, ListNumberedIcon, FormatBoldIcon, CodeIcon, FormatItalicIcon, FormatUnderlinedIcon, QuoteIcon, TableIcon, PlusIcon } from '@contentful/f36-icons';
19
+ import { ClockIcon, AssetIcon, EmbeddedEntryBlockIcon, EmbeddedEntryInlineIcon, ChevronDownIcon, HorizontalRuleIcon, LinkIcon, ListBulletedIcon, ListNumberedIcon, FormatBoldIcon, CodeIcon, FormatItalicIcon, FormatUnderlinedIcon, QuoteIcon, TableIcon, PlusIcon } from '@contentful/f36-icons';
21
20
  import tokens from '@contentful/f36-tokens';
21
+ import find from 'lodash-es/find';
22
+ import flow from 'lodash-es/flow';
22
23
  import { getListTypes, ELEMENT_LIC, getListItemEntry, isListNested, moveListItemUp, ELEMENT_LI, unwrapList as unwrapList$1, removeFirstListItem, removeListItem, deleteForwardList, deleteFragmentList, normalizeList, createListPlugin as createListPlugin$1, ELEMENT_UL, ELEMENT_OL } from '@udecode/plate-list';
23
24
  import castArray from 'lodash-es/castArray';
24
25
  import { createBoldPlugin as createBoldPlugin$1, createCodePlugin as createCodePlugin$1, createItalicPlugin as createItalicPlugin$1, createUnderlinePlugin as createUnderlinePlugin$1 } from '@udecode/plate-basic-marks';
@@ -631,24 +632,179 @@ var _constate = /*#__PURE__*/constate(useSdk),
631
632
  SdkProvider = _constate[0],
632
633
  useSdkContext = _constate[1];
633
634
 
635
+ var styles = {
636
+ scheduleIcon: /*#__PURE__*/css({
637
+ marginRight: tokens.spacing2Xs
638
+ })
639
+ };
640
+ function EntityStatusIcon(_ref) {
641
+ var entity = _ref.entity,
642
+ entityType = _ref.entityType;
643
+
644
+ var _useEntities = useEntities(),
645
+ loadEntityScheduledActions = _useEntities.loadEntityScheduledActions;
646
+
647
+ return /*#__PURE__*/createElement(ScheduledIconWithTooltip, {
648
+ getEntityScheduledActions: loadEntityScheduledActions,
649
+ entityType: entityType,
650
+ entityId: entity.sys.id
651
+ }, /*#__PURE__*/createElement(ClockIcon, {
652
+ className: styles.scheduleIcon,
653
+ size: "small",
654
+ color: "muted",
655
+ testId: "schedule-icon"
656
+ }));
657
+ }
658
+
659
+ var styles$1 = {
660
+ assetCard: /*#__PURE__*/css({
661
+ cursor: 'pointer'
662
+ }),
663
+ cardDropdown: /*#__PURE__*/css({
664
+ width: '300px'
665
+ }),
666
+ truncated: /*#__PURE__*/css({
667
+ overflow: 'hidden',
668
+ whiteSpace: 'nowrap',
669
+ textOverflow: 'ellipsis'
670
+ })
671
+ };
672
+
673
+ function downloadAsset(url, fileName) {
674
+ // This method won't work if we have CORS disabled(asset not on the contentful server)
675
+ fetch(url, {
676
+ method: 'GET',
677
+ headers: {}
678
+ }).then(function (response) {
679
+ response.arrayBuffer().then(function (buffer) {
680
+ var url = window.URL.createObjectURL(new Blob([buffer]));
681
+ var link = document.createElement('a');
682
+ link.href = url;
683
+ link.setAttribute('download', fileName); //or any other extension
684
+
685
+ document.body.appendChild(link);
686
+ link.click();
687
+ document.body.removeChild(link);
688
+ });
689
+ })["catch"](function (err) {
690
+ Notification.error('Failed to download asset');
691
+ console.log(err);
692
+ });
693
+ }
694
+
695
+ function renderAssetInfo(props) {
696
+ var entityFile = props.entityFile;
697
+ var fileName = get(entityFile, 'fileName');
698
+ var mimeType = get(entityFile, 'contentType');
699
+ var fileSize = get(entityFile, 'details.size');
700
+ var image = get(entityFile, 'details.image');
701
+ return [/*#__PURE__*/createElement(Menu.SectionTitle, {
702
+ key: "file-section"
703
+ }, "File info"), fileName && /*#__PURE__*/createElement(Menu.Item, {
704
+ key: "file-name"
705
+ }, /*#__PURE__*/createElement(Text$1, {
706
+ isTruncated: true
707
+ }, fileName)), mimeType && /*#__PURE__*/createElement(Menu.Item, {
708
+ key: "file-type"
709
+ }, /*#__PURE__*/createElement(Text$1, {
710
+ isTruncated: true
711
+ }, mimeType)), fileSize && /*#__PURE__*/createElement(Menu.Item, {
712
+ key: "file-size"
713
+ }, shortenStorageUnit(fileSize, 'B')), image && /*#__PURE__*/createElement(Menu.Item, {
714
+ key: "file-dimentions"
715
+ }, image.width + " \xD7 " + image.height)].filter(function (item) {
716
+ return item;
717
+ });
718
+ }
719
+ function renderActions(props) {
720
+ var entityFile = props.entityFile,
721
+ isDisabled = props.isDisabled,
722
+ onEdit = props.onEdit,
723
+ onRemove = props.onRemove;
724
+ return [/*#__PURE__*/createElement(Menu.SectionTitle, {
725
+ key: "section-title"
726
+ }, "Actions"), onEdit ? /*#__PURE__*/createElement(Menu.Item, {
727
+ key: "edit",
728
+ onClick: onEdit,
729
+ testId: "card-action-edit"
730
+ }, "Edit") : null, entityFile ? /*#__PURE__*/createElement(Menu.Item, {
731
+ key: "download",
732
+ onClick: function onClick() {
733
+ if (typeof entityFile.url === 'string') {
734
+ downloadAsset(entityFile.url, get(entityFile, 'fileName'));
735
+ }
736
+ },
737
+ testId: "card-action-download"
738
+ }, "Download") : null, onRemove ? /*#__PURE__*/createElement(Menu.Item, {
739
+ key: "remove",
740
+ disabled: isDisabled,
741
+ onClick: onRemove,
742
+ testId: "card-action-remove"
743
+ }, "Remove") : null].filter(function (item) {
744
+ return item;
745
+ });
746
+ }
634
747
  function FetchingWrappedAssetCard(props) {
635
- var onEntityFetchComplete = props.onEntityFetchComplete,
636
- assetId = props.assetId;
748
+ var _asset$fields;
637
749
 
638
750
  var _useEntities = useEntities(),
639
751
  getOrLoadAsset = _useEntities.getOrLoadAsset,
640
- loadEntityScheduledActions = _useEntities.loadEntityScheduledActions,
641
752
  assets = _useEntities.assets;
642
753
 
754
+ var asset = assets[props.assetId];
755
+ var defaultLocaleCode = props.sdk.locales["default"];
756
+ var entityFile = asset != null && (_asset$fields = asset.fields) != null && _asset$fields.file ? asset.fields.file[props.locale] || asset.fields.file[defaultLocaleCode] : undefined;
757
+ var onEntityFetchComplete = props.onEntityFetchComplete;
643
758
  useEffect(function () {
644
- getOrLoadAsset(assetId);
645
- }, [getOrLoadAsset, assetId]);
646
- var asset = assets[assetId];
759
+ getOrLoadAsset(props.assetId);
760
+ }, [props.assetId]); // eslint-disable-line
761
+
647
762
  useEffect(function () {
648
- if (asset) {
649
- onEntityFetchComplete == null ? void 0 : onEntityFetchComplete();
763
+ if (!asset) {
764
+ return;
650
765
  }
651
- }, [onEntityFetchComplete, asset]);
766
+
767
+ onEntityFetchComplete == null ? void 0 : onEntityFetchComplete();
768
+ }, [asset, onEntityFetchComplete]);
769
+
770
+ function getAssetSrc() {
771
+ if (!(entityFile != null && entityFile.url)) return '';
772
+ return entityFile.url + "?h=300";
773
+ }
774
+
775
+ function getFileType() {
776
+ var groupToIconMap = {
777
+ image: 'image',
778
+ video: 'video',
779
+ audio: 'audio',
780
+ richtext: 'richtext',
781
+ presentation: 'presentation',
782
+ spreadsheet: 'spreadsheet',
783
+ pdfdocument: 'pdf',
784
+ archive: 'archive',
785
+ plaintext: 'plaintext',
786
+ code: 'code',
787
+ markup: 'markup'
788
+ };
789
+ var archive = groupToIconMap['archive'];
790
+
791
+ if (!entityFile) {
792
+ return archive;
793
+ }
794
+
795
+ var groupName = mimetype.getGroupLabel({
796
+ type: entityFile.contentType,
797
+ fallbackFileName: entityFile.fileName
798
+ });
799
+ return groupToIconMap[groupName] || archive;
800
+ }
801
+
802
+ if (asset === undefined) {
803
+ return /*#__PURE__*/createElement(AssetCard, {
804
+ size: "small",
805
+ isLoading: true
806
+ });
807
+ }
652
808
 
653
809
  if (asset === 'failed') {
654
810
  return /*#__PURE__*/createElement(MissingEntityCard, {
@@ -658,48 +814,138 @@ function FetchingWrappedAssetCard(props) {
658
814
  });
659
815
  }
660
816
 
661
- if (asset === undefined) {
662
- return /*#__PURE__*/createElement(AssetCard, {
663
- size: "default",
664
- isLoading: true
817
+ var status = asset ? entityHelpers.getEntryStatus(asset.sys) : undefined;
818
+
819
+ if (status === 'deleted') {
820
+ return /*#__PURE__*/createElement(MissingEntityCard, {
821
+ entityType: "Asset",
822
+ asSquare: true,
823
+ isDisabled: props.isDisabled,
824
+ onRemove: props.onRemove
665
825
  });
666
826
  }
667
827
 
668
- return /*#__PURE__*/createElement(WrappedAssetCard, {
669
- getEntityScheduledActions: loadEntityScheduledActions,
670
- size: "small",
671
- isSelected: props.isSelected,
672
- isDisabled: props.isDisabled,
673
- localeCode: props.locale,
674
- defaultLocaleCode: props.sdk.locales["default"],
828
+ var entityTitle = entityHelpers.getAssetTitle({
675
829
  asset: asset,
676
- onEdit: props.onEdit,
677
- onRemove: props.isDisabled ? undefined : props.onRemove,
678
- isClickable: false
830
+ localeCode: props.locale,
831
+ defaultLocaleCode: defaultLocaleCode,
832
+ defaultTitle: 'Untitled'
833
+ });
834
+ return /*#__PURE__*/createElement(AssetCard, {
835
+ title: entityTitle,
836
+ isSelected: props.isSelected,
837
+ size: "small",
838
+ src: getAssetSrc(),
839
+ type: getFileType(),
840
+ status: status,
841
+ icon: /*#__PURE__*/createElement(EntityStatusIcon, {
842
+ entityType: "Asset",
843
+ entity: asset
844
+ }),
845
+ className: styles$1.assetCard,
846
+ actions: [renderActions({
847
+ entityFile: entityFile,
848
+ isDisabled: props.isDisabled,
849
+ onEdit: props.onEdit,
850
+ onRemove: props.onRemove
851
+ }), entityFile ? renderAssetInfo({
852
+ entityFile: entityFile
853
+ }) : null].filter(function (item) {
854
+ return item;
855
+ })
679
856
  });
680
857
  }
681
858
 
682
- function FetchingWrappedEntryCard(props) {
683
- var entryId = props.entryId,
684
- onEntityFetchComplete = props.onEntityFetchComplete;
859
+ var styles$2 = {
860
+ entryCard: /*#__PURE__*/css({
861
+ cursor: 'pointer'
862
+ })
863
+ };
685
864
 
865
+ function EntryThumbnail(_ref) {
866
+ var file = _ref.file;
867
+ if (!isValidImage(file)) return null;
868
+ return /*#__PURE__*/createElement(AssetThumbnail, {
869
+ file: file
870
+ });
871
+ }
872
+
873
+ function FetchingWrappedEntryCard(props) {
686
874
  var _useEntities = useEntities(),
687
875
  getOrLoadEntry = _useEntities.getOrLoadEntry,
688
- loadEntityScheduledActions = _useEntities.loadEntityScheduledActions,
689
- entries = _useEntities.entries;
876
+ entries = _useEntities.entries,
877
+ getOrLoadAsset = _useEntities.getOrLoadAsset;
690
878
 
879
+ var _React$useState = useState(null),
880
+ file = _React$useState[0],
881
+ setFile = _React$useState[1];
882
+
883
+ var entry = entries[props.entryId];
884
+ var contentType = useMemo(function () {
885
+ if (!entry || entry === 'failed') {
886
+ return undefined;
887
+ }
888
+
889
+ return props.sdk.space.getCachedContentTypes().find(function (contentType) {
890
+ return contentType.sys.id === entry.sys.contentType.sys.id;
891
+ });
892
+ }, [props.sdk, entry]);
893
+ var defaultLocaleCode = props.sdk.locales["default"];
894
+ var onEntityFetchComplete = props.onEntityFetchComplete;
895
+ useEffect(function () {
896
+ if (!entry || entry === 'failed') return;
897
+ var subscribed = true;
898
+ entityHelpers.getEntryImage({
899
+ entry: entry,
900
+ contentType: contentType,
901
+ localeCode: props.locale,
902
+ defaultLocaleCode: defaultLocaleCode
903
+ }, getOrLoadAsset)["catch"](function () {
904
+ return null;
905
+ }).then(function (file) {
906
+ if (subscribed) {
907
+ setFile(file);
908
+ }
909
+ });
910
+ return function () {
911
+ subscribed = false;
912
+ };
913
+ }, [entry, contentType, props.locale, defaultLocaleCode, props.sdk, file, getOrLoadAsset]);
691
914
  useEffect(function () {
692
- getOrLoadEntry(entryId);
693
- }, [getOrLoadEntry, entryId]);
694
- var entry = entries[entryId];
915
+ getOrLoadEntry(props.entryId);
916
+ }, [props.entryId]); // eslint-disable-line
917
+
695
918
  useEffect(function () {
696
- if (entry) {
697
- onEntityFetchComplete == null ? void 0 : onEntityFetchComplete();
919
+ if (!entry) {
920
+ return;
698
921
  }
699
- }, [onEntityFetchComplete, entry]);
922
+
923
+ onEntityFetchComplete == null ? void 0 : onEntityFetchComplete();
924
+ }, [entry, onEntityFetchComplete]);
925
+
926
+ function renderDropdown() {
927
+ if (!props.onEdit || !props.onRemove) return undefined;
928
+ return [props.onEdit ? /*#__PURE__*/createElement(MenuItem, {
929
+ key: "edit",
930
+ testId: "card-action-edit",
931
+ onClick: function onClick() {
932
+ props.onEdit && props.onEdit();
933
+ }
934
+ }, "Edit") : null, props.onRemove ? /*#__PURE__*/createElement(MenuItem, {
935
+ key: "delete",
936
+ disabled: props.isDisabled,
937
+ testId: "card-action-remove",
938
+ onClick: function onClick() {
939
+ props.onRemove && props.onRemove();
940
+ }
941
+ }, "Remove") : null].filter(function (item) {
942
+ return item;
943
+ });
944
+ }
700
945
 
701
946
  if (entry === undefined) {
702
947
  return /*#__PURE__*/createElement(EntryCard, {
948
+ size: "default",
703
949
  isLoading: true
704
950
  });
705
951
  }
@@ -712,26 +958,50 @@ function FetchingWrappedEntryCard(props) {
712
958
  });
713
959
  }
714
960
 
715
- var contentType = props.sdk.space.getCachedContentTypes().find(function (contentType) {
716
- return contentType.sys.id === entry.sys.contentType.sys.id;
961
+ var entryStatus = entry ? entityHelpers.getEntryStatus(entry.sys) : undefined;
962
+
963
+ if (entryStatus === 'deleted') {
964
+ return /*#__PURE__*/createElement(MissingEntityCard, {
965
+ entityType: "Entry",
966
+ isDisabled: props.isDisabled,
967
+ onRemove: props.onRemove
968
+ });
969
+ }
970
+
971
+ var title = entityHelpers.getEntryTitle({
972
+ entry: entry,
973
+ contentType: contentType,
974
+ localeCode: props.locale,
975
+ defaultLocaleCode: defaultLocaleCode,
976
+ defaultTitle: 'Untitled'
717
977
  });
718
- return /*#__PURE__*/createElement(WrappedEntryCard, {
978
+ var description = entityHelpers.getEntityDescription({
979
+ entity: entry,
980
+ contentType: contentType,
981
+ localeCode: props.locale,
982
+ defaultLocaleCode: defaultLocaleCode
983
+ });
984
+ return /*#__PURE__*/createElement(EntryCard, {
985
+ contentType: contentType == null ? void 0 : contentType.name,
986
+ title: title,
987
+ description: description,
719
988
  size: "default",
720
- getAsset: props.sdk.space.getAsset,
721
- getEntityScheduledActions: loadEntityScheduledActions,
722
989
  isSelected: props.isSelected,
723
- isDisabled: props.isDisabled,
724
- localeCode: props.locale,
725
- defaultLocaleCode: props.sdk.locales["default"],
726
- contentType: contentType,
727
- entry: entry,
728
- onEdit: props.onEdit,
729
- onRemove: props.isDisabled ? undefined : props.onRemove,
730
- isClickable: false
990
+ status: entryStatus,
991
+ className: styles$2.entryCard,
992
+ thumbnailElement: file ? /*#__PURE__*/createElement(EntryThumbnail, {
993
+ file: file
994
+ }) : undefined,
995
+ icon: /*#__PURE__*/createElement(EntityStatusIcon, {
996
+ entityType: "Entry",
997
+ entity: entry
998
+ }),
999
+ withDragHandle: false,
1000
+ actions: renderDropdown()
731
1001
  });
732
1002
  }
733
1003
 
734
- var styles = {
1004
+ var styles$3 = {
735
1005
  root: /*#__PURE__*/css({
736
1006
  marginBottom: '1.25rem !important',
737
1007
  display: 'block'
@@ -773,7 +1043,7 @@ function LinkedEntityBlock(props) {
773
1043
  };
774
1044
 
775
1045
  return /*#__PURE__*/React__default.createElement("div", Object.assign({}, attributes, {
776
- className: styles.root,
1046
+ className: styles$3.root,
777
1047
  "data-entity-type": entityType,
778
1048
  "data-entity-id": entityId,
779
1049
  // COMPAT: This makes copy & paste work for Firefox
@@ -783,7 +1053,7 @@ function LinkedEntityBlock(props) {
783
1053
  // COMPAT: This makes copy & paste work for Chromium/Blink browsers and Safari
784
1054
  contentEditable: HAS_BEFORE_INPUT_SUPPORT ? false : undefined,
785
1055
  draggable: HAS_BEFORE_INPUT_SUPPORT ? true : undefined,
786
- className: styles.container
1056
+ className: styles$3.container
787
1057
  }, entityType === 'Entry' && /*#__PURE__*/React__default.createElement(FetchingWrappedEntryCard, {
788
1058
  sdk: sdk,
789
1059
  entryId: entityId,
@@ -1731,7 +2001,7 @@ function insertBlock(editor, nodeType, entity) {
1731
2001
  focus(editor);
1732
2002
  }
1733
2003
 
1734
- var styles$1 = {
2004
+ var styles$4 = {
1735
2005
  icon: /*#__PURE__*/css({
1736
2006
  marginRight: '10px'
1737
2007
  })
@@ -1779,7 +2049,7 @@ function EmbeddedEntityBlockToolbarIcon(_ref) {
1779
2049
  flexDirection: "row"
1780
2050
  }, /*#__PURE__*/React__default.createElement(Icon, {
1781
2051
  as: type === 'Asset' ? AssetIcon : EmbeddedEntryBlockIcon,
1782
- className: "rich-text__embedded-entry-list-icon " + styles$1.icon,
2052
+ className: "rich-text__embedded-entry-list-icon " + styles$4.icon,
1783
2053
  variant: "secondary"
1784
2054
  }), /*#__PURE__*/React__default.createElement("span", null, type)));
1785
2055
  }
@@ -1878,7 +2148,7 @@ var createEmbeddedAssetBlockPlugin = /*#__PURE__*/createEmbeddedEntityPlugin(BLO
1878
2148
 
1879
2149
  var getEntryTitle = entityHelpers.getEntryTitle,
1880
2150
  getEntryStatus = entityHelpers.getEntryStatus;
1881
- var styles$2 = {
2151
+ var styles$5 = {
1882
2152
  scheduledIcon: /*#__PURE__*/css({
1883
2153
  verticalAlign: 'text-bottom',
1884
2154
  marginRight: tokens.spacing2Xs
@@ -1949,7 +2219,7 @@ function FetchingWrappedInlineEntryCard(props) {
1949
2219
  actions: [/*#__PURE__*/React__default.createElement(MenuItem, {
1950
2220
  key: "remove",
1951
2221
  onClick: props.onRemove,
1952
- testId: "delete"
2222
+ testId: "card-action-remove"
1953
2223
  }, "Remove")]
1954
2224
  });
1955
2225
  }
@@ -1966,14 +2236,14 @@ function FetchingWrappedInlineEntryCard(props) {
1966
2236
  key: "remove",
1967
2237
  onClick: props.onRemove,
1968
2238
  disabled: props.isDisabled,
1969
- testId: "delete"
2239
+ testId: "card-action-remove"
1970
2240
  }, "Remove")]
1971
2241
  }, /*#__PURE__*/React__default.createElement(ScheduledIconWithTooltip, {
1972
2242
  getEntityScheduledActions: loadEntityScheduledActions,
1973
2243
  entityType: "Entry",
1974
2244
  entityId: entry.sys.id
1975
2245
  }, /*#__PURE__*/React__default.createElement(ClockIcon, {
1976
- className: styles$2.scheduledIcon,
2246
+ className: styles$5.scheduledIcon,
1977
2247
  variant: "muted",
1978
2248
  testId: "scheduled-icon"
1979
2249
  })), /*#__PURE__*/React__default.createElement(Text$1, null, title));
@@ -1997,7 +2267,7 @@ function createInlineEntryNode(id) {
1997
2267
  };
1998
2268
  }
1999
2269
 
2000
- var styles$3 = {
2270
+ var styles$6 = {
2001
2271
  icon: /*#__PURE__*/css({
2002
2272
  marginRight: '10px'
2003
2273
  }),
@@ -2033,7 +2303,7 @@ function EmbeddedEntityInline(props) {
2033
2303
  }
2034
2304
 
2035
2305
  return /*#__PURE__*/createElement("span", Object.assign({}, props.attributes, {
2036
- className: styles$3.root,
2306
+ className: styles$6.root,
2037
2307
  "data-embedded-entity-inline-id": entryId,
2038
2308
  // COMPAT: This makes copy & paste work for Firefox
2039
2309
  contentEditable: !HAS_BEFORE_INPUT_SUPPORT ? false : undefined,
@@ -2163,7 +2433,7 @@ function ToolbarEmbeddedEntityInlineButton(props) {
2163
2433
  flexDirection: "row"
2164
2434
  }, /*#__PURE__*/createElement(EmbeddedEntryInlineIcon, {
2165
2435
  variant: "secondary",
2166
- className: "rich-text__embedded-entry-list-icon " + styles$3.icon
2436
+ className: "rich-text__embedded-entry-list-icon " + styles$6.icon
2167
2437
  }), /*#__PURE__*/createElement("span", null, "Inline entry")));
2168
2438
  }
2169
2439
  function createEmbeddedEntityInlinePlugin(sdk) {
@@ -2239,7 +2509,7 @@ var isMarkEnabled = function isMarkEnabled(field, mark) {
2239
2509
  };
2240
2510
 
2241
2511
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _dropdown, _LABELS;
2242
- var styles$4 = {
2512
+ var styles$7 = {
2243
2513
  dropdown: (_dropdown = {
2244
2514
  root: /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-weight: ", ";\n "])), tokens.fontWeightDemiBold)
2245
2515
  }, _dropdown[BLOCKS.PARAGRAPH] = /*#__PURE__*/css(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: ", ";\n "])), tokens.fontSizeL), _dropdown[BLOCKS.HEADING_1] = /*#__PURE__*/css(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 1.625rem;\n "]))), _dropdown[BLOCKS.HEADING_2] = /*#__PURE__*/css(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 1.4375rem;\n "]))), _dropdown[BLOCKS.HEADING_3] = /*#__PURE__*/css(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 1.25rem;\n "]))), _dropdown[BLOCKS.HEADING_4] = /*#__PURE__*/css(_templateObject6 || (_templateObject6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 1.125rem;\n "]))), _dropdown[BLOCKS.HEADING_5] = /*#__PURE__*/css(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 1rem;\n "]))), _dropdown[BLOCKS.HEADING_6] = /*#__PURE__*/css(_templateObject8 || (_templateObject8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.875rem;\n "]))), _dropdown)
@@ -2334,7 +2604,7 @@ function ToolbarHeadingButton(props) {
2334
2604
  testId: "dropdown-option-" + nodeType,
2335
2605
  disabled: props.isDisabled
2336
2606
  }, /*#__PURE__*/createElement("span", {
2337
- className: cx(styles$4.dropdown.root, styles$4.dropdown[nodeType])
2607
+ className: cx(styles$7.dropdown.root, styles$7.dropdown[nodeType])
2338
2608
  }, LABELS[nodeType]));
2339
2609
  }).filter(Boolean)));
2340
2610
  }
@@ -2404,7 +2674,7 @@ var transformLift = function transformLift(editor, _ref4) {
2404
2674
  };
2405
2675
 
2406
2676
  var _templateObject$1, _templateObject2$1, _templateObject3$1, _templateObject4$1, _templateObject5$1, _templateObject6$1, _templateObject7$1, _templateObject8$1, _dropdown$1, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _headings, _HeadingComponents;
2407
- var styles$5 = {
2677
+ var styles$8 = {
2408
2678
  dropdown: (_dropdown$1 = {
2409
2679
  root: /*#__PURE__*/css(_templateObject$1 || (_templateObject$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-weight: ", ";\n "])), tokens.fontWeightDemiBold)
2410
2680
  }, _dropdown$1[BLOCKS.PARAGRAPH] = /*#__PURE__*/css(_templateObject2$1 || (_templateObject2$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: ", ";\n "])), tokens.fontSizeL), _dropdown$1[BLOCKS.HEADING_1] = /*#__PURE__*/css(_templateObject3$1 || (_templateObject3$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 1.625rem;\n "]))), _dropdown$1[BLOCKS.HEADING_2] = /*#__PURE__*/css(_templateObject4$1 || (_templateObject4$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 1.4375rem;\n "]))), _dropdown$1[BLOCKS.HEADING_3] = /*#__PURE__*/css(_templateObject5$1 || (_templateObject5$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 1.25rem;\n "]))), _dropdown$1[BLOCKS.HEADING_4] = /*#__PURE__*/css(_templateObject6$1 || (_templateObject6$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 1.125rem;\n "]))), _dropdown$1[BLOCKS.HEADING_5] = /*#__PURE__*/css(_templateObject7$1 || (_templateObject7$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 1rem;\n "]))), _dropdown$1[BLOCKS.HEADING_6] = /*#__PURE__*/css(_templateObject8$1 || (_templateObject8$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 0.875rem;\n "]))), _dropdown$1),
@@ -2416,7 +2686,7 @@ var styles$5 = {
2416
2686
  function createHeading(Tag, block) {
2417
2687
  return function Heading(props) {
2418
2688
  return /*#__PURE__*/createElement(Tag, Object.assign({}, props.attributes, {
2419
- className: cx(styles$5.headings.root, styles$5.headings[block])
2689
+ className: cx(styles$8.headings.root, styles$8.headings[block])
2420
2690
  }), props.children);
2421
2691
  };
2422
2692
  }
@@ -2512,7 +2782,7 @@ var createHeadingPlugin = function createHeadingPlugin() {
2512
2782
  };
2513
2783
  };
2514
2784
 
2515
- var styles$6 = {
2785
+ var styles$9 = {
2516
2786
  button: /*#__PURE__*/css({
2517
2787
  height: '30px',
2518
2788
  width: '30px',
@@ -2538,7 +2808,7 @@ function ToolbarButton(props) {
2538
2808
  };
2539
2809
 
2540
2810
  var button = /*#__PURE__*/React__default.createElement(Button, {
2541
- className: cx(styles$6.button, className),
2811
+ className: cx(styles$9.button, className),
2542
2812
  isDisabled: isDisabled,
2543
2813
  startIcon: children,
2544
2814
  onClick: handleClick,
@@ -2549,7 +2819,7 @@ function ToolbarButton(props) {
2549
2819
 
2550
2820
  if (title) {
2551
2821
  return /*#__PURE__*/React__default.createElement(Tooltip, {
2552
- className: styles$6.tooltip,
2822
+ className: styles$9.tooltip,
2553
2823
  placement: "bottom",
2554
2824
  content: title
2555
2825
  }, button);
@@ -2559,7 +2829,7 @@ function ToolbarButton(props) {
2559
2829
  }
2560
2830
 
2561
2831
  var _templateObject$2, _templateObject2$2, _templateObject3$2;
2562
- var styles$7 = {
2832
+ var styles$a = {
2563
2833
  container: /*#__PURE__*/css(_templateObject$2 || (_templateObject$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0 0 ", ";\n "])), tokens.spacingL),
2564
2834
  hr: /*#__PURE__*/css(_templateObject2$2 || (_templateObject2$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n height: ", ";\n background: transparent;\n position: relative;\n border: 0;\n user-select: none;\n &:hover {\n cursor: pointer;\n }\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 1px;\n background: ", ";\n top: 50%;\n }\n "])), tokens.spacingM, tokens.gray300),
2565
2835
  hrSelected: /*#__PURE__*/css(_templateObject3$2 || (_templateObject3$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n &::after {\n background: ", ";\n -webkit-box-shadow: 0px 0px 5px ", ";\n box-shadow: 0px 0px 5px ", ";\n }\n "])), tokens.colorPrimary, tokens.colorPrimary, tokens.colorPrimary)
@@ -2617,14 +2887,14 @@ function Hr(props) {
2617
2887
  var isSelected = useSelected();
2618
2888
  var isFocused = useFocused();
2619
2889
  return /*#__PURE__*/createElement("div", Object.assign({}, props.attributes, {
2620
- className: styles$7.container,
2890
+ className: styles$a.container,
2621
2891
  "data-void-element": BLOCKS.HR
2622
2892
  }), /*#__PURE__*/createElement("div", {
2623
2893
  draggable: true,
2624
2894
  // Moving `contentEditable` to this div makes it to be selectable when being the first void element, e.g pressing ctrl + a to select everything
2625
2895
  contentEditable: false
2626
2896
  }, /*#__PURE__*/createElement("hr", {
2627
- className: cx(styles$7.hr, isSelected && isFocused ? styles$7.hrSelected : undefined)
2897
+ className: cx(styles$a.hr, isSelected && isFocused ? styles$a.hrSelected : undefined)
2628
2898
  })), props.children);
2629
2899
  }
2630
2900
  var createHrPlugin = function createHrPlugin() {
@@ -2651,7 +2921,7 @@ var createHrPlugin = function createHrPlugin() {
2651
2921
  };
2652
2922
 
2653
2923
  var _templateObject$3, _SYS_LINK_TYPES, _LINK_TYPE_SELECTION_;
2654
- var styles$8 = {
2924
+ var styles$b = {
2655
2925
  removeSelectionLabel: /*#__PURE__*/css(_templateObject$3 || (_templateObject$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-left: ", ";\n "])), tokens.spacingS)
2656
2926
  };
2657
2927
  var SYS_LINK_TYPES = (_SYS_LINK_TYPES = {}, _SYS_LINK_TYPES[INLINES.ENTRY_HYPERLINK] = 'Entry', _SYS_LINK_TYPES[INLINES.ASSET_HYPERLINK] = 'Asset', _SYS_LINK_TYPES);
@@ -2834,7 +3104,7 @@ function HyperlinkModal(props) {
2834
3104
  }, "Link target", ' '), linkEntity && linkEntity.sys.linkType === SYS_LINK_TYPES[linkType] ? /*#__PURE__*/createElement(Fragment, null, !props.readonly && /*#__PURE__*/createElement(TextLink, {
2835
3105
  testId: "entity-selection-link",
2836
3106
  onClick: resetLinkEntity,
2837
- className: styles$8.removeSelectionLabel
3107
+ className: styles$b.removeSelectionLabel
2838
3108
  }, "Remove selection"), /*#__PURE__*/createElement("div", null, linkType === INLINES.ENTRY_HYPERLINK && /*#__PURE__*/createElement(FetchingWrappedEntryCard, {
2839
3109
  sdk: props.sdk,
2840
3110
  locale: props.sdk.field.locale,
@@ -3175,7 +3445,7 @@ function useEntityInfo(props) {
3175
3445
  return getEntityInfo(status.data);
3176
3446
  }
3177
3447
 
3178
- var styles$9 = {
3448
+ var styles$c = {
3179
3449
  hyperlinkWrapper: /*#__PURE__*/css({
3180
3450
  display: 'inline',
3181
3451
  position: 'static',
@@ -3220,13 +3490,13 @@ function EntityHyperlink(props) {
3220
3490
 
3221
3491
  return /*#__PURE__*/createElement(Tooltip, {
3222
3492
  content: tooltipContent,
3223
- targetWrapperClassName: styles$9.hyperlinkWrapper,
3493
+ targetWrapperClassName: styles$c.hyperlinkWrapper,
3224
3494
  placement: "bottom",
3225
3495
  maxWidth: "auto"
3226
3496
  }, /*#__PURE__*/createElement(TextLink, {
3227
3497
  as: "a",
3228
3498
  onClick: handleClick,
3229
- className: styles$9.hyperlink,
3499
+ className: styles$c.hyperlink,
3230
3500
  "data-link-type": target.sys.linkType,
3231
3501
  "data-link-id": target.sys.id
3232
3502
  }, props.children));
@@ -3250,7 +3520,7 @@ function UrlHyperlink(props) {
3250
3520
 
3251
3521
  return /*#__PURE__*/createElement(Tooltip, {
3252
3522
  content: uri,
3253
- targetWrapperClassName: styles$9.hyperlinkWrapper,
3523
+ targetWrapperClassName: styles$c.hyperlinkWrapper,
3254
3524
  placement: "bottom",
3255
3525
  maxWidth: "auto"
3256
3526
  }, /*#__PURE__*/createElement(TextLink, {
@@ -3258,7 +3528,7 @@ function UrlHyperlink(props) {
3258
3528
  href: uri,
3259
3529
  rel: "noopener noreferrer",
3260
3530
  onClick: handleClick,
3261
- className: styles$9.hyperlink
3531
+ className: styles$c.hyperlink
3262
3532
  }, props.children));
3263
3533
  }
3264
3534
 
@@ -3384,12 +3654,12 @@ var createHyperlinkPlugin = function createHyperlinkPlugin(sdk) {
3384
3654
 
3385
3655
  var _templateObject$4, _templateObject2$3, _templateObject3$3, _styles;
3386
3656
  var baseStyle = /*#__PURE__*/css(_templateObject$4 || (_templateObject$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 0;\n margin: 0 0 1.25rem 1.25rem;\n\n div:first-child {\n margin: 0;\n line-height: ", ";\n }\n"])), tokens.lineHeightDefault);
3387
- var styles$a = (_styles = {}, _styles[BLOCKS.UL_LIST] = /*#__PURE__*/css(_templateObject2$3 || (_templateObject2$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n list-style-type: disc;\n ul {\n list-style-type: circle;\n ul {\n list-style-type: square;\n }\n }\n "]))), _styles[BLOCKS.OL_LIST] = /*#__PURE__*/css(_templateObject3$3 || (_templateObject3$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n list-style-type: decimal;\n ol {\n list-style-type: upper-alpha;\n ol {\n list-style-type: lower-roman;\n ol {\n list-style-type: lower-alpha;\n }\n }\n }\n "]))), _styles);
3657
+ var styles$d = (_styles = {}, _styles[BLOCKS.UL_LIST] = /*#__PURE__*/css(_templateObject2$3 || (_templateObject2$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n list-style-type: disc;\n ul {\n list-style-type: circle;\n ul {\n list-style-type: square;\n }\n }\n "]))), _styles[BLOCKS.OL_LIST] = /*#__PURE__*/css(_templateObject3$3 || (_templateObject3$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n list-style-type: decimal;\n ol {\n list-style-type: upper-alpha;\n ol {\n list-style-type: lower-roman;\n ol {\n list-style-type: lower-alpha;\n }\n }\n }\n "]))), _styles);
3388
3658
 
3389
3659
  function createList(Tag, block) {
3390
3660
  return function List(props) {
3391
3661
  return /*#__PURE__*/createElement(Tag, Object.assign({}, props.attributes, {
3392
- className: cx(baseStyle, styles$a[block])
3662
+ className: cx(baseStyle, styles$d[block])
3393
3663
  }), props.children);
3394
3664
  };
3395
3665
  }
@@ -4370,14 +4640,14 @@ var ToolbarBoldButton = /*#__PURE__*/createMarkToolbarButton({
4370
4640
  mark: MARKS.BOLD,
4371
4641
  icon: /*#__PURE__*/createElement(FormatBoldIcon, null)
4372
4642
  });
4373
- var styles$b = {
4643
+ var styles$e = {
4374
4644
  bold: /*#__PURE__*/css({
4375
4645
  fontWeight: 600
4376
4646
  })
4377
4647
  };
4378
4648
  function Bold(props) {
4379
4649
  return /*#__PURE__*/createElement("strong", Object.assign({}, props.attributes, {
4380
- className: styles$b.bold
4650
+ className: styles$e.bold
4381
4651
  }), props.children);
4382
4652
  }
4383
4653
 
@@ -4417,7 +4687,7 @@ var ToolbarCodeButton = /*#__PURE__*/createMarkToolbarButton({
4417
4687
  mark: MARKS.CODE,
4418
4688
  icon: /*#__PURE__*/createElement(CodeIcon, null)
4419
4689
  });
4420
- var styles$c = {
4690
+ var styles$f = {
4421
4691
  code: /*#__PURE__*/css({
4422
4692
  fontFamily: 'monospace',
4423
4693
  fontSize: '.9em'
@@ -4425,7 +4695,7 @@ var styles$c = {
4425
4695
  };
4426
4696
  function Code(props) {
4427
4697
  return /*#__PURE__*/createElement("code", Object.assign({}, props.attributes, {
4428
- className: styles$c.code
4698
+ className: styles$f.code
4429
4699
  }), props.children);
4430
4700
  }
4431
4701
  var createCodePlugin = function createCodePlugin() {
@@ -4455,14 +4725,14 @@ var ToolbarItalicButton = /*#__PURE__*/createMarkToolbarButton({
4455
4725
  mark: MARKS.ITALIC,
4456
4726
  icon: /*#__PURE__*/createElement(FormatItalicIcon, null)
4457
4727
  });
4458
- var styles$d = {
4728
+ var styles$g = {
4459
4729
  italic: /*#__PURE__*/css({
4460
4730
  fontStyle: 'italic'
4461
4731
  })
4462
4732
  };
4463
4733
  function Italic(props) {
4464
4734
  return /*#__PURE__*/createElement("em", Object.assign({}, props.attributes, {
4465
- className: styles$d.italic
4735
+ className: styles$g.italic
4466
4736
  }), props.children);
4467
4737
  }
4468
4738
  var createItalicPlugin = function createItalicPlugin() {
@@ -4738,10 +5008,10 @@ var createNormalizerPlugin = function createNormalizerPlugin() {
4738
5008
  };
4739
5009
 
4740
5010
  var _templateObject$6, _styles$1;
4741
- var styles$e = (_styles$1 = {}, _styles$1[BLOCKS.PARAGRAPH] = /*#__PURE__*/css(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n line-height: ", ";\n margin-bottom: 1.5em;\n "])), tokens.lineHeightDefault), _styles$1);
5011
+ var styles$h = (_styles$1 = {}, _styles$1[BLOCKS.PARAGRAPH] = /*#__PURE__*/css(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n line-height: ", ";\n margin-bottom: 1.5em;\n "])), tokens.lineHeightDefault), _styles$1);
4742
5012
  function Paragraph(props) {
4743
5013
  return /*#__PURE__*/createElement("div", Object.assign({}, props.attributes, {
4744
- className: styles$e[BLOCKS.PARAGRAPH]
5014
+ className: styles$h[BLOCKS.PARAGRAPH]
4745
5015
  }), props.children);
4746
5016
  }
4747
5017
 
@@ -5562,7 +5832,7 @@ var isTable = function isTable(node) {
5562
5832
  return Element.isElement(node) && node.type === BLOCKS.TABLE;
5563
5833
  };
5564
5834
 
5565
- var styles$f = {
5835
+ var styles$i = {
5566
5836
  topRight: /*#__PURE__*/css({
5567
5837
  position: 'absolute',
5568
5838
  top: '6px',
@@ -5651,7 +5921,7 @@ var TableActions = function TableActions() {
5651
5921
  size: "small",
5652
5922
  variant: "transparent",
5653
5923
  tabIndex: -1,
5654
- className: styles$f.topRight,
5924
+ className: styles$i.topRight,
5655
5925
  icon: /*#__PURE__*/React__default.createElement(ChevronDownIcon, null),
5656
5926
  "aria-label": "Open table menu",
5657
5927
  testId: "cf-table-actions-button"
@@ -6585,7 +6855,7 @@ var normalizeEditorValue = function normalizeEditorValue(value, options) {
6585
6855
  };
6586
6856
 
6587
6857
  var STYLE_EDITOR_BORDER = "1px solid " + tokens.gray400;
6588
- var styles$g = {
6858
+ var styles$j = {
6589
6859
  root: /*#__PURE__*/css({
6590
6860
  position: 'relative'
6591
6861
  }),
@@ -6701,7 +6971,7 @@ var EmbedEntityWidget = function EmbedEntityWidget(_ref) {
6701
6971
  }, actions);
6702
6972
  };
6703
6973
 
6704
- var styles$h = {
6974
+ var styles$k = {
6705
6975
  toolbar: /*#__PURE__*/css({
6706
6976
  border: "1px solid " + tokens.gray400,
6707
6977
  backgroundColor: tokens.gray100,
@@ -6746,14 +7016,14 @@ var Toolbar = function Toolbar(_ref) {
6746
7016
  var shouldDisableTables = isDisabled || !canInsertBlocks || isListSelected || isBlockquoteSelected;
6747
7017
  return /*#__PURE__*/React__default.createElement(Flex, {
6748
7018
  testId: "toolbar",
6749
- className: styles$h.toolbar,
7019
+ className: styles$k.toolbar,
6750
7020
  alignItems: "center"
6751
7021
  }, /*#__PURE__*/React__default.createElement("div", {
6752
- className: styles$h.formattingOptionsWrapper
7022
+ className: styles$k.formattingOptionsWrapper
6753
7023
  }, /*#__PURE__*/React__default.createElement(ToolbarHeadingButton, {
6754
7024
  isDisabled: isDisabled || !canInsertBlocks
6755
7025
  }), validationInfo.isAnyMarkEnabled && /*#__PURE__*/React__default.createElement("span", {
6756
- className: styles$h.divider
7026
+ className: styles$k.divider
6757
7027
  }), isMarkEnabled(sdk.field, MARKS.BOLD) && /*#__PURE__*/React__default.createElement(ToolbarBoldButton, {
6758
7028
  isDisabled: isDisabled
6759
7029
  }), isMarkEnabled(sdk.field, MARKS.ITALIC) && /*#__PURE__*/React__default.createElement(ToolbarItalicButton, {
@@ -6763,11 +7033,11 @@ var Toolbar = function Toolbar(_ref) {
6763
7033
  }), isMarkEnabled(sdk.field, MARKS.CODE) && /*#__PURE__*/React__default.createElement(ToolbarCodeButton, {
6764
7034
  isDisabled: isDisabled
6765
7035
  }), validationInfo.isAnyHyperlinkEnabled && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
6766
- className: styles$h.divider
7036
+ className: styles$k.divider
6767
7037
  }), /*#__PURE__*/React__default.createElement(ToolbarHyperlinkButton, {
6768
7038
  isDisabled: isDisabled
6769
7039
  })), validationInfo.isAnyBlockFormattingEnabled && /*#__PURE__*/React__default.createElement("span", {
6770
- className: styles$h.divider
7040
+ className: styles$k.divider
6771
7041
  }), /*#__PURE__*/React__default.createElement(ToolbarListButton, {
6772
7042
  isDisabled: isDisabled || !canInsertBlocks
6773
7043
  }), isNodeTypeEnabled(sdk.field, BLOCKS.QUOTE) && /*#__PURE__*/React__default.createElement(ToolbarQuoteButton, {
@@ -6777,7 +7047,7 @@ var Toolbar = function Toolbar(_ref) {
6777
7047
  }), isNodeTypeEnabled(sdk.field, BLOCKS.TABLE) && /*#__PURE__*/React__default.createElement(ToolbarTableButton, {
6778
7048
  isDisabled: shouldDisableTables
6779
7049
  })), /*#__PURE__*/React__default.createElement("div", {
6780
- className: styles$h.embedActionsWrapper
7050
+ className: styles$k.embedActionsWrapper
6781
7051
  }, /*#__PURE__*/React__default.createElement(EmbedEntityWidget, {
6782
7052
  isDisabled: isDisabled,
6783
7053
  canInsertBlocks: canInsertBlocks
@@ -6802,7 +7072,7 @@ function getValidationInfo(field) {
6802
7072
  }
6803
7073
 
6804
7074
  var _templateObject$b;
6805
- var styles$i = {
7075
+ var styles$l = {
6806
7076
  nativeSticky: /*#__PURE__*/css(_templateObject$b || (_templateObject$b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: -webkit-sticky;\n position: sticky;\n top: -1px;\n z-index: 2;\n "])))
6807
7077
  };
6808
7078
 
@@ -6810,7 +7080,7 @@ var StickyToolbarWrapper = function StickyToolbarWrapper(_ref) {
6810
7080
  var isDisabled = _ref.isDisabled,
6811
7081
  children = _ref.children;
6812
7082
  return /*#__PURE__*/React__default.createElement("div", {
6813
- className: isDisabled ? '' : styles$i.nativeSticky
7083
+ className: isDisabled ? '' : styles$l.nativeSticky
6814
7084
  }, children);
6815
7085
  };
6816
7086
 
@@ -6905,9 +7175,9 @@ var ConnectedRichTextEditor = function ConnectedRichTextEditor(props) {
6905
7175
  setPendingExternalUpdate(true);
6906
7176
  setEditorContent(editor, documentToEditorValue(props.value));
6907
7177
  }, [props.value, id]);
6908
- var classNames = cx(styles$g.editor, props.minHeight !== undefined ? css({
7178
+ var classNames = cx(styles$j.editor, props.minHeight !== undefined ? css({
6909
7179
  minHeight: props.minHeight
6910
- }) : undefined, props.isDisabled ? styles$g.disabled : styles$g.enabled, props.isToolbarHidden && styles$g.hiddenToolbar);
7180
+ }) : undefined, props.isDisabled ? styles$j.disabled : styles$j.enabled, props.isToolbarHidden && styles$j.hiddenToolbar);
6911
7181
  useEffect(function () {
6912
7182
  if (!isFirstRender) {
6913
7183
  return;
@@ -6923,7 +7193,7 @@ var ConnectedRichTextEditor = function ConnectedRichTextEditor(props) {
6923
7193
  }, /*#__PURE__*/React__default.createElement(ContentfulEditorIdProvider, {
6924
7194
  value: id
6925
7195
  }, /*#__PURE__*/React__default.createElement("div", {
6926
- className: styles$g.root,
7196
+ className: styles$j.root,
6927
7197
  "data-test-id": "rich-text-editor"
6928
7198
  }, /*#__PURE__*/React__default.createElement(Plate, {
6929
7199
  id: id,