@micromag/screen-audio 0.4.88 → 0.4.90-alpha.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.
Files changed (2) hide show
  1. package/es/index.js +128 -116
  2. package/package.json +11 -11
package/es/index.js CHANGED
@@ -18,7 +18,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
18
18
  var styles = {"container":"micromag-screen-audio-container","background":"micromag-screen-audio-background","content":"micromag-screen-audio-content","audio":"micromag-screen-audio-audio","bottom":"micromag-screen-audio-bottom","empty":"micromag-screen-audio-empty","isPreview":"micromag-screen-audio-isPreview"};
19
19
 
20
20
  function AudioScreen(t0) {
21
- const $ = c(150);
21
+ const $ = c(151);
22
22
  const {
23
23
  layout: t1,
24
24
  audio: t2,
@@ -427,28 +427,38 @@ function AudioScreen(t0) {
427
427
  }
428
428
  let t46;
429
429
  if ($[85] === Symbol.for("react.memo_cache_sentinel")) {
430
- t46 = /*#__PURE__*/jsx(FormattedMessage, {
430
+ t46 = {
431
+ width: "50%",
432
+ height: "50%"
433
+ };
434
+ $[85] = t46;
435
+ } else {
436
+ t46 = $[85];
437
+ }
438
+ let t47;
439
+ if ($[86] === Symbol.for("react.memo_cache_sentinel")) {
440
+ t47 = /*#__PURE__*/jsx(FormattedMessage, {
431
441
  id: "MYZwSA",
432
442
  defaultMessage: "Audio"
433
443
  });
434
- $[85] = t46;
444
+ $[86] = t47;
435
445
  } else {
436
- t46 = $[85];
446
+ t47 = $[86];
437
447
  }
438
- const t47 = !hasAudioUrl;
439
- let t48;
440
- if ($[86] !== customMediaRef || $[87] !== mediaRef) {
441
- t48 = mergeRefs(mediaRef, customMediaRef);
442
- $[86] = customMediaRef;
443
- $[87] = mediaRef;
444
- $[88] = t48;
448
+ const t48 = !hasAudioUrl;
449
+ let t49;
450
+ if ($[87] !== customMediaRef || $[88] !== mediaRef) {
451
+ t49 = mergeRefs(mediaRef, customMediaRef);
452
+ $[87] = customMediaRef;
453
+ $[88] = mediaRef;
454
+ $[89] = t49;
445
455
  } else {
446
- t48 = $[88];
456
+ t49 = $[89];
447
457
  }
448
- const t49 = isIOS || isPreview;
449
- let t50;
450
- if ($[89] !== color || $[90] !== isPreview || $[91] !== progressColor) {
451
- t50 = isPreview ? {
458
+ const t50 = isIOS || isPreview;
459
+ let t51;
460
+ if ($[90] !== color || $[91] !== isPreview || $[92] !== progressColor) {
461
+ t51 = isPreview ? {
452
462
  sampleWidth: 10,
453
463
  sampleMargin: 5,
454
464
  minSampleHeight: 5,
@@ -458,21 +468,21 @@ function AudioScreen(t0) {
458
468
  backgroundColor: color,
459
469
  progressColor
460
470
  };
461
- $[89] = color;
462
- $[90] = isPreview;
463
- $[91] = progressColor;
464
- $[92] = t50;
471
+ $[90] = color;
472
+ $[91] = isPreview;
473
+ $[92] = progressColor;
474
+ $[93] = t51;
465
475
  } else {
466
- t50 = $[92];
476
+ t51 = $[93];
467
477
  }
468
- const t51 = showWave && withWave;
469
- let t52;
470
- if ($[93] !== finalAudio || $[94] !== muted || $[95] !== onEnded || $[96] !== onPause || $[97] !== onPlay || $[98] !== onPlayError || $[99] !== onProgressStep || $[100] !== onSeeked || $[101] !== paused || $[102] !== t48 || $[103] !== t49 || $[104] !== t50 || $[105] !== t51) {
471
- t52 = /*#__PURE__*/jsx(Audio, {
478
+ const t52 = showWave && withWave;
479
+ let t53;
480
+ if ($[94] !== finalAudio || $[95] !== muted || $[96] !== onEnded || $[97] !== onPause || $[98] !== onPlay || $[99] !== onPlayError || $[100] !== onProgressStep || $[101] !== onSeeked || $[102] !== paused || $[103] !== t49 || $[104] !== t50 || $[105] !== t51 || $[106] !== t52) {
481
+ t53 = /*#__PURE__*/jsx(Audio, {
472
482
  ...finalAudio,
473
- mediaRef: t48,
474
- waveFake: t49,
475
- waveProps: t50,
483
+ mediaRef: t49,
484
+ waveFake: t50,
485
+ waveProps: t51,
476
486
  paused: paused,
477
487
  muted: muted,
478
488
  className: styles.audio,
@@ -485,50 +495,52 @@ function AudioScreen(t0) {
485
495
  onSeeked: onSeeked,
486
496
  onEnded: onEnded,
487
497
  onPlayError: onPlayError,
488
- withWave: t51
498
+ withWave: t52
489
499
  });
490
- $[93] = finalAudio;
491
- $[94] = muted;
492
- $[95] = onEnded;
493
- $[96] = onPause;
494
- $[97] = onPlay;
495
- $[98] = onPlayError;
496
- $[99] = onProgressStep;
497
- $[100] = onSeeked;
498
- $[101] = paused;
499
- $[102] = t48;
500
+ $[94] = finalAudio;
501
+ $[95] = muted;
502
+ $[96] = onEnded;
503
+ $[97] = onPause;
504
+ $[98] = onPlay;
505
+ $[99] = onPlayError;
506
+ $[100] = onProgressStep;
507
+ $[101] = onSeeked;
508
+ $[102] = paused;
500
509
  $[103] = t49;
501
510
  $[104] = t50;
502
511
  $[105] = t51;
503
512
  $[106] = t52;
513
+ $[107] = t53;
504
514
  } else {
505
- t52 = $[106];
515
+ t53 = $[107];
506
516
  }
507
- let t53;
508
- if ($[107] !== t47 || $[108] !== t52) {
509
- t53 = /*#__PURE__*/jsx(ScreenElement, {
517
+ let t54;
518
+ if ($[108] !== t48 || $[109] !== t53) {
519
+ t54 = /*#__PURE__*/jsx(ScreenElement, {
510
520
  placeholder: "audio",
511
- emptyLabel: t46,
521
+ placeholderProps: t46,
522
+ placeholderClassName: "position-absolute top-50 start-50 translate-middle w-100",
523
+ emptyLabel: t47,
512
524
  emptyClassName: styles.empty,
513
- isEmpty: t47,
514
- children: t52
525
+ isEmpty: t48,
526
+ children: t53
515
527
  }, "audio");
516
- $[107] = t47;
517
- $[108] = t52;
528
+ $[108] = t48;
518
529
  $[109] = t53;
519
- } else {
520
- t53 = $[109];
521
- }
522
- let t54;
523
- if ($[110] === Symbol.for("react.memo_cache_sentinel")) {
524
- t54 = /*#__PURE__*/jsx(Spacer, {}, "spacer-middle");
525
530
  $[110] = t54;
526
531
  } else {
527
532
  t54 = $[110];
528
533
  }
529
534
  let t55;
530
- if ($[111] !== captions || $[112] !== closedCaptions || $[113] !== current || $[114] !== currentTime || $[115] !== footerProps || $[116] !== hasClosedCaptions || $[117] !== hasFooter || $[118] !== isCapture || $[119] !== isPlaceholder || $[120] !== isPreview || $[121] !== isStatic || $[122] !== spacing || $[123] !== viewerBottomHeight || $[124] !== viewerBottomSidesWidth) {
531
- t55 = !isPlaceholder ? /*#__PURE__*/jsxs("div", {
535
+ if ($[111] === Symbol.for("react.memo_cache_sentinel")) {
536
+ t55 = /*#__PURE__*/jsx(Spacer, {}, "spacer-middle");
537
+ $[111] = t55;
538
+ } else {
539
+ t55 = $[111];
540
+ }
541
+ let t56;
542
+ if ($[112] !== captions || $[113] !== closedCaptions || $[114] !== current || $[115] !== currentTime || $[116] !== footerProps || $[117] !== hasClosedCaptions || $[118] !== hasFooter || $[119] !== isCapture || $[120] !== isPlaceholder || $[121] !== isPreview || $[122] !== isStatic || $[123] !== spacing || $[124] !== viewerBottomHeight || $[125] !== viewerBottomSidesWidth) {
543
+ t56 = !isPlaceholder ? /*#__PURE__*/jsxs("div", {
532
544
  className: styles.bottom,
533
545
  style: {
534
546
  transform: current && !isPreview ? `translate(0, -${viewerBottomHeight}px)` : null,
@@ -547,57 +559,57 @@ function AudioScreen(t0) {
547
559
  className: styles.callToAction
548
560
  }) : null]
549
561
  }, "bottom") : null;
550
- $[111] = captions;
551
- $[112] = closedCaptions;
552
- $[113] = current;
553
- $[114] = currentTime;
554
- $[115] = footerProps;
555
- $[116] = hasClosedCaptions;
556
- $[117] = hasFooter;
557
- $[118] = isCapture;
558
- $[119] = isPlaceholder;
559
- $[120] = isPreview;
560
- $[121] = isStatic;
561
- $[122] = spacing;
562
- $[123] = viewerBottomHeight;
563
- $[124] = viewerBottomSidesWidth;
564
- $[125] = t55;
565
- } else {
566
- t55 = $[125];
562
+ $[112] = captions;
563
+ $[113] = closedCaptions;
564
+ $[114] = current;
565
+ $[115] = currentTime;
566
+ $[116] = footerProps;
567
+ $[117] = hasClosedCaptions;
568
+ $[118] = hasFooter;
569
+ $[119] = isCapture;
570
+ $[120] = isPlaceholder;
571
+ $[121] = isPreview;
572
+ $[122] = isStatic;
573
+ $[123] = spacing;
574
+ $[124] = viewerBottomHeight;
575
+ $[125] = viewerBottomSidesWidth;
576
+ $[126] = t56;
577
+ } else {
578
+ t56 = $[126];
567
579
  }
568
- let t56;
569
- if ($[126] !== t44 || $[127] !== t45 || $[128] !== t53 || $[129] !== t55) {
570
- t56 = /*#__PURE__*/jsxs(Layout, {
580
+ let t57;
581
+ if ($[127] !== t44 || $[128] !== t45 || $[129] !== t54 || $[130] !== t56) {
582
+ t57 = /*#__PURE__*/jsxs(Layout, {
571
583
  fullscreen: true,
572
584
  style: t44,
573
- children: [t45, t53, t54, t55]
585
+ children: [t45, t54, t55, t56]
574
586
  });
575
- $[126] = t44;
576
- $[127] = t45;
577
- $[128] = t53;
578
- $[129] = t55;
587
+ $[127] = t44;
588
+ $[128] = t45;
589
+ $[129] = t54;
579
590
  $[130] = t56;
591
+ $[131] = t57;
580
592
  } else {
581
- t56 = $[130];
593
+ t57 = $[131];
582
594
  }
583
- let t57;
584
- if ($[131] !== height || $[132] !== t56 || $[133] !== width) {
585
- t57 = /*#__PURE__*/jsx(Container, {
595
+ let t58;
596
+ if ($[132] !== height || $[133] !== t57 || $[134] !== width) {
597
+ t58 = /*#__PURE__*/jsx(Container, {
586
598
  width: width,
587
599
  height: height,
588
600
  className: styles.content,
589
- children: t56
601
+ children: t57
590
602
  });
591
- $[131] = height;
592
- $[132] = t56;
593
- $[133] = width;
594
- $[134] = t57;
603
+ $[132] = height;
604
+ $[133] = t57;
605
+ $[134] = width;
606
+ $[135] = t58;
595
607
  } else {
596
- t57 = $[134];
608
+ t58 = $[135];
597
609
  }
598
- let t58;
599
- if ($[135] !== background || $[136] !== backgroundPlaying || $[137] !== height || $[138] !== isPlaceholder || $[139] !== isPreview || $[140] !== mediaShouldLoad || $[141] !== muted || $[142] !== resolution || $[143] !== width) {
600
- t58 = !isPlaceholder ? /*#__PURE__*/jsx(Background, {
610
+ let t59;
611
+ if ($[136] !== background || $[137] !== backgroundPlaying || $[138] !== height || $[139] !== isPlaceholder || $[140] !== isPreview || $[141] !== mediaShouldLoad || $[142] !== muted || $[143] !== resolution || $[144] !== width) {
612
+ t59 = !isPlaceholder ? /*#__PURE__*/jsx(Background, {
601
613
  background: background,
602
614
  width: width,
603
615
  height: height,
@@ -608,35 +620,35 @@ function AudioScreen(t0) {
608
620
  withoutVideo: isPreview,
609
621
  className: styles.background
610
622
  }) : null;
611
- $[135] = background;
612
- $[136] = backgroundPlaying;
613
- $[137] = height;
614
- $[138] = isPlaceholder;
615
- $[139] = isPreview;
616
- $[140] = mediaShouldLoad;
617
- $[141] = muted;
618
- $[142] = resolution;
619
- $[143] = width;
620
- $[144] = t58;
621
- } else {
622
- t58 = $[144];
623
- }
624
- let t59;
625
- if ($[145] !== ready || $[146] !== t43 || $[147] !== t57 || $[148] !== t58) {
626
- t59 = /*#__PURE__*/jsxs("div", {
623
+ $[136] = background;
624
+ $[137] = backgroundPlaying;
625
+ $[138] = height;
626
+ $[139] = isPlaceholder;
627
+ $[140] = isPreview;
628
+ $[141] = mediaShouldLoad;
629
+ $[142] = muted;
630
+ $[143] = resolution;
631
+ $[144] = width;
632
+ $[145] = t59;
633
+ } else {
634
+ t59 = $[145];
635
+ }
636
+ let t60;
637
+ if ($[146] !== ready || $[147] !== t43 || $[148] !== t58 || $[149] !== t59) {
638
+ t60 = /*#__PURE__*/jsxs("div", {
627
639
  className: t43,
628
640
  "data-screen-ready": ready,
629
- children: [t57, t58]
641
+ children: [t58, t59]
630
642
  });
631
- $[145] = ready;
632
- $[146] = t43;
633
- $[147] = t57;
643
+ $[146] = ready;
644
+ $[147] = t43;
634
645
  $[148] = t58;
635
646
  $[149] = t59;
647
+ $[150] = t60;
636
648
  } else {
637
- t59 = $[149];
649
+ t60 = $[150];
638
650
  }
639
- return t59;
651
+ return t60;
640
652
  }
641
653
  function _temp() {}
642
654
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-audio",
3
- "version": "0.4.88",
3
+ "version": "0.4.90-alpha.1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -62,15 +62,15 @@
62
62
  },
63
63
  "dependencies": {
64
64
  "@babel/runtime": "^7.28.6",
65
- "@micromag/core": "^0.4.88",
66
- "@micromag/element-audio": "^0.4.88",
67
- "@micromag/element-background": "^0.4.88",
68
- "@micromag/element-closed-captions": "^0.4.88",
69
- "@micromag/element-container": "^0.4.88",
70
- "@micromag/element-footer": "^0.4.88",
71
- "@micromag/element-header": "^0.4.88",
72
- "@micromag/element-layout": "^0.4.88",
73
- "@micromag/transforms": "^0.4.88",
65
+ "@micromag/core": "^0.4.90-alpha.1",
66
+ "@micromag/element-audio": "^0.4.90-alpha.1",
67
+ "@micromag/element-background": "^0.4.90-alpha.1",
68
+ "@micromag/element-closed-captions": "^0.4.90-alpha.1",
69
+ "@micromag/element-container": "^0.4.90-alpha.1",
70
+ "@micromag/element-footer": "^0.4.90-alpha.1",
71
+ "@micromag/element-header": "^0.4.90-alpha.1",
72
+ "@micromag/element-layout": "^0.4.90-alpha.1",
73
+ "@micromag/transforms": "^0.4.90-alpha.1",
74
74
  "classnames": "^2.2.6",
75
75
  "lodash": "^4.17.23",
76
76
  "react-intl": "^8.1.3 || ^10.0.0",
@@ -80,6 +80,6 @@
80
80
  "access": "public",
81
81
  "registry": "https://registry.npmjs.org/"
82
82
  },
83
- "gitHead": "cf331286bb6037d61e664cd5c961955c136719c6",
83
+ "gitHead": "a13dd2242ee733dc3b3663354783f0b4395f9926",
84
84
  "types": "es/index.d.ts"
85
85
  }