el-maker 0.0.0 → 0.0.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.
Files changed (45) hide show
  1. package/.gitmodules +3 -0
  2. package/ElementMaker.js +95 -0
  3. package/Instructions.md +9 -0
  4. package/README.md +105 -1
  5. package/SuggestionForExtending.md +131 -0
  6. package/package.json +19 -3
  7. package/types/.kiro/specs/conversion-template/README.md +128 -0
  8. package/types/.kiro/specs/conversion-template/design.md +360 -0
  9. package/types/.kiro/specs/conversion-template/requirements.md +191 -0
  10. package/types/.kiro/specs/conversion-template/tasks.md +174 -0
  11. package/types/.kiro/steering/coding-standards.md +17 -0
  12. package/types/.kiro/steering/conversion-guide.md +103 -0
  13. package/types/.kiro/steering/declarative-configuration.md +108 -0
  14. package/types/.kiro/steering/emc-json-serializability.md +306 -0
  15. package/types/EnhancementConversionInstructions.md +1626 -0
  16. package/types/LICENSE +21 -0
  17. package/types/NewCustomElementFeature.md +683 -0
  18. package/types/NewEnhancementInstructions.md +395 -0
  19. package/types/README.md +2 -0
  20. package/types/agrace/types.d.ts +11 -0
  21. package/types/assign-gingerly/types.d.ts +476 -0
  22. package/types/be-a-beacon/types.d.ts +17 -0
  23. package/types/be-bound/types.d.ts +61 -0
  24. package/types/be-buttoned-up/types.d.ts +19 -0
  25. package/types/be-clonable/types.d.ts +36 -0
  26. package/types/be-committed/types.d.ts +22 -0
  27. package/types/be-decked-with/types.d.ts +26 -0
  28. package/types/be-delible/types.d.ts +25 -0
  29. package/types/be-reflective/types.d.ts +78 -0
  30. package/types/be-render-neutral/types.d.ts +29 -0
  31. package/types/be-typed/types.d.ts +31 -0
  32. package/types/do-inc/types.d.ts +56 -0
  33. package/types/do-invoke/types.d.ts +38 -0
  34. package/types/do-merge/types.d.ts +28 -0
  35. package/types/do-toggle/types.d.ts +31 -0
  36. package/types/face-up/types.d.ts +100 -0
  37. package/types/global.d.ts +29 -0
  38. package/types/id-generation/types.d.ts +26 -0
  39. package/types/inferencer/types.d.ts +46 -0
  40. package/types/mount-observer/types.d.ts +363 -0
  41. package/types/nested-regex-groups/types.d.ts +101 -0
  42. package/types/roundabout/types.d.ts +255 -0
  43. package/types/templ-maker/types.d.ts +43 -0
  44. package/types/time-ticker/types.d.ts +62 -0
  45. package/types/truth-sourcer/types.d.ts +44 -0
