decap-cms-widget-markdown 3.10.1 → 3.12.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.
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import { WidgetPreviewContainer } from 'decap-cms-ui-default';
4
4
  import DOMPurify from 'dompurify';
5
5
  import { markdownToHtml } from './serializers';
6
- import { jsx as ___EmotionJSX } from "@emotion/react";
6
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
7
7
  class MarkdownPreview extends React.Component {
8
8
  static propTypes = {
9
9
  getAsset: PropTypes.func.isRequired,
@@ -31,7 +31,7 @@ class MarkdownPreview extends React.Component {
31
31
  }, getRemarkPlugins?.());
32
32
  const shouldSanitizePreview = field?.get('sanitize_preview') ?? true;
33
33
  const toRender = shouldSanitizePreview ? DOMPurify.sanitize(html) : html;
34
- return ___EmotionJSX(WidgetPreviewContainer, {
34
+ return _jsx(WidgetPreviewContainer, {
35
35
  dangerouslySetInnerHTML: {
36
36
  __html: toRender
37
37
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "decap-cms-widget-markdown",
3
3
  "description": "Widget for editing markdown in Decap CMS.",
4
- "version": "3.10.1",
4
+ "version": "3.12.0",
5
5
  "homepage": "https://www.decapcms.org/docs/widgets/#markdown",
6
6
  "repository": "https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-widget-markdown",
7
7
  "bugs": "https://github.com/decaporg/decap-cms/issues",
@@ -21,7 +21,7 @@
21
21
  "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward"
22
22
  },
23
23
  "dependencies": {
24
- "dompurify": "^3.4.0",
24
+ "dompurify": "^3.4.13",
25
25
  "is-hotkey": "^0.2.0",
26
26
  "mdast-util-definitions": "^1.2.3",
27
27
  "mdast-util-to-string": "^1.0.5",
@@ -56,5 +56,5 @@
56
56
  "commonmark": "^0.30.0",
57
57
  "commonmark-spec": "^0.30.0"
58
58
  },
59
- "gitHead": "505b6a428bfc5ab6f114aa939654a81cb1525ea6"
59
+ "gitHead": "63c8abdbd1f5c530d6f3d78dccca3379d0370c3e"
60
60
  }
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useMemo, useState } from 'react';
1
+ import { useEffect, useMemo, useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import ImmutablePropTypes from 'react-immutable-proptypes';
4
4
  import { ClassNames } from '@emotion/react';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import PropTypes from 'prop-types';
3
2
  import styled from '@emotion/styled';
4
3
  import { Icon, buttons } from 'decap-cms-ui-default';
@@ -1,5 +1,5 @@
1
1
  // @refresh reset
2
- import React, { useCallback, useEffect, useMemo, useState } from 'react';
2
+ import { useCallback, useEffect, useMemo, useState } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import ImmutablePropTypes from 'react-immutable-proptypes';
5
5
  import { ClassNames, css as coreCss } from '@emotion/react';
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable react/prop-types */
2
- import React, { useState } from 'react';
2
+ import { useState } from 'react';
3
3
  import { css } from '@emotion/react';
4
4
  import { fromJS } from 'immutable';
5
5
  import omit from 'lodash/omit';
@@ -1,5 +1,4 @@
1
1
  /* eslint-disable react/prop-types */
2
- import React from 'react';
3
2
  import { css } from '@emotion/react';
4
3
  import { zIndex } from 'decap-cms-ui-default';
5
4
  import { ReactEditor, useSlate } from 'slate-react';
@@ -1,5 +1,4 @@
1
1
  /* eslint-disable react/display-name */
2
- import React from 'react';
3
2
  import { css } from '@emotion/react';
4
3
  import styled from '@emotion/styled';
5
4
  import { colors, lengths } from 'decap-cms-ui-default';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { render, screen } from '@testing-library/react';
3
2
  import padStart from 'lodash/padStart';
4
3
  import { Map } from 'immutable';
@@ -1,7 +1,9 @@
1
+ /** @jsxRuntime classic */
1
2
  /** @jsx h */
2
3
 
3
4
  import flow from 'lodash/flow';
4
5
 
6
+ // eslint-disable-next-line no-unused-vars
5
7
  import h from '../../../test-helpers/h';
6
8
  import { markdownToSlate, slateToMarkdown } from '../index';
7
9