@levo-so/react 0.1.64 → 0.1.71
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/audience/components/component.d.ts.map +1 -1
- package/dist/audience/components/page.d.ts +2 -3
- package/dist/audience/components/page.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +533 -1166
- package/dist/providers/LevoProvider.d.ts +3 -9
- package/dist/providers/LevoProvider.d.ts.map +1 -1
- package/package.json +6 -4
- package/dist/audience/hooks/useBounce.d.ts +0 -4
- package/dist/audience/hooks/useBounce.d.ts.map +0 -1
- package/dist/audience/hooks/useCurrentTab.d.ts +0 -3
- package/dist/audience/hooks/useCurrentTab.d.ts.map +0 -1
- package/dist/audience/hooks/useIdentifyAudience.d.ts +0 -7
- package/dist/audience/hooks/useIdentifyAudience.d.ts.map +0 -1
- package/dist/audience/hooks/useOpenTabs.d.ts +0 -3
- package/dist/audience/hooks/useOpenTabs.d.ts.map +0 -1
- package/dist/audience/hooks/useScrollBehavior.d.ts +0 -11
- package/dist/audience/hooks/useScrollBehavior.d.ts.map +0 -1
- package/dist/audience/hooks/useTextSelection.d.ts +0 -3
- package/dist/audience/hooks/useTextSelection.d.ts.map +0 -1
- package/dist/audience/hooks/useTrackClicks.d.ts +0 -3
- package/dist/audience/hooks/useTrackClicks.d.ts.map +0 -1
- package/dist/audience/utils/autocapture.d.ts +0 -23
- package/dist/audience/utils/autocapture.d.ts.map +0 -1
- package/dist/audience/utils/rageclick.d.ts +0 -25
- package/dist/audience/utils/rageclick.d.ts.map +0 -1
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { ILevoClient } from '@levo-so/core';
|
|
2
2
|
import { ILevoInsights } from '@levo-so/insights';
|
|
3
3
|
import { default as React } from 'react';
|
|
4
|
-
export type ILevoContextValue = {
|
|
5
|
-
client: ILevoClient | null;
|
|
6
|
-
insights: ILevoInsights | null;
|
|
7
|
-
};
|
|
8
4
|
interface ILevoProps {
|
|
9
5
|
client: ILevoClient;
|
|
10
|
-
insights?: ILevoInsights;
|
|
6
|
+
insights?: ILevoInsights | null;
|
|
11
7
|
children: React.ReactNode;
|
|
12
8
|
}
|
|
13
9
|
export declare const LevoProvider: React.FC<ILevoProps>;
|
|
14
|
-
export declare const useLevo: () =>
|
|
15
|
-
|
|
16
|
-
insights: ILevoInsights | null;
|
|
17
|
-
};
|
|
10
|
+
export declare const useLevo: () => ILevoClient;
|
|
11
|
+
export declare const useLevoInsights: () => ILevoInsights | null;
|
|
18
12
|
export {};
|
|
19
13
|
//# sourceMappingURL=LevoProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LevoProvider.d.ts","sourceRoot":"","sources":["../../src/providers/LevoProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LevoProvider.d.ts","sourceRoot":"","sources":["../../src/providers/LevoProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,UAAU,UAAU;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAE7C,CAAC;AAEF,eAAO,MAAM,OAAO,QASgB,WACnC,CAAC;AAEF,eAAO,MAAM,eAAe,QAEC,aAAa,GAAG,IAC5C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levo-so/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.71",
|
|
4
4
|
"author": "Levo Engineering <devs@theinternetfolks.com>",
|
|
5
5
|
"description": "Levo suite for React based applications",
|
|
6
6
|
"type": "module",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": ">=18",
|
|
18
18
|
"react-dom": ">=18",
|
|
19
|
-
"@levo-so/core": "0.1.
|
|
20
|
-
"@levo-so/insights": "0.1.
|
|
19
|
+
"@levo-so/core": "0.1.71",
|
|
20
|
+
"@levo-so/insights": "0.1.71"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"class-variance-authority": "0.7.0",
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
"vite": "7.2.4",
|
|
46
46
|
"vite-plugin-dts": "4.1.0",
|
|
47
47
|
"@levo/ts-config": "0.0.0",
|
|
48
|
-
"@levo/tw-config": "0.0.0"
|
|
48
|
+
"@levo/tw-config": "0.0.0",
|
|
49
|
+
"@levo-so/core": "0.1.71",
|
|
50
|
+
"@levo-so/insights": "0.1.71"
|
|
49
51
|
},
|
|
50
52
|
"main": "./dist/index.js",
|
|
51
53
|
"module": "./dist/index.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBounce.d.ts","sourceRoot":"","sources":["../../../src/audience/hooks/useBounce.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS,GAAI,QAAQ;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,SAiGhD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentTab.d.ts","sourceRoot":"","sources":["../../../src/audience/hooks/useCurrentTab.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,aAAa,QAAO,MAAM,GAAG,IA+ClC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIdentifyAudience.d.ts","sourceRoot":"","sources":["../../../src/audience/hooks/useIdentifyAudience.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKvD,eAAO,MAAM,mBAAmB,GAAI,2BAIjC;IACD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,SA2BA,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useOpenTabs.d.ts","sourceRoot":"","sources":["../../../src/audience/hooks/useOpenTabs.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,WAAW,QAAO,MA0CvB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A custom React hook to track scroll behavior, speed, and pattern.
|
|
3
|
-
* Uses refs to avoid stale closure issues with the debounced handler.
|
|
4
|
-
* @returns {object} { depth, speedCategory, direction }
|
|
5
|
-
*/
|
|
6
|
-
export declare const useScrollBehavior: () => {
|
|
7
|
-
depth: number;
|
|
8
|
-
speedCategory: "read" | "scan";
|
|
9
|
-
direction: "down" | "up";
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=useScrollBehavior.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollBehavior.d.ts","sourceRoot":"","sources":["../../../src/audience/hooks/useScrollBehavior.tsx"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;CA+E7B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTextSelection.d.ts","sourceRoot":"","sources":["../../../src/audience/hooks/useTextSelection.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,gBAAgB,YA2BrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTrackClicks.d.ts","sourceRoot":"","sources":["../../../src/audience/hooks/useTrackClicks.tsx"],"names":[],"mappings":"AA4DA,QAAA,MAAM,cAAc,YAgMnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare const isTextNode: (el: Element | undefined | null) => el is HTMLElement;
|
|
2
|
-
export declare const makeSafeText: (s: string | null | undefined, length?: number) => string;
|
|
3
|
-
export declare const getSafeText: (el: Element) => string;
|
|
4
|
-
export declare const getEventTarget: (e: Event) => Element | null;
|
|
5
|
-
export declare const shouldCaptureDomEvent: (el: Element, event: Event) => boolean;
|
|
6
|
-
export declare const shouldCaptureValue: (value: string, anchorRegexes?: boolean) => boolean;
|
|
7
|
-
export declare const isAngularStyleAttr: (attributeName: string) => boolean;
|
|
8
|
-
export declare const getDirectAndNestedSpanText: (target: Element) => string;
|
|
9
|
-
export type Property = any;
|
|
10
|
-
export type Properties = Record<string, Property>;
|
|
11
|
-
/** Text source indicates where the text was found */
|
|
12
|
-
export type TextSource = "text" | "aria-label" | "title" | "data-track-label" | "alt" | "placeholder" | "innerText" | "none";
|
|
13
|
-
/**
|
|
14
|
-
* Get element text with comprehensive fallback chain.
|
|
15
|
-
* Priority: direct text → aria-label → title → data-track-label → alt (for images) → placeholder → innerText
|
|
16
|
-
*/
|
|
17
|
-
export declare const getElementTextWithFallback: (el: Element) => {
|
|
18
|
-
text: string;
|
|
19
|
-
source: TextSource;
|
|
20
|
-
};
|
|
21
|
-
export declare const getAttributes: (element: Element) => Properties;
|
|
22
|
-
export declare const getPropertiesFromEvent: (e: Event, eventName: string) => Properties | null;
|
|
23
|
-
//# sourceMappingURL=autocapture.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"autocapture.d.ts","sour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 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rage click detection: If mouse has not moved further than RAGE_CLICK_THRESHOLD_PX
|
|
3
|
-
* over RAGE_CLICK_CLICK_COUNT+ clicks with max RAGE_CLICK_TIMEOUT_MS between clicks,
|
|
4
|
-
* it's counted as a rage click.
|
|
5
|
-
*/
|
|
6
|
-
declare class RageClick {
|
|
7
|
-
clicks: {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
timestamp: number;
|
|
11
|
-
}[];
|
|
12
|
-
constructor();
|
|
13
|
-
/**
|
|
14
|
-
* Check if the current click is part of a rage click sequence.
|
|
15
|
-
* Returns true for 3+ consecutive clicks within threshold.
|
|
16
|
-
*/
|
|
17
|
-
isRageClick(x: number, y: number, timestamp: number): boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Reset the click sequence (useful for testing)
|
|
20
|
-
*/
|
|
21
|
-
reset(): void;
|
|
22
|
-
}
|
|
23
|
-
export declare const rageClick: RageClick;
|
|
24
|
-
export {};
|
|
25
|
-
//# sourceMappingURL=rageclick.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rageclick.d.ts","sourceRoot":"","sources":["../../../src/audience/utils/rageclick.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,cAAM,SAAS;IACb,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;;IAMtD;;;OAGG;IACH,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAsB7D;;OAEG;IACH,KAAK,IAAI,IAAI;CAGd;AAED,eAAO,MAAM,SAAS,WAAkB,CAAC"}
|