@uiw/react-codemirror 4.19.11 → 4.19.12

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.
@@ -0,0 +1,3 @@
1
+ import { LoaderConfOptions, WebpackConfiguration } from 'kkt';
2
+ declare const _default: (conf: WebpackConfiguration, env: 'production' | 'development', options: LoaderConfOptions) => WebpackConfiguration;
3
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { Extension } from '@codemirror/state';
2
+ import { BasicSetupOptions } from '@uiw/codemirror-extensions-basic-setup';
3
+ export type DefaultExtensionsOptions = {
4
+ indentWithTab?: boolean;
5
+ basicSetup?: boolean | BasicSetupOptions;
6
+ placeholder?: string | HTMLElement;
7
+ theme?: 'light' | 'dark' | 'none' | Extension;
8
+ readOnly?: boolean;
9
+ editable?: boolean;
10
+ };
11
+ export declare const getDefaultExtensions: (optios?: DefaultExtensionsOptions) => Extension[];
@@ -0,0 +1,59 @@
1
+ import { indentWithTab } from '@codemirror/commands';
2
+ import { basicSetup } from '@uiw/codemirror-extensions-basic-setup';
3
+ import { EditorView, keymap, placeholder } from '@codemirror/view';
4
+ import { oneDark } from '@codemirror/theme-one-dark';
5
+ import { EditorState } from '@codemirror/state';
6
+ export var getDefaultExtensions = function getDefaultExtensions(optios) {
7
+ if (optios === void 0) {
8
+ optios = {};
9
+ }
10
+ var {
11
+ indentWithTab: defaultIndentWithTab = true,
12
+ editable = true,
13
+ readOnly = false,
14
+ theme = 'light',
15
+ placeholder: placeholderStr = '',
16
+ basicSetup: defaultBasicSetup = true
17
+ } = optios;
18
+ var getExtensions = [];
19
+ var defaultLightThemeOption = EditorView.theme({
20
+ '&': {
21
+ backgroundColor: '#fff'
22
+ }
23
+ }, {
24
+ dark: false
25
+ });
26
+ if (defaultIndentWithTab) {
27
+ getExtensions.unshift(keymap.of([indentWithTab]));
28
+ }
29
+ if (defaultBasicSetup) {
30
+ if (typeof defaultBasicSetup === 'boolean') {
31
+ getExtensions.unshift(basicSetup());
32
+ } else {
33
+ getExtensions.unshift(basicSetup(defaultBasicSetup));
34
+ }
35
+ }
36
+ if (placeholderStr) {
37
+ getExtensions.unshift(placeholder(placeholderStr));
38
+ }
39
+ switch (theme) {
40
+ case 'light':
41
+ getExtensions.push(defaultLightThemeOption);
42
+ break;
43
+ case 'dark':
44
+ getExtensions.push(oneDark);
45
+ break;
46
+ case 'none':
47
+ break;
48
+ default:
49
+ getExtensions.push(theme);
50
+ break;
51
+ }
52
+ if (editable === false) {
53
+ getExtensions.push(EditorView.editable.of(false));
54
+ }
55
+ if (readOnly) {
56
+ getExtensions.push(EditorState.readOnly.of(true));
57
+ }
58
+ return [...getExtensions];
59
+ };
package/esm/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import { BasicSetupOptions } from '@uiw/codemirror-extensions-basic-setup';
5
5
  import { Statistics } from './utils';
6
6
  export * from '@uiw/codemirror-extensions-basic-setup';
7
7
  export * from './useCodeMirror';
8
+ export * from './getDefaultExtensions';
8
9
  export * from './utils';
