@howone/sdk 0.1.27 → 0.1.28
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.d.mts +54 -1
- package/dist/index.d.ts +54 -1
- package/dist/index.js +1059 -827
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1055 -827
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -575,10 +575,63 @@ declare const ClayxToast: {
|
|
|
575
575
|
default: (params: ToastParams) => void;
|
|
576
576
|
};
|
|
577
577
|
|
|
578
|
+
interface SourceLocation {
|
|
579
|
+
file: string;
|
|
580
|
+
line: number;
|
|
581
|
+
component: string;
|
|
582
|
+
}
|
|
583
|
+
interface ElementSelectionData {
|
|
584
|
+
sourceLocation: SourceLocation | null;
|
|
585
|
+
element: {
|
|
586
|
+
tagName: string;
|
|
587
|
+
className: string;
|
|
588
|
+
id: string;
|
|
589
|
+
text: string;
|
|
590
|
+
};
|
|
591
|
+
rect: {
|
|
592
|
+
top: number;
|
|
593
|
+
left: number;
|
|
594
|
+
width: number;
|
|
595
|
+
height: number;
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
interface ElementSelectorProps {
|
|
599
|
+
active: boolean;
|
|
600
|
+
onSelect?: (data: ElementSelectionData) => void;
|
|
601
|
+
onCancel?: () => void;
|
|
602
|
+
}
|
|
603
|
+
declare const ElementSelector: React$1.FC<ElementSelectorProps>;
|
|
604
|
+
|
|
605
|
+
interface ElementSelectorProviderProps {
|
|
606
|
+
children: React$1.ReactNode;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* 元素选择器提供者组件
|
|
610
|
+
* 监听来自 iframe.js 的自定义事件,自动显示/隐藏元素选择器
|
|
611
|
+
*/
|
|
612
|
+
declare const ElementSelectorProvider: React$1.FC<ElementSelectorProviderProps>;
|
|
613
|
+
|
|
578
614
|
declare function useIsMobile(): boolean;
|
|
579
615
|
|
|
580
616
|
declare function useDebounce<T>(value: T, delay: number): T;
|
|
581
617
|
|
|
618
|
+
interface UseElementSelectorReturn {
|
|
619
|
+
isSelecting: boolean;
|
|
620
|
+
selectedElement: ElementSelectionData | null;
|
|
621
|
+
startSelecting: () => void;
|
|
622
|
+
stopSelecting: () => void;
|
|
623
|
+
clearSelection: () => void;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* 元素选择器 Hook
|
|
627
|
+
* 用于管理元素选择状态和向父窗口发送消息
|
|
628
|
+
*/
|
|
629
|
+
declare function useElementSelector(): UseElementSelectorReturn;
|
|
630
|
+
/**
|
|
631
|
+
* 向父窗口发送元素选择数据
|
|
632
|
+
*/
|
|
633
|
+
declare function sendElementSelectionToParent(data: ElementSelectionData): void;
|
|
634
|
+
|
|
582
635
|
/**
|
|
583
636
|
* 错误处理模块 - 核心类型定义
|
|
584
637
|
*
|
|
@@ -867,4 +920,4 @@ declare class SimpleErrorHandler {
|
|
|
867
920
|
captureError(error: Error, details?: any): void;
|
|
868
921
|
}
|
|
869
922
|
|
|
870
|
-
export { type AIWorkflowClientOptions, type AIWorkflowResponse, AUTH_ROOT, AUTH_TOKEN_KEY, type AccessContext, type Artifact, type ArtifactCreateInput, type ArtifactListQuery, type AxiosAIWorkflowOptions, ClayxToast, DEFAULT_SELECTOR_CONFIG, DefaultErrorFallback, ERROR_CONFIG, type EmailLoginRequest, type EmailLoginResponse, type EnhancedErrorConfig, ErrorBoundary, ErrorHandler, type ErrorPayload, type ErrorSeverity, type ErrorStats, type ErrorType, FloatingButton, GLOBAL_CONFIG, GlobalToastContainer, HowOneProvider, type HowOneProviderProps, Loading, LoadingSpinner, LoginForm, type MessageType, type SelectorState, type SendCodeRequest, type SendCodeResponse, type SimpleErrorConfig, SimpleErrorHandler, ThemeProvider, ThemeToggle, type UserInteraction, type ViewInfo, type Visibility, aiRequest, aiWorkflow, canAccessArtifact, createAIWorkflowClient, createAIWorkflowClientAxios, createArtifactsClient, createClient, getAuthRoot, getCodeStatus, getDefaultProjectId, getToken, howone, isTokenValid, loginWithEmailCode, onAuthStateChanged, parseUserFromToken, request, sendEmailVerificationCode, setAuthRoot, setDefaultProjectId, setToken, unifiedAuth, unifiedOAuth, useAuth, useDebounce, useHowoneContext, useIsMobile, useTheme, workflowRequest };
|
|
923
|
+
export { type AIWorkflowClientOptions, type AIWorkflowResponse, AUTH_ROOT, AUTH_TOKEN_KEY, type AccessContext, type Artifact, type ArtifactCreateInput, type ArtifactListQuery, type AxiosAIWorkflowOptions, ClayxToast, DEFAULT_SELECTOR_CONFIG, DefaultErrorFallback, ERROR_CONFIG, type ElementSelectionData, ElementSelector, ElementSelectorProvider, type EmailLoginRequest, type EmailLoginResponse, type EnhancedErrorConfig, ErrorBoundary, ErrorHandler, type ErrorPayload, type ErrorSeverity, type ErrorStats, type ErrorType, FloatingButton, GLOBAL_CONFIG, GlobalToastContainer, HowOneProvider, type HowOneProviderProps, Loading, LoadingSpinner, LoginForm, type MessageType, type SelectorState, type SendCodeRequest, type SendCodeResponse, type SimpleErrorConfig, SimpleErrorHandler, type SourceLocation, ThemeProvider, ThemeToggle, type UseElementSelectorReturn, type UserInteraction, type ViewInfo, type Visibility, aiRequest, aiWorkflow, canAccessArtifact, createAIWorkflowClient, createAIWorkflowClientAxios, createArtifactsClient, createClient, getAuthRoot, getCodeStatus, getDefaultProjectId, getToken, howone, isTokenValid, loginWithEmailCode, onAuthStateChanged, parseUserFromToken, request, sendElementSelectionToParent, sendEmailVerificationCode, setAuthRoot, setDefaultProjectId, setToken, unifiedAuth, unifiedOAuth, useAuth, useDebounce, useElementSelector, useHowoneContext, useIsMobile, useTheme, workflowRequest };
|
package/dist/index.d.ts
CHANGED
|
@@ -575,10 +575,63 @@ declare const ClayxToast: {
|
|
|
575
575
|
default: (params: ToastParams) => void;
|
|
576
576
|
};
|
|
577
577
|
|
|
578
|
+
interface SourceLocation {
|
|
579
|
+
file: string;
|
|
580
|
+
line: number;
|
|
581
|
+
component: string;
|
|
582
|
+
}
|
|
583
|
+
interface ElementSelectionData {
|
|
584
|
+
sourceLocation: SourceLocation | null;
|
|
585
|
+
element: {
|
|
586
|
+
tagName: string;
|
|
587
|
+
className: string;
|
|
588
|
+
id: string;
|
|
589
|
+
text: string;
|
|
590
|
+
};
|
|
591
|
+
rect: {
|
|
592
|
+
top: number;
|
|
593
|
+
left: number;
|
|
594
|
+
width: number;
|
|
595
|
+
height: number;
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
interface ElementSelectorProps {
|
|
599
|
+
active: boolean;
|
|
600
|
+
onSelect?: (data: ElementSelectionData) => void;
|
|
601
|
+
onCancel?: () => void;
|
|
602
|
+
}
|
|
603
|
+
declare const ElementSelector: React$1.FC<ElementSelectorProps>;
|
|
604
|
+
|
|
605
|
+
interface ElementSelectorProviderProps {
|
|
606
|
+
children: React$1.ReactNode;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* 元素选择器提供者组件
|
|
610
|
+
* 监听来自 iframe.js 的自定义事件,自动显示/隐藏元素选择器
|
|
611
|
+
*/
|
|
612
|
+
declare const ElementSelectorProvider: React$1.FC<ElementSelectorProviderProps>;
|
|
613
|
+
|
|
578
614
|
declare function useIsMobile(): boolean;
|
|
579
615
|
|
|
580
616
|
declare function useDebounce<T>(value: T, delay: number): T;
|
|
581
617
|
|
|
618
|
+
interface UseElementSelectorReturn {
|
|
619
|
+
isSelecting: boolean;
|
|
620
|
+
selectedElement: ElementSelectionData | null;
|
|
621
|
+
startSelecting: () => void;
|
|
622
|
+
stopSelecting: () => void;
|
|
623
|
+
clearSelection: () => void;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* 元素选择器 Hook
|
|
627
|
+
* 用于管理元素选择状态和向父窗口发送消息
|
|
628
|
+
*/
|
|
629
|
+
declare function useElementSelector(): UseElementSelectorReturn;
|
|
630
|
+
/**
|
|
631
|
+
* 向父窗口发送元素选择数据
|
|
632
|
+
*/
|
|
633
|
+
declare function sendElementSelectionToParent(data: ElementSelectionData): void;
|
|
634
|
+
|
|
582
635
|
/**
|
|
583
636
|
* 错误处理模块 - 核心类型定义
|
|
584
637
|
*
|
|
@@ -867,4 +920,4 @@ declare class SimpleErrorHandler {
|
|
|
867
920
|
captureError(error: Error, details?: any): void;
|
|
868
921
|
}
|
|
869
922
|
|
|
870
|
-
export { type AIWorkflowClientOptions, type AIWorkflowResponse, AUTH_ROOT, AUTH_TOKEN_KEY, type AccessContext, type Artifact, type ArtifactCreateInput, type ArtifactListQuery, type AxiosAIWorkflowOptions, ClayxToast, DEFAULT_SELECTOR_CONFIG, DefaultErrorFallback, ERROR_CONFIG, type EmailLoginRequest, type EmailLoginResponse, type EnhancedErrorConfig, ErrorBoundary, ErrorHandler, type ErrorPayload, type ErrorSeverity, type ErrorStats, type ErrorType, FloatingButton, GLOBAL_CONFIG, GlobalToastContainer, HowOneProvider, type HowOneProviderProps, Loading, LoadingSpinner, LoginForm, type MessageType, type SelectorState, type SendCodeRequest, type SendCodeResponse, type SimpleErrorConfig, SimpleErrorHandler, ThemeProvider, ThemeToggle, type UserInteraction, type ViewInfo, type Visibility, aiRequest, aiWorkflow, canAccessArtifact, createAIWorkflowClient, createAIWorkflowClientAxios, createArtifactsClient, createClient, getAuthRoot, getCodeStatus, getDefaultProjectId, getToken, howone, isTokenValid, loginWithEmailCode, onAuthStateChanged, parseUserFromToken, request, sendEmailVerificationCode, setAuthRoot, setDefaultProjectId, setToken, unifiedAuth, unifiedOAuth, useAuth, useDebounce, useHowoneContext, useIsMobile, useTheme, workflowRequest };
|
|
923
|
+
export { type AIWorkflowClientOptions, type AIWorkflowResponse, AUTH_ROOT, AUTH_TOKEN_KEY, type AccessContext, type Artifact, type ArtifactCreateInput, type ArtifactListQuery, type AxiosAIWorkflowOptions, ClayxToast, DEFAULT_SELECTOR_CONFIG, DefaultErrorFallback, ERROR_CONFIG, type ElementSelectionData, ElementSelector, ElementSelectorProvider, type EmailLoginRequest, type EmailLoginResponse, type EnhancedErrorConfig, ErrorBoundary, ErrorHandler, type ErrorPayload, type ErrorSeverity, type ErrorStats, type ErrorType, FloatingButton, GLOBAL_CONFIG, GlobalToastContainer, HowOneProvider, type HowOneProviderProps, Loading, LoadingSpinner, LoginForm, type MessageType, type SelectorState, type SendCodeRequest, type SendCodeResponse, type SimpleErrorConfig, SimpleErrorHandler, type SourceLocation, ThemeProvider, ThemeToggle, type UseElementSelectorReturn, type UserInteraction, type ViewInfo, type Visibility, aiRequest, aiWorkflow, canAccessArtifact, createAIWorkflowClient, createAIWorkflowClientAxios, createArtifactsClient, createClient, getAuthRoot, getCodeStatus, getDefaultProjectId, getToken, howone, isTokenValid, loginWithEmailCode, onAuthStateChanged, parseUserFromToken, request, sendElementSelectionToParent, sendEmailVerificationCode, setAuthRoot, setDefaultProjectId, setToken, unifiedAuth, unifiedOAuth, useAuth, useDebounce, useElementSelector, useHowoneContext, useIsMobile, useTheme, workflowRequest };
|