data-props
Version:
Reflect host(ish) props to data-* attributes.
50 lines (42 loc) • 1.39 kB
JavaScript
// @ts-check
import { BeHive, seed, MountObserver } from 'be-hive/be-hive.js';
import {Registry} from 'be-hive/Registry.js';
import {aggs} from 'be-hive/aggEvt.js';
import { w as bw } from 'be-hive/w.js';
/** @import {EMC, EventListenerOrFn} from './ts-refs/trans-render/be/types' */
/** @import {Actions, PAP, AP} from './ts-refs/be-observant/types' */;
/** @import {CSSQuery} from './ts-refs/trans-render/types.js' */
const dependencyPart = String.raw `(?<dependencyPart>.*)`;
const dependencies = String.raw `^${dependencyPart}`;
/**
* @type {Array<[string, string]>}
*/
const dssArrayKeys = [['dependencyPart', 'remoteSpecifiers']];
/**
* @type {Partial<EMC<any, AP>>}
*/
export const emc = {
base: 'data-props',
map: {
'0.0': {
instanceOf: 'Object$entences',
objValMapsTo: '.',
regExpExts: {
parsedStatements: [
{
regExp: dependencies,
defaultVals:{},
dssArrayKeys
}
]
}
}
},
enhPropKey: 'dataProps',
importEnh: async () => {
const {DataProps} = await import('./data-props.js');
return DataProps;
},
}
const mose = seed(emc);
MountObserver.synthesize(document, BeHive, mose);