@micromag/screen-text 0.2.401 → 0.2.406

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.
Files changed (3) hide show
  1. package/es/index.js +27 -23
  2. package/lib/index.js +27 -23
  3. package/package.json +10 -10
package/es/index.js CHANGED
@@ -29,6 +29,7 @@ var propTypes = {
29
29
  background: PropTypes$1.backgroundElement,
30
30
  callToAction: PropTypes$1.callToAction,
31
31
  current: PropTypes.bool,
32
+ active: PropTypes.bool,
32
33
  transitions: PropTypes$1.transitions,
33
34
  transitionStagger: PropTypes.number,
34
35
  className: PropTypes.string
@@ -42,6 +43,7 @@ var defaultProps = {
42
43
  background: null,
43
44
  callToAction: null,
44
45
  current: true,
46
+ active: true,
45
47
  transitions: null,
46
48
  transitionStagger: 100,
47
49
  className: null
@@ -58,6 +60,7 @@ var TextScreen = function TextScreen(_ref) {
58
60
  background = _ref.background,
59
61
  callToAction = _ref.callToAction,
60
62
  current = _ref.current,
63
+ active = _ref.active,
61
64
  transitions = _ref.transitions,
62
65
  transitionStagger = _ref.transitionStagger,
63
66
  className = _ref.className;
@@ -144,7 +147,8 @@ var TextScreen = function TextScreen(_ref) {
144
147
  background: background,
145
148
  width: width,
146
149
  height: height,
147
- playing: backgroundPlaying
150
+ playing: backgroundPlaying,
151
+ shouldLoad: current || active
148
152
  }) : null, /*#__PURE__*/React.createElement(Container, {
149
153
  width: width,
150
154
  height: height
@@ -209,8 +213,8 @@ var definition = [{
209
213
  type: 'screen',
210
214
  group: {
211
215
  label: defineMessage({
212
- "id": "fIawTr",
213
- "defaultMessage": [{
216
+ id: "fIawTr",
217
+ defaultMessage: [{
214
218
  "type": 0,
215
219
  "value": "Text"
216
220
  }]
@@ -218,8 +222,8 @@ var definition = [{
218
222
  order: 2
219
223
  },
220
224
  title: defineMessage({
221
- "id": "S9YpbV",
222
- "defaultMessage": [{
225
+ id: "S9YpbV",
226
+ defaultMessage: [{
223
227
  "type": 0,
224
228
  "value": "Text"
225
229
  }]
@@ -232,8 +236,8 @@ var definition = [{
232
236
  type: 'screen-layout',
233
237
  defaultValue: 'top',
234
238
  label: defineMessage({
235
- "id": "4iBXj2",
236
- "defaultMessage": [{
239
+ id: "4iBXj2",
240
+ defaultMessage: [{
237
241
  "type": 0,
238
242
  "value": "Layout"
239
243
  }]
@@ -245,8 +249,8 @@ var definition = [{
245
249
  textStyle: 'text'
246
250
  },
247
251
  label: defineMessage({
248
- "id": "4E2gbX",
249
- "defaultMessage": [{
252
+ id: "4E2gbX",
253
+ defaultMessage: [{
250
254
  "type": 0,
251
255
  "value": "Text"
252
256
  }]
@@ -255,8 +259,8 @@ var definition = [{
255
259
  name: 'background',
256
260
  type: 'background',
257
261
  label: defineMessage({
258
- "id": "+MPZRu",
259
- "defaultMessage": [{
262
+ id: "+MPZRu",
263
+ defaultMessage: [{
260
264
  "type": 0,
261
265
  "value": "Background"
262
266
  }]
@@ -275,8 +279,8 @@ var definition = [{
275
279
  type: 'screen',
276
280
  group: {
277
281
  label: defineMessage({
278
- "id": "fIawTr",
279
- "defaultMessage": [{
282
+ id: "fIawTr",
283
+ defaultMessage: [{
280
284
  "type": 0,
281
285
  "value": "Text"
282
286
  }]
@@ -284,8 +288,8 @@ var definition = [{
284
288
  order: 2
285
289
  },
286
290
  title: defineMessage({
287
- "id": "oCBQKV",
288
- "defaultMessage": [{
291
+ id: "oCBQKV",
292
+ defaultMessage: [{
289
293
  "type": 0,
290
294
  "value": "Text with title"
291
295
  }]
@@ -298,8 +302,8 @@ var definition = [{
298
302
  type: 'screen-layout',
299
303
  defaultValue: 'top',
300
304
  label: defineMessage({
301
- "id": "4iBXj2",
302
- "defaultMessage": [{
305
+ id: "4iBXj2",
306
+ defaultMessage: [{
303
307
  "type": 0,
304
308
  "value": "Layout"
305
309
  }]
@@ -312,8 +316,8 @@ var definition = [{
312
316
  textStyle: 'heading2'
313
317
  },
314
318
  label: defineMessage({
315
- "id": "N25iDO",
316
- "defaultMessage": [{
319
+ id: "N25iDO",
320
+ defaultMessage: [{
317
321
  "type": 0,
318
322
  "value": "Title"
319
323
  }]
@@ -325,8 +329,8 @@ var definition = [{
325
329
  textStyle: 'text'
326
330
  },
327
331
  label: defineMessage({
328
- "id": "4E2gbX",
329
- "defaultMessage": [{
332
+ id: "4E2gbX",
333
+ defaultMessage: [{
330
334
  "type": 0,
331
335
  "value": "Text"
332
336
  }]
@@ -335,8 +339,8 @@ var definition = [{
335
339
  name: 'background',
336
340
  type: 'background',
337
341
  label: defineMessage({
338
- "id": "+MPZRu",
339
- "defaultMessage": [{
342
+ id: "+MPZRu",
343
+ defaultMessage: [{
340
344
  "type": 0,
341
345
  "value": "Background"
342
346
  }]
package/lib/index.js CHANGED
@@ -49,6 +49,7 @@ var propTypes = {
49
49
  background: core.PropTypes.backgroundElement,
50
50
  callToAction: core.PropTypes.callToAction,
51
51
  current: PropTypes__default["default"].bool,
52
+ active: PropTypes__default["default"].bool,
52
53
  transitions: core.PropTypes.transitions,
53
54
  transitionStagger: PropTypes__default["default"].number,
54
55
  className: PropTypes__default["default"].string
@@ -62,6 +63,7 @@ var defaultProps = {
62
63
  background: null,
63
64
  callToAction: null,
64
65
  current: true,
66
+ active: true,
65
67
  transitions: null,
66
68
  transitionStagger: 100,
67
69
  className: null
@@ -78,6 +80,7 @@ var TextScreen = function TextScreen(_ref) {
78
80
  background = _ref.background,
79
81
  callToAction = _ref.callToAction,
80
82
  current = _ref.current,
83
+ active = _ref.active,
81
84
  transitions = _ref.transitions,
82
85
  transitionStagger = _ref.transitionStagger,
83
86
  className = _ref.className;
@@ -164,7 +167,8 @@ var TextScreen = function TextScreen(_ref) {
164
167
  background: background,
165
168
  width: width,
166
169
  height: height,
167
- playing: backgroundPlaying
170
+ playing: backgroundPlaying,
171
+ shouldLoad: current || active
168
172
  }) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
169
173
  width: width,
170
174
  height: height
@@ -229,8 +233,8 @@ var definition = [{
229
233
  type: 'screen',
230
234
  group: {
231
235
  label: reactIntl.defineMessage({
232
- "id": "fIawTr",
233
- "defaultMessage": [{
236
+ id: "fIawTr",
237
+ defaultMessage: [{
234
238
  "type": 0,
235
239
  "value": "Text"
236
240
  }]
@@ -238,8 +242,8 @@ var definition = [{
238
242
  order: 2
239
243
  },
240
244
  title: reactIntl.defineMessage({
241
- "id": "S9YpbV",
242
- "defaultMessage": [{
245
+ id: "S9YpbV",
246
+ defaultMessage: [{
243
247
  "type": 0,
244
248
  "value": "Text"
245
249
  }]
@@ -252,8 +256,8 @@ var definition = [{
252
256
  type: 'screen-layout',
253
257
  defaultValue: 'top',
254
258
  label: reactIntl.defineMessage({
255
- "id": "4iBXj2",
256
- "defaultMessage": [{
259
+ id: "4iBXj2",
260
+ defaultMessage: [{
257
261
  "type": 0,
258
262
  "value": "Layout"
259
263
  }]
@@ -265,8 +269,8 @@ var definition = [{
265
269
  textStyle: 'text'
266
270
  },
267
271
  label: reactIntl.defineMessage({
268
- "id": "4E2gbX",
269
- "defaultMessage": [{
272
+ id: "4E2gbX",
273
+ defaultMessage: [{
270
274
  "type": 0,
271
275
  "value": "Text"
272
276
  }]
@@ -275,8 +279,8 @@ var definition = [{
275
279
  name: 'background',
276
280
  type: 'background',
277
281
  label: reactIntl.defineMessage({
278
- "id": "+MPZRu",
279
- "defaultMessage": [{
282
+ id: "+MPZRu",
283
+ defaultMessage: [{
280
284
  "type": 0,
281
285
  "value": "Background"
282
286
  }]
@@ -295,8 +299,8 @@ var definition = [{
295
299
  type: 'screen',
296
300
  group: {
297
301
  label: reactIntl.defineMessage({
298
- "id": "fIawTr",
299
- "defaultMessage": [{
302
+ id: "fIawTr",
303
+ defaultMessage: [{
300
304
  "type": 0,
301
305
  "value": "Text"
302
306
  }]
@@ -304,8 +308,8 @@ var definition = [{
304
308
  order: 2
305
309
  },
306
310
  title: reactIntl.defineMessage({
307
- "id": "oCBQKV",
308
- "defaultMessage": [{
311
+ id: "oCBQKV",
312
+ defaultMessage: [{
309
313
  "type": 0,
310
314
  "value": "Text with title"
311
315
  }]
@@ -318,8 +322,8 @@ var definition = [{
318
322
  type: 'screen-layout',
319
323
  defaultValue: 'top',
320
324
  label: reactIntl.defineMessage({
321
- "id": "4iBXj2",
322
- "defaultMessage": [{
325
+ id: "4iBXj2",
326
+ defaultMessage: [{
323
327
  "type": 0,
324
328
  "value": "Layout"
325
329
  }]
@@ -332,8 +336,8 @@ var definition = [{
332
336
  textStyle: 'heading2'
333
337
  },
334
338
  label: reactIntl.defineMessage({
335
- "id": "N25iDO",
336
- "defaultMessage": [{
339
+ id: "N25iDO",
340
+ defaultMessage: [{
337
341
  "type": 0,
338
342
  "value": "Title"
339
343
  }]
@@ -345,8 +349,8 @@ var definition = [{
345
349
  textStyle: 'text'
346
350
  },
347
351
  label: reactIntl.defineMessage({
348
- "id": "4E2gbX",
349
- "defaultMessage": [{
352
+ id: "4E2gbX",
353
+ defaultMessage: [{
350
354
  "type": 0,
351
355
  "value": "Text"
352
356
  }]
@@ -355,8 +359,8 @@ var definition = [{
355
359
  name: 'background',
356
360
  type: 'background',
357
361
  label: reactIntl.defineMessage({
358
- "id": "+MPZRu",
359
- "defaultMessage": [{
362
+ id: "+MPZRu",
363
+ defaultMessage: [{
360
364
  "type": 0,
361
365
  "value": "Background"
362
366
  }]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-text",
3
- "version": "0.2.401",
3
+ "version": "0.2.406",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,14 +49,14 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
- "@micromag/core": "^0.2.401",
53
- "@micromag/element-background": "^0.2.401",
54
- "@micromag/element-call-to-action": "^0.2.401",
55
- "@micromag/element-container": "^0.2.401",
56
- "@micromag/element-heading": "^0.2.401",
57
- "@micromag/element-layout": "^0.2.401",
58
- "@micromag/element-text": "^0.2.401",
59
- "@micromag/transforms": "^0.2.401",
52
+ "@micromag/core": "^0.2.405",
53
+ "@micromag/element-background": "^0.2.406",
54
+ "@micromag/element-call-to-action": "^0.2.405",
55
+ "@micromag/element-container": "^0.2.405",
56
+ "@micromag/element-heading": "^0.2.405",
57
+ "@micromag/element-layout": "^0.2.405",
58
+ "@micromag/element-text": "^0.2.405",
59
+ "@micromag/transforms": "^0.2.405",
60
60
  "classnames": "^2.2.6",
61
61
  "lodash": "^4.17.21",
62
62
  "prop-types": "^15.7.2",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "fd03ec6d9decc9e18d6088a36e47c7b1e0e72b4c"
69
+ "gitHead": "5e1a6de73674624b0cb3f9701140ea8850e6f35e"
70
70
  }