mount-observer 0.0.111 → 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 -115
- 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 -18
- 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 -190
- 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
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { PropInfo } from "../froop/types";
|
|
2
|
-
|
|
3
|
-
export type storage = 'sessionStorage' | 'localStorage';
|
|
4
|
-
|
|
5
|
-
export type protocols =
|
|
6
|
-
| storage
|
|
7
|
-
| 'indexedDB'
|
|
8
|
-
| 'globalThis'
|
|
9
|
-
| 'cookie'
|
|
10
|
-
| 'locationHash'
|
|
11
|
-
;
|
|
12
|
-
|
|
13
|
-
export type db = string;
|
|
14
|
-
export type storeName = string;
|
|
15
|
-
export type key = string;
|
|
16
|
-
export type chainedAccessor = string;
|
|
17
|
-
|
|
18
|
-
export type idbUSP = `indexedDB://${db}/${storeName}/${key}`;
|
|
19
|
-
export type idbUSL = `${idbUSP}?.${chainedAccessor}`;
|
|
20
|
-
|
|
21
|
-
export type storageUSP = `${storage}://${key}`;
|
|
22
|
-
export type storageUSL = `${storageUSP}?.${chainedAccessor}`;
|
|
23
|
-
|
|
24
|
-
export type USP =
|
|
25
|
-
| idbUSP
|
|
26
|
-
| storageUSP
|
|
27
|
-
;
|
|
28
|
-
|
|
29
|
-
export type USL =
|
|
30
|
-
| idbUSP
|
|
31
|
-
| idbUSL
|
|
32
|
-
| storageUSP
|
|
33
|
-
| storageUSL
|
|
34
|
-
;
|
|
35
|
-
|
|
36
|
-
export interface ParsedUSL{
|
|
37
|
-
protocol: protocols,
|
|
38
|
-
accessorChain: string,
|
|
39
|
-
usp: USP,
|
|
40
|
-
uspParts: Array<string>
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface WrapperConfig<TProps = any> extends PropInfo {
|
|
44
|
-
USPProp: keyof TProps & string,
|
|
45
|
-
accessor: string,
|
|
46
|
-
cache: boolean,
|
|
47
|
-
maxStaleness: number,
|
|
48
|
-
//subscribe to window message
|
|
49
|
-
beVigilant: boolean,
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export type USLMapping = {[key: string | number | symbol]: USL}
|
|
53
|
-
|
|
54
|
-
export interface StowArgs {
|
|
55
|
-
values: any,
|
|
56
|
-
mapping: USLMapping
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface SavingContext {
|
|
60
|
-
USLs: Set<USL>
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface CookieOptions {
|
|
64
|
-
secure: boolean | undefined,
|
|
65
|
-
'max-age': number | undefined,
|
|
66
|
-
expires: Date | string | undefined,
|
|
67
|
-
domain: string | undefined,
|
|
68
|
-
path: string | undefined,
|
|
69
|
-
}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { asOptions } from '../dss/types';
|
|
2
|
-
import {StringWithAutocompleteOptions, ZeroOrMore} from '../types';
|
|
3
|
-
|
|
4
|
-
export type ValueProp = StringWithAutocompleteOptions<
|
|
5
|
-
| 'value'
|
|
6
|
-
| 'checked'
|
|
7
|
-
| 'href'
|
|
8
|
-
| 'ariaValueNow'
|
|
9
|
-
| 'ariaChecked'
|
|
10
|
-
| 'valueAsNumber'
|
|
11
|
-
| 'valueAsDate'
|
|
12
|
-
| 'textContent'
|
|
13
|
-
| 'innerHTML'
|
|
14
|
-
>
|
|
15
|
-
|
|
16
|
-
export type DisplayProp = StringWithAutocompleteOptions<
|
|
17
|
-
| 'textContent'
|
|
18
|
-
| 'ariaValueText'
|
|
19
|
-
>;
|
|
20
|
-
|
|
21
|
-
export type ValueType = StringWithAutocompleteOptions<
|
|
22
|
-
| 'Boolean'
|
|
23
|
-
| 'String'
|
|
24
|
-
| 'Number'
|
|
25
|
-
| 'NumericRange'
|
|
26
|
-
>;
|
|
27
|
-
|
|
28
|
-
export type TrueText = StringWithAutocompleteOptions<
|
|
29
|
-
| 'Yes'
|
|
30
|
-
| 'On'
|
|
31
|
-
>;
|
|
32
|
-
|
|
33
|
-
export type FalseText = StringWithAutocompleteOptions<
|
|
34
|
-
| 'No'
|
|
35
|
-
| 'Off'
|
|
36
|
-
>;
|
|
37
|
-
|
|
38
|
-
export type TrueStringValue = StringWithAutocompleteOptions<
|
|
39
|
-
| 'https://schema.org/True'
|
|
40
|
-
|
|
41
|
-
>;
|
|
42
|
-
|
|
43
|
-
export type FalseStringValue = StringWithAutocompleteOptions<
|
|
44
|
-
| 'https://schema.org/False'
|
|
45
|
-
>;
|
|
46
|
-
|
|
47
|
-
export type StdEventNames = StringWithAutocompleteOptions<
|
|
48
|
-
| 'input'
|
|
49
|
-
| 'change'
|
|
50
|
-
| 'click'
|
|
51
|
-
| 'slotchange'
|
|
52
|
-
>;
|
|
53
|
-
|
|
54
|
-
export type BuiltInEditables = StringWithAutocompleteOptions<
|
|
55
|
-
| 'input'
|
|
56
|
-
| 'select'
|
|
57
|
-
| 'textarea'
|
|
58
|
-
|
|
59
|
-
>;
|
|
60
|
-
|
|
61
|
-
export interface ASMROptions<TProp = any>{
|
|
62
|
-
valueProp?: ValueProp;
|
|
63
|
-
valueType?: ValueType;
|
|
64
|
-
displayProp?: DisplayProp;
|
|
65
|
-
trueText?: TrueText;
|
|
66
|
-
falseText?: FalseText;
|
|
67
|
-
trueValue?: TrueStringValue;
|
|
68
|
-
falseValue?: FalseStringValue;
|
|
69
|
-
path?: string;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface SetOptions<TProp = any> extends ASMROptions<TProp>{
|
|
73
|
-
valToDisplay?: (v: TProp) => string;
|
|
74
|
-
allowUnsafe?: boolean;
|
|
75
|
-
action?:
|
|
76
|
-
|'set'
|
|
77
|
-
|'toggle'
|
|
78
|
-
|'increment'
|
|
79
|
-
|'decrement'
|
|
80
|
-
|'set-class'
|
|
81
|
-
|'set-part'
|
|
82
|
-
;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface AbsOptions<TProp = any> {
|
|
86
|
-
/**
|
|
87
|
-
* source of truth attribute
|
|
88
|
-
*/
|
|
89
|
-
sota?: string;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* name of property corresponding to source of truth attribute
|
|
93
|
-
* if different from source of truth attribute
|
|
94
|
-
*/
|
|
95
|
-
sotaProp?: string;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Is Roundabout ready
|
|
99
|
-
*/
|
|
100
|
-
isRAR?: boolean;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Is Roundabout Emulating
|
|
104
|
-
*/
|
|
105
|
-
isRAE?: boolean;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Is User Editable
|
|
109
|
-
*/
|
|
110
|
-
isUE?: boolean;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* User Edit Event Name
|
|
114
|
-
*/
|
|
115
|
-
evt?: StdEventNames;
|
|
116
|
-
|
|
117
|
-
propToAbsorb?: ValueProp;
|
|
118
|
-
|
|
119
|
-
propToAbsorbValueType?: ValueType;
|
|
120
|
-
|
|
121
|
-
selfIsVal?: boolean;
|
|
122
|
-
|
|
123
|
-
as?: asOptions | undefined;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// export interface Setter<TProp = any> {
|
|
127
|
-
// setValue(nv: TProp);
|
|
128
|
-
// }
|
|
129
|
-
|
|
130
|
-
export interface SharingObject<TProp = any>{
|
|
131
|
-
setValue(val: TProp);
|
|
132
|
-
pureValue: TProp;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export interface AbsorbingObject<TProp = any> extends EventTarget{
|
|
136
|
-
getValue(): Promise<TProp>;
|
|
137
|
-
|
|
138
|
-
}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { AttrChangeInfo, MountInit, RootCnfg, ObservedSourceOfTruthAttribute, MOSE} from '../../mount-observer/types';
|
|
2
|
-
import { RegExpExt } from '../lib/prs/types';
|
|
3
|
-
import {IObject$tring, CSSQuery, StringWithAutocompleteOptions} from '../types';
|
|
4
|
-
export type stringArray = string | Array<string>;
|
|
5
|
-
|
|
6
|
-
export type stringArrayOrTree = Array<string> | [string, Array<string>];
|
|
7
|
-
// export interface AttrParts {
|
|
8
|
-
// root: string,
|
|
9
|
-
// base: string,
|
|
10
|
-
// branch: string,
|
|
11
|
-
// leaf: string,
|
|
12
|
-
// }
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
type prefixDelimiter = '-' | ':' | '--';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Abbrev. for EnhancementMountConfig
|
|
19
|
-
*/
|
|
20
|
-
export type EMC<TBranches = any, TProps = any> = EnhancementMountConfig<TBranches, TProps>
|
|
21
|
-
|
|
22
|
-
export interface AttrCacheConfig {
|
|
23
|
-
enable: 'always' | 'instantiating',
|
|
24
|
-
clone?: boolean
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type SafeProps = StringWithAutocompleteOptions<
|
|
28
|
-
| 'textContent'
|
|
29
|
-
| 'value'
|
|
30
|
-
| 'object'
|
|
31
|
-
| 'checked'
|
|
32
|
-
| '^aria'
|
|
33
|
-
>;
|
|
34
|
-
|
|
35
|
-
export type EventListenerClass = {new(): EventListenerObject}
|
|
36
|
-
|
|
37
|
-
export type EventListenerOrFn = EventListener | ((e: Event) => void) | EventListenerClass;
|
|
38
|
-
|
|
39
|
-
export type HandlerKey = string;
|
|
40
|
-
|
|
41
|
-
export type HandlerName = string;
|
|
42
|
-
|
|
43
|
-
export type EventType = string;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
type CustomHandlers = Map<HandlerName, EventListenerOrFn>;
|
|
47
|
-
type CustomHandlerCluster = Map<HandlerKey, CustomHandlers>;
|
|
48
|
-
// type EventTypeToListenerAndOptions = Map<EventType, ListenerAndOptions>;
|
|
49
|
-
// export interface ListenerAndOptions {
|
|
50
|
-
// listener: EventListenerOrFn,
|
|
51
|
-
// options?: OnOptions
|
|
52
|
-
// }
|
|
53
|
-
|
|
54
|
-
export type MappedListeners = {[key: string]: EventListenerOrFn}
|
|
55
|
-
|
|
56
|
-
export interface IW<T = EventTarget> {
|
|
57
|
-
q: CSSQuery,
|
|
58
|
-
/**
|
|
59
|
-
* "addEventListeners or Actions"
|
|
60
|
-
* @param eventsToAdd
|
|
61
|
-
*/
|
|
62
|
-
a(eventsToAdd: MappedListeners): IW,
|
|
63
|
-
/**
|
|
64
|
-
* set properties
|
|
65
|
-
* @param propsToMerge
|
|
66
|
-
*/
|
|
67
|
-
s(propsToMerge: Partial<T>): IW,
|
|
68
|
-
r(refs: {[key: string]: any}): IW,
|
|
69
|
-
listeners: MappedListeners,
|
|
70
|
-
props: Partial<T>,
|
|
71
|
-
refs: {[key: string]: any},
|
|
72
|
-
primaryVal: any;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export interface EnhancementMountConfig<TBranches = any, TProps = any>{
|
|
76
|
-
id?: string;
|
|
77
|
-
enhancedElementInstanceOf?: Array<{new(): Element}>,
|
|
78
|
-
enhancedElementMatches?: string,
|
|
79
|
-
enhPropKey: HandlerKey,
|
|
80
|
-
/**
|
|
81
|
-
* If not specified, will be defaulted to the enhPropKey
|
|
82
|
-
* This allows for registered event handlers that are tied to a particular
|
|
83
|
-
* enhancement to be scoped within a Shadow DOM realm
|
|
84
|
-
*/
|
|
85
|
-
handlerKey?: string,
|
|
86
|
-
hasRootIn?: Array<RootCnfg>,
|
|
87
|
-
preBaseDelimiter?: prefixDelimiter,
|
|
88
|
-
base?: string,
|
|
89
|
-
preBranchDelimiter?: prefixDelimiter,
|
|
90
|
-
branches?: Array<string>,
|
|
91
|
-
//TODO
|
|
92
|
-
watchedBranches?: Array<string>,
|
|
93
|
-
//TODO
|
|
94
|
-
preLeafDelimiter?: prefixDelimiter,
|
|
95
|
-
//TODO
|
|
96
|
-
leaves?: Partial<{[key in keyof TBranches & string]: stringArray}>,
|
|
97
|
-
//TODO
|
|
98
|
-
hostMatches?: CSSQuery,
|
|
99
|
-
//TODO
|
|
100
|
-
hostInstanceOf?: Array<{new(): HTMLElement}>,
|
|
101
|
-
block?: boolean,
|
|
102
|
-
//TODO
|
|
103
|
-
unblock?: boolean,
|
|
104
|
-
|
|
105
|
-
importEnh?: () => Promise<{new(): IEnhancement}>
|
|
106
|
-
|
|
107
|
-
map?: {[key: AttrCoordinates]: AttrMapPoint<TProps>},
|
|
108
|
-
/**
|
|
109
|
-
* Observed Source of Truth Attributes [TODO, need better name]
|
|
110
|
-
*/
|
|
111
|
-
osotas? : Array<ObservedSourceOfTruthAttribute<TProps>>,
|
|
112
|
-
|
|
113
|
-
cacheConfig?: AttrCacheConfig,
|
|
114
|
-
|
|
115
|
-
mapLocalNameTo?: keyof TProps,
|
|
116
|
-
|
|
117
|
-
mapEnhKeyTo?: keyof TProps,
|
|
118
|
-
|
|
119
|
-
mapEmcTo?: keyof TProps,
|
|
120
|
-
|
|
121
|
-
allowedMutations?: {[key: CSSQuery]: []}
|
|
122
|
-
|
|
123
|
-
top?: EnhancementMountConfig<TBranches, TProps>,
|
|
124
|
-
|
|
125
|
-
ws?: Array<IW>,
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* map the where clause to this
|
|
129
|
-
*/
|
|
130
|
-
mapWSTo?: keyof TProps,
|
|
131
|
-
|
|
132
|
-
primaryProp?: keyof TProps
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export type AttrMapPoint<TProps = any> = keyof TProps & string | AttrMapConfig<TProps>
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
export interface AttrMapConfig<TProps = any, TMethods = TProps> {
|
|
139
|
-
instanceOf?: 'Object' | 'String' | 'Object$tring' | 'Object$entences' | 'DSSArray' | 'Boolean' | 'Number',
|
|
140
|
-
mapsTo?: '.' | keyof TProps,
|
|
141
|
-
valIfFalsy?: any,
|
|
142
|
-
strValMapsTo?: keyof TProps,
|
|
143
|
-
objValMapsTo?: '.' | keyof TProps,
|
|
144
|
-
arrValMapsTo?: keyof TProps,
|
|
145
|
-
strArrMapsTo?: keyof TProps,
|
|
146
|
-
regExpExts?: Partial<{[key in keyof TProps]: RegExpExt<any>[]}>;
|
|
147
|
-
parsedRegExps?: boolean;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
export type Branchitude = number;
|
|
152
|
-
export type Leafitude = number;
|
|
153
|
-
export type AttrCoordinates = `${Branchitude}.${Leafitude}`;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
export type MountBeHive<TBranches = any> = Partial<EMC<TBranches>>;
|
|
158
|
-
|
|
159
|
-
export interface EnhancementInfo {
|
|
160
|
-
initialPropValues?: any,
|
|
161
|
-
initialAttrInfo?: Array<AttrChangeInfo>,
|
|
162
|
-
mountCnfg: EMC,
|
|
163
|
-
synConfig: EMC,
|
|
164
|
-
observedAttrs: Array<string> | undefined,
|
|
165
|
-
ws?: Array<IW>
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export interface BEAllProps<TElement = Element> {
|
|
169
|
-
resolved: boolean;
|
|
170
|
-
rejected: boolean;
|
|
171
|
-
enhancedElement: TElement;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export interface IEnhancement<TElement = Element> extends BEAllProps<TElement>{
|
|
175
|
-
attach(el: TElement, enhancement: EnhancementInfo): Promise<void>;
|
|
176
|
-
detach(el: TElement): Promise<void>;
|
|
177
|
-
resolved: boolean;
|
|
178
|
-
rejected: boolean;
|
|
179
|
-
readonly enhancedElement: TElement;
|
|
180
|
-
whenResolved(): Promise<boolean>;
|
|
181
|
-
de(src: EventTarget, name: string) : Event,
|
|
182
|
-
attrChgCB(attrChangeInfos: Array<AttrChangeInfo>) : void,
|
|
183
|
-
channelEvent(e: Event): void;
|
|
184
|
-
//parsedFrom: string;
|
|
185
|
-
//autoImport?: boolean | string;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export interface OnOptions extends EventListenerOptions{
|
|
189
|
-
initOn?: 'resolved'
|
|
190
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export type ID = `#${string}`;
|
|
2
|
-
export type Host = `:host()`;
|
|
3
|
-
export type Hostish = ``;
|
|
4
|
-
export type Target = ID | Host | Hostish;
|
|
5
|
-
|
|
6
|
-
export type MindReadProp = ``;
|
|
7
|
-
export type PropPath = `?.${string}`;
|
|
8
|
-
|
|
9
|
-
export type Prop = string;
|
|
10
|
-
export type ConstVal = `\`${string}\``;
|
|
11
|
-
|
|
12
|
-
export type asOptions =
|
|
13
|
-
| 'number'
|
|
14
|
-
| 'boolean'
|
|
15
|
-
| 'string'
|
|
16
|
-
| 'object'
|
|
17
|
-
| 'regexp'
|
|
18
|
-
| 'urlpattern'
|
|
19
|
-
| 'boolean|number'
|
|
20
|
-
;
|
|
21
|
-
export type MindReadType = ``;
|
|
22
|
-
export type TypeQualifier = `-as-${asOptions}`;
|
|
23
|
-
|
|
24
|
-
export type ValExpression = `${Prop | PropPath | ConstVal | MindReadProp}${TypeQualifier | MindReadType}`;
|
|
25
|
-
|
|
26
|
-
export type MindReadEvent = ``;
|
|
27
|
-
|
|
28
|
-
export type EventSpecifier = `::${string}`;
|
|
29
|
-
|
|
30
|
-
export type EventPart = MindReadEvent | EventSpecifier;
|
|
31
|
-
|
|
32
|
-
export type DSS = `${Target}${ValExpression}${EventPart}`;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export interface Specifier {
|
|
36
|
-
id?: string,
|
|
37
|
-
prop?: string,
|
|
38
|
-
path?: SubPropPath,
|
|
39
|
-
evtName?: EventName,
|
|
40
|
-
as?: asOptions,
|
|
41
|
-
constVal?: any;
|
|
42
|
-
enhKey?: string;
|
|
43
|
-
ish?: boolean;
|
|
44
|
-
//element to observe must be a shadowed custom element host.
|
|
45
|
-
host?: boolean;
|
|
46
|
-
self?: boolean;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* can contain dot (.) for sub property access and pipes (|) for method invocations
|
|
53
|
-
*/
|
|
54
|
-
export type SubPropPath = string;
|
|
55
|
-
|
|
56
|
-
export type EventName = string;
|
|
57
|
-
|