analytica.click 0.0.637 → 0.0.638

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 (2) hide show
  1. package/dist/index.d.ts +1 -233
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,233 +1 @@
1
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/components/AnalyticaClickProvider/index' {
2
- import React from 'react';
3
- import type { IAnalyticaConfig } from 'analytica.click/dist/packages/analytica.click/dist/src/types';
4
- export const AnalyticaConfigContext: React.Context<IAnalyticaConfig>;
5
- export const AnalyticaClickProvider: ({ children, values, }: {
6
- children: React.ReactNode;
7
- values: IAnalyticaConfig;
8
- }) => import("react/jsx-runtime").JSX.Element;
9
-
10
- }
11
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/components/ErrorBoundary/Comp' {
12
- import React, { Component } from 'react';
13
- import type { TErrorMessage } from 'analytica.click/dist/packages/analytica.click/dist/src/types';
14
- export interface IErrorBoundaryProps {
15
- notify?: TErrorMessage;
16
- children?: React.ReactNode;
17
- }
18
- export class ErrorBoundary extends Component<IErrorBoundaryProps, {
19
- hasError: ErrorEvent | undefined;
20
- }> {
21
- seenError: boolean;
22
- constructor(props: any);
23
- static getDerivedStateFromError(errorV: any): {
24
- hasError: any;
25
- };
26
- render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
27
- }
28
-
29
- }
30
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/components/ErrorBoundary/index' {
31
- import type { JSX } from 'react';
32
- import React from 'react';
33
- export const ErrorBoundary: ({ children, }: {
34
- children?: React.ReactNode;
35
- }) => JSX.Element;
36
-
37
- }
38
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/components/Modal/index' {
39
- import React from 'react';
40
- export interface ModalProps {
41
- open: boolean;
42
- setOpen: (open: boolean) => void;
43
- children: React.ReactNode;
44
- }
45
- export const Modal: React.FC<ModalProps>;
46
-
47
- }
48
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/components/index' {
49
- export * from 'analytica.click/dist/packages/analytica.click/dist/src/components/AnalyticaClickProvider/index';
50
- export * from 'analytica.click/dist/packages/analytica.click/dist/src/components/Modal/index';
51
-
52
- }
53
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/helpers/apiTypes' {
54
- export interface PostEventData {
55
- eventName: string;
56
- pageReferrer?: string;
57
- pageTitle?: string;
58
- browserResolution?: string;
59
- browserLanguage?: string;
60
- browserFingerprint?: string;
61
- pageLocation: string;
62
- browser?: string;
63
- }
64
- export interface PostEvent {
65
- key: string;
66
- data: PostEventData;
67
- }
68
- export interface PostSiteTrackData {
69
- pageReferrer?: string;
70
- pageTitle?: string;
71
- browserResolution?: string;
72
- browserLanguage?: string;
73
- browserFingerprint?: string;
74
- pageLocation: string;
75
- browser?: string;
76
- }
77
- export interface PostSiteTrack {
78
- key: string;
79
- data: PostSiteTrackData;
80
- }
81
- export interface PostErrorData {
82
- message: string;
83
- name?: string;
84
- stack?: string;
85
- href: string;
86
- filename?: string;
87
- }
88
- export interface PostError {
89
- data: PostErrorData;
90
- key: string;
91
- }
92
- export interface PostMetricData {
93
- type: string;
94
- value: number;
95
- }
96
- export interface PostMetric {
97
- key: string;
98
- data: PostMetricData;
99
- }
100
-
101
- }
102
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/helpers/browser' {
103
- import type { IAnalyticaConfig } from 'analytica.click/dist/packages/analytica.click/dist/src/types';
104
- export function onBrowserError({ ev, values, }: {
105
- ev: ErrorEvent;
106
- values: IAnalyticaConfig;
107
- }): Promise<void>;
108
- export function OverloadBrowser(values: IAnalyticaConfig): void;
109
-
110
- }
111
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/helpers/console' {
112
- import type { IAnalyticaConfig } from 'analytica.click/dist/packages/analytica.click/dist/src/types';
113
- export function OverloadConsole(values: IAnalyticaConfig): void;
114
-
115
- }
116
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/helpers/errorTrack' {
117
- import 'cross-fetch/polyfill';
118
- import type { PostError, PostErrorData } from 'analytica.click/dist/packages/analytica.click/dist/src/helpers/apiTypes';
119
- export const errorTrack: ({ data, overrideBaseUrl, ignoreBrowserErrors, devMode, }: {
120
- data: PostError;
121
- overrideBaseUrl?: string;
122
- /** will ignore any errors that contain these strings */
123
- ignoreBrowserErrors?: string[];
124
- devMode?: boolean;
125
- }) => Promise<{} | undefined>;
126
- export const getErrorKey: (p: PostErrorData) => string;
127
-
128
- }
129
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/helpers/index' {
130
- export * from 'analytica.click/dist/packages/analytica.click/dist/src/helpers/errorTrack';
131
- export * from 'analytica.click/dist/packages/analytica.click/dist/src/helpers/log';
132
- export * from 'analytica.click/dist/packages/analytica.click/dist/src/helpers/server';
133
- export * from 'analytica.click/dist/packages/analytica.click/dist/src/helpers/useAnalytica';
134
-
135
- }
136
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/helpers/log' {
137
- export const tokenMissing: (comp: string) => string;
138
-
139
- }
140
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/helpers/node' {
141
- import type { IAnalyticaConfig } from 'analytica.click/dist/packages/analytica.click/dist/src/types';
142
- export function OverloadNode(values: IAnalyticaConfig): void;
143
-
144
- }
145
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/helpers/object' {
146
- export const takeObject: <T>(ob: Record<string, T>, num: number) => {
147
- part: T[];
148
- rest: Record<string, T>;
149
- };
150
-
151
- }
152
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/helpers/server' {
153
- import 'cross-fetch/polyfill';
154
- import type { TEvent, TMetric, TPage } from 'analytica.click/dist/packages/analytica.click/dist/src/types';
155
- /** used for tracking arbitrary events */
156
- export const event: TEvent;
157
- /** used for tracking visits to a page */
158
- export const page: TPage;
159
- /** used for tracking custom metrics */
160
- export const metric: TMetric;
161
-
162
- }
163
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/helpers/useAnalytica' {
164
- import type { IEvent, IMetric, IPage } from 'analytica.click/dist/packages/analytica.click/dist/src/types';
165
- export const useAnalytica: () => {
166
- event: (d: Omit<IEvent, "analyticaToken" | "overrideBaseUrl">) => void;
167
- page: (d: Omit<IPage, "analyticaToken" | "overrideBaseUrl">) => void;
168
- metric: (d: Omit<IMetric, "analyticaToken" | "overrideBaseUrl">) => void;
169
- };
170
-
171
- }
172
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/index' {
173
- export * from 'analytica.click/dist/packages/analytica.click/dist/src/components/index';
174
- export * from 'analytica.click/dist/packages/analytica.click/dist/src/helpers/index';
175
-
176
- }
177
- declare module 'analytica.click/dist/packages/analytica.click/dist/src/types' {
178
- export type TEvent = (p: IEvent) => Promise<{
179
- error?: string;
180
- }>;
181
- export interface IEvent {
182
- analyticaToken: string;
183
- overrideBaseUrl?: string;
184
- eventName: string;
185
- /** internal testing only. also allows local sending of errors */
186
- devMode?: boolean;
187
- valueOverrides?: {
188
- browserFingerprint?: string;
189
- };
190
- }
191
- export type TPage = (p: IPage) => Promise<{
192
- error?: string;
193
- }>;
194
- export interface IPage {
195
- analyticaToken: string;
196
- overrideBaseUrl?: string;
197
- /** internal testing only. also allows local sending of errors */
198
- devMode?: boolean;
199
- valueOverrides?: {
200
- browserFingerprint?: string;
201
- };
202
- }
203
- export type TMetric = (p: IMetric) => Promise<{
204
- error?: string;
205
- }>;
206
- export interface IMetric {
207
- analyticaToken: string;
208
- overrideBaseUrl?: string;
209
- type: string;
210
- value: number;
211
- /** internal testing only. also allows local sending of errors */
212
- devMode?: boolean;
213
- }
214
- export type TErrorMessage = (m: ErrorEvent) => Promise<void>;
215
- export interface IAnalyticaConfig {
216
- analyticaToken: string;
217
- overrideBaseUrl?: string;
218
- /** internal testing only. also allows local sending of errors */
219
- devMode?: boolean;
220
- /** ignore any browser errors that include these words.
221
- * default: 'will be removed', 'performing full reload', 'tracking error', 'fetch RSC payload',
222
- */
223
- ignoreBrowserErrors?: string[];
224
- valueOverrides?: {
225
- browserFingerprint?: string;
226
- };
227
- }
228
-
229
- }
230
- declare module 'analytica.click' {
231
- import main = require('analytica.click/dist/index');
232
- export = main;
233
- }
1
+ export * from './src/index';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "analytica.click",
3
- "version": "0.0.637",
3
+ "version": "0.0.638",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",