@blerp/design 1.2.17 → 1.2.19
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 +301 -139
- package/dist/index.esm.js +301 -140
- package/dist/index.umd.js +304 -142
- 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('@mui/icons-material/AddRounded'), require('@mui/icons-material/ArrowDropDownRounded'), require('@mui/icons-material/
|
|
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', '@mui/icons-material/AddRounded', '@mui/icons-material/ArrowDropDownRounded', '@mui/icons-material/
|
|
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.AddRoundedIcon, global.ArrowDropDownRoundedIcon, global.FavoriteIcon, global.FavoriteBorderIcon, global.PauseRoundedIcon, global.PlayArrowRoundedIcon, global.WarningRoundedIcon,
|
|
5
|
-
}(this, (function (exports, material, _slicedToArray, PropTypes, React, reactColorExtractor, styled, _taggedTemplateLiteral, iconsMaterial, BookmarkOutlinedIcon, LockRoundedIcon, AddRoundedIcon, ArrowDropDownRoundedIcon, FavoriteIcon, FavoriteBorderIcon, PauseRoundedIcon, PlayArrowRoundedIcon, WarningRoundedIcon,
|
|
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('@mui/icons-material/AddRounded'), require('@mui/icons-material/ArrowDropDownRounded'), require('@mui/icons-material/DoNotDisturbRounded'), 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('@babel/runtime/helpers/asyncToGenerator'), require('@babel/runtime/regenerator'), 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', '@mui/icons-material/AddRounded', '@mui/icons-material/ArrowDropDownRounded', '@mui/icons-material/DoNotDisturbRounded', '@mui/icons-material/Favorite', '@mui/icons-material/FavoriteBorder', '@mui/icons-material/PauseRounded', '@mui/icons-material/PlayArrowRounded', '@mui/icons-material/WarningRounded', '@babel/runtime/helpers/asyncToGenerator', '@babel/runtime/regenerator', '@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.AddRoundedIcon, global.ArrowDropDownRoundedIcon, null, global.FavoriteIcon, global.FavoriteBorderIcon, global.PauseRoundedIcon, global.PlayArrowRoundedIcon, global.WarningRoundedIcon, global._asyncToGenerator, global._regeneratorRuntime, 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, AddRoundedIcon, ArrowDropDownRoundedIcon, DoNotDisturbRoundedIcon, FavoriteIcon, FavoriteBorderIcon, PauseRoundedIcon, PlayArrowRoundedIcon, WarningRoundedIcon, _asyncToGenerator, _regeneratorRuntime, 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
|
|
|
@@ -1002,7 +1002,7 @@
|
|
|
1002
1002
|
})))));
|
|
1003
1003
|
};
|
|
1004
1004
|
|
|
1005
|
-
var BlerpTopRow = function BlerpTopRow(_ref) {
|
|
1005
|
+
var BlerpTopRow$1 = function BlerpTopRow(_ref) {
|
|
1006
1006
|
var _bite$topReactions, _bite$topReactions2, _bite$topReactions3;
|
|
1007
1007
|
|
|
1008
1008
|
var secondaryActionButton = _ref.secondaryActionButton,
|
|
@@ -1446,7 +1446,7 @@
|
|
|
1446
1446
|
getColors: function getColors(colors) {
|
|
1447
1447
|
return setProfileColors(colors);
|
|
1448
1448
|
}
|
|
1449
|
-
}), /*#__PURE__*/React__default['default'].createElement(BlerpTopRow, {
|
|
1449
|
+
}), /*#__PURE__*/React__default['default'].createElement(BlerpTopRow$1, {
|
|
1450
1450
|
bite: bite,
|
|
1451
1451
|
isOwner: isOwner,
|
|
1452
1452
|
sizeParams: sizeParams,
|
|
@@ -1521,14 +1521,15 @@
|
|
|
1521
1521
|
var user = _ref.user,
|
|
1522
1522
|
onUsernameClick = _ref.onUsernameClick,
|
|
1523
1523
|
onFollowerClick = _ref.onFollowerClick,
|
|
1524
|
-
onCreatedClick = _ref.onCreatedClick
|
|
1524
|
+
onCreatedClick = _ref.onCreatedClick,
|
|
1525
|
+
collapsed = _ref.collapsed;
|
|
1525
1526
|
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1526
1527
|
direction: "row",
|
|
1527
1528
|
sx: {
|
|
1528
|
-
backgroundColor: "
|
|
1529
|
+
backgroundColor: "grey4.main",
|
|
1529
1530
|
minWidth: "280px",
|
|
1530
1531
|
maxWidth: "320px",
|
|
1531
|
-
height: "121px",
|
|
1532
|
+
height: collapsed ? "69px" : "121px",
|
|
1532
1533
|
borderRadius: "12px",
|
|
1533
1534
|
alignItems: "center",
|
|
1534
1535
|
padding: "16px",
|
|
@@ -1541,12 +1542,12 @@
|
|
|
1541
1542
|
}
|
|
1542
1543
|
}, /*#__PURE__*/React__default['default'].createElement("img", {
|
|
1543
1544
|
style: {
|
|
1544
|
-
width: "89px",
|
|
1545
|
-
height: "89px",
|
|
1545
|
+
width: collapsed ? "49px" : "89px",
|
|
1546
|
+
height: collapsed ? "49px" : "89px",
|
|
1546
1547
|
borderRadius: "50%",
|
|
1547
1548
|
border: "2px solid transparent",
|
|
1548
1549
|
borderColor: (user === null || user === void 0 ? void 0 : (_user$twitchChannelIn = user.twitchChannelInfo) === null || _user$twitchChannelIn === void 0 ? void 0 : _user$twitchChannelIn.twitchJourneyStatus) === "CHAMPION" ? "#FFFFFF" : (user === null || user === void 0 ? void 0 : (_user$twitchChannelIn2 = user.twitchChannelInfo) === null || _user$twitchChannelIn2 === void 0 ? void 0 : _user$twitchChannelIn2.twitchJourneyStatus) === "AFFILIATE" ? "#27AAFF" : "transparent",
|
|
1549
|
-
padding: "6px",
|
|
1550
|
+
padding: collapsed ? "3px" : "6px",
|
|
1550
1551
|
boxSizing: "border-box"
|
|
1551
1552
|
},
|
|
1552
1553
|
src: user === null || user === void 0 ? void 0 : user.profileUrl,
|
|
@@ -1554,8 +1555,8 @@
|
|
|
1554
1555
|
}), (user === null || user === void 0 ? void 0 : user.verified) && /*#__PURE__*/React__default['default'].createElement(iconsMaterial.VerifiedRounded, {
|
|
1555
1556
|
sx: {
|
|
1556
1557
|
position: "absolute",
|
|
1557
|
-
bottom: "5px",
|
|
1558
|
-
right: "5px",
|
|
1558
|
+
bottom: collapsed ? "0" : "5px",
|
|
1559
|
+
right: collapsed ? "0" : "5px",
|
|
1559
1560
|
fontSize: "17px"
|
|
1560
1561
|
}
|
|
1561
1562
|
})), /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
@@ -1570,7 +1571,7 @@
|
|
|
1570
1571
|
maxWidth: "150px",
|
|
1571
1572
|
whiteSpace: "nowrap",
|
|
1572
1573
|
textOverflow: "ellipsis",
|
|
1573
|
-
marginBottom: "10px",
|
|
1574
|
+
marginBottom: !collapsed && "10px",
|
|
1574
1575
|
overflow: "hidden",
|
|
1575
1576
|
cursor: "pointer",
|
|
1576
1577
|
transition: "0.3s",
|
|
@@ -1579,7 +1580,7 @@
|
|
|
1579
1580
|
}
|
|
1580
1581
|
},
|
|
1581
1582
|
onClick: onUsernameClick
|
|
1582
|
-
}, user === null || user === void 0 ? void 0 : user.username), /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1583
|
+
}, user === null || user === void 0 ? void 0 : user.username), !collapsed && /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1583
1584
|
direction: "row",
|
|
1584
1585
|
sx: {
|
|
1585
1586
|
alignItems: "center",
|
|
@@ -1634,6 +1635,84 @@
|
|
|
1634
1635
|
}, "created")))));
|
|
1635
1636
|
};
|
|
1636
1637
|
|
|
1638
|
+
var UsernameWithPopout$1 = function UsernameWithPopout(_ref) {
|
|
1639
|
+
var user = _ref.user,
|
|
1640
|
+
onUsernameClick = _ref.onUsernameClick,
|
|
1641
|
+
onFollowerClick = _ref.onFollowerClick,
|
|
1642
|
+
onCreatedClick = _ref.onCreatedClick;
|
|
1643
|
+
|
|
1644
|
+
var _useState = React.useState(null),
|
|
1645
|
+
_useState2 = _slicedToArray__default['default'](_useState, 2),
|
|
1646
|
+
userCardRef = _useState2[0],
|
|
1647
|
+
setUserCardRef = _useState2[1];
|
|
1648
|
+
|
|
1649
|
+
var openUserCard = Boolean(userCardRef);
|
|
1650
|
+
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1651
|
+
direction: "row",
|
|
1652
|
+
onClick: function onClick(e) {
|
|
1653
|
+
setUserCardRef(e.target);
|
|
1654
|
+
},
|
|
1655
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
1656
|
+
// setTimeout(() => {
|
|
1657
|
+
// }, [500]);
|
|
1658
|
+
setUserCardRef(e.target);
|
|
1659
|
+
},
|
|
1660
|
+
onMouseLeave: function onMouseLeave(e) {
|
|
1661
|
+
setUserCardRef(null);
|
|
1662
|
+
}
|
|
1663
|
+
}, /*#__PURE__*/React__default['default'].createElement(Popover, {
|
|
1664
|
+
open: openUserCard,
|
|
1665
|
+
anchorEl: userCardRef,
|
|
1666
|
+
anchorOrigin: {
|
|
1667
|
+
vertical: "bottom",
|
|
1668
|
+
horizontal: "left"
|
|
1669
|
+
},
|
|
1670
|
+
transformOrigin: {
|
|
1671
|
+
vertical: "top",
|
|
1672
|
+
horizontal: "left"
|
|
1673
|
+
},
|
|
1674
|
+
disablePortal: true,
|
|
1675
|
+
hideBackdrop: true,
|
|
1676
|
+
sx: {
|
|
1677
|
+
pointerEvents: "none"
|
|
1678
|
+
},
|
|
1679
|
+
PaperProps: {
|
|
1680
|
+
// onMouseEnter: (e) => {
|
|
1681
|
+
// setUserCardRef(e.target);
|
|
1682
|
+
// },
|
|
1683
|
+
sx: {
|
|
1684
|
+
pointerEvents: "auto",
|
|
1685
|
+
backgroundColor: "transparent",
|
|
1686
|
+
borderRadius: "12px"
|
|
1687
|
+
},
|
|
1688
|
+
onMouseLeave: function onMouseLeave(e) {
|
|
1689
|
+
setUserCardRef(null);
|
|
1690
|
+
}
|
|
1691
|
+
} // onClose={() => setUserCardRef(null)}
|
|
1692
|
+
|
|
1693
|
+
}, /*#__PURE__*/React__default['default'].createElement(UserCard$1, {
|
|
1694
|
+
onUsernameClick: onUsernameClick,
|
|
1695
|
+
onFollowerClick: onFollowerClick,
|
|
1696
|
+
onCreatedClick: onCreatedClick,
|
|
1697
|
+
collapsed: true,
|
|
1698
|
+
user: user
|
|
1699
|
+
})), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
1700
|
+
sx: {
|
|
1701
|
+
fontWeight: "300",
|
|
1702
|
+
fontSize: "12px",
|
|
1703
|
+
color: "grey7.main",
|
|
1704
|
+
maxWidth: "95px",
|
|
1705
|
+
whiteSpace: "nowrap",
|
|
1706
|
+
overflow: "hidden",
|
|
1707
|
+
margin: "0 10px",
|
|
1708
|
+
cursor: "pointer",
|
|
1709
|
+
"&:hover": {
|
|
1710
|
+
textDecoration: "underline"
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
}, user === null || user === void 0 ? void 0 : user.username));
|
|
1714
|
+
};
|
|
1715
|
+
|
|
1637
1716
|
var _templateObject$g, _templateObject2$a;
|
|
1638
1717
|
var PremiumContainer = styled__default['default'].div(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral__default['default'](["\n background: transparent;\n overflow: hidden;\n min-width: 210px;\n max-width: 260px;\n width: 100%;\n max-height: 322px;\n flex: 1;\n min-height: 272px;\n aspect-ratio: 260 / 322;\n gap: 10px;\n border-radius: 18px;\n box-sizing: border-box;\n padding: 2px;\n position: relative;\n transition: 0.3s;\n"])));
|
|
1639
1718
|
var Container$1 = styled__default['default'].div(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteral__default['default'](["\n background-color: ", ";\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n position: relative;\n height: 100%;\n padding: 10px;\n border-radius: 17px;\n box-sizing: border-box;\n"])), function (props) {
|
|
@@ -1695,10 +1774,11 @@
|
|
|
1695
1774
|
height: "30px",
|
|
1696
1775
|
transition: "0.3s",
|
|
1697
1776
|
cursor: active ? "pointer" : "default",
|
|
1698
|
-
opacity: active ? "1" : "0",
|
|
1699
1777
|
justifyContent: "space-between",
|
|
1700
1778
|
marginRight: "10px",
|
|
1701
1779
|
backgroundColor: "#2C323380",
|
|
1780
|
+
opacity: active ? "1" : "0",
|
|
1781
|
+
whiteSpace: "nowrap",
|
|
1702
1782
|
"&:hover": {
|
|
1703
1783
|
backgroundColor: "grey3.main"
|
|
1704
1784
|
}
|
|
@@ -1790,40 +1870,28 @@
|
|
|
1790
1870
|
|
|
1791
1871
|
var AddContentButton = function AddContentButton(_ref2) {
|
|
1792
1872
|
var item = _ref2.item,
|
|
1793
|
-
hovering = _ref2.hovering
|
|
1873
|
+
hovering = _ref2.hovering,
|
|
1874
|
+
hoveringAddTo = _ref2.hoveringAddTo,
|
|
1875
|
+
setHoveringAddTo = _ref2.setHoveringAddTo;
|
|
1794
1876
|
_ref2.openPremiumModal;
|
|
1795
|
-
var onOptionClicked = _ref2.onOptionClicked
|
|
1796
|
-
|
|
1797
|
-
var
|
|
1798
|
-
_useState4 = _slicedToArray__default['default'](_useState3, 2),
|
|
1799
|
-
active = _useState4[0],
|
|
1800
|
-
setActive = _useState4[1];
|
|
1801
|
-
|
|
1802
|
-
React.useEffect(function () {
|
|
1803
|
-
if (hovering === false) {
|
|
1804
|
-
setActive(false);
|
|
1805
|
-
}
|
|
1806
|
-
}, [hovering]);
|
|
1877
|
+
var onOptionClicked = _ref2.onOptionClicked,
|
|
1878
|
+
onPlusClick = _ref2.onPlusClick;
|
|
1879
|
+
var added = false;
|
|
1807
1880
|
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1808
1881
|
direction: "row",
|
|
1809
1882
|
width: "100%",
|
|
1810
1883
|
sx: {
|
|
1811
|
-
position: "absolute",
|
|
1812
|
-
top: "0px",
|
|
1813
|
-
left: "0px",
|
|
1814
1884
|
transition: "0.3s",
|
|
1815
|
-
padding: "10px",
|
|
1816
1885
|
boxSizing: "border-box",
|
|
1817
1886
|
opacity: hovering ? "1" : "0"
|
|
1887
|
+
},
|
|
1888
|
+
onMouseLeave: function onMouseLeave() {
|
|
1889
|
+
setHoveringAddTo(false);
|
|
1818
1890
|
}
|
|
1819
|
-
},
|
|
1891
|
+
}, /*#__PURE__*/React__default['default'].createElement(AddContentDropdown, {
|
|
1820
1892
|
item: item,
|
|
1821
|
-
active:
|
|
1893
|
+
active: hoveringAddTo,
|
|
1822
1894
|
onOptionClicked: onOptionClicked
|
|
1823
|
-
}) : /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1824
|
-
style: {
|
|
1825
|
-
width: "100%"
|
|
1826
|
-
}
|
|
1827
1895
|
}), /*#__PURE__*/React__default['default'].createElement(IconButton, {
|
|
1828
1896
|
sx: {
|
|
1829
1897
|
width: "30px",
|
|
@@ -1833,15 +1901,16 @@
|
|
|
1833
1901
|
backgroundColor: "grey7.main"
|
|
1834
1902
|
}
|
|
1835
1903
|
},
|
|
1836
|
-
|
|
1904
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
1837
1905
|
e.stopPropagation();
|
|
1838
|
-
|
|
1839
|
-
}
|
|
1906
|
+
setHoveringAddTo(true);
|
|
1907
|
+
},
|
|
1908
|
+
onClick: onPlusClick
|
|
1840
1909
|
}, /*#__PURE__*/React__default['default'].createElement(AddRoundedIcon__default['default'], {
|
|
1841
1910
|
sx: {
|
|
1842
1911
|
transition: "0.3s",
|
|
1843
1912
|
color: "notBlack.override",
|
|
1844
|
-
transform:
|
|
1913
|
+
transform: added
|
|
1845
1914
|
}
|
|
1846
1915
|
})));
|
|
1847
1916
|
};
|
|
@@ -1850,6 +1919,10 @@
|
|
|
1850
1919
|
var saved = _ref3.saved,
|
|
1851
1920
|
count = _ref3.count,
|
|
1852
1921
|
onClick = _ref3.onClick;
|
|
1922
|
+
var formatter = Intl.NumberFormat("en", {
|
|
1923
|
+
notation: "compact"
|
|
1924
|
+
});
|
|
1925
|
+
var savedCount = formatter.format(count);
|
|
1853
1926
|
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
1854
1927
|
direction: "row",
|
|
1855
1928
|
alignItems: "center",
|
|
@@ -1879,7 +1952,7 @@
|
|
|
1879
1952
|
fontSize: "12px",
|
|
1880
1953
|
fontWeight: "400"
|
|
1881
1954
|
}
|
|
1882
|
-
},
|
|
1955
|
+
}, savedCount));
|
|
1883
1956
|
};
|
|
1884
1957
|
var AddedToIcons = function AddedToIcons(_ref4) {
|
|
1885
1958
|
var _item$channelPointsCo2, _item$whitelistContex2, _item$walkOnContext2;
|
|
@@ -1963,22 +2036,141 @@
|
|
|
1963
2036
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
1964
2037
|
}
|
|
1965
2038
|
}; // const BlerpWaveform = ({ hovering, bite }) => {
|
|
2039
|
+
// const id = bite?._id;
|
|
2040
|
+
// const audio = bite?.audio?.mp3?.url;
|
|
2041
|
+
// const { play, getPlayState, selectedBlerp } = useContext(BlerpAudioContext);
|
|
2042
|
+
// const [hasRendered, setHasRendered] = useState(false);
|
|
2043
|
+
// const [wavesurfer, setWavesurfer] = useState(null);
|
|
2044
|
+
// useEffect(() => {
|
|
2045
|
+
// const create = async () => {
|
|
2046
|
+
// console.log("creating", hovering, wavesurfer, hasRendered);
|
|
2047
|
+
// if (hovering && wavesurfer) {
|
|
2048
|
+
// wavesurfer.load(audio);
|
|
2049
|
+
// } else if (
|
|
2050
|
+
// hovering &&
|
|
2051
|
+
// !wavesurfer &&
|
|
2052
|
+
// !hasRendered &&
|
|
2053
|
+
// document.querySelector(`#blerp-waveform-${id}`) &&
|
|
2054
|
+
// document.querySelector(`#blerp-waveform-${id}`).children
|
|
2055
|
+
// .length === 0
|
|
2056
|
+
// ) {
|
|
2057
|
+
// const WaveSurfer = (await import("@blerp/wavesurfer")).default;
|
|
2058
|
+
// const CursorPlugin = (
|
|
2059
|
+
// await import("@blerp/wavesurfer/src/plugin/cursor")
|
|
2060
|
+
// ).default;
|
|
2061
|
+
// let mWavesurfer = WaveSurfer.create({
|
|
2062
|
+
// container: document.querySelector(`#blerp-waveform-${id}`),
|
|
2063
|
+
// barWidth: 2,
|
|
2064
|
+
// barHeight: 1.5, // the height of the wave
|
|
2065
|
+
// barGap: 2, // the optional spacing between bars of the wave, if not provided will be calculated in legacy format
|
|
2066
|
+
// progressColor: "#ffffff",
|
|
2067
|
+
// hoverColor: "#ffffff99",
|
|
2068
|
+
// barRadius: 2,
|
|
2069
|
+
// height: 30,
|
|
2070
|
+
// hideScrollBar: true,
|
|
2071
|
+
// plugins: [
|
|
2072
|
+
// CursorPlugin.create({
|
|
2073
|
+
// showTime: false,
|
|
2074
|
+
// opacity: 0,
|
|
2075
|
+
// customShowTimeStyle: {
|
|
2076
|
+
// "background-color": "#000",
|
|
2077
|
+
// color: "#fff",
|
|
2078
|
+
// padding: "2px",
|
|
2079
|
+
// "font-size": "10px",
|
|
2080
|
+
// },
|
|
2081
|
+
// }),
|
|
2082
|
+
// ],
|
|
2083
|
+
// });
|
|
2084
|
+
// mWavesurfer.on("error", function (e) {
|
|
2085
|
+
// console.warn(e);
|
|
2086
|
+
// });
|
|
2087
|
+
// mWavesurfer?.on("seek", (prog) => {
|
|
2088
|
+
// if (prog) {
|
|
2089
|
+
// console.log("SEEEEEEK", prog, bite);
|
|
2090
|
+
// mWavesurfer?.setMute(true);
|
|
2091
|
+
// mWavesurfer?.play();
|
|
2092
|
+
// play({
|
|
2093
|
+
// bite: bite,
|
|
2094
|
+
// startTime: mWavesurfer?.getCurrentTime(),
|
|
2095
|
+
// forcePlay: true,
|
|
2096
|
+
// });
|
|
2097
|
+
// }
|
|
2098
|
+
// });
|
|
2099
|
+
// // Load audio from URL
|
|
2100
|
+
// // mWavesurfer.load(audio);
|
|
2101
|
+
// setWavesurfer(mWavesurfer);
|
|
2102
|
+
// setHasRendered(true);
|
|
2103
|
+
// }
|
|
2104
|
+
// };
|
|
2105
|
+
// create();
|
|
2106
|
+
// }, [wavesurfer, bite, play, audio, hovering, hasRendered, id]);
|
|
2107
|
+
// useEffect(() => {
|
|
2108
|
+
// // if (wavesurfer && selectedBlerp?._id === bite?._id) {
|
|
2109
|
+
// // wavesurfer?.on("seek", (prog) => {
|
|
2110
|
+
// // if (prog) {
|
|
2111
|
+
// // console.log("SEEEEEEK", prog, selectedBlerp);
|
|
2112
|
+
// // play({
|
|
2113
|
+
// // bite: bite,
|
|
2114
|
+
// // startTime: wavesurfer?.getCurrentTime(),
|
|
2115
|
+
// // });
|
|
2116
|
+
// // wavesurfer?.setMute(true);
|
|
2117
|
+
// // wavesurfer?.play();
|
|
2118
|
+
// // }
|
|
2119
|
+
// // });
|
|
2120
|
+
// // } else {
|
|
2121
|
+
// // wavesurfer?.un("seek");
|
|
2122
|
+
// // }
|
|
2123
|
+
// if (getPlayState({ biteId: bite?._id }) === "playing") {
|
|
2124
|
+
// wavesurfer?.setMute(true);
|
|
2125
|
+
// wavesurfer?.play();
|
|
2126
|
+
// // Play button
|
|
2127
|
+
// // console.log(wavesurfer.play());
|
|
2128
|
+
// }
|
|
2129
|
+
// if (getPlayState({ biteId: bite?._id }) === "paused") {
|
|
2130
|
+
// wavesurfer?.setMute(true);
|
|
2131
|
+
// wavesurfer?.pause();
|
|
2132
|
+
// // Play button
|
|
2133
|
+
// // console.log(wavesurfer.play());
|
|
2134
|
+
// }
|
|
2135
|
+
// if (getPlayState({ biteId: bite?._id }) === "stopped") {
|
|
2136
|
+
// wavesurfer?.setMute(true);
|
|
2137
|
+
// console.log("stop");
|
|
2138
|
+
// wavesurfer?.stop();
|
|
2139
|
+
// // Play button
|
|
2140
|
+
// // console.log(wavesurfer.play());
|
|
2141
|
+
// }
|
|
2142
|
+
// }, [bite, getPlayState, wavesurfer]);
|
|
2143
|
+
// return (
|
|
2144
|
+
// <div
|
|
2145
|
+
// id={`blerp-waveform-${id}`}
|
|
2146
|
+
// style={{
|
|
2147
|
+
// height: "30px",
|
|
2148
|
+
// width: "100%",
|
|
2149
|
+
// transition: "0.3s",
|
|
2150
|
+
// opacity: hovering ? "1" : "0",
|
|
2151
|
+
// }}
|
|
2152
|
+
// >
|
|
2153
|
+
// {/* <!-- Here be the waveform --> */}
|
|
2154
|
+
// </div>
|
|
2155
|
+
// );
|
|
2156
|
+
// };
|
|
1966
2157
|
|
|
1967
|
-
var ReportedWarning = function ReportedWarning(_ref7) {
|
|
1968
|
-
var showWarning = _ref7.showWarning,
|
|
1969
|
-
saved = _ref7.saved,
|
|
1970
|
-
count = _ref7.count,
|
|
1971
|
-
onClick = _ref7.onClick;
|
|
1972
2158
|
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
2159
|
+
var ReportedWarning = function ReportedWarning(_ref6) {
|
|
2160
|
+
var showWarning = _ref6.showWarning,
|
|
2161
|
+
saved = _ref6.saved,
|
|
2162
|
+
count = _ref6.count,
|
|
2163
|
+
onClick = _ref6.onClick;
|
|
1977
2164
|
|
|
1978
|
-
var
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
2165
|
+
var _useState3 = React.useState(showWarning),
|
|
2166
|
+
_useState4 = _slicedToArray__default['default'](_useState3, 2),
|
|
2167
|
+
show = _useState4[0],
|
|
2168
|
+
setShow = _useState4[1];
|
|
2169
|
+
|
|
2170
|
+
var _useState5 = React.useState(false),
|
|
2171
|
+
_useState6 = _slicedToArray__default['default'](_useState5, 2),
|
|
2172
|
+
hovering = _useState6[0],
|
|
2173
|
+
setHovering = _useState6[1];
|
|
1982
2174
|
|
|
1983
2175
|
var renderInfo = function renderInfo() {
|
|
1984
2176
|
|
|
@@ -2049,8 +2241,51 @@
|
|
|
2049
2241
|
})), renderInfo());
|
|
2050
2242
|
};
|
|
2051
2243
|
|
|
2244
|
+
var BlerpTopRow = function BlerpTopRow(_ref7) {
|
|
2245
|
+
var bite = _ref7.bite,
|
|
2246
|
+
hovering = _ref7.hovering,
|
|
2247
|
+
onPlusClick = _ref7.onPlusClick,
|
|
2248
|
+
_onOptionClicked = _ref7.onOptionClicked;
|
|
2249
|
+
|
|
2250
|
+
var _useState7 = React.useState(false),
|
|
2251
|
+
_useState8 = _slicedToArray__default['default'](_useState7, 2),
|
|
2252
|
+
hoveringAddTo = _useState8[0],
|
|
2253
|
+
setHoveringAddTo = _useState8[1];
|
|
2254
|
+
|
|
2255
|
+
return /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
2256
|
+
direction: "row",
|
|
2257
|
+
justifyContent: "space-between",
|
|
2258
|
+
width: "100%",
|
|
2259
|
+
sx: {
|
|
2260
|
+
position: "relative",
|
|
2261
|
+
minHeight: "20px"
|
|
2262
|
+
}
|
|
2263
|
+
}, /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
2264
|
+
sx: {
|
|
2265
|
+
transition: "0.3s",
|
|
2266
|
+
opacity: hoveringAddTo ? "0" : "1",
|
|
2267
|
+
width: hoveringAddTo ? "0%" : "100%" // display: hoveringAddTo && "none",
|
|
2268
|
+
|
|
2269
|
+
}
|
|
2270
|
+
}, /*#__PURE__*/React__default['default'].createElement(RatingInfo, {
|
|
2271
|
+
rating: bite === null || bite === void 0 ? void 0 : bite.strictAudienceRating
|
|
2272
|
+
}), /*#__PURE__*/React__default['default'].createElement(AddedToIcons, {
|
|
2273
|
+
item: bite,
|
|
2274
|
+
hovering: hovering
|
|
2275
|
+
})), /*#__PURE__*/React__default['default'].createElement(AddContentButton, {
|
|
2276
|
+
item: bite,
|
|
2277
|
+
hovering: hovering,
|
|
2278
|
+
hoveringAddTo: hoveringAddTo,
|
|
2279
|
+
setHoveringAddTo: setHoveringAddTo,
|
|
2280
|
+
onPlusClick: onPlusClick,
|
|
2281
|
+
onOptionClicked: function onOptionClicked(option) {
|
|
2282
|
+
return _onOptionClicked(option);
|
|
2283
|
+
}
|
|
2284
|
+
}));
|
|
2285
|
+
};
|
|
2286
|
+
|
|
2052
2287
|
var NewBlerp$1 = function NewBlerp(_ref8) {
|
|
2053
|
-
var _bite$image, _bite$image$original
|
|
2288
|
+
var _bite$image, _bite$image$original;
|
|
2054
2289
|
|
|
2055
2290
|
var Waveform = _ref8.Waveform,
|
|
2056
2291
|
bite = _ref8.bite,
|
|
@@ -2068,12 +2303,6 @@
|
|
|
2068
2303
|
addedToPlace = _useState12[0],
|
|
2069
2304
|
setAddedToPlace = _useState12[1];
|
|
2070
2305
|
|
|
2071
|
-
var _useState13 = React.useState(null),
|
|
2072
|
-
_useState14 = _slicedToArray__default['default'](_useState13, 2),
|
|
2073
|
-
userCardRef = _useState14[0],
|
|
2074
|
-
setUserCardRef = _useState14[1];
|
|
2075
|
-
|
|
2076
|
-
var openUserCard = Boolean(userCardRef);
|
|
2077
2306
|
var formatter = Intl.NumberFormat("en", {
|
|
2078
2307
|
notation: "compact"
|
|
2079
2308
|
});
|
|
@@ -2212,25 +2441,13 @@
|
|
|
2212
2441
|
alignItems: "center",
|
|
2213
2442
|
justifyContent: "center"
|
|
2214
2443
|
}
|
|
2215
|
-
}), /*#__PURE__*/React__default['default'].createElement(
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
position: "relative",
|
|
2221
|
-
minHeight: "20px"
|
|
2222
|
-
}
|
|
2223
|
-
}, /*#__PURE__*/React__default['default'].createElement(Stack, null, /*#__PURE__*/React__default['default'].createElement(RatingInfo, {
|
|
2224
|
-
rating: bite === null || bite === void 0 ? void 0 : bite.strictAudienceRating
|
|
2225
|
-
}), /*#__PURE__*/React__default['default'].createElement(AddedToIcons, {
|
|
2226
|
-
item: bite,
|
|
2227
|
-
hovering: hovering
|
|
2228
|
-
})), /*#__PURE__*/React__default['default'].createElement("div", null)), /*#__PURE__*/React__default['default'].createElement(AddContentButton, {
|
|
2229
|
-
item: bite,
|
|
2444
|
+
}), /*#__PURE__*/React__default['default'].createElement(BlerpTopRow, {
|
|
2445
|
+
bite: bite,
|
|
2446
|
+
onOptionClicked: function onOptionClicked() {
|
|
2447
|
+
return null;
|
|
2448
|
+
},
|
|
2230
2449
|
hovering: hovering,
|
|
2231
|
-
|
|
2232
|
-
return handleAddToPlace(option);
|
|
2233
|
-
}
|
|
2450
|
+
onPlusClick: handleAddToPlace
|
|
2234
2451
|
}), /*#__PURE__*/React__default['default'].createElement(Stack, {
|
|
2235
2452
|
sx: {
|
|
2236
2453
|
transition: "0.3s",
|
|
@@ -2323,66 +2540,9 @@
|
|
|
2323
2540
|
})))), /*#__PURE__*/React__default['default'].createElement(FavoriteIconWithCounter, {
|
|
2324
2541
|
saved: bite === null || bite === void 0 ? void 0 : bite.saved,
|
|
2325
2542
|
count: saveCount
|
|
2326
|
-
}), /*#__PURE__*/React__default['default'].createElement(
|
|
2327
|
-
direction: "row",
|
|
2328
|
-
onClick: function onClick(e) {
|
|
2329
|
-
setUserCardRef(e.target);
|
|
2330
|
-
},
|
|
2331
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
2332
|
-
setTimeout(function () {
|
|
2333
|
-
setUserCardRef(e.target);
|
|
2334
|
-
}, [500]);
|
|
2335
|
-
},
|
|
2336
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
2337
|
-
setUserCardRef(null);
|
|
2338
|
-
}
|
|
2339
|
-
}, /*#__PURE__*/React__default['default'].createElement(Popover, {
|
|
2340
|
-
open: openUserCard,
|
|
2341
|
-
anchorEl: userCardRef,
|
|
2342
|
-
anchorOrigin: {
|
|
2343
|
-
vertical: "bottom",
|
|
2344
|
-
horizontal: "left"
|
|
2345
|
-
},
|
|
2346
|
-
transformOrigin: {
|
|
2347
|
-
vertical: "top",
|
|
2348
|
-
horizontal: "left"
|
|
2349
|
-
},
|
|
2350
|
-
disablePortal: true,
|
|
2351
|
-
hideBackdrop: true,
|
|
2352
|
-
sx: {
|
|
2353
|
-
pointerEvents: "none"
|
|
2354
|
-
},
|
|
2355
|
-
PaperProps: {
|
|
2356
|
-
// onMouseEnter: (e) => {
|
|
2357
|
-
// setUserCardRef(e.target);
|
|
2358
|
-
// },
|
|
2359
|
-
id: "user-card-".concat(bite === null || bite === void 0 ? void 0 : bite._id, "-").concat(bite === null || bite === void 0 ? void 0 : (_bite$ownerObject = bite.ownerObject) === null || _bite$ownerObject === void 0 ? void 0 : _bite$ownerObject._id),
|
|
2360
|
-
sx: {
|
|
2361
|
-
pointerEvents: "auto",
|
|
2362
|
-
backgroundColor: "transparent"
|
|
2363
|
-
},
|
|
2364
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
2365
|
-
setUserCardRef(null);
|
|
2366
|
-
}
|
|
2367
|
-
} // onClose={() => setUserCardRef(null)}
|
|
2368
|
-
|
|
2369
|
-
}, /*#__PURE__*/React__default['default'].createElement(UserCard$1, {
|
|
2543
|
+
}), /*#__PURE__*/React__default['default'].createElement(UsernameWithPopout$1, {
|
|
2370
2544
|
user: bite === null || bite === void 0 ? void 0 : bite.ownerObject
|
|
2371
|
-
})
|
|
2372
|
-
sx: {
|
|
2373
|
-
fontWeight: "300",
|
|
2374
|
-
fontSize: "12px",
|
|
2375
|
-
color: "grey7.main",
|
|
2376
|
-
maxWidth: "95px",
|
|
2377
|
-
whiteSpace: "nowrap",
|
|
2378
|
-
overflow: "hidden",
|
|
2379
|
-
margin: "0 10px",
|
|
2380
|
-
cursor: "pointer",
|
|
2381
|
-
"&:hover": {
|
|
2382
|
-
textDecoration: "underline"
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
}, bite === null || bite === void 0 ? void 0 : (_bite$ownerObject2 = bite.ownerObject) === null || _bite$ownerObject2 === void 0 ? void 0 : _bite$ownerObject2.username)), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
2545
|
+
}), /*#__PURE__*/React__default['default'].createElement(Text, {
|
|
2386
2546
|
sx: {
|
|
2387
2547
|
fontWeight: "300",
|
|
2388
2548
|
fontSize: "12px",
|
|
@@ -91504,6 +91664,7 @@
|
|
|
91504
91664
|
var NewBlerp = NewBlerp$1;
|
|
91505
91665
|
var GroupCard = GroupCard$1;
|
|
91506
91666
|
var UserCard = UserCard$1;
|
|
91667
|
+
var UsernameWithPopout = UsernameWithPopout$1;
|
|
91507
91668
|
var BlerpAudioContextProvider = BlerpAudioContextProvider$1;
|
|
91508
91669
|
var IconButton = material.IconButton;
|
|
91509
91670
|
var Toggle = Toggle$1;
|
|
@@ -91859,6 +92020,7 @@
|
|
|
91859
92020
|
exports.UserCard = UserCard;
|
|
91860
92021
|
exports.UserLibraryHeader = UserLibraryHeader;
|
|
91861
92022
|
exports.UserProfileHeader = UserProfileHeader;
|
|
92023
|
+
exports.UsernameWithPopout = UsernameWithPopout;
|
|
91862
92024
|
exports.WalkonIcon = WalkonIcon;
|
|
91863
92025
|
exports.WindowsIcon = WindowsIcon;
|
|
91864
92026
|
exports.darkThemeV1 = darkThemeV1;
|