@devultur/convex 1.3.2 → 1.4.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/README.md +426 -9
- package/dist/bin/init.js +44 -23
- package/dist/chunk-EX3W77VY.js +245 -0
- package/dist/chunk-HOFTKJWT.js +58 -0
- package/dist/chunk-KAIVI7RB.js +21 -0
- package/dist/chunk-QBHIZBOQ.js +139 -0
- package/dist/{chunk-GKLFRSGI.js → chunk-YIPZZDGD.js} +8 -1
- package/dist/component/_generated/api.d.ts +6 -0
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/api.js.map +1 -1
- package/dist/component/_generated/component.d.ts +27 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/library.d.ts +93 -0
- package/dist/component/library.d.ts.map +1 -0
- package/dist/component/library.js +74 -0
- package/dist/component/library.js.map +1 -0
- package/dist/component/mediaMeta.d.ts +46 -0
- package/dist/component/mediaMeta.d.ts.map +1 -0
- package/dist/component/mediaMeta.js +82 -0
- package/dist/component/mediaMeta.js.map +1 -0
- package/dist/component/metadata.d.ts +59 -0
- package/dist/component/metadata.d.ts.map +1 -0
- package/dist/component/metadata.js +32 -0
- package/dist/component/metadata.js.map +1 -0
- package/dist/component/public.d.ts +17 -1
- package/dist/component/public.d.ts.map +1 -1
- package/dist/component/public.js +20 -11
- package/dist/component/public.js.map +1 -1
- package/dist/component/schema.d.ts +17 -2
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +13 -1
- package/dist/component/schema.js.map +1 -1
- package/dist/component/uploads.d.ts +13 -0
- package/dist/component/uploads.d.ts.map +1 -1
- package/dist/component/uploads.js +24 -5
- package/dist/component/uploads.js.map +1 -1
- package/dist/error-labels-BfqcFh2R.d.ts +19 -0
- package/dist/index.d.ts +204 -93
- package/dist/index.js +200 -128
- package/dist/locales/es.d.ts +11 -0
- package/dist/locales/es.js +162 -0
- package/dist/media-picker-labels-CiVcNUZo.d.ts +114 -0
- package/dist/{pdf-render-CiCK6V1X.d.ts → pdf-render-BwJGagvz.d.ts} +1 -1
- package/dist/pdfjs.d.ts +13 -2
- package/dist/pdfjs.js +9 -0
- package/dist/react.d.ts +441 -66
- package/dist/react.js +1663 -550
- package/dist/types-LrusGVDf.d.ts +62 -0
- package/dist/validators.d.ts +17 -5
- package/dist/validators.js +1 -1
- package/package.json +8 -4
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { VideoModuleConfig, ObjectLock } from '@devultur/core';
|
|
2
|
+
|
|
3
|
+
interface DevulturComponentConfig {
|
|
4
|
+
video?: VideoModuleConfig;
|
|
5
|
+
/**
|
|
6
|
+
* Lock every upload through the exposed `createUploadUrl` gets (retention and/or hold). Set here, on your server:
|
|
7
|
+
* the browser never chooses a lock. To lock per upload, call `devultur.createUploadUrl(ctx, { lock })` from your
|
|
8
|
+
* own function.
|
|
9
|
+
*/
|
|
10
|
+
upload?: {
|
|
11
|
+
lock?: ObjectLock;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
interface MediaRecord {
|
|
15
|
+
/** The media id (the `id` of its `DevulturMedia`), for every kind. */
|
|
16
|
+
key: string;
|
|
17
|
+
type: "video" | "image" | "file";
|
|
18
|
+
filename: string;
|
|
19
|
+
contentType: string;
|
|
20
|
+
sizeBytes: number;
|
|
21
|
+
/** Set by a confirmed upload; unset on records from before 1.1.0. */
|
|
22
|
+
visibility?: "public" | "private";
|
|
23
|
+
/** Key of the uploaded object (a video's raw file). Set by a confirmed upload. */
|
|
24
|
+
objectKey?: string;
|
|
25
|
+
/** An image's intrinsic size: read by the Worker from the bytes when it can, else the uploading client's hint. */
|
|
26
|
+
width?: number;
|
|
27
|
+
height?: number;
|
|
28
|
+
/** A PDF's page count, as the uploading client reported it (a hint). */
|
|
29
|
+
pageCount?: number;
|
|
30
|
+
/** Set by the app with `updateMediaMeta`. */
|
|
31
|
+
title?: string;
|
|
32
|
+
alt?: string;
|
|
33
|
+
tags?: string[];
|
|
34
|
+
/** `title + " " + filename`, lowercased, for search. Unset on records from before 1.4.0. */
|
|
35
|
+
searchText?: string;
|
|
36
|
+
transcodeStatus?: "queued" | "transcoding" | "captioning" | "ready" | "failed";
|
|
37
|
+
transcodeProgress?: {
|
|
38
|
+
current: number;
|
|
39
|
+
total: number;
|
|
40
|
+
};
|
|
41
|
+
transcodeError?: string;
|
|
42
|
+
playlistUrl?: string;
|
|
43
|
+
thumbnailKey?: string;
|
|
44
|
+
/** Key of the storyboard VTT (hover previews); URL via `buildStoryboardUrl` from `@devultur/core`. */
|
|
45
|
+
storyboardKey?: string;
|
|
46
|
+
captionLocales?: string[];
|
|
47
|
+
/** True while requested captions haven't arrived; the video waits in "captioning" only then. */
|
|
48
|
+
captionsPending?: boolean;
|
|
49
|
+
/** A video's duration in seconds, from the transcode. */
|
|
50
|
+
duration?: number;
|
|
51
|
+
createdAt: number;
|
|
52
|
+
}
|
|
53
|
+
interface ProgressRecord {
|
|
54
|
+
userId: string;
|
|
55
|
+
videoId: string;
|
|
56
|
+
lastPosition: number;
|
|
57
|
+
completedAt?: number;
|
|
58
|
+
watchedPercent?: number;
|
|
59
|
+
updatedAt: number;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type { DevulturComponentConfig as D, MediaRecord as M, ProgressRecord as P };
|
package/dist/validators.d.ts
CHANGED
|
@@ -12,22 +12,34 @@ import { DevulturKind } from '@devultur/core';
|
|
|
12
12
|
*/
|
|
13
13
|
declare const dv: {
|
|
14
14
|
media(kind?: DevulturKind): convex_values.VObject<{
|
|
15
|
-
filename?: string | undefined;
|
|
16
15
|
key?: string | undefined;
|
|
17
|
-
|
|
16
|
+
alt?: string | undefined;
|
|
17
|
+
tags?: string[] | undefined;
|
|
18
|
+
title?: string | undefined;
|
|
19
|
+
filename?: string | undefined;
|
|
20
|
+
sizeBytes?: number | undefined;
|
|
21
|
+
duration?: number | undefined;
|
|
18
22
|
height?: number | undefined;
|
|
23
|
+
pageCount?: number | undefined;
|
|
24
|
+
width?: number | undefined;
|
|
25
|
+
visibility: "public" | "private";
|
|
19
26
|
id: string;
|
|
20
27
|
kind: DevulturKind;
|
|
21
|
-
visibility: "public" | "private";
|
|
22
28
|
}, {
|
|
23
|
-
kind: convex_values.VLiteral<DevulturKind, "required"> | convex_values.VUnion<"
|
|
29
|
+
kind: convex_values.VLiteral<DevulturKind, "required"> | convex_values.VUnion<"video" | "image" | "file", [convex_values.VLiteral<"image", "required">, convex_values.VLiteral<"video", "required">, convex_values.VLiteral<"file", "required">], "required", never>;
|
|
24
30
|
id: convex_values.VString<string, "required">;
|
|
25
31
|
visibility: convex_values.VUnion<"public" | "private", [convex_values.VLiteral<"public", "required">, convex_values.VLiteral<"private", "required">], "required", never>;
|
|
26
32
|
filename: convex_values.VString<string | undefined, "optional">;
|
|
27
33
|
key: convex_values.VString<string | undefined, "optional">;
|
|
28
34
|
width: convex_values.VFloat64<number | undefined, "optional">;
|
|
29
35
|
height: convex_values.VFloat64<number | undefined, "optional">;
|
|
30
|
-
|
|
36
|
+
title: convex_values.VString<string | undefined, "optional">;
|
|
37
|
+
alt: convex_values.VString<string | undefined, "optional">;
|
|
38
|
+
tags: convex_values.VArray<string[] | undefined, convex_values.VString<string, "required">, "optional">;
|
|
39
|
+
sizeBytes: convex_values.VFloat64<number | undefined, "optional">;
|
|
40
|
+
duration: convex_values.VFloat64<number | undefined, "optional">;
|
|
41
|
+
pageCount: convex_values.VFloat64<number | undefined, "optional">;
|
|
42
|
+
}, "required", "key" | "alt" | "tags" | "title" | "filename" | "sizeBytes" | "visibility" | "duration" | "height" | "pageCount" | "width" | "id" | "kind">;
|
|
31
43
|
};
|
|
32
44
|
|
|
33
45
|
export { dv };
|
package/dist/validators.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devultur/convex",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Convex component for Devultur media: media records, uploads, transcodes, watch progress and React bindings",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"convex",
|
|
@@ -45,6 +45,10 @@
|
|
|
45
45
|
"./pdfjs": {
|
|
46
46
|
"import": "./dist/pdfjs.js",
|
|
47
47
|
"types": "./dist/pdfjs.d.ts"
|
|
48
|
+
},
|
|
49
|
+
"./locales/es": {
|
|
50
|
+
"import": "./dist/locales/es.js",
|
|
51
|
+
"types": "./dist/locales/es.d.ts"
|
|
48
52
|
}
|
|
49
53
|
},
|
|
50
54
|
"bin": {
|
|
@@ -55,8 +59,8 @@
|
|
|
55
59
|
"dist"
|
|
56
60
|
],
|
|
57
61
|
"dependencies": {
|
|
58
|
-
"@devultur/core": "1.
|
|
59
|
-
"@devultur/react": "1.
|
|
62
|
+
"@devultur/core": "1.4.0",
|
|
63
|
+
"@devultur/react": "1.4.0"
|
|
60
64
|
},
|
|
61
65
|
"peerDependencies": {
|
|
62
66
|
"convex": ">=1.25.0",
|
|
@@ -88,7 +92,7 @@
|
|
|
88
92
|
"access": "public"
|
|
89
93
|
},
|
|
90
94
|
"scripts": {
|
|
91
|
-
"build": "tsup src/index.ts src/validators.ts src/react.tsx src/pdfjs.ts src/bin/init.ts --format esm --dts && tsc -p src/component/tsconfig.json",
|
|
95
|
+
"build": "tsup src/index.ts src/validators.ts src/react.tsx src/pdfjs.ts src/locales/es.ts src/bin/init.ts --format esm --dts && tsc -p src/component/tsconfig.json",
|
|
92
96
|
"codegen": "node scripts/codegen.ts",
|
|
93
97
|
"dev": "tsup src/index.ts src/react.tsx --format esm --dts --watch",
|
|
94
98
|
"typecheck": "tsc --noEmit"
|