@glomex/integration-react 1.1312.4 → 1.1314.4

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,4 +1,4 @@
1
- import type { GlomexMediaItemElement } from '@glomex/integration-web-component';
1
+ import { type GlomexMediaItemElement, type GlomexMediaItemWithOverrides } from '@glomex/integration-web-component';
2
2
  import type { DetailedHTMLProps, HTMLAttributes } from 'react';
3
3
  declare global {
4
4
  namespace JSX {
@@ -12,16 +12,7 @@ declare global {
12
12
  /**
13
13
  * React component to define a glomex media item.
14
14
  */
15
- export declare const GlomexMediaItemReact: ({ id, overrides }: {
16
- id: string | {
17
- id: string;
18
- overrides?: {
19
- title?: string;
20
- poster?: string;
21
- };
22
- };
23
- overrides?: {
24
- title?: string;
25
- poster?: string;
26
- };
15
+ export declare const GlomexMediaItemReact: (item: {
16
+ id: string;
17
+ overrides?: GlomexMediaItemWithOverrides["overrides"];
27
18
  }) => JSX.Element;
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ScriptType } from '@glomex/integration-web-component';
2
3
  /**
3
4
  * React component to define a glomex media item.
4
5
  */
5
- export const GlomexMediaItemReact = ({ id, overrides }) => {
6
- const { id: mediaItemId, overrides: mediaItemOverrides } = typeof id === 'string' ? { id, overrides } : id;
7
- return (_jsx("glomex-media-item", { id: mediaItemId, title: mediaItemOverrides?.title, poster: mediaItemOverrides?.poster }));
6
+ export const GlomexMediaItemReact = (item) => {
7
+ const { id: mediaItemId, overrides: mediaItemOverrides } = item;
8
+ return (_jsx("glomex-media-item", { id: mediaItemId, title: mediaItemOverrides?.title, poster: mediaItemOverrides?.poster, children: _jsx("script", { type: ScriptType.EXTERNAL_MEDIA_ITEM, children: JSON.stringify(mediaItemOverrides || {}) }) }));
8
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glomex/integration-react",
3
- "version": "1.1312.4",
3
+ "version": "1.1314.4",
4
4
  "description": "React component to integrate the glomex player",
5
5
  "documentation": "https://docs.glomex.com",
6
6
  "homepage": "https://glomex.com",
@@ -27,7 +27,7 @@
27
27
  "watch": "tsc --build --watch"
28
28
  },
29
29
  "dependencies": {
30
- "@glomex/integration-web-component": "^1.1312.4"
30
+ "@glomex/integration-web-component": "^1.1314.4"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": ">=16.8.0",
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "0229af187d937b80d45edb3a18295522b2d341e4"
43
+ "gitHead": "51eb5cdd07185bef6a932201345f00019d53a20b"
44
44
  }