@web-atoms/core 2.6.25 → 2.6.27

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/src/core/XNode.ts CHANGED
@@ -7,30 +7,6 @@ import { IClassOf, IDisposable } from "./types.js";
7
7
  export interface IAttributes {
8
8
  [key: string]: string | number | null | any;
9
9
  }
10
-
11
- declare var bridge: any;
12
-
13
- export class RootObject {
14
-
15
- public get vsProps(): {
16
- [k in keyof this]?: this[k] | Bind
17
- } | { [k: string]: any } | {} {
18
- return undefined;
19
- }
20
-
21
- public addEventListener(name: string, handler: EventListenerOrEventListenerObject): IDisposable {
22
- return bridge.addEventHandler(this, name, handler);
23
- }
24
-
25
- public appendChild(e: any) {
26
- bridge.appendChild(this, e);
27
- }
28
-
29
- public dispatchEvent(evt: Event) {
30
- bridge.dispatchEvent(evt);
31
- }
32
- }
33
-
34
10
  export interface IElementAttributes {
35
11
  [key: string]: unknown;
36
12
  "data-click-event"?: string;
@@ -230,17 +206,17 @@ export default class XNode {
230
206
  // } as any;
231
207
  // }
232
208
 
233
- public static getClass(fullTypeName: string, assemblyName: string) {
234
- const n = fullTypeName + ";" + assemblyName;
235
- const cx = XNode.classes[n] || (XNode.classes[n] =
236
- bridge.getClass(
237
- fullTypeName,
238
- assemblyName,
239
- RootObject,
240
- (name, isProperty, isTemplate) =>
241
- (a?: any, ... nodes: any[]) => new XNode(name, a, nodes, isProperty, isTemplate )));
242
- return cx;
243
- }
209
+ // public static getClass(fullTypeName: string, assemblyName: string) {
210
+ // const n = fullTypeName + ";" + assemblyName;
211
+ // const cx = XNode.classes[n] || (XNode.classes[n] =
212
+ // bridge.getClass(
213
+ // fullTypeName,
214
+ // assemblyName,
215
+ // RootObject,
216
+ // (name, isProperty, isTemplate) =>
217
+ // (a?: any, ... nodes: any[]) => new XNode(name, a, nodes, isProperty, isTemplate )));
218
+ // return cx;
219
+ // }
244
220
 
245
221
  public static factory = (name, isProperty, isTemplate) => (a?: any, ... nodes: any[]) => {
246
222
  return new XNode(name, a, nodes, isProperty, isTemplate);
@@ -332,6 +308,5 @@ export default class XNode {
332
308
  }
333
309
  }
334
310
 
335
- if (typeof bridge !== "undefined") {
336
- bridge.XNode = XNode;
337
- }
311
+ const ESMPack = ((window as any).ESMPack ??= {})
312
+ ESMPack.installStyleSheet = (s) => setTimeout(() => ESMPack.installStyleSheet(s), 10);