@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.
- 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 +36 -35
- 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/es/CustomElements.js
CHANGED
|
@@ -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
|
-
|
|
52
|
-
|
|
53
|
-
this.
|
|
54
|
-
this.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
this.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
this.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
AxRevealBoundary.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
this.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
this.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
<
|
|
179
|
-
<
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
this.
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
this.
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
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
|
package/es/CustomElements.js.map
CHANGED
|
@@ -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,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,CAAC;IAMD,oBAAoB;QAChB,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,iBAAiB;QACb,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE,gBAAgB,CAAC,WAAW,CAAqB,CAAC;QAChF,IAAI,CAAC,IAAI,CAAC,QAAQ;YACd,MAAM,IAAI,WAAW,CACjB,eAAe,GAAG,gBAAgB,CAAC,WAAW,GAAG,uCAAuC,CAC3F,CAAC;QAEN,MAAM,UAAU,GAAG,EAAE,IAAI,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
|