@soul-refiner/design-system 2.14.181 → 2.14.183

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,9 +1,9 @@
1
- "use strict";var e=require("react/jsx-runtime"),i=require("react"),o=require("next/image"),t=require("styled-components"),r=require("../../atoms/seconds_to_duration/seconds_to_duration.js"),l=require("../../atoms/typography/paragraph.js"),n=require("../../../icons/security/lock.js"),s=require("../../../icons/audio_video/play_solid.js"),a=require("../../../icons/basic/download_arrow.js"),c=require("../../../icons/basic/share_external.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(i),x=d(o);const h=p.default.forwardRef(({comingSoon:i,duration:o,onClick:t,playable:d,progress:p=0,shortDescription:h,thumbnail:w="/images/default_card_image.png",nowplaying:$,playlistItemId:v,title:I="Episode",isFile:k=!1,type:L="VIDEO"},z)=>e.jsxs(g,{ref:z,onClick:d&&!i?t:void 0,$playable:d||"LINK"===L,$playlistItemId:v,$nowplaying:$,$isExternalLink:"LINK"===L,children:[d?e.jsx(s.PlaySolid,{color:"white",size:16,sx:"position: absolute; left: 10px; bottom: 10px;"}):"LINK"===L?e.jsx(c.ShareExternal,{color:"white",size:16,sx:"position: absolute; left: 10px; bottom: 10px;"}):e.jsx(n.Lock,{color:"white",size:16,sx:"position: absolute; left: 10px; bottom: 10px;"}),e.jsxs("div",{style:{position:"relative",overflow:"hidden",height:75,minWidth:133,width:"100%",maxWidth:133,backgroundColor:"white"},className:"imageContainer",children:[e.jsx(x.default,{alt:`thumbnail for ${I}`,height:75,quality:100,src:w,style:{objectFit:"LINK"===L?"contain":"cover",background:"LINK"===L?"white":"transparent"},width:133}),k&&e.jsx(y,{className:"overlay",children:e.jsx(f,{children:e.jsx(Button,{icon:e.jsx(a.DownloadArrow,{color:"grey-4",size:16}),type:"special",sx:"padding-left: 12px;padding-right: 12px; max-height: 32px;",children:e.jsx(l.P,{$color:"grey-4",$fontSize:14,$lineHeight:20,children:"Download"})})})}),"LINK"===L&&e.jsx(u,{className:"overlay",children:e.jsx(m,{children:e.jsx(Button,{icon:e.jsx(c.ShareExternal,{color:"grey-4",size:16}),type:"special",sx:"max-height: 32px;",children:e.jsx(l.P,{$color:"grey-4",$fontSize:14,$lineHeight:20,children:"Visit"})})})})]}),p&&o&&!i&&"LINK"!==L?e.jsx(j,{progressPercent:p/o}):null,e.jsxs(b,{children:[e.jsx(l.P,{$color:"grey-10",$semiBold:!0,sx:"white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",children:I}),o&&!i&&"LINK"!==L&&"FILE"!==L&&e.jsx(l.P,{$color:"grey-8",$fontSize:14,$lineHeight:20,children:e.jsx(r.SecToDuration,{seconds:o})}),"LINK"===L&&e.jsx(l.P,{$color:"grey-8",$fontSize:14,$lineHeight:20,children:"Visit"}),"FILE"===L&&e.jsx(l.P,{$color:"grey-8",$fontSize:14,$lineHeight:20,children:"Download"}),i&&e.jsx(l.P,{$color:"grey-8",$fontSize:14,$lineHeight:20,children:"Coming soon"})]})]})),g=t.styled.div`
1
+ "use strict";var e=require("react/jsx-runtime"),i=require("react"),o=require("next/image"),t=require("styled-components"),r=require("../../atoms/seconds_to_duration/seconds_to_duration.js"),l=require("../../atoms/typography/paragraph.js"),n=require("../../../icons/security/lock.js"),s=require("../../../icons/audio_video/play_solid.js"),a=require("../../../icons/basic/download_arrow.js"),c=require("../../../icons/basic/share_external.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=d(i),p=d(o);const h=g.default.forwardRef(({comingSoon:i,duration:o,onClick:t,playable:d,progress:g=0,shortDescription:h,thumbnail:w="/images/default_card_image.png",nowplaying:I,playlistItemId:k,title:z="Episode",isFile:L=!1,type:N="VIDEO"},S)=>e.jsxs(x,{ref:S,onClick:d&&!i?t:void 0,$playable:d||"LINK"===N,$playlistItemId:k,$nowplaying:I,$isExternalLink:"LINK"===N,children:[e.jsxs("div",{style:{position:"relative",overflow:"hidden",height:75,minWidth:133,width:"100%",maxWidth:133,backgroundColor:"white"},className:"imageContainer",children:[e.jsx(p.default,{alt:`thumbnail for ${z}`,height:75,quality:100,src:w,style:{objectFit:"LINK"===N?"contain":"cover",background:"LINK"===N?"white":"transparent"},width:133}),e.jsxs(b,{children:[e.jsx($,{children:d?e.jsx(s.PlaySolid,{color:"white",size:16}):"LINK"===N?e.jsx(c.ShareExternal,{color:"white",size:16}):e.jsx(n.Lock,{color:"white",size:16})}),g&&o&&!i&&"LINK"!==N?e.jsx(m,{progressPercent:g/o}):null]}),L&&e.jsx(y,{className:"overlay",children:e.jsx(f,{children:e.jsx(Button,{icon:e.jsx(a.DownloadArrow,{color:"grey-4",size:16}),type:"special",sx:"padding-left: 12px;padding-right: 12px; max-height: 32px;",children:e.jsx(l.P,{$color:"grey-4",$fontSize:14,$lineHeight:20,children:"Download"})})})}),"LINK"===N&&e.jsx(u,{className:"overlay",children:e.jsx(j,{children:e.jsx(Button,{icon:e.jsx(c.ShareExternal,{color:"grey-4",size:16}),type:"special",sx:"max-height: 32px;",children:e.jsx(l.P,{$color:"grey-4",$fontSize:14,$lineHeight:20,children:"Visit"})})})})]}),e.jsxs(v,{children:[e.jsx(l.P,{$color:"grey-10",$semiBold:!0,$fontSize:16,$lineHeight:24,sx:"white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",children:z}),o&&!i&&"LINK"!==N&&"FILE"!==N&&e.jsx(l.P,{$color:"grey-8",$fontSize:14,$lineHeight:20,children:e.jsx(r.SecToDuration,{seconds:o})}),"LINK"===N&&e.jsx(l.P,{$color:"grey-8",$fontSize:14,$lineHeight:20,children:"Visit"}),"FILE"===N&&e.jsx(l.P,{$color:"grey-8",$fontSize:14,$lineHeight:20,children:"Download"}),i&&e.jsx(l.P,{$color:"grey-8",$fontSize:14,$lineHeight:20,children:"Coming soon"})]})]})),x=t.styled.div`
2
2
  width: 100%;
3
3
  flex: 0 1 auto;
4
- padding: 6px 6px 6px 0;
4
+ padding: 8px;
5
5
  display: flex;
6
- align-items: center;
6
+ gap: 16px;
7
7
  position: relative;
8
8
  &:hover {
9
9
  ${({$playlistItemId:e,$nowplaying:i})=>e===i?"":"background: var(--color-grey-1);"}
@@ -51,7 +51,7 @@
51
51
  width: 100%;
52
52
  background-color: white;
53
53
  gap: 0px;
54
- `,m=t.styled.div`
54
+ `,j=t.styled.div`
55
55
  display: flex;
56
56
  justify-content: center;
57
57
  align-items: center;
@@ -59,16 +59,27 @@
59
59
  height: 100%;
60
60
  width: 100%;
61
61
  gap: 4px;
62
- `,j=({progressPercent:i})=>e.jsxs(w,{viewBox:"0 0 133 2",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{width:133*i,height:"2",fill:"var(--color-primary-blue-2)"}),e.jsx("rect",{x:133*i,width:133-133*i,height:"2",fill:"var(--color-grey-8)"})]}),w=t.styled.svg`
63
- width: 133px;
64
- position: absolute;
65
- bottom: 5px;
66
- left: 5px;
62
+ `,m=({progressPercent:i})=>e.jsxs(w,{viewBox:"0 0 133 2",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{width:133*i,height:"2",fill:"var(--color-primary-blue-2)"}),e.jsx("rect",{x:133*i,width:133-133*i,height:"2",fill:"var(--color-grey-8)"})]}),w=t.styled.svg`
63
+ width: 100%;
64
+ display: block;
67
65
  `,b=t.styled.div`
66
+ position: absolute;
67
+ bottom: 0;
68
+ left: 0;
69
+ right: 0;
70
+ display: flex;
71
+ flex-direction: column;
72
+ gap: 4px;
73
+ background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.85));
74
+ padding-top: 12px;
75
+ `,$=t.styled.div`
76
+ display: flex;
77
+ align-items: flex-start;
78
+ padding: 0 8px;
79
+ `,v=t.styled.div`
68
80
  display: flex;
69
81
  flex-direction: column;
70
82
  gap: 8px;
71
- margin-left: 16px;
72
83
  flex: 1 0 0;
73
84
  min-width: 0;
74
85
  overflow: hidden;
@@ -60,7 +60,7 @@
60
60
 
61
61
  ${({$playable:e})=>e?"":"\n .player {\n cursor: initial;\n pointer-events: none;\n user-select: none;\n }"}
62
62
 
63
- ${({$orientation:e})=>"vertical"===e?"\n flex-direction: column;\n gap: 24px;\n justify-content: flex-start;":"\n & > div:first-of-type {\n flex: 5;\n aspect-ratio: 1280 / 720;\n }\n & > div:last-of-type {\n flex: 3;\n }"}
63
+ ${({$orientation:e})=>"vertical"===e?"\n flex-direction: column;\n gap: 24px;\n justify-content: flex-start;":"\n & > div:first-of-type {\n flex: 5;\n aspect-ratio: 1280 / 720;\n }\n & > div:last-of-type {\n flex: 3;\n }"}
64
64
  `,P=n.styled.div`
65
65
  position: relative;
66
66
  flex: 1;
@@ -94,16 +94,16 @@
94
94
  overflow-x: hidden;
95
95
  padding-right: 4px;
96
96
  &::-webkit-scrollbar-track {
97
- background-color: rgba(96, 96, 96, 0.61);
97
+ background-color: transparent;
98
+ margin: 16px 0;
98
99
  }
99
100
  &::-webkit-scrollbar {
100
101
  width: 4px;
101
- border-radius: 2px;
102
+ border-radius: 32px;
102
103
  }
103
104
  &::-webkit-scrollbar-thumb {
104
- border-radius: 2px;
105
- background-color: #eaebed;
106
- opacity: 0.8 !important;
105
+ border-radius: 32px;
106
+ background-color: rgba(234, 235, 237, 0.3);
107
107
  }
108
108
  ${({$showingAll:e})=>e?"\n height: 100vh; max-height: calc(100vh - 200px);\n overflow-y: auto;\n flex: 1;\n margin-top: auto;\n margin-bottom: auto;":"height: 100%;"}
109
109
  `,B=n.styled.div`
@@ -114,20 +114,17 @@
114
114
  margin-right: 24px;
115
115
  overflow-x: hidden;
116
116
  &::-webkit-scrollbar-track {
117
- box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.15);
118
- -webkit-box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.15);
119
- border-radius: 4px;
120
- background-color: var(--color-grey-2);
121
- margin: 40px 0px 15px 0px;
117
+ background-color: transparent;
118
+ border-radius: 32px;
119
+ margin: 16px 0;
122
120
  }