9
10
  export interface ReactCodeMirrorProps extends Omit<EditorStateConfig, 'doc' | 'extensions'>, Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'placeholder'> {
10
11
  /** value of the auto created model in the editor. */
@@ -40,7 +41,8 @@ export interface ReactCodeMirrorProps extends Omit<EditorStateConfig, 'doc' | 'e
40
41
  */
41
42
  readOnly?: boolean;
42
43
  /**
43
- * Whether to optional basicSetup by default
44
+ * Controls whether pressing the `Tab` key inserts a tab character and indents the text (`true`)
45
+ * or behaves according to the browser's default behavior (`false`).
44
46
  * @default true
45
47
  */
46
48
  indentWithTab?: boolean;
package/esm/index.js CHANGED
@@ -6,6 +6,7 @@ import { useCodeMirror } from './useCodeMirror';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  export * from '@uiw/codemirror-extensions-basic-setup';
8
8
  export * from './useCodeMirror';
9
+ export * from './getDefaultExtensions';
9
10
  export * from './utils';
10
11
  var ReactCodeMirror = /*#__PURE__*/forwardRef((props, ref) => {
11
12
  var {
@@ -81,5 +82,4 @@ var ReactCodeMirror = /*#__PURE__*/forwardRef((props, ref) => {
81
82
  }, other));
82
83
  });
83
84
  ReactCodeMirror.displayName = 'CodeMirror';
84
- export default ReactCodeMirror;
85
- //# sourceMappingURL=index.js.map
85
+ export default ReactCodeMirror;
@@ -0,0 +1 @@
1
+ export declare const defaultLightThemeOption: import("@codemirror/state").Extension;
@@ -5,5 +5,4 @@ export var defaultLightThemeOption = EditorView.theme({
5
5
  }
6
6
  }, {
7
7
  dark: false
8
- });
9
- //# sourceMappingURL=light.js.map
8
+ });
@@ -1,9 +1,7 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import { Annotation, EditorState, StateEffect } from '@codemirror/state';
3
- import { indentWithTab } from '@codemirror/commands';
4
- import { EditorView, keymap, placeholder } from '@codemirror/view';
5
- import { basicSetup } from '@uiw/codemirror-extensions-basic-setup';
6
- import { oneDark } from '@codemirror/theme-one-dark';
3
+ import { EditorView } from '@codemirror/view';
4
+ import { getDefaultExtensions } from './getDefaultExtensions';
7
5
  import { getStatistics } from './utils';
8
6
  var External = Annotation.define();
9
7
  export function useCodeMirror(props) {
@@ -34,13 +32,6 @@ export function useCodeMirror(props) {
34
32
  var [container, setContainer] = useState();
35
33
  var [view, setView] = useState();
36
34
  var [state, setState] = useState();
37
- var defaultLightThemeOption = EditorView.theme({
38
- '&': {
39
- backgroundColor: '#fff'
40
- }
41
- }, {
42
- dark: false
43
- });
44
35
  var defaultThemeOption = EditorView.theme({
45
36
  '&': {
46
37
  height,
@@ -62,39 +53,15 @@ export function useCodeMirror(props) {
62
53
  }
63
54
  onStatistics && onStatistics(getStatistics(vu));
64
55
  });
65
- var getExtensions = [updateListener, defaultThemeOption];
66
- if (defaultIndentWithTab) {
67
- getExtensions.unshift(keymap.of([indentWithTab]));
68
- }
69
- if (defaultBasicSetup) {
70
- if (typeof defaultBasicSetup === 'boolean') {
71
- getExtensions.unshift(basicSetup());
72
- } else {
73
- getExtensions.unshift(basicSetup(defaultBasicSetup));
74
- }
75
- }
76
- if (placeholderStr) {
77
- getExtensions.unshift(placeholder(placeholderStr));
78
- }
79
- switch (theme) {
80
- case 'light':
81
- getExtensions.push(defaultLightThemeOption);
82
- break;
83
- case 'dark':
84
- getExtensions.push(oneDark);
85
- break;
86
- case 'none':
87
- break;
88
- default:
89
- getExtensions.push(theme);
90
- break;
91
- }
92
- if (editable === false) {
93
- getExtensions.push(EditorView.editable.of(false));
94
- }
95
- if (readOnly) {
96
- getExtensions.push(EditorState.readOnly.of(true));
97
- }
56
+ var defaultExtensions = getDefaultExtensions({
57
+ theme,
58
+ editable: true,
59
+ readOnly: false,
60
+ placeholder: placeholderStr,
61
+ indentWithTab: defaultIndentWithTab,
62
+ basicSetup: defaultBasicSetup
63
+ });
64
+ var getExtensions = [updateListener, defaultThemeOption, ...defaultExtensions];
98
65
  if (onUpdate && typeof onUpdate === 'function') {
99
66
  getExtensions.push(EditorView.updateListener.of(onUpdate));
100
67
  }
@@ -169,5 +136,4 @@ export function useCodeMirror(props) {
169
136
  container,
170
137
  setContainer
171
138
  };
172
- }
173
- //# sourceMappingURL=useCodeMirror.js.map
139
+ }
package/esm/utils.js CHANGED
@@ -13,5 +13,4 @@ export var getStatistics = view => {
13
13
  selections: view.state.selection.ranges.map(r => view.state.sliceDoc(r.from, r.to)),
14
14
  selectedText: view.state.selection.ranges.some(r => !r.empty)
15
15
  };
16
- };
17
- //# sourceMappingURL=utils.js.map
16
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uiw/react-codemirror",
3
- "version": "4.19.11",
3
+ "version": "4.19.12",
4
4
  "description": "CodeMirror component for React.",
