@micromag/element-heading 0.3.824 → 0.4.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.
@@ -1 +1 @@
1
- .micromag-element-heading-container em,.micromag-element-heading-container i{font-style:italic}.micromag-element-heading-container b,.micromag-element-heading-container strong{font-weight:700}.micromag-element-heading-container p{margin-bottom:.5em;margin-top:.5em}.micromag-element-heading-container mark{-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0}.micromag-element-heading-container{line-height:1;margin:0;padding:0}.micromag-element-heading-container p{margin:0;padding:0}
1
+ .container em,.container i{font-style:italic}.container b,.container strong{font-weight:700}.container p{margin:0;padding:0}.container mark{-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0}.container{line-height:1;margin:0;padding:0}
package/es/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ declare const _default: any;
2
+
3
+ export { _default as default };
package/es/index.js CHANGED
@@ -1,42 +1,28 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import classNames from 'classnames';
3
- import PropTypes from 'prop-types';
4
3
  import React, { useId } from 'react';
5
- import { PropTypes as PropTypes$1 } from '@micromag/core';
6
4
  import { LinkStyle, HighlightStyle } from '@micromag/core/components';
7
5
  import { getStyleFromLink, getStyleFromHighlight, getStyleFromText, getStyleFromMargin, addNonBreakingSpaces } from '@micromag/core/utils';
8
6
 
9
- var styles = {"container":"micromag-element-heading-container"};
7
+ var styles = {"container":"container"};
10
8
 
11
- var propTypes = {
12
- size: PropTypes.oneOf([1, 2, 3, 4, 5, 6]),
13
- body: PropTypes.string,
14
- textStyle: PropTypes$1.textStyle,
15
- linksStyle: PropTypes$1.textStyle,
16
- margin: PropTypes$1.margin,
17
- withoutNonBreakingSpaces: PropTypes.bool,
18
- className: PropTypes.string,
19
- headingRef: PropTypes.shape({})
20
- };
21
- var defaultProps = {
22
- size: 1,
23
- body: null,
24
- textStyle: null,
25
- linksStyle: null,
26
- margin: null,
27
- withoutNonBreakingSpaces: false,
28
- className: null,
29
- headingRef: null
30
- };
31
- var Heading = function Heading(_ref) {
32
- var size = _ref.size,
33
- body = _ref.body,
34
- textStyle = _ref.textStyle,
35
- linksStyle = _ref.linksStyle,
36
- margin = _ref.margin,
37
- withoutNonBreakingSpaces = _ref.withoutNonBreakingSpaces,
38
- className = _ref.className,
39
- headingRef = _ref.headingRef;
9
+ function Heading(_ref) {
10
+ var _ref$size = _ref.size,
11
+ size = _ref$size === void 0 ? 1 : _ref$size,
12
+ _ref$body = _ref.body,
13
+ body = _ref$body === void 0 ? null : _ref$body,
14
+ _ref$textStyle = _ref.textStyle,
15
+ textStyle = _ref$textStyle === void 0 ? null : _ref$textStyle,
16
+ _ref$linksStyle = _ref.linksStyle,
17
+ linksStyle = _ref$linksStyle === void 0 ? null : _ref$linksStyle,
18
+ _ref$margin = _ref.margin,
19
+ margin = _ref$margin === void 0 ? null : _ref$margin,
20
+ _ref$withoutNonBreaki = _ref.withoutNonBreakingSpaces,
21
+ withoutNonBreakingSpaces = _ref$withoutNonBreaki === void 0 ? false : _ref$withoutNonBreaki,
22
+ _ref$className = _ref.className,
23
+ className = _ref$className === void 0 ? null : _ref$className,
24
+ _ref$headingRef = _ref.headingRef,
25
+ headingRef = _ref$headingRef === void 0 ? null : _ref$headingRef;
40
26
  var HeadingComponent = "h".concat(size);
41
27
  var _ref2 = textStyle || {},
42
28
  _ref2$link = _ref2.link,
@@ -73,9 +59,7 @@ var Heading = function Heading(_ref) {
73
59
  },
74
60
  ref: headingRef
75
61
  }));
76
- };
77
- Heading.propTypes = propTypes;
78
- Heading.defaultProps = defaultProps;
62
+ }
79
63
 
80
64
  // eslint-disable-next-line react/jsx-props-no-spreading
81
65
  var Heading_default = /*#__PURE__*/React.forwardRef(function (props, ref) {
package/es/styles.css ADDED
@@ -0,0 +1 @@
1
+ .container em,.container i{font-style:italic}.container b,.container strong{font-weight:700}.container p{margin:0;padding:0}.container mark{-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0}.container{line-height:1;margin:0;padding:0}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-heading",
3
- "version": "0.3.824",
3
+ "version": "0.4.4",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -34,6 +34,7 @@
34
34
  "module": "es/index.js",
35
35
  "exports": {
36
36
  ".": {
37
+ "types": "./es/index.d.ts",
37
38
  "import": "./es/index.js"
38
39
  },
39
40
  "./assets/css/styles": "./assets/css/styles.css",
@@ -47,27 +48,27 @@
47
48
  "scripts": {
48
49
  "clean": "rm -rf es && rm -rf lib && rm -rf assets",
49
50
  "prepublishOnly": "npm run build",
50
- "build": "../../scripts/prepare-package.sh"
51
+ "build": "../../scripts/prepare-package.sh --types"
51
52
  },
52
53
  "devDependencies": {
53
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
54
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
54
+ "react": "^19.2.0",
55
+ "react-dom": "^18.3.0 || ^19.0.0"
55
56
  },
56
57
  "peerDependencies": {
57
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
58
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
58
+ "react": "^19.2.0",
59
+ "react-dom": "^18.3.0 || ^19.0.0"
59
60
  },
60
61
  "dependencies": {
61
62
  "@babel/runtime": "^7.13.10",
62
- "@micromag/core": "^0.3.824",
63
+ "@micromag/core": "^0.4.4",
63
64
  "classnames": "^2.2.6",
64
- "prop-types": "^15.7.2",
65
- "react-intl": "^6.6.4",
65
+ "react-intl": "^8.1.3",
66
66
  "uuid": "^9.0.0"
67
67
  },
68
68
  "publishConfig": {
69
69
  "access": "public",
70
70
  "registry": "https://registry.npmjs.org/"
71
71
  },
72
- "gitHead": "e266e480cdc5741c73160840affee2eac7e7c9de"
72
+ "gitHead": "04b8519c3a3ddace5a21497e22faa11865d57f6d",
73
+ "types": "es/index.d.ts"
73
74
  }