@perspective-ai/sdk-react 1.0.0-alpha.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.
package/src/index.ts ADDED
@@ -0,0 +1,52 @@
1
+ "use client";
2
+
3
+ /**
4
+ * Perspective Embed SDK - React Components
5
+ *
6
+ * Usage:
7
+ * import { Widget, PopupButton, SliderButton, FloatBubble } from '@perspective-ai/sdk-react';
8
+ *
9
+ * // Inline widget
10
+ * <Widget researchId="xxx" onReady={() => {}} />
11
+ *
12
+ * // Popup button
13
+ * <PopupButton researchId="xxx">Take the interview</PopupButton>
14
+ *
15
+ * // Slider button
16
+ * <SliderButton researchId="xxx">Open Interview</SliderButton>
17
+ *
18
+ * // Floating bubble
19
+ * <FloatBubble researchId="xxx" />
20
+ *
21
+ * // Full page
22
+ * <Fullpage researchId="xxx" />
23
+ */
24
+
25
+ // Components
26
+ export { Widget, type WidgetProps } from "./Widget";
27
+ export {
28
+ PopupButton,
29
+ type PopupButtonProps,
30
+ type PopupButtonHandle,
31
+ } from "./PopupButton";
32
+ export {
33
+ SliderButton,
34
+ type SliderButtonProps,
35
+ type SliderButtonHandle,
36
+ } from "./SliderButton";
37
+ export { FloatBubble, type FloatBubbleProps } from "./FloatBubble";
38
+ export { Fullpage, type FullpageProps } from "./Fullpage";
39
+
40
+ // Hooks
41
+ export { useThemeSync } from "./hooks/useThemeSync";
42
+ export { useStableCallback } from "./hooks/useStableCallback";
43
+
44
+ // Re-export types from core package for convenience
45
+ export type {
46
+ EmbedConfig,
47
+ EmbedHandle,
48
+ FloatHandle,
49
+ BrandColors,
50
+ ThemeValue,
51
+ EmbedError,
52
+ } from "@perspective-ai/sdk";