@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.
Files changed (74) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +75 -75
  3. package/build/BaseConfig.d.ts +5 -1
  4. package/build/BaseConfig.d.ts.map +1 -1
  5. package/build/CanvasConfig.d.ts +7 -1
  6. package/build/CanvasConfig.d.ts.map +1 -1
  7. package/build/ComputedStyleStorage.d.ts.map +1 -1
  8. package/build/CustomElements.d.ts +20 -4
  9. package/build/CustomElements.d.ts.map +1 -1
  10. package/build/RevealBoundryStore.d.ts +4 -0
  11. package/build/RevealBoundryStore.d.ts.map +1 -1
  12. package/build/RevealStateManager.d.ts +5 -1
  13. package/build/RevealStateManager.d.ts.map +1 -1
  14. package/build/main.js +113 -82
  15. package/build/utils/types.d.ts +2 -10
  16. package/build/utils/types.d.ts.map +1 -1
  17. package/es/BaseConfig.d.ts +46 -42
  18. package/es/BaseConfig.d.ts.map +1 -1
  19. package/es/BaseConfig.js +241 -219
  20. package/es/BaseConfig.js.map +1 -1
  21. package/es/CanvasConfig.d.ts +21 -15
  22. package/es/CanvasConfig.d.ts.map +1 -1
  23. package/es/CanvasConfig.js +332 -320
  24. package/es/CanvasConfig.js.map +1 -1
  25. package/es/ComputedStyleStorage.d.ts +8 -8
  26. package/es/ComputedStyleStorage.d.ts.map +1 -1
  27. package/es/ComputedStyleStorage.js +68 -58
  28. package/es/ComputedStyleStorage.js.map +1 -1
  29. package/es/CustomElements.d.ts +75 -59
  30. package/es/CustomElements.d.ts.map +1 -1
  31. package/es/CustomElements.js +296 -233
  32. package/es/CustomElements.js.map +1 -1
  33. package/es/Profiler.d.ts +12 -12
  34. package/es/Profiler.js +31 -31
  35. package/es/RevealBoundryStore.d.ts +80 -76
  36. package/es/RevealBoundryStore.d.ts.map +1 -1
  37. package/es/RevealBoundryStore.js +269 -248
  38. package/es/RevealBoundryStore.js.map +1 -1
  39. package/es/RevealStateManager.d.ts +19 -15
  40. package/es/RevealStateManager.d.ts.map +1 -1
  41. package/es/RevealStateManager.js +99 -73
  42. package/es/RevealStateManager.js.map +1 -1
  43. package/es/SvgConfig.d.ts +16 -16
  44. package/es/SvgConfig.js +345 -345
  45. package/es/config.d.ts +4 -4
  46. package/es/config.js +21 -21
  47. package/es/index.d.ts +5 -5
  48. package/es/index.js +205 -205
  49. package/es/tsconfig.tsbuildinfo +1 -1
  50. package/es/utils/extractRGBValue.d.ts +1 -1
  51. package/es/utils/extractRGBValue.js +47 -47
  52. package/es/utils/isValidateBorderDecorationType.d.ts +2 -2
  53. package/es/utils/isValidateBorderDecorationType.js +9 -9
  54. package/es/utils/types.d.ts +94 -102
  55. package/es/utils/types.d.ts.map +1 -1
  56. package/es/utils/types.js +1 -1
  57. package/es/variables.d.ts +1 -1
  58. package/es/variables.js +1 -1
  59. package/package.json +35 -34
  60. package/src/BaseConfig.ts +332 -310
  61. package/src/CanvasConfig.ts +420 -415
  62. package/src/ComputedStyleStorage.ts +102 -89
  63. package/src/CustomElements.ts +344 -272
  64. package/src/Profiler.ts +44 -44
  65. package/src/RevealBoundryStore.ts +315 -291
  66. package/src/RevealStateManager.ts +109 -86
  67. package/src/SvgConfig.ts +422 -422
  68. package/src/config.ts +26 -26
  69. package/src/cssTypedOM.d.ts +52 -52
  70. package/src/index.ts +219 -219
  71. package/src/utils/extractRGBValue.ts +58 -58
  72. package/src/utils/isValidateBorderDecorationType.ts +8 -8
  73. package/src/utils/types.ts +97 -105
  74. package/src/variables.ts +1 -1
@@ -1,74 +1,100 @@
1
- import { RevealBoundaryStore } from './RevealBoundryStore.js';
2
- import { config } from './config.js';
3
- export class RevealStateManager {
4
- constructor() {
5
- this._currentHashId = 0;
6
- this._storage = [];
7
- this.requestedTraverseBoundaries = false;
8
- this.cachedMouseX = -1;
9
- this.cachedMouseY = -1;
10
- this.pointerLeaveScheduled = false;
11
- this.handlePointerLeave = () => {
12
- if (this.pointerLeaveScheduled)
13
- return;
14
- this.pointerLeaveScheduled = true;
15
- window.requestAnimationFrame(() => {
16
- for (let i = 0; i < this._storage.length; i++) {
17
- this._storage[i].onPointerLeaveBoundary();
18
- }
19
- this.pointerLeaveScheduled = false;
20
- });
21
- };
22
- this.handlePointerMove = (event) => {
23
- this.cachedMouseX = event.clientX;
24
- this.cachedMouseY = event.clientY;
25
- if (!this.requestedTraverseBoundaries) {
26
- window.requestAnimationFrame(this.traverseBoundaries);
27
- this.requestedTraverseBoundaries = true;
28
- }
29
- };
30
- this.traverseBoundaries = () => {
31
- this.requestedTraverseBoundaries = false;
32
- for (let i = 0; i < this._storage.length; i++) {
33
- this._storage[i].onPointerMoveOnScreen(this.cachedMouseX, this.cachedMouseY);
34
- }
35
- };
36
- this.newBoundary = ($el) => {
37
- const hashId = this._currentHashId++;
38
- const store = new RevealBoundaryStore(hashId, $el);
39
- this._storage.push(store);
40
- return store;
41
- };
42
- this.removeBoundary = (store) => {
43
- this._storage = this._storage.filter((x) => x !== store);
44
- };
45
- if (config.borderDetectionMode === 'experimentalAutoFit') {
46
- if (typeof Window === 'undefined')
47
- return;
48
- window.addEventListener('pointermove', this.handlePointerMove);
49
- // This is for touch screen
50
- // Window.pointerleave won't be triggered if the finger
51
- // leave the screen, so we use pointer up here.
52
- window.addEventListener('pointerup', (ev) => {
53
- if (ev.pointerType !== 'mouse')
54
- this.handlePointerLeave();
55
- });
56
- // This is for desktop
57
- // If the mouse leave the window, we need to terminate
58
- // all animations and clean up the canvas.
59
- window.addEventListener('pointerleave', (ev) => {
60
- if (ev.pointerType === 'mouse')
61
- this.handlePointerLeave();
62
- });
63
- // Handles boundary conditions such as the user scrolling
64
- // the page, dragging the image, which can cause mouse events
65
- // to fail, when Reveal should disappear to prevent the
66
- // image from getting stuck.
67
- window.addEventListener('pointercancel', (ev) => {
68
- console.log('pointer cancel');
69
- this.handlePointerLeave();
70
- });
71
- }
72
- }
73
- }
1
+ import { RevealBoundaryStore } from './RevealBoundryStore.js';
2
+ import { config } from './config.js';
3
+ export class RevealStateManager {
4
+ constructor() {
5
+ this._currentHashId = 0;
6
+ this._storage = [];
7
+ this.requestedTraverseBoundaries = false;
8
+ this.cachedMouseX = -1;
9
+ this.cachedMouseY = -1;
10
+ this.touchScrolling = false;
11
+ this.pointerLeaveScheduled = false;
12
+ this.handlePointerLeave = () => {
13
+ if (this.pointerLeaveScheduled)
14
+ return;
15
+ this.pointerLeaveScheduled = true;
16
+ window.requestAnimationFrame(() => {
17
+ for (let i = 0; i < this._storage.length; i++) {
18
+ this._storage[i].onPointerLeaveBoundary();
19
+ }
20
+ this.pointerLeaveScheduled = false;
21
+ });
22
+ };
23
+ this.handlePointerMove = (event) => {
24
+ this.cachedMouseX = event.clientX;
25
+ this.cachedMouseY = event.clientY;
26
+ if (!this.requestedTraverseBoundaries) {
27
+ window.requestAnimationFrame(this.traverseBoundaries);
28
+ this.requestedTraverseBoundaries = true;
29
+ }
30
+ };
31
+ this.traverseBoundaries = () => {
32
+ this.requestedTraverseBoundaries = false;
33
+ for (let i = 0; i < this._storage.length; i++) {
34
+ this._storage[i].onPointerMoveOnScreen(this.cachedMouseX, this.cachedMouseY);
35
+ if (this.touchScrolling)
36
+ this._storage[i].anchorPointer();
37
+ }
38
+ };
39
+ this.newBoundary = ($el) => {
40
+ const hashId = this._currentHashId++;
41
+ const store = new RevealBoundaryStore(hashId, $el);
42
+ this._storage.push(store);
43
+ return store;
44
+ };
45
+ this.removeBoundary = (store) => {
46
+ this._storage = this._storage.filter((x) => x !== store);
47
+ };
48
+ if (config.borderDetectionMode === 'experimentalAutoFit') {
49
+ if (typeof Window === 'undefined')
50
+ return;
51
+ window.addEventListener('pointermove', this.handlePointerMove);
52
+ // A finger landing on the screen without moving fires no `pointermove`.
53
+ window.addEventListener('pointerdown', this.handlePointerMove);
54
+ // This is for touch screen
55
+ // Window.pointerleave won't be triggered if the finger
56
+ // leave the screen, so we use pointer up here.
57
+ window.addEventListener('pointerup', (ev) => {
58
+ if (ev.pointerType !== 'mouse')
59
+ this.handlePointerLeave();
60
+ });
61
+ // This is for desktop
62
+ // If the mouse leave the window, we need to terminate
63
+ // all animations and clean up the canvas.
64
+ window.addEventListener('pointerleave', (ev) => {
65
+ if (ev.pointerType === 'mouse')
66
+ this.handlePointerLeave();
67
+ });
68
+ // Handles boundary conditions such as the user scrolling
69
+ // the page, dragging the image, which can cause mouse events
70
+ // to fail, when Reveal should disappear to prevent the
71
+ // image from getting stuck.
72
+ window.addEventListener('pointercancel', (ev) => {
73
+ // The browser took over the touch for scrolling, keep following
74
+ // the finger with touch events until it leaves the screen.
75
+ if (ev.pointerType === 'touch') {
76
+ this.touchScrolling = true;
77
+ for (let i = 0; i < this._storage.length; i++) {
78
+ this._storage[i].anchorPointer();
79
+ }
80
+ }
81
+ else {
82
+ this.handlePointerLeave();
83
+ }
84
+ });
85
+ window.addEventListener('touchmove', (ev) => {
86
+ if (this.touchScrolling && ev.touches.length)
87
+ this.handlePointerMove(ev.touches[0]);
88
+ }, { passive: true });
89
+ const handleTouchEnd = (ev) => {
90
+ if (!this.touchScrolling || ev.touches.length)
91
+ return;
92
+ this.touchScrolling = false;
93
+ this.handlePointerLeave();
94
+ };
95
+ window.addEventListener('touchend', handleTouchEnd, { passive: true });
96
+ window.addEventListener('touchcancel', handleTouchEnd, { passive: true });
97
+ }
98
+ }
99
+ }
74
100
  //# sourceMappingURL=RevealStateManager.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RevealStateManager.js","sourceRoot":"","sources":["../src/RevealStateManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,OAAO,kBAAkB;IAQ3B;QAPQ,mBAAc,GAAG,CAAC,CAAC;QACnB,aAAQ,GAA0B,EAAE,CAAC;QAErC,gCAA2B,GAAG,KAAK,CAAC;QAC5C,iBAAY,GAAG,CAAC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CAAC,CAAC;YACxF,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YACtB,MAAM,cAAc,GAAG,CAAC,EAAc,EAAE,EAAE;gBACtC,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM;oBAAE,OAAO;gBACtD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;gBAC5B,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC9B,CAAC,CAAC;YACF,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YACvE,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;SAC7E;IACL,CAAC;CAkDJ"}
package/es/SvgConfig.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- import { RevealBoundaryStore } from './RevealBoundryStore.js';
2
- import type { CachedRevealPath } from './utils/types.js';
3
- import { BaseConfig } from './BaseConfig.js';
4
- export declare class SvgConfig extends BaseConfig<SVGSVGElement> {
5
- protected cachedImg: CachedRevealPath;
6
- constructor(store: RevealBoundaryStore, $svg: SVGSVGElement, $container: HTMLElement);
7
- updateCachedBitmap: () => void;
8
- updateCachedReveal: () => void;
9
- private updateAnimateGrd;
10
- private updateGradientPosition;
11
- private drawShape;
12
- syncSizeToElement: (x: SVGSVGElement) => void;
13
- clear: (forAnimation: boolean) => void;
14
- private internalClear;
15
- paint: (skipSamePointerPositionCheck?: boolean | undefined) => boolean;
16
- }
1
+ import { RevealBoundaryStore } from './RevealBoundryStore.js';
2
+ import type { CachedRevealPath } from './utils/types.js';
3
+ import { BaseConfig } from './BaseConfig.js';
4
+ export declare class SvgConfig extends BaseConfig<SVGSVGElement> {
5
+ protected cachedImg: CachedRevealPath;
6
+ constructor(store: RevealBoundaryStore, $svg: SVGSVGElement, $container: HTMLElement);
7
+ updateCachedBitmap: () => void;
8
+ updateCachedReveal: () => void;
9
+ private updateAnimateGrd;
10
+ private updateGradientPosition;
11
+ private drawShape;
12
+ syncSizeToElement: (x: SVGSVGElement) => void;
13
+ clear: (forAnimation: boolean) => void;
14
+ private internalClear;
15
+ paint: (skipSamePointerPositionCheck?: boolean | undefined) => boolean;
16
+ }
17
17
  //# sourceMappingURL=SvgConfig.d.ts.map