cradova 3.16.1 โ†’ 3.17.0

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/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  Build web apps that are fast, small, and simple.
11
11
  <br/>
12
12
  <br/>
13
- <a href="https://github.com/codedynasty-dev/cradova#examples"><strong>Explore the ๐ŸŽ™๏ธ docs ยป</strong></a>
13
+ <a href="https://cradova.codedynasty.dev/"><strong>Explore the ๐ŸŽ™๏ธ docs ยป</strong></a>
14
14
  <br/>
15
15
  <br/>
16
16
  <a href="https://t.me/codedynasty-devHQ">Join Community</a>
package/dist/index.js CHANGED
@@ -40,8 +40,12 @@ var makeElement = (element, ElementChildrenAndPropertyList) => {
40
40
  }
41
41
  if (typeof props === "object" && element) {
42
42
  for (const [prop, value] of Object.entries(props)) {
43
- if (prop === "style" && typeof value === "object") {
44
- Object.assign(element.style, value);
43
+ if (prop === "style") {
44
+ if (typeof value === "object") {
45
+ Object.assign(element.style, value);
46
+ } else if (typeof value === "string") {
47
+ element.style.cssText = value;
48
+ }
45
49
  continue;
46
50
  }
47
51
  if (prop === "onmount" && typeof props["onmount"] === "function") {
@@ -109,7 +109,7 @@ export declare class Router {
109
109
  *
110
110
  * accepts an object containing pat and page
111
111
  */
112
- static BrowserRoutes(obj: Record<string, browserPageType<Page | unknown>>): void;
112
+ static BrowserRoutes(obj: Record<string, browserPageType<Page>>): void;
113
113
  /**
114
114
  Pause navigation
115
115
  */
@@ -6,7 +6,7 @@ type AnyObject = {
6
6
  };
7
7
  interface Attributes {
8
8
  ref?: [RefInstance<any>, string];
9
- style?: Partial<CSS.Properties>;
9
+ style?: Partial<CSS.Properties> | string;
10
10
  [key: `data-${string}`]: string | undefined;
11
11
  [key: `aria-${string}`]: string | undefined;
12
12
  }
@@ -28,7 +28,7 @@ export type CradovaPageType = {
28
28
  * @returns void
29
29
  * .
30
30
  */
31
- template: ((ctx: Comp) => HTMLElement) | (() => HTMLElement);
31
+ template: ((ctx: Comp) => HTMLElement) | (() => HTMLElement) | (() => DocumentFragment);
32
32
  };
33
33
  export type browserPageType<importType = Page> = importType | Promise<importType> | (() => Promise<importType>);
34
34
  export interface Comp extends Function {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cradova",
3
- "version": "3.16.1",
3
+ "version": "3.17.0",
4
4
  "description": "A UI framework for web applications.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",