highseat 0.0.1 → 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +24 -3
- package/index.d.ts +11 -0
- package/index.js +9 -1
- package/index.js.map +1 -0
- package/next.d.ts +3 -0
- package/next.js +3 -0
- package/package.json +57 -8
- package/proxy.d.ts +15 -0
- package/proxy.js +9 -0
- package/proxy.js.map +1 -0
- package/react.d.ts +11 -0
- package/react.js +9 -0
- package/react.js.map +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Piotr Kulpinski
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# highseat
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Highseat analytics for JavaScript: typed tracking, a first-party proxy and framework components.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **Pre-release.** The `alpha` versions publish the package's shape so the release pipeline can be tested end to end. The functions are placeholders and do nothing yet. Use the script tag from your site's Installation settings until a stable version ships.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install highseat@alpha
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Entry points
|
|
14
|
+
|
|
15
|
+
| Import | Contents | Needs |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| `highseat` | `track()` and `identify()` | Nothing |
|
|
18
|
+
| `highseat/react` | `<Highseat />` | React |
|
|
19
|
+
| `highseat/next` | `<Highseat />` and `createProxy()` for Next.js | Next.js |
|
|
20
|
+
| `highseat/proxy` | `createProxy()`, a first-party proxy for any runtime with `fetch` | Nothing |
|
|
21
|
+
|
|
22
|
+
Each entry point loads on its own and imports no framework it does not name, so `highseat/proxy` runs in a Cloudflare Worker without React installed.
|
|
23
|
+
|
|
24
|
+
## Support
|
|
25
|
+
|
|
26
|
+
Report a problem to [support@highseat.com](mailto:support@highseat.com). The source on GitHub, [highseat/highseat-js](https://github.com/highseat/highseat-js), is a read-only mirror and takes no issues or pull requests.
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
2
|
+
/** A value an event property can hold. */
|
|
3
|
+
export type PropertyValue = string | number | boolean;
|
|
4
|
+
/** The properties sent with an event. */
|
|
5
|
+
export type Properties = Record<string, PropertyValue>;
|
|
6
|
+
/** Records a custom event. */
|
|
7
|
+
export declare function track(_name: string, _properties?: Properties): void;
|
|
8
|
+
/** Links the current visitor to a user id from your own system. */
|
|
9
|
+
export declare function identify(_id: string): void;
|
|
10
|
+
//#endregion
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/index.ts
|
|
2
|
+
/** Records a custom event. */
|
|
3
|
+
function track(_name, _properties) {}
|
|
4
|
+
/** Links the current visitor to a user id from your own system. */
|
|
5
|
+
function identify(_id) {}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { identify, track };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/** A value an event property can hold. */\nexport type PropertyValue = string | number | boolean\n\n/** The properties sent with an event. */\nexport type Properties = Record<string, PropertyValue>\n\n/** Records a custom event. */\nexport function track(_name: string, _properties?: Properties): void {}\n\n/** Links the current visitor to a user id from your own system. */\nexport function identify(_id: string): void {}\n"],"mappings":";;AAOA,SAAgB,MAAM,OAAe,aAAgC,CAAC;;AAGtE,SAAgB,SAAS,KAAmB,CAAC"}
|
package/next.d.ts
ADDED
package/next.js
ADDED
package/package.json
CHANGED
|
@@ -1,15 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "highseat",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Highseat:
|
|
5
|
-
"keywords": [
|
|
3
|
+
"version": "0.1.0-alpha.0",
|
|
4
|
+
"description": "Highseat analytics for JavaScript: typed tracking, a first-party proxy and framework components.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"analytics",
|
|
7
|
+
"cookieless",
|
|
8
|
+
"highseat",
|
|
9
|
+
"privacy",
|
|
10
|
+
"web-analytics"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/highseat/highseat-js#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"email": "support@highseat.com"
|
|
15
|
+
},
|
|
6
16
|
"license": "MIT",
|
|
7
17
|
"author": "Piotr Kulpinski",
|
|
8
|
-
"type": "module",
|
|
9
|
-
"main": "index.js",
|
|
10
|
-
"files": ["index.js", "README.md"],
|
|
11
18
|
"repository": {
|
|
12
19
|
"type": "git",
|
|
13
|
-
"url": "https://github.com/highseat"
|
|
14
|
-
|
|
20
|
+
"url": "git+https://github.com/highseat/highseat-js.git",
|
|
21
|
+
"directory": "packages/highseat"
|
|
22
|
+
},
|
|
23
|
+
"type": "module",
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./index.d.ts",
|
|
28
|
+
"import": "./index.js"
|
|
29
|
+
},
|
|
30
|
+
"./react": {
|
|
31
|
+
"types": "./react.d.ts",
|
|
32
|
+
"import": "./react.js"
|
|
33
|
+
},
|
|
34
|
+
"./next": {
|
|
35
|
+
"types": "./next.d.ts",
|
|
36
|
+
"import": "./next.js"
|
|
37
|
+
},
|
|
38
|
+
"./proxy": {
|
|
39
|
+
"types": "./proxy.d.ts",
|
|
40
|
+
"import": "./proxy.js"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"next": ">=14",
|
|
48
|
+
"react": ">=18"
|
|
49
|
+
},
|
|
50
|
+
"peerDependenciesMeta": {
|
|
51
|
+
"next": {
|
|
52
|
+
"optional": true
|
|
53
|
+
},
|
|
54
|
+
"react": {
|
|
55
|
+
"optional": true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=18"
|
|
60
|
+
},
|
|
61
|
+
"main": "./index.js",
|
|
62
|
+
"module": "./index.js",
|
|
63
|
+
"types": "./index.d.ts"
|
|
15
64
|
}
|
package/proxy.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/proxy.d.ts
|
|
2
|
+
export interface ProxyOptions {
|
|
3
|
+
/** The site's proxy path. */
|
|
4
|
+
path?: string;
|
|
5
|
+
/** The site secret, `hs_secret_…`. */
|
|
6
|
+
secret?: string;
|
|
7
|
+
/** The ingest origin the proxy forwards to. */
|
|
8
|
+
upstream?: string;
|
|
9
|
+
}
|
|
10
|
+
/** A fetch handler, the shape every supported runtime and framework route accepts. */
|
|
11
|
+
export type ProxyHandler = (request: Request) => Promise<Response>;
|
|
12
|
+
/** Creates the first-party proxy handler for a site. */
|
|
13
|
+
export declare function createProxy(_options?: ProxyOptions): ProxyHandler;
|
|
14
|
+
//#endregion
|
|
15
|
+
//# sourceMappingURL=proxy.d.ts.map
|
package/proxy.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/proxy.ts
|
|
2
|
+
/** Creates the first-party proxy handler for a site. */
|
|
3
|
+
function createProxy(_options = {}) {
|
|
4
|
+
return async () => new Response("Not implemented", { status: 501 });
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { createProxy };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=proxy.js.map
|
package/proxy.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.js","names":[],"sources":["../src/proxy.ts"],"sourcesContent":["export interface ProxyOptions {\n /** The site's proxy path. */\n path?: string\n /** The site secret, `hs_secret_…`. */\n secret?: string\n /** The ingest origin the proxy forwards to. */\n upstream?: string\n}\n\n/** A fetch handler, the shape every supported runtime and framework route accepts. */\nexport type ProxyHandler = (request: Request) => Promise<Response>\n\n/** Creates the first-party proxy handler for a site. */\nexport function createProxy(_options: ProxyOptions = {}): ProxyHandler {\n return async () => new Response(\"Not implemented\", { status: 501 })\n}\n"],"mappings":";;AAaA,SAAgB,YAAY,WAAyB,CAAC,GAAiB;CACrE,OAAO,YAAY,IAAI,SAAS,mBAAmB,EAAE,QAAQ,IAAI,CAAC;AACpE"}
|
package/react.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/react.d.ts
|
|
2
|
+
export interface HighseatProps {
|
|
3
|
+
/** The site id, `site_…`. */
|
|
4
|
+
site: string;
|
|
5
|
+
/** The script URL, when the tracker is served from your own path. */
|
|
6
|
+
src?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Loads the Highseat tracker on the page. */
|
|
9
|
+
export declare function Highseat(_props: HighseatProps): null;
|
|
10
|
+
//#endregion
|
|
11
|
+
//# sourceMappingURL=react.d.ts.map
|
package/react.js
ADDED
package/react.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.js","names":[],"sources":["../src/react.ts"],"sourcesContent":["export interface HighseatProps {\n /** The site id, `site_…`. */\n site: string\n /** The script URL, when the tracker is served from your own path. */\n src?: string\n}\n\n/** Loads the Highseat tracker on the page. */\nexport function Highseat(_props: HighseatProps): null {\n return null\n}\n"],"mappings":";;AAQA,SAAgB,SAAS,QAA6B;CACpD,OAAO;AACT"}
|