aboutsummaryrefslogtreecommitdiff
path: root/doc/docs/.vitepress
diff options
context:
space:
mode:
Diffstat (limited to 'doc/docs/.vitepress')
-rw-r--r--doc/docs/.vitepress/public/image/yuescript.svg2
-rwxr-xr-xdoc/docs/.vitepress/theme/components/YueCompiler.vue46
-rw-r--r--doc/docs/.vitepress/theme/custom.css42
-rw-r--r--doc/docs/.vitepress/theme/index.ts3
4 files changed, 62 insertions, 31 deletions
diff --git a/doc/docs/.vitepress/public/image/yuescript.svg b/doc/docs/.vitepress/public/image/yuescript.svg
index 71214fe..f81e533 100644
--- a/doc/docs/.vitepress/public/image/yuescript.svg
+++ b/doc/docs/.vitepress/public/image/yuescript.svg
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 284 244" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g><path d="M88.8,198.15c-2.775,0.6 -6.075,1.2 -8.775,1.725c0.375,-1.5 1.425,-5.85 2.175,-8.625l-2.1,-2.175l-2.475,10.875c-0,0.15 -0.075,0.3 -0.225,0.45l-4.5,4.275l1.8,1.95l4.575,-4.35c0.15,-0.15 0.225,-0.225 0.375,-0.225l11.025,-1.875l-1.875,-2.025Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M100.5,220.05c-1.425,2.025 -3.15,2.925 -5.85,1.125c-2.7,-1.875 -2.55,-3.9 -1.2,-5.85l5.775,-8.4l-2.175,-1.5l-5.85,8.55c-2.1,3 -1.725,5.925 2.4,8.775c4.425,3 7.275,1.8 9.15,-0.975l5.775,-8.475l-2.25,-1.5l-5.775,8.25Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M112.275,233.1l10.8,4.275l1.05,-1.575l-8.7,-3.525l2.025,-5.1l7.95,3.15l0.675,-1.8l-7.875,-3.15l1.8,-4.425l8.25,3.3l0.675,-1.725l-10.65,-4.275l-6,14.85Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M144.15,225.975c-3.525,-0.6 -6.15,0.6 -6.6,3.15c-0.375,2.25 0.9,3.675 4.725,5.4c3,1.35 3.9,2.25 3.6,3.975c-0.3,1.65 -1.8,2.325 -4.05,1.95c-2.175,-0.375 -3.525,-1.65 -3.6,-3.6l-2.625,-0.45c-0.225,2.925 1.8,5.1 5.7,5.85c4.275,0.75 6.75,-0.825 7.2,-3.45c0.375,-2.175 -0.525,-3.9 -4.95,-5.925c-2.775,-1.275 -3.675,-1.95 -3.45,-3.375c0.225,-1.35 1.425,-2.025 3.525,-1.65c2.25,0.375 3.075,1.575 3.075,3.15l2.55,0.45c0.45,-2.475 -0.975,-4.725 -5.1,-5.475Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M167.925,242.1c-3.9,0.15 -5.25,-3 -5.325,-6.3c-0.15,-3.3 1.2,-6.3 4.8,-6.45c2.775,-0.075 3.9,1.2 4.425,2.925l2.625,-0.075c-0.45,-2.625 -2.55,-4.875 -7.05,-4.725c-5.4,0.225 -7.725,4.125 -7.575,8.4c0.15,4.725 2.4,8.25 8.1,8.025c4.575,-0.15 6.45,-2.625 6.9,-5.25l-2.625,0.075c-0.45,1.8 -1.5,3.3 -4.275,3.375Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M198.975,234.3c-0.525,-2.1 -1.65,-3.15 -3.675,-3.15c1.35,-0.825 2.625,-2.175 2.025,-4.425c-0.675,-2.625 -3.375,-3.45 -6.675,-2.55l-6.675,1.725l3.975,15.45l2.55,-0.675l-1.8,-6.9l3.075,-0.825c2.925,-0.75 4.05,-0.15 4.575,1.95l0.075,0.3c0.45,1.65 0.825,3 1.275,3.6l2.55,-0.675c-0.45,-0.825 -0.825,-2.175 -1.2,-3.6l-0.075,-0.225Zm-7.425,-3.15l-3.3,0.825l-1.275,-5.025l3.825,-0.975c2.1,-0.525 3.6,-0.075 3.975,1.5c0.525,2.175 -0.975,3.15 -3.225,3.675Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M208.708,217.966l-2.391,1.086l6.608,14.545l2.39,-1.086l-6.607,-14.545Z" style="fill:#b4ac8f;"/><path d="M223.95,208.725l-5.4,3.675l9,13.2l2.175,-1.5l-3.825,-5.55l2.925,-2.025c3.225,-2.175 4.575,-5.025 2.775,-7.65c-1.575,-2.4 -4.725,-2.175 -7.65,-0.15Zm3.825,6.375l-2.775,1.95l-3.15,-4.65l2.85,-1.95c1.95,-1.35 3.75,-1.5 4.8,-0c1.2,1.8 0.225,3.3 -1.725,4.65Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M246.15,191.325l-1.425,-1.35l-9.45,9.9l1.425,1.275l3.75,-3.975l10.2,9.75l1.875,-1.95l-10.2,-9.675l3.825,-3.975Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M182.1,1.425c-1.575,-0.225 -3.15,-0.45 -4.725,-0.675l-0,11.175c16.8,18.15 27.675,41.925 29.25,68.175l-103.65,-0c0,-0 -10.5,0.525 -10.5,9.225c0,9.075 8.325,10.575 10.425,10.575l52.05,0c0,0 6.525,-0.375 6.525,4.575c0,4.725 -4.8,4.5 -6.45,4.5l-106.125,0c8.25,-55.725 51.9,-99.9 107.325,-108.975c-59.775,3.15 -108.15,49.875 -113.925,108.975l-30.825,0c-0,0 -11.475,-1.35 -11.475,8.625c-0,9.975 8.625,9.6 11.025,9.6l30.825,0c1.125,21.225 7.8,41.1 18.525,58.05l0.075,-0.075c-6.6,-13.425 -10.875,-28.2 -12.45,-43.8l56.475,0c2.7,0 10.275,-0.375 10.275,-9.15c-0,-8.7 -9.3,-8.925 -9.3,-8.925l-76.35,0c-0,0 -6.675,0.525 -6.675,-4.8c-0,-5.325 4.35,-5.55 6.3,-5.55l142.875,0c0,0 10.95,1.2 10.95,-8.925c-0,-9 -9.6,-8.625 -13.125,-8.625l-48.825,0c0,0 -7.275,0.3 -7.275,-5.175c0,-5.475 6.15,-5.175 7.2,-5.175l86.025,0l-0,1.65c-0,28.875 -11.175,55.2 -29.475,74.85c-16.2,17.475 -38.025,29.7 -62.625,33.825c4.725,2.925 9.675,5.475 14.85,7.65c17.925,-5.1 34.2,-14.25 47.7,-26.4c11.025,-9.9 20.25,-21.9 27.075,-35.25l53.325,0l0,-5.025l-50.925,0c6.825,-15.15 10.65,-31.95 10.65,-49.65l0,-1.65l49.425,0c3.825,11.175 5.925,23.1 5.925,35.55c0,20.625 -5.7,39.975 -15.675,56.55l8.4,6.825c11.4,-18.45 18,-40.125 18,-63.375c0.3,-59.925 -43.65,-109.875 -101.1,-119.175Zm-87.975,131.325c0,4.875 -4.725,5.175 -4.725,5.175l-41.55,-0c-0.225,-3.225 -0.375,-6.45 -0.375,-9.675l0,-1.05l42.375,-0c0.75,0.075 4.275,0.675 4.275,5.55Zm123.225,-52.65c-1.35,-24.3 -9.825,-46.65 -23.475,-65.025c32.475,9.6 58.8,33.825 71.25,65.025l-47.775,-0Z" style="fill:#b4ac8f;fill-rule:nonzero;"/></g></svg> \ No newline at end of file <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 300 258" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g><path d="M96.8,205.15c-2.775,0.6 -6.075,1.2 -8.775,1.725c0.375,-1.5 1.425,-5.85 2.175,-8.625l-2.1,-2.175l-2.475,10.875c0,0.15 -0.075,0.3 -0.225,0.45l-4.5,4.275l1.8,1.95l4.575,-4.35c0.15,-0.15 0.225,-0.225 0.375,-0.225l11.025,-1.875l-1.875,-2.025Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M108.5,227.05c-1.425,2.025 -3.15,2.925 -5.85,1.125c-2.7,-1.875 -2.55,-3.9 -1.2,-5.85l5.775,-8.4l-2.175,-1.5l-5.85,8.55c-2.1,3 -1.725,5.925 2.4,8.775c4.425,3 7.275,1.8 9.15,-0.975l5.775,-8.475l-2.25,-1.5l-5.775,8.25Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M120.275,240.1l10.8,4.275l1.05,-1.575l-8.7,-3.525l2.025,-5.1l7.95,3.15l0.675,-1.8l-7.875,-3.15l1.8,-4.425l8.25,3.3l0.675,-1.725l-10.65,-4.275l-6,14.85Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M152.15,232.975c-3.525,-0.6 -6.15,0.6 -6.6,3.15c-0.375,2.25 0.9,3.675 4.725,5.4c3,1.35 3.9,2.25 3.6,3.975c-0.3,1.65 -1.8,2.325 -4.05,1.95c-2.175,-0.375 -3.525,-1.65 -3.6,-3.6l-2.625,-0.45c-0.225,2.925 1.8,5.1 5.7,5.85c4.275,0.75 6.75,-0.825 7.2,-3.45c0.375,-2.175 -0.525,-3.9 -4.95,-5.925c-2.775,-1.275 -3.675,-1.95 -3.45,-3.375c0.225,-1.35 1.425,-2.025 3.525,-1.65c2.25,0.375 3.075,1.575 3.075,3.15l2.55,0.45c0.45,-2.475 -0.975,-4.725 -5.1,-5.475Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M175.925,249.1c-3.9,0.15 -5.25,-3 -5.325,-6.3c-0.15,-3.3 1.2,-6.3 4.8,-6.45c2.775,-0.075 3.9,1.2 4.425,2.925l2.625,-0.075c-0.45,-2.625 -2.55,-4.875 -7.05,-4.725c-5.4,0.225 -7.725,4.125 -7.575,8.4c0.15,4.725 2.4,8.25 8.1,8.025c4.575,-0.15 6.45,-2.625 6.9,-5.25l-2.625,0.075c-0.45,1.8 -1.5,3.3 -4.275,3.375Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M206.975,241.3c-0.525,-2.1 -1.65,-3.15 -3.675,-3.15c1.35,-0.825 2.625,-2.175 2.025,-4.425c-0.675,-2.625 -3.375,-3.45 -6.675,-2.55l-6.675,1.725l3.975,15.45l2.55,-0.675l-1.8,-6.9l3.075,-0.825c2.925,-0.75 4.05,-0.15 4.575,1.95l0.075,0.3c0.45,1.65 0.825,3 1.275,3.6l2.55,-0.675c-0.45,-0.825 -0.825,-2.175 -1.2,-3.6l-0.075,-0.225Zm-7.425,-3.15l-3.3,0.825l-1.275,-5.025l3.825,-0.975c2.1,-0.525 3.6,-0.075 3.975,1.5c0.525,2.175 -0.975,3.15 -3.225,3.675Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M216.708,224.966l-2.391,1.086l6.608,14.545l2.39,-1.086l-6.607,-14.545Z" style="fill:#b4ac8f;"/><path d="M231.95,215.725l-5.4,3.675l9,13.2l2.175,-1.5l-3.825,-5.55l2.925,-2.025c3.225,-2.175 4.575,-5.025 2.775,-7.65c-1.575,-2.4 -4.725,-2.175 -7.65,-0.15Zm3.825,6.375l-2.775,1.95l-3.15,-4.65l2.85,-1.95c1.95,-1.35 3.75,-1.5 4.8,0c1.2,1.8 0.225,3.3 -1.725,4.65Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M254.15,198.325l-1.425,-1.35l-9.45,9.9l1.425,1.275l3.75,-3.975l10.2,9.75l1.875,-1.95l-10.2,-9.675l3.825,-3.975Z" style="fill:#b4ac8f;fill-rule:nonzero;"/><path d="M190.1,8.425c-1.575,-0.225 -3.15,-0.45 -4.725,-0.675l0,11.175c16.8,18.15 27.675,41.925 29.25,68.175l-103.65,0c0,0 -10.5,0.525 -10.5,9.225c0,9.075 8.325,10.575 10.425,10.575l52.05,0c0,0 6.525,-0.375 6.525,4.575c0,4.725 -4.8,4.5 -6.45,4.5l-106.125,0c8.25,-55.725 51.9,-99.9 107.325,-108.975c-59.775,3.15 -108.15,49.875 -113.925,108.975l-30.825,0c0,0 -11.475,-1.35 -11.475,8.625c0,9.975 8.625,9.6 11.025,9.6l30.825,0c1.125,21.225 7.8,41.1 18.525,58.05l0.075,-0.075c-6.6,-13.425 -10.875,-28.2 -12.45,-43.8l56.475,0c2.7,0 10.275,-0.375 10.275,-9.15c0,-8.7 -9.3,-8.925 -9.3,-8.925l-76.35,0c0,0 -6.675,0.525 -6.675,-4.8c0,-5.325 4.35,-5.55 6.3,-5.55l142.875,0c0,0 10.95,1.2 10.95,-8.925c0,-9 -9.6,-8.625 -13.125,-8.625l-48.825,0c0,0 -7.275,0.3 -7.275,-5.175c-0,-5.475 6.15,-5.175 7.2,-5.175l86.025,0l0,1.65c0,28.875 -11.175,55.2 -29.475,74.85c-16.2,17.475 -38.025,29.7 -62.625,33.825c4.725,2.925 9.675,5.475 14.85,7.65c17.925,-5.1 34.2,-14.25 47.7,-26.4c11.025,-9.9 20.25,-21.9 27.075,-35.25l53.325,0l0,-5.025l-50.925,0c6.825,-15.15 10.65,-31.95 10.65,-49.65l0,-1.65l49.425,0c3.825,11.175 5.925,23.1 5.925,35.55c0,20.625 -5.7,39.975 -15.675,56.55l8.4,6.825c11.4,-18.45 18,-40.125 18,-63.375c0.3,-59.925 -43.65,-109.875 -101.1,-119.175Zm-87.975,131.325c0,4.875 -4.725,5.175 -4.725,5.175l-41.55,0c-0.225,-3.225 -0.375,-6.45 -0.375,-9.675l0,-1.05l42.375,0c0.75,0.075 4.275,0.675 4.275,5.55Zm123.225,-52.65c-1.35,-24.3 -9.825,-46.65 -23.475,-65.025c32.475,9.6 58.8,33.825 71.25,65.025l-47.775,0Z" style="fill:#b4ac8f;fill-rule:nonzero;"/></g></svg> \ No newline at end of file
diff --git a/doc/docs/.vitepress/theme/components/YueCompiler.vue b/doc/docs/.vitepress/theme/components/YueCompiler.vue
index 28a6a9f..dcea692 100755
--- a/doc/docs/.vitepress/theme/components/YueCompiler.vue
+++ b/doc/docs/.vitepress/theme/components/YueCompiler.vue
@@ -39,24 +39,25 @@ import { history, indentWithTab } from '@codemirror/commands'
39import { defaultKeymap, historyKeymap } from '@codemirror/commands' 39import { defaultKeymap, historyKeymap } from '@codemirror/commands'
40import { simpleMode } from '@codemirror/legacy-modes/mode/simple-mode' 40import { simpleMode } from '@codemirror/legacy-modes/mode/simple-mode'
41 41
42const vscodeLightTheme = EditorView.theme( 42/* shikijs/themes/light-plus: editor.background #FFFFFF, editor.foreground #000000 */
43const lightPlusTheme = EditorView.theme(
43 { 44 {
44 '&': { 45 '&': {
45 height: '100%', 46 height: '100%',
46 backgroundColor: '#ffffff', 47 backgroundColor: '#FFFFFF',
47 color: '#000000', 48 color: '#000000',
48 fontSize: '15px' 49 fontSize: '0.8em'
49 }, 50 },
50 '&.cm-focused': { 51 '&.cm-focused': {
51 outline: 'none' 52 outline: 'none'
52 }, 53 },
53 '.cm-content': { 54 '.cm-content': {
54 fontFamily: 55 fontFamily:
55 "Consolas, Menlo, Monaco, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', 'Lucida Sans Typewriter', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Liberation Mono', 'Nimbus Mono L', 'Courier New', Courier, monospace", 56 "ui-monospace, 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace",
56 lineHeight: '1.375' 57 lineHeight: '1.375'
57 }, 58 },
58 '.cm-gutters': { 59 '.cm-gutters': {
59 backgroundColor: '#ffffff', 60 backgroundColor: '#FFFFFF',
60 color: '#6e6e6e', 61 color: '#6e6e6e',
61 borderRight: 'none' 62 borderRight: 'none'
62 }, 63 },
@@ -82,24 +83,25 @@ const vscodeLightTheme = EditorView.theme(
82 { dark: false } 83 { dark: false }
83) 84)
84 85
85const vscodeDarkTheme = EditorView.theme( 86/* shikijs/themes/dark-plus: editor.background #1E1E1E, editor.foreground #D4D4D4 */
87const darkPlusTheme = EditorView.theme(
86 { 88 {
87 '&': { 89 '&': {
88 height: '100%', 90 height: '100%',
89 backgroundColor: '#1e1e1e', 91 backgroundColor: '#1E1E1E',
90 color: '#d4d4d4', 92 color: '#D4D4D4',
91 fontSize: '15px' 93 fontSize: '0.8em'
92 }, 94 },
93 '&.cm-focused': { 95 '&.cm-focused': {
94 outline: 'none' 96 outline: 'none'
95 }, 97 },
96 '.cm-content': { 98 '.cm-content': {
97 fontFamily: 99 fontFamily:
98 "Consolas, Menlo, Monaco, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', 'Lucida Sans Typewriter', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Liberation Mono', 'Nimbus Mono L', 'Courier New', Courier, monospace", 100 "ui-monospace, 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace",
99 lineHeight: '1.375' 101 lineHeight: '1.375'
100 }, 102 },
101 '.cm-gutters': { 103 '.cm-gutters': {
102 backgroundColor: '#1e1e1e', 104 backgroundColor: '#1E1E1E',
103 color: '#858585', 105 color: '#858585',
104 borderRight: 'none' 106 borderRight: 'none'
105 }, 107 },
@@ -125,16 +127,17 @@ const vscodeDarkTheme = EditorView.theme(
125 { dark: true } 127 { dark: true }
126) 128)
127 129
128const vscodeLightHighlightStyle = HighlightStyle.define([ 130/* shikijs/themes/light-plus tokenColors */
131const lightPlusHighlightStyle = HighlightStyle.define([
129 { tag: tags.comment, color: '#008000' }, 132 { tag: tags.comment, color: '#008000' },
130 { tag: tags.keyword, color: '#0000ff' }, 133 { tag: tags.keyword, color: '#AF00DB' },
131 { tag: [tags.operator, tags.punctuation], color: '#000000' }, 134 { tag: [tags.operator, tags.punctuation], color: '#000000' },
132 { tag: [tags.string, tags.special(tags.string)], color: '#a31515' }, 135 { tag: [tags.string, tags.special(tags.string)], color: '#a31515' },
136 { tag: tags.regexp, color: '#811f3f' },
133 { tag: [tags.number, tags.bool, tags.null], color: '#098658' }, 137 { tag: [tags.number, tags.bool, tags.null], color: '#098658' },
134 { tag: tags.function(tags.variableName), color: '#795e26' }, 138 { tag: tags.function(tags.variableName), color: '#795e26' },
135 { tag: tags.typeName, color: '#267f99' }, 139 { tag: tags.typeName, color: '#267f99' },
136 { tag: tags.className, color: '#267f99' }, 140 { tag: tags.className, color: '#267f99' },
137 { tag: tags.variableName, color: '#001080' },
138 { tag: tags.propertyName, color: '#001080' }, 141 { tag: tags.propertyName, color: '#001080' },
139 { tag: tags.tagName, color: '#800000' }, 142 { tag: tags.tagName, color: '#800000' },
140 { tag: tags.attributeName, color: '#e50000' }, 143 { tag: tags.attributeName, color: '#e50000' },
@@ -142,16 +145,17 @@ const vscodeLightHighlightStyle = HighlightStyle.define([
142 { tag: tags.invalid, color: '#cd3131' } 145 { tag: tags.invalid, color: '#cd3131' }
143]) 146])
144 147
145const vscodeDarkHighlightStyle = HighlightStyle.define([ 148/* shikijs/themes/dark-plus tokenColors */
149const darkPlusHighlightStyle = HighlightStyle.define([
146 { tag: tags.comment, color: '#6a9955' }, 150 { tag: tags.comment, color: '#6a9955' },
147 { tag: tags.keyword, color: '#569cd6' }, 151 { tag: tags.keyword, color: '#C586C0' },
148 { tag: [tags.operator, tags.punctuation], color: '#d4d4d4' }, 152 { tag: [tags.operator, tags.punctuation], color: '#d4d4d4' },
149 { tag: [tags.string, tags.special(tags.string)], color: '#ce9178' }, 153 { tag: [tags.string, tags.special(tags.string)], color: '#ce9178' },
154 { tag: tags.regexp, color: '#d16969' },
150 { tag: [tags.number, tags.bool, tags.null], color: '#b5cea8' }, 155 { tag: [tags.number, tags.bool, tags.null], color: '#b5cea8' },
151 { tag: tags.function(tags.variableName), color: '#dcdcaa' }, 156 { tag: tags.function(tags.variableName), color: '#dcdcaa' },
152 { tag: tags.typeName, color: '#4ec9b0' }, 157 { tag: tags.typeName, color: '#4ec9b0' },
153 { tag: tags.className, color: '#4ec9b0' }, 158 { tag: tags.className, color: '#4ec9b0' },
154 { tag: tags.variableName, color: '#9cdcfe' },
155 { tag: tags.propertyName, color: '#9cdcfe' }, 159 { tag: tags.propertyName, color: '#9cdcfe' },
156 { tag: tags.tagName, color: '#569cd6' }, 160 { tag: tags.tagName, color: '#569cd6' },
157 { tag: tags.attributeName, color: '#9cdcfe' }, 161 { tag: tags.attributeName, color: '#9cdcfe' },
@@ -328,12 +332,12 @@ export default {
328 this.readOnlyCompartment.of(EditorState.readOnly.of(this.readonly)), 332 this.readOnlyCompartment.of(EditorState.readOnly.of(this.readonly)),
329 this.highlightCompartment.of( 333 this.highlightCompartment.of(
330 syntaxHighlighting( 334 syntaxHighlighting(
331 isDark ? vscodeDarkHighlightStyle : vscodeLightHighlightStyle, 335 isDark ? darkPlusHighlightStyle : lightPlusHighlightStyle,
332 { fallback: true } 336 { fallback: true }
333 ) 337 )
334 ), 338 ),
335 updateListener, 339 updateListener,
336 this.themeCompartment.of(isDark ? vscodeDarkTheme : vscodeLightTheme) 340 this.themeCompartment.of(isDark ? darkPlusTheme : lightPlusTheme)
337 ] 341 ]
338 }) 342 })
339 343
@@ -350,11 +354,11 @@ export default {
350 this.editorView.dispatch({ 354 this.editorView.dispatch({
351 effects: [ 355 effects: [
352 this.themeCompartment.reconfigure( 356 this.themeCompartment.reconfigure(
353 isDark ? vscodeDarkTheme : vscodeLightTheme 357 isDark ? darkPlusTheme : lightPlusTheme
354 ), 358 ),
355 this.highlightCompartment.reconfigure( 359 this.highlightCompartment.reconfigure(
356 syntaxHighlighting( 360 syntaxHighlighting(
357 isDark ? vscodeDarkHighlightStyle : vscodeLightHighlightStyle, 361 isDark ? darkPlusHighlightStyle : lightPlusHighlightStyle,
358 { fallback: true } 362 { fallback: true }
359 ) 363 )
360 ) 364 )
diff --git a/doc/docs/.vitepress/theme/custom.css b/doc/docs/.vitepress/theme/custom.css
index 9085b4b..7b4e593 100644
--- a/doc/docs/.vitepress/theme/custom.css
+++ b/doc/docs/.vitepress/theme/custom.css
@@ -14,7 +14,7 @@
14 max-width: 450px !important; 14 max-width: 450px !important;
15} 15}
16 16
17/* Prism theme for YueCompiler output (VS Code Light/Dark) */ 17/* Prism theme for YueCompiler output (shikijs/themes light-plus & dark-plus) */
18.code-output, 18.code-output,
19.code-output code { 19.code-output code {
20 background: #ffffff; 20 background: #ffffff;
@@ -27,12 +27,13 @@
27 color: #d4d4d4; 27 color: #d4d4d4;
28} 28}
29 29
30/* light-plus */
30.code-output .token.comment { 31.code-output .token.comment {
31 color: #008000; 32 color: #008000;
32} 33}
33 34
34.code-output .token.keyword { 35.code-output .token.keyword {
35 color: #0000ff; 36 color: #AF00DB;
36} 37}
37 38
38.code-output .token.operator, 39.code-output .token.operator,
@@ -41,12 +42,19 @@
41} 42}
42 43
43.code-output .token.string, 44.code-output .token.string,
44.code-output .token.char, 45.code-output .token.char {
45.code-output .token.regex,
46.code-output .token.variable {
47 color: #a31515; 46 color: #a31515;
48} 47}
49 48
49.code-output .token.regex {
50 color: #811f3f;
51}
52
53.code-output .token.variable,
54.code-output .token.parameter {
55 color: #001080;
56}
57
50.code-output .token.number, 58.code-output .token.number,
51.code-output .token.boolean, 59.code-output .token.boolean,
52.code-output .token.constant { 60.code-output .token.constant {
@@ -62,12 +70,17 @@
62 color: #267f99; 70 color: #267f99;
63} 71}
64 72
73.code-output .token.invalid {
74 color: #cd3131;
75}
76
77/* dark-plus */
65.dark .code-output .token.comment { 78.dark .code-output .token.comment {
66 color: #6a9955; 79 color: #6a9955;
67} 80}
68 81
69.dark .code-output .token.keyword { 82.dark .code-output .token.keyword {
70 color: #569cd6; 83 color: #C586C0;
71} 84}
72 85
73.dark .code-output .token.operator, 86.dark .code-output .token.operator,
@@ -76,12 +89,19 @@
76} 89}
77 90
78.dark .code-output .token.string, 91.dark .code-output .token.string,
79.dark .code-output .token.char, 92.dark .code-output .token.char {
80.dark .code-output .token.regex,
81.dark .code-output .token.variable {
82 color: #ce9178; 93 color: #ce9178;
83} 94}
84 95
96.dark .code-output .token.regex {
97 color: #d16969;
98}
99
100.dark .code-output .token.variable,
101.dark .code-output .token.parameter {
102 color: #9cdcfe;
103}
104
85.dark .code-output .token.number, 105.dark .code-output .token.number,
86.dark .code-output .token.boolean, 106.dark .code-output .token.boolean,
87.dark .code-output .token.constant { 107.dark .code-output .token.constant {
@@ -96,3 +116,7 @@
96.dark .code-output .token.builtin { 116.dark .code-output .token.builtin {
97 color: #4ec9b0; 117 color: #4ec9b0;
98} 118}
119
120.dark .code-output .token.invalid {
121 color: #f44747;
122}
diff --git a/doc/docs/.vitepress/theme/index.ts b/doc/docs/.vitepress/theme/index.ts
index e2a44c6..398df17 100644
--- a/doc/docs/.vitepress/theme/index.ts
+++ b/doc/docs/.vitepress/theme/index.ts
@@ -2,8 +2,11 @@ import DefaultTheme from 'vitepress/theme'
2import type { Theme } from 'vitepress' 2import type { Theme } from 'vitepress'
3import './custom.css' 3import './custom.css'
4 4
5// @ts-ignore
5import CompilerModal from './components/CompilerModal.vue' 6import CompilerModal from './components/CompilerModal.vue'
7// @ts-ignore
6import YueCompiler from './components/YueCompiler.vue' 8import YueCompiler from './components/YueCompiler.vue'
9// @ts-ignore
7import YueDisplay from './components/YueDisplay.vue' 10import YueDisplay from './components/YueDisplay.vue'
8 11
9const theme: Theme = { 12const theme: Theme = {