@contentful/field-editor-markdown 1.1.4 → 1.1.5

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.
@@ -716,7 +716,7 @@ var userAgent = /*#__PURE__*/get(window, 'navigator.userAgent', '');
716
716
  var platform = /*#__PURE__*/get(window, 'navigator.platform', '');
717
717
  var ctrlKey = 'Ctrl';
718
718
  var tests = {
719
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
719
+ // eslint-disable-next-line -- TODO: describe this disable @typescript-eslint/ban-ts-comment
720
720
  // @ts-ignore ignore missing MSStream
721
721
  ios: /*#__PURE__*/ /(iphone os|ipad|iphone|ipod)/i.test(userAgent) && !window.MSStream
722
722
  };
@@ -758,7 +758,7 @@ function create(host, options) {
758
758
  min: height ? stripUnit(height) : 300,
759
759
  max: 500,
760
760
  shift: 50
761
- }; // eslint-disable-next-line
761
+ }; // eslint-disable-next-line -- TODO: describe this disable
762
762
  // @ts-ignore
763
763
 
764
764
  var cm = CodeMirror(host, {
@@ -902,7 +902,7 @@ function create(host, options) {
902
902
  function addKeyShortcuts(map) {
903
903
  var ctrlKey = getCtrlKey();
904
904
  cm.addKeyMap(transform(map, function (acc, value, key) {
905
- // eslint-disable-next-line
905
+ // eslint-disable-next-line -- TODO: describe this disable
906
906
  // @ts-ignore
907
907
  acc[ctrlKey + '-' + key] = value;
908
908
  }, {}));
@@ -1635,12 +1635,14 @@ var MarkdownTextarea = /*#__PURE__*/React.memo(function (props) {
1635
1635
  } : {}, props.minHeight !== undefined ? {
1636
1636
  height: props.minHeight
1637
1637
  } : {})));
1638
- }
1638
+ } // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
1639
+
1639
1640
  }, []);
1640
1641
  useEffect(function () {
1641
1642
  if (editor) {
1642
1643
  props.onReady(editor);
1643
- }
1644
+ } // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
1645
+
1644
1646
  }, [editor]);
1645
1647
  var className = cx(styles$2.root, props.minHeight !== undefined ? css({
1646
1648
  minHeight: props.minHeight
@@ -1932,7 +1934,7 @@ var MarkdownPreview = /*#__PURE__*/React.memo(function (props) {
1932
1934
  options: {
1933
1935
  overrides: {
1934
1936
  a: {
1935
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1937
+ // eslint-disable-next-line -- TODO: describe this disable @typescript-eslint/no-explicit-any
1936
1938
  component: MarkdownLink,
1937
1939
  props: {
1938
1940
  Embedly: (_props$previewCompone = props.previewComponents) == null ? void 0 : _props$previewCompone.embedly
@@ -3463,8 +3465,8 @@ var ZenModeModalDialog = function ZenModeModalDialog(props) {
3463
3465
  React.useEffect(function () {
3464
3466
  var _props$sdk, _props$sdk$window;
3465
3467
 
3466
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3467
- (_props$sdk = props.sdk) == null ? void 0 : (_props$sdk$window = _props$sdk.window) == null ? void 0 : _props$sdk$window.updateHeight('100%');
3468
+ // eslint-disable-next-line -- TODO: describe this disable @typescript-eslint/no-explicit-any
3469
+ (_props$sdk = props.sdk) == null ? void 0 : (_props$sdk$window = _props$sdk.window) == null ? void 0 : _props$sdk$window.updateHeight('100%'); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
3468
3470
  }, []); // refresh editor right after dialog is opened to avoid disappearing effect
3469
3471
 
3470
3472
  React.useEffect(function () {
@@ -3478,7 +3480,7 @@ var ZenModeModalDialog = function ZenModeModalDialog(props) {
3478
3480
  sdk: props.sdk,
3479
3481
  editor: editor,
3480
3482
  locale: props.locale
3481
- });
3483
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
3482
3484
  }, [editor]);
3483
3485
 
3484
3486
  actions.closeZenMode = function () {
@@ -3888,7 +3890,7 @@ function buildRef(link, id) {
3888
3890
  function createMarkdownActions(props) {
3889
3891
  var sdk = props.sdk,
3890
3892
  editor = props.editor,
3891
- locale = props.locale; // eslint-disable-next-line @typescript-eslint/ban-types
3893
+ locale = props.locale; // eslint-disable-next-line -- TODO: describe this disable @typescript-eslint/ban-types
3892
3894
 
3893
3895
  var insertAssetsWithConfirmation = /*#__PURE__*/function () {
3894
3896
  var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(assets) {
@@ -4376,12 +4378,13 @@ function MarkdownEditor(props) {
4376
4378
  setTimeout(function () {
4377
4379
  editor.refresh();
4378
4380
  }, 1);
4379
- }
4381
+ } // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
4382
+
4380
4383
  }, [editor]);
4381
4384
  React.useEffect(function () {
4382
4385
  props.sdk.access.can('create', 'Asset').then(function (value) {
4383
4386
  setCanUploadAssets(value);
4384
- });
4387
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
4385
4388
  }, []);
4386
4389
  React.useEffect(function () {
4387
4390
  if (editor) {
@@ -4395,10 +4398,10 @@ function MarkdownEditor(props) {
4395
4398
  sdk: props.sdk,
4396
4399
  editor: editor,
4397
4400
  locale: props.sdk.field.locale
4398
- });
4401
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
4399
4402
  }, [editor]);
4400
4403
  var openMarkdownHelp = React.useCallback(function () {
4401
- openCheatsheetModal(props.sdk.dialogs);
4404
+ openCheatsheetModal(props.sdk.dialogs); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
4402
4405
  }, []);
4403
4406
  return React.createElement("div", {
4404
4407
  className: styles$a.container,
@@ -4583,7 +4586,7 @@ var renderMarkdownDialog = function renderMarkdownDialog(sdk) {
4583
4586
  });
4584
4587
  } else if (parameters.type === MarkdownDialogType.zenMode) {
4585
4588
  var _locale = parameters.locale;
4586
- var initialValue = parameters.initialValue; // eslint-disable-next-line @typescript-eslint/no-explicit-any
4589
+ var initialValue = parameters.initialValue; // eslint-disable-next-line -- TODO: describe this disable @typescript-eslint/no-explicit-any
4587
4590
 
4588
4591
  sdk.window.updateHeight('100%');
4589
4592
  return React.createElement(ZenModeModalDialog, {