@lvce-editor/shared-process 0.16.21 → 0.16.22

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.
@@ -93,8 +93,8 @@ const RE_CURLY_OPEN = /^\{/
93
93
  const RE_CURLY_CLOSE = /^\}/
94
94
  const RE_PROPERTY_NAME = /^[a-zA-Z\-\w]+/
95
95
  const RE_COLON = /^:/
96
- const RE_PROPERTY_VALUE = /^[^;\}]+/
97
- const RE_PROPERTY_VALUE_SHORT = /^[^;\}\s\)]+/
96
+ const RE_PROPERTY_VALUE = /^[^;\}\/]+/
97
+ const RE_PROPERTY_VALUE_SHORT = /^[^;\}\s\)\/]+/
98
98
  const RE_PROPERTY_VALUE_INSIDE_FUNCTION = /^[^\}\s\)]+/
99
99
  const RE_SEMICOLON = /^;/
100
100
  const RE_COMMA = /^,/
@@ -124,6 +124,9 @@ const RE_STRING_DOUBLE_QUOTE_CONTENT = /^[^"]+/
124
124
  const RE_STRING_SINGLE_QUOTE_CONTENT = /^[^']+/
125
125
  const RE_SINGLE_QUOTE = /^'/
126
126
  const RE_ANYTHING_BUT_CURLY = /^[^\{\}]+/s
127
+ const RE_PUNCTUATION = /^[\.:\(\)]/
128
+ const RE_VERTICAL_LINE = /^\|/
129
+ const RE_SLASH = /^\//
127
130
 
128
131
  export const initialLineState = {
129
132
  state: State.TopLevelContent,
@@ -241,6 +244,12 @@ export const tokenizeLine = (line, lineState) => {
241
244
  } else if ((next = part.match(RE_STAR))) {
242
245
  token = TokenType.CssSelector
243
246
  state = State.AfterSelector
247
+ } else if ((next = part.match(RE_VERTICAL_LINE))) {
248
+ token = TokenType.Punctuation
249
+ state = State.AfterSelector
250
+ } else if ((next = part.match(RE_SLASH))) {
251
+ token = TokenType.Punctuation
252
+ state = State.AfterSelector
244
253
  } else if ((next = part.match(RE_ANYTHING_BUT_CURLY))) {
245
254
  token = TokenType.Unknown
246
255
  state = State.AfterSelector
@@ -277,6 +286,13 @@ export const tokenizeLine = (line, lineState) => {
277
286
  } else if ((next = part.match(RE_SEMICOLON))) {
278
287
  token = TokenType.Punctuation
279
288
  state = stack.pop() || State.TopLevelContent
289
+ } else if ((next = part.match(RE_PUNCTUATION))) {
290
+ token = TokenType.Punctuation
291
+ state = State.AfterQuery
292
+ } else if ((next = part.match(RE_BLOCK_COMMENT_START))) {
293
+ stack.push(state)
294
+ token = TokenType.Comment
295
+ state = State.InsideBlockComment
280
296
  } else {
281
297
  part
282
298
  throw new Error('no')
@@ -322,6 +338,9 @@ export const tokenizeLine = (line, lineState) => {
322
338
  } else if ((next = part.match(RE_STAR))) {
323
339
  token = TokenType.Punctuation
324
340
  state = State.InsideSelector
341
+ } else if ((next = part.match(RE_QUERY))) {
342
+ token = TokenType.Query
343
+ state = State.AfterQuery
325
344
  } else if ((next = part.match(RE_ANYTHING_UNTIL_CLOSE_BRACE))) {
326
345
  token = TokenType.Unknown
327
346
  state = State.InsideSelector
@@ -390,6 +409,13 @@ export const tokenizeLine = (line, lineState) => {
390
409
  } else if ((next = part.match(RE_CURLY_CLOSE))) {
391
410
  token = TokenType.Punctuation
392
411
  state = State.TopLevelContent
412
+ } else if ((next = part.match(RE_BLOCK_COMMENT_START))) {
413
+ stack.push(state)
414
+ token = TokenType.Comment
415
+ state = State.InsideBlockComment
416
+ } else if ((next = part.match(RE_SLASH))) {
417
+ token = TokenType.Punctuation
418
+ state = State.AfterPropertyNameAfterColon
393
419
  } else {
394
420
  part
395
421
  throw new Error('no')
@@ -470,6 +496,9 @@ export const tokenizeLine = (line, lineState) => {
470
496
  } else if ((next = part.match(RE_CURLY_CLOSE))) {
471
497
  token = TokenType.Punctuation
472
498
  state = State.TopLevelContent
499
+ } else if ((next = part.match(RE_SLASH))) {
500
+ token = TokenType.Punctuation
501
+ state = State.AfterFunctionName
473
502
  } else {
474
503
  part
475
504
  throw new Error('no')
@@ -203,6 +203,14 @@
203
203
  {
204
204
  "name": "KeywordModifier",
205
205
  "foreground": "#C678DD"
206
+ },
207
+ {
208
+ "name": "Class",
209
+ "foreground": "#E5C07B"
210
+ },
211
+ {
212
+ "name": "CssPseudoSelector",
213
+ "foreground": "#D19A66"
206
214
  }
207
215
  ]
208
216
  }
@@ -204,6 +204,14 @@
204
204
  {
205
205
  "name": "KeywordAwait",
206
206
  "foreground": "#FA8D3E"
207
+ },
208
+ {
209
+ "name": "CssAtRule",
210
+ "foreground": "#FA8D3E"
211
+ },
212
+ {
213
+ "name": "CssPseudoSelector",
214
+ "foreground": "#F2AE49"
207
215
  }
208
216
  ]
209
217
  }
@@ -193,6 +193,10 @@
193
193
  {
194
194
  "name": "KeywordAwait",
195
195
  "foreground": "#FF9D00"
196
+ },
197
+ {
198
+ "name": "CssPseudoSelector",
199
+ "foreground": "#3AD900"
196
200
  }
197
201
  ]
198
202
  }
@@ -270,6 +270,10 @@
270
270
  {
271
271
  "name": "MarkdownLinkUrl",
272
272
  "foreground": "#B2885F"
273
+ },
274
+ {
275
+ "name": "CssPseudoSelector",
276
+ "foreground": "#7A8D5C"
273
277
  }
274
278
  ]
275
279
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.16.21",
3
+ "version": "0.16.22",
4
4
  "description": "Utility package for @lvce-editor/server",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -17,9 +17,9 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@babel/code-frame": "^7.22.5",
20
- "@lvce-editor/extension-host": "0.16.21",
21
- "@lvce-editor/extension-host-helper-process": "0.16.21",
22
- "@lvce-editor/pty-host": "0.16.21",
20
+ "@lvce-editor/extension-host": "0.16.22",
21
+ "@lvce-editor/extension-host-helper-process": "0.16.22",
22
+ "@lvce-editor/pty-host": "0.16.22",
23
23
  "debug": "^4.3.4",
24
24
  "execa": "^7.1.1",
25
25
  "exit-hook": "^3.2.0",
@@ -169,11 +169,11 @@ export const getSetupName = () => {
169
169
  return 'Lvce-Setup'
170
170
  }
171
171
 
172
- export const version = '0.16.21'
172
+ export const version = '0.16.22'
173
173
 
174
- export const commit = '4b1abf4'
174
+ export const commit = '84da26e'
175
175
 
176
- export const date = '2023-07-30T09:17:12.000Z'
176
+ export const date = '2023-07-30T16:05:29.000Z'
177
177
 
178
178
  export const getVersion = () => {
179
179
  return version