@lvce-editor/shared-process 0.16.20 → 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.
- package/extensions/builtin.language-basics-css/src/tokenizeCss.js +31 -2
- package/extensions/builtin.theme-atom-one-dark/color-theme.json +8 -0
- package/extensions/builtin.theme-ayu/color-theme.json +8 -0
- package/extensions/builtin.theme-cobalt2/color-theme.json +4 -0
- package/extensions/builtin.theme-slime/color-theme.json +4 -0
- package/package.json +4 -4
- package/src/parts/Platform/Platform.js +3 -3
|
@@ -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')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/shared-process",
|
|
3
|
-
"version": "0.16.
|
|
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
|
-
"@lvce-editor/extension-host-helper-process": "0.16.
|
|
22
|
-
"@lvce-editor/pty-host": "0.16.
|
|
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.
|
|
172
|
+
export const version = '0.16.22'
|
|
173
173
|
|
|
174
|
-
export const commit = '
|
|
174
|
+
export const commit = '84da26e'
|
|
175
175
|
|
|
176
|
-
export const date = '2023-07-
|
|
176
|
+
export const date = '2023-07-30T16:05:29.000Z'
|
|
177
177
|
|
|
178
178
|
export const getVersion = () => {
|
|
179
179
|
return version
|