@rightkit/video-ui 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/LICENSE-APACHE +201 -0
  3. package/LICENSE-MIT +21 -0
  4. package/README.md +47 -2
  5. package/dist/appName.d.ts +2 -0
  6. package/dist/appName.js +8 -0
  7. package/dist/components/DesktopWorkspace.d.ts +4 -0
  8. package/dist/components/DesktopWorkspace.js +527 -0
  9. package/dist/components/Player.d.ts +49 -0
  10. package/dist/components/Player.js +335 -0
  11. package/dist/components/RangePreview.d.ts +9 -0
  12. package/dist/components/RangePreview.js +22 -0
  13. package/dist/components/Workspace.css +15 -0
  14. package/dist/demo/DemoSettings.d.ts +1 -0
  15. package/dist/demo/DemoSettings.js +43 -0
  16. package/dist/demo/bindings.d.ts +121 -0
  17. package/dist/demo/bindings.js +57 -0
  18. package/dist/demo/demo.css +124 -0
  19. package/dist/demo/useDemo.d.ts +8 -0
  20. package/dist/demo/useDemo.js +37 -0
  21. package/dist/editor/CaptionInspector.d.ts +8 -0
  22. package/dist/editor/CaptionInspector.js +33 -0
  23. package/dist/editor/ChangesPanel.d.ts +13 -0
  24. package/dist/editor/ChangesPanel.js +87 -0
  25. package/dist/editor/ColourInspector.d.ts +5 -0
  26. package/dist/editor/ColourInspector.js +341 -0
  27. package/dist/editor/Inspector.d.ts +15 -0
  28. package/dist/editor/Inspector.js +202 -0
  29. package/dist/editor/Timeline.d.ts +39 -0
  30. package/dist/editor/Timeline.js +506 -0
  31. package/dist/editor/TimelineEditorView.d.ts +9 -0
  32. package/dist/editor/TimelineEditorView.js +237 -0
  33. package/dist/editor/TranscriptPanel.d.ts +20 -0
  34. package/dist/editor/TranscriptPanel.js +180 -0
  35. package/dist/editor/actions.d.ts +63 -0
  36. package/dist/editor/actions.js +124 -0
  37. package/dist/editor/adapter.d.ts +76 -0
  38. package/dist/editor/adapter.js +181 -0
  39. package/dist/editor/capabilities.d.ts +37 -0
  40. package/dist/editor/capabilities.js +33 -0
  41. package/dist/editor/gesture.d.ts +29 -0
  42. package/dist/editor/gesture.js +119 -0
  43. package/dist/editor/index.d.ts +10 -0
  44. package/dist/editor/index.js +7 -0
  45. package/dist/editor/keys.d.ts +15 -0
  46. package/dist/editor/keys.js +42 -0
  47. package/dist/editor/model.d.ts +88 -0
  48. package/dist/editor/model.js +87 -0
  49. package/dist/editor/transcript.d.ts +27 -0
  50. package/dist/editor/transcript.js +59 -0
  51. package/dist/editor/vendor/hyperframes/PlayheadIndicator.d.ts +9 -0
  52. package/dist/editor/vendor/hyperframes/PlayheadIndicator.js +38 -0
  53. package/dist/editor/vendor/hyperframes/audioWaveformPeaks.d.ts +7 -0
  54. package/dist/editor/vendor/hyperframes/audioWaveformPeaks.js +47 -0
  55. package/dist/editor/vendor/hyperframes/rulerGeometry.d.ts +13 -0
  56. package/dist/editor/vendor/hyperframes/rulerGeometry.js +133 -0
  57. package/dist/editor/vendor/hyperframes/useInspectorGestureTransaction.d.ts +33 -0
  58. package/dist/editor/vendor/hyperframes/useInspectorGestureTransaction.js +126 -0
  59. package/dist/env.d.ts +66 -0
  60. package/dist/hooks/useEngine.d.ts +10 -0
  61. package/dist/hooks/useEngine.js +68 -0
  62. package/dist/hooks/useHdrToSdr.d.ts +11 -0
  63. package/dist/hooks/useHdrToSdr.js +19 -0
  64. package/dist/hooks/useProgress.d.ts +10 -0
  65. package/dist/hooks/useProgress.js +32 -0
  66. package/dist/index.d.ts +55 -0
  67. package/dist/index.js +57 -0
  68. package/dist/legal/legalConfig.d.ts +38 -0
  69. package/dist/legal/legalConfig.js +77 -0
  70. package/dist/lib/assemble.d.ts +100 -0
  71. package/dist/lib/assemble.js +72 -0
  72. package/dist/lib/asset.d.ts +2 -0
  73. package/dist/lib/asset.js +3 -0
  74. package/dist/lib/dialog.d.ts +4 -0
  75. package/dist/lib/dialog.js +44 -0
  76. package/dist/lib/engine.d.ts +44 -0
  77. package/dist/lib/engine.js +51 -0
  78. package/dist/lib/genright.d.ts +90 -0
  79. package/dist/lib/genright.js +160 -0
  80. package/dist/lib/media.d.ts +1045 -0
  81. package/dist/lib/media.js +171 -0
  82. package/dist/lib/mediaAdapters.d.ts +18 -0
  83. package/dist/lib/mediaAdapters.js +46 -0
  84. package/dist/lib/mic.d.ts +38 -0
  85. package/dist/lib/mic.js +14 -0
  86. package/dist/lib/models.d.ts +53 -0
  87. package/dist/lib/models.js +72 -0
  88. package/dist/lib/modelsBackend.d.ts +3 -0
  89. package/dist/lib/modelsBackend.js +68 -0
  90. package/dist/lib/progress.d.ts +77 -0
  91. package/dist/lib/progress.js +192 -0
  92. package/dist/lib/project.d.ts +138 -0
  93. package/dist/lib/project.js +48 -0
  94. package/dist/lib/services.d.ts +27 -0
  95. package/dist/lib/services.js +38 -0
  96. package/dist/lib/settingsBackend.d.ts +2 -0
  97. package/dist/lib/settingsBackend.js +57 -0
  98. package/dist/lib/shell.d.ts +172 -0
  99. package/dist/lib/shell.js +32 -0
  100. package/dist/styles.css +24 -0
  101. package/dist/ui/icons.d.ts +7 -0
  102. package/dist/ui/icons.js +62 -0
  103. package/dist/ui/index.d.ts +45 -0
  104. package/dist/ui/index.js +43 -0
  105. package/dist/ui/ui.css +104 -0
  106. package/dist/views/Assets.css +99 -0
  107. package/dist/views/AssetsView.d.ts +6 -0
  108. package/dist/views/AssetsView.js +371 -0
  109. package/dist/views/AutoEditView.d.ts +16 -0
  110. package/dist/views/AutoEditView.js +452 -0
  111. package/dist/views/BatchDelivery.d.ts +3 -0
  112. package/dist/views/BatchDelivery.js +331 -0
  113. package/dist/views/BundleExport.d.ts +3 -0
  114. package/dist/views/BundleExport.js +81 -0
  115. package/dist/views/Exports.css +117 -0
  116. package/dist/views/ExportsView.d.ts +12 -0
  117. package/dist/views/ExportsView.js +354 -0
  118. package/dist/views/FinishedEdit.css +546 -0
  119. package/dist/views/Home.css +97 -0
  120. package/dist/views/Home.d.ts +14 -0
  121. package/dist/views/Home.js +192 -0
  122. package/dist/views/Media.css +65 -0
  123. package/dist/views/OnboardingGate.d.ts +10 -0
  124. package/dist/views/OnboardingGate.js +54 -0
  125. package/dist/views/Phrases.css +45 -0
  126. package/dist/views/PhrasesView.d.ts +4 -0
  127. package/dist/views/PhrasesView.js +104 -0
  128. package/dist/views/ProgressView.d.ts +19 -0
  129. package/dist/views/ProgressView.js +36 -0
  130. package/dist/views/Prompt.css +84 -0
  131. package/dist/views/PromptPanel.d.ts +8 -0
  132. package/dist/views/PromptPanel.js +169 -0
  133. package/dist/views/Recipe.css +84 -0
  134. package/dist/views/RecipeLibrary.d.ts +7 -0
  135. package/dist/views/RecipeLibrary.js +104 -0
  136. package/dist/views/Retention.css +49 -0
  137. package/dist/views/RetentionView.d.ts +7 -0
  138. package/dist/views/RetentionView.js +145 -0
  139. package/dist/views/SettingsView.d.ts +9 -0
  140. package/dist/views/SettingsView.js +235 -0
  141. package/dist/views/Shorts.css +112 -0
  142. package/dist/views/ShortsView.d.ts +4 -0
  143. package/dist/views/ShortsView.js +205 -0
  144. package/dist/views/SourcesView.d.ts +6 -0
  145. package/dist/views/SourcesView.js +417 -0
  146. package/dist/views/TimelineView.d.ts +20 -0
  147. package/dist/views/TimelineView.js +12 -0
  148. package/package.json +68 -3
