@kharko/dozor-react 0.1.0

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 ADDED
@@ -0,0 +1,112 @@
1
+ "use client";
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var index_exports = {};
23
+ __export(index_exports, {
24
+ DozorProvider: () => DozorProvider,
25
+ useDozor: () => useDozor
26
+ });
27
+ module.exports = __toCommonJS(index_exports);
28
+
29
+ // src/dozor-context.tsx
30
+ var import_react = require("react");
31
+ var import_dozor = require("@kharko/dozor");
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ var DozorContext = (0, import_react.createContext)(null);
34
+ function DozorProvider({ options, children }) {
35
+ const instanceRef = (0, import_react.useRef)(null);
36
+ const [state, setState] = (0, import_react.useState)("not_initialized");
37
+ const [sessionId, setSessionId] = (0, import_react.useState)(null);
38
+ const syncState = (0, import_react.useCallback)(() => {
39
+ const d = instanceRef.current;
40
+ if (!d) {
41
+ setState("not_initialized");
42
+ setSessionId(null);
43
+ return;
44
+ }
45
+ setState(d.state);
46
+ setSessionId(d.sessionId);
47
+ }, []);
48
+ const init = (0, import_react.useCallback)(
49
+ (opts) => {
50
+ if (instanceRef.current) return;
51
+ instanceRef.current = import_dozor.Dozor.init(opts);
52
+ syncState();
53
+ },
54
+ [syncState]
55
+ );
56
+ const start = (0, import_react.useCallback)(() => {
57
+ instanceRef.current?.start();
58
+ syncState();
59
+ }, [syncState]);
60
+ const pause = (0, import_react.useCallback)(() => {
61
+ instanceRef.current?.pause();
62
+ syncState();
63
+ }, [syncState]);
64
+ const resume = (0, import_react.useCallback)(() => {
65
+ instanceRef.current?.resume();
66
+ syncState();
67
+ }, [syncState]);
68
+ const stop = (0, import_react.useCallback)(() => {
69
+ instanceRef.current?.stop();
70
+ instanceRef.current = null;
71
+ syncState();
72
+ }, [syncState]);
73
+ const cancel = (0, import_react.useCallback)(() => {
74
+ instanceRef.current?.cancel();
75
+ instanceRef.current = null;
76
+ syncState();
77
+ }, [syncState]);
78
+ (0, import_react.useEffect)(() => {
79
+ if (options && !instanceRef.current) {
80
+ init(options);
81
+ }
82
+ }, []);
83
+ const value = {
84
+ state,
85
+ sessionId,
86
+ isRecording: state === "recording",
87
+ isPaused: state === "paused",
88
+ init,
89
+ start,
90
+ pause,
91
+ resume,
92
+ stop,
93
+ cancel
94
+ };
95
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DozorContext.Provider, { value, children });
96
+ }
97
+
98
+ // src/use-dozor.ts
99
+ var import_react2 = require("react");
100
+ function useDozor() {
101
+ const ctx = (0, import_react2.useContext)(DozorContext);
102
+ if (!ctx) {
103
+ throw new Error("useDozor must be used within a <DozorProvider>");
104
+ }
105
+ return ctx;
106
+ }
107
+ // Annotate the CommonJS export names for ESM import in node:
108
+ 0 && (module.exports = {
109
+ DozorProvider,
110
+ useDozor
111
+ });
112
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/dozor-context.tsx","../src/use-dozor.ts"],"sourcesContent":["export { DozorProvider } from \"./dozor-context.js\";\nexport { useDozor } from \"./use-dozor.js\";\nexport type { DozorContextValue, DozorContextState } from \"./dozor-context.js\";\n","import { createContext, useCallback, useRef, useState, useEffect, type ReactNode } from \"react\";\nimport { Dozor } from \"@kharko/dozor\";\nimport type { DozorOptions, DozorState } from \"@kharko/dozor\";\n\nexport type DozorContextState = DozorState | \"not_initialized\";\n\nexport interface DozorContextValue {\n /** Current lifecycle state. `\"not_initialized\"` when `init()` hasn't been called yet. */\n state: DozorContextState;\n /** Current session ID, or `null` before init. */\n sessionId: string | null;\n /** `true` when actively recording. */\n isRecording: boolean;\n /** `true` when paused via `pause()`. */\n isPaused: boolean;\n\n /** Initialize the Dozor recorder. No-op if already initialized. */\n init: (options: DozorOptions) => void;\n /** Start recording (only when `autoStart: false`). */\n start: () => void;\n /** Pause recording without destroying the session. */\n pause: () => void;\n /** Resume recording after a pause. */\n resume: () => void;\n /** Stop recording, flush remaining events, destroy instance. */\n stop: () => void;\n /** Discard session — drop buffer + delete from server. */\n cancel: () => void;\n}\n\nexport const DozorContext = createContext<DozorContextValue | null>(null);\n\ninterface DozorProviderProps {\n /** Pass options to auto-initialize Dozor on mount. Omit for manual `init()`. */\n options?: DozorOptions;\n children: ReactNode;\n}\n\nexport function DozorProvider({ options, children }: DozorProviderProps) {\n const instanceRef = useRef<Dozor | null>(null);\n\n const [state, setState] = useState<DozorContextState>(\"not_initialized\");\n const [sessionId, setSessionId] = useState<string | null>(null);\n\n /** Read current values from the Dozor instance and sync to React state. */\n const syncState = useCallback(() => {\n const d = instanceRef.current;\n if (!d) {\n setState(\"not_initialized\");\n setSessionId(null);\n return;\n }\n setState(d.state);\n setSessionId(d.sessionId);\n }, []);\n\n const init = useCallback(\n (opts: DozorOptions) => {\n if (instanceRef.current) return;\n instanceRef.current = Dozor.init(opts);\n syncState();\n },\n [syncState],\n );\n\n const start = useCallback(() => {\n instanceRef.current?.start();\n syncState();\n }, [syncState]);\n\n const pause = useCallback(() => {\n instanceRef.current?.pause();\n syncState();\n }, [syncState]);\n\n const resume = useCallback(() => {\n instanceRef.current?.resume();\n syncState();\n }, [syncState]);\n\n const stop = useCallback(() => {\n instanceRef.current?.stop();\n instanceRef.current = null;\n syncState();\n }, [syncState]);\n\n const cancel = useCallback(() => {\n instanceRef.current?.cancel();\n instanceRef.current = null;\n syncState();\n }, [syncState]);\n\n // Auto-init on mount when options are provided\n useEffect(() => {\n if (options && !instanceRef.current) {\n init(options);\n }\n }, []); // eslint-disable-line react-hooks/exhaustive-deps — intentionally run once on mount\n\n const value: DozorContextValue = {\n state,\n sessionId,\n isRecording: state === \"recording\",\n isPaused: state === \"paused\",\n init,\n start,\n pause,\n resume,\n stop,\n cancel,\n };\n\n return <DozorContext.Provider value={value}>{children}</DozorContext.Provider>;\n}\n","import { useContext } from \"react\";\nimport { DozorContext, type DozorContextValue } from \"./dozor-context.js\";\n\n/**\n * Access the Dozor recorder state and controls.\n * Must be used within a `<DozorProvider>`.\n */\nexport function useDozor(): DozorContextValue {\n const ctx = useContext(DozorContext);\n if (!ctx) {\n throw new Error(\"useDozor must be used within a <DozorProvider>\");\n }\n return ctx;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAwF;AACxF,mBAAsB;AA+Gb;AAlFF,IAAM,mBAAe,4BAAwC,IAAI;AAQjE,SAAS,cAAc,EAAE,SAAS,SAAS,GAAuB;AACvE,QAAM,kBAAc,qBAAqB,IAAI;AAE7C,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAA4B,iBAAiB;AACvE,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAwB,IAAI;AAG9D,QAAM,gBAAY,0BAAY,MAAM;AAClC,UAAM,IAAI,YAAY;AACtB,QAAI,CAAC,GAAG;AACN,eAAS,iBAAiB;AAC1B,mBAAa,IAAI;AACjB;AAAA,IACF;AACA,aAAS,EAAE,KAAK;AAChB,iBAAa,EAAE,SAAS;AAAA,EAC1B,GAAG,CAAC,CAAC;AAEL,QAAM,WAAO;AAAA,IACX,CAAC,SAAuB;AACtB,UAAI,YAAY,QAAS;AACzB,kBAAY,UAAU,mBAAM,KAAK,IAAI;AACrC,gBAAU;AAAA,IACZ;AAAA,IACA,CAAC,SAAS;AAAA,EACZ;AAEA,QAAM,YAAQ,0BAAY,MAAM;AAC9B,gBAAY,SAAS,MAAM;AAC3B,cAAU;AAAA,EACZ,GAAG,CAAC,SAAS,CAAC;AAEd,QAAM,YAAQ,0BAAY,MAAM;AAC9B,gBAAY,SAAS,MAAM;AAC3B,cAAU;AAAA,EACZ,GAAG,CAAC,SAAS,CAAC;AAEd,QAAM,aAAS,0BAAY,MAAM;AAC/B,gBAAY,SAAS,OAAO;AAC5B,cAAU;AAAA,EACZ,GAAG,CAAC,SAAS,CAAC;AAEd,QAAM,WAAO,0BAAY,MAAM;AAC7B,gBAAY,SAAS,KAAK;AAC1B,gBAAY,UAAU;AACtB,cAAU;AAAA,EACZ,GAAG,CAAC,SAAS,CAAC;AAEd,QAAM,aAAS,0BAAY,MAAM;AAC/B,gBAAY,SAAS,OAAO;AAC5B,gBAAY,UAAU;AACtB,cAAU;AAAA,EACZ,GAAG,CAAC,SAAS,CAAC;AAGd,8BAAU,MAAM;AACd,QAAI,WAAW,CAAC,YAAY,SAAS;AACnC,WAAK,OAAO;AAAA,IACd;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,QAA2B;AAAA,IAC/B;AAAA,IACA;AAAA,IACA,aAAa,UAAU;AAAA,IACvB,UAAU,UAAU;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SAAO,4CAAC,aAAa,UAAb,EAAsB,OAAe,UAAS;AACxD;;;ACjHA,IAAAA,gBAA2B;AAOpB,SAAS,WAA8B;AAC5C,QAAM,UAAM,0BAAW,YAAY;AACnC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI,MAAM,gDAAgD;AAAA,EAClE;AACA,SAAO;AACT;","names":["import_react"]}
@@ -0,0 +1,41 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { DozorState, DozorOptions } from '@kharko/dozor';
4
+
5
+ type DozorContextState = DozorState | "not_initialized";
6
+ interface DozorContextValue {
7
+ /** Current lifecycle state. `"not_initialized"` when `init()` hasn't been called yet. */
8
+ state: DozorContextState;
9
+ /** Current session ID, or `null` before init. */
10
+ sessionId: string | null;
11
+ /** `true` when actively recording. */
12
+ isRecording: boolean;
13
+ /** `true` when paused via `pause()`. */
14
+ isPaused: boolean;
15
+ /** Initialize the Dozor recorder. No-op if already initialized. */
16
+ init: (options: DozorOptions) => void;
17
+ /** Start recording (only when `autoStart: false`). */
18
+ start: () => void;
19
+ /** Pause recording without destroying the session. */
20
+ pause: () => void;
21
+ /** Resume recording after a pause. */
22
+ resume: () => void;
23
+ /** Stop recording, flush remaining events, destroy instance. */
24
+ stop: () => void;
25
+ /** Discard session — drop buffer + delete from server. */
26
+ cancel: () => void;
27
+ }
28
+ interface DozorProviderProps {
29
+ /** Pass options to auto-initialize Dozor on mount. Omit for manual `init()`. */
30
+ options?: DozorOptions;
31
+ children: ReactNode;
32
+ }
33
+ declare function DozorProvider({ options, children }: DozorProviderProps): react_jsx_runtime.JSX.Element;
34
+
35
+ /**
36
+ * Access the Dozor recorder state and controls.
37
+ * Must be used within a `<DozorProvider>`.
38
+ */
39
+ declare function useDozor(): DozorContextValue;
40
+
41
+ export { type DozorContextState, type DozorContextValue, DozorProvider, useDozor };
@@ -0,0 +1,41 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { DozorState, DozorOptions } from '@kharko/dozor';
4
+
5
+ type DozorContextState = DozorState | "not_initialized";
6
+ interface DozorContextValue {
7
+ /** Current lifecycle state. `"not_initialized"` when `init()` hasn't been called yet. */
8
+ state: DozorContextState;
9
+ /** Current session ID, or `null` before init. */
10
+ sessionId: string | null;
11
+ /** `true` when actively recording. */
12
+ isRecording: boolean;
13
+ /** `true` when paused via `pause()`. */
14
+ isPaused: boolean;
15
+ /** Initialize the Dozor recorder. No-op if already initialized. */
16
+ init: (options: DozorOptions) => void;
17
+ /** Start recording (only when `autoStart: false`). */
18
+ start: () => void;
19
+ /** Pause recording without destroying the session. */
20
+ pause: () => void;
21
+ /** Resume recording after a pause. */
22
+ resume: () => void;
23
+ /** Stop recording, flush remaining events, destroy instance. */
24
+ stop: () => void;
25
+ /** Discard session — drop buffer + delete from server. */
26
+ cancel: () => void;
27
+ }
28
+ interface DozorProviderProps {
29
+ /** Pass options to auto-initialize Dozor on mount. Omit for manual `init()`. */
30
+ options?: DozorOptions;
31
+ children: ReactNode;
32
+ }
33
+ declare function DozorProvider({ options, children }: DozorProviderProps): react_jsx_runtime.JSX.Element;
34
+
35
+ /**
36
+ * Access the Dozor recorder state and controls.
37
+ * Must be used within a `<DozorProvider>`.
38
+ */
39
+ declare function useDozor(): DozorContextValue;
40
+
41
+ export { type DozorContextState, type DozorContextValue, DozorProvider, useDozor };
package/dist/index.js ADDED
@@ -0,0 +1,85 @@
1
+ "use client";
2
+
3
+ // src/dozor-context.tsx
4
+ import { createContext, useCallback, useRef, useState, useEffect } from "react";
5
+ import { Dozor } from "@kharko/dozor";
6
+ import { jsx } from "react/jsx-runtime";
7
+ var DozorContext = createContext(null);
8
+ function DozorProvider({ options, children }) {
9
+ const instanceRef = useRef(null);
10
+ const [state, setState] = useState("not_initialized");
11
+ const [sessionId, setSessionId] = useState(null);
12
+ const syncState = useCallback(() => {
13
+ const d = instanceRef.current;
14
+ if (!d) {
15
+ setState("not_initialized");
16
+ setSessionId(null);
17
+ return;
18
+ }
19
+ setState(d.state);
20
+ setSessionId(d.sessionId);
21
+ }, []);
22
+ const init = useCallback(
23
+ (opts) => {
24
+ if (instanceRef.current) return;
25
+ instanceRef.current = Dozor.init(opts);
26
+ syncState();
27
+ },
28
+ [syncState]
29
+ );
30
+ const start = useCallback(() => {
31
+ instanceRef.current?.start();
32
+ syncState();
33
+ }, [syncState]);
34
+ const pause = useCallback(() => {
35
+ instanceRef.current?.pause();
36
+ syncState();
37
+ }, [syncState]);
38
+ const resume = useCallback(() => {
39
+ instanceRef.current?.resume();
40
+ syncState();
41
+ }, [syncState]);
42
+ const stop = useCallback(() => {
43
+ instanceRef.current?.stop();
44
+ instanceRef.current = null;
45
+ syncState();
46
+ }, [syncState]);
47
+ const cancel = useCallback(() => {
48
+ instanceRef.current?.cancel();
49
+ instanceRef.current = null;
50
+ syncState();
51
+ }, [syncState]);
52
+ useEffect(() => {
53
+ if (options && !instanceRef.current) {
54
+ init(options);
55
+ }
56
+ }, []);
57
+ const value = {
58
+ state,
59
+ sessionId,
60
+ isRecording: state === "recording",
61
+ isPaused: state === "paused",
62
+ init,
63
+ start,
64
+ pause,
65
+ resume,
66
+ stop,
67
+ cancel
68
+ };
69
+ return /* @__PURE__ */ jsx(DozorContext.Provider, { value, children });
70
+ }
71
+
72
+ // src/use-dozor.ts
73
+ import { useContext } from "react";
74
+ function useDozor() {
75
+ const ctx = useContext(DozorContext);
76
+ if (!ctx) {
77
+ throw new Error("useDozor must be used within a <DozorProvider>");
78
+ }
79
+ return ctx;
80
+ }
81
+ export {
82
+ DozorProvider,
83
+ useDozor
84
+ };
85
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dozor-context.tsx","../src/use-dozor.ts"],"sourcesContent":["import { createContext, useCallback, useRef, useState, useEffect, type ReactNode } from \"react\";\nimport { Dozor } from \"@kharko/dozor\";\nimport type { DozorOptions, DozorState } from \"@kharko/dozor\";\n\nexport type DozorContextState = DozorState | \"not_initialized\";\n\nexport interface DozorContextValue {\n /** Current lifecycle state. `\"not_initialized\"` when `init()` hasn't been called yet. */\n state: DozorContextState;\n /** Current session ID, or `null` before init. */\n sessionId: string | null;\n /** `true` when actively recording. */\n isRecording: boolean;\n /** `true` when paused via `pause()`. */\n isPaused: boolean;\n\n /** Initialize the Dozor recorder. No-op if already initialized. */\n init: (options: DozorOptions) => void;\n /** Start recording (only when `autoStart: false`). */\n start: () => void;\n /** Pause recording without destroying the session. */\n pause: () => void;\n /** Resume recording after a pause. */\n resume: () => void;\n /** Stop recording, flush remaining events, destroy instance. */\n stop: () => void;\n /** Discard session — drop buffer + delete from server. */\n cancel: () => void;\n}\n\nexport const DozorContext = createContext<DozorContextValue | null>(null);\n\ninterface DozorProviderProps {\n /** Pass options to auto-initialize Dozor on mount. Omit for manual `init()`. */\n options?: DozorOptions;\n children: ReactNode;\n}\n\nexport function DozorProvider({ options, children }: DozorProviderProps) {\n const instanceRef = useRef<Dozor | null>(null);\n\n const [state, setState] = useState<DozorContextState>(\"not_initialized\");\n const [sessionId, setSessionId] = useState<string | null>(null);\n\n /** Read current values from the Dozor instance and sync to React state. */\n const syncState = useCallback(() => {\n const d = instanceRef.current;\n if (!d) {\n setState(\"not_initialized\");\n setSessionId(null);\n return;\n }\n setState(d.state);\n setSessionId(d.sessionId);\n }, []);\n\n const init = useCallback(\n (opts: DozorOptions) => {\n if (instanceRef.current) return;\n instanceRef.current = Dozor.init(opts);\n syncState();\n },\n [syncState],\n );\n\n const start = useCallback(() => {\n instanceRef.current?.start();\n syncState();\n }, [syncState]);\n\n const pause = useCallback(() => {\n instanceRef.current?.pause();\n syncState();\n }, [syncState]);\n\n const resume = useCallback(() => {\n instanceRef.current?.resume();\n syncState();\n }, [syncState]);\n\n const stop = useCallback(() => {\n instanceRef.current?.stop();\n instanceRef.current = null;\n syncState();\n }, [syncState]);\n\n const cancel = useCallback(() => {\n instanceRef.current?.cancel();\n instanceRef.current = null;\n syncState();\n }, [syncState]);\n\n // Auto-init on mount when options are provided\n useEffect(() => {\n if (options && !instanceRef.current) {\n init(options);\n }\n }, []); // eslint-disable-line react-hooks/exhaustive-deps — intentionally run once on mount\n\n const value: DozorContextValue = {\n state,\n sessionId,\n isRecording: state === \"recording\",\n isPaused: state === \"paused\",\n init,\n start,\n pause,\n resume,\n stop,\n cancel,\n };\n\n return <DozorContext.Provider value={value}>{children}</DozorContext.Provider>;\n}\n","import { useContext } from \"react\";\nimport { DozorContext, type DozorContextValue } from \"./dozor-context.js\";\n\n/**\n * Access the Dozor recorder state and controls.\n * Must be used within a `<DozorProvider>`.\n */\nexport function useDozor(): DozorContextValue {\n const ctx = useContext(DozorContext);\n if (!ctx) {\n throw new Error(\"useDozor must be used within a <DozorProvider>\");\n }\n return ctx;\n}\n"],"mappings":";;;AAAA,SAAS,eAAe,aAAa,QAAQ,UAAU,iBAAiC;AACxF,SAAS,aAAa;AA+Gb;AAlFF,IAAM,eAAe,cAAwC,IAAI;AAQjE,SAAS,cAAc,EAAE,SAAS,SAAS,GAAuB;AACvE,QAAM,cAAc,OAAqB,IAAI;AAE7C,QAAM,CAAC,OAAO,QAAQ,IAAI,SAA4B,iBAAiB;AACvE,QAAM,CAAC,WAAW,YAAY,IAAI,SAAwB,IAAI;AAG9D,QAAM,YAAY,YAAY,MAAM;AAClC,UAAM,IAAI,YAAY;AACtB,QAAI,CAAC,GAAG;AACN,eAAS,iBAAiB;AAC1B,mBAAa,IAAI;AACjB;AAAA,IACF;AACA,aAAS,EAAE,KAAK;AAChB,iBAAa,EAAE,SAAS;AAAA,EAC1B,GAAG,CAAC,CAAC;AAEL,QAAM,OAAO;AAAA,IACX,CAAC,SAAuB;AACtB,UAAI,YAAY,QAAS;AACzB,kBAAY,UAAU,MAAM,KAAK,IAAI;AACrC,gBAAU;AAAA,IACZ;AAAA,IACA,CAAC,SAAS;AAAA,EACZ;AAEA,QAAM,QAAQ,YAAY,MAAM;AAC9B,gBAAY,SAAS,MAAM;AAC3B,cAAU;AAAA,EACZ,GAAG,CAAC,SAAS,CAAC;AAEd,QAAM,QAAQ,YAAY,MAAM;AAC9B,gBAAY,SAAS,MAAM;AAC3B,cAAU;AAAA,EACZ,GAAG,CAAC,SAAS,CAAC;AAEd,QAAM,SAAS,YAAY,MAAM;AAC/B,gBAAY,SAAS,OAAO;AAC5B,cAAU;AAAA,EACZ,GAAG,CAAC,SAAS,CAAC;AAEd,QAAM,OAAO,YAAY,MAAM;AAC7B,gBAAY,SAAS,KAAK;AAC1B,gBAAY,UAAU;AACtB,cAAU;AAAA,EACZ,GAAG,CAAC,SAAS,CAAC;AAEd,QAAM,SAAS,YAAY,MAAM;AAC/B,gBAAY,SAAS,OAAO;AAC5B,gBAAY,UAAU;AACtB,cAAU;AAAA,EACZ,GAAG,CAAC,SAAS,CAAC;AAGd,YAAU,MAAM;AACd,QAAI,WAAW,CAAC,YAAY,SAAS;AACnC,WAAK,OAAO;AAAA,IACd;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,QAA2B;AAAA,IAC/B;AAAA,IACA;AAAA,IACA,aAAa,UAAU;AAAA,IACvB,UAAU,UAAU;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SAAO,oBAAC,aAAa,UAAb,EAAsB,OAAe,UAAS;AACxD;;;ACjHA,SAAS,kBAAkB;AAOpB,SAAS,WAA8B;AAC5C,QAAM,MAAM,WAAW,YAAY;AACnC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI,MAAM,gDAAgD;AAAA,EAClE;AACA,SAAO;AACT;","names":[]}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@kharko/dozor-react",
3
+ "version": "0.1.0",
4
+ "description": "React bindings for @kharko/dozor session recording SDK",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "import": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "require": {
14
+ "types": "./dist/index.d.cts",
15
+ "default": "./dist/index.cjs"
16
+ }
17
+ }
18
+ },
19
+ "main": "./dist/index.cjs",
20
+ "module": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "files": ["dist"],
23
+ "scripts": {
24
+ "build": "tsup",
25
+ "dev": "tsup --watch"
26
+ },
27
+ "peerDependencies": {
28
+ "@kharko/dozor": "*",
29
+ "react": ">=18"
30
+ },
31
+ "devDependencies": {
32
+ "@kharko/dozor": "workspace:*",
33
+ "@types/react": "^19",
34
+ "react": "^19",
35
+ "tsup": "^8.5.0",
36
+ "typescript": "^5"
37
+ }
38
+ }