@trustme24/flext 1.4.0 → 1.4.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/dist/lib.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  import { AST } from '@handlebars/parser';
2
2
  import { Theme as Wind4Theme } from '@unocss/preset-wind4';
3
3
  import { Obj, Macro, MacroParam, DataModelNode, DataModel } from './types';
4
+ import striptags from 'striptags';
4
5
  import Handlebars, { TemplateDelegate } from 'handlebars';
5
6
  export declare const uno: Promise<import("unocss").UnoGenerator<Wind4Theme>>;
6
7
  export type CollectorFilterHandler<T = any> = (val?: T) => boolean;
7
8
  export declare const DEFAULT_MODEL_DEPTH = 10;
9
+ export declare const stripHtml: typeof striptags;
8
10
  export declare class HandlebarsCollector<T = any> extends Handlebars.Visitor {
9
11
  data: T[];
10
12
  match: CollectorFilterHandler<T>;
@@ -32,7 +34,10 @@ export declare function getDataModel(ast: AST.Program): DataModel;
32
34
  export declare function getMacroParam(val: string): MacroParam | null;
33
35
  export declare function getMacroParams(val: string, doWarn?: boolean): MacroParam[];
34
36
  export declare function getMacros(ast: AST.Program, doWarn?: boolean): Macro[];
37
+ export declare function getHtmlH1(ast: AST.Program, doWarn?: boolean): string[];
35
38
  export declare function ensureDate(val: Date | string | number): Date;
39
+ export declare function ensureTitle(val: string | number): string;
40
+ export declare function filter(regex: RegExp, val: string | number): boolean;
36
41
  export declare class RegexHelper {
37
42
  static dbDateStr: RegExp;
38
43
  static macro: RegExp;
@@ -40,7 +45,9 @@ export declare class RegexHelper {
40
45
  static macroParam: RegExp;
41
46
  static macroNamedParam: RegExp;
42
47
  static macroSimpleParam: RegExp;
48
+ static htmlH1Somewhere: RegExp;
43
49
  }
44
50
  export declare class FilterHelper {
45
51
  static macro(val: string): boolean;
52
+ static htmlH1Somewhere(val: string): boolean;
46
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustme24/flext",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "A Powerful Templating Engine",
5
5
  "keywords": ["templates", "templating engine", "modular templates", "handlebars"],
6
6
  "type": "module",
@@ -37,8 +37,8 @@
37
37
  "@babel/preset-typescript": "^7.27.1",
38
38
  "@handlebars/parser": "^2.2.1",
39
39
  "@tailwindcss/cli": "^4.1.14",
40
- "@types/node": "^24.7.1",
41
- "esbuild": "^0.25.10",
40
+ "@types/node": "^24.7.2",
41
+ "esbuild": "^0.25.11",
42
42
  "esbuild-plugin-import-glob": "^0.1.1",
43
43
  "tailwindcss": "^4.1.14",
44
44
  "tsc-alias": "^1.8.16",
@@ -46,9 +46,10 @@
46
46
  "vitest": "^3.2.4"
47
47
  },
48
48
  "dependencies": {
49
- "@unocss/preset-wind4": "^66.5.3",
49
+ "@unocss/preset-wind4": "^66.5.4",
50
50
  "handlebars": "^4.7.8",
51
51
  "luxon": "^3.7.2",
52
- "unocss": "^66.5.3"
52
+ "striptags": "^3.2.0",
53
+ "unocss": "^66.5.4"
53
54
  }
54
55
  }