@contentful/field-editor-markdown 1.1.4 → 1.1.7

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.1.7](https://github.com/contentful/field-editors/compare/@contentful/field-editor-markdown@1.1.6...@contentful/field-editor-markdown@1.1.7) (2022-07-29)
7
+
8
+ **Note:** Version bump only for package @contentful/field-editor-markdown
9
+
10
+ ## [1.1.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-markdown@1.1.5...@contentful/field-editor-markdown@1.1.6) (2022-07-11)
11
+
12
+ **Note:** Version bump only for package @contentful/field-editor-markdown
13
+
14
+ ## [1.1.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-markdown@1.1.4...@contentful/field-editor-markdown@1.1.5) (2022-06-22)
15
+
16
+ **Note:** Version bump only for package @contentful/field-editor-markdown
17
+
6
18
  ## [1.1.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-markdown@1.1.3...@contentful/field-editor-markdown@1.1.4) (2022-05-04)
7
19
 
8
20
  ### Bug Fixes
@@ -723,7 +723,7 @@ var userAgent = /*#__PURE__*/get(window, 'navigator.userAgent', '');
723
723
  var platform = /*#__PURE__*/get(window, 'navigator.platform', '');
724
724
  var ctrlKey = 'Ctrl';
725
725
  var tests = {
726
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
726
+ // eslint-disable-next-line -- TODO: describe this disable @typescript-eslint/ban-ts-comment
727
727
  // @ts-ignore ignore missing MSStream
728
728
  ios: /*#__PURE__*/ /(iphone os|ipad|iphone|ipod)/i.test(userAgent) && !window.MSStream
729
729
  };
@@ -765,7 +765,7 @@ function create(host, options) {
765
765
  min: height ? stripUnit(height) : 300,
766
766
  max: 500,
767
767
  shift: 50
768
- }; // eslint-disable-next-line
768
+ }; // eslint-disable-next-line -- TODO: describe this disable
769
769
  // @ts-ignore
770
770
 
771
771
  var cm = CodeMirror(host, {
@@ -909,7 +909,7 @@ function create(host, options) {
909
909
  function addKeyShortcuts(map) {
910
910
  var ctrlKey = getCtrlKey();
911
911
  cm.addKeyMap(transform(map, function (acc, value, key) {
912
- // eslint-disable-next-line
912
+ // eslint-disable-next-line -- TODO: describe this disable
913
913
  // @ts-ignore
914
914
  acc[ctrlKey + '-' + key] = value;
915
915
  }, {}));
@@ -1642,12 +1642,14 @@ var MarkdownTextarea = /*#__PURE__*/React__default.memo(function (props) {
1642
1642
  } : {}, props.minHeight !== undefined ? {
1643
1643
  height: props.minHeight
1644
1644
  } : {})));
1645
- }
1645
+ } // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
1646
+
1646
1647
  }, []);
1647
1648
  React.useEffect(function () {
1648
1649
  if (editor) {
1649
1650
  props.onReady(editor);
1650
- }
1651
+ } // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
1652
+
1651
1653
  }, [editor]);
1652
1654
  var className = emotion.cx(styles$2.root, props.minHeight !== undefined ? emotion.css({
1653
1655
  minHeight: props.minHeight
@@ -1939,7 +1941,7 @@ var MarkdownPreview = /*#__PURE__*/React__default.memo(function (props) {
1939
1941
  options: {
1940
1942
  overrides: {
1941
1943
  a: {
1942
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1944
+ // eslint-disable-next-line -- TODO: describe this disable @typescript-eslint/no-explicit-any
1943
1945
  component: MarkdownLink,
1944
1946
  props: {
1945
1947
  Embedly: (_props$previewCompone = props.previewComponents) == null ? void 0 : _props$previewCompone.embedly
@@ -3470,8 +3472,8 @@ var ZenModeModalDialog = function ZenModeModalDialog(props) {
3470
3472
  React__default.useEffect(function () {
3471
3473
  var _props$sdk, _props$sdk$window;
3472
3474
 
3473
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3474
- (_props$sdk = props.sdk) == null ? void 0 : (_props$sdk$window = _props$sdk.window) == null ? void 0 : _props$sdk$window.updateHeight('100%');
3475
+ // eslint-disable-next-line -- TODO: describe this disable @typescript-eslint/no-explicit-any
3476
+ (_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
3475
3477
  }, []); // refresh editor right after dialog is opened to avoid disappearing effect
3476
3478
 
3477
3479
  React__default.useEffect(function () {
@@ -3485,7 +3487,7 @@ var ZenModeModalDialog = function ZenModeModalDialog(props) {
3485
3487
  sdk: props.sdk,
3486
3488
  editor: editor,
3487
3489
  locale: props.locale
3488
- });
3490
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
3489
3491
  }, [editor]);
3490
3492
 
3491
3493
  actions.closeZenMode = function () {
@@ -3895,7 +3897,7 @@ function buildRef(link, id) {
3895
3897
  function createMarkdownActions(props) {
3896
3898
  var sdk = props.sdk,
3897
3899
  editor = props.editor,
3898
- locale = props.locale; // eslint-disable-next-line @typescript-eslint/ban-types
3900
+ locale = props.locale; // eslint-disable-next-line -- TODO: describe this disable @typescript-eslint/ban-types
3899
3901
 
3900
3902
  var insertAssetsWithConfirmation = /*#__PURE__*/function () {
3901
3903
  var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(assets) {
@@ -4383,12 +4385,13 @@ function MarkdownEditor(props) {
4383
4385
  setTimeout(function () {
4384
4386
  editor.refresh();
4385
4387
  }, 1);
4386
- }
4388
+ } // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
4389
+
4387
4390
  }, [editor]);
4388
4391
  React__default.useEffect(function () {
4389
4392
  props.sdk.access.can('create', 'Asset').then(function (value) {
4390
4393
  setCanUploadAssets(value);
4391
- });
4394
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
4392
4395
  }, []);
4393
4396
  React__default.useEffect(function () {
4394
4397
  if (editor) {
@@ -4402,10 +4405,10 @@ function MarkdownEditor(props) {
4402
4405
  sdk: props.sdk,
4403
4406
  editor: editor,
4404
4407
  locale: props.sdk.field.locale
4405
- });
4408
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
4406
4409
  }, [editor]);
4407
4410
  var openMarkdownHelp = React__default.useCallback(function () {
4408
- openCheatsheetModal(props.sdk.dialogs);
4411
+ openCheatsheetModal(props.sdk.dialogs); // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: Evaluate the dependencies
4409
4412
  }, []);
4410
4413
  return React__default.createElement("div", {
4411
4414
  className: styles$a.container,
@@ -4590,7 +4593,7 @@ var renderMarkdownDialog = function renderMarkdownDialog(sdk) {
4590
4593
  });
4591
4594
  } else if (parameters.type === MarkdownDialogType.zenMode) {
4592
4595
  var _locale = parameters.locale;
4593
- var initialValue = parameters.initialValue; // eslint-disable-next-line @typescript-eslint/no-explicit-any
4596
+ var initialValue = parameters.initialValue; // eslint-disable-next-line -- TODO: describe this disable @typescript-eslint/no-explicit-any
4594
4597
 
4595
4598
  sdk.window.updateHeight('100%');
4596
4599
  return React__default.createElement(ZenModeModalDialog, {