mount-observer 0.0.112 → 0.1.0
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 +28 -26
- package/Events.ts +34 -30
- package/MountObserver.js +235 -520
- package/MountObserver.ts +281 -542
- package/README.md +149 -56
- package/attrCoordinates.js +93 -0
- package/attrCoordinates.ts +122 -0
- package/constants.js +6 -0
- package/constants.ts +7 -0
- package/index.js +3 -0
- package/index.ts +19 -0
- package/loadImports.js +47 -0
- package/loadImports.ts +56 -0
- package/package.json +8 -119
- package/playwright.config.ts +0 -1
- package/types.d.ts +86 -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,44 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The `mutation-event` event represents something that happened.
|
|
5
|
-
* We can document it here.
|
|
6
|
-
*/
|
|
1
|
+
// Event classes for MountObserver
|
|
2
|
+
import { mountEventName, dismountEventName, disconnectEventName, loadEventName, attrchangeEventName } from './constants.js';
|
|
7
3
|
export class MountEvent extends Event {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
static eventName =
|
|
11
|
-
constructor(
|
|
4
|
+
matchingElement;
|
|
5
|
+
modules;
|
|
6
|
+
static eventName = mountEventName;
|
|
7
|
+
constructor(matchingElement, modules) {
|
|
12
8
|
super(MountEvent.eventName);
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
9
|
+
this.matchingElement = matchingElement;
|
|
10
|
+
this.modules = modules;
|
|
15
11
|
}
|
|
16
12
|
}
|
|
17
13
|
export class DismountEvent extends Event {
|
|
18
|
-
|
|
19
|
-
static eventName =
|
|
20
|
-
constructor(
|
|
14
|
+
matchingElement;
|
|
15
|
+
static eventName = dismountEventName;
|
|
16
|
+
constructor(matchingElement) {
|
|
21
17
|
super(DismountEvent.eventName);
|
|
22
|
-
this.
|
|
18
|
+
this.matchingElement = matchingElement;
|
|
23
19
|
}
|
|
24
20
|
}
|
|
25
21
|
export class DisconnectEvent extends Event {
|
|
26
|
-
|
|
27
|
-
static eventName =
|
|
28
|
-
constructor(
|
|
22
|
+
matchingElement;
|
|
23
|
+
static eventName = disconnectEventName;
|
|
24
|
+
constructor(matchingElement) {
|
|
29
25
|
super(DisconnectEvent.eventName);
|
|
30
|
-
this.
|
|
26
|
+
this.matchingElement = matchingElement;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export class LoadEvent extends Event {
|
|
30
|
+
modules;
|
|
31
|
+
static eventName = loadEventName;
|
|
32
|
+
constructor(modules) {
|
|
33
|
+
super(LoadEvent.eventName);
|
|
34
|
+
this.modules = modules;
|
|
31
35
|
}
|
|
32
36
|
}
|
|
33
37
|
export class AttrChangeEvent extends Event {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
constructor(mountedElement, attrChangeInfos) {
|
|
38
|
+
changes;
|
|
39
|
+
static eventName = attrchangeEventName;
|
|
40
|
+
constructor(changes) {
|
|
38
41
|
super(AttrChangeEvent.eventName);
|
|
39
|
-
this.
|
|
40
|
-
this.attrChangeInfos = attrChangeInfos;
|
|
42
|
+
this.changes = changes;
|
|
41
43
|
}
|
|
42
44
|
}
|
package/Events.ts
CHANGED
|
@@ -1,45 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from './
|
|
10
|
-
|
|
11
|
-
// https://github.com/webcomponents-cg/community-protocols/issues/12#issuecomment-872415080
|
|
12
|
-
/**
|
|
13
|
-
* The `mutation-event` event represents something that happened.
|
|
14
|
-
* We can document it here.
|
|
15
|
-
*/
|
|
1
|
+
// Event classes for MountObserver
|
|
2
|
+
import {
|
|
3
|
+
mountEventName,
|
|
4
|
+
dismountEventName,
|
|
5
|
+
disconnectEventName,
|
|
6
|
+
loadEventName,
|
|
7
|
+
attrchangeEventName
|
|
8
|
+
} from './constants.js';
|
|
9
|
+
import type { IMountEvent, IDismountEvent, IAttrChangeEvent, AttrChange } from './types.js';
|
|
10
|
+
|
|
16
11
|
export class MountEvent extends Event implements IMountEvent {
|
|
17
|
-
static eventName: mountEventName =
|
|
18
|
-
|
|
19
|
-
constructor(public
|
|
20
|
-
|
|
12
|
+
static eventName: typeof mountEventName = mountEventName;
|
|
13
|
+
|
|
14
|
+
constructor(public matchingElement: Element, public modules: any[]) {
|
|
15
|
+
super(MountEvent.eventName);
|
|
21
16
|
}
|
|
22
17
|
}
|
|
23
18
|
|
|
24
|
-
export class DismountEvent extends Event implements IDismountEvent{
|
|
25
|
-
static eventName: dismountEventName =
|
|
26
|
-
|
|
27
|
-
constructor(public
|
|
19
|
+
export class DismountEvent extends Event implements IDismountEvent {
|
|
20
|
+
static eventName: typeof dismountEventName = dismountEventName;
|
|
21
|
+
|
|
22
|
+
constructor(public matchingElement: Element) {
|
|
28
23
|
super(DismountEvent.eventName);
|
|
29
24
|
}
|
|
30
25
|
}
|
|
31
26
|
|
|
32
|
-
export class DisconnectEvent extends Event
|
|
33
|
-
static eventName:
|
|
34
|
-
|
|
35
|
-
constructor(public
|
|
27
|
+
export class DisconnectEvent extends Event {
|
|
28
|
+
static eventName: typeof disconnectEventName = disconnectEventName;
|
|
29
|
+
|
|
30
|
+
constructor(public matchingElement: Element) {
|
|
36
31
|
super(DisconnectEvent.eventName);
|
|
37
32
|
}
|
|
38
33
|
}
|
|
39
34
|
|
|
40
|
-
export class
|
|
41
|
-
static eventName:
|
|
42
|
-
|
|
35
|
+
export class LoadEvent extends Event {
|
|
36
|
+
static eventName: typeof loadEventName = loadEventName;
|
|
37
|
+
|
|
38
|
+
constructor(public modules: any[]) {
|
|
39
|
+
super(LoadEvent.eventName);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export class AttrChangeEvent extends Event implements IAttrChangeEvent {
|
|
44
|
+
static eventName: typeof attrchangeEventName = attrchangeEventName;
|
|
45
|
+
|
|
46
|
+
constructor(public changes: AttrChange[]) {
|
|
43
47
|
super(AttrChangeEvent.eventName);
|
|
44
48
|
}
|
|
45
49
|
}
|