123
121
  &::-webkit-scrollbar {
124
- width: 8px;
125
- border-radius: 4px;
122
+ width: 4px;
123
+ border-radius: 32px;
126
124
  }
127
125
  &::-webkit-scrollbar-thumb {
128
- border-radius: 4px;
129
- background-color: var(--color-grey-6);
130
- opacity: 30%;
126
+ border-radius: 32px;
127
+ background-color: rgba(234, 235, 237, 0.3);
131
128
  }
132
129
 
133
130
  ${({$showingAll:e})=>e?"height: 100%; overflow-y:auto;":"max-height: 350px;"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),i=require("next/image"),r=require("next/link"),o=require("styled-components"),n=require("react-show-more-text"),s=require("../../../common/regex.js"),l=require("../../atoms/box/box.js"),a=require("../../atoms/highlighter/highlighter.js"),d=require("../../atoms/typography/heading.js"),c=require("../../atoms/typography/paragraph.js"),h=require("../modal/modal.js");require("../../atoms/image/image.js"),require("../../atoms/layout/container.js"),require("../../atoms/layout/grid.js"),require("../../atoms/layout/inline.js"),require("../../atoms/layout/section.js"),require("../../atoms/typography/display.js"),require("../../atoms/typography/typography.js");var u=require("../../atoms/time_ago/time_ago.js");require("../../atoms/countdown/countdown.js");var p=require("../../iconography/avatar/avatar.js"),x=require("../../../icons/security/lock.js"),g=require("../../../icons/arrow/chevron_left.js"),m=require("../../../icons/arrow/chevron_right.js"),f=require("../../media/video/video.js");require("../../iconography/icon/icon.js");var j=require("../../../icons/audio_video/play.js");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../../icons/basic/subtask.js"),require("../../../icons/security/verified_filled.js"),require("../../../common/colors.js");var v=y(t),b=y(i),w=y(r),$=y(n);const k=o.styled.div`
2
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),i=require("next/image"),r=require("next/link"),o=require("styled-components"),n=require("react-show-more-text"),s=require("../../../common/regex.js"),l=require("../../atoms/box/box.js"),a=require("../../atoms/highlighter/highlighter.js"),d=require("../../atoms/typography/heading.js"),c=require("../../atoms/typography/paragraph.js"),h=require("../modal/modal.js");require("../../atoms/image/image.js"),require("../../atoms/layout/container.js"),require("../../atoms/layout/grid.js"),require("../../atoms/layout/inline.js"),require("../../atoms/layout/section.js"),require("../../atoms/typography/display.js"),require("../../atoms/typography/typography.js");var u=require("../../atoms/time_ago/time_ago.js");require("../../atoms/countdown/countdown.js");var p=require("../../iconography/avatar/avatar.js"),x=require("../../../icons/security/lock.js"),g=require("../../../icons/arrow/chevron_left.js"),f=require("../../../icons/arrow/chevron_right.js"),m=require("../../media/video/video.js");require("../../iconography/icon/icon.js");var y=require("../../../icons/audio_video/play.js");function j(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../../icons/basic/subtask.js"),require("../../../icons/security/verified_filled.js"),require("../../../common/colors.js");var v=j(t),b=j(i),w=j(r),$=j(n);const k=o.styled.div`
3
3
  position: relative;
4
4
  max-width: 700px;
5
5
  width: 100%;
@@ -17,12 +17,23 @@
17
17
  cursor: pointer;
18
18
  }
19
19
 
20
+ .post-content {
21
+ font-family: var(--font-inter);
22
+ font-size: 1rem;
23
+ line-height: 1.5rem;
24
+ color: var(--color-grey-3);
25
+ font-weight: 400;
26
+ text-align: left;
27
+ white-space: pre-line;
28
+ word-break: break-word;
29
+ }
30
+
20
31
  .see-more-toggle {
21
32
  cursor: pointer;
22
- color: var(--color-grey-4);
23
- font-weight: 400;
33
+ color: var(--color-grey-5);
34
+ font-weight: 500;
24
35
  font-size: 14px;
25
- margin-left: 13px;
36
+ font-family: var(--font-inter);
26
37
  }
27
38
  `;o.styled.button`
28
39
  background: none;
@@ -146,4 +157,4 @@
146
157
  padding: 6px 16px;
147
158
  width: fit-content;
148
159
  cursor: pointer;
149
- `;exports.Post=({actions:t,author:i,authorActive:r,authorHref:o,authorImage:n,avatarTooltipContent:y,avatarTooltipSx:I,children:L,content:B,createdDate:M,dropdown:T,hasComments:F,id:W,images:D,isPaidUser:J,isPaywalled:V=!1,link:X,video:G,onJoin:N,monthlyMembershipPrice:O,onImageClick:Y})=>{const K=v.default.useId(),Q=v.default.useRef(null),[Z,ee]=v.default.useState(!1),[te,ie]=v.default.useState(-1);v.default.useRef(null);const[re,oe]=v.default.useState(-1),[ne,se]=v.default.useState({x:"30vw",y:"30vh"}),le=!!G?.url&&!!G?.thumbnail,ae=G?.displayHtmlVideo,[de,ce]=v.default.useState(!1),he=v.default.useRef(null);v.default.useEffect(()=>{if(Q.current&&B?.length>0){const e=24,t=Math.ceil(Q.current.offsetHeight/e);ie(t)}else ie(-1)},[B,Z]),v.default.useEffect(()=>{const e=e=>{"ArrowLeft"===e.key?ge():"ArrowRight"===e.key?xe():"Escape"!==e.key&&"Enter"!==e.key||oe(-1)};return"undefined"!=typeof document&&D?.length&&re>-1&&document.addEventListener("keydown",e),()=>{D?.length&&document.removeEventListener("keydown",e)}},[]);const ue=v.default.Children.toArray(t),pe=v.default.Children.toArray(L),xe=()=>{oe(e=>D?.length&&e!==D.length-1?e+1:e)},ge=()=>{oe(e=>D?.length&&0!==e?e-1:e)};return e.jsxs(k,{id:W,children:[re>-1&&!!D?.[re]&&e.jsx(h.Modal,{alwaysRender:!1,controlledOpen:!0,onChange:e=>!e&&oe(-1),children:e.jsxs(h.Modal.Content,{sx:`\n position: relative; \n height: ${ne.y}; \n width: ${ne.x};\n margin: 0 auto;\n `,children:[e.jsx(U,{$side:"left",$visible:0!==re,onClick:ge,children:e.jsx(g.ChevronLeft,{color:"white",size:48})}),e.jsx(b.default,{alt:"",fill:!0,quality:100,onLoad:e=>{const{naturalHeight:t,naturalWidth:i}=e.target;let r=`${i}px`,o=`${t}px`;window?.innerHeight<t&&window?.innerWidth<i?(r=`${Math.floor(.95*window.innerHeight*i/t)}px`,o=`${Math.round(.95*window.innerWidth*t/i)}px`):window?.innerHeight<t?(r=`${Math.floor(.95*window.innerHeight*i/t)}px`,o="95vh"):window?.innerWidth<i&&(r="95vw",o=`${Math.round(.95*window.innerWidth*t/i)}px`),se({x:r,y:o})},draggable:!1,priority:!0,sizes:"100vw",src:D[re],style:{objectFit:"cover"}}),e.jsx(U,{$side:"right",$visible:re!==D.length-1,onClick:xe,children:e.jsx(m.ChevronRight,{color:"white",size:48})})]})}),e.jsxs(q,{children:[n&&"/images/default_avatar.png"!==n?e.jsx(p.Avatar,{isPaidUser:J,as:o?w.default:"button",href:o,image:n,size:64,status:r?"online":void 0,subtitle:e.jsx(c.P,{as:"span",sx:"vertical-align: top;",$fontSize:14,$lineHeight:20,children:e.jsx(u.TimeAgo,{date:new Date(M)})}),title:e.jsx(d.H,{as:o?w.default:"span",href:o,sx:"text-decoration:none;",$bold:!0,$fontSize:18,$lineHeight:26,children:i}),textPosition:"right",tooltipContent:y,tooltipSx:I,sx:o?"img { cursor: pointer; }":void 0}):e.jsxs(l.Box,{$align:"center",$gap:12,children:[e.jsx(p.Avatar.Initials,{name:i||"U",size:64}),e.jsxs(l.Box,{$dir:"column",children:[e.jsx(d.H,{as:o?w.default:"span",href:o,sx:"text-decoration:none;",$bold:!0,$fontSize:18,$lineHeight:26,children:i}),e.jsx(c.P,{as:"span",sx:"vertical-align: top;",$fontSize:14,$lineHeight:20,children:e.jsx(u.TimeAgo,{date:new Date(M)})})]})]}),T]}),!!B?.length&&e.jsxs("div",{style:{padding:"16px 24px"},children:[V&&te>1?e.jsx($.default,{lines:2,more:"Continue Reading",onClick:N,anchorClass:"see-more",expanded:!1,truncatedEndingComponent:"... ",children:e.jsx(c.P,{$sx:"white-space: pre-line; word-break: break-word;",$textClampLines:2,children:e.jsx(a.Highlighter,{highlightRender:t=>e.jsx(c.P,{as:"span",$color:"primary-blue-2",children:e.jsx(w.default,{href:t,target:"_blank",children:t})}),seperator:s.URL_REGEX,text:B})})}):e.jsx($.default,{lines:5,more:"See more",less:"See less",anchorClass:"see-more-toggle",expanded:Z,onClick:()=>ee(e=>!e),truncatedEndingComponent:"... ",children:e.jsx(c.P,{$sx:"white-space: pre-line; word-break: break-word;",innerRef:Q,children:e.jsx(a.Highlighter,{highlightRender:t=>e.jsx(c.P,{as:"span",$color:"primary-blue-2",children:e.jsx(w.default,{href:t,target:"_blank",children:t})}),seperator:s.URL_REGEX,text:V&&1===te?"This is a premium post. Join to the membership to unlock the full access.":B})})}),V&&!D?.length&&e.jsx(A,{onClick:N,children:e.jsxs(c.P,{$fontSize:14,$mediumBold:!0,children:["Join now for $",O," per month"]})})]}),V&&!!D?.length&&!le&&e.jsxs(R,{children:[e.jsx(b.default,{alt:"",width:650,height:427,priority:!0,quality:100,src:D[0],style:{objectFit:"fill",height:"100%",width:"100%",filter:"blur(60px)",position:"absolute",top:0,left:"50%",transform:"translateX(-50%)"}}),e.jsx(x.Lock,{size:40,color:"white",sx:"z-index: 1"}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",zIndex:1},children:[e.jsx(c.P,{$color:"white",$fontSize:14,$bold:!0,$lineHeight:20,children:"Become a member"}),e.jsx(c.P,{$color:"white",$fontSize:14,$bold:!0,$lineHeight:20,children:"to unlock this post"})]}),e.jsx(A,{onClick:N,style:{zIndex:1,marginTop:0},children:e.jsxs(c.P,{$fontSize:14,$mediumBold:!0,children:["Join now for $",O," per month"]})})]}),!!D?.length&&!le&&!V&&e.jsxs(H,{$numImages:D.length,children:[D.slice(0,4).map((t,i)=>e.jsx(P,{children:e.jsx(b.default,{alt:"",fill:!0,onClick:()=>{Y?.(i),oe(i)},quality:100,src:t,draggable:!1,style:{cursor:"pointer",objectFit:"cover"}})},`${K}${t.slice(0,15)}${i}`)),D.length>4&&e.jsxs(d.H,{as:"p",className:"more-than",sx:"pointer-events: none;",$color:"grey-10",$fontSize:28,$lineHeight:36,$semiBold:!0,children:["+",D.length-4]})]}),!D?.length&&!le&&X&&!V&&e.jsxs(w.default,{href:X.url,target:"_blank",children:[e.jsx(P,{children:e.jsx(b.default,{alt:"",fill:!0,quality:100,src:X.imageUrl,draggable:!1,style:{cursor:"pointer",objectFit:"cover"}})}),e.jsxs(l.Box,{$dir:"column",$gap:8,sx:"padding: 8px 16px;",children:[e.jsx(c.P,{$color:"grey-2",$semiBold:!0,children:X.title}),e.jsx(c.P,{$color:"grey-5",children:X.description})]})]}),le&&e.jsx(S,{children:ae?de?e.jsxs("video",{ref:he,style:{width:"100%",height:"100%"},controls:!0,playsInline:!0,poster:G.thumbnail,children:[G.videoUrls.webm&&e.jsx("source",{src:G.videoUrls.webm,type:"video/webm; codecs=vp9"}),G.videoUrls.mp4&&e.jsx("source",{src:G.videoUrls.mp4,type:"video/mp4; codecs=avc1.42E01E"}),"Your browser does not support the video tag."]}):e.jsxs(z,{onClick:()=>{ce(!0),setTimeout(()=>{he.current?.play()},100)},children:[e.jsx(b.default,{src:G.thumbnail,alt:"Video thumbnail",fill:!0,style:{objectFit:"cover",borderRadius:"inherit"},priority:!0,draggable:!1}),e.jsx(C,{children:e.jsx(j.Play,{size:32,color:"white"})})]}):e.jsx(f.Video,{src:G.url,thumbnail:G.thumbnail,subtitles:[],title:G?.title})}),!!ue.length&&e.jsx(E,{children:!V&&ue}),F&&!!pe.length&&e.jsx(_,{children:pe})]})};
160
+ `;exports.Post=({actions:t,author:i,authorActive:r,authorHref:o,authorImage:n,avatarTooltipContent:j,avatarTooltipSx:I,children:L,content:B,createdDate:M,dropdown:T,hasComments:F,id:W,images:D,isPaidUser:J,isPaywalled:V=!1,link:X,video:G,onJoin:N,monthlyMembershipPrice:O,onImageClick:Y})=>{const K=v.default.useId(),Q=v.default.useRef(null),[Z,ee]=v.default.useState(!1),[te,ie]=v.default.useState(-1);v.default.useRef(null);const[re,oe]=v.default.useState(-1),[ne,se]=v.default.useState({x:"30vw",y:"30vh"}),le=!!G?.url&&!!G?.thumbnail,ae=G?.displayHtmlVideo,[de,ce]=v.default.useState(!1),he=v.default.useRef(null);v.default.useEffect(()=>{if(Q.current&&B?.length>0){const e=24,t=Math.ceil(Q.current.offsetHeight/e);ie(t)}else ie(-1)},[B,Z]),v.default.useEffect(()=>{const e=e=>{"ArrowLeft"===e.key?ge():"ArrowRight"===e.key?xe():"Escape"!==e.key&&"Enter"!==e.key||oe(-1)};return"undefined"!=typeof document&&D?.length&&re>-1&&document.addEventListener("keydown",e),()=>{D?.length&&document.removeEventListener("keydown",e)}},[]);const ue=v.default.Children.toArray(t),pe=v.default.Children.toArray(L),xe=()=>{oe(e=>D?.length&&e!==D.length-1?e+1:e)},ge=()=>{oe(e=>D?.length&&0!==e?e-1:e)};return e.jsxs(k,{id:W,children:[re>-1&&!!D?.[re]&&e.jsx(h.Modal,{alwaysRender:!1,controlledOpen:!0,onChange:e=>!e&&oe(-1),children:e.jsxs(h.Modal.Content,{sx:`\n position: relative; \n height: ${ne.y}; \n width: ${ne.x};\n margin: 0 auto;\n `,children:[e.jsx(U,{$side:"left",$visible:0!==re,onClick:ge,children:e.jsx(g.ChevronLeft,{color:"white",size:48})}),e.jsx(b.default,{alt:"",fill:!0,quality:100,onLoad:e=>{const{naturalHeight:t,naturalWidth:i}=e.target;let r=`${i}px`,o=`${t}px`;window?.innerHeight<t&&window?.innerWidth<i?(r=`${Math.floor(.95*window.innerHeight*i/t)}px`,o=`${Math.round(.95*window.innerWidth*t/i)}px`):window?.innerHeight<t?(r=`${Math.floor(.95*window.innerHeight*i/t)}px`,o="95vh"):window?.innerWidth<i&&(r="95vw",o=`${Math.round(.95*window.innerWidth*t/i)}px`),se({x:r,y:o})},draggable:!1,priority:!0,sizes:"100vw",src:D[re],style:{objectFit:"cover"}}),e.jsx(U,{$side:"right",$visible:re!==D.length-1,onClick:xe,children:e.jsx(f.ChevronRight,{color:"white",size:48})})]})}),e.jsxs(q,{children:[n&&"/images/default_avatar.png"!==n?e.jsx(p.Avatar,{isPaidUser:J,as:o?w.default:"button",href:o,image:n,size:64,status:r?"online":void 0,subtitle:e.jsx(c.P,{as:"span",sx:"vertical-align: top;",$fontSize:14,$lineHeight:20,children:e.jsx(u.TimeAgo,{date:new Date(M)})}),title:e.jsx(d.H,{as:o?w.default:"span",href:o,sx:"text-decoration:none;",$bold:!0,$fontSize:18,$lineHeight:26,children:i}),textPosition:"right",tooltipContent:j,tooltipSx:I,sx:o?"img { cursor: pointer; }":void 0}):e.jsxs(l.Box,{$align:"center",$gap:12,children:[e.jsx(p.Avatar.Initials,{name:i||"U",size:64}),e.jsxs(l.Box,{$dir:"column",children:[e.jsx(d.H,{as:o?w.default:"span",href:o,sx:"text-decoration:none;",$bold:!0,$fontSize:18,$lineHeight:26,children:i}),e.jsx(c.P,{as:"span",sx:"vertical-align: top;",$fontSize:14,$lineHeight:20,children:e.jsx(u.TimeAgo,{date:new Date(M)})})]})]}),T]}),!!B?.length&&e.jsxs("div",{style:{padding:"16px 24px"},children:[V&&te>1?e.jsx($.default,{lines:2,more:"Continue Reading",onClick:N,anchorClass:"see-more",expanded:!1,truncatedEndingComponent:"... ",children:e.jsx(c.P,{$sx:"white-space: pre-line; word-break: break-word;",$textClampLines:2,children:e.jsx(a.Highlighter,{highlightRender:t=>e.jsx(c.P,{as:"span",$color:"primary-blue-2",children:e.jsx(w.default,{href:t,target:"_blank",children:t})}),seperator:s.URL_REGEX,text:B})})}):e.jsx($.default,{lines:5,more:"See more",less:"See less",anchorClass:"see-more-toggle",className:"post-content",expanded:Z,onClick:()=>ee(e=>!e),truncatedEndingComponent:"... ",children:e.jsx(c.P,{$sx:"white-space: pre-line; word-break: break-word;",innerRef:Q,children:e.jsx(a.Highlighter,{highlightRender:t=>e.jsx(c.P,{as:"span",$color:"primary-blue-2",children:e.jsx(w.default,{href:t,target:"_blank",children:t})}),seperator:s.URL_REGEX,text:V&&1===te?"This is a premium post. Join to the membership to unlock the full access.":B})})}),V&&!D?.length&&e.jsx(A,{onClick:N,children:e.jsxs(c.P,{$fontSize:14,$mediumBold:!0,children:["Join now for $",O," per month"]})})]}),V&&!!D?.length&&!le&&e.jsxs(R,{children:[e.jsx(b.default,{alt:"",width:650,height:427,priority:!0,quality:100,src:D[0],style:{objectFit:"fill",height:"100%",width:"100%",filter:"blur(60px)",position:"absolute",top:0,left:"50%",transform:"translateX(-50%)"}}),e.jsx(x.Lock,{size:40,color:"white",sx:"z-index: 1"}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",zIndex:1},children:[e.jsx(c.P,{$color:"white",$fontSize:14,$bold:!0,$lineHeight:20,children:"Become a member"}),e.jsx(c.P,{$color:"white",$fontSize:14,$bold:!0,$lineHeight:20,children:"to unlock this post"})]}),e.jsx(A,{onClick:N,style:{zIndex:1,marginTop:0},children:e.jsxs(c.P,{$fontSize:14,$mediumBold:!0,children:["Join now for $",O," per month"]})})]}),!!D?.length&&!le&&!V&&e.jsxs(H,{$numImages:D.length,children:[D.slice(0,4).map((t,i)=>e.jsx(P,{children:e.jsx(b.default,{alt:"",fill:!0,onClick:()=>{Y?.(i),oe(i)},quality:100,src:t,draggable:!1,style:{cursor:"pointer",objectFit:"cover"}})},`${K}${t.slice(0,15)}${i}`)),D.length>4&&e.jsxs(d.H,{as:"p",className:"more-than",sx:"pointer-events: none;",$color:"grey-10",$fontSize:28,$lineHeight:36,$semiBold:!0,children:["+",D.length-4]})]}),!D?.length&&!le&&X&&!V&&e.jsxs(w.default,{href:X.url,target:"_blank",children:[e.jsx(P,{children:e.jsx(b.default,{alt:"",fill:!0,quality:100,src:X.imageUrl,draggable:!1,style:{cursor:"pointer",objectFit:"cover"}})}),e.jsxs(l.Box,{$dir:"column",$gap:8,sx:"padding: 8px 16px;",children:[e.jsx(c.P,{$color:"grey-2",$semiBold:!0,children:X.title}),e.jsx(c.P,{$color:"grey-5",children:X.description})]})]}),le&&e.jsx(S,{children:ae?de?e.jsxs("video",{ref:he,style:{width:"100%",height:"100%"},controls:!0,playsInline:!0,poster:G.thumbnail,children:[G.videoUrls.webm&&e.jsx("source",{src:G.videoUrls.webm,type:"video/webm; codecs=vp9"}),G.videoUrls.mp4&&e.jsx("source",{src:G.videoUrls.mp4,type:"video/mp4; codecs=avc1.42E01E"}),"Your browser does not support the video tag."]}):e.jsxs(z,{onClick:()=>{ce(!0),setTimeout(()=>{he.current?.play()},100)},children:[e.jsx(b.default,{src:G.thumbnail,alt:"Video thumbnail",fill:!0,style:{objectFit:"cover",borderRadius:"inherit"},priority:!0,draggable:!1}),e.jsx(C,{children:e.jsx(y.Play,{size:32,color:"white"})})]}):e.jsx(m.Video,{src:G.url,thumbnail:G.thumbnail,subtitles:[],title:G?.title})}),!!ue.length&&e.jsx(E,{children:!V&&ue}),F&&!!pe.length&&e.jsx(_,{children:pe})]})};
@@ -1 +1 @@
1
- {"version":3,"file":"playlist-item.d.ts","sourceRoot":"","sources":["../../../../../src/components/media/video-player/playlist-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,UAAU,iBAAiB;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAiD;IAC3E,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;CAClC;AAED,eAAO,MAAM,YAAY,0FAuIxB,CAAC"}
1
+ {"version":3,"file":"playlist-item.d.ts","sourceRoot":"","sources":["../../../../../src/components/media/video-player/playlist-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,UAAU,iBAAiB;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAiD;IAC3E,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,O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,IAAI,CAAC,EAAE;QACL,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,KAAK,CAAC,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,EAAE;YACT,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,GAAG,CAAC,EAAE,MAAM,CAAC;SACd,CAAC;QACF,gBAAgB,CAAC,EAAE,OAAO,CAAC;KAC5B,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED,eAAO,MAAM,IAAI,8PAsBd,SAAS,4CA2cX,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soul-refiner/design-system",
3
- "version": "2.14.181",
3
+ "version": "2.14.183",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "license": "MIT",