mount-observer 0.0.112 → 0.1.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/Events.js +62 -26
- package/Events.ts +52 -30
- package/MountObserver.js +285 -514
- package/MountObserver.ts +362 -538
- package/README.md +149 -56
- package/SharedMutationObserver.js +70 -0
- package/SharedMutationObserver.ts +96 -0
- package/attrCoordinates.js +93 -0
- package/attrCoordinates.ts +122 -0
- package/index.js +3 -0
- package/index.ts +22 -0
- package/loadImports.js +47 -0
- package/loadImports.ts +56 -0
- package/mediaQuery.js +86 -0
- package/mediaQuery.ts +113 -0
- package/package.json +11 -119
- package/playwright.config.ts +0 -1
- package/types.d.ts +104 -0
- package/whereAttr.js +174 -0
- package/whereAttr.ts +221 -0
- package/LICENSE +0 -21
- package/Newish.js +0 -145
- package/Newish.ts +0 -169
- package/ObsAttr.js +0 -18
- package/ObsAttr.ts +0 -18
- package/RootMutObs.js +0 -49
- package/RootMutObs.ts +0 -58
- package/Synthesizer.js +0 -125
- package/Synthesizer.ts +0 -130
- package/bindish.js +0 -15
- package/bindish.ts +0 -22
- package/compose.js +0 -148
- package/compose.ts +0 -164
- package/doCleanup.js +0 -31
- package/doCleanup.ts +0 -34
- package/getWhereAttrSelector.js +0 -83
- package/getWhereAttrSelector.ts +0 -92
- package/preloadContent.js +0 -44
- package/preloadContent.ts +0 -47
- package/readAttrs.ts +0 -60
- package/refid/README.md +0 -259
- package/refid/arr.js +0 -4
- package/refid/arr.ts +0 -4
- package/refid/camelToKebab.js +0 -4
- package/refid/camelToKebab.ts +0 -4
- package/refid/genIds.js +0 -190
- package/refid/genIds.ts +0 -177
- package/refid/getAdjRefs.js +0 -38
- package/refid/getAdjRefs.ts +0 -38
- package/refid/getContext.js +0 -13
- package/refid/getContext.ts +0 -14
- package/refid/getCount.js +0 -8
- package/refid/getCount.ts +0 -8
- package/refid/getIsh.js +0 -35
- package/refid/getIsh.ts +0 -37
- package/refid/hostish.js +0 -18
- package/refid/hostish.ts +0 -20
- package/refid/ism.js +0 -78
- package/refid/ism.ts +0 -81
- package/refid/itemprops.js +0 -60
- package/refid/itemprops.ts +0 -67
- package/refid/joinMatching.js +0 -56
- package/refid/joinMatching.ts +0 -54
- package/refid/nudge.js +0 -23
- package/refid/nudge.ts +0 -23
- package/refid/regIsh.js +0 -27
- package/refid/regIsh.ts +0 -31
- package/refid/secretKeys.js +0 -5
- package/refid/secretKeys.ts +0 -5
- package/refid/splitRefs.js +0 -6
- package/refid/splitRefs.ts +0 -6
- package/refid/stdVal.js +0 -15
- package/refid/stdVal.ts +0 -15
- package/refid/via.js +0 -114
- package/refid/via.ts +0 -113
- package/slotkin/affine.js +0 -39
- package/slotkin/affine.ts +0 -46
- package/slotkin/beKindred.js +0 -45
- package/slotkin/beKindred.ts +0 -55
- package/slotkin/getBreadth.js +0 -19
- package/slotkin/getBreadth.ts +0 -21
- package/slotkin/getFrag.js +0 -22
- package/slotkin/getFrag.ts +0 -21
- package/slotkin/toQuery.js +0 -12
- package/slotkin/toQuery.ts +0 -13
- package/slotkin/wrap.js +0 -13
- package/slotkin/wrap.ts +0 -18
- package/ts-refs/LICENSE +0 -21
- package/ts-refs/README.md +0 -18
- package/ts-refs/be-a-beacon/types.d.ts +0 -22
- package/ts-refs/be-alit/types.d.ts +0 -1
- package/ts-refs/be-based/types.d.ts +0 -32
- package/ts-refs/be-bound/types.d.ts +0 -65
- package/ts-refs/be-buttoned-up/types.d.ts +0 -21
- package/ts-refs/be-calculating/types.d.ts +0 -57
- package/ts-refs/be-clonable/types.d.ts +0 -28
- package/ts-refs/be-committed/types.d.ts +0 -26
- package/ts-refs/be-consoling/types.d.ts +0 -25
- package/ts-refs/be-counted/types.d.ts +0 -88
- package/ts-refs/be-delible/types.d.ts +0 -26
- package/ts-refs/be-directive/types.d.ts +0 -43
- package/ts-refs/be-dispatching/types.d.ts +0 -41
- package/ts-refs/be-elevating/types.d.ts +0 -55
- package/ts-refs/be-enhanced/types.d.ts +0 -32
- package/ts-refs/be-enhancing/types.d.ts +0 -31
- package/ts-refs/be-evanescent/types.d.ts +0 -20
- package/ts-refs/be-eventing/types.d.ts +0 -27
- package/ts-refs/be-exportable/types.d.ts +0 -26
- package/ts-refs/be-fetching/types.d.ts +0 -73
- package/ts-refs/be-flashy/types.d.ts +0 -27
- package/ts-refs/be-formalizing/types.d.ts +0 -29
- package/ts-refs/be-formidable/types.d.ts +0 -64
- package/ts-refs/be-giddy/types.d.ts +0 -26
- package/ts-refs/be-gingerly/types.d.ts +0 -19
- package/ts-refs/be-gone/types.d.ts +0 -24
- package/ts-refs/be-hashing-out/types.d.ts +0 -22
- package/ts-refs/be-hive/types.d.ts +0 -18
- package/ts-refs/be-imbued/types.d.ts +0 -30
- package/ts-refs/be-included/types.d.ts +0 -20
- package/ts-refs/be-inclusive/types.d.ts +0 -30
- package/ts-refs/be-intersectional/types.d.ts +0 -37
- package/ts-refs/be-intl/types.d.ts +0 -28
- package/ts-refs/be-invoking/types.d.ts +0 -28
- package/ts-refs/be-joining/types.d.ts +0 -26
- package/ts-refs/be-kvetching/types.d.ts +0 -24
- package/ts-refs/be-lazy/types.d.ts +0 -29
- package/ts-refs/be-literate/types.d.ts +0 -29
- package/ts-refs/be-mediating/types.d.ts +0 -34
- package/ts-refs/be-methodical/types.d.ts +0 -20
- package/ts-refs/be-modding/types.d.ts +0 -18
- package/ts-refs/be-observant/types.d.ts +0 -27
- package/ts-refs/be-observing/types.d.ts +0 -84
- package/ts-refs/be-parsed/types.d.ts +0 -19
- package/ts-refs/be-parsing/types.d.ts +0 -37
- package/ts-refs/be-persistent/types.d.ts +0 -66
- package/ts-refs/be-propagating/types.d.ts +0 -26
- package/ts-refs/be-reformable/types.d.ts +0 -48
- package/ts-refs/be-render-neutral/types.d.ts +0 -31
- package/ts-refs/be-scoped/types.d.ts +0 -24
- package/ts-refs/be-sharing/types.d.ts +0 -17
- package/ts-refs/be-switched/types.d.ts +0 -155
- package/ts-refs/be-typed/types.d.ts +0 -36
- package/ts-refs/be-value-added/types.d.ts +0 -34
- package/ts-refs/be-valued/types.d.ts +0 -22
- package/ts-refs/be-written/types.d.ts +0 -59
- package/ts-refs/css-charts/types.d.ts +0 -38
- package/ts-refs/css-echarts/types.d.ts +0 -13
- package/ts-refs/data-props/types.d.ts +0 -27
- package/ts-refs/do-inc/types.d.ts +0 -28
- package/ts-refs/do-invoke/types.d.ts +0 -28
- package/ts-refs/do-toggle/types.d.ts +0 -27
- package/ts-refs/em-bower/types.d.ts +0 -24
- package/ts-refs/fetch-for/types.d.ts +0 -37
- package/ts-refs/folder-picker/types.d.ts +0 -43
- package/ts-refs/for-fetch/doc.d.ts +0 -98
- package/ts-refs/for-fetch/types.d.ts +0 -83
- package/ts-refs/mount-observer/types.d.ts +0 -248
- package/ts-refs/mt-si/types.d.ts +0 -21
- package/ts-refs/per-each/types.d.ts +0 -51
- package/ts-refs/soak-up/types.d.ts +0 -36
- package/ts-refs/trans-render/XV/types.d.ts +0 -69
- package/ts-refs/trans-render/asmr/types.d.ts +0 -138
- package/ts-refs/trans-render/be/types.d.ts +0 -198
- package/ts-refs/trans-render/dss/types.d.ts +0 -57
- package/ts-refs/trans-render/froop/types.d.ts +0 -416
- package/ts-refs/trans-render/funions/types.d.ts +0 -12
- package/ts-refs/trans-render/lib/mixins/types.d.ts +0 -42
- package/ts-refs/trans-render/lib/prs/types.d.ts +0 -40
- package/ts-refs/trans-render/lib/types.d.ts +0 -489
- package/ts-refs/trans-render/types.d.ts +0 -583
- package/ts-refs/wc-info/SimpleWCInfo.d.ts +0 -15
- package/ts-refs/when-resolved/types.d.ts +0 -30
- package/ts-refs/xp-as/types.d.ts +0 -20
- package/ts-refs/xtal-element/types.d.ts +0 -43
- package/ts-refs/xtal-frappe-chart/types.d.ts +0 -193
- package/upShadowSearch.js +0 -25
- package/upShadowSearch.ts +0 -23
- package/waitForEvent.js +0 -12
- package/waitForEvent.ts +0 -13
- package/waitForIsh.js +0 -21
- package/waitForIsh.ts +0 -20
package/Events.js
CHANGED
|
@@ -1,42 +1,78 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
// Event name constants
|
|
2
|
+
export const loadEventName = 'load';
|
|
3
|
+
export const mountEventName = 'mount';
|
|
4
|
+
export const dismountEventName = 'dismount';
|
|
5
|
+
export const disconnectEventName = 'disconnect';
|
|
6
|
+
export const attrchangeEventName = 'attrchange';
|
|
7
|
+
export const mediamatchEventName = 'mediamatch';
|
|
8
|
+
export const mediaunmatchEventName = 'mediaunmatch';
|
|
7
9
|
export class MountEvent extends Event {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
matchingElement;
|
|
11
|
+
modules;
|
|
12
|
+
mountInit;
|
|
13
|
+
static eventName = mountEventName;
|
|
14
|
+
constructor(matchingElement, modules, mountInit) {
|
|
12
15
|
super(MountEvent.eventName);
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
16
|
+
this.matchingElement = matchingElement;
|
|
17
|
+
this.modules = modules;
|
|
18
|
+
this.mountInit = mountInit;
|
|
15
19
|
}
|
|
16
20
|
}
|
|
17
21
|
export class DismountEvent extends Event {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
matchingElement;
|
|
23
|
+
reason;
|
|
24
|
+
mountInit;
|
|
25
|
+
static eventName = dismountEventName;
|
|
26
|
+
constructor(matchingElement, reason, mountInit) {
|
|
21
27
|
super(DismountEvent.eventName);
|
|
22
|
-
this.
|
|
28
|
+
this.matchingElement = matchingElement;
|
|
29
|
+
this.reason = reason;
|
|
30
|
+
this.mountInit = mountInit;
|
|
23
31
|
}
|
|
24
32
|
}
|
|
25
33
|
export class DisconnectEvent extends Event {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
matchingElement;
|
|
35
|
+
mountInit;
|
|
36
|
+
static eventName = disconnectEventName;
|
|
37
|
+
constructor(matchingElement, mountInit) {
|
|
29
38
|
super(DisconnectEvent.eventName);
|
|
30
|
-
this.
|
|
39
|
+
this.matchingElement = matchingElement;
|
|
40
|
+
this.mountInit = mountInit;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export class LoadEvent extends Event {
|
|
44
|
+
modules;
|
|
45
|
+
mountInit;
|
|
46
|
+
static eventName = loadEventName;
|
|
47
|
+
constructor(modules, mountInit) {
|
|
48
|
+
super(LoadEvent.eventName);
|
|
49
|
+
this.modules = modules;
|
|
50
|
+
this.mountInit = mountInit;
|
|
31
51
|
}
|
|
32
52
|
}
|
|
33
53
|
export class AttrChangeEvent extends Event {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
static eventName =
|
|
37
|
-
constructor(
|
|
54
|
+
changes;
|
|
55
|
+
mountInit;
|
|
56
|
+
static eventName = attrchangeEventName;
|
|
57
|
+
constructor(changes, mountInit) {
|
|
38
58
|
super(AttrChangeEvent.eventName);
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
59
|
+
this.changes = changes;
|
|
60
|
+
this.mountInit = mountInit;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export class MediaMatchEvent extends Event {
|
|
64
|
+
mountInit;
|
|
65
|
+
static eventName = mediamatchEventName;
|
|
66
|
+
constructor(mountInit) {
|
|
67
|
+
super(MediaMatchEvent.eventName);
|
|
68
|
+
this.mountInit = mountInit;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
export class MediaUnmatchEvent extends Event {
|
|
72
|
+
mountInit;
|
|
73
|
+
static eventName = mediaunmatchEventName;
|
|
74
|
+
constructor(mountInit) {
|
|
75
|
+
super(MediaUnmatchEvent.eventName);
|
|
76
|
+
this.mountInit = mountInit;
|
|
41
77
|
}
|
|
42
78
|
}
|
package/Events.ts
CHANGED
|
@@ -1,45 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* The `mutation-event` event represents something that happened.
|
|
14
|
-
* We can document it here.
|
|
15
|
-
*/
|
|
1
|
+
// Event classes for MountObserver
|
|
2
|
+
import type { IMountEvent, IDismountEvent, IAttrChangeEvent, AttrChange, MountInit, DismountReason } from './types.js';
|
|
3
|
+
|
|
4
|
+
// Event name constants
|
|
5
|
+
export const loadEventName = 'load';
|
|
6
|
+
export const mountEventName = 'mount';
|
|
7
|
+
export const dismountEventName = 'dismount';
|
|
8
|
+
export const disconnectEventName = 'disconnect';
|
|
9
|
+
export const attrchangeEventName = 'attrchange';
|
|
10
|
+
export const mediamatchEventName = 'mediamatch';
|
|
11
|
+
export const mediaunmatchEventName = 'mediaunmatch';
|
|
12
|
+
|
|
16
13
|
export class MountEvent extends Event implements IMountEvent {
|
|
17
|
-
static eventName: mountEventName =
|
|
18
|
-
|
|
19
|
-
constructor(public
|
|
20
|
-
|
|
14
|
+
static eventName: typeof mountEventName = mountEventName;
|
|
15
|
+
|
|
16
|
+
constructor(public matchingElement: Element, public modules: any[], public mountInit: MountInit) {
|
|
17
|
+
super(MountEvent.eventName);
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
20
|
|
|
24
|
-
export class DismountEvent extends Event implements IDismountEvent{
|
|
25
|
-
static eventName: dismountEventName =
|
|
26
|
-
|
|
27
|
-
constructor(public
|
|
21
|
+
export class DismountEvent extends Event implements IDismountEvent {
|
|
22
|
+
static eventName: typeof dismountEventName = dismountEventName;
|
|
23
|
+
|
|
24
|
+
constructor(public matchingElement: Element, public reason: DismountReason, public mountInit: MountInit) {
|
|
28
25
|
super(DismountEvent.eventName);
|
|
29
26
|
}
|
|
30
27
|
}
|
|
31
28
|
|
|
32
|
-
export class DisconnectEvent extends Event
|
|
33
|
-
static eventName:
|
|
34
|
-
|
|
35
|
-
constructor(public
|
|
29
|
+
export class DisconnectEvent extends Event {
|
|
30
|
+
static eventName: typeof disconnectEventName = disconnectEventName;
|
|
31
|
+
|
|
32
|
+
constructor(public matchingElement: Element, public mountInit: MountInit) {
|
|
36
33
|
super(DisconnectEvent.eventName);
|
|
37
34
|
}
|
|
38
35
|
}
|
|
39
36
|
|
|
40
|
-
export class
|
|
41
|
-
static eventName:
|
|
42
|
-
|
|
37
|
+
export class LoadEvent extends Event {
|
|
38
|
+
static eventName: typeof loadEventName = loadEventName;
|
|
39
|
+
|
|
40
|
+
constructor(public modules: any[], public mountInit: MountInit) {
|
|
41
|
+
super(LoadEvent.eventName);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export class AttrChangeEvent extends Event implements IAttrChangeEvent {
|
|
46
|
+
static eventName: typeof attrchangeEventName = attrchangeEventName;
|
|
47
|
+
|
|
48
|
+
constructor(public changes: AttrChange[], public mountInit: MountInit) {
|
|
43
49
|
super(AttrChangeEvent.eventName);
|
|
44
50
|
}
|
|
45
51
|
}
|
|
52
|
+
|
|
53
|
+
export class MediaMatchEvent extends Event {
|
|
54
|
+
static eventName: typeof mediamatchEventName = mediamatchEventName;
|
|
55
|
+
|
|
56
|
+
constructor(public mountInit: MountInit) {
|
|
57
|
+
super(MediaMatchEvent.eventName);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export class MediaUnmatchEvent extends Event {
|
|
62
|
+
static eventName: typeof mediaunmatchEventName = mediaunmatchEventName;
|
|
63
|
+
|
|
64
|
+
constructor(public mountInit: MountInit) {
|
|
65
|
+
super(MediaUnmatchEvent.eventName);
|
|
66
|
+
}
|
|
67
|
+
}
|