@trustme24/flext 1.1.4 → 1.2.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/dist/lib.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { AST } from '@handlebars/parser';
2
+ import { Theme as Wind4Theme } from '@unocss/preset-wind4';
2
3
  import { Obj, Macro, MacroParam, DataModelNode, DataModel } from './types';
3
4
  import Handlebars, { TemplateDelegate } from 'handlebars';
5
+ export declare const uno: Promise<import("unocss").UnoGenerator<Wind4Theme>>;
4
6
  export type CollectorFilterHandler<T = any> = (val?: T) => boolean;
5
7
  export declare const DEFAULT_MODEL_DEPTH = 10;
6
8
  export declare class HandlebarsCollector<T = any> extends Handlebars.Visitor {
@@ -20,6 +22,7 @@ export declare function unique<T = any>(arr: T[]): T[];
20
22
  export declare function getAst(val: string): AST.Program;
21
23
  export declare function getTemplate(val: string | AST.Program): TemplateDelegate;
22
24
  export declare function getHtml(template: TemplateDelegate, data?: Obj, helpers?: Obj): string;
25
+ export declare function getCss(template: TemplateDelegate, data?: Obj, helpers?: Obj): Promise<string>;
23
26
  export declare function getPaths(ast: AST.Program): string[];
24
27
  export declare function pathToDataModelNode(path: string, depth?: number): DataModelNode;
25
28
  export declare function pathToDataModel(path: string, depth?: number): DataModel;
@@ -0,0 +1,11 @@
1
+ export declare function op(state: any): boolean;
2
+ export declare function equal(state: any): boolean;
3
+ export declare function softEqual(state: any): boolean;
4
+ export declare function notEqual(state: any): boolean;
5
+ export declare function softNotEqual(state: any): boolean;
6
+ export declare function and(state: any): boolean;
7
+ export declare function or(state: any): boolean;
8
+ export declare function greater(state: any): boolean;
9
+ export declare function less(state: any): boolean;
10
+ declare const _default: any;
11
+ export default _default;
@@ -1 +1,4 @@
1
+ export { default as cond } from './cond';
2
+ export { default as match } from './match';
3
+ export { default as math } from './math';
1
4
  export { default as put } from './put';
@@ -0,0 +1,6 @@
1
+ export declare function op(state: any): boolean;
2
+ export declare function switchHelper(state: any): any;
3
+ export declare function caseHelper(state: any): any;
4
+ export declare function defaultHelper(state: any): any;
5
+ declare const _default: any;
6
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export declare function matchHelper(state: any): any;
2
+ export declare function caseHelper(state: any): any;
3
+ export declare function fallbackHelper(state: any): any;
4
+ declare const _default: any;
5
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import { SafeString } from 'handlebars';
2
+ export type Arg = string | number | null | undefined;
3
+ export declare function op(state: any): number;
4
+ export declare function opWithColor(state: any): SafeString;
5
+ export declare function plus(state: any): SafeString;
6
+ export declare function minus(state: any): SafeString;
7
+ export declare function multiply(state: any): SafeString;
8
+ export declare function divide(state: any): SafeString;
9
+ export declare function intDivide(state: any): SafeString;
10
+ export declare function power(state: any): SafeString;
11
+ export declare function round(state: any): SafeString;
12
+ export declare function percent(state: any): SafeString;
13
+ export declare function sqrt(state: any): SafeString;
14
+ export declare function cbrt(state: any): SafeString;
15
+ export declare function abs(state: any): SafeString;
16
+ declare const _default: any;
17
+ export default _default;
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@trustme24/flext",
3
- "version": "1.1.4",
3
+ "version": "1.2.0",
4
4
  "description": "A Powerful Templating Engine",
5
5
  "keywords": ["templates", "templating engine", "modular templates", "handlebars"],
6
- "type": "commonjs",
6
+ "type": "module",
7
7
  "main": "dist/index.js",
8
- "types": "dist/src/index.d.ts",
8
+ "types": "dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
+ "types": "./dist/index.d.ts",
11
12
  "import": "./dist/index.js",
12
13
  "require": "./dist/index.cjs"
13
14
  },
@@ -16,7 +17,7 @@
16
17
  "scripts": {
17
18
  "build:types": "tsc && tsc-alias",
18
19
  "build:css": "tailwindcss -i ./src/index.tail.css -o ./dist/index.css --minify",
19
- "build": "bin/build && npm run build:types && npm run build:css",
20
+ "build": "bin/build.mjs && npm run build:types && npm run build:css",
20
21
  "prepare": "npm run build"
21
22
  },
22
23
  "files": [
@@ -25,21 +26,22 @@
25
26
  "author": "Kenny Romanov",
26
27
  "license": "MIT",
27
28
  "devDependencies": {
28
- "@babel/cli": "^7.26.4",
29
- "@babel/core": "^7.26.10",
30
- "@babel/preset-env": "^7.26.9",
31
- "@babel/preset-typescript": "^7.26.0",
29
+ "@babel/cli": "^7.28.0",
30
+ "@babel/core": "^7.28.0",
31
+ "@babel/preset-env": "^7.28.0",
32
+ "@babel/preset-typescript": "^7.27.1",
32
33
  "@handlebars/parser": "^2.2.0",
33
34
  "@tailwindcss/cli": "^4.1.11",
34
- "@types/minimist": "^1.2.5",
35
- "@types/node": "^22.14.0",
36
- "esbuild": "^0.25.6",
35
+ "@types/node": "^24.1.0",
36
+ "esbuild": "^0.25.8",
37
37
  "esbuild-plugin-import-glob": "^0.1.1",
38
38
  "tailwindcss": "^4.1.11",
39
- "tsc-alias": "^1.8.11",
40
- "typescript": "^5.8.2"
39
+ "tsc-alias": "^1.8.16",
40
+ "typescript": "^5.8.3"
41
41
  },
42
42
  "dependencies": {
43
- "handlebars": "^4.7.8"
43
+ "@unocss/preset-wind4": "^66.3.3",
44
+ "handlebars": "^4.7.8",
45
+ "unocss": "^66.3.3"
44
46
  }
45
47
  }