@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,234 +1,297 @@
1
- import { RevealStateManager } from './RevealStateManager.js';
2
- import { config } from './config.js';
3
- function closest(dom, selector) {
4
- var _a;
5
- const r = dom.closest(selector);
6
- if (r)
7
- return r;
8
- const host = (_a = findParentShadowRoot(dom)) === null || _a === void 0 ? void 0 : _a.host;
9
- if (!host)
10
- return null;
11
- return closest(host, selector);
12
- }
13
- function findParentShadowRoot(x) {
14
- if (!x)
15
- return null;
16
- if (x.parentNode && x.parentNode.nodeType === document.DOCUMENT_FRAGMENT_NODE)
17
- return x.parentNode;
18
- return findParentShadowRoot(x.parentNode);
19
- }
20
- class ServerSideHTMLElement {
21
- constructor() {
22
- this.root = {
23
- innerHTML: '',
24
- querySelector: (_x) => null,
25
- };
26
- this.attachShadow = () => null;
27
- }
28
- }
29
- const PatchedHTMLElement = typeof globalThis.Window === 'undefined' ? ServerSideHTMLElement : HTMLElement;
30
- export class AxRevealProvider extends PatchedHTMLElement {
31
- constructor() {
32
- super(...arguments);
33
- this.stateManager = new RevealStateManager();
34
- }
35
- }
36
- AxRevealProvider.ElementName = 'ax-reveal-provider';
37
- export class AxRevealBoundary extends PatchedHTMLElement {
38
- constructor() {
39
- super();
40
- this.root = this.attachShadow({ mode: 'open' });
41
- /**
42
- * Update the position of your pointer.
43
- * @param ev Pointer event from the listener.
44
- */
45
- this.updatePointerPosition = (ev) => {
46
- this.waitForStorage((storage) => {
47
- storage.clientX = ev.clientX;
48
- storage.clientY = ev.clientY;
49
- });
50
- };
51
- this.handlePointerEnter = () => this.waitForStorage((storage) => storage.onPointerEnterBoundary());
52
- this.handlePointerLeave = () => this.waitForStorage((storage) => storage.onPointerLeaveBoundary());
53
- this.handlePointerMove = this.updatePointerPosition;
54
- this.handlePointerUp = (ev) => {
55
- if (ev.pointerType === 'mouse') {
56
- this.waitForStorage((storage) => storage.switchAnimation());
57
- }
58
- else {
59
- this.waitForStorage((storage) => storage.clearAll(false));
60
- }
61
- };
62
- this.handlePointerDown = (ev) => this.waitForStorage((storage) => {
63
- this.updatePointerPosition(ev);
64
- storage.initializeAnimation();
65
- });
66
- this.root.innerHTML = `
67
- <div>
68
- <slot></slot>
69
- </div>`;
70
- }
71
- get storage() {
72
- return this._storage;
73
- }
74
- set storage(newStorage) {
75
- const oldStorage = this._storage;
76
- if (oldStorage) {
77
- this.dispatchEvent(new CustomEvent(AxRevealBoundary.removeStorageEvent, { detail: oldStorage }));
78
- AxRevealBoundary.stateManager.removeBoundary(oldStorage);
79
- }
80
- if (newStorage) {
81
- this._storage = newStorage;
82
- this.dispatchEvent(new CustomEvent(AxRevealBoundary.attachStorageEvent, { detail: newStorage }));
83
- }
84
- if (oldStorage && newStorage) {
85
- this.dispatchEvent(new CustomEvent(AxRevealBoundary.replaceStorageEvent, {
86
- detail: { old: oldStorage, new: newStorage },
87
- }));
88
- }
89
- }
90
- waitForStorage(f) {
91
- if (this.storage === undefined) {
92
- this.addEventListener(AxRevealBoundary.attachStorageEvent, () => f(this.storage), { once: true });
93
- }
94
- else {
95
- f(this.storage);
96
- }
97
- }
98
- appendStorage(force = false) {
99
- if (!force && this.storage) {
100
- return;
101
- }
102
- const parent = closest(this, AxRevealProvider.ElementName);
103
- const stateManager = parent ? parent.stateManager : AxRevealBoundary.stateManager;
104
- this.storage = stateManager.newBoundary(this);
105
- }
106
- connectedCallback() {
107
- this.appendStorage(true);
108
- if (config.borderDetectionMode === 'strictEdge') {
109
- this.addEventListener('pointerenter', this.handlePointerEnter);
110
- this.addEventListener('pointerleave', this.handlePointerLeave);
111
- this.addEventListener('pointermove', this.handlePointerMove);
112
- }
113
- this.addEventListener('pointerdown', this.handlePointerDown);
114
- this.addEventListener('pointerup', this.handlePointerUp);
115
- }
116
- disconnectedCallback() {
117
- this.storage = undefined;
118
- }
119
- }
120
- AxRevealBoundary.ElementName = 'ax-reveal-bound';
121
- AxRevealBoundary.removeStorageEvent = 'removeStorage';
122
- AxRevealBoundary.attachStorageEvent = 'attachStorage';
123
- AxRevealBoundary.replaceStorageEvent = 'replaceStorage';
124
- AxRevealBoundary.stateManager = new RevealStateManager();
125
- export class AxReveal extends PatchedHTMLElement {
126
- constructor() {
127
- super();
128
- this.root = this.attachShadow({ mode: 'open' });
129
- this.handlePointerDown = (ev) => {
130
- this.setPointerCapture(ev.pointerId);
131
- };
132
- this.root.innerHTML = `
133
- <div class="ax-reveal">
134
- <canvas></canvas>
135
- <div class="content"><slot></slot></div>
136
- </div>
137
- <style>
138
- .ax-reveal { display: content; }
139
- .ax-reveal * { user-drag: none; -webkit-user-drag: none; touch-action: none; user-select: none; }
140
- .content { position: relative; }
141
- canvas { top: 0; left: 0; pointer-events: none; width: 100%; height: 100%; position: absolute; }
142
- :host { display: inline-block; position: relative; }
143
- :host([block]) { display: block; }
144
- :host([inline-block]) { display: inline-block; }
145
- :host([flex]) { display: flex; }
146
- :host([inline-flex]) { display: inline-flex; }
147
- :host([grid]) { display: grid; }
148
- :host([inline-grid]) { display: inline-grid; }
149
- ::slotted(*) { user-drag: none; -webkit-user-drag: none; touch-action: none; user-select: none; }
150
- ::slotted(button) { outline:none; }
151
- </style>`;
152
- this.canvas = this.root.querySelector('canvas');
153
- }
154
- adoptedCallback() {
155
- this.disconnectedCallback();
156
- this.connectedCallback();
157
- }
158
- disconnectedCallback() {
159
- this.boundary && this.boundary.waitForStorage((storage) => storage.removeReveal(this.canvas));
160
- }
161
- connectedCallback() {
162
- this.boundary = closest(this, AxRevealBoundary.ElementName);
163
- if (!this.boundary)
164
- throw new SyntaxError('You must use ' + AxRevealBoundary.ElementName + ' as the boundary of reveal highlight!');
165
- this.boundary.waitForStorage((storage) => setTimeout(() => storage.addReveal(this.canvas, this), 0));
166
- this.addEventListener('pointerdown', this.handlePointerDown);
167
- }
168
- }
169
- AxReveal.ElementName = 'ax-reveal';
170
- export class AxRevealNg extends PatchedHTMLElement {
171
- constructor() {
172
- super();
173
- this.root = this.attachShadow({ mode: 'open' });
174
- this.handlePointerDown = (ev) => {
175
- this.setPointerCapture(ev.pointerId);
176
- };
177
- this.root.innerHTML = `
178
- <div class="ax-reveal">
179
- <svg>
180
- <defs>
181
- <radialGradient id="borderGrad" gradientUnits="userSpaceOnUse" r="10">
182
- <stop id="borderCenter" offset="0%" />
183
- <stop id="borderOut" offset="100%" />
184
- </radialGradient>
185
- <radialGradient id="fillGrad" gradientUnits="userSpaceOnUse" r="10">
186
- <stop id="fillCenter" offset="0%" />
187
- <stop id="fillOut" offset="100%" />
188
- </radialGradient>
189
- <radialGradient id="rippleGrad" gradientUnits="userSpaceOnUse" r="10">
190
- <stop id="rippleCenter" offset="0%" />
191
- <stop id="rippleMiddle" offset="0%" />
192
- <stop id="rippleOut" offset="0%" />
193
- </radialGradient>
194
- </defs>
195
- <path id="borderPath" fill="url(#borderGrad)" />
196
- <path id="fillPath" fill="url(#fillGrad)" />
197
- <path id="ripplePath" fill="url(#rippleGrad)" />
198
- </svg>
199
- <div class="content"><slot></slot></div>
200
- </div>
201
- <style>
202
- .ax-reveal { display: contents; }
203
- .ax-reveal * { user-drag: none; -webkit-user-drag: none; touch-action: none; user-select: none; }
204
- .content { position: relative; }
205
- svg { top: 0; left: 0; pointer-events: none; width: 100%; height: 100%; position: absolute; }
206
- :host { display: inline-block; position: relative; }
207
- :host([block]) { display: block; }
208
- :host([inline-block]) { display: inline-block; }
209
- :host([flex]) { display: flex; }
210
- :host([inline-flex]) { display: inline-flex; }
211
- :host([grid]) { display: grid; }
212
- :host([inline-grid]) { display: inline-grid; }
213
- ::slotted(*) { user-drag: none; -webkit-user-drag: none; touch-action: none; user-select: none; }
214
- ::slotted(button) { outline:none; }
215
- </style>`;
216
- this.svg = this.root.querySelector('svg');
217
- }
218
- adoptedCallback() {
219
- this.disconnectedCallback();
220
- this.connectedCallback();
221
- }
222
- disconnectedCallback() {
223
- this.boundary && this.boundary.waitForStorage((storage) => storage.removeReveal(this.svg));
224
- }
225
- connectedCallback() {
226
- this.boundary = closest(this, AxRevealBoundary.ElementName);
227
- if (!this.boundary)
228
- throw new SyntaxError('You must use ' + AxRevealBoundary.ElementName + ' as the boundary of reveal highlight!');
229
- this.boundary.waitForStorage((storage) => setTimeout(() => storage.addReveal(this.svg, this), 0));
230
- this.addEventListener('pointerdown', this.handlePointerDown);
231
- }
232
- }
233
- AxRevealNg.ElementName = 'ax-reveal-ng';
1
+ import { RevealStateManager } from './RevealStateManager.js';
2
+ import { config } from './config.js';
3
+ function closest(dom, selector) {
4
+ var _a;
5
+ const r = dom.closest(selector);
6
+ if (r)
7
+ return r;
8
+ const host = (_a = findParentShadowRoot(dom)) === null || _a === void 0 ? void 0 : _a.host;
9
+ if (!host)
10
+ return null;
11
+ return closest(host, selector);
12
+ }
13
+ function findParentShadowRoot(x) {
14
+ if (!x)
15
+ return null;
16
+ if (x.parentNode && x.parentNode.nodeType === document.DOCUMENT_FRAGMENT_NODE)
17
+ return x.parentNode;
18
+ return findParentShadowRoot(x.parentNode);
19
+ }
20
+ class ServerSideHTMLElement {
21
+ constructor() {
22
+ this.root = {
23
+ innerHTML: '',
24
+ querySelector: (_x) => null,
25
+ };
26
+ this.attachShadow = () => null;
27
+ }
28
+ }
29
+ const PatchedHTMLElement = typeof globalThis.Window === 'undefined' ? ServerSideHTMLElement : HTMLElement;
30
+ export class AxRevealProvider extends PatchedHTMLElement {
31
+ constructor() {
32
+ super(...arguments);
33
+ this.stateManager = new RevealStateManager();
34
+ }
35
+ }
36
+ AxRevealProvider.ElementName = 'ax-reveal-provider';
37
+ export class AxRevealBoundary extends PatchedHTMLElement {
38
+ constructor() {
39
+ super();
40
+ this.root = this.attachShadow({ mode: 'open' });
41
+ /**
42
+ * Update the position of your pointer.
43
+ * @param ev Pointer event or touch point from the listener.
44
+ */
45
+ this.updatePointerPosition = (ev) => {
46
+ this.waitForStorage((storage) => {
47
+ storage.clientX = ev.clientX;
48
+ storage.clientY = ev.clientY;
49
+ });
50
+ };
51
+ // Once the browser starts scrolling, pointer events stop (`pointercancel`)
52
+ // but touch events keep coming, so we follow the finger with them instead.
53
+ this.touchScrolling = false;
54
+ this.handlePointerEnter = () => this.waitForStorage((storage) => storage.onPointerEnterBoundary());
55
+ this.handlePointerLeave = () => {
56
+ if (this.touchScrolling)
57
+ return;
58
+ this.waitForStorage((storage) => storage.onPointerLeaveBoundary());
59
+ };
60
+ this.handlePointerMove = this.updatePointerPosition;
61
+ this.handlePointerUp = (ev) => {
62
+ if (ev.pointerType === 'mouse') {
63
+ this.waitForStorage((storage) => storage.switchAnimation());
64
+ }
65
+ else {
66
+ this.waitForStorage((storage) => storage.clearAll(false));
67
+ }
68
+ };
69
+ // Fired when the browser takes over the touch for scrolling or zooming,
70
+ // `pointerup` will never come, so the pressed ripple must be cleaned here.
71
+ this.handlePointerCancel = (ev) => {
72
+ this.waitForStorage((storage) => {
73
+ if (ev.pointerType === 'touch') {
74
+ this.touchScrolling = true;
75
+ storage.anchorPointer();
76
+ }
77
+ storage.clearAll(false);
78
+ });
79
+ };
80
+ this.handleTouchMove = (ev) => {
81
+ if (!this.touchScrolling || !ev.targetTouches.length)
82
+ return;
83
+ this.updatePointerPosition(ev.targetTouches[0]);
84
+ this.waitForStorage((storage) => storage.anchorPointer());
85
+ };
86
+ this.handleTouchEnd = (ev) => {
87
+ if (!this.touchScrolling || ev.targetTouches.length)
88
+ return;
89
+ this.touchScrolling = false;
90
+ this.handlePointerLeave();
91
+ };
92
+ this.handlePointerDown = (ev) => this.waitForStorage((storage) => {
93
+ this.updatePointerPosition(ev);
94
+ storage.initializeAnimation();
95
+ });
96
+ this.root.innerHTML = `
97
+ <div>
98
+ <slot></slot>
99
+ </div>`;
100
+ }
101
+ static get stateManager() {
102
+ if (!AxRevealBoundary._stateManager)
103
+ AxRevealBoundary._stateManager = new RevealStateManager();
104
+ return AxRevealBoundary._stateManager;
105
+ }
106
+ get storage() {
107
+ return this._storage;
108
+ }
109
+ set storage(newStorage) {
110
+ var _a;
111
+ const oldStorage = this._storage;
112
+ if (oldStorage) {
113
+ this.dispatchEvent(new CustomEvent(AxRevealBoundary.removeStorageEvent, { detail: oldStorage }));
114
+ (_a = this.ownerStateManager) === null || _a === void 0 ? void 0 : _a.removeBoundary(oldStorage);
115
+ }
116
+ this._storage = newStorage;
117
+ if (newStorage) {
118
+ this.dispatchEvent(new CustomEvent(AxRevealBoundary.attachStorageEvent, { detail: newStorage }));
119
+ }
120
+ if (oldStorage && newStorage) {
121
+ this.dispatchEvent(new CustomEvent(AxRevealBoundary.replaceStorageEvent, {
122
+ detail: { old: oldStorage, new: newStorage },
123
+ }));
124
+ }
125
+ }
126
+ waitForStorage(f) {
127
+ if (this.storage === undefined) {
128
+ this.addEventListener(AxRevealBoundary.attachStorageEvent, () => f(this.storage), { once: true });
129
+ }
130
+ else {
131
+ f(this.storage);
132
+ }
133
+ }
134
+ appendStorage(force = false) {
135
+ if (!force && this.storage) {
136
+ return;
137
+ }
138
+ const parent = closest(this, AxRevealProvider.ElementName);
139
+ const stateManager = parent ? parent.stateManager : AxRevealBoundary.stateManager;
140
+ this.storage = stateManager.newBoundary(this);
141
+ this.ownerStateManager = stateManager;
142
+ }
143
+ connectedCallback() {
144
+ this.appendStorage(true);
145
+ if (config.borderDetectionMode === 'strictEdge') {
146
+ this.addEventListener('pointerenter', this.handlePointerEnter);
147
+ this.addEventListener('pointerleave', this.handlePointerLeave);
148
+ this.addEventListener('pointermove', this.handlePointerMove);
149
+ }
150
+ this.addEventListener('pointerdown', this.handlePointerDown);
151
+ this.addEventListener('pointerup', this.handlePointerUp);
152
+ this.addEventListener('pointercancel', this.handlePointerCancel);
153
+ if (config.borderDetectionMode === 'strictEdge') {
154
+ this.addEventListener('touchmove', this.handleTouchMove, { passive: true });
155
+ this.addEventListener('touchend', this.handleTouchEnd, { passive: true });
156
+ this.addEventListener('touchcancel', this.handleTouchEnd, { passive: true });
157
+ }
158
+ }
159
+ disconnectedCallback() {
160
+ this.storage = undefined;
161
+ this.ownerStateManager = undefined;
162
+ }
163
+ }
164
+ AxRevealBoundary.ElementName = 'ax-reveal-bound';
165
+ AxRevealBoundary.removeStorageEvent = 'removeStorage';
166
+ AxRevealBoundary.attachStorageEvent = 'attachStorage';
167
+ AxRevealBoundary.replaceStorageEvent = 'replaceStorage';
168
+ export class AxReveal extends PatchedHTMLElement {
169
+ constructor() {
170
+ super();
171
+ this.root = this.attachShadow({ mode: 'open' });
172
+ this.connection = 0;
173
+ this.handlePointerDown = (ev) => {
174
+ this.setPointerCapture(ev.pointerId);
175
+ };
176
+ this.root.innerHTML = `
177
+ <div class="ax-reveal">
178
+ <canvas></canvas>
179
+ <div class="content"><slot></slot></div>
180
+ </div>
181
+ <style>
182
+ .ax-reveal { display: content; }
183
+ .ax-reveal * { user-drag: none; -webkit-user-drag: none; touch-action: var(--reveal-touch-action, manipulation); user-select: none; }
184
+ .content { position: relative; }
185
+ canvas { top: 0; left: 0; pointer-events: none; width: 100%; height: 100%; position: absolute; }
186
+ :host { display: inline-block; position: relative; }
187
+ :host([block]) { display: block; }
188
+ :host([inline-block]) { display: inline-block; }
189
+ :host([flex]) { display: flex; }
190
+ :host([inline-flex]) { display: inline-flex; }
191
+ :host([grid]) { display: grid; }
192
+ :host([inline-grid]) { display: inline-grid; }
193
+ ::slotted(*) { user-drag: none; -webkit-user-drag: none; touch-action: var(--reveal-touch-action, manipulation); user-select: none; }
194
+ ::slotted(button) { outline:none; }
195
+ </style>`;
196
+ this.canvas = this.root.querySelector('canvas');
197
+ }
198
+ adoptedCallback() {
199
+ this.disconnectedCallback();
200
+ this.connectedCallback();
201
+ }
202
+ disconnectedCallback() {
203
+ this.connection++;
204
+ this.storage && this.storage.removeReveal(this.canvas);
205
+ this.storage = undefined;
206
+ }
207
+ connectedCallback() {
208
+ this.boundary = closest(this, AxRevealBoundary.ElementName);
209
+ if (!this.boundary)
210
+ throw new SyntaxError('You must use ' + AxRevealBoundary.ElementName + ' as the boundary of reveal highlight!');
211
+ const connection = ++this.connection;
212
+ this.boundary.waitForStorage((storage) => setTimeout(() => {
213
+ // Disconnected or reconnected before the timer fired.
214
+ if (connection !== this.connection)
215
+ return;
216
+ this.storage = storage;
217
+ storage.addReveal(this.canvas, this);
218
+ }, 0));
219
+ this.addEventListener('pointerdown', this.handlePointerDown);
220
+ }
221
+ }
222
+ AxReveal.ElementName = 'ax-reveal';
223
+ export class AxRevealNg extends PatchedHTMLElement {
224
+ constructor() {
225
+ super();
226
+ this.root = this.attachShadow({ mode: 'open' });
227
+ this.connection = 0;
228
+ this.handlePointerDown = (ev) => {
229
+ this.setPointerCapture(ev.pointerId);
230
+ };
231
+ this.root.innerHTML = `
232
+ <div class="ax-reveal">
233
+ <svg>
234
+ <defs>
235
+ <radialGradient id="borderGrad" gradientUnits="userSpaceOnUse" r="10">
236
+ <stop id="borderCenter" offset="0%" />
237
+ <stop id="borderOut" offset="100%" />
238
+ </radialGradient>
239
+ <radialGradient id="fillGrad" gradientUnits="userSpaceOnUse" r="10">
240
+ <stop id="fillCenter" offset="0%" />
241
+ <stop id="fillOut" offset="100%" />
242
+ </radialGradient>
243
+ <radialGradient id="rippleGrad" gradientUnits="userSpaceOnUse" r="10">
244
+ <stop id="rippleCenter" offset="0%" />
245
+ <stop id="rippleMiddle" offset="0%" />
246
+ <stop id="rippleOut" offset="0%" />
247
+ </radialGradient>
248
+ </defs>
249
+ <path id="borderPath" fill="url(#borderGrad)" />
250
+ <path id="fillPath" fill="url(#fillGrad)" />
251
+ <path id="ripplePath" fill="url(#rippleGrad)" />
252
+ </svg>
253
+ <div class="content"><slot></slot></div>
254
+ </div>
255
+ <style>
256
+ .ax-reveal { display: contents; }
257
+ .ax-reveal * { user-drag: none; -webkit-user-drag: none; touch-action: var(--reveal-touch-action, manipulation); user-select: none; }
258
+ .content { position: relative; }
259
+ svg { top: 0; left: 0; pointer-events: none; width: 100%; height: 100%; position: absolute; }
260
+ :host { display: inline-block; position: relative; }
261
+ :host([block]) { display: block; }
262
+ :host([inline-block]) { display: inline-block; }
263
+ :host([flex]) { display: flex; }
264
+ :host([inline-flex]) { display: inline-flex; }
265
+ :host([grid]) { display: grid; }
266
+ :host([inline-grid]) { display: inline-grid; }
267
+ ::slotted(*) { user-drag: none; -webkit-user-drag: none; touch-action: var(--reveal-touch-action, manipulation); user-select: none; }
268
+ ::slotted(button) { outline:none; }
269
+ </style>`;
270
+ this.svg = this.root.querySelector('svg');
271
+ }
272
+ adoptedCallback() {
273
+ this.disconnectedCallback();
274
+ this.connectedCallback();
275
+ }
276
+ disconnectedCallback() {
277
+ this.connection++;
278
+ this.storage && this.storage.removeReveal(this.svg);
279
+ this.storage = undefined;
280
+ }
281
+ connectedCallback() {
282
+ this.boundary = closest(this, AxRevealBoundary.ElementName);
283
+ if (!this.boundary)
284
+ throw new SyntaxError('You must use ' + AxRevealBoundary.ElementName + ' as the boundary of reveal highlight!');
285
+ const connection = ++this.connection;
286
+ this.boundary.waitForStorage((storage) => setTimeout(() => {
287
+ // Disconnected or reconnected before the timer fired.
288
+ if (connection !== this.connection)
289
+ return;
290
+ this.storage = storage;
291
+ storage.addReveal(this.svg, this);
292
+ }, 0));
293
+ this.addEventListener('pointerdown', this.handlePointerDown);
294
+ }
295
+ }
296
+ AxRevealNg.ElementName = 'ax-reveal-ng';
234
297
  //# sourceMappingURL=CustomElements.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CustomElements.js","sourceRoot":"","sources":["../src/CustomElements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,SAAS,OAAO,CAAC,GAAY,EAAE,QAAgB;;IAC3C,MAAM,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IAChB,MAAM,IAAI,GAAG,MAAA,oBAAoB,CAAC,GAAG,CAAC,0CAAE,IAAI,CAAC;IAC7C,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,OAAO,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;AAClC,CAAC;AACD,SAAS,oBAAoB,CAAC,CAA0B;IACpD,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACpB,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,UAAU,CAAC,QAAQ,KAAK,QAAQ,CAAC,sBAAsB;QAAE,OAAO,CAAC,CAAC,UAAwB,CAAC;IACjH,O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I,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE,CACrC,UAAU,CAAC,GAAG,EAAE;YACZ,sDAAsD;YACtD,IAAI,UAAU,KAAK,IAAI,CAAC,UAAU;gBAAE,OAAO;YAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACtC,CAAC,EAAE,CAAC,CAAC,CACR,CAAC;QACF,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACjE,CAAC;;AAxCe,sBAAW,GAAG,cAAc,CAAC"}
package/es/Profiler.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- interface ProfilerLog {
2
- time: number;
3
- task: string;
4
- }
5
- export declare class Profiler {
6
- private baseline;
7
- logs: ProfilerLog[];
8
- setBaseline(): void;
9
- mark(task?: string): void;
10
- dumpAsCsv(): void;
11
- }
12
- export {};
1
+ interface ProfilerLog {
2
+ time: number;
3
+ task: string;
4
+ }
5
+ export declare class Profiler {
6
+ private baseline;
7
+ logs: ProfilerLog[];
8
+ setBaseline(): void;
9
+ mark(task?: string): void;
10
+ dumpAsCsv(): void;
11
+ }
12
+ export {};
13
13
  //# sourceMappingURL=Profiler.d.ts.map