🎉 initiate project *astro_rewrite*

This commit is contained in:
sindrekjelsrud 2023-07-19 21:31:30 +02:00
parent ffd4d5e86c
commit 2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions

4
node_modules/emmet/dist/markup/addon/bem.d.ts generated vendored Normal file
View 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
View 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
View 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
View 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
View 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
View 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 {};

View 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
View 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
View 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
View 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
View 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
View 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
View 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
View 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
View 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
View 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
View 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;