Начат фронтенд

This commit is contained in:
Georgiy Syralev
2025-09-16 14:47:30 +03:00
parent f37e85e2e0
commit 40de29041d
2100 changed files with 305701 additions and 11807 deletions

147
node_modules/postcss/lib/result.d.ts generated vendored
View File

@@ -1,46 +1,41 @@
import {
Document,
Node,
Plugin,
ProcessOptions,
Root,
Plugin,
SourceMap,
TransformCallback,
Root,
Document,
Node,
Warning,
WarningOptions
} from './postcss.js'
import Processor from './processor.js'
declare namespace Result {
export interface Message {
[others: string]: any
export interface Message {
/**
* Message type.
*/
type: string
/**
* Source PostCSS plugin name.
*/
plugin?: string
/**
* Source PostCSS plugin name.
*/
plugin?: string
/**
* Message type.
*/
type: string
}
[others: string]: any
}
export interface ResultOptions extends ProcessOptions {
/**
* The CSS node that was the source of the warning.
*/
node?: Node
export interface ResultOptions extends ProcessOptions {
/**
* The CSS node that was the source of the warning.
*/
node?: Node
/**
* Name of plugin that created this warning. `Result#warn` will fill it
* automatically with `Plugin#postcssPlugin` value.
*/
plugin?: string
}
// eslint-disable-next-line @typescript-eslint/no-use-before-define
export { Result_ as default }
/**
* Name of plugin that created this warning. `Result#warn` will fill it
* automatically with `Plugin#postcssPlugin` value.
*/
plugin?: string
}
/**
@@ -59,36 +54,19 @@ declare namespace Result {
* const result2 = postcss.parse(css).toResult()
* ```
*/
declare class Result_<RootNode = Document | Root> {
export default class Result {
/**
* A CSS string representing of `Result#root`.
* The Processor instance used for this transformation.
*
* ```js
* postcss.parse('a{}').toResult().css //=> "a{}"
* for (const plugin of result.processor.plugins) {
* if (plugin.postcssPlugin === 'postcss-bad') {
* throw 'postcss-good is incompatible with postcss-bad'
* }
* })
* ```
*/
css: string
/**
* Last runned PostCSS plugin.
*/
lastPlugin: Plugin | TransformCallback
/**
* An instance of `SourceMapGenerator` class from the `source-map` library,
* representing changes to the `Result#root` instance.
*
* ```js
* result.map.toJSON() //=> { version: 3, file: 'a.css', … }
* ```
*
* ```js
* if (result.map) {
* fs.writeFileSync(result.opts.to + '.map', result.map.toString())
* }
* ```
*/
map: SourceMap
processor: Processor
/**
* Contains messages from plugins (e.g., warnings or custom messages).
@@ -108,7 +86,16 @@ declare class Result_<RootNode = Document | Root> {
* }
* ```
*/
messages: Result.Message[]
messages: Message[]
/**
* Root node after all transformations.
*
* ```js
* root.toResult().root === root
* ```
*/
root: Root | Document
/**
* Options from the `Processor#process` or `Root#toResult` call
@@ -118,29 +105,44 @@ declare class Result_<RootNode = Document | Root> {
* root.toResult(opts).opts === opts
* ```
*/
opts: Result.ResultOptions
opts: ResultOptions
/**
* The Processor instance used for this transformation.
* A CSS string representing of `Result#root`.
*
* ```js
* for (const plugin of result.processor.plugins) {
* if (plugin.postcssPlugin === 'postcss-bad') {
* throw 'postcss-good is incompatible with postcss-bad'
* }
* })
* postcss.parse('a{}').toResult().css //=> "a{}"
* ```
*/
processor: Processor
css: string
/**
* Root node after all transformations.
* An instance of `SourceMapGenerator` class from the `source-map` library,
* representing changes to the `Result#root` instance.
*
* ```js
* root.toResult().root === root
* result.map.toJSON() //=> { version: 3, file: 'a.css', … }
* ```
*
* ```js
* if (result.map) {
* fs.writeFileSync(result.opts.to + '.map', result.map.toString())
* }
* ```
*/
root: RootNode
map: SourceMap
/**
* Last runned PostCSS plugin.
*/
lastPlugin: Plugin | TransformCallback
/**
* @param processor Processor used for this transformation.
* @param root Root node after all transformations.
* @param opts Options from the `Processor#process` or `Root#toResult`.
*/
constructor(processor: Processor, root: Root | Document, opts: ResultOptions)
/**
* An alias for the `Result#css` property.
@@ -152,13 +154,6 @@ declare class Result_<RootNode = Document | Root> {
*/
get content(): string
/**
* @param processor Processor used for this transformation.
* @param root Root node after all transformations.
* @param opts Options from the `Processor#process` or `Root#toResult`.
*/
constructor(processor: Processor, root: RootNode, opts: Result.ResultOptions)
/**
* Returns for `Result#css` content.
*
@@ -199,7 +194,3 @@ declare class Result_<RootNode = Document | Root> {
*/
warnings(): Warning[]
}
declare class Result<RootNode = Document | Root> extends Result_<RootNode> {}
export = Result