@micromag/element-closed-captions 0.4.49 → 0.4.51

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.
Files changed (2) hide show
  1. package/es/index.js +13 -10
  2. package/package.json +4 -4
package/es/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
2
2
  import classNames from 'classnames';
3
3
  import parseSRT from 'parse-srt';
4
- import React, { useState, useEffect, useCallback } from 'react';
4
+ import { useState, useEffect, useCallback } from 'react';
5
5
  import { getSecondsFromTime, getStyleFromBox } from '@micromag/core/utils';
6
6
  import TextElement from '@micromag/element-text';
7
+ import { jsx } from 'react/jsx-runtime';
7
8
 
8
9
  var styles = {"container":"micromag-element-closed-captions-container","captions":"micromag-element-closed-captions-captions"};
9
10
 
@@ -66,15 +67,17 @@ function ClosedCaptions(_ref) {
66
67
  var line = lineIndex !== -1 ? lines[lineIndex] : null;
67
68
  var active = line !== null;
68
69
  var finalBoxStyles = boxStyle !== null ? getStyleFromBox(boxStyle) : null;
69
- return /*#__PURE__*/React.createElement("div", {
70
- className: classNames([styles.container, className])
71
- }, active ? /*#__PURE__*/React.createElement("div", {
72
- className: styles.captions,
73
- style: finalBoxStyles
74
- }, /*#__PURE__*/React.createElement(TextElement, {
75
- textStyle: textStyle,
76
- body: line.text
77
- })) : null);
70
+ return /*#__PURE__*/jsx("div", {
71
+ className: classNames([styles.container, className]),
72
+ children: active ? /*#__PURE__*/jsx("div", {
73
+ className: styles.captions,
74
+ style: finalBoxStyles,
75
+ children: /*#__PURE__*/jsx(TextElement, {
76
+ textStyle: textStyle,
77
+ body: line.text
78
+ })
79
+ }) : null
80
+ });
78
81
  }
79
82
 
80
83
  export { ClosedCaptions as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-closed-captions",
3
- "version": "0.4.49",
3
+ "version": "0.4.51",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -60,8 +60,8 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@babel/runtime": "^7.28.6",
63
- "@micromag/core": "^0.4.49",
64
- "@micromag/element-text": "^0.4.49",
63
+ "@micromag/core": "^0.4.51",
64
+ "@micromag/element-text": "^0.4.51",
65
65
  "classnames": "^2.2.6",
66
66
  "parse-srt": "^1.0.0-alpha",
67
67
  "react-intl": "^8.1.3 || ^10.0.0",
@@ -71,6 +71,6 @@
71
71
  "access": "public",
72
72
  "registry": "https://registry.npmjs.org/"
73
73
  },
74
- "gitHead": "0a225ff29387217cccb0fcc5a731e23c74bd202e",
74
+ "gitHead": "985a2370829c9ac8901ea97bf20bfc98ab158439",
75
75
  "types": "es/index.d.ts"
76
76
  }