Changeset 0c6b92a for imaps-frontend/node_modules/postcss/lib
- Timestamp:
- 12/12/24 17:06:06 (5 weeks ago)
- Branches:
- main
- Parents:
- d565449
- Location:
- imaps-frontend/node_modules/postcss/lib
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/postcss/lib/at-rule.d.ts
rd565449 r0c6b92a 81 81 declare class AtRule_ extends Container { 82 82 /** 83 * The at-rule’s name immediately follows the `@`.84 *85 * ```js86 * const root = postcss.parse('@media print {}')87 * const media = root.first88 * media.name //=> 'media'89 * ```90 */91 get name(): string92 set name(value: string)93 94 /**95 83 * An array containing the layer’s children. 96 84 * … … 111 99 */ 112 100 nodes: Container['nodes'] 101 parent: ContainerWithChildren | undefined 102 103 raws: AtRule.AtRuleRaws 104 type: 'atrule' 105 constructor(defaults?: AtRule.AtRuleProps) 106 assign(overrides: AtRule.AtRuleProps | object): this 107 108 clone(overrides?: Partial<AtRule.AtRuleProps>): this 109 110 cloneAfter(overrides?: Partial<AtRule.AtRuleProps>): this 111 112 cloneBefore(overrides?: Partial<AtRule.AtRuleProps>): this 113 /** 114 * The at-rule’s name immediately follows the `@`. 115 * 116 * ```js 117 * const root = postcss.parse('@media print {}') 118 * const media = root.first 119 * media.name //=> 'media' 120 * ``` 121 */ 122 get name(): string 123 set name(value: string) 113 124 /** 114 125 * The at-rule’s parameters, the values that follow the at-rule’s name … … 123 134 get params(): string 124 135 set params(value: string) 125 parent: ContainerWithChildren | undefined126 127 raws: AtRule.AtRuleRaws128 129 type: 'atrule'130 131 constructor(defaults?: AtRule.AtRuleProps)132 assign(overrides: AtRule.AtRuleProps | object): this133 clone(overrides?: Partial<AtRule.AtRuleProps>): AtRule134 cloneAfter(overrides?: Partial<AtRule.AtRuleProps>): AtRule135 cloneBefore(overrides?: Partial<AtRule.AtRuleProps>): AtRule136 136 } 137 137 -
imaps-frontend/node_modules/postcss/lib/comment.d.ts
rd565449 r0c6b92a 49 49 parent: Container | undefined 50 50 raws: Comment.CommentRaws 51 type: 'comment' 52 constructor(defaults?: Comment.CommentProps) 53 54 assign(overrides: Comment.CommentProps | object): this 55 56 clone(overrides?: Partial<Comment.CommentProps>): this 57 cloneAfter(overrides?: Partial<Comment.CommentProps>): this 58 cloneBefore(overrides?: Partial<Comment.CommentProps>): this 51 59 /** 52 60 * The comment's text. … … 54 62 get text(): string 55 63 set text(value: string) 56 57 type: 'comment'58 59 constructor(defaults?: Comment.CommentProps)60 assign(overrides: Comment.CommentProps | object): this61 clone(overrides?: Partial<Comment.CommentProps>): Comment62 cloneAfter(overrides?: Partial<Comment.CommentProps>): Comment63 cloneBefore(overrides?: Partial<Comment.CommentProps>): Comment64 64 } 65 65 -
imaps-frontend/node_modules/postcss/lib/container.d.ts
rd565449 r0c6b92a 21 21 * An array of property names. 22 22 */ 23 props?: string[]23 props?: readonly string[] 24 24 } 25 25 26 26 export interface ContainerProps extends NodeProps { 27 nodes?: (ChildNode | ChildProps)[]27 nodes?: readonly (ChildProps | Node)[] 28 28 } 29 30 /** 31 * All types that can be passed into container methods to create or add a new 32 * child node. 33 */ 34 export type NewChild = 35 | ChildProps 36 | Node 37 | readonly ChildProps[] 38 | readonly Node[] 39 | readonly string[] 40 | string 41 | undefined 29 42 30 43 // eslint-disable-next-line @typescript-eslint/no-use-before-define … … 53 66 54 67 /** 68 * An internal method that converts a {@link NewChild} into a list of actual 69 * child nodes that can then be added to this container. 70 * 71 * This ensures that the nodes' parent is set to this container, that they use 72 * the correct prototype chain, and that they're marked as dirty. 73 * 74 * @param mnodes The new node or nodes to add. 75 * @param sample A node from whose raws the new node's `before` raw should be 76 * taken. 77 * @param type This should be set to `'prepend'` if the new nodes will be 78 * inserted at the beginning of the container. 79 * @hidden 80 */ 81 protected normalize( 82 nodes: Container.NewChild, 83 sample: Node | undefined, 84 type?: 'prepend' | false 85 ): Child[] 86 87 /** 55 88 * Inserts new nodes to the end of the container. 56 89 * … … 72 105 * @return This node for methods chain. 73 106 */ 74 append( 75 ...nodes: ( 76 | ChildProps 77 | ChildProps[] 78 | Node 79 | Node[] 80 | string 81 | string[] 82 | undefined 83 )[] 84 ): this 85 107 append(...nodes: Container.NewChild[]): this 86 108 assign(overrides: Container.ContainerProps | object): this 87 clone(overrides?: Partial<Container.ContainerProps>): Container<Child> 88 cloneAfter(overrides?: Partial<Container.ContainerProps>): Container<Child> 89 cloneBefore(overrides?: Partial<Container.ContainerProps>): Container<Child> 109 clone(overrides?: Partial<Container.ContainerProps>): this 110 cloneAfter(overrides?: Partial<Container.ContainerProps>): this 111 112 cloneBefore(overrides?: Partial<Container.ContainerProps>): this 90 113 91 114 /** … … 125 148 callback: (node: Child, index: number) => false | void 126 149 ): false | undefined 127 128 150 /** 129 151 * Returns `true` if callback returns `true` … … 140 162 condition: (node: Child, index: number, nodes: Child[]) => boolean 141 163 ): boolean 164 142 165 /** 143 166 * Returns a `child`’s index within the `Container#nodes` array. … … 151 174 */ 152 175 index(child: Child | number): number 153 154 176 /** 155 177 * Insert new node after old node within the container. … … 159 181 * @return This node for methods chain. 160 182 */ 161 insertAfter( 162 oldNode: Child | number, 163 newNode: 164 | Child 165 | Child[] 166 | ChildProps 167 | ChildProps[] 168 | string 169 | string[] 170 | undefined 171 ): this 183 insertAfter(oldNode: Child | number, newNode: Container.NewChild): this 184 172 185 /** 173 186 * Insert new node before old node within the container. … … 181 194 * @return This node for methods chain. 182 195 */ 183 insertBefore( 184 oldNode: Child | number, 185 newNode: 186 | Child 187 | Child[] 188 | ChildProps 189 | ChildProps[] 190 | string 191 | string[] 192 | undefined 193 ): this 196 insertBefore(oldNode: Child | number, newNode: Container.NewChild): this 194 197 195 198 /** … … 230 233 * @return This node for methods chain. 231 234 */ 232 prepend( 233 ...nodes: ( 234 | ChildProps 235 | ChildProps[] 236 | Node 237 | Node[] 238 | string 239 | string[] 240 | undefined 241 )[] 242 ): this 235 prepend(...nodes: Container.NewChild[]): this 243 236 /** 244 237 * Add child to the end of the node. … … 302 295 * 303 296 * @param pattern Replace pattern. 304 * @param {object} opt sOptions to speed up the search.305 * @param callbackString to replace pattern or callback297 * @param {object} options Options to speed up the search. 298 * @param replaced String to replace pattern or callback 306 299 * that returns a new value. The callback 307 300 * will receive the same arguments -
imaps-frontend/node_modules/postcss/lib/container.js
rd565449 r0c6b92a 1 1 'use strict' 2 2 3 let Comment = require('./comment') 4 let Declaration = require('./declaration') 5 let Node = require('./node') 3 6 let { isClean, my } = require('./symbols') 4 let Declaration = require('./declaration') 5 let Comment = require('./comment') 6 let Node = require('./node') 7 8 let parse, Rule, AtRule, Root 7 8 let AtRule, parse, Root, Rule 9 9 10 10 function cleanSource(nodes) { … … 199 199 } 200 200 nodes = [new Declaration(nodes)] 201 } else if (nodes.selector ) {201 } else if (nodes.selector || nodes.selectors) { 202 202 nodes = [new Rule(nodes)] 203 203 } else if (nodes.name) { … … 215 215 if (i.parent) i.parent.removeChild(i) 216 216 if (i[isClean]) markTreeDirty(i) 217 218 if (!i.raws) i.raws = {} 217 219 if (typeof i.raws.before === 'undefined') { 218 220 if (sample && typeof sample.raws.before !== 'undefined') { -
imaps-frontend/node_modules/postcss/lib/css-syntax-error.js
rd565449 r0c6b92a 53 53 let css = this.source 54 54 if (color == null) color = pico.isColorSupported 55 if (terminalHighlight) { 56 if (color) css = terminalHighlight(css) 55 56 let aside = text => text 57 let mark = text => text 58 let highlight = text => text 59 if (color) { 60 let { bold, gray, red } = pico.createColors(true) 61 mark = text => bold(red(text)) 62 aside = text => gray(text) 63 if (terminalHighlight) { 64 highlight = text => terminalHighlight(text) 65 } 57 66 } 58 67 … … 60 69 let start = Math.max(this.line - 3, 0) 61 70 let end = Math.min(this.line + 2, lines.length) 62 63 71 let maxWidth = String(end).length 64 65 let mark, aside66 if (color) {67 let { bold, gray, red } = pico.createColors(true)68 mark = text => bold(red(text))69 aside = text => gray(text)70 } else {71 mark = aside = str => str72 }73 72 74 73 return lines … … 78 77 let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | ' 79 78 if (number === this.line) { 79 if (line.length > 160) { 80 let padding = 20 81 let subLineStart = Math.max(0, this.column - padding) 82 let subLineEnd = Math.max( 83 this.column + padding, 84 this.endColumn + padding 85 ) 86 let subLine = line.slice(subLineStart, subLineEnd) 87 88 let spacing = 89 aside(gutter.replace(/\d/g, ' ')) + 90 line 91 .slice(0, Math.min(this.column - 1, padding - 1)) 92 .replace(/[^\t]/g, ' ') 93 94 return ( 95 mark('>') + 96 aside(gutter) + 97 highlight(subLine) + 98 '\n ' + 99 spacing + 100 mark('^') 101 ) 102 } 103 80 104 let spacing = 81 105 aside(gutter.replace(/\d/g, ' ')) + 82 106 line.slice(0, this.column - 1).replace(/[^\t]/g, ' ') 83 return mark('>') + aside(gutter) + line + '\n ' + spacing + mark('^') 107 108 return ( 109 mark('>') + 110 aside(gutter) + 111 highlight(line) + 112 '\n ' + 113 spacing + 114 mark('^') 115 ) 84 116 } 85 return ' ' + aside(gutter) + line 117 118 return ' ' + aside(gutter) + highlight(line) 86 119 }) 87 120 .join('\n') -
imaps-frontend/node_modules/postcss/lib/declaration.d.ts
rd565449 r0c6b92a 64 64 */ 65 65 declare class Declaration_ extends Node { 66 parent: ContainerWithChildren | undefined 67 raws: Declaration.DeclarationRaws 68 69 type: 'decl' 70 71 constructor(defaults?: Declaration.DeclarationProps) 72 assign(overrides: Declaration.DeclarationProps | object): this 73 74 clone(overrides?: Partial<Declaration.DeclarationProps>): this 75 76 cloneAfter(overrides?: Partial<Declaration.DeclarationProps>): this 77 78 cloneBefore(overrides?: Partial<Declaration.DeclarationProps>): this 66 79 /** 67 80 * It represents a specificity of the declaration. … … 79 92 */ 80 93 get important(): boolean 94 81 95 set important(value: boolean) 82 83 parent: ContainerWithChildren | undefined84 85 96 /** 86 97 * The property name for a CSS declaration. … … 94 105 */ 95 106 get prop(): string 107 96 108 set prop(value: string) 97 98 raws: Declaration.DeclarationRaws99 100 type: 'decl'101 102 109 /** 103 110 * The property value for a CSS declaration. … … 119 126 get value(): string 120 127 set value(value: string) 121 122 128 /** 123 129 * It represents a getter that returns `true` if a declaration starts with … … 139 145 */ 140 146 get variable(): boolean 141 set varaible(value: string)142 143 constructor(defaults?: Declaration.DeclarationProps)144 assign(overrides: Declaration.DeclarationProps | object): this145 clone(overrides?: Partial<Declaration.DeclarationProps>): Declaration146 cloneAfter(overrides?: Partial<Declaration.DeclarationProps>): Declaration147 cloneBefore(overrides?: Partial<Declaration.DeclarationProps>): Declaration148 147 } 149 148 -
imaps-frontend/node_modules/postcss/lib/document.d.ts
rd565449 r0c6b92a 6 6 declare namespace Document { 7 7 export interface DocumentProps extends ContainerProps { 8 nodes?: Root[]8 nodes?: readonly Root[] 9 9 10 10 /** … … 43 43 44 44 assign(overrides: Document.DocumentProps | object): this 45 clone(overrides?: Partial<Document.DocumentProps>): Document46 cloneAfter(overrides?: Partial<Document.DocumentProps>): Document47 cloneBefore(overrides?: Partial<Document.DocumentProps>): Document45 clone(overrides?: Partial<Document.DocumentProps>): this 46 cloneAfter(overrides?: Partial<Document.DocumentProps>): this 47 cloneBefore(overrides?: Partial<Document.DocumentProps>): this 48 48 49 49 /** -
imaps-frontend/node_modules/postcss/lib/fromJSON.js
rd565449 r0c6b92a 1 1 'use strict' 2 2 3 let AtRule = require('./at-rule') 4 let Comment = require('./comment') 3 5 let Declaration = require('./declaration') 6 let Input = require('./input') 4 7 let PreviousMap = require('./previous-map') 5 let Comment = require('./comment')6 let AtRule = require('./at-rule')7 let Input = require('./input')8 8 let Root = require('./root') 9 9 let Rule = require('./rule') -
imaps-frontend/node_modules/postcss/lib/input.d.ts
rd565449 r0c6b92a 175 175 endColumn?: number 176 176 ): false | Input.FilePosition 177 /** Converts this to a JSON-friendly object representation. */ 178 toJSON(): object 179 177 180 /** 178 181 * The CSS source identifier. Contains `Input#file` if the user -
imaps-frontend/node_modules/postcss/lib/input.js
rd565449 r0c6b92a 1 1 'use strict' 2 2 3 let { nanoid } = require('nanoid/non-secure') 4 let { isAbsolute, resolve } = require('path') 3 5 let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') 4 6 let { fileURLToPath, pathToFileURL } = require('url') 5 let { isAbsolute, resolve } = require('path') 6 let { nanoid } = require('nanoid/non-secure') 7 8 let terminalHighlight = require('./terminal-highlight') 7 9 8 let CssSyntaxError = require('./css-syntax-error') 10 9 let PreviousMap = require('./previous-map') 10 let terminalHighlight = require('./terminal-highlight') 11 11 12 12 let fromOffsetCache = Symbol('fromOffsetCache') … … 62 62 63 63 error(message, line, column, opts = {}) { 64 let result, endLine, endColumn64 let endColumn, endLine, result 65 65 66 66 if (line && typeof line === 'object') { -
imaps-frontend/node_modules/postcss/lib/lazy-result.js
rd565449 r0c6b92a 1 1 'use strict' 2 2 3 let { isClean, my } = require('./symbols')4 let MapGenerator = require('./map-generator')5 let stringify = require('./stringify')6 3 let Container = require('./container') 7 4 let Document = require('./document') 5 let MapGenerator = require('./map-generator') 6 let parse = require('./parse') 7 let Result = require('./result') 8 let Root = require('./root') 9 let stringify = require('./stringify') 10 let { isClean, my } = require('./symbols') 8 11 let warnOnce = require('./warn-once') 9 let Result = require('./result')10 let parse = require('./parse')11 let Root = require('./root')12 12 13 13 const TYPE_TO_CLASS_NAME = { -
imaps-frontend/node_modules/postcss/lib/list.d.ts
rd565449 r0c6b92a 48 48 * @return Split values. 49 49 */ 50 split(string: string, separators: string[], last: boolean): string[] 50 split( 51 string: string, 52 separators: readonly string[], 53 last: boolean 54 ): string[] 51 55 } 52 56 } 53 57 54 // eslint-disable-next-line @typescript-eslint/no-redeclare55 58 declare const list: list.List 56 59 -
imaps-frontend/node_modules/postcss/lib/map-generator.js
rd565449 r0c6b92a 1 1 'use strict' 2 2 3 let { dirname, relative, resolve, sep } = require('path') 3 4 let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') 4 let { dirname, relative, resolve, sep } = require('path')5 5 let { pathToFileURL } = require('url') 6 6 … … 71 71 node = this.root.nodes[i] 72 72 if (node.type !== 'comment') continue 73 if (node.text. indexOf('# sourceMappingURL=') === 0) {73 if (node.text.startsWith('# sourceMappingURL=')) { 74 74 this.root.removeChild(i) 75 75 } 76 76 } 77 77 } else if (this.css) { 78 this.css = this.css.replace(/\n* ?\/\*#[\S\s]*?\*\/$/gm, '')78 this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, '') 79 79 } 80 80 } … … 144 144 } 145 145 146 let l ines, last146 let last, lines 147 147 this.stringify(this.root, (str, node, type) => { 148 148 this.css += str -
imaps-frontend/node_modules/postcss/lib/no-work-result.js
rd565449 r0c6b92a 2 2 3 3 let MapGenerator = require('./map-generator') 4 let parse = require('./parse') 5 const Result = require('./result') 4 6 let stringify = require('./stringify') 5 7 let warnOnce = require('./warn-once') 6 let parse = require('./parse')7 const Result = require('./result')8 8 9 9 class NoWorkResult { -
imaps-frontend/node_modules/postcss/lib/node.d.ts
rd565449 r0c6b92a 3 3 import { AtRuleProps } from './at-rule.js' 4 4 import Comment, { CommentProps } from './comment.js' 5 import Container from './container.js'5 import Container, { NewChild } from './container.js' 6 6 import CssSyntaxError from './css-syntax-error.js' 7 7 import Declaration, { DeclarationProps } from './declaration.js' … … 236 236 237 237 /** 238 * If this node isn't already dirty, marks it and its ancestors as such. This 239 * indicates to the LazyResult processor that the {@link Root} has been 240 * modified by the current plugin and may need to be processed again by other 241 * plugins. 242 */ 243 protected markDirty(): void 244 245 /** 238 246 * Insert new node after current node to current node’s parent. 239 247 * … … 247 255 * @return This node for methods chain. 248 256 */ 249 after(newNode: Node | Node.ChildProps | Node[] | string | undefined): this 257 after( 258 newNode: Node | Node.ChildProps | readonly Node[] | string | undefined 259 ): this 250 260 251 261 /** … … 274 284 * @return This node for methods chain. 275 285 */ 276 before(newNode: Node | Node.ChildProps | Node[] | string | undefined): this 286 before( 287 newNode: Node | Node.ChildProps | readonly Node[] | string | undefined 288 ): this 277 289 278 290 /** … … 304 316 * @return Duplicate of the node instance. 305 317 */ 306 clone(overrides?: object): Node318 clone(overrides?: object): this 307 319 308 320 /** … … 313 325 * @return New node. 314 326 */ 315 cloneAfter(overrides?: object): Node327 cloneAfter(overrides?: object): this 316 328 317 329 /** … … 327 339 * @return New node 328 340 */ 329 cloneBefore(overrides?: object): Node341 cloneBefore(overrides?: object): this 330 342 331 343 /** … … 471 483 * @return Current node to methods chain. 472 484 */ 473 replaceWith( 474 ...nodes: ( 475 | Node.ChildNode 476 | Node.ChildNode[] 477 | Node.ChildProps 478 | Node.ChildProps[] 479 )[] 480 ): this 485 replaceWith(...nodes: NewChild[]): this 481 486 482 487 /** -
imaps-frontend/node_modules/postcss/lib/node.js
rd565449 r0c6b92a 1 1 'use strict' 2 2 3 let { isClean, my } = require('./symbols')4 3 let CssSyntaxError = require('./css-syntax-error') 5 4 let Stringifier = require('./stringifier') 6 5 let stringify = require('./stringify') 6 let { isClean, my } = require('./symbols') 7 7 8 8 function cloneNode(obj, parent) { … … 31 31 32 32 return cloned 33 } 34 35 function sourceOffset(inputCSS, position) { 36 // Not all custom syntaxes support `offset` in `source.start` and `source.end` 37 if ( 38 position && 39 typeof position.offset !== 'undefined' 40 ) { 41 return position.offset; 42 } 43 44 let column = 1 45 let line = 1 46 let offset = 0 47 48 for (let i = 0; i < inputCSS.length; i++) { 49 if (line === position.line && column === position.column) { 50 offset = i 51 break 52 } 53 54 if (inputCSS[i] === '\n') { 55 column = 1 56 line += 1 57 } else { 58 column += 1 59 } 60 } 61 62 return offset 33 63 } 34 64 … … 154 184 } 155 185 186 /* c8 ignore next 3 */ 187 markClean() { 188 this[isClean] = true 189 } 190 156 191 markDirty() { 157 192 if (this[isClean]) { … … 170 205 } 171 206 172 positionBy(opts , stringRepresentation) {207 positionBy(opts) { 173 208 let pos = this.source.start 174 209 if (opts.index) { 175 pos = this.positionInside(opts.index , stringRepresentation)210 pos = this.positionInside(opts.index) 176 211 } else if (opts.word) { 177 stringRepresentation = this.toString() 212 let stringRepresentation = this.source.input.css.slice( 213 sourceOffset(this.source.input.css, this.source.start), 214 sourceOffset(this.source.input.css, this.source.end) 215 ) 178 216 let index = stringRepresentation.indexOf(opts.word) 179 if (index !== -1) pos = this.positionInside(index , stringRepresentation)217 if (index !== -1) pos = this.positionInside(index) 180 218 } 181 219 return pos 182 220 } 183 221 184 positionInside(index, stringRepresentation) { 185 let string = stringRepresentation || this.toString() 222 positionInside(index) { 186 223 let column = this.source.start.column 187 224 let line = this.source.start.line 188 189 for (let i = 0; i < index; i++) { 190 if (string[i] === '\n') { 225 let offset = sourceOffset(this.source.input.css, this.source.start) 226 let end = offset + index 227 228 for (let i = offset; i < end; i++) { 229 if (this.source.input.css[i] === '\n') { 191 230 column = 1 192 231 line += 1 … … 212 251 let end = this.source.end 213 252 ? { 214 column: this.source.end.column + 1,215 line: this.source.end.line216 }253 column: this.source.end.column + 1, 254 line: this.source.end.line 255 } 217 256 : { 218 column: start.column + 1,219 line: start.line220 }257 column: start.column + 1, 258 line: start.line 259 } 221 260 222 261 if (opts.word) { 223 let stringRepresentation = this.toString() 262 let stringRepresentation = this.source.input.css.slice( 263 sourceOffset(this.source.input.css, this.source.start), 264 sourceOffset(this.source.input.css, this.source.end) 265 ) 224 266 let index = stringRepresentation.indexOf(opts.word) 225 267 if (index !== -1) { 226 start = this.positionInside(index, stringRepresentation) 227 end = this.positionInside(index + opts.word.length, stringRepresentation) 268 start = this.positionInside(index) 269 end = this.positionInside( 270 index + opts.word.length, 271 ) 228 272 } 229 273 } else { -
imaps-frontend/node_modules/postcss/lib/parse.js
rd565449 r0c6b92a 2 2 3 3 let Container = require('./container') 4 let Input = require('./input') 4 5 let Parser = require('./parser') 5 let Input = require('./input')6 6 7 7 function parse(css, opts) { -
imaps-frontend/node_modules/postcss/lib/parser.js
rd565449 r0c6b92a 1 1 'use strict' 2 2 3 let AtRule = require('./at-rule') 4 let Comment = require('./comment') 3 5 let Declaration = require('./declaration') 4 let tokenizer = require('./tokenize')5 let Comment = require('./comment')6 let AtRule = require('./at-rule')7 6 let Root = require('./root') 8 7 let Rule = require('./rule') 8 let tokenizer = require('./tokenize') 9 9 10 10 const SAFE_COMMENT_NEIGHBOR = { … … 144 144 colon(tokens) { 145 145 let brackets = 0 146 let token, type, prev146 let prev, token, type 147 147 for (let [i, element] of tokens.entries()) { 148 148 token = element … … 268 268 for (let j = i; j > 0; j--) { 269 269 let type = cache[j][0] 270 if (str.trim(). indexOf('!') === 0&& type !== 'space') {270 if (str.trim().startsWith('!') && type !== 'space') { 271 271 break 272 272 } 273 273 str = cache.pop()[1] + str 274 274 } 275 if (str.trim(). indexOf('!') === 0) {275 if (str.trim().startsWith('!')) { 276 276 node.important = true 277 277 node.raws.important = str -
imaps-frontend/node_modules/postcss/lib/postcss.d.mts
rd565449 r0c6b92a 10 10 parse, 11 11 list, 12 13 12 document, 14 13 comment, … … 17 16 decl, 18 17 root, 19 20 18 CssSyntaxError, 21 19 Declaration, … … 68 66 69 67 // This is a class, but it’s not re-exported. That’s why it’s exported as type-only here. 70 type LazyResult, 71 68 type LazyResult 72 69 } from './postcss.js' -
imaps-frontend/node_modules/postcss/lib/postcss.d.ts
rd565449 r0c6b92a 3 3 import AtRule, { AtRuleProps } from './at-rule.js' 4 4 import Comment, { CommentProps } from './comment.js' 5 import Container, { ContainerProps } from './container.js'5 import Container, { ContainerProps, NewChild } from './container.js' 6 6 import CssSyntaxError from './css-syntax-error.js' 7 7 import Declaration, { DeclarationProps } from './declaration.js' … … 29 29 helper: postcss.Helpers 30 30 ) => Promise<void> | void 31 type RootProcessor = (root: Root, helper: postcss.Helpers) => Promise<void> | void 31 type RootProcessor = ( 32 root: Root, 33 helper: postcss.Helpers 34 ) => Promise<void> | void 32 35 type DeclarationProcessor = ( 33 36 decl: Declaration, 34 37 helper: postcss.Helpers 35 38 ) => Promise<void> | void 36 type RuleProcessor = (rule: Rule, helper: postcss.Helpers) => Promise<void> | void 37 type AtRuleProcessor = (atRule: AtRule, helper: postcss.Helpers) => Promise<void> | void 39 type RuleProcessor = ( 40 rule: Rule, 41 helper: postcss.Helpers 42 ) => Promise<void> | void 43 type AtRuleProcessor = ( 44 atRule: AtRule, 45 helper: postcss.Helpers 46 ) => Promise<void> | void 38 47 type CommentProcessor = ( 39 48 comment: Comment, … … 162 171 list, 163 172 Message, 173 NewChild, 164 174 Node, 165 175 NodeErrorOptions, … … 177 187 } 178 188 179 export type SourceMap = SourceMapGenerator &{189 export type SourceMap = { 180 190 toJSON(): RawSourceMap 181 } 191 } & SourceMapGenerator 182 192 183 193 export type Helpers = { postcss: Postcss; result: Result } & Postcss … … 436 446 * @return Processor to process multiple CSS. 437 447 */ 438 declare function postcss(plugins?: postcss.AcceptedPlugin[]): Processor 448 declare function postcss( 449 plugins?: readonly postcss.AcceptedPlugin[] 450 ): Processor 439 451 declare function postcss(...plugins: postcss.AcceptedPlugin[]): Processor 440 452 -
imaps-frontend/node_modules/postcss/lib/postcss.js
rd565449 r0c6b92a 1 1 'use strict' 2 2 3 let AtRule = require('./at-rule') 4 let Comment = require('./comment') 5 let Container = require('./container') 3 6 let CssSyntaxError = require('./css-syntax-error') 4 7 let Declaration = require('./declaration') 8 let Document = require('./document') 9 let fromJSON = require('./fromJSON') 10 let Input = require('./input') 5 11 let LazyResult = require('./lazy-result') 6 let Container = require('./container') 12 let list = require('./list') 13 let Node = require('./node') 14 let parse = require('./parse') 7 15 let Processor = require('./processor') 16 let Result = require('./result.js') 17 let Root = require('./root') 18 let Rule = require('./rule') 8 19 let stringify = require('./stringify') 9 let fromJSON = require('./fromJSON')10 let Document = require('./document')11 20 let Warning = require('./warning') 12 let Comment = require('./comment')13 let AtRule = require('./at-rule')14 let Result = require('./result.js')15 let Input = require('./input')16 let parse = require('./parse')17 let list = require('./list')18 let Rule = require('./rule')19 let Root = require('./root')20 let Node = require('./node')21 21 22 22 function postcss(...plugins) { -
imaps-frontend/node_modules/postcss/lib/previous-map.js
rd565449 r0c6b92a 1 1 'use strict' 2 2 3 let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')4 3 let { existsSync, readFileSync } = require('fs') 5 4 let { dirname, join } = require('path') 5 let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') 6 6 7 7 function fromBase64(str) { … … 42 42 let uri = /^data:application\/json,/ 43 43 44 if (charsetUri.test(text) || uri.test(text)) { 45 return decodeURIComponent(text.substr(RegExp.lastMatch.length)) 44 let uriMatch = text.match(charsetUri) || text.match(uri) 45 if (uriMatch) { 46 return decodeURIComponent(text.substr(uriMatch[0].length)) 46 47 } 47 48 48 if (baseCharsetUri.test(text) || baseUri.test(text)) { 49 return fromBase64(text.substr(RegExp.lastMatch.length)) 49 let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri) 50 if (baseUriMatch) { 51 return fromBase64(text.substr(baseUriMatch[0].length)) 50 52 } 51 53 … … 68 70 69 71 loadAnnotation(css) { 70 let comments = css.match(/\/\*\s*# sourceMappingURL=/g m)72 let comments = css.match(/\/\*\s*# sourceMappingURL=/g) 71 73 if (!comments) return 72 74 -
imaps-frontend/node_modules/postcss/lib/processor.d.ts
rd565449 r0c6b92a 52 52 * @param plugins PostCSS plugins 53 53 */ 54 constructor(plugins?: AcceptedPlugin[])54 constructor(plugins?: readonly AcceptedPlugin[]) 55 55 56 56 /** -
imaps-frontend/node_modules/postcss/lib/processor.js
rd565449 r0c6b92a 1 1 'use strict' 2 2 3 let Document = require('./document') 4 let LazyResult = require('./lazy-result') 3 5 let NoWorkResult = require('./no-work-result') 4 let LazyResult = require('./lazy-result')5 let Document = require('./document')6 6 let Root = require('./root') 7 7 8 8 class Processor { 9 9 constructor(plugins = []) { 10 this.version = '8.4.4 0'10 this.version = '8.4.49' 11 11 this.plugins = this.normalize(plugins) 12 12 } -
imaps-frontend/node_modules/postcss/lib/result.d.ts
rd565449 r0c6b92a 39 39 plugin?: string 40 40 } 41 42 41 43 42 // eslint-disable-next-line @typescript-eslint/no-use-before-define -
imaps-frontend/node_modules/postcss/lib/root.d.ts
rd565449 r0c6b92a 63 63 64 64 assign(overrides: object | Root.RootProps): this 65 clone(overrides?: Partial<Root.RootProps>): Root66 cloneAfter(overrides?: Partial<Root.RootProps>): Root67 cloneBefore(overrides?: Partial<Root.RootProps>): Root65 clone(overrides?: Partial<Root.RootProps>): this 66 cloneAfter(overrides?: Partial<Root.RootProps>): this 67 cloneBefore(overrides?: Partial<Root.RootProps>): this 68 68 69 69 /** … … 77 77 * ``` 78 78 * 79 * @param opt s Options.79 * @param options Options. 80 80 * @return Result with current root’s CSS. 81 81 */ -
imaps-frontend/node_modules/postcss/lib/rule.d.ts
rd565449 r0c6b92a 41 41 } 42 42 43 export interface RuleProps extends ContainerProps{43 export type RuleProps = { 44 44 /** Information used to generate byte-to-byte equal node string as it was in the origin input. */ 45 45 raws?: RuleRaws 46 /** Selector or selectors of the rule. */ 47 selector?: string 48 /** Selectors of the rule represented as an array of strings. */ 49 selectors?: string[] 50 } 46 } & ( 47 | { 48 /** Selector or selectors of the rule. */ 49 selector: string 50 selectors?: never 51 } 52 | { 53 selector?: never 54 /** Selectors of the rule represented as an array of strings. */ 55 selectors: readonly string[] 56 } 57 ) & ContainerProps 51 58 52 59 // eslint-disable-next-line @typescript-eslint/no-use-before-define … … 76 83 parent: ContainerWithChildren | undefined 77 84 raws: Rule.RuleRaws 85 type: 'rule' 86 constructor(defaults?: Rule.RuleProps) 87 88 assign(overrides: object | Rule.RuleProps): this 89 clone(overrides?: Partial<Rule.RuleProps>): this 90 91 cloneAfter(overrides?: Partial<Rule.RuleProps>): this 92 93 cloneBefore(overrides?: Partial<Rule.RuleProps>): this 78 94 /** 79 95 * The rule’s full selector represented as a string. … … 86 102 */ 87 103 get selector(): string 88 set selector(value: string); 89 104 set selector(value: string) 90 105 /** 91 106 * An array containing the rule’s individual selectors. … … 104 119 */ 105 120 get selectors(): string[] 106 set selectors(values: string[]); 107 108 type: 'rule' 109 110 constructor(defaults?: Rule.RuleProps) 111 assign(overrides: object | Rule.RuleProps): this 112 clone(overrides?: Partial<Rule.RuleProps>): Rule 113 cloneAfter(overrides?: Partial<Rule.RuleProps>): Rule 114 cloneBefore(overrides?: Partial<Rule.RuleProps>): Rule 121 set selectors(values: string[]) 115 122 } 116 123 -
imaps-frontend/node_modules/postcss/lib/tokenize.js
rd565449 r0c6b92a 30 30 let ignore = options.ignoreErrors 31 31 32 let code, next, quote, content, escape33 let escaped, escapePos, prev, n, currentToken32 let code, content, escape, next, quote 33 let currentToken, escaped, escapePos, n, prev 34 34 35 35 let length = css.length
Note:
See TracChangeset
for help on using the changeset viewer.