🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
228
node_modules/emmet/dist/config.d.ts
generated
vendored
Normal file
228
node_modules/emmet/dist/config.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
import type { Abbreviation } from '@emmetio/abbreviation';
|
||||
import type { CSSSnippet } from './stylesheet/snippets.js';
|
||||
export type SyntaxType = 'markup' | 'stylesheet';
|
||||
export type FieldOutput = (index: number, placeholder: string, offset: number, line: number, column: number) => string;
|
||||
export type TextOutput = (text: string, offset: number, line: number, column: number) => string;
|
||||
export type StringCase = '' | 'lower' | 'upper';
|
||||
export interface SnippetsMap {
|
||||
[name: string]: string;
|
||||
}
|
||||
export interface AbbreviationContext {
|
||||
name: string;
|
||||
attributes?: {
|
||||
[name: string]: string | null;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Raw config which contains per-syntax options. `markup` and `syntax` keys are
|
||||
* reserved for global settings for all markup and stylesheet syntaxes
|
||||
*/
|
||||
export interface GlobalConfig {
|
||||
[syntax: string]: Partial<BaseConfig>;
|
||||
}
|
||||
export interface BaseConfig {
|
||||
type: SyntaxType;
|
||||
/** Options for abbreviation output */
|
||||
options: Partial<Options>;
|
||||
/** Substitutions for variable names */
|
||||
variables: SnippetsMap;
|
||||
/** Abbreviation name to snippets mapping */
|
||||
snippets: SnippetsMap;
|
||||
}
|
||||
interface ResolvedConfig extends BaseConfig {
|
||||
/** Host syntax */
|
||||
syntax: string;
|
||||
/**
|
||||
* Context of abbreviation. For markup abbreviation, it contains parent tag
|
||||
* name with attributes, for stylesheet abbreviation it contains property name
|
||||
* if abbreviation is expanded as value
|
||||
*/
|
||||
context?: AbbreviationContext;
|
||||
/** Text to wrap with abbreviation */
|
||||
text?: string | string[];
|
||||
/** Max amount of repeated elements (fool proof) */
|
||||
maxRepeat?: number;
|
||||
/**
|
||||
* Object for storing internal cache data to be shared across Emmet methods
|
||||
* invocation. If provided, Emmet will store compute-intensive data in this
|
||||
* object and will re-use it during editor session.
|
||||
* Every time user settings are changed, you should empty cache by passing
|
||||
* new object.
|
||||
*/
|
||||
cache?: Cache;
|
||||
}
|
||||
export type Config = ResolvedConfig & {
|
||||
options: Options;
|
||||
};
|
||||
export type UserConfig = Partial<ResolvedConfig>;
|
||||
export interface Cache {
|
||||
stylesheetSnippets?: CSSSnippet[];
|
||||
markupSnippets?: {
|
||||
[name: string]: Abbreviation | null;
|
||||
};
|
||||
}
|
||||
export interface Options {
|
||||
/** A list of inline-level elements */
|
||||
inlineElements: string[];
|
||||
/** A string for one level indent */
|
||||
'output.indent': string;
|
||||
/**
|
||||
* A string for base indent, e.g. context indentation which will be added
|
||||
* for every generated line
|
||||
*/
|
||||
'output.baseIndent': string;
|
||||
/** A string to use as a new line */
|
||||
'output.newline': string;
|
||||
/** Tag case: lower, upper or '' (keep as-is) */
|
||||
'output.tagCase': StringCase;
|
||||
/** Attribute name case: lower, upper or '' (keep as-is) */
|
||||
'output.attributeCase': StringCase;
|
||||
/** Attribute value quotes: 'single' or 'double' */
|
||||
'output.attributeQuotes': 'single' | 'double';
|
||||
/** Enable output formatting (indentation and line breaks) */
|
||||
'output.format': boolean;
|
||||
/** When enabled, automatically adds inner line breaks for leaf (e.g. without children) nodes */
|
||||
'output.formatLeafNode': boolean;
|
||||
/** A list of tag names that should not get inner indentation */
|
||||
'output.formatSkip': string[];
|
||||
/** A list of tag names that should *always* get inner indentation. */
|
||||
'output.formatForce': string[];
|
||||
/**
|
||||
* How many inline sibling elements should force line break for each tag.
|
||||
* Set to `0` to output all inline elements without formatting.
|
||||
* Set to `1` to output all inline elements with formatting (same as block-level).
|
||||
*/
|
||||
'output.inlineBreak': number;
|
||||
/**
|
||||
* Produce compact notation of boolean attributes: attributes which doesn’t have value.
|
||||
* With this option enabled, outputs `<div contenteditable>` instead of
|
||||
* `<div contenteditable="contenteditable">`
|
||||
*/
|
||||
'output.compactBoolean': boolean;
|
||||
/** A list of boolean attributes */
|
||||
'output.booleanAttributes': string[];
|
||||
/** Reverses attribute merging directions when resolving snippets */
|
||||
'output.reverseAttributes': boolean;
|
||||
/** Style of self-closing tags: html (`<br>`), xml (`<br/>`) or xhtml (`<br />`) */
|
||||
'output.selfClosingStyle': 'html' | 'xml' | 'xhtml';
|
||||
/**
|
||||
* A function that takes field index and optional placeholder and returns
|
||||
* a string field (tabstop) for host editor. For example, a TextMate-style
|
||||
* field is `$index` or `${index:placeholder}`
|
||||
* @param index Field index
|
||||
* @param placeholder Field placeholder (default value), if any
|
||||
* @param offset Current character offset from the beginning of generated content
|
||||
* @param line Current line of generated output
|
||||
* @param column Current column in line
|
||||
*/
|
||||
'output.field': FieldOutput;
|
||||
/**
|
||||
* A function for processing text chunk passed to `OutputStream`.
|
||||
* May be used by editor for escaping characters, if necessary
|
||||
*/
|
||||
'output.text': TextOutput;
|
||||
/**
|
||||
* Automatically update value of <a> element's href attribute
|
||||
* if inserting URL or email
|
||||
*/
|
||||
'markup.href': boolean;
|
||||
/**
|
||||
* Attribute name mapping. Can be used to change attribute names for output.
|
||||
* For example, `class` -> `className` in JSX. If a key ends with `*`, this
|
||||
* value will be used for multi-attributes: currentry, it’s a `class` and `id`
|
||||
* since `multiple` marker is added for shorthand attributes only.
|
||||
* Example: `{ "class*": "styleName" }`
|
||||
*/
|
||||
'markup.attributes'?: Record<string, string>;
|
||||
/**
|
||||
* Prefixes for attribute values.
|
||||
* If specified, a value is treated as prefix for object notation and
|
||||
* automatically converts attribute value into expression if `jsx` is enabled.
|
||||
* Same as in `markup.attributes` option, a `*` can be used.
|
||||
*/
|
||||
'markup.valuePrefix'?: Record<string, string>;
|
||||
/**
|
||||
* Enable/disable element commenting: generate comments before open and/or
|
||||
* after close tag
|
||||
*/
|
||||
'comment.enabled': boolean;
|
||||
/**
|
||||
* Attributes that should trigger node commenting on specific node,
|
||||
* if commenting is enabled
|
||||
*/
|
||||
'comment.trigger': string[];
|
||||
/**
|
||||
* Template string for comment to be placed *before* opening tag
|
||||
*/
|
||||
'comment.before': string;
|
||||
/**
|
||||
* Template string for comment to be placed *after* closing tag.
|
||||
* Example: `\n<!-- /[#ID][.CLASS] -->`
|
||||
*/
|
||||
'comment.after': string;
|
||||
/** Enable/disable BEM addon */
|
||||
'bem.enabled': boolean;
|
||||
/** A string for separating elements in output class */
|
||||
'bem.element': string;
|
||||
/** A string for separating modifiers in output class */
|
||||
'bem.modifier': string;
|
||||
/** Enable/disable JSX addon */
|
||||
'jsx.enabled': boolean;
|
||||
/** List of globally available keywords for properties */
|
||||
'stylesheet.keywords': string[];
|
||||
/**
|
||||
* List of unitless properties, e.g. properties where numeric values without
|
||||
* explicit unit will be outputted as is, without default value
|
||||
*/
|
||||
'stylesheet.unitless': string[];
|
||||
/** Use short hex notation where possible, e.g. `#000` instead of `#000000` */
|
||||
'stylesheet.shortHex': boolean;
|
||||
/** A string between property name and value */
|
||||
'stylesheet.between': string;
|
||||
/** A string after property value */
|
||||
'stylesheet.after': string;
|
||||
/** A unit suffix to output by default after integer values, 'px' by default */
|
||||
'stylesheet.intUnit': string;
|
||||
/** A unit suffix to output by default after float values, 'em' by default */
|
||||
'stylesheet.floatUnit': string;
|
||||
/**
|
||||
* Aliases for custom units in abbreviation. For example, `r: 'rem'` will
|
||||
* output `10rem` for abbreviation `10r`
|
||||
*/
|
||||
'stylesheet.unitAliases': SnippetsMap;
|
||||
/** Output abbreviation as JSON object properties (for CSS-in-JS syntaxes) */
|
||||
'stylesheet.json': boolean;
|
||||
/** Use double quotes for JSON values */
|
||||
'stylesheet.jsonDoubleQuotes': boolean;
|
||||
/**
|
||||
* A float number between 0 and 1 to pick fuzzy-matched abbreviations.
|
||||
* Lower value will pick more abbreviations (and less accurate)
|
||||
*/
|
||||
'stylesheet.fuzzySearchMinScore': number;
|
||||
}
|
||||
/**
|
||||
* Default syntaxes for abbreviation types
|
||||
*/
|
||||
export declare const defaultSyntaxes: {
|
||||
[name in SyntaxType]: string;
|
||||
};
|
||||
/**
|
||||
* List of all known syntaxes
|
||||
*/
|
||||
export declare const syntaxes: {
|
||||
markup: string[];
|
||||
stylesheet: string[];
|
||||
};
|
||||
export declare const defaultOptions: Options;
|
||||
export declare const defaultConfig: Config;
|
||||
/**
|
||||
* Default per-syntax config
|
||||
*/
|
||||
export declare const syntaxConfig: GlobalConfig;
|
||||
/**
|
||||
* Parses raw snippets definitions with possibly multiple keys into a plan
|
||||
* snippet map
|
||||
*/
|
||||
export declare function parseSnippets(snippets: SnippetsMap): SnippetsMap;
|
||||
export default function resolveConfig(config?: UserConfig, globals?: GlobalConfig): Config;
|
||||
export {};
|
||||
5368
node_modules/emmet/dist/emmet.cjs
generated
vendored
Normal file
5368
node_modules/emmet/dist/emmet.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
node_modules/emmet/dist/emmet.cjs.map
generated
vendored
Normal file
1
node_modules/emmet/dist/emmet.cjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5352
node_modules/emmet/dist/emmet.es.js
generated
vendored
Normal file
5352
node_modules/emmet/dist/emmet.es.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1
node_modules/emmet/dist/emmet.es.js.map
generated
vendored
Normal file
1
node_modules/emmet/dist/emmet.es.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
13
node_modules/emmet/dist/extract-abbreviation/brackets.d.ts
generated
vendored
Normal file
13
node_modules/emmet/dist/extract-abbreviation/brackets.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
export declare const enum Brackets {
|
||||
SquareL = 91,
|
||||
SquareR = 93,
|
||||
RoundL = 40,
|
||||
RoundR = 41,
|
||||
CurlyL = 123,
|
||||
CurlyR = 125
|
||||
}
|
||||
export declare const bracePairs: {
|
||||
91: Brackets;
|
||||
40: Brackets;
|
||||
123: Brackets;
|
||||
};
|
||||
44
node_modules/emmet/dist/extract-abbreviation/index.d.ts
generated
vendored
Normal file
44
node_modules/emmet/dist/extract-abbreviation/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
import type { SyntaxType } from '../config.js';
|
||||
export interface ExtractOptions {
|
||||
/**
|
||||
* Allow parser to look ahead of `pos` index for searching of missing
|
||||
* abbreviation parts. Most editors automatically inserts closing braces for
|
||||
* `[`, `{` and `(`, which will most likely be right after current caret position.
|
||||
* So in order to properly expand abbreviation, user must explicitly move
|
||||
* caret right after auto-inserted braces. With this option enabled, parser
|
||||
* will search for closing braces right after `pos`. Default is `true`
|
||||
*/
|
||||
lookAhead: boolean;
|
||||
/**
|
||||
* Type of context syntax of expanded abbreviation.
|
||||
* In 'stylesheet' syntax, brackets `[]` and `{}` are not supported thus
|
||||
* not extracted.
|
||||
*/
|
||||
type: SyntaxType;
|
||||
/**
|
||||
* A string that should precede abbreviation in order to make it successfully
|
||||
* extracted. If given, the abbreviation will be extracted from the nearest
|
||||
* `prefix` occurrence.
|
||||
*/
|
||||
prefix: string;
|
||||
}
|
||||
export interface ExtractedAbbreviation {
|
||||
/** Extracted abbreviation */
|
||||
abbreviation: string;
|
||||
/** Location of abbreviation in input string */
|
||||
location: number;
|
||||
/** Start location of matched abbreviation, including prefix */
|
||||
start: number;
|
||||
/** End location of extracted abbreviation */
|
||||
end: number;
|
||||
}
|
||||
/**
|
||||
* Extracts Emmet abbreviation from given string.
|
||||
* The goal of this module is to extract abbreviation from current editor’s line,
|
||||
* e.g. like this: `<span>.foo[title=bar|]</span>` -> `.foo[title=bar]`, where
|
||||
* `|` is a current caret position.
|
||||
* @param line A text line where abbreviation should be expanded
|
||||
* @param pos Caret position in line. If not given, uses end of line
|
||||
* @param options Extracting options
|
||||
*/
|
||||
export default function extractAbbreviation(line: string, pos?: number, options?: Partial<ExtractOptions>): ExtractedAbbreviation | undefined;
|
||||
5
node_modules/emmet/dist/extract-abbreviation/is-html.d.ts
generated
vendored
Normal file
5
node_modules/emmet/dist/extract-abbreviation/is-html.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { BackwardScanner } from './reader.js';
|
||||
/**
|
||||
* Check if given reader’s current position points at the end of HTML tag
|
||||
*/
|
||||
export default function isHtml(scanner: BackwardScanner): boolean;
|
||||
10
node_modules/emmet/dist/extract-abbreviation/quotes.d.ts
generated
vendored
Normal file
10
node_modules/emmet/dist/extract-abbreviation/quotes.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { BackwardScanner } from './reader.js';
|
||||
/**
|
||||
* Check if given character code is a quote
|
||||
*/
|
||||
export declare function isQuote(c?: number): boolean;
|
||||
/**
|
||||
* Consumes quoted value, if possible
|
||||
* @return Returns `true` is value was consumed
|
||||
*/
|
||||
export declare function consumeQuoted(scanner: BackwardScanner): boolean;
|
||||
31
node_modules/emmet/dist/extract-abbreviation/reader.d.ts
generated
vendored
Normal file
31
node_modules/emmet/dist/extract-abbreviation/reader.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
type Match = ((code: number) => boolean) | number;
|
||||
export interface BackwardScanner {
|
||||
/** Text to scan */
|
||||
text: string;
|
||||
/** Left bound till given text must be scanned */
|
||||
start: number;
|
||||
/** Current scanner position */
|
||||
pos: number;
|
||||
}
|
||||
/**
|
||||
* Creates structure for scanning given string in backward direction
|
||||
*/
|
||||
export default function backwardScanner(text: string, start?: number): BackwardScanner;
|
||||
/**
|
||||
* Check if given scanner position is at start of scanned text
|
||||
*/
|
||||
export declare function sol(scanner: BackwardScanner): boolean;
|
||||
/**
|
||||
* “Peeks” character code an current scanner location without advancing it
|
||||
*/
|
||||
export declare function peek(scanner: BackwardScanner, offset?: number): number;
|
||||
/**
|
||||
* Returns current character code and moves character location one symbol back
|
||||
*/
|
||||
export declare function previous(scanner: BackwardScanner): number | undefined;
|
||||
/**
|
||||
* Consumes current character code if it matches given `match` code or function
|
||||
*/
|
||||
export declare function consume(scanner: BackwardScanner, match: Match): boolean;
|
||||
export declare function consumeWhile(scanner: BackwardScanner, match: Match): boolean;
|
||||
export {};
|
||||
23
node_modules/emmet/dist/index.d.ts
generated
vendored
Normal file
23
node_modules/emmet/dist/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import markupAbbreviation, { type Abbreviation } from '@emmetio/abbreviation';
|
||||
import stylesheetAbbreviation, { type CSSAbbreviation } from '@emmetio/css-abbreviation';
|
||||
import parseMarkup, { stringify as stringifyMarkup } from './markup/index.js';
|
||||
import parseStylesheet, { stringify as stringifyStylesheet, convertSnippets as parseStylesheetSnippets, CSSAbbreviationScope } from './stylesheet/index.js';
|
||||
import { type UserConfig, type Config } from './config.js';
|
||||
export default function expandAbbreviation(abbr: string, config?: UserConfig): string;
|
||||
/**
|
||||
* Expands given *markup* abbreviation (e.g. regular Emmet abbreviation that
|
||||
* produces structured output like HTML) and outputs it according to options
|
||||
* provided in config
|
||||
*/
|
||||
export declare function markup(abbr: string | Abbreviation, config: Config): string;
|
||||
/**
|
||||
* Expands given *stylesheet* abbreviation (a special Emmet abbreviation designed for
|
||||
* stylesheet languages like CSS, SASS etc.) and outputs it according to options
|
||||
* provided in config
|
||||
*/
|
||||
export declare function stylesheet(abbr: string | CSSAbbreviation, config: Config): string;
|
||||
export { markupAbbreviation, parseMarkup, stringifyMarkup, stylesheetAbbreviation, parseStylesheet, stringifyStylesheet, parseStylesheetSnippets, CSSAbbreviationScope };
|
||||
export type { Abbreviation as MarkupAbbreviation, CSSAbbreviation as StylesheetAbbreviation, };
|
||||
export { default as extract, type ExtractOptions, type ExtractedAbbreviation } from './extract-abbreviation/index.js';
|
||||
export { default as resolveConfig } from './config.js';
|
||||
export type { GlobalConfig, SyntaxType, Config, UserConfig, Options, AbbreviationContext } from './config.js';
|
||||
4
node_modules/emmet/dist/markup/addon/bem.d.ts
generated
vendored
Normal file
4
node_modules/emmet/dist/markup/addon/bem.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import type { AbbreviationNode } from '@emmetio/abbreviation';
|
||||
import type { Container } from '../utils.js';
|
||||
import type { Config } from '../../config.js';
|
||||
export default function bem(node: AbbreviationNode, ancestors: Container[], config: Config): void;
|
||||
6
node_modules/emmet/dist/markup/addon/xsl.d.ts
generated
vendored
Normal file
6
node_modules/emmet/dist/markup/addon/xsl.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import type { AbbreviationNode } from '@emmetio/abbreviation';
|
||||
/**
|
||||
* XSL transformer: removes `select` attributes from certain nodes that contain
|
||||
* children
|
||||
*/
|
||||
export default function xsl(node: AbbreviationNode): void;
|
||||
7
node_modules/emmet/dist/markup/attributes.d.ts
generated
vendored
Normal file
7
node_modules/emmet/dist/markup/attributes.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import type { AbbreviationNode } from '@emmetio/abbreviation';
|
||||
import type { Config } from '../config.js';
|
||||
/**
|
||||
* Merges attributes in current node: de-duplicates attributes with the same name
|
||||
* and merges class names
|
||||
*/
|
||||
export default function mergeAttributes(node: AbbreviationNode, config: Config): void;
|
||||
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;
|
||||
5
node_modules/emmet/dist/markup/implicit-tag.d.ts
generated
vendored
Normal file
5
node_modules/emmet/dist/markup/implicit-tag.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import type { AbbreviationNode } from '@emmetio/abbreviation';
|
||||
import { type Container } from './utils.js';
|
||||
import type { Config } from '../config.js';
|
||||
export default function implicitTag(node: AbbreviationNode, ancestors: Container[], config: Config): void;
|
||||
export declare function resolveImplicitTag(node: AbbreviationNode, ancestors: Container[], config: Config): void;
|
||||
11
node_modules/emmet/dist/markup/index.d.ts
generated
vendored
Normal file
11
node_modules/emmet/dist/markup/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import type { Abbreviation } from '@emmetio/abbreviation';
|
||||
import type { Config } from '../config.js';
|
||||
/**
|
||||
* Parses given Emmet abbreviation into a final abbreviation tree with all
|
||||
* required transformations applied
|
||||
*/
|
||||
export default function parse(abbr: string | Abbreviation, config: Config): Abbreviation;
|
||||
/**
|
||||
* Converts given abbreviation to string according to provided `config`
|
||||
*/
|
||||
export declare function stringify(abbr: Abbreviation, config: Config): string;
|
||||
4
node_modules/emmet/dist/markup/lorem/index.d.ts
generated
vendored
Normal file
4
node_modules/emmet/dist/markup/lorem/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import type { AbbreviationNode } from '@emmetio/abbreviation';
|
||||
import type { Container } from '../utils.js';
|
||||
import type { Config } from '../../config.js';
|
||||
export default function lorem(node: AbbreviationNode, ancestors: Container[], config: Config): void;
|
||||
12
node_modules/emmet/dist/markup/snippets.d.ts
generated
vendored
Normal file
12
node_modules/emmet/dist/markup/snippets.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import type { Abbreviation } from '@emmetio/abbreviation';
|
||||
import type { Config } from '../config.js';
|
||||
/**
|
||||
* Finds matching snippet from `registry` and resolves it into a parsed abbreviation.
|
||||
* Resolved node is then updated or replaced with matched abbreviation tree.
|
||||
*
|
||||
* A HTML registry basically contains aliases to another Emmet abbreviations,
|
||||
* e.g. a predefined set of name, attributes and so on, possibly a complex
|
||||
* abbreviation with multiple elements. So we have to get snippet, parse it
|
||||
* and recursively resolve it.
|
||||
*/
|
||||
export default function resolveSnippets(abbr: Abbreviation, config: Config): Abbreviation;
|
||||
18
node_modules/emmet/dist/markup/utils.d.ts
generated
vendored
Normal file
18
node_modules/emmet/dist/markup/utils.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import type { Abbreviation, AbbreviationNode } from '@emmetio/abbreviation';
|
||||
export type Container = Abbreviation | AbbreviationNode;
|
||||
export type WalkVisitor<S> = (node: AbbreviationNode, ancestors: Container[], state?: S) => void;
|
||||
/**
|
||||
* Walks over each child node of given markup abbreviation AST node (not including
|
||||
* given one) and invokes `fn` on each node.
|
||||
* The `fn` callback accepts context node, list of ancestor nodes and optional
|
||||
* state object
|
||||
*/
|
||||
export declare function walk<S>(node: Container, fn: WalkVisitor<S>, state?: S): void;
|
||||
/**
|
||||
* Finds node which is the deepest for in current node or node itself.
|
||||
*/
|
||||
export declare function findDeepest(node: Container): {
|
||||
node: Container;
|
||||
parent?: Container;
|
||||
};
|
||||
export declare function isNode(node: Container): node is AbbreviationNode;
|
||||
62
node_modules/emmet/dist/output-stream.d.ts
generated
vendored
Normal file
62
node_modules/emmet/dist/output-stream.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
import type { AbbreviationAttribute, AbbreviationNode } from '@emmetio/abbreviation';
|
||||
import type { Config, Options } from './config.js';
|
||||
export interface OutputStream {
|
||||
options: Options;
|
||||
value: string;
|
||||
level: number;
|
||||
offset: number;
|
||||
line: number;
|
||||
column: number;
|
||||
}
|
||||
export declare const expressionStart = "{";
|
||||
export declare const expressionEnd = "}";
|
||||
export default function createOutputStream(options: Options, level?: number): OutputStream;
|
||||
/**
|
||||
* Pushes plain string into output stream without newline processing
|
||||
*/
|
||||
export declare function push(stream: OutputStream, text: string): void;
|
||||
/**
|
||||
* Pushes given string with possible newline formatting into output
|
||||
*/
|
||||
export declare function pushString(stream: OutputStream, value: string): void;
|
||||
/**
|
||||
* Pushes new line into given output stream
|
||||
*/
|
||||
export declare function pushNewline(stream: OutputStream, indent?: boolean | number): void;
|
||||
/**
|
||||
* Adds indentation of `size` to current output stream
|
||||
*/
|
||||
export declare function pushIndent(stream: OutputStream, size?: number): void;
|
||||
/**
|
||||
* Pushes field/tabstop into output stream
|
||||
*/
|
||||
export declare function pushField(stream: OutputStream, index: number, placeholder: string): void;
|
||||
/**
|
||||
* Returns given tag name formatted according to given config
|
||||
*/
|
||||
export declare function tagName(name: string, config: Config): string;
|
||||
/**
|
||||
* Returns given attribute name formatted according to given config
|
||||
*/
|
||||
export declare function attrName(name: string, config: Config): string;
|
||||
/**
|
||||
* Returns character for quoting value of given attribute
|
||||
*/
|
||||
export declare function attrQuote(attr: AbbreviationAttribute, config: Config, isOpen?: boolean): string;
|
||||
/**
|
||||
* Check if given attribute is boolean
|
||||
*/
|
||||
export declare function isBooleanAttribute(attr: AbbreviationAttribute, config: Config): boolean;
|
||||
/**
|
||||
* Returns a token for self-closing tag, depending on current options
|
||||
*/
|
||||
export declare function selfClose(config: Config): string;
|
||||
/**
|
||||
* Check if given tag name belongs to inline-level element
|
||||
* @param node Parsed node or tag name
|
||||
*/
|
||||
export declare function isInline(node: string | AbbreviationNode, config: Config): boolean;
|
||||
/**
|
||||
* Splits given text by lines
|
||||
*/
|
||||
export declare function splitByLines(text: string): string[];
|
||||
8
node_modules/emmet/dist/stylesheet/color.d.ts
generated
vendored
Normal file
8
node_modules/emmet/dist/stylesheet/color.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import type { ColorValue } from '@emmetio/css-abbreviation';
|
||||
export default function color(token: ColorValue, shortHex?: boolean): string;
|
||||
/**
|
||||
* Output given color as hex value
|
||||
* @param short Produce short value (e.g. #fff instead of #ffffff), if possible
|
||||
*/
|
||||
export declare function asHex(token: ColorValue, short?: boolean): string;
|
||||
export declare function frac(num: number, digits?: number): string;
|
||||
13
node_modules/emmet/dist/stylesheet/format.d.ts
generated
vendored
Normal file
13
node_modules/emmet/dist/stylesheet/format.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { CSSAbbreviation } from '@emmetio/css-abbreviation';
|
||||
import { Config } from '../config.js';
|
||||
export declare const CSSAbbreviationScope: {
|
||||
/** Include all possible snippets in match */
|
||||
readonly Global: "@@global";
|
||||
/** Include raw snippets only (e.g. no properties) in abbreviation match */
|
||||
readonly Section: "@@section";
|
||||
/** Include properties only in abbreviation match */
|
||||
readonly Property: "@@property";
|
||||
/** Resolve abbreviation in context of CSS property value */
|
||||
readonly Value: "@@value";
|
||||
};
|
||||
export default function css(abbr: CSSAbbreviation, config: Config): string;
|
||||
21
node_modules/emmet/dist/stylesheet/index.d.ts
generated
vendored
Normal file
21
node_modules/emmet/dist/stylesheet/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import type { CSSAbbreviation } from '@emmetio/css-abbreviation';
|
||||
import { Config, SnippetsMap } from '../config.js';
|
||||
import type { CSSSnippet } from './snippets.js';
|
||||
export { default as stringify, CSSAbbreviationScope } from './format.js';
|
||||
type MatchInput = CSSSnippet | string;
|
||||
/**
|
||||
* Parses given Emmet abbreviation into a final abbreviation tree with all
|
||||
* required transformations applied
|
||||
*/
|
||||
export default function parse(abbr: string | CSSAbbreviation, config: Config): CSSAbbreviation;
|
||||
/**
|
||||
* Converts given raw snippets into internal snippets representation
|
||||
*/
|
||||
export declare function convertSnippets(snippets: SnippetsMap): CSSSnippet[];
|
||||
/**
|
||||
* Finds best matching item from `items` array
|
||||
* @param abbr Abbreviation to match
|
||||
* @param items List of items for match
|
||||
* @param minScore The minimum score the best matched item should have to be a valid match.
|
||||
*/
|
||||
export declare function findBestMatch<T extends MatchInput>(abbr: string, items: T[], minScore?: number, partialMatch?: boolean): T | null;
|
||||
11
node_modules/emmet/dist/stylesheet/score.d.ts
generated
vendored
Normal file
11
node_modules/emmet/dist/stylesheet/score.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Calculates how close `str1` matches `str2` using fuzzy match.
|
||||
* How matching works:
|
||||
* – first characters of both `str1` and `str2` *must* match
|
||||
* – `str1` length larger than `str2` length is allowed only when `unmatched` is true
|
||||
* – ideal match is when `str1` equals to `str2` (score: 1)
|
||||
* – next best match is `str2` starts with `str1` (score: 1 × percent of matched characters)
|
||||
* – other scores depend on how close characters of `str1` to the beginning of `str2`
|
||||
* @param partialMatch Allow length `str1` to be greater than `str2` length
|
||||
*/
|
||||
export default function scoreMatch(str1: string, str2: string, partialMatch?: boolean): number;
|
||||
34
node_modules/emmet/dist/stylesheet/snippets.d.ts
generated
vendored
Normal file
34
node_modules/emmet/dist/stylesheet/snippets.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import type { CSSValue, FunctionCall, Literal } from '@emmetio/css-abbreviation';
|
||||
export type CSSSnippet = CSSSnippetRaw | CSSSnippetProperty;
|
||||
interface KeywordMap {
|
||||
[name: string]: FunctionCall | Literal;
|
||||
}
|
||||
export declare const enum CSSSnippetType {
|
||||
Raw = "Raw",
|
||||
Property = "Property"
|
||||
}
|
||||
interface CSSSnippetBase {
|
||||
type: CSSSnippetType;
|
||||
key: string;
|
||||
}
|
||||
export interface CSSSnippetRaw extends CSSSnippetBase {
|
||||
type: CSSSnippetType.Raw;
|
||||
value: string;
|
||||
}
|
||||
export interface CSSSnippetProperty extends CSSSnippetBase {
|
||||
type: CSSSnippetType.Property;
|
||||
property: string;
|
||||
value: CSSValue[][];
|
||||
keywords: KeywordMap;
|
||||
dependencies: CSSSnippetProperty[];
|
||||
}
|
||||
/**
|
||||
* Creates structure for holding resolved CSS snippet
|
||||
*/
|
||||
export default function createSnippet(key: string, value: string): CSSSnippet;
|
||||
/**
|
||||
* Nests more specific CSS properties into shorthand ones, e.g.
|
||||
* `background-position-x` -> `background-position` -> `background`
|
||||
*/
|
||||
export declare function nest(snippets: CSSSnippet[]): CSSSnippet[];
|
||||
export {};
|
||||
Loading…
Add table
Add a link
Reference in a new issue