mount-observer 0.0.101 → 0.0.102

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/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "mount-observer",
3
- "version": "0.0.101",
3
+ "version": "0.0.102",
4
4
  "description": "Observe and act on css matches.",
5
5
  "main": "MountObserver.js",
6
6
  "module": "MountObserver.js",
7
7
  "devDependencies": {
8
8
  "@playwright/test": "1.55.0",
9
- "ssi-server": "0.0.1"
9
+ "spa-ssi": "0.0.9"
10
10
  },
11
11
  "exports": {
12
12
  ".": {
@@ -115,7 +115,7 @@
115
115
  ],
116
116
  "types": "./ts-refs/mount-observer/types.d.ts",
117
117
  "scripts": {
118
- "serve": "python ./node_modules/ssi-server/ssi_server.py",
118
+ "serve": "node ./node_modules/spa-ssi/serve.js",
119
119
  "test": "playwright test",
120
120
  "safari": "npx playwright wk http://localhost:8000",
121
121
  "update": "ncu -u && npm install"
@@ -4,18 +4,39 @@ import {Inserts} from '../../node_modules/stream-orator/types';
4
4
 
5
5
  export interface EndUserProps extends IEnhancement{
6
6
  from?: string,
7
- to?: string,
7
+ to: string,
8
8
  shadowRootMode?: 'open' | 'closed',
9
- encoding?: 'UTF-8' | 'UTF-16'
10
- reqInit?: RequestInit,
11
- wrapper?: string,
12
- beBased?: boolean | BeBasedEndUserProps,
13
- beOosoom?: string,
14
- defer?: boolean,
15
- inProgressCss?: string,
16
- inserts?:Inserts,
17
- between?: [lhs: string, rhs: string],
18
- once?: boolean,
9
+ encoding: 'UTF-8' | 'UTF-16'
10
+ reqInit: RequestInit,
11
+ wrapper: string,
12
+ beBased: boolean | BeBasedEndUserProps,
13
+ beOosoom: string,
14
+ defer: boolean,
15
+ inProgressCss: string,
16
+ inserts:Inserts,
17
+ between: [lhs: string, rhs: string],
18
+ once: boolean,
19
+ onNavigate: OnNavigationProps
20
+ }
21
+
22
+ //https://www.npmjs.com/package/urlpattern-polyfill
23
+ interface URLPatternInit {
24
+ baseURL?: string;
25
+ username?: string;
26
+ password?: string;
27
+ protocol?: string;
28
+ hostname?: string;
29
+ port?: string;
30
+ pathname?: string;
31
+ search?: string;
32
+ hash?: string;
33
+ }
34
+
35
+ export interface OnNavigationProps {
36
+ whereSrcElementMatches: string,
37
+ whereDestMatchesURLPattern: URLPatternInit,
38
+ map: {[key: string]: string},
39
+ minMem: boolean,
19
40
  }
20
41
 
21
42
  export interface AllProps extends EndUserProps{
@@ -33,5 +54,6 @@ export type ProPAP = Promise<PAP>;
33
54
 
34
55
 
35
56
  export interface Actions{
57
+ hydrate(self: AP & BEAllProps): ProPAP;
36
58
  write(self: AP & BEAllProps): ProPAP;
37
59
  }
@@ -0,0 +1,27 @@
1
+ import {BEAllProps, IEnhancement} from '../trans-render/be/types';
2
+ import { Specifier } from "../trans-render/dss/types";
3
+
4
+ export interface EndUserProps extends IEnhancement<HTMLElement>{
5
+
6
+ }
7
+
8
+ export interface AllProps extends EndUserProps{
9
+ parsedStatements: Array<DataPropParameters>,
10
+ rawStatements?: Array<string>,
11
+ }
12
+
13
+ export interface DataPropParameters{
14
+ remoteSpecifiers: Array<Specifier>,
15
+ }
16
+
17
+ export type AP = AllProps;
18
+
19
+ export type PAP = Partial<AP>;
20
+
21
+ export type ProPAP = Promise<PAP>;
22
+
23
+ export type BAP = AP & BEAllProps<HTMLElement>;
24
+
25
+ export interface Actions{
26
+ hydrate(self: BAP) : ProPAP;
27
+ }
@@ -21,66 +21,7 @@ export interface IEventConfig<MCProps = any, MCActions = MCProps, TAction = Acti
21
21
  //Is anything using this anymore?
22
22
  export type ActionOnEventConfigs<MCProps = any, MCActions = MCProps, TAction = Action> = Partial<{[key in keyof MCActions]: IEventConfig<MCProps, MCActions, TAction>}>
23
23
 
24
- export interface IPropagator extends EventTarget{
25
- get(key: string): any;
26
- set(key: string, val: any): void;
27
- /**
28
- * Delta Keys
29
- */
30
- dk: Set<string>;
31
24
 
32
- /**
33
- * Mature keys
34
- */
35
- mk: Set<string>;
36
-
37
- /**
38
- * timeout handles - key is name of prop
39
- * used for simple debouncing of echo notifications in XtalElement
40
- */
41
- eth: Map<string, string | number | NodeJS.Timeout> | undefined;
42
-
43
- /**
44
- * timeout handles - key is name of prop
45
- * used for simple debouncing of toggle echo notifications in XtalElement
46
- */
47
- tth: Map<string, string | number | NodeJS.Timeout> | undefined;
48
- }
49
-
50
- export interface IResolvableService extends EventTarget{
51
- resolved: boolean;
52
- resolve(): Promise<void>;
53
-
54
- }
55
-
56
- export interface IInstanceResolvableService<T extends object = object> extends IResolvableService{
57
- instanceResolve(instance: T): Promise<void>;
58
- }
59
-
60
- export interface IMix extends IResolvableService{
61
- ext: {new(): HTMLElement}
62
- }
63
-
64
- export interface IPropRegistrar extends IResolvableService{
65
- propInfos: {[key: string]: PropInfo},
66
- allPropNames: string[],
67
- getAttrNames(ext: any): Promise<string[]>,
68
- getPropsFromAction(action: string | Action): Set<string>,
69
- nonDryProps: Set<string>,
70
- }
71
-
72
- // export interface IDefine extends IResolvableService{
73
- // custElClass: {new(): HTMLElement};
74
- // resolveInstanceSvcs(args: CEArgs, instance: any): Promise<void>;
75
- // }
76
-
77
- export interface IPropSvc extends IResolvableService{
78
- createPropBag(instance: Element): void;
79
- }
80
-
81
- export interface IHookup extends IInstanceResolvableService{
82
-
83
- }
84
25
 
85
26
  export interface IAttrChgCB{
86
27
  instance: HTMLElement,
@@ -91,9 +32,7 @@ export interface IAttrChgCB{
91
32
  filteredAttrs: {[key: string]: string}
92
33
  }
93
34
 
94
- export interface IConnectedCB{
95
- instance: HTMLElement,
96
- }
35
+
97
36
 
98
37
  export interface IPropChg{
99
38
  key: string,
@@ -102,39 +41,11 @@ export interface IPropChg{
102
41
 
103
42
  }
104
43
 
105
- export interface IDisconnectedCB {
106
- instance: HTMLElement
107
- }
108
-
109
- export interface INewPropagator {
110
- instance: HTMLElement,
111
- propagator: IPropagator,
112
- }
113
-
114
-
115
-
116
-
117
-
118
- // export interface CEArgs<TProps = any, TActions = TProps, TPropInfo = PropInfo, TAction extends Action<TProps> = Action<TProps>> extends DefineArgs<TProps, TActions, TPropInfo, TAction>{
119
- // definer?: IDefine,
120
- // servers?: CEServiceClasses
121
- // services?: CEServices,
122
- // asides?: any
123
- // }
124
-
125
44
  export interface DynamicTransform {
126
45
  scope?: Scope,
127
46
  noCache?: boolean,
128
47
  }
129
48
 
130
- export interface IPE {
131
- do(instance: EventTarget, originMethodName: string, vals: [any, ActionOnEventConfigs] ): Promise<void>,
132
- }
133
-
134
- export interface IPET extends IPE{
135
- re(instance: EventTarget, originMethodName: string, vals: [any, ActionOnEventConfigs, DynamicTransform] ): Promise<void>,
136
- }
137
-
138
49
  export interface DefineArgs<MixinCompositeProps = any, MixinCompositeActions = MixinCompositeProps, TPropInfo = PropInfo, TAction extends Action = Action<MixinCompositeProps>>{
139
50
  superclass?: {new(): HTMLElement} | string,
140
51
  mixins?: any[],
@@ -185,6 +96,7 @@ export interface IshConfig<TProps = any, TActions = TProps, ETProps = TProps>{
185
96
  compacts?: Compacts<TProps, TActions>;
186
97
  hitch?: Hitches<TProps, TActions>;
187
98
  handlers?: Handlers<ETProps, TActions>;
99
+ extHandlers?: ExtHandlers<TProps>;
188
100
  positractions?: Positractions<TProps, TActions>;
189
101
 
190
102
  isSleepless?: boolean;
@@ -228,8 +140,16 @@ export type Compacts<TProps = any, TActions = TProps> =
228
140
  ;
229
141
 
230
142
  export type Hitches<TProps = any, TActions = TProps> =
231
- | Partial<{[key in `when_${keyof TProps & string}_emits_${keyof TProps & string}_inc_${keyof TProps & string}_by`]: number}>
232
-
143
+ | Partial<{[key in `when_${keyof TProps & string}_emits_${keyof TProps & string}_inc_${keyof TProps & string}_by`]: number}>
144
+ ;
145
+
146
+ export interface ExtHandlerOptions {
147
+ on: string,
148
+ stopPropagation?: boolean,
149
+ }
150
+
151
+ export type ExtHandlers<ETProps = any> =
152
+ | Partial<{[key in `inc_${keyof TProps & string}` & string]: ExtHandlerOptions}>
233
153
  ;
234
154
 
235
155
  export type Handlers<ETProps = any, TActions = ETProps> =