@trustme24/flext 1.0.4 → 1.1.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/index.d.ts CHANGED
@@ -1,16 +1,11 @@
1
- import { Obj } from './types';
2
- import { TemplateDelegate } from 'handlebars';
3
- export type Macro = {
4
- name: string;
5
- value: string;
6
- };
7
- export declare const DEFAULT_MODULE_SCRIPT = "index";
1
+ import { AST } from '@handlebars/parser';
2
+ import { Obj, DataModelNode } from './types';
8
3
  export declare class SimpleFlext {
9
- template: TemplateDelegate;
4
+ ast: AST.Program;
10
5
  data: Obj;
11
6
  helpers: Obj;
12
7
  constructor(val?: string | null, data?: Obj, helpers?: Obj);
13
- setHbs(val: string): this;
8
+ setTemplate(val: string): this;
14
9
  setData(val: Obj): this;
15
10
  setHelpers(val: Obj): this;
16
11
  addHelper(name: string, val: any): this;
@@ -21,12 +16,10 @@ export declare class Flext extends SimpleFlext {
21
16
  version: string;
22
17
  lineHeight: number;
23
18
  useModule(...val: string[]): this;
24
- setHbs(val: string): this;
19
+ setTemplate(val: string): this;
25
20
  setVersion(val: string): this;
26
21
  setLineHeight(val: number): this;
27
- }
28
- export declare function getMacros(hbs: string): Macro[];
29
- export declare class RegexHelper {
30
- static macro: RegExp;
22
+ getDataModel(): DataModelNode[];
23
+ get model(): Obj;
31
24
  }
32
25
  export default Flext;