@voxket-ai/voxket-live 1.0.124 → 1.0.126
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 +44 -44
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4264 -4269
- package/package.json +1 -1
- package/dist/lib/browser-utils.d.ts +0 -90
- package/dist/ssr.d.ts +0 -40
package/package.json
CHANGED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser utilities for SSR compatibility
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Check if code is running in a browser environment
|
|
6
|
-
*/
|
|
7
|
-
export declare const isBrowser: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Check if document is available
|
|
10
|
-
*/
|
|
11
|
-
export declare const isDocumentAvailable: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Check if navigator is available
|
|
14
|
-
*/
|
|
15
|
-
export declare const isNavigatorAvailable: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Safe access to document
|
|
18
|
-
*/
|
|
19
|
-
export declare const safeDocument: Document | null;
|
|
20
|
-
/**
|
|
21
|
-
* Safe access to window
|
|
22
|
-
*/
|
|
23
|
-
export declare const safeWindow: (Window & typeof globalThis) | null;
|
|
24
|
-
/**
|
|
25
|
-
* Safe access to navigator
|
|
26
|
-
*/
|
|
27
|
-
export declare const safeNavigator: Navigator | null;
|
|
28
|
-
/**
|
|
29
|
-
* Execute function only in browser environment
|
|
30
|
-
*/
|
|
31
|
-
export declare const onlyInBrowser: <T>(fn: () => T, fallback?: T) => T | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* Get element by ID safely
|
|
34
|
-
*/
|
|
35
|
-
export declare const getElementById: (id: string) => HTMLElement | null;
|
|
36
|
-
/**
|
|
37
|
-
* Query selector safely
|
|
38
|
-
*/
|
|
39
|
-
export declare const querySelector: (selector: string) => Element | null;
|
|
40
|
-
/**
|
|
41
|
-
* Query selector all safely
|
|
42
|
-
*/
|
|
43
|
-
export declare const querySelectorAll: (selector: string) => NodeListOf<Element> | [];
|
|
44
|
-
/**
|
|
45
|
-
* Create element safely
|
|
46
|
-
*/
|
|
47
|
-
export declare const createElement: (tagName: string) => HTMLElement | null;
|
|
48
|
-
/**
|
|
49
|
-
* Add event listener safely
|
|
50
|
-
*/
|
|
51
|
-
export declare const addEventListener: (element: Element | Window | null, event: string, handler: EventListener, options?: boolean | AddEventListenerOptions) => void;
|
|
52
|
-
/**
|
|
53
|
-
* Remove event listener safely
|
|
54
|
-
*/
|
|
55
|
-
export declare const removeEventListener: (element: Element | Window | null, event: string, handler: EventListener, options?: boolean | EventListenerOptions) => void;
|
|
56
|
-
/**
|
|
57
|
-
* Get user agent safely
|
|
58
|
-
*/
|
|
59
|
-
export declare const getUserAgent: () => string;
|
|
60
|
-
/**
|
|
61
|
-
* Check if device is touch enabled
|
|
62
|
-
*/
|
|
63
|
-
export declare const isTouchDevice: () => boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Get viewport dimensions safely
|
|
66
|
-
*/
|
|
67
|
-
export declare const getViewportDimensions: () => {
|
|
68
|
-
width: number;
|
|
69
|
-
height: number;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Request fullscreen safely
|
|
73
|
-
*/
|
|
74
|
-
export declare const requestFullscreen: (element?: Element) => Promise<void> | null;
|
|
75
|
-
/**
|
|
76
|
-
* Exit fullscreen safely
|
|
77
|
-
*/
|
|
78
|
-
export declare const exitFullscreen: () => Promise<void> | null;
|
|
79
|
-
/**
|
|
80
|
-
* Check if currently in fullscreen mode
|
|
81
|
-
*/
|
|
82
|
-
export declare const isFullscreen: () => boolean;
|
|
83
|
-
/**
|
|
84
|
-
* Set body styles safely
|
|
85
|
-
*/
|
|
86
|
-
export declare const setBodyStyle: (styles: Partial<CSSStyleDeclaration>) => void;
|
|
87
|
-
/**
|
|
88
|
-
* Get media devices safely
|
|
89
|
-
*/
|
|
90
|
-
export declare const getMediaDevices: () => MediaDevices | null;
|
package/dist/ssr.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { VoxketWidgetProps } from './components/widget';
|
|
2
|
-
import { VoxketClientConfig } from './core/client';
|
|
3
|
-
/**
|
|
4
|
-
* SSR-safe exports for Next.js and other SSR frameworks
|
|
5
|
-
*
|
|
6
|
-
* Use these components when you need SSR compatibility:
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* // In Next.js pages or app directory
|
|
10
|
-
* import { VoxketWidgetSSR } from 'voxket-web-sdk/ssr';
|
|
11
|
-
*
|
|
12
|
-
* export default function MyPage() {
|
|
13
|
-
* return <VoxketWidgetSSR agentId="your-agent-id" />;
|
|
14
|
-
* }
|
|
15
|
-
*/
|
|
16
|
-
import * as React from 'react';
|
|
17
|
-
/**
|
|
18
|
-
* SSR-safe VoxketWidget that only renders on the client-side
|
|
19
|
-
*/
|
|
20
|
-
export declare const VoxketWidgetSSR: React.FC<VoxketWidgetProps>;
|
|
21
|
-
/**
|
|
22
|
-
* SSR-safe VoxketClient that only initializes on the client-side
|
|
23
|
-
*/
|
|
24
|
-
export declare class VoxketClientSSR {
|
|
25
|
-
private client;
|
|
26
|
-
private config;
|
|
27
|
-
constructor(config: VoxketClientConfig);
|
|
28
|
-
initialize(): Promise<any>;
|
|
29
|
-
getClient(): any;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Hook for SSR-safe VoxketClient
|
|
33
|
-
*/
|
|
34
|
-
export declare function useVoxketClientSSR(config: VoxketClientConfig): {
|
|
35
|
-
client: any;
|
|
36
|
-
isLoading: boolean;
|
|
37
|
-
};
|
|
38
|
-
export type { VoxketWidgetProps, VoxketClientConfig };
|
|
39
|
-
export type { DisplayType, PopupPosition } from './components/widget';
|
|
40
|
-
export type { ThemeType } from './styles';
|