Initial commit: 11ty website with Fire/Frost branding
This commit is contained in:
85
node_modules/liquidjs/dist/template/analysis.d.ts
generated
vendored
Normal file
85
node_modules/liquidjs/dist/template/analysis.d.ts
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
import { Template } from '.';
|
||||
/**
|
||||
* Row, column and file name where a variable was found.
|
||||
*/
|
||||
export interface VariableLocation {
|
||||
row: number;
|
||||
col: number;
|
||||
file?: string;
|
||||
}
|
||||
/**
|
||||
* A variable's segments as an array, possibly with nested arrays of segments.
|
||||
*/
|
||||
export type SegmentArray = Array<string | number | SegmentArray>;
|
||||
/**
|
||||
* A variable's segments and location, which can be coerced to a string.
|
||||
*/
|
||||
export declare class Variable {
|
||||
readonly segments: Array<string | number | Variable>;
|
||||
readonly location: VariableLocation;
|
||||
constructor(segments: Array<string | number | Variable>, location: VariableLocation);
|
||||
toString(): string;
|
||||
/** Return this variable's segments as an array, possibly with nested arrays for nested paths. */
|
||||
toArray(): SegmentArray;
|
||||
}
|
||||
/**
|
||||
* Property names and array indexes that make up a path to a variable.
|
||||
*/
|
||||
export type VariableSegments = Array<string | number | Variable>;
|
||||
/**
|
||||
* A mapping of variable names to an array of locations at which the variable was found.
|
||||
*/
|
||||
export type Variables = {
|
||||
[key: string]: Variable[];
|
||||
};
|
||||
/**
|
||||
* Group variables by the string representation of their root segment.
|
||||
*/
|
||||
export declare class VariableMap {
|
||||
private map;
|
||||
constructor();
|
||||
get(key: Variable): Variable[];
|
||||
has(key: Variable): boolean;
|
||||
push(variable: Variable): void;
|
||||
asObject(): Variables;
|
||||
}
|
||||
/**
|
||||
* The result of calling `analyze()` or `analyzeSync()`.
|
||||
*/
|
||||
export interface StaticAnalysis {
|
||||
/**
|
||||
* All variables, whether they are in scope or not. Including references to names
|
||||
* such as `forloop` from the `for` tag.
|
||||
*/
|
||||
variables: Variables;
|
||||
/**
|
||||
* Variables that are not in scope. These could be a "global" variables that are
|
||||
* expected to be provided by the application developer, or possible mistakes
|
||||
* from the template author.
|
||||
*
|
||||
* If a variable is referenced before and after assignment, you should expect
|
||||
* that variable to be included in `globals`, `variables` and `locals`, each with
|
||||
* a different location.
|
||||
*/
|
||||
globals: Variables;
|
||||
/**
|
||||
* Template variables that are added to the template local scope using tags like
|
||||
* `assign`, `capture` or `increment`.
|
||||
*/
|
||||
locals: Variables;
|
||||
}
|
||||
export interface StaticAnalysisOptions {
|
||||
/**
|
||||
* When `true` (the default), try to load partial templates and analyze them too.
|
||||
*/
|
||||
partials?: boolean;
|
||||
}
|
||||
export declare const defaultStaticAnalysisOptions: StaticAnalysisOptions;
|
||||
/**
|
||||
* Statically analyze a template and report variable usage.
|
||||
*/
|
||||
export declare function analyze(template: Template[], options?: StaticAnalysisOptions): Promise<StaticAnalysis>;
|
||||
/**
|
||||
* Statically analyze a template and report variable usage.
|
||||
*/
|
||||
export declare function analyzeSync(template: Template[], options?: StaticAnalysisOptions): StaticAnalysis;
|
||||
1
node_modules/liquidjs/dist/template/analysis.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/template/analysis.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
14
node_modules/liquidjs/dist/template/filter-impl-options.d.ts
generated
vendored
Normal file
14
node_modules/liquidjs/dist/template/filter-impl-options.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import type { Context } from '../context';
|
||||
import type { Liquid } from '../liquid';
|
||||
import type { FilterToken } from '../tokens';
|
||||
export interface FilterImpl {
|
||||
context: Context;
|
||||
token: FilterToken;
|
||||
liquid: Liquid;
|
||||
}
|
||||
export type FilterHandler = (this: FilterImpl, value: any, ...args: any[]) => any;
|
||||
export interface FilterOptions {
|
||||
handler: FilterHandler;
|
||||
raw: boolean;
|
||||
}
|
||||
export type FilterImplOptions = FilterHandler | FilterOptions;
|
||||
15
node_modules/liquidjs/dist/template/filter.d.ts
generated
vendored
Normal file
15
node_modules/liquidjs/dist/template/filter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Context } from '../context';
|
||||
import { FilterImplOptions } from './filter-impl-options';
|
||||
import { FilterArg } from '../parser/filter-arg';
|
||||
import { Liquid } from '../liquid';
|
||||
import { FilterToken } from '../tokens';
|
||||
export declare class Filter {
|
||||
name: string;
|
||||
args: FilterArg[];
|
||||
readonly raw: boolean;
|
||||
private handler;
|
||||
private liquid;
|
||||
private token;
|
||||
constructor(token: FilterToken, options: FilterImplOptions | undefined, liquid: Liquid);
|
||||
render(value: any, context: Context): IterableIterator<unknown>;
|
||||
}
|
||||
1
node_modules/liquidjs/dist/template/filter.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/template/filter.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
18
node_modules/liquidjs/dist/template/hash.d.ts
generated
vendored
Normal file
18
node_modules/liquidjs/dist/template/hash.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Context } from '../context/context';
|
||||
import { Tokenizer } from '../parser/tokenizer';
|
||||
import { Token } from '../tokens/token';
|
||||
type HashValueTokens = Record<string, Token | undefined>;
|
||||
/**
|
||||
* Key-Value Pairs Representing Tag Arguments
|
||||
* Example:
|
||||
* For the markup `, foo:'bar', coo:2 reversed %}`,
|
||||
* hash['foo'] === 'bar'
|
||||
* hash['coo'] === 2
|
||||
* hash['reversed'] === undefined
|
||||
*/
|
||||
export declare class Hash {
|
||||
hash: HashValueTokens;
|
||||
constructor(input: string | Tokenizer, jekyllStyle?: boolean | string);
|
||||
render(ctx: Context): Generator<unknown, Record<string, any>, unknown>;
|
||||
}
|
||||
export {};
|
||||
1
node_modules/liquidjs/dist/template/hash.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/template/hash.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
9
node_modules/liquidjs/dist/template/html.d.ts
generated
vendored
Normal file
9
node_modules/liquidjs/dist/template/html.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { TemplateImpl, Template } from '../template';
|
||||
import { HTMLToken } from '../tokens';
|
||||
import { Context } from '../context';
|
||||
import { Emitter } from '../emitters';
|
||||
export declare class HTML extends TemplateImpl<HTMLToken> implements Template {
|
||||
private str;
|
||||
constructor(token: HTMLToken);
|
||||
render(ctx: Context, emitter: Emitter): IterableIterator<void>;
|
||||
}
|
||||
11
node_modules/liquidjs/dist/template/index.d.ts
generated
vendored
Normal file
11
node_modules/liquidjs/dist/template/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
export * from './template';
|
||||
export * from './template-impl';
|
||||
export * from './tag';
|
||||
export * from './tag-options-adapter';
|
||||
export * from './filter';
|
||||
export * from './filter-impl-options';
|
||||
export * from './hash';
|
||||
export * from './value';
|
||||
export * from './output';
|
||||
export * from './html';
|
||||
export * from './analysis';
|
||||
12
node_modules/liquidjs/dist/template/output.d.ts
generated
vendored
Normal file
12
node_modules/liquidjs/dist/template/output.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Value } from './value';
|
||||
import { Arguments, Template, TemplateImpl } from '../template';
|
||||
import { Context } from '../context/context';
|
||||
import { Emitter } from '../emitters/emitter';
|
||||
import { OutputToken } from '../tokens/output-token';
|
||||
import { Liquid } from '../liquid';
|
||||
export declare class Output extends TemplateImpl<OutputToken> implements Template {
|
||||
value: Value;
|
||||
constructor(token: OutputToken, liquid: Liquid);
|
||||
render(ctx: Context, emitter: Emitter): IterableIterator<unknown>;
|
||||
arguments(): Arguments;
|
||||
}
|
||||
1
node_modules/liquidjs/dist/template/output.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/template/output.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
10
node_modules/liquidjs/dist/template/tag-options-adapter.d.ts
generated
vendored
Normal file
10
node_modules/liquidjs/dist/template/tag-options-adapter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Tag, TagClass, TagRenderReturn } from './tag';
|
||||
import { TagToken, TopLevelToken } from '../tokens';
|
||||
import { Emitter } from '../emitters';
|
||||
import { Context } from '../context';
|
||||
export interface TagImplOptions {
|
||||
[key: string]: any;
|
||||
parse?: (this: Tag & TagImplOptions, token: TagToken, remainingTokens: TopLevelToken[]) => void;
|
||||
render: (this: Tag & TagImplOptions, ctx: Context, emitter: Emitter, hash: Record<string, any>) => TagRenderReturn;
|
||||
}
|
||||
export declare function createTagClass(options: TagImplOptions): TagClass;
|
||||
18
node_modules/liquidjs/dist/template/tag.d.ts
generated
vendored
Normal file
18
node_modules/liquidjs/dist/template/tag.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { TemplateImpl } from './template-impl';
|
||||
import type { Emitter } from '../emitters/emitter';
|
||||
import type { Parser, Tokenizer } from '../parser';
|
||||
import type { Context } from '../context/context';
|
||||
import type { TopLevelToken, TagToken } from '../tokens';
|
||||
import type { Template } from './template';
|
||||
import type { Liquid } from '../liquid';
|
||||
export type TagRenderReturn = Generator<unknown, unknown, unknown> | Promise<unknown> | unknown;
|
||||
export declare abstract class Tag extends TemplateImpl<TagToken> implements Template {
|
||||
name: string;
|
||||
liquid: Liquid;
|
||||
protected tokenizer: Tokenizer;
|
||||
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
||||
abstract render(ctx: Context, emitter: Emitter): TagRenderReturn;
|
||||
}
|
||||
export interface TagClass {
|
||||
new (token: TagToken, tokens: TopLevelToken[], liquid: Liquid, parser: Parser): Tag;
|
||||
}
|
||||
4
node_modules/liquidjs/dist/template/template-impl.d.ts
generated
vendored
Normal file
4
node_modules/liquidjs/dist/template/template-impl.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare abstract class TemplateImpl<T> {
|
||||
token: T;
|
||||
constructor(token: T);
|
||||
}
|
||||
36
node_modules/liquidjs/dist/template/template.d.ts
generated
vendored
Normal file
36
node_modules/liquidjs/dist/template/template.d.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import { Context } from '../context/context';
|
||||
import { Token } from '../tokens/token';
|
||||
import { Emitter } from '../emitters/emitter';
|
||||
import { IdentifierToken, QuotedToken, ValueToken } from '../tokens';
|
||||
import { Value } from './value';
|
||||
export type Argument = Value | ValueToken;
|
||||
export type Arguments = Iterable<Argument>;
|
||||
/** Scope information used when analyzing partial templates. */
|
||||
export interface PartialScope {
|
||||
/**
|
||||
* The name of the partial template. We need this to make sure we only analyze
|
||||
* each template once.
|
||||
* */
|
||||
name: string;
|
||||
/**
|
||||
* If `true`, names in `scope` will be added to a new, isolated scope before
|
||||
* analyzing any child templates, without access to the parent template's scope.
|
||||
*/
|
||||
isolated: boolean;
|
||||
/**
|
||||
* A list of names that will be in scope for the child template.
|
||||
*
|
||||
* If an item is a [string, Argument] tuple, the string is considered an alias
|
||||
* for the argument.
|
||||
*/
|
||||
scope: Iterable<string | [string, Argument]>;
|
||||
}
|
||||
export interface Template {
|
||||
token: Token;
|
||||
render(ctx: Context, emitter: Emitter): any;
|
||||
children?(partials: boolean, sync: boolean): Generator<unknown, Template[]>;
|
||||
arguments?(): Arguments;
|
||||
blockScope?(): Iterable<string>;
|
||||
localScope?(): Iterable<IdentifierToken | QuotedToken>;
|
||||
partialScope?(): PartialScope | undefined;
|
||||
}
|
||||
15
node_modules/liquidjs/dist/template/value.d.ts
generated
vendored
Normal file
15
node_modules/liquidjs/dist/template/value.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Filter } from './filter';
|
||||
import { Expression } from '../render';
|
||||
import type { FilteredValueToken } from '../tokens';
|
||||
import type { Liquid } from '../liquid';
|
||||
import type { Context } from '../context';
|
||||
export declare class Value {
|
||||
readonly filters: Filter[];
|
||||
readonly initial: Expression;
|
||||
/**
|
||||
* @param str the value to be valuated, eg.: "foobar" | truncate: 3
|
||||
*/
|
||||
constructor(input: string | FilteredValueToken, liquid: Liquid);
|
||||
value(ctx: Context, lenient?: boolean): Generator<unknown, unknown, unknown>;
|
||||
private getFilter;
|
||||
}
|
||||
1
node_modules/liquidjs/dist/template/value.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/template/value.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
Reference in New Issue
Block a user