@micromag/viewer 0.3.334 → 0.3.335
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/es/index.js +30 -13
- package/lib/index.js +30 -13
- package/package.json +5 -5
package/es/index.js
CHANGED
|
@@ -1983,16 +1983,25 @@ SeekBar.defaultProps = defaultProps$5;
|
|
|
1983
1983
|
var styles$1 = {"playPauseButton":"micromag-viewer-partials-playback-controls-playPauseButton","muteButton":"micromag-viewer-partials-playback-controls-muteButton","container":"micromag-viewer-partials-playback-controls-container","icon":"micromag-viewer-partials-playback-controls-icon","withPlayPause":"micromag-viewer-partials-playback-controls-withPlayPause","isCollapsed":"micromag-viewer-partials-playback-controls-isCollapsed","isMuted":"micromag-viewer-partials-playback-controls-isMuted","withMute":"micromag-viewer-partials-playback-controls-withMute","withSeekBar":"micromag-viewer-partials-playback-controls-withSeekBar","seekBar":"micromag-viewer-partials-playback-controls-seekBar","withSeekBarOnly":"micromag-viewer-partials-playback-controls-withSeekBarOnly"};
|
|
1984
1984
|
|
|
1985
1985
|
var propTypes$4 = {
|
|
1986
|
+
defaultColor: PropTypes.shape({
|
|
1987
|
+
color: PropTypes.string,
|
|
1988
|
+
alpha: PropTypes.number
|
|
1989
|
+
}),
|
|
1986
1990
|
className: PropTypes.string,
|
|
1987
1991
|
collapsedClassName: PropTypes.string
|
|
1988
1992
|
};
|
|
1989
1993
|
var defaultProps$4 = {
|
|
1994
|
+
defaultColor: {
|
|
1995
|
+
color: '#000000',
|
|
1996
|
+
alpha: 1
|
|
1997
|
+
},
|
|
1990
1998
|
className: null,
|
|
1991
1999
|
collapsedClassName: null
|
|
1992
2000
|
};
|
|
1993
2001
|
function PlaybackControls(_ref) {
|
|
1994
2002
|
var _ref4;
|
|
1995
|
-
var
|
|
2003
|
+
var defaultColor = _ref.defaultColor,
|
|
2004
|
+
className = _ref.className,
|
|
1996
2005
|
collapsedClassName = _ref.collapsedClassName;
|
|
1997
2006
|
var intl = useIntl();
|
|
1998
2007
|
var _usePlaybackContext = usePlaybackContext(),
|
|
@@ -2010,7 +2019,11 @@ function PlaybackControls(_ref) {
|
|
|
2010
2019
|
controlsVisible = _usePlaybackContext.controlsVisible,
|
|
2011
2020
|
controlsTheme = _usePlaybackContext.controlsTheme,
|
|
2012
2021
|
showControls = _usePlaybackContext.showControls;
|
|
2013
|
-
var _useState = useState(
|
|
2022
|
+
var _useState = useState({
|
|
2023
|
+
color: getColorAsString(defaultColor),
|
|
2024
|
+
progressColor: getColorAsString(defaultColor),
|
|
2025
|
+
seekBarOnly: false
|
|
2026
|
+
}),
|
|
2014
2027
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2015
2028
|
customControlsTheme = _useState2[0],
|
|
2016
2029
|
setCustomControlsTheme = _useState2[1];
|
|
@@ -2024,11 +2037,11 @@ function PlaybackControls(_ref) {
|
|
|
2024
2037
|
progressColor = _ref2.progressColor,
|
|
2025
2038
|
seekBarOnly = _ref2.seekBarOnly;
|
|
2026
2039
|
setCustomControlsTheme({
|
|
2027
|
-
color: getColorAsString(color),
|
|
2028
|
-
progressColor: getColorAsString(progressColor),
|
|
2040
|
+
color: getColorAsString(color || defaultColor),
|
|
2041
|
+
progressColor: getColorAsString(progressColor || defaultColor),
|
|
2029
2042
|
seekBarOnly: seekBarOnly
|
|
2030
2043
|
});
|
|
2031
|
-
}, [controlsTheme, setCustomControlsTheme]);
|
|
2044
|
+
}, [controlsTheme, setCustomControlsTheme, defaultColor]);
|
|
2032
2045
|
var onPlay = useCallback(function () {
|
|
2033
2046
|
setPlaying(true);
|
|
2034
2047
|
if (!controlsVisible && controls) {
|
|
@@ -2097,14 +2110,15 @@ function PlaybackControls(_ref) {
|
|
|
2097
2110
|
width: "10px",
|
|
2098
2111
|
height: "16px",
|
|
2099
2112
|
viewBox: "0 0 10 16",
|
|
2100
|
-
xmlSpace: "preserve"
|
|
2101
|
-
fill: "currentColor"
|
|
2113
|
+
xmlSpace: "preserve"
|
|
2102
2114
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
2115
|
+
fill: color,
|
|
2103
2116
|
x: "1",
|
|
2104
2117
|
y: "3.27",
|
|
2105
2118
|
width: "3",
|
|
2106
2119
|
height: "9.69"
|
|
2107
2120
|
}), /*#__PURE__*/React.createElement("rect", {
|
|
2121
|
+
fill: color,
|
|
2108
2122
|
x: "6",
|
|
2109
2123
|
y: "3.27",
|
|
2110
2124
|
width: "3",
|
|
@@ -2118,9 +2132,9 @@ function PlaybackControls(_ref) {
|
|
|
2118
2132
|
width: "10px",
|
|
2119
2133
|
height: "16px",
|
|
2120
2134
|
viewBox: "0 0 10 16",
|
|
2121
|
-
xmlSpace: "preserve"
|
|
2122
|
-
fill: "currentColor"
|
|
2135
|
+
xmlSpace: "preserve"
|
|
2123
2136
|
}, /*#__PURE__*/React.createElement("path", {
|
|
2137
|
+
fill: color,
|
|
2124
2138
|
d: "M1,3.16V12.84l8-4.84L1,3.16"
|
|
2125
2139
|
})),
|
|
2126
2140
|
"aria-label": playing ? intl.formatMessage({
|
|
@@ -2164,11 +2178,12 @@ function PlaybackControls(_ref) {
|
|
|
2164
2178
|
height: "16px",
|
|
2165
2179
|
viewBox: "0 0 10 16",
|
|
2166
2180
|
xmlSpace: "preserve",
|
|
2167
|
-
className: styles$1.icon
|
|
2168
|
-
fill: "currentColor"
|
|
2181
|
+
className: styles$1.icon
|
|
2169
2182
|
}, /*#__PURE__*/React.createElement("polygon", {
|
|
2183
|
+
fill: color,
|
|
2170
2184
|
points: "2.75 4.63 1.24 6 0 6 0 10 1.24 10 4.54 13 4.54 3 2.75 4.63"
|
|
2171
2185
|
}), /*#__PURE__*/React.createElement("polygon", {
|
|
2186
|
+
fill: color,
|
|
2172
2187
|
points: "10 6.63 8.94 5.57 7.58 6.93 6.21 5.57 5.15 6.63 6.52 7.99 5.15 9.35 6.21 10.43 7.58 9.06 8.94 10.43 10 9.35 8.64 7.99 10 6.63"
|
|
2173
2188
|
})) : /*#__PURE__*/React.createElement("svg", {
|
|
2174
2189
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2179,15 +2194,17 @@ function PlaybackControls(_ref) {
|
|
|
2179
2194
|
height: "16px",
|
|
2180
2195
|
viewBox: "0 0 10 16",
|
|
2181
2196
|
xmlSpace: "preserve",
|
|
2182
|
-
className: styles$1.icon
|
|
2183
|
-
fill: "currentColor"
|
|
2197
|
+
className: styles$1.icon
|
|
2184
2198
|
}, /*#__PURE__*/React.createElement("polygon", {
|
|
2199
|
+
fill: color,
|
|
2185
2200
|
points: "2.75 4.63 1.24 6 0 6 0 10 1.24 10 4.54 13 4.54 3 2.75 4.63"
|
|
2186
2201
|
}), /*#__PURE__*/React.createElement("circle", {
|
|
2202
|
+
fill: color,
|
|
2187
2203
|
cx: "6.14",
|
|
2188
2204
|
cy: "8",
|
|
2189
2205
|
r: ".99"
|
|
2190
2206
|
}), /*#__PURE__*/React.createElement("path", {
|
|
2207
|
+
fill: color,
|
|
2191
2208
|
d: "M6.14,11.88v-1.5c1.31,0,2.38-1.07,2.38-2.38s-1.07-2.38-2.38-2.38v-1.5c2.14,0,3.88,1.74,3.88,3.88s-1.74,3.88-3.88,3.88Z"
|
|
2192
2209
|
})),
|
|
2193
2210
|
"aria-label": muted ? intl.formatMessage({
|
package/lib/index.js
CHANGED
|
@@ -2003,16 +2003,25 @@ SeekBar.defaultProps = defaultProps$5;
|
|
|
2003
2003
|
var styles$1 = {"playPauseButton":"micromag-viewer-partials-playback-controls-playPauseButton","muteButton":"micromag-viewer-partials-playback-controls-muteButton","container":"micromag-viewer-partials-playback-controls-container","icon":"micromag-viewer-partials-playback-controls-icon","withPlayPause":"micromag-viewer-partials-playback-controls-withPlayPause","isCollapsed":"micromag-viewer-partials-playback-controls-isCollapsed","isMuted":"micromag-viewer-partials-playback-controls-isMuted","withMute":"micromag-viewer-partials-playback-controls-withMute","withSeekBar":"micromag-viewer-partials-playback-controls-withSeekBar","seekBar":"micromag-viewer-partials-playback-controls-seekBar","withSeekBarOnly":"micromag-viewer-partials-playback-controls-withSeekBarOnly"};
|
|
2004
2004
|
|
|
2005
2005
|
var propTypes$4 = {
|
|
2006
|
+
defaultColor: PropTypes__default["default"].shape({
|
|
2007
|
+
color: PropTypes__default["default"].string,
|
|
2008
|
+
alpha: PropTypes__default["default"].number
|
|
2009
|
+
}),
|
|
2006
2010
|
className: PropTypes__default["default"].string,
|
|
2007
2011
|
collapsedClassName: PropTypes__default["default"].string
|
|
2008
2012
|
};
|
|
2009
2013
|
var defaultProps$4 = {
|
|
2014
|
+
defaultColor: {
|
|
2015
|
+
color: '#000000',
|
|
2016
|
+
alpha: 1
|
|
2017
|
+
},
|
|
2010
2018
|
className: null,
|
|
2011
2019
|
collapsedClassName: null
|
|
2012
2020
|
};
|
|
2013
2021
|
function PlaybackControls(_ref) {
|
|
2014
2022
|
var _ref4;
|
|
2015
|
-
var
|
|
2023
|
+
var defaultColor = _ref.defaultColor,
|
|
2024
|
+
className = _ref.className,
|
|
2016
2025
|
collapsedClassName = _ref.collapsedClassName;
|
|
2017
2026
|
var intl = reactIntl.useIntl();
|
|
2018
2027
|
var _usePlaybackContext = contexts.usePlaybackContext(),
|
|
@@ -2030,7 +2039,11 @@ function PlaybackControls(_ref) {
|
|
|
2030
2039
|
controlsVisible = _usePlaybackContext.controlsVisible,
|
|
2031
2040
|
controlsTheme = _usePlaybackContext.controlsTheme,
|
|
2032
2041
|
showControls = _usePlaybackContext.showControls;
|
|
2033
|
-
var _useState = React.useState(
|
|
2042
|
+
var _useState = React.useState({
|
|
2043
|
+
color: utils.getColorAsString(defaultColor),
|
|
2044
|
+
progressColor: utils.getColorAsString(defaultColor),
|
|
2045
|
+
seekBarOnly: false
|
|
2046
|
+
}),
|
|
2034
2047
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
2035
2048
|
customControlsTheme = _useState2[0],
|
|
2036
2049
|
setCustomControlsTheme = _useState2[1];
|
|
@@ -2044,11 +2057,11 @@ function PlaybackControls(_ref) {
|
|
|
2044
2057
|
progressColor = _ref2.progressColor,
|
|
2045
2058
|
seekBarOnly = _ref2.seekBarOnly;
|
|
2046
2059
|
setCustomControlsTheme({
|
|
2047
|
-
color: utils.getColorAsString(color),
|
|
2048
|
-
progressColor: utils.getColorAsString(progressColor),
|
|
2060
|
+
color: utils.getColorAsString(color || defaultColor),
|
|
2061
|
+
progressColor: utils.getColorAsString(progressColor || defaultColor),
|
|
2049
2062
|
seekBarOnly: seekBarOnly
|
|
2050
2063
|
});
|
|
2051
|
-
}, [controlsTheme, setCustomControlsTheme]);
|
|
2064
|
+
}, [controlsTheme, setCustomControlsTheme, defaultColor]);
|
|
2052
2065
|
var onPlay = React.useCallback(function () {
|
|
2053
2066
|
setPlaying(true);
|
|
2054
2067
|
if (!controlsVisible && controls) {
|
|
@@ -2117,14 +2130,15 @@ function PlaybackControls(_ref) {
|
|
|
2117
2130
|
width: "10px",
|
|
2118
2131
|
height: "16px",
|
|
2119
2132
|
viewBox: "0 0 10 16",
|
|
2120
|
-
xmlSpace: "preserve"
|
|
2121
|
-
fill: "currentColor"
|
|
2133
|
+
xmlSpace: "preserve"
|
|
2122
2134
|
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
2135
|
+
fill: color,
|
|
2123
2136
|
x: "1",
|
|
2124
2137
|
y: "3.27",
|
|
2125
2138
|
width: "3",
|
|
2126
2139
|
height: "9.69"
|
|
2127
2140
|
}), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
2141
|
+
fill: color,
|
|
2128
2142
|
x: "6",
|
|
2129
2143
|
y: "3.27",
|
|
2130
2144
|
width: "3",
|
|
@@ -2138,9 +2152,9 @@ function PlaybackControls(_ref) {
|
|
|
2138
2152
|
width: "10px",
|
|
2139
2153
|
height: "16px",
|
|
2140
2154
|
viewBox: "0 0 10 16",
|
|
2141
|
-
xmlSpace: "preserve"
|
|
2142
|
-
fill: "currentColor"
|
|
2155
|
+
xmlSpace: "preserve"
|
|
2143
2156
|
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2157
|
+
fill: color,
|
|
2144
2158
|
d: "M1,3.16V12.84l8-4.84L1,3.16"
|
|
2145
2159
|
})),
|
|
2146
2160
|
"aria-label": playing ? intl.formatMessage({
|
|
@@ -2184,11 +2198,12 @@ function PlaybackControls(_ref) {
|
|
|
2184
2198
|
height: "16px",
|
|
2185
2199
|
viewBox: "0 0 10 16",
|
|
2186
2200
|
xmlSpace: "preserve",
|
|
2187
|
-
className: styles$1.icon
|
|
2188
|
-
fill: "currentColor"
|
|
2201
|
+
className: styles$1.icon
|
|
2189
2202
|
}, /*#__PURE__*/React__default["default"].createElement("polygon", {
|
|
2203
|
+
fill: color,
|
|
2190
2204
|
points: "2.75 4.63 1.24 6 0 6 0 10 1.24 10 4.54 13 4.54 3 2.75 4.63"
|
|
2191
2205
|
}), /*#__PURE__*/React__default["default"].createElement("polygon", {
|
|
2206
|
+
fill: color,
|
|
2192
2207
|
points: "10 6.63 8.94 5.57 7.58 6.93 6.21 5.57 5.15 6.63 6.52 7.99 5.15 9.35 6.21 10.43 7.58 9.06 8.94 10.43 10 9.35 8.64 7.99 10 6.63"
|
|
2193
2208
|
})) : /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
2194
2209
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2199,15 +2214,17 @@ function PlaybackControls(_ref) {
|
|
|
2199
2214
|
height: "16px",
|
|
2200
2215
|
viewBox: "0 0 10 16",
|
|
2201
2216
|
xmlSpace: "preserve",
|
|
2202
|
-
className: styles$1.icon
|
|
2203
|
-
fill: "currentColor"
|
|
2217
|
+
className: styles$1.icon
|
|
2204
2218
|
}, /*#__PURE__*/React__default["default"].createElement("polygon", {
|
|
2219
|
+
fill: color,
|
|
2205
2220
|
points: "2.75 4.63 1.24 6 0 6 0 10 1.24 10 4.54 13 4.54 3 2.75 4.63"
|
|
2206
2221
|
}), /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
2222
|
+
fill: color,
|
|
2207
2223
|
cx: "6.14",
|
|
2208
2224
|
cy: "8",
|
|
2209
2225
|
r: ".99"
|
|
2210
2226
|
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
2227
|
+
fill: color,
|
|
2211
2228
|
d: "M6.14,11.88v-1.5c1.31,0,2.38-1.07,2.38-2.38s-1.07-2.38-2.38-2.38v-1.5c2.14,0,3.88,1.74,3.88,3.88s-1.74,3.88-3.88,3.88Z"
|
|
2212
2229
|
})),
|
|
2213
2230
|
"aria-label": muted ? intl.formatMessage({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/viewer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.335",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"@micromag/element-scroll": "^0.3.332",
|
|
64
64
|
"@micromag/element-share-options": "^0.3.332",
|
|
65
65
|
"@micromag/element-webview": "^0.3.332",
|
|
66
|
-
"@micromag/elements": "^0.3.
|
|
67
|
-
"@micromag/fields": "^0.3.
|
|
66
|
+
"@micromag/elements": "^0.3.335",
|
|
67
|
+
"@micromag/fields": "^0.3.335",
|
|
68
68
|
"@micromag/intl": "^0.3.333",
|
|
69
|
-
"@micromag/screens": "^0.3.
|
|
69
|
+
"@micromag/screens": "^0.3.335",
|
|
70
70
|
"@react-spring/core": "^9.6.1",
|
|
71
71
|
"@react-spring/web": "^9.6.1",
|
|
72
72
|
"@use-gesture/react": "^10.2.4",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "2d4617589f6091803cee6d5614c61297bba3bdc6"
|
|
89
89
|
}
|