cursedbelt 5.14.0 → 5.15.2
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/dist/react/components/DropdownMenu.d.ts +1 -1
- package/dist/react/components/DropdownMenu.d.ts.map +1 -1
- package/dist/react/components/DropdownMenu.js +29 -2
- package/dist/react/components/DropdownMenu.js.map +1 -1
- package/dist/react/components/HoverCard.d.ts.map +1 -1
- package/dist/react/components/HoverCard.js +3 -1
- package/dist/react/components/HoverCard.js.map +1 -1
- package/dist/react/components/Popover.d.ts +70 -8
- package/dist/react/components/Popover.d.ts.map +1 -1
- package/dist/react/components/Popover.js +78 -6
- package/dist/react/components/Popover.js.map +1 -1
- package/dist/react/components/SelectField.d.ts.map +1 -1
- package/dist/react/components/SelectField.js +3 -1
- package/dist/react/components/SelectField.js.map +1 -1
- package/dist/react/components/TooltipImpl.d.ts.map +1 -1
- package/dist/react/components/TooltipImpl.js +3 -1
- package/dist/react/components/TooltipImpl.js.map +1 -1
- package/dist/react/hooks/useOutsidePress.d.ts +60 -0
- package/dist/react/hooks/useOutsidePress.d.ts.map +1 -0
- package/dist/react/hooks/useOutsidePress.js +120 -0
- package/dist/react/hooks/useOutsidePress.js.map +1 -0
- package/dist/react/icons.d.ts +13 -3
- package/dist/react/icons.d.ts.map +1 -1
- package/dist/react/icons.js +9 -3
- package/dist/react/icons.js.map +1 -1
- package/dist/react/index.d.ts +2 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +2 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/lib/floatingContainer.d.ts +19 -0
- package/dist/react/lib/floatingContainer.d.ts.map +1 -0
- package/dist/react/lib/floatingContainer.js +36 -0
- package/dist/react/lib/floatingContainer.js.map +1 -0
- package/dist/react/media/CanvasVideoPlayer.d.ts.map +1 -1
- package/dist/react/media/CanvasVideoPlayer.js +2 -1
- package/dist/react/media/CanvasVideoPlayer.js.map +1 -1
- package/dist/scripts/guardrailsEnforce.d.ts.map +1 -1
- package/dist/styles-areas/media.css +4 -4
- package/dist/styles-utilities.css +0 -3
- package/package.json +3 -2
- package/scripts/guardrails-baseline.json +2 -1
- package/scripts/guardrailsEnforce.spec.ts +53 -0
- package/scripts/guardrailsEnforce.ts +60 -0
- package/src/react/components/DropdownMenu.spec.tsx +39 -0
- package/src/react/components/DropdownMenu.tsx +37 -5
- package/src/react/components/HoverCard.tsx +3 -1
- package/src/react/components/Popover.spec.tsx +241 -0
- package/src/react/components/Popover.tsx +172 -23
- package/src/react/components/SelectField.tsx +3 -1
- package/src/react/components/TooltipImpl.tsx +3 -1
- package/src/react/hooks/useOutsidePress.spec.tsx +112 -0
- package/src/react/hooks/useOutsidePress.ts +159 -0
- package/src/react/icons.spec.ts +19 -0
- package/src/react/icons.tsx +14 -4
- package/src/react/index.ts +2 -1
- package/src/react/lib/floatingContainer.ts +42 -0
- package/src/react/media/CanvasVideoPlayer.tsx +36 -28
- package/src/styles-areas/media.css +4 -4
- package/src/styles-utilities.css +0 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Button } from '../components/Button.js';
|
|
3
3
|
import { IconButton } from '../components/IconButton.js';
|
|
4
|
+
import { Popover } from '../components/Popover.js';
|
|
4
5
|
import { useHlsSource } from './hlsSource.js';
|
|
5
6
|
import { DEFAULT_VIDEO_ASPECT_RATIO, type PlayerVideo, ProcessingIndicator } from './VideoPlayer.js';
|
|
6
7
|
|
|
@@ -271,34 +272,41 @@ export function CanvasVideoPlayer({
|
|
|
271
272
|
/>
|
|
272
273
|
<span className='shrink-0 text-xs tabular-nums'>{fmtTime(duration)}</span>
|
|
273
274
|
|
|
274
|
-
{/* Playback speed
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
275
|
+
{/* Playback speed — the shared Popover, so a tap anywhere else closes it. `modal`:
|
|
276
|
+
that tap must not also land on the picture and pause the film. */}
|
|
277
|
+
<Popover
|
|
278
|
+
open={speedOpen}
|
|
279
|
+
onOpenChange={setSpeedOpen}
|
|
280
|
+
side='top'
|
|
281
|
+
align='end'
|
|
282
|
+
modal
|
|
283
|
+
unstyled
|
|
284
|
+
label='Playback speed'
|
|
285
|
+
className='flex flex-col overflow-hidden rounded-md bg-black/90 text-xs'
|
|
286
|
+
trigger={
|
|
287
|
+
<Button
|
|
288
|
+
variant='ghost'
|
|
289
|
+
tooltip='Playback speed'
|
|
290
|
+
className='h-10 min-w-10 shrink-0 rounded px-1 text-xs tabular-nums text-white hover:bg-white/20'
|
|
291
|
+
>
|
|
292
|
+
{rate}×
|
|
293
|
+
</Button>
|
|
294
|
+
}
|
|
295
|
+
>
|
|
296
|
+
{SPEEDS.map((s) => (
|
|
297
|
+
<Button
|
|
298
|
+
key={s}
|
|
299
|
+
variant='ghost'
|
|
300
|
+
tooltip={`Set speed to ${s}×`}
|
|
301
|
+
onClick={() => changeRate(s)}
|
|
302
|
+
className={`h-auto justify-end rounded-none px-3 py-1.5 text-right text-white tabular-nums hover:bg-white/20 ${
|
|
303
|
+
s === rate ? 'font-bold text-[color:var(--accent)]' : ''
|
|
304
|
+
}`}
|
|
305
|
+
>
|
|
306
|
+
{s}×
|
|
307
|
+
</Button>
|
|
308
|
+
))}
|
|
309
|
+
</Popover>
|
|
302
310
|
|
|
303
311
|
{/* Volume */}
|
|
304
312
|
<div className='flex shrink-0 items-center gap-1'>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* after an app's responsive variant (task 2124). An app that imports every area gets exactly
|
|
19
19
|
* what `cursedbelt/styles-utilities.css` emits — proved rule by rule in
|
|
20
20
|
* src/stylesAreas.spec.ts, which is also what fails when this file is stale.
|
|
21
|
-
*
|
|
21
|
+
* 94 candidate(s).
|
|
22
22
|
*
|
|
23
23
|
* Written by scripts/generateAreaStyles.ts (`bun run styles:areas`), which
|
|
24
24
|
* `bun run build` runs. The map of what is in which area, and why the areas are
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
@source inline("appearance-none aspect aspect-square aspect-video backdrop-blur-[2px] bg-accent/15");
|
|
29
29
|
@source inline("bg-background/65 bg-background/85 bg-black bg-black/55 bg-black/60 bg-black/85 bg-black/90");
|
|
30
30
|
@source inline("bg-card-raised bg-center bg-cover bg-linear-to-t bg-muted/40 bg-white/90 border-2 border-accent");
|
|
31
|
-
@source inline("border-accent-solid border-white/90 border-y-2 bottom-1 bottom-1.5 bottom-2
|
|
32
|
-
@source inline("cursor-
|
|
33
|
-
@source inline("
|
|
31
|
+
@source inline("border-accent-solid border-white/90 border-y-2 bottom-1 bottom-1.5 bottom-2 cursor-crosshair");
|
|
32
|
+
@source inline("cursor-grab cursor-zoom-in ease-in-out focus-within:opacity-100 from-black/80 g gap-x-4");
|
|
33
|
+
@source inline("grayscale group-focus-within:opacity-100 h-11 hover:bg-black/75 hover:bg-destructive");
|
|
34
34
|
@source inline("hover:bg-white/20 hover:border-accent-solid invert left-0 left-1 max-h-[40vh] max-h-[48vh]");
|
|
35
35
|
@source inline("max-h-full max-w-[200px] md:grid-cols-4 min-h-64 min-h-dvh min-w-10 min-w-28 min-w-40 min-w-48 o");
|
|
36
36
|
@source inline("op opacity-100 opacity-80 pb-2 pr-9 pt-8 right-1 right-1.5 right-3 sh");
|