@skeptools/skep-organization-project 0.0.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.
Files changed (137) hide show
  1. package/.gitattributes +23 -0
  2. package/.jsii +164 -0
  3. package/.projenrc.ts +29 -0
  4. package/API.md +3610 -0
  5. package/LICENSE +202 -0
  6. package/README.md +8 -0
  7. package/files/generated/.seed +1 -0
  8. package/files/scaffolding/.seed +1 -0
  9. package/files/scaffolding/README.md.liquid +43 -0
  10. package/lib/index.d.ts +1 -0
  11. package/lib/index.js +14 -0
  12. package/lib/skep-organization-project.d.ts +7 -0
  13. package/lib/skep-organization-project.js +24 -0
  14. package/node_modules/liquidjs/CHANGELOG.md +1015 -0
  15. package/node_modules/liquidjs/LICENSE +21 -0
  16. package/node_modules/liquidjs/README.md +163 -0
  17. package/node_modules/liquidjs/bin/liquid.js +24 -0
  18. package/node_modules/liquidjs/dist/builtin/filters/array.d.ts +15 -0
  19. package/node_modules/liquidjs/dist/builtin/filters/date.d.ts +2 -0
  20. package/node_modules/liquidjs/dist/builtin/filters/html.d.ts +4 -0
  21. package/node_modules/liquidjs/dist/builtin/filters/index.d.ts +7 -0
  22. package/node_modules/liquidjs/dist/builtin/filters/math.d.ts +11 -0
  23. package/node_modules/liquidjs/dist/builtin/filters/misc.d.ts +5 -0
  24. package/node_modules/liquidjs/dist/builtin/filters/string.d.ts +16 -0
  25. package/node_modules/liquidjs/dist/builtin/filters/url.d.ts +2 -0
  26. package/node_modules/liquidjs/dist/builtin/tags/assign.d.ts +3 -0
  27. package/node_modules/liquidjs/dist/builtin/tags/block.d.ts +8 -0
  28. package/node_modules/liquidjs/dist/builtin/tags/break.d.ts +5 -0
  29. package/node_modules/liquidjs/dist/builtin/tags/capture.d.ts +3 -0
  30. package/node_modules/liquidjs/dist/builtin/tags/case.d.ts +3 -0
  31. package/node_modules/liquidjs/dist/builtin/tags/comment.d.ts +3 -0
  32. package/node_modules/liquidjs/dist/builtin/tags/continue.d.ts +5 -0
  33. package/node_modules/liquidjs/dist/builtin/tags/cycle.d.ts +3 -0
  34. package/node_modules/liquidjs/dist/builtin/tags/decrement.d.ts +3 -0
  35. package/node_modules/liquidjs/dist/builtin/tags/echo.d.ts +3 -0
  36. package/node_modules/liquidjs/dist/builtin/tags/for.d.ts +3 -0
  37. package/node_modules/liquidjs/dist/builtin/tags/if.d.ts +3 -0
  38. package/node_modules/liquidjs/dist/builtin/tags/include.d.ts +3 -0
  39. package/node_modules/liquidjs/dist/builtin/tags/increment.d.ts +3 -0
  40. package/node_modules/liquidjs/dist/builtin/tags/index.d.ts +5 -0
  41. package/node_modules/liquidjs/dist/builtin/tags/inline-comment.d.ts +3 -0
  42. package/node_modules/liquidjs/dist/builtin/tags/layout.d.ts +3 -0
  43. package/node_modules/liquidjs/dist/builtin/tags/liquid.d.ts +3 -0
  44. package/node_modules/liquidjs/dist/builtin/tags/raw.d.ts +3 -0
  45. package/node_modules/liquidjs/dist/builtin/tags/render.d.ts +13 -0
  46. package/node_modules/liquidjs/dist/builtin/tags/tablerow.d.ts +3 -0
  47. package/node_modules/liquidjs/dist/builtin/tags/unless.d.ts +3 -0
  48. package/node_modules/liquidjs/dist/cache/cache.d.ts +7 -0
  49. package/node_modules/liquidjs/dist/cache/lru.d.ts +14 -0
  50. package/node_modules/liquidjs/dist/context/block-mode.d.ts +5 -0
  51. package/node_modules/liquidjs/dist/context/context.d.ts +53 -0
  52. package/node_modules/liquidjs/dist/context/scope.d.ts +6 -0
  53. package/node_modules/liquidjs/dist/drop/blank-drop.d.ts +4 -0
  54. package/node_modules/liquidjs/dist/drop/block-drop.d.ts +10 -0
  55. package/node_modules/liquidjs/dist/drop/comparable.d.ts +8 -0
  56. package/node_modules/liquidjs/dist/drop/drop.d.ts +3 -0
  57. package/node_modules/liquidjs/dist/drop/empty-drop.d.ts +10 -0
  58. package/node_modules/liquidjs/dist/drop/forloop-drop.d.ts +15 -0
  59. package/node_modules/liquidjs/dist/drop/null-drop.d.ts +10 -0
  60. package/node_modules/liquidjs/dist/drop/tablerowloop-drop.d.ts +10 -0
  61. package/node_modules/liquidjs/dist/emitters/emitter.d.ts +11 -0
  62. package/node_modules/liquidjs/dist/emitters/keeping-type-emitter.d.ts +5 -0
  63. package/node_modules/liquidjs/dist/emitters/simple-emitter.d.ts +5 -0
  64. package/node_modules/liquidjs/dist/emitters/streamed-emitter-browser.d.ts +10 -0
  65. package/node_modules/liquidjs/dist/emitters/streamed-emitter.d.ts +9 -0
  66. package/node_modules/liquidjs/dist/fs/browser.d.ts +7 -0
  67. package/node_modules/liquidjs/dist/fs/fs.d.ts +20 -0
  68. package/node_modules/liquidjs/dist/fs/loader.d.ts +24 -0
  69. package/node_modules/liquidjs/dist/fs/node-require.d.ts +2 -0
  70. package/node_modules/liquidjs/dist/fs/node.d.ts +9 -0
  71. package/node_modules/liquidjs/dist/liquid-options.d.ts +128 -0
  72. package/node_modules/liquidjs/dist/liquid.browser.esm.js +3523 -0
  73. package/node_modules/liquidjs/dist/liquid.browser.min.js +2 -0
  74. package/node_modules/liquidjs/dist/liquid.browser.min.js.map +1 -0
  75. package/node_modules/liquidjs/dist/liquid.browser.umd.js +4811 -0
  76. package/node_modules/liquidjs/dist/liquid.browser.umd.js.map +1 -0
  77. package/node_modules/liquidjs/dist/liquid.d.ts +43 -0
  78. package/node_modules/liquidjs/dist/liquid.node.cjs.js +4820 -0
  79. package/node_modules/liquidjs/dist/liquid.node.esm.js +3540 -0
  80. package/node_modules/liquidjs/dist/parser/filter-arg.d.ts +5 -0
  81. package/node_modules/liquidjs/dist/parser/match-operator.d.ts +2 -0
  82. package/node_modules/liquidjs/dist/parser/parse-stream.d.ts +16 -0
  83. package/node_modules/liquidjs/dist/parser/parse-string-literal.d.ts +1 -0
  84. package/node_modules/liquidjs/dist/parser/parser.d.ts +22 -0
  85. package/node_modules/liquidjs/dist/parser/token-kind.d.ts +15 -0
  86. package/node_modules/liquidjs/dist/parser/tokenizer.d.ts +66 -0
  87. package/node_modules/liquidjs/dist/parser/whitespace-ctrl.d.ts +3 -0
  88. package/node_modules/liquidjs/dist/render/boolean.d.ts +3 -0
  89. package/node_modules/liquidjs/dist/render/expression.d.ts +14 -0
  90. package/node_modules/liquidjs/dist/render/operator.d.ts +5 -0
  91. package/node_modules/liquidjs/dist/render/render.d.ts +8 -0
  92. package/node_modules/liquidjs/dist/template/filter/filter-impl-options.d.ts +4 -0
  93. package/node_modules/liquidjs/dist/template/filter/filter-impl.d.ts +6 -0
  94. package/node_modules/liquidjs/dist/template/filter/filter-map.d.ts +13 -0
  95. package/node_modules/liquidjs/dist/template/filter/filter.d.ts +12 -0
  96. package/node_modules/liquidjs/dist/template/html.d.ts +10 -0
  97. package/node_modules/liquidjs/dist/template/output.d.ts +11 -0
  98. package/node_modules/liquidjs/dist/template/tag/hash.d.ts +17 -0
  99. package/node_modules/liquidjs/dist/template/tag/tag-impl-options.d.ts +10 -0
  100. package/node_modules/liquidjs/dist/template/tag/tag-impl.d.ts +6 -0
  101. package/node_modules/liquidjs/dist/template/tag/tag-map.d.ts +6 -0
  102. package/node_modules/liquidjs/dist/template/tag/tag.d.ts +10 -0
  103. package/node_modules/liquidjs/dist/template/template-impl.d.ts +4 -0
  104. package/node_modules/liquidjs/dist/template/template.d.ts +7 -0
  105. package/node_modules/liquidjs/dist/template/value.d.ts +13 -0
  106. package/node_modules/liquidjs/dist/tokens/delimited-token.d.ts +8 -0
  107. package/node_modules/liquidjs/dist/tokens/filter-token.d.ts +7 -0
  108. package/node_modules/liquidjs/dist/tokens/hash-token.d.ts +12 -0
  109. package/node_modules/liquidjs/dist/tokens/html-token.d.ts +11 -0
  110. package/node_modules/liquidjs/dist/tokens/identifier-token.d.ts +10 -0
  111. package/node_modules/liquidjs/dist/tokens/liquid-tag-token.d.ts +7 -0
  112. package/node_modules/liquidjs/dist/tokens/literal-token.d.ts +9 -0
  113. package/node_modules/liquidjs/dist/tokens/number-token.d.ts +7 -0
  114. package/node_modules/liquidjs/dist/tokens/operator-token.d.ts +21 -0
  115. package/node_modules/liquidjs/dist/tokens/output-token.d.ts +5 -0
  116. package/node_modules/liquidjs/dist/tokens/property-access-token.d.ts +9 -0
  117. package/node_modules/liquidjs/dist/tokens/quoted-token.d.ts +8 -0
  118. package/node_modules/liquidjs/dist/tokens/range-token.d.ts +11 -0
  119. package/node_modules/liquidjs/dist/tokens/tag-token.d.ts +7 -0
  120. package/node_modules/liquidjs/dist/tokens/token.d.ts +12 -0
  121. package/node_modules/liquidjs/dist/tokens/toplevel-token.d.ts +4 -0
  122. package/node_modules/liquidjs/dist/tokens/value-token.d.ts +5 -0
  123. package/node_modules/liquidjs/dist/types.d.ts +30 -0
  124. package/node_modules/liquidjs/dist/util/assert.d.ts +1 -0
  125. package/node_modules/liquidjs/dist/util/async.d.ts +3 -0
  126. package/node_modules/liquidjs/dist/util/character.d.ts +8 -0
  127. package/node_modules/liquidjs/dist/util/collection.d.ts +2 -0
  128. package/node_modules/liquidjs/dist/util/error.d.ts +29 -0
  129. package/node_modules/liquidjs/dist/util/liquid-date.d.ts +19 -0
  130. package/node_modules/liquidjs/dist/util/literal.d.ts +11 -0
  131. package/node_modules/liquidjs/dist/util/operator-trie.d.ts +5 -0
  132. package/node_modules/liquidjs/dist/util/strftime.d.ts +2 -0
  133. package/node_modules/liquidjs/dist/util/timezone-date.d.ts +39 -0
  134. package/node_modules/liquidjs/dist/util/type-guards.d.ts +22 -0
  135. package/node_modules/liquidjs/dist/util/underscore.d.ts +37 -0
  136. package/node_modules/liquidjs/package.json +165 -0
  137. package/package.json +133 -0
