@devultur/convex 1.3.1 → 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 +462 -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 +462 -64
- package/dist/react.js +1625 -493
- package/dist/types-LrusGVDf.d.ts +62 -0
- package/dist/validators.d.ts +13 -1
- package/dist/validators.js +1 -1
- package/package.json +8 -4
package/dist/pdfjs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PdfjsModule } from './pdf-render-
|
|
1
|
+
import { P as PdfjsLoader, a as PdfjsModule } from './pdf-render-BwJGagvz.js';
|
|
2
2
|
|
|
3
3
|
/** The worker next to the legacy build, resolved by your bundler from this package. */
|
|
4
4
|
declare const defaultPdfWorkerSrc: () => string;
|
|
@@ -7,5 +7,16 @@ declare const defaultPdfWorkerSrc: () => string;
|
|
|
7
7
|
* already, points `GlobalWorkerOptions.workerSrc` at `defaultPdfWorkerSrc()`.
|
|
8
8
|
*/
|
|
9
9
|
declare function loadPdfjs(): Promise<PdfjsModule>;
|
|
10
|
+
/**
|
|
11
|
+
* A PDF's page count, read in the browser with pdf.js (imported on the first call), or `null` when the file isn't a
|
|
12
|
+
* PDF pdf.js can open. Pass it as `pageCount` to `upload()` or `confirmUpload`: it's recorded as the client's hint.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const pageCount = (await countPdfPages(file)) ?? undefined;
|
|
16
|
+
* await upload(file, { pageCount });
|
|
17
|
+
*/
|
|
18
|
+
declare function countPdfPages(file: Blob, options?: {
|
|
19
|
+
loadPdfjs?: PdfjsLoader;
|
|
20
|
+
}): Promise<number | null>;
|
|
10
21
|
|
|
11
|
-
export { defaultPdfWorkerSrc, loadPdfjs };
|
|
22
|
+
export { countPdfPages, defaultPdfWorkerSrc, loadPdfjs };
|
package/dist/pdfjs.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
countPages
|
|
3
|
+
} from "./chunk-HOFTKJWT.js";
|
|
4
|
+
|
|
1
5
|
// src/pdfjs.ts
|
|
2
6
|
var defaultPdfWorkerSrc = () => new URL("pdfjs-dist/legacy/build/pdf.worker.min.mjs", import.meta.url).href;
|
|
3
7
|
async function loadPdfjs() {
|
|
@@ -5,7 +9,12 @@ async function loadPdfjs() {
|
|
|
5
9
|
if (!pdfjs.GlobalWorkerOptions.workerSrc) pdfjs.GlobalWorkerOptions.workerSrc = defaultPdfWorkerSrc();
|
|
6
10
|
return pdfjs;
|
|
7
11
|
}
|
|
12
|
+
async function countPdfPages(file, options) {
|
|
13
|
+
const pdfjs = await (options?.loadPdfjs ?? loadPdfjs)();
|
|
14
|
+
return countPages(pdfjs, file);
|
|
15
|
+
}
|
|
8
16
|
export {
|
|
17
|
+
countPdfPages,
|
|
9
18
|
defaultPdfWorkerSrc,
|
|
10
19
|
loadPdfjs
|
|
11
20
|
};
|