@trustme24/flext 1.2.0 → 1.3.1
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 +18 -2
- package/dist/index.cjs +374 -186
- package/dist/index.css +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +34 -26
- package/dist/lib.d.ts +3 -0
- package/dist/modules/date/index.d.ts +17 -0
- package/dist/modules/index.d.ts +1 -0
- package/package.json +14 -12
package/dist/lib.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare class HandlebarsCollector<T = any> extends Handlebars.Visitor {
|
|
|
16
16
|
}
|
|
17
17
|
export declare function isObject(val: any): boolean;
|
|
18
18
|
export declare function has(obj: Obj, key: string): boolean;
|
|
19
|
+
export declare function inarr(val: any, ...arr: any): boolean;
|
|
19
20
|
export declare function audit(val: any): string;
|
|
20
21
|
export declare function defineModule(options?: any): any;
|
|
21
22
|
export declare function unique<T = any>(arr: T[]): T[];
|
|
@@ -30,7 +31,9 @@ export declare function getDataModel(ast: AST.Program): DataModel;
|
|
|
30
31
|
export declare function getMacroParam(val: string): MacroParam | null;
|
|
31
32
|
export declare function getMacroParams(val: string, doWarn?: boolean): MacroParam[];
|
|
32
33
|
export declare function getMacros(ast: AST.Program, doWarn?: boolean): Macro[];
|
|
34
|
+
export declare function ensureDate(val: Date | string | number): Date;
|
|
33
35
|
export declare class RegexHelper {
|
|
36
|
+
static dbDateStr: RegExp;
|
|
34
37
|
static macro: RegExp;
|
|
35
38
|
static macroParams: RegExp;
|
|
36
39
|
static macroParam: RegExp;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SafeString } from 'handlebars';
|
|
2
|
+
export declare const DEFAULT_LANG = "en-US";
|
|
3
|
+
export declare function op(state: any): Date | string | number;
|
|
4
|
+
export declare function opWithColor(state: any): SafeString;
|
|
5
|
+
export declare function seconds(state: any): SafeString;
|
|
6
|
+
export declare function minutes(state: any): SafeString;
|
|
7
|
+
export declare function hours(state: any): SafeString;
|
|
8
|
+
export declare function day(state: any): SafeString;
|
|
9
|
+
export declare function month(state: any): SafeString;
|
|
10
|
+
export declare function monthText(state: any): SafeString;
|
|
11
|
+
export declare function year(state: any): SafeString;
|
|
12
|
+
export declare function text(state: any): SafeString;
|
|
13
|
+
export declare function now(): Date;
|
|
14
|
+
export declare function unix(state: any): number;
|
|
15
|
+
export declare function iso(state: any): string;
|
|
16
|
+
declare const _default: any;
|
|
17
|
+
export default _default;
|
package/dist/modules/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trustme24/flext",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "A Powerful Templating Engine",
|
|
5
5
|
"keywords": ["templates", "templating engine", "modular templates", "handlebars"],
|
|
6
6
|
"type": "module",
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
"./index.css": "./dist/index.css"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
|
+
"test-flext:app": "cd test/app && npm run test-app",
|
|
19
|
+
"test-flext": "npm run test-flext:app",
|
|
18
20
|
"build:types": "tsc && tsc-alias",
|
|
19
21
|
"build:css": "tailwindcss -i ./src/index.tail.css -o ./dist/index.css --minify",
|
|
20
22
|
"build": "bin/build.mjs && npm run build:types && npm run build:css",
|
|
@@ -26,22 +28,22 @@
|
|
|
26
28
|
"author": "Kenny Romanov",
|
|
27
29
|
"license": "MIT",
|
|
28
30
|
"devDependencies": {
|
|
29
|
-
"@babel/cli": "^7.28.
|
|
30
|
-
"@babel/core": "^7.28.
|
|
31
|
-
"@babel/preset-env": "^7.28.
|
|
31
|
+
"@babel/cli": "^7.28.3",
|
|
32
|
+
"@babel/core": "^7.28.4",
|
|
33
|
+
"@babel/preset-env": "^7.28.3",
|
|
32
34
|
"@babel/preset-typescript": "^7.27.1",
|
|
33
|
-
"@handlebars/parser": "^2.2.
|
|
34
|
-
"@tailwindcss/cli": "^4.1.
|
|
35
|
-
"@types/node": "^24.
|
|
36
|
-
"esbuild": "^0.25.
|
|
35
|
+
"@handlebars/parser": "^2.2.1",
|
|
36
|
+
"@tailwindcss/cli": "^4.1.14",
|
|
37
|
+
"@types/node": "^24.7.0",
|
|
38
|
+
"esbuild": "^0.25.10",
|
|
37
39
|
"esbuild-plugin-import-glob": "^0.1.1",
|
|
38
|
-
"tailwindcss": "^4.1.
|
|
40
|
+
"tailwindcss": "^4.1.14",
|
|
39
41
|
"tsc-alias": "^1.8.16",
|
|
40
|
-
"typescript": "^5.
|
|
42
|
+
"typescript": "^5.9.3"
|
|
41
43
|
},
|
|
42
44
|
"dependencies": {
|
|
43
|
-
"@unocss/preset-wind4": "^66.
|
|
45
|
+
"@unocss/preset-wind4": "^66.5.2",
|
|
44
46
|
"handlebars": "^4.7.8",
|
|
45
|
-
"unocss": "^66.
|
|
47
|
+
"unocss": "^66.5.2"
|
|
46
48
|
}
|
|
47
49
|
}
|