5
5
  "homepage": "https://uiwjs.github.io/react-codemirror",
6
6
  "author": "kenny wong <wowohoo@qq.com>",
@@ -11,8 +11,8 @@
11
11
  "bundle": "ncc build src/index.tsx --target web --filename mdeditor && npm run bundle:min",
12
12
  "bundle:watch": "ncc watch src/index.tsx --target web --filename mdeditor",
13
13
  "bundle:min": "ncc build src/index.tsx --target web --filename mdeditor --minify",
14
- "watch": "tsbb watch",
15
- "build": "tsbb build",
14
+ "watch": "tsbb watch src/*.tsx --use-babel",
15
+ "build": "tsbb build src/*.tsx --use-babel",
16
16
  "test": "tsbb test --env=jsdom",
17
17
  "coverage": "tsbb test --env=jsdom --coverage --bail"
18
18
  },
@@ -40,7 +40,7 @@
40
40
  "@codemirror/commands": "^6.1.0",
41
41
  "@codemirror/state": "^6.1.1",
42
42
  "@codemirror/theme-one-dark": "^6.0.0",
43
- "@uiw/codemirror-extensions-basic-setup": "4.19.11",
43
+ "@uiw/codemirror-extensions-basic-setup": "4.19.12",
44
44
  "codemirror": "^6.0.0"
45
45
  },
