@lapwy/js 0.0.0-stage → 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/README.md +19 -2
- package/dist/core.d.cts +55 -0
- package/dist/core.d.ts +55 -0
- package/dist/index.cjs +743 -0
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +710 -0
- package/package.json +30 -3
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Options, type Props, type Tracker } from "./core.cjs";
|
|
2
|
+
export type { Options, Props, Tracker } from "./core.cjs";
|
|
3
|
+
export { DEFAULT_ENDPOINT } from "./core.cjs";
|
|
4
|
+
/**
|
|
5
|
+
* Starts tracking. Safe to call more than once (a second call does nothing)
|
|
6
|
+
* and safe on a server (it does nothing there), so it can sit in shared code.
|
|
7
|
+
*/
|
|
8
|
+
export declare function init(options: Options): Tracker;
|
|
9
|
+
/** Something a visitor did. Before init has run it is kept and sent afterwards. */
|
|
10
|
+
export declare function track(name: string, props?: Props): void;
|
|
11
|
+
/** A page view. Only needed for a page whose address does not change. */
|
|
12
|
+
export declare function page(props?: Props): void;
|
|
13
|
+
/** What the visitor said about cookies. Only matters when the tracker was started with cookie: "consent". */
|
|
14
|
+
export declare function consent(granted: boolean): void;
|
|
15
|
+
/** This page is a dead end. Call it from the "not found" screen of a single-page app. */
|
|
16
|
+
export declare function notFound(status?: number): void;
|
|
17
|
+
/** For tests: forget the tracker of this page. */
|
|
18
|
+
export declare function reset(): void;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Options, type Props, type Tracker } from "./core.js";
|
|
2
|
+
export type { Options, Props, Tracker } from "./core.js";
|
|
3
|
+
export { DEFAULT_ENDPOINT } from "./core.js";
|
|
4
|
+
/**
|
|
5
|
+
* Starts tracking. Safe to call more than once (a second call does nothing)
|
|
6
|
+
* and safe on a server (it does nothing there), so it can sit in shared code.
|
|
7
|
+
*/
|
|
8
|
+
export declare function init(options: Options): Tracker;
|
|
9
|
+
/** Something a visitor did. Before init has run it is kept and sent afterwards. */
|
|
10
|
+
export declare function track(name: string, props?: Props): void;
|
|
11
|
+
/** A page view. Only needed for a page whose address does not change. */
|
|
12
|
+
export declare function page(props?: Props): void;
|
|
13
|
+
/** What the visitor said about cookies. Only matters when the tracker was started with cookie: "consent". */
|
|
14
|
+
export declare function consent(granted: boolean): void;
|
|
15
|
+
/** This page is a dead end. Call it from the "not found" screen of a single-page app. */
|
|
16
|
+
export declare function notFound(status?: number): void;
|
|
17
|
+
/** For tests: forget the tracker of this page. */
|
|
18
|
+
export declare function reset(): void;
|