@umituz/web-ai 1.0.0 → 1.0.2

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 (55) hide show
  1. package/dist/{ABTesting-DDqNhHtP.d.ts → AIErrors-B2ogd1PB.d.ts} +14 -1
  2. package/dist/{ABTesting-DWBtKTMQ.d.cts → AIErrors-C5EasV_c.d.cts} +14 -1
  3. package/dist/{ProviderConfig-a55tLhWT.d.cts → ProviderConfig-DIFa9nmG.d.cts} +10 -1
  4. package/dist/{ProviderConfig-a55tLhWT.d.ts → ProviderConfig-DIFa9nmG.d.ts} +10 -1
  5. package/dist/chat/index.cjs +114 -23
  6. package/dist/chat/index.cjs.map +1 -1
  7. package/dist/chat/index.d.cts +4 -4
  8. package/dist/chat/index.d.ts +4 -4
  9. package/dist/chat/index.js +114 -23
  10. package/dist/chat/index.js.map +1 -1
  11. package/dist/{chat.service-DBKq9I2c.d.cts → chat.service-CL1qtYxe.d.cts} +7 -7
  12. package/dist/{chat.service-RQn8UTXD.d.ts → chat.service-q05GnhEm.d.ts} +7 -7
  13. package/dist/content/index.cjs +506 -193
  14. package/dist/content/index.cjs.map +1 -1
  15. package/dist/content/index.d.cts +7 -8
  16. package/dist/content/index.d.ts +7 -8
  17. package/dist/content/index.js +506 -193
  18. package/dist/content/index.js.map +1 -1
  19. package/dist/core/index.cjs +122 -15
  20. package/dist/core/index.cjs.map +1 -1
  21. package/dist/core/index.d.cts +13 -31
  22. package/dist/core/index.d.ts +13 -31
  23. package/dist/core/index.js +119 -16
  24. package/dist/core/index.js.map +1 -1
  25. package/dist/{create-ai-BhNaz86i.d.ts → create-ai-9PW752z8.d.ts} +14 -21
  26. package/dist/{create-ai-DGZFBOA1.d.cts → create-ai-CXYKPK6G.d.cts} +14 -21
  27. package/dist/hooks/index.cjs +631 -179
  28. package/dist/hooks/index.cjs.map +1 -1
  29. package/dist/hooks/index.d.cts +33 -7
  30. package/dist/hooks/index.d.ts +33 -7
  31. package/dist/hooks/index.js +631 -180
  32. package/dist/hooks/index.js.map +1 -1
  33. package/dist/index-DIHz8_OJ.d.ts +48 -0
  34. package/dist/index-DKHNcMbl.d.cts +48 -0
  35. package/dist/index.cjs +666 -104
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.cts +8 -7
  38. package/dist/index.d.ts +8 -7
  39. package/dist/index.js +645 -105
  40. package/dist/index.js.map +1 -1
  41. package/dist/{provider.factory-COsnprLH.d.cts → provider.factory-BxsfK4WW.d.cts} +1 -1
  42. package/dist/{provider.factory-CpWFyjbw.d.ts → provider.factory-DfDfk0dK.d.ts} +1 -1
  43. package/dist/providers/index.cjs +973 -130
  44. package/dist/providers/index.cjs.map +1 -1
  45. package/dist/providers/index.d.cts +84 -18
  46. package/dist/providers/index.d.ts +84 -18
  47. package/dist/providers/index.js +956 -131
  48. package/dist/providers/index.js.map +1 -1
  49. package/dist/text-generation.service-BQO3Tvz2.d.cts +66 -0
  50. package/dist/text-generation.service-CcYQM6Ch.d.ts +66 -0
  51. package/dist/wizard/index.d.cts +1 -1
  52. package/dist/wizard/index.d.ts +1 -1
  53. package/package.json +9 -1
  54. package/dist/index-DjX9ZKuM.d.cts +0 -14
  55. package/dist/index-DxLvE588.d.ts +0 -14
@@ -1,13 +1,14 @@
1
1
  import { B as BlogGenerationRequest, G as GeneratedBlog, b as SocialContentRequest, c as GeneratedSocialContent, a as ContentTone, V as VideoScriptRequest, d as GeneratedVideoScript, e as ContentCalendarEntry, E as Emotion } from '../ContentGeneration-B6iK2B33.cjs';
