🔧 npm update

This commit is contained in:
2025-04-15 20:50:11 +02:00
parent ce5b9ac0c8
commit 94a90edabd
828 changed files with 256807 additions and 197099 deletions

View File

@@ -2,7 +2,7 @@ import { RawSourceMap, SourceMapGenerator } from 'source-map-js'
import AtRule, { AtRuleProps } from './at-rule.js'
import Comment, { CommentProps } from './comment.js'
import Container, { ContainerProps } from './container.js'
import Container, { ContainerProps, NewChild } from './container.js'
import CssSyntaxError from './css-syntax-error.js'
import Declaration, { DeclarationProps } from './declaration.js'
import Document, { DocumentProps } from './document.js'
@@ -28,13 +28,22 @@ type DocumentProcessor = (
document: Document,
helper: postcss.Helpers
) => Promise<void> | void
type RootProcessor = (root: Root, helper: postcss.Helpers) => Promise<void> | void
type RootProcessor = (
root: Root,
helper: postcss.Helpers
) => Promise<void> | void
type DeclarationProcessor = (
decl: Declaration,
helper: postcss.Helpers
) => Promise<void> | void
type RuleProcessor = (rule: Rule, helper: postcss.Helpers) => Promise<void> | void
type AtRuleProcessor = (atRule: AtRule, helper: postcss.Helpers) => Promise<void> | void
type RuleProcessor = (
rule: Rule,
helper: postcss.Helpers
) => Promise<void> | void
type AtRuleProcessor = (
atRule: AtRule,
helper: postcss.Helpers
) => Promise<void> | void
type CommentProcessor = (
comment: Comment,
helper: postcss.Helpers
@@ -161,6 +170,7 @@ declare namespace postcss {
LazyResult,
list,
Message,
NewChild,
Node,
NodeErrorOptions,
NodeProps,
@@ -176,9 +186,9 @@ declare namespace postcss {
WarningOptions
}
export type SourceMap = SourceMapGenerator & {
export type SourceMap = {
toJSON(): RawSourceMap
}
} & SourceMapGenerator
export type Helpers = { postcss: Postcss; result: Result } & Postcss
@@ -219,7 +229,7 @@ declare namespace postcss {
export interface Parser<RootNode = Document | Root> {
(
css: { toString(): string } | string,
opts?: Pick<ProcessOptions, 'from' | 'map'>
opts?: Pick<ProcessOptions, 'document' | 'from' | 'map'>
): RootNode
}
@@ -305,6 +315,11 @@ declare namespace postcss {
}
export interface ProcessOptions<RootNode = Document | Root> {
/**
* Input file if it is not simple CSS file, but HTML with <style> or JS with CSS-in-JS blocks.
*/
document?: string
/**
* The path of the CSS source file. You should always set `from`,
* because it is used in source map generation and syntax error messages.
@@ -435,7 +450,9 @@ declare namespace postcss {
* @param plugins PostCSS plugins.
* @return Processor to process multiple CSS.
*/
declare function postcss(plugins?: postcss.AcceptedPlugin[]): Processor
declare function postcss(
plugins?: readonly postcss.AcceptedPlugin[]
): Processor
declare function postcss(...plugins: postcss.AcceptedPlugin[]): Processor
export = postcss