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,416 +0,0 @@
|
|
|
1
|
-
import { IMountObserver } from '../../mount-observer/types';
|
|
2
|
-
import { Scope} from '../lib/types';
|
|
3
|
-
import { WrapperConfig } from '../XV/types';
|
|
4
|
-
import {CSSQuery, XForm} from '../types';
|
|
5
|
-
|
|
6
|
-
export interface IEventConfig<MCProps = any, MCActions = MCProps, TAction = Action>{
|
|
7
|
-
on?: string,
|
|
8
|
-
of?: 'tbd' | EventTarget,
|
|
9
|
-
doInit?: boolean,
|
|
10
|
-
options?: AddEventListenerOptions,
|
|
11
|
-
abort?: {
|
|
12
|
-
origMethName: string & keyof MCActions,
|
|
13
|
-
//destMethName: string & keyof MCActions,
|
|
14
|
-
of: 'tbd' | EventTarget,
|
|
15
|
-
on: string,
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
composedPathMatches?: string,
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
//Is anything using this anymore?
|
|
22
|
-
export type ActionOnEventConfigs<MCProps = any, MCActions = MCProps, TAction = Action> = Partial<{[key in keyof MCActions]: IEventConfig<MCProps, MCActions, TAction>}>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export interface IAttrChgCB{
|
|
27
|
-
instance: HTMLElement,
|
|
28
|
-
// name: string,
|
|
29
|
-
// oldVal: string,
|
|
30
|
-
// newVal: string,
|
|
31
|
-
newAttrs: {[key: string]: {oldVal: string | null, newVal: string | null}},
|
|
32
|
-
filteredAttrs: {[key: string]: string}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export interface IPropChg{
|
|
38
|
-
key: string,
|
|
39
|
-
oldVal: any,
|
|
40
|
-
newVal: any,
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface DynamicTransform {
|
|
45
|
-
scope?: Scope,
|
|
46
|
-
noCache?: boolean,
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface DefineArgs<MixinCompositeProps = any, MixinCompositeActions = MixinCompositeProps, TPropInfo = PropInfo, TAction extends Action = Action<MixinCompositeProps>>{
|
|
50
|
-
superclass?: {new(): HTMLElement} | string,
|
|
51
|
-
mixins?: any[],
|
|
52
|
-
mainTemplate?: HTMLTemplateElement;
|
|
53
|
-
/** use this only for defaults that can't be JSON serialized in config */
|
|
54
|
-
complexPropDefaults?: Partial<MixinCompositeProps>;
|
|
55
|
-
/** Config should be 100% JSON serializable, or a JSON import, or an id of an be-exportable script tag */
|
|
56
|
-
config: WCConfig<MixinCompositeProps, MixinCompositeActions, TPropInfo, TAction> | (() => Promise<{default: WCConfig<MixinCompositeProps, MixinCompositeActions, TPropInfo, TAction>}>) | string;
|
|
57
|
-
// /**
|
|
58
|
-
// * Side effects tied to actions, mostly used to load enhancement dependencies tied to
|
|
59
|
-
// * enhancements
|
|
60
|
-
// */
|
|
61
|
-
// asides?: Partial<{[key in keyof MixinCompositeActions & string]: (instance: EventTarget, methodName: string, key: string) => Promise<void> }>
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface WCConfig<TProps = any, TActions = TProps, TPropInfo = PropInfo, TAction = Action>{
|
|
65
|
-
tagName?: string;
|
|
66
|
-
isEnh?: boolean;
|
|
67
|
-
propDefaults?: Partial<{[key in keyof TProps]: TProps[key]}>;
|
|
68
|
-
propInfo?: Partial<{[key in keyof TProps]: TPropInfo}>;
|
|
69
|
-
wrappers?: Partial<{[key in keyof TProps]: WrapperConfig<TProps>}>;
|
|
70
|
-
derivedProps?: (keyof TProps & string)[];
|
|
71
|
-
// actions?:
|
|
72
|
-
// Partial<{[key in keyof MCActions & string]: TAction | keyof MCProps}>
|
|
73
|
-
actions?: Actions<TProps, TActions>;
|
|
74
|
-
propChangeMethod?: keyof TActions;
|
|
75
|
-
style?: Partial<CSSStyleDeclaration>;
|
|
76
|
-
/**
|
|
77
|
-
* Used for providing hints to server side processing what css queries should be observed if using HTMLRewriter.
|
|
78
|
-
*/
|
|
79
|
-
keyQueries?: string[];
|
|
80
|
-
formAss?: boolean;
|
|
81
|
-
compacts?: Compacts<TProps>;
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export type PropLookup<TProps = any, TActions = any> = Partial<{[key in keyof TProps]: PropInfo<TProps, TActions>}>;
|
|
86
|
-
export type IshPropLookup<TProps = any, TActions = any> = Partial<{[key in keyof TProps]: IshPropInfo<TProps, TActions>}>;
|
|
87
|
-
export interface IshConfig<TProps = any, TActions = TProps, ETProps = TProps>{
|
|
88
|
-
propDefaults?: Partial<{[key in keyof TProps]: TProps[key]}>;
|
|
89
|
-
propInfo?: Partial<{[key in keyof TProps]: PropInfo}>;
|
|
90
|
-
wrappers?: Partial<{[key in keyof TProps]: WrapperConfig<TProps>}>;
|
|
91
|
-
actions?: Actions<TProps, TActions>;
|
|
92
|
-
/**
|
|
93
|
-
* inferred actions
|
|
94
|
-
*/
|
|
95
|
-
infractions?: Infractions<TProps>,
|
|
96
|
-
compacts?: Compacts<TProps, TActions>;
|
|
97
|
-
hitch?: Hitches<TProps, TActions>;
|
|
98
|
-
handlers?: Handlers<ETProps, TActions>;
|
|
99
|
-
extHandlers?: ExtHandlers<TProps>;
|
|
100
|
-
positractions?: Positractions<TProps, TActions>;
|
|
101
|
-
|
|
102
|
-
isSleepless?: boolean;
|
|
103
|
-
xform?: XForm<TProps, TActions>;
|
|
104
|
-
inScopeXForms?: {[key: CSSQuery]: XForm<TProps, TActions>};
|
|
105
|
-
ishListCountProp?: keyof TProps & string;
|
|
106
|
-
defaultIshList?: any[];
|
|
107
|
-
mapParentScopeRefTo?: keyof TProps & string;
|
|
108
|
-
mapElTo?: keyof TProps & string;
|
|
109
|
-
ignoreItemProp?: boolean;
|
|
110
|
-
}
|
|
111
|
-
export interface OConfig<TProps = any, TActions = TProps, ETProps = TProps> extends IshConfig<TProps, TActions, ETProps>{
|
|
112
|
-
mainTemplate?: string | HTMLTemplateElement;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export type Positractions<TProps = any, TActions = TProps> =
|
|
116
|
-
| Array<Positraction<TProps, TActions>>;
|
|
117
|
-
|
|
118
|
-
export interface Positraction<TProps = any, TActions = TProps> extends LogicOp<TProps, TActions> {
|
|
119
|
-
do:
|
|
120
|
-
| Function
|
|
121
|
-
| (keyof TActions & string)
|
|
122
|
-
| PropsToProps<TProps>
|
|
123
|
-
ifKeyIn?: Array<keyof TProps & string>,
|
|
124
|
-
ifAllOf?: Array<keyof TProps & string>,
|
|
125
|
-
//ifNoneOf: Array<keyof TProps & string>,
|
|
126
|
-
|
|
127
|
-
pass?: Array<(keyof TProps & string) | number | boolean | '$0' | '$0+' | `\`${string}\``>,
|
|
128
|
-
assignTo?: Array<null | (keyof TProps & string)>
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
export type Compacts<TProps = any, TActions = TProps> =
|
|
134
|
-
//| Partial<{[key in `${keyof TProps & string}_to_${keyof TProps & string}` & string]: Operation<TProps> }>
|
|
135
|
-
| Partial<{[key in `negate_${keyof TProps & string}_to_${keyof TProps & string}`]: number}>
|
|
136
|
-
| Partial<{[key in `pass_length_of_${keyof TProps & string}_to_${keyof TProps & string}`]: number}>
|
|
137
|
-
| Partial<{[key in `echo_${keyof TProps & string}_to_${keyof TProps & string}`]: number}>
|
|
138
|
-
| Partial<{[key in `echo_${keyof TProps & string}_to_${keyof TProps & string}_after`]: keyof TProps}>
|
|
139
|
-
| Partial<{[key in `when_${keyof TProps & string}_changes_call_${keyof TActions & string}`]: number}>
|
|
140
|
-
| Partial<{[key in `when_${keyof TProps & string}_changes_toggle_${keyof TProps & string}`]: number}>
|
|
141
|
-
| Partial<{[key in `when_${keyof TProps & string}_changes_inc_${keyof TProps & string}_by`]: number}>
|
|
142
|
-
| Partial<{[key in `when_${keyof TProps & string}_changes_dispatch`]: string}> //TODO
|
|
143
|
-
;
|
|
144
|
-
|
|
145
|
-
export type Hitches<TProps = any, TActions = TProps> =
|
|
146
|
-
| Partial<{[key in `when_${keyof TProps & string}_emits_${keyof TProps & string}_inc_${keyof TProps & string}_by`]: number}>
|
|
147
|
-
;
|
|
148
|
-
|
|
149
|
-
export interface ExtHandlerOptions {
|
|
150
|
-
on: string,
|
|
151
|
-
stopPropagation?: boolean,
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export type ExtHandlers<ETProps = any> =
|
|
155
|
-
| Partial<{[key in `inc_${keyof ETProps & string}` & string]: ExtHandlerOptions}>
|
|
156
|
-
;
|
|
157
|
-
|
|
158
|
-
export type Handlers<ETProps = any, TActions = ETProps> =
|
|
159
|
-
| Partial<{[key in `${keyof ETProps & string}_to_${keyof TActions & string}_on` & string]: string }>;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
export type ListOfLogicalExpressions<MCProps = any> = (keyof MCProps | LogicOp<MCProps>)[];
|
|
164
|
-
|
|
165
|
-
export type LogicOpProp<MCProps = any> =
|
|
166
|
-
|LogicOp<MCProps> | (keyof MCProps & string)[];
|
|
167
|
-
|
|
168
|
-
type PropsToProps<Props> = (x: Props) => (Promise<Partial<Props>> | Partial<Props>)
|
|
169
|
-
|
|
170
|
-
export interface LogicOp<Props = any, TActions = Props>{
|
|
171
|
-
/**
|
|
172
|
-
* Supported by trans-render
|
|
173
|
-
*/
|
|
174
|
-
ifAllOf?: Keysh<Props>,
|
|
175
|
-
|
|
176
|
-
ifKeyIn?: Keysh<Props>,
|
|
177
|
-
|
|
178
|
-
ifNoneOf?: Keysh<Props>,
|
|
179
|
-
|
|
180
|
-
ifEquals?: Array<Key<Props>>,
|
|
181
|
-
|
|
182
|
-
ifAtLeastOneOf?: Keysh<Props>,
|
|
183
|
-
|
|
184
|
-
ifNotAllOf?: Keysh<Props>,
|
|
185
|
-
|
|
186
|
-
debug?: boolean,
|
|
187
|
-
|
|
188
|
-
delay?: number,
|
|
189
|
-
|
|
190
|
-
do?:
|
|
191
|
-
| Function
|
|
192
|
-
| (keyof TActions & string)
|
|
193
|
-
| PropsToProps<Props>
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export interface SetLogicOps<Props = any>{
|
|
198
|
-
|
|
199
|
-
a?: boolean,
|
|
200
|
-
|
|
201
|
-
ifAllOf?: Set<Key<Props>>,
|
|
202
|
-
|
|
203
|
-
ifKeyIn?: Set<Key<Props>>,
|
|
204
|
-
|
|
205
|
-
ifNoneOf?: Set<Key<Props>>,
|
|
206
|
-
|
|
207
|
-
ifEquals?: Set<Key<Props>>,
|
|
208
|
-
|
|
209
|
-
ifAtLeastOneOf?: Set<Key<Props>>,
|
|
210
|
-
|
|
211
|
-
ifNotAllOf?: Set<Key<Props>>,
|
|
212
|
-
|
|
213
|
-
debug?: boolean,
|
|
214
|
-
|
|
215
|
-
delay?: number,
|
|
216
|
-
|
|
217
|
-
do?: (x: Props) => (Promise<Partial<Props>> | Partial<Props>),
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export interface Action<MCProps = any, MCActions = MCProps> extends LogicOp<MCProps>{
|
|
221
|
-
target?: keyof MCProps;
|
|
222
|
-
debug?: boolean;
|
|
223
|
-
secondArg?: any;
|
|
224
|
-
//setFree?: (keyof MCProps & string)[],
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
export interface IActionProcessor{
|
|
228
|
-
doActions(self: IActionProcessor, actions: {[methodName: string]: Action}, target: any, proxy?: any): void;
|
|
229
|
-
postHoc(self: this, action: Action, target: any, returnVal: any, proxy?: any): void;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
type PropInfoTypes = "String" | "Number" | "Boolean" | "Object" | "RegExp";
|
|
233
|
-
|
|
234
|
-
export interface IshPropInfo<TProps = any, TActions = any>{
|
|
235
|
-
type?: PropInfoTypes;
|
|
236
|
-
dry?: boolean;
|
|
237
|
-
ro?: boolean;
|
|
238
|
-
propName?: string;
|
|
239
|
-
/**
|
|
240
|
-
* Allow for discarding what is passed in favor of a modified value such as a formatted value
|
|
241
|
-
* or filtered list
|
|
242
|
-
*/
|
|
243
|
-
adjuster?:
|
|
244
|
-
|keyof TActions & string
|
|
245
|
-
|((nv: any) => any)
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export interface PropInfo<TProps=any, TActions=any> extends IshPropInfo<TProps, TActions>{
|
|
249
|
-
|
|
250
|
-
parse?: boolean;
|
|
251
|
-
def?: any;
|
|
252
|
-
attrName?: string;
|
|
253
|
-
reflect?: boolean;
|
|
254
|
-
/**
|
|
255
|
-
* form associated read only property
|
|
256
|
-
* https://web.dev/articles/more-capable-form-controls#:~:text=Form-associated%20custom%20elements%20aim%20to%20bridge%20the%20gap,associated%20with%20the%20form%2C%20like%20a%20browser-provided%20control.
|
|
257
|
-
* examples: form, validity, validityMessage, willValidate
|
|
258
|
-
*/
|
|
259
|
-
farop?: boolean;
|
|
260
|
-
/**
|
|
261
|
-
* form associated read only method
|
|
262
|
-
* examples: checkValidity, reportValidity
|
|
263
|
-
*/
|
|
264
|
-
farom?: 'checkValidity' | 'reportValidity';
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* form associated write method
|
|
268
|
-
*/
|
|
269
|
-
fawm?: 'setValidity' | 'setFormValue'
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* internals pass through property
|
|
273
|
-
* examples: role, ariaRole
|
|
274
|
-
*/
|
|
275
|
-
ip?: boolean;
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
export type ConstString = string;
|
|
281
|
-
|
|
282
|
-
export type NameOfProp = string;
|
|
283
|
-
|
|
284
|
-
export type StringOrProp = ConstString | [NameOfProp, PropInfo];
|
|
285
|
-
|
|
286
|
-
export type Parts = Array<StringOrProp>;
|
|
287
|
-
|
|
288
|
-
export interface PropChangeInfo<TPropInfo = PropInfo> {
|
|
289
|
-
key: string,
|
|
290
|
-
ov: any,
|
|
291
|
-
nv: any,
|
|
292
|
-
prop: TPropInfo,
|
|
293
|
-
pcm: PropChangeMethod | undefined;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
//are these still really used?
|
|
297
|
-
export type PropChangeMoment = 'v' | '-a' | '+a' | '+qr' | '+qm';
|
|
298
|
-
|
|
299
|
-
export type PropChangeMethod = (self: EventTarget, pci: PropChangeInfo, moment: PropChangeMoment) => boolean;
|
|
300
|
-
|
|
301
|
-
export type Actions<TProps = any, TActions = TProps> =
|
|
302
|
-
Partial<{[key in keyof TActions & string]: LogicOp<TProps>}>
|
|
303
|
-
//& Partial<{[key in `do_${keyof TActions & string}_on`]: Key<TActions> | Array<Key<TActions>> }>
|
|
304
|
-
;
|
|
305
|
-
|
|
306
|
-
export type Checks<TProps = any, TActions = TProps> =
|
|
307
|
-
Partial<{[key in keyof TActions & string]: SetLogicOps<TProps>}>
|
|
308
|
-
|
|
309
|
-
export type roundaboutOptions<TProps = any, TActions = TProps, ETProps = TProps> = {
|
|
310
|
-
vm?: TProps & TActions & RoundaboutReady,
|
|
311
|
-
//for enhanced elements, pass in the container, referenced via $0.
|
|
312
|
-
container?: EventTarget,
|
|
313
|
-
propagate?: keyof TProps & string | Array<keyof TProps & string>,
|
|
314
|
-
actions?: Actions<TProps,TActions>,
|
|
315
|
-
compacts?: Compacts<TProps, TActions>,
|
|
316
|
-
//onsets?: Onsets<TProps, TActions>,
|
|
317
|
-
handlers?: Handlers<ETProps, TActions>,
|
|
318
|
-
hitch?: Hitches<TProps, TActions>,
|
|
319
|
-
positractions?: Positractions<TProps>,
|
|
320
|
-
mountObservers?: Set<IMountObserver>
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
export type PropsToPartialProps<TProps = any> =
|
|
324
|
-
| ((self: TProps, a: any, b: any) => Promise<Partial<TProps>>)
|
|
325
|
-
| ((self: TProps) => Partial<TProps>);
|
|
326
|
-
|
|
327
|
-
export type Infractions<TProps = any> =
|
|
328
|
-
//| PropsToPartialProps<TProps>
|
|
329
|
-
| Array<PropsToPartialProps<TProps>>
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
export type Busses = {[key: string]: Set<string>};
|
|
334
|
-
|
|
335
|
-
export type Routers = {[key: string]: Array<{
|
|
336
|
-
on: string,
|
|
337
|
-
do: string,
|
|
338
|
-
full: string,
|
|
339
|
-
}>}
|
|
340
|
-
|
|
341
|
-
export type Key<T = any> = keyof T & string;
|
|
342
|
-
|
|
343
|
-
export type Keysh<T = any> = Key<T> | Array<Key<T>>;
|
|
344
|
-
|
|
345
|
-
export interface RoundaboutReady{
|
|
346
|
-
/**
|
|
347
|
-
* Allow for assigning to read only props via the "backdoor"
|
|
348
|
-
* Bypasses getters / setters, sets directly to (private) memory slots
|
|
349
|
-
* Doesn't do any notification
|
|
350
|
-
* Allows for nested property setting
|
|
351
|
-
*/
|
|
352
|
-
covertAssignment(obj: any): Promise<void>;
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* fires event with name matching the name of the property when the value changes (but not via covertAssignment)
|
|
356
|
-
* when property is set via public interface, not (immediately) via an action method's return object
|
|
357
|
-
*/
|
|
358
|
-
readonly propagator : EventTarget | undefined;
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
*
|
|
362
|
-
* https://github.com/whatwg/dom/issues/1296
|
|
363
|
-
*/
|
|
364
|
-
//readonly disconnectedSignal: AbortSignal
|
|
365
|
-
|
|
366
|
-
RAController: AbortController;
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* During this time, queues/buses continue to perform "bookkeeping"
|
|
370
|
-
* but doesn't process the queue until sleep property becomes falsy.
|
|
371
|
-
* If truthy, can call await awake() before processing should resume
|
|
372
|
-
* [TODO]
|
|
373
|
-
*/
|
|
374
|
-
readonly sleep?: number | undefined;
|
|
375
|
-
|
|
376
|
-
awake(): Promise<void>;
|
|
377
|
-
|
|
378
|
-
nudge(): void;
|
|
379
|
-
|
|
380
|
-
rock(): void;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
export interface BaseProps{
|
|
386
|
-
proppedUp: boolean,
|
|
387
|
-
sleep?: number;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
export interface ICompact{
|
|
391
|
-
compacts: Compacts,
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
interface CompactStatement {
|
|
395
|
-
srcKey: string,
|
|
396
|
-
destKey: string,
|
|
397
|
-
op: 'toggle' | 'negate' | 'call' | 'pass_length' | 'echo' | 'inc' | 'dispatch',
|
|
398
|
-
rhsIsDynamic: boolean
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
interface HitchStatement {
|
|
402
|
-
leftKey: string,
|
|
403
|
-
middleKey: string,
|
|
404
|
-
rightKey: string,
|
|
405
|
-
lOp: 'when'
|
|
406
|
-
lmOp: 'emits',
|
|
407
|
-
mrOp: 'inc',
|
|
408
|
-
rOp: 'by'
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
export type CommandMethod<T extends EventTarget = EventTarget> = (self: T, evt: Event) => Partial<T> | Promise<Partial<T>>
|
|
412
|
-
|
|
413
|
-
export type HookupConfig<T extends EventTarget = EventTarget> = {[key: string]: CommandMethod | [string, CommandMethod]};
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {ITransformer, UnitOfWork} from '../types.js';
|
|
2
|
-
import {Mount} from '../../../Mount.js';
|
|
3
|
-
export interface LocalizerProps {
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export interface LocalizerMethods{
|
|
7
|
-
localize(model: any, transformer: ITransformer<any, any>, uow: UnitOfWork<any, any>, matchingElement: Element): string | Partial<HTMLDataElement> | Partial<HTMLTimeElement> | undefined;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface Localizer extends HTMLElement, LocalizerProps, LocalizerMethods {}
|
|
11
|
-
|
|
12
|
-
export type LocalizerType = {new(): Localizer & Mount }
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import {UnitOfWork, ITransformer, RHS, ToTransformer, XForm} from '../../types';
|
|
2
|
-
|
|
3
|
-
export interface TemplMgmtProps<MCProps extends Partial<HTMLElement> = HTMLElement, MCMethods = MCProps>{
|
|
4
|
-
mainTemplate?: HTMLTemplateElement | string;
|
|
5
|
-
unsafeTCount: number;
|
|
6
|
-
styles?: CSSStyleSheet[] | string;
|
|
7
|
-
clonedTemplate?: Node | undefined;
|
|
8
|
-
shadowRootMode?: 'open' | 'closed' | undefined | false;
|
|
9
|
-
//xform: Partial<{[key: string]: RHS<any, any>}>,
|
|
10
|
-
/**
|
|
11
|
-
* transform within ShadowRoot if applicable
|
|
12
|
-
*/
|
|
13
|
-
xform: XForm<any, any, any>,
|
|
14
|
-
/**
|
|
15
|
-
* transform applied to light children, if applicable
|
|
16
|
-
* Use ":root" to match on the root element
|
|
17
|
-
*/
|
|
18
|
-
lcXform: XForm<any, any>,
|
|
19
|
-
xformImpl?: () => Promise<ToTransformer<MCProps, MCMethods>>,
|
|
20
|
-
skipTemplateClone?: boolean;
|
|
21
|
-
//homeInOn?: Partial<{[key in keyof MCProps]: Partial<{[key: string]: RHS<MCProps, MCMethods>}>}>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export interface TemplMgmtActions{
|
|
26
|
-
doTransforms(self: this): void;
|
|
27
|
-
cloneTemplate(self: this): void;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface TemplMgmtBase extends HTMLElement, TemplMgmtProps, TemplMgmtActions{}
|
|
31
|
-
|
|
32
|
-
// export interface LocalizerProps {
|
|
33
|
-
|
|
34
|
-
// }
|
|
35
|
-
// export interface LocalizerMethods{
|
|
36
|
-
// localize(model: any, transformer: ITransformer<any, any>, uow: UnitOfWork<any, any>, matchingElement: Element): string | Partial<HTMLDataElement> | Partial<HTMLTimeElement> | undefined;
|
|
37
|
-
// }
|
|
38
|
-
|
|
39
|
-
// export interface Localizer extends HTMLElement, LocalizerProps, LocalizerMethods {}
|
|
40
|
-
|
|
41
|
-
// export type LocalizerType = {new(): Localizer }
|
|
42
|
-
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Scope } from "../types";
|
|
2
|
-
|
|
3
|
-
export type ElTypes = '$' | '#' | '@' | '/' | '-' | '|' | '%' | '~';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export interface ElO {
|
|
7
|
-
/**
|
|
8
|
-
* User of the name "prop" is a bit loose. It is really a kind of identifier that
|
|
9
|
-
* **may** map to a prop, but it will typically not will map to an actual prop of the
|
|
10
|
-
* observed element, but rather to some property of a view model of the hosting element
|
|
11
|
-
* or of a peer, non-visual "web component as a service" sitting somewhere inside the Shadow
|
|
12
|
-
* DOM scope.
|
|
13
|
-
*/
|
|
14
|
-
prop?: string,
|
|
15
|
-
subProp?: string,
|
|
16
|
-
elType?: ElTypes,
|
|
17
|
-
perimeter?: string,
|
|
18
|
-
event?: string,
|
|
19
|
-
//TODO
|
|
20
|
-
floor?: string,
|
|
21
|
-
marker?: string,
|
|
22
|
-
scope?: Scope,
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface RegExpExt<TStatementGroup = any>{
|
|
26
|
-
regExp: RegExp | string,
|
|
27
|
-
defaultVals: Partial<TStatementGroup>,
|
|
28
|
-
dssKeys?: [string, string][],
|
|
29
|
-
dssArrayKeys?: [string, string][],
|
|
30
|
-
statementPartParser?: StatementPartParser,
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface StatementPartParser {
|
|
35
|
-
splitWord: string,
|
|
36
|
-
propMap: {[key: string]: Array<RegExpExt>},
|
|
37
|
-
parsedRegExps?: boolean,
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export type RegExpOrRegExpExt<TStatementGroup = any> = RegExp | RegExpExt<TStatementGroup>;
|