@@ -0,0 +1,5 @@
1
+ import { ValueToken } from '../tokens/value-token';
2
+ declare type KeyValuePair = [string?, ValueToken?];
3
+ export declare type FilterArg = ValueToken | KeyValuePair;
4
+ export declare function isKeyValuePair(arr: FilterArg): arr is KeyValuePair;
5
+ export {};
@@ -0,0 +1,2 @@
1
+ import { Trie } from '../util/operator-trie';
2
+ export declare function matchOperator(str: string, begin: number, trie: Trie, end?: number): number;
@@ -0,0 +1,16 @@
1
+ import { Token } from '../tokens/token';
2
+ import { Template } from '../template/template';
3
+ import { TopLevelToken } from '../tokens/toplevel-token';
4
+ declare type ParseToken<T extends Token> = ((token: T, remainTokens: T[]) => Template);
5
+ export declare class ParseStream<T extends Token = TopLevelToken> {
6
+ private tokens;
7
+ private handlers;
8
+ private stopRequested;
9
+ private parseToken;
10
+ constructor(tokens: T[], parseToken: ParseToken<T>);
11
+ on<T2 extends Template | T | undefined>(name: string, cb: (this: ParseStream, arg: T2) => void): ParseStream<T>;
12
+ private trigger;
13
+ start(): this;
14
+ stop(): this;
15
+ }
16
+ export {};
@@ -0,0 +1 @@
1
+ export declare function parseStringLiteral(str: string): string;
@@ -0,0 +1,22 @@
1
+ import { Liquid } from '../liquid';
2
+ import { ParseStream } from './parse-stream';
3
+ import { Tag } from '../template/tag/tag';
4
+ import { Output } from '../template/output';
5
+ import { HTML } from '../template/html';
6
+ import { Template } from '../template/template';
7
+ import { TopLevelToken } from '../tokens/toplevel-token';
8
+ import { LookupType } from '../fs/loader';
9
+ export default class Parser {
10
+ parseFile: (file: string, sync?: boolean, type?: LookupType, currentFile?: string) => Generator<unknown, Template[], Template[] | string>;
11
+ private liquid;
12
+ private fs;
13
+ private cache?;
14
+ private loader;
15
+ constructor(liquid: Liquid);
16
+ parse(html: string, filepath?: string): Template[];
17
+ parseTokens(tokens: TopLevelToken[]): Template[];
18
+ parseToken(token: TopLevelToken, remainTokens: TopLevelToken[]): Tag | Output | HTML;
19
+ parseStream(tokens: TopLevelToken[]): ParseStream<TopLevelToken>;
20
+ private _parseFileCached;
21
+ private _parseFile;
22
+ }
@@ -0,0 +1,15 @@
1
+ export declare enum TokenKind {
2
+ Number = 1,
3
+ Literal = 2,
4
+ Tag = 4,
5
+ Output = 8,
6
+ HTML = 16,
7
+ Filter = 32,
8
+ Hash = 64,
9
+ PropertyAccess = 128,
10
+ Word = 256,
11
+ Range = 512,
12
+ Quoted = 1024,
13
+ Operator = 2048,
14
+ Delimited = 12
15
+ }
@@ -0,0 +1,66 @@
1
+ import { IdentifierToken } from '../tokens/identifier-token';
2
+ import { OperatorToken } from '../tokens/operator-token';
3
+ import { TopLevelToken } from '../tokens/toplevel-token';
4
+ import { FilterArg } from './filter-arg';
5
+ import { FilterToken } from '../tokens/filter-token';
6
+ import { HashToken } from '../tokens/hash-token';
7
+ import { QuotedToken } from '../tokens/quoted-token';
8
+ import { HTMLToken } from '../tokens/html-token';
9
+ import { TagToken } from '../tokens/tag-token';
10
+ import { Token } from '../tokens/token';
11
+ import { RangeToken } from '../tokens/range-token';
12
+ import { ValueToken } from '../tokens/value-token';
13
+ import { OutputToken } from '../tokens/output-token';
14
+ import { TokenizationError } from '../util/error';
15
+ import { NormalizedFullOptions } from '../liquid-options';
16
+ import { Trie } from '../util/operator-trie';
17
+ import { Expression } from '../render/expression';
18
+ import { LiquidTagToken } from '../tokens/liquid-tag-token';
19
+ export declare class Tokenizer {
20
+ input: string;
21
+ private trie;
22
+ file: string;
23
+ p: number;
24
+ N: number;
25
+ private rawBeginAt;
26
+ constructor(input: string, trie?: Trie, file?: string);
27
+ readExpression(): Expression;
28
+ readExpressionTokens(): IterableIterator<Token>;
29
+ readOperator(): OperatorToken | undefined;
30
+ readFilters(): FilterToken[];
31
+ readFilter(): FilterToken | null;
32
+ readFilterArg(): FilterArg | undefined;
33
+ readTopLevelTokens(options?: NormalizedFullOptions): TopLevelToken[];
34
+ readTopLevelToken(options: NormalizedFullOptions): TopLevelToken;
35
+ readHTMLToken(stopStrings: string[]): HTMLToken;
36
+ readTagToken(options?: NormalizedFullOptions): TagToken;
37
+ readToDelimiter(delimiter: string): number;
38
+ readOutputToken(options?: NormalizedFullOptions): OutputToken;
39
+ readEndrawOrRawContent(options: NormalizedFullOptions): HTMLToken | TagToken;
40
+ readLiquidTagTokens(options?: NormalizedFullOptions): LiquidTagToken[];
41
+ readLiquidTagToken(options: NormalizedFullOptions): LiquidTagToken;
42
+ mkError(msg: string, begin: number): TokenizationError;
43
+ snapshot(begin?: number): string;
44
+ /**
45
+ * @deprecated
46
+ */
47
+ readWord(): IdentifierToken;
48
+ readIdentifier(): IdentifierToken;
49
+ readTagName(): string;
50
+ readHashes(jekyllStyle?: boolean): HashToken[];
51
+ readHash(jekyllStyle?: boolean): HashToken | undefined;
52
+ remaining(): string;
53
+ advance(i?: number): void;
54
+ end(): boolean;
55
+ readTo(end: string): number;
56
+ readValue(): ValueToken | undefined;
57
+ readRange(): RangeToken | undefined;
58
+ readValueOrThrow(): ValueToken;
59
+ readQuoted(): QuotedToken | undefined;
60
+ readFileNameTemplate(options: NormalizedFullOptions): IterableIterator<TopLevelToken>;
61
+ match(word: string): boolean;
62
+ rmatch(pattern: string): boolean;
63
+ peekType(n?: number): number;
64
+ peek(n?: number): string;
65
+ skipBlank(): void;
66
+ }
@@ -0,0 +1,3 @@
1
+ import { Token } from '../tokens/token';
2
+ import { NormalizedFullOptions } from '../liquid-options';
3
+ export declare function whiteSpaceCtrl(tokens: Token[], options: NormalizedFullOptions): void;
@@ -0,0 +1,3 @@
1
+ import { Context } from '../context/context';
2
+ export declare function isTruthy(val: any, ctx: Context): boolean;
3
+ export declare function isFalsy(val: any, ctx: Context): boolean;
@@ -0,0 +1,14 @@
1
+ import { QuotedToken } from '../tokens/quoted-token';
2
+ import { Token } from '../tokens/token';
3
+ import { Context } from '../context/context';
4
+ export declare class Expression {
5
+ private postfix;
6
+ constructor(tokens: IterableIterator<Token>);
7
+ evaluate(ctx: Context, lenient?: boolean): Generator<unknown, unknown, unknown>;
8
+ }
9
+ /**
10
+ * @deprecated use `_evalToken` instead
11
+ */
12
+ export declare function evalToken(token: Token | undefined, ctx: Context, lenient?: boolean): Generator<never, any, unknown>;
13
+ export declare function _evalToken(token: Token | undefined, ctx: Context, lenient?: boolean): IterableIterator<unknown>;
14
+ export declare function evalQuotedToken(token: QuotedToken): string;
@@ -0,0 +1,5 @@
1
+ import { Context } from '../context/context';
2
+ export interface Operators {
3
+ [key: string]: (lhs: any, rhs: any, ctx: Context) => boolean;
4
+ }
5
+ export declare const defaultOperators: Operators;
@@ -0,0 +1,8 @@
1
+ /// <reference types="node" />
2
+ import { Context } from '../context/context';
3
+ import { Template } from '../template/template';
4
+ import { Emitter } from '../emitters/emitter';
5
+ export declare class Render {
6
+ renderTemplatesToNodeStream(templates: Template[], ctx: Context): NodeJS.ReadableStream;
7
+ renderTemplates(templates: Template[], ctx: Context, emitter?: Emitter): IterableIterator<any>;
8
+ }
@@ -0,0 +1,4 @@
1
+ import { FilterImpl } from './filter-impl';
2
+ export interface FilterImplOptions {
3
+ (this: FilterImpl, value: any, ...args: any[]): any;
4
+ }
@@ -0,0 +1,6 @@
1
+ import { Context } from '../../context/context';
2
+ import { Liquid } from '../../liquid';
3
+ export interface FilterImpl {
4
+ context: Context;
5
+ liquid: Liquid;
6
+ }
@@ -0,0 +1,13 @@
1
+ import { FilterImplOptions } from './filter-impl-options';
2
+ import { Filter } from './filter';
3
+ import { FilterArg } from '../../parser/filter-arg';
4
+ import { Liquid } from '../../liquid';
5
+ export declare class FilterMap {
6
+ private readonly strictFilters;
7
+ private readonly liquid;
8
+ private impls;
9
+ constructor(strictFilters: boolean, liquid: Liquid);
10
+ get(name: string): FilterImplOptions;
11
+ set(name: string, impl: FilterImplOptions): void;
12
+ create(name: string, args: FilterArg[]): Filter;
13
+ }
@@ -0,0 +1,12 @@
1
+ import { Context } from '../../context/context';
2
+ import { FilterImplOptions } from './filter-impl-options';
3
+ import { FilterArg } from '../../parser/filter-arg';
4
+ import { Liquid } from '../../liquid';
5
+ export declare class Filter {
6
+ name: string;
7
+ args: FilterArg[];
8
+ private impl;
9
+ private liquid;
10
+ constructor(name: string, impl: FilterImplOptions, args: FilterArg[], liquid: Liquid);
11
+ render(value: any, context: Context): IterableIterator<unknown>;
12
+ }
@@ -0,0 +1,10 @@
1
+ import { TemplateImpl } from '../template/template-impl';
2
+ import { Template } from '../template/template';
3
+ import { HTMLToken } from '../tokens/html-token';
4
+ import { Context } from '../context/context';
5
+ import { Emitter } from '../emitters/emitter';
6
+ export declare class HTML extends TemplateImpl<HTMLToken> implements Template {
7
+ private str;
8
+ constructor(token: HTMLToken);
9
+ render(ctx: Context, emitter: Emitter): IterableIterator<void>;
10
+ }
@@ -0,0 +1,11 @@
1
+ import { TemplateImpl } from '../template/template-impl';
2
+ import { Template } from '../template/template';
3
+ import { Context } from '../context/context';
4
+ import { Emitter } from '../emitters/emitter';
5
+ import { OutputToken } from '../tokens/output-token';
6
+ import { Liquid } from '../liquid';
7
+ export declare class Output extends TemplateImpl<OutputToken> implements Template {
8
+ private value;
9
+ constructor(token: OutputToken, liquid: Liquid);
10
+ render(ctx: Context, emitter: Emitter): IterableIterator<unknown>;
11
+ }
@@ -0,0 +1,17 @@
1
+ import { Context } from '../../context/context';
2
+ export interface HashValue {
3
+ [key: string]: any;
4
+ }
5
+ /**
6
+ * Key-Value Pairs Representing Tag Arguments
7
+ * Example:
8
+ * For the markup `, foo:'bar', coo:2 reversed %}`,
9
+ * hash['foo'] === 'bar'
10
+ * hash['coo'] === 2
11
+ * hash['reversed'] === undefined
12
+ */
13
+ export declare class Hash {
14
+ hash: HashValue;
15
+ constructor(markup: string, jekyllStyle?: boolean);
16
+ render(ctx: Context): Generator<unknown, HashValue, unknown>;
17
+ }
@@ -0,0 +1,10 @@
1
+ import { Context } from '../../context/context';
2
+ import { TagToken } from '../../tokens/tag-token';
3
+ import { TopLevelToken } from '../../tokens/toplevel-token';
4
+ import { TagImpl } from './tag-impl';
5
+ import { HashValue } from '../../template/tag/hash';
6
+ import { Emitter } from '../../emitters/emitter';
7
+ export interface TagImplOptions {
8
+ parse?: (this: TagImpl, token: TagToken, remainingTokens: TopLevelToken[]) => void;
9
+ render: (this: TagImpl, ctx: Context, emitter: Emitter, hash: HashValue) => void | string | Promise<void | string> | Generator<unknown, void | string, unknown>;
10
+ }
@@ -0,0 +1,6 @@
1
+ import { Liquid } from '../../liquid';
2
+ import { TagImplOptions } from './tag-impl-options';
3
+ export interface TagImpl extends TagImplOptions {
4
+ liquid: Liquid;
5
+ [key: string]: any;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { TagImplOptions } from './tag-impl-options';
2
+ export declare class TagMap {
3
+ private impls;
4
+ get(name: string): TagImplOptions;
5
+ set(name: string, impl: TagImplOptions): void;
6
+ }
@@ -0,0 +1,10 @@
1
+ import { Liquid } from '../../liquid';
2
+ import { TemplateImpl } from '../../template/template-impl';
3
+ import { Emitter, Context, TagToken, Template, TopLevelToken } from '../../types';
4
+ import { HashValue } from './hash';
5
+ export declare class Tag extends TemplateImpl<TagToken> implements Template {
6
+ name: string;
7
+ private impl;
8
+ constructor(token: TagToken, tokens: TopLevelToken[], liquid: Liquid);
9
+ render(ctx: Context, emitter: Emitter): Generator<unknown, unknown, HashValue | unknown>;
10
+ }
@@ -0,0 +1,4 @@
1
+ export declare abstract class TemplateImpl<T> {
2
+ token: T;
3
+ constructor(token: T);
4
+ }
@@ -0,0 +1,7 @@
1
+ import { Context } from '../context/context';
2
+ import { Token } from '../tokens/token';
3
+ import { Emitter } from '../emitters/emitter';
4
+ export interface Template {
5
+ token: Token;
6
+ render(ctx: Context, emitter: Emitter): any;
7
+ }
@@ -0,0 +1,13 @@
1
+ import { Expression } from '../render/expression';
2
+ import { Filter } from './filter/filter';
3
+ import { Context } from '../context/context';
4
+ import { Liquid } from '../liquid';
5
+ export declare class Value {
6
+ readonly filters: Filter[];
7
+ readonly initial: Expression;
8
+ /**
9
+ * @param str the value to be valuated, eg.: "foobar" | truncate: 3
10
+ */
11
+ constructor(str: string, liquid: Liquid);
12
+ value(ctx: Context, lenient: boolean): Generator<unknown, unknown, unknown>;
13
+ }
@@ -0,0 +1,8 @@
1
+ import { Token } from './token';
2
+ import { TokenKind } from '../parser/token-kind';
3
+ export declare abstract class DelimitedToken extends Token {
4
+ trimLeft: boolean;
5
+ trimRight: boolean;
6
+ content: string;
7
+ constructor(kind: TokenKind, content: string, input: string, begin: number, end: number, trimLeft: boolean, trimRight: boolean, file?: string);
8
+ }
@@ -0,0 +1,7 @@
1
+ import { Token } from './token';
2
+ import { FilterArg } from '../parser/filter-arg';
3
+ export declare class FilterToken extends Token {
4
+ name: string;
5
+ args: FilterArg[];
6
+ constructor(name: string, args: FilterArg[], input: string, begin: number, end: number, file?: string);
7
+ }
@@ -0,0 +1,12 @@
1
+ import { Token } from './token';
2
+ import { ValueToken } from './value-token';
3
+ import { IdentifierToken } from './identifier-token';
4
+ export declare class HashToken extends Token {
5
+ input: string;
6
+ begin: number;
7
+ end: number;
8
+ name: IdentifierToken;
9
+ value?: ValueToken | undefined;
10
+ file?: string | undefined;
11
+ constructor(input: string, begin: number, end: number, name: IdentifierToken, value?: ValueToken | undefined, file?: string | undefined);
12
+ }
@@ -0,0 +1,11 @@
1
+ import { Token } from './token';
2
+ export declare class HTMLToken extends Token {
3
+ input: string;
4
+ begin: number;
5
+ end: number;
6
+ file?: string | undefined;
7
+ trimLeft: number;
8
+ trimRight: number;
9
+ constructor(input: string, begin: number, end: number, file?: string | undefined);
10
+ getContent(): string;
11
+ }
@@ -0,0 +1,10 @@
1
+ import { Token } from './token';
2
+ export declare class IdentifierToken extends Token {
3
+ input: string;
4
+ begin: number;
5
+ end: number;
6
+ file?: string | undefined;
7
+ content: string;
8
+ constructor(input: string, begin: number, end: number, file?: string | undefined);
9
+ isNumber(allowSign?: boolean): boolean;
10
+ }
@@ -0,0 +1,7 @@
1
+ import { DelimitedToken } from './delimited-token';
2
+ import { NormalizedFullOptions } from '../liquid-options';
3
+ export declare class LiquidTagToken extends DelimitedToken {
4
+ name: string;
5
+ args: string;
6
+ constructor(input: string, begin: number, end: number, options: NormalizedFullOptions, file?: string);
7
+ }
@@ -0,0 +1,9 @@
1
+ import { Token } from './token';
2
+ export declare class LiteralToken extends Token {
3
+ input: string;
4
+ begin: number;
5
+ end: number;
6
+ file?: string | undefined;
7
+ literal: string;
8
+ constructor(input: string, begin: number, end: number, file?: string | undefined);
9
+ }
@@ -0,0 +1,7 @@
1
+ import { Token } from './token';
2
+ import { IdentifierToken } from './identifier-token';
3
+ export declare class NumberToken extends Token {
4
+ whole: IdentifierToken;
5
+ decimal?: IdentifierToken | undefined;
6
+ constructor(whole: IdentifierToken, decimal?: IdentifierToken | undefined);
7
+ }
@@ -0,0 +1,21 @@
1
+ import { Token } from './token';
2
+ export declare const precedence: {
3
+ '==': number;
4
+ '!=': number;
5
+ '>': number;
6
+ '<': number;
7
+ '>=': number;
8
+ '<=': number;
9
+ contains: number;
10
+ and: number;
11
+ or: number;
12
+ };
13
+ export declare class OperatorToken extends Token {
14
+ input: string;
15
+ begin: number;
16
+ end: number;
17
+ file?: string | undefined;
18
+ operator: string;
19
+ constructor(input: string, begin: number, end: number, file?: string | undefined);
20
+ getPrecedence(): any;
21
+ }
@@ -0,0 +1,5 @@
1
+ import { DelimitedToken } from './delimited-token';
2
+ import { NormalizedFullOptions } from '../liquid-options';
3
+ export declare class OutputToken extends DelimitedToken {
4
+ constructor(input: string, begin: number, end: number, options: NormalizedFullOptions, file?: string);
5
+ }
@@ -0,0 +1,9 @@
1
+ import { Token } from './token';
2
+ import { IdentifierToken } from './identifier-token';
3
+ import { QuotedToken } from './quoted-token';
4
+ export declare class PropertyAccessToken extends Token {
5
+ variable: IdentifierToken | QuotedToken;
6
+ props: (IdentifierToken | QuotedToken | PropertyAccessToken)[];
7
+ propertyName: string;
8
+ constructor(variable: IdentifierToken | QuotedToken, props: (IdentifierToken | QuotedToken | PropertyAccessToken)[], end: number);
9
+ }
@@ -0,0 +1,8 @@
1
+ import { Token } from './token';
2
+ export declare class QuotedToken extends Token {
3
+ input: string;
4
+ begin: number;
5
+ end: number;
6
+ file?: string | undefined;
7
+ constructor(input: string, begin: number, end: number, file?: string | undefined);
8
+ }
@@ -0,0 +1,11 @@
1
+ import { Token } from './token';
2
+ import { ValueToken } from './value-token';
3
+ export declare class RangeToken extends Token {
4
+ input: string;
5
+ begin: number;
6
+ end: number;
7
+ lhs: ValueToken;
8
+ rhs: ValueToken;
9
+ file?: string | undefined;
10
+ constructor(input: string, begin: number, end: number, lhs: ValueToken, rhs: ValueToken, file?: string | undefined);
11
+ }
@@ -0,0 +1,7 @@
1
+ import { DelimitedToken } from './delimited-token';
2
+ import { NormalizedFullOptions } from '../liquid-options';
3
+ export declare class TagToken extends DelimitedToken {
4
+ name: string;
5
+ args: string;
6
+ constructor(input: string, begin: number, end: number, options: NormalizedFullOptions, file?: string);
7
+ }
@@ -0,0 +1,12 @@
1
+ import { TokenKind } from '../parser/token-kind';
2
+ export declare abstract class Token {
3
+ kind: TokenKind;
4
+ input: string;
5
+ begin: number;
6
+ end: number;
7
+ file?: string | undefined;
8
+ constructor(kind: TokenKind, input: string, begin: number, end: number, file?: string | undefined);
9
+ getText(): string;
10
+ getPosition(): number[];
11
+ size(): number;
12
+ }
@@ -0,0 +1,4 @@
1
+ import { TagToken } from './tag-token';
2
+ import { HTMLToken } from './html-token';
3
+ import { OutputToken } from './output-token';
4
+ export declare type TopLevelToken = TagToken | OutputToken | HTMLToken;
@@ -0,0 +1,5 @@
1
+ import { RangeToken } from './range-token';
2
+ import { LiteralToken } from './literal-token';
3
+ import { QuotedToken } from './quoted-token';
4
+ import { PropertyAccessToken } from './property-access-token';
5
+ export declare type ValueToken = RangeToken | LiteralToken | QuotedToken | PropertyAccessToken;
@@ -0,0 +1,30 @@
1
+ import * as TypeGuards from './util/type-guards';
2
+ export { TypeGuards };
3
+ export { ParseError, TokenizationError, AssertionError } from './util/error';
4
+ export { assert } from './util/assert';
5
+ export { Drop } from './drop/drop';
6
+ export { Emitter } from './emitters/emitter';
7
+ export { Expression } from './render/expression';
8
+ export { isFalsy, isTruthy } from './render/boolean';
9
+ export { TagToken } from './tokens/tag-token';
10
+ export { Context } from './context/context';
11
+ export { Template } from './template/template';
12
+ export { FilterImplOptions } from './template/filter/filter-impl-options';
13
+ export { TagImplOptions } from './template/tag/tag-impl-options';
14
+ export { TagImpl } from './template/tag/tag-impl';
15
+ export { ParseStream } from './parser/parse-stream';
16
+ export { Token } from './tokens/token';
17
+ export { TokenKind } from './parser/token-kind';
18
+ export { TopLevelToken } from './tokens/toplevel-token';
19
+ export { Tokenizer } from './parser/tokenizer';
20
+ export { Hash } from './template/tag/hash';
21
+ export { Value } from './template/value';
22
+ export { _evalToken, evalToken, evalQuotedToken } from './render/expression';
23
+ export { toPromise, toThenable, toValueSync } from './util/async';
24
+ export { defaultOperators, Operators } from './render/operator';
25
+ export { createTrie, Trie } from './util/operator-trie';
26
+ export { toValue } from './util/underscore';
27
+ export { TimezoneDate } from './util/timezone-date';
28
+ export * as filters from './builtin/filters';
29
+ export * as tags from './builtin/tags';
30
+ export { defaultOptions } from './liquid-options';
@@ -0,0 +1 @@
1
+ export declare function assert<T>(predicate: T | null | undefined, message?: string | (() => string)): void;
@@ -0,0 +1,3 @@
1
+ export declare function toPromise<T>(val: Generator<unknown, T, unknown> | Promise<T> | T): Promise<T>;
2
+ export declare function toValueSync<T>(val: Generator<unknown, T, unknown> | T): T;
3
+ export declare const toThenable: typeof toPromise;
@@ -0,0 +1,8 @@
1
+ export declare const TYPES: number[];
2
+ export declare const IDENTIFIER = 1;
3
+ export declare const OPERATOR = 2;
4
+ export declare const BLANK = 4;
5
+ export declare const QUOTE = 8;
6
+ export declare const INLINE_BLANK = 16;
7
+ export declare const NUMBER = 32;
8
+ export declare const SIGN = 64;
@@ -0,0 +1,2 @@
1
+ export declare function toEnumerable(val: any): any[];
2
+ export declare function toArray(val: any): any[];
@@ -0,0 +1,29 @@
1
+ import { Token } from '../tokens/token';
2
+ import { Template } from '../template/template';
3
+ export declare abstract class LiquidError extends Error {
4
+ private token;
5
+ context: string;
6
+ private originalError;
7
+ constructor(err: Error, token: Token);
8
+ protected update(): void;
9
+ }
10
+ export declare class TokenizationError extends LiquidError {
11
+ constructor(message: string, token: Token);
12
+ }
13
+ export declare class ParseError extends LiquidError {
14
+ constructor(err: Error, token: Token);
15
+ }
16
+ export declare class RenderError extends LiquidError {
17
+ constructor(err: Error, tpl: Template);
18
+ static is(obj: any): obj is RenderError;
19
+ }
20
+ export declare class UndefinedVariableError extends LiquidError {
21
+ constructor(err: Error, token: Token);
22
+ }
23
+ export declare class InternalUndefinedVariableError extends Error {
24
+ variableName: string;
25
+ constructor(variableName: string);
26
+ }
27
+ export declare class AssertionError extends Error {
28
+ constructor(message: string);
29
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The date interface LiquidJS uses.
3
+ * Basically a subset of JavaScript Date,
4
+ * it's defined abstractly here to allow different implementation
5
+ */
6
+ export interface LiquidDate {
7
+ getTime(): number;
8
+ getMilliseconds(): number;
9
+ getSeconds(): number;
10
+ getMinutes(): number;
11
+ getHours(): number;
12
+ getDay(): number;
13
+ getDate(): number;
14
+ getMonth(): number;
15
+ getFullYear(): number;
16
+ getTimezoneOffset(): number;
17
+ toLocaleTimeString(): string;
18
+ toLocaleDateString(): string;
19
+ }