@formfeed/engine 0.1.0 → 0.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/index.cjs +1229 -68
- package/index.js +1229 -68
- package/package.json +1 -1
- package/types/index.d.cts +7 -1
- package/types/index.d.ts +7 -1
- package/types/lib/engines/python-format.d.cts +14 -0
- package/types/lib/engines/python-format.d.ts +14 -0
- package/types/lib/import/apitemplate.d.cts +3 -27
- package/types/lib/import/apitemplate.d.ts +3 -27
- package/types/lib/import/common.d.cts +67 -0
- package/types/lib/import/common.d.ts +67 -0
- package/types/lib/import/jsreport.d.cts +90 -0
- package/types/lib/import/jsreport.d.ts +90 -0
- package/types/lib/import/pdfmonkey.d.cts +77 -0
- package/types/lib/import/pdfmonkey.d.ts +77 -0
- package/types/lib/import/scss.d.cts +17 -0
- package/types/lib/import/scss.d.ts +17 -0
- package/types/lib/types.d.cts +6 -0
- package/types/lib/types.d.ts +6 -0
- package/types/lib/unavailable.d.cts +2 -0
- package/types/lib/unavailable.d.ts +2 -0
- package/types/types/modules.d.cts +10 -1
- package/types/types/modules.d.ts +10 -1
package/types/lib/types.d.cts
CHANGED
|
@@ -29,6 +29,12 @@ export interface VariableRef {
|
|
|
29
29
|
path: string[];
|
|
30
30
|
range: Range;
|
|
31
31
|
kind: 'read' | 'loop-var' | 'assigned';
|
|
32
|
+
/**
|
|
33
|
+
* For a variable bound in the template (loop variable, macro argument, `set`): the data path it
|
|
34
|
+
* stands for where it is used, `null` when that is not a data path. Resolved per scope, so two loops
|
|
35
|
+
* that reuse a name each check against their own list.
|
|
36
|
+
*/
|
|
37
|
+
source?: string[] | null;
|
|
32
38
|
}
|
|
33
39
|
export interface FilterRef {
|
|
34
40
|
name: string;
|
package/types/lib/types.d.ts
CHANGED
|
@@ -29,6 +29,12 @@ export interface VariableRef {
|
|
|
29
29
|
path: string[];
|
|
30
30
|
range: Range;
|
|
31
31
|
kind: 'read' | 'loop-var' | 'assigned';
|
|
32
|
+
/**
|
|
33
|
+
* For a variable bound in the template (loop variable, macro argument, `set`): the data path it
|
|
34
|
+
* stands for where it is used, `null` when that is not a data path. Resolved per scope, so two loops
|
|
35
|
+
* that reuse a name each check against their own list.
|
|
36
|
+
*/
|
|
37
|
+
source?: string[] | null;
|
|
32
38
|
}
|
|
33
39
|
export interface FilterRef {
|
|
34
40
|
name: string;
|
|
@@ -16,9 +16,17 @@ declare module 'nunjucks/browser/nunjucks.js' {
|
|
|
16
16
|
|
|
17
17
|
export interface NunjucksCompiler {
|
|
18
18
|
_emit(code: string): void;
|
|
19
|
+
_emitLine(code: string): void;
|
|
20
|
+
_compileExpression(node: unknown, frame: unknown): void;
|
|
19
21
|
compile(node: unknown, frame: unknown): void;
|
|
20
22
|
}
|
|
21
23
|
|
|
24
|
+
export interface NunjucksSetNode {
|
|
25
|
+
targets: NunjucksNode[];
|
|
26
|
+
value: NunjucksNode | null;
|
|
27
|
+
body: NunjucksNode | null;
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
export interface NunjucksModule {
|
|
23
31
|
Environment: typeof N.Environment;
|
|
24
32
|
Template: typeof N.Template;
|
|
@@ -26,11 +34,12 @@ declare module 'nunjucks/browser/nunjucks.js' {
|
|
|
26
34
|
runtime: typeof N.runtime & {
|
|
27
35
|
memberLookup: (obj: unknown, val: unknown, ...rest: unknown[]) => unknown;
|
|
28
36
|
};
|
|
29
|
-
/** The code generator; patched for `not` precedence (engines/jinja2.ts). */
|
|
37
|
+
/** The code generator; patched for `not` precedence and namespace attributes (engines/jinja2.ts). */
|
|
30
38
|
compiler: {
|
|
31
39
|
Compiler: {
|
|
32
40
|
prototype: {
|
|
33
41
|
compileNot(this: NunjucksCompiler, node: { target: unknown }, frame: unknown): void;
|
|
42
|
+
compileSet(this: NunjucksCompiler, node: NunjucksSetNode, frame: unknown): void;
|
|
34
43
|
};
|
|
35
44
|
};
|
|
36
45
|
};
|
package/types/types/modules.d.ts
CHANGED
|
@@ -16,9 +16,17 @@ declare module 'nunjucks/browser/nunjucks.js' {
|
|
|
16
16
|
|
|
17
17
|
export interface NunjucksCompiler {
|
|
18
18
|
_emit(code: string): void;
|
|
19
|
+
_emitLine(code: string): void;
|
|
20
|
+
_compileExpression(node: unknown, frame: unknown): void;
|
|
19
21
|
compile(node: unknown, frame: unknown): void;
|
|
20
22
|
}
|
|
21
23
|
|
|
24
|
+
export interface NunjucksSetNode {
|
|
25
|
+
targets: NunjucksNode[];
|
|
26
|
+
value: NunjucksNode | null;
|
|
27
|
+
body: NunjucksNode | null;
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
export interface NunjucksModule {
|
|
23
31
|
Environment: typeof N.Environment;
|
|
24
32
|
Template: typeof N.Template;
|
|
@@ -26,11 +34,12 @@ declare module 'nunjucks/browser/nunjucks.js' {
|
|
|
26
34
|
runtime: typeof N.runtime & {
|
|
27
35
|
memberLookup: (obj: unknown, val: unknown, ...rest: unknown[]) => unknown;
|
|
28
36
|
};
|
|
29
|
-
/** The code generator; patched for `not` precedence (engines/jinja2.ts). */
|
|
37
|
+
/** The code generator; patched for `not` precedence and namespace attributes (engines/jinja2.ts). */
|
|
30
38
|
compiler: {
|
|
31
39
|
Compiler: {
|
|
32
40
|
prototype: {
|
|
33
41
|
compileNot(this: NunjucksCompiler, node: { target: unknown }, frame: unknown): void;
|
|
42
|
+
compileSet(this: NunjucksCompiler, node: NunjucksSetNode, frame: unknown): void;
|
|
34
43
|
};
|
|
35
44
|
};
|
|
36
45
|
};
|