react-datocms 7.0.3 → 7.1.0-0

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.
@@ -57,11 +57,11 @@ const lazy_1 = __importDefault(require("@mux/mux-player-react/lazy"));
57
57
  // `<MuxPlayer />` component.
58
58
  const index_js_1 = require("../useVideoPlayer/index.js");
59
59
  exports.VideoPlayer = (0, react_1.forwardRef)((props, ref) => {
60
- const { data = {}, disableCookies = true, preload = 'metadata', style: styleFromProps } = props, rest = __rest(props, ["data", "disableCookies", "preload", "style"]);
60
+ const { data = {}, disableCookies = true, disableTracking = true, preload = 'metadata', style: styleFromProps } = props, rest = __rest(props, ["data", "disableCookies", "disableTracking", "preload", "style"]);
61
61
  const { title, playbackId, style: styleFromHook, placeholder, } = (0, index_js_1.useVideoPlayer)({
62
62
  data,
63
63
  });
64
64
  const style = Object.assign(Object.assign({}, styleFromHook), styleFromProps);
65
- return (react_1.default.createElement(lazy_1.default, Object.assign({ ref: ref, streamType: "on-demand", preload: preload, title: title, disableCookies: disableCookies, playbackId: playbackId, style: style, placeholder: placeholder }, rest)));
65
+ return (react_1.default.createElement(lazy_1.default, Object.assign({ ref: ref, streamType: "on-demand", preload: preload, title: title, disableCookies: disableCookies, disableTracking: disableTracking, playbackId: playbackId, style: style, placeholder: placeholder }, rest)));
66
66
  });
67
67
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/VideoPlayer/index.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,gFAAgF;AAChF,8EAA8E;AAC9E,2EAA2E;AAC3E,EAAE;AACF,qEAAqE;AACrE,EAAE;AACF,kCAAkC;AAElC,+CAA0C;AAO1C,gFAAgF;AAChF,+EAA+E;AAC/E,mEAAmE;AACnE,kBAAkB;AAElB,sEAAmD;AAEnD,oEAAoE;AACpE,qEA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I,GAAG,EAAE,EACT,cAAc,GAAG,IAAI,EACrB,eAAe,GAAG,IAAI,EACtB,OAAO,GAAG,UAAU,EACpB,KAAK,EAAE,cAAc,KAEnB,KAAK,EADJ,IAAI,UACL,KAAK,EAPH,iEAOL,CAAQ,CAAC;IAEV,MAAM,EACJ,KAAK,EACL,UAAU,EACV,KAAK,EAAE,aAAa,EACpB,WAAW,GACZ,GAAG,IAAA,yBAAc,EAAC;QACjB,IAAI;KACL,CAAC,CAAC;IAEH,MAAM,KAAK,mCACN,aAAa,GACb,cAAc,CAClB,CAAC;IAEF,OAAO,CACL,8BAAC,cAAS,kBACR,GAAG,EAAE,GAAG,EACR,UAAU,EAAC,WAAW,EACtB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,IACpB,IAAI,EACR,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -28,11 +28,11 @@ import MuxPlayer from '@mux/mux-player-react/lazy';
28
28
  // `<MuxPlayer />` component.
29
29
  import { useVideoPlayer } from '../useVideoPlayer/index.js';
30
30
  export const VideoPlayer = forwardRef((props, ref) => {
31
- const { data = {}, disableCookies = true, preload = 'metadata', style: styleFromProps } = props, rest = __rest(props, ["data", "disableCookies", "preload", "style"]);
31
+ const { data = {}, disableCookies = true, disableTracking = true, preload = 'metadata', style: styleFromProps } = props, rest = __rest(props, ["data", "disableCookies", "disableTracking", "preload", "style"]);
32
32
  const { title, playbackId, style: styleFromHook, placeholder, } = useVideoPlayer({
33
33
  data,
34
34
  });
35
35
  const style = Object.assign(Object.assign({}, styleFromHook), styleFromProps);
36
- return (React.createElement(MuxPlayer, Object.assign({ ref: ref, streamType: "on-demand", preload: preload, title: title, disableCookies: disableCookies, playbackId: playbackId, style: style, placeholder: placeholder }, rest)));
36
+ return (React.createElement(MuxPlayer, Object.assign({ ref: ref, streamType: "on-demand", preload: preload, title: title, disableCookies: disableCookies, disableTracking: disableTracking, playbackId: playbackId, style: style, placeholder: placeholder }, rest)));
37
37
  });