@@ -0,0 +1,172 @@
1
+ import { type AppShellBridge } from "@rightkit/react-shell";
2
+ /** Persisted light/dark/system choice (same key the pre-RightKit app used, so
3
+ * existing users keep their theme). */
4
+ export declare const themeStore: {
5
+ read: () => import("@rightkit/react-shell").ThemeChoice;
6
+ resolved: (choice?: import("@rightkit/react-shell").ThemeChoice) => import("@rightkit/react-shell").ResolvedTheme;
7
+ apply: (choice: import("@rightkit/react-shell").ThemeChoice) => void;
8
+ save: (choice: import("@rightkit/react-shell").ThemeChoice) => void;
9
+ subscribe: (listener: (choice: import("@rightkit/react-shell").ThemeChoice) => void) => () => void;
10
+ dispose: () => void;
11
+ };
12
+ export declare const shell: {
13
+ ready: () => Promise<{
14
+ background: boolean;
15
+ appId: string;
16
+ appName: string;
17
+ engine: {
18
+ state: 'starting' | 'ready' | 'error';
19
+ hello?: unknown;
20
+ code?: string;
21
+ message?: string;
22
+ } | null;
23
+ }>;
24
+ status: () => Promise<import("@rightkit/tauri-shell").ShellStatus>;
25
+ capabilities: () => Promise<import("@rightkit/tauri-shell").ShellCapabilities>;
26
+ quit: (quitOptions?: import("@rightkit/tauri-shell").QuitOptions) => Promise<import("@rightkit/tauri-shell").QuitReport>;
27
+ onQuitRequested: (handler: import("@rightkit/tauri-shell").QuitHandler) => Promise<import("@rightkit/tauri-shell").Unlisten>;
28
+ openExternal: (url: string) => Promise<void>;
29
+ window: {
30
+ do: (action: import("@rightkit/tauri-shell").WindowAction) => Promise<void>;
31
+ minimize: () => Promise<void>;
32
+ toggleMaximize: () => Promise<void>;
33
+ close: () => Promise<void>;
34
+ startDrag: () => Promise<void>;
35
+ open: (spec: import("@rightkit/tauri-shell").WindowSpec) => Promise<string>;
36
+ trafficLights: (dx: number, dy: number) => Promise<void>;
37
+ };
38
+ menu: {
39
+ setEnabled: (id: string, enabled: boolean) => Promise<void>;
40
+ setChecked: (id: string, checked: boolean) => Promise<void>;
41
+ setState: (updates: import("@rightkit/tauri-shell").MenuItemState[]) => Promise<void>;
42
+ onClick: (h: (id: string) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
43
+ };
44
+ tray: {
45
+ update: (update: import("@rightkit/tauri-shell").TrayUpdate) => Promise<void>;
46
+ onEvent: (h: (e: {
47
+ kind: 'menu';
48
+ id: string;
49
+ } | {
50
+ kind: 'click';
51
+ }) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
52
+ onCustom: (name: string, h: (payload: unknown) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
53
+ };
54
+ deepLinks: {
55
+ on: (h: (link: import("@rightkit/tauri-shell").DeepLink) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
56
+ };
57
+ onSecondInstance: (h: (e: {
58
+ argv: string[];
59
+ cwd: string;
60
+ }) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
61
+ onStall: (h: (e: {
62
+ stalledMs: number;
63
+ thresholdMs: number;
64
+ }) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
65
+ autostart: {
66
+ get: () => Promise<import("@rightkit/tauri-shell").AutostartStatus>;
67
+ set: (enabled: boolean) => Promise<import("@rightkit/tauri-shell").AutostartStatus>;
68
+ openLoginItemsSettings: () => Promise<void>;
69
+ };
70
+ clipboard: {
71
+ read: (board?: string) => Promise<import("@rightkit/tauri-shell").ClipboardContent>;
72
+ write: (c: import("@rightkit/tauri-shell").ClipboardContent) => Promise<void>;
73
+ item: () => Promise<import("@rightkit/tauri-shell").ClipboardItem>;
74
+ };
75
+ notifications: {
76
+ post: (request: import("@rightkit/tauri-shell").NotificationRequest) => Promise<import("@rightkit/tauri-shell").NotifyOutcome>;
77
+ status: () => Promise<import("@rightkit/tauri-shell").NotifyStatus>;
78
+ clear: (ids?: string[]) => Promise<void>;
79
+ setBadge: (count: number) => Promise<number>;
80
+ };
81
+ presence: {
82
+ state: () => Promise<import("@rightkit/tauri-shell").PresenceState>;
83
+ setDnd: (enabled: boolean) => Promise<import("@rightkit/tauri-shell").PresenceState>;
84
+ setAuto: (prefs: import("@rightkit/tauri-shell").AutoPrefs) => Promise<import("@rightkit/tauri-shell").PresenceState>;
85
+ probe: () => Promise<{
86
+ environment: import("@rightkit/tauri-shell").Environment;
87
+ windows: number;
88
+ supported: boolean;
89
+ }>;
90
+ evaluate: (monitor: import("@rightkit/tauri-shell").Rect, windows: import("@rightkit/tauri-shell").WindowObservation[], apply?: boolean) => Promise<{
91
+ environment: import("@rightkit/tauri-shell").Environment;
92
+ state: import("@rightkit/tauri-shell").PresenceState;
93
+ }>;
94
+ onChange: (h: (s: import("@rightkit/tauri-shell").PresenceState) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
95
+ };
96
+ idle: {
97
+ status: () => Promise<import("@rightkit/tauri-shell").IdleStatus>;
98
+ note: (hidden: boolean) => Promise<void>;
99
+ onChange: (h: (e: {
100
+ state: 'hidden' | 'visible' | 'suspended' | 'resumed';
101
+ }) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
102
+ };
103
+ paths: {
104
+ require: (path: string, write?: boolean) => Promise<string>;
105
+ revoke: (path: string) => Promise<void>;
106
+ grantRecent: (id: string) => Promise<string>;
107
+ regrantSaved: (path: string) => Promise<string>;
108
+ streamUrl: (path: string) => Promise<{
109
+ id: string;
110
+ url: string;
111
+ }>;
112
+ };
113
+ openPaths: {
114
+ ready: () => Promise<string[]>;
115
+ onOpen: (h: (e: {
116
+ paths: string[];
117
+ }) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
118
+ };
119
+ onDrop: (zone: import("@rightkit/tauri-shell").DropZone, handler: (e: import("@rightkit/tauri-shell").DropEvent) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
120
+ associations: {
121
+ status: (groups?: string[]) => Promise<import("@rightkit/tauri-shell").AssociationStatus>;
122
+ set: (groups?: string[], timeoutMs?: number) => Promise<import("@rightkit/tauri-shell").AssociationSetResult>;
123
+ openDefaultApps: () => Promise<void>;
124
+ };
125
+ print: (ui?: import("@rightkit/tauri-shell").PrintUi) => Promise<void>;
126
+ onPrintError: (h: (message: string) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
127
+ recovery: {
128
+ save: (snapshot: unknown) => Promise<void>;
129
+ load: <T = unknown>() => Promise<T | null>;
130
+ clear: () => Promise<void>;
131
+ };
132
+ site: {
133
+ grant: (document: string) => Promise<import("@rightkit/tauri-shell").SiteGrant>;
134
+ revoke: (token: string) => Promise<void>;
135
+ };
136
+ surface: {
137
+ set: (surface: string) => Promise<import("@rightkit/tauri-shell").SurfaceReport>;
138
+ };
139
+ preview: {
140
+ register: (kind: string, html: string) => Promise<import("@rightkit/tauri-shell").PreviewHandle>;
141
+ revoke: (token: string) => Promise<void>;
142
+ revokeAll: () => Promise<void>;
143
+ };
144
+ legal: {
145
+ read: () => Promise<import("@rightkit/tauri-shell").LegalReceiptRecord | null>;
146
+ create: (request: import("@rightkit/tauri-shell").LegalReceiptCreateRequest) => Promise<import("@rightkit/tauri-shell").LegalReceiptRecord>;
147
+ reset: () => Promise<void>;
148
+ };
149
+ update: {
150
+ check: () => Promise<import("@rightkit/tauri-shell").UpdateHostCheck>;
151
+ status: () => Promise<import("@rightkit/tauri-shell").UpdateHostStatus>;
152
+ download: (handleId: string) => Promise<import("@rightkit/tauri-shell").UpdateHostDownload>;
153
+ install: (handleId: string) => Promise<import("@rightkit/tauri-shell").UpdateHostInstall>;
154
+ cancel: (handleId: string) => Promise<{
155
+ cancelled: boolean;
156
+ }>;
157
+ onProgress: (h: (p: import("@rightkit/tauri-shell").UpdateHostProgress) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
158
+ };
159
+ engine: {
160
+ call: <T = unknown>(method: string, params?: unknown) => Promise<T>;
161
+ callTagged: <T = unknown>(method: string, params?: unknown, tag?: string) => Promise<T>;
162
+ status: () => Promise<import("@rightkit/tauri-shell").EngineStatus | null>;
163
+ onEvent: (h: (e: import("@rightkit/tauri-shell").EngineEvent) => void) => Promise<import("@rightkit/tauri-shell").Unlisten>;
164
+ };
165
+ bridge: () => import("@rightkit/tauri-shell").ShellBridge;
166
+ };
167
+ /** Native side of @rightkit/react-shell: caption buttons on Windows; macOS draws
168
+ * its traffic lights through the overlay title bar. The caption actions reach the
169
+ * host's `rk_shell_window` command (rightkit-tauri-shell) through @rightkit/tauri-shell. */
170
+ export declare const shellBridge: AppShellBridge;
171
+ /** Quits the app at once through the shell host (`rk_shell_quit`): no drain handlers run. */
172
+ export declare const quitNow: () => Promise<import("@rightkit/tauri-shell").QuitReport>;
@@ -0,0 +1,32 @@
1
+ import { createThemeStore } from "@rightkit/react-shell";
2
+ import { createShell } from "@rightkit/tauri-shell";
3
+ /** Created on first use (outside a Tauri webview createShell throws, so importing this package must not call it). */
4
+ function lazy(make) {
5
+ let value = null;
6
+ const get = () => (value ??= make());
7
+ return new Proxy({}, {
8
+ get: (_t, key) => {
9
+ const v = Reflect.get(get(), key);
10
+ return typeof v === "function" ? v.bind(get()) : v;
11
+ },
12
+ has: (_t, key) => key in get(),
13
+ });
14
+ }
15
+ /** Persisted light/dark/system choice (same key the pre-RightKit app used, so
16
+ * existing users keep their theme). */
17
+ // alwaysPaintDataTheme: false keeps the pre-0.5.0 behaviour (system leaves data-theme unset and
18
+ // the OS decides in CSS), which brand.css and shell.css were written against.
19
+ export const themeStore = createThemeStore({ storageKey: "cutright.theme", alwaysPaintDataTheme: false });
20
+ export const shell = lazy(() => createShell());
21
+ /** Native side of @rightkit/react-shell: caption buttons on Windows; macOS draws
22
+ * its traffic lights through the overlay title bar. The caption actions reach the
23
+ * host's `rk_shell_window` command (rightkit-tauri-shell) through @rightkit/tauri-shell. */
24
+ export const shellBridge = {
25
+ window: {
26
+ minimize: () => shell.window.minimize(),
27
+ toggleMaximize: () => shell.window.toggleMaximize(),
28
+ close: () => shell.window.close(),
29
+ },
30
+ };
31
+ /** Quits the app at once through the shell host (`rk_shell_quit`): no drain handlers run. */
32
+ export const quitNow = () => shell.quit({ force: true });
@@ -0,0 +1,24 @@
1
+ /* Every stylesheet this package's components use. Hosts import "<package>/styles.css" once (Node cannot import CSS from JS). */
2
+ @import "./components/Workspace.css";
3
+ @import "./demo/demo.css";
4
+ @import "./ui/ui.css";
5
+ @import "./views/Assets.css";
6
+ @import "./views/Recipe.css";
7
+ @import "./views/Exports.css";
8
+ @import "./views/Home.css";
9
+ @import "@rightkit/onboarding/onboarding.css";
10
+ @import "./views/Phrases.css";
11
+ @import "./views/Prompt.css";
12
+ @import "./views/Retention.css";
13
+ @import "@rightkit/settings-ui/settings.css";
14
+ @import "./views/Shorts.css";
15
+ @import "./views/Media.css";
16
+ @import "./views/FinishedEdit.css";
17
+
18
+ /* Caption clip surface (CutRight #38): the caption track's clip fill, tuned per mode. */
19
+ :root { --caption-clip: color-mix(in srgb, var(--rk-accent) 18%, transparent); }
20
+ :root:not([data-theme="light"]) { --caption-clip: color-mix(in srgb, var(--rk-accent) 26%, transparent); }
21
+ @media (prefers-color-scheme: dark) {
22
+ :root:not([data-theme="light"]) { --caption-clip: color-mix(in srgb, var(--rk-accent) 26%, transparent); }
23
+ }
24
+ :root[data-theme="dark"] { --caption-clip: color-mix(in srgb, var(--rk-accent) 26%, transparent); }
@@ -0,0 +1,7 @@
1
+ import type { SVGProps } from "react";
2
+ declare const P: Record<string, string[]>;
3
+ export type IconName = keyof typeof P;
4
+ export declare function Icon({ name, ...rest }: {
5
+ name: IconName;
6
+ } & SVGProps<SVGSVGElement>): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,62 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ const P = {
3
+ plus: ["M5 12h14", "M12 5v14"],
4
+ x: ["M18 6 6 18", "m6 6 12 12"],
5
+ check: ["M20 6 9 17l-5-5"],
6
+ "chevron-left": ["m15 18-6-6 6-6"],
7
+ "chevron-right": ["m9 18 6-6-6-6"],
8
+ "chevron-down": ["m6 9 6 6 6-6"],
9
+ "chevron-up": ["m18 15-6-6-6 6"],
10
+ "layout-list": [
11
+ "M4 3h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z",
12
+ "M4 14h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1Z",
13
+ "M14 4h7",
14
+ "M14 9h7",
15
+ "M14 15h7",
16
+ "M14 20h7",
17
+ ],
18
+ "more-horizontal": ["M12 12h.01", "M19 12h.01", "M5 12h.01"],
19
+ film: ["M3 3h18v18H3z", "M7 3v18", "M17 3v18", "M3 7.5h4", "M3 12h18", "M3 16.5h4", "M17 7.5h4", "M17 16.5h4"],
20
+ clapperboard: ["M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z", "m6.2 5.3 3.1 3.9", "m12.4 3.4 3.1 4", "M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z"],
21
+ "wand-sparkles": ["m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72", "m14 7 3 3", "M5 6v4", "M19 14v4", "M10 2v2", "M7 8H3", "M21 16h-4", "M11 3H9"],
22
+ download: ["M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", "m7 10 5 5 5-5", "M12 15V3"],
23
+ upload: ["M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", "m17 8-5-5-5 5", "M12 3v12"],
24
+ image: ["M3 3h18v18H3z", "M9 9h.01", "m21 15-5-5L5 21"],
25
+ music: ["M9 18V5l12-2v13", "M6 15a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z", "M18 13a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z"],
26
+ mic: ["M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z", "M19 10v2a7 7 0 0 1-14 0v-2", "M12 19v3"],
27
+ scissors: ["M6 3a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z", "M6 15a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z", "M20 4 8.12 15.88", "M14.47 14.48 20 20", "M8.12 8.12 12 12"],
28
+ "mouse-pointer": ["M12.586 12.586 19 19", "M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z"],
29
+ undo: ["M3 7v6h6", "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13"],
30
+ redo: ["M21 7v6h-6", "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7"],
31
+ play: ["M6 3 20 12 6 21Z"],
32
+ pause: ["M6 4h4v16H6z", "M14 4h4v16h-4z"],
33
+ "step-back": ["M17 18 9 12l8-6Z", "M7 6v12"],
34
+ "step-forward": ["m7 18 8-6-8-6Z", "M17 6v12"],
35
+ repeat: ["m17 2 4 4-4 4", "M3 11v-1a4 4 0 0 1 4-4h14", "m7 22-4-4 4-4", "M21 13v1a4 4 0 0 1-4 4H3"],
36
+ volume: ["M11 4.7a.7.7 0 0 0-1.2-.5L6.4 7.6A1.4 1.4 0 0 1 5.4 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.4a1.4 1.4 0 0 1 1 .4l3.4 3.4a.7.7 0 0 0 1.2-.5Z", "M16 9a5 5 0 0 1 0 6", "M19.4 18.4a9 9 0 0 0 0-12.7"],
37
+ "volume-x": ["M11 4.7a.7.7 0 0 0-1.2-.5L6.4 7.6A1.4 1.4 0 0 1 5.4 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.4a1.4 1.4 0 0 1 1 .4l3.4 3.4a.7.7 0 0 0 1.2-.5Z", "m22 9-6 6", "m16 9 6 6"],
38
+ magnet: ["m6 15-4-4 6.75-6.77a7.79 7.79 0 0 1 11 11L13 22l-4-4 6.39-6.36a2.14 2.14 0 0 0-3-3L6 15", "m5 8 4 4", "m12 15 4 4"],
39
+ settings: ["M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z", "M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z"],
40
+ sun: ["M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z", "M12 2v2", "M12 20v2", "m4.93 4.93 1.41 1.41", "m17.66 17.66 1.41 1.41", "M2 12h2", "M20 12h2", "m6.34 17.66-1.41 1.41", "m19.07 4.93-1.41 1.41"],
41
+ moon: ["M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"],
42
+ folder: ["M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"],
43
+ "folder-open": ["m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"],
44
+ "list-video": ["M12 12H3", "M16 6H3", "M12 18H3", "m16 12 5 3-5 3v-6Z"],
45
+ "sliders-horizontal": ["M21 4h-7", "M10 4H3", "M21 12h-9", "M8 12H3", "M21 20h-5", "M12 20H3", "M14 2v4", "M8 10v4", "M16 18v4"],
46
+ "text-quote": ["M17 6H3", "M21 12H8", "M21 18H8", "M3 12v6"],
47
+ "chart-line": ["M3 3v16a2 2 0 0 0 2 2h16", "m19 9-5 5-4-4-3 3"],
48
+ sparkles: ["M9.94 15.5A2 2 0 0 0 8.5 14.06l-6.13-1.58a.5.5 0 0 1 0-.96L8.5 9.94A2 2 0 0 0 9.94 8.5l1.58-6.13a.5.5 0 0 1 .96 0L14.06 8.5A2 2 0 0 0 15.5 9.94l6.13 1.58a.5.5 0 0 1 0 .96L15.5 14.06a2 2 0 0 0-1.44 1.44l-1.58 6.13a.5.5 0 0 1-.96 0z"],
49
+ "triangle-alert": ["m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3", "M12 9v4", "M12 17h.01"],
50
+ "circle-check": ["M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Z", "m9 12 2 2 4-4"],
51
+ "rotate-ccw": ["M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", "M3 3v5h5"],
52
+ link: ["M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"],
53
+ maximize: ["M8 3H5a2 2 0 0 0-2 2v3", "M21 8V5a2 2 0 0 0-2-2h-3", "M3 16v3a2 2 0 0 0 2 2h3", "M16 21h3a2 2 0 0 0 2-2v-3"],
54
+ captions: ["M3 5h18v14H3z", "M7 15h4", "M15 15h2", "M7 11h2", "M13 11h4"],
55
+ layers: ["m12.83 2.18 8.58 3.9a1 1 0 0 1 0 1.83l-8.58 3.9a2 2 0 0 1-1.66 0L2.6 7.9a1 1 0 0 1 0-1.83l8.58-3.9a2 2 0 0 1 1.66 0Z", "m22 12-9.17 4.17a2 2 0 0 1-1.66 0L2 12", "m22 17-9.17 4.17a2 2 0 0 1-1.66 0L2 17"],
56
+ copy: ["M8 8h12v12H8z", "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"],
57
+ "trash-2": ["M3 6h18", "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", "M10 11v6", "M14 11v6"],
58
+ "message-square-text": ["M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", "M13 8H7", "M17 12H7"],
59
+ };
60
+ export function Icon({ name, ...rest }) {
61
+ return (_jsx("svg", { viewBox: "0 0 24 24", width: 16, height: 16, fill: "none", stroke: "currentColor", strokeWidth: 1.6, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...rest, children: (P[name] ?? []).map((d) => (_jsx("path", { d: d }, d))) }));
62
+ }
@@ -0,0 +1,45 @@
1
+ import { type ReactNode } from "react";
2
+ export { Icon, type IconName } from "./icons.js";
3
+ export type Tone = "neutral" | "ok" | "warn" | "danger" | "info";
4
+ /**
5
+ * Fixed-aspect media tile. The container is the shell Card (flush) and the badge is the shell Badge;
6
+ * the media markup (poster, hover preview, corner action) stays here. `src` is an asset URL or
7
+ * undefined while loading.
8
+ */
9
+ export declare function Thumbnail({ src, aspect, badge, corner, contain, alt, video, }: {
10
+ src?: string;
11
+ aspect?: string;
12
+ badge?: string;
13
+ corner?: ReactNode;
14
+ contain?: boolean;
15
+ alt?: string;
16
+ /** When set, a muted looping preview plays while hovered. */
17
+ video?: string;
18
+ }): import("react").JSX.Element;
19
+ export declare function ProgressRow({ label, status, tone, fraction, elapsed, error, onRetry, }: {
20
+ label: string;
21
+ status: string;
22
+ tone?: Tone;
23
+ /** 0..1, or undefined for indeterminate while running; null hides the bar. */
24
+ fraction?: number | null;
25
+ elapsed?: string;
26
+ error?: string;
27
+ onRetry?: () => void;
28
+ }): import("react").JSX.Element;
29
+ export declare function Drawer({ title, open, onClose, children, footer, }: {
30
+ title: string;
31
+ open: boolean;
32
+ onClose: () => void;
33
+ children: ReactNode;
34
+ footer?: ReactNode;
35
+ }): import("react").JSX.Element | null;
36
+ export declare function ErrorPanel({ title, message, detail, actions, }: {
37
+ title: string;
38
+ /** The actionable reason, always visible; `detail` stays collapsed. */
39
+ message?: string;
40
+ detail?: string;
41
+ actions?: ReactNode;
42
+ }): import("react").JSX.Element;
43
+ /** `mm:ss` under an hour, `h:mm:ss` above. */
44
+ export declare function timecode(ms: number): string;
45
+ export declare function fileSize(bytes: number): string;
@@ -0,0 +1,43 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { Badge, Button, Card, IconButton, ModalShell, Notice, ProgressBar, cx } from "@rightkit/react-shell/react";
4
+ import { Icon } from "./icons.js";
5
+ export { Icon } from "./icons.js";
6
+ /**
7
+ * Fixed-aspect media tile. The container is the shell Card (flush) and the badge is the shell Badge;
8
+ * the media markup (poster, hover preview, corner action) stays here. `src` is an asset URL or
9
+ * undefined while loading.
10
+ */
11
+ export function Thumbnail({ src, aspect = "16 / 9", badge, corner, contain, alt = "", video, }) {
12
+ const [hover, setHover] = useState(false);
13
+ return (_jsx(Card, { flush: true, className: "cr-thumb-card", children: _jsxs("div", { className: cx("cr-thumb", contain && "cr-thumb--contain"), style: { aspectRatio: aspect }, onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), children: [!src && _jsx(Icon, { name: "film", width: 22, height: 22 }), src && _jsx("img", { src: src, alt: alt, loading: "lazy", draggable: false }), video && hover && _jsx("video", { src: video, autoPlay: true, muted: true, loop: true, playsInline: true }), corner && _jsx("div", { className: "cr-thumb__corner", children: corner }), badge && (_jsx("span", { className: "cr-thumb__badge", children: _jsx(Badge, { tone: "neutral", children: badge }) }))] }) }));
14
+ }
15
+ export function ProgressRow({ label, status, tone = "info", fraction, elapsed, error, onRetry, }) {
16
+ return (_jsxs("div", { className: "cr-progress", children: [_jsx("span", { className: "cr-progress__label", children: label }), _jsx(Badge, { tone: error || tone === "danger" ? "bad" : tone === "info" ? "accent" : tone, children: status }), _jsx("span", { className: "cr-progress__time", children: elapsed ?? "" }), fraction !== null && !error && (fraction === undefined ? (_jsx("div", { className: "cr-progress__bar--indeterminate", role: "progressbar", "aria-label": label, "aria-valuemin": 0, "aria-valuemax": 100, children: _jsx("i", {}) })) : (_jsx(ProgressBar, { value: fraction * 100, label: label, tone: tone === "danger" ? "bad" : tone === "ok" || tone === "warn" ? tone : "accent" }))), error && (_jsx(Notice, { tone: "bad", className: "cr-progress__error", action: onRetry && (_jsxs(Button, { size: "sm", variant: "ghost", onClick: onRetry, children: [_jsx(Icon, { name: "rotate-ccw" }), "Retry"] })), children: _jsx("span", { className: "cr-clamp-4", title: error, children: error }) }))] }));
17
+ }
18
+ export function Drawer({ title, open, onClose, children, footer, }) {
19
+ // The shell's modal owns the scrim, Escape (topmost only), focus trap and focus restore;
20
+ // the classes only dock it to the right edge below the title bar.
21
+ if (!open)
22
+ return null;
23
+ return (_jsxs(ModalShell, { label: title, ariaLabel: title, onClose: onClose, width: 400, overlayClassName: "cr-drawer-overlay", className: "cr-drawer", children: [_jsxs("div", { className: "cr-drawer__head", children: [_jsx("h2", { children: title }), _jsx(IconButton, { label: "Close", onClick: onClose, children: _jsx(Icon, { name: "x" }) })] }), _jsx("div", { className: "cr-drawer__body", children: children }), footer && _jsx("div", { className: "cr-drawer__foot", children: footer })] }));
24
+ }
25
+ export function ErrorPanel({ title, message, detail, actions, }) {
26
+ return (_jsx(Notice, { tone: "bad", title: title, action: actions, className: "cr-error", children: (message || detail) && (_jsxs(_Fragment, { children: [message && _jsx("span", { children: message }), detail && (_jsxs("details", { children: [_jsx("summary", { children: "Details" }), _jsx("pre", { children: detail })] }))] })) }));
27
+ }
28
+ /** `mm:ss` under an hour, `h:mm:ss` above. */
29
+ export function timecode(ms) {
30
+ const total = Math.max(0, Math.floor(ms / 1000));
31
+ const h = Math.floor(total / 3600);
32
+ const m = Math.floor((total % 3600) / 60);
33
+ const s = total % 60;
34
+ const pad = (n) => String(n).padStart(2, "0");
35
+ return h > 0 ? `${h}:${pad(m)}:${pad(s)}` : `${pad(m)}:${pad(s)}`;
36
+ }
37
+ export function fileSize(bytes) {
38
+ if (bytes < 1024 * 1024)
39
+ return `${Math.max(1, Math.round(bytes / 1024))} KB`;
40
+ if (bytes < 1024 ** 3)
41
+ return `${(bytes / 1024 ** 2).toFixed(1)} MB`;
42
+ return `${(bytes / 1024 ** 3).toFixed(2)} GB`;
43
+ }
package/dist/ui/ui.css ADDED
@@ -0,0 +1,104 @@
1
+ /* the host app media UI, layout & published-component exceptions.
2
+ Generic controls, notices & determinate progress use @rightkit/react-shell. */
3
+
4
+ .cr-btn--block { width: 100%; }
5
+ /* The chip is a shell Button (ghost, sm) around a Badge; the Badge draws the chip, so the button chrome is reset. */
6
+ .rk-btn.cr-chip-btn { border: 0; padding: 0; min-height: 0; height: auto; background: none; box-shadow: none; border-radius: 6px; }
7
+ .rk-btn.cr-chip-btn:hover { background: none; }
8
+ .rk-btn.cr-chip-btn:focus-visible { outline: 2px solid var(--rk-focus); outline-offset: 1px; }
9
+ .rk-badge svg { flex: none; }
10
+
11
+ /* Native selects kept for M2 exception b12 (published Select forwards no id/aria-describedby/data-testid). */
12
+ .cr-select { appearance: auto; }
13
+ .cr-textarea { height: auto; min-height: 96px; padding: 10px; line-height: 1.6; resize: vertical; }
14
+
15
+ .cr-thumb {
16
+ position: relative;
17
+ width: 100%;
18
+ background: var(--cr-stage);
19
+ border-radius: var(--r-sm);
20
+ overflow: hidden;
21
+ display: grid;
22
+ place-items: center;
23
+ color: var(--rk-ink-3);
24
+ }
25
+ .cr-thumb img, .cr-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
26
+ .cr-thumb--contain img, .cr-thumb--contain video { object-fit: contain; }
27
+ /* The Card frames the tile without adding chrome of its own; the Badge draws the badge. */
28
+ .rk-card.cr-thumb-card { padding: 0; border: 0; background: none; box-shadow: none; border-radius: var(--r-sm); overflow: hidden; }
29
+ .cr-thumb__badge {
30
+ position: absolute;
31
+ right: 6px;
32
+ bottom: 6px;
33
+ }
34
+ .cr-thumb__corner { position: absolute; left: 6px; top: 6px; }
35
+
36
+ .cr-progress {
37
+ display: grid;
38
+ grid-template-columns: minmax(0, 1fr) auto auto;
39
+ align-items: center;
40
+ column-gap: var(--s3);
41
+ row-gap: 6px;
42
+ font-size: 13px;
43
+ }
44
+ .cr-progress__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
45
+ .cr-progress__time { font: 11px/1 var(--rk-font-mono); color: var(--rk-ink-2); }
46
+ .cr-progress > [role="progressbar"] { grid-column: 1 / -1; }
47
+ .cr-progress__bar--indeterminate { height: 3px; border-radius: 2px; background: var(--rk-fill-2); overflow: hidden; }
48
+ .cr-progress__bar--indeterminate > i { display: block; width: 30%; height: 100%; background: var(--rk-accent); animation: cr-indet 1.2s ease-in-out infinite; }
49
+ .cr-progress__error { grid-column: 1 / -1; }
50
+ @keyframes cr-indet { from { transform: translateX(-100%); } to { transform: translateX(330%); } }
51
+
52
+ /* ModalShell docked to the right edge below the title bar (the shell supplies scrim, Escape, focus). */
53
+ .rk-overlay.cr-drawer-overlay { inset: var(--rk-titlebar-height, 52px) 0 0 0; padding: 0; justify-content: flex-end; align-items: stretch; }
54
+ .rk-modal.cr-drawer {
55
+ max-width: 100vw;
56
+ max-height: none;
57
+ padding: 0;
58
+ overflow: hidden;
59
+ background: var(--rk-plane);
60
+ border-radius: 0;
61
+ border-left: 0.5px solid var(--rk-line);
62
+ animation: none;
63
+ display: flex;
64
+ flex-direction: column;
65
+ }
66
+ .cr-drawer__head {
67
+ height: 52px;
68
+ flex: none;
69
+ display: flex;
70
+ align-items: center;
71
+ gap: var(--s2);
72
+ padding: 0 var(--s3) 0 var(--s5);
73
+ border-bottom: 0.5px solid var(--rk-hairline);
74
+ }
75
+ .cr-drawer__head h2 { flex: 1; margin: 0; font: 600 15px/1.3 var(--rk-font-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
76
+ .cr-drawer__body { flex: 1; overflow: auto; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); }
77
+ .cr-drawer__foot { flex: none; padding: var(--s3) var(--s5); border-top: 0.5px solid var(--rk-hairline); display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s2); }
78
+
79
+ .cr-error details { color: var(--rk-ink-2); font-size: 12px; }
80
+ .cr-error details pre { white-space: pre-wrap; font: 11px/1.5 var(--rk-font-mono); margin: 6px 0 0; }
81
+
82
+ .cr-overline { font: 500 11px/1 var(--rk-font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--rk-ink-2); }
83
+ .cr-clamp-1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
84
+ .cr-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
85
+ .cr-clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
86
+
87
+
88
+ @media (prefers-reduced-motion: reduce) {
89
+ .cr-progress__bar--indeterminate > i { animation: none; }
90
+ }
91
+
92
+ /* Settings rows (SettingsPanel from @rightkit/settings-ui). */
93
+ .cr-settings-chips { display: inline-flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
94
+ .cr-settings-num { width: 96px; }
95
+ .cr-settings-path { width: 320px; max-width: 100%; }
96
+ .cr-settings-detail { margin-top: 4px; font-size: 12px; color: var(--rk-ink-2); }
97
+ .cr-settings-detail p { margin: 4px 0 0; font: 11px/1.5 var(--rk-font-mono); word-break: break-all; }
98
+ .cr-settings-field { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 100%; }
99
+ .cr-settings-note { margin: 0; max-width: 360px; font-size: 12px; color: var(--rk-ink-2); text-align: right; }
100
+
101
+ /* Sizes the shell SearchIcon (an unsized svg) for button and empty-state use. */
102
+ .cr-glyph { display: inline-flex; width: 16px; height: 16px; }
103
+ .cr-glyph--lg { width: 28px; height: 28px; }
104
+ .cr-glyph svg { width: 100%; height: 100%; }
@@ -0,0 +1,99 @@
1
+ /* Assets — docs/design/app-ui.md §3.7 */
2
+
3
+ .assets-body { display: flex; flex-direction: column; gap: var(--s5); }
4
+ /* Reserves the content region so the the host app notice below keeps its position through load. */
5
+ .assets-main { min-height: 16rem; display: flex; flex-direction: column; }
6
+
7
+ .assets-jobs {
8
+ display: flex;
9
+ flex-direction: column;
10
+ gap: var(--s3);
11
+ padding: var(--s4);
12
+ background: var(--rk-elevated);
13
+ border: 1px solid var(--rk-line);
14
+ border-radius: var(--r-lg);
15
+ }
16
+ .assets-job { display: flex; align-items: center; gap: var(--s3); }
17
+ .assets-job .cr-progress { flex: 1; min-width: 0; }
18
+ .assets-job__cost { font-size: 11px; flex: none; }
19
+
20
+ .assets-grid {
21
+ display: grid;
22
+ grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
23
+ gap: var(--s4);
24
+ }
25
+ .assets-card {
26
+ background: var(--rk-elevated);
27
+ border: 1px solid var(--rk-line);
28
+ border-radius: var(--r-lg);
29
+ padding: var(--s3);
30
+ display: flex;
31
+ flex-direction: column;
32
+ gap: var(--s2);
33
+ min-width: 0;
34
+ }
35
+ .assets-tile {
36
+ position: relative;
37
+ width: 100%;
38
+ aspect-ratio: 16 / 9;
39
+ background: var(--cr-stage);
40
+ border-radius: var(--r-sm);
41
+ overflow: hidden;
42
+ display: grid;
43
+ place-items: center;
44
+ color: var(--rk-ink-3);
45
+ }
46
+ .assets-tile video {
47
+ position: absolute;
48
+ inset: 0;
49
+ width: 100%;
50
+ height: 100%;
51
+ object-fit: cover;
52
+ }
53
+ .assets-tile audio { display: none; }
54
+ .assets-card__name { font: 500 13px/1.3 var(--rk-font-body); }
55
+ .assets-card__row { display: flex; align-items: center; gap: var(--s2); }
56
+ .assets-card__prov { font-size: 12px; }
57
+ .assets-card__actions { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s1); }
58
+
59
+ .assets-place { position: relative; }
60
+ .assets-place__pop {
61
+ position: absolute;
62
+ left: 0;
63
+ bottom: calc(100% + 4px);
64
+ z-index: 30;
65
+ min-width: 200px;
66
+ background: var(--rk-elevated);
67
+ border: 1px solid var(--rk-line);
68
+ border-radius: var(--r-md);
69
+ box-shadow: var(--rk-pop);
70
+ padding: var(--s1);
71
+ display: flex;
72
+ flex-direction: column;
73
+ }
74
+ .assets-place__pop > button {
75
+ display: block;
76
+ width: 100%;
77
+ text-align: left;
78
+ border: 0;
79
+ background: transparent;
80
+ color: var(--rk-ink);
81
+ font: 400 13px/1 var(--rk-font-body);
82
+ padding: 7px var(--s3);
83
+ border-radius: var(--r-sm);
84
+ cursor: pointer;
85
+ }
86
+ .assets-place__pop > button:hover { background: var(--rk-fill-2); }
87
+ .assets-place__form { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s2); }
88
+ .assets-place__form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--rk-ink-2); }
89
+ .assets-place__actions { display: flex; justify-content: flex-end; gap: var(--s2); }
90
+ .assets-card__preview { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: var(--r-sm); }
91
+ .assets-card__preview:disabled { cursor: default; }
92
+ .assets-card__preview:focus-visible { outline: 2px solid var(--rk-focus); outline-offset: 2px; }
93
+ .assets-image-viewer { height: 420px; display: flex; }
94
+ .assets-cues { display: flex; flex-direction: column; gap: 2px; width: 340px; max-height: 240px; overflow-y: auto; }
95
+ .assets-cues > button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--rk-ink); padding: 4px 6px; border-radius: var(--r-sm); font-size: 12px; cursor: pointer; }
96
+ .assets-cues > button:hover { background: var(--rk-fill-2); }
97
+ .assets-cues > button[aria-pressed="true"] { background: var(--rk-fill-2); box-shadow: inset 2px 0 0 var(--rk-focus); }
98
+ .assets-cues__time { color: var(--rk-ink-2); font-variant-numeric: tabular-nums; }
99
+ .assets-cues__meta { font-size: 12px; color: var(--rk-ink-2); padding: 4px 6px; }
@@ -0,0 +1,6 @@
1
+ import { type HostJob } from "../lib/genright.js";
2
+ export declare function jobActionLabel(j: HostJob): "Cancel" | "Import now" | "Retry" | null;
3
+ export declare function AssetsView({ dir, onNewVideo }: {
4
+ dir?: string;
5
+ onNewVideo?: () => void;
6
+ }): import("react").JSX.Element;