@medyll/idae-be 1.20.0 → 1.22.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.
|
@@ -7,7 +7,7 @@ declare enum classesMethods {
|
|
|
7
7
|
replace = "replace"
|
|
8
8
|
}
|
|
9
9
|
export type ClassHandlerHandler = {
|
|
10
|
-
add?:
|
|
10
|
+
add?: string | string[];
|
|
11
11
|
remove?: CombineElements<string> | string[];
|
|
12
12
|
toggle?: CombineElements<string> | string[];
|
|
13
13
|
replace?: `${string} ${string}` | [string, string][];
|
package/dist/modules/styles.d.ts
CHANGED
|
@@ -11,13 +11,13 @@ export interface BeStylesHandler {
|
|
|
11
11
|
unset?: string;
|
|
12
12
|
}
|
|
13
13
|
export type BeStylesHandlerMethods = keyof typeof beStyleMethods;
|
|
14
|
-
export declare class StylesHandler implements CommonHandler<StylesHandler
|
|
14
|
+
export declare class StylesHandler implements CommonHandler<StylesHandler, Partial<BeStylesHandler>> {
|
|
15
15
|
private beElement;
|
|
16
16
|
constructor(beElement: Be);
|
|
17
17
|
methods: string[];
|
|
18
18
|
valueOf(): string;
|
|
19
19
|
static methods: beStyleMethods[];
|
|
20
|
-
handle(actions: BeStylesHandler): Be;
|
|
20
|
+
handle(actions: Partial<BeStylesHandler>): Be;
|
|
21
21
|
private resolveIndirection;
|
|
22
22
|
/**
|
|
23
23
|
* Sets one or more CSS styles for the selected element(s), including CSS custom properties.
|
|
@@ -53,6 +53,6 @@ export declare class StylesHandler implements CommonHandler<StylesHandler> {
|
|
|
53
53
|
*/
|
|
54
54
|
unset(key: string): Be;
|
|
55
55
|
private applyStyle;
|
|
56
|
-
getKey
|
|
56
|
+
private getKey;
|
|
57
57
|
}
|
|
58
58
|
export {};
|
package/dist/modules/styles.js
CHANGED
|
@@ -20,25 +20,7 @@ export class StylesHandler {
|
|
|
20
20
|
this.beElement.eachNode(() => {
|
|
21
21
|
switch (method) {
|
|
22
22
|
case 'set':
|
|
23
|
-
|
|
24
|
-
// Handle string input
|
|
25
|
-
const styleEntries = args.split(';').filter((s) => s.trim() !== '');
|
|
26
|
-
styleEntries.forEach((entry) => {
|
|
27
|
-
const [property, propertyValue] = entry.split(':').map((s) => s.trim());
|
|
28
|
-
if (property && propertyValue) {
|
|
29
|
-
this.applyStyle(property, propertyValue);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
else if (typeof args === 'object') {
|
|
34
|
-
// Handle object input
|
|
35
|
-
Object.entries(args).forEach(([prop, val]) => {
|
|
36
|
-
this.applyStyle(prop, val);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
console.warn('Invalid argument type for set method');
|
|
41
|
-
}
|
|
23
|
+
this.set(args);
|
|
42
24
|
break;
|
|
43
25
|
case 'get':
|
|
44
26
|
this.get(args);
|
package/dist/modules/timers.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ declare enum timersMethods {
|
|
|
9
9
|
type cd = Record<'timeout' | 'interval', number> & HandlerCallBack;
|
|
10
10
|
type cds = Record<'clearTimeout' | 'clearInterval', HandlerCallBackFn>;
|
|
11
11
|
export type TimerHandlerHandle = cd & cds;
|
|
12
|
-
export declare class TimersHandler implements CommonHandler<TimersHandler> {
|
|
12
|
+
export declare class TimersHandler implements CommonHandler<TimersHandler, TimerHandlerHandle> {
|
|
13
13
|
#private;
|
|
14
14
|
private beElement;
|
|
15
15
|
static methods: timersMethods[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medyll/idae-be",
|
|
3
3
|
"scope": "@medyll",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.22.0",
|
|
5
5
|
"description": "A modern, lightweight, and extensible DOM manipulation library built with TypeScript. Designed for precise element targeting and manipulation using a callback-based approach. Features include advanced DOM traversal, event handling, style management, attribute control, HTTP content loading, timers, and more. Ideal for developers seeking a modular and consistent API for dynamic web applications.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"DOM",
|