-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemc.js
46 lines (43 loc) · 1.32 KB
/
emc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// @ts-check
import { BeHive, seed, MountObserver } from 'be-hive/be-hive.js';
/** @import {EMC, EventListenerOrFn} from './ts-refs/trans-render/be/types' */
/** @import {Actions, PAP, AP} from './ts-refs/be-invoking/types' */;
const targetsPart = String.raw `^(?<targetsPart>.*)`;
const targetsPartOnEventType = String.raw `${targetsPart} on (?<localEventType>.*)`;
/**
* @type {Array<[string, string]>}
*/
const dssArrayKeys = [['targetsPart', 'remoteSpecifiers']];
/**
* @type {Partial<EMC<any, AP>>}
*/
export const emc = {
base: 'be-invoking',
map: {
'0.0': {
instanceOf: 'Object$entences',
objValMapsTo: '.',
regExpExts: {
parsedStatements: [
{
regExp: targetsPartOnEventType,
defaultVals: {},
dssArrayKeys,
},
{
regExp: targetsPart,
defaultVals: {},
dssArrayKeys,
}
]
}
}
},
enhPropKey: 'beInvoking',
importEnh: async () => {
const { BeInvoking } = await import('./be-invoking.js');
return BeInvoking;
}
};
const mose = seed(emc);
MountObserver.synthesize(document, BeHive, mose);