@blerp/design 1.2.6 → 1.2.8
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/dist/index.cjs.js +145 -104
- package/dist/index.esm.js +149 -106
- package/dist/index.umd.js +145 -103
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@mui/material'), require('@babel/runtime/helpers/slicedToArray'), require('prop-types'), require('react'), require('react-color-extractor'), require('styled-components'), require('@babel/runtime/helpers/taggedTemplateLiteral'), require('@mui/icons-material'), require('@mui/icons-material/BookmarkOutlined'), require('@mui/icons-material/LockRounded'), require('@blerp/wavesurfer'), require('@blerp/wavesurfer/dist/plugin/wavesurfer.cursor.min.js'), require('@mui/icons-material/AddRounded'), require('@mui/icons-material/ArrowDropDownRounded'), require('@mui/icons-material/Favorite'), require('@mui/icons-material/FavoriteBorder'), require('@mui/icons-material/PauseRounded'), require('@mui/icons-material/PlayArrowRounded'), require('@mui/icons-material/WarningRounded'), require('@mui/icons-material/DoNotDisturbRounded'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@mui/material', '@babel/runtime/helpers/slicedToArray', 'prop-types', 'react', 'react-color-extractor', 'styled-components', '@babel/runtime/helpers/taggedTemplateLiteral', '@mui/icons-material', '@mui/icons-material/BookmarkOutlined', '@mui/icons-material/LockRounded', '@blerp/wavesurfer', '@blerp/wavesurfer/dist/plugin/wavesurfer.cursor.min.js', '@mui/icons-material/AddRounded', '@mui/icons-material/ArrowDropDownRounded', '@mui/icons-material/Favorite', '@mui/icons-material/FavoriteBorder', '@mui/icons-material/PauseRounded', '@mui/icons-material/PlayArrowRounded', '@mui/icons-material/WarningRounded', '@mui/icons-material/DoNotDisturbRounded', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['react-awesome-buttons'] = {}, global.material, global._slicedToArray, global.PropTypes, global.React, global.reactColorExtractor, global.styled, global._taggedTemplateLiteral, global.iconsMaterial, global.BookmarkOutlinedIcon, global.LockRoundedIcon, global.
|
|
5
|
-
}(this, (function (exports, material, _slicedToArray, PropTypes, React, reactColorExtractor, styled, _taggedTemplateLiteral, iconsMaterial, BookmarkOutlinedIcon, LockRoundedIcon,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@mui/material'), require('@babel/runtime/helpers/slicedToArray'), require('prop-types'), require('react'), require('react-color-extractor'), require('styled-components'), require('@babel/runtime/helpers/taggedTemplateLiteral'), require('@mui/icons-material'), require('@mui/icons-material/BookmarkOutlined'), require('@mui/icons-material/LockRounded'), require('@babel/runtime/helpers/asyncToGenerator'), require('@babel/runtime/regenerator'), require('@blerp/wavesurfer'), require('@blerp/wavesurfer/dist/plugin/wavesurfer.cursor.min.js'), require('@mui/icons-material/AddRounded'), require('@mui/icons-material/ArrowDropDownRounded'), require('@mui/icons-material/Favorite'), require('@mui/icons-material/FavoriteBorder'), require('@mui/icons-material/PauseRounded'), require('@mui/icons-material/PlayArrowRounded'), require('@mui/icons-material/WarningRounded'), require('@mui/icons-material/DoNotDisturbRounded'), require('@mui/icons-material/BookmarkAddOutlined'), require('@mui/icons-material/MoreHorizRounded'), require('react-palette'), require('@babel/runtime/helpers/typeof'), require('@mui/icons-material/KeyboardArrowRightRounded'), require('@babel/runtime/helpers/defineProperty'), require('@mui/icons-material/KeyboardArrowDownRounded'), require('@mui/icons-material/CloseRounded'), require('@mui/icons-material/FileUploadRounded'), require('@babel/runtime/helpers/extends'), require('react-avatar-editor'), require('react-dropzone'), require('@mui/icons-material/InsertPhotoRounded'), require('@mui/material/styles'), require('@mui/material/Slide'), require('@mui/material/Fade'), require('react-lottie'), require('@mui/icons-material/Facebook'), require('@mui/icons-material/Instagram'), require('@mui/icons-material/ModeEditRounded'), require('@mui/icons-material/PersonAddRounded'), require('@mui/icons-material/Pinterest'), require('@mui/icons-material/Twitter'), require('@mui/icons-material/YouTube'), require('@mui/icons-material/PersonRemoveRounded'), require('@babel/runtime/helpers/toConsumableArray'), require('@mui/icons-material/FilterAltRounded'), require('@mui/icons-material/MenuRounded'), require('@mui/icons-material/ViewModuleRounded'), require('@mui/icons-material/SettingsRounded'), require('@mui/icons-material/SortRounded'), require('@mui/icons-material/ChevronRightRounded'), require('@mui/icons-material/PersonRounded'), require('@mui/icons-material/SearchRounded'), require('@mui/icons-material/BookmarkRemoveOutlined'), require('@mui/icons-material/VisibilityOffRounded')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@mui/material', '@babel/runtime/helpers/slicedToArray', 'prop-types', 'react', 'react-color-extractor', 'styled-components', '@babel/runtime/helpers/taggedTemplateLiteral', '@mui/icons-material', '@mui/icons-material/BookmarkOutlined', '@mui/icons-material/LockRounded', '@babel/runtime/helpers/asyncToGenerator', '@babel/runtime/regenerator', '@blerp/wavesurfer', '@blerp/wavesurfer/dist/plugin/wavesurfer.cursor.min.js', '@mui/icons-material/AddRounded', '@mui/icons-material/ArrowDropDownRounded', '@mui/icons-material/Favorite', '@mui/icons-material/FavoriteBorder', '@mui/icons-material/PauseRounded', '@mui/icons-material/PlayArrowRounded', '@mui/icons-material/WarningRounded', '@mui/icons-material/DoNotDisturbRounded', '@mui/icons-material/BookmarkAddOutlined', '@mui/icons-material/MoreHorizRounded', 'react-palette', '@babel/runtime/helpers/typeof', '@mui/icons-material/KeyboardArrowRightRounded', '@babel/runtime/helpers/defineProperty', '@mui/icons-material/KeyboardArrowDownRounded', '@mui/icons-material/CloseRounded', '@mui/icons-material/FileUploadRounded', '@babel/runtime/helpers/extends', 'react-avatar-editor', 'react-dropzone', '@mui/icons-material/InsertPhotoRounded', '@mui/material/styles', '@mui/material/Slide', '@mui/material/Fade', 'react-lottie', '@mui/icons-material/Facebook', '@mui/icons-material/Instagram', '@mui/icons-material/ModeEditRounded', '@mui/icons-material/PersonAddRounded', '@mui/icons-material/Pinterest', '@mui/icons-material/Twitter', '@mui/icons-material/YouTube', '@mui/icons-material/PersonRemoveRounded', '@babel/runtime/helpers/toConsumableArray', '@mui/icons-material/FilterAltRounded', '@mui/icons-material/MenuRounded', '@mui/icons-material/ViewModuleRounded', '@mui/icons-material/SettingsRounded', '@mui/icons-material/SortRounded', '@mui/icons-material/ChevronRightRounded', '@mui/icons-material/PersonRounded', '@mui/icons-material/SearchRounded', '@mui/icons-material/BookmarkRemoveOutlined', '@mui/icons-material/VisibilityOffRounded'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['react-awesome-buttons'] = {}, global.material, global._slicedToArray, global.PropTypes, global.React, global.reactColorExtractor, global.styled, global._taggedTemplateLiteral, global.iconsMaterial, global.BookmarkOutlinedIcon, global.LockRoundedIcon, global._asyncToGenerator, global._regeneratorRuntime, null, null, global.AddRoundedIcon, global.ArrowDropDownRoundedIcon, global.FavoriteIcon, global.FavoriteBorderIcon, global.PauseRoundedIcon, global.PlayArrowRoundedIcon, global.WarningRoundedIcon, null, global.BookmarkAddOutlinedIcon, global.MoreHorizRoundedIcon, global.reactPalette, global._typeof, global.KeyboardArrowRightRoundedIcon, global._defineProperty, global.KeyboardArrowDownRoundedIcon, global.CloseRoundedIcon, global.FileUploadRoundedIcon, global._extends, global.AvatarEditor, global.Dropzone, global.InsertPhotoRoundedIcon, global.styles, global.Slide, global.Fade, global.Lottie, global.FacebookIcon, global.InstagramIcon, global.ModeEditRoundedIcon, global.PersonAddRoundedIcon, global.PinterestIcon, global.TwitterIcon, global.YouTubeIcon, global.PersonRemoveRoundedIcon, global._toConsumableArray, null, global.MenuRoundedIcon, global.ViewModuleRoundedIcon, null, global.SortRoundedIcon, global.ChevronRightRoundedIcon, global.PersonRoundedIcon, global.SearchRoundedIcon, global.BookmarkRemoveOutlinedIcon, global.VisibilityOffRoundedIcon));
|
|
5
|
+
}(this, (function (exports, material, _slicedToArray, PropTypes, React, reactColorExtractor, styled, _taggedTemplateLiteral, iconsMaterial, BookmarkOutlinedIcon, LockRoundedIcon, _asyncToGenerator, _regeneratorRuntime, wavesurfer, wavesurfer_cursor_min_js, AddRoundedIcon, ArrowDropDownRoundedIcon, FavoriteIcon, FavoriteBorderIcon, PauseRoundedIcon, PlayArrowRoundedIcon, WarningRoundedIcon, DoNotDisturbRoundedIcon, BookmarkAddOutlinedIcon, MoreHorizRoundedIcon, reactPalette, _typeof, KeyboardArrowRightRoundedIcon, _defineProperty, KeyboardArrowDownRoundedIcon, CloseRoundedIcon, FileUploadRoundedIcon, _extends, AvatarEditor, Dropzone, InsertPhotoRoundedIcon, styles, Slide, Fade, Lottie, FacebookIcon, InstagramIcon, ModeEditRoundedIcon, PersonAddRoundedIcon, PinterestIcon, TwitterIcon, YouTubeIcon, PersonRemoveRoundedIcon, _toConsumableArray, FilterAltRounded, MenuRoundedIcon, ViewModuleRoundedIcon, SettingsRounded, SortRoundedIcon, ChevronRightRoundedIcon, PersonRoundedIcon, SearchRoundedIcon, BookmarkRemoveOutlinedIcon, VisibilityOffRoundedIcon) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
var _taggedTemplateLiteral__default = /*#__PURE__*/_interopDefaultLegacy(_taggedTemplateLiteral);
|
|
35
35
|
var BookmarkOutlinedIcon__default = /*#__PURE__*/_interopDefaultLegacy(BookmarkOutlinedIcon);
|
|
36
36
|
var LockRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(LockRoundedIcon);
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
38
|
+
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
39
39
|
var AddRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(AddRoundedIcon);
|
|
40
40
|
var ArrowDropDownRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(ArrowDropDownRoundedIcon);
|
|
41
41
|
var FavoriteIcon__default = /*#__PURE__*/_interopDefaultLegacy(FavoriteIcon);
|
|
@@ -43,8 +43,6 @@
|
|
|
43
43
|
var PauseRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(PauseRoundedIcon);
|
|
44
44
|
var PlayArrowRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(PlayArrowRoundedIcon);
|
|
45
45
|
var WarningRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(WarningRoundedIcon);
|
|
46
|
-
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
47
|
-
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
48
46
|
var BookmarkAddOutlinedIcon__default = /*#__PURE__*/_interopDefaultLegacy(BookmarkAddOutlinedIcon);
|
|
49
47
|
var MoreHorizRoundedIcon__default = /*#__PURE__*/_interopDefaultLegacy(MoreHorizRoundedIcon);
|
|
50
48
|
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
@@ -1520,7 +1518,10 @@
|
|
|
1520
1518
|
var BlerpAudioContext = /*#__PURE__*/React.createContext({});
|
|
1521
1519
|
var BlerpAudioContextProvider$1 = function BlerpAudioContextProvider(_ref) {
|
|
1522
1520
|
var children = _ref.children;
|
|
1523
|
-
|
|
1521
|
+
|
|
1522
|
+
if (typeof window === "undefined") {
|
|
1523
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, children);
|
|
1524
|
+
}
|
|
1524
1525
|
|
|
1525
1526
|
var _useState = React.useState(null),
|
|
1526
1527
|
_useState2 = _slicedToArray__default['default'](_useState, 2),
|
|
@@ -1568,7 +1569,7 @@
|
|
|
1568
1569
|
var _ref4 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee3(_ref3) {
|
|
1569
1570
|
var _bite$audio, _bite$audio$mp;
|
|
1570
1571
|
|
|
1571
|
-
var bite, _ref3$gain, gain, _ref3$startTime, startTime, _ref3$forcePlay, forcePlay, newGain, gainNode, source;
|
|
1572
|
+
var bite, _ref3$gain, gain, _ref3$startTime, startTime, _ref3$forcePlay, forcePlay, newGain, audioCtx, gainNode, source;
|
|
1572
1573
|
|
|
1573
1574
|
return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context3) {
|
|
1574
1575
|
while (1) {
|
|
@@ -1627,13 +1628,14 @@
|
|
|
1627
1628
|
}
|
|
1628
1629
|
}, _callee2);
|
|
1629
1630
|
}));
|
|
1631
|
+
audioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
|
1630
1632
|
gainNode = audioCtx.createGain(); // gainNode.gain.value = 2 // value between 0 and 2 https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API
|
|
1631
1633
|
|
|
1632
1634
|
gainNode.gain.setValueAtTime(newGain, 0);
|
|
1633
1635
|
source = audioCtx.createMediaElementSource(audioRef.current);
|
|
1634
1636
|
source.connect(gainNode);
|
|
1635
1637
|
gainNode.connect(audioCtx.destination);
|
|
1636
|
-
_context3.next =
|
|
1638
|
+
_context3.next = 25;
|
|
1637
1639
|
return audioRef.current.play().then(function () {
|
|
1638
1640
|
console.log("playing", bite === null || bite === void 0 ? void 0 : bite.title);
|
|
1639
1641
|
setPlayState("playing");
|
|
@@ -1641,7 +1643,7 @@
|
|
|
1641
1643
|
setPlayState("stopped");
|
|
1642
1644
|
});
|
|
1643
1645
|
|
|
1644
|
-
case
|
|
1646
|
+
case 25:
|
|
1645
1647
|
// const playPromise = audioRef.current.play();
|
|
1646
1648
|
// if (playPromise !== undefined) {
|
|
1647
1649
|
// playPromise
|
|
@@ -1658,7 +1660,7 @@
|
|
|
1658
1660
|
// }
|
|
1659
1661
|
_setSelectedBlerp(bite);
|
|
1660
1662
|
|
|
1661
|
-
case
|
|
1663
|
+
case 26:
|
|
1662
1664
|
case "end":
|
|
1663
1665
|
return _context3.stop();
|
|
1664
1666
|
}
|
|
@@ -1717,8 +1719,7 @@
|
|
|
1717
1719
|
return playState;
|
|
1718
1720
|
}
|
|
1719
1721
|
},
|
|
1720
|
-
setStartTime: setStartTime
|
|
1721
|
-
audioContext: audioCtx
|
|
1722
|
+
setStartTime: setStartTime
|
|
1722
1723
|
}
|
|
1723
1724
|
}, children);
|
|
1724
1725
|
};
|
|
@@ -1773,7 +1774,7 @@
|
|
|
1773
1774
|
setAnchor = _useState2[1];
|
|
1774
1775
|
|
|
1775
1776
|
var open = Boolean(anchor);
|
|
1776
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(
|
|
1777
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
1777
1778
|
color: "whiteOverride",
|
|
1778
1779
|
variant: "outlined",
|
|
1779
1780
|
onClick: function onClick(e) {
|
|
@@ -1793,7 +1794,7 @@
|
|
|
1793
1794
|
}
|
|
1794
1795
|
},
|
|
1795
1796
|
endIcon: /*#__PURE__*/React__default['default'].createElement(ArrowDropDownRoundedIcon__default['default'], null)
|
|
1796
|
-
}, "Place"), /*#__PURE__*/React__default['default'].createElement(
|
|
1797
|
+
}, "Place"), /*#__PURE__*/React__default['default'].createElement(Popover, {
|
|
1797
1798
|
open: open,
|
|
1798
1799
|
anchorEl: anchor,
|
|
1799
1800
|
anchorOrigin: {
|
|
@@ -1818,13 +1819,13 @@
|
|
|
1818
1819
|
overflowY: "hidden"
|
|
1819
1820
|
}
|
|
1820
1821
|
}
|
|
1821
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
1822
|
+
}, /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1822
1823
|
sx: {
|
|
1823
1824
|
maxHeight: "120px",
|
|
1824
1825
|
overflowY: "scroll"
|
|
1825
1826
|
}
|
|
1826
1827
|
}, options === null || options === void 0 ? void 0 : options.map(function (option) {
|
|
1827
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
1828
|
+
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1828
1829
|
direction: "row",
|
|
1829
1830
|
sx: {
|
|
1830
1831
|
boxSizing: "border-box",
|
|
@@ -1851,7 +1852,7 @@
|
|
|
1851
1852
|
if (onOptionClicked) onOptionClicked(option);
|
|
1852
1853
|
setAnchor(null);
|
|
1853
1854
|
}
|
|
1854
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
1855
|
+
}, /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
1855
1856
|
sx: {
|
|
1856
1857
|
fontSize: "14px",
|
|
1857
1858
|
fontWeight: "400"
|
|
@@ -1888,7 +1889,7 @@
|
|
|
1888
1889
|
setActive(false);
|
|
1889
1890
|
}
|
|
1890
1891
|
}, [hovering]);
|
|
1891
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
1892
|
+
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1892
1893
|
direction: "row",
|
|
1893
1894
|
width: "100%",
|
|
1894
1895
|
sx: {
|
|
@@ -1907,7 +1908,7 @@
|
|
|
1907
1908
|
style: {
|
|
1908
1909
|
width: "100%"
|
|
1909
1910
|
}
|
|
1910
|
-
}), /*#__PURE__*/React__default['default'].createElement(
|
|
1911
|
+
}), /*#__PURE__*/React__default['default'].createElement(IconButton, {
|
|
1911
1912
|
sx: {
|
|
1912
1913
|
width: "30px",
|
|
1913
1914
|
height: "30px",
|
|
@@ -1933,7 +1934,7 @@
|
|
|
1933
1934
|
var saved = _ref3.saved,
|
|
1934
1935
|
count = _ref3.count;
|
|
1935
1936
|
_ref3.onClick;
|
|
1936
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
1937
|
+
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1937
1938
|
direction: "row",
|
|
1938
1939
|
alignItems: "center"
|
|
1939
1940
|
}, saved ? /*#__PURE__*/React__default['default'].createElement(FavoriteIcon__default['default'], {
|
|
@@ -1956,7 +1957,7 @@
|
|
|
1956
1957
|
opacity: 0.5
|
|
1957
1958
|
}
|
|
1958
1959
|
}
|
|
1959
|
-
}), /*#__PURE__*/React__default['default'].createElement(
|
|
1960
|
+
}), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
1960
1961
|
sx: {
|
|
1961
1962
|
fontSize: "12px",
|
|
1962
1963
|
fontWeight: "400"
|
|
@@ -1966,21 +1967,21 @@
|
|
|
1966
1967
|
|
|
1967
1968
|
var AddedToIcons = function AddedToIcons(_ref4) {
|
|
1968
1969
|
var hovering = _ref4.hovering;
|
|
1969
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
1970
|
+
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1970
1971
|
direction: "row",
|
|
1971
1972
|
sx: {
|
|
1972
1973
|
transition: "0.3s",
|
|
1973
1974
|
opacity: hovering ? "1" : "0"
|
|
1974
1975
|
}
|
|
1975
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
1976
|
+
}, /*#__PURE__*/React__default['default'].createElement(ChannelPointsIcon, {
|
|
1976
1977
|
sx: {
|
|
1977
1978
|
fontSize: "15px"
|
|
1978
1979
|
}
|
|
1979
|
-
}), /*#__PURE__*/React__default['default'].createElement(
|
|
1980
|
+
}), /*#__PURE__*/React__default['default'].createElement(TwitchBitIcon, {
|
|
1980
1981
|
sx: {
|
|
1981
1982
|
fontSize: "15px"
|
|
1982
1983
|
}
|
|
1983
|
-
}), /*#__PURE__*/React__default['default'].createElement(
|
|
1984
|
+
}), /*#__PURE__*/React__default['default'].createElement(WalkonIcon, {
|
|
1984
1985
|
sx: {
|
|
1985
1986
|
fontSize: "15px"
|
|
1986
1987
|
}
|
|
@@ -2004,9 +2005,9 @@
|
|
|
2004
2005
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
2005
2006
|
|
|
2006
2007
|
case "NC17":
|
|
2007
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
2008
|
+
return /*#__PURE__*/React__default['default'].createElement(Tooltip, {
|
|
2008
2009
|
title: "Not Safe For Work"
|
|
2009
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
2010
|
+
}, /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
2010
2011
|
sx: {
|
|
2011
2012
|
fontSize: "9px",
|
|
2012
2013
|
fontWeight: "600",
|
|
@@ -2021,9 +2022,9 @@
|
|
|
2021
2022
|
}, "NSFW"));
|
|
2022
2023
|
|
|
2023
2024
|
case "UR":
|
|
2024
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
2025
|
+
return /*#__PURE__*/React__default['default'].createElement(Tooltip, {
|
|
2025
2026
|
title: "Hasn't Been Reviewed"
|
|
2026
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
2027
|
+
}, /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
2027
2028
|
sx: {
|
|
2028
2029
|
fontSize: "9px",
|
|
2029
2030
|
fontWeight: "600",
|
|
@@ -2066,57 +2067,98 @@
|
|
|
2066
2067
|
setWavesurfer = _useState8[1];
|
|
2067
2068
|
|
|
2068
2069
|
React.useEffect(function () {
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2070
|
+
var create = /*#__PURE__*/function () {
|
|
2071
|
+
var _ref7 = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee() {
|
|
2072
|
+
var _WaveSurfer, _CursorPlugin, mWavesurfer;
|
|
2073
|
+
|
|
2074
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
|
2075
|
+
while (1) {
|
|
2076
|
+
switch (_context.prev = _context.next) {
|
|
2077
|
+
case 0:
|
|
2078
|
+
console.log("creating", hovering, wavesurfer, hasRendered);
|
|
2079
|
+
|
|
2080
|
+
if (!(hovering && wavesurfer)) {
|
|
2081
|
+
_context.next = 5;
|
|
2082
|
+
break;
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
wavesurfer.load(audio);
|
|
2086
|
+
_context.next = 17;
|
|
2087
|
+
break;
|
|
2088
|
+
|
|
2089
|
+
case 5:
|
|
2090
|
+
if (!(hovering && !wavesurfer && !hasRendered && document.querySelector("#blerp-waveform-".concat(id)) && document.querySelector("#blerp-waveform-".concat(id)).children.length === 0)) {
|
|
2091
|
+
_context.next = 17;
|
|
2092
|
+
break;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
_context.next = 8;
|
|
2096
|
+
return import('@blerp/wavesurfer');
|
|
2097
|
+
|
|
2098
|
+
case 8:
|
|
2099
|
+
_WaveSurfer = _context.sent.default;
|
|
2100
|
+
_context.next = 11;
|
|
2101
|
+
return import('@blerp/wavesurfer/src/plugin/cursor');
|
|
2102
|
+
|
|
2103
|
+
case 11:
|
|
2104
|
+
_CursorPlugin = _context.sent.default;
|
|
2105
|
+
mWavesurfer = _WaveSurfer.create({
|
|
2106
|
+
container: document.querySelector("#blerp-waveform-".concat(id)),
|
|
2107
|
+
barWidth: 2,
|
|
2108
|
+
barHeight: 1.5,
|
|
2109
|
+
// the height of the wave
|
|
2110
|
+
barGap: 2,
|
|
2111
|
+
// the optional spacing between bars of the wave, if not provided will be calculated in legacy format
|
|
2112
|
+
progressColor: "#ffffff",
|
|
2113
|
+
hoverColor: "#ffffff99",
|
|
2114
|
+
barRadius: 2,
|
|
2115
|
+
height: 30,
|
|
2116
|
+
hideScrollBar: true,
|
|
2117
|
+
plugins: [_CursorPlugin.create({
|
|
2118
|
+
showTime: false,
|
|
2119
|
+
opacity: 0,
|
|
2120
|
+
customShowTimeStyle: {
|
|
2121
|
+
"background-color": "#000",
|
|
2122
|
+
color: "#fff",
|
|
2123
|
+
padding: "2px",
|
|
2124
|
+
"font-size": "10px"
|
|
2125
|
+
}
|
|
2126
|
+
})]
|
|
2127
|
+
});
|
|
2128
|
+
mWavesurfer.on("error", function (e) {
|
|
2129
|
+
console.warn(e);
|
|
2130
|
+
});
|
|
2131
|
+
mWavesurfer === null || mWavesurfer === void 0 ? void 0 : mWavesurfer.on("seek", function (prog) {
|
|
2132
|
+
if (prog) {
|
|
2133
|
+
console.log("SEEEEEEK", prog, bite);
|
|
2134
|
+
mWavesurfer === null || mWavesurfer === void 0 ? void 0 : mWavesurfer.setMute(true);
|
|
2135
|
+
mWavesurfer === null || mWavesurfer === void 0 ? void 0 : mWavesurfer.play();
|
|
2136
|
+
play({
|
|
2137
|
+
bite: bite,
|
|
2138
|
+
startTime: mWavesurfer === null || mWavesurfer === void 0 ? void 0 : mWavesurfer.getCurrentTime(),
|
|
2139
|
+
forcePlay: true
|
|
2140
|
+
});
|
|
2141
|
+
}
|
|
2142
|
+
}); // Load audio from URL
|
|
2143
|
+
// mWavesurfer.load(audio);
|
|
2144
|
+
|
|
2145
|
+
setWavesurfer(mWavesurfer);
|
|
2146
|
+
setHasRendered(true);
|
|
2147
|
+
|
|
2148
|
+
case 17:
|
|
2149
|
+
case "end":
|
|
2150
|
+
return _context.stop();
|
|
2111
2151
|
}
|
|
2112
|
-
}
|
|
2113
|
-
|
|
2152
|
+
}
|
|
2153
|
+
}, _callee);
|
|
2154
|
+
}));
|
|
2114
2155
|
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2156
|
+
return function create() {
|
|
2157
|
+
return _ref7.apply(this, arguments);
|
|
2158
|
+
};
|
|
2159
|
+
}();
|
|
2160
|
+
|
|
2161
|
+
create();
|
|
2120
2162
|
}, [wavesurfer, bite, play, audio, hovering, hasRendered, id]);
|
|
2121
2163
|
React.useEffect(function () {
|
|
2122
2164
|
// if (wavesurfer && selectedBlerp?._id === bite?._id) {
|
|
@@ -2170,11 +2212,11 @@
|
|
|
2170
2212
|
});
|
|
2171
2213
|
};
|
|
2172
2214
|
|
|
2173
|
-
var ReportedWarning = function ReportedWarning(
|
|
2174
|
-
var showWarning =
|
|
2175
|
-
saved =
|
|
2176
|
-
count =
|
|
2177
|
-
onClick =
|
|
2215
|
+
var ReportedWarning = function ReportedWarning(_ref9) {
|
|
2216
|
+
var showWarning = _ref9.showWarning,
|
|
2217
|
+
saved = _ref9.saved,
|
|
2218
|
+
count = _ref9.count,
|
|
2219
|
+
onClick = _ref9.onClick;
|
|
2178
2220
|
|
|
2179
2221
|
var _useState9 = React.useState(showWarning),
|
|
2180
2222
|
_useState10 = _slicedToArray__default['default'](_useState9, 2),
|
|
@@ -2192,21 +2234,21 @@
|
|
|
2192
2234
|
sx: {
|
|
2193
2235
|
marginBottom: "20px"
|
|
2194
2236
|
}
|
|
2195
|
-
}), /*#__PURE__*/React__default['default'].createElement(
|
|
2237
|
+
}), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
2196
2238
|
sx: {
|
|
2197
2239
|
fontSize: "18px",
|
|
2198
2240
|
fontWeight: "600",
|
|
2199
2241
|
color: "white.override",
|
|
2200
2242
|
marginBottom: "10px"
|
|
2201
2243
|
}
|
|
2202
|
-
}, "Hold Up"), /*#__PURE__*/React__default['default'].createElement(
|
|
2244
|
+
}, "Hold Up"), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
2203
2245
|
sx: {
|
|
2204
2246
|
fontSize: "14px",
|
|
2205
2247
|
fontWeight: "400",
|
|
2206
2248
|
color: "white.override",
|
|
2207
2249
|
textAlign: "center"
|
|
2208
2250
|
}
|
|
2209
|
-
}, "This Has Been ", /*#__PURE__*/React__default['default'].createElement("br", null), " Reported ", " Times"), hovering && /*#__PURE__*/React__default['default'].createElement(
|
|
2251
|
+
}, "This Has Been ", /*#__PURE__*/React__default['default'].createElement("br", null), " Reported ", " Times"), hovering && /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
2210
2252
|
color: "whiteOverride",
|
|
2211
2253
|
variant: "outlined",
|
|
2212
2254
|
sx: {
|
|
@@ -2218,7 +2260,7 @@
|
|
|
2218
2260
|
}, "View"));
|
|
2219
2261
|
};
|
|
2220
2262
|
|
|
2221
|
-
return /*#__PURE__*/React__default['default'].createElement(
|
|
2263
|
+
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
2222
2264
|
sx: {
|
|
2223
2265
|
position: "absolute",
|
|
2224
2266
|
top: "0",
|
|
@@ -2242,7 +2284,7 @@
|
|
|
2242
2284
|
onMouseLeave: function onMouseLeave() {
|
|
2243
2285
|
setHovering(false);
|
|
2244
2286
|
}
|
|
2245
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
2287
|
+
}, /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
2246
2288
|
sx: {
|
|
2247
2289
|
position: "absolute",
|
|
2248
2290
|
top: "20px",
|
|
@@ -2255,11 +2297,11 @@
|
|
|
2255
2297
|
})), renderInfo());
|
|
2256
2298
|
};
|
|
2257
2299
|
|
|
2258
|
-
var NewBlerp$1 = function NewBlerp(
|
|
2300
|
+
var NewBlerp$1 = function NewBlerp(_ref10) {
|
|
2259
2301
|
var _bite$image, _bite$image$original, _bite$ownerObject;
|
|
2260
2302
|
|
|
2261
|
-
var bite =
|
|
2262
|
-
|
|
2303
|
+
var bite = _ref10.bite;
|
|
2304
|
+
_ref10.playState;
|
|
2263
2305
|
|
|
2264
2306
|
var _useContext2 = React.useContext(BlerpAudioContext),
|
|
2265
2307
|
play = _useContext2.play,
|
|
@@ -2373,7 +2415,7 @@
|
|
|
2373
2415
|
onClick: function onClick() {
|
|
2374
2416
|
return console.log("clicked save");
|
|
2375
2417
|
}
|
|
2376
|
-
}), /*#__PURE__*/React__default['default'].createElement(Container$1, null, /*#__PURE__*/React__default['default'].createElement(
|
|
2418
|
+
}), /*#__PURE__*/React__default['default'].createElement(Container$1, null, /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
2377
2419
|
id: "blerp-audio-button-".concat(bite === null || bite === void 0 ? void 0 : bite._id),
|
|
2378
2420
|
sx: {
|
|
2379
2421
|
backgroundImage: "url(".concat(bite === null || bite === void 0 ? void 0 : (_bite$image = bite.image) === null || _bite$image === void 0 ? void 0 : (_bite$image$original = _bite$image.original) === null || _bite$image$original === void 0 ? void 0 : _bite$image$original.url, ")"),
|
|
@@ -2397,7 +2439,7 @@
|
|
|
2397
2439
|
onMouseLeave: function onMouseLeave() {
|
|
2398
2440
|
setHovering(false);
|
|
2399
2441
|
}
|
|
2400
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
2442
|
+
}, /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
2401
2443
|
className: "blerp-hover",
|
|
2402
2444
|
onClick: function onClick() {
|
|
2403
2445
|
console.log("play cliceckkes");
|
|
@@ -2418,14 +2460,14 @@
|
|
|
2418
2460
|
alignItems: "center",
|
|
2419
2461
|
justifyContent: "center"
|
|
2420
2462
|
}
|
|
2421
|
-
}), /*#__PURE__*/React__default['default'].createElement(
|
|
2463
|
+
}), /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
2422
2464
|
direction: "row",
|
|
2423
2465
|
justifyContent: "space-between",
|
|
2424
2466
|
width: "100%",
|
|
2425
2467
|
sx: {
|
|
2426
2468
|
position: "relative"
|
|
2427
2469
|
}
|
|
2428
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
2470
|
+
}, /*#__PURE__*/React__default['default'].createElement(Stack, null, /*#__PURE__*/React__default['default'].createElement(RatingInfo, {
|
|
2429
2471
|
rating: bite === null || bite === void 0 ? void 0 : bite.strictAudienceRating
|
|
2430
2472
|
}), /*#__PURE__*/React__default['default'].createElement(AddedToIcons, {
|
|
2431
2473
|
hovering: hovering
|
|
@@ -2434,7 +2476,7 @@
|
|
|
2434
2476
|
onClick: function onClick(option) {
|
|
2435
2477
|
return handleAddToPlace();
|
|
2436
2478
|
}
|
|
2437
|
-
}), /*#__PURE__*/React__default['default'].createElement(
|
|
2479
|
+
}), /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
2438
2480
|
sx: {
|
|
2439
2481
|
transition: "0.3s",
|
|
2440
2482
|
opacity: hovering ? "1" : "0",
|
|
@@ -2444,7 +2486,7 @@
|
|
|
2444
2486
|
}, renderPlayStateIcon()), /*#__PURE__*/React__default['default'].createElement(BlerpWaveform, {
|
|
2445
2487
|
bite: bite,
|
|
2446
2488
|
hovering: hovering
|
|
2447
|
-
})), /*#__PURE__*/React__default['default'].createElement(
|
|
2489
|
+
})), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
2448
2490
|
sx: {
|
|
2449
2491
|
fontSize: "16px",
|
|
2450
2492
|
fontWeight: "400",
|
|
@@ -2458,7 +2500,7 @@
|
|
|
2458
2500
|
height: "23px",
|
|
2459
2501
|
margin: "10px 0 5px 0"
|
|
2460
2502
|
}
|
|
2461
|
-
}, bite === null || bite === void 0 ? void 0 : bite.title), /*#__PURE__*/React__default['default'].createElement(
|
|
2503
|
+
}, bite === null || bite === void 0 ? void 0 : bite.title), /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
2462
2504
|
direction: "row",
|
|
2463
2505
|
alignItems: "center",
|
|
2464
2506
|
sx: {
|
|
@@ -2521,7 +2563,7 @@
|
|
|
2521
2563
|
})))), /*#__PURE__*/React__default['default'].createElement(FavoriteIconWithCounter, {
|
|
2522
2564
|
saved: bite === null || bite === void 0 ? void 0 : bite.saved,
|
|
2523
2565
|
count: saveCount
|
|
2524
|
-
}), /*#__PURE__*/React__default['default'].createElement(
|
|
2566
|
+
}), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
2525
2567
|
sx: {
|
|
2526
2568
|
fontWeight: "300",
|
|
2527
2569
|
fontSize: "12px",
|
|
@@ -2531,7 +2573,7 @@
|
|
|
2531
2573
|
overflow: "hidden",
|
|
2532
2574
|
margin: "0 10px"
|
|
2533
2575
|
}
|
|
2534
|
-
}, bite === null || bite === void 0 ? void 0 : (_bite$ownerObject = bite.ownerObject) === null || _bite$ownerObject === void 0 ? void 0 : _bite$ownerObject.username), /*#__PURE__*/React__default['default'].createElement(
|
|
2576
|
+
}, bite === null || bite === void 0 ? void 0 : (_bite$ownerObject = bite.ownerObject) === null || _bite$ownerObject === void 0 ? void 0 : _bite$ownerObject.username), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
2535
2577
|
sx: {
|
|
2536
2578
|
fontWeight: "300",
|
|
2537
2579
|
fontSize: "12px",
|