mount-observer 0.1.32 → 0.1.34

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/Synthesizer.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import './ElementMountExtension.js';
2
2
  import { waitForEvent } from 'assign-gingerly/waitForEvent.js';
3
3
  import { AddedScriptElementEvent } from './Events.js';
4
- import { registryItem as inferRegistryItem } from 'assign-gingerly/Infer.js';
5
4
  import 'mount-observer/handlers/MountObserverScript.js';
6
5
  import { mos } from 'mount-observer/handlers/MountObserverScript.js';
7
6
  import 'mount-observer/handlers/ScriptExport.js';
@@ -63,11 +62,6 @@ export class Synthesizer extends HTMLElement {
63
62
  connectedCallback() {
64
63
  // Synthesizer elements are infrastructure, not UI
65
64
  this.hidden = true;
66
- // Register the Infer enhancement in the appropriate registry
67
- const registry = this.customElementRegistry || customElements;
68
- if (registry.enhancementRegistry) {
69
- registry.enhancementRegistry.push(inferRegistryItem);
70
- }
71
65
  // Identify the root node
72
66
  const rootNode = this.getRootNode();
73
67
  // Determine if this is a syndicator or subscriber
package/Synthesizer.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import './ElementMountExtension.js';
2
2
  import { waitForEvent } from 'assign-gingerly/waitForEvent.js';
3
3
  import { AddedScriptElementEvent } from './Events.js';
4
- import { registryItem as inferRegistryItem } from 'assign-gingerly/Infer.js';
5
4
 
6
5
  import 'mount-observer/handlers/MountObserverScript.js';
7
6
  import {mos} from 'mount-observer/handlers/MountObserverScript.js';
@@ -69,12 +68,6 @@ export abstract class Synthesizer extends HTMLElement {
69
68
  // Synthesizer elements are infrastructure, not UI
70
69
  this.hidden = true;
71
70
 
72
- // Register the Infer enhancement in the appropriate registry
73
- const registry = (this as any).customElementRegistry || customElements;
74
- if (registry.enhancementRegistry) {
75
- registry.enhancementRegistry.push(inferRegistryItem);
76
- }
77
-
78
71
  // Identify the root node
79
72
  const rootNode = this.getRootNode();
80
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mount-observer",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "description": "Observe and act on css matches.",
5
5
  "main": "MountObserver.js",
6
6
  "module": "MountObserver.js",
@@ -1,5 +1,6 @@
1
1
  // playwright.config.ts
2
2
  import { PlaywrightTestConfig, devices } from '@playwright/test';
3
+
3
4
  const config: PlaywrightTestConfig = {
4
5
  testIgnore: '**/experimentalCrossScopeRegistering/**',
5
6
  webServer: {
@@ -16,14 +17,35 @@ const config: PlaywrightTestConfig = {
16
17
  name: 'chromium',
17
18
  use: { ...devices['Desktop Chrome'] },
18
19
  },
19
- // {
20
- // name: 'firefox',
21
- // use: { ...devices['Desktop Firefox'] },
22
- // },
23
- // {
24
- // name: 'webkit',
25
- // use: { ...devices['Desktop Safari'] },
26
- // },
20
+ {
21
+ name: 'firefox',
22
+ use: { ...devices['Desktop Firefox'] },
23
+ // Tests to skip in Firefox (known failures)
24
+ // Note: experimentalCrossScopeRegistering is already ignored globally
25
+ testIgnore: [
26
+ '**/experimentalCrossScopeRegistering/**',
27
+ '**/id-generation-integration.spec.mjs',
28
+ '**/test-element-mount.spec.mjs',
29
+ '**/test-emc-script.spec.mjs',
30
+ '**/test-enhance-mounted-element.spec.mjs',
31
+ '**/test-mount-globally.spec.mjs',
32
+ ],
33
+ },
34
+ {
35
+ name: 'webkit',
36
+ use: { ...devices['Desktop Safari'] },
37
+ // Tests to skip in WebKit (known failures)
38
+ // Note: experimentalCrossScopeRegistering is already ignored globally
39
+ testIgnore: [
40
+ '**/experimentalCrossScopeRegistering/**',
41
+ '**/test-builtins.spec.mjs',
42
+ '**/test-element-mount.spec.mjs',
43
+ '**/test-emc-script.spec.mjs',
44
+ '**/test-enhance-mounted-element.spec.mjs',
45
+ '**/test-mount-globally.spec.mjs',
46
+ ],
47
+ },
27
48
  ],
28
49
  };
50
+
29
51
  export default config;
@@ -298,9 +298,15 @@ export declare function assignGingerly(
298
298
  export default assignGingerly;
299
299
 
300
300
  export declare class ElementEnhancementGateway{
301
+ //TODO: this isn't right
301
302
  enh: ElementEnhancement;
302
303
  }
303
304
 
304
305
  export interface ElementEnhancement{
305
306
  dispose(regItem: EnhancementConfig): void;
306
307
  }
308
+
309
+ export interface ElementInfer{
310
+ value: any;
311
+ eventType: string
312
+ }
@@ -0,0 +1,60 @@
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
+ remoteSpecifierString?: string,
23
+ remoteSpecifier?: Specifier,
24
+
25
+
26
+ }
27
+
28
+ export interface Binding {
29
+ //new and improved
30
+ localAbsObj: AbsorbingObject;
31
+ localShareObj: SharingObject;
32
+ remoteAbsObj: AbsorbingObject;
33
+ remoteShareObj: SharingObject;
34
+ //remoteRef: WeakRef<Element>;
35
+ }
36
+
37
+ export type AP = AllProps;
38
+
39
+ export type PAP = Partial<AP>;
40
+
41
+ export type ProPAP = Promise<PAP>;
42
+
43
+
44
+ export interface Actions{
45
+ noAttrs(self: AP): ProPAP;
46
+ getBindings(self: AP): ProPAP;
47
+ hydrate(self: AP): ProPAP;
48
+ onRawStatements(self: AP): void;
49
+ }
50
+
51
+ export type WithStatement = string;
52
+
53
+ export type BetweenStatement = string;
54
+
55
+ export type TriggerSource = 'local' | 'remote' | 'tie';
56
+
57
+ export interface SpecificityResult {
58
+ val?: any,
59
+ winner?: TriggerSource;
60
+ }
@@ -1,3 +1,4 @@
1
+ import { ElementEnhancementGateway } from "../assign-gingerly/types";
1
2
  import { StatementsResult } from "../nested-regex-groups/types";
2
3
 
3
4
  export interface EndUserProps{
@@ -5,7 +6,7 @@ export interface EndUserProps{
5
6
  }
6
7
 
7
8
  export interface AllProps extends EndUserProps{
8
- enhancedElement: Element;
9
+ enhancedElement: Element & ElementEnhancementGateway;
9
10
  resolved: boolean;
10
11
  }
11
12
 
@@ -34,20 +35,20 @@ export type asOptions =
34
35
  export type SubPropPath = string;
35
36
  export type EventName = string;
36
37
 
37
- export interface Specifier {
38
- id?: string,
39
- prop?: string,
40
- path?: SubPropPath,
41
- evtName?: EventName,
42
- as?: asOptions,
43
- constVal?: any;
44
- enhKey?: string;
45
- ish?: boolean;
46
- host?: boolean;
47
- }
38
+ // export interface Specifier {
39
+ // id?: string,
40
+ // prop?: string,
41
+ // path?: SubPropPath,
42
+ // evtName?: EventName,
43
+ // as?: asOptions,
44
+ // constVal?: any;
45
+ // enhKey?: string;
46
+ // ish?: boolean;
47
+ // host?: boolean;
48
+ // }
48
49
 
49
50
  export interface IncParameters {
50
- prop: string,
51
+ prop?: string | null,
51
52
  byAmtS?: string,
52
53
  byAmtN?: number,
53
54
  targetElementId?: string,
@@ -1,3 +1,4 @@
1
+ import { ElementEnhancementGateway } from "../assign-gingerly/types";
1
2
  import { StatementsResult } from "../nested-regex-groups/types";
2
3
 
3
4
  export interface Specifier {
@@ -10,7 +11,7 @@ export interface EndUserProps{
10
11
  }
11
12
 
12
13
  export interface AllProps extends EndUserProps{
13
- enhancedElement: Element;
14
+ enhancedElement: Element & ElementEnhancementGateway;
14
15
  resolved: boolean;
15
16
  }
16
17
 
@@ -1,9 +1,10 @@
1
+ import { ElementEnhancementGateway, ElementInfer } from "../assign-gingerly/types";
1
2
  import { StatementsResult } from "../nested-regex-groups/types";
2
3
 
3
4
  export interface EndUserProps{}
4
5
 
5
6
  export interface AllProps extends EndUserProps{
6
- enhancedElement: Element;
7
+ enhancedElement: Element & ElementEnhancementGateway;
7
8
  parsedStatements: StatementsResult<TogglingParameters>;
8
9
  resolved?: boolean;
9
10
  }
@@ -21,6 +22,6 @@ export interface Actions{
21
22
  }
22
23
 
23
24
  export interface TogglingParameters {
24
- prop: string;
25
+ prop?: string | null;
25
26
  localEventType?: string;
26
27
  }