clearcote 0.51.1 → 0.53.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 +38 -2
- package/dist/attention.d.ts +26 -0
- package/dist/attention.d.ts.map +1 -0
- package/dist/attention.js +82 -0
- package/dist/attention.js.map +1 -0
- package/dist/cloud.d.ts +10 -3
- package/dist/cloud.d.ts.map +1 -1
- package/dist/cloud.js +9 -1
- package/dist/cloud.js.map +1 -1
- package/dist/forms.d.ts +8 -0
- package/dist/forms.d.ts.map +1 -1
- package/dist/forms.js +56 -0
- package/dist/forms.js.map +1 -1
- package/dist/frames.d.ts +33 -0
- package/dist/frames.d.ts.map +1 -0
- package/dist/frames.js +415 -0
- package/dist/frames.js.map +1 -0
- package/dist/geometry.d.ts +94 -10
- package/dist/geometry.d.ts.map +1 -1
- package/dist/geometry.js +162 -9
- package/dist/geometry.js.map +1 -1
- package/dist/hold.d.ts +14 -7
- package/dist/hold.d.ts.map +1 -1
- package/dist/hold.js +33 -6
- package/dist/hold.js.map +1 -1
- package/dist/humanize.d.ts +49 -20
- package/dist/humanize.d.ts.map +1 -1
- package/dist/humanize.js +2024 -261
- package/dist/humanize.js.map +1 -1
- package/dist/hzoptions.d.ts +78 -0
- package/dist/hzoptions.d.ts.map +1 -0
- package/dist/hzoptions.js +171 -0
- package/dist/hzoptions.js.map +1 -0
- package/dist/index.d.ts +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -16
- package/dist/index.js.map +1 -1
- package/dist/isolated.d.ts +6 -0
- package/dist/isolated.d.ts.map +1 -1
- package/dist/isolated.js +57 -1
- package/dist/isolated.js.map +1 -1
- package/dist/keys.d.ts +69 -0
- package/dist/keys.d.ts.map +1 -0
- package/dist/keys.js +201 -0
- package/dist/keys.js.map +1 -0
- package/dist/motion.d.ts +130 -12
- package/dist/motion.d.ts.map +1 -1
- package/dist/motion.js +258 -19
- package/dist/motion.js.map +1 -1
- package/dist/motionscore.d.ts +81 -0
- package/dist/motionscore.d.ts.map +1 -1
- package/dist/motionscore.js +279 -2
- package/dist/motionscore.js.map +1 -1
- package/dist/pacing.d.ts +5 -0
- package/dist/pacing.d.ts.map +1 -1
- package/dist/pacing.js +10 -0
- package/dist/pacing.js.map +1 -1
- package/dist/scroll.d.ts +143 -0
- package/dist/scroll.d.ts.map +1 -0
- package/dist/scroll.js +426 -0
- package/dist/scroll.js.map +1 -0
- package/dist/trace.d.ts +12 -0
- package/dist/trace.d.ts.map +1 -0
- package/dist/trace.js +60 -0
- package/dist/trace.js.map +1 -0
- package/dist/windowgeom.d.ts +40 -0
- package/dist/windowgeom.d.ts.map +1 -0
- package/dist/windowgeom.js +167 -0
- package/dist/windowgeom.js.map +1 -0
- package/package.json +1 -1
package/dist/trace.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Humanize score hook (SC 232 lane G; mirrors sdk/python/clearcote/_trace.py).
|
|
2
|
+
//
|
|
3
|
+
// CLEARCOTE_HUMANIZE_SCORE=1 makes the SDK record every action it dispatches, score it with
|
|
4
|
+
// motionscore.scoreAction and append one JSON line per action to CLEARCOTE_HUMANIZE_SCORE_FILE (default
|
|
5
|
+
// ./clearcote-humanize-score.jsonl). A score below WARN_BELOW prints a `clearcote: warning:` line naming
|
|
6
|
+
// the penalties (once per kind + penalty set, through warnings.warnOnce).
|
|
7
|
+
//
|
|
8
|
+
// Read-only tap: nothing here changes what is dispatched or when, and record() never throws.
|
|
9
|
+
// Callers: pacing.walk (every walked pointer path, kind glide/drag/ambient, ACTUAL dispatch times); the
|
|
10
|
+
// typing loop (lane D) record("typed", [{key, down, up}]); the wheel loop (lane E) record("wheel",
|
|
11
|
+
// [{t, dy, dx, mode}]); hover dwell (lane C) record("hover", samplesFromArrival).
|
|
12
|
+
import { appendFileSync } from "node:fs";
|
|
13
|
+
import { scoreAction } from "./motionscore.js";
|
|
14
|
+
import { warnOnce } from "./warnings.js";
|
|
15
|
+
export const SCORE_ENV = "CLEARCOTE_HUMANIZE_SCORE";
|
|
16
|
+
export const SCORE_FILE_ENV = "CLEARCOTE_HUMANIZE_SCORE_FILE";
|
|
17
|
+
export const DEFAULT_SCORE_FILE = "./clearcote-humanize-score.jsonl";
|
|
18
|
+
export const WARN_BELOW = 0.7;
|
|
19
|
+
const FALSE = new Set(["", "0", "false", "off", "no"]);
|
|
20
|
+
/** True when the hook is on (CLEARCOTE_HUMANIZE_SCORE set to anything but 0/false/off/no). */
|
|
21
|
+
export function traceEnabled() {
|
|
22
|
+
return !FALSE.has((process.env[SCORE_ENV] ?? "").trim().toLowerCase());
|
|
23
|
+
}
|
|
24
|
+
export function scoreFile() {
|
|
25
|
+
return process.env[SCORE_FILE_ENV] || DEFAULT_SCORE_FILE;
|
|
26
|
+
}
|
|
27
|
+
const r4 = (v) => {
|
|
28
|
+
if (typeof v === "number")
|
|
29
|
+
return Number.isFinite(v) ? Math.round(v * 1e4) / 1e4 : v;
|
|
30
|
+
if (Array.isArray(v))
|
|
31
|
+
return v.map(r4);
|
|
32
|
+
if (v && typeof v === "object")
|
|
33
|
+
return Object.fromEntries(Object.entries(v).map(([k, x]) => [k, r4(x)]));
|
|
34
|
+
return v;
|
|
35
|
+
};
|
|
36
|
+
/** Score `samples` as `kind` and append the line; returns the score (null when the hook is off, the
|
|
37
|
+
* sample list is empty, or anything failed). */
|
|
38
|
+
export function record(kind, samples, meta) {
|
|
39
|
+
if (!traceEnabled() || !samples || !samples.length)
|
|
40
|
+
return null;
|
|
41
|
+
try {
|
|
42
|
+
const r = scoreAction(kind, samples);
|
|
43
|
+
const line = {
|
|
44
|
+
t: Date.now() / 1000, pid: process.pid, kind: r.kind, n: samples.length,
|
|
45
|
+
score: r.score, flags: r.flags, features: r4(r.features),
|
|
46
|
+
};
|
|
47
|
+
if (meta)
|
|
48
|
+
line.meta = r4(meta);
|
|
49
|
+
appendFileSync(scoreFile(), JSON.stringify(line) + "\n", "utf8");
|
|
50
|
+
if (r.score < WARN_BELOW) {
|
|
51
|
+
const names = r.flags.map((f) => f.split("(")[0]).join(", ") || "none";
|
|
52
|
+
warnOnce(`humanize-score:${r.kind}:${names}`, `humanize ${r.kind} scored ${r.score.toFixed(2)} (< ${WARN_BELOW}): ${names}`);
|
|
53
|
+
}
|
|
54
|
+
return r;
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=trace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace.js","sourceRoot":"","sources":["../src/trace.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,EAAE;AACF,4FAA4F;AAC5F,wGAAwG;AACxG,yGAAyG;AACzG,0EAA0E;AAC1E,EAAE;AACF,6FAA6F;AAC7F,wGAAwG;AACxG,mGAAmG;AACnG,kFAAkF;AAElF,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,WAAW,EAAoB,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,CAAC,MAAM,SAAS,GAAG,0BAA0B,CAAC;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,+BAA+B,CAAC;AAC9D,MAAM,CAAC,MAAM,kBAAkB,GAAG,kCAAkC,CAAC;AACrE,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAC;AAE9B,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AAEvD,8FAA8F;AAC9F,MAAM,UAAU,YAAY;IAC1B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;AACzE,CAAC;AAED,MAA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E,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;SACzD,CAAC;QACF,IAAI,IAAI;YAAE,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QAC/B,cAAc,CAAC,SAAS,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC;QACjE,IAAI,CAAC,CAAC,KAAK,GAAG,UAAU,EAAE,CAAC;YACzB,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC;YACvE,QAAQ,CAAC,kBAAkB,CAAC,CAAC,IAAI,IAAI,KAAK,EAAE,EAAE,YAAY,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,UAAU,MAAM,KAAK,EAAE,CAAC,CAAC;QAC/H,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The persona browser window: maximized, snapped, or a restored rectangle, derived from a seed and the
|
|
3
|
+
* final screen / work area.
|
|
4
|
+
*
|
|
5
|
+
* A bit-exact port of the engine's `components/ungoogled/persona_window_geometry.cc` (r39), which the
|
|
6
|
+
* engine applies natively to every persona launch: the headless display becomes the persona's display
|
|
7
|
+
* and the first window is created with the persona's bounds and show state, so `outerWidth` /
|
|
8
|
+
* `outerHeight` / `screenX` / `screenY` are the real window's. The SDK uses this port in its tests
|
|
9
|
+
* (the parity vector is the engine's own output) and to predict a persona's window.
|
|
10
|
+
*
|
|
11
|
+
* 64-bit arithmetic in BigInt, masked; every other value is a small integer, so Python, Node and .NET
|
|
12
|
+
* agree on every rectangle.
|
|
13
|
+
*/
|
|
14
|
+
export declare const WINDOW_ALGORITHM_VERSION = 1;
|
|
15
|
+
export declare const MIN_AVAIL_WIDTH = 800;
|
|
16
|
+
export declare const MIN_AVAIL_HEIGHT = 560;
|
|
17
|
+
export declare const WINDOW_PLATFORMS: Readonly<Record<string, number>>;
|
|
18
|
+
export type WindowKind = "maximized" | "near" | "snap-left" | "snap-right" | "restored";
|
|
19
|
+
export interface PersonaWindow {
|
|
20
|
+
valid: boolean;
|
|
21
|
+
state?: "maximized" | "normal";
|
|
22
|
+
kind?: WindowKind;
|
|
23
|
+
/** The normal (restored) rectangle in work-area coordinates; a maximized window restores here. */
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
}
|
|
29
|
+
/** The window for an identity seed on a work area; `{ valid: false }` when it is too small for a desktop. */
|
|
30
|
+
export declare function deriveWindow(seed: bigint, screenWidth: number, screenHeight: number, availWidth: number, availHeight: number, platform?: string | number): PersonaWindow;
|
|
31
|
+
/** The engine's saved-placement tag value (PersonaWindowKey) for these inputs. */
|
|
32
|
+
export declare function windowKey(seed: bigint, screenWidth: number, screenHeight: number, availWidth: number, availHeight: number, platform?: string | number): bigint;
|
|
33
|
+
/** FNV-1a 64 of a UTF-8 string: the engine's PersonaSeedFromString for non-numeric values. */
|
|
34
|
+
export declare function fnv1a64(text: string): bigint;
|
|
35
|
+
/**
|
|
36
|
+
* The engine's persona_seed for a `fingerprint` value: the value itself when it is an unsigned 64-bit
|
|
37
|
+
* decimal, else FNV-1a 64, then one SplitMix64 step (MixedPersonaSeed).
|
|
38
|
+
*/
|
|
39
|
+
export declare function mixedSeed(raw: string | number | bigint): bigint;
|
|
40
|
+
//# sourceMappingURL=windowgeom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|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AG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAI/D"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The persona browser window: maximized, snapped, or a restored rectangle, derived from a seed and the
|
|
3
|
+
* final screen / work area.
|
|
4
|
+
*
|
|
5
|
+
* A bit-exact port of the engine's `components/ungoogled/persona_window_geometry.cc` (r39), which the
|
|
6
|
+
* engine applies natively to every persona launch: the headless display becomes the persona's display
|
|
7
|
+
* and the first window is created with the persona's bounds and show state, so `outerWidth` /
|
|
8
|
+
* `outerHeight` / `screenX` / `screenY` are the real window's. The SDK uses this port in its tests
|
|
9
|
+
* (the parity vector is the engine's own output) and to predict a persona's window.
|
|
10
|
+
*
|
|
11
|
+
* 64-bit arithmetic in BigInt, masked; every other value is a small integer, so Python, Node and .NET
|
|
12
|
+
* agree on every rectangle.
|
|
13
|
+
*/
|
|
14
|
+
const MASK64 = (1n << 64n) - 1n;
|
|
15
|
+
export const WINDOW_ALGORITHM_VERSION = 1;
|
|
16
|
+
export const MIN_AVAIL_WIDTH = 800;
|
|
17
|
+
export const MIN_AVAIL_HEIGHT = 560;
|
|
18
|
+
const WINDOW_SALT = 0x5b1e7a3c9d24f681n;
|
|
19
|
+
const WINDOW_KEY_SALT = 0xc2b2ae3d27d4eb4fn;
|
|
20
|
+
const MIN_WIDTH = 900;
|
|
21
|
+
const MIN_HEIGHT = 600;
|
|
22
|
+
const MIN_SNAP_WIDTH = 900;
|
|
23
|
+
const MAX_TOP_OFFSET = 65;
|
|
24
|
+
const MAX_NEAR_OFFSET = 60;
|
|
25
|
+
export const WINDOW_PLATFORMS = { windows: 0, linux: 1, macos: 2 };
|
|
26
|
+
// [maximized, near, snap, restored] per-mille by work-area width: <= 1440, <= 1680, <= 1920, <= 2560,
|
|
27
|
+
// wider. Each row sums to 1000. Same table as the engine.
|
|
28
|
+
const WEIGHTS = [
|
|
29
|
+
[700, 50, 0, 250],
|
|
30
|
+
[670, 50, 0, 280],
|
|
31
|
+
[640, 50, 10, 300],
|
|
32
|
+
[530, 50, 10, 410],
|
|
33
|
+
[450, 50, 10, 490],
|
|
34
|
+
];
|
|
35
|
+
function mix(z) {
|
|
36
|
+
z = ((z ^ (z >> 30n)) * 0xbf58476d1ce4e5b9n) & MASK64;
|
|
37
|
+
z = ((z ^ (z >> 27n)) * 0x94d049bb133111ebn) & MASK64;
|
|
38
|
+
return z ^ (z >> 31n);
|
|
39
|
+
}
|
|
40
|
+
class Stream {
|
|
41
|
+
state;
|
|
42
|
+
constructor(state) { this.state = state & MASK64; }
|
|
43
|
+
next() {
|
|
44
|
+
this.state = (this.state + 0x9e3779b97f4a7c15n) & MASK64;
|
|
45
|
+
return mix(this.state);
|
|
46
|
+
}
|
|
47
|
+
below(n) { return Number(this.next() % BigInt(n)); }
|
|
48
|
+
range(lo, hi) { return lo + this.below(hi - lo + 1); }
|
|
49
|
+
}
|
|
50
|
+
const u32 = (v) => BigInt(v >>> 0);
|
|
51
|
+
function inputHash(seed, sw, sh, aw, ah, platform, salt) {
|
|
52
|
+
let h = mix((seed & MASK64) ^ salt);
|
|
53
|
+
h = mix(h ^ ((u32(sw) << 32n) | u32(sh)));
|
|
54
|
+
h = mix(h ^ ((u32(aw) << 32n) | u32(ah)));
|
|
55
|
+
h = mix(h ^ ((BigInt(platform) << 8n) | BigInt(WINDOW_ALGORITHM_VERSION)));
|
|
56
|
+
return h;
|
|
57
|
+
}
|
|
58
|
+
const permille = (total, pm) => Math.floor((total * pm) / 1000);
|
|
59
|
+
const clamp = (v, lo, hi) => (v < lo ? lo : v > hi ? hi : v);
|
|
60
|
+
function skewed(s) {
|
|
61
|
+
const a = s.range(0, 1000);
|
|
62
|
+
const b = s.range(0, 1000);
|
|
63
|
+
return Math.min(a, b);
|
|
64
|
+
}
|
|
65
|
+
function span(s, total, loPm, hiPm, floor) {
|
|
66
|
+
const lo = Math.min(total, Math.max(floor, permille(total, loPm)));
|
|
67
|
+
const hi = Math.min(total, Math.max(lo, permille(total, hiPm)));
|
|
68
|
+
return s.range(lo, hi);
|
|
69
|
+
}
|
|
70
|
+
function drawRestored(s, aw, ah, g) {
|
|
71
|
+
const minW = Math.min(aw, MIN_WIDTH);
|
|
72
|
+
const minH = Math.min(ah, MIN_HEIGHT);
|
|
73
|
+
let w = span(s, aw, 420, 900, minW);
|
|
74
|
+
let h = s.below(10) < 8 ? span(s, ah, 780, 1000, minH) : span(s, ah, 450, 780, minH);
|
|
75
|
+
const loW = Math.max(minW, Math.floor((11 * h + 9) / 10));
|
|
76
|
+
const hiW = Math.min(aw, 2 * h);
|
|
77
|
+
if (loW <= hiW) {
|
|
78
|
+
w = clamp(w, loW, hiW);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
h = clamp(h, Math.max(minH, Math.floor((w + 1) / 2)), Math.min(ah, Math.max(minH, Math.floor((10 * w) / 11))));
|
|
82
|
+
}
|
|
83
|
+
g.width = w;
|
|
84
|
+
g.height = h;
|
|
85
|
+
const slackX = aw - w;
|
|
86
|
+
const slackY = ah - h;
|
|
87
|
+
g.y = permille(Math.min(slackY, MAX_TOP_OFFSET), skewed(s));
|
|
88
|
+
const where = s.below(100);
|
|
89
|
+
if (where < 25)
|
|
90
|
+
g.x = 0;
|
|
91
|
+
else if (where < 35)
|
|
92
|
+
g.x = permille(slackX, s.range(1, 100));
|
|
93
|
+
else {
|
|
94
|
+
const a = s.range(0, 1000);
|
|
95
|
+
const b = s.range(0, 1000);
|
|
96
|
+
g.x = permille(slackX, Math.floor((a + b) / 2));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function platformCode(p) {
|
|
100
|
+
if (typeof p === "number")
|
|
101
|
+
return p;
|
|
102
|
+
return WINDOW_PLATFORMS[String(p ?? "windows").toLowerCase()] ?? 0;
|
|
103
|
+
}
|
|
104
|
+
/** The window for an identity seed on a work area; `{ valid: false }` when it is too small for a desktop. */
|
|
105
|
+
export function deriveWindow(seed, screenWidth, screenHeight, availWidth, availHeight, platform = "windows") {
|
|
106
|
+
const sw = Math.trunc(screenWidth), sh = Math.trunc(screenHeight);
|
|
107
|
+
const aw = Math.trunc(availWidth), ah = Math.trunc(availHeight);
|
|
108
|
+
const g = { valid: false, x: 0, y: 0, width: 0, height: 0 };
|
|
109
|
+
if (aw < MIN_AVAIL_WIDTH || ah < MIN_AVAIL_HEIGHT || sw < aw || sh < ah)
|
|
110
|
+
return g;
|
|
111
|
+
const plat = platformCode(platform);
|
|
112
|
+
const s = new Stream(inputHash(seed, sw, sh, aw, ah, plat, WINDOW_SALT));
|
|
113
|
+
const [mx, near, snapW] = WEIGHTS[aw <= 1440 ? 0 : aw <= 1680 ? 1 : aw <= 1920 ? 2 : aw <= 2560 ? 3 : 4];
|
|
114
|
+
const snap = plat === WINDOW_PLATFORMS.windows && Math.floor(aw / 2) >= MIN_SNAP_WIDTH ? snapW : 0;
|
|
115
|
+
let pick = s.below(1000);
|
|
116
|
+
g.valid = true;
|
|
117
|
+
if ((pick -= mx) < 0) {
|
|
118
|
+
g.state = "maximized";
|
|
119
|
+
g.kind = "maximized";
|
|
120
|
+
drawRestored(s, aw, ah, g);
|
|
121
|
+
return g;
|
|
122
|
+
}
|
|
123
|
+
g.state = "normal";
|
|
124
|
+
if ((pick -= near) < 0) {
|
|
125
|
+
g.kind = "near";
|
|
126
|
+
g.width = span(s, aw, 900, 990, Math.min(aw, MIN_WIDTH));
|
|
127
|
+
g.height = span(s, ah, 900, 990, Math.min(ah, MIN_HEIGHT));
|
|
128
|
+
g.x = permille(Math.min(aw - g.width, MAX_NEAR_OFFSET), s.range(0, 1000));
|
|
129
|
+
g.y = permille(Math.min(ah - g.height, MAX_NEAR_OFFSET), s.range(0, 1000));
|
|
130
|
+
return g;
|
|
131
|
+
}
|
|
132
|
+
if ((pick -= snap) < 0) {
|
|
133
|
+
const right = s.below(5) < 2;
|
|
134
|
+
g.kind = right ? "snap-right" : "snap-left";
|
|
135
|
+
g.width = Math.floor(aw / 2);
|
|
136
|
+
g.height = ah;
|
|
137
|
+
g.x = right ? aw - g.width : 0;
|
|
138
|
+
g.y = 0;
|
|
139
|
+
return g;
|
|
140
|
+
}
|
|
141
|
+
g.kind = "restored";
|
|
142
|
+
drawRestored(s, aw, ah, g);
|
|
143
|
+
return g;
|
|
144
|
+
}
|
|
145
|
+
/** The engine's saved-placement tag value (PersonaWindowKey) for these inputs. */
|
|
146
|
+
export function windowKey(seed, screenWidth, screenHeight, availWidth, availHeight, platform = "windows") {
|
|
147
|
+
return inputHash(seed, Math.trunc(screenWidth), Math.trunc(screenHeight), Math.trunc(availWidth), Math.trunc(availHeight), platformCode(platform), WINDOW_KEY_SALT);
|
|
148
|
+
}
|
|
149
|
+
/** FNV-1a 64 of a UTF-8 string: the engine's PersonaSeedFromString for non-numeric values. */
|
|
150
|
+
export function fnv1a64(text) {
|
|
151
|
+
let h = 0xcbf29ce484222325n;
|
|
152
|
+
for (const b of Buffer.from(String(text), "utf8")) {
|
|
153
|
+
h ^= BigInt(b);
|
|
154
|
+
h = (h * 0x100000001b3n) & MASK64;
|
|
155
|
+
}
|
|
156
|
+
return h;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* The engine's persona_seed for a `fingerprint` value: the value itself when it is an unsigned 64-bit
|
|
160
|
+
* decimal, else FNV-1a 64, then one SplitMix64 step (MixedPersonaSeed).
|
|
161
|
+
*/
|
|
162
|
+
export function mixedSeed(raw) {
|
|
163
|
+
const s = String(raw);
|
|
164
|
+
const seed = /^[0-9]+$/.test(s) && BigInt(s) <= MASK64 ? BigInt(s) : fnv1a64(s);
|
|
165
|
+
return mix((seed + 0x9e3779b97f4a7c15n) & MASK64);
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=windowgeom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"windowgeom.js","sourceRoot":"","sources":["../src/windowgeom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,GAA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F,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,IAAI,CAAC,GAAG,mBAAmB,CAAC;IAC5B,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC;QAClD,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;QACf,CAAC,GAAG,CAAC,CAAC,GAAG,cAAc,CAAC,GAAG,MAAM,CAAC;IACpC,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,GAA6B;IACrD,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACtB,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAChF,OAAO,GAAG,CAAC,CAAC,IAAI,GAAG,mBAAmB,CAAC,GAAG,MAAM,CAAC,CAAC;AACpD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clearcote",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.0",
|
|
4
4
|
"description": "Playwright drop-in for the Clearcote anti-fingerprint Chromium build. launch() returns a standard Playwright Browser backed by the verified Clearcote binary, which is auto-downloaded and SHA-256 checked.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|