-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathtypes.ts
More file actions
59 lines (52 loc) · 1.42 KB
/
types.ts
File metadata and controls
59 lines (52 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import type { ComponentPropsWithoutRef } from 'react';
import type { AllTypeInfo } from 'graphql-language-service/esm/types';
import type * as monaco from 'monaco-editor';
import type {
EditorSlice,
ExecutionSlice,
PluginSlice,
SchemaSlice,
ThemeSlice,
StorageSlice,
//
EditorActions,
ExecutionActions,
PluginActions,
SchemaActions,
ThemeActions,
} from './stores';
import type { RuleKind } from 'graphql-language-service';
export type EditorProps = ComponentPropsWithoutRef<'div'> & {
/**
* for customizing editor options. Here are
* some options that may be useful to some users:
* - suggest: { showWords: false }
* - hover: { above: false }
* - scrollbar: { alwaysConsumeMouseWheel: false }
*/
editorOverrides?: monaco.editor.IStandaloneEditorConstructionOptions;
};
export interface SchemaReference {
kind: RuleKind;
typeInfo: AllTypeInfo;
}
export type MonacoEditor = monaco.editor.IStandaloneCodeEditor;
export type AllSlices = EditorSlice &
ExecutionSlice &
PluginSlice &
SchemaSlice &
ThemeSlice &
StorageSlice;
export type AllActions = EditorActions &
ExecutionActions &
PluginActions &
SchemaActions &
ThemeActions;
export interface SlicesWithActions extends AllSlices {
actions: AllActions;
}
/**
* The value `null` semantically means that the user does not explicitly choose
* any theme, so we use the system default.
*/
export type Theme = 'light' | 'dark' | null;