mount-observer 0.0.112 → 0.1.1
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 +62 -26
- package/Events.ts +52 -30
- package/MountObserver.js +285 -514
- package/MountObserver.ts +362 -538
- package/README.md +149 -56
- package/SharedMutationObserver.js +70 -0
- package/SharedMutationObserver.ts +96 -0
- package/attrCoordinates.js +93 -0
- package/attrCoordinates.ts +122 -0
- package/index.js +3 -0
- package/index.ts +22 -0
- package/loadImports.js +47 -0
- package/loadImports.ts +56 -0
- package/mediaQuery.js +86 -0
- package/mediaQuery.ts +113 -0
- package/package.json +11 -119
- package/playwright.config.ts +0 -1
- package/types.d.ts +104 -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 -24
- 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 -198
- 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,83 +0,0 @@
|
|
|
1
|
-
import { JSONObject } from '../trans-render/lib/types';
|
|
2
|
-
import { Specifier } from '../trans-render/dss/types';
|
|
3
|
-
import { URLBuilder } from '../../URLBuilder';
|
|
4
|
-
import {SimpleWCInfo} from '../wc-info/SimpleWCInfo';
|
|
5
|
-
import {EndUserProps} from './doc';
|
|
6
|
-
export {EndUserProps} from './doc';
|
|
7
|
-
|
|
8
|
-
declare class WeakRef<TProps = any>{}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export interface OverridableGetters{
|
|
12
|
-
//request$: RequestInit,
|
|
13
|
-
//accept$?: string,
|
|
14
|
-
value?: any,
|
|
15
|
-
//isAttrParsed?: boolean,
|
|
16
|
-
targetSelf?: boolean
|
|
17
|
-
targetSpecifier?: Specifier
|
|
18
|
-
whenCount?: number,
|
|
19
|
-
nextWhenCount?: number,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export type EventName = string;
|
|
25
|
-
|
|
26
|
-
export interface AllProps extends EndUserProps, OverridableGetters{
|
|
27
|
-
|
|
28
|
-
readonly resolvedTarget?: Element | null,
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @readonly
|
|
32
|
-
* Weak references to input elements
|
|
33
|
-
*/
|
|
34
|
-
readonly forRefs: Map<string, [WeakRef<HTMLInputElement>, EventName]>,
|
|
35
|
-
readonly formData?: FormData,
|
|
36
|
-
readonly formRef?: WeakRef<HTMLFormElement>,
|
|
37
|
-
readonly formSpecifier?: Specifier,
|
|
38
|
-
readonly urlBuilder?: URLBuilder,
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export type PAP = Partial<AllProps>;
|
|
42
|
-
|
|
43
|
-
export type ProPP = Promise<PAP>;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* methods for fetch-for
|
|
48
|
-
*/
|
|
49
|
-
export interface Methods extends Actions{
|
|
50
|
-
validateResp(resp: Response): boolean,
|
|
51
|
-
validateOn(): boolean,
|
|
52
|
-
setTargetProp(target: Element | null, data: any, shadow?: ShadowRootMode): void,
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface Actions{
|
|
56
|
-
do(self: this): Promise<void>;
|
|
57
|
-
bindSrc(self)
|
|
58
|
-
parseFor(self: this): ProPP;
|
|
59
|
-
parseTarget(self: this): ProPP;
|
|
60
|
-
// listenForInput(self: this): ProPP;
|
|
61
|
-
// doInitialLoad(self: this): ProPP;
|
|
62
|
-
initializeWhen(self: this): Promise<PAP | undefined>;
|
|
63
|
-
// onForm(self: this): ProPP;
|
|
64
|
-
// onFormSpecifier(self: this): ProPP;
|
|
65
|
-
// onFormRef(self: this): Promise<void>,
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// https://github.com/webcomponents-cg/community-protocols/issues/12#issuecomment-872415080
|
|
69
|
-
export type loadEventName = 'load';
|
|
70
|
-
export type inputEventName = 'input';
|
|
71
|
-
export type selectionChangeEventName = 'select';
|
|
72
|
-
|
|
73
|
-
export interface EventForFetch {
|
|
74
|
-
href?: string;
|
|
75
|
-
trigger?: Element,
|
|
76
|
-
forData: ForData,
|
|
77
|
-
formData: FormData,
|
|
78
|
-
body?: string | JSONObject
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export type ForData = {[key: string]: HTMLInputElement}
|
|
82
|
-
|
|
83
|
-
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export interface JSONSerializableMountInit{
|
|
3
|
-
readonly on?: CSSMatch,
|
|
4
|
-
readonly outside?: CSSMatch,
|
|
5
|
-
readonly observedAttrsWhenMounted?: (string | ObservedSourceOfTruthAttribute)[],
|
|
6
|
-
readonly whereAttr?: WhereAttr,
|
|
7
|
-
readonly whereElementIntersectsWith?: IntersectionObserverInit,
|
|
8
|
-
readonly whereMediaMatches?: MediaQuery,
|
|
9
|
-
readonly import?: ImportString | [ImportString, ImportAssertions] | PipelineProcessor,
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface ObservedSourceOfTruthAttribute<TProps = any> {
|
|
14
|
-
name: string,
|
|
15
|
-
mapsTo?: keyof TProps & string,
|
|
16
|
-
valIfNull?: any,
|
|
17
|
-
valIfFalsy?: any,
|
|
18
|
-
instanceOf?: any,
|
|
19
|
-
customParser?: (newValue: string | null, oldValue: string | null, instance: Element) => any
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export type Assigner = (target: any, source: any) => Promise<void> | void;
|
|
23
|
-
|
|
24
|
-
export interface MountInit extends JSONSerializableMountInit{
|
|
25
|
-
|
|
26
|
-
readonly withTargetShadowRoot?: ShadowRoot,
|
|
27
|
-
readonly whereInstanceOf?: Array<{new(): Element}>,
|
|
28
|
-
readonly whereSatisfies?: PipelineProcessor<boolean>,
|
|
29
|
-
readonly do?: MountObserverCallbacks,
|
|
30
|
-
readonly assigner?: Assigner,
|
|
31
|
-
readonly idleTimeout?: number
|
|
32
|
-
// /**
|
|
33
|
-
// * Purpose -- there are scenarios where we may only want to affect changes that occur after the initial
|
|
34
|
-
// * server rendering, so we only want to mount elements that appear
|
|
35
|
-
// */
|
|
36
|
-
// readonly ignoreInitialMatches?: boolean,
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface MountObserverOptions{
|
|
40
|
-
leaveBreadcrumb?: boolean,
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface MountObserverCallbacks{
|
|
44
|
-
readonly mount?: PipelineProcessor,
|
|
45
|
-
readonly dismount?: PipelineProcessor,
|
|
46
|
-
readonly disconnect?: PipelineProcessor,
|
|
47
|
-
readonly reconfirm?: PipelineProcessor,
|
|
48
|
-
readonly exit?: PipelineProcessor,
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface RootCnfg{
|
|
52
|
-
start: string,
|
|
53
|
-
context: 'BuiltIn' | 'CustomElement' | 'Both'
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
//export type RootAttrOptions = Array<string | RootCnfg>;
|
|
57
|
-
export type delimiter = string;
|
|
58
|
-
export interface WhereAttr{
|
|
59
|
-
|
|
60
|
-
hasBase?: string | [delimiter, string],
|
|
61
|
-
hasBranchIn?: Array<string> | [delimiter, Array<string>],
|
|
62
|
-
hasRootIn?: Array<RootCnfg>,
|
|
63
|
-
/**
|
|
64
|
-
* Used by consumers to track the universal meaning of this combination
|
|
65
|
-
* regardless of how the actual name values may be changed.
|
|
66
|
-
*/
|
|
67
|
-
metadata?: any,
|
|
68
|
-
}
|
|
69
|
-
type CSSMatch = string;
|
|
70
|
-
type ImportString = string;
|
|
71
|
-
type MediaQuery = string;
|
|
72
|
-
|
|
73
|
-
export interface AttribMatch{
|
|
74
|
-
names: string[],
|
|
75
|
-
//for boolean, support true/false/mixed
|
|
76
|
-
// type?: 'number' | 'string' | 'date' | 'json-object' | 'boolean',
|
|
77
|
-
// valConverter?: (s: string) => any,
|
|
78
|
-
// validator?: (v: any) => boolean;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface WeakDual<T extends Object>{
|
|
82
|
-
weakSet: WeakSet<T>,
|
|
83
|
-
setWeak: Set<WeakRef<T>>
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface IMountObserver extends EventTarget {
|
|
87
|
-
// readonly mountInit: MountInit,
|
|
88
|
-
// readonly mountedRefs: WeakRef<Element>[],
|
|
89
|
-
// readonly dismountedRefs: WeakRef<Element>[],
|
|
90
|
-
observe(within: Node): void;
|
|
91
|
-
disconnect(within: Node): void;
|
|
92
|
-
module?: any;
|
|
93
|
-
mountedElements: WeakDual<Element>;
|
|
94
|
-
readAttrs(match: Element, branchIndexes?: Set<number>) : AttrChangeInfo[];
|
|
95
|
-
observedAttrs(): Promise<Array<string> | undefined>;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export interface MountContext{
|
|
99
|
-
stage?: PipelineStage,
|
|
100
|
-
initializing?: boolean,
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
type PipelineStage = 'Inspecting' | 'PreImport' | 'PostImport' | 'Import'
|
|
104
|
-
export type PipelineProcessor<ReturnType = void> = (matchingElement: Element, observer: IMountObserver, ctx: MountContext) => Promise<ReturnType> | ReturnType;
|
|
105
|
-
|
|
106
|
-
//#region mutation event
|
|
107
|
-
export type mutationEventName = 'mutation-event';
|
|
108
|
-
export interface MutationEvent{
|
|
109
|
-
mutationRecords: Array<MutationRecord>
|
|
110
|
-
}
|
|
111
|
-
export type mutationEventHandler = (e: MutationEvent) => void;
|
|
112
|
-
|
|
113
|
-
export interface AddMutationEventListener {
|
|
114
|
-
addEventListener(eventName: mutationEventName, handler: mutationEventHandler, options?: AddEventListenerOptions): void;
|
|
115
|
-
}
|
|
116
|
-
//#endregion
|
|
117
|
-
|
|
118
|
-
interface AttrParts{
|
|
119
|
-
name: string,
|
|
120
|
-
root?: string,
|
|
121
|
-
base?: string,
|
|
122
|
-
branch?: string,
|
|
123
|
-
branchIdx: number,
|
|
124
|
-
leaf?: string, //TODO
|
|
125
|
-
leafIdx?: number, //TODO
|
|
126
|
-
rootCnfg?: RootCnfg,
|
|
127
|
-
metadata?: any,
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
interface AttrChangeInfo{
|
|
131
|
-
oldValue: string | null,
|
|
132
|
-
newValue: string | null,
|
|
133
|
-
isSOfTAttr: boolean,
|
|
134
|
-
idx?: number,
|
|
135
|
-
name: string,
|
|
136
|
-
parts?: AttrParts,
|
|
137
|
-
mapsTo?: string,
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
//#region mount event
|
|
141
|
-
export type mountEventName = 'mount';
|
|
142
|
-
export interface IMountEvent extends Event{
|
|
143
|
-
mountedElement: Element,
|
|
144
|
-
}
|
|
145
|
-
export type mountEventHandler = (e: IMountEvent) => void;
|
|
146
|
-
|
|
147
|
-
export interface AddMountEventListener {
|
|
148
|
-
addEventListener(eventName: mountEventName, handler: mountEventHandler, options?: AddEventListenerOptions): void;
|
|
149
|
-
}
|
|
150
|
-
//#endregion
|
|
151
|
-
|
|
152
|
-
//#region dismount event
|
|
153
|
-
export type dismountEventName = 'dismount';
|
|
154
|
-
export interface IDismountEvent {
|
|
155
|
-
dismountedElement: Element
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export type dismountEventHandler = (e: IDismountEvent) => void;
|
|
159
|
-
|
|
160
|
-
export interface AddDismountEventListener {
|
|
161
|
-
addEventListener(eventName: dismountEventName, handler: dismountEventHandler, options?: AddEventListenerOptions): void;
|
|
162
|
-
}
|
|
163
|
-
//#endregion
|
|
164
|
-
|
|
165
|
-
//#region disconnected event
|
|
166
|
-
export type disconnectedEventName = 'disconnect';
|
|
167
|
-
export interface IDisconnectEvent {
|
|
168
|
-
disconnectedElement: Element
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export type disconnectedEventHandler = (e: IDisconnectEvent) => void;
|
|
172
|
-
|
|
173
|
-
export interface AddDisconnectEventListener {
|
|
174
|
-
addEventListener(eventName: disconnectedEventName, handler: disconnectedEventHandler, options?: AddEventListenerOptions): void;
|
|
175
|
-
}
|
|
176
|
-
//endregion
|
|
177
|
-
|
|
178
|
-
//#region attribute change event
|
|
179
|
-
export type attrChangeEventName = 'attrChange';
|
|
180
|
-
export interface IAttrChangeEvent extends IMountEvent {
|
|
181
|
-
attrChangeInfos: Array<AttrChangeInfo>,
|
|
182
|
-
}
|
|
183
|
-
export type attrChangeEventHandler = (e: IAttrChangeEvent) => void;
|
|
184
|
-
export interface AddAttrChangeEventListener{
|
|
185
|
-
addEventListener(eventName: attrChangeEventName, handler: attrChangeEventHandler, options?: AddEventListenerOptions): void;
|
|
186
|
-
}
|
|
187
|
-
//#endregion
|
|
188
|
-
|
|
189
|
-
//#region load event
|
|
190
|
-
export type loadEventName = 'load';
|
|
191
|
-
export interface ILoadEvent {
|
|
192
|
-
clone: DocumentFragment
|
|
193
|
-
}
|
|
194
|
-
export type loadEventHandler = (e: ILoadEvent) => void;
|
|
195
|
-
export interface AddLoadEventListener{
|
|
196
|
-
addEventListener(eventName: loadEventName, handler: loadEventHandler, options?: AddEventListenerOptions): void
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
|
-
|
|
200
|
-
//#region MountObserver Script Element
|
|
201
|
-
export interface MOSEAddedProps<TSynConfig=any>{
|
|
202
|
-
init: JSONSerializableMountInit;
|
|
203
|
-
observer: IMountObserver;
|
|
204
|
-
do: MountObserverCallbacks;
|
|
205
|
-
synConfig: TSynConfig;
|
|
206
|
-
}
|
|
207
|
-
export interface MOSE<TSynConfig=any>
|
|
208
|
-
extends HTMLScriptElement, MOSEAddedProps<TSynConfig>{
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export interface BindishOptions{
|
|
213
|
-
assigner?: Assigner,
|
|
214
|
-
//waitFor?: string,
|
|
215
|
-
/**
|
|
216
|
-
* If derived from a template, set to true
|
|
217
|
-
* to indicate that the initial
|
|
218
|
-
*/
|
|
219
|
-
csr?: boolean,
|
|
220
|
-
ctr?: IshCtr,
|
|
221
|
-
initPropVals?: any,
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
//TODO: move to mount observer
|
|
225
|
-
export interface HasIsh {
|
|
226
|
-
ish: any;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
export interface Ishcycle{
|
|
230
|
-
'<mount>'?(self: Ishcycle, el: Element & HasIsh, options: BindishOptions): Promise<void>;
|
|
231
|
-
//'</dismount>'?(self: IshFace, el: Element): Promise<void>;
|
|
232
|
-
'<inScope>'?(self: Ishcycle, el: Element & HasIsh, options: BindishOptions): Promise<void>;
|
|
233
|
-
'arr=>'?(self: Ishcycle, arr: any[] | undefined, el: Element & HasIsh, options: BindishOptions): Promise<void | any[]>;
|
|
234
|
-
//'</outOfScope>'?(self: IshFace, el: Element): Promise<void>;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
export type IshCtr = ({new() : Ishcycle}) | (() => Promise<{new() : Ishcycle}>);
|
|
238
|
-
|
|
239
|
-
//#endregion
|
|
240
|
-
|
|
241
|
-
export type RefType = '#' | '!';
|
|
242
|
-
|
|
243
|
-
export interface TemplateWithRemoteContent extends HTMLTemplateElement {
|
|
244
|
-
remoteContent?: DocumentFragment,
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
package/ts-refs/mt-si/types.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {IEnhancement, BEAllProps} from '../trans-render/be/types';
|
|
2
|
-
|
|
3
|
-
export interface EndUserProps extends IEnhancement{
|
|
4
|
-
doEval: boolean;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface AllProps extends EndUserProps{
|
|
8
|
-
//enhKey: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export type AP = AllProps;
|
|
12
|
-
|
|
13
|
-
export type PAP = Partial<AP>;
|
|
14
|
-
|
|
15
|
-
export type ProPAP = Promise<PAP>;
|
|
16
|
-
|
|
17
|
-
export type BAP = AP & BEAllProps;
|
|
18
|
-
|
|
19
|
-
export interface Actions{
|
|
20
|
-
hydrate(self: BAP): ProPAP;
|
|
21
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import {IEnhancement, BEAllProps} from '../trans-render/be/types';
|
|
2
|
-
import { HasIshList } from '../trans-render/dss/types';
|
|
3
|
-
|
|
4
|
-
export interface EndUserProps extends IEnhancement{
|
|
5
|
-
each: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
mapIdxTo: string;
|
|
9
|
-
idxStart: number;
|
|
10
|
-
idleTimeout: number;
|
|
11
|
-
options: Partial<EndUserProps>;
|
|
12
|
-
// parsedStatements: Array<LoopingStatement>,
|
|
13
|
-
// rawStatements?: Array<string>,
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface AllProps extends EndUserProps{
|
|
17
|
-
listScope: string;
|
|
18
|
-
//itemProp: string;
|
|
19
|
-
itemScopes: Array<string>;
|
|
20
|
-
itemTemplates: Array<HTMLTemplateElement>;
|
|
21
|
-
emc: any;
|
|
22
|
-
//loopingParameters: Array<LoopingParameters>,
|
|
23
|
-
ish: any;
|
|
24
|
-
ishContainer: Element;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type AP = AllProps;
|
|
28
|
-
|
|
29
|
-
export type PAP = Partial<AP>;
|
|
30
|
-
|
|
31
|
-
export type ProPAP = Promise<PAP>;
|
|
32
|
-
|
|
33
|
-
export type BAP = AP & BEAllProps;
|
|
34
|
-
|
|
35
|
-
export interface Actions{
|
|
36
|
-
parse(self: BAP): PAP;
|
|
37
|
-
init(self: BAP): ProPAP;
|
|
38
|
-
hydrate(self: BAP)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// export interface LoopingStatement {
|
|
42
|
-
// listProp?: string;
|
|
43
|
-
// itemProp: string;
|
|
44
|
-
// }
|
|
45
|
-
|
|
46
|
-
// export interface LoopingParameters extends LoopingStatement {
|
|
47
|
-
// listProp: string;
|
|
48
|
-
// ish: any;
|
|
49
|
-
// ishContainer: Element;
|
|
50
|
-
// }
|
|
51
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {IEnhancement, BEAllProps, EMC} from '../trans-render/be/types';
|
|
2
|
-
import { Specifier } from "../trans-render/dss/types";
|
|
3
|
-
|
|
4
|
-
export interface EndUserProps extends IEnhancement{
|
|
5
|
-
soakUpRules: SoakUpRule[]
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface AllProps extends EndUserProps{
|
|
9
|
-
|
|
10
|
-
fullyParsed?: boolean
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type AP = AllProps;
|
|
14
|
-
|
|
15
|
-
export type PAP = Partial<AP>;
|
|
16
|
-
|
|
17
|
-
export type ProPAP = Promise<PAP>;
|
|
18
|
-
|
|
19
|
-
export type BAP = AP & BEAllProps;
|
|
20
|
-
|
|
21
|
-
export interface Actions{
|
|
22
|
-
fullyParse(self: BAP): PAP;
|
|
23
|
-
hydrate(self: BAP): ProPAP;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface PropMap {
|
|
27
|
-
srcProp: string,
|
|
28
|
-
destProp?: string
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface SoakUpRule {
|
|
32
|
-
propMap: string
|
|
33
|
-
sourceSpecifier: Specifier
|
|
34
|
-
sourceSpecifierString: string
|
|
35
|
-
parsedPropMap: PropMap[]
|
|
36
|
-
}
|
|
@@ -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
|
-
}
|