@epicbagel/saas-kit 1.32.0 → 1.33.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/THIRD_PARTY_NOTICES.md +6 -5
- package/dist/chunk-2DCJ2SFU.js +20 -0
- package/dist/chunk-2FVFPGP5.js +489 -0
- package/dist/{chunk-HTPPNW74.js → chunk-AWCXVYPL.js} +1 -1
- package/dist/chunk-B54ZEKBG.cjs +63 -0
- package/dist/chunk-CXAFTEEP.cjs +20 -0
- package/dist/{chunk-MOJHETNO.cjs → chunk-F3D5HA2F.cjs} +10 -10
- package/dist/chunk-G3SF4RRA.cjs +489 -0
- package/dist/chunk-HTTRUJQU.cjs +60 -0
- package/dist/{chunk-JS6BLIWL.js → chunk-IZF4WCK6.js} +11 -11
- package/dist/{chunk-PH2TV7XI.cjs → chunk-KOR2QR7I.cjs} +5 -5
- package/dist/{chunk-BGCNGYPL.cjs → chunk-PTMZTP3V.cjs} +2 -2
- package/dist/{chunk-6O3DUMF7.js → chunk-REGA2L5S.js} +1 -1
- package/dist/{chunk-PNI354BY.cjs → chunk-SL6ECEN6.cjs} +2 -2
- package/dist/{chunk-ZGTPNSR7.js → chunk-TS4MC3B3.js} +4 -4
- package/dist/chunk-TUQVHPSI.js +60 -0
- package/dist/chunk-VWOWPNKT.js +73 -0
- package/dist/chunk-XH2I3YJ6.js +63 -0
- package/dist/chunk-Y6X6XDHE.cjs +73 -0
- package/dist/primitives/accent-theme.cjs +66 -0
- package/dist/primitives/accent-theme.d.cts +32 -0
- package/dist/primitives/accent-theme.d.ts +32 -0
- package/dist/primitives/accent-theme.js +66 -0
- package/dist/primitives/activity-feed.cjs +2 -2
- package/dist/primitives/activity-feed.js +2 -2
- package/dist/primitives/agent-audio-visualizer-bar.cjs +3 -3
- package/dist/primitives/agent-audio-visualizer-bar.js +2 -2
- package/dist/primitives/alert.d.cts +1 -1
- package/dist/primitives/alert.d.ts +1 -1
- package/dist/primitives/app-layout.cjs +114 -0
- package/dist/primitives/app-layout.d.cts +47 -0
- package/dist/primitives/app-layout.d.ts +47 -0
- package/dist/primitives/app-layout.js +114 -0
- package/dist/primitives/app-sidebar.cjs +52 -0
- package/dist/primitives/app-sidebar.d.cts +105 -0
- package/dist/primitives/app-sidebar.d.ts +105 -0
- package/dist/primitives/app-sidebar.js +52 -0
- package/dist/primitives/archive-confirmation-dialog.cjs +2 -2
- package/dist/primitives/archive-confirmation-dialog.js +3 -3
- package/dist/primitives/back-bar.cjs +37 -0
- package/dist/primitives/back-bar.d.cts +31 -0
- package/dist/primitives/back-bar.d.ts +31 -0
- package/dist/primitives/back-bar.js +37 -0
- package/dist/primitives/badge.d.cts +1 -1
- package/dist/primitives/badge.d.ts +1 -1
- package/dist/primitives/batch-action-bar.cjs +134 -0
- package/dist/primitives/batch-action-bar.d.cts +27 -0
- package/dist/primitives/batch-action-bar.d.ts +27 -0
- package/dist/primitives/batch-action-bar.js +134 -0
- package/dist/primitives/board-view-internals.cjs +3 -3
- package/dist/primitives/board-view-internals.js +2 -2
- package/dist/primitives/board-view.cjs +8 -8
- package/dist/primitives/board-view.js +7 -7
- package/dist/primitives/brand-mark.cjs +26 -0
- package/dist/primitives/brand-mark.d.cts +10 -0
- package/dist/primitives/brand-mark.d.ts +10 -0
- package/dist/primitives/brand-mark.js +26 -0
- package/dist/primitives/bubble.d.cts +1 -1
- package/dist/primitives/bubble.d.ts +1 -1
- package/dist/primitives/button.d.cts +2 -2
- package/dist/primitives/button.d.ts +2 -2
- package/dist/primitives/chat.cjs +27 -27
- package/dist/primitives/chat.js +21 -21
- package/dist/primitives/code-block.cjs +4 -4
- package/dist/primitives/code-block.js +3 -3
- package/dist/primitives/command.cjs +129 -0
- package/dist/primitives/command.d.cts +60 -0
- package/dist/primitives/command.d.ts +60 -0
- package/dist/primitives/command.js +129 -0
- package/dist/primitives/compact-list.cjs +24 -0
- package/dist/primitives/compact-list.d.cts +18 -0
- package/dist/primitives/compact-list.d.ts +18 -0
- package/dist/primitives/compact-list.js +24 -0
- package/dist/primitives/connection.cjs +6 -6
- package/dist/primitives/connection.js +8 -8
- package/dist/primitives/context-bar.cjs +57 -0
- package/dist/primitives/context-bar.d.cts +50 -0
- package/dist/primitives/context-bar.d.ts +50 -0
- package/dist/primitives/context-bar.js +57 -0
- package/dist/primitives/copy-button.cjs +3 -3
- package/dist/primitives/copy-button.js +2 -2
- package/dist/primitives/cycling-prompt.cjs +102 -0
- package/dist/primitives/cycling-prompt.d.cts +24 -0
- package/dist/primitives/cycling-prompt.d.ts +24 -0
- package/dist/primitives/cycling-prompt.js +102 -0
- package/dist/primitives/dialog.d.cts +9 -9
- package/dist/primitives/dialog.d.ts +9 -9
- package/dist/primitives/dotted-list.cjs +41 -0
- package/dist/primitives/dotted-list.d.cts +28 -0
- package/dist/primitives/dotted-list.d.ts +28 -0
- package/dist/primitives/dotted-list.js +41 -0
- package/dist/primitives/drawer.d.cts +6 -6
- package/dist/primitives/drawer.d.ts +6 -6
- package/dist/primitives/field.cjs +3 -3
- package/dist/primitives/field.js +2 -2
- package/dist/primitives/file-dropzone.cjs +3 -3
- package/dist/primitives/file-dropzone.js +2 -2
- package/dist/primitives/file-preview.cjs +4 -4
- package/dist/primitives/file-preview.js +3 -3
- package/dist/primitives/filter-bar.cjs +4 -4
- package/dist/primitives/filter-bar.js +3 -3
- package/dist/primitives/fixed-action-bar.cjs +46 -0
- package/dist/primitives/fixed-action-bar.d.cts +15 -0
- package/dist/primitives/fixed-action-bar.d.ts +15 -0
- package/dist/primitives/fixed-action-bar.js +46 -0
- package/dist/primitives/floating-action-button.cjs +65 -0
- package/dist/primitives/floating-action-button.d.cts +52 -0
- package/dist/primitives/floating-action-button.d.ts +52 -0
- package/dist/primitives/floating-action-button.js +65 -0
- package/dist/primitives/form-section.cjs +38 -0
- package/dist/primitives/form-section.d.cts +43 -0
- package/dist/primitives/form-section.d.ts +43 -0
- package/dist/primitives/form-section.js +38 -0
- package/dist/primitives/key-value-grid.cjs +52 -0
- package/dist/primitives/key-value-grid.d.cts +20 -0
- package/dist/primitives/key-value-grid.d.ts +20 -0
- package/dist/primitives/key-value-grid.js +52 -0
- package/dist/primitives/marketing-footer.cjs +34 -0
- package/dist/primitives/marketing-footer.d.cts +29 -0
- package/dist/primitives/marketing-footer.d.ts +29 -0
- package/dist/primitives/marketing-footer.js +34 -0
- package/dist/primitives/marketing-header.cjs +41 -0
- package/dist/primitives/marketing-header.d.cts +31 -0
- package/dist/primitives/marketing-header.d.ts +31 -0
- package/dist/primitives/marketing-header.js +41 -0
- package/dist/primitives/marketing-section.cjs +8 -0
- package/dist/primitives/marketing-section.d.cts +35 -0
- package/dist/primitives/marketing-section.d.ts +35 -0
- package/dist/primitives/marketing-section.js +8 -0
- package/dist/primitives/marketing-shell.cjs +28 -0
- package/dist/primitives/marketing-shell.d.cts +14 -0
- package/dist/primitives/marketing-shell.d.ts +14 -0
- package/dist/primitives/marketing-shell.js +28 -0
- package/dist/primitives/notes.cjs +4 -4
- package/dist/primitives/notes.js +4 -4
- package/dist/primitives/page-header.cjs +3 -67
- package/dist/primitives/page-header.js +3 -67
- package/dist/primitives/page-tabs.cjs +4 -57
- package/dist/primitives/page-tabs.js +4 -57
- package/dist/primitives/pager.cjs +85 -0
- package/dist/primitives/pager.d.cts +39 -0
- package/dist/primitives/pager.d.ts +39 -0
- package/dist/primitives/pager.js +85 -0
- package/dist/primitives/pagination.cjs +119 -0
- package/dist/primitives/pagination.d.cts +41 -0
- package/dist/primitives/pagination.d.ts +41 -0
- package/dist/primitives/pagination.js +119 -0
- package/dist/primitives/poster.cjs +11 -1
- package/dist/primitives/poster.d.cts +12 -1
- package/dist/primitives/poster.d.ts +12 -1
- package/dist/primitives/poster.js +10 -0
- package/dist/primitives/resource-list.cjs +8 -8
- package/dist/primitives/resource-list.js +7 -7
- package/dist/primitives/responsive-embed.cjs +29 -0
- package/dist/primitives/responsive-embed.d.cts +14 -0
- package/dist/primitives/responsive-embed.d.ts +14 -0
- package/dist/primitives/responsive-embed.js +29 -0
- package/dist/primitives/save-bar.cjs +91 -0
- package/dist/primitives/save-bar.d.cts +55 -0
- package/dist/primitives/save-bar.d.ts +55 -0
- package/dist/primitives/save-bar.js +91 -0
- package/dist/primitives/settings-list.cjs +10 -0
- package/dist/primitives/settings-list.d.cts +31 -0
- package/dist/primitives/settings-list.d.ts +31 -0
- package/dist/primitives/settings-list.js +10 -0
- package/dist/primitives/settings-section.cjs +34 -0
- package/dist/primitives/settings-section.d.cts +44 -0
- package/dist/primitives/settings-section.d.ts +44 -0
- package/dist/primitives/settings-section.js +34 -0
- package/dist/primitives/sheet.d.cts +9 -9
- package/dist/primitives/sheet.d.ts +9 -9
- package/dist/primitives/short-video.cjs +110 -0
- package/dist/primitives/short-video.d.cts +30 -0
- package/dist/primitives/short-video.d.ts +30 -0
- package/dist/primitives/short-video.js +110 -0
- package/dist/primitives/stats-card.cjs +46 -0
- package/dist/primitives/stats-card.d.cts +19 -0
- package/dist/primitives/stats-card.d.ts +19 -0
- package/dist/primitives/stats-card.js +46 -0
- package/dist/primitives/stats-strip.cjs +38 -0
- package/dist/primitives/stats-strip.d.cts +24 -0
- package/dist/primitives/stats-strip.d.ts +24 -0
- package/dist/primitives/stats-strip.js +38 -0
- package/dist/primitives/step-list.cjs +32 -0
- package/dist/primitives/step-list.d.cts +19 -0
- package/dist/primitives/step-list.d.ts +19 -0
- package/dist/primitives/step-list.js +32 -0
- package/dist/primitives/steps.cjs +77 -0
- package/dist/primitives/steps.d.cts +35 -0
- package/dist/primitives/steps.d.ts +35 -0
- package/dist/primitives/steps.js +77 -0
- package/dist/primitives/tabbed-page-header.cjs +53 -0
- package/dist/primitives/tabbed-page-header.d.cts +26 -0
- package/dist/primitives/tabbed-page-header.d.ts +26 -0
- package/dist/primitives/tabbed-page-header.js +53 -0
- package/dist/primitives/theme-selector.cjs +17 -17
- package/dist/primitives/theme-selector.js +5 -5
- package/dist/primitives/voice-dictation-button.cjs +5 -5
- package/dist/primitives/voice-dictation-button.js +4 -4
- package/dist/primitives/voice-session-controls.cjs +4 -4
- package/dist/primitives/voice-session-controls.js +3 -3
- package/dist/primitives/workflow-assistant.cjs +5 -5
- package/dist/primitives/workflow-assistant.js +3 -3
- package/package.json +312 -1
- package/src/styles/components/poster.css +42 -1
- package/dist/{chunk-5OF6D3GH.js → chunk-4TJBXXUE.js} +3 -3
- package/dist/{chunk-DILYV4FI.js → chunk-7ZRFXJVN.js} +3 -3
- package/dist/{chunk-YYFVG5A6.cjs → chunk-D46FNEZ5.cjs} +2 -2
- package/dist/{chunk-NKWHDI4C.cjs → chunk-FB3VY2PL.cjs} +2 -2
- package/dist/{chunk-MW67PHAQ.cjs → chunk-GUVQAWUW.cjs} +9 -9
- package/dist/{chunk-WHDHUYS6.js → chunk-HBRVOGLA.js} +3 -3
- package/dist/{chunk-FARCLWLU.cjs → chunk-HHF5DEKM.cjs} +3 -3
- package/dist/{chunk-TWCJMFST.js → chunk-O42YC6ZQ.js} +3 -3
- package/dist/{chunk-ZJFYOXSM.cjs → chunk-SRVRNHCX.cjs} +2 -2
- package/dist/{chunk-UFFHGKI7.js → chunk-SW4T3O7M.js} +9 -9
- package/dist/{chunk-62UTAG2C.js → chunk-ULZB4A2I.js} +3 -3
- package/dist/{chunk-ZLEM2SAU.cjs → chunk-Z3JJSNR5.cjs} +2 -2
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import {
|
|
4
|
+
Button
|
|
5
|
+
} from "../chunk-W326GKML.js";
|
|
6
|
+
import {
|
|
7
|
+
cn
|
|
8
|
+
} from "../chunk-G6SRSWXB.js";
|
|
9
|
+
|
|
10
|
+
// src/primitives/save-bar.tsx
|
|
11
|
+
import { useEffect, useState } from "react";
|
|
12
|
+
import { createPortal } from "react-dom";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
function SaveBar({
|
|
15
|
+
isDirty,
|
|
16
|
+
saving = false,
|
|
17
|
+
onSave,
|
|
18
|
+
onDiscard,
|
|
19
|
+
saveLabel = "Save changes",
|
|
20
|
+
savingLabel = "Saving\u2026",
|
|
21
|
+
discardLabel = "Discard",
|
|
22
|
+
status,
|
|
23
|
+
containerClassName,
|
|
24
|
+
className,
|
|
25
|
+
width = "wide"
|
|
26
|
+
}) {
|
|
27
|
+
const [mounted, setMounted] = useState(false);
|
|
28
|
+
useEffect(() => setMounted(true), []);
|
|
29
|
+
if (!mounted) return null;
|
|
30
|
+
const bar = /* @__PURE__ */ jsx(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
role: "region",
|
|
34
|
+
"aria-label": "Save changes",
|
|
35
|
+
className: cn(
|
|
36
|
+
"fixed inset-x-0 bottom-0 z-40 border-t border-border bg-background/95 backdrop-blur-sm",
|
|
37
|
+
// Lift above iOS home indicator / Safari URL bar
|
|
38
|
+
"pb-[env(safe-area-inset-bottom)]",
|
|
39
|
+
className
|
|
40
|
+
),
|
|
41
|
+
children: /* @__PURE__ */ jsxs(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: cn(
|
|
45
|
+
"mx-auto px-4 md:px-6 py-3 flex items-center justify-between gap-3",
|
|
46
|
+
containerClassName ?? (width === "narrow" ? "max-w-3xl" : "max-w-5xl")
|
|
47
|
+
),
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsx(
|
|
50
|
+
"span",
|
|
51
|
+
{
|
|
52
|
+
className: cn(
|
|
53
|
+
"text-sm truncate transition-colors",
|
|
54
|
+
isDirty ? "text-foreground" : "text-muted-foreground"
|
|
55
|
+
),
|
|
56
|
+
children: status ?? (isDirty ? "Unsaved changes" : "All changes saved")
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
60
|
+
onDiscard && /* @__PURE__ */ jsx(
|
|
61
|
+
Button,
|
|
62
|
+
{
|
|
63
|
+
type: "button",
|
|
64
|
+
variant: "ghost",
|
|
65
|
+
size: "sm",
|
|
66
|
+
onClick: onDiscard,
|
|
67
|
+
disabled: saving || !isDirty,
|
|
68
|
+
children: discardLabel
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
Button,
|
|
73
|
+
{
|
|
74
|
+
type: "button",
|
|
75
|
+
size: "sm",
|
|
76
|
+
onClick: onSave,
|
|
77
|
+
disabled: saving || !isDirty,
|
|
78
|
+
children: saving ? savingLabel : saveLabel
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] })
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
return createPortal(bar, document.body);
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
SaveBar
|
|
91
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkCXAFTEEPcjs = require('../chunk-CXAFTEEP.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.SettingsList = _chunkCXAFTEEPcjs.SettingsList; exports.SettingsListContext = _chunkCXAFTEEPcjs.SettingsListContext;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const SettingsListContext: React.Context<{
|
|
6
|
+
/**
|
|
7
|
+
* True when the parent `<SettingsList>` contains exactly one section.
|
|
8
|
+
* Sections check this to suppress their own heading — the page's
|
|
9
|
+
* `<PageHeader>` already serves as the heading for a single-section
|
|
10
|
+
* page, and rendering a second one is "nested headers".
|
|
11
|
+
*/
|
|
12
|
+
single: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
interface SettingsListProps {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Wraps a vertical list of `<SettingsSection>`s.
|
|
20
|
+
*
|
|
21
|
+
* - One section: renders the section's content alone (heading suppressed
|
|
22
|
+
* via context — the `<PageHeader>` already names the page).
|
|
23
|
+
* - Two or more: renders each section with `py-8` breathing room and a
|
|
24
|
+
* `divide-y` horizontal line between them.
|
|
25
|
+
*
|
|
26
|
+
* Use this for EVERY settings/form page, even when there's only one
|
|
27
|
+
* section — the component decides whether to show structure.
|
|
28
|
+
*/
|
|
29
|
+
declare function SettingsList({ children, className }: SettingsListProps): react_jsx_runtime.JSX.Element | null;
|
|
30
|
+
|
|
31
|
+
export { SettingsList, SettingsListContext, type SettingsListProps };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const SettingsListContext: React.Context<{
|
|
6
|
+
/**
|
|
7
|
+
* True when the parent `<SettingsList>` contains exactly one section.
|
|
8
|
+
* Sections check this to suppress their own heading — the page's
|
|
9
|
+
* `<PageHeader>` already serves as the heading for a single-section
|
|
10
|
+
* page, and rendering a second one is "nested headers".
|
|
11
|
+
*/
|
|
12
|
+
single: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
interface SettingsListProps {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Wraps a vertical list of `<SettingsSection>`s.
|
|
20
|
+
*
|
|
21
|
+
* - One section: renders the section's content alone (heading suppressed
|
|
22
|
+
* via context — the `<PageHeader>` already names the page).
|
|
23
|
+
* - Two or more: renders each section with `py-8` breathing room and a
|
|
24
|
+
* `divide-y` horizontal line between them.
|
|
25
|
+
*
|
|
26
|
+
* Use this for EVERY settings/form page, even when there's only one
|
|
27
|
+
* section — the component decides whether to show structure.
|
|
28
|
+
*/
|
|
29
|
+
declare function SettingsList({ children, className }: SettingsListProps): react_jsx_runtime.JSX.Element | null;
|
|
30
|
+
|
|
31
|
+
export { SettingsList, SettingsListContext, type SettingsListProps };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkCXAFTEEPcjs = require('../chunk-CXAFTEEP.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkKWLSBTB2cjs = require('../chunk-KWLSBTB2.cjs');
|
|
8
|
+
|
|
9
|
+
// src/primitives/settings-section.tsx
|
|
10
|
+
var _react = require('react');
|
|
11
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
12
|
+
function SettingsSection({
|
|
13
|
+
heading,
|
|
14
|
+
description,
|
|
15
|
+
action,
|
|
16
|
+
children,
|
|
17
|
+
className
|
|
18
|
+
}) {
|
|
19
|
+
const { single } = _react.useContext.call(void 0, _chunkCXAFTEEPcjs.SettingsListContext);
|
|
20
|
+
const showHeader = !single && (heading || action || description);
|
|
21
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "section", { className: _chunkKWLSBTB2cjs.cn.call(void 0, "space-y-4", className), children: [
|
|
22
|
+
showHeader && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
23
|
+
(heading || action) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-4", children: [
|
|
24
|
+
heading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-lg font-medium tracking-tight min-w-0", children: heading }),
|
|
25
|
+
action && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "shrink-0", children: action })
|
|
26
|
+
] }),
|
|
27
|
+
description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: description })
|
|
28
|
+
] }),
|
|
29
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
exports.SettingsSection = SettingsSection;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface SettingsSectionProps {
|
|
5
|
+
/**
|
|
6
|
+
* Section heading. Sentence-case, scannable, h2-level. Rendered to the
|
|
7
|
+
* LEFT of the action slot. Suppressed automatically when this section
|
|
8
|
+
* is the only child of a `<SettingsList>` — the page's `<PageHeader>`
|
|
9
|
+
* already serves that role in that case.
|
|
10
|
+
*/
|
|
11
|
+
heading?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* One-line context shown under the heading. Use sparingly — most
|
|
14
|
+
* sections explain themselves through their input labels.
|
|
15
|
+
*/
|
|
16
|
+
description?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Right-aligned action slot, vertically aligned with the heading.
|
|
19
|
+
* Typically a `<CopyButton>`, link, or small icon button.
|
|
20
|
+
*/
|
|
21
|
+
action?: ReactNode;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The atom for every settings/form page. ALWAYS this shape:
|
|
27
|
+
*
|
|
28
|
+
* ┌─────────────────────────────────────┐
|
|
29
|
+
* │ heading [action right] │
|
|
30
|
+
* │ description (optional) │
|
|
31
|
+
* └─────────────────────────────────────┘
|
|
32
|
+
* content below
|
|
33
|
+
*
|
|
34
|
+
* Wrap one or more of these in a `<SettingsList>` so dividers, padding,
|
|
35
|
+
* and single-section heading suppression all flow from one place.
|
|
36
|
+
*
|
|
37
|
+
* Pages that have only one concern should still wrap their single
|
|
38
|
+
* section in `<SettingsList>` — the list quietly hides the heading and
|
|
39
|
+
* the PageHeader handles it instead. Keeps the consumer code uniform
|
|
40
|
+
* regardless of how many sections the page ends up with.
|
|
41
|
+
*/
|
|
42
|
+
declare function SettingsSection({ heading, description, action, children, className, }: SettingsSectionProps): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { SettingsSection, type SettingsSectionProps };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface SettingsSectionProps {
|
|
5
|
+
/**
|
|
6
|
+
* Section heading. Sentence-case, scannable, h2-level. Rendered to the
|
|
7
|
+
* LEFT of the action slot. Suppressed automatically when this section
|
|
8
|
+
* is the only child of a `<SettingsList>` — the page's `<PageHeader>`
|
|
9
|
+
* already serves that role in that case.
|
|
10
|
+
*/
|
|
11
|
+
heading?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* One-line context shown under the heading. Use sparingly — most
|
|
14
|
+
* sections explain themselves through their input labels.
|
|
15
|
+
*/
|
|
16
|
+
description?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Right-aligned action slot, vertically aligned with the heading.
|
|
19
|
+
* Typically a `<CopyButton>`, link, or small icon button.
|
|
20
|
+
*/
|
|
21
|
+
action?: ReactNode;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The atom for every settings/form page. ALWAYS this shape:
|
|
27
|
+
*
|
|
28
|
+
* ┌─────────────────────────────────────┐
|
|
29
|
+
* │ heading [action right] │
|
|
30
|
+
* │ description (optional) │
|
|
31
|
+
* └─────────────────────────────────────┘
|
|
32
|
+
* content below
|
|
33
|
+
*
|
|
34
|
+
* Wrap one or more of these in a `<SettingsList>` so dividers, padding,
|
|
35
|
+
* and single-section heading suppression all flow from one place.
|
|
36
|
+
*
|
|
37
|
+
* Pages that have only one concern should still wrap their single
|
|
38
|
+
* section in `<SettingsList>` — the list quietly hides the heading and
|
|
39
|
+
* the PageHeader handles it instead. Keeps the consumer code uniform
|
|
40
|
+
* regardless of how many sections the page ends up with.
|
|
41
|
+
*/
|
|
42
|
+
declare function SettingsSection({ heading, description, action, children, className, }: SettingsSectionProps): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { SettingsSection, type SettingsSectionProps };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
SettingsListContext
|
|
4
|
+
} from "../chunk-2DCJ2SFU.js";
|
|
5
|
+
import {
|
|
6
|
+
cn
|
|
7
|
+
} from "../chunk-G6SRSWXB.js";
|
|
8
|
+
|
|
9
|
+
// src/primitives/settings-section.tsx
|
|
10
|
+
import { useContext } from "react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
function SettingsSection({
|
|
13
|
+
heading,
|
|
14
|
+
description,
|
|
15
|
+
action,
|
|
16
|
+
children,
|
|
17
|
+
className
|
|
18
|
+
}) {
|
|
19
|
+
const { single } = useContext(SettingsListContext);
|
|
20
|
+
const showHeader = !single && (heading || action || description);
|
|
21
|
+
return /* @__PURE__ */ jsxs("section", { className: cn("space-y-4", className), children: [
|
|
22
|
+
showHeader && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
23
|
+
(heading || action) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
24
|
+
heading && /* @__PURE__ */ jsx("h2", { className: "text-lg font-medium tracking-tight min-w-0", children: heading }),
|
|
25
|
+
action && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action })
|
|
26
|
+
] }),
|
|
27
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description })
|
|
28
|
+
] }),
|
|
29
|
+
/* @__PURE__ */ jsx("div", { children })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
SettingsSection
|
|
34
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
-
import * as
|
|
3
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
|
|
7
|
-
declare const Sheet: React.FC<
|
|
8
|
-
declare const SheetTrigger: React.ForwardRefExoticComponent<
|
|
9
|
-
declare const SheetClose: React.ForwardRefExoticComponent<
|
|
10
|
-
declare const SheetPortal: React.FC<
|
|
11
|
-
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<
|
|
7
|
+
declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
|
|
8
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
11
|
+
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
declare const sheetVariants: (props?: ({
|
|
13
13
|
side?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
14
14
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
-
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof
|
|
15
|
+
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
16
16
|
/**
|
|
17
17
|
* Suppress the default top-right close (×) button. Useful when the
|
|
18
18
|
* consumer renders its own close affordance or relies on overlay-tap /
|
|
@@ -39,10 +39,10 @@ declare const SheetFooter: {
|
|
|
39
39
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
40
40
|
displayName: string;
|
|
41
41
|
};
|
|
42
|
-
interface SheetTitleProps extends React.ComponentPropsWithoutRef<typeof
|
|
42
|
+
interface SheetTitleProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title> {
|
|
43
43
|
display?: "block" | "inline-flex";
|
|
44
44
|
}
|
|
45
45
|
declare const SheetTitle: React.ForwardRefExoticComponent<SheetTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
46
|
-
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<
|
|
46
|
+
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
47
47
|
|
|
48
48
|
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, type SheetHeaderProps, SheetOverlay, SheetPortal, SheetTitle, type SheetTitleProps, SheetTrigger };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
-
import * as
|
|
3
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
|
|
7
|
-
declare const Sheet: React.FC<
|
|
8
|
-
declare const SheetTrigger: React.ForwardRefExoticComponent<
|
|
9
|
-
declare const SheetClose: React.ForwardRefExoticComponent<
|
|
10
|
-
declare const SheetPortal: React.FC<
|
|
11
|
-
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<
|
|
7
|
+
declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
|
|
8
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
11
|
+
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
declare const sheetVariants: (props?: ({
|
|
13
13
|
side?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
14
14
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
-
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof
|
|
15
|
+
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
16
16
|
/**
|
|
17
17
|
* Suppress the default top-right close (×) button. Useful when the
|
|
18
18
|
* consumer renders its own close affordance or relies on overlay-tap /
|
|
@@ -39,10 +39,10 @@ declare const SheetFooter: {
|
|
|
39
39
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
40
40
|
displayName: string;
|
|
41
41
|
};
|
|
42
|
-
interface SheetTitleProps extends React.ComponentPropsWithoutRef<typeof
|
|
42
|
+
interface SheetTitleProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title> {
|
|
43
43
|
display?: "block" | "inline-flex";
|
|
44
44
|
}
|
|
45
45
|
declare const SheetTitle: React.ForwardRefExoticComponent<SheetTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
46
|
-
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<
|
|
46
|
+
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
47
47
|
|
|
48
48
|
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, type SheetHeaderProps, SheetOverlay, SheetPortal, SheetTitle, type SheetTitleProps, SheetTrigger };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkKWLSBTB2cjs = require('../chunk-KWLSBTB2.cjs');
|
|
6
|
+
|
|
7
|
+
// src/primitives/short-video.tsx
|
|
8
|
+
var _react = require('react');
|
|
9
|
+
var _lucidereact = require('lucide-react');
|
|
10
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
11
|
+
function formatDuration(sec) {
|
|
12
|
+
const m = Math.floor(sec / 60);
|
|
13
|
+
const s = Math.floor(sec % 60);
|
|
14
|
+
return `${m}:${s.toString().padStart(2, "0")}`;
|
|
15
|
+
}
|
|
16
|
+
function ShortVideo({
|
|
17
|
+
src,
|
|
18
|
+
poster,
|
|
19
|
+
durationSec,
|
|
20
|
+
orientation = "portrait",
|
|
21
|
+
caption,
|
|
22
|
+
maxWidth = 320,
|
|
23
|
+
className
|
|
24
|
+
}) {
|
|
25
|
+
const videoRef = _react.useRef.call(void 0, null);
|
|
26
|
+
const [playing, setPlaying] = _react.useState.call(void 0, false);
|
|
27
|
+
const [muted, setMuted] = _react.useState.call(void 0, false);
|
|
28
|
+
const [started, setStarted] = _react.useState.call(void 0, false);
|
|
29
|
+
const togglePlay = () => {
|
|
30
|
+
const el = videoRef.current;
|
|
31
|
+
if (!el) return;
|
|
32
|
+
if (el.paused) {
|
|
33
|
+
void el.play();
|
|
34
|
+
setStarted(true);
|
|
35
|
+
} else {
|
|
36
|
+
el.pause();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const toggleMute = () => {
|
|
40
|
+
const el = videoRef.current;
|
|
41
|
+
if (!el) return;
|
|
42
|
+
el.muted = !el.muted;
|
|
43
|
+
setMuted(el.muted);
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "figure", { className: _chunkKWLSBTB2cjs.cn.call(void 0, "flex flex-col gap-2", className), style: { maxWidth }, children: [
|
|
46
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
className: _chunkKWLSBTB2cjs.cn.call(void 0,
|
|
50
|
+
"group relative overflow-hidden rounded-2xl border bg-muted",
|
|
51
|
+
orientation === "portrait" ? "aspect-[9/16]" : "aspect-video"
|
|
52
|
+
),
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
55
|
+
"video",
|
|
56
|
+
{
|
|
57
|
+
ref: videoRef,
|
|
58
|
+
src,
|
|
59
|
+
poster,
|
|
60
|
+
preload: "metadata",
|
|
61
|
+
playsInline: true,
|
|
62
|
+
className: "h-full w-full object-cover",
|
|
63
|
+
onPlay: () => setPlaying(true),
|
|
64
|
+
onPause: () => setPlaying(false),
|
|
65
|
+
onEnded: () => setPlaying(false),
|
|
66
|
+
onClick: togglePlay
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
!started && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
70
|
+
"button",
|
|
71
|
+
{
|
|
72
|
+
type: "button",
|
|
73
|
+
onClick: togglePlay,
|
|
74
|
+
"aria-label": "Play video",
|
|
75
|
+
className: "absolute inset-0 flex items-center justify-center bg-black/20 transition-colors hover:bg-black/30",
|
|
76
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex size-16 items-center justify-center rounded-full bg-background/90 shadow-lg backdrop-blur-sm transition-transform group-hover:scale-105", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Play, { className: "ml-1 size-7 text-foreground" }) })
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
!started && durationSec ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute bottom-3 right-3 rounded-full bg-black/60 px-2 py-0.5 font-mono text-[11px] font-medium text-white", children: formatDuration(durationSec) }) : null,
|
|
80
|
+
started && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-gradient-to-t from-black/60 to-transparent p-3 opacity-0 transition-opacity group-hover:opacity-100", children: [
|
|
81
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
82
|
+
"button",
|
|
83
|
+
{
|
|
84
|
+
type: "button",
|
|
85
|
+
onClick: togglePlay,
|
|
86
|
+
"aria-label": playing ? "Pause" : "Play",
|
|
87
|
+
className: "flex size-9 items-center justify-center rounded-full bg-background/90 text-foreground",
|
|
88
|
+
children: playing ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Pause, { className: "size-4" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Play, { className: "ml-0.5 size-4" })
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
92
|
+
"button",
|
|
93
|
+
{
|
|
94
|
+
type: "button",
|
|
95
|
+
onClick: toggleMute,
|
|
96
|
+
"aria-label": muted ? "Unmute" : "Mute",
|
|
97
|
+
className: "flex size-9 items-center justify-center rounded-full bg-background/90 text-foreground",
|
|
98
|
+
children: muted ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.VolumeX, { className: "size-4" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Volume2, { className: "size-4" })
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
] })
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
caption && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "figcaption", { className: "text-sm text-muted-foreground", children: caption })
|
|
106
|
+
] });
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
exports.ShortVideo = ShortVideo;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface ShortVideoProps {
|
|
5
|
+
/** Video source (mp4/webm). */
|
|
6
|
+
src: string;
|
|
7
|
+
/** Poster frame shown before play. */
|
|
8
|
+
poster?: string;
|
|
9
|
+
/** Duration in seconds — rendered as a small badge. */
|
|
10
|
+
durationSec?: number;
|
|
11
|
+
/** 9:16 by default; "landscape" switches to 16:9. */
|
|
12
|
+
orientation?: "portrait" | "landscape";
|
|
13
|
+
/** Optional caption under the player. */
|
|
14
|
+
caption?: ReactNode;
|
|
15
|
+
/** Constrain width (portrait videos get tall fast). Default 320px. */
|
|
16
|
+
maxWidth?: number;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* ShortVideo — an inline, vertical-first video player for marketing /
|
|
21
|
+
* portal feeds (the "Shorts-style" clip). Tap-to-play with a poster
|
|
22
|
+
* frame, a play/pause affordance and a mute toggle. Lazy (preload
|
|
23
|
+
* metadata only) so a feed of these stays light. Portrait by default;
|
|
24
|
+
* pass orientation="landscape" for 16:9.
|
|
25
|
+
*
|
|
26
|
+
* Caller owns the source + poster; render captions via `caption`.
|
|
27
|
+
*/
|
|
28
|
+
declare function ShortVideo({ src, poster, durationSec, orientation, caption, maxWidth, className, }: ShortVideoProps): react_jsx_runtime.JSX.Element;
|
|
29
|
+
|
|
30
|
+
export { ShortVideo, type ShortVideoProps };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface ShortVideoProps {
|
|
5
|
+
/** Video source (mp4/webm). */
|
|
6
|
+
src: string;
|
|
7
|
+
/** Poster frame shown before play. */
|
|
8
|
+
poster?: string;
|
|
9
|
+
/** Duration in seconds — rendered as a small badge. */
|
|
10
|
+
durationSec?: number;
|
|
11
|
+
/** 9:16 by default; "landscape" switches to 16:9. */
|
|
12
|
+
orientation?: "portrait" | "landscape";
|
|
13
|
+
/** Optional caption under the player. */
|
|
14
|
+
caption?: ReactNode;
|
|
15
|
+
/** Constrain width (portrait videos get tall fast). Default 320px. */
|
|
16
|
+
maxWidth?: number;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* ShortVideo — an inline, vertical-first video player for marketing /
|
|
21
|
+
* portal feeds (the "Shorts-style" clip). Tap-to-play with a poster
|
|
22
|
+
* frame, a play/pause affordance and a mute toggle. Lazy (preload
|
|
23
|
+
* metadata only) so a feed of these stays light. Portrait by default;
|
|
24
|
+
* pass orientation="landscape" for 16:9.
|
|
25
|
+
*
|
|
26
|
+
* Caller owns the source + poster; render captions via `caption`.
|
|
27
|
+
*/
|
|
28
|
+
declare function ShortVideo({ src, poster, durationSec, orientation, caption, maxWidth, className, }: ShortVideoProps): react_jsx_runtime.JSX.Element;
|
|
29
|
+
|
|
30
|
+
export { ShortVideo, type ShortVideoProps };
|