@levo-so/react 0.1.59 → 0.1.61
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/block.d.ts +1 -1
- package/dist/audience/components/component.d.ts +1 -1
- package/dist/audience/components/page.d.ts +3 -2
- package/dist/audience/hooks/useIdentifyAudience.d.ts +1 -1
- package/dist/audience/hooks/useScrollBehavior.d.ts +4 -2
- package/dist/audience/utils/autocapture.d.ts +10 -0
- package/dist/audience/utils/rageclick.d.ts +13 -0
- package/dist/components/Sonner.d.ts +1 -1
- package/dist/components/Table.d.ts +1 -1
- package/dist/components/button/buttonVariants.d.ts +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1314 -1382
- package/dist/providers/LevoProvider.d.ts +3 -0
- package/dist/utils/index.d.ts +1 -1
- package/package.json +9 -10
- package/dist/audience/hooks/useDownloadSpeed.d.ts +0 -3
- package/dist/audience/hooks/usePerformanceMetrics.d.ts +0 -12
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ILevoClient } from '@levo-so/core';
|
|
2
|
+
import { ILevoAudience, ILevoInsights } from '@levo-so/insights';
|
|
2
3
|
declare global {
|
|
3
4
|
interface Window {
|
|
4
5
|
levo_client?: ILevoClient;
|
|
5
|
-
|
|
6
|
+
levo_insights?: ILevoInsights;
|
|
6
7
|
}
|
|
7
8
|
}
|
|
8
9
|
export declare const LevoAudiencePage: React.FC<{
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A custom React hook to track scroll behavior, speed, and pattern.
|
|
3
|
-
*
|
|
3
|
+
* Uses refs to avoid stale closure issues with the debounced handler.
|
|
4
|
+
* @returns {object} { depth, speedCategory, direction }
|
|
4
5
|
*/
|
|
5
6
|
export declare const useScrollBehavior: () => {
|
|
6
7
|
depth: number;
|
|
7
|
-
speedCategory:
|
|
8
|
+
speedCategory: "read" | "scan";
|
|
9
|
+
direction: "down" | "up";
|
|
8
10
|
};
|
|
9
11
|
//# sourceMappingURL=useScrollBehavior.d.ts.map
|
|
@@ -8,6 +8,16 @@ export declare const isAngularStyleAttr: (attributeName: string) => boolean;
|
|
|
8
8
|
export declare const getDirectAndNestedSpanText: (target: Element) => string;
|
|
9
9
|
export type Property = any;
|
|
10
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
|
+
};
|
|
11
21
|
export declare const getAttributes: (element: Element) => Properties;
|
|
12
22
|
export declare const getPropertiesFromEvent: (e: Event, eventName: string) => Properties | null;
|
|
13
23
|
//# sourceMappingURL=autocapture.d.ts.map
|
|
@@ -1,3 +1,8 @@
|
|
|
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
|
+
*/
|
|
1
6
|
declare class RageClick {
|
|
2
7
|
clicks: {
|
|
3
8
|
x: number;
|
|
@@ -5,7 +10,15 @@ declare class RageClick {
|
|
|
5
10
|
timestamp: number;
|
|
6
11
|
}[];
|
|
7
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
|
+
*/
|
|
8
17
|
isRageClick(x: number, y: number, timestamp: number): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Reset the click sequence (useful for testing)
|
|
20
|
+
*/
|
|
21
|
+
reset(): void;
|
|
9
22
|
}
|
|
10
23
|
export declare const rageClick: RageClick;
|
|
11
24
|
export {};
|
|
@@ -3,5 +3,5 @@ type ToasterProps = React.ComponentProps<typeof Sonner>;
|
|
|
3
3
|
export declare const Toaster: ({ ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare const errorToast: (message: string, title?: string, options?: ExternalToast) => void;
|
|
5
5
|
export declare const successToast: (message: string, title?: string, options?: ExternalToast) => void;
|
|
6
|
-
export { toast, ExternalToast };
|
|
6
|
+
export { toast, type ExternalToast };
|
|
7
7
|
//# sourceMappingURL=Sonner.d.ts.map
|
|
@@ -7,5 +7,5 @@ declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTM
|
|
|
7
7
|
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
8
8
|
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
9
|
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
10
|
-
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
|
|
11
11
|
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const buttonVariants: (props?: ({
|
|
2
|
-
variant?: "default" | "destructive" | "destructiveOutline" | "outline" | "secondary" | "secondaryOutline" | "ghost" |
|
|
2
|
+
variant?: "link" | "default" | "destructive" | "destructiveOutline" | "outline" | "secondary" | "secondaryOutline" | "ghost" | null | undefined;
|
|
3
3
|
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-small" | null | undefined;
|
|
4
|
-
rounded?: "
|
|
4
|
+
rounded?: "small" | "default" | "large" | "full" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
//# sourceMappingURL=buttonVariants.d.ts.map
|