@ax-design/reveal-highlight 0.5.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 +36 -35
  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,249 +1,270 @@
1
- import { CanvasConfig } from './CanvasConfig.js';
2
- import { SvgConfig } from './SvgConfig.js';
3
- export class RevealBoundaryStore {
4
- constructor(id, $el) {
5
- // The current cursor position relative to window.
6
- this.clientX = -1000;
7
- this.clientY = -1000;
8
- // The cursor position of painted reveal effect.
9
- this.paintedClientX = -1000;
10
- this.paintedClientY = -1000;
11
- this.mouseInBoundary = false;
12
- this.canvasList = [];
13
- this.animationQueue = [];
14
- this.animationFrame = null;
15
- this.mouseUpClientX = null;
16
- this.mouseUpClientY = null;
17
- this.mouseDownAnimateStartFrame = null;
18
- this.mouseDownAnimateCurrentFrame = null;
19
- this.mouseDownAnimateReleasedFrame = null;
20
- this.mouseDownAnimateLogicFrame = null;
21
- this.mousePressed = false;
22
- this.mouseReleased = false;
23
- this.maxRadius = -1;
24
- this.requestedAnimationFrame = false;
25
- this.addReveal = ($element, $container) => {
26
- let config;
27
- const elementType = Object.prototype.toString.call($element);
28
- if (elementType === '[object HTMLCanvasElement]') {
29
- config = new CanvasConfig(this, $element, $container);
30
- }
31
- else if (elementType === '[object SVGSVGElement]') {
32
- config = new SvgConfig(this, $element, $container);
33
- }
34
- else {
35
- throw new TypeError(`Unknown element type, got: ${elementType}, Canvas or SVG element expected.`);
36
- }
37
- config.cacheBoundingRect();
38
- config.cacheCanvasPaintingStyle();
39
- config.updateCachedBitmap();
40
- this.canvasList.push(config);
41
- };
42
- this.removeReveal = ($el) => {
43
- this.canvasList = this.canvasList.filter((config) => {
44
- return config && config.element !== $el;
45
- });
46
- };
47
- this.updateMaxRadius = (x) => {
48
- this.maxRadius = Math.max(x, this.maxRadius);
49
- };
50
- this.requestPaintAll = (cleanup) => {
51
- if (this.requestedAnimationFrame)
52
- return;
53
- this.requestedAnimationFrame = true;
54
- this.animationFrame = window.requestAnimationFrame((frame) => {
55
- this.requestedAnimationFrame = false;
56
- this.paintAll(cleanup ? -1 : frame, true);
57
- });
58
- };
59
- this.updatePointerPosition = (x, y) => {
60
- this.clientX = x;
61
- this.clientY = y;
62
- const boundingBox = this.container.getBoundingClientRect();
63
- let mouseInBoundary = true;
64
- if (x < boundingBox.left - this.maxRadius)
65
- mouseInBoundary = false;
66
- if (x > boundingBox.right + this.maxRadius)
67
- mouseInBoundary = false;
68
- if (y < boundingBox.top - this.maxRadius)
69
- mouseInBoundary = false;
70
- if (y > boundingBox.bottom + this.maxRadius)
71
- mouseInBoundary = false;
72
- this.mouseInBoundary = mouseInBoundary;
73
- };
74
- this.onPointerMoveOnScreen = (x, y) => {
75
- this.updatePointerPosition(x, y);
76
- if (!this.mouseInBoundary)
77
- return;
78
- this.requestPaintAll();
79
- return true;
80
- };
81
- /**
82
- * Repaint all canvas while user's pointer has entered the boundary.
83
- */
84
- this.onPointerEnterBoundary = () => {
85
- this.mouseInBoundary = true;
86
- if (!this.animationFrame) {
87
- this.requestPaintAll();
88
- }
89
- };
90
- /**
91
- * Clear all canvas while user's pointer leave the bounary.
92
- */
93
- this.onPointerLeaveBoundary = () => {
94
- this.mouseInBoundary = false;
95
- this.requestPaintAll(true);
96
- };
97
- /**
98
- * The painting method that draw everything on your screen.
99
- * @param frame current frame index, if this value is 0, it means all canvas
100
- * should be cleaned.
101
- * @param skipSamePointerPositionCheck Literally.
102
- */
103
- this.paintAll = (frame, skipSamePointerPositionCheck) => {
104
- if (!skipSamePointerPositionCheck && !this.mouseInBoundary && this.animationQueue.length === 0) {
105
- return;
106
- }
107
- // Animation duration checkup
108
- for (let i = 0; i < this.animationQueue.length; i++) {
109
- const config = this.animationQueue[i];
110
- if (!frame || config.currentFrameId === frame) {
111
- continue;
112
- }
113
- config.currentFrameId = frame;
114
- // Initialize the animation parameter
115
- if (config.mouseDownAnimateStartFrame === null) {
116
- config.mouseDownAnimateStartFrame = frame;
117
- }
118
- // Calculate how long the animation has been playing
119
- const relativeFrame = frame - config.mouseDownAnimateStartFrame;
120
- config.mouseDownAnimateCurrentFrame = relativeFrame;
121
- const speed = config.cachedStyle.pressAnimationSpeed;
122
- const accelerateRate = config.cachedStyle.releaseAnimationAccelerateRate;
123
- // We assume that Ripple is a one-way linear process from
124
- // no diffusion to fully diffused,
125
- // and Logic Frame represents the progress of the animation
126
- // in this process.
127
- let unitLogicFrame = relativeFrame;
128
- if (config.mouseReleased && config.mouseDownAnimateReleasedFrame) {
129
- unitLogicFrame += (relativeFrame - config.mouseDownAnimateReleasedFrame) * accelerateRate;
130
- }
131
- config.mouseDownAnimateLogicFrame = unitLogicFrame / speed;
132
- if (config.mouseDownAnimateLogicFrame > 1) {
133
- // It will be cleaned later
134
- config.cleanedUpForAnimation = true;
135
- }
136
- }
137
- // Paint the canvas one by one
138
- for (let i = 0; i < this.canvasList.length; i++) {
139
- const config = this.canvasList[i];
140
- config.currentFrameId = frame;
141
- if (config.cleanedUpForAnimation) {
142
- this.cleanUpAnimationUnit(config, false);
143
- config.cleanedUpForAnimation = false;
144
- }
145
- else {
146
- const isPlayingAnimation = this.animationQueue.indexOf(config) === -1;
147
- if (this.mouseInBoundary || isPlayingAnimation) {
148
- config.paint(skipSamePointerPositionCheck);
149
- }
150
- else {
151
- config.clear(false);
152
- }
153
- }
154
- }
155
- this.paintedClientX = this.clientX;
156
- this.paintedClientY = this.clientY;
157
- if (this.mouseInBoundary || this.animationQueue.length !== 0) {
158
- this.requestPaintAll();
159
- }
160
- else {
161
- this.animationFrame = null;
162
- }
163
- };
164
- /**
165
- * Clear all canvas.
166
- */
167
- this.clearAll = (forAnimation) => {
168
- this.cleanupAnimation(forAnimation, true);
169
- };
170
- /**
171
- * This is the effect while user pressed on the reveal highlight,
172
- * the ripple start to spread slowly.
173
- */
174
- this.initializeAnimation = () => {
175
- const config = this.canvasList.find((x) => x.mouseInCanvas());
176
- if (!config)
177
- return;
178
- if (!this.animationQueue.includes(config)) {
179
- this.animationQueue.push(config);
180
- }
181
- config.mouseDownAnimateStartFrame = null;
182
- config.mousePressed = true;
183
- config.mouseReleased = false;
184
- };
185
- /**
186
- * This is the effect while user released it's pointer, the spreading
187
- * ripple animation will start to accelerate.
188
- */
189
- this.switchAnimation = () => {
190
- for (let i = 0; i < this.animationQueue.length; i++) {
191
- const config = this.animationQueue[i];
192
- if (!config.mouseReleased) {
193
- config.mouseReleased = true;
194
- config.mouseDownAnimateReleasedFrame = config.mouseDownAnimateCurrentFrame;
195
- config.mouseUpClientX = this.clientX;
196
- config.mouseUpClientY = this.clientY;
197
- }
198
- }
199
- };
200
- /**
201
- * Cleanup all animations.
202
- * @param skipPaint Only cleanup data or also clean up the canvas
203
- * @param forceClean Clean the canvas or not
204
- */
205
- this.cleanupAnimation = (skipPaint, forceClean) => {
206
- for (let i = 0; i < this.animationQueue.length; i++) {
207
- const config = this.animationQueue[i];
208
- this.cleanUpAnimationUnit(config, skipPaint, forceClean);
209
- }
210
- };
211
- /**
212
- * Clean up the config of an animation, but the canvas won't cleaned up.
213
- * @param config The config to be cleaned up.
214
- * @param skipPaint Skip painting.
215
- * @param forceClean Force clear the painting.
216
- */
217
- this.cleanUpAnimationUnit = (config, skipPaint, forceClean) => {
218
- config.mouseUpClientX = null;
219
- config.mouseUpClientY = null;
220
- config.mouseDownAnimateStartFrame = null;
221
- config.mouseDownAnimateCurrentFrame = null;
222
- config.mouseDownAnimateReleasedFrame = null;
223
- config.mouseDownAnimateLogicFrame = null;
224
- config.mousePressed = false;
225
- config.mouseReleased = false;
226
- const configIdx = this.animationQueue.indexOf(config);
227
- if (configIdx > -1) {
228
- this.animationQueue.splice(configIdx, 1);
229
- }
230
- if (!skipPaint) {
231
- if (forceClean) {
232
- config.clear(false);
233
- }
234
- else if (this.mouseInBoundary) {
235
- config.paint(true);
236
- }
237
- else {
238
- config.clear(true);
239
- }
240
- }
241
- };
242
- this.getRevealAnimationConfig = () => {
243
- return this.canvasList.find((x) => x.mouseInCanvas()) || null;
244
- };
245
- this.id = id;
246
- this.container = $el;
247
- }
248
- }
1
+ import { CanvasConfig } from './CanvasConfig.js';
2
+ import { SvgConfig } from './SvgConfig.js';
3
+ export class RevealBoundaryStore {
4
+ constructor(id, $el) {
5
+ // The current cursor position relative to window.
6
+ this.clientX = -1000;
7
+ this.clientY = -1000;
8
+ // The cursor position of painted reveal effect.
9
+ this.paintedClientX = -1000;
10
+ this.paintedClientY = -1000;
11
+ this.mouseInBoundary = false;
12
+ this.canvasList = [];
13
+ this.animationQueue = [];
14
+ this.animationFrame = null;
15
+ this.mouseUpClientX = null;
16
+ this.mouseUpClientY = null;
17
+ this.mouseDownAnimateStartFrame = null;
18
+ this.mouseDownAnimateCurrentFrame = null;
19
+ this.mouseDownAnimateReleasedFrame = null;
20
+ this.mouseDownAnimateLogicFrame = null;
21
+ this.mousePressed = false;
22
+ this.mouseReleased = false;
23
+ this.maxRadius = -1;
24
+ this.requestedAnimationFrame = false;
25
+ this.addReveal = ($element, $container) => {
26
+ let config;
27
+ const elementType = Object.prototype.toString.call($element);
28
+ if (elementType === '[object HTMLCanvasElement]') {
29
+ config = new CanvasConfig(this, $element, $container);
30
+ }
31
+ else if (elementType === '[object SVGSVGElement]') {
32
+ config = new SvgConfig(this, $element, $container);
33
+ }
34
+ else {
35
+ throw new TypeError(`Unknown element type, got: ${elementType}, Canvas or SVG element expected.`);
36
+ }
37
+ config.cacheBoundingRect();
38
+ config.cacheCanvasPaintingStyle();
39
+ config.updateCachedBitmap();
40
+ this.canvasList.push(config);
41
+ };
42
+ this.removeReveal = ($el) => {
43
+ this.canvasList = this.canvasList.filter((config) => {
44
+ return config && config.element !== $el;
45
+ });
46
+ };
47
+ this.updateMaxRadius = (x) => {
48
+ this.maxRadius = Math.max(x, this.maxRadius);
49
+ };
50
+ this.requestPaintAll = (cleanup) => {
51
+ if (this.requestedAnimationFrame)
52
+ return;
53
+ this.requestedAnimationFrame = true;
54
+ this.animationFrame = window.requestAnimationFrame((frame) => {
55
+ this.requestedAnimationFrame = false;
56
+ this.paintAll(cleanup ? -1 : frame, true);
57
+ });
58
+ };
59
+ this.updatePointerPosition = (x, y) => {
60
+ this.clientX = x;
61
+ this.clientY = y;
62
+ const boundingBox = this.container.getBoundingClientRect();
63
+ let mouseInBoundary = true;
64
+ if (x < boundingBox.left - this.maxRadius)
65
+ mouseInBoundary = false;
66
+ if (x > boundingBox.right + this.maxRadius)
67
+ mouseInBoundary = false;
68
+ if (y < boundingBox.top - this.maxRadius)
69
+ mouseInBoundary = false;
70
+ if (y > boundingBox.bottom + this.maxRadius)
71
+ mouseInBoundary = false;
72
+ this.mouseInBoundary = mouseInBoundary;
73
+ };
74
+ // While the browser scrolls under a finger, the finger stays on the same
75
+ // spot of the content, but touch events are throttled (~200ms in Chromium).
76
+ // The pointer is kept relative to the container and re-derived on every
77
+ // frame, otherwise it stays still on the screen while the content moves.
78
+ this.anchorOffsetX = null;
79
+ this.anchorOffsetY = null;
80
+ this.anchorPointer = () => {
81
+ const boundingBox = this.container.getBoundingClientRect();
82
+ this.anchorOffsetX = this.clientX - boundingBox.left;
83
+ this.anchorOffsetY = this.clientY - boundingBox.top;
84
+ };
85
+ this.followAnchor = () => {
86
+ if (this.anchorOffsetX === null || this.anchorOffsetY === null)
87
+ return;
88
+ const boundingBox = this.container.getBoundingClientRect();
89
+ this.clientX = boundingBox.left + this.anchorOffsetX;
90
+ this.clientY = boundingBox.top + this.anchorOffsetY;
91
+ };
92
+ this.onPointerMoveOnScreen = (x, y) => {
93
+ this.updatePointerPosition(x, y);
94
+ if (!this.mouseInBoundary)
95
+ return;
96
+ this.requestPaintAll();
97
+ return true;
98
+ };
99
+ /**
100
+ * Repaint all canvas while user's pointer has entered the boundary.
101
+ */
102
+ this.onPointerEnterBoundary = () => {
103
+ this.mouseInBoundary = true;
104
+ if (!this.animationFrame) {
105
+ this.requestPaintAll();
106
+ }
107
+ };
108
+ /**
109
+ * Clear all canvas while user's pointer leave the bounary.
110
+ */
111
+ this.onPointerLeaveBoundary = () => {
112
+ this.anchorOffsetX = null;
113
+ this.anchorOffsetY = null;
114
+ this.mouseInBoundary = false;
115
+ this.requestPaintAll(true);
116
+ };
117
+ /**
118
+ * The painting method that draw everything on your screen.
119
+ * @param frame current frame index, if this value is 0, it means all canvas
120
+ * should be cleaned.
121
+ * @param skipSamePointerPositionCheck Literally.
122
+ */
123
+ this.paintAll = (frame, skipSamePointerPositionCheck) => {
124
+ if (!skipSamePointerPositionCheck && !this.mouseInBoundary && this.animationQueue.length === 0) {
125
+ return;
126
+ }
127
+ this.followAnchor();
128
+ // Animation duration checkup
129
+ for (let i = 0; i < this.animationQueue.length; i++) {
130
+ const config = this.animationQueue[i];
131
+ if (!frame || config.currentFrameId === frame) {
132
+ continue;
133
+ }
134
+ config.currentFrameId = frame;
135
+ // Initialize the animation parameter
136
+ if (config.mouseDownAnimateStartFrame === null) {
137
+ config.mouseDownAnimateStartFrame = frame;
138
+ }
139
+ // Calculate how long the animation has been playing
140
+ const relativeFrame = frame - config.mouseDownAnimateStartFrame;
141
+ config.mouseDownAnimateCurrentFrame = relativeFrame;
142
+ const speed = config.cachedStyle.pressAnimationSpeed;
143
+ const accelerateRate = config.cachedStyle.releaseAnimationAccelerateRate;
144
+ // We assume that Ripple is a one-way linear process from
145
+ // no diffusion to fully diffused,
146
+ // and Logic Frame represents the progress of the animation
147
+ // in this process.
148
+ let unitLogicFrame = relativeFrame;
149
+ if (config.mouseReleased && config.mouseDownAnimateReleasedFrame) {
150
+ unitLogicFrame += (relativeFrame - config.mouseDownAnimateReleasedFrame) * accelerateRate;
151
+ }
152
+ config.mouseDownAnimateLogicFrame = unitLogicFrame / speed;
153
+ if (config.mouseDownAnimateLogicFrame > 1) {
154
+ // It will be cleaned later
155
+ config.cleanedUpForAnimation = true;
156
+ }
157
+ }
158
+ // Paint the canvas one by one
159
+ for (let i = 0; i < this.canvasList.length; i++) {
160
+ const config = this.canvasList[i];
161
+ config.currentFrameId = frame;
162
+ if (config.cleanedUpForAnimation) {
163
+ this.cleanUpAnimationUnit(config, false);
164
+ config.cleanedUpForAnimation = false;
165
+ }
166
+ else {
167
+ const isPlayingAnimation = this.animationQueue.indexOf(config) === -1;
168
+ if (this.mouseInBoundary || isPlayingAnimation) {
169
+ config.paint(skipSamePointerPositionCheck);
170
+ }
171
+ else {
172
+ config.clear(false);
173
+ }
174
+ }
175
+ }
176
+ this.paintedClientX = this.clientX;
177
+ this.paintedClientY = this.clientY;
178
+ if (this.mouseInBoundary || this.animationQueue.length !== 0) {
179
+ this.requestPaintAll();
180
+ }
181
+ else {
182
+ this.animationFrame = null;
183
+ }
184
+ };
185
+ /**
186
+ * Clear all canvas.
187
+ */
188
+ this.clearAll = (forAnimation) => {
189
+ this.cleanupAnimation(forAnimation, true);
190
+ };
191
+ /**
192
+ * This is the effect while user pressed on the reveal highlight,
193
+ * the ripple start to spread slowly.
194
+ */
195
+ this.initializeAnimation = () => {
196
+ const config = this.canvasList.find((x) => x.mouseInCanvas());
197
+ if (!config)
198
+ return;
199
+ if (!this.animationQueue.includes(config)) {
200
+ this.animationQueue.push(config);
201
+ }
202
+ config.mouseDownAnimateStartFrame = null;
203
+ config.mousePressed = true;
204
+ config.mouseReleased = false;
205
+ };
206
+ /**
207
+ * This is the effect while user released it's pointer, the spreading
208
+ * ripple animation will start to accelerate.
209
+ */
210
+ this.switchAnimation = () => {
211
+ for (let i = 0; i < this.animationQueue.length; i++) {
212
+ const config = this.animationQueue[i];
213
+ if (!config.mouseReleased) {
214
+ config.mouseReleased = true;
215
+ config.mouseDownAnimateReleasedFrame = config.mouseDownAnimateCurrentFrame;
216
+ config.mouseUpClientX = this.clientX;
217
+ config.mouseUpClientY = this.clientY;
218
+ }
219
+ }
220
+ };
221
+ /**
222
+ * Cleanup all animations.
223
+ * @param skipPaint Only cleanup data or also clean up the canvas
224
+ * @param forceClean Clean the canvas or not
225
+ */
226
+ this.cleanupAnimation = (skipPaint, forceClean) => {
227
+ for (let i = 0; i < this.animationQueue.length; i++) {
228
+ const config = this.animationQueue[i];
229
+ this.cleanUpAnimationUnit(config, skipPaint, forceClean);
230
+ }
231
+ };
232
+ /**
233
+ * Clean up the config of an animation, but the canvas won't cleaned up.
234
+ * @param config The config to be cleaned up.
235
+ * @param skipPaint Skip painting.
236
+ * @param forceClean Force clear the painting.
237
+ */
238
+ this.cleanUpAnimationUnit = (config, skipPaint, forceClean) => {
239
+ config.mouseUpClientX = null;
240
+ config.mouseUpClientY = null;
241
+ config.mouseDownAnimateStartFrame = null;
242
+ config.mouseDownAnimateCurrentFrame = null;
243
+ config.mouseDownAnimateReleasedFrame = null;
244
+ config.mouseDownAnimateLogicFrame = null;
245
+ config.mousePressed = false;
246
+ config.mouseReleased = false;
247
+ const configIdx = this.animationQueue.indexOf(config);
248
+ if (configIdx > -1) {
249
+ this.animationQueue.splice(configIdx, 1);
250
+ }
251
+ if (!skipPaint) {
252
+ if (forceClean) {
253
+ config.clear(false);
254
+ }
255
+ else if (this.mouseInBoundary) {
256
+ config.paint(true);
257
+ }
258
+ else {
259
+ config.clear(true);
260
+ }
261
+ }
262
+ };
263
+ this.getRevealAnimationConfig = () => {
264
+ return this.canvasList.find((x) => x.mouseInCanvas()) || null;
265
+ };
266
+ this.id = id;
267
+ this.container = $el;
268
+ }
269
+ }
249
270
  //# sourceMappingURL=RevealBoundryStore.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RevealBoundryStore.js","sourceRoot":"","sources":["../src/RevealBoundryStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAI3C,MAAM,OAAO,mBAAmB;IA+B5B,YAAY,EAAU,EAAE,GAAgB;QA3BxC,kDAAkD;QAClD,YAAO,GAAG,CAAC,IAAI,CAAC;QAChB,YAAO,GAAG,CAAC,IAAI,CAAC;QAEhB,gDAAgD;QAChD,mBAAc,GAAG,CAAC,IAAI,CAAC;QACvB,mBAAc,GAAG,CAAC,IAAI,CAAC;QAEvB,oBAAe,GAAG,KAAK,CAAC;QACxB,eAAU,GAAa,EAAE,CAAC;QAE1B,mBAAc,GAAa,EAAE,CAAC;QAC9B,mBAAc,GAAkB,IAAI,CAAC;QAErC,mBAAc,GAAG,IAAI,CAAC;QACtB,mBAAc,GAAG,IAAI,CAAC;QACtB,+BAA0B,GAAG,IAAI,CAAC;QAClC,iCAA4B,GAAG,IAAI,CAAC;QACpC,kCAA6B,GAAG,IAAI,CAAC;QACrC,+BAA0B,GAAG,IAAI,CAAC;QAClC,iBAAY,GAAG,KAAK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,CAAC,CAAC;iBACtB;qBAAM;oBACH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;iBACtB;aACJ;QACL,CAAC,CAAC;QAEF,6BAAwB,GAAG,GAAG,EAAE;YAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,IAAI,IAAI,CAAC;QAClE,CAAC,CAAC;QApRE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC;IACzB,CAAC;CAmRJ"}
@@ -1,16 +1,20 @@
1
- import { RevealBoundaryStore } from './RevealBoundryStore.js';
2
- export declare class RevealStateManager {
3
- private _currentHashId;
4
- private _storage;
5
- private requestedTraverseBoundaries;
6
- cachedMouseX: number;
7
- cachedMouseY: number;
8
- constructor();
9
- pointerLeaveScheduled: boolean;
10
- handlePointerLeave: () => void;
11
- handlePointerMove: (event: PointerEvent) => void;
12
- traverseBoundaries: () => void;
13
- newBoundary: ($el: HTMLElement) => RevealBoundaryStore;
14
- removeBoundary: (store: RevealBoundaryStore) => void;
15
- }
1
+ import { RevealBoundaryStore } from './RevealBoundryStore.js';
2
+ export declare class RevealStateManager {
3
+ private _currentHashId;
4
+ private _storage;
5
+ private requestedTraverseBoundaries;
6
+ cachedMouseX: number;
7
+ cachedMouseY: number;
8
+ constructor();
9
+ touchScrolling: boolean;
10
+ pointerLeaveScheduled: boolean;
11
+ handlePointerLeave: () => void;
12
+ handlePointerMove: (event: {
13
+ clientX: number;
14
+ clientY: number;
15
+ }) => void;
16
+ traverseBoundaries: () => void;
17
+ newBoundary: ($el: HTMLElement) => RevealBoundaryStore;
18
+ removeBoundary: (store: RevealBoundaryStore) => void;
19
+ }
16
20
  //# sourceMappingURL=RevealStateManager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RevealStateManager.d.ts","sourceRoot":"","sources":["../src/RevealStateManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAI9D,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,QAAQ,CAA6B;IAE7C,OAAO,CAAC,2BAA2B,CAAS;IAC5C,YAAY,SAAM;IAClB,YAAY,SAAM;;IA8BlB,qBAAqB,UAAS;IAE9B,kBAAkB,aAYjB;IAED,iBAAiB,UAAW,YAAY,UAQtC;IAEF,kBAAkB,aAKhB;IAEF,WAAW,QAAS,WAAW,yBAO7B;IAEF,cAAc,UAAW,mBAAmB,UAE1C;CACL"}
1
+ {"version":3,"file":"RevealStateManager.d.ts","sourceRoot":"","sources":["../src/RevealStateManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAI9D,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,QAAQ,CAA6B;IAE7C,OAAO,CAAC,2BAA2B,CAAS;IAC5C,YAAY,SAAM;IAClB,YAAY,SAAM;;IAkDlB,cAAc,UAAS;IAEvB,qBAAqB,UAAS;IAE9B,kBAAkB,aAYjB;IAED,iBAAiB,UAAW;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,UAQ9D;IAEF,kBAAkB,aAMhB;IAEF,WAAW,QAAS,WAAW,yBAO7B;IAEF,cAAc,UAAW,mBAAmB,UAE1C;CACL"}