@swissquote/crafty-preset-lightningcss 1.29.1-beta.2 → 1.29.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11054,6 +11054,12 @@ function findLastWithPosition(tokens) {
11054
11054
  }
11055
11055
  }
11056
11056
 
11057
+ function tokensToString(tokens, from, to) {
11058
+ let result = ''
11059
+ for (let i = from; i < to; i++) result += tokens[i][1]
11060
+ return result
11061
+ }
11062
+
11057
11063
  class Parser {
11058
11064
  constructor(input) {
11059
11065
  this.input = input
@@ -11166,9 +11172,10 @@ class Parser {
11166
11172
  if (founded === 2) break
11167
11173
  }
11168
11174
  }
11169
- // If the token is a word, e.g. `!important`, `red` or any other valid property's value.
11170
- // Then we need to return the colon after that word token. [3] is the "end" colon of that word.
11171
- // And because we need it after that one we do +1 to get the next one.
11175
+ // If the token is a word, e.g. `!important`, `red` or any other valid
11176
+ // property's value. Then we need to return the colon after that word
11177
+ // token. [3] is the "end" colon of that word. And because we need it
11178
+ // after that one we do +1 to get the next one.
11172
11179
  throw this.input.error(
11173
11180
  'Missed semicolon',
11174
11181
  token[0] === 'word' ? token[3] + 1 : token[2]
@@ -11241,50 +11248,50 @@ class Parser {
11241
11248
  )
11242
11249
  node.source.end.offset++
11243
11250
 
11244
- while (tokens[0][0] !== 'word') {
11245
- if (tokens.length === 1) this.unknownWord(tokens)
11246
- node.raws.before += tokens.shift()[1]
11251
+ let start = 0
11252
+ while (tokens[start][0] !== 'word') {
11253
+ if (start === tokens.length - 1) this.unknownWord([tokens[start]])
11254
+ start++
11247
11255
  }
11248
- node.source.start = this.getPosition(tokens[0][2])
11256
+ node.raws.before += tokensToString(tokens, 0, start)
11257
+ node.source.start = this.getPosition(tokens[start][2])
11249
11258
 
11250
- node.prop = ''
11251
- while (tokens.length) {
11252
- let type = tokens[0][0]
11259
+ let propStart = start
11260
+ while (start < tokens.length) {
11261
+ let type = tokens[start][0]
11253
11262
  if (type === ':' || type === 'space' || type === 'comment') {
11254
11263
  break
11255
11264
  }
11256
- node.prop += tokens.shift()[1]
11265
+ start++
11257
11266
  }
11267
+ node.prop = tokensToString(tokens, propStart, start)
11258
11268
 
11259
- node.raws.between = ''
11260
-
11269
+ let betweenStart = start
11261
11270
  let token
11262
- while (tokens.length) {
11263
- token = tokens.shift()
11264
-
11265
- if (token[0] === ':') {
11266
- node.raws.between += token[1]
11267
- break
11268
- } else {
11269
- if (token[0] === 'word' && /\w/.test(token[1])) {
11270
- this.unknownWord([token])
11271
- }
11272
- node.raws.between += token[1]
11271
+ while (start < tokens.length) {
11272
+ token = tokens[start]
11273
+ start++
11274
+ if (token[0] === ':') break
11275
+ if (token[0] === 'word' && /\w/.test(token[1])) {
11276
+ this.unknownWord([token])
11273
11277
  }
11274
11278
  }
11279
+ node.raws.between = tokensToString(tokens, betweenStart, start)
11275
11280
 
11276
11281
  if (node.prop[0] === '_' || node.prop[0] === '*') {
11277
11282
  node.raws.before += node.prop[0]
11278
11283
  node.prop = node.prop.slice(1)
11279
11284
  }
11280
11285
 
11281
- let firstSpaces = []
11282
- let next
11283
- while (tokens.length) {
11284
- next = tokens[0][0]
11286
+ let firstSpacesStart = start
11287
+ while (start < tokens.length) {
11288
+ let next = tokens[start][0]
11285
11289
  if (next !== 'space' && next !== 'comment') break
11286
- firstSpaces.push(tokens.shift())
11290
+ start++
11287
11291
  }
11292
+ let firstSpaces = tokens.slice(firstSpacesStart, start)
11293
+
11294
+ tokens = tokens.slice(start)
11288
11295
 
11289
11296
  this.precheckMissedSemicolon(tokens)
11290
11297
 
@@ -11938,7 +11945,7 @@ let Root = __nccwpck_require__(6265)
11938
11945
 
11939
11946
  class Processor {
11940
11947
  constructor(plugins = []) {
11941
- this.version = '8.5.14'
11948
+ this.version = '8.5.15'
11942
11949
  this.plugins = this.normalize(plugins)
11943
11950
  }
11944
11951
 
@@ -13563,7 +13570,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"title":"CSS Loader options","additio
13563
13570
  /***/ ((module) => {
13564
13571
 
13565
13572
  "use strict";
13566
- module.exports = /*#__PURE__*/JSON.parse('{"name":"postcss","version":"8.5.14","description":"Tool for transforming styles with JS plugins","keywords":["css","manipulation","parser","postcss","preprocessor","rework","source map","transform","transpiler"],"homepage":"https://postcss.org/","bugs":{"url":"https://github.com/postcss/postcss/issues"},"license":"MIT","author":"Andrey Sitnik <andrey@sitnik.es>","repository":"postcss/postcss","funding":[{"type":"opencollective","url":"https://opencollective.com/postcss/"},{"type":"tidelift","url":"https://tidelift.com/funding/github/npm/postcss"},{"type":"github","url":"https://github.com/sponsors/ai"}],"main":"./lib/postcss.js","browser":{"./lib/terminal-highlight":false,"source-map-js":false,"path":false,"url":false,"fs":false},"types":"./lib/postcss.d.ts","exports":{".":{"import":"./lib/postcss.mjs","require":"./lib/postcss.js"},"./lib/at-rule":"./lib/at-rule.js","./lib/comment":"./lib/comment.js","./lib/container":"./lib/container.js","./lib/css-syntax-error":"./lib/css-syntax-error.js","./lib/declaration":"./lib/declaration.js","./lib/fromJSON":"./lib/fromJSON.js","./lib/input":"./lib/input.js","./lib/lazy-result":"./lib/lazy-result.js","./lib/no-work-result":"./lib/no-work-result.js","./lib/list":"./lib/list.js","./lib/map-generator":"./lib/map-generator.js","./lib/node":"./lib/node.js","./lib/parse":"./lib/parse.js","./lib/parser":"./lib/parser.js","./lib/postcss":"./lib/postcss.js","./lib/previous-map":"./lib/previous-map.js","./lib/processor":"./lib/processor.js","./lib/result":"./lib/result.js","./lib/root":"./lib/root.js","./lib/rule":"./lib/rule.js","./lib/stringifier":"./lib/stringifier.js","./lib/stringify":"./lib/stringify.js","./lib/symbols":"./lib/symbols.js","./lib/terminal-highlight":"./lib/terminal-highlight.js","./lib/tokenize":"./lib/tokenize.js","./lib/warn-once":"./lib/warn-once.js","./lib/warning":"./lib/warning.js","./package.json":"./package.json"},"dependencies":{"nanoid":"^3.3.11","picocolors":"^1.1.1","source-map-js":"^1.2.1"},"engines":{"node":"^10 || ^12 || >=14"}}');
13573
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"postcss","version":"8.5.15","description":"Tool for transforming styles with JS plugins","keywords":["css","manipulation","parser","postcss","preprocessor","rework","source map","transform","transpiler"],"homepage":"https://postcss.org/","bugs":{"url":"https://github.com/postcss/postcss/issues"},"license":"MIT","author":"Andrey Sitnik <andrey@sitnik.es>","repository":"postcss/postcss","funding":[{"type":"opencollective","url":"https://opencollective.com/postcss/"},{"type":"tidelift","url":"https://tidelift.com/funding/github/npm/postcss"},{"type":"github","url":"https://github.com/sponsors/ai"}],"main":"./lib/postcss.js","browser":{"./lib/terminal-highlight":false,"source-map-js":false,"path":false,"url":false,"fs":false},"types":"./lib/postcss.d.ts","exports":{".":{"import":"./lib/postcss.mjs","require":"./lib/postcss.js"},"./lib/at-rule":"./lib/at-rule.js","./lib/comment":"./lib/comment.js","./lib/container":"./lib/container.js","./lib/css-syntax-error":"./lib/css-syntax-error.js","./lib/declaration":"./lib/declaration.js","./lib/fromJSON":"./lib/fromJSON.js","./lib/input":"./lib/input.js","./lib/lazy-result":"./lib/lazy-result.js","./lib/no-work-result":"./lib/no-work-result.js","./lib/list":"./lib/list.js","./lib/map-generator":"./lib/map-generator.js","./lib/node":"./lib/node.js","./lib/parse":"./lib/parse.js","./lib/parser":"./lib/parser.js","./lib/postcss":"./lib/postcss.js","./lib/previous-map":"./lib/previous-map.js","./lib/processor":"./lib/processor.js","./lib/result":"./lib/result.js","./lib/root":"./lib/root.js","./lib/rule":"./lib/rule.js","./lib/stringifier":"./lib/stringifier.js","./lib/stringify":"./lib/stringify.js","./lib/symbols":"./lib/symbols.js","./lib/terminal-highlight":"./lib/terminal-highlight.js","./lib/tokenize":"./lib/tokenize.js","./lib/warn-once":"./lib/warn-once.js","./lib/warning":"./lib/warning.js","./package.json":"./package.json"},"dependencies":{"nanoid":"^3.3.12","picocolors":"^1.1.1","source-map-js":"^1.2.1"},"engines":{"node":"^10 || ^12 || >=14"}}');
13567
13574
 
13568
13575
  /***/ }),
13569
13576