mount-observer 0.0.39 → 0.0.41
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/MountObserver.js +50 -3
- package/MountObserver.ts +52 -7
- package/README.md +82 -13
- package/package.json +2 -2
- package/ts-refs/be-a-beacon/types.d.ts +3 -2
- package/ts-refs/be-alit/types.d.ts +1 -0
- package/ts-refs/be-based/types.d.ts +32 -0
- package/ts-refs/be-bound/types.d.ts +0 -3
- package/ts-refs/be-buttoned-up/types.d.ts +21 -0
- package/ts-refs/be-calculating/types.d.ts +4 -0
- package/ts-refs/be-clonable/types.d.ts +28 -0
- package/ts-refs/be-delible/types.d.ts +26 -0
- package/ts-refs/be-elevating/types.d.ts +55 -0
- package/ts-refs/be-eventing/types.d.ts +27 -0
- package/ts-refs/be-formalizing/types.d.ts +29 -0
- package/ts-refs/be-formidable/types.d.ts +64 -0
- package/ts-refs/be-kvetching/types.d.ts +24 -0
- package/ts-refs/be-literate/types.d.ts +10 -2
- package/ts-refs/be-mediating/types.d.ts +34 -0
- package/ts-refs/be-methodical/types.d.ts +20 -0
- package/ts-refs/be-modding/types.d.ts +18 -0
- package/ts-refs/{be-observant → be-observing}/types.d.ts +7 -4
- package/ts-refs/be-parsed/types.d.ts +19 -0
- package/ts-refs/be-persistent/types.d.ts +66 -0
- package/ts-refs/be-reformable/types.d.ts +48 -0
- package/ts-refs/be-render-neutral/types.d.ts +29 -0
- package/ts-refs/be-switched/types.d.ts +25 -19
- package/ts-refs/be-typed/types.d.ts +36 -0
- package/ts-refs/be-written/types.d.ts +37 -0
- package/ts-refs/for-fetch/types.d.ts +175 -0
- package/ts-refs/mount-observer/types.d.ts +6 -1
- package/ts-refs/trans-render/XV/types.d.ts +69 -0
- package/ts-refs/trans-render/asmr/types.d.ts +130 -0
- package/ts-refs/trans-render/be/types.d.ts +188 -0
- package/ts-refs/trans-render/dss/types.d.ts +159 -0
- package/ts-refs/trans-render/froop/types.d.ts +451 -0
- package/ts-refs/trans-render/funions/types.d.ts +12 -0
- package/ts-refs/trans-render/lib/mixins/types.d.ts +42 -0
- package/ts-refs/trans-render/lib/prs/types.d.ts +39 -0
- package/ts-refs/trans-render/lib/types.d.ts +489 -0
- package/ts-refs/trans-render/types.d.ts +14 -2
- package/ts-refs/xtal-element/types.d.ts +42 -0
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
import {RHS, ToTransformer} from '../types';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export type matchTypes = 'parts'| 'part' | 'id' | 'classes' | 'class' | 'attribs' | 'attrib' | 'elements' | 'element' | 'names' | 'name' | 'props' | 'placeholders';
|
|
5
|
+
|
|
6
|
+
export interface QueryInfo{
|
|
7
|
+
query: string;
|
|
8
|
+
match: string;
|
|
9
|
+
attrib?: string;
|
|
10
|
+
lhsProp?: string;
|
|
11
|
+
first?: boolean;
|
|
12
|
+
verb?: string;
|
|
13
|
+
havingAlso?: QueryInfo[];
|
|
14
|
+
havingInner?: QueryInfo;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
export type PropSettings<T extends Partial<HTMLElement> = HTMLElement, HostProps = any> = {
|
|
19
|
+
[P in keyof T]?: keyof HostProps;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type EventSettings = {[key: string] : ((e: Event) => void) | string | INotify};
|
|
23
|
+
|
|
24
|
+
export interface IMinimalNotify{
|
|
25
|
+
|
|
26
|
+
nudge?: boolean;
|
|
27
|
+
|
|
28
|
+
debug?: boolean;
|
|
29
|
+
|
|
30
|
+
eventListenerOptions?: boolean | AddEventListenerOptions | undefined;
|
|
31
|
+
|
|
32
|
+
doInit?: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface IDIYNotify extends IMinimalNotify{
|
|
36
|
+
doOnly?: (target: Element, key: string, mn: IMinimalNotify, e?: Event) => void;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface IValFromEventInstructions<TSelf = any, TProps = any, TActions = TProps> {
|
|
40
|
+
/**
|
|
41
|
+
* Hardcoded value to set on recipient element.
|
|
42
|
+
*/
|
|
43
|
+
val?: any
|
|
44
|
+
/**
|
|
45
|
+
* path to get value from target
|
|
46
|
+
*/
|
|
47
|
+
valFromTarget?: keyof TSelf;
|
|
48
|
+
/**
|
|
49
|
+
* path to get value from target
|
|
50
|
+
*/
|
|
51
|
+
vft?: keyof TSelf | `${keyof TSelf & string}.${string}`;
|
|
52
|
+
/**
|
|
53
|
+
* path to get value from event
|
|
54
|
+
*/
|
|
55
|
+
valFromEvent?: string;
|
|
56
|
+
/**
|
|
57
|
+
* path to get value from event
|
|
58
|
+
*/
|
|
59
|
+
vfe?: string;
|
|
60
|
+
|
|
61
|
+
propName?: string;
|
|
62
|
+
|
|
63
|
+
clone?: boolean;
|
|
64
|
+
|
|
65
|
+
parseValAs?: 'int' | 'float' | 'bool' | 'date' | 'truthy' | 'falsy' | undefined | 'string' | 'object';
|
|
66
|
+
|
|
67
|
+
trueVal?: any;
|
|
68
|
+
|
|
69
|
+
falseVal?: any;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
export interface INotify<TSelf = any, TProps = any, TActions = TProps> extends IMinimalNotify, IValFromEventInstructions<TSelf, TProps, TActions>{
|
|
74
|
+
|
|
75
|
+
navTo?: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Pass property or invoke fn onto custom or built-in element hosting the contents of p-u element.
|
|
79
|
+
*/
|
|
80
|
+
//toHost: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Id of Dom Element. Uses import-like syntax:
|
|
83
|
+
* ./my-id searches for #my-id within ShadowDOM realm of instance.
|
|
84
|
+
* ../my-id searches for #my-id one ShadowDOM level up.
|
|
85
|
+
* /my-id searches from outside any ShadowDOM.
|
|
86
|
+
* @attr
|
|
87
|
+
*/
|
|
88
|
+
toUpShadow?: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* abbrev of toUpShadow
|
|
92
|
+
*/
|
|
93
|
+
to?: string
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Pass property or invoke fn onto itself
|
|
97
|
+
*/
|
|
98
|
+
toSelf?: boolean;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Pass property to the nearest previous sibling / ancestor element matching this css pattern, using .previousElement(s)/.parentElement.matches method.
|
|
102
|
+
* Does not pass outside ShadowDOM realm.
|
|
103
|
+
*/
|
|
104
|
+
toNearestUpMatch?: string;
|
|
105
|
+
|
|
106
|
+
toClosest?: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* to closest or host ("itemscope" attribute or shadow DOM boundary)
|
|
110
|
+
*/
|
|
111
|
+
tocoho?: boolean | string; //to closest or host
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Name of property to set on matching (upstream) element.
|
|
115
|
+
* @attr
|
|
116
|
+
*/
|
|
117
|
+
prop?: keyof TProps & string;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Name of method or property arrow function to invoke on matching (upstream) element.
|
|
121
|
+
*/
|
|
122
|
+
fn?: keyof TActions & string;
|
|
123
|
+
|
|
124
|
+
dispatch?: string;
|
|
125
|
+
|
|
126
|
+
withArgs?: ('self' | 'val' | 'event')[];
|
|
127
|
+
|
|
128
|
+
plusEq?: boolean | string | number;
|
|
129
|
+
|
|
130
|
+
eqConst?: any;
|
|
131
|
+
|
|
132
|
+
toggleProp?: boolean;
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
as?: 'str-attr' | 'bool-attr' | 'obj-attr',
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
thenDo?: (target: Element, key: string, n: INotify, e?: Event) => void;
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface INotifyHookupInfo{
|
|
148
|
+
controller: AbortController;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface IConditional<MCProps extends Partial<HTMLElement> = HTMLElement>{
|
|
152
|
+
/**
|
|
153
|
+
* Name of property to check if truthy
|
|
154
|
+
*/
|
|
155
|
+
if?: keyof MCProps;
|
|
156
|
+
/**
|
|
157
|
+
* If condition value
|
|
158
|
+
*/
|
|
159
|
+
ifVal?: boolean;
|
|
160
|
+
lhs?: string;
|
|
161
|
+
lhsVal?: any;
|
|
162
|
+
rhs?: string;
|
|
163
|
+
rhsVal?: any;
|
|
164
|
+
op?: '==' | '!=' | '>' | '<' | '>=' | '<=' | '===' | '!==' | undefined;
|
|
165
|
+
}
|
|
166
|
+
export type AttribsSettings = { [key: string]: string | boolean | number | undefined | null | string[]};
|
|
167
|
+
export type PSettings<T extends Partial<HTMLElement> = HTMLElement, HostProps = any> = [PropSettings<T, HostProps> | undefined];
|
|
168
|
+
export type PESettings<T extends Partial<HTMLElement> = HTMLElement> = [props: PropSettings<T> | undefined, on: EventSettings | undefined];
|
|
169
|
+
export type PEUnionSettings<T extends Partial<HTMLElement> = HTMLElement> = PSettings<T> | PESettings<T>;
|
|
170
|
+
export type PEASettings<T extends Partial<HTMLElement> = HTMLElement> =
|
|
171
|
+
[props: PropSettings<T> | undefined, events: EventSettings | undefined, attribs: AttribsSettings | undefined];
|
|
172
|
+
export type PEAUnionSettings<T extends Partial<HTMLElement> = HTMLElement> = PEUnionSettings<T> | PEASettings<T>;
|
|
173
|
+
|
|
174
|
+
export type ConditionalSettings<T extends Partial<HTMLElement> = HTMLElement> =
|
|
175
|
+
[boolean, IConditional<T>, ...any]
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
export interface TRElementProps {
|
|
179
|
+
propChangeQueue?: Set<string>;
|
|
180
|
+
inReflectMode?: boolean;
|
|
181
|
+
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface TRElementActions{
|
|
185
|
+
attachQR(): void;
|
|
186
|
+
detachQR(): void;
|
|
187
|
+
attributeChangedCallback?(n: string, ov: string, nv: string): void;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
// export interface Transform<TMixinComposite = any> extends LogicOp<TMixinComposite>{
|
|
198
|
+
// match: {[key: string]: MatchRHS<TMixinComposite>}
|
|
199
|
+
// }
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
export type MatchRHS<TMixinComposite = any> = string;
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
export interface HasPropChangeQueue{
|
|
209
|
+
propChangeQueue: Set<string> | undefined;
|
|
210
|
+
QR: undefined | ((name: string, self: HasPropChangeQueue) => void);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
export interface ProxyPropChangeInfo{
|
|
216
|
+
oldVal: any,
|
|
217
|
+
newVal: any,
|
|
218
|
+
prop: string
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
export interface ITSChecker{
|
|
225
|
+
notChanged(host: Element, fragment: Element | DocumentFragment): boolean;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
export type TargetTuple =
|
|
231
|
+
/**
|
|
232
|
+
* Use the native .closest() function to get the target
|
|
233
|
+
*/
|
|
234
|
+
| ['closest', string]
|
|
235
|
+
/**
|
|
236
|
+
* abbrev for closet
|
|
237
|
+
*/
|
|
238
|
+
| ['c', string]
|
|
239
|
+
/**
|
|
240
|
+
* Find nearest previous sibling, parent, previous sibling of parent, etc that matches this string.
|
|
241
|
+
*/
|
|
242
|
+
| ['upSearch', string]
|
|
243
|
+
/**
|
|
244
|
+
* abbrev for upSearch
|
|
245
|
+
*/
|
|
246
|
+
| ['us', string]
|
|
247
|
+
/**
|
|
248
|
+
* Tries .closest([string value]).
|
|
249
|
+
* If that comes out to null, do .getRootNode().host
|
|
250
|
+
*/
|
|
251
|
+
| ['closestOrHost', string]
|
|
252
|
+
/**
|
|
253
|
+
* abbrev for closestOrHost
|
|
254
|
+
*/
|
|
255
|
+
| ['coh', string]
|
|
256
|
+
/**
|
|
257
|
+
* Find nearest previous element sibling that matches this string
|
|
258
|
+
*/
|
|
259
|
+
| ['previous', string]
|
|
260
|
+
/**
|
|
261
|
+
* Find first element matching string within root node.
|
|
262
|
+
*/
|
|
263
|
+
| ['withinRootNode', string]
|
|
264
|
+
/**
|
|
265
|
+
* abbrev for withinRootNode
|
|
266
|
+
*/
|
|
267
|
+
| ['wrn', string]
|
|
268
|
+
/**
|
|
269
|
+
* hostish
|
|
270
|
+
*/
|
|
271
|
+
| ['h', (boolean | string)?, boolean?]
|
|
272
|
+
| ['hostish', (boolean | string)?, boolean?]
|
|
273
|
+
/**
|
|
274
|
+
* Find first element matching string within itemscope.
|
|
275
|
+
*/
|
|
276
|
+
| ['withinItemScope', string, boolean?]
|
|
277
|
+
/**
|
|
278
|
+
* abbrev for within item scope
|
|
279
|
+
*/
|
|
280
|
+
| ['wis', string, boolean?]
|
|
281
|
+
| ['within', string, string]
|
|
282
|
+
| ['wi', string, string]
|
|
283
|
+
/**
|
|
284
|
+
* First first element matching string within form.
|
|
285
|
+
*/
|
|
286
|
+
| ['withinForm', string]
|
|
287
|
+
/**
|
|
288
|
+
* abbrev for within form
|
|
289
|
+
*/
|
|
290
|
+
| ['wf', string]
|
|
291
|
+
|
|
292
|
+
;
|
|
293
|
+
/**
|
|
294
|
+
* Target selector in upward direction.
|
|
295
|
+
*/
|
|
296
|
+
export type Target =
|
|
297
|
+
| TargetTuple
|
|
298
|
+
/**
|
|
299
|
+
* Use the parent element as the target
|
|
300
|
+
*/
|
|
301
|
+
| 'parent'
|
|
302
|
+
/**
|
|
303
|
+
* abbrev for parent
|
|
304
|
+
*/
|
|
305
|
+
| 'p'
|
|
306
|
+
/**
|
|
307
|
+
* Use the previous element sibling as the target.
|
|
308
|
+
*/
|
|
309
|
+
| 'previousElementSibling'
|
|
310
|
+
/**
|
|
311
|
+
* abbrev for previous element sibling.
|
|
312
|
+
*/
|
|
313
|
+
| 'pes'
|
|
314
|
+
/**
|
|
315
|
+
* Search previous element siblings for target that matches the query.
|
|
316
|
+
*/
|
|
317
|
+
| `previous${camelQry}` |
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Use the parent as the target. If no parent, use root node.
|
|
321
|
+
*/
|
|
322
|
+
'parentOrRootNode' |
|
|
323
|
+
/**
|
|
324
|
+
* abbrev for parent or root node
|
|
325
|
+
*/
|
|
326
|
+
'porn' |
|
|
327
|
+
/**
|
|
328
|
+
* Do "closest" for element with "-"" in the name. If non found, get host of getRootNode()
|
|
329
|
+
*/
|
|
330
|
+
'hostish' |
|
|
331
|
+
/**
|
|
332
|
+
* Use the element itself as the target
|
|
333
|
+
*/
|
|
334
|
+
'self' |
|
|
335
|
+
/**
|
|
336
|
+
* abbrev for self
|
|
337
|
+
*/
|
|
338
|
+
's' |
|
|
339
|
+
`closest${camelQry}` |
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* [TODO]
|
|
343
|
+
* do upsearch for matching itemref
|
|
344
|
+
*/
|
|
345
|
+
'nearestScope' |
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Find nearest previous sibling, parent, previous sibling of parent, etc that matches this string.
|
|
350
|
+
*/
|
|
351
|
+
`upSearchFor${camelQry}` |
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Tries .closest matching string. If that's null, does .getRootNode().host
|
|
357
|
+
*/
|
|
358
|
+
`closest${camelQry}OrHost` |
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Searches for first element within the rootNode that matches the camelQry.
|
|
362
|
+
*/
|
|
363
|
+
`${camelQry}WithinRootNode` |
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* get host
|
|
368
|
+
*/
|
|
369
|
+
'host' |
|
|
370
|
+
/**
|
|
371
|
+
* abbrev for host
|
|
372
|
+
*/
|
|
373
|
+
'h'
|
|
374
|
+
;
|
|
375
|
+
|
|
376
|
+
export type ScopeTuple = TargetTuple
|
|
377
|
+
/**
|
|
378
|
+
* Similar to closestOrHost, but just get the root fragment via getRootNode()
|
|
379
|
+
*/
|
|
380
|
+
| ['closestOrRootNode', string]
|
|
381
|
+
/**
|
|
382
|
+
* abbrev for closestOrRootNode
|
|
383
|
+
*/
|
|
384
|
+
| ['corn', string]
|
|
385
|
+
;
|
|
386
|
+
/**
|
|
387
|
+
* Outer boundary for transformation
|
|
388
|
+
*/
|
|
389
|
+
export type Scope = Target | ScopeTuple |
|
|
390
|
+
/**
|
|
391
|
+
* use native function getRootNode() to set the target
|
|
392
|
+
*
|
|
393
|
+
*/
|
|
394
|
+
'rootNode' |
|
|
395
|
+
/**
|
|
396
|
+
* abbrev for rootNode
|
|
397
|
+
*/
|
|
398
|
+
'rn' |
|
|
399
|
+
`closest${camelQry}OrRootNode` |
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
'shadowDOM' |
|
|
403
|
+
/**
|
|
404
|
+
* abbrev for shadow DOM
|
|
405
|
+
*/
|
|
406
|
+
'sd'
|
|
407
|
+
|
|
408
|
+
;
|
|
409
|
+
|
|
410
|
+
//https://stackoverflow.com/questions/38123222/proper-way-to-declare-json-object-in-typescript
|
|
411
|
+
type JSONValue =
|
|
412
|
+
| string
|
|
413
|
+
| number
|
|
414
|
+
| boolean
|
|
415
|
+
| null
|
|
416
|
+
| JSONValue[]
|
|
417
|
+
| {[key: string]: JSONValue}
|
|
418
|
+
|
|
419
|
+
interface JSONObject {
|
|
420
|
+
[k: string]: JSONValue
|
|
421
|
+
}
|
|
422
|
+
interface JSONArray extends Array<JSONValue> {}
|
|
423
|
+
|
|
424
|
+
export interface getValArg {
|
|
425
|
+
host?: any;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
export type keyOfCtxNavElement = keyof ICTXNavElement & string;
|
|
431
|
+
|
|
432
|
+
export type keyofICTXCamelQryPrompt = `${keyof ICTXCamelQryPrompt & string}.${camelQry}`;
|
|
433
|
+
|
|
434
|
+
export type keyofCTXNavRecursive = (keyof ICTXNavRecursive & string) | keyofICTXCamelQryPrompt;
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
export type AffectOptions =
|
|
439
|
+
`${keyOfCtxNavElement}`
|
|
440
|
+
| `${keyofCTXNavRecursive}`
|
|
441
|
+
| `${keyofCTXNavRecursive}.${keyofCTXNavRecursive}`
|
|
442
|
+
//| `${keyofCTXNavRecursive}.${keyofCTXNavRecursive}.${keyofCTXNavRecursive}`
|
|
443
|
+
// | `${keyofCTXNavRecursive}.${keyofCTXNavRecursive}.${keyofCTXNavRecursive}.${keyofCTXNavRecursive}`
|
|
444
|
+
|
|
445
|
+
;
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
export interface ICTXNavRecursive<T = any>{
|
|
450
|
+
$?: T;
|
|
451
|
+
hostCtx?: T;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* E = element
|
|
456
|
+
* P = part
|
|
457
|
+
* C = class
|
|
458
|
+
* I = itemscope
|
|
459
|
+
* A = attribute
|
|
460
|
+
* N = name
|
|
461
|
+
*/
|
|
462
|
+
export type camelQry = `${string}E` | `${string}P` | `${string}C` | `${string}Id` | `${string}I` | `${string}A` | `${string}N` | `${string}M`;
|
|
463
|
+
|
|
464
|
+
export interface ExpectedCamelQry<T = any>{
|
|
465
|
+
[key: camelQry] : ICtxNav<T>
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export interface ICTXNavElement{
|
|
469
|
+
self?: Element;
|
|
470
|
+
host?: Element;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
export interface ICTXCamelQryPrompt<T = any>{
|
|
474
|
+
ancestor?: ExpectedCamelQry<T>;
|
|
475
|
+
elder?: ExpectedCamelQry<T>;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export interface ICtxNav<T = any> extends ICTXNavRecursive<T>, ICTXNavElement, ICTXCamelQryPrompt<T> {
|
|
479
|
+
beScoped?: EventTarget;
|
|
480
|
+
|
|
481
|
+
xtalState(): Promise<EventTarget | undefined>;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
export type ConvertOptions = 'bool' | 'int' | 'float' | 'date' | 'truthy' | 'falsy' | 'string' | 'object' | 'regExp' | 'number';
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
@@ -60,6 +60,7 @@ export interface TransformOptions{
|
|
|
60
60
|
propagator?: MarkedUpEventTarget,
|
|
61
61
|
propagatorIsReady?: boolean,
|
|
62
62
|
skipInit?: boolean,
|
|
63
|
+
useViewTransition?: boolean,
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
export type Derivative<TProps, TMethods, TElement = {}> =
|
|
@@ -170,7 +171,10 @@ export interface CrossProduct<TProps, TMethods> {
|
|
|
170
171
|
|
|
171
172
|
export interface ForEach<TProps, TMethods, TElement = {}>{
|
|
172
173
|
each?: 0,
|
|
174
|
+
/** css query to locate the template */
|
|
173
175
|
clone?: string,
|
|
176
|
+
/** within scope for locating the template */
|
|
177
|
+
wi?: 'node' | 'rootNode' | 'upShadowSearch'
|
|
174
178
|
indexProp?: string,
|
|
175
179
|
xform: XForm<TProps, TMethods, TElement> & Info,
|
|
176
180
|
appendTo?: string,
|
|
@@ -464,11 +468,19 @@ export interface MntCfg<TProps = any, TActions = TProps, ETProps = TProps> exten
|
|
|
464
468
|
*/
|
|
465
469
|
lcXform?: XForm<TProps, TActions>,
|
|
466
470
|
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* transforms within ShadowRoot if applicable that uses view transitions
|
|
474
|
+
*/
|
|
475
|
+
xxform?: XForm<TProps, TActions>
|
|
476
|
+
|
|
467
477
|
styles?: /*CSSStyleSheet[] |*/ string | string[] | CSSStyleSheet | Array<CSSStyleSheet>;
|
|
468
478
|
|
|
469
479
|
shadowRootInit?: ShadowRootInit,
|
|
470
480
|
|
|
471
|
-
assumeCSR?: boolean
|
|
481
|
+
assumeCSR?: boolean,
|
|
482
|
+
|
|
483
|
+
|
|
472
484
|
}
|
|
473
485
|
|
|
474
486
|
export interface MountProps<TProps = any, TActions = TProps, ETProps = TProps>{
|
|
@@ -477,7 +489,7 @@ export interface MountProps<TProps = any, TActions = TProps, ETProps = TProps>{
|
|
|
477
489
|
readonly hydrated?: boolean;
|
|
478
490
|
readonly csr?: boolean;
|
|
479
491
|
readonly xform?: XForm<TProps, TActions>,
|
|
480
|
-
|
|
492
|
+
readonly xxform?: XForm<TProps, TActions>,
|
|
481
493
|
}
|
|
482
494
|
export type PMP<TProps = any, TActions = TProps, ETProps = TProps> = Partial<MountProps<TProps, TActions, ETProps>>;
|
|
483
495
|
export type ProPMP<TProps = any, TActions = TProps, ETProps = TProps> = Promise<PMP<TProps, TActions, ETProps>>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { XForm } from "trans-render/types";
|
|
2
|
+
import { PropInfo, Actions } from 'trans-render/froop/types';
|
|
3
|
+
import {Scope} from 'trans-render/lib/types';
|
|
4
|
+
|
|
5
|
+
export interface PropInferenceCriteria{
|
|
6
|
+
cssSelector: string,
|
|
7
|
+
attrForProp: string,
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface EndUserProps<TProps = any, TActions = TProps> {
|
|
12
|
+
aka?: string,
|
|
13
|
+
inferProps?: boolean,
|
|
14
|
+
xform?: XForm<TProps, TActions>,
|
|
15
|
+
lcXform?: XForm<TProps, TActions>,
|
|
16
|
+
shadowRootMode?: ShadowRootMode,
|
|
17
|
+
propDefaults?: Partial<TProps>,
|
|
18
|
+
propInfo: Partial<{[key in keyof TProps]: PropInfo}>,
|
|
19
|
+
compacts: Compacts<TProps, TActions>,
|
|
20
|
+
targetScope?: Scope,
|
|
21
|
+
assumeCSR?: boolean,
|
|
22
|
+
propInferenceCriteria?: Array<PropInferenceCriteria>,
|
|
23
|
+
inherits?: string | {new(): HTMLElement} | (() => Promise<{new(): HTMLElement}>),
|
|
24
|
+
actions?: Actions<TProps, TActions>,
|
|
25
|
+
/**
|
|
26
|
+
* form associated
|
|
27
|
+
*/
|
|
28
|
+
fa?: boolean,
|
|
29
|
+
mainTemplate?: string | HTMLTemplateElement
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface AP<TProps = any, TActions = TProps> extends EndUserProps<TProps, TActions>{
|
|
33
|
+
mainTemplate?: HTMLTemplateElement,
|
|
34
|
+
styles?: string,
|
|
35
|
+
}
|
|
36
|
+
export type ProAP = Promise<AP>
|
|
37
|
+
|
|
38
|
+
export interface Actions {
|
|
39
|
+
getTemplate(self: this): ProAP,
|
|
40
|
+
define(self: this): ProAP,
|
|
41
|
+
}
|
|
42
|
+
|