@framed-dev/react 0.0.0 → 0.1.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/dist/index.cjs +26667 -968
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +26541 -872
- package/dist/index.js.map +1 -1
- package/package.json +14 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FramedConfig, Session, WidgetDataLayer, Task, LimitStatus, WidgetFeatures, AuthConfig, FeedbackComment, TaskStatus, SyncResult } from '@framed/core';
|
|
2
|
-
export { AIConfig, AnnotationData, AnnotationMode, Assignment, Attachment, AuthConfig, AuthMode, Comment, ElementInfo, FeedbackComment, FeedbackInfo, FramedConfig, LimitStatus, Mention, PageInfo, PendingAttachment, Position, Session, SyncConfig, SyncResult, Task, TaskInfo, TaskStatus, TaskType, UsageLimits, ViewportMode, WidgetConfig, WidgetDataLayer, WidgetFeatures } from '@framed/core';
|
|
1
|
+
import { FramedConfig, Session, WidgetDataLayer, SupabaseClient, FramedApiClient, WizardCallbacks, Task, LimitStatus, WidgetFeatures, AuthConfig, FeedbackComment, TaskStatus, SyncResult } from '@framed/core';
|
|
2
|
+
export { AIConfig, AIFeatureResult, AnnotationData, AnnotationMode, Assignment, Attachment, AuthConfig, AuthMode, Comment, ElementInfo, FeedbackComment, FeedbackInfo, FramedApiClient, FramedConfig, LimitStatus, Mention, PageInfo, PendingAttachment, Position, SDKConfig, Session, SyncConfig, SyncResult, Task, TaskInfo, TaskStatus, TaskType, TranslationResult, UploadResult, UsageLimits, ViewportMode, WidgetConfig, WidgetDataLayer, WidgetFeatures, WizardCallbacks, createWizardCallbacks, getUserSupabase, initUserSupabase, isSupabaseInitialized, translateContent, uploadFile, uploadFont, uploadLogo } from '@framed/core';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
@@ -19,6 +19,10 @@ interface FramedContextValue {
|
|
|
19
19
|
login: () => void;
|
|
20
20
|
logout: () => void;
|
|
21
21
|
dataLayer: WidgetDataLayer;
|
|
22
|
+
supabase: SupabaseClient | null;
|
|
23
|
+
framedApi: FramedApiClient;
|
|
24
|
+
hasAIFeatures: boolean;
|
|
25
|
+
callbacks: WizardCallbacks;
|
|
22
26
|
tasks: Task[];
|
|
23
27
|
openTasks: Task[];
|
|
24
28
|
isTasksLoading: boolean;
|
|
@@ -36,6 +40,15 @@ interface FramedProviderProps {
|
|
|
36
40
|
}
|
|
37
41
|
declare function FramedProvider({ config, children }: FramedProviderProps): react_jsx_runtime.JSX.Element;
|
|
38
42
|
declare function useFramed(): FramedContextValue;
|
|
43
|
+
/**
|
|
44
|
+
* Convenience hook to get just the wizard callbacks.
|
|
45
|
+
* Use this in wizard components that need file upload or translation.
|
|
46
|
+
*/
|
|
47
|
+
declare function useFramedCallbacks(): WizardCallbacks;
|
|
48
|
+
/**
|
|
49
|
+
* Hook to check if AI features are available.
|
|
50
|
+
*/
|
|
51
|
+
declare function useHasAIFeatures(): boolean;
|
|
39
52
|
|
|
40
53
|
interface AuthContextValue {
|
|
41
54
|
isAuthenticated: boolean;
|
|
@@ -261,4 +274,4 @@ declare class SyncDataLayer implements WidgetDataLayer {
|
|
|
261
274
|
markTaskDone(taskId: string): Promise<void>;
|
|
262
275
|
}
|
|
263
276
|
|
|
264
|
-
export { AuthProvider, type ContentMap, FeedbackWidget, type FeedbackWidgetProps, FramedAPIClient, type FramedAPIConfig, FramedProvider, type FramedProviderConfig, type FramedProviderProps, type FrameworkInfo, LocalDataLayer, type NavigationItem, type PromptOptions, type SiteContext, type SitePageInfo, type SitePatterns, SyncDataLayer, TasksReadyPanel, type TasksReadyPanelProps, type TasksResponse, type UploadResponse, type UseFramedTasksResult, type ValidationResult, copyPromptToClipboard, generateAIPrompt, scanSiteContext, useAuth, useFramed, useFramedTasks };
|
|
277
|
+
export { AuthProvider, type ContentMap, FeedbackWidget, type FeedbackWidgetProps, FramedAPIClient, type FramedAPIConfig, FramedProvider, type FramedProviderConfig, type FramedProviderProps, type FrameworkInfo, LocalDataLayer, type NavigationItem, type PromptOptions, type SiteContext, type SitePageInfo, type SitePatterns, SyncDataLayer, TasksReadyPanel, type TasksReadyPanelProps, type TasksResponse, type UploadResponse, type UseFramedTasksResult, type ValidationResult, copyPromptToClipboard, generateAIPrompt, scanSiteContext, useAuth, useFramed, useFramedCallbacks, useFramedTasks, useHasAIFeatures };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FramedConfig, Session, WidgetDataLayer, Task, LimitStatus, WidgetFeatures, AuthConfig, FeedbackComment, TaskStatus, SyncResult } from '@framed/core';
|
|
2
|
-
export { AIConfig, AnnotationData, AnnotationMode, Assignment, Attachment, AuthConfig, AuthMode, Comment, ElementInfo, FeedbackComment, FeedbackInfo, FramedConfig, LimitStatus, Mention, PageInfo, PendingAttachment, Position, Session, SyncConfig, SyncResult, Task, TaskInfo, TaskStatus, TaskType, UsageLimits, ViewportMode, WidgetConfig, WidgetDataLayer, WidgetFeatures } from '@framed/core';
|
|
1
|
+
import { FramedConfig, Session, WidgetDataLayer, SupabaseClient, FramedApiClient, WizardCallbacks, Task, LimitStatus, WidgetFeatures, AuthConfig, FeedbackComment, TaskStatus, SyncResult } from '@framed/core';
|
|
2
|
+
export { AIConfig, AIFeatureResult, AnnotationData, AnnotationMode, Assignment, Attachment, AuthConfig, AuthMode, Comment, ElementInfo, FeedbackComment, FeedbackInfo, FramedApiClient, FramedConfig, LimitStatus, Mention, PageInfo, PendingAttachment, Position, SDKConfig, Session, SyncConfig, SyncResult, Task, TaskInfo, TaskStatus, TaskType, TranslationResult, UploadResult, UsageLimits, ViewportMode, WidgetConfig, WidgetDataLayer, WidgetFeatures, WizardCallbacks, createWizardCallbacks, getUserSupabase, initUserSupabase, isSupabaseInitialized, translateContent, uploadFile, uploadFont, uploadLogo } from '@framed/core';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
@@ -19,6 +19,10 @@ interface FramedContextValue {
|
|
|
19
19
|
login: () => void;
|
|
20
20
|
logout: () => void;
|
|
21
21
|
dataLayer: WidgetDataLayer;
|
|
22
|
+
supabase: SupabaseClient | null;
|
|
23
|
+
framedApi: FramedApiClient;
|
|
24
|
+
hasAIFeatures: boolean;
|
|
25
|
+
callbacks: WizardCallbacks;
|
|
22
26
|
tasks: Task[];
|
|
23
27
|
openTasks: Task[];
|
|
24
28
|
isTasksLoading: boolean;
|
|
@@ -36,6 +40,15 @@ interface FramedProviderProps {
|
|
|
36
40
|
}
|
|
37
41
|
declare function FramedProvider({ config, children }: FramedProviderProps): react_jsx_runtime.JSX.Element;
|
|
38
42
|
declare function useFramed(): FramedContextValue;
|
|
43
|
+
/**
|
|
44
|
+
* Convenience hook to get just the wizard callbacks.
|
|
45
|
+
* Use this in wizard components that need file upload or translation.
|
|
46
|
+
*/
|
|
47
|
+
declare function useFramedCallbacks(): WizardCallbacks;
|
|
48
|
+
/**
|
|
49
|
+
* Hook to check if AI features are available.
|
|
50
|
+
*/
|
|
51
|
+
declare function useHasAIFeatures(): boolean;
|
|
39
52
|
|
|
40
53
|
interface AuthContextValue {
|
|
41
54
|
isAuthenticated: boolean;
|
|
@@ -261,4 +274,4 @@ declare class SyncDataLayer implements WidgetDataLayer {
|
|
|
261
274
|
markTaskDone(taskId: string): Promise<void>;
|
|
262
275
|
}
|
|
263
276
|
|
|
264
|
-
export { AuthProvider, type ContentMap, FeedbackWidget, type FeedbackWidgetProps, FramedAPIClient, type FramedAPIConfig, FramedProvider, type FramedProviderConfig, type FramedProviderProps, type FrameworkInfo, LocalDataLayer, type NavigationItem, type PromptOptions, type SiteContext, type SitePageInfo, type SitePatterns, SyncDataLayer, TasksReadyPanel, type TasksReadyPanelProps, type TasksResponse, type UploadResponse, type UseFramedTasksResult, type ValidationResult, copyPromptToClipboard, generateAIPrompt, scanSiteContext, useAuth, useFramed, useFramedTasks };
|
|
277
|
+
export { AuthProvider, type ContentMap, FeedbackWidget, type FeedbackWidgetProps, FramedAPIClient, type FramedAPIConfig, FramedProvider, type FramedProviderConfig, type FramedProviderProps, type FrameworkInfo, LocalDataLayer, type NavigationItem, type PromptOptions, type SiteContext, type SitePageInfo, type SitePatterns, SyncDataLayer, TasksReadyPanel, type TasksReadyPanelProps, type TasksResponse, type UploadResponse, type UseFramedTasksResult, type ValidationResult, copyPromptToClipboard, generateAIPrompt, scanSiteContext, useAuth, useFramed, useFramedCallbacks, useFramedTasks, useHasAIFeatures };
|