🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
19
node_modules/emmet/dist/markup/format/comment.d.ts
generated
vendored
Normal file
19
node_modules/emmet/dist/markup/format/comment.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import type { AbbreviationNode } from '@emmetio/abbreviation';
|
||||
import { type TemplateToken } from './template.js';
|
||||
import { Config } from '../../config.js';
|
||||
import { HTMLWalkState } from './html.js';
|
||||
export interface CommentWalkState {
|
||||
enabled: boolean;
|
||||
trigger: string[];
|
||||
before?: TemplateToken[];
|
||||
after?: TemplateToken[];
|
||||
}
|
||||
export declare function createCommentState(config: Config): CommentWalkState;
|
||||
/**
|
||||
* Adds comment prefix for given node, if required
|
||||
*/
|
||||
export declare function commentNodeBefore(node: AbbreviationNode, state: HTMLWalkState): void;
|
||||
/**
|
||||
* Adds comment suffix for given node, if required
|
||||
*/
|
||||
export declare function commentNodeAfter(node: AbbreviationNode, state: HTMLWalkState): void;
|
||||
3
node_modules/emmet/dist/markup/format/haml.d.ts
generated
vendored
Normal file
3
node_modules/emmet/dist/markup/format/haml.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import type { Abbreviation } from '@emmetio/abbreviation';
|
||||
import type { Config } from '../../config.js';
|
||||
export default function haml(abbr: Abbreviation, config: Config): string;
|
||||
11
node_modules/emmet/dist/markup/format/html.d.ts
generated
vendored
Normal file
11
node_modules/emmet/dist/markup/format/html.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import type { Abbreviation, AbbreviationNode } from '@emmetio/abbreviation';
|
||||
import { type WalkState } from './walk.js';
|
||||
import { type CommentWalkState } from './comment.js';
|
||||
import type { Config } from '../../config.js';
|
||||
type WalkNext = (node: AbbreviationNode, index: number, items: AbbreviationNode[]) => void;
|
||||
export interface HTMLWalkState extends WalkState {
|
||||
comment: CommentWalkState;
|
||||
}
|
||||
export default function html(abbr: Abbreviation, config: Config): string;
|
||||
export declare function pushSnippet(node: AbbreviationNode, state: WalkState, next: WalkNext): boolean;
|
||||
export {};
|
||||
64
node_modules/emmet/dist/markup/format/indent-format.d.ts
generated
vendored
Normal file
64
node_modules/emmet/dist/markup/format/indent-format.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
import type { AbbreviationNode, AbbreviationAttribute, Abbreviation } from '@emmetio/abbreviation';
|
||||
import { WalkState, type WalkNext } from './walk.js';
|
||||
import type { Config } from '../../config.js';
|
||||
/**
|
||||
* @description Utility methods for working with indent-based markup languages
|
||||
* like HAML, Slim, Pug etc.
|
||||
*/
|
||||
interface AttributesCollection {
|
||||
/** Primary element attributes: `id` and `class` */
|
||||
primary: AbbreviationAttribute[];
|
||||
/** Secondary element attributes: everything except `id` and `class` */
|
||||
secondary: AbbreviationAttribute[];
|
||||
}
|
||||
export interface IndentWalkState extends WalkState {
|
||||
options: FormatOptions;
|
||||
}
|
||||
export interface FormatOptions {
|
||||
/** String to output before tag name */
|
||||
beforeName?: string;
|
||||
/** String to output after tag name */
|
||||
afterName?: string;
|
||||
/** String to output before secondary attribute set */
|
||||
beforeAttribute?: string;
|
||||
/** String to output after secondary attribute set */
|
||||
afterAttribute?: string;
|
||||
/** String to put between secondary attributes */
|
||||
glueAttribute?: string;
|
||||
/** Value for boolean attributes */
|
||||
booleanValue?: string;
|
||||
/** String to put before content line (if value is multiline) */
|
||||
beforeTextLine?: string;
|
||||
/** String to put after content line (if value is multiline) */
|
||||
afterTextLine?: string;
|
||||
/** String to put after self-closing elements like `br`. Mostly a `/` character */
|
||||
selfClose?: string;
|
||||
}
|
||||
export default function indentFormat(abbr: Abbreviation, config: Config, options?: Partial<FormatOptions>): string;
|
||||
/**
|
||||
* Outputs `node` content to output stream of `state`
|
||||
* @param node Context node
|
||||
* @param index Index of `node` in `items`
|
||||
* @param items List of `node`’s siblings
|
||||
* @param state Current walk state
|
||||
*/
|
||||
export declare function element(node: AbbreviationNode, index: number, items: AbbreviationNode[], state: IndentWalkState, next: WalkNext): void;
|
||||
/**
|
||||
* From given node, collects all attributes as `primary` (id, class) and
|
||||
* `secondary` (all the rest) lists. In most indent-based syntaxes, primary attribute
|
||||
* has special syntax
|
||||
*/
|
||||
export declare function collectAttributes(node: AbbreviationNode): AttributesCollection;
|
||||
/**
|
||||
* Outputs given attributes as primary into output stream
|
||||
*/
|
||||
export declare function pushPrimaryAttributes(attrs: AbbreviationAttribute[], state: WalkState): void;
|
||||
/**
|
||||
* Outputs given attributes as secondary into output stream
|
||||
*/
|
||||
export declare function pushSecondaryAttributes(attrs: AbbreviationAttribute[], state: IndentWalkState): void;
|
||||
/**
|
||||
* Outputs given node value into state output stream
|
||||
*/
|
||||
export declare function pushValue(node: AbbreviationNode, state: IndentWalkState): void;
|
||||
export {};
|
||||
3
node_modules/emmet/dist/markup/format/pug.d.ts
generated
vendored
Normal file
3
node_modules/emmet/dist/markup/format/pug.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import type { Abbreviation } from '@emmetio/abbreviation';
|
||||
import type { Config } from '../../config.js';
|
||||
export default function pug(abbr: Abbreviation, config: Config): string;
|
||||
3
node_modules/emmet/dist/markup/format/slim.d.ts
generated
vendored
Normal file
3
node_modules/emmet/dist/markup/format/slim.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import type { Abbreviation } from '@emmetio/abbreviation';
|
||||
import type { Config } from '../../config.js';
|
||||
export default function slim(abbr: Abbreviation, config: Config): string;
|
||||
15
node_modules/emmet/dist/markup/format/template.d.ts
generated
vendored
Normal file
15
node_modules/emmet/dist/markup/format/template.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
export type TemplateToken = string | TemplatePlaceholder;
|
||||
export interface TemplatePlaceholder {
|
||||
before: string;
|
||||
after: string;
|
||||
name: string;
|
||||
}
|
||||
/**
|
||||
* Splits given string into template tokens.
|
||||
* Template is a string which contains placeholders which are uppercase names
|
||||
* between `[` and `]`, for example: `[PLACEHOLDER]`.
|
||||
* Unlike other templates, a placeholder may contain extra characters before and
|
||||
* after name: `[%PLACEHOLDER.]`. If data for `PLACEHOLDER` is defined, it will
|
||||
* be outputted with with these extra character, otherwise will be completely omitted.
|
||||
*/
|
||||
export default function template(text: string): TemplateToken[];
|
||||
27
node_modules/emmet/dist/markup/format/utils.d.ts
generated
vendored
Normal file
27
node_modules/emmet/dist/markup/format/utils.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import type { AbbreviationNode, Field, Value, AbbreviationAttribute } from '@emmetio/abbreviation';
|
||||
import type { WalkState } from './walk.js';
|
||||
import type { Config } from '../../config.js';
|
||||
export declare const caret: Field[];
|
||||
/**
|
||||
* Check if given node is a snippet: a node without name and attributes
|
||||
*/
|
||||
export declare function isSnippet(node?: AbbreviationNode): boolean;
|
||||
/**
|
||||
* Check if given node is inline-level element, e.g. element with explicitly
|
||||
* defined node name
|
||||
*/
|
||||
export declare function isInlineElement(node: AbbreviationNode | undefined, config: Config): boolean;
|
||||
/**
|
||||
* Check if given value token is a field
|
||||
*/
|
||||
export declare function isField(token: Value): token is Field;
|
||||
export declare function pushTokens(tokens: Value[], state: WalkState): void;
|
||||
/**
|
||||
* Splits given value token by lines: returns array where each entry is a token list
|
||||
* for a single line
|
||||
*/
|
||||
export declare function splitByLines(tokens: Value[]): Value[][];
|
||||
/**
|
||||
* Check if given attribute should be outputted
|
||||
*/
|
||||
export declare function shouldOutputAttribute(attr: AbbreviationAttribute): boolean;
|
||||
21
node_modules/emmet/dist/markup/format/walk.d.ts
generated
vendored
Normal file
21
node_modules/emmet/dist/markup/format/walk.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import type { AbbreviationNode, Abbreviation } from '@emmetio/abbreviation';
|
||||
import { type OutputStream } from '../../output-stream.js';
|
||||
import type { Config } from '../../config.js';
|
||||
export type WalkNext = (node: AbbreviationNode, index: number, items: AbbreviationNode[]) => void;
|
||||
export type Visitor<S extends WalkState> = (node: AbbreviationNode, index: number, items: AbbreviationNode[], state: S, next: WalkNext) => void;
|
||||
export interface WalkState {
|
||||
/** Context node */
|
||||
current: AbbreviationNode;
|
||||
/** Immediate parent of currently iterated method */
|
||||
parent?: AbbreviationNode;
|
||||
/** List of all ancestors of context node */
|
||||
ancestors: AbbreviationNode[];
|
||||
/** Current output config */
|
||||
config: Config;
|
||||
/** Output stream */
|
||||
out: OutputStream;
|
||||
/** Current field index, used to output field marks for editor tabstops */
|
||||
field: number;
|
||||
}
|
||||
export default function walk<S extends WalkState>(abbr: Abbreviation, visitor: Visitor<S>, state: S): void;
|
||||
export declare function createWalkState(config: Config): WalkState;
|
||||
Loading…
Add table
Add a link
Reference in a new issue