@interware/content-generator 0.2.2 → 0.3.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.
Files changed (26) hide show
  1. package/README.md +42 -0
  2. package/dist/_chunks/{App-Cbkccs2K.mjs → App-ClgJldBv.mjs} +539 -14
  3. package/dist/_chunks/{App-DCuBRwX8.js → App-CwkLhm0x.js} +538 -13
  4. package/dist/_chunks/{Settings-DuGbtyWC.js → Settings-BEtewXxk.js} +2 -2
  5. package/dist/_chunks/{Settings-B60QGKK4.mjs → Settings-Bc5rcMRs.mjs} +2 -2
  6. package/dist/_chunks/{getTranslation-CacX7ZX5.js → getTranslation-C1jZiBcc.js} +1 -1
  7. package/dist/_chunks/{getTranslation-B97xbmEl.mjs → getTranslation-D3pA_57E.mjs} +1 -1
  8. package/dist/_chunks/{index-BVGbP3E-.js → index-D4lanCw0.js} +2 -2
  9. package/dist/_chunks/{index-B2RuvYul.mjs → index-K1A2opOE.mjs} +2 -2
  10. package/dist/admin/index.js +1 -1
  11. package/dist/admin/index.mjs +1 -1
  12. package/dist/admin/src/components/generate-image/Form.d.ts +15 -0
  13. package/dist/admin/src/components/generate-video/Form.d.ts +36 -0
  14. package/dist/admin/src/containers/generate-image/index.d.ts +2 -0
  15. package/dist/admin/src/containers/generate-video/index.d.ts +2 -0
  16. package/dist/admin/src/lib/use-cases/images/index.d.ts +2 -0
  17. package/dist/admin/src/pages/GenerateImage.d.ts +2 -0
  18. package/dist/admin/src/pages/GenerateVideo.d.ts +2 -0
  19. package/dist/server/index.js +367 -152
  20. package/dist/server/index.mjs +350 -153
  21. package/dist/server/src/controllers/controller.d.ts +2 -0
  22. package/dist/server/src/controllers/index.d.ts +2 -0
  23. package/dist/server/src/index.d.ts +21 -0
  24. package/dist/server/src/services/index.d.ts +19 -0
  25. package/dist/server/src/services/service.d.ts +20 -4
  26. package/package.json +1 -1
@@ -77,7 +77,7 @@ const index = {
77
77
  defaultMessage: PLUGIN_ID
78
78
  },
79
79
  Component: async () => {
80
- const { App } = await Promise.resolve().then(() => require("./App-DCuBRwX8.js"));
80
+ const { App } = await Promise.resolve().then(() => require("./App-CwkLhm0x.js"));
81
81
  return App;
82
82
  },
