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 +1 -1
- package/dist/index.js +6 -2
- package/dist/primitives/classes.d.ts +1 -1
- package/dist/primitives/types.d.ts +2 -2
- package/package.json +1 -1
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://
|
|
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"
|
|
44
|
-
|
|
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
|
|
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 {
|