@agent-native/core 0.175.5 → 0.175.6-nightly-20260827111940

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.
@@ -6,8 +6,13 @@ import {
6
6
  useSession,
7
7
  } from "@agent-native/core/client/hooks";
8
8
  import { useT } from "@agent-native/core/client/i18n";
9
- import { ShareAgentsSection } from "@agent-native/toolkit/sharing";
10
- import { IconExternalLink } from "@tabler/icons-react";
9
+ import {
10
+ IconChevronDown,
11
+ IconDownload,
12
+ IconExternalLink,
13
+ IconMail,
14
+ IconPhoto,
15
+ } from "@tabler/icons-react";
11
16
  import {
12
17
  useCallback,
13
18
  useEffect,
@@ -19,11 +24,12 @@ import {
19
24
  import { toast } from "sonner";
20
25
 
21
26
  import {
22
- CopyField,
27
+ CopyButton,
23
28
  GeneralAccessSelect,
24
- MakePublicCard,
25
- SharePeopleTab,
26
- copyToClipboard,
29
+ InvitePeopleField,
30
+ PeopleAccessSection,
31
+ ShareSectionLabel,
32
+ nestedLayerDismissGuards,
27
33
  useResourceVisibilityMutation,
28
34
  type SharesQuery,
29
35
  type SharesResponse,
@@ -31,6 +37,12 @@ import {
31
37
  } from "@/components/sharing/share-ui";
32
38
  import { Button } from "@/components/ui/button";
33
39
  import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";
40
+ import {
41
+ DropdownMenu,
42
+ DropdownMenuContent,
43
+ DropdownMenuItem,
44
+ DropdownMenuTrigger,
45
+ } from "@/components/ui/dropdown-menu";
34
46
  import { Input } from "@/components/ui/input";
35
47
  import { Label } from "@/components/ui/label";
36
48
  import {
@@ -38,9 +50,9 @@ import {
38
50
  PopoverTrigger,
39
51
  PopoverContent,
40
52
  } from "@/components/ui/popover";
53
+ import { Separator } from "@/components/ui/separator";
41
54
  import { Switch } from "@/components/ui/switch";
42
55
  import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs";
43
- import { formatMs } from "@/lib/timestamp-mapping";
44
56
  import { cn } from "@/lib/utils";
45
57
 
46
58
  import { buildAgentApiUrls } from "../../../shared/agent-context";
@@ -49,6 +61,10 @@ import { isLoomEmbedUrl } from "../../../shared/loom";
49
61
  import { withShareAttribution } from "../../../shared/share-attribution";
50
62
  import { preferredThumbnailVariant } from "../../../shared/share-meta";
51
63
 
64
+ /** Compact pill tabs: active tab reads as a raised chip, inactive as plain text. */
65
+ const SHARE_TAB_CLASS =
66
+ "h-7 rounded-md border border-transparent px-3 text-xs font-medium text-muted-foreground transition-colors data-[state=active]:border-border data-[state=active]:bg-muted data-[state=active]:text-foreground data-[state=active]:shadow-none";
67
+
52
68
  function absoluteAppUrl(path: string): string {
53
69
  if (typeof window === "undefined") return "";
54
70
  return new URL(appPath(path), window.location.origin).toString();
@@ -71,7 +87,6 @@ export interface ShareRecordingPopoverProps {
71
87
  thumbnailUrl?: string | null;
72
88
  animatedThumbnailUrl?: string | null;
73
89
  isLoomRecording?: boolean;
74
- currentMs?: number;
75
90
  hasPassword?: boolean;
76
91
  /**
77
92
  * Restricts the dialog to a bare copy-link control for viewers who can
@@ -110,7 +125,6 @@ export function ShareRecordingPopover({
110
125
  thumbnailUrl,
111
126
  animatedThumbnailUrl,
112
127
  isLoomRecording = false,
113
- currentMs,
114
128
  hasPassword,
115
129
  viewerReshareOnly = false,
116
130
  children,
@@ -123,6 +137,7 @@ export function ShareRecordingPopover({
123
137
  {/* Keep the layer class in app source so Tailwind emits it for Clips. */}
124
138
  <PopoverContent
125
139
  align="end"
140
+ {...nestedLayerDismissGuards()}
126
141
  className="z-[260] w-[440px] max-w-[calc(100vw-1rem)] overflow-hidden border-border p-0"
127
142
  >
128
143
  <ShareRecordingContent
@@ -134,7 +149,6 @@ export function ShareRecordingPopover({
134
149
  thumbnailUrl={thumbnailUrl}
135
150
  animatedThumbnailUrl={animatedThumbnailUrl}
136
151
  isLoomRecording={isLoomRecording}
137
- currentMs={currentMs}
138
152
  hasPassword={hasPassword}
139
153
  viewerReshareOnly={viewerReshareOnly}
140
154
  />
@@ -157,7 +171,6 @@ export function ShareRecordingDialog({
157
171
  thumbnailUrl,
158
172
  animatedThumbnailUrl,
159
173
  isLoomRecording = false,
160
- currentMs,
161
174
  open,
162
175
  onOpenChange,
163
176
  hasPassword,
@@ -181,7 +194,6 @@ export function ShareRecordingDialog({
181
194
  thumbnailUrl={thumbnailUrl}
182
195
  animatedThumbnailUrl={animatedThumbnailUrl}
183
196
  isLoomRecording={isLoomRecording}
184
- currentMs={currentMs}
185
197
  hasPassword={hasPassword}
186
198
  viewerReshareOnly={viewerReshareOnly}
187
199
  reserveCloseButton
@@ -200,7 +212,6 @@ function ShareRecordingContent({
200
212
  thumbnailUrl,
201
213
  animatedThumbnailUrl,
202
214
  isLoomRecording = false,
203
- currentMs,
204
215
  reserveCloseButton = false,
205
216
  hasPassword,
206
217
  viewerReshareOnly = false,
@@ -213,7 +224,6 @@ function ShareRecordingContent({
213
224
  thumbnailUrl?: string | null;
214
225
  animatedThumbnailUrl?: string | null;
215
226
  isLoomRecording?: boolean;
216
- currentMs?: number;
217
227
  reserveCloseButton?: boolean;
218
228
  hasPassword?: boolean;
219
229
  viewerReshareOnly?: boolean;
@@ -261,27 +271,21 @@ function ShareRecordingContent({
261
271
  absoluteAppUrl(`/share/${recordingId}`),
262
272
  ownerViaId,
263
273
  );
274
+
275
+ const { setResourceVisibility, isPending: visibilityMutationPending } =
276
+ useResourceVisibilityMutation("recording", recordingId, sharesQuery);
277
+ const visibilityPending = visibilityMutationPending || sharesQuery.isLoading;
278
+
264
279
  return (
265
- <>
266
- <Tabs
267
- defaultValue="link"
268
- className={cn("min-w-0 px-4 py-3", reserveCloseButton && "pe-12")}
269
- >
280
+ <div className={cn("min-w-0 px-4 py-3", reserveCloseButton && "pe-12")}>
281
+ <Tabs defaultValue="link">
270
282
  {tabCount > 1 ? (
271
- <TabsList
272
- className={`grid w-full rounded-xl bg-muted/70 p-1 ${tabCount === 3 ? "grid-cols-3" : "grid-cols-2"}`}
273
- >
274
- <TabsTrigger
275
- value="link"
276
- className="h-10 rounded-lg px-3 text-sm font-medium text-muted-foreground transition-colors data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm data-[state=active]:ring-1 data-[state=active]:ring-border"
277
- >
283
+ <TabsList className="mb-1 inline-flex h-auto w-auto justify-start gap-1 rounded-none bg-transparent p-0">
284
+ <TabsTrigger value="link" className={SHARE_TAB_CLASS}>
278
285
  {t("shareDialog.link")}
279
286
  </TabsTrigger>
280
287
  {canEmbed ? (
281
- <TabsTrigger
282
- value="embed"
283
- className="h-10 rounded-lg px-3 text-sm font-medium text-muted-foreground transition-colors data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm data-[state=active]:ring-1 data-[state=active]:ring-border"
284
- >
288
+ <TabsTrigger value="embed" className={SHARE_TAB_CLASS}>
285
289
  {t("shareDialog.embed")}
286
290
  </TabsTrigger>
287
291
  ) : null}
@@ -295,12 +299,13 @@ function ShareRecordingContent({
295
299
  shareUrl={shareUrl}
296
300
  sharesQuery={sharesQuery}
297
301
  visibility={visibility}
302
+ visibilityPending={visibilityPending}
303
+ onVisibilityChange={setResourceVisibility}
298
304
  canManage={canManage}
299
305
  videoUrl={videoUrl}
300
306
  thumbnailUrl={thumbnailUrl}
301
307
  animatedThumbnailUrl={animatedThumbnailUrl}
302
308
  isLoomRecording={isLoomRecording}
303
- currentMs={currentMs}
304
309
  hasPassword={hasPassword}
305
310
  canViewShares={canViewShares}
306
311
  />
@@ -318,7 +323,7 @@ function ShareRecordingContent({
318
323
  </TabsContent>
319
324
  ) : null}
320
325
  </Tabs>
321
- </>
326
+ </div>
322
327
  );
323
328
  }
324
329
 
@@ -332,12 +337,13 @@ function LinkTab({
332
337
  shareUrl,
333
338
  sharesQuery,
334
339
  visibility,
340
+ visibilityPending,
341
+ onVisibilityChange,
335
342
  canManage,
336
343
  videoUrl,
337
344
  thumbnailUrl,
338
345
  animatedThumbnailUrl,
339
346
  isLoomRecording: isLoomRecordingProp,
340
- currentMs = 0,
341
347
  hasPassword,
342
348
  canViewShares,
343
349
  }: {
@@ -346,34 +352,22 @@ function LinkTab({
346
352
  shareUrl: string;
347
353
  sharesQuery: SharesQuery;
348
354
  visibility: Visibility | null;
355
+ visibilityPending: boolean;
356
+ onVisibilityChange: (
357
+ next: Visibility,
358
+ options?: { onSuccess?: () => void },
359
+ ) => void;
349
360
  canManage: boolean;
350
361
  videoUrl?: string | null;
351
362
  thumbnailUrl?: string | null;
352
363
  animatedThumbnailUrl?: string | null;
353
364
  isLoomRecording?: boolean;
354
- currentMs?: number;
355
365
  hasPassword?: boolean;
356
366
  canViewShares: boolean;
357
367
  }) {
358
368
  const t = useT();
359
- const { setResourceVisibility, isPending } = useResourceVisibilityMutation(
360
- "recording",
361
- recordingId,
362
- sharesQuery,
363
- );
364
369
  const isPublic = visibility === "public";
365
370
  const sharesLoaded = visibility !== null;
366
- const timestampMs = Number.isFinite(currentMs)
367
- ? Math.max(0, Math.floor(currentMs! / 1000) * 1000)
368
- : 0;
369
- const [shareFromTimestamp, setShareFromTimestamp] = useState(false);
370
- const linkUrl = useMemo(() => {
371
- if (!shareFromTimestamp || timestampMs === 0) return shareUrl;
372
- const url = new URL(shareUrl);
373
- url.searchParams.set("at", String(timestampMs / 1000));
374
- return url.toString();
375
- }, [shareFromTimestamp, shareUrl, timestampMs]);
376
- const visibilityPending = isPending || sharesQuery.isLoading;
377
371
  const isLoomRecording = isLoomRecordingProp || isLoomEmbedUrl(videoUrl);
378
372
  const needsScopedAgentContext = !isPublic || hasPassword !== false;
379
373
  const publicAgentContextUrl = useMemo(
@@ -488,188 +482,176 @@ function LinkTab({
488
482
  !sharesLoaded ||
489
483
  !agentLink ||
490
484
  (needsScopedAgentContext &&
491
- (isPending || createAgentLink.isPending || !agentContextUrl));
492
- const agentPrompt = agentLink
485
+ (createAgentLink.isPending || !agentContextUrl));
486
+ const agentCopyValue = agentLink
493
487
  ? t("shareDialog.agentPrompt", { agentContextUrl: agentLink })
494
488
  : "";
495
- const [agentDetailsOpen, setAgentDetailsOpen] = useState(false);
496
- const showMakePublic = sharesLoaded && !isPublic && canManage;
497
- const downloadButton = videoUrl ? (
498
- <Button
499
- variant="outline"
500
- size="sm"
501
- className={isLoomRecording ? "gap-1.5" : undefined}
502
- onClick={() => window.open(videoUrl, "_blank", "noopener,noreferrer")}
503
- >
504
- {isLoomRecording ? (
505
- <>
506
- <IconExternalLink className="h-4 w-4" />
507
- {t("shareDialog.openPlayer")}
508
- </>
509
- ) : (
510
- t("recordRoute.downloadRecording")
511
- )}
512
- </Button>
513
- ) : null;
514
- const moveDownloadIntoMakePublicRow = showMakePublic && Boolean(videoUrl);
515
-
516
- useEffect(() => {
517
- if (isPublic) setAgentDetailsOpen(false);
518
- }, [isPublic]);
489
+ const moreMenuItems = [
490
+ isLoomRecording && videoUrl
491
+ ? {
492
+ key: "open-player",
493
+ label: t("shareDialog.openPlayer"),
494
+ icon: IconExternalLink,
495
+ onSelect: () =>
496
+ window.open(videoUrl, "_blank", "noopener,noreferrer"),
497
+ }
498
+ : videoUrl
499
+ ? {
500
+ key: "download",
501
+ label: t("recordRoute.downloadRecording"),
502
+ icon: IconDownload,
503
+ onSelect: () =>
504
+ window.open(videoUrl, "_blank", "noopener,noreferrer"),
505
+ }
506
+ : null,
507
+ animatedThumbnailUrl
508
+ ? {
509
+ key: "gif-preview",
510
+ label: t("shareDialog.gifPreview"),
511
+ icon: IconPhoto,
512
+ onSelect: () => window.open(animatedThumbnailUrl, "_blank"),
513
+ }
514
+ : null,
515
+ emailPreviewThumbnailUrl
516
+ ? {
517
+ key: "email-preview",
518
+ label: t("shareDialog.copyEmailPreview"),
519
+ icon: IconMail,
520
+ onSelect: () => void copyEmailPreview(),
521
+ }
522
+ : null,
523
+ ].filter((item): item is NonNullable<typeof item> => item !== null);
519
524
 
520
525
  return (
521
526
  <div className="space-y-4">
522
- <CopyField
523
- label={
524
- isPublic
525
- ? t("shareDialog.shareLink")
526
- : t("shareDialog.shareWithHumans")
527
- }
528
- value={linkUrl}
529
- disabled={visibilityPending || !sharesLoaded}
530
- />
531
-
532
- <div className="flex items-center justify-between gap-3">
533
- <Label className="text-sm" htmlFor="share-from-timestamp">
534
- {t("shareDialog.startAtTimestamp", {
535
- time: formatMs(timestampMs),
536
- })}
537
- </Label>
538
- <Switch
539
- id="share-from-timestamp"
540
- checked={shareFromTimestamp}
541
- onCheckedChange={setShareFromTimestamp}
542
- />
543
- </div>
544
-
545
- {canViewShares ? (
546
- visibility ? (
547
- <GeneralAccessSelect
548
- visibility={visibility}
549
- canManage={canManage}
550
- isPending={visibilityPending}
551
- onChange={(next) => setResourceVisibility(next)}
552
- publicDescription={t("shareDialog.publicDescription")}
553
- showDescription={false}
554
- />
555
- ) : (
556
- <div className="space-y-2" aria-hidden>
557
- <div className="h-3 w-24 animate-pulse rounded bg-muted" />
558
- <div className="h-12 w-full animate-pulse rounded bg-muted" />
559
- </div>
560
- )
561
- ) : null}
562
-
563
- {canViewShares ? (
564
- <SharePeopleTab
527
+ {/* `share-resource` requires owner/admin, so anyone else would only get
528
+ a rejected submission. */}
529
+ {canManage ? (
530
+ <InvitePeopleField
565
531
  resourceType="recording"
566
532
  resourceId={recordingId}
567
533
  resourceUrl={absoluteAppUrl(`/r/${recordingId}`)}
568
534
  sharesQuery={sharesQuery}
569
- canManage={canManage}
570
- roleCopy={{
571
- commenter: {
572
- label: t("shareUi.recordingCommenter.label"),
573
- description: t("shareUi.recordingCommenter.description"),
574
- },
575
- }}
576
- onError={(err, action) =>
535
+ onError={(err) =>
577
536
  toast.error(
578
537
  err instanceof Error
579
538
  ? err.message
580
- : action === "invite"
581
- ? t("clipsFinalRaw.inviteFailed")
582
- : action === "permission"
583
- ? t("clipsFinalRaw.permissionUpdateFailed")
584
- : t("clipsFinalRaw.removePersonFailed"),
539
+ : t("clipsFinalRaw.inviteFailed"),
585
540
  )
586
541
  }
587
542
  />
588
543
  ) : null}
589
544
 
590
- <ShareAgentsSection
591
- label={t("shareDialog.shareWithAgents")}
592
- open={agentDetailsOpen}
593
- onOpenChange={setAgentDetailsOpen}
594
- contentClassName="clips-collapsible-content"
595
- >
596
- <div className="space-y-2">
597
- <CopyField
598
- label={t("shareDialog.shareLink")}
599
- value={agentLink}
600
- disabled={agentShareDisabled}
601
- />
602
- {sharesLoaded ? (
603
- <>
604
- <p className="text-xs text-muted-foreground">
605
- {t("shareDialog.agentTokenDescription")}
606
- </p>
607
- {agentLinkError ? (
608
- <div className="flex items-center justify-between gap-2 rounded-md border border-border bg-muted/30 px-3 py-2">
609
- <p className="text-xs text-muted-foreground">
610
- {t("shareDialog.agentLinkUnavailable")}
611
- </p>
612
- <Button
613
- type="button"
614
- variant="ghost"
615
- size="sm"
616
- className="h-7"
617
- onClick={() => void loadAgentContextUrl()}
618
- disabled={createAgentLink.isPending}
619
- >
620
- {t("shareDialog.retryAgentLink")}
621
- </Button>
622
- </div>
623
- ) : null}
624
- <CopyField
625
- label={t("shareDialog.copyAgentPrompt")}
626
- value={agentPrompt}
627
- disabled={agentShareDisabled}
545
+ {canViewShares ? (
546
+ visibility ? (
547
+ <div className="space-y-2 pt-2">
548
+ <ShareSectionLabel>{t("shareUi.whoHasAccess")}</ShareSectionLabel>
549
+ <div className="flex flex-col gap-1">
550
+ <PeopleAccessSection
551
+ resourceType="recording"
552
+ resourceId={recordingId}
553
+ sharesQuery={sharesQuery}
554
+ canManage={canManage}
555
+ roleCopy={{
556
+ commenter: {
557
+ label: t("shareUi.recordingCommenter.label"),
558
+ description: t("shareUi.recordingCommenter.description"),
559
+ },
560
+ }}
561
+ onError={(err, action) =>
562
+ toast.error(
563
+ err instanceof Error
564
+ ? err.message
565
+ : action === "permission"
566
+ ? t("clipsFinalRaw.permissionUpdateFailed")
567
+ : t("clipsFinalRaw.removePersonFailed"),
568
+ )
569
+ }
628
570
  />
629
- </>
630
- ) : null}
631
- </div>
632
- </ShareAgentsSection>
633
-
634
- {showMakePublic ? (
635
- <MakePublicCard
636
- isPending={isPending}
637
- secondaryAction={
638
- moveDownloadIntoMakePublicRow ? downloadButton : undefined
639
- }
640
- onMakePublic={() =>
641
- setResourceVisibility("public", {
642
- onSuccess: () => copyToClipboard(linkUrl),
643
- })
644
- }
645
- />
571
+ <GeneralAccessSelect
572
+ visibility={visibility}
573
+ canManage={canManage}
574
+ isPending={visibilityPending}
575
+ onChange={onVisibilityChange}
576
+ />
577
+ </div>
578
+ </div>
579
+ ) : (
580
+ <div className="space-y-2" aria-hidden>
581
+ <div className="h-3 w-24 animate-pulse rounded bg-muted" />
582
+ <div className="h-9 w-full animate-pulse rounded bg-muted" />
583
+ <div className="h-9 w-full animate-pulse rounded bg-muted" />
584
+ </div>
585
+ )
646
586
  ) : null}
647
587
 
648
- {emailPreviewThumbnailUrl ||
649
- animatedThumbnailUrl ||
650
- (videoUrl && !moveDownloadIntoMakePublicRow) ? (
651
- <div className="flex flex-wrap gap-2">
652
- {emailPreviewThumbnailUrl ? (
653
- <Button
654
- variant="outline"
655
- size="sm"
656
- onClick={() => void copyEmailPreview()}
657
- >
658
- {t("shareDialog.copyEmailPreview")}
659
- </Button>
660
- ) : null}
661
- {animatedThumbnailUrl ? (
662
- <Button
663
- variant="outline"
664
- size="sm"
665
- onClick={() => window.open(animatedThumbnailUrl, "_blank")}
666
- >
667
- {t("shareDialog.gifPreview")}
668
- </Button>
669
- ) : null}
670
- {!moveDownloadIntoMakePublicRow ? downloadButton : null}
588
+ <div className="flex flex-wrap items-center gap-2">
589
+ <CopyButton
590
+ value={shareUrl}
591
+ disabled={visibilityPending || !sharesLoaded}
592
+ >
593
+ {t("shareUi.copyLink")}
594
+ </CopyButton>
595
+ {moreMenuItems.length > 0 ? (
596
+ <DropdownMenu modal={false}>
597
+ <DropdownMenuTrigger asChild>
598
+ <Button
599
+ type="button"
600
+ variant="ghost"
601
+ className="ms-auto gap-3 px-3"
602
+ >
603
+ {t("shareDialog.more")}
604
+ <IconChevronDown className="h-4 w-4 opacity-50" />
605
+ </Button>
606
+ </DropdownMenuTrigger>
607
+ <DropdownMenuContent align="end">
608
+ {moreMenuItems.map((item) => (
609
+ <DropdownMenuItem key={item.key} onSelect={item.onSelect}>
610
+ <item.icon size={16} aria-hidden />
611
+ {item.label}
612
+ </DropdownMenuItem>
613
+ ))}
614
+ </DropdownMenuContent>
615
+ </DropdownMenu>
616
+ ) : null}
617
+ </div>
618
+
619
+ <Separator />
620
+
621
+ <div className="flex items-center justify-between gap-4">
622
+ <div className="min-w-0">
623
+ <div className="text-sm font-medium">
624
+ {t("shareDialog.shareWithAgents")}
625
+ </div>
626
+ <p className="text-xs text-muted-foreground">
627
+ {/* A public, unprotected clip hands agents its permanent public
628
+ context URL; everything else gets a short-lived scoped token. */}
629
+ {needsScopedAgentContext
630
+ ? t("shareDialog.agentTokenDescription")
631
+ : t("shareDialog.agentPublicDescription")}
632
+ </p>
671
633
  </div>
672
- ) : null}
634
+ {agentLinkError ? (
635
+ <Button
636
+ type="button"
637
+ variant="outline"
638
+ size="sm"
639
+ className="shrink-0"
640
+ onClick={() => void loadAgentContextUrl()}
641
+ disabled={createAgentLink.isPending}
642
+ >
643
+ {t("shareDialog.retryAgentLink")}
644
+ </Button>
645
+ ) : (
646
+ <CopyButton
647
+ value={agentCopyValue}
648
+ disabled={agentShareDisabled}
649
+ className="shrink-0"
650
+ >
651
+ {t("shareUi.copy")}
652
+ </CopyButton>
653
+ )}
654
+ </div>
673
655
  </div>
674
656
  );
675
657
  }
@@ -830,6 +812,9 @@ function ClipsEmbedConfigurator({
830
812
  value={code}
831
813
  className="w-full h-20 px-3 py-2 text-xs font-mono rounded-md border border-input bg-background resize-none"
832
814
  />
815
+ <CopyButton value={code} className="mt-2">
816
+ {t("shareDialog.copyEmbedCode")}
817
+ </CopyButton>
833
818
  </div>
834
819
  </div>
835
820
  );
@@ -2070,8 +2070,8 @@ export const VideoPlayer = forwardRef<VideoPlayerHandle, VideoPlayerProps>(
2070
2070
  {!hideChrome && !isLoomEmbed ? (
2071
2071
  <div
2072
2072
  className={cn(
2073
- "absolute inset-x-0 bottom-0 z-20 transition-opacity duration-200",
2074
- controlsVisible ? "opacity-100" : "opacity-0 pointer-events-none",
2073
+ "absolute inset-x-0 bottom-0 z-20 opacity-100 transition-opacity duration-200",
2074
+ controlsVisible ? "" : "sm:opacity-0 sm:pointer-events-none",
2075
2075
  )}
2076
2076
  >
2077
2077
  <PlayerControls