@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
package/dist/react.mjs ADDED
@@ -0,0 +1,51 @@
1
+ // src/react.ts
2
+ var _initialized = false;
3
+ function useCheckflowInit(config) {
4
+ if (typeof window === "undefined") return;
5
+ if (_initialized) return;
6
+ _initialized = true;
7
+ import("./index.mjs").then(({ init }) => {
8
+ init(config);
9
+ });
10
+ }
11
+ function useCheckflowFeedback() {
12
+ return {
13
+ send: async (data) => {
14
+ if (typeof window === "undefined") return { success: false, error: { message: "Not in browser", code: "SSR" } };
15
+ const { sendFeedback } = await import("./index.mjs");
16
+ return sendFeedback(data);
17
+ },
18
+ screenshot: async () => {
19
+ if (typeof window === "undefined") return null;
20
+ const { captureScreenshot } = await import("./screenshot-CUMBPE2T.mjs");
21
+ return captureScreenshot();
22
+ },
23
+ highlight: async () => {
24
+ if (typeof window === "undefined") return [];
25
+ const { startHighlighting } = await import("./highlighter-W4XDALRE.mjs");
26
+ return startHighlighting();
27
+ },
28
+ show: async () => {
29
+ if (typeof window === "undefined") return;
30
+ const { showWidget } = await import("./index.mjs");
31
+ showWidget();
32
+ },
33
+ hide: async () => {
34
+ if (typeof window === "undefined") return;
35
+ const { hideWidget } = await import("./index.mjs");
36
+ hideWidget();
37
+ }
38
+ };
39
+ }
40
+ function destroyCheckflow() {
41
+ if (typeof window === "undefined") return;
42
+ import("./index.mjs").then(({ destroy }) => {
43
+ destroy();
44
+ _initialized = false;
45
+ });
46
+ }
47
+ export {
48
+ destroyCheckflow,
49
+ useCheckflowFeedback,
50
+ useCheckflowInit
51
+ };
@@ -0,0 +1,12 @@
1
+ import {
2
+ captureScreenshot,
3
+ clearScreenshot,
4
+ getLastScreenshot,
5
+ loadHtml2Canvas
6
+ } from "./chunk-CQ56DMFR.mjs";
7
+ export {
8
+ captureScreenshot,
9
+ clearScreenshot,
10
+ getLastScreenshot,
11
+ loadHtml2Canvas
12
+ };
package/dist/vue.d.mts ADDED
@@ -0,0 +1,26 @@
1
+ import { C as CheckflowConfig, a as FeedbackResponse, H as HighlightAnnotation } from './highlighter-D_wZWHlS.mjs';
2
+
3
+ /**
4
+ * Vue 3 plugin factory.
5
+ */
6
+ declare function createCheckflowPlugin(config: CheckflowConfig): {
7
+ install(): void;
8
+ };
9
+ /**
10
+ * Composable for Vue 3 components.
11
+ */
12
+ declare function useCheckflow(): {
13
+ send: (data: {
14
+ title: string;
15
+ description?: string;
16
+ type?: string;
17
+ priority?: string;
18
+ }) => Promise<FeedbackResponse>;
19
+ screenshot: () => Promise<string | null>;
20
+ highlight: () => Promise<HighlightAnnotation[]>;
21
+ show: () => Promise<void>;
22
+ hide: () => Promise<void>;
23
+ destroy: () => Promise<void>;
24
+ };
25
+
26
+ export { createCheckflowPlugin, useCheckflow };
package/dist/vue.d.ts ADDED
@@ -0,0 +1,26 @@
1
+ import { C as CheckflowConfig, a as FeedbackResponse, H as HighlightAnnotation } from './highlighter-D_wZWHlS.js';
2
+
3
+ /**
4
+ * Vue 3 plugin factory.
5
+ */
6
+ declare function createCheckflowPlugin(config: CheckflowConfig): {
7
+ install(): void;
8
+ };
9
+ /**
10
+ * Composable for Vue 3 components.
11
+ */
12
+ declare function useCheckflow(): {
13
+ send: (data: {
14
+ title: string;
15
+ description?: string;
16
+ type?: string;
17
+ priority?: string;
18
+ }) => Promise<FeedbackResponse>;
19
+ screenshot: () => Promise<string | null>;
20
+ highlight: () => Promise<HighlightAnnotation[]>;
21
+ show: () => Promise<void>;
22
+ hide: () => Promise<void>;
23
+ destroy: () => Promise<void>;
24
+ };
25
+
26
+ export { createCheckflowPlugin, useCheckflow };