cradova 3.3.9 → 3.3.10

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/dist/index.js CHANGED
@@ -555,7 +555,7 @@ class Page {
555
555
  this._deCallBack = cb;
556
556
  }
557
557
  async _deActivate() {
558
- this._deCallBack && await this._deCallBack(localTree.globalTree["doc"]);
558
+ this._deCallBack && await this._deCallBack();
559
559
  }
560
560
  drop(state) {
561
561
  if (typeof state === "boolean") {
@@ -587,7 +587,7 @@ class Page {
587
587
  left: 0,
588
588
  behavior: "instant"
589
589
  });
590
- this._callBack && await this._callBack(localTree.globalTree["doc"]);
590
+ this._callBack && await this._callBack();
591
591
  }
592
592
  }
593
593
 
@@ -1,4 +1,4 @@
1
- import { type CradovaPageType } from "./types";
1
+ import { type CradovaPageType, type promisedPage } from "./types";
2
2
  /**
3
3
  * Cradova event
4
4
  */
@@ -240,7 +240,7 @@ export declare class Router {
240
240
  *
241
241
  * accepts an object containing pat and page
242
242
  */
243
- static BrowserRoutes(obj: Record<string, any>): void;
243
+ static BrowserRoutes(obj: Record<string, Page | promisedPage>): void;
244
244
  /**
245
245
  Go back in Navigation history
246
246
  */
@@ -30,7 +30,7 @@ type Attributes = {
30
30
  recall?: (P: any) => void;
31
31
  onmount?: (this: HTMLElement & Attributes) => void;
32
32
  };
33
- export type VJS_params_TYPE<E = HTMLElement> = (Comp | Comp[] | string | undefined | HTMLElement | HTMLElement[] | DocumentFragment | Attributes | (() => HTMLElement) | Partial<Attributes> | Partial<E> | Record<string, (this: E) => void> | Partial<DataAttributes> | Partial<AriaAttributes> | CSS.Properties<string | number>)[];
33
+ export type VJS_params_TYPE<E = HTMLElement> = (Comp | Comp[] | string | undefined | HTMLElement | HTMLElement[] | DocumentFragment | DocumentFragment[] | Attributes | (() => HTMLElement) | Partial<Attributes> | Partial<E> | Record<string, (this: E) => void> | Partial<DataAttributes> | Partial<AriaAttributes> | CSS.Properties<string | number>)[];
34
34
  export interface RouterRouteObject {
35
35
  _html: ((this: Page, data?: unknown) => HTMLElement | DocumentFragment) | HTMLElement | DocumentFragment;
36
36
  _delegatedRoutes: number | boolean;
@@ -67,4 +67,5 @@ export type CradovaPageType = {
67
67
  */
68
68
  template: (this: Page) => HTMLElement;
69
69
  };
70
+ export type promisedPage = (() => Promise<Page>);
70
71
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cradova",
3
- "version": "3.3.9",
3
+ "version": "3.3.10",
4
4
  "description": "Build Powerful ⚡ Web Apps with Ease",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",