face-up 0.0.0 → 0.0.2

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.
Files changed (46) hide show
  1. package/.gitmodules +3 -0
  2. package/.kiro/steering/project-context.md +17 -0
  3. package/.vscode/settings.json +3 -0
  4. package/FaceUp.js +305 -0
  5. package/README.md +162 -2
  6. package/imports.html +8 -0
  7. package/package.json +30 -20
  8. package/tests/test1.html +115 -0
  9. package/types/.kiro/specs/conversion-template/README.md +128 -0
  10. package/types/.kiro/specs/conversion-template/design.md +360 -0
  11. package/types/.kiro/specs/conversion-template/requirements.md +191 -0
  12. package/types/.kiro/specs/conversion-template/tasks.md +174 -0
  13. package/types/.kiro/steering/coding-standards.md +17 -0
  14. package/types/.kiro/steering/conversion-guide.md +103 -0
  15. package/types/.kiro/steering/declarative-configuration.md +108 -0
  16. package/types/.kiro/steering/emc-json-serializability.md +306 -0
  17. package/types/EnhancementConversionInstructions.md +1626 -0
  18. package/types/LICENSE +21 -0
  19. package/types/NewCustomElementFeature.md +673 -0
  20. package/types/NewEnhancementInstructions.md +395 -0
  21. package/types/README.md +2 -0
  22. package/types/agrace/types.d.ts +11 -0
  23. package/types/assign-gingerly/types.d.ts +328 -0
  24. package/types/be-a-beacon/types.d.ts +17 -0
  25. package/types/be-bound/types.d.ts +61 -0
  26. package/types/be-buttoned-up/types.d.ts +19 -0
  27. package/types/be-clonable/types.d.ts +36 -0
  28. package/types/be-committed/types.d.ts +22 -0
  29. package/types/be-decked-with/types.d.ts +26 -0
  30. package/types/be-delible/types.d.ts +25 -0
  31. package/types/be-reflective/types.d.ts +80 -0
  32. package/types/be-render-neutral/types.d.ts +29 -0
  33. package/types/be-typed/types.d.ts +31 -0
  34. package/types/do-inc/types.d.ts +56 -0
  35. package/types/do-invoke/types.d.ts +38 -0
  36. package/types/do-merge/types.d.ts +28 -0
  37. package/types/do-toggle/types.d.ts +31 -0
  38. package/types/face-up/types.d.ts +104 -0
  39. package/types/global.d.ts +29 -0
  40. package/types/id-generation/types.d.ts +26 -0
  41. package/types/inferencer/types.d.ts +46 -0
  42. package/types/mount-observer/types.d.ts +363 -0
  43. package/types/nested-regex-groups/types.d.ts +101 -0
  44. package/types/roundabout/types.d.ts +255 -0
  45. package/types/time-ticker/types.d.ts +66 -0
  46. package/types/truth-sourcer/types.d.ts +46 -0