2
- import { S as SentimentAnalysisResult, C as ContentAnalysisRequest, a as ContentAnalysisResult, b as SEOOptimizationRequest, c as SEOOptimizationResult, d as SEOScoreBreakdown, A as ABTestRequest, e as ABTestPrediction, f as ABTestComparison, G as GenerationResult, g as GenerationProgress, h as GenerationStatus, I as ImageGenerationInput, V as VideoGenerationInput, i as GenerationType, j as ImageQuality, k as VideoQuality } from '../ABTesting-DWBtKTMQ.cjs';
3
- import { d as ProviderConfig, I as ImageGenerationRequest, G as GeneratedContent, V as VideoGenerationRequest, a as ImageToVideoRequest, b as VideoToVideoRequest } from '../ProviderConfig-a55tLhWT.cjs';
4
- import { A as AIProviderConfig, p as AIErrorCode } from '../create-ai-DGZFBOA1.cjs';
5
- import { f as ITextGenerator, b as ITextProvider, c as ProviderFactory } from '../provider.factory-COsnprLH.cjs';
2
+ import { A as AIErrorCode, S as SentimentAnalysisResult, C as ContentAnalysisRequest, a as ContentAnalysisResult, b as SEOOptimizationRequest, c as SEOOptimizationResult, d as SEOScoreBreakdown, e as ABTestRequest, f as ABTestPrediction, g as ABTestComparison, G as GenerationResult, h as GenerationProgress, i as GenerationStatus, I as ImageGenerationInput, V as VideoGenerationInput, j as GenerationType, k as ImageQuality, l as VideoQuality } from '../AIErrors-C5EasV_c.cjs';
3
+ import { d as ProviderConfig, I as ImageGenerationRequest, G as GeneratedContent, V as VideoGenerationRequest, a as ImageToVideoRequest, b as VideoToVideoRequest } from '../ProviderConfig-DIFa9nmG.cjs';
4
+ import { f as ITextGenerator, b as ITextProvider, c as ProviderFactory } from '../provider.factory-BxsfK4WW.cjs';
5
+ import { A as AIProviderConfig, q as GroqGenerationConfig } from '../create-ai-CXYKPK6G.cjs';
6
6
  import { ContentWizardStep, ContentWizardData, ImageWizardStep, ImageWizardData, VideoWizardStep, VideoWizardData } from '../wizard/index.cjs';
7
7
  import { c as TextTier } from '../index-fXjxTR5W.cjs';
8
8
  import { C as CacheManager, b as CacheStats } from '../cache-manager-Df9LLYGA.cjs';
9
- import { d as ChatService, U as UseChatOptions, k as UseChatReturn } from '../chat.service-DBKq9I2c.cjs';
10
- import '../index-DjX9ZKuM.cjs';
9
+ import { d as ChatService, U as UseChatOptions, k as UseChatReturn } from '../chat.service-CL1qtYxe.cjs';
10
+ import { c as TextGenerationService } from '../text-generation.service-BQO3Tvz2.cjs';
11
+ import '../index-DKHNcMbl.cjs';
11
12
 
12
13
  /** Provider config for the underlying AIContentService — new AIProviderConfig,
13
14
  * legacy ProviderConfig, or a custom ITextGenerator. */
@@ -207,4 +208,29 @@ interface UseChatDeps {
207
208
  }
208
209
  declare function useChat(options: UseChatOptions, deps?: UseChatDeps): UseChatReturn;
209
210
 