83
83
  permissions: [
@@ -98,7 +98,7 @@ const index = {
98
98
  defaultMessage: PLUGIN_ID
99
99
  },
100
100
  Component: async () => {
101
- const component = await Promise.resolve().then(() => require("./Settings-DuGbtyWC.js"));
101
+ const component = await Promise.resolve().then(() => require("./Settings-BEtewXxk.js"));
102
102
  return component.default;
103
103
  },
104
104
  to: `plugins/${PLUGIN_ID}/settings`,
@@ -76,7 +76,7 @@ const index = {
76
76
  defaultMessage: PLUGIN_ID
77
77
  },
78
78
  Component: async () => {
79
- const { App } = await import("./App-Cbkccs2K.mjs");
79
+ const { App } = await import("./App-ClgJldBv.mjs");
80
80
  return App;
81
81
  },
82
82
  permissions: [
@@ -97,7 +97,7 @@ const index = {
97
97
  defaultMessage: PLUGIN_ID
98
98
  },
99
99
  Component: async () => {
100
- const component = await import("./Settings-B60QGKK4.mjs");
100
+ const component = await import("./Settings-Bc5rcMRs.mjs");
101
101
  return component.default;
102
102
  },
103
103
  to: `plugins/${PLUGIN_ID}/settings`,
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-BVGbP3E-.js");
2
+ const index = require("../_chunks/index-D4lanCw0.js");
3
3
  module.exports = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "../_chunks/index-B2RuvYul.mjs";
1
+ import { i } from "../_chunks/index-K1A2opOE.mjs";
2
2
  export {
3
3
  i as default
4
4
  };
@@ -0,0 +1,15 @@
1
+ import { FormikHelpers } from 'formik';
2
+ export interface FormValues {
3
+ prompt: string;
4
+ aspectRatio: string;
5
+ imageSize: string;
6
+ }
7
+ export type ReferenceImage = {
8
+ id: number;
9
+ file?: File;
10
+ previewUrl?: string;
11
+ };
12
+ declare const Form: ({ onSubmit }: {
13
+ onSubmit: (values: FormValues, formikHelpers: FormikHelpers<FormValues>, referenceImages: ReferenceImage[]) => Promise<void>;
14
+ }) => import("react/jsx-runtime").JSX.Element;
15
+ export { Form };
@@ -0,0 +1,36 @@
1
+ import { FormikHelpers } from 'formik';
2
+ import * as Yup from 'yup';
3
+ interface SceneForm {
4
+ prompt: string;
5
+ durationSeconds: number;
6
+ narrationText?: string;
7
+ referenceImages: ReferenceImage[];
8
+ }
9
+ export interface VideoFormValues {
10
+ aspectRatio: string;
11
+ scenes: SceneForm[];
12
+ }
13
+ export type ReferenceImage = {
14
+ id: number;
15
+ file?: File;
16
+ previewUrl?: string;
17
+ };
18
+ export declare const validationSchema: Yup.ObjectSchema<{
19
+ aspectRatio: NonNullable<"1:1" | "9:16" | "16:9" | undefined>;
20
+ scenes: {
21
+ referenceImages?: {
22
+ file?: {} | undefined;
23
+ previewUrl?: string | undefined;
24
+ id: number;
25
+ }[] | undefined;
26
+ prompt: string;
27
+ durationSeconds: number;
28
+ }[] | undefined;
29
+ }, Yup.AnyObject, {
30
+ aspectRatio: undefined;
31
+ scenes: "";
32
+ }, "">;
33
+ declare const Form: ({ onSubmit }: {
34
+ onSubmit: (values: VideoFormValues, formikHelpers: FormikHelpers<VideoFormValues>) => Promise<void>;
35
+ }) => import("react/jsx-runtime").JSX.Element;
36
+ export { Form };
@@ -0,0 +1,2 @@
1
+ declare const GenerateImageContainer: () => import("react/jsx-runtime").JSX.Element;
2
+ export { GenerateImageContainer };
@@ -0,0 +1,2 @@
1
+ declare const GenerateVideoContainer: () => import("react/jsx-runtime").JSX.Element;
2
+ export { GenerateVideoContainer };
@@ -2,5 +2,7 @@ import { FetchOptions } from '@strapi/strapi/admin';
2
2
  declare const useImages: () => {
3
3
  getImages: () => Promise<import("@strapi/strapi/admin").FetchResponse<(<TData = any>(url: string, config?: FetchOptions | undefined) => Promise<import("@strapi/strapi/admin").FetchResponse<TData>>)>>;
4
4
  deleteImage: (config: FetchOptions) => Promise<import("@strapi/strapi/admin").FetchResponse<(<TData_1 = any>(url: string, config?: FetchOptions | undefined) => Promise<import("@strapi/strapi/admin").FetchResponse<TData_1>>)>>;
5
+ generateImageWithConfig: (data: any, config?: FetchOptions) => Promise<import("@strapi/strapi/admin").FetchResponse<(<TData_2 = any, TSend = any>(url: string, data?: TSend | undefined, config?: FetchOptions | undefined) => Promise<import("@strapi/strapi/admin").FetchResponse<TData_2>>)>>;
6
+ generateVideoWithScenes: (data: any, config?: FetchOptions) => Promise<import("@strapi/strapi/admin").FetchResponse<(<TData_2 = any, TSend = any>(url: string, data?: TSend | undefined, config?: FetchOptions | undefined) => Promise<import("@strapi/strapi/admin").FetchResponse<TData_2>>)>>;
5
7
  };
6
8
  export { useImages };
@@ -0,0 +1,2 @@
1
+ declare const GenerateImage: () => import("react/jsx-runtime").JSX.Element;
2
+ export { GenerateImage };
@@ -0,0 +1,2 @@
1
+ declare const GenerateVideo: () => import("react/jsx-runtime").JSX.Element;
2
+ export { GenerateVideo };