@checkflow/sdk 1.1.0 → 1.1.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 (45) hide show
  1. package/README.md +63 -219
  2. package/dist/chunk-CD33QAA6.mjs +131 -0
  3. package/dist/chunk-CQ56DMFR.mjs +83 -0
  4. package/dist/highlighter-D_wZWHlS.d.mts +71 -0
  5. package/dist/highlighter-D_wZWHlS.d.ts +71 -0
  6. package/dist/highlighter-W4XDALRE.mjs +8 -0
  7. package/dist/index.d.mts +41 -0
  8. package/dist/index.d.ts +38 -20
  9. package/dist/index.js +607 -17221
  10. package/dist/index.mjs +411 -0
  11. package/dist/react.d.mts +28 -0
  12. package/dist/react.d.ts +28 -0
  13. package/dist/react.js +743 -0
  14. package/dist/react.mjs +51 -0
  15. package/dist/screenshot-CUMBPE2T.mjs +12 -0
  16. package/dist/vue.d.mts +26 -0
  17. package/dist/vue.d.ts +26 -0
  18. package/dist/vue.js +744 -0
  19. package/dist/vue.mjs +53 -0
  20. package/package.json +38 -51
  21. package/dist/analytics-tracker.d.ts +0 -112
  22. package/dist/annotation/editor.d.ts +0 -72
  23. package/dist/annotation/index.d.ts +0 -9
  24. package/dist/annotation/styles.d.ts +0 -6
  25. package/dist/annotation/toolbar.d.ts +0 -32
  26. package/dist/annotation/types.d.ts +0 -85
  27. package/dist/api-client.d.ts +0 -76
  28. package/dist/checkflow.css +0 -1
  29. package/dist/checkflow.d.ts +0 -112
  30. package/dist/context-capture.d.ts +0 -42
  31. package/dist/error-capture.d.ts +0 -60
  32. package/dist/index.esm.js +0 -17210
  33. package/dist/index.esm.js.map +0 -1
  34. package/dist/index.js.map +0 -1
  35. package/dist/privacy/detector.d.ts +0 -56
  36. package/dist/privacy/index.d.ts +0 -8
  37. package/dist/privacy/masker.d.ts +0 -43
  38. package/dist/privacy/types.d.ts +0 -54
  39. package/dist/react/index.d.ts +0 -77
  40. package/dist/session-recording-rrweb.d.ts +0 -100
  41. package/dist/session-recording.d.ts +0 -74
  42. package/dist/types.d.ts +0 -299
  43. package/dist/vue/index.d.ts +0 -55
  44. package/dist/widget/Widget.d.ts +0 -98
  45. package/dist/widget/index.d.ts +0 -2
@@ -0,0 +1,8 @@
1
+ import {
2
+ isHighlighting,
3
+ startHighlighting
4
+ } from "./chunk-CD33QAA6.mjs";
5
+ export {
6
+ isHighlighting,
7
+ startHighlighting
8
+ };
@@ -0,0 +1,41 @@
1
+ import { C as CheckflowConfig, F as FeedbackPayload, H as HighlightAnnotation, a as FeedbackResponse } from './highlighter-D_wZWHlS.mjs';
2
+ export { W as WidgetConfig, s as startHighlighting } from './highlighter-D_wZWHlS.mjs';
3
+
4
+ /**
5
+ * Screenshot capture using html2canvas-like approach.
6
+ * Falls back to a simple canvas capture if html2canvas is not available.
7
+ */
8
+ declare function captureScreenshot(): Promise<string | null>;
9
+
10
+ /**
11
+ * Initialize the Checkflow SDK.
12
+ *
13
+ * @example
14
+ * ```js
15
+ * import { init } from '@checkflow/sdk';
16
+ * init({ apiKey: 'ck_live_...', widget: { position: 'bottom-right' } });
17
+ * ```
18
+ */
19
+ declare function init(cfg: CheckflowConfig): void;
20
+ /**
21
+ * Send feedback programmatically.
22
+ */
23
+ declare function sendFeedback(data: Pick<FeedbackPayload, 'title' | 'description' | 'type' | 'priority' | 'screenshot_url'> & {
24
+ screenshot_data?: string;
25
+ annotations?: HighlightAnnotation[];
26
+ }): Promise<FeedbackResponse>;
27
+
28
+ /**
29
+ * Show the feedback widget.
30
+ */
31
+ declare function showWidget(): void;
32
+ /**
33
+ * Hide and remove the feedback widget.
34
+ */
35
+ declare function hideWidget(): void;
36
+ /**
37
+ * Destroy the SDK instance.
38
+ */
39
+ declare function destroy(): void;
40
+
41
+ export { CheckflowConfig, FeedbackPayload, FeedbackResponse, HighlightAnnotation, captureScreenshot, destroy, hideWidget, init, sendFeedback, showWidget };
package/dist/index.d.ts CHANGED
@@ -1,23 +1,41 @@
1
+ import { C as CheckflowConfig, F as FeedbackPayload, H as HighlightAnnotation, a as FeedbackResponse } from './highlighter-D_wZWHlS.js';
2
+ export { W as WidgetConfig, s as startHighlighting } from './highlighter-D_wZWHlS.js';
3
+
1
4
  /**
2
- * CheckFlow SDK
3
- * User feedback collection with automatic context capture
5
+ * Screenshot capture using html2canvas-like approach.
6
+ * Falls back to a simple canvas capture if html2canvas is not available.
7
+ */
8
+ declare function captureScreenshot(): Promise<string | null>;
9
+
10
+ /**
11
+ * Initialize the Checkflow SDK.
4
12
  *
5
- * @packageDocumentation
13
+ * @example
14
+ * ```js
15
+ * import { init } from '@checkflow/sdk';
16
+ * init({ apiKey: 'ck_live_...', widget: { position: 'bottom-right' } });
17
+ * ```
18
+ */
19
+ declare function init(cfg: CheckflowConfig): void;
20
+ /**
21
+ * Send feedback programmatically.
22
+ */
23
+ declare function sendFeedback(data: Pick<FeedbackPayload, 'title' | 'description' | 'type' | 'priority' | 'screenshot_url'> & {
24
+ screenshot_data?: string;
25
+ annotations?: HighlightAnnotation[];
26
+ }): Promise<FeedbackResponse>;
27
+
28
+ /**
29
+ * Show the feedback widget.
30
+ */
31
+ declare function showWidget(): void;
32
+ /**
33
+ * Hide and remove the feedback widget.
34
+ */
35
+ declare function hideWidget(): void;
36
+ /**
37
+ * Destroy the SDK instance.
6
38
  */
7
- export { CheckFlow, createCheckFlow } from './checkflow';
8
- export { APIClient } from './api-client';
9
- export { ContextCapture, captureScreenshot, capturePageContext, capturePerformance } from './context-capture';
10
- export { ErrorCapture } from './error-capture';
11
- export { FeedbackWidget } from './widget';
12
- export { SessionRecording } from './session-recording';
13
- export { AnnotationEditor, AnnotationToolbar, injectAnnotationStyles, removeAnnotationStyles, } from './annotation';
14
- export { PrivacyMasker, PrivacyDetector, PATTERNS as PRIVACY_PATTERNS, DEFAULT_PRIVACY_CONFIG, } from './privacy';
15
- export type { PrivacyConfig, AutoMaskConfig, CustomPattern, MaskResult, Detection as PrivacyDetection, DetectionType, DOMPrivacyResult, DOMDetection, } from './privacy';
16
- export type { AnnotationToolType, Point, Bounds, AnnotationStyle, Annotation as AnnotationData, RectangleAnnotation, EllipseAnnotation, ArrowAnnotation, LineAnnotation, HighlightAnnotation, BlurAnnotation, TextAnnotation, FreehandAnnotation, AnnotationEditorConfig, } from './annotation';
17
- export { DEFAULT_STYLE, HIGHLIGHT_STYLE, BLUR_STYLE, COLOR_PALETTE, STROKE_WIDTHS, } from './annotation';
18
- export type { CheckFlowOptions, UserInfo, FeedbackData, FeedbackType, FeedbackPriority, Annotation, CaptureOptions, CaptureResult, ConsoleEntry, NetworkEntry, PerformanceMetrics, PageContext, ErrorInfo, SubmitResult, APIResponse, WidgetConfig, WidgetState, Translations, } from './types';
19
- export { DEFAULT_TRANSLATIONS, TRANSLATIONS } from './types';
20
- export { CheckFlowProvider, useCheckFlow, useFeedbackForm, CheckFlowErrorBoundary, withCheckFlow, withErrorBoundary, FeedbackButton, } from './react';
21
- export declare const VERSION = "1.0.0";
22
- import { CheckFlow } from './checkflow';
23
- export default CheckFlow;
39
+ declare function destroy(): void;
40
+
41
+ export { CheckflowConfig, FeedbackPayload, FeedbackResponse, HighlightAnnotation, captureScreenshot, destroy, hideWidget, init, sendFeedback, showWidget };