38
38
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/VideoPlayer/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;AAEb,gFAAgF;AAChF,8EAA8E;AAC9E,2EAA2E;AAC3E,EAAE;AACF,qEAAqE;AACrE,EAAE;AACF,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAO1C,gFAAgF;AAChF,+EAA+E;AAC/E,mEAAmE;AACnE,kBAAkB;AAElB,OAAO,SAAS,MAAM,4BAA4B,CAAC;AAEnD,oEAAoE;AACpE,qEAAqE;AACrE,6BAA6B;AAE7B,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAqC5D,MAAM,CAAC,MAAM,WAAW,GAEY,UAAU,CAG5C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,MAAM,EACJ,IAAI,GAAG,EAAE,EACT,cAAc,GAAG,IAAI,EACrB,OAAO,GAAG,UAAU,EACpB,KAAK,EAAE,cAAc,KAEnB,KAAK,EADJ,IAAI,UACL,KAAK,EANH,8CAML,CAAQ,CAAC;IAEV,MAAM,EACJ,KAAK,EACL,UAAU,EACV,KAAK,EAAE,aAAa,EACpB,WAAW,GACZ,GAAG,cAAc,CAAC;QACjB,IAAI;KACL,CAAC,CAAC;IAEH,MAAM,KAAK,mCACN,aAAa,GACb,cAAc,CAClB,CAAC;IAEF,OAAO,CACL,oBAAC,SAAS,kBACR,GAAG,EAAE,GAAG,EACR,UAAU,EAAC,WAAW,EACtB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,KAAK,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WAAW,EAAE,WAAW,IACpB,IAAI,EACR,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-datocms",
3
- "version": "7.0.3",
3
+ "version": "7.1.0-0",
4
4
  "engines": {
5
5
  "node": ">=8.0.0"
6
6
  },
@@ -95,7 +95,7 @@
95
95
  "homepage": "https://github.com/datocms/react-datocms",
96
96
  "devDependencies": {
97
97
  "@biomejs/biome": "^1.6.3",
98
- "@mux/mux-player-react": "*",
98
+ "@mux/mux-player-react": ">=2.5.0 <3",
99
99
  "@types/enzyme": "^3.10.8",
100
100
  "@types/enzyme-to-json": "^1.5.4",
101
101
  "@types/jest": "^29.5.11",
@@ -115,7 +115,7 @@
115
115
  "react-dom": "^17.0.2",
116
116
  "resize-observer-polyfill": "^1.5.1",
117
117
  "rimraf": "^3.0.2",
118
- "ts-jest": "^29.1.2",
118
+ "ts-jest": "^29.2.5",
119
119
  "typescript": "^5.0.0"
120
120
  },
121
121
  "scripts": {
@@ -130,15 +130,15 @@
130
130
  "tsc:esm": "tsc --project ./tsconfig.esnext.json"
131
131
  },
132
132
  "peerDependencies": {
133
- "react": ">= 16.12.0"
133
+ "react": ">= 16.12.0 || ^19.0.0-rc"
134
134
  },
135
135
  "dependencies": {
136
+ "@mux/mux-player-react": "*",
136
137
  "datocms-listen": "^0.1.9",
137
138
  "datocms-structured-text-generic-html-renderer": "^4.0.1",
138
139
  "datocms-structured-text-utils": "^4.0.1",
139
140
  "react-intersection-observer": "^9.4.3",
140
141
  "react-string-replace": "^1.1.0",
141
- "use-deep-compare-effect": "^1.6.1",
142
- "@mux/mux-player-react": "*"
142
+ "use-deep-compare-effect": "^1.6.1"
143
143
  }
144
144
  }
@@ -72,6 +72,7 @@ export const VideoPlayer: (
72
72
  const {
73
73
  data = {},
74
74
  disableCookies = true,
75
+ disableTracking = true,
75
76
  preload = 'metadata',
76
77
  style: styleFromProps,
77
78
  ...rest
@@ -98,6 +99,7 @@ export const VideoPlayer: (
98
99
  preload={preload}
99
100
  title={title}
100
101
  disableCookies={disableCookies}
102
+ disableTracking={disableTracking}
101
103
  playbackId={playbackId}
102
104
  style={style}
103
105
  placeholder={placeholder}