@@ -669,7 +669,7 @@ declare enum WalkerOptionEnum {
669669/**
670670 * event types for the walkValues function
671671 */
672- declare enum WalkerValueEvent {
672+ declare enum WalkerEvent {
673673 /**
674674 * enter node
675675 */
@@ -777,7 +777,7 @@ declare function walk(node: AstNode$1, filter?: WalkerFilter | null, reverse?: b
777777 *
778778 */
779779declare function walkValues ( values : Token$1 [ ] , root ?: AstNode$1 | Token$1 | null , filter ?: WalkerValueFilter | null | {
780- event ?: WalkerValueEvent ;
780+ event ?: WalkerEvent ;
781781 fn ?: WalkerValueFilter ;
782782 type ?: EnumToken$1 | EnumToken$1 [ ] | ( ( token : Token$1 ) => boolean ) ;
783783} , reverse ?: boolean ) : Generator < WalkAttributesResult > ;
@@ -2182,13 +2182,12 @@ export declare type AstNode$1 =
21822182 | AstInvalidRule
21832183 | AstInvalidDeclaration ;
21842184
2185- export declare type VisitorEventType = 'Enter' | 'Leave' ;
21862185export declare type GenericVisitorResult < T > = T | T [ ] | Promise < T > | Promise < T [ ] > | null | Promise < null > ;
21872186export declare type GenericVisitorHandler < T > = ( ( node : T , parent ?: AstNode | Token , root ?: AstNode | Token ) => GenericVisitorResult < T > ) ;
21882187export declare type GenericVisitorAstNodeHandlerMap < T > =
21892188 Record < string , GenericVisitorHandler < T > >
21902189 | GenericVisitorHandler < T >
2191- | { type : VisitorEventType , handler : Record < string , GenericVisitorHandler < T > > | GenericVisitorHandler < T > } ;
2190+ | { type : WalkerEvent , handler : Record < string , GenericVisitorHandler < T > > } ;
21922191
21932192export declare type ValueVisitorHandler = GenericVisitorHandler < Token > ;
21942193
@@ -2254,7 +2253,7 @@ export declare interface VisitorNodeMap {
22542253 * // @media tv,screen{.foo{height:calc(40px/3)}}
22552254 * ```
22562255 */
2257- AtRule ?: GenericVisitorAstNodeHandlerMap < AstAtRule > ;
2256+ AtRule ?: GenericVisitorAstNodeHandlerMap < AstAtRule > | Array < GenericVisitorAstNodeHandlerMap < AstAtRule > > ;
22582257 /**
22592258 * declaration visitor
22602259 *
@@ -2356,7 +2355,7 @@ export declare interface VisitorNodeMap {
23562355 * // .foo{width:calc(40px/3);padding:10px}.selector{padding:20px}
23572356 * ```
23582357 */
2359- Declaration ?: GenericVisitorAstNodeHandlerMap < AstDeclaration > ;
2358+ Declaration ?: GenericVisitorAstNodeHandlerMap < AstDeclaration > | Array < GenericVisitorAstNodeHandlerMap < AstDeclaration > > ;
23602359
23612360 /**
23622361 * rule visitor
@@ -2398,19 +2397,22 @@ export declare interface VisitorNodeMap {
23982397 * // .foo{width:3px;.foo{width:3px}}
23992398 * ```
24002399 */
2401- Rule ?: GenericVisitorAstNodeHandlerMap < AstRule > ;
2400+ Rule ?: GenericVisitorAstNodeHandlerMap < AstRule > | Array < GenericVisitorAstNodeHandlerMap < AstRule > > ;
24022401
2403- KeyframesRule ?: GenericVisitorAstNodeHandlerMap < AstKeyframesRule > ;
2402+ KeyframesRule ?: GenericVisitorAstNodeHandlerMap < AstKeyframesRule > | Array < GenericVisitorAstNodeHandlerMap < AstKeyframesRule > > ;
24042403
2405- KeyframesAtRule ?: GenericVisitorAstNodeHandlerMap < AstKeyframesAtRule > | Record < string , GenericVisitorAstNodeHandlerMap < AstKeyframesAtRule > > ;
2404+ KeyframesAtRule ?: GenericVisitorAstNodeHandlerMap < AstKeyframesAtRule > | Record < string , GenericVisitorAstNodeHandlerMap < AstKeyframesAtRule > > | Array < GenericVisitorAstNodeHandlerMap < AstKeyframesAtRule > | Record < string , GenericVisitorAstNodeHandlerMap < AstKeyframesAtRule > > > ;
24062405
24072406 /**
24082407 * value visitor
24092408 */
24102409 Value ?: GenericVisitorHandler < Token > | Record < keyof EnumToken , GenericVisitorHandler < Token > > | {
2411- type : VisitorEventType ,
2410+ type : WalkerEvent ,
24122411 handler : GenericVisitorHandler < Token > | Record < keyof EnumToken , GenericVisitorHandler < Token > >
2413- } ;
2412+ } | Array < GenericVisitorHandler < Token > | Record < keyof EnumToken , GenericVisitorHandler < Token > > | {
2413+ type : WalkerEvent ,
2414+ handler : GenericVisitorHandler < Token > | Record < keyof EnumToken , GenericVisitorHandler < Token > >
2415+ } > ;
24142416
24152417 /**
24162418 * generic token visitor. the key name is of type keyof EnumToken.
@@ -2460,9 +2462,12 @@ export declare interface VisitorNodeMap {
24602462 * ```
24612463 */
24622464 [ key : keyof EnumToken ] : GenericVisitorHandler < Token > | {
2463- type : VisitorEventType ,
2465+ type : WalkerEvent ,
24642466 handler : GenericVisitorHandler < Token >
2465- } ;
2467+ } | Array < GenericVisitorHandler < Token > | {
2468+ type : WalkerEvent ,
2469+ handler : GenericVisitorHandler < Token >
2470+ } > ;
24662471}
24672472
24682473export declare interface PropertyListOptions {
@@ -3019,7 +3024,7 @@ export declare type WalkerFilter = (node: AstNode$1) => WalkerOption;
30193024/**
30203025 * filter nod
30213026 */
3022- export declare type WalkerValueFilter = ( node : AstNode$1 | Token$1 , parent ?: AstNode$1 | Token$1 | null , event ?: WalkerValueEvent ) => WalkerOption | null ;
3027+ export declare type WalkerValueFilter = ( node : AstNode$1 | Token$1 , parent ?: AstNode$1 | Token$1 | null , event ?: WalkerEvent ) => WalkerOption | null ;
30233028
30243029export declare interface WalkResult {
30253030 node : AstNode$1 ;
@@ -3275,9 +3280,9 @@ export declare interface ParserOptions extends MinifyOptions, MinifyFeatureOptio
32753280
32763281 /**
32773282 * node visitor
3278- * {@link VisitorNodeMap}
3283+ * {@link VisitorNodeMap | VisitorNodeMap[] }
32793284 */
3280- visitor ?: VisitorNodeMap ;
3285+ visitor ?: VisitorNodeMap | VisitorNodeMap [ ] ;
32813286 /**
32823287 * abort signal
32833288 *
@@ -3900,5 +3905,5 @@ declare function transformFile(file: string, options?: TransformOptions, asStrea
39003905 */
39013906declare function transform ( css : string | ReadableStream < Uint8Array > , options ?: TransformOptions ) : Promise < TransformResult > ;
39023907
3903- export { ColorType , EnumToken$1 as EnumToken , FeatureWalkMode , SourceMap , ValidationLevel , WalkerOptionEnum , WalkerValueEvent , convertColor , dirname , expand , isOkLabClose , load , mathFuncs , minify , okLabDistance , parse , parseDeclarations , parseFile , parseString , parseTokens , render , renderToken , resolve , transform , transformFile , transformFunctions , walk , walkValues } ;
3904- export type { AddToken , AngleToken , AstAtRule , AstComment , AstDeclaration , AstInvalidAtRule , AstInvalidDeclaration , AstInvalidRule , AstKeyFrameRule , AstKeyframesAtRule , AstKeyframesRule , AstNode$1 as AstNode , AstRule , AstRuleList , AstStyleSheet , AtRuleToken , AtRuleVisitorHandler , AttrEndToken , AttrStartToken , AttrToken , Background , BackgroundAttachmentMapping , BackgroundPosition , BackgroundPositionClass , BackgroundPositionConstraints , BackgroundPositionMapping , BackgroundProperties , BackgroundRepeat , BackgroundRepeatMapping , BackgroundSize , BackgroundSizeMapping , BadCDOCommentToken , BadCommentToken , BadStringToken , BadUrlToken , BaseToken , BinaryExpressionNode , BinaryExpressionToken , BlockEndToken , BlockStartToken , Border , BorderColor , BorderColorClass , BorderProperties , BorderRadius , CDOCommentToken , ChildCombinatorToken , ClassSelectorToken , ColonToken , ColorToken , ColumnCombinatorToken , CommaToken , CommentToken , ConstraintsMapping , ContainMatchToken , Context , DashMatchToken , DashedIdentToken , DeclarationVisitorHandler , DelimToken , DescendantCombinatorToken , DimensionToken , DivToken , EOFToken , EndMatchToken , EqualMatchToken , ErrorDescription , FlexToken , Font , FontFamily , FontProperties , FontWeight , FontWeightConstraints , FontWeightMapping , FractionToken , FrequencyToken , FunctionImageToken , FunctionToken , FunctionURLToken , GenericVisitorAstNodeHandlerMap , GenericVisitorHandler , GenericVisitorResult , GreaterThanOrEqualToken , GreaterThanToken , GridTemplateFuncToken , HashToken , IdentListToken , IdentToken , ImportantToken , IncludeMatchToken , InvalidAttrToken , InvalidClassSelectorToken , LengthToken , LessThanOrEqualToken , LessThanToken , LineHeight , ListToken , LiteralToken , LoadResult , Location , Map$1 as Map , MatchExpressionToken , MatchedSelector , MediaFeatureAndToken , MediaFeatureNotToken , MediaFeatureOnlyToken , MediaFeatureOrToken , MediaFeatureToken , MediaQueryConditionToken , MinifyFeature , MinifyFeatureOptions , MinifyOptions , MulToken , NameSpaceAttributeToken , NestingSelectorToken , NextSiblingCombinatorToken , NumberToken , OptimizedSelector , OptimizedSelectorToken , Outline , OutlineProperties , ParensEndToken , ParensStartToken , ParensToken , ParseInfo , ParseResult , ParseResultStats , ParseTokenOptions , ParserOptions , PercentageToken , Position , Prefix , PropertiesConfig , PropertiesConfigProperties , PropertyListOptions , PropertyMapType , PropertySetType , PropertyType , PseudoClassFunctionToken , PseudoClassToken , PseudoElementToken , PseudoPageToken , PurpleBackgroundAttachment , RawSelectorTokens , RenderOptions , RenderResult , ResolutionToken , ResolvedPath , RuleVisitorHandler , SemiColonToken , Separator , ShorthandDef , ShorthandMapType , ShorthandProperties , ShorthandPropertyType , ShorthandType , SourceMapObject , StartMatchToken , StringToken , SubToken , SubsequentCombinatorToken , TimeToken , TimelineFunctionToken , TimingFunctionToken , Token$1 as Token , TokenizeResult , TransformOptions , TransformResult , UnaryExpression , UnaryExpressionNode , UnclosedStringToken , UniversalSelectorToken , UrlToken , ValidationConfiguration , ValidationOptions , ValidationResult , ValidationSelectorOptions , ValidationSyntaxNode , ValidationSyntaxResult , Value , ValueVisitorHandler , VariableScopeInfo , VisitorEventType , VisitorNodeMap , WalkAttributesResult , WalkResult , WalkerFilter , WalkerOption , WalkerValueFilter , WhitespaceToken } ;
3908+ export { ColorType , EnumToken$1 as EnumToken , FeatureWalkMode , SourceMap , ValidationLevel , WalkerEvent , WalkerOptionEnum , convertColor , dirname , expand , isOkLabClose , load , mathFuncs , minify , okLabDistance , parse , parseDeclarations , parseFile , parseString , parseTokens , render , renderToken , resolve , transform , transformFile , transformFunctions , walk , walkValues } ;
3909+ export type { AddToken , AngleToken , AstAtRule , AstComment , AstDeclaration , AstInvalidAtRule , AstInvalidDeclaration , AstInvalidRule , AstKeyFrameRule , AstKeyframesAtRule , AstKeyframesRule , AstNode$1 as AstNode , AstRule , AstRuleList , AstStyleSheet , AtRuleToken , AtRuleVisitorHandler , AttrEndToken , AttrStartToken , AttrToken , Background , BackgroundAttachmentMapping , BackgroundPosition , BackgroundPositionClass , BackgroundPositionConstraints , BackgroundPositionMapping , BackgroundProperties , BackgroundRepeat , BackgroundRepeatMapping , BackgroundSize , BackgroundSizeMapping , BadCDOCommentToken , BadCommentToken , BadStringToken , BadUrlToken , BaseToken , BinaryExpressionNode , BinaryExpressionToken , BlockEndToken , BlockStartToken , Border , BorderColor , BorderColorClass , BorderProperties , BorderRadius , CDOCommentToken , ChildCombinatorToken , ClassSelectorToken , ColonToken , ColorToken , ColumnCombinatorToken , CommaToken , CommentToken , ConstraintsMapping , ContainMatchToken , Context , DashMatchToken , DashedIdentToken , DeclarationVisitorHandler , DelimToken , DescendantCombinatorToken , DimensionToken , DivToken , EOFToken , EndMatchToken , EqualMatchToken , ErrorDescription , FlexToken , Font , FontFamily , FontProperties , FontWeight , FontWeightConstraints , FontWeightMapping , FractionToken , FrequencyToken , FunctionImageToken , FunctionToken , FunctionURLToken , GenericVisitorAstNodeHandlerMap , GenericVisitorHandler , GenericVisitorResult , GreaterThanOrEqualToken , GreaterThanToken , GridTemplateFuncToken , HashToken , IdentListToken , IdentToken , ImportantToken , IncludeMatchToken , InvalidAttrToken , InvalidClassSelectorToken , LengthToken , LessThanOrEqualToken , LessThanToken , LineHeight , ListToken , LiteralToken , LoadResult , Location , Map$1 as Map , MatchExpressionToken , MatchedSelector , MediaFeatureAndToken , MediaFeatureNotToken , MediaFeatureOnlyToken , MediaFeatureOrToken , MediaFeatureToken , MediaQueryConditionToken , MinifyFeature , MinifyFeatureOptions , MinifyOptions , MulToken , NameSpaceAttributeToken , NestingSelectorToken , NextSiblingCombinatorToken , NumberToken , OptimizedSelector , OptimizedSelectorToken , Outline , OutlineProperties , ParensEndToken , ParensStartToken , ParensToken , ParseInfo , ParseResult , ParseResultStats , ParseTokenOptions , ParserOptions , PercentageToken , Position , Prefix , PropertiesConfig , PropertiesConfigProperties , PropertyListOptions , PropertyMapType , PropertySetType , PropertyType , PseudoClassFunctionToken , PseudoClassToken , PseudoElementToken , PseudoPageToken , PurpleBackgroundAttachment , RawSelectorTokens , RenderOptions , RenderResult , ResolutionToken , ResolvedPath , RuleVisitorHandler , SemiColonToken , Separator , ShorthandDef , ShorthandMapType , ShorthandProperties , ShorthandPropertyType , ShorthandType , SourceMapObject , StartMatchToken , StringToken , SubToken , SubsequentCombinatorToken , TimeToken , TimelineFunctionToken , TimingFunctionToken , Token$1 as Token , TokenizeResult , TransformOptions , TransformResult , UnaryExpression , UnaryExpressionNode , UnclosedStringToken , UniversalSelectorToken , UrlToken , ValidationConfiguration , ValidationOptions , ValidationResult , ValidationSelectorOptions , ValidationSyntaxNode , ValidationSyntaxResult , Value , ValueVisitorHandler , VariableScopeInfo , VisitorNodeMap , WalkAttributesResult , WalkResult , WalkerFilter , WalkerOption , WalkerValueFilter , WhitespaceToken } ;
0 commit comments