@odori/cli 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-RXLB2CXH.js → chunk-NYXWEZU2.js} +399 -226
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +34 -5
- package/dist/index.js +3 -3
- package/dist/registry-snapshot-MSH2EA36.js +4867 -0
- package/package.json +3 -3
- package/src/assets.ts +90 -0
- package/src/brand-file.ts +16 -4
- package/src/cli.ts +12 -9
- package/src/commands/add.ts +25 -0
- package/src/commands/dev.ts +28 -1
- package/src/commands/doctor.ts +47 -2
- package/src/commands/{still.ts → frame.ts} +23 -9
- package/src/discovery.ts +63 -2
- package/src/index.ts +1 -1
- package/src/registry-snapshot.json +1529 -327
- package/src/registry-source.ts +37 -2
- package/src/server.ts +7 -1
- package/studio/src/components/Inspector.tsx +101 -1
- package/studio/src/components/Navigator.tsx +145 -0
- package/studio/src/lib/highlight.ts +85 -0
- package/studio/src/studio.css +254 -7
- package/studio/src/views/BrandsView.tsx +18 -1
- package/studio/src/views/ComponentsView.tsx +191 -26
- package/studio/src/views/HomeView.tsx +7 -4
- package/studio/src/views/VideosView.tsx +21 -1
- package/studio/src/virtual.d.ts +4 -1
- package/dist/registry-snapshot-BDP6PVYB.js +0 -3559
|
@@ -20,6 +20,7 @@ import {InputControls} from "../components/InputControls";
|
|
|
20
20
|
import {ExportPanel} from "../components/ExportPanel";
|
|
21
21
|
import {Diagnostics} from "../components/Diagnostics";
|
|
22
22
|
import {Inspector} from "../components/Inspector";
|
|
23
|
+
import {Navigator} from "../components/Navigator";
|
|
23
24
|
import {Badge, Empty, Fact, SectionTitle, Separator} from "../components/ui";
|
|
24
25
|
import {measureTrack} from "../lib/mix-loudness";
|
|
25
26
|
import {useShortcuts} from "../shortcuts";
|
|
@@ -205,6 +206,25 @@ export const VideosView = ({
|
|
|
205
206
|
|
|
206
207
|
return (
|
|
207
208
|
<>
|
|
209
|
+
{/* A video id is a path under videos/, so the folder is the grouping a
|
|
210
|
+
project already chose: social/announcement sits under social. */}
|
|
211
|
+
<Navigator
|
|
212
|
+
label="Videos"
|
|
213
|
+
selected={selected.metadata.id}
|
|
214
|
+
onSelect={onSelect}
|
|
215
|
+
items={[...filtered]
|
|
216
|
+
.sort((left, right) => left.metadata.id.localeCompare(right.metadata.id))
|
|
217
|
+
.map((video) => {
|
|
218
|
+
const parts = video.metadata.id.split("/");
|
|
219
|
+
return {
|
|
220
|
+
id: video.metadata.id,
|
|
221
|
+
title: video.metadata.title,
|
|
222
|
+
detail: String(video.metadata.duration ?? "auto"),
|
|
223
|
+
group: parts.length > 1 ? parts.slice(0, -1).join(" · ") : undefined,
|
|
224
|
+
};
|
|
225
|
+
})}
|
|
226
|
+
/>
|
|
227
|
+
|
|
208
228
|
<section className="stage">
|
|
209
229
|
<CanvasStage
|
|
210
230
|
width={layout.format.width}
|
|
@@ -246,7 +266,7 @@ export const VideosView = ({
|
|
|
246
266
|
/>
|
|
247
267
|
</section>
|
|
248
268
|
|
|
249
|
-
<Inspector title={selected.metadata.title} hint={file}>
|
|
269
|
+
<Inspector title={selected.metadata.title} hint={file} source={file}>
|
|
250
270
|
{/* Export sits first: it is the pane's one action, and the header
|
|
251
271
|
names what is being worked on right above it. */}
|
|
252
272
|
<ExportPanel
|
package/studio/src/virtual.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ declare module "virtual:odori-project" {
|
|
|
10
10
|
export const project: {
|
|
11
11
|
root: string;
|
|
12
12
|
videosDir: string;
|
|
13
|
+
componentsDir: string;
|
|
14
|
+
/** Directories that named themselves, from `category.json`. */
|
|
15
|
+
categories: Array<{path: string; name?: string; order?: number}>;
|
|
13
16
|
docsUrl: string;
|
|
14
17
|
exportDir: string;
|
|
15
18
|
audioDir: string;
|
|
@@ -18,7 +21,7 @@ declare module "virtual:odori-project" {
|
|
|
18
21
|
assets: Array<{reference: string; url: string}>;
|
|
19
22
|
files: {
|
|
20
23
|
videos: Array<{id: string; file: string}>;
|
|
21
|
-
previews: Array<{id: string; file: string}>;
|
|
24
|
+
previews: Array<{id: string; file: string; usedBy: string[]}>;
|
|
22
25
|
brands: Array<{id: string; file: string}>;
|
|
23
26
|
};
|
|
24
27
|
};
|