@micromag/screen-conversation 0.3.105 → 0.3.106
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/es/index.js +10 -4
- package/lib/index.js +10 -4
- package/package.json +12 -12
package/es/index.js
CHANGED
|
@@ -35,6 +35,7 @@ var propTypes$1 = {
|
|
|
35
35
|
onChange: PropTypes$1.func,
|
|
36
36
|
withAnimation: PropTypes$1.bool,
|
|
37
37
|
isPlaying: PropTypes$1.bool,
|
|
38
|
+
shouldLoad: PropTypes$1.bool,
|
|
38
39
|
speakerStyle: PropTypes.textStyle,
|
|
39
40
|
messageStyle: PropTypes.textStyle,
|
|
40
41
|
className: PropTypes$1.string
|
|
@@ -50,6 +51,7 @@ var defaultProps$1 = {
|
|
|
50
51
|
onChange: null,
|
|
51
52
|
withAnimation: false,
|
|
52
53
|
isPlaying: false,
|
|
54
|
+
shouldLoad: true,
|
|
53
55
|
messageStyle: null,
|
|
54
56
|
speakerStyle: null,
|
|
55
57
|
className: null
|
|
@@ -68,6 +70,7 @@ var ConversationMessage = function ConversationMessage(_ref) {
|
|
|
68
70
|
onChange = _ref.onChange,
|
|
69
71
|
withAnimation = _ref.withAnimation,
|
|
70
72
|
isPlaying = _ref.isPlaying,
|
|
73
|
+
shouldLoad = _ref.shouldLoad,
|
|
71
74
|
messageStyle = _ref.messageStyle,
|
|
72
75
|
speakerStyle = _ref.speakerStyle,
|
|
73
76
|
className = _ref.className;
|
|
@@ -152,7 +155,8 @@ var ConversationMessage = function ConversationMessage(_ref) {
|
|
|
152
155
|
}, /*#__PURE__*/React.createElement("img", {
|
|
153
156
|
className: styles.avatar,
|
|
154
157
|
src: avatarUrl,
|
|
155
|
-
alt: speakerName
|
|
158
|
+
alt: speakerName,
|
|
159
|
+
loading: "lazy"
|
|
156
160
|
})) : null, /*#__PURE__*/React.createElement(Text, {
|
|
157
161
|
body: speakerName,
|
|
158
162
|
textStyle: speakerStyle
|
|
@@ -163,7 +167,8 @@ var ConversationMessage = function ConversationMessage(_ref) {
|
|
|
163
167
|
}, /*#__PURE__*/React.createElement(Visual, {
|
|
164
168
|
media: image,
|
|
165
169
|
width: "100%",
|
|
166
|
-
playing: isPlaying
|
|
170
|
+
playing: isPlaying,
|
|
171
|
+
shouldLoad: shouldLoad
|
|
167
172
|
})) : null, /*#__PURE__*/React.createElement(Text, {
|
|
168
173
|
className: styles.messageBody,
|
|
169
174
|
body: messageBody,
|
|
@@ -245,7 +250,7 @@ var ConversationScreen = function ConversationScreen(_ref) {
|
|
|
245
250
|
isCapture = _useScreenRenderConte.isCapture;
|
|
246
251
|
|
|
247
252
|
var backgroundPlaying = current && (isView || isEdit);
|
|
248
|
-
var
|
|
253
|
+
var mediaShouldLoad = current || active;
|
|
249
254
|
var withAnimation = isView && !isStatic && timingMode === 'sequence';
|
|
250
255
|
|
|
251
256
|
var _ref2 = conversation || {},
|
|
@@ -366,7 +371,7 @@ var ConversationScreen = function ConversationScreen(_ref) {
|
|
|
366
371
|
height: height,
|
|
367
372
|
resolution: resolution,
|
|
368
373
|
playing: backgroundPlaying,
|
|
369
|
-
shouldLoad:
|
|
374
|
+
shouldLoad: mediaShouldLoad
|
|
370
375
|
}) : null, /*#__PURE__*/React.createElement(Container, {
|
|
371
376
|
width: width,
|
|
372
377
|
height: height
|
|
@@ -425,6 +430,7 @@ var ConversationScreen = function ConversationScreen(_ref) {
|
|
|
425
430
|
onChange: conversationStateChange,
|
|
426
431
|
withAnimation: withAnimation,
|
|
427
432
|
isPlaying: current && shouldPlay,
|
|
433
|
+
shouldLoad: mediaShouldLoad,
|
|
428
434
|
messageStyle: messageStyle,
|
|
429
435
|
speakerStyle: speakerStyle
|
|
430
436
|
});
|
package/lib/index.js
CHANGED
|
@@ -57,6 +57,7 @@ var propTypes$1 = {
|
|
|
57
57
|
onChange: PropTypes__default["default"].func,
|
|
58
58
|
withAnimation: PropTypes__default["default"].bool,
|
|
59
59
|
isPlaying: PropTypes__default["default"].bool,
|
|
60
|
+
shouldLoad: PropTypes__default["default"].bool,
|
|
60
61
|
speakerStyle: core.PropTypes.textStyle,
|
|
61
62
|
messageStyle: core.PropTypes.textStyle,
|
|
62
63
|
className: PropTypes__default["default"].string
|
|
@@ -72,6 +73,7 @@ var defaultProps$1 = {
|
|
|
72
73
|
onChange: null,
|
|
73
74
|
withAnimation: false,
|
|
74
75
|
isPlaying: false,
|
|
76
|
+
shouldLoad: true,
|
|
75
77
|
messageStyle: null,
|
|
76
78
|
speakerStyle: null,
|
|
77
79
|
className: null
|
|
@@ -90,6 +92,7 @@ var ConversationMessage = function ConversationMessage(_ref) {
|
|
|
90
92
|
onChange = _ref.onChange,
|
|
91
93
|
withAnimation = _ref.withAnimation,
|
|
92
94
|
isPlaying = _ref.isPlaying,
|
|
95
|
+
shouldLoad = _ref.shouldLoad,
|
|
93
96
|
messageStyle = _ref.messageStyle,
|
|
94
97
|
speakerStyle = _ref.speakerStyle,
|
|
95
98
|
className = _ref.className;
|
|
@@ -174,7 +177,8 @@ var ConversationMessage = function ConversationMessage(_ref) {
|
|
|
174
177
|
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
175
178
|
className: styles.avatar,
|
|
176
179
|
src: avatarUrl,
|
|
177
|
-
alt: speakerName
|
|
180
|
+
alt: speakerName,
|
|
181
|
+
loading: "lazy"
|
|
178
182
|
})) : null, /*#__PURE__*/React__default["default"].createElement(Text__default["default"], {
|
|
179
183
|
body: speakerName,
|
|
180
184
|
textStyle: speakerStyle
|
|
@@ -185,7 +189,8 @@ var ConversationMessage = function ConversationMessage(_ref) {
|
|
|
185
189
|
}, /*#__PURE__*/React__default["default"].createElement(Visual__default["default"], {
|
|
186
190
|
media: image,
|
|
187
191
|
width: "100%",
|
|
188
|
-
playing: isPlaying
|
|
192
|
+
playing: isPlaying,
|
|
193
|
+
shouldLoad: shouldLoad
|
|
189
194
|
})) : null, /*#__PURE__*/React__default["default"].createElement(Text__default["default"], {
|
|
190
195
|
className: styles.messageBody,
|
|
191
196
|
body: messageBody,
|
|
@@ -267,7 +272,7 @@ var ConversationScreen = function ConversationScreen(_ref) {
|
|
|
267
272
|
isCapture = _useScreenRenderConte.isCapture;
|
|
268
273
|
|
|
269
274
|
var backgroundPlaying = current && (isView || isEdit);
|
|
270
|
-
var
|
|
275
|
+
var mediaShouldLoad = current || active;
|
|
271
276
|
var withAnimation = isView && !isStatic && timingMode === 'sequence';
|
|
272
277
|
|
|
273
278
|
var _ref2 = conversation || {},
|
|
@@ -388,7 +393,7 @@ var ConversationScreen = function ConversationScreen(_ref) {
|
|
|
388
393
|
height: height,
|
|
389
394
|
resolution: resolution,
|
|
390
395
|
playing: backgroundPlaying,
|
|
391
|
-
shouldLoad:
|
|
396
|
+
shouldLoad: mediaShouldLoad
|
|
392
397
|
}) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
|
|
393
398
|
width: width,
|
|
394
399
|
height: height
|
|
@@ -447,6 +452,7 @@ var ConversationScreen = function ConversationScreen(_ref) {
|
|
|
447
452
|
onChange: conversationStateChange,
|
|
448
453
|
withAnimation: withAnimation,
|
|
449
454
|
isPlaying: current && shouldPlay,
|
|
455
|
+
shouldLoad: mediaShouldLoad,
|
|
450
456
|
messageStyle: messageStyle,
|
|
451
457
|
speakerStyle: speakerStyle
|
|
452
458
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-conversation",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.106",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,16 +49,16 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
|
-
"@micromag/core": "^0.3.
|
|
53
|
-
"@micromag/element-background": "^0.3.
|
|
54
|
-
"@micromag/element-call-to-action": "^0.3.
|
|
55
|
-
"@micromag/element-container": "^0.3.
|
|
56
|
-
"@micromag/element-heading": "^0.3.
|
|
57
|
-
"@micromag/element-layout": "^0.3.
|
|
58
|
-
"@micromag/element-scroll": "^0.3.
|
|
59
|
-
"@micromag/element-text": "^0.3.
|
|
60
|
-
"@micromag/element-visual": "^0.3.
|
|
61
|
-
"@micromag/transforms": "^0.3.
|
|
52
|
+
"@micromag/core": "^0.3.106",
|
|
53
|
+
"@micromag/element-background": "^0.3.106",
|
|
54
|
+
"@micromag/element-call-to-action": "^0.3.106",
|
|
55
|
+
"@micromag/element-container": "^0.3.106",
|
|
56
|
+
"@micromag/element-heading": "^0.3.106",
|
|
57
|
+
"@micromag/element-layout": "^0.3.106",
|
|
58
|
+
"@micromag/element-scroll": "^0.3.106",
|
|
59
|
+
"@micromag/element-text": "^0.3.106",
|
|
60
|
+
"@micromag/element-visual": "^0.3.106",
|
|
61
|
+
"@micromag/transforms": "^0.3.106",
|
|
62
62
|
"classnames": "^2.2.6",
|
|
63
63
|
"lodash": "^4.17.21",
|
|
64
64
|
"prop-types": "^15.7.2",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "865842ef7fbdc41f89dd0891857989ded63d44c4"
|
|
72
72
|
}
|