@liqvid/studio 1.0.0-alpha.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/LICENSE +9 -0
- package/dist/esm/LiqvidDevToolsProvider.js +49 -0
- package/dist/esm/api/contract.mjs +48 -0
- package/dist/esm/api/project-meta.mjs +33 -0
- package/dist/esm/api/recording.mjs +156 -0
- package/dist/esm/api/root.mjs +4 -0
- package/dist/esm/api/static-file.mjs +82 -0
- package/dist/esm/api/types.mjs +1 -0
- package/dist/esm/client.mjs +98 -0
- package/dist/esm/conventions.mjs +3 -0
- package/dist/esm/index.mjs +20 -0
- package/dist/esm/initialize.mjs +50 -0
- package/dist/esm/jobs/watch-assets.mjs +99 -0
- package/dist/esm/jobs/watch-project-files.mjs +216 -0
- package/dist/esm/next/api.mjs +48 -0
- package/dist/esm/next/page.js +15 -0
- package/dist/esm/pages/NewProjectButton.js +62 -0
- package/dist/esm/pages/RebuildButton.js +24 -0
- package/dist/esm/pages/root-actions.js +151 -0
- package/dist/esm/pages/root.js +25 -0
- package/dist/esm/pages/root.module.css +326 -0
- package/dist/esm/palette.css +279 -0
- package/dist/esm/providers/hosting/github-pages.mjs +10 -0
- package/dist/esm/providers/hosting/liqvid-studio.mjs +8 -0
- package/dist/esm/providers/hosting/s3.mjs +9 -0
- package/dist/esm/providers/hosting/sftp.mjs +22 -0
- package/dist/esm/providers/index.mjs +10 -0
- package/dist/esm/providers/social/bluesky.mjs +8 -0
- package/dist/esm/providers/social/facebook.mjs +8 -0
- package/dist/esm/providers/social/instagram.mjs +8 -0
- package/dist/esm/providers/social/twitter.mjs +7 -0
- package/dist/esm/providers/social/youtube.mjs +7 -0
- package/dist/esm/providers/types.mjs +1 -0
- package/dist/esm/publish.mjs +37 -0
- package/dist/esm/recording/RecordingControl.js +110 -0
- package/dist/esm/recording/RecordingControl.module.css +0 -0
- package/dist/esm/recording/RecordingDialog.js +114 -0
- package/dist/esm/recording/RecordingDialog.module.css +194 -0
- package/dist/esm/schemas/liqvid-config.mjs +32 -0
- package/dist/esm/schemas/project.mjs +27 -0
- package/dist/esm/schemas/recording-meta.mjs +11 -0
- package/dist/esm/types/assets.mjs +1 -0
- package/dist/esm/types.mjs +12 -0
- package/dist/esm/ui/Dialog.js +71 -0
- package/dist/esm/ui/DockableDialog.js +131 -0
- package/dist/esm/ui/DockableDialog.module.css +63 -0
- package/dist/esm/ui/RadioTabs.js +13 -0
- package/dist/esm/ui/RadioTabs.module.css +54 -0
- package/dist/esm/ui/Tabs.js +29 -0
- package/dist/esm/ui/Tabs.module.css +31 -0
- package/dist/esm/ui/Toast.js +64 -0
- package/dist/esm/ui/Toast.module.css +50 -0
- package/dist/esm/ui/Toaster.js +13 -0
- package/dist/esm/ui/Toaster.module.css +9 -0
- package/dist/esm/ui/test.js +14 -0
- package/dist/esm/utils/dom.mjs +6 -0
- package/dist/esm/utils/fs.mjs +94 -0
- package/dist/esm/utils/misc.mjs +15 -0
- package/dist/esm/utils/react.mjs +8 -0
- package/dist/esm/utils/rsync.mjs +57 -0
- package/dist/templates/project.json.hbs +5 -0
- package/dist/templates/projects/code/page.tsx.hbs +23 -0
- package/dist/templates/projects/code/src/assets.ts.hbs +9 -0
- package/dist/templates/projects/code/src/client.tsx.hbs +22 -0
- package/dist/templates/projects/code/src/helpers.ts.hbs +21 -0
- package/dist/templates/projects/code/src/highlights.ts.hbs +3 -0
- package/dist/templates/projects/code/src/markers.ts.hbs +13 -0
- package/dist/templates/projects/code/src/project.ts.hbs +23 -0
- package/dist/templates/projects/code/template.json +3 -0
- package/dist/templates/projects/default/page.tsx.hbs +23 -0
- package/dist/templates/projects/default/src/assets.ts.hbs +9 -0
- package/dist/templates/projects/default/src/client.tsx.hbs +22 -0
- package/dist/templates/projects/default/src/helpers.ts.hbs +21 -0
- package/dist/templates/projects/default/src/highlights.ts.hbs +3 -0
- package/dist/templates/projects/default/src/markers.ts.hbs +13 -0
- package/dist/templates/projects/default/src/project.ts.hbs +23 -0
- package/dist/templates/projects/default/template.json +4 -0
- package/dist/templates/types.ts.hbs +20 -0
- package/dist/types/LiqvidDevToolsProvider.d.ts +12 -0
- package/dist/types/api/contract.d.mts +66 -0
- package/dist/types/api/project-meta.d.mts +1 -0
- package/dist/types/api/recording.d.mts +5 -0
- package/dist/types/api/root.d.mts +1 -0
- package/dist/types/api/static-file.d.mts +6 -0
- package/dist/types/api/types.d.mts +1 -0
- package/dist/types/client.d.mts +43 -0
- package/dist/types/conventions.d.mts +3 -0
- package/dist/types/index.d.mts +19 -0
- package/dist/types/initialize.d.mts +14 -0
- package/dist/types/jobs/watch-assets.d.mts +18 -0
- package/dist/types/jobs/watch-project-files.d.mts +4 -0
- package/dist/types/next/api.d.mts +14 -0
- package/dist/types/next/page.d.ts +4 -0
- package/dist/types/pages/NewProjectButton.d.ts +1 -0
- package/dist/types/pages/RebuildButton.d.ts +1 -0
- package/dist/types/pages/root-actions.d.ts +29 -0
- package/dist/types/pages/root.d.ts +1 -0
- package/dist/types/providers/hosting/github-pages.d.mts +11 -0
- package/dist/types/providers/hosting/liqvid-studio.d.mts +10 -0
- package/dist/types/providers/hosting/s3.d.mts +11 -0
- package/dist/types/providers/hosting/sftp.d.mts +13 -0
- package/dist/types/providers/index.d.mts +10 -0
- package/dist/types/providers/social/bluesky.d.mts +10 -0
- package/dist/types/providers/social/facebook.d.mts +10 -0
- package/dist/types/providers/social/instagram.d.mts +10 -0
- package/dist/types/providers/social/twitter.d.mts +9 -0
- package/dist/types/providers/social/youtube.d.mts +9 -0
- package/dist/types/providers/types.d.mts +9 -0
- package/dist/types/publish.d.mts +1 -0
- package/dist/types/recording/RecordingControl.d.ts +16 -0
- package/dist/types/recording/RecordingDialog.d.ts +10 -0
- package/dist/types/schemas/liqvid-config.d.mts +51 -0
- package/dist/types/schemas/project.d.mts +51 -0
- package/dist/types/schemas/recording-meta.d.mts +17 -0
- package/dist/types/types/assets.d.mts +3 -0
- package/dist/types/types.d.mts +20 -0
- package/dist/types/ui/Dialog.d.ts +31 -0
- package/dist/types/ui/DockableDialog.d.ts +25 -0
- package/dist/types/ui/RadioTabs.d.ts +18 -0
- package/dist/types/ui/Tabs.d.ts +9 -0
- package/dist/types/ui/Toast.d.ts +23 -0
- package/dist/types/ui/Toaster.d.ts +6 -0
- package/dist/types/ui/test.d.ts +9 -0
- package/dist/types/utils/dom.d.mts +3 -0
- package/dist/types/utils/fs.d.mts +32 -0
- package/dist/types/utils/misc.d.mts +4 -0
- package/dist/types/utils/react.d.mts +5 -0
- package/dist/types/utils/rsync.d.mts +10 -0
- package/package.json +94 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "@/styles/liqvid-theme.css";
|
|
2
|
+
import "@/styles/input.css";
|
|
3
|
+
|
|
4
|
+
import { splitCode } from "liqvid";
|
|
5
|
+
import type { Metadata } from "next";
|
|
6
|
+
|
|
7
|
+
import { ClientContent } from "./src/client";
|
|
8
|
+
|
|
9
|
+
import project from "./project.json";
|
|
10
|
+
|
|
11
|
+
const projectPath = splitCode(
|
|
12
|
+
() => import.meta.url,
|
|
13
|
+
() => "",
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export default function Project() {
|
|
17
|
+
return <ClientContent projectPath={projectPath} />;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const metadata: Metadata = {
|
|
21
|
+
description: project.description,
|
|
22
|
+
title: project.name,
|
|
23
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DirectoryHelper } from "@liqvid/assets";
|
|
2
|
+
|
|
3
|
+
import type { ProjectAssetsDir } from "../.liqvid/types";
|
|
4
|
+
|
|
5
|
+
/** @package */
|
|
6
|
+
export const assets = new DirectoryHelper<ProjectAssetsDir>();
|
|
7
|
+
|
|
8
|
+
/** @package */
|
|
9
|
+
export const recordings = assets.dir("recordings");
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { LiqvidPlayer } from "@/components/LiqvidPlayer";
|
|
4
|
+
import { LiveCodeAmbi } from "@/components/liqvid/livecode/editor";
|
|
5
|
+
import {
|
|
6
|
+
usePersistMute,
|
|
7
|
+
usePersistVolume,
|
|
8
|
+
} from "@/components/liqvid/persistence";
|
|
9
|
+
import { persistMute, persistVolume } from "@/lib/persistence";
|
|
10
|
+
|
|
11
|
+
import { script } from "./project";
|
|
12
|
+
|
|
13
|
+
export function ClientContent({ projectPath }: { projectPath: string }) {
|
|
14
|
+
usePersistMute(persistMute, script.playback);
|
|
15
|
+
usePersistVolume(persistVolume, script.playback);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<LiqvidPlayer projectPath={projectPath} script={script}>
|
|
19
|
+
<LiveCodeAmbi />
|
|
20
|
+
</LiqvidPlayer>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file This file contains various helpers with type safety
|
|
3
|
+
* for the markers for this particular project.
|
|
4
|
+
*/
|
|
5
|
+
"use client";
|
|
6
|
+
|
|
7
|
+
import { UniversalHelper } from "liqvid";
|
|
8
|
+
|
|
9
|
+
import type { M } from "./project";
|
|
10
|
+
|
|
11
|
+
/* -------------------- helpers -------------------- */
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @package
|
|
15
|
+
* General-purpose helper component for:
|
|
16
|
+
* - creating `<Segment>`s, when passed `during`, `from`, or `to`
|
|
17
|
+
* - positioning, when passed `b`ottom, `r`ight `x` (= left), or `y` (= top)
|
|
18
|
+
* - sizing, when passed `h`eight or `w`idth
|
|
19
|
+
*/
|
|
20
|
+
export const $ = UniversalHelper<M>;
|
|
21
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { withTimings } from "liqvid";
|
|
2
|
+
|
|
3
|
+
export const markerNames = [
|
|
4
|
+
"intro/"
|
|
5
|
+
] as const;
|
|
6
|
+
|
|
7
|
+
const timings = {};
|
|
8
|
+
|
|
9
|
+
/** @package */
|
|
10
|
+
export const markers = withTimings(markerNames, timings);
|
|
11
|
+
|
|
12
|
+
/** Marker name */
|
|
13
|
+
export type MarkerName = (typeof markerNames)[number];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file This file contains various helpers with type safety
|
|
3
|
+
* for the markers for this particular project.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { Script } from "liqvid";
|
|
7
|
+
|
|
8
|
+
import { markers } from "./markers";
|
|
9
|
+
|
|
10
|
+
/** @package */
|
|
11
|
+
export type { MarkerName as M } from "./markers";
|
|
12
|
+
|
|
13
|
+
/** @package */
|
|
14
|
+
export const script = new Script(markers);
|
|
15
|
+
|
|
16
|
+
/** @package */
|
|
17
|
+
export const playback = script.playback;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @package
|
|
21
|
+
* Get marker by name
|
|
22
|
+
*/
|
|
23
|
+
export const $m = script.markers.get.bind(script.markers.get);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "@/styles/liqvid-theme.css";
|
|
2
|
+
import "@/styles/input.css";
|
|
3
|
+
|
|
4
|
+
import { splitCode } from "liqvid";
|
|
5
|
+
import type { Metadata } from "next";
|
|
6
|
+
|
|
7
|
+
import { ClientContent } from "./src/client";
|
|
8
|
+
|
|
9
|
+
import project from "./project.json";
|
|
10
|
+
|
|
11
|
+
const projectPath = splitCode(
|
|
12
|
+
() => import.meta.url,
|
|
13
|
+
() => "",
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export default function Project() {
|
|
17
|
+
return <ClientContent projectPath={projectPath} />;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const metadata: Metadata = {
|
|
21
|
+
description: project.description,
|
|
22
|
+
title: project.name,
|
|
23
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DirectoryHelper } from "@liqvid/assets";
|
|
2
|
+
|
|
3
|
+
import type { ProjectAssetsDir } from "../.liqvid/types";
|
|
4
|
+
|
|
5
|
+
/** @package */
|
|
6
|
+
export const assets = new DirectoryHelper<ProjectAssetsDir>();
|
|
7
|
+
|
|
8
|
+
/** @package */
|
|
9
|
+
export const recordings = assets.dir("recordings");
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { LiqvidPlayer } from "@/components/LiqvidPlayer";
|
|
4
|
+
import {
|
|
5
|
+
usePersistMute,
|
|
6
|
+
usePersistVolume,
|
|
7
|
+
} from "@/components/liqvid/persistence";
|
|
8
|
+
import { persistMute, persistVolume } from "@/lib/persistence";
|
|
9
|
+
|
|
10
|
+
import { script } from "./project";
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
export function ClientContent({ projectPath }: { projectPath: string }) {
|
|
14
|
+
usePersistMute(persistMute, script.playback);
|
|
15
|
+
usePersistVolume(persistVolume, script.playback);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<LiqvidPlayer projectPath={projectPath} script={script}>
|
|
19
|
+
{/* content */}
|
|
20
|
+
</LiqvidPlayer>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file This file contains various helpers with type safety
|
|
3
|
+
* for the markers for this particular project.
|
|
4
|
+
*/
|
|
5
|
+
"use client";
|
|
6
|
+
|
|
7
|
+
import { UniversalHelper } from "liqvid";
|
|
8
|
+
|
|
9
|
+
import type { M } from "./project";
|
|
10
|
+
|
|
11
|
+
/* -------------------- helpers -------------------- */
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @package
|
|
15
|
+
* General-purpose helper component for:
|
|
16
|
+
* - creating `<Segment>`s, when passed `during`, `from`, or `to`
|
|
17
|
+
* - positioning, when passed `b`ottom, `r`ight `x` (= left), or `y` (= top)
|
|
18
|
+
* - sizing, when passed `h`eight or `w`idth
|
|
19
|
+
*/
|
|
20
|
+
export const $ = UniversalHelper<M>;
|
|
21
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { withTimings } from "liqvid";
|
|
2
|
+
|
|
3
|
+
export const markerNames = [
|
|
4
|
+
"intro/"
|
|
5
|
+
] as const;
|
|
6
|
+
|
|
7
|
+
const timings = {};
|
|
8
|
+
|
|
9
|
+
/** @package */
|
|
10
|
+
export const markers = withTimings(markerNames, timings);
|
|
11
|
+
|
|
12
|
+
/** Marker name */
|
|
13
|
+
export type MarkerName = (typeof markerNames)[number];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file This file contains various helpers with type safety
|
|
3
|
+
* for the markers for this particular project.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { Script } from "liqvid";
|
|
7
|
+
|
|
8
|
+
import { markers } from "./markers";
|
|
9
|
+
|
|
10
|
+
/** @package */
|
|
11
|
+
export type { MarkerName as M } from "./markers";
|
|
12
|
+
|
|
13
|
+
/** @package */
|
|
14
|
+
export const script = new Script(markers);
|
|
15
|
+
|
|
16
|
+
/** @package */
|
|
17
|
+
export const playback = script.playback;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @package
|
|
21
|
+
* Get marker by name
|
|
22
|
+
*/
|
|
23
|
+
export const $m = script.markers.get.bind(script.markers.get);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{{#*inline "directory"}}
|
|
2
|
+
{
|
|
3
|
+
{{#each this}}
|
|
4
|
+
"{{ @key }}":
|
|
5
|
+
{{#if this}}
|
|
6
|
+
{{> directory this}}
|
|
7
|
+
{{else}}
|
|
8
|
+
null
|
|
9
|
+
{{/if}},
|
|
10
|
+
{{/each}}
|
|
11
|
+
}
|
|
12
|
+
{{/inline}}
|
|
13
|
+
/** This file is automatically @generated. */
|
|
14
|
+
import type { Directory, FileNames } from "@liqvid/assets";
|
|
15
|
+
|
|
16
|
+
export const PROJECT_DIRECTORY_STRUCTURE = ({{~> directory directoryStructure~}}) as const satisfies Directory;
|
|
17
|
+
|
|
18
|
+
export type ProjectDirectoryStructure = typeof PROJECT_DIRECTORY_STRUCTURE;
|
|
19
|
+
|
|
20
|
+
export type ProjectAssetsDir = FileNames<ProjectDirectoryStructure>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type LiqvidStudioPlugin } from "@liqvid/studio-plugin-api";
|
|
2
|
+
import "./palette.css";
|
|
3
|
+
export interface ProjectContextShape {
|
|
4
|
+
projectPath: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const ProjectContext: import("react").Context<ProjectContextShape>;
|
|
7
|
+
export declare function useProjectContext(): ProjectContextShape;
|
|
8
|
+
export declare function LiqvidDevToolsProvider({ children, plugins, projectPath, }: {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
plugins?: LiqvidStudioPlugin[];
|
|
11
|
+
projectPath: string;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export type Operation<BodyModel extends z.ZodType, ErrorModel extends z.ZodType, ResponseModel extends z.ZodType, SearchModel extends z.ZodType> = {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
error?: ErrorModel;
|
|
5
|
+
response?: ResponseModel;
|
|
6
|
+
search?: SearchModel;
|
|
7
|
+
} & ({
|
|
8
|
+
body?: undefined;
|
|
9
|
+
method?: "GET";
|
|
10
|
+
} | {
|
|
11
|
+
body?: BodyModel;
|
|
12
|
+
method: "POST";
|
|
13
|
+
});
|
|
14
|
+
export declare const listRecordingsOperation: {
|
|
15
|
+
endpoint: "/recordings";
|
|
16
|
+
response: z.ZodArray<z.ZodObject<{
|
|
17
|
+
created: z.ZodISODateTime;
|
|
18
|
+
duration: z.ZodObject<{
|
|
19
|
+
milliseconds: z.ZodNumber;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
plugins: z.ZodArray<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
search: z.ZodObject<{
|
|
25
|
+
url: z.ZodString;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
};
|
|
28
|
+
export declare const setProjectMetaOperation: {
|
|
29
|
+
body: z.ZodObject<{
|
|
30
|
+
durationMs: z.ZodNumber;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
endpoint: "/project-meta";
|
|
33
|
+
method: "POST";
|
|
34
|
+
search: z.ZodObject<{
|
|
35
|
+
url: z.ZodString;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Schema for plugin recording data.
|
|
40
|
+
* Data can be a Blob (for media) which requires a filename,
|
|
41
|
+
* or any JSON-serializable data.
|
|
42
|
+
*/
|
|
43
|
+
export declare const PluginRecordingData: z.ZodObject<{
|
|
44
|
+
data: z.ZodUnknown;
|
|
45
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
46
|
+
key: z.ZodString;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export type PluginRecordingData = z.infer<typeof PluginRecordingData>;
|
|
49
|
+
export declare const saveRecordingOperation: {
|
|
50
|
+
endpoint: "/recordings";
|
|
51
|
+
method: "POST";
|
|
52
|
+
search: z.ZodObject<{
|
|
53
|
+
url: z.ZodString;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Serve static files from the app directory.
|
|
58
|
+
* The `url` param is the path relative to the app directory.
|
|
59
|
+
* Example: /api/liqvid/static?url=/projects/my-video/.liqvid/recordings/test/@liqvid.media/audio.webm
|
|
60
|
+
*/
|
|
61
|
+
export declare const staticFileOperation: {
|
|
62
|
+
endpoint: "/static";
|
|
63
|
+
search: z.ZodObject<{
|
|
64
|
+
url: z.ZodString;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setProjectMeta(searchParams: URLSearchParams, rawBody: unknown): Promise<Response>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getRoot(): Promise<Response>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serve static files from the app directory.
|
|
3
|
+
* The `url` param is the path relative to the app directory.
|
|
4
|
+
* Example: /api/liqvid/static?url=/projects/my-video/.liqvid/recordings/test/@liqvid.media/audio.webm
|
|
5
|
+
*/
|
|
6
|
+
export declare function serveStaticFile(searchParams: URLSearchParams): Promise<Response>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** biome-ignore-all lint/complexity/noBannedTypes: intersection types */
|
|
2
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: heavy type magic here */
|
|
3
|
+
import { type Result } from "have-fun";
|
|
4
|
+
import type { z } from "zod";
|
|
5
|
+
export declare const listRecordings: (opts: {
|
|
6
|
+
search: {
|
|
7
|
+
url: string;
|
|
8
|
+
};
|
|
9
|
+
}) => Promise<Result<{
|
|
10
|
+
created: string;
|
|
11
|
+
duration: {
|
|
12
|
+
milliseconds: number;
|
|
13
|
+
};
|
|
14
|
+
name: string;
|
|
15
|
+
plugins: string[];
|
|
16
|
+
}[], SyntaxError | TypeError | z.ZodError<unknown>>>;
|
|
17
|
+
export declare const setProjectMeta: (opts: {
|
|
18
|
+
search: {
|
|
19
|
+
url: string;
|
|
20
|
+
};
|
|
21
|
+
} & {
|
|
22
|
+
body: {
|
|
23
|
+
durationMs: number;
|
|
24
|
+
};
|
|
25
|
+
}) => Promise<Result<undefined, SyntaxError | TypeError | z.ZodError<unknown>>>;
|
|
26
|
+
interface SaveRecordingOpts {
|
|
27
|
+
search: {
|
|
28
|
+
url: string;
|
|
29
|
+
};
|
|
30
|
+
body: {
|
|
31
|
+
durationMs: number;
|
|
32
|
+
plugins: Array<{
|
|
33
|
+
key: string;
|
|
34
|
+
data: unknown;
|
|
35
|
+
}>;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Save recording data to the server.
|
|
40
|
+
* Handles both JSON data and Blob data (for media recordings).
|
|
41
|
+
*/
|
|
42
|
+
export declare function saveRecording(opts: SaveRecordingOpts): Promise<Result<undefined, TypeError>>;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { DockableDialog } from "./ui/DockableDialog";
|
|
2
|
+
export * from "./ui/Tabs";
|
|
3
|
+
export type { LiqvidStudioPlugin, LiqvidStudioRecordingPlugin, } from "@liqvid/studio-plugin-api";
|
|
4
|
+
export { LiqvidDevToolsProvider as LiqvidDevToolsProviderProd, useProjectContext, } from "./LiqvidDevToolsProvider";
|
|
5
|
+
export { RecordingControl as RecordingControlProd, type RecordingControlProps, } from "./recording/RecordingControl";
|
|
6
|
+
/**
|
|
7
|
+
* Liqvid dev tools provider.
|
|
8
|
+
*
|
|
9
|
+
* Only operates in development. If you want this in production,
|
|
10
|
+
* use {@link LiqvidDevToolsProviderProd} instead.
|
|
11
|
+
*/
|
|
12
|
+
export declare const LiqvidDevToolsProvider: import("react").LazyExoticComponent<typeof import("./LiqvidDevToolsProvider").LiqvidDevToolsProvider>;
|
|
13
|
+
/**
|
|
14
|
+
* Liqvid recording control.
|
|
15
|
+
*
|
|
16
|
+
* Only renders in development. If you want this in production,
|
|
17
|
+
* use {@link RecordingControlProd} instead.
|
|
18
|
+
*/
|
|
19
|
+
export declare const RecordingControl: import("react").LazyExoticComponent<typeof import("./recording/RecordingControl").RecordingControl>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { runNextBuild } from "@liqvid/cli/build";
|
|
2
|
+
import type { ProjectMeta } from "./schemas/project.mts";
|
|
3
|
+
export { runNextBuild };
|
|
4
|
+
export interface LiqvidServerState {
|
|
5
|
+
jobs: {
|
|
6
|
+
productionServer: null | Promise<void>;
|
|
7
|
+
watchAssets: null | Promise<void>;
|
|
8
|
+
watchProjectFiles: null | Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
productionServerPort: number;
|
|
11
|
+
projects: Record<string, ProjectMeta>;
|
|
12
|
+
}
|
|
13
|
+
export declare function initializeServer(): Promise<void>;
|
|
14
|
+
export declare function getServerState(): LiqvidServerState;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Maybe } from "have-fun";
|
|
2
|
+
import type { Directory } from "../types/assets.mts";
|
|
3
|
+
export declare const ASSETS_DIRNAME = ".liqvid";
|
|
4
|
+
export declare function watchAssets(): Promise<void>;
|
|
5
|
+
/**
|
|
6
|
+
* Generate a file from a Handlebars template, and format the result with Biome (if available).
|
|
7
|
+
*/
|
|
8
|
+
export declare function runTemplate({ biomePath, data, out, template, }: {
|
|
9
|
+
/** Path to the Biome executable. */
|
|
10
|
+
biomePath: Maybe<string>;
|
|
11
|
+
/** Data to pass to the template */
|
|
12
|
+
data: unknown;
|
|
13
|
+
/** Path to the output file */
|
|
14
|
+
out: string;
|
|
15
|
+
/** Path to the template file */
|
|
16
|
+
template: string;
|
|
17
|
+
}): Promise<void>;
|
|
18
|
+
export declare function listDir(dirname: string): Promise<Directory>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface RequestContext {
|
|
2
|
+
params: Promise<{
|
|
3
|
+
[key: string]: string[];
|
|
4
|
+
}>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Liqvid server GET handler
|
|
8
|
+
*/
|
|
9
|
+
export declare function GET(req: Request, { params }: RequestContext): Promise<Response>;
|
|
10
|
+
/**
|
|
11
|
+
* Liqvid server POST handler
|
|
12
|
+
*/
|
|
13
|
+
export declare function POST(req: Request, { params }: RequestContext): Promise<Response>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function NewProjectButton(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function RebuildButton(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare function rebuildAction(): Promise<{
|
|
2
|
+
success: boolean;
|
|
3
|
+
}>;
|
|
4
|
+
export interface TemplateInfo {
|
|
5
|
+
/** Unique identifier (directory name) */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Display name from template.json */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Whether this is the default template */
|
|
10
|
+
default?: boolean;
|
|
11
|
+
/** Full path to the template directory */
|
|
12
|
+
path: string;
|
|
13
|
+
}
|
|
14
|
+
interface CreateProjectInput {
|
|
15
|
+
name: string;
|
|
16
|
+
projectPath: string;
|
|
17
|
+
templateId: string;
|
|
18
|
+
}
|
|
19
|
+
interface CreateProjectResult {
|
|
20
|
+
success: boolean;
|
|
21
|
+
error?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Load all available project templates.
|
|
25
|
+
* Templates are sorted with default first, then alphabetically by name.
|
|
26
|
+
*/
|
|
27
|
+
export declare function loadTemplatesAction(): Promise<TemplateInfo[]>;
|
|
28
|
+
export declare function createProjectAction(input: CreateProjectInput): Promise<CreateProjectResult>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Homepage(): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { HostingProvider } from "../types.mts";
|
|
3
|
+
export declare const ProviderConfigGitHubPages: z.ZodObject<{
|
|
4
|
+
repository: z.ZodString;
|
|
5
|
+
root: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
username: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type ProviderConfigGitHubPages = z.infer<typeof ProviderConfigGitHubPages>;
|
|
9
|
+
export declare class GitHubPagesProvider implements HostingProvider {
|
|
10
|
+
publishContent(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ProviderConfigLiqvidStudio: z.ZodObject<{
|
|
3
|
+
username: z.ZodString;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export type ProviderConfigLiqvidStudio = z.infer<typeof ProviderConfigLiqvidStudio>;
|
|
6
|
+
import type { MediaHostingProvider } from "../types.mts";
|
|
7
|
+
export declare class LiqvidStudioProvider implements MediaHostingProvider {
|
|
8
|
+
publishContent(): Promise<void>;
|
|
9
|
+
publishMedia(): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { MediaHostingProvider } from "../types.mts";
|
|
3
|
+
export declare const ProviderConfigS3: z.ZodObject<{
|
|
4
|
+
bucket: z.ZodString;
|
|
5
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type ProviderConfigS3 = z.infer<typeof ProviderConfigS3>;
|
|
8
|
+
export declare class S3Provider implements MediaHostingProvider {
|
|
9
|
+
publishContent(): Promise<void>;
|
|
10
|
+
publishMedia(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { MediaHostingProvider } from "../types.mts";
|
|
3
|
+
export declare const ProviderConfigSFTP: z.ZodObject<{
|
|
4
|
+
host: z.ZodString;
|
|
5
|
+
path: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type ProviderConfigSFTP = z.infer<typeof ProviderConfigSFTP>;
|
|
8
|
+
export declare class SFTPProvider implements MediaHostingProvider {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(options: ProviderConfigSFTP);
|
|
11
|
+
publishContent(localDir: string): Promise<void>;
|
|
12
|
+
publishMedia(_localDir: string): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GitHubPagesProvider } from "./hosting/github-pages.mts";
|
|
2
|
+
import { LiqvidStudioProvider } from "./hosting/liqvid-studio.mts";
|
|
3
|
+
import { S3Provider } from "./hosting/s3.mts";
|
|
4
|
+
import { SFTPProvider } from "./hosting/sftp.mts";
|
|
5
|
+
export declare const providersMap: {
|
|
6
|
+
githubPages: typeof GitHubPagesProvider;
|
|
7
|
+
liqvidStudio: typeof LiqvidStudioProvider;
|
|
8
|
+
s3: typeof S3Provider;
|
|
9
|
+
sftp: typeof SFTPProvider;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { SocialProvider } from "../types.mts";
|
|
3
|
+
export declare const ProviderConfigBlueSky: z.ZodObject<{
|
|
4
|
+
username: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type ProviderConfigBlueSky = z.infer<typeof ProviderConfigBlueSky>;
|
|
7
|
+
export declare class BlueSkyProvider implements SocialProvider {
|
|
8
|
+
constructor(_options: ProviderConfigBlueSky);
|
|
9
|
+
publish(): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { SocialProvider } from "../types.mts";
|
|
3
|
+
export declare const ProviderConfigFacebook: z.ZodObject<{
|
|
4
|
+
username: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type ProviderConfigFacebook = z.infer<typeof ProviderConfigFacebook>;
|
|
7
|
+
export declare class FacebookProvider implements SocialProvider {
|
|
8
|
+
constructor(_options: ProviderConfigFacebook);
|
|
9
|
+
publish(): Promise<void>;
|
|
10
|
+
}
|