@gravity-ui/markdown-editor 14.12.3 → 14.12.4

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.
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  /** During build process, the current version will be injected here */
5
- exports.VERSION = typeof '14.12.3' !== 'undefined' ? '14.12.3' : 'unknown';
5
+ exports.VERSION = typeof '14.12.4' !== 'undefined' ? '14.12.4' : 'unknown';
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useYfmShowElemWithId = void 0;
4
4
  const react_1 = require("react");
5
5
  const YfmCutCN = {
6
- Open: 'open',
7
6
  Cut: 'yfm-cut',
8
7
  };
8
+ const YfmCutAttrs = {
9
+ Open: 'open',
10
+ };
9
11
  const YfmTabsCN = {
10
12
  Active: 'active',
11
13
  Tabs: 'yfm-tabs',
@@ -33,9 +35,9 @@ function useYfmShowElemWithId(ref, id) {
33
35
  }, [id]);
34
36
  }
35
37
  exports.useYfmShowElemWithId = useYfmShowElemWithId;
36
- function openYfmCut({ classList }) {
37
- if (classList.contains(YfmCutCN.Cut) && !classList.contains(YfmCutCN.Open)) {
38
- classList.add(YfmCutCN.Open);
38
+ function openYfmCut(cutElement) {
39
+ if (cutElement.classList.contains(YfmCutCN.Cut) && !cutElement.hasAttribute(YfmCutAttrs.Open)) {
40
+ cutElement.setAttribute(YfmCutAttrs.Open, '');
39
41
  return true;
40
42
  }
41
43
  return false;
@@ -1,2 +1,2 @@
1
1
  /** During build process, the current version will be injected here */
2
- export const VERSION = typeof '14.12.3' !== 'undefined' ? '14.12.3' : 'unknown';
2
+ export const VERSION = typeof '14.12.4' !== 'undefined' ? '14.12.4' : 'unknown';
@@ -1,8 +1,10 @@
1
1
  import { useEffect } from 'react';
2
2
  const YfmCutCN = {
3
- Open: 'open',
4
3
  Cut: 'yfm-cut',
5
4
  };
5
+ const YfmCutAttrs = {
6
+ Open: 'open',
7
+ };
6
8
  const YfmTabsCN = {
7
9
  Active: 'active',
8
10
  Tabs: 'yfm-tabs',
@@ -29,9 +31,9 @@ export function useYfmShowElemWithId(ref, id) {
29
31
  }
30
32
  }, [id]);
31
33
  }
32
- function openYfmCut({ classList }) {
33
- if (classList.contains(YfmCutCN.Cut) && !classList.contains(YfmCutCN.Open)) {
34
- classList.add(YfmCutCN.Open);
34
+ function openYfmCut(cutElement) {
35
+ if (cutElement.classList.contains(YfmCutCN.Cut) && !cutElement.hasAttribute(YfmCutAttrs.Open)) {
36
+ cutElement.setAttribute(YfmCutAttrs.Open, '');
35
37
  return true;
36
38
  }
37
39
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/markdown-editor",
3
- "version": "14.12.3",
3
+ "version": "14.12.4",
4
4
  "description": "Markdown wysiwyg and markup editor",
5
5
  "license": "MIT",
6
6
  "repository": {