clarity-js 0.8.4-beta → 0.8.5

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 (103) hide show
  1. package/README.md +26 -26
  2. package/build/clarity.extended.js +1 -1
  3. package/build/clarity.insight.js +1 -1
  4. package/build/clarity.js +5524 -5561
  5. package/build/clarity.min.js +1 -1
  6. package/build/clarity.module.js +5524 -5561
  7. package/build/clarity.performance.js +1 -1
  8. package/package.json +70 -70
  9. package/rollup.config.ts +98 -98
  10. package/src/clarity.ts +60 -60
  11. package/src/core/api.ts +8 -8
  12. package/src/core/config.ts +32 -32
  13. package/src/core/copy.ts +3 -3
  14. package/src/core/event.ts +53 -53
  15. package/src/core/hash.ts +19 -19
  16. package/src/core/history.ts +73 -73
  17. package/src/core/index.ts +83 -83
  18. package/src/core/measure.ts +19 -19
  19. package/src/core/report.ts +28 -28
  20. package/src/core/scrub.ts +196 -196
  21. package/src/core/task.ts +181 -180
  22. package/src/core/time.ts +19 -19
  23. package/src/core/timeout.ts +10 -10
  24. package/src/core/version.ts +2 -2
  25. package/src/data/baseline.ts +155 -155
  26. package/src/data/compress.ts +31 -31
  27. package/src/data/consent.ts +20 -20
  28. package/src/data/custom.ts +23 -23
  29. package/src/data/dimension.ts +53 -53
  30. package/src/data/encode.ts +140 -140
  31. package/src/data/envelope.ts +53 -53
  32. package/src/data/extract.ts +211 -211
  33. package/src/data/index.ts +46 -46
  34. package/src/data/limit.ts +44 -44
  35. package/src/data/metadata.ts +344 -356
  36. package/src/data/metric.ts +51 -51
  37. package/src/data/ping.ts +36 -36
  38. package/src/data/signal.ts +30 -30
  39. package/src/data/summary.ts +34 -34
  40. package/src/data/token.ts +39 -39
  41. package/src/data/upgrade.ts +37 -37
  42. package/src/data/upload.ts +283 -283
  43. package/src/data/variable.ts +83 -83
  44. package/src/diagnostic/encode.ts +40 -40
  45. package/src/diagnostic/fraud.ts +36 -36
  46. package/src/diagnostic/index.ts +15 -15
  47. package/src/diagnostic/internal.ts +28 -28
  48. package/src/diagnostic/script.ts +37 -37
  49. package/src/global.ts +6 -6
  50. package/src/index.ts +9 -9
  51. package/src/insight/blank.ts +14 -14
  52. package/src/insight/encode.ts +60 -60
  53. package/src/insight/snapshot.ts +114 -114
  54. package/src/interaction/change.ts +40 -40
  55. package/src/interaction/click.ts +162 -194
  56. package/src/interaction/clipboard.ts +34 -34
  57. package/src/interaction/encode.ts +193 -196
  58. package/src/interaction/index.ts +59 -59
  59. package/src/interaction/input.ts +59 -59
  60. package/src/interaction/pointer.ts +139 -139
  61. package/src/interaction/resize.ts +47 -47
  62. package/src/interaction/scroll.ts +124 -124
  63. package/src/interaction/selection.ts +68 -68
  64. package/src/interaction/submit.ts +32 -32
  65. package/src/interaction/timeline.ts +65 -65
  66. package/src/interaction/unload.ts +28 -28
  67. package/src/interaction/visibility.ts +26 -26
  68. package/src/layout/animation.ts +133 -133
  69. package/src/layout/discover.ts +31 -31
  70. package/src/layout/document.ts +48 -48
  71. package/src/layout/dom.ts +437 -437
  72. package/src/layout/encode.ts +147 -147
  73. package/src/layout/index.ts +41 -41
  74. package/src/layout/mutation.ts +409 -409
  75. package/src/layout/node.ts +292 -292
  76. package/src/layout/offset.ts +19 -19
  77. package/src/layout/region.ts +153 -153
  78. package/src/layout/schema.ts +63 -63
  79. package/src/layout/selector.ts +82 -82
  80. package/src/layout/style.ts +150 -150
  81. package/src/layout/target.ts +32 -32
  82. package/src/layout/traverse.ts +27 -27
  83. package/src/performance/blank.ts +7 -7
  84. package/src/performance/encode.ts +31 -31
  85. package/src/performance/index.ts +14 -14
  86. package/src/performance/interaction.ts +125 -125
  87. package/src/performance/navigation.ts +31 -31
  88. package/src/performance/observer.ts +108 -108
  89. package/src/queue.ts +33 -33
  90. package/test/core.test.ts +139 -139
  91. package/test/helper.ts +162 -162
  92. package/test/html/core.html +27 -27
  93. package/test/stub.test.ts +7 -0
  94. package/test/tsconfig.test.json +5 -5
  95. package/tsconfig.json +21 -21
  96. package/tslint.json +32 -32
  97. package/types/core.d.ts +153 -153
  98. package/types/data.d.ts +511 -513
  99. package/types/diagnostic.d.ts +24 -24
  100. package/types/index.d.ts +39 -39
  101. package/types/interaction.d.ts +165 -168
  102. package/types/layout.d.ts +272 -272
  103. package/types/performance.d.ts +64 -64