@@ -0,0 +1,476 @@
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
+ }
329
+
330
+ // =============================================================================
331
+ // Custom Element Features types
332
+ // =============================================================================
333
+
334
+ /**
335
+ * Context passed to feature spawn constructors
336
+ */
337
+ export interface FeatureSpawnContext {
338
+ /** The feature key (e.g., 'photoTaker') */
339
+ key: string;
340
+ /** The SupportedFeatureConfig from static supportedFeatures */
341
+ optIn: SupportedFeatureConfig;
342
+ /** The FeatureConfig from assignFeatures */
343
+ injection: FeatureConfig;
344
+ /** The features registry reference */
345
+ featuresRegistry: FeaturesRegistry;
346
+ /** Shared context from the host element (via getSharedContext callback) */
347
+ shared?: any;
348
+ }
349
+
350
+ /**
351
+ * Configuration for a supported feature slot declared via static supportedFeatures
352
+ */
353
+ export interface SupportedFeatureConfig {
354
+ /**
355
+ * Optional fallback class (or async spawner) to use if no implementation is injected.
356
+ */
357
+ fallbackSpawn?:
358
+ | { new(hostElement: any, ctx: FeatureSpawnContext, initVals?: any): any }
359
+ | (() => Promise<{ new(hostElement: any, ctx: FeatureSpawnContext, initVals?: any): any }>);
360
+
361
+ /**
362
+ * Optional runtime shape validation for the spawned instance.
363
+ * Return true if the instance is valid, false to throw.
364
+ */
365
+ validateShape?: (spawnedInstance: any) => boolean;
366
+
367
+ /**
368
+ * Optional callback to provide shared context (e.g., ElementInternals, private state)
369
+ * to the feature at construction time.
370
+ */
371
+ getSharedContext?: (instance: any) => any;
372
+
373
+ /**
374
+ * Lifecycle callbacks that this feature requires.
375
+ * Serves as the default — the consumer can add more via FeatureConfig.callbackForwarding.
376
+ */
377
+ callbackForwarding?: string[];
378
+ }
379
+
380
+ /**
381
+ * Class-level configuration for the features system.
382
+ * Declared as `static featuresConfig` on the class.
383
+ */
384
+ export interface FeaturesClassConfig {
385
+ /**
386
+ * Lifecycle method configuration.
387
+ * true = install 'whenFeatureReady' method.
388
+ * Object = custom method name.
389
+ */
390
+ lifecycleKeys?: true | {
391
+ whenFeatureReady?: string;
392
+ };
393
+ }
394
+
395
+ /**
396
+ * Configuration for a feature passed to assignFeatures.
397
+ */
398
+ export interface FeatureConfig {
399
+ /**
400
+ * The class to instantiate, or an async function returning one.
401
+ */
402
+ spawn?:
403
+ | { new(hostElement: any, ctx: FeatureSpawnContext, initVals?: any): any }
404
+ | (() => Promise<{ new(hostElement: any, ctx: FeatureSpawnContext, initVals?: any): any }>);
405
+
406
+ /** Attribute patterns for parsing element attributes into initVals. */
407
+ withAttrs?: AttrPatterns<any>;
408
+
409
+ /** Pass-through custom configuration data (accessible via ctx.injection.customData). */
410
+ customData?: any;
411
+
412
+ /** Lifecycle callbacks to forward to this feature. */
413
+ callbackForwarding?: string[];
414
+ }
415
+
416
+ export type SupportedFeaturesMap = Record<string, SupportedFeatureConfig>;
417
+ export type FeatureConfigsMap = Record<string, FeatureConfig>;
418
+
419
+ /**
420
+ * Registry for feature configs, keyed by constructor.
421
+ */
422
+ export declare class FeaturesRegistry {
423
+ has(ctr: Function): boolean;
424
+ get(ctr: Function): Map<string, FeatureConfig> | undefined;
425
+ set(ctr: Function, key: string, config: FeatureConfig): void;
426
+ hasKey(ctr: Function, key: string): boolean;
427
+ }
428
+
429
+ /**
430
+ * A suggestion from one feature to another.
431
+ */
432
+ export interface FeatureInfoSuggestion {
433
+ from: Function;
434
+ withAttrs?: any;
435
+ customData?: any;
436
+ }
437
+
438
+ /**
439
+ * Core assignFeatures function.
440
+ */
441
+ export declare function assignFeatures(
442
+ ctr: Function,
443
+ features: FeatureConfigsMap,
444
+ featuresRegistry: FeaturesRegistry
445
+ ): Promise<void> | undefined;
446
+
447
+ /**
448
+ * Captures own-properties that shadow feature getters.
449
+ */
450
+ export declare function captureFeatureInitVals(instance: any): void;
451
+
452
+ /**
453
+ * Suggest configuration to another feature during registration.
454
+ */
455
+ export declare function suggestFeatureInfo(
456
+ fromFeatureCtr: Function,
457
+ toFeatureSymbol: symbol,
458
+ featureInfo: { withAttrs?: any; customData?: any },
459
+ targetClass: Function
460
+ ): void;
461
+
462
+ /**
463
+ * Retrieve suggestions made to a feature by other features.
464
+ */
465
+ export declare function getFeatureInfoSuggestions(
466
+ toFeatureSymbol: symbol,
467
+ targetClass: Function
468
+ ): FeatureInfoSuggestion[];
469
+
470
+ /**
471
+ * Base class for nested feature containers.
472
+ */
473
+ export declare class PropertyBag {
474
+ customElementRegistry: any;
475
+ constructor(hostElement: any, ctx?: FeatureSpawnContext, initVals?: any);
476
+ }
@@ -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
+ }