@@ -0,0 +1,328 @@
1
+ export type EnhKey = string | symbol;
2
+
3
+ // type NoUnderscore<T extends string> = T extends `_${string}` ? never : T;
4
+
5
+ // type YesUnderscore = `_${string}`;
6
+
7
+ // export type StringWithAutocompleteOptions<TOptions> =
8
+ // | (string & {})
9
+ // | TOptions;
10
+
11
+ // export type StringNotStartWithUnderscoreAutocompleteOptions<TOptions> =
12
+ // | (NoUnderscore<string> & {})
13
+ // | TOptions;
14
+
15
+ // export type StringStartWithUnderscoreAutocompleteOptions<TOptions> =
16
+ // | (YesUnderscore & {})
17
+ // | TOptions;
18
+
19
+ //used by mount-observer, not by assign-gingerly
20
+ type DisposeEvent =
21
+ | 'disconnect'
22
+ | 'dismount'
23
+ // cannot polyfill
24
+ | 'exit' // element moved outside customElementRegistry
25
+ //reference count outside any enhancements goes to zero
26
+ | 'dispose'
27
+
28
+ export type Spawner<T = any, Obj = Element> = {
29
+ new (obj?: Obj, ctx?: SpawnContext<T>, initVals?: Partial<T>): T;
30
+ canSpawn?: (obj: any, ctx?: SpawnContext<T>) => boolean;
31
+ }
32
+
33
+ export interface EnhancementConfigBase<T = any> {
34
+ //Allow unprefixed attributes for custom elements and SVG when element tag name matches pattern
35
+ allowUnprefixed?: string | RegExp;
36
+
37
+ //keys of type symbol are used for dependency injection
38
+ //and are used by assign-gingerly
39
+ symlinks?: { [key: symbol]: keyof T };
40
+
41
+ lifecycleKeys?:
42
+ | true // Use standard names: "dispose" method, "resolved" property/event
43
+ | {
44
+ dispose?: string | symbol,
45
+ resolved?: string | symbol
46
+ }
47
+ //used by mount-observer, not by assign-gingerly
48
+ //impossible to polyfill, but will always be disposed
49
+ //when oElement's reference count goes to zero
50
+ disposeOn?: DisposeEvent | DisposeEvent[]
51
+ }
52
+
53
+ /**
54
+ * Configuration for enhancing elements with class instances
55
+ * Defines how to spawn and initialize enhancement classes
56
+ */
57
+ export interface EnhancementConfig<T = any, Obj = Element> extends EnhancementConfigBase<T> {
58
+
59
+ spawn: Spawner<T, Obj>;
60
+
61
+ //Applicable to passing in the initVals during the spawn lifecycle event
62
+ withAttrs?: AttrPatterns<T>;
63
+
64
+
65
+ //only applicable when spawning from a DOM Element reference
66
+ enhKey?: EnhKey;
67
+
68
+ }
69
+
70
+ export type Constructor = new (...args: any[]) => any;
71
+
72
+ export type pathString = `?.${string}`;
73
+
74
+ export type CustomElementName = string;
75
+ export type CustomElementConstructorStaticMethodName = string;
76
+
77
+ /**
78
+ * Context passed to parser functions
79
+ * Provides access to configuration and spawn context for advanced parsing scenarios
80
+ */
81
+ export interface ParserContext<T = any> {
82
+ /**
83
+ * The attribute configuration that matched this attribute
84
+ * Useful for parsers that need to access additional config properties
85
+ */
86
+ attrConfig: AttrConfig<T>;
87
+
88
+ /**
89
+ * The spawn context containing enhancement config and synthesizer element
90
+ * Useful for parsers that need access to the enhancement or synthesizer context
91
+ */
92
+ spawnContext?: SpawnContext<T>;
93
+
94
+ /**
95
+ * The element being enhanced
96
+ * Useful for parsers that need to read other attributes or element properties
97
+ */
98
+ element: Element;
99
+
100
+ /**
101
+ * The attribute name that was matched (resolved from template)
102
+ * Useful for parsers that handle multiple attributes
103
+ */
104
+ attrName: string;
105
+ }
106
+
107
+ /**
108
+ * Parser function signature
109
+ * Can accept just the attribute value (simple form) or value + context (advanced form)
110
+ */
111
+ export type ParserFunction<T = any> =
112
+ | ((attrValue: string | null) => any)
113
+ | ((attrValue: string | null, context?: ParserContext<T>) => any);
114
+
115
+ export interface AttrConfig<T = unknown, TParserConfig = unknown> {
116
+ /**
117
+ * Type of the property value (JSON-serializable string format)
118
+ */
119
+ instanceOf?: 'Object' | 'String' | 'Number' | 'Boolean' | 'Array'
120
+ | typeof Object | typeof String | typeof Number | typeof Boolean | typeof Array;
121
+
122
+
123
+ /**
124
+ * Property name on the spawned class instance to map to
125
+ * Use '.' to map to the root object using assignGingerly
126
+ * Is optional.
127
+ * If not specified, we assume it is the key without the underscore first
128
+ * character, unless the key is _base in which case it assume mapsTo = "."
129
+ */
130
+ mapsTo?:
131
+ | '.'
132
+ | keyof T
133
+ | pathString
134
+ | `${pathString} +=`
135
+ | `${pathString} =!`
136
+ | `${pathString} -=`
137
+
138
+ /**
139
+ * Parser to transform attribute string value
140
+ * - Function: Inline parser function (not JSON serializable)
141
+ * - Simple form: (attrValue: string | null) => any
142
+ * - Advanced form: (attrValue: string | null, context: ParserContext) => any
143
+ * - String: Named parser reference (JSON serializable) - looks up in scoped registry (if available) then global parser registry (e.g., 'timestamp', 'csv')
144
+ *
145
+ * Parser functions can optionally accept a second parameter (ParserContext) which provides:
146
+ * - attrConfig: The full AttrConfig object for this attribute
147
+ * - spawnContext: The SpawnContext with enhancement config and synthesizer element
148
+ * - element: The element being enhanced
149
+ * - attrName: The resolved attribute name
150
+ */
151
+ parser?:
152
+ | ParserFunction<T>
153
+ | string
154
+ ;
155
+
156
+ /**
157
+ * configuration information needed by a custom parser to properly
158
+ * parse the attribute.
159
+ */
160
+ parserConfig?: TParserConfig;
161
+
162
+ /**
163
+ * Default value to use when attribute is missing
164
+ * If defined, bypasses parser when attribute is not present
165
+ * If undefined, property is not added to initVals when attribute is missing
166
+ */
167
+ valIfNull?: any;
168
+
169
+ /**
170
+ * Enable caching of parsed attribute values
171
+ * - 'shared': Cache and reuse the same parsed object (fast, but enhancements must not mutate)
172
+ * - 'cloned': Cache and return a structural clone (safer, but slower)
173
+ * Note: Parsers should be pure functions when using caching
174
+ */
175
+ parseCache?: 'shared' | 'cloned';
176
+
177
+ // /**
178
+ // * Whether to only read the initial value (true) or continue observing changes (false)
179
+ // * Defaults to true (initial read only)
180
+ // */
181
+ // initialOnly?: boolean;
182
+
183
+ /**
184
+ * Should make sure it is added to static observedAttribrutes
185
+ */
186
+ sourceOfTruth?: boolean;
187
+ }
188
+
189
+ export type AttrPatterns<T = any> = {
190
+ /**
191
+ * Base prefix for attribute names
192
+ */
193
+ base?: string;
194
+
195
+ /**
196
+ * Configuration for the base pattern
197
+ */
198
+ _base?: AttrConfig<T>;
199
+ } & {
200
+ // Provide autocomplete for all properties of T (optional)
201
+ [K in keyof T]?: string | AttrConfig<T>;
202
+ } & {
203
+ // Provide autocomplete for underscore-prefixed config keys
204
+ [K in keyof T as `_${string & K}`]?: AttrConfig<T>;
205
+ } & {
206
+ // Allow any other string keys for custom patterns
207
+ [key: string]: string | AttrConfig<T>;
208
+ };
209
+
210
+
211
+ export interface SpawnContext<T = any, TMountContext = any> {
212
+ config: EnhancementConfig<T>;
213
+ mountCtx?: TMountContext;
214
+ /**
215
+ * Reference to the synthesizer element (be-hive, htmx-container, alpine-scope, etc.)
216
+ * that contains the EMC script defining this enhancement.
217
+ * Used for scoped parser registry access during attribute parsing.
218
+ */
219
+ synthesizerElement?: Element;
220
+ /**
221
+ * The full EMC configuration object that triggered this spawn.
222
+ * Passed through so enhancement classes can access their full configuration
223
+ * (including customData) without needing to separately import the JSON file.
224
+ * This avoids duplicate JSON imports when using emoji shorthand aliases.
225
+ */
226
+ emc?: any;
227
+ }
228
+
229
+ /**
230
+ * @deprecated Use EnhancementConfig instead
231
+ */
232
+ export type IEnhancementRegistryItem<T = any> = EnhancementConfig<T>;
233
+
234
+ /**
235
+ * Interface for the options passed to assignGingerly
236
+ */
237
+ export interface IAssignGingerlyOptions {
238
+ registry?: typeof EnhancementRegistry | EnhancementRegistry;
239
+ bypassChecks?: boolean;
240
+ withMethods?: string[] | Set<string>;
241
+ aka?: Record<string, string>;
242
+
243
+ /**
244
+ * AbortSignal for cleaning up reactive subscriptions (@eachTime)
245
+ * Required when using @eachTime symbol for reactive iteration
246
+ * When the signal is aborted, all event listeners are automatically removed
247
+ */
248
+ signal?: AbortSignal;
249
+ }
250
+
251
+ /**
252
+ * Event dispatched when enhancement configs are registered
253
+ */
254
+ export declare class EnhancementRegisteredEvent extends Event {
255
+ static eventName: string;
256
+ config: EnhancementConfig | EnhancementConfig[];
257
+ constructor(config: EnhancementConfig | EnhancementConfig[]);
258
+ }
259
+
260
+ /**
261
+ * Base registry class for managing enhancement configurations
262
+ * Extends EventTarget to dispatch events when configs are registered
263
+ */
264
+ export declare class EnhancementRegistry extends EventTarget {
265
+ push(items: EnhancementConfig | EnhancementConfig[]): void;
266
+ getItems(): EnhancementConfig[];
267
+ findBySymbol(symbol: symbol | string): EnhancementConfig | undefined;
268
+ findByEnhKey(enhKey: string | symbol): EnhancementConfig | undefined;
269
+ }
270
+
271
+ /**
272
+ * Constructor signature for ItemScope Manager classes
273
+ */
274
+ export type ItemscopeManager<T = any> = {
275
+ new (element: HTMLElement, initVals?: Partial<T>): T;
276
+ }
277
+
278
+ /**
279
+ * Configuration for ItemScope Manager registration
280
+ */
281
+ export interface ItemscopeManagerConfig<T = any> {
282
+ /**
283
+ * Manager class constructor
284
+ */
285
+ manager: ItemscopeManager<T>;
286
+
287
+ /**
288
+ * Optional lifecycle method keys
289
+ * - dispose: Method name to call when manager is disposed
290
+ * - resolved: Property/event name indicating manager is ready
291
+ */
292
+ lifecycleKeys?: {
293
+ dispose?: string | symbol;
294
+ resolved?: string | symbol;
295
+ };
296
+ }
297
+
298
+ /**
299
+ * Registry for ItemScope Manager configurations
300
+ * Extends EventTarget to support lazy registration via events
301
+ */
302
+ export declare class ItemscopeRegistry extends EventTarget {
303
+ define(name: string, config: ItemscopeManagerConfig): void;
304
+ get(name: string): ItemscopeManagerConfig | undefined;
305
+ whenDefined(name: string): Promise<void>;
306
+ }
307
+
308
+ /**
309
+ * Main assignGingerly function
310
+ */
311
+ export declare function assignGingerly(
312
+ target: any,
313
+ source: Record<string | symbol, any>,
314
+ options?: IAssignGingerlyOptions
315
+ ): any;
316
+
317
+ export default assignGingerly;
318
+
319
+ export declare class ElementEnhancementGateway{
320
+ //TODO: this isn't right
321
+ enh: ElementEnhancement;
322
+ }
323
+
324
+ export interface ElementEnhancement{
325
+ get(registryItem: EnhancementConfig | string | symbol, mountCtx?: any): any;
326
+ dispose(registryItem: EnhancementConfig | string | symbol): void;
327
+ whenResolved(registryItem: EnhancementConfig | string | symbol, mountCtx?: any): Promise<any>;
328
+ }
@@ -0,0 +1,17 @@
1
+ export interface EndUserProps {
2
+ eventName: string;
3
+ }
4
+
5
+ export interface AllProps extends EndUserProps {
6
+ enhancedElement: Element;
7
+ }
8
+
9
+ export type AP = AllProps;
10
+
11
+ export type PAP = Partial<AP>;
12
+
13
+ export type ProPAP = Promise<PAP>;
14
+
15
+ export interface Actions {
16
+ hydrate(self: AP): PAP;
17
+ }
@@ -0,0 +1,61 @@
1
+ import { Specifier } from "../trans-render/dss/types";
2
+ import {AbsorbingObject, SharingObject} from '../trans-render/asmr/types';
3
+ import { StatementsResult } from "../nested-regex-groups/types";
4
+
5
+ export interface EndUserProps{
6
+ bindingRules?: StatementsResult<BindingRule>;
7
+ }
8
+
9
+ export interface AllProps extends EndUserProps{
10
+ enhancedElement: Element;
11
+ bindings: Array<Binding>,
12
+ isParsed?: boolean,
13
+ rawStatements?: Array<string>
14
+ }
15
+
16
+ export type SignalEnhancement = 'be-value-added' | 'be-propagating' | undefined;
17
+
18
+ export interface BindingRule {
19
+
20
+ localProp?: string,
21
+ localEvent?: string,
22
+ remoteId?: string,
23
+ remoteProp?: string,
24
+ remoteSpecifier?: Specifier,
25
+
26
+
27
+ }
28
+
29
+ export interface Binding {
30
+ //new and improved
31
+ localAbsObj: AbsorbingObject;
32
+ localShareObj: SharingObject;
33
+ remoteAbsObj: AbsorbingObject;
34
+ remoteShareObj: SharingObject;
35
+ //remoteRef: WeakRef<Element>;
36
+ }
37
+
38
+ export type AP = AllProps;
39
+
40
+ export type PAP = Partial<AP>;
41
+
42
+ export type ProPAP = Promise<PAP>;
43
+
44
+
45
+ export interface Actions{
46
+ noAttrs(self: AP): ProPAP;
47
+ getBindings(self: AP): ProPAP;
48
+ hydrate(self: AP): ProPAP;
49
+ onRawStatements(self: AP): void;
50
+ }
51
+
52
+ export type WithStatement = string;
53
+
54
+ export type BetweenStatement = string;
55
+
56
+ export type TriggerSource = 'local' | 'remote' | 'tie';
57
+
58
+ export interface SpecificityResult {
59
+ val?: any,
60
+ winner?: TriggerSource;
61
+ }
@@ -0,0 +1,19 @@
1
+ export interface EndUserProps{
2
+ closeOnSelect: boolean;
3
+ eventName: string;
4
+ }
5
+
6
+ export interface AllProps extends EndUserProps {
7
+ enhancedElement: Element;
8
+ }
9
+
10
+ export type AP = AllProps;
11
+
12
+ export type PAP = Partial<AP>;
13
+
14
+ export type ProPAP = Promise<PAP>;
15
+
16
+ export interface Actions{
17
+ init(self: AllProps, enhancedElement: Element, initVals: PAP): void;
18
+ hydrate(self: AP): PAP | void
19
+ }
@@ -0,0 +1,36 @@
1
+ export interface EndUserProps{
2
+ triggerInsertPosition: InsertPosition;
3
+ cloneInsertPosition: InsertPosition;
4
+ buttonContent: string;
5
+ }
6
+
7
+ export interface AllProps extends EndUserProps{
8
+ enhancedElement: Element;
9
+ byob?: boolean;
10
+ trigger: HTMLButtonElement;
11
+ resolved: boolean;
12
+ }
13
+
14
+ export type AP = AllProps;
15
+
16
+ export type PAP = Partial<AP>;
17
+
18
+ export type ProPAP = Promise<PAP>;
19
+
20
+ export interface CustomData {
21
+ triggerSettings: {
22
+ type: string;
23
+ '?.classList?.add': string;
24
+ ariaLabel: string;
25
+ title: string;
26
+ },
27
+ withMethods: string[]
28
+
29
+ }
30
+
31
+ export interface Actions{
32
+ addCloneBtn(self: AP): ProPAP;
33
+ setBtnContent(self: AP): void;
34
+ beCloned(self: AP): void;
35
+ init(self: AP, enhancedElement: Element, initVals: PAP): Promise<void>
36
+ }
@@ -0,0 +1,22 @@
1
+ export interface EndUserProps{
2
+ to: string;
3
+ nudge: boolean;
4
+ on: string;
5
+ }
6
+
7
+ export interface AllProps extends EndUserProps {
8
+ enhancedElement: Element;
9
+ resolved: boolean;
10
+ }
11
+
12
+ export type AP = AllProps;
13
+
14
+ export type PAP = Partial<AP>;
15
+
16
+ export type ProPAP = Promise<PAP>;
17
+
18
+ export interface Actions{
19
+
20
+ hydrate(self: AP): ProPAP;
21
+ init(self: AP, enhancedElement: Element, initVals: PAP): Promise<void>
22
+ }
@@ -0,0 +1,26 @@
1
+
2
+ export interface EndUserProps{
3
+ path: string
4
+ src: string
5
+ }
6
+
7
+ export interface AllProps extends EndUserProps{
8
+ template: HTMLTemplateElement;
9
+ enhancedElement: Element;
10
+ resolved: 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
+ act(self: BAP): PAP
23
+ fetchRemoteTemplate(self: BAP): ProPAP
24
+ upShadowSearch(self: BAP): ProPAP
25
+ init(self: BAP, initVals: PAP): Promise<void>
26
+ }
@@ -0,0 +1,25 @@
1
+ export interface EndUserProps{
2
+ triggerInsertPosition: InsertPosition;
3
+ buttonContent: string;
4
+ }
5
+
6
+ export interface AllProps extends EndUserProps{
7
+ enhancedElement: Element;
8
+ byob?: boolean,
9
+ trigger: HTMLButtonElement;
10
+ resolved: 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 interface Actions{
20
+
21
+ addDeleteBtn(self: AP): ProPAP ;
22
+ setBtnContent(self: AP): void;
23
+ beDeleted(self: AP): void;
24
+ init(self: AP & Actions, enhancedElement: Element, initVals: PAP): Promise<void>;
25
+ }
@@ -0,0 +1,80 @@
1
+ import { SpawnContext } from "../assign-gingerly/types";
2
+
3
+ /**
4
+ * Shared context passed via getSharedContext — contains everything
5
+ * the Reflector needs to self-activate on spawn.
6
+ */
7
+ export interface ReflectorSharedContext {
8
+ /** The ElementInternals instance for custom state manipulation */
9
+ internals: ElementInternals;
10
+ /** The EventTarget the host dispatches property change events on */
11
+ hostPropagator: EventTarget;
12
+ }
13
+
14
+ /**
15
+ * Context passed to the Reflector feature constructor
16
+ */
17
+ export interface FeatureSpawnContext extends SpawnContext {
18
+ key: string;
19
+ optIn: any;
20
+ injection: any;
21
+ featuresRegistry: any;
22
+ shared?: ReflectorSharedContext;
23
+ }
24
+
25
+ /**
26
+ * A single custom state export rule parsed from --custom-state-exports
27
+ */
28
+ export interface CustomStateRule {
29
+ /** The custom state name to toggle (e.g. "disabled", "alertTypeIndicatesSuccess") */
30
+ stateName: string;
31
+ /** The property name to observe */
32
+ propName: string;
33
+ /** The condition type */
34
+ conditionType: 'boolean' | 'equals' | 'contains' | 'endsWith' | 'modulo' | 'lessThan' | 'greaterThan' | 'lessThanOrEqual' | 'greaterThanOrEqual';
35
+ /** The comparison value (for non-boolean conditions) */
36
+ compareValue?: string | number;
37
+ /** The modulo divisor (for modulo conditions) */
38
+ moduloDivisor?: number;
39
+ }
40
+
41
+ /**
42
+ * Properties that the Reflector feature exposes.
43
+ * With callbackForwarding, hostPropagator is provided via getSharedContext
44
+ * and the feature self-activates — but the setter remains for manual use cases.
45
+ */
46
+ export interface ReflectorProps {
47
+ /**
48
+ * The EventTarget that the host element uses to propagate property change events.
49
+ * Provided via getSharedContext. Also settable post-spawn for reconnection.
50
+ */
51
+ hostPropagator: EventTarget | null;
52
+ }
53
+
54
+ /**
55
+ * Internal state
56
+ */
57
+ export interface AllProps extends ReflectorProps {
58
+ /**
59
+ * WeakRef to the host custom element
60
+ */
61
+ hostRef: WeakRef<HTMLElement> | null;
62
+
63
+ /**
64
+ * The ElementInternals instance from the host (for custom state manipulation)
65
+ */
66
+ internals: ElementInternals | null;
67
+
68
+ /**
69
+ * Parsed custom state rules from --custom-state-exports CSS property
70
+ */
71
+ rules: CustomStateRule[];
72
+
73
+ /**
74
+ * AbortController for cleaning up event listeners
75
+ */
76
+ abortController: AbortController | null;
77
+ }
78
+
79
+ export type AP = AllProps;
80
+ export type PAP = Partial<AP>;
@@ -0,0 +1,29 @@
1
+ export interface RenderingHTMLScriptElement extends HTMLScriptElement{
2
+ renderer: (vm: any, html: any) => any,
3
+ }
4
+
5
+ export interface EndUserProps{
6
+ vm: any,
7
+ with: Array<string>,
8
+ }
9
+
10
+ export type Renderer = (vm: any, html: any) => any;
11
+
12
+ export interface AllProps extends EndUserProps{
13
+ enhancedElement: Element;
14
+ renderer: Renderer,
15
+ absorbingObject: any
16
+ }
17
+
18
+ export type PAP = Partial<AllProps>;
19
+
20
+ export type AP = AllProps;
21
+
22
+ export type ProPAP = Promise<PAP>;
23
+
24
+ export interface Actions {
25
+ getRenderer(self: AP): PAP;
26
+ doRender(self: AP): void;
27
+ observe(self: AP): ProPAP;
28
+ absorb(self: AP, e?: Event): ProPAP;
29
+ }
@@ -0,0 +1,31 @@
1
+ export interface EndUserProps {
2
+ triggerInsertPosition: InsertPosition;
3
+ labelTextContainer: string;
4
+ buttonContent: string;
5
+ nudge?: boolean;
6
+ }
7
+
8
+ export interface AllProps extends EndUserProps{
9
+ enhancedElement: Element;
10
+ byob?: boolean;
11
+ trigger: WeakRef<HTMLButtonElement>
12
+ }
13
+
14
+ export type AP = AllProps;
15
+
16
+ export type PAP = Partial<AP>;
17
+
18
+ export type ProPAP = Promise<PAP>;
19
+
20
+
21
+
22
+ export interface Actions{
23
+ addTypeBtn(self: AP): ProPAP;
24
+ setBtnContent(self: AP): void;
25
+ openDialog(self: AP): Promise<void>
26
+ }
27
+
28
+ export interface ITyper{
29
+ showDialog(): void;
30
+ dispose(): void;
31
+ }