@@ -1,84 +1,84 @@
1
- import { Constant, Event, IdentityData, Setting, VariableData } from "@clarity-types/data";
2
- import * as core from "@src/core";
3
- import { scrub } from "@src/core/scrub";
4
- import encode from "./encode";
5
-
6
- export let data: VariableData = null;
7
-
8
- export function start(): void {
9
- reset();
10
- }
11
-
12
- export function set(variable: string, value: string | string[]): void {
13
- let values = typeof value === Constant.String ? [value as string] : value as string[];
14
- log(variable, values);
15
- }
16
-
17
- export async function identify(userId: string, sessionId: string = null, pageId: string = null, userHint: string = null): Promise<IdentityData> {
18
- let output: IdentityData = { userId: await sha256(userId), userHint: userHint || redact(userId) };
19
-
20
- // By default, hash custom userId using SHA256 algorithm on the client to preserve privacy
21
- log(Constant.UserId, [output.userId]);
22
-
23
- // Optional non-identifying name for the user
24
- // If name is not explicitly provided, we automatically generate a redacted version of the userId
25
- log(Constant.UserHint, [output.userHint]);
26
- log(Constant.UserType, [detect(userId)]);
27
-
28
- // Log sessionId and pageId if provided
29
- if (sessionId) {
30
- log(Constant.SessionId, [sessionId]);
31
- output.sessionId = sessionId;
32
- }
33
- if (pageId) {
34
- log(Constant.PageId, [pageId]);
35
- output.pageId = pageId;
36
- }
37
-
38
- return output;
39
- }
40
-
41
- function log(variable: string, value: string[]): void {
42
- if (core.active() &&
43
- variable &&
44
- value &&
45
- typeof variable === Constant.String &&
46
- variable.length < 255) {
47
- let validValues = variable in data ? data[variable] : [];
48
- for (let i = 0; i < value.length; i++) {
49
- if (typeof value[i] === Constant.String && value[i].length < 255) { validValues.push(value[i]); }
50
- }
51
- data[variable] = validValues;
52
- }
53
- }
54
-
55
- export function compute(): void {
56
- encode(Event.Variable);
57
- }
58
-
59
- export function reset(): void {
60
- data = {};
61
- }
62
-
63
- export function stop(): void {
64
- reset();
65
- }
66
-
67
- function redact(input: string): string {
68
- return input && input.length >= Setting.WordLength ?
69
- `${input.substring(0,2)}${scrub(input.substring(2), Constant.Asterix, Constant.Asterix)}` : scrub(input, Constant.Asterix, Constant.Asterix);
70
- }
71
-
72
- async function sha256(input: string): Promise<string> {
73
- try {
74
- if (crypto && input) {
75
- // Reference: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#converting_a_digest_to_a_hex_string
76
- const buffer = await crypto.subtle.digest(Constant.SHA256, new TextEncoder().encode(input));
77
- return Array.prototype.map.call(new Uint8Array(buffer), (x: any) =>(('00'+x.toString(16)).slice(-2))).join('');
78
- } else { return Constant.Empty; }
79
- } catch { return Constant.Empty; }
80
- }
81
-
82
- function detect(input: string): string {
83
- return input && input.indexOf(Constant.At) > 0 ? Constant.Email : Constant.String;
1
+ import { Constant, Event, IdentityData, Setting, VariableData } from "@clarity-types/data";
2
+ import * as core from "@src/core";
3
+ import { scrub } from "@src/core/scrub";
4
+ import encode from "./encode";
5
+
6
+ export let data: VariableData = null;
7
+
8
+ export function start(): void {
9
+ reset();
10
+ }
11
+
12
+ export function set(variable: string, value: string | string[]): void {
13
+ let values = typeof value === Constant.String ? [value as string] : value as string[];
14
+ log(variable, values);
15
+ }
16
+
17
+ export async function identify(userId: string, sessionId: string = null, pageId: string = null, userHint: string = null): Promise<IdentityData> {
18
+ let output: IdentityData = { userId: await sha256(userId), userHint: userHint || redact(userId) };
19
+
20
+ // By default, hash custom userId using SHA256 algorithm on the client to preserve privacy
21
+ log(Constant.UserId, [output.userId]);
22
+
23
+ // Optional non-identifying name for the user
24
+ // If name is not explicitly provided, we automatically generate a redacted version of the userId
25
+ log(Constant.UserHint, [output.userHint]);
26
+ log(Constant.UserType, [detect(userId)]);
27
+
28
+ // Log sessionId and pageId if provided
29
+ if (sessionId) {
30
+ log(Constant.SessionId, [sessionId]);
31
+ output.sessionId = sessionId;
32
+ }
33
+ if (pageId) {
34
+ log(Constant.PageId, [pageId]);
35
+ output.pageId = pageId;
36
+ }
37
+
38
+ return output;
39
+ }
40
+
41
+ function log(variable: string, value: string[]): void {
42
+ if (core.active() &&
43
+ variable &&
44
+ value &&
45
+ typeof variable === Constant.String &&
46
+ variable.length < 255) {
47
+ let validValues = variable in data ? data[variable] : [];
48
+ for (let i = 0; i < value.length; i++) {
49
+ if (typeof value[i] === Constant.String && value[i].length < 255) { validValues.push(value[i]); }
50
+ }
51
+ data[variable] = validValues;
52
+ }
53
+ }
54
+
55
+ export function compute(): void {
56
+ encode(Event.Variable);
57
+ }
58
+
59
+ export function reset(): void {
60
+ data = {};
61
+ }
62
+
63
+ export function stop(): void {
64
+ reset();
65
+ }
66
+
67
+ function redact(input: string): string {
68
+ return input && input.length >= Setting.WordLength ?
69
+ `${input.substring(0,2)}${scrub(input.substring(2), Constant.Asterix, Constant.Asterix)}` : scrub(input, Constant.Asterix, Constant.Asterix);
70
+ }
71
+
72
+ async function sha256(input: string): Promise<string> {
73
+ try {
74
+ if (crypto && input) {
75
+ // Reference: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#converting_a_digest_to_a_hex_string
76
+ const buffer = await crypto.subtle.digest(Constant.SHA256, new TextEncoder().encode(input));
77
+ return Array.prototype.map.call(new Uint8Array(buffer), (x: any) =>(('00'+x.toString(16)).slice(-2))).join('');
78
+ } else { return Constant.Empty; }
79
+ } catch { return Constant.Empty; }
80
+ }
81
+
82
+ function detect(input: string): string {
83
+ return input && input.indexOf(Constant.At) > 0 ? Constant.Email : Constant.String;
84
84
  }
@@ -1,40 +1,40 @@
1
- import { Event, Token } from "@clarity-types/data";
2
- import * as scrub from "@src/core/scrub";
3
- import { time } from "@src/core/time";
4
- import { queue } from "@src/data/upload";
5
- import * as fraud from "@src/diagnostic/fraud";
6
- import * as internal from "@src/diagnostic/internal";
7
- import * as script from "@src/diagnostic/script";
8
-
9
- export default async function (type: Event): Promise<void> {
10
- let tokens: Token[] = [time(), type];
11
-
12
- switch (type) {
13
- case Event.ScriptError:
14
- tokens.push(script.data.message);
15
- tokens.push(script.data.line);
16
- tokens.push(script.data.column);
17
- tokens.push(script.data.stack);
18
- tokens.push(scrub.url(script.data.source));
19
- queue(tokens);
20
- break;
21
- case Event.Log:
22
- if (internal.data) {
23
- tokens.push(internal.data.code);
24
- tokens.push(internal.data.name);
25
- tokens.push(internal.data.message);
26
- tokens.push(internal.data.stack);
27
- tokens.push(internal.data.severity);
28
- queue(tokens, false);
29
- }
30
- break;
31
- case Event.Fraud:
32
- if (fraud.data) {
33
- tokens.push(fraud.data.id);
34
- tokens.push(fraud.data.target);
35
- tokens.push(fraud.data.checksum);
36
- queue(tokens, false);
37
- }
38
- break;
39
- }
40
- }
1
+ import { Event, Token } from "@clarity-types/data";
2
+ import * as scrub from "@src/core/scrub";
3
+ import { time } from "@src/core/time";
4
+ import { queue } from "@src/data/upload";
5
+ import * as fraud from "@src/diagnostic/fraud";
6
+ import * as internal from "@src/diagnostic/internal";
7
+ import * as script from "@src/diagnostic/script";
8
+
9
+ export default async function (type: Event): Promise<void> {
10
+ let tokens: Token[] = [time(), type];
11
+
12
+ switch (type) {
13
+ case Event.ScriptError:
14
+ tokens.push(script.data.message);
15
+ tokens.push(script.data.line);
16
+ tokens.push(script.data.column);
17
+ tokens.push(script.data.stack);
18
+ tokens.push(scrub.url(script.data.source));
19
+ queue(tokens);
20
+ break;
21
+ case Event.Log:
22
+ if (internal.data) {
23
+ tokens.push(internal.data.code);
24
+ tokens.push(internal.data.name);
25
+ tokens.push(internal.data.message);
26
+ tokens.push(internal.data.stack);
27
+ tokens.push(internal.data.severity);
28
+ queue(tokens, false);
29
+ }
30
+ break;
31
+ case Event.Fraud:
32
+ if (fraud.data) {
33
+ tokens.push(fraud.data.id);
34
+ tokens.push(fraud.data.target);
35
+ tokens.push(fraud.data.checksum);
36
+ queue(tokens, false);
37
+ }
38
+ break;
39
+ }
40
+ }
@@ -1,37 +1,37 @@
1
- import { BooleanFlag, Event, IframeStatus, Metric, Setting } from "@clarity-types/data";
2
- import { FraudData } from "@clarity-types/diagnostic";
3
- import config from "@src/core/config";
4
- import hash from "@src/core/hash";
5
- import * as metric from "@src/data/metric";
6
- import encode from "./encode";
7
-
8
- let history = [];
9
- export let data: FraudData;
10
-
11
- export function start(): void {
12
- history = [];
13
- metric.max(Metric.Automation, navigator.webdriver ? BooleanFlag.True : BooleanFlag.False);
14
- try {
15
- // some sites (unintentionally) overwrite the window.self property, so we also check for the main window object
16
- metric.max(Metric.Iframed, window.top == window.self || window.top == window ? IframeStatus.TopFrame : IframeStatus.Iframe);
17
- } catch (ex) {
18
- metric.max(Metric.Iframed, IframeStatus.Unknown);
19
- }
20
-
21
- }
22
-
23
- export function check(id: number, target: number, input: string): void {
24
- // Compute hash for fraud detection, if enabled. Hash is computed only if input meets the minimum length criteria
25
- if (config.fraud && id !== null && input && input.length >= Setting.WordLength) {
26
- data = { id, target, checksum: hash(input, Setting.ChecksumPrecision) };
27
- // Only encode this event if we haven't already reported this hash
28
- if (history.indexOf(data.checksum) < 0) {
29
- history.push(data.checksum);
30
- encode(Event.Fraud);
31
- }
32
- }
33
- }
34
-
35
- export function stop(): void {
36
- history = [];
1
+ import { BooleanFlag, Event, IframeStatus, Metric, Setting } from "@clarity-types/data";
2
+ import { FraudData } from "@clarity-types/diagnostic";
3
+ import config from "@src/core/config";
4
+ import hash from "@src/core/hash";
5
+ import * as metric from "@src/data/metric";
6
+ import encode from "./encode";
7
+
8
+ let history = [];
9
+ export let data: FraudData;
10
+
11
+ export function start(): void {
12
+ history = [];
13
+ metric.max(Metric.Automation, navigator.webdriver ? BooleanFlag.True : BooleanFlag.False);
14
+ try {
15
+ // some sites (unintentionally) overwrite the window.self property, so we also check for the main window object
16
+ metric.max(Metric.Iframed, window.top == window.self || window.top == window ? IframeStatus.TopFrame : IframeStatus.Iframe);
17
+ } catch (ex) {
18
+ metric.max(Metric.Iframed, IframeStatus.Unknown);
19
+ }
20
+
21
+ }
22
+
23
+ export function check(id: number, target: number, input: string): void {
24
+ // Compute hash for fraud detection, if enabled. Hash is computed only if input meets the minimum length criteria
25
+ if (config.fraud && id !== null && input && input.length >= Setting.WordLength) {
26
+ data = { id, target, checksum: hash(input, Setting.ChecksumPrecision) };
27
+ // Only encode this event if we haven't already reported this hash
28
+ if (history.indexOf(data.checksum) < 0) {
29
+ history.push(data.checksum);
30
+ encode(Event.Fraud);
31
+ }
32
+ }
33
+ }
34
+
35
+ export function stop(): void {
36
+ history = [];
37
37
  }
@@ -1,15 +1,15 @@
1
- import { FunctionNames } from "@clarity-types/performance";
2
- import * as fraud from "@src/diagnostic/fraud";
3
- import * as internal from "@src/diagnostic/internal";
4
- import * as script from "@src/diagnostic/script";
5
-
6
- export function start(): void {
7
- start.dn = FunctionNames.DiagnosticStart;
8
- fraud.start();
9
- script.start();
10
- internal.start();
11
- }
12
-
13
- export function stop(): void {
14
- internal.stop();
15
- }
1
+ import { FunctionNames } from "@clarity-types/performance";
2
+ import * as fraud from "@src/diagnostic/fraud";
3
+ import * as internal from "@src/diagnostic/internal";
4
+ import * as script from "@src/diagnostic/script";
5
+
6
+ export function start(): void {
7
+ start.dn = FunctionNames.DiagnosticStart;
8
+ fraud.start();
9
+ script.start();
10
+ internal.start();
11
+ }
12
+
13
+ export function stop(): void {
14
+ internal.stop();
15
+ }
@@ -1,28 +1,28 @@
1
- import { Code, Event, Severity } from "@clarity-types/data";
2
- import { LogData } from "@clarity-types/diagnostic";
3
- import encode from "./encode";
4
-
5
- let history: { [key: number]: string[] } = {};
6
- export let data: LogData;
7
-
8
- export function start(): void {
9
- history = {};
10
- }
11
-
12
- export function log(code: Code, severity: Severity, name: string = null, message: string = null, stack: string = null): void {
13
- let key = name ? `${name}|${message}`: "";
14
- // While rare, it's possible for code to fail repeatedly during the lifetime of the same page
15
- // In those cases, we only want to log the failure once and not spam logs with redundant information.
16
- if (code in history && history[code].indexOf(key) >= 0) { return; }
17
-
18
- data = { code, name, message, stack, severity };
19
-
20
- // Maintain history of errors in memory to avoid sending redundant information
21
- if (code in history) { history[code].push(key); } else { history[code] = [key]; }
22
-
23
- encode(Event.Log);
24
- }
25
-
26
- export function stop(): void {
27
- history = {};
28
- }
1
+ import { Code, Event, Severity } from "@clarity-types/data";
2
+ import { LogData } from "@clarity-types/diagnostic";
3
+ import encode from "./encode";
4
+
5
+ let history: { [key: number]: string[] } = {};
6
+ export let data: LogData;
7
+
8
+ export function start(): void {
9
+ history = {};
10
+ }
11
+
12
+ export function log(code: Code, severity: Severity, name: string = null, message: string = null, stack: string = null): void {
13
+ let key = name ? `${name}|${message}`: "";
14
+ // While rare, it's possible for code to fail repeatedly during the lifetime of the same page
15
+ // In those cases, we only want to log the failure once and not spam logs with redundant information.
16
+ if (code in history && history[code].indexOf(key) >= 0) { return; }
17
+
18
+ data = { code, name, message, stack, severity };
19
+
20
+ // Maintain history of errors in memory to avoid sending redundant information
21
+ if (code in history) { history[code].push(key); } else { history[code] = [key]; }
22
+
23
+ encode(Event.Log);
24
+ }
25
+
26
+ export function stop(): void {
27
+ history = {};
28
+ }
@@ -1,37 +1,37 @@
1
- import { Event, Setting } from "@clarity-types/data";
2
- import { ScriptErrorData } from "@clarity-types/diagnostic";
3
- import { FunctionNames } from "@clarity-types/performance";
4
- import { bind } from "@src/core/event";
5
- import encode from "./encode";
6
-
7
- let history: { [key: string]: number } = {};
8
- export let data: ScriptErrorData;
9
-
10
- export function start(): void {
11
- bind(window, "error", handler);
12
- history = {};
13
- }
14
-
15
- function handler(error: ErrorEvent): boolean {
16
- handler.dn = FunctionNames.ScriptHandler;
17
- let e = error["error"] || error;
18
- // While rare, it's possible for code to fail repeatedly during the lifetime of the same page
19
- // In those cases, we only want to log the failure first few times and not spam logs with redundant information.
20
- if (!(e.message in history)) { history[e.message] = 0; }
21
- if (history[e.message]++ >= Setting.ScriptErrorLimit) { return true; }
22
-
23
- // Send back information only if the handled error has valid information
24
- if (e && e.message) {
25
- data = {
26
- message: e.message,
27
- line: error["lineno"],
28
- column: error["colno"],
29
- stack: e.stack,
30
- source: error["filename"]
31
- };
32
-
33
- encode(Event.ScriptError);
34
- }
35
-
36
- return true;
37
- }
1
+ import { Event, Setting } from "@clarity-types/data";
2
+ import { ScriptErrorData } from "@clarity-types/diagnostic";
3
+ import { FunctionNames } from "@clarity-types/performance";
4
+ import { bind } from "@src/core/event";
5
+ import encode from "./encode";
6
+
7
+ let history: { [key: string]: number } = {};
8
+ export let data: ScriptErrorData;
9
+
10
+ export function start(): void {
11
+ bind(window, "error", handler);
12
+ history = {};
13
+ }
14
+
15
+ function handler(error: ErrorEvent): boolean {
16
+ handler.dn = FunctionNames.ScriptHandler;
17
+ let e = error["error"] || error;
18
+ // While rare, it's possible for code to fail repeatedly during the lifetime of the same page
19
+ // In those cases, we only want to log the failure first few times and not spam logs with redundant information.
20
+ if (!(e.message in history)) { history[e.message] = 0; }
21
+ if (history[e.message]++ >= Setting.ScriptErrorLimit) { return true; }
22
+
23
+ // Send back information only if the handled error has valid information
24
+ if (e && e.message) {
25
+ data = {
26
+ message: e.message,
27
+ line: error["lineno"],
28
+ column: error["colno"],
29
+ stack: e.stack,
30
+ source: error["filename"]
31
+ };
32
+
33
+ encode(Event.ScriptError);
34
+ }
35
+
36
+ return true;
37
+ }
package/src/global.ts CHANGED
@@ -1,6 +1,6 @@
1
- import * as queue from "@src/queue";
2
-
3
- // Process anything that was queued up before the script loaded
4
- (function(): void {
5
- queue.process();
6
- })();
1
+ import * as queue from "@src/queue";
2
+
3
+ // Process anything that was queued up before the script loaded
4
+ (function(): void {
5
+ queue.process();
6
+ })();
package/src/index.ts CHANGED
@@ -1,9 +1,9 @@
1
- import * as clarity from "./clarity";
2
- import hash from "./core/hash";
3
- import * as selector from "./layout/selector";
4
- import { get, getNode, lookup } from "./layout/dom";
5
-
6
- const helper = { hash, selector, get, getNode, lookup }
7
- const version = clarity.version;
8
-
9
- export { clarity, version, helper };
1
+ import * as clarity from "./clarity";
2
+ import hash from "./core/hash";
3
+ import * as selector from "./layout/selector";
4
+ import { get, getNode, lookup } from "./layout/dom";
5
+
6
+ const helper = { hash, selector, get, getNode, lookup }
7
+ const version = clarity.version;
8
+
9
+ export { clarity, version, helper };
@@ -1,14 +1,14 @@
1
- export let state = [];
2
- export let sheetAdoptionState = [];
3
- export let sheetUpdateState = [];
4
- export let data = null;
5
-
6
- /* Intentionally blank module with empty code */
7
-
8
- export function start(): void {}
9
- export function reset(): void {}
10
- export function stop(): void {}
11
- export function log(): void {}
12
- export function observe(): void {}
13
- export function compute(): void {}
14
- export function checkDocumentStyles(_d: Document): void {}
1
+ export let state = [];
2
+ export let sheetAdoptionState = [];
3
+ export let sheetUpdateState = [];
4
+ export let data = null;
5
+
6
+ /* Intentionally blank module with empty code */
7
+
8
+ export function start(): void {}
9
+ export function reset(): void {}
10
+ export function stop(): void {}
11
+ export function log(): void {}
12
+ export function observe(): void {}
13
+ export function compute(): void {}
14
+ export function checkDocumentStyles(_d: Document): void {}