46
46
  "keywords": [
@@ -0,0 +1,71 @@
1
+ import { Extension } from '@codemirror/state';
2
+ import { indentWithTab } from '@codemirror/commands';
3
+ import { basicSetup, BasicSetupOptions } from '@uiw/codemirror-extensions-basic-setup';
4
+ import { EditorView, keymap, placeholder } from '@codemirror/view';
5
+ import { oneDark } from '@codemirror/theme-one-dark';
6
+ import { EditorState } from '@codemirror/state';
7
+
8
+ export type DefaultExtensionsOptions = {
9
+ indentWithTab?: boolean;
10
+ basicSetup?: boolean | BasicSetupOptions;
11
+ placeholder?: string | HTMLElement;
12
+ theme?: 'light' | 'dark' | 'none' | Extension;
13
+ readOnly?: boolean;
14
+ editable?: boolean;
15
+ };
16
+
17
+ export const getDefaultExtensions = (optios: DefaultExtensionsOptions = {}): Extension[] => {
18
+ const {
19
+ indentWithTab: defaultIndentWithTab = true,
20
+ editable = true,
21
+ readOnly = false,
22
+ theme = 'light',
23
+ placeholder: placeholderStr = '',
24
+ basicSetup: defaultBasicSetup = true,
25
+ } = optios;
26
+ const getExtensions: Extension[] = [];
27
+ const defaultLightThemeOption = EditorView.theme(
28
+ {
29
+ '&': {
30
+ backgroundColor: '#fff',
31
+ },
32
+ },
33
+ {
34
+ dark: false,
35
+ },
36
+ );
37
+ if (defaultIndentWithTab) {
38
+ getExtensions.unshift(keymap.of([indentWithTab]));
39
+ }
40
+ if (defaultBasicSetup) {
41
+ if (typeof defaultBasicSetup === 'boolean') {
42
+ getExtensions.unshift(basicSetup());
43
+ } else {
44
+ getExtensions.unshift(basicSetup(defaultBasicSetup));
45
+ }
46
+ }
47
+ if (placeholderStr) {
48
+ getExtensions.unshift(placeholder(placeholderStr));
49
+ }
50
+ switch (theme) {
51
+ case 'light':
52
+ getExtensions.push(defaultLightThemeOption);
53
+ break;
54
+ case 'dark':
55
+ getExtensions.push(oneDark);
56
+ break;
57
+ case 'none':
58
+ break;
59
+ default:
60
+ getExtensions.push(theme);
61
+ break;
62
+ }
63
+ if (editable === false) {
64
+ getExtensions.push(EditorView.editable.of(false));
65
+ }
66
+ if (readOnly) {
67
+ getExtensions.push(EditorState.readOnly.of(true));
68
+ }
69
+
70
+ return [...getExtensions];
71
+ };
package/src/index.tsx CHANGED
@@ -7,6 +7,7 @@ import { Statistics } from './utils';
7
7
 
8
8
  export * from '@uiw/codemirror-extensions-basic-setup';
9
9
  export * from './useCodeMirror';
10
+ export * from './getDefaultExtensions';
10
11
  export * from './utils';
11
12
 
12
13
  export interface ReactCodeMirrorProps
@@ -45,7 +46,8 @@ export interface ReactCodeMirrorProps
45
46
  */
46
47
  readOnly?: boolean;
47
48
  /**
48
- * Whether to optional basicSetup by default
49
+ * Controls whether pressing the `Tab` key inserts a tab character and indents the text (`true`)
50
+ * or behaves according to the browser's default behavior (`false`).
49
51
  * @default true
50
52
  */
51
53
  indentWithTab?: boolean;
@@ -1,9 +1,7 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import { Annotation, EditorState, StateEffect } from '@codemirror/state';
3
- import { indentWithTab } from '@codemirror/commands';
4
- import { EditorView, keymap, ViewUpdate, placeholder } from '@codemirror/view';
5
- import { basicSetup } from '@uiw/codemirror-extensions-basic-setup';
6
- import { oneDark } from '@codemirror/theme-one-dark';
3
+ import { EditorView, ViewUpdate } from '@codemirror/view';
4
+ import { getDefaultExtensions } from './getDefaultExtensions';
7
5
  import { getStatistics } from './utils';
8
6
  import { ReactCodeMirrorProps } from '.';
9
7
 
@@ -41,16 +39,6 @@ export function useCodeMirror(props: UseCodeMirror) {
41
39
  const [container, setContainer] = useState<HTMLDivElement>();
42
40
  const [view, setView] = useState<EditorView>();
43
41
  const [state, setState] = useState<EditorState>();
44
- const defaultLightThemeOption = EditorView.theme(
45
- {
46
- '&': {
47
- backgroundColor: '#fff',
48
- },
49
- },
50
- {
51
- dark: false,
52
- },
53
- );
54
42
  const defaultThemeOption = EditorView.theme({
55
43
  '&': {
56
44
  height,
@@ -76,42 +64,16 @@ export function useCodeMirror(props: UseCodeMirror) {
76
64
  onStatistics && onStatistics(getStatistics(vu));
77
65
  });
78
66
 
79
- let getExtensions = [updateListener, defaultThemeOption];
80
- if (defaultIndentWithTab) {
81
- getExtensions.unshift(keymap.of([indentWithTab]));
82
- }
83
- if (defaultBasicSetup) {
84
- if (typeof defaultBasicSetup === 'boolean') {
85
- getExtensions.unshift(basicSetup());
86
- } else {
87
- getExtensions.unshift(basicSetup(defaultBasicSetup));
88
- }
89
- }
90
-
91
- if (placeholderStr) {
92
- getExtensions.unshift(placeholder(placeholderStr));
93
- }
94
-
95
- switch (theme) {
96
- case 'light':
97
- getExtensions.push(defaultLightThemeOption);
98
- break;
99
- case 'dark':
100
- getExtensions.push(oneDark);
101
- break;
102
- case 'none':
103
- break;
104
- default:
105
- getExtensions.push(theme);
106
- break;
107
- }
67
+ const defaultExtensions = getDefaultExtensions({
68
+ theme,
69
+ editable: true,
70
+ readOnly: false,
71
+ placeholder: placeholderStr,
72
+ indentWithTab: defaultIndentWithTab,
73
+ basicSetup: defaultBasicSetup,
74
+ });
108
75
 
109
- if (editable === false) {
110
- getExtensions.push(EditorView.editable.of(false));
111
- }
112
- if (readOnly) {
113
- getExtensions.push(EditorState.readOnly.of(true));
114
- }
76
+ let getExtensions = [updateListener, defaultThemeOption, ...defaultExtensions];
115
77
 
116
78
  if (onUpdate && typeof onUpdate === 'function') {
117
79
  getExtensions.push(EditorView.updateListener.of(onUpdate));
package/cjs/index.js.map DELETED
@@ -1,81 +0,0 @@
1
- {
2
- "version": 3,
3
- "names": [
4
- "_react",
5
- "_interopRequireWildcard",
6
- "require",
7
- "_useCodeMirror2",
8
- "Object",
9
- "keys",
10
- "forEach",
11
- "key",
12
- "prototype",
13
- "hasOwnProperty",
14
- "call",
15
- "_exportNames",
16
- "exports",
17
- "defineProperty",
18
- "enumerable",
19
- "get",
20
- "_jsxRuntime",
21
- "_codemirrorExtensionsBasicSetup",
22
- "_utils",
23
- "_excluded",
24
- "ReactCodeMirror",
25
- "forwardRef",
26
- "props",
27
- "ref",
28
- "className",
29
- "_props$value",
30
- "value",
31
- "selection",
32
- "_props$extensions",
33
- "extensions",
34
- "onChange",
35
- "onStatistics",
36
- "onCreateEditor",
37
- "onUpdate",
38
- "autoFocus",
39
- "_props$theme",
40
- "theme",
41
- "height",
42
- "minHeight",
43
- "maxHeight",
44
- "width",
45
- "minWidth",
46
- "maxWidth",
47
- "basicSetup",
48
- "placeholder",
49
- "indentWithTab",
50
- "editable",
51
- "readOnly",
52
- "root",
53
- "initialState",
54
- "other",
55
- "_objectWithoutProperties2",
56
- "editor",
57
- "useRef",
58
- "_useCodeMirror",
59
- "useCodeMirror",
60
- "container",
61
- "current",
62
- "state",
63
- "view",
64
- "useImperativeHandle",
65
- "Error",
66
- "concat",
67
- "_typeof2",
68
- "defaultClassNames",
69
- "jsx",
70
- "_objectSpread2",
71
- "displayName",
72
- "_default"
73
- ],
74
- "sources": [
75
- "../src/index.tsx"
76
- ],
77
- "sourcesContent": [
78
- "import React, { useRef, forwardRef, useImperativeHandle } from 'react';\nimport { EditorState, EditorStateConfig, Extension, StateField } from '@codemirror/state';\nimport { EditorView, ViewUpdate } from '@codemirror/view';\nimport { BasicSetupOptions } from '@uiw/codemirror-extensions-basic-setup';\nimport { useCodeMirror } from './useCodeMirror';\nimport { Statistics } from './utils';\n\nexport * from '@uiw/codemirror-extensions-basic-setup';\nexport * from './useCodeMirror';\nexport * from './utils';\n\nexport interface ReactCodeMirrorProps\n extends Omit<EditorStateConfig, 'doc' | 'extensions'>,\n Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'placeholder'> {\n /** value of the auto created model in the editor. */\n value?: string;\n height?: string;\n minHeight?: string;\n maxHeight?: string;\n width?: string;\n minWidth?: string;\n maxWidth?: string;\n /** focus on the editor. */\n autoFocus?: boolean;\n /** Enables a placeholder—a piece of example content to show when the editor is empty. */\n placeholder?: string | HTMLElement;\n /**\n * `light` / `dark` / `Extension` Defaults to `light`.\n * @default light\n */\n theme?: 'light' | 'dark' | 'none' | Extension;\n /**\n * Whether to optional basicSetup by default\n * @default true\n */\n basicSetup?: boolean | BasicSetupOptions;\n /**\n * This disables editing of the editor content by the user.\n * @default true\n */\n editable?: boolean;\n /**\n * This disables editing of the editor content by the user.\n * @default false\n */\n readOnly?: boolean;\n /**\n * Whether to optional basicSetup by default\n * @default true\n */\n indentWithTab?: boolean;\n /** Fired whenever a change occurs to the document. */\n onChange?(value: string, viewUpdate: ViewUpdate): void;\n /** Some data on the statistics editor. */\n onStatistics?(data: Statistics): void;\n /** Fired whenever any state change occurs within the editor, including non-document changes like lint results. */\n onUpdate?(viewUpdate: ViewUpdate): void;\n /** The first time the editor executes the event. */\n onCreateEditor?(view: EditorView, state: EditorState): void;\n /**\n * Extension values can be [provided](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions) when creating a state to attach various kinds of configuration and behavior information.\n * They can either be built-in extension-providing objects,\n * such as [state fields](https://codemirror.net/6/docs/ref/#state.StateField) or [facet providers](https://codemirror.net/6/docs/ref/#state.Facet.of),\n * or objects with an extension in its `extension` property. Extensions can be nested in arrays arbitrarily deep—they will be flattened when processed.\n */\n extensions?: Extension[];\n /**\n * If the view is going to be mounted in a shadow root or document other than the one held by the global variable document (the default), you should pass it here.\n * Originally from the [config of EditorView](https://codemirror.net/6/docs/ref/#view.EditorView.constructor%5Econfig.root)\n */\n root?: ShadowRoot | Document;\n /**\n * Create a state from its JSON representation serialized with [toJSON](https://codemirror.net/docs/ref/#state.EditorState.toJSON) function\n */\n initialState?: {\n json: any;\n fields?: Record<string, StateField<any>>;\n };\n}\n\nexport interface ReactCodeMirrorRef {\n editor?: HTMLDivElement | null;\n state?: EditorState;\n view?: EditorView;\n}\n\nconst ReactCodeMirror = forwardRef<ReactCodeMirrorRef, ReactCodeMirrorProps>((props, ref) => {\n const {\n className,\n value = '',\n selection,\n extensions = [],\n onChange,\n onStatistics,\n onCreateEditor,\n onUpdate,\n autoFocus,\n theme = 'light',\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n basicSetup,\n placeholder,\n indentWithTab,\n editable,\n readOnly,\n root,\n initialState,\n ...other\n } = props;\n const editor = useRef<HTMLDivElement>(null);\n const { state, view, container } = useCodeMirror({\n container: editor.current,\n root,\n value,\n autoFocus,\n theme,\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n basicSetup,\n placeholder,\n indentWithTab,\n editable,\n readOnly,\n selection,\n onChange,\n onStatistics,\n onCreateEditor,\n onUpdate,\n extensions,\n initialState,\n });\n\n useImperativeHandle(ref, () => ({ editor: editor.current, state: state, view: view }), [\n editor,\n container,\n state,\n view,\n ]);\n\n // check type of value\n if (typeof value !== 'string') {\n throw new Error(`value must be typeof string but got ${typeof value}`);\n }\n\n const defaultClassNames = typeof theme === 'string' ? `cm-theme-${theme}` : 'cm-theme';\n return <div ref={editor} className={`${defaultClassNames}${className ? ` ${className}` : ''}`} {...other}></div>;\n});\n\nReactCodeMirror.displayName = 'CodeMirror';\n\nexport default ReactCodeMirror;\n"
79
- ],
80
- "mappings": ";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,eAAA,GAAAD,OAAA;AAIAE,MAAA,CAAAC,IAAA,CAAAF,eAAA,EAAAG,O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C7B,MAAM,IAAImC,KAAK,wCAAAC,MAAA,KAAAC,QAAA,aAA+CrC,KAAK,GAAG;EACxE;EAEA,IAAMsC,iBAAiB,GAAG,OAAO5B,KAAK,KAAK,QAAQ,eAAA0B,MAAA,CAAe1B,KAAK,IAAK,UAAU;EACtF,oBAAO,IAAApB,WAAA,CAAAiD,GAAA,aAAAC,cAAA;IAAK3C,GAAG,EAAE6B,MAAO;IAAC5B,SAAS,KAAAsC,MAAA,CAAKE,iBAAiB,EAAAF,MAAA,CAAGtC,SAAS,OAAAsC,MAAA,CAAOtC,SAAS,IAAK,EAAE;EAAG,GAAK0B,KAAK,EAAQ;AAClH,CAAC,CAAC;AAEF9B,eAAe,CAAC+C,WAAW,GAAG,YAAY;AAAC,IAAAC,QAAA,GAE5BhD,eAAe;AAAAR,OAAA,cAAAwD,QAAA"
81
- }
@@ -1,20 +0,0 @@
1
- {
2
- "version": 3,
3
- "names": [
4
- "_view",
5
- "require",
6
- "defaultLightThemeOption",
7
- "EditorView",
8
- "theme",
9
- "backgroundColor",
10
- "dark",
11
- "exports"
12
- ],
13
- "sources": [
14
- "../../src/theme/light.ts"
15
- ],
16
- "sourcesContent": [
17
- "import { EditorView } from '@codemirror/view';\n\nexport const defaultLightThemeOption = EditorView.theme(\n {\n '&': {\n backgroundColor: '#fff',\n },\n },\n {\n dark: false,\n },\n);\n"
18
- ],
19
- "mappings": ";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEO,IAAMC,uBAAuB,GAAGC,gBAAU,CAACC,KAAK,CACrD;EACE,GAAG,EAAE;IACHC,eAAe,EAAE;EACnB;AACF,CAAC,EACD;EACEC,IAAI,EAAE;AACR,CAAC,CACF;AAACC,OAAA,CAAAL,uBAAA,GAAAA,uBAAA"
20
- }