@ax-design/reveal-highlight 0.4.2 → 0.5.3
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 -21
- package/README.md +75 -75
- package/build/BaseConfig.d.ts +5 -1
- package/build/BaseConfig.d.ts.map +1 -1
- package/build/CanvasConfig.d.ts +7 -1
- package/build/CanvasConfig.d.ts.map +1 -1
- package/build/ComputedStyleStorage.d.ts.map +1 -1
- package/build/CustomElements.d.ts +20 -4
- package/build/CustomElements.d.ts.map +1 -1
- package/build/RevealBoundryStore.d.ts +4 -0
- package/build/RevealBoundryStore.d.ts.map +1 -1
- package/build/RevealStateManager.d.ts +5 -1
- package/build/RevealStateManager.d.ts.map +1 -1
- package/build/main.js +113 -82
- package/build/utils/types.d.ts +2 -10
- package/build/utils/types.d.ts.map +1 -1
- package/es/BaseConfig.d.ts +46 -42
- package/es/BaseConfig.d.ts.map +1 -1
- package/es/BaseConfig.js +241 -219
- package/es/BaseConfig.js.map +1 -1
- package/es/CanvasConfig.d.ts +21 -15
- package/es/CanvasConfig.d.ts.map +1 -1
- package/es/CanvasConfig.js +332 -320
- package/es/CanvasConfig.js.map +1 -1
- package/es/ComputedStyleStorage.d.ts +8 -8
- package/es/ComputedStyleStorage.d.ts.map +1 -1
- package/es/ComputedStyleStorage.js +68 -58
- package/es/ComputedStyleStorage.js.map +1 -1
- package/es/CustomElements.d.ts +75 -59
- package/es/CustomElements.d.ts.map +1 -1
- package/es/CustomElements.js +296 -233
- package/es/CustomElements.js.map +1 -1
- package/es/Profiler.d.ts +12 -12
- package/es/Profiler.js +31 -31
- package/es/RevealBoundryStore.d.ts +80 -76
- package/es/RevealBoundryStore.d.ts.map +1 -1
- package/es/RevealBoundryStore.js +269 -248
- package/es/RevealBoundryStore.js.map +1 -1
- package/es/RevealStateManager.d.ts +19 -15
- package/es/RevealStateManager.d.ts.map +1 -1
- package/es/RevealStateManager.js +99 -73
- package/es/RevealStateManager.js.map +1 -1
- package/es/SvgConfig.d.ts +16 -16
- package/es/SvgConfig.js +345 -345
- package/es/config.d.ts +4 -4
- package/es/config.js +21 -21
- package/es/index.d.ts +5 -5
- package/es/index.js +205 -205
- package/es/tsconfig.tsbuildinfo +1 -1
- package/es/utils/extractRGBValue.d.ts +1 -1
- package/es/utils/extractRGBValue.js +47 -47
- package/es/utils/isValidateBorderDecorationType.d.ts +2 -2
- package/es/utils/isValidateBorderDecorationType.js +9 -9
- package/es/utils/types.d.ts +94 -102
- package/es/utils/types.d.ts.map +1 -1
- package/es/utils/types.js +1 -1
- package/es/variables.d.ts +1 -1
- package/es/variables.js +1 -1
- package/package.json +35 -34
- package/src/BaseConfig.ts +332 -310
- package/src/CanvasConfig.ts +420 -415
- package/src/ComputedStyleStorage.ts +102 -89
- package/src/CustomElements.ts +344 -272
- package/src/Profiler.ts +44 -44
- package/src/RevealBoundryStore.ts +315 -291
- package/src/RevealStateManager.ts +109 -86
- package/src/SvgConfig.ts +422 -422
- package/src/config.ts +26 -26
- package/src/cssTypedOM.d.ts +52 -52
- package/src/index.ts +219 -219
- package/src/utils/extractRGBValue.ts +58 -58
- package/src/utils/isValidateBorderDecorationType.ts +8 -8
- package/src/utils/types.ts +97 -105
- package/src/variables.ts +1 -1
package/src/Profiler.ts
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
interface ProfilerLog {
|
|
2
|
-
time: number;
|
|
3
|
-
task: string;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
const downloadText = (filename: string, text: string) => {
|
|
7
|
-
const element = document.createElement('a');
|
|
8
|
-
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
|
|
9
|
-
element.setAttribute('download', filename);
|
|
10
|
-
|
|
11
|
-
element.style.display = 'none';
|
|
12
|
-
|
|
13
|
-
element.click();
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export class Profiler {
|
|
17
|
-
private baseline: number = 0;
|
|
18
|
-
logs: ProfilerLog[] = [];
|
|
19
|
-
|
|
20
|
-
setBaseline() {
|
|
21
|
-
this.baseline = performance.now();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
mark(task: string = 'unknown') {
|
|
25
|
-
const time = performance.now() - this.baseline;
|
|
26
|
-
|
|
27
|
-
this.logs.push({
|
|
28
|
-
time,
|
|
29
|
-
task,
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
this.baseline = performance.now();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
dumpAsCsv() {
|
|
36
|
-
let result = 'task,tile\n';
|
|
37
|
-
|
|
38
|
-
for (let i = 0; i < this.logs.length; i++) {
|
|
39
|
-
result += `${this.logs[i].task},${this.logs[i].time}\n`;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
downloadText('axRevealHighlightProfileDetail.csv', result);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
interface ProfilerLog {
|
|
2
|
+
time: number;
|
|
3
|
+
task: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const downloadText = (filename: string, text: string) => {
|
|
7
|
+
const element = document.createElement('a');
|
|
8
|
+
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
|
|
9
|
+
element.setAttribute('download', filename);
|
|
10
|
+
|
|
11
|
+
element.style.display = 'none';
|
|
12
|
+
|
|
13
|
+
element.click();
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export class Profiler {
|
|
17
|
+
private baseline: number = 0;
|
|
18
|
+
logs: ProfilerLog[] = [];
|
|
19
|
+
|
|
20
|
+
setBaseline() {
|
|
21
|
+
this.baseline = performance.now();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
mark(task: string = 'unknown') {
|
|
25
|
+
const time = performance.now() - this.baseline;
|
|
26
|
+
|
|
27
|
+
this.logs.push({
|
|
28
|
+
time,
|
|
29
|
+
task,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
this.baseline = performance.now();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
dumpAsCsv() {
|
|
36
|
+
let result = 'task,tile\n';
|
|
37
|
+
|
|
38
|
+
for (let i = 0; i < this.logs.length; i++) {
|
|
39
|
+
result += `${this.logs[i].task},${this.logs[i].time}\n`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
downloadText('axRevealHighlightProfileDetail.csv', result);
|
|
43
|
+
}
|
|
44
|
+
}
|