210
- export { type ContentWizardRequest, type CreditCheckFunction, type SaveFunction, type UploadFunction, type UseAIContentOptions, type UseAIContentReturn, type UseAIGenerationOptions, type UseAIGenerationReturn, type UseBlogGeneratorOptions, type UseBlogGeneratorReturn, type UseCacheStatsOptions, type UseChatDeps, type UseContentWizardOptions, type UseContentWizardReturn, type UseImageWizardOptions, type UseImageWizardReturn, type UseSocialContentGeneratorOptions, type UseSocialContentGeneratorReturn, type UseTextConfig, type UseTextDeps, type UseTextOptions, type UseTextReturn, type UseVideoWizardOptions, type UseVideoWizardReturn, type VideoWizardRequest, useAIContent, useAIGeneration, useBlogGenerator, useCacheStats, useChat, useContentWizard, useImageWizard, useSocialContentGenerator, useText, useVideoWizard };
211
+ interface UseGroqOptions {
212
+ readonly model?: string;
213
+ readonly generationConfig?: GroqGenerationConfig;
214
+ readonly onStart?: () => void;
215
+ readonly onSuccess?: (result: string) => void;
216
+ readonly onError?: (error: string) => void;
217
+ }
218
+ interface UseGroqReturn {
219
+ readonly isLoading: boolean;
220
+ readonly error: string | null;
221
+ readonly result: string | null;
222
+ generate: (prompt: string, options?: GroqGenerationConfig) => Promise<string | null>;
223
+ generateJSON: <T = Record<string, unknown>>(prompt: string, options?: GroqGenerationConfig & {
224
+ schema?: Record<string, unknown>;
225
+ }) => Promise<T | null>;
226
+ stream: (prompt: string, onChunk: (chunk: string) => void, options?: GroqGenerationConfig) => Promise<string | null>;
227
+ cancel: () => void;
228
+ reset: () => void;
229
+ clearError: () => void;
230
+ }
231
+ interface UseGroqDeps {
232
+ readonly textGeneration?: TextGenerationService;
233
+ }
234
+ declare function useGroq(options?: UseGroqOptions, deps?: UseGroqDeps): UseGroqReturn;
235
+
236
+ export { type ContentWizardRequest, type CreditCheckFunction, type SaveFunction, type UploadFunction, type UseAIContentOptions, type UseAIContentReturn, type UseAIGenerationOptions, type UseAIGenerationReturn, type UseBlogGeneratorOptions, type UseBlogGeneratorReturn, type UseCacheStatsOptions, type UseChatDeps, type UseContentWizardOptions, type UseContentWizardReturn, type UseGroqDeps, type UseGroqOptions, type UseGroqReturn, type UseImageWizardOptions, type UseImageWizardReturn, type UseSocialContentGeneratorOptions, type UseSocialContentGeneratorReturn, type UseTextConfig, type UseTextDeps, type UseTextOptions, type UseTextReturn, type UseVideoWizardOptions, type UseVideoWizardReturn, type VideoWizardRequest, useAIContent, useAIGeneration, useBlogGenerator, useCacheStats, useChat, useContentWizard, useGroq, useImageWizard, useSocialContentGenerator, useText, useVideoWizard };
@@ -1,13 +1,14 @@
1
1
  import { B as BlogGenerationRequest, G as GeneratedBlog, b as SocialContentRequest, c as GeneratedSocialContent, a as ContentTone, V as VideoScriptRequest, d as GeneratedVideoScript, e as ContentCalendarEntry, E as Emotion } from '../ContentGeneration-B6iK2B33.js';
2
- import { S as SentimentAnalysisResult, C as ContentAnalysisRequest, a as ContentAnalysisResult, b as SEOOptimizationRequest, c as SEOOptimizationResult, d as SEOScoreBreakdown, A as ABTestRequest, e as ABTestPrediction, f as ABTestComparison, G as GenerationResult, g as GenerationProgress, h as GenerationStatus, I as ImageGenerationInput, V as VideoGenerationInput, i as GenerationType, j as ImageQuality, k as VideoQuality } from '../ABTesting-DDqNhHtP.js';
3
- import { d as ProviderConfig, I as ImageGenerationRequest, G as GeneratedContent, V as VideoGenerationRequest, a as ImageToVideoRequest, b as VideoToVideoRequest } from '../ProviderConfig-a55tLhWT.js';
4
- import { A as AIProviderConfig, p as AIErrorCode } from '../create-ai-BhNaz86i.js';
5
- import { f as ITextGenerator, b as ITextProvider, c as ProviderFactory } from '../provider.factory-CpWFyjbw.js';
2
+ import { A as AIErrorCode, S as SentimentAnalysisResult, C as ContentAnalysisRequest, a as ContentAnalysisResult, b as SEOOptimizationRequest, c as SEOOptimizationResult, d as SEOScoreBreakdown, e as ABTestRequest, f as ABTestPrediction, g as ABTestComparison, G as GenerationResult, h as GenerationProgress, i as GenerationStatus, I as ImageGenerationInput, V as VideoGenerationInput, j as GenerationType, k as ImageQuality, l as VideoQuality } from '../AIErrors-B2ogd1PB.js';
3
+ import { d as ProviderConfig, I as ImageGenerationRequest, G as GeneratedContent, V as VideoGenerationRequest, a as ImageToVideoRequest, b as VideoToVideoRequest } from '../ProviderConfig-DIFa9nmG.js';
4
+ import { f as ITextGenerator, b as ITextProvider, c as ProviderFactory } from '../provider.factory-DfDfk0dK.js';
5
+ import { A as AIProviderConfig, q as GroqGenerationConfig } from '../create-ai-9PW752z8.js';
6
6
  import { ContentWizardStep, ContentWizardData, ImageWizardStep, ImageWizardData, VideoWizardStep, VideoWizardData } from '../wizard/index.js';
