@ohos-ports/braneframe-plugin-script 0.0.0-stage → 0.6.7-beta.0
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/LICENSE +8 -0
- package/README.md +3 -2
- package/dist/lib/browser/chunk-HAIUBDFW.mjs +21 -0
- package/dist/lib/browser/chunk-HAIUBDFW.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +670 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/browser/meta.mjs +9 -0
- package/dist/lib/browser/meta.mjs.map +7 -0
- package/dist/types/src/ScriptPlugin.d.ts +7 -0
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -0
- package/dist/types/src/compiler/compiler.d.ts +39 -0
- package/dist/types/src/compiler/compiler.d.ts.map +1 -0
- package/dist/types/src/compiler/compiler.test.d.ts +2 -0
- package/dist/types/src/compiler/compiler.test.d.ts.map +1 -0
- package/dist/types/src/compiler/index.d.ts +2 -0
- package/dist/types/src/compiler/index.d.ts.map +1 -0
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts +12 -0
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +1 -0
- package/dist/types/src/components/FrameContainer/frame.d.ts +2 -0
- package/dist/types/src/components/FrameContainer/frame.d.ts.map +1 -0
- package/dist/types/src/components/FrameContainer/index.d.ts +2 -0
- package/dist/types/src/components/FrameContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/ScriptBlock.d.ts +16 -0
- package/dist/types/src/components/ScriptBlock.d.ts.map +1 -0
- package/dist/types/src/components/ScriptBlock.stories.d.ts +14 -0
- package/dist/types/src/components/ScriptBlock.stories.d.ts.map +1 -0
- package/dist/types/src/components/ScriptEditor/ScriptEditor.d.ts +10 -0
- package/dist/types/src/components/ScriptEditor/ScriptEditor.d.ts.map +1 -0
- package/dist/types/src/components/ScriptEditor/ScriptEditor.stories.d.ts +13 -0
- package/dist/types/src/components/ScriptEditor/ScriptEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/ScriptEditor/index.d.ts +2 -0
- package/dist/types/src/components/ScriptEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/Splitter/Splitter.d.ts +15 -0
- package/dist/types/src/components/Splitter/Splitter.d.ts.map +1 -0
- package/dist/types/src/components/Splitter/Splitter.stories.d.ts +13 -0
- package/dist/types/src/components/Splitter/Splitter.stories.d.ts.map +1 -0
- package/dist/types/src/components/Splitter/index.d.ts +2 -0
- package/dist/types/src/components/Splitter/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +5 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +7 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +15 -0
- package/dist/types/src/meta.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +12 -0
- package/dist/types/src/translations.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +8 -0
- package/dist/types/src/types.d.ts.map +1 -0
- package/package.json +97 -4
- package/src/ScriptPlugin.tsx +176 -0
- package/src/compiler/compiler.test.ts +17 -0
- package/src/compiler/compiler.ts +210 -0
- package/src/compiler/index.ts +5 -0
- package/src/components/FrameContainer/FrameContainer.tsx +82 -0
- package/src/components/FrameContainer/frame.html +25 -0
- package/src/components/FrameContainer/frame.tsx +51 -0
- package/src/components/FrameContainer/index.ts +5 -0
- package/src/components/ScriptBlock.stories.tsx +61 -0
- package/src/components/ScriptBlock.tsx +129 -0
- package/src/components/ScriptEditor/ScriptEditor.stories.tsx +65 -0
- package/src/components/ScriptEditor/ScriptEditor.tsx +52 -0
- package/src/components/ScriptEditor/index.ts +5 -0
- package/src/components/ScriptEditor/themes/GitHubLight.json +348 -0
- package/src/components/ScriptEditor/themes/XCode.json +98 -0
- package/src/components/Splitter/Splitter.stories.tsx +37 -0
- package/src/components/Splitter/Splitter.tsx +52 -0
- package/src/components/Splitter/index.ts +5 -0
- package/src/components/index.ts +8 -0
- package/src/index.ts +13 -0
- package/src/meta.tsx +19 -0
- package/src/translations.ts +18 -0
- package/src/types.tsx +27 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Check, Play, Warning } from '@phosphor-icons/react';
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import esbuildWasmURL from 'esbuild-wasm/esbuild.wasm?url';
|
|
8
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
9
|
+
|
|
10
|
+
import { DocAccessor } from '@dxos/react-client/echo';
|
|
11
|
+
import { DensityProvider, useThemeContext, Toolbar, Button } from '@dxos/react-ui';
|
|
12
|
+
import { mx, getSize } from '@ohos-ports/dxos-react-ui-theme';
|
|
13
|
+
|
|
14
|
+
import { FrameContainer } from './FrameContainer';
|
|
15
|
+
import { ScriptEditor } from './ScriptEditor';
|
|
16
|
+
import { Splitter, SplitterSelector, type View } from './Splitter';
|
|
17
|
+
import { Compiler, type CompilerResult, initializeCompiler } from '../compiler';
|
|
18
|
+
|
|
19
|
+
// Keep in sync with packages/apps/composer-app/script-frame/main.tsx .
|
|
20
|
+
const PROVIDED_MODULES = [
|
|
21
|
+
'react',
|
|
22
|
+
'react-dom/client',
|
|
23
|
+
'@dxos/client',
|
|
24
|
+
'@dxos/react-client',
|
|
25
|
+
'@dxos/react-client/echo',
|
|
26
|
+
'@ohos-ports/braneframe-plugin-explorer',
|
|
27
|
+
'@ohos-ports/braneframe-types',
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
export type ScriptBlockProps = {
|
|
31
|
+
id: string;
|
|
32
|
+
source: DocAccessor;
|
|
33
|
+
view?: View;
|
|
34
|
+
hideSelector?: boolean;
|
|
35
|
+
classes?: {
|
|
36
|
+
root?: string;
|
|
37
|
+
toolbar?: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// Url to the page used to host the script in the iframe.
|
|
41
|
+
containerUrl: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// TODO(burdon): Cache compiled results in context.
|
|
45
|
+
export const ScriptBlock = ({
|
|
46
|
+
id,
|
|
47
|
+
source,
|
|
48
|
+
view: controlledView,
|
|
49
|
+
hideSelector,
|
|
50
|
+
classes,
|
|
51
|
+
containerUrl,
|
|
52
|
+
}: ScriptBlockProps) => {
|
|
53
|
+
const { themeMode } = useThemeContext();
|
|
54
|
+
const [view, setView] = useState<View>(controlledView ?? 'editor');
|
|
55
|
+
useEffect(() => handleSetView(controlledView ?? 'editor'), [controlledView]);
|
|
56
|
+
|
|
57
|
+
const [result, setResult] = useState<CompilerResult>();
|
|
58
|
+
const compiler = useMemo(() => new Compiler({ platform: 'browser', providedModules: PROVIDED_MODULES }), []);
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
// TODO(burdon): Create useCompiler hook (with initialization).
|
|
61
|
+
void initializeCompiler({ wasmURL: esbuildWasmURL });
|
|
62
|
+
}, []);
|
|
63
|
+
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
// TODO(burdon): Throttle and listen for update.
|
|
66
|
+
const t = setTimeout(async () => {
|
|
67
|
+
const result = await compiler.compile(DocAccessor.getValue(source));
|
|
68
|
+
setResult(result);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
return () => clearTimeout(t);
|
|
72
|
+
}, [source, id]);
|
|
73
|
+
|
|
74
|
+
const handleSetView = useCallback(
|
|
75
|
+
(view: View) => {
|
|
76
|
+
setView(view);
|
|
77
|
+
if (!result && view !== 'editor') {
|
|
78
|
+
void handleExec(false);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
[result],
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
const handleExec = useCallback(
|
|
85
|
+
async (auto = true) => {
|
|
86
|
+
const result = await compiler.compile(DocAccessor.getValue(source));
|
|
87
|
+
setResult(result);
|
|
88
|
+
if (auto && view === 'editor') {
|
|
89
|
+
setView('preview');
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
[source, view],
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
if (!source) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<div className={mx('flex flex-col grow overflow-hidden', classes?.root)}>
|
|
101
|
+
{!hideSelector && (
|
|
102
|
+
<DensityProvider density='fine'>
|
|
103
|
+
<Toolbar.Root classNames={mx('mb-2', classes?.toolbar)}>
|
|
104
|
+
<SplitterSelector view={view} onChange={handleSetView} />
|
|
105
|
+
<div className='grow' />
|
|
106
|
+
{result?.bundle && !result?.error && (
|
|
107
|
+
<div title={String(result.error)}>
|
|
108
|
+
<Check className={mx(getSize(5), 'text-green-500')} />
|
|
109
|
+
</div>
|
|
110
|
+
)}
|
|
111
|
+
{result?.error && (
|
|
112
|
+
<div title={String(result.error)}>
|
|
113
|
+
<Warning className={mx(getSize(5), 'text-orange-500')} />
|
|
114
|
+
</div>
|
|
115
|
+
)}
|
|
116
|
+
<Button variant='ghost' onClick={() => handleExec()}>
|
|
117
|
+
<Play className={getSize(5)} />
|
|
118
|
+
</Button>
|
|
119
|
+
</Toolbar.Root>
|
|
120
|
+
</DensityProvider>
|
|
121
|
+
)}
|
|
122
|
+
|
|
123
|
+
<Splitter view={view}>
|
|
124
|
+
<ScriptEditor source={source} themeMode={themeMode} />
|
|
125
|
+
{result && <FrameContainer key={id} result={result} containerUrl={containerUrl} />}
|
|
126
|
+
</Splitter>
|
|
127
|
+
</div>
|
|
128
|
+
);
|
|
129
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// TODO(burdon): Typescript.
|
|
6
|
+
// TODO(burdon): Effect schema.
|
|
7
|
+
// TODO(burdon): JSX.
|
|
8
|
+
// TODO(burdon): react-buddy for storybook?
|
|
9
|
+
|
|
10
|
+
// Marijn
|
|
11
|
+
// - language support for S
|
|
12
|
+
// - hierarchical editor (DND)
|
|
13
|
+
// - virtual document image rendering
|
|
14
|
+
// - mobile rendering error
|
|
15
|
+
|
|
16
|
+
import '@dxosTheme';
|
|
17
|
+
|
|
18
|
+
import React, { useMemo } from 'react';
|
|
19
|
+
|
|
20
|
+
import { createDocAccessor, createEchoObject } from '@dxos/react-client/echo';
|
|
21
|
+
|
|
22
|
+
import { ScriptEditor } from './ScriptEditor';
|
|
23
|
+
|
|
24
|
+
const examples: string[] = [
|
|
25
|
+
[
|
|
26
|
+
'// Example schema.',
|
|
27
|
+
'export default function() {',
|
|
28
|
+
' const value = 100',
|
|
29
|
+
' return <div>{value}</div>;',
|
|
30
|
+
'}',
|
|
31
|
+
].join('\n'),
|
|
32
|
+
[
|
|
33
|
+
'// Example schema.',
|
|
34
|
+
'S.Struct({',
|
|
35
|
+
' timestamp: S.Date,',
|
|
36
|
+
' title: S.String,',
|
|
37
|
+
' content: R.Text,',
|
|
38
|
+
"}).pipe(S.identifier('dxos.org/schema/Test'))",
|
|
39
|
+
'',
|
|
40
|
+
].join('\n'),
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
const Story = () => {
|
|
44
|
+
// TODO(dmaretskyi): Review what's the right way to create automerge-backed objects.
|
|
45
|
+
const object = useMemo(() => createEchoObject({ content: examples[1] }), []);
|
|
46
|
+
const accessor = useMemo(() => createDocAccessor(object, ['content']), [object]);
|
|
47
|
+
return (
|
|
48
|
+
<div className='flex fixed inset-0 bg-neutral-50'>
|
|
49
|
+
<div className='flex w-[700px] mx-auto'>
|
|
50
|
+
{accessor && <ScriptEditor source={accessor} className='bg-white text-lg' />}
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export default {
|
|
57
|
+
title: 'plugin-script/ScriptEditor',
|
|
58
|
+
component: ScriptEditor,
|
|
59
|
+
render: Story,
|
|
60
|
+
parameters: {
|
|
61
|
+
layout: 'fullscreen',
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const Default = {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { autocompletion, completionKeymap } from '@codemirror/autocomplete';
|
|
6
|
+
import { javascript } from '@codemirror/lang-javascript';
|
|
7
|
+
import { EditorView, keymap, lineNumbers } from '@codemirror/view';
|
|
8
|
+
import { minimalSetup } from 'codemirror';
|
|
9
|
+
import React from 'react';
|
|
10
|
+
|
|
11
|
+
import { DocAccessor } from '@dxos/react-client/echo';
|
|
12
|
+
import { type ThemeMode } from '@dxos/react-ui';
|
|
13
|
+
import { automerge, defaultTheme, useTextEditor } from '@dxos/react-ui-editor';
|
|
14
|
+
import { focusRing, mx } from '@ohos-ports/dxos-react-ui-theme';
|
|
15
|
+
|
|
16
|
+
export type ScriptEditorProps = {
|
|
17
|
+
source: DocAccessor;
|
|
18
|
+
themeMode?: ThemeMode;
|
|
19
|
+
className?: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// TODO(burdon): https://davidmyers.dev/blog/how-to-build-a-code-editor-with-codemirror-6-and-typescript/introduction
|
|
23
|
+
|
|
24
|
+
export const ScriptEditor = ({ source, themeMode, className }: ScriptEditorProps) => {
|
|
25
|
+
const { parentRef, focusAttributes } = useTextEditor(
|
|
26
|
+
() => ({
|
|
27
|
+
initialValue: DocAccessor.getValue(source),
|
|
28
|
+
extensions: [
|
|
29
|
+
// TODO(burdon): Use basic set-up (e.g., bracket matching).
|
|
30
|
+
// TODO(burdon): Use this in text editor (cancels highlight current line)
|
|
31
|
+
// basicSetup,
|
|
32
|
+
minimalSetup,
|
|
33
|
+
|
|
34
|
+
lineNumbers(),
|
|
35
|
+
// TODO(burdon): Syntax highlighting theme.
|
|
36
|
+
javascript({ typescript: true }),
|
|
37
|
+
autocompletion({ activateOnTyping: false }),
|
|
38
|
+
keymap.of([...completionKeymap]),
|
|
39
|
+
|
|
40
|
+
EditorView.baseTheme(defaultTheme),
|
|
41
|
+
EditorView.darkTheme.of(themeMode === 'dark'),
|
|
42
|
+
EditorView.contentAttributes.of({ class: '!px-2' }),
|
|
43
|
+
|
|
44
|
+
// TODO(burdon): Presence.
|
|
45
|
+
automerge(source),
|
|
46
|
+
],
|
|
47
|
+
}),
|
|
48
|
+
[source, themeMode],
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
return <div {...focusAttributes} ref={parentRef} className={mx('flex grow rounded-sm', focusRing, className)} />;
|
|
52
|
+
};
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
{
|
|
2
|
+
"base": "vs",
|
|
3
|
+
"inherit": true,
|
|
4
|
+
"rules": [
|
|
5
|
+
{
|
|
6
|
+
"background": "ffffff",
|
|
7
|
+
"token": ""
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"foreground": "6a737d",
|
|
11
|
+
"token": "comment"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"foreground": "6a737d",
|
|
15
|
+
"token": "punctuation.definition.comment"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"foreground": "6a737d",
|
|
19
|
+
"token": "string.comment"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"foreground": "005cc5",
|
|
23
|
+
"token": "constant"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"foreground": "005cc5",
|
|
27
|
+
"token": "entity.name.constant"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"foreground": "005cc5",
|
|
31
|
+
"token": "variable.other.constant"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"foreground": "005cc5",
|
|
35
|
+
"token": "variable.language"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"foreground": "6f42c1",
|
|
39
|
+
"token": "entity"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"foreground": "6f42c1",
|
|
43
|
+
"token": "entity.name"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"foreground": "24292e",
|
|
47
|
+
"token": "variable.parameter.function"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"foreground": "22863a",
|
|
51
|
+
"token": "entity.name.tag"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"foreground": "d73a49",
|
|
55
|
+
"token": "keyword"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"foreground": "d73a49",
|
|
59
|
+
"token": "storage"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"foreground": "d73a49",
|
|
63
|
+
"token": "storage.type"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"foreground": "24292e",
|
|
67
|
+
"token": "storage.modifier.package"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"foreground": "24292e",
|
|
71
|
+
"token": "storage.modifier.import"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"foreground": "24292e",
|
|
75
|
+
"token": "storage.type.java"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"foreground": "032f62",
|
|
79
|
+
"token": "string"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"foreground": "032f62",
|
|
83
|
+
"token": "punctuation.definition.string"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"foreground": "032f62",
|
|
87
|
+
"token": "string punctuation.section.embedded source"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"foreground": "005cc5",
|
|
91
|
+
"token": "support"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"foreground": "005cc5",
|
|
95
|
+
"token": "meta.property-name"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"foreground": "e36209",
|
|
99
|
+
"token": "variable"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"foreground": "24292e",
|
|
103
|
+
"token": "variable.other"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"foreground": "b31d28",
|
|
107
|
+
"fontStyle": "bold italic underline",
|
|
108
|
+
"token": "invalid.broken"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"foreground": "b31d28",
|
|
112
|
+
"fontStyle": "bold italic underline",
|
|
113
|
+
"token": "invalid.deprecated"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"foreground": "fafbfc",
|
|
117
|
+
"background": "b31d28",
|
|
118
|
+
"fontStyle": "italic underline",
|
|
119
|
+
"token": "invalid.illegal"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"foreground": "fafbfc",
|
|
123
|
+
"background": "d73a49",
|
|
124
|
+
"fontStyle": "italic underline",
|
|
125
|
+
"token": "carriage-return"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"foreground": "b31d28",
|
|
129
|
+
"fontStyle": "bold italic underline",
|
|
130
|
+
"token": "invalid.unimplemented"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"foreground": "b31d28",
|
|
134
|
+
"token": "message.error"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"foreground": "24292e",
|
|
138
|
+
"token": "string source"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"foreground": "005cc5",
|
|
142
|
+
"token": "string variable"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"foreground": "032f62",
|
|
146
|
+
"token": "source.regexp"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"foreground": "032f62",
|
|
150
|
+
"token": "string.regexp"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"foreground": "032f62",
|
|
154
|
+
"token": "string.regexp.character-class"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"foreground": "032f62",
|
|
158
|
+
"token": "string.regexp constant.character.escape"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"foreground": "032f62",
|
|
162
|
+
"token": "string.regexp source.ruby.embedded"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"foreground": "032f62",
|
|
166
|
+
"token": "string.regexp string.regexp.arbitrary-repitition"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"foreground": "22863a",
|
|
170
|
+
"fontStyle": "bold",
|
|
171
|
+
"token": "string.regexp constant.character.escape"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"foreground": "005cc5",
|
|
175
|
+
"token": "support.constant"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"foreground": "005cc5",
|
|
179
|
+
"token": "support.variable"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"foreground": "005cc5",
|
|
183
|
+
"token": "meta.module-reference"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"foreground": "735c0f",
|
|
187
|
+
"token": "markup.list"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"foreground": "005cc5",
|
|
191
|
+
"fontStyle": "bold",
|
|
192
|
+
"token": "markup.heading"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"foreground": "005cc5",
|
|
196
|
+
"fontStyle": "bold",
|
|
197
|
+
"token": "markup.heading entity.name"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"foreground": "22863a",
|
|
201
|
+
"token": "markup.quote"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"foreground": "24292e",
|
|
205
|
+
"fontStyle": "italic",
|
|
206
|
+
"token": "markup.italic"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"foreground": "24292e",
|
|
210
|
+
"fontStyle": "bold",
|
|
211
|
+
"token": "markup.bold"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"foreground": "005cc5",
|
|
215
|
+
"token": "markup.raw"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"foreground": "b31d28",
|
|
219
|
+
"background": "ffeef0",
|
|
220
|
+
"token": "markup.deleted"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"foreground": "b31d28",
|
|
224
|
+
"background": "ffeef0",
|
|
225
|
+
"token": "meta.diff.header.from-file"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"foreground": "b31d28",
|
|
229
|
+
"background": "ffeef0",
|
|
230
|
+
"token": "punctuation.definition.deleted"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"foreground": "22863a",
|
|
234
|
+
"background": "f0fff4",
|
|
235
|
+
"token": "markup.inserted"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"foreground": "22863a",
|
|
239
|
+
"background": "f0fff4",
|
|
240
|
+
"token": "meta.diff.header.to-file"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"foreground": "22863a",
|
|
244
|
+
"background": "f0fff4",
|
|
245
|
+
"token": "punctuation.definition.inserted"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"foreground": "e36209",
|
|
249
|
+
"background": "ffebda",
|
|
250
|
+
"token": "markup.changed"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"foreground": "e36209",
|
|
254
|
+
"background": "ffebda",
|
|
255
|
+
"token": "punctuation.definition.changed"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"foreground": "f6f8fa",
|
|
259
|
+
"background": "005cc5",
|
|
260
|
+
"token": "markup.ignored"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"foreground": "f6f8fa",
|
|
264
|
+
"background": "005cc5",
|
|
265
|
+
"token": "markup.untracked"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"foreground": "6f42c1",
|
|
269
|
+
"fontStyle": "bold",
|
|
270
|
+
"token": "meta.diff.range"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"foreground": "005cc5",
|
|
274
|
+
"token": "meta.diff.header"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"foreground": "005cc5",
|
|
278
|
+
"fontStyle": "bold",
|
|
279
|
+
"token": "meta.separator"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"foreground": "005cc5",
|
|
283
|
+
"token": "meta.output"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"foreground": "586069",
|
|
287
|
+
"token": "brackethighlighter.tag"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"foreground": "586069",
|
|
291
|
+
"token": "brackethighlighter.curly"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"foreground": "586069",
|
|
295
|
+
"token": "brackethighlighter.round"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"foreground": "586069",
|
|
299
|
+
"token": "brackethighlighter.square"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"foreground": "586069",
|
|
303
|
+
"token": "brackethighlighter.angle"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"foreground": "586069",
|
|
307
|
+
"token": "brackethighlighter.quote"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"foreground": "b31d28",
|
|
311
|
+
"token": "brackethighlighter.unmatched"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"foreground": "b31d28",
|
|
315
|
+
"token": "sublimelinter.mark.error"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"foreground": "e36209",
|
|
319
|
+
"token": "sublimelinter.mark.warning"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"foreground": "959da5",
|
|
323
|
+
"token": "sublimelinter.gutter-mark"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"foreground": "032f62",
|
|
327
|
+
"fontStyle": "underline",
|
|
328
|
+
"token": "constant.other.reference.link"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"foreground": "032f62",
|
|
332
|
+
"fontStyle": "underline",
|
|
333
|
+
"token": "string.other.link"
|
|
334
|
+
}
|
|
335
|
+
],
|
|
336
|
+
"colors": {
|
|
337
|
+
"editor.foreground": "#24292e",
|
|
338
|
+
"editor.background": "#ffffff",
|
|
339
|
+
"editor.selectionBackground": "#c8c8fa",
|
|
340
|
+
"editor.inactiveSelectionBackground": "#fafbfc",
|
|
341
|
+
"editor.lineHighlightBackground": "#fafbfc",
|
|
342
|
+
"editorCursor.foreground": "#24292e",
|
|
343
|
+
"editorWhitespace.foreground": "#959da5",
|
|
344
|
+
"editorIndentGuide.background": "#959da5",
|
|
345
|
+
"editorIndentGuide.activeBackground": "#24292e",
|
|
346
|
+
"editor.selectionHighlightBorder": "#fafbfc"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"base": "vs",
|
|
3
|
+
"inherit": true,
|
|
4
|
+
"rules": [
|
|
5
|
+
{
|
|
6
|
+
"background": "FFFFFF",
|
|
7
|
+
"token": ""
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"foreground": "008e00",
|
|
11
|
+
"token": "comment"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"foreground": "7d4726",
|
|
15
|
+
"token": "meta.preprocessor"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"foreground": "7d4726",
|
|
19
|
+
"token": "keyword.control.import"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"foreground": "df0002",
|
|
23
|
+
"token": "string"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"foreground": "3a00dc",
|
|
27
|
+
"token": "constant.numeric"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"foreground": "c800a4",
|
|
31
|
+
"token": "constant.language"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"foreground": "275a5e",
|
|
35
|
+
"token": "constant.character"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"foreground": "275a5e",
|
|
39
|
+
"token": "constant.other"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"foreground": "c800a4",
|
|
43
|
+
"token": "variable.language"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"foreground": "c800a4",
|
|
47
|
+
"token": "variable.other"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"foreground": "c800a4",
|
|
51
|
+
"token": "keyword"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"foreground": "c900a4",
|
|
55
|
+
"token": "storage"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"foreground": "438288",
|
|
59
|
+
"token": "entity.name.class"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"foreground": "790ead",
|
|
63
|
+
"token": "entity.name.tag"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"foreground": "450084",
|
|
67
|
+
"token": "entity.other.attribute-name"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"foreground": "450084",
|
|
71
|
+
"token": "support.function"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"foreground": "450084",
|
|
75
|
+
"token": "support.constant"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"foreground": "790ead",
|
|
79
|
+
"token": "support.type"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"foreground": "790ead",
|
|
83
|
+
"token": "support.class"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"foreground": "790ead",
|
|
87
|
+
"token": "support.other.variable"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"colors": {
|
|
91
|
+
"editor.foreground": "#000000",
|
|
92
|
+
"editor.background": "#FFFFFF",
|
|
93
|
+
"editor.selectionBackground": "#B5D5FF",
|
|
94
|
+
"editor.lineHighlightBackground": "#00000012",
|
|
95
|
+
"editorCursor.foreground": "#000000",
|
|
96
|
+
"editorWhitespace.foreground": "#BFBFBF"
|
|
97
|
+
}
|
|
98
|
+
}
|