@streamlayer/react-ui 0.75.0 → 0.75.1

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,6 +1,6 @@
1
- import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
- import { VideoPlayer as m } from "../../../../video-player/index.js";
3
- import { InsightContainer as c, Image as e, InsightContent as h, Title as p, Description as u, ActionBtn as I } from "./styles.js";
1
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
+ import { VideoPlayer as c } from "../../../../video-player/index.js";
3
+ import { InsightContainer as h, Image as p, InsightContent as o, Title as u, Description as e, ActionBtn as I } from "./styles.js";
4
4
  import "react";
5
5
  import "../../../../icons/index.js";
6
6
  import "@linaria/react";
@@ -8,16 +8,16 @@ import "../../../../video-player/styles.js";
8
8
  const b = ({
9
9
  video: r,
10
10
  image: n,
11
- heading: l,
12
- body: s,
13
- action: i
14
- }) => /* @__PURE__ */ o(c, { children: [
15
- (r == null ? void 0 : r.url) && /* @__PURE__ */ t(m, { source: r.url, poster: r.thumbnailUrl }),
16
- n && /* @__PURE__ */ t(e, { src: n }),
17
- /* @__PURE__ */ o(h, { children: [
18
- /* @__PURE__ */ t(p, { children: l }),
11
+ heading: s,
12
+ body: m,
13
+ action: l
14
+ }) => /* @__PURE__ */ i(h, { children: [
15
+ (r == null ? void 0 : r.url) && /* @__PURE__ */ t(c, { source: r.url, poster: r.thumbnailUrl }),
16
+ n && !(r != null && r.url) && /* @__PURE__ */ t(p, { src: n }),
17
+ /* @__PURE__ */ i(o, { children: [
19
18
  /* @__PURE__ */ t(u, { children: s }),
20
- i && /* @__PURE__ */ t(I, { onClick: i, children: "View Insight" })
19
+ /* @__PURE__ */ t(e, { children: m }),
20
+ l && /* @__PURE__ */ t(I, { onClick: l, children: "View Insight" })
21
21
  ] })
22
22
  ] });
23
23
  export {
@@ -1,4 +1,4 @@
1
- import { jsxs as l, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
2
  import { useMemo as h } from "react";
3
3
  import { VideoPlayer as u } from "../../video-player/index.js";
4
4
  import { isValidDate as g, formatDate as D, formatTime as v } from "../../../utils/common.js";
@@ -7,26 +7,26 @@ import "../../icons/index.js";
7
7
  import "@linaria/react";
8
8
  import "../../video-player/styles.js";
9
9
  const A = ({ created: m, image: c, title: f, instantView: r }) => {
10
- const e = h(() => {
10
+ const d = h(() => {
11
11
  if (m) {
12
- const d = new Date(m);
13
- if (g(d))
12
+ const l = new Date(m);
13
+ if (g(l))
14
14
  return {
15
- date: D(d),
16
- time: v(d)
15
+ date: D(l),
16
+ time: v(l)
17
17
  };
18
18
  }
19
19
  return null;
20
- }, [m]), p = (r == null ? void 0 : r.image) || c;
21
- return /* @__PURE__ */ l(x, { children: [
22
- e && /* @__PURE__ */ l(C, { children: [
23
- e.date,
20
+ }, [m]), e = (r == null ? void 0 : r.image) || c;
21
+ return /* @__PURE__ */ p(x, { children: [
22
+ d && /* @__PURE__ */ p(C, { children: [
23
+ d.date,
24
24
  " · ",
25
- e.time
25
+ d.time
26
26
  ] }),
27
27
  (r == null ? void 0 : r.video) && /* @__PURE__ */ o(u, { source: r.video.url, poster: r.video.thumbnailUrl }),
28
- p && /* @__PURE__ */ o(T, { src: p }),
29
- /* @__PURE__ */ l(b, { children: [
28
+ e && !(r != null && r.video) && /* @__PURE__ */ o(T, { src: e }),
29
+ /* @__PURE__ */ p(b, { children: [
30
30
  /* @__PURE__ */ o(j, { children: (r == null ? void 0 : r.heading) || f }),
31
31
  /* @__PURE__ */ o(y, { children: r == null ? void 0 : r.body })
32
32
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "0.75.0",
3
+ "version": "0.75.1",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -90,6 +90,6 @@
90
90
  "vite-plugin-svgr": "^4.1.0",
91
91
  "vite-svg-loader": "^4.0.0",
92
92
  "vite-tsconfig-paths": "^4.2.1",
93
- "@streamlayer/react": "^0.32.5"
93
+ "@streamlayer/react": "^0.32.6"
94
94
  }
95
95
  }