7
7
  import { c as TextTier } from '../index-fXjxTR5W.js';
8
8
  import { C as CacheManager, b as CacheStats } from '../cache-manager-Df9LLYGA.js';
9
- import { d as ChatService, U as UseChatOptions, k as UseChatReturn } from '../chat.service-RQn8UTXD.js';
10
- import '../index-DxLvE588.js';
9
+ import { d as ChatService, U as UseChatOptions, k as UseChatReturn } from '../chat.service-q05GnhEm.js';
10
+ import { c as TextGenerationService } from '../text-generation.service-CcYQM6Ch.js';
11
+ import '../index-DIHz8_OJ.js';
11
12
 
12
13
  /** Provider config for the underlying AIContentService — new AIProviderConfig,
13
14
  * legacy ProviderConfig, or a custom ITextGenerator. */
@@ -207,4 +208,29 @@ interface UseChatDeps {
207
208
  }
208
209
  declare function useChat(options: UseChatOptions, deps?: UseChatDeps): UseChatReturn;
209
210
 
210
- export { type ContentWizardRequest, type CreditCheckFunction, type SaveFunction, type UploadFunction, type UseAIContentOptions, type UseAIContentReturn, type UseAIGenerationOptions, type UseAIGenerationReturn, type UseBlogGeneratorOptions, type UseBlogGeneratorReturn, type UseCacheStatsOptions, type UseChatDeps, type UseContentWizardOptions, type UseContentWizardReturn, type UseImageWizardOptions, type UseImageWizardReturn, type UseSocialContentGeneratorOptions, type UseSocialContentGeneratorReturn, type UseTextConfig, type UseTextDeps, type UseTextOptions, type UseTextReturn, type UseVideoWizardOptions, type UseVideoWizardReturn, type VideoWizardRequest, useAIContent, useAIGeneration, useBlogGenerator, useCacheStats, useChat, useContentWizard, useImageWizard, useSocialContentGenerator, useText, useVideoWizard };
211
+ interface UseGroqOptions {
212
+ readonly model?: string;
213
+ readonly generationConfig?: GroqGenerationConfig;
214
+ readonly onStart?: () => void;
215
+ readonly onSuccess?: (result: string) => void;
216
+ readonly onError?: (error: string) => void;
217
+ }
218
+ interface UseGroqReturn {
219
+ readonly isLoading: boolean;
220
+ readonly error: string | null;
221
+ readonly result: string | null;
222
+ generate: (prompt: string, options?: GroqGenerationConfig) => Promise<string | null>;
223
+ generateJSON: <T = Record<string, unknown>>(prompt: string, options?: GroqGenerationConfig & {
224
+ schema?: Record<string, unknown>;
225
+ }) => Promise<T | null>;
226
+ stream: (prompt: string, onChunk: (chunk: string) => void, options?: GroqGenerationConfig) => Promise<string | null>;
227
+ cancel: () => void;
228
+ reset: () => void;
229
+ clearError: () => void;
230
+ }
231
+ interface UseGroqDeps {
232
+ readonly textGeneration?: TextGenerationService;
233
+ }
234
+ declare function useGroq(options?: UseGroqOptions, deps?: UseGroqDeps): UseGroqReturn;
235
+
236
+ export { type ContentWizardRequest, type CreditCheckFunction, type SaveFunction, type UploadFunction, type UseAIContentOptions, type UseAIContentReturn, type UseAIGenerationOptions, type UseAIGenerationReturn, type UseBlogGeneratorOptions, type UseBlogGeneratorReturn, type UseCacheStatsOptions, type UseChatDeps, type UseContentWizardOptions, type UseContentWizardReturn, type UseGroqDeps, type UseGroqOptions, type UseGroqReturn, type UseImageWizardOptions, type UseImageWizardReturn, type UseSocialContentGeneratorOptions, type UseSocialContentGeneratorReturn, type UseTextConfig, type UseTextDeps, type UseTextOptions, type UseTextReturn, type UseVideoWizardOptions, type UseVideoWizardReturn, type VideoWizardRequest, useAIContent, useAIGeneration, useBlogGenerator, useCacheStats, useChat, useContentWizard, useGroq, useImageWizard, useSocialContentGenerator, useText, useVideoWizard };