@merittdev/horus-lens 0.0.1
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/browser.cjs +31594 -0
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.cts +125 -0
- package/dist/browser.d.ts +125 -0
- package/dist/browser.js +24 -0
- package/dist/browser.js.map +1 -0
- package/dist/chunk-DU7HNRF4.js +1644 -0
- package/dist/chunk-DU7HNRF4.js.map +1 -0
- package/dist/chunk-DWOH2ENF.js +17613 -0
- package/dist/chunk-DWOH2ENF.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/chunk-S6S3ZZQA.js +17225 -0
- package/dist/chunk-S6S3ZZQA.js.map +1 -0
- package/dist/dashboard.cjs +19774 -0
- package/dist/dashboard.cjs.map +1 -0
- package/dist/dashboard.css +2233 -0
- package/dist/dashboard.d.cts +707 -0
- package/dist/dashboard.d.ts +707 -0
- package/dist/dashboard.js +2237 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/index.cjs +30040 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d-BA540Fae.d.ts +80 -0
- package/dist/index.d-Bzgtl7-B.d.cts +161 -0
- package/dist/index.d-Bzgtl7-B.d.ts +161 -0
- package/dist/index.d-DOCLVJGS.d.cts +80 -0
- package/dist/index.d.cts +906 -0
- package/dist/index.d.ts +906 -0
- package/dist/index.js +89 -0
- package/dist/index.js.map +1 -0
- package/dist/lens.min.js +770 -0
- package/dist/lens.min.js.map +1 -0
- package/dist/react.cjs +31683 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.cts +100 -0
- package/dist/react.d.ts +100 -0
- package/dist/react.js +108 -0
- package/dist/react.js.map +1 -0
- package/dist/rrweb-EYUUZIYR.js +30 -0
- package/dist/rrweb-EYUUZIYR.js.map +1 -0
- package/package.json +68 -0
package/dist/react.d.cts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { Component, ReactNode, ContextType } from 'react';
|
|
3
|
+
import { a as LensClient, L as LensConfig } from './index.d-DOCLVJGS.cjs';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import './index.d-Bzgtl7-B.cjs';
|
|
6
|
+
|
|
7
|
+
/** Read-only gate check (param OR persisted flag). Never mutates storage. */
|
|
8
|
+
declare function isGateActive(paramName?: string): boolean;
|
|
9
|
+
interface LensGlobal {
|
|
10
|
+
(...args: unknown[]): void;
|
|
11
|
+
q?: Array<ArrayLike<unknown>>;
|
|
12
|
+
}
|
|
13
|
+
declare global {
|
|
14
|
+
interface Window {
|
|
15
|
+
Lens?: LensGlobal;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface BootOptions extends Partial<Omit<LensConfig, 'accessId'>> {
|
|
20
|
+
/** Falls back to a `<script data-lens-id>` attribute or a queued `init` call. */
|
|
21
|
+
accessId?: string;
|
|
22
|
+
/** Query param that gates activation. Default `'lens'` → `?lens=true`. */
|
|
23
|
+
paramName?: string;
|
|
24
|
+
/** Bypass the query-param gate (preview envs / the React provider). */
|
|
25
|
+
force?: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface LensBrowser {
|
|
28
|
+
client: LensClient;
|
|
29
|
+
/** Open the report panel. */
|
|
30
|
+
open(): void;
|
|
31
|
+
/** Close the report panel (overlay stays mounted). */
|
|
32
|
+
close(): void;
|
|
33
|
+
/** Remove the overlay, stop the client, and clear gate persistence. */
|
|
34
|
+
destroy(): void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare const AppContextSchema: z.ZodObject<{
|
|
38
|
+
release: z.ZodOptional<z.ZodString>;
|
|
39
|
+
gitSha: z.ZodOptional<z.ZodString>;
|
|
40
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
41
|
+
featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
|
|
42
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
id: z.ZodOptional<z.ZodString>;
|
|
44
|
+
email: z.ZodOptional<z.ZodString>;
|
|
45
|
+
name: z.ZodOptional<z.ZodString>;
|
|
46
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
type AppContext = z.infer<typeof AppContextSchema>;
|
|
51
|
+
|
|
52
|
+
interface LensProviderProps extends Omit<BootOptions, 'force'> {
|
|
53
|
+
accessId: string;
|
|
54
|
+
/** Activate regardless of ?lens=true — e.g. pass your preview-env flag. */
|
|
55
|
+
enabled?: boolean;
|
|
56
|
+
children: ReactNode;
|
|
57
|
+
}
|
|
58
|
+
declare function LensProvider(props: LensProviderProps): react.JSX.Element;
|
|
59
|
+
|
|
60
|
+
interface Identity {
|
|
61
|
+
id?: string;
|
|
62
|
+
email?: string;
|
|
63
|
+
name?: string;
|
|
64
|
+
organization?: string;
|
|
65
|
+
}
|
|
66
|
+
declare function useLens(): {
|
|
67
|
+
active: boolean;
|
|
68
|
+
open: () => void | undefined;
|
|
69
|
+
close: () => void | undefined;
|
|
70
|
+
identify: (user: Identity) => void | undefined;
|
|
71
|
+
setApp: (app: Partial<AppContext>) => void | undefined;
|
|
72
|
+
report: (input?: {
|
|
73
|
+
comment?: string;
|
|
74
|
+
}) => Promise<{
|
|
75
|
+
reportId: string;
|
|
76
|
+
} | null>;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
declare const LensContext: react.Context<LensBrowser | null>;
|
|
80
|
+
|
|
81
|
+
interface Props {
|
|
82
|
+
children: ReactNode;
|
|
83
|
+
fallback?: ReactNode;
|
|
84
|
+
}
|
|
85
|
+
interface State {
|
|
86
|
+
hasError: boolean;
|
|
87
|
+
}
|
|
88
|
+
declare class LensErrorBoundary extends Component<Props, State> {
|
|
89
|
+
static contextType: react.Context<LensBrowser | null>;
|
|
90
|
+
context: ContextType<typeof LensContext>;
|
|
91
|
+
state: State;
|
|
92
|
+
static getDerivedStateFromError(): State;
|
|
93
|
+
componentDidCatch(error: Error): void;
|
|
94
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react.JSX.Element | null | undefined;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** Walk the React fiber tree from `el` upward, collecting component names. */
|
|
98
|
+
declare function getComponentStack(el: Element): string[];
|
|
99
|
+
|
|
100
|
+
export { LensErrorBoundary, LensProvider, type LensProviderProps, getComponentStack, isGateActive, useLens };
|
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { Component, ReactNode, ContextType } from 'react';
|
|
3
|
+
import { a as LensClient, L as LensConfig } from './index.d-BA540Fae.js';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import './index.d-Bzgtl7-B.js';
|
|
6
|
+
|
|
7
|
+
/** Read-only gate check (param OR persisted flag). Never mutates storage. */
|
|
8
|
+
declare function isGateActive(paramName?: string): boolean;
|
|
9
|
+
interface LensGlobal {
|
|
10
|
+
(...args: unknown[]): void;
|
|
11
|
+
q?: Array<ArrayLike<unknown>>;
|
|
12
|
+
}
|
|
13
|
+
declare global {
|
|
14
|
+
interface Window {
|
|
15
|
+
Lens?: LensGlobal;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface BootOptions extends Partial<Omit<LensConfig, 'accessId'>> {
|
|
20
|
+
/** Falls back to a `<script data-lens-id>` attribute or a queued `init` call. */
|
|
21
|
+
accessId?: string;
|
|
22
|
+
/** Query param that gates activation. Default `'lens'` → `?lens=true`. */
|
|
23
|
+
paramName?: string;
|
|
24
|
+
/** Bypass the query-param gate (preview envs / the React provider). */
|
|
25
|
+
force?: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface LensBrowser {
|
|
28
|
+
client: LensClient;
|
|
29
|
+
/** Open the report panel. */
|
|
30
|
+
open(): void;
|
|
31
|
+
/** Close the report panel (overlay stays mounted). */
|
|
32
|
+
close(): void;
|
|
33
|
+
/** Remove the overlay, stop the client, and clear gate persistence. */
|
|
34
|
+
destroy(): void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare const AppContextSchema: z.ZodObject<{
|
|
38
|
+
release: z.ZodOptional<z.ZodString>;
|
|
39
|
+
gitSha: z.ZodOptional<z.ZodString>;
|
|
40
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
41
|
+
featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
|
|
42
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
id: z.ZodOptional<z.ZodString>;
|
|
44
|
+
email: z.ZodOptional<z.ZodString>;
|
|
45
|
+
name: z.ZodOptional<z.ZodString>;
|
|
46
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
type AppContext = z.infer<typeof AppContextSchema>;
|
|
51
|
+
|
|
52
|
+
interface LensProviderProps extends Omit<BootOptions, 'force'> {
|
|
53
|
+
accessId: string;
|
|
54
|
+
/** Activate regardless of ?lens=true — e.g. pass your preview-env flag. */
|
|
55
|
+
enabled?: boolean;
|
|
56
|
+
children: ReactNode;
|
|
57
|
+
}
|
|
58
|
+
declare function LensProvider(props: LensProviderProps): react.JSX.Element;
|
|
59
|
+
|
|
60
|
+
interface Identity {
|
|
61
|
+
id?: string;
|
|
62
|
+
email?: string;
|
|
63
|
+
name?: string;
|
|
64
|
+
organization?: string;
|
|
65
|
+
}
|
|
66
|
+
declare function useLens(): {
|
|
67
|
+
active: boolean;
|
|
68
|
+
open: () => void | undefined;
|
|
69
|
+
close: () => void | undefined;
|
|
70
|
+
identify: (user: Identity) => void | undefined;
|
|
71
|
+
setApp: (app: Partial<AppContext>) => void | undefined;
|
|
72
|
+
report: (input?: {
|
|
73
|
+
comment?: string;
|
|
74
|
+
}) => Promise<{
|
|
75
|
+
reportId: string;
|
|
76
|
+
} | null>;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
declare const LensContext: react.Context<LensBrowser | null>;
|
|
80
|
+
|
|
81
|
+
interface Props {
|
|
82
|
+
children: ReactNode;
|
|
83
|
+
fallback?: ReactNode;
|
|
84
|
+
}
|
|
85
|
+
interface State {
|
|
86
|
+
hasError: boolean;
|
|
87
|
+
}
|
|
88
|
+
declare class LensErrorBoundary extends Component<Props, State> {
|
|
89
|
+
static contextType: react.Context<LensBrowser | null>;
|
|
90
|
+
context: ContextType<typeof LensContext>;
|
|
91
|
+
state: State;
|
|
92
|
+
static getDerivedStateFromError(): State;
|
|
93
|
+
componentDidCatch(error: Error): void;
|
|
94
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react.JSX.Element | null | undefined;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** Walk the React fiber tree from `el` upward, collecting component names. */
|
|
98
|
+
declare function getComponentStack(el: Element): string[];
|
|
99
|
+
|
|
100
|
+
export { LensErrorBoundary, LensProvider, type LensProviderProps, getComponentStack, isGateActive, useLens };
|
package/dist/react.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
boot,
|
|
3
|
+
isGateActive
|
|
4
|
+
} from "./chunk-DU7HNRF4.js";
|
|
5
|
+
import "./chunk-S6S3ZZQA.js";
|
|
6
|
+
import "./chunk-DWOH2ENF.js";
|
|
7
|
+
import "./chunk-PZ5AY32C.js";
|
|
8
|
+
|
|
9
|
+
// ../react/dist/index.js
|
|
10
|
+
import { useEffect, useState } from "react";
|
|
11
|
+
import { createContext } from "react";
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
import { useContext } from "react";
|
|
14
|
+
import { Component } from "react";
|
|
15
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
16
|
+
var LensContext = createContext(null);
|
|
17
|
+
function LensProvider(props) {
|
|
18
|
+
const { children, enabled, ...bootOptions } = props;
|
|
19
|
+
const [browser, setBrowser] = useState(null);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const instance = boot({ ...bootOptions, force: enabled });
|
|
22
|
+
if (instance) {
|
|
23
|
+
instance.client.setApp({ extra: { framework: "react" } });
|
|
24
|
+
}
|
|
25
|
+
setBrowser(instance);
|
|
26
|
+
return () => {
|
|
27
|
+
instance?.destroy();
|
|
28
|
+
setBrowser(null);
|
|
29
|
+
};
|
|
30
|
+
}, [props.accessId]);
|
|
31
|
+
return /* @__PURE__ */ jsx(LensContext.Provider, { value: browser, children });
|
|
32
|
+
}
|
|
33
|
+
function useLens() {
|
|
34
|
+
const browser = useContext(LensContext);
|
|
35
|
+
return {
|
|
36
|
+
active: browser !== null,
|
|
37
|
+
open: () => browser?.open(),
|
|
38
|
+
close: () => browser?.close(),
|
|
39
|
+
identify: (user) => browser?.client.setApp({ user }),
|
|
40
|
+
setApp: (app) => browser?.client.setApp(app),
|
|
41
|
+
report: async (input) => {
|
|
42
|
+
if (!browser) return null;
|
|
43
|
+
return browser.client.submitReport({ comment: input?.comment });
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
var LensErrorBoundary = class extends Component {
|
|
48
|
+
static contextType = LensContext;
|
|
49
|
+
state = { hasError: false };
|
|
50
|
+
static getDerivedStateFromError() {
|
|
51
|
+
return { hasError: true };
|
|
52
|
+
}
|
|
53
|
+
componentDidCatch(error) {
|
|
54
|
+
const browser = this.context;
|
|
55
|
+
if (browser) {
|
|
56
|
+
browser.client.setApp({ extra: { lastBoundaryError: error.message } });
|
|
57
|
+
browser.open();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
if (this.state.hasError) {
|
|
62
|
+
return this.props.fallback ?? /* @__PURE__ */ jsx2(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
role: "alert",
|
|
66
|
+
style: {
|
|
67
|
+
padding: "12px 16px",
|
|
68
|
+
borderRadius: 8,
|
|
69
|
+
border: "1px solid rgba(0,0,0,0.1)",
|
|
70
|
+
font: "14px system-ui, sans-serif"
|
|
71
|
+
},
|
|
72
|
+
children: "Something went wrong."
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
return this.props.children;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
function nameOf(type) {
|
|
80
|
+
if (!type || typeof type === "string") return void 0;
|
|
81
|
+
return type.displayName ?? type.name ?? type.render?.displayName ?? type.render?.name;
|
|
82
|
+
}
|
|
83
|
+
function getComponentStack(el) {
|
|
84
|
+
const names = [];
|
|
85
|
+
try {
|
|
86
|
+
const key = Object.keys(el).find((k) => k.startsWith("__reactFiber$"));
|
|
87
|
+
if (!key) return names;
|
|
88
|
+
let fiber = el[key] ?? null;
|
|
89
|
+
const seen = /* @__PURE__ */ new Set();
|
|
90
|
+
while (fiber && !seen.has(fiber)) {
|
|
91
|
+
seen.add(fiber);
|
|
92
|
+
const name = nameOf(fiber.type);
|
|
93
|
+
if (name) names.push(name);
|
|
94
|
+
fiber = fiber.return ?? null;
|
|
95
|
+
}
|
|
96
|
+
} catch {
|
|
97
|
+
return names;
|
|
98
|
+
}
|
|
99
|
+
return names;
|
|
100
|
+
}
|
|
101
|
+
export {
|
|
102
|
+
LensErrorBoundary,
|
|
103
|
+
LensProvider,
|
|
104
|
+
getComponentStack,
|
|
105
|
+
isGateActive,
|
|
106
|
+
useLens
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../react/src/provider.tsx","../../react/src/context.ts","../../react/src/use-lens.ts","../../react/src/error-boundary.tsx","../../react/src/fiber.ts","../../react/src/index.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport type { ReactNode } from 'react';\nimport { boot } from '@horus-lens/browser';\nimport type { BootOptions, LensBrowser } from '@horus-lens/browser';\nimport { LensContext } from './context.js';\n\nexport interface LensProviderProps extends Omit<BootOptions, 'force'> {\n accessId: string;\n /** Activate regardless of ?lens=true — e.g. pass your preview-env flag. */\n enabled?: boolean;\n children: ReactNode;\n}\n\nexport function LensProvider(props: LensProviderProps) {\n const { children, enabled, ...bootOptions } = props;\n const [browser, setBrowser] = useState<LensBrowser | null>(null);\n\n useEffect(() => {\n const instance = boot({ ...bootOptions, force: enabled });\n if (instance) {\n instance.client.setApp({ extra: { framework: 'react' } });\n }\n setBrowser(instance);\n return () => {\n instance?.destroy();\n setBrowser(null);\n };\n }, [props.accessId]);\n\n return <LensContext.Provider value={browser}>{children}</LensContext.Provider>;\n}\n","import { createContext } from 'react';\nimport type { LensBrowser } from '@horus-lens/browser';\n\nexport const LensContext = createContext<LensBrowser | null>(null);\n","import { useContext } from 'react';\nimport type { AppContext } from '@horus-lens/shared';\nimport { LensContext } from './context.js';\n\ninterface Identity {\n id?: string;\n email?: string;\n name?: string;\n organization?: string;\n}\n\nexport function useLens() {\n const browser = useContext(LensContext);\n\n return {\n active: browser !== null,\n open: () => browser?.open(),\n close: () => browser?.close(),\n identify: (user: Identity) => browser?.client.setApp({ user }),\n setApp: (app: Partial<AppContext>) => browser?.client.setApp(app),\n report: async (input?: { comment?: string }): Promise<{ reportId: string } | null> => {\n if (!browser) return null;\n return browser.client.submitReport({ comment: input?.comment });\n },\n };\n}\n","import { Component } from 'react';\nimport type { ContextType, ReactNode } from 'react';\nimport { LensContext } from './context.js';\n\ninterface Props {\n children: ReactNode;\n fallback?: ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n}\n\nexport class LensErrorBoundary extends Component<Props, State> {\n static contextType = LensContext;\n declare context: ContextType<typeof LensContext>;\n\n state: State = { hasError: false };\n\n static getDerivedStateFromError(): State {\n return { hasError: true };\n }\n\n componentDidCatch(error: Error) {\n const browser = this.context;\n if (browser) {\n browser.client.setApp({ extra: { lastBoundaryError: error.message } });\n browser.open();\n }\n }\n\n render() {\n if (this.state.hasError) {\n return (\n this.props.fallback ?? (\n <div\n role=\"alert\"\n style={{\n padding: '12px 16px',\n borderRadius: 8,\n border: '1px solid rgba(0,0,0,0.1)',\n font: '14px system-ui, sans-serif',\n }}\n >\n Something went wrong.\n </div>\n )\n );\n }\n return this.props.children;\n }\n}\n","interface FiberType {\n displayName?: string;\n name?: string;\n render?: { displayName?: string; name?: string };\n}\n\ninterface FiberNode {\n type?: FiberType | string | null;\n return?: FiberNode | null;\n}\n\nfunction nameOf(type: FiberNode['type']): string | undefined {\n if (!type || typeof type === 'string') return undefined;\n return type.displayName ?? type.name ?? type.render?.displayName ?? type.render?.name;\n}\n\n/** Walk the React fiber tree from `el` upward, collecting component names. */\nexport function getComponentStack(el: Element): string[] {\n const names: string[] = [];\n try {\n const key = Object.keys(el).find((k) => k.startsWith('__reactFiber$'));\n if (!key) return names;\n\n let fiber = (el as unknown as Record<string, FiberNode | undefined>)[key] ?? null;\n const seen = new Set<FiberNode>();\n while (fiber && !seen.has(fiber)) {\n seen.add(fiber);\n const name = nameOf(fiber.type);\n if (name) names.push(name);\n fiber = fiber.return ?? null;\n }\n } catch {\n return names;\n }\n return names;\n}\n","export { LensProvider } from './provider.js';\nexport type { LensProviderProps } from './provider.js';\nexport { useLens } from './use-lens.js';\nexport { LensErrorBoundary } from './error-boundary.js';\nexport { getComponentStack } from './fiber.js';\nexport { isGateActive } from '@horus-lens/browser';\n"],"mappings":";;;;;;;;;AAAA,SAAS,WAAW,gBAAgB;ACApC,SAAS,qBAAqB;AD6BrB,SAAA,WAAA;AE7BT,SAAS,kBAAkB;ACA3B,SAAS,iBAAiB;AAmChB,SAAA,OAAAA,YAAA;AFhCH,IAAM,cAAc,cAAkC,IAAI;ADU1D,SAAS,aAAa,OAA0B;AACrD,QAAM,EAAE,UAAU,SAAS,GAAG,YAAY,IAAI;AAC9C,QAAM,CAAC,SAAS,UAAU,IAAI,SAA6B,IAAI;AAE/D,YAAU,MAAM;AACd,UAAM,WAAW,KAAK,EAAE,GAAG,aAAa,OAAO,QAAQ,CAAC;AACxD,QAAI,UAAU;AACZ,eAAS,OAAO,OAAO,EAAE,OAAO,EAAE,WAAW,QAAQ,EAAE,CAAC;IAC1D;AACA,eAAW,QAAQ;AACnB,WAAO,MAAM;AACX,gBAAU,QAAQ;AAClB,iBAAW,IAAI;IACjB;EACF,GAAG,CAAC,MAAM,QAAQ,CAAC;AAEnB,SAAO,oBAAC,YAAY,UAAZ,EAAqB,OAAO,SAAU,SAAA,CAAS;AACzD;AEnBO,SAAS,UAAU;AACxB,QAAM,UAAU,WAAW,WAAW;AAEtC,SAAO;IACL,QAAQ,YAAY;IACpB,MAAM,MAAM,SAAS,KAAK;IAC1B,OAAO,MAAM,SAAS,MAAM;IAC5B,UAAU,CAAC,SAAmB,SAAS,OAAO,OAAO,EAAE,KAAK,CAAC;IAC7D,QAAQ,CAAC,QAA6B,SAAS,OAAO,OAAO,GAAG;IAChE,QAAQ,OAAO,UAAuE;AACpF,UAAI,CAAC,QAAS,QAAO;AACrB,aAAO,QAAQ,OAAO,aAAa,EAAE,SAAS,OAAO,QAAQ,CAAC;IAChE;EACF;AACF;ACZO,IAAM,oBAAN,cAAgC,UAAwB;EAC7D,OAAO,cAAc;EAGrB,QAAe,EAAE,UAAU,MAAM;EAEjC,OAAO,2BAAkC;AACvC,WAAO,EAAE,UAAU,KAAK;EAC1B;EAEA,kBAAkB,OAAc;AAC9B,UAAM,UAAU,KAAK;AACrB,QAAI,SAAS;AACX,cAAQ,OAAO,OAAO,EAAE,OAAO,EAAE,mBAAmB,MAAM,QAAQ,EAAE,CAAC;AACrE,cAAQ,KAAK;IACf;EACF;EAEA,SAAS;AACP,QAAI,KAAK,MAAM,UAAU;AACvB,aACE,KAAK,MAAM,YACTC;QAAC;QAAA;UACC,MAAK;UACL,OAAO;YACL,SAAS;YACT,cAAc;YACd,QAAQ;YACR,MAAM;UACR;UACD,UAAA;QAAA;MAED;IAGN;AACA,WAAO,KAAK,MAAM;EACpB;AACF;ACxCA,SAAS,OAAO,MAA6C;AAC3D,MAAI,CAAC,QAAQ,OAAO,SAAS,SAAU,QAAO;AAC9C,SAAO,KAAK,eAAe,KAAK,QAAQ,KAAK,QAAQ,eAAe,KAAK,QAAQ;AACnF;AAGO,SAAS,kBAAkB,IAAuB;AACvD,QAAM,QAAkB,CAAC;AACzB,MAAI;AACF,UAAM,MAAM,OAAO,KAAK,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,WAAW,eAAe,CAAC;AACrE,QAAI,CAAC,IAAK,QAAO;AAEjB,QAAI,QAAS,GAAwD,GAAG,KAAK;AAC7E,UAAM,OAAO,oBAAI,IAAe;AAChC,WAAO,SAAS,CAAC,KAAK,IAAI,KAAK,GAAG;AAChC,WAAK,IAAI,KAAK;AACd,YAAM,OAAO,OAAO,MAAM,IAAI;AAC9B,UAAI,KAAM,OAAM,KAAK,IAAI;AACzB,cAAQ,MAAM,UAAU;IAC1B;EACF,QAAQ;AACN,WAAO;EACT;AACA,SAAO;AACT;","names":["jsx","jsx"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EventType,
|
|
3
|
+
IncrementalSource,
|
|
4
|
+
MouseInteractions,
|
|
5
|
+
Replayer,
|
|
6
|
+
ReplayerEvents,
|
|
7
|
+
_mirror,
|
|
8
|
+
addCustomEvent,
|
|
9
|
+
canvasMutation,
|
|
10
|
+
freezePage,
|
|
11
|
+
record,
|
|
12
|
+
takeFullSnapshot,
|
|
13
|
+
utils
|
|
14
|
+
} from "./chunk-DWOH2ENF.js";
|
|
15
|
+
import "./chunk-PZ5AY32C.js";
|
|
16
|
+
export {
|
|
17
|
+
EventType,
|
|
18
|
+
IncrementalSource,
|
|
19
|
+
MouseInteractions,
|
|
20
|
+
Replayer,
|
|
21
|
+
ReplayerEvents,
|
|
22
|
+
addCustomEvent,
|
|
23
|
+
canvasMutation,
|
|
24
|
+
freezePage,
|
|
25
|
+
_mirror as mirror,
|
|
26
|
+
record,
|
|
27
|
+
takeFullSnapshot,
|
|
28
|
+
utils
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=rrweb-EYUUZIYR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@merittdev/horus-lens",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Lens — context-rich issue capture for web apps: overlay, replay, and drop-in dashboard components",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"module": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"require": "./dist/index.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./browser": {
|
|
21
|
+
"types": "./dist/browser.d.ts",
|
|
22
|
+
"import": "./dist/browser.js",
|
|
23
|
+
"require": "./dist/browser.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./react": {
|
|
26
|
+
"types": "./dist/react.d.ts",
|
|
27
|
+
"import": "./dist/react.js",
|
|
28
|
+
"require": "./dist/react.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./dashboard": {
|
|
31
|
+
"types": "./dist/dashboard.d.ts",
|
|
32
|
+
"import": "./dist/dashboard.js",
|
|
33
|
+
"require": "./dist/dashboard.cjs"
|
|
34
|
+
},
|
|
35
|
+
"./dashboard/styles.css": "./dist/dashboard.css",
|
|
36
|
+
"./dist/dashboard.css": "./dist/dashboard.css",
|
|
37
|
+
"./cdn": "./dist/lens.min.js"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"react": ">=18",
|
|
41
|
+
"react-dom": ">=18"
|
|
42
|
+
},
|
|
43
|
+
"peerDependenciesMeta": {
|
|
44
|
+
"react": {
|
|
45
|
+
"optional": true
|
|
46
|
+
},
|
|
47
|
+
"react-dom": {
|
|
48
|
+
"optional": true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"tsup": "^8.4.0",
|
|
53
|
+
"typescript": "^5.7.3",
|
|
54
|
+
"@horus-lens/core": "0.0.1",
|
|
55
|
+
"@horus-lens/browser": "0.0.1",
|
|
56
|
+
"@horus-lens/react": "0.0.1",
|
|
57
|
+
"@horus-lens/dashboard": "0.0.1",
|
|
58
|
+
"@horus-lens/shared": "0.0.1"
|
|
59
|
+
},
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "tsup && node scripts/copy-assets.mjs",
|
|
65
|
+
"typecheck": "tsc --noEmit",
|
|
66
|
+
"clean": "rm -rf dist .turbo"
|
|
67
|
+
}
|
|
68
|
+
}
|