box-content-preview 3.97.0 → 3.99.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.
- package/README.md +7 -7
- package/dist/lib/index.css +3 -3
- package/dist/lib/index.js +272 -57
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
[](https://mergify.io)
|
|
3
3
|
[](https://github.com/prettier/prettier)
|
|
4
4
|
[](https://travis-ci.org/box/box-content-preview)
|
|
5
|
-
[](https://github.com/box/box-content-preview)
|
|
6
6
|
[](https://www.npmjs.com/package/box-ui-elements)
|
|
7
7
|
|
|
8
8
|
# [Box Content Preview](https://developer.box.com/docs/box-content-preview)
|
|
@@ -22,11 +22,11 @@ We encourage all users to update their applications to utilize modern browsers f
|
|
|
22
22
|
|
|
23
23
|
## Current Version
|
|
24
24
|
|
|
25
|
-
- Version: v3.
|
|
25
|
+
- Version: v3.99.0
|
|
26
26
|
- Locale: en-US
|
|
27
27
|
|
|
28
|
-
https://cdn01.boxcdn.net/platform/preview/3.
|
|
29
|
-
https://cdn01.boxcdn.net/platform/preview/3.
|
|
28
|
+
https://cdn01.boxcdn.net/platform/preview/3.99.0/en-US/preview.js
|
|
29
|
+
https://cdn01.boxcdn.net/platform/preview/3.99.0/en-US/preview.css
|
|
30
30
|
|
|
31
31
|
## Supported Locales
|
|
32
32
|
|
|
@@ -52,10 +52,10 @@ You can self-host the Box Content Preview library or reference the versions avai
|
|
|
52
52
|
<title>Box Content Preview Demo</title>
|
|
53
53
|
|
|
54
54
|
<!-- Latest version of Preview SDK for your locale -->
|
|
55
|
-
<script src="https://cdn01.boxcdn.net/platform/preview/3.
|
|
55
|
+
<script src="https://cdn01.boxcdn.net/platform/preview/3.99.0/en-US/preview.js"></script>
|
|
56
56
|
<link
|
|
57
57
|
rel="stylesheet"
|
|
58
|
-
href="https://cdn01.boxcdn.net/platform/preview/3.
|
|
58
|
+
href="https://cdn01.boxcdn.net/platform/preview/3.99.0/en-US/preview.css"
|
|
59
59
|
/>
|
|
60
60
|
</head>
|
|
61
61
|
<body>
|
|
@@ -76,7 +76,7 @@ To self-host the Box Content Preview library, follow these steps:
|
|
|
76
76
|
|
|
77
77
|
1. Either fork the repo and check out the version you want to host or download the specific version as a zip:
|
|
78
78
|
|
|
79
|
-
- Check out a specific version with `git checkout v3.
|
|
79
|
+
- Check out a specific version with `git checkout v3.99.0`
|
|
80
80
|
- Download a specific version as a zip from https://github.com/box/box-content-preview/releases
|
|
81
81
|
|
|
82
82
|
2. Install dependencies and build the library with `yarn install && yarn build:i18n && yarn build:prod`
|
package/dist/lib/index.css
CHANGED
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
.bp-WaveformCommentMarkers{position:absolute;top:-2px;right:0;left:0;z-index:4;box-sizing:border-box;height:24px;padding:0 60px;overflow:visible;pointer-events:auto}.bp-WaveformCommentMarkers--zoomed,.bp-WaveformCommentMarkers--tape{padding:0;overflow:clip visible}.bp-WaveformCommentMarkers--tape{top:auto;bottom:100%;margin-bottom:12px}.bp-WaveformCommentMarkers-track{position:relative;width:100%;height:100%;overflow:visible}.bp-WaveformCommentMarkers--zoomed .bp-WaveformCommentMarkers-track,.bp-WaveformCommentMarkers--tape .bp-WaveformCommentMarkers-track{overflow:clip visible}.bp-WaveformCommentMarkers-marker{position:absolute;top:50%;z-index:1;display:flex;align-items:center;justify-content:center;width:auto;height:auto;padding:0;background:none;border:0;border-radius:50%;transform:translate(-50%, -50%);cursor:pointer;appearance:none;pointer-events:auto;overflow:visible;outline:none;transition:box-shadow 150ms}.bp-WaveformCommentMarkers-marker:focus,.bp-WaveformCommentMarkers-marker:focus-visible{outline:none}.bp-WaveformCommentMarkers-marker .bp-MarkerAvatar{overflow:visible;isolation:isolate;cursor:pointer}.bp-WaveformCommentMarkers-marker .bp-MarkerAvatar img{cursor:pointer}.bp-WaveformCommentMarkers-marker .bp-MarkerAvatar::after{position:absolute;z-index:1;inset:0;background:#000;border-radius:50%;opacity:.4;pointer-events:none;content:"";transition:opacity 150ms}.bp-WaveformCommentMarkers-marker>.bp-MarkerAvatar{position:relative;bottom:auto;left:auto;transform:none;transform-origin:center center}.bp-WaveformCommentMarkers-marker .bp-MarkerAvatar:not(.bp-MarkerAvatarStack-overflowBadge),.bp-WaveformCommentMarkers-marker .bp-MarkerAvatarStack .bp-MarkerAvatar:not(.bp-MarkerAvatarStack-overflowBadge){background-color:#000}.bp-WaveformCommentMarkers-marker .bp-MarkerAvatarStack{position:relative;bottom:auto;left:auto;transform:none}.bp-WaveformCommentMarkers-marker--group{width:auto}.bp-WaveformView:hover~.bp-WaveformCommentMarkers .bp-MarkerAvatar::after,.bp-WaveformCommentMarkers:hover .bp-MarkerAvatar::after,.bp-WaveformCommentMarkers:has(:focus-visible) .bp-MarkerAvatar::after,.bp-WaveformCommentMarkers-marker:not(.bp-WaveformCommentMarkers-marker--group).bp-WaveformCommentMarkers-marker--selected .bp-MarkerAvatar::after,.bp-WaveformCommentMarkers .bp-MarkerAvatarStack-item--selected .bp-MarkerAvatar::after{opacity:0}.bp-WaveformCommentMarkers-marker--selected{z-index:3}.bp-WaveformCommentMarkers-marker:hover,.bp-WaveformCommentMarkers-marker:focus-within{z-index:4}.bp-WaveformCommentMarkers .bp-MarkerAvatarStack-item{cursor:pointer;transition:margin 150ms}.bp-WaveformCommentMarkers .bp-MarkerAvatarStack-item:hover,.bp-WaveformCommentMarkers .bp-MarkerAvatarStack-item:focus-visible{z-index:3}@media(prefers-reduced-motion: reduce){.bp-WaveformCommentMarkers-marker,.bp-WaveformCommentMarkers .bp-MarkerAvatarStack-item,.bp-WaveformCommentMarkers-marker .bp-MarkerAvatar::after{transition:none}}
|
|
63
63
|
.bp-WaveformGeneratingIndicator{display:flex;gap:4px;align-items:center;height:48px;padding:8px 16px 8px 12px;pointer-events:none}.bp-WaveformGeneratingIndicator-bars{display:flex;flex:0 0 24px;align-items:center;justify-content:center;width:24px;height:24px}.bp-WaveformGeneratingIndicator-bar{width:2px;height:10px;background:rgba(255,255,255,.3);border-radius:6px;animation:bp-WaveformGeneratingIndicator-pulse .66s ease-in-out infinite}.bp-WaveformGeneratingIndicator-bar:nth-child(2){margin-left:2px;animation-delay:.1s}.bp-WaveformGeneratingIndicator-bar:last-child{margin-left:2px;animation-delay:.2s}.bp-WaveformGeneratingIndicator-label{color:#fff;font-weight:normal;font-size:14px;line-height:22px;white-space:nowrap}@keyframes bp-WaveformGeneratingIndicator-pulse{0%,80%,100%{background:rgba(255,255,255,.3);transform:scaleY(1.2)}40%{background:#fff;transform:scaleY(1.6)}}@media(prefers-reduced-motion: reduce){.bp-WaveformGeneratingIndicator-bar{animation:none;background:#fff;transform:none}}
|
|
64
64
|
.bp-WaveformShuttle{position:absolute;top:48px;left:50%;z-index:6;display:flex;gap:4px;align-items:center;height:48px;padding:8px 16px;color:#fff;background:rgba(255,255,255,.1);border-radius:24px;box-shadow:0 2px 12px rgba(0,0,0,.08);transform:translateX(-50%);backdrop-filter:blur(60px);pointer-events:none;-webkit-user-select:none;user-select:none}.bp-WaveformShuttle-glyph{display:block;flex:0 0 auto;width:19px;height:11px}.bp-WaveformShuttle.bp-is-reverse .bp-WaveformShuttle-glyph{transform:scaleX(-1)}.bp-WaveformShuttle-rate{font-weight:500;font-size:14px;line-height:22px;white-space:nowrap}
|
|
65
|
-
.bp-WaveformRange{position:absolute;inset:0;z-index:2;pointer-events:none}.bp-WaveformRange-region{position:absolute;top:50%;box-sizing:border-box;height:150px;pointer-events:none;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.4);border-radius:10px;box-shadow:0 0 0 1px #222;transform:translateY(-50%);transition:border-width 100ms ease,border-color 100ms ease}.bp-WaveformRange--highlight .bp-WaveformRange-region,.bp-WaveformRange:has(.bp-WaveformRange-handle:hover) .bp-WaveformRange-region,.bp-WaveformRange:has(.bp-WaveformRange-handle--dragging) .bp-WaveformRange-region{border-width:2px;border-color:#fff}.bp-WaveformRange-handle{position:absolute;top:50%;z-index:1;width:24px;height:150px;pointer-events:auto;cursor:ew-resize;touch-action:none;transform:translate(-50%, -50%)}.bp-WaveformRange-handle--end{z-index:2}.bp-WaveformRange-handleGrip{position:absolute;top:50%;left:50%;width:8px;height:20px;background:#fff;border:1px solid #222;border-radius:4px;box-shadow:0 1px 4px rgba(0,0,0,.4);opacity:0;pointer-events:none;transform:translate(-50%, -50%) scale(0.5);transition:opacity 100ms ease-in,transform 100ms ease-in}.bp-WaveformRange-handle:hover .bp-WaveformRange-handleGrip,.bp-WaveformRange-handle:focus-visible .bp-WaveformRange-handleGrip,.bp-WaveformRange-handle--dragging .bp-WaveformRange-handleGrip{opacity:1;transform:translate(-50%, -50%) scale(1);transition:opacity 150ms ease-out,transform 150ms ease-out}.bp-WaveformRange-comment{position:absolute;top:calc(50% - 75px);z-index:5;display:inline-flex;gap:8px;align-items:center;justify-content:center;box-sizing:border-box;height:48px;padding:8px 14px;color:rgba(255,255,255,.8);font-weight:normal;font-size:14px;font-family:Lato,Arial,sans-serif;line-height:22px;letter-spacing:.1px;white-space:nowrap;background:rgba(0,0,0,.8);border:0;backdrop-filter:blur(12px);border-radius:46px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);transform:translate(-50%, calc(-100% - 36px));cursor:pointer;appearance:none;pointer-events:auto}.bp-WaveformRange-commentIcon{display:block;flex:0 0 auto;width:20px;height:20px}.bp-WaveformView--tape .bp-WaveformRange-comment{top:calc(50% - (100% + 10px) / 2)}.bp-WaveformRange-tooltip{position:absolute;top:100%;z-index:3;margin-top:4px;pointer-events:none;transform:translateX(-50%)}.bp-WaveformRange-tooltipTime{padding:4px 10px;color:#fff;font-weight:normal;font-size:14px;font-family:Lato,Arial,sans-serif;line-height:20px;letter-spacing:.3px;white-space:nowrap;background:rgba(34,34,34,.92);border:1px solid rgba(255,255,255,.18);border-radius:8px}@media(prefers-reduced-motion: reduce){.bp-WaveformRange-region,.bp-WaveformRange-handleGrip{transition:none}}
|
|
66
|
-
.bp-WaveformView{box-sizing:border-box;width:100%;height:206px;min-height:206px;padding:0 60px;overflow:visible;background:none;-webkit-tap-highlight-color:transparent}.bp-WaveformView.bp-WaveformView--zoomed,.bp-WaveformView.bp-WaveformView--tape{padding:0;touch-action:none}.bp-WaveformView.bp-WaveformView--zoomed .bp-WaveformView-canvas,.bp-WaveformView.bp-WaveformView--tape .bp-WaveformView-canvas{overflow:hidden;mask-image:linear-gradient(to right, transparent, #000 92px, #000 calc(100% - 92px), transparent)}.bp-WaveformView.bp-WaveformView--zoomed .bp-WaveformView-canvas>*::part(scroll),.bp-WaveformView.bp-WaveformView--tape .bp-WaveformView-canvas>*::part(scroll){overscroll-behavior-x:none}.bp-WaveformView.bp-WaveformView--tape{flex:1 1 auto;height:100%;min-height:0}.bp-WaveformView.bp-WaveformView--tape .bp-WaveformView-canvas{height:100%}.bp-WaveformView.bp-WaveformView--tape .bp-WaveformView-canvas>*::part(scroll){scrollbar-width:none}.bp-WaveformView.bp-WaveformView--tape .bp-WaveformView-playhead,.bp-WaveformView.bp-WaveformView--tape .bp-WaveformRange-region,.bp-WaveformView.bp-WaveformView--tape .bp-WaveformRange-handle{height:calc(100% + 10px)}.bp-WaveformView-track{position:relative;display:flex;align-items:center;width:100%;height:100%;cursor:pointer}.bp-WaveformView-canvas{z-index:0;width:100%;height:140px}.bp-WaveformView-playhead{position:absolute;top:50%;left:0;z-index:1;width:2px;height:150px;pointer-events:none;background:linear-gradient(#2487ff, #006bed);border-radius:1px;box-shadow:0 0 0 1px #222,0 0 10px 0 rgba(36,135,255,.3);transform:translate(-50%, -50%)}.bp-WaveformView-hover{position:absolute;top:100%;z-index:2;margin-top:4px;pointer-events:none;transform:translateX(-50%)}.bp-WaveformView-hover--tape{top:-24px;left:50%;z-index:5;margin-top:0;transform:translate(-50%, -50%)}.bp-WaveformView-hoverTime{padding:4px 10px;color:#fff;font-weight:normal;font-size:14px;font-family:Lato,Arial,sans-serif;line-height:20px;letter-spacing:.3px;white-space:nowrap;background:rgba(34,34,34,.92);border:1px solid rgba(255,255,255,.18);border-radius:8px}.bp-WaveformView--inert{pointer-events:none}.bp-WaveformView--inert .bp-WaveformView-track{cursor:default}.bp-WaveformView--inert .bp-WaveformRange-handle,.bp-WaveformView--inert .bp-WaveformRange-comment{pointer-events:none;cursor:default}.bp-WaveformView:not(:hover) .bp-WaveformRange:not(.bp-WaveformRange--persist){opacity:.4}
|
|
65
|
+
.bp-WaveformRange{position:absolute;inset:0;z-index:2;pointer-events:none}.bp-WaveformRange-region{position:absolute;top:50%;box-sizing:border-box;height:150px;pointer-events:none;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.4);border-radius:10px;box-shadow:0 0 0 1px #222;transform:translateY(-50%);transition:border-width 100ms ease,border-color 100ms ease}.bp-WaveformRange--swiping .bp-WaveformRange-region{visibility:hidden}.bp-WaveformRange--highlight .bp-WaveformRange-region,.bp-WaveformRange:has(.bp-WaveformRange-handle:hover) .bp-WaveformRange-region,.bp-WaveformRange:has(.bp-WaveformRange-handle--dragging) .bp-WaveformRange-region{border-width:2px;border-color:#fff}.bp-WaveformRange-handle{position:absolute;top:50%;z-index:1;width:24px;height:150px;pointer-events:auto;cursor:ew-resize;touch-action:none;transform:translate(-50%, -50%)}.bp-WaveformRange-handle--end{z-index:2}.bp-WaveformRange-handleGrip{position:absolute;top:50%;left:50%;width:8px;height:20px;background:#fff;border:1px solid #222;border-radius:4px;box-shadow:0 1px 4px rgba(0,0,0,.4);opacity:0;pointer-events:none;transform:translate(-50%, -50%) scale(0.5);transition:opacity 100ms ease-in,transform 100ms ease-in}.bp-WaveformRange-handle:hover .bp-WaveformRange-handleGrip,.bp-WaveformRange-handle:focus-visible .bp-WaveformRange-handleGrip,.bp-WaveformRange-handle--dragging .bp-WaveformRange-handleGrip{opacity:1;transform:translate(-50%, -50%) scale(1);transition:opacity 150ms ease-out,transform 150ms ease-out}.bp-WaveformRange-comment{position:absolute;top:calc(50% - 75px);z-index:5;display:inline-flex;gap:8px;align-items:center;justify-content:center;box-sizing:border-box;height:48px;padding:8px 14px;color:rgba(255,255,255,.8);font-weight:normal;font-size:14px;font-family:Lato,Arial,sans-serif;line-height:22px;letter-spacing:.1px;white-space:nowrap;background:rgba(0,0,0,.8);border:0;backdrop-filter:blur(12px);border-radius:46px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);transform:translate(-50%, calc(-100% - 36px));cursor:pointer;appearance:none;pointer-events:auto}.bp-WaveformRange-comment--withClear{gap:4px;padding:8px 8px 8px 12px;cursor:default}.bp-WaveformRange-comment--clearOnly{width:48px;height:48px;padding:0;border-radius:50%}.bp-WaveformRange-commentLabel,.bp-WaveformRange-commentClear{display:inline-flex;align-items:center;justify-content:center;padding:0;color:inherit;font:inherit;letter-spacing:inherit;background:transparent;border:0;cursor:pointer;appearance:none}.bp-WaveformRange-commentLabel{gap:8px;height:32px;padding:0 6px}.bp-WaveformRange-commentDivider{flex:0 0 auto;width:1px;height:16px;background:rgba(255,255,255,.4)}.bp-WaveformRange-commentClear{width:32px;height:32px;border-radius:50%}.bp-WaveformRange-commentIcon{display:block;flex:0 0 auto;width:20px;height:20px;fill:currentcolor}.bp-WaveformView--tape .bp-WaveformRange-comment{top:calc(50% - (100% + 10px) / 2)}.bp-WaveformRange-tooltip{position:absolute;top:100%;z-index:3;margin-top:4px;pointer-events:none;transform:translateX(-50%)}.bp-WaveformRange-tooltipTime{padding:4px 10px;color:#fff;font-weight:normal;font-size:14px;font-family:Lato,Arial,sans-serif;line-height:20px;letter-spacing:.3px;white-space:nowrap;background:rgba(34,34,34,.92);border:1px solid rgba(255,255,255,.18);border-radius:8px}@media(prefers-reduced-motion: reduce){.bp-WaveformRange-region,.bp-WaveformRange-handleGrip{transition:none}}
|
|
66
|
+
.bp-WaveformView{box-sizing:border-box;width:100%;height:206px;min-height:206px;padding:0 60px;overflow:visible;background:none;-webkit-tap-highlight-color:transparent}.bp-WaveformView.bp-WaveformView--zoomed,.bp-WaveformView.bp-WaveformView--tape{padding:0;touch-action:none}.bp-WaveformView.bp-WaveformView--zoomed .bp-WaveformView-canvas,.bp-WaveformView.bp-WaveformView--tape .bp-WaveformView-canvas{overflow:hidden;mask-image:linear-gradient(to right, transparent, #000 92px, #000 calc(100% - 92px), transparent)}.bp-WaveformView.bp-WaveformView--zoomed .bp-WaveformView-canvas>*::part(scroll),.bp-WaveformView.bp-WaveformView--tape .bp-WaveformView-canvas>*::part(scroll){overscroll-behavior-x:none}.bp-WaveformView.bp-WaveformView--tape{flex:1 1 auto;height:100%;min-height:0}.bp-WaveformView.bp-WaveformView--tape .bp-WaveformView-canvas{height:100%}.bp-WaveformView.bp-WaveformView--tape .bp-WaveformView-canvas>*::part(scroll){scrollbar-width:none}.bp-WaveformView.bp-WaveformView--tape .bp-WaveformView-playhead,.bp-WaveformView.bp-WaveformView--tape .bp-WaveformRange-region,.bp-WaveformView.bp-WaveformView--tape .bp-WaveformRange-handle{height:calc(100% + 10px)}.bp-WaveformView-track{position:relative;display:flex;align-items:center;width:100%;height:100%;cursor:pointer}.bp-WaveformView-canvas{z-index:0;width:100%;height:140px}.bp-WaveformView-playhead{position:absolute;top:50%;left:0;z-index:1;width:2px;height:150px;pointer-events:none;background:linear-gradient(#2487ff, #006bed);border-radius:1px;box-shadow:0 0 0 1px #222,0 0 10px 0 rgba(36,135,255,.3);transform:translate(-50%, -50%)}.bp-WaveformView-hover{position:absolute;top:100%;z-index:2;margin-top:4px;pointer-events:none;transform:translateX(-50%)}.bp-WaveformView-hover--tape{top:-24px;left:50%;z-index:5;margin-top:0;transform:translate(-50%, -50%)}.bp-WaveformView-hoverTime{padding:4px 10px;color:#fff;font-weight:normal;font-size:14px;font-family:Lato,Arial,sans-serif;line-height:20px;letter-spacing:.3px;white-space:nowrap;background:rgba(34,34,34,.92);border:1px solid rgba(255,255,255,.18);border-radius:8px}.bp-WaveformView--inert{pointer-events:none}.bp-WaveformView--inert .bp-WaveformView-track{cursor:default}.bp-WaveformView--inert .bp-WaveformRange-handle,.bp-WaveformView--inert .bp-WaveformRange-comment,.bp-WaveformView--inert .bp-WaveformRange-commentLabel,.bp-WaveformView--inert .bp-WaveformRange-commentClear{pointer-events:none;cursor:default}.bp-WaveformView:not(:hover) .bp-WaveformRange:not(.bp-WaveformRange--persist){opacity:.4}
|
|
67
67
|
.bp-SliderControl{outline:0;position:relative;cursor:pointer}.bp-SliderControl:focus:not(:disabled){box-shadow:inset 0 0 0 1px rgba(211,211,211,.5),0 1px 2px rgba(0,0,0,.1)}.bp-SliderControl:focus-visible:not(:disabled){box-shadow:inset 0 0 0 1px rgba(211,211,211,.5),0 1px 2px rgba(0,0,0,.1)}.bp-SliderControl:focus:not(:focus-visible){box-shadow:none}.bp-SliderControl-thumb{position:absolute;top:calc(50% - 6px);width:12px;height:12px;margin-left:-6px;background:#0061d5;border:0;border-radius:12px;cursor:pointer}.bp-SliderControl-track{position:absolute;inset:0;height:3px;margin:auto 3px;background:transparent linear-gradient(#fff, #fff) no-repeat center border-box}
|
|
68
68
|
.bp-WaveformZoomControl{display:flex;flex-direction:row;gap:0;align-items:center;justify-content:flex-end;width:48px;height:48px;padding:4px;overflow:hidden;background:rgba(255,255,255,.1);border-radius:32px;box-shadow:0 2px 12px rgba(0,0,0,.08);backdrop-filter:blur(60px);transition:width 150ms ease-out,gap 150ms ease-out}.bp-WaveformZoomControl.bp-has-multiplier{padding:4px 4px 4px 12px}.bp-WaveformZoomControl.bp-has-multiplier:not(.bp-is-open){width:88px}.bp-WaveformZoomControl.bp-is-open{gap:8px;width:207px}.bp-WaveformZoomControl.bp-is-open.bp-has-multiplier{width:264px}.bp-WaveformZoomControl-multiplier{display:flex;flex:0 0 32px;order:-3;align-items:center;justify-content:center;width:32px;height:32px;color:#fff;font-weight:500;font-size:14px;line-height:22px;pointer-events:none;-webkit-user-select:none;user-select:none;white-space:nowrap}.bp-WaveformZoomControl-divider{display:none;flex:0 0 1px;order:-2;width:1px;height:28px;background:rgba(255,255,255,.3)}.bp-WaveformZoomControl.bp-is-open.bp-has-multiplier .bp-WaveformZoomControl-divider{display:block}.bp-WaveformZoomControl-flyout{display:flex;flex:0 0 auto;order:-1;gap:8px;align-items:center;width:0;height:40px;overflow:hidden;transition:width 150ms ease-out}.bp-WaveformZoomControl-flyout.bp-is-open{width:151px}.bp-WaveformZoomControl-slider{width:103px;height:8px}.bp-WaveformZoomControl-slider .bp-SliderControl-track{height:8px;margin:0;background:rgba(255,255,255,.3);background-image:none;border-radius:20px}.bp-WaveformZoomControl-slider .bp-SliderControl-track::after{position:absolute;top:0;left:0;width:calc(8px + 95px * var(--bp-zoom-t, 0));height:8px;background:rgba(255,255,255,.9);border-radius:20px;content:""}.bp-WaveformZoomControl-slider .bp-SliderControl-thumb{display:none}.bp-WaveformZoomControl-button{position:relative;z-index:1;display:flex;flex:0 0 40px;align-items:center;justify-content:center;width:40px;height:40px;padding:0;color:#fff;background:transparent;border:0;border-radius:50%;cursor:pointer}.bp-WaveformZoomControl-button[aria-disabled=true]{cursor:default;opacity:.3}.bp-WaveformZoomControl-button svg{width:20px;height:20px;padding:0}@media(prefers-reduced-motion: reduce){.bp-WaveformZoomControl,.bp-WaveformZoomControl-flyout{transition:none}}
|
|
69
|
-
.bp-MP3ControlsRoot:has(.bp-MP3ControlsV2){position:absolute;inset:0;width:100%;height:100%;transform:none;pointer-events:none}.bp-MP3ControlsV2{--bp-waveform-bar-min: 140px;position:relative;width:100%;max-width:none;height:100%;background:transparent;pointer-events:none}.bp-MP3ControlsV2-stage{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:0;pointer-events:none}.bp-MP3ControlsV2-stage .bp-WaveformView,.bp-MP3ControlsV2-stage .bp-MP3ControlsV2-waveform,.bp-MP3ControlsV2-stage .bp-WaveformCommentMarkers{pointer-events:auto}.bp-MP3ControlsV2-waveform{position:relative;width:100%;overflow:visible}.bp-MP3ControlsV2-stage:has(.bp-WaveformView--tape) .bp-MP3ControlsV2-waveform{display:flex;flex-direction:column;height:max(var(--bp-waveform-bar-min, 140px), 25%);min-height:0}.bp-MP3ControlsV2-waveformZoom{position:absolute;top:48px;right:48px;z-index:
|
|
69
|
+
.bp-MP3ControlsRoot:has(.bp-MP3ControlsV2){position:absolute;inset:0;width:100%;height:100%;transform:none;pointer-events:none}.bp-MP3ControlsV2{--bp-waveform-bar-min: 140px;position:relative;width:100%;max-width:none;height:100%;background:transparent;pointer-events:none}.bp-MP3ControlsV2-stage{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:0;pointer-events:none}.bp-MP3ControlsV2-stage .bp-WaveformView,.bp-MP3ControlsV2-stage .bp-MP3ControlsV2-waveform,.bp-MP3ControlsV2-stage .bp-WaveformCommentMarkers{pointer-events:auto}.bp-MP3ControlsV2-waveform{position:relative;width:100%;overflow:visible}.bp-MP3ControlsV2-stage:has(.bp-WaveformView--tape) .bp-MP3ControlsV2-waveform{display:flex;flex-direction:column;height:max(var(--bp-waveform-bar-min, 140px), 25%);min-height:0}.bp-MP3ControlsV2-waveformZoom{position:absolute;top:48px;right:48px;z-index:4;pointer-events:none}.bp-MP3ControlsV2-waveformZoom .bp-WaveformZoomControl{pointer-events:auto}.bp-MP3ControlsV2-playOverlay{position:absolute;top:50%;left:50%;z-index:2;display:flex;align-items:center;justify-content:center;width:80px;height:80px;padding:0;background:rgba(0,0,0,.5);border:0;border-radius:50%;transform:translate(-50%, -50%);cursor:pointer;pointer-events:auto}.bp-MP3ControlsV2-playOverlay svg{width:48px;height:48px;fill:#fff}.bp-MP3ControlsV2-stage .bp-media-buffering-spinner{z-index:2;pointer-events:none}.bp-MP3ControlsV2-bar{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;align-items:center;justify-content:space-between;min-height:32px;padding:30px 58px 25px;background:linear-gradient(to top, black, rgba(0, 0, 0, 0));pointer-events:auto}.bp-MP3ControlsV2-group{display:flex;gap:12px;align-items:center}.bp-MP3ControlsV2-divider{width:1px;height:24px;background-color:rgba(255,255,255,.1);border-radius:1px}.bp-MP3ControlsV2 .bp-MP3Controls-settings{position:relative}.bp-MP3ControlsV2 .bp-MP3Controls-settings .bp-SettingsFlyout{right:15px}.bp-MP3ControlsV2 .bp-MP3Controls-settings .bp-SettingsToggle-button{width:36px;height:40px}
|
|
70
70
|
.bp-Filmstrip{position:absolute;bottom:100%;overflow:hidden;background:transparent;box-shadow:0 0 1px #464a4f;visibility:hidden}.bp-Filmstrip.bp-is-shown{visibility:visible}.bp-Filmstrip-frame{display:flex;align-items:center;justify-content:center}.bp-Filmstrip-time{height:20px;color:#fff;font-size:13px;line-height:20px;text-align:center;background-color:#222}
|
|
71
71
|
.bp-TimeControls{position:relative;margin-right:10px;margin-left:10px}.bp-TimeControls-slider{height:18px}.bp-TimeControls-slider .bp-SliderControl-thumb{transform:scale(0);transition:transform 100ms ease;will-change:transform}.bp-TimeControls-slider .bp-SliderControl-track{backface-visibility:hidden;transition:transform 100ms ease;will-change:transform}.bp-TimeControls-slider.bp-is-scrubbing .bp-SliderControl-thumb,.bp-TimeControls-slider:focus .bp-SliderControl-thumb,.bp-TimeControls-slider:hover .bp-SliderControl-thumb{transform:scale(1)}.bp-TimeControls-slider.bp-is-scrubbing .bp-SliderControl-track,.bp-TimeControls-slider:focus .bp-SliderControl-track,.bp-TimeControls-slider:hover .bp-SliderControl-track{transform:scaleY(2)}
|
|
72
72
|
.bp-MP3Controls{display:flex;flex-direction:column;width:360px;background-color:#000}.bp-MP3Controls-bar{display:flex;justify-content:space-between;padding:0 10px 5px}.bp-MP3Controls-group{display:flex;align-items:center}.bp-MP3Controls-settings{position:relative}.bp-MP3Controls-settings .bp-SettingsFlyout{right:15px}.bp-MP3Controls-settings .bp-SettingsToggle-button{width:36px;height:40px}
|
package/dist/lib/index.js
CHANGED
|
@@ -1029,7 +1029,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
1029
1029
|
const CLIENT_NAME = "box-content-preview"; // eslint-disable-line no-undef
|
|
1030
1030
|
const CLIENT_NAME_KEY = 'box_client_name';
|
|
1031
1031
|
const CLIENT_VERSION_KEY = 'box_client_version';
|
|
1032
|
-
const CLIENT_VERSION = "3.
|
|
1032
|
+
const CLIENT_VERSION = "3.99.0"; // eslint-disable-line no-undef
|
|
1033
1033
|
const HEADER_CLIENT_NAME = 'X-Box-Client-Name';
|
|
1034
1034
|
const HEADER_CLIENT_VERSION = 'X-Box-Client-Version';
|
|
1035
1035
|
const PROMISE_MAP = {};
|
|
@@ -2027,6 +2027,29 @@ function IconChevronUpMedium24(props) {
|
|
|
2027
2027
|
|
|
2028
2028
|
/***/ },
|
|
2029
2029
|
|
|
2030
|
+
/***/ 8950
|
|
2031
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2032
|
+
|
|
2033
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2034
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
2035
|
+
/* harmony export */ });
|
|
2036
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1649);
|
|
2037
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2038
|
+
|
|
2039
|
+
function IconExit24(props) {
|
|
2040
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
|
|
2041
|
+
focusable: "false",
|
|
2042
|
+
height: 24,
|
|
2043
|
+
viewBox: "0 0 19 19",
|
|
2044
|
+
width: 24
|
|
2045
|
+
}, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
|
|
2046
|
+
d: "m10 8.232 5.227-5.227a.625.625 0 0 1 .884 0l.884.884a.625.625 0 0 1 0 .884L11.767 10l5.228 5.227a.625.625 0 0 1 0 .884l-.884.884a.625.625 0 0 1-.884 0L10 11.767l-5.227 5.228a.625.625 0 0 1-.884 0l-.884-.884a.625.625 0 0 1 0-.884L8.233 10 3.005 4.772a.625.625 0 0 1 0-.883l.884-.884a.625.625 0 0 1 .884 0L10 8.233z"
|
|
2047
|
+
}));
|
|
2048
|
+
}
|
|
2049
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (IconExit24);
|
|
2050
|
+
|
|
2051
|
+
/***/ },
|
|
2052
|
+
|
|
2030
2053
|
/***/ 7502
|
|
2031
2054
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2032
2055
|
|
|
@@ -5648,6 +5671,8 @@ function IconComment24(props) {
|
|
|
5648
5671
|
}));
|
|
5649
5672
|
}
|
|
5650
5673
|
/* harmony default export */ const icons_IconComment24 = (IconComment24);
|
|
5674
|
+
// EXTERNAL MODULE: ./src/lib/viewers/controls/icons/IconExit24.tsx
|
|
5675
|
+
var IconExit24 = __webpack_require__(8950);
|
|
5651
5676
|
;// ./src/lib/viewers/media/waveform/WaveformRangeSelection.scss
|
|
5652
5677
|
// extracted by mini-css-extract-plugin
|
|
5653
5678
|
|
|
@@ -5659,6 +5684,11 @@ function IconComment24(props) {
|
|
|
5659
5684
|
|
|
5660
5685
|
|
|
5661
5686
|
|
|
5687
|
+
|
|
5688
|
+
|
|
5689
|
+
function stopRangeEvent(event) {
|
|
5690
|
+
event.stopPropagation();
|
|
5691
|
+
}
|
|
5662
5692
|
function offsetLeftCss(base, offsetPx) {
|
|
5663
5693
|
if (!offsetPx) {
|
|
5664
5694
|
return base;
|
|
@@ -5689,16 +5719,20 @@ function applyRegion(el, startSec, endSec, durationSec, viewport, collapsed) {
|
|
|
5689
5719
|
el.style.width = `calc(${end} - ${start} + ${constants/* WAVEFORM_RANGE_HANDLE_LINE_PX */.h1}px)`;
|
|
5690
5720
|
}
|
|
5691
5721
|
const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(function WaveformRangeSelection({
|
|
5722
|
+
cameraMode = 'desktop',
|
|
5692
5723
|
currentTimeSec = 0,
|
|
5693
5724
|
durationSec,
|
|
5694
5725
|
getPlayheadSec,
|
|
5726
|
+
isSwiping = false,
|
|
5695
5727
|
interactive = true,
|
|
5696
5728
|
isHighlighted = false,
|
|
5697
5729
|
keepHighlight = true,
|
|
5698
|
-
onDragCreate,
|
|
5699
5730
|
onDragChange,
|
|
5731
|
+
onDragCreate,
|
|
5732
|
+
onDragPointerX,
|
|
5700
5733
|
onPreviewChange,
|
|
5701
5734
|
onRangeChange,
|
|
5735
|
+
onRangeClear,
|
|
5702
5736
|
range,
|
|
5703
5737
|
readOnly = false,
|
|
5704
5738
|
viewport
|
|
@@ -5709,12 +5743,16 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5709
5743
|
const endHandleRef = (0,external_react_.useRef)(null);
|
|
5710
5744
|
const tooltipRef = (0,external_react_.useRef)(null);
|
|
5711
5745
|
const commentRef = (0,external_react_.useRef)(null);
|
|
5746
|
+
const commentButtonRef = commentRef;
|
|
5747
|
+
const commentPillRef = commentRef;
|
|
5712
5748
|
const dragRef = (0,external_react_.useRef)(null);
|
|
5749
|
+
const replayDragRef = (0,external_react_.useRef)(() => undefined);
|
|
5713
5750
|
const rangeRef = (0,external_react_.useRef)(range);
|
|
5714
5751
|
const displayedRef = (0,external_react_.useRef)((0,waveform_range/* resolveRange */.Ss)(range, (0,waveform_range/* durationMsFromSec */.uH)(durationSec)));
|
|
5715
5752
|
const viewportRef = (0,external_react_.useRef)(viewport);
|
|
5716
5753
|
const durationSecRef = (0,external_react_.useRef)(durationSec);
|
|
5717
5754
|
const onDragChangeRef = (0,external_react_.useRef)(onDragChange);
|
|
5755
|
+
const onDragPointerXRef = (0,external_react_.useRef)(onDragPointerX);
|
|
5718
5756
|
const onPreviewChangeRef = (0,external_react_.useRef)(onPreviewChange);
|
|
5719
5757
|
const onRangeChangeRef = (0,external_react_.useRef)(onRangeChange);
|
|
5720
5758
|
const getPlayheadSecRef = (0,external_react_.useRef)(getPlayheadSec);
|
|
@@ -5724,6 +5762,7 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5724
5762
|
rangeRef.current = range;
|
|
5725
5763
|
durationSecRef.current = durationSec;
|
|
5726
5764
|
onDragChangeRef.current = onDragChange;
|
|
5765
|
+
onDragPointerXRef.current = onDragPointerX;
|
|
5727
5766
|
onPreviewChangeRef.current = onPreviewChange;
|
|
5728
5767
|
onRangeChangeRef.current = onRangeChange;
|
|
5729
5768
|
getPlayheadSecRef.current = getPlayheadSec;
|
|
@@ -5731,7 +5770,9 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5731
5770
|
const durationMs = (0,waveform_range/* durationMsFromSec */.uH)(durationSec);
|
|
5732
5771
|
const displayed = dragRange ?? (0,waveform_range/* resolveRange */.Ss)(range, durationMs);
|
|
5733
5772
|
displayedRef.current = displayed;
|
|
5734
|
-
const
|
|
5773
|
+
const isRangeOpen = displayed.startMs !== displayed.endMs && activeHandle == null;
|
|
5774
|
+
const showCommentButton = !readOnly && Boolean(onDragCreate) && isRangeOpen;
|
|
5775
|
+
const showClearOnly = cameraMode === 'tape' && readOnly && onRangeClear != null && isRangeOpen;
|
|
5735
5776
|
const syncPositions = (0,external_react_.useCallback)((next, nextViewport, nextDurationSec) => {
|
|
5736
5777
|
displayedRef.current = next;
|
|
5737
5778
|
const collapsed = next.startMs === next.endMs;
|
|
@@ -5749,18 +5790,27 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5749
5790
|
comment.style.left = (0,waveform_viewport/* timeLeftPercent */.Mu)((next.startMs + next.endMs) / 2000, nextDurationSec, nextViewport);
|
|
5750
5791
|
}
|
|
5751
5792
|
}, []);
|
|
5793
|
+
const refreshRangePositions = (0,external_react_.useCallback)(() => {
|
|
5794
|
+
const drag = dragRef.current;
|
|
5795
|
+
if (!drag) {
|
|
5796
|
+
syncPositions(displayedRef.current, viewportRef.current, durationSecRef.current);
|
|
5797
|
+
return;
|
|
5798
|
+
}
|
|
5799
|
+
replayDragRef.current(drag.lastClientX);
|
|
5800
|
+
}, [syncPositions]);
|
|
5752
5801
|
(0,external_react_.useImperativeHandle)(ref, () => ({
|
|
5753
5802
|
applyViewport: nextViewport => {
|
|
5754
5803
|
viewportRef.current = nextViewport;
|
|
5755
|
-
|
|
5804
|
+
refreshRangePositions();
|
|
5756
5805
|
}
|
|
5757
|
-
}), [
|
|
5806
|
+
}), [refreshRangePositions]);
|
|
5758
5807
|
(0,external_react_.useLayoutEffect)(() => {
|
|
5759
5808
|
syncPositions(displayedRef.current, viewportRef.current, durationSec);
|
|
5760
|
-
}, [activeHandle, displayed.endMs, displayed.startMs, durationSec, showCommentButton, syncPositions]);
|
|
5809
|
+
}, [activeHandle, displayed.endMs, displayed.startMs, durationSec, showClearOnly, showCommentButton, syncPositions]);
|
|
5761
5810
|
(0,external_react_.useLayoutEffect)(() => {
|
|
5762
5811
|
const next = (0,waveform_viewport/* createWaveformViewport */.eq)({
|
|
5763
5812
|
durationSec: viewport.durationSec,
|
|
5813
|
+
gutterPx: viewport.gutterPx,
|
|
5764
5814
|
heightPx: viewport.heightPx,
|
|
5765
5815
|
maxZoom: viewport.maxZoom,
|
|
5766
5816
|
scrollLeftPx: viewportRef.current.scrollLeftPx,
|
|
@@ -5768,8 +5818,8 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5768
5818
|
zoomLevel: viewport.zoomLevel
|
|
5769
5819
|
});
|
|
5770
5820
|
viewportRef.current = next;
|
|
5771
|
-
|
|
5772
|
-
}, [
|
|
5821
|
+
refreshRangePositions();
|
|
5822
|
+
}, [refreshRangePositions, viewport.durationSec, viewport.gutterPx, viewport.heightPx, viewport.maxZoom, viewport.widthPx, viewport.zoomLevel]);
|
|
5773
5823
|
const endDrag = (0,external_react_.useCallback)(event => {
|
|
5774
5824
|
const drag = dragRef.current;
|
|
5775
5825
|
if (!drag || event.pointerId && drag.pointerId !== event.pointerId) {
|
|
@@ -5784,6 +5834,7 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5784
5834
|
setActiveHandle(null);
|
|
5785
5835
|
setDragRange(null);
|
|
5786
5836
|
onDragChangeRef.current?.(false);
|
|
5837
|
+
event.stopPropagation();
|
|
5787
5838
|
const didChange = drag.range.startMs !== drag.originRange.startMs || drag.range.endMs !== drag.originRange.endMs;
|
|
5788
5839
|
if (!didChange) {
|
|
5789
5840
|
return;
|
|
@@ -5802,6 +5853,8 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5802
5853
|
if (!root) {
|
|
5803
5854
|
return;
|
|
5804
5855
|
}
|
|
5856
|
+
drag.lastClientX = event.clientX;
|
|
5857
|
+
onDragPointerXRef.current?.(event.clientX);
|
|
5805
5858
|
const rect = root.getBoundingClientRect();
|
|
5806
5859
|
const pointerX = event.clientX - rect.left;
|
|
5807
5860
|
const vp = viewportRef.current;
|
|
@@ -5813,6 +5866,7 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5813
5866
|
timeMs: (0,waveform_range/* pointerTimeMs */.v2)(pointerX, vp)
|
|
5814
5867
|
});
|
|
5815
5868
|
if (drag.originMs === drag.range.startMs && drag.originMs === drag.range.endMs && pointerMs === drag.originMs) {
|
|
5869
|
+
syncPositions(drag.range, vp, durationSecRef.current);
|
|
5816
5870
|
return;
|
|
5817
5871
|
}
|
|
5818
5872
|
const next = (0,waveform_range/* dragRangeHandle */.Mo)({
|
|
@@ -5834,6 +5888,16 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5834
5888
|
startMs: next.range.startMs
|
|
5835
5889
|
});
|
|
5836
5890
|
}, [currentTimeSec, syncPositions]);
|
|
5891
|
+
replayDragRef.current = clientX => {
|
|
5892
|
+
const drag = dragRef.current;
|
|
5893
|
+
if (!drag || !Number.isFinite(clientX)) {
|
|
5894
|
+
return;
|
|
5895
|
+
}
|
|
5896
|
+
moveDrag({
|
|
5897
|
+
clientX,
|
|
5898
|
+
pointerId: drag.pointerId
|
|
5899
|
+
});
|
|
5900
|
+
};
|
|
5837
5901
|
const startDrag = (0,external_react_.useCallback)((handle, event) => {
|
|
5838
5902
|
if (readOnly || !interactive || event.button > 1 || event.ctrlKey || event.metaKey) {
|
|
5839
5903
|
return;
|
|
@@ -5843,6 +5907,7 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5843
5907
|
const resolved = (0,waveform_range/* resolveRange */.Ss)(rangeRef.current, (0,waveform_range/* durationMsFromSec */.uH)(durationSecRef.current));
|
|
5844
5908
|
dragRef.current = {
|
|
5845
5909
|
handle,
|
|
5910
|
+
lastClientX: event.clientX,
|
|
5846
5911
|
originMs: handle === 'start' ? resolved.startMs : resolved.endMs,
|
|
5847
5912
|
originRange: {
|
|
5848
5913
|
endMs: resolved.endMs,
|
|
@@ -5851,6 +5916,7 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5851
5916
|
pointerId: event.pointerId,
|
|
5852
5917
|
range: resolved
|
|
5853
5918
|
};
|
|
5919
|
+
onDragPointerXRef.current?.(event.clientX);
|
|
5854
5920
|
event.currentTarget.setPointerCapture(event.pointerId);
|
|
5855
5921
|
setActiveHandle(handle);
|
|
5856
5922
|
setDragRange(resolved);
|
|
@@ -5923,25 +5989,74 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5923
5989
|
const tooltipMs = tooltipHandle === 'start' ? displayed.startMs : displayed.endMs;
|
|
5924
5990
|
const collapsed = displayed.startMs === displayed.endMs;
|
|
5925
5991
|
const highlight = isHighlighted || collapsed;
|
|
5926
|
-
const
|
|
5927
|
-
ref: commentRef,
|
|
5928
|
-
className: "bp-WaveformRange-comment",
|
|
5929
|
-
"data-testid": "bp-waveform-range-comment",
|
|
5930
|
-
onClick: event => {
|
|
5931
|
-
event.stopPropagation();
|
|
5932
|
-
onDragCreate();
|
|
5933
|
-
},
|
|
5934
|
-
onPointerDown: event => {
|
|
5935
|
-
event.stopPropagation();
|
|
5936
|
-
},
|
|
5937
|
-
type: "button"
|
|
5938
|
-
}, /*#__PURE__*/external_react_["default"].createElement(icons_IconComment24, {
|
|
5992
|
+
const commentLabel = /*#__PURE__*/external_react_["default"].createElement(external_react_["default"].Fragment, null, /*#__PURE__*/external_react_["default"].createElement(icons_IconComment24, {
|
|
5939
5993
|
"aria-hidden": "true",
|
|
5940
5994
|
className: "bp-WaveformRange-commentIcon"
|
|
5941
|
-
}), "Comment")
|
|
5995
|
+
}), "Comment");
|
|
5996
|
+
const isTapeClearAvailable = cameraMode === 'tape' && onRangeClear != null;
|
|
5997
|
+
let commentButton = null;
|
|
5998
|
+
if (showClearOnly && onRangeClear) {
|
|
5999
|
+
commentButton = /*#__PURE__*/external_react_["default"].createElement("button", {
|
|
6000
|
+
ref: commentButtonRef,
|
|
6001
|
+
"aria-label": "Clear",
|
|
6002
|
+
className: "bp-WaveformRange-comment bp-WaveformRange-comment--clearOnly",
|
|
6003
|
+
"data-testid": "bp-waveform-range-clear",
|
|
6004
|
+
onClick: event => {
|
|
6005
|
+
stopRangeEvent(event);
|
|
6006
|
+
onRangeClear();
|
|
6007
|
+
},
|
|
6008
|
+
onPointerDown: stopRangeEvent,
|
|
6009
|
+
onPointerUp: stopRangeEvent,
|
|
6010
|
+
type: "button"
|
|
6011
|
+
}, /*#__PURE__*/external_react_["default"].createElement(IconExit24/* default */.A, {
|
|
6012
|
+
"aria-hidden": "true",
|
|
6013
|
+
className: "bp-WaveformRange-commentIcon"
|
|
6014
|
+
}));
|
|
6015
|
+
} else if (showCommentButton && onDragCreate) {
|
|
6016
|
+
const commentAction = /*#__PURE__*/external_react_["default"].createElement("button", {
|
|
6017
|
+
ref: isTapeClearAvailable ? undefined : commentButtonRef,
|
|
6018
|
+
className: isTapeClearAvailable ? 'bp-WaveformRange-commentLabel' : 'bp-WaveformRange-comment',
|
|
6019
|
+
"data-testid": "bp-waveform-range-comment",
|
|
6020
|
+
onClick: event => {
|
|
6021
|
+
stopRangeEvent(event);
|
|
6022
|
+
onDragCreate();
|
|
6023
|
+
},
|
|
6024
|
+
onPointerDown: stopRangeEvent,
|
|
6025
|
+
onPointerUp: stopRangeEvent,
|
|
6026
|
+
type: "button"
|
|
6027
|
+
}, commentLabel);
|
|
6028
|
+
commentButton = isTapeClearAvailable ? /*#__PURE__*/external_react_["default"].createElement("div", {
|
|
6029
|
+
ref: commentPillRef,
|
|
6030
|
+
className: "bp-WaveformRange-comment bp-WaveformRange-comment--withClear",
|
|
6031
|
+
"data-testid": "bp-waveform-range-comment-pill",
|
|
6032
|
+
onPointerDown: stopRangeEvent,
|
|
6033
|
+
onPointerUp: stopRangeEvent
|
|
6034
|
+
}, commentAction, /*#__PURE__*/external_react_["default"].createElement("span", {
|
|
6035
|
+
"aria-hidden": "true",
|
|
6036
|
+
className: "bp-WaveformRange-commentDivider"
|
|
6037
|
+
}), /*#__PURE__*/external_react_["default"].createElement("button", {
|
|
6038
|
+
"aria-label": "Clear",
|
|
6039
|
+
className: "bp-WaveformRange-commentClear",
|
|
6040
|
+
"data-testid": "bp-waveform-range-clear",
|
|
6041
|
+
onClick: event => {
|
|
6042
|
+
stopRangeEvent(event);
|
|
6043
|
+
onRangeClear();
|
|
6044
|
+
},
|
|
6045
|
+
onPointerDown: stopRangeEvent,
|
|
6046
|
+
onPointerUp: stopRangeEvent,
|
|
6047
|
+
type: "button"
|
|
6048
|
+
}, /*#__PURE__*/external_react_["default"].createElement(IconExit24/* default */.A, {
|
|
6049
|
+
"aria-hidden": "true",
|
|
6050
|
+
className: "bp-WaveformRange-commentIcon"
|
|
6051
|
+
}))) : commentAction;
|
|
6052
|
+
}
|
|
5942
6053
|
return /*#__PURE__*/external_react_["default"].createElement("div", {
|
|
5943
6054
|
ref: rootRef,
|
|
5944
|
-
className:
|
|
6055
|
+
className: classnames_default()('bp-WaveformRange', {
|
|
6056
|
+
'bp-WaveformRange--highlight': highlight,
|
|
6057
|
+
'bp-WaveformRange--persist': keepHighlight,
|
|
6058
|
+
'bp-WaveformRange--swiping': collapsed && isSwiping
|
|
6059
|
+
}),
|
|
5945
6060
|
"data-collapsed": collapsed ? 'true' : 'false',
|
|
5946
6061
|
"data-highlighted": highlight ? 'true' : 'false',
|
|
5947
6062
|
"data-readonly": readOnly ? 'true' : 'false',
|
|
@@ -5952,7 +6067,9 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5952
6067
|
"data-testid": "bp-waveform-range-region"
|
|
5953
6068
|
}), !readOnly && /*#__PURE__*/external_react_["default"].createElement("div", {
|
|
5954
6069
|
ref: startHandleRef,
|
|
5955
|
-
className:
|
|
6070
|
+
className: classnames_default()('bp-WaveformRange-handle', 'bp-WaveformRange-handle--start', {
|
|
6071
|
+
'bp-WaveformRange-handle--dragging': activeHandle === 'start'
|
|
6072
|
+
}),
|
|
5956
6073
|
"data-testid": "bp-waveform-range-handle-start",
|
|
5957
6074
|
onMouseMove: event => event.stopPropagation(),
|
|
5958
6075
|
onPointerDown: onHandlePointerDown
|
|
@@ -5960,7 +6077,9 @@ const WaveformRangeSelection = /*#__PURE__*/(0,external_react_.forwardRef)(funct
|
|
|
5960
6077
|
className: "bp-WaveformRange-handleGrip"
|
|
5961
6078
|
})), !readOnly && /*#__PURE__*/external_react_["default"].createElement("div", {
|
|
5962
6079
|
ref: endHandleRef,
|
|
5963
|
-
className:
|
|
6080
|
+
className: classnames_default()('bp-WaveformRange-handle', 'bp-WaveformRange-handle--end', {
|
|
6081
|
+
'bp-WaveformRange-handle--dragging': activeHandle === 'end'
|
|
6082
|
+
}),
|
|
5964
6083
|
"data-testid": "bp-waveform-range-handle-end",
|
|
5965
6084
|
onMouseMove: event => event.stopPropagation(),
|
|
5966
6085
|
onPointerDown: onHandlePointerDown
|
|
@@ -6228,8 +6347,9 @@ function WaveformView({
|
|
|
6228
6347
|
const isRangeDraggingRef = (0,external_react_.useRef)(false);
|
|
6229
6348
|
const rangeRef = (0,external_react_.useRef)(range); // latest committed draft; drag-create must not start on top of an open span
|
|
6230
6349
|
const createDragRef = (0,external_react_.useRef)(null);
|
|
6350
|
+
const rangeDragPointerXRef = (0,external_react_.useRef)(null); // clientX while a handle or create-drag is down
|
|
6231
6351
|
const removeCreateDragListenersRef = (0,external_react_.useRef)(null);
|
|
6232
|
-
const skipNextSeekRef = (0,external_react_.useRef)(false);
|
|
6352
|
+
const skipNextSeekRef = (0,external_react_.useRef)(false); // ignore the click fired when a handle is released
|
|
6233
6353
|
const lastSetTimeSecRef = (0,external_react_.useRef)(null);
|
|
6234
6354
|
const [isRangeHovered, setIsRangeHovered] = (0,external_react_.useState)(false);
|
|
6235
6355
|
const isControlled = typeof zoomLevelProp === 'number';
|
|
@@ -6253,6 +6373,8 @@ function WaveformView({
|
|
|
6253
6373
|
const activeRange = (isRangeDragging ? previewRange ?? createRange : createRange) ?? range;
|
|
6254
6374
|
const activeRangeRef = (0,external_react_.useRef)(activeRange);
|
|
6255
6375
|
activeRangeRef.current = activeRange;
|
|
6376
|
+
const viewedRangeRef = (0,external_react_.useRef)(false);
|
|
6377
|
+
viewedRangeRef.current = rangeReadOnly && createRange == null;
|
|
6256
6378
|
const durationMs = (0,waveform_range/* durationMsFromSec */.uH)(durationSec);
|
|
6257
6379
|
const rangeStartMs = activeRange?.startMs;
|
|
6258
6380
|
const rangeEndMs = activeRange?.endMs;
|
|
@@ -6303,11 +6425,19 @@ function WaveformView({
|
|
|
6303
6425
|
viewportRef,
|
|
6304
6426
|
wavesurferRef
|
|
6305
6427
|
});
|
|
6428
|
+
const suppressTapToPlayPause = (0,external_react_.useCallback)(() => {
|
|
6429
|
+
suppressNextTapPlayPauseRef.current = true;
|
|
6430
|
+
window.clearTimeout(suppressNextTapPlayPauseTimerRef.current);
|
|
6431
|
+
suppressNextTapPlayPauseTimerRef.current = window.setTimeout(() => {
|
|
6432
|
+
suppressNextTapPlayPauseRef.current = false;
|
|
6433
|
+
suppressNextTapPlayPauseTimerRef.current = 0;
|
|
6434
|
+
}, constants/* WAVEFORM_TAPE_CLICK_SUPPRESS_MS */.fI);
|
|
6435
|
+
}, []);
|
|
6306
6436
|
const toggleTapePlayback = (0,external_react_.useCallback)(() => {
|
|
6307
6437
|
if (!interactiveRef.current) {
|
|
6308
6438
|
return;
|
|
6309
6439
|
}
|
|
6310
|
-
if (isUserPanning() || pointerZoomRef.current) {
|
|
6440
|
+
if (isUserPanning() || pointerZoomRef.current || isRangeDraggingRef.current) {
|
|
6311
6441
|
return;
|
|
6312
6442
|
}
|
|
6313
6443
|
if (suppressNextTapPlayPauseRef.current) {
|
|
@@ -6317,13 +6447,8 @@ function WaveformView({
|
|
|
6317
6447
|
return;
|
|
6318
6448
|
}
|
|
6319
6449
|
onPlayPauseRef.current?.(!isPlayingRef.current);
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
suppressNextTapPlayPauseTimerRef.current = window.setTimeout(() => {
|
|
6323
|
-
suppressNextTapPlayPauseRef.current = false;
|
|
6324
|
-
suppressNextTapPlayPauseTimerRef.current = 0;
|
|
6325
|
-
}, constants/* WAVEFORM_TAPE_CLICK_SUPPRESS_MS */.fI);
|
|
6326
|
-
}, [isUserPanning]);
|
|
6450
|
+
suppressTapToPlayPause();
|
|
6451
|
+
}, [isUserPanning, suppressTapToPlayPause]);
|
|
6327
6452
|
toggleTapePlaybackRef.current = toggleTapePlayback;
|
|
6328
6453
|
(0,external_react_.useLayoutEffect)(() => {
|
|
6329
6454
|
viewportRef.current = (0,waveform_viewport/* createWaveformViewport */.eq)({
|
|
@@ -6512,7 +6637,8 @@ function WaveformView({
|
|
|
6512
6637
|
}
|
|
6513
6638
|
const rangeDraft = activeRangeRef.current;
|
|
6514
6639
|
const timeSec = relativeX * durationSecRef.current;
|
|
6515
|
-
|
|
6640
|
+
// A tape draft dismisses from the pill. A viewed range, and desktop, still clear on click-outside.
|
|
6641
|
+
if ((cameraModeRef.current !== 'tape' || viewedRangeRef.current) && rangeDraft && !(0,waveform_range/* isRangeCollapsed */.BT)(rangeDraft)) {
|
|
6516
6642
|
const pointerX = (0,waveform_viewport/* positionPxFromTime */.TO)(timeSec, viewportRef.current);
|
|
6517
6643
|
if (!(0,waveform_range/* isPointerOverRange */.H5)({
|
|
6518
6644
|
pointerX,
|
|
@@ -6529,12 +6655,13 @@ function WaveformView({
|
|
|
6529
6655
|
onSeekRef.current?.(timeSec);
|
|
6530
6656
|
});
|
|
6531
6657
|
const unsubscribeScroll = wavesurfer.on('scroll', () => {
|
|
6532
|
-
if (suppressViewportSyncRef.current) {
|
|
6658
|
+
if (suppressViewportSyncRef.current || isRangeDraggingRef.current) {
|
|
6659
|
+
// A handle drag scrolls from its own frame loop. A pan settle would pull it back.
|
|
6533
6660
|
return;
|
|
6534
6661
|
}
|
|
6535
6662
|
// User pan: map scroll to the time under the playhead, then tape seeks it.
|
|
6536
6663
|
handleCameraScroll(timeSec => {
|
|
6537
|
-
if (cameraModeRef.current === 'tape' && !pointerZoomRef.current) {
|
|
6664
|
+
if (cameraModeRef.current === 'tape' && !pointerZoomRef.current && !createDragRef.current) {
|
|
6538
6665
|
handleTapeSwipe(timeSec);
|
|
6539
6666
|
}
|
|
6540
6667
|
syncViewport();
|
|
@@ -6654,14 +6781,18 @@ function WaveformView({
|
|
|
6654
6781
|
const tick = () => {
|
|
6655
6782
|
if (!media.paused) {
|
|
6656
6783
|
updatePlayheadPosition(media.currentTime);
|
|
6657
|
-
|
|
6784
|
+
if (!isRangeDraggingRef.current) {
|
|
6785
|
+
applyPlayheadCamera(media.currentTime, false);
|
|
6786
|
+
}
|
|
6658
6787
|
}
|
|
6659
6788
|
playheadAnimationRef.current = window.requestAnimationFrame(tick);
|
|
6660
6789
|
};
|
|
6661
6790
|
const startLoop = () => {
|
|
6662
6791
|
window.cancelAnimationFrame(playheadAnimationRef.current);
|
|
6663
6792
|
releaseUserPanHold();
|
|
6664
|
-
|
|
6793
|
+
if (!isRangeDraggingRef.current) {
|
|
6794
|
+
applyPlayheadCamera(media.currentTime, true);
|
|
6795
|
+
}
|
|
6665
6796
|
playheadAnimationRef.current = window.requestAnimationFrame(tick);
|
|
6666
6797
|
};
|
|
6667
6798
|
const stopLoop = () => {
|
|
@@ -6676,7 +6807,7 @@ function WaveformView({
|
|
|
6676
6807
|
};
|
|
6677
6808
|
const handleSeeked = () => {
|
|
6678
6809
|
onPlayheadSeek(media.currentTime);
|
|
6679
|
-
if (!isUserPanning()) {
|
|
6810
|
+
if (!isUserPanning() && !isRangeDraggingRef.current) {
|
|
6680
6811
|
seekTo(media.currentTime);
|
|
6681
6812
|
}
|
|
6682
6813
|
updatePlayheadPosition(media.currentTime);
|
|
@@ -6861,9 +6992,12 @@ function WaveformView({
|
|
|
6861
6992
|
const handleRangeDragChange = (0,external_react_.useCallback)(isDragging => {
|
|
6862
6993
|
isRangeDraggingRef.current = isDragging;
|
|
6863
6994
|
setIsRangeDragging(isDragging);
|
|
6995
|
+
suppressTapToPlayPause();
|
|
6996
|
+
cancelJump();
|
|
6864
6997
|
if (isDragging) {
|
|
6865
6998
|
setHoverProgress(null);
|
|
6866
6999
|
} else {
|
|
7000
|
+
rangeDragPointerXRef.current = null;
|
|
6867
7001
|
skipNextSeekRef.current = true;
|
|
6868
7002
|
window.setTimeout(() => {
|
|
6869
7003
|
skipNextSeekRef.current = false;
|
|
@@ -6871,7 +7005,60 @@ function WaveformView({
|
|
|
6871
7005
|
setPreviewRange(null);
|
|
6872
7006
|
}
|
|
6873
7007
|
onRangeDragChange?.(isDragging);
|
|
6874
|
-
}, [onRangeDragChange]);
|
|
7008
|
+
}, [cancelJump, onRangeDragChange, suppressTapToPlayPause]);
|
|
7009
|
+
(0,external_react_.useEffect)(() => {
|
|
7010
|
+
if (!isTape || !isRangeDragging) {
|
|
7011
|
+
return undefined;
|
|
7012
|
+
}
|
|
7013
|
+
let frameId = 0;
|
|
7014
|
+
let previousFrameMs = 0;
|
|
7015
|
+
let hasPreviousFrame = false;
|
|
7016
|
+
let pendingScrollPx = 0;
|
|
7017
|
+
const getPointerInTrack = () => {
|
|
7018
|
+
const track = trackRef.current;
|
|
7019
|
+
const pointerClientX = rangeDragPointerXRef.current;
|
|
7020
|
+
if (!track || pointerClientX == null || !Number.isFinite(pointerClientX)) {
|
|
7021
|
+
return null;
|
|
7022
|
+
}
|
|
7023
|
+
const rect = track.getBoundingClientRect();
|
|
7024
|
+
return {
|
|
7025
|
+
width: rect.width,
|
|
7026
|
+
x: pointerClientX - rect.left
|
|
7027
|
+
};
|
|
7028
|
+
};
|
|
7029
|
+
const scrollWhileHandleAtEdge = frameMs => {
|
|
7030
|
+
const rawElapsedSec = hasPreviousFrame ? Math.max(0, (frameMs - previousFrameMs) / 1000) : 0;
|
|
7031
|
+
const elapsedSec = Math.min(rawElapsedSec, constants/* WAVEFORM_RANGE_EDGE_SCROLL_MAX_FRAME_SEC */.bf);
|
|
7032
|
+
hasPreviousFrame = true;
|
|
7033
|
+
previousFrameMs = frameMs;
|
|
7034
|
+
const pointer = getPointerInTrack();
|
|
7035
|
+
const viewport = viewportRef.current;
|
|
7036
|
+
const scrollDeltaPx = pointer ? (0,waveform_viewport/* getRangeEdgeScrollDeltaPx */.CD)({
|
|
7037
|
+
elapsedSec,
|
|
7038
|
+
pixelsPerSecond: viewport.pixelsPerSecond,
|
|
7039
|
+
pointerX: pointer.x,
|
|
7040
|
+
widthPx: pointer.width
|
|
7041
|
+
}) : null;
|
|
7042
|
+
if (scrollDeltaPx == null) {
|
|
7043
|
+
pendingScrollPx = 0;
|
|
7044
|
+
} else {
|
|
7045
|
+
pendingScrollPx += scrollDeltaPx;
|
|
7046
|
+
const nextScroll = Math.min((0,waveform_viewport/* maxScrollLeft */.d0)(viewport), Math.max(0, viewport.scrollLeftPx + pendingScrollPx));
|
|
7047
|
+
const scrolledPx = nextScroll - viewport.scrollLeftPx;
|
|
7048
|
+
pendingScrollPx = scrolledPx === 0 ? 0 : pendingScrollPx - scrolledPx;
|
|
7049
|
+
if (scrolledPx !== 0) {
|
|
7050
|
+
applyScrollLeft(nextScroll, true);
|
|
7051
|
+
const nextViewport = viewportRef.current;
|
|
7052
|
+
onSeekRef.current?.((0,waveform_viewport/* timeFromPositionPx */.lZ)(nextViewport.widthPx / 2, nextViewport));
|
|
7053
|
+
}
|
|
7054
|
+
}
|
|
7055
|
+
frameId = window.requestAnimationFrame(scrollWhileHandleAtEdge);
|
|
7056
|
+
};
|
|
7057
|
+
frameId = window.requestAnimationFrame(scrollWhileHandleAtEdge);
|
|
7058
|
+
return () => {
|
|
7059
|
+
window.cancelAnimationFrame(frameId);
|
|
7060
|
+
};
|
|
7061
|
+
}, [applyScrollLeft, isRangeDragging, isTape]);
|
|
6875
7062
|
const getPlayheadSec = (0,external_react_.useCallback)(() => {
|
|
6876
7063
|
return mediaElRef.current ? mediaElRef.current.currentTime : currentTimeRef.current;
|
|
6877
7064
|
}, []);
|
|
@@ -7018,16 +7205,22 @@ function WaveformView({
|
|
|
7018
7205
|
"data-testid": "bp-waveform-playhead"
|
|
7019
7206
|
}), showRangeOverlay && overlayRange && /*#__PURE__*/external_react_["default"].createElement(waveform_WaveformRangeSelection, {
|
|
7020
7207
|
ref: rangeLayerRef,
|
|
7208
|
+
cameraMode: cameraMode,
|
|
7021
7209
|
currentTimeSec: currentTime,
|
|
7022
7210
|
durationSec: durationSec,
|
|
7023
7211
|
getPlayheadSec: getPlayheadSec,
|
|
7024
7212
|
interactive: interactive && !isOverlayReadOnly,
|
|
7025
7213
|
isHighlighted: isRangeDragging || isRangeHovered,
|
|
7214
|
+
isSwiping: isTape && scrubPreviewTimeSec != null,
|
|
7026
7215
|
keepHighlight: true,
|
|
7027
7216
|
onDragChange: handleRangeDragChange,
|
|
7028
7217
|
onDragCreate: interactive && !isRangeDragging && !isOverlayReadOnly ? onRangeDragCreate : undefined,
|
|
7218
|
+
onDragPointerX: clientX => {
|
|
7219
|
+
rangeDragPointerXRef.current = clientX;
|
|
7220
|
+
},
|
|
7029
7221
|
onPreviewChange: setPreviewRange,
|
|
7030
7222
|
onRangeChange: interactive && !isOverlayReadOnly ? onRangeChange : undefined,
|
|
7223
|
+
onRangeClear: onRangeClear,
|
|
7031
7224
|
range: overlayRange,
|
|
7032
7225
|
readOnly: isOverlayReadOnly,
|
|
7033
7226
|
viewport: viewport
|
|
@@ -7595,11 +7788,14 @@ function isFpsAvailable(player) {
|
|
|
7595
7788
|
/* harmony export */ LW: () => (/* binding */ WAVEFORM_ZOOM_MIN),
|
|
7596
7789
|
/* harmony export */ Le: () => (/* binding */ TAPE_POINTER_MEDIA_QUERY),
|
|
7597
7790
|
/* harmony export */ Lu: () => (/* binding */ WAVEFORM_BAR_GAP),
|
|
7791
|
+
/* harmony export */ MR: () => (/* binding */ WAVEFORM_RANGE_EDGE_ZONE_PX),
|
|
7598
7792
|
/* harmony export */ NM: () => (/* binding */ WAVEFORM_FOLLOW_INSET_PX),
|
|
7599
7793
|
/* harmony export */ QD: () => (/* binding */ WAVEFORM_ZOOM_BUTTON_STEP),
|
|
7794
|
+
/* harmony export */ VS: () => (/* binding */ WAVEFORM_RANGE_EDGE_SCROLL_AUDIO_SEC_PER_SEC),
|
|
7600
7795
|
/* harmony export */ XS: () => (/* binding */ WAVEFORM_BAR_MIN_HEIGHT),
|
|
7601
7796
|
/* harmony export */ Zs: () => (/* binding */ WAVEFORM_FOLLOW_SCROLL_SETTLE_MS),
|
|
7602
7797
|
/* harmony export */ bX: () => (/* binding */ WAVEFORM_RANGE_MIN_DURATION_MS),
|
|
7798
|
+
/* harmony export */ bf: () => (/* binding */ WAVEFORM_RANGE_EDGE_SCROLL_MAX_FRAME_SEC),
|
|
7603
7799
|
/* harmony export */ f3: () => (/* binding */ CLIENT_DECODE_PEAK_COUNT),
|
|
7604
7800
|
/* harmony export */ fI: () => (/* binding */ WAVEFORM_TAPE_CLICK_SUPPRESS_MS),
|
|
7605
7801
|
/* harmony export */ h1: () => (/* binding */ WAVEFORM_RANGE_HANDLE_LINE_PX),
|
|
@@ -7682,6 +7878,12 @@ const WAVEFORM_RANGE_SNAP_PX = 8;
|
|
|
7682
7878
|
const WAVEFORM_RANGE_MIN_DURATION_MS = 250;
|
|
7683
7879
|
/** Pointer travel before a waveform press becomes a new draft range. Shorter presses stay click-to-seek. */
|
|
7684
7880
|
const WAVEFORM_RANGE_CREATE_DRAG_PX = 4;
|
|
7881
|
+
/** Drag a handle inside this many CSS pixels of either view edge and the tape scrolls. */
|
|
7882
|
+
const WAVEFORM_RANGE_EDGE_ZONE_PX = 100;
|
|
7883
|
+
/** Audio seconds moved per wall-clock second when the pointer is on the view edge. */
|
|
7884
|
+
const WAVEFORM_RANGE_EDGE_SCROLL_AUDIO_SEC_PER_SEC = 4;
|
|
7885
|
+
/** Longest gap one edge-scroll frame may apply. A stalled timestamp must not jump the playhead. */
|
|
7886
|
+
const WAVEFORM_RANGE_EDGE_SCROLL_MAX_FRAME_SEC = 0.05;
|
|
7685
7887
|
const WAVEFORM_RANGE_GRIP_IN_MS = 150;
|
|
7686
7888
|
const WAVEFORM_RANGE_GRIP_OUT_MS = 100;
|
|
7687
7889
|
|
|
@@ -8719,6 +8921,7 @@ function isRetryableWaveformError(code) {
|
|
|
8719
8921
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8720
8922
|
|
|
8721
8923
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8924
|
+
/* harmony export */ CD: () => (/* binding */ getRangeEdgeScrollDeltaPx),
|
|
8722
8925
|
/* harmony export */ Iw: () => (/* binding */ sliderValueFromZoom),
|
|
8723
8926
|
/* harmony export */ J$: () => (/* binding */ getZoomedPixelsPerSecond),
|
|
8724
8927
|
/* harmony export */ KH: () => (/* binding */ viewportEquals),
|
|
@@ -9009,6 +9212,30 @@ function getTapePinnedPlayheadLeft() {
|
|
|
9009
9212
|
return '50%';
|
|
9010
9213
|
}
|
|
9011
9214
|
|
|
9215
|
+
/**
|
|
9216
|
+
* Pixels to scroll this frame while a range handle is held in the edge zone.
|
|
9217
|
+
* Negative moves toward the start of the file. Null means the pointer is outside the zone.
|
|
9218
|
+
*/
|
|
9219
|
+
function getRangeEdgeScrollDeltaPx({
|
|
9220
|
+
audioSecPerSec = _constants__WEBPACK_IMPORTED_MODULE_0__/* .WAVEFORM_RANGE_EDGE_SCROLL_AUDIO_SEC_PER_SEC */ .VS,
|
|
9221
|
+
elapsedSec,
|
|
9222
|
+
edgeZonePx = _constants__WEBPACK_IMPORTED_MODULE_0__/* .WAVEFORM_RANGE_EDGE_ZONE_PX */ .MR,
|
|
9223
|
+
pixelsPerSecond,
|
|
9224
|
+
pointerX,
|
|
9225
|
+
widthPx
|
|
9226
|
+
}) {
|
|
9227
|
+
if (!(widthPx > 0) || !(elapsedSec > 0) || !(edgeZonePx > 0) || !(pixelsPerSecond > 0)) {
|
|
9228
|
+
return null;
|
|
9229
|
+
}
|
|
9230
|
+
const distanceFromEdgePx = Math.min(pointerX, widthPx - pointerX);
|
|
9231
|
+
if (distanceFromEdgePx >= edgeZonePx) {
|
|
9232
|
+
return null;
|
|
9233
|
+
}
|
|
9234
|
+
const intensity = 1 - distanceFromEdgePx / edgeZonePx;
|
|
9235
|
+
const direction = pointerX < widthPx / 2 ? -1 : 1;
|
|
9236
|
+
return direction * pixelsPerSecond * audioSecPerSec * elapsedSec * intensity;
|
|
9237
|
+
}
|
|
9238
|
+
|
|
9012
9239
|
/** CSS left % of the playhead from the left of the visible window. */
|
|
9013
9240
|
function timeLeftPercent(timeSec, durationSec, viewport) {
|
|
9014
9241
|
if (viewport.widthPx > 0 && viewport.pixelsPerSecond > 0) {
|
|
@@ -24741,7 +24968,7 @@ class Browser {
|
|
|
24741
24968
|
;// ./src/lib/Logger.js
|
|
24742
24969
|
/* eslint-disable no-undef */
|
|
24743
24970
|
const CLIENT_NAME = "box-content-preview";
|
|
24744
|
-
const CLIENT_VERSION = "3.
|
|
24971
|
+
const CLIENT_VERSION = "3.99.0";
|
|
24745
24972
|
/* eslint-enable no-undef */
|
|
24746
24973
|
|
|
24747
24974
|
class Logger {
|
|
@@ -28253,20 +28480,8 @@ function IconPencilScribbleMedium24(_ref) {
|
|
|
28253
28480
|
}));
|
|
28254
28481
|
}
|
|
28255
28482
|
/* harmony default export */ const icons_IconPencilScribbleMedium24 = (IconPencilScribbleMedium24);
|
|
28256
|
-
|
|
28257
|
-
|
|
28258
|
-
|
|
28259
|
-
function IconExit24(props) {
|
|
28260
|
-
return /*#__PURE__*/external_react_.createElement("svg", IconExit24_extends({
|
|
28261
|
-
focusable: "false",
|
|
28262
|
-
height: 24,
|
|
28263
|
-
viewBox: "0 0 19 19",
|
|
28264
|
-
width: 24
|
|
28265
|
-
}, props), /*#__PURE__*/external_react_.createElement("path", {
|
|
28266
|
-
d: "m10 8.232 5.227-5.227a.625.625 0 0 1 .884 0l.884.884a.625.625 0 0 1 0 .884L11.767 10l5.228 5.227a.625.625 0 0 1 0 .884l-.884.884a.625.625 0 0 1-.884 0L10 11.767l-5.227 5.228a.625.625 0 0 1-.884 0l-.884-.884a.625.625 0 0 1 0-.884L8.233 10 3.005 4.772a.625.625 0 0 1 0-.883l.884-.884a.625.625 0 0 1 .884 0L10 8.233z"
|
|
28267
|
-
}));
|
|
28268
|
-
}
|
|
28269
|
-
/* harmony default export */ const icons_IconExit24 = (IconExit24);
|
|
28483
|
+
// EXTERNAL MODULE: ./src/lib/viewers/controls/icons/IconExit24.tsx
|
|
28484
|
+
var IconExit24 = __webpack_require__(8950);
|
|
28270
28485
|
;// ./src/lib/viewers/controls/icons/IconTextHighlightMedium24.tsx
|
|
28271
28486
|
function IconTextHighlightMedium24_extends() { return IconTextHighlightMedium24_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, IconTextHighlightMedium24_extends.apply(null, arguments); }
|
|
28272
28487
|
|
|
@@ -28411,7 +28626,7 @@ function AnnotationsControls({
|
|
|
28411
28626
|
mode: AnnotationMode.NONE,
|
|
28412
28627
|
onClick: handleExitClick,
|
|
28413
28628
|
title: "Exit Annotations"
|
|
28414
|
-
}, /*#__PURE__*/external_react_["default"].createElement(
|
|
28629
|
+
}, /*#__PURE__*/external_react_["default"].createElement(IconExit24/* default */.A, null)), /*#__PURE__*/external_react_["default"].createElement(annotations_AnnotationsButton, {
|
|
28415
28630
|
ref: annotationBtnRefs[AnnotationMode.DRAWING],
|
|
28416
28631
|
"data-resin-target": "draw",
|
|
28417
28632
|
"data-testid": "bp-AnnotationsControls-drawBtn",
|