abledom 0.2.0 → 0.3.1
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/dist/esm/index.js +130 -44
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +130 -44
- package/dist/index.js.map +1 -1
- package/dist/ts3.9/index.d.ts +5 -0
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -58,7 +58,7 @@ var ValidationRule = class {
|
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
// inline-file:/Users/marata/Documents/Work/abledom/src/ui/ui.css
|
|
61
|
-
var ui_default = "#abledom-report {\n bottom: 20px;\n display: flex;\n flex-direction: column;\n left: 10px;\n max-height: 80%;\n max-width: 60%;\n padding: 4px 8px;\n position:
|
|
61
|
+
var ui_default = "#abledom-report {\n bottom: 20px;\n display: flex;\n flex-direction: column;\n left: 10px;\n max-height: 80%;\n max-width: 60%;\n padding: 4px 8px;\n position: fixed;\n z-index: 100500;\n}\n\n#abledom-report :focus-visible {\n outline: 3px solid red;\n mix-blend-mode: difference;\n}\n\n#abledom-report.abledom-align-left {\n left: 10px;\n right: auto;\n}\n\n#abledom-report.abledom-align-right {\n left: auto;\n right: 10px;\n}\n\n#abledom-report.abledom-align-bottom {\n bottom: 20px;\n top: auto;\n}\n\n#abledom-report.abledom-align-top {\n /* flex-direction: column-reverse; */\n bottom: auto;\n top: 10px;\n}\n\n.abledom-menu-container {\n backdrop-filter: blur(3px);\n border-radius: 8px;\n box-shadow: 0px 0px 4px rgba(127, 127, 127, 0.5);\n display: inline-block;\n margin: 2px auto 2px 0;\n}\n\n#abledom-report.abledom-align-right .abledom-menu-container {\n margin: 2px 0 2px auto;\n}\n\n.abledom-menu {\n background-color: rgba(140, 10, 121, 0.7);\n border-radius: 8px;\n color: white;\n display: inline flex;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 16px;\n line-height: 26px;\n padding: 4px;\n}\n\n.abledom-menu .notifications-count {\n margin: 0 8px;\n display: inline-block;\n}\n\n.abledom-menu .button {\n all: unset;\n color: #000;\n cursor: pointer;\n background: linear-gradient(\n 180deg,\n rgba(255, 255, 255, 1) 0%,\n rgba(200, 200, 200, 1) 100%\n );\n border-radius: 6px;\n border: 1px solid rgba(255, 255, 255, 0.4);\n box-sizing: border-box;\n line-height: 0px;\n margin-right: 4px;\n max-height: 26px;\n padding: 2px;\n text-decoration: none;\n}\n\n.abledom-menu .align-button {\n border-right-color: rgba(0, 0, 0, 0.4);\n border-radius: 0;\n margin: 0;\n}\n\n.abledom-menu .align-button:active,\n#abledom-report .pressed {\n background: linear-gradient(\n 180deg,\n rgba(130, 130, 130, 1) 0%,\n rgba(180, 180, 180, 1) 100%\n );\n}\n\n.abledom-menu .align-button-first {\n border-top-left-radius: 6px;\n border-bottom-left-radius: 6px;\n margin-left: 8px;\n}\n.abledom-menu .align-button-last {\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px;\n border-right-color: rgba(255, 255, 255, 0.4);\n}\n\n.abledom-notifications-container {\n overflow: scroll;\n max-height: calc(100vh - 100px);\n}\n\n#abledom-report.abledom-align-right .abledom-notifications-container {\n text-align: right;\n}\n\n.abledom-notification-container {\n backdrop-filter: blur(3px);\n border-radius: 8px;\n box-shadow: 0px 0px 4px rgba(127, 127, 127, 0.5);\n display: inline-flex;\n margin: 2px 0;\n}\n\n.abledom-notification {\n background-color: rgba(164, 2, 2, 0.7);\n border-radius: 8px;\n color: white;\n display: inline flex;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 16px;\n line-height: 26px;\n padding: 4px;\n}\n.abledom-notification_warning {\n background-color: rgba(163, 82, 1, 0.7);\n}\n.abledom-notification_info {\n background-color: rgba(0, 0, 255, 0.7);\n}\n\n.abledom-notification .button {\n all: unset;\n color: #000;\n cursor: pointer;\n background: linear-gradient(\n 180deg,\n rgba(255, 255, 255, 1) 0%,\n rgba(200, 200, 200, 1) 100%\n );\n border-radius: 6px;\n border: 1px solid rgba(255, 255, 255, 0.4);\n box-sizing: border-box;\n line-height: 0px;\n margin-right: 4px;\n max-height: 26px;\n padding: 2px;\n text-decoration: none;\n}\n\n.abledom-notification .button:hover {\n opacity: 0.7;\n}\n\n.abledom-notification .button.close {\n background: none;\n border-color: transparent;\n color: #fff;\n margin: 0;\n}\n\n.abledom-highlight {\n background-color: yellow;\n box-sizing: border-box;\n display: none;\n opacity: 0.6;\n position: fixed;\n z-index: 100499;\n}\n\n.abledom-highlight-border1 {\n border-top: 2px solid red;\n border-bottom: 2px solid red;\n box-sizing: border-box;\n position: absolute;\n top: -2px;\n width: calc(100% + 20px);\n height: calc(100% + 4px);\n margin: 0 -10px;\n}\n\n.abledom-highlight-border2 {\n border-left: 2px solid red;\n border-right: 2px solid red;\n box-sizing: border-box;\n position: absolute;\n width: calc(100% + 4px);\n left: -2px;\n height: calc(100% + 20px);\n margin: -10px 0;\n}\n";
|
|
62
62
|
|
|
63
63
|
// src/ui/domBuilder.ts
|
|
64
64
|
var DOMBuilder = class {
|
|
@@ -173,8 +173,36 @@ var reveal_default = function buildSVG4(parent) {
|
|
|
173
173
|
return parent.firstElementChild;
|
|
174
174
|
};
|
|
175
175
|
|
|
176
|
+
// inline-file:/Users/marata/Documents/Work/abledom/src/ui/bug.svg
|
|
177
|
+
var bug_default = function buildSVG5(parent) {
|
|
178
|
+
const builder = new DOMBuilder(parent);
|
|
179
|
+
builder.openTag("svg", { "width": "20", "height": "20", "viewBox": "0 0 20 20", "fill": "none", "stroke": "currentColor" }, void 0, "http://www.w3.org/2000/svg");
|
|
180
|
+
builder.openTag("ellipse", { "cx": "10", "cy": "12", "rx": "4", "ry": "5", "stroke-width": "1.5" }, void 0, "http://www.w3.org/2000/svg");
|
|
181
|
+
builder.closeTag();
|
|
182
|
+
builder.openTag("circle", { "cx": "10", "cy": "5.5", "r": "2", "stroke-width": "1.5" }, void 0, "http://www.w3.org/2000/svg");
|
|
183
|
+
builder.closeTag();
|
|
184
|
+
builder.openTag("line", { "x1": "6.5", "y1": "10", "x2": "3.5", "y2": "7", "stroke-width": "1.2" }, void 0, "http://www.w3.org/2000/svg");
|
|
185
|
+
builder.closeTag();
|
|
186
|
+
builder.openTag("line", { "x1": "13.5", "y1": "10", "x2": "16.5", "y2": "7", "stroke-width": "1.2" }, void 0, "http://www.w3.org/2000/svg");
|
|
187
|
+
builder.closeTag();
|
|
188
|
+
builder.openTag("line", { "x1": "6", "y1": "13", "x2": "3.5", "y2": "13", "stroke-width": "1.2" }, void 0, "http://www.w3.org/2000/svg");
|
|
189
|
+
builder.closeTag();
|
|
190
|
+
builder.openTag("line", { "x1": "14", "y1": "13", "x2": "16.5", "y2": "13", "stroke-width": "1.2" }, void 0, "http://www.w3.org/2000/svg");
|
|
191
|
+
builder.closeTag();
|
|
192
|
+
builder.openTag("line", { "x1": "6.5", "y1": "16", "x2": "3.5", "y2": "19", "stroke-width": "1.2" }, void 0, "http://www.w3.org/2000/svg");
|
|
193
|
+
builder.closeTag();
|
|
194
|
+
builder.openTag("line", { "x1": "13.5", "y1": "16", "x2": "16.5", "y2": "19", "stroke-width": "1.2" }, void 0, "http://www.w3.org/2000/svg");
|
|
195
|
+
builder.closeTag();
|
|
196
|
+
builder.openTag("line", { "x1": "9", "y1": "3.5", "x2": "7.5", "y2": "2", "stroke-width": "1.2" }, void 0, "http://www.w3.org/2000/svg");
|
|
197
|
+
builder.closeTag();
|
|
198
|
+
builder.openTag("line", { "x1": "11", "y1": "3.5", "x2": "12.5", "y2": "2", "stroke-width": "1.2" }, void 0, "http://www.w3.org/2000/svg");
|
|
199
|
+
builder.closeTag();
|
|
200
|
+
builder.closeTag();
|
|
201
|
+
return parent.firstElementChild;
|
|
202
|
+
};
|
|
203
|
+
|
|
176
204
|
// inline-file:/Users/marata/Documents/Work/abledom/src/ui/hideall.svg
|
|
177
|
-
var hideall_default = function
|
|
205
|
+
var hideall_default = function buildSVG6(parent) {
|
|
178
206
|
const builder = new DOMBuilder(parent);
|
|
179
207
|
builder.openTag("svg", { "width": "20", "height": "20", "viewBox": "0 0 20 20", "fill": "none", "stroke": "currentColor" }, void 0, "http://www.w3.org/2000/svg");
|
|
180
208
|
builder.openTag("path", { "d": "M11.44 17.5a1.67 1.67 0 0 1-2.89 0", "stroke-width": "1.5" }, void 0, "http://www.w3.org/2000/svg");
|
|
@@ -188,7 +216,7 @@ var hideall_default = function buildSVG5(parent) {
|
|
|
188
216
|
};
|
|
189
217
|
|
|
190
218
|
// inline-file:/Users/marata/Documents/Work/abledom/src/ui/muteall.svg
|
|
191
|
-
var muteall_default = function
|
|
219
|
+
var muteall_default = function buildSVG7(parent) {
|
|
192
220
|
const builder = new DOMBuilder(parent);
|
|
193
221
|
builder.openTag("svg", { "width": "20", "height": "20", "viewBox": "0 0 20 20", "fill": "none", "stroke": "currentColor" }, void 0, "http://www.w3.org/2000/svg");
|
|
194
222
|
builder.openTag("path", { "d": "M11.44 17.5a1.67 1.67 0 0 1-2.89 0", "stroke-width": "1.5" }, void 0, "http://www.w3.org/2000/svg");
|
|
@@ -204,7 +232,7 @@ var muteall_default = function buildSVG6(parent) {
|
|
|
204
232
|
};
|
|
205
233
|
|
|
206
234
|
// inline-file:/Users/marata/Documents/Work/abledom/src/ui/showall.svg
|
|
207
|
-
var showall_default = function
|
|
235
|
+
var showall_default = function buildSVG8(parent) {
|
|
208
236
|
const builder = new DOMBuilder(parent);
|
|
209
237
|
builder.openTag("svg", { "width": "20", "height": "20", "viewBox": "0 0 20 20", "fill": "none", "stroke": "currentColor" }, void 0, "http://www.w3.org/2000/svg");
|
|
210
238
|
builder.openTag("path", { "d": "M11.44 17.5a1.67 1.67 0 0 1-2.89 0", "stroke-width": "1.5" }, void 0, "http://www.w3.org/2000/svg");
|
|
@@ -216,7 +244,7 @@ var showall_default = function buildSVG7(parent) {
|
|
|
216
244
|
};
|
|
217
245
|
|
|
218
246
|
// inline-file:/Users/marata/Documents/Work/abledom/src/ui/aligntopleft.svg
|
|
219
|
-
var aligntopleft_default = function
|
|
247
|
+
var aligntopleft_default = function buildSVG9(parent) {
|
|
220
248
|
const builder = new DOMBuilder(parent);
|
|
221
249
|
builder.openTag("svg", { "width": "20", "height": "20", "viewBox": "0 0 20 20", "fill": "none", "stroke": "currentColor" }, void 0, "http://www.w3.org/2000/svg");
|
|
222
250
|
builder.openTag("rect", { "x": "3", "y": "3", "width": "6", "height": "6", "stroke-width": "2" }, void 0, "http://www.w3.org/2000/svg");
|
|
@@ -226,7 +254,7 @@ var aligntopleft_default = function buildSVG8(parent) {
|
|
|
226
254
|
};
|
|
227
255
|
|
|
228
256
|
// inline-file:/Users/marata/Documents/Work/abledom/src/ui/aligntopright.svg
|
|
229
|
-
var aligntopright_default = function
|
|
257
|
+
var aligntopright_default = function buildSVG10(parent) {
|
|
230
258
|
const builder = new DOMBuilder(parent);
|
|
231
259
|
builder.openTag("svg", { "width": "20", "height": "20", "viewBox": "0 0 20 20", "fill": "none", "stroke": "currentColor" }, void 0, "http://www.w3.org/2000/svg");
|
|
232
260
|
builder.openTag("rect", { "x": "11", "y": "3", "width": "6", "height": "6", "stroke-width": "2" }, void 0, "http://www.w3.org/2000/svg");
|
|
@@ -236,7 +264,7 @@ var aligntopright_default = function buildSVG9(parent) {
|
|
|
236
264
|
};
|
|
237
265
|
|
|
238
266
|
// inline-file:/Users/marata/Documents/Work/abledom/src/ui/alignbottomright.svg
|
|
239
|
-
var alignbottomright_default = function
|
|
267
|
+
var alignbottomright_default = function buildSVG11(parent) {
|
|
240
268
|
const builder = new DOMBuilder(parent);
|
|
241
269
|
builder.openTag("svg", { "width": "20", "height": "20", "viewBox": "0 0 20 20", "fill": "none", "stroke": "currentColor" }, void 0, "http://www.w3.org/2000/svg");
|
|
242
270
|
builder.openTag("rect", { "x": "11", "y": "11", "width": "6", "height": "6", "stroke-width": "2" }, void 0, "http://www.w3.org/2000/svg");
|
|
@@ -246,7 +274,7 @@ var alignbottomright_default = function buildSVG10(parent) {
|
|
|
246
274
|
};
|
|
247
275
|
|
|
248
276
|
// inline-file:/Users/marata/Documents/Work/abledom/src/ui/alignbottomleft.svg
|
|
249
|
-
var alignbottomleft_default = function
|
|
277
|
+
var alignbottomleft_default = function buildSVG12(parent) {
|
|
250
278
|
const builder = new DOMBuilder(parent);
|
|
251
279
|
builder.openTag("svg", { "width": "20", "height": "20", "viewBox": "0 0 20 20", "fill": "none", "stroke": "currentColor" }, void 0, "http://www.w3.org/2000/svg");
|
|
252
280
|
builder.openTag("rect", { "x": "3", "y": "11", "width": "6", "height": "6", "stroke-width": "2" }, void 0, "http://www.w3.org/2000/svg");
|
|
@@ -259,14 +287,12 @@ var alignbottomleft_default = function buildSVG11(parent) {
|
|
|
259
287
|
var pressedClass = "pressed";
|
|
260
288
|
var NotificationUI = class {
|
|
261
289
|
constructor(win, core, rule, notificationsUI) {
|
|
262
|
-
__publicField(this, "_win");
|
|
263
290
|
__publicField(this, "_core");
|
|
264
291
|
__publicField(this, "_notificationsUI");
|
|
265
292
|
__publicField(this, "_wrapper");
|
|
266
293
|
__publicField(this, "_rule");
|
|
267
294
|
__publicField(this, "_onToggle");
|
|
268
295
|
__publicField(this, "isHidden", false);
|
|
269
|
-
this._win = win;
|
|
270
296
|
this._core = core;
|
|
271
297
|
this._rule = rule;
|
|
272
298
|
this._notificationsUI = notificationsUI;
|
|
@@ -282,7 +308,6 @@ var NotificationUI = class {
|
|
|
282
308
|
return instance._wrapper;
|
|
283
309
|
}
|
|
284
310
|
update(notification) {
|
|
285
|
-
const win = this._win;
|
|
286
311
|
const rule = this._rule;
|
|
287
312
|
const wrapper = this._wrapper;
|
|
288
313
|
const element = notification.element;
|
|
@@ -292,11 +317,11 @@ var NotificationUI = class {
|
|
|
292
317
|
"div",
|
|
293
318
|
{ class: "abledom-notification-container" },
|
|
294
319
|
(container) => {
|
|
295
|
-
container.
|
|
320
|
+
container.onmouseenter = () => {
|
|
296
321
|
var _a;
|
|
297
322
|
element && ((_a = this._notificationsUI) == null ? void 0 : _a.highlight(element));
|
|
298
323
|
};
|
|
299
|
-
container.
|
|
324
|
+
container.onmouseleave = () => {
|
|
300
325
|
var _a;
|
|
301
326
|
(_a = this._notificationsUI) == null ? void 0 : _a.highlight(null);
|
|
302
327
|
};
|
|
@@ -330,28 +355,43 @@ var NotificationUI = class {
|
|
|
330
355
|
"button",
|
|
331
356
|
{
|
|
332
357
|
class: "button",
|
|
333
|
-
title: "Reveal in Elements panel"
|
|
358
|
+
// title: "Reveal in Elements panel",
|
|
359
|
+
title: "Scroll element into view"
|
|
334
360
|
},
|
|
335
361
|
(revealButton) => {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
const hasDevTools = !!((_a = win.__ableDOMDevtools) == null ? void 0 : _a.revealElement) && false;
|
|
339
|
-
if (hasDevTools && element && body.contains(element)) {
|
|
362
|
+
const element2 = notification.element;
|
|
363
|
+
if (element2) {
|
|
340
364
|
revealButton.onclick = () => {
|
|
341
|
-
var
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
revealElement(element).then((revealed) => {
|
|
345
|
-
if (!revealed) {
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
}
|
|
365
|
+
var _a;
|
|
366
|
+
element2.scrollIntoView({ block: "center" });
|
|
367
|
+
(_a = this._notificationsUI) == null ? void 0 : _a.highlight(element2);
|
|
349
368
|
};
|
|
350
369
|
} else {
|
|
351
370
|
revealButton.style.display = "none";
|
|
352
371
|
}
|
|
353
372
|
}
|
|
354
|
-
).element(reveal_default).closeTag().
|
|
373
|
+
).element(reveal_default).closeTag().openTag(
|
|
374
|
+
"button",
|
|
375
|
+
{
|
|
376
|
+
class: "button",
|
|
377
|
+
title: "Report bug"
|
|
378
|
+
},
|
|
379
|
+
(bugReportButton) => {
|
|
380
|
+
var _a, _b;
|
|
381
|
+
const bugReport = (_a = this._notificationsUI) == null ? void 0 : _a.bugReport;
|
|
382
|
+
if (bugReport == null ? void 0 : bugReport.isVisible(notification)) {
|
|
383
|
+
const title = (_b = bugReport.getTitle) == null ? void 0 : _b.call(bugReport, notification);
|
|
384
|
+
if (title) {
|
|
385
|
+
bugReportButton.title = title;
|
|
386
|
+
}
|
|
387
|
+
bugReportButton.onclick = () => {
|
|
388
|
+
bugReport.onClick(notification);
|
|
389
|
+
};
|
|
390
|
+
} else {
|
|
391
|
+
bugReportButton.style.display = "none";
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
).element(bug_default).closeTag().text(notification.message).openTag(
|
|
355
395
|
"a",
|
|
356
396
|
{
|
|
357
397
|
class: "button close",
|
|
@@ -398,7 +438,7 @@ var NotificationUI = class {
|
|
|
398
438
|
}
|
|
399
439
|
};
|
|
400
440
|
var NotificationsUI = class {
|
|
401
|
-
constructor(win) {
|
|
441
|
+
constructor(win, props) {
|
|
402
442
|
__publicField(this, "_container");
|
|
403
443
|
__publicField(this, "_notificationsContainer");
|
|
404
444
|
__publicField(this, "_menuElement");
|
|
@@ -412,6 +452,8 @@ var NotificationsUI = class {
|
|
|
412
452
|
__publicField(this, "_isMuted", false);
|
|
413
453
|
__publicField(this, "_notifications", /* @__PURE__ */ new Set());
|
|
414
454
|
__publicField(this, "_highlighter");
|
|
455
|
+
__publicField(this, "bugReport");
|
|
456
|
+
this.bugReport = props.bugReport;
|
|
415
457
|
const doc = win.document;
|
|
416
458
|
const container = this._container = doc.createElement("div");
|
|
417
459
|
container.__abledomui = true;
|
|
@@ -678,39 +720,80 @@ var ElementHighlighter = class {
|
|
|
678
720
|
constructor(win) {
|
|
679
721
|
__publicField(this, "_window");
|
|
680
722
|
__publicField(this, "_container");
|
|
723
|
+
__publicField(this, "_element");
|
|
724
|
+
__publicField(this, "_cancelScrollTimer");
|
|
725
|
+
__publicField(this, "_intersectionObserver");
|
|
726
|
+
__publicField(this, "_onScroll", () => {
|
|
727
|
+
var _a;
|
|
728
|
+
(_a = this._cancelScrollTimer) == null ? void 0 : _a.call(this);
|
|
729
|
+
this._hide();
|
|
730
|
+
const win = this._window;
|
|
731
|
+
if (win) {
|
|
732
|
+
const scrollTimer = win.setTimeout(() => {
|
|
733
|
+
delete this._cancelScrollTimer;
|
|
734
|
+
this.highlight(this._element || null);
|
|
735
|
+
}, 100);
|
|
736
|
+
this._cancelScrollTimer = () => {
|
|
737
|
+
delete this._cancelScrollTimer;
|
|
738
|
+
win.clearTimeout(scrollTimer);
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
});
|
|
681
742
|
this._window = win;
|
|
682
743
|
const container = this._container = win.document.createElement("div");
|
|
683
744
|
container.__abledomui = true;
|
|
684
745
|
container.className = "abledom-highlight";
|
|
746
|
+
new DOMBuilder(container).openTag("div", { class: "abledom-highlight-border1" }).closeTag().openTag("div", { class: "abledom-highlight-border2" }).closeTag();
|
|
747
|
+
win.addEventListener("scroll", this._onScroll, true);
|
|
685
748
|
}
|
|
686
749
|
highlight(element) {
|
|
687
750
|
if (!element) {
|
|
688
|
-
|
|
751
|
+
delete this._element;
|
|
752
|
+
this._unobserve();
|
|
753
|
+
this._hide();
|
|
689
754
|
return;
|
|
690
755
|
}
|
|
691
756
|
const win = this._window;
|
|
692
757
|
const container = this._container;
|
|
693
|
-
|
|
694
|
-
if (!win || !container || rect.width === 0 || rect.height === 0) {
|
|
758
|
+
if (!win || !container) {
|
|
695
759
|
return;
|
|
696
760
|
}
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
761
|
+
this._element = element;
|
|
762
|
+
this._intersectionObserver = new IntersectionObserver(([entry]) => {
|
|
763
|
+
if (entry) {
|
|
764
|
+
const rect = entry.boundingClientRect;
|
|
765
|
+
const body = win.document.body;
|
|
766
|
+
const style = container.style;
|
|
767
|
+
if (container.parentElement !== body) {
|
|
768
|
+
body.appendChild(container);
|
|
769
|
+
}
|
|
770
|
+
style.width = `${rect.width}px`;
|
|
771
|
+
style.height = `${rect.height}px`;
|
|
772
|
+
style.top = `${rect.top}px`;
|
|
773
|
+
style.left = `${rect.left}px`;
|
|
774
|
+
container.style.display = "block";
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
this._intersectionObserver.observe(element);
|
|
707
778
|
}
|
|
708
779
|
dispose() {
|
|
709
|
-
var _a;
|
|
710
|
-
|
|
780
|
+
var _a, _b, _c;
|
|
781
|
+
this._unobserve();
|
|
782
|
+
(_a = this._cancelScrollTimer) == null ? void 0 : _a.call(this);
|
|
783
|
+
(_b = this._window) == null ? void 0 : _b.removeEventListener("scroll", this._onScroll, true);
|
|
784
|
+
(_c = this._container) == null ? void 0 : _c.remove();
|
|
785
|
+
delete this._element;
|
|
711
786
|
delete this._container;
|
|
712
787
|
delete this._window;
|
|
713
788
|
}
|
|
789
|
+
_hide() {
|
|
790
|
+
this._container && (this._container.style.display = "none");
|
|
791
|
+
}
|
|
792
|
+
_unobserve() {
|
|
793
|
+
var _a;
|
|
794
|
+
(_a = this._intersectionObserver) == null ? void 0 : _a.disconnect();
|
|
795
|
+
delete this._intersectionObserver;
|
|
796
|
+
}
|
|
714
797
|
};
|
|
715
798
|
function isAbleDOMUIElement(element) {
|
|
716
799
|
for (let el = element; el; el = el.parentElement) {
|
|
@@ -1083,8 +1166,11 @@ var AbleDOM = class {
|
|
|
1083
1166
|
}
|
|
1084
1167
|
}
|
|
1085
1168
|
_addNotification(rule, notification) {
|
|
1169
|
+
var _a;
|
|
1086
1170
|
if (!this._notificationsUI) {
|
|
1087
|
-
this._notificationsUI = new NotificationsUI(this._win
|
|
1171
|
+
this._notificationsUI = new NotificationsUI(this._win, {
|
|
1172
|
+
bugReport: (_a = this._props) == null ? void 0 : _a.bugReport
|
|
1173
|
+
});
|
|
1088
1174
|
}
|
|
1089
1175
|
const element = notification == null ? void 0 : notification.element;
|
|
1090
1176
|
if (!notification) {
|