@neo4j-cypher/react-codemirror 1.0.2 → 2.0.0-alpha.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/README.md CHANGED
@@ -1,32 +1,11 @@
1
- ### @neo4j-cypher/react-codemirror
1
+ # React Codemirror
2
2
 
3
- This package exports a React component that provides a cypher editor using codemirror 6.
3
+ This package can be built with `npm run build` and then published to npm with `npm publish`.
4
4
 
5
- You can use this package like the following:
5
+ ### Completion Icons
6
6
 
7
- ```
8
- import React from 'react';
9
- import CypherEditor from '@neo4j-cypher/react-codemirror';
7
+ We use unmodified copies of Visual Studio Code Icons from microsofts repository [here](https://github.com/microsoft/vscode-icons) licensed under creative commons.
10
8
 
11
- const editorProps = {
12
- onValueChanged: value => {}, // optional
13
- onFocusChanged: focused => {}, // optional
14
- onScrollChanged: scrollInfo => {}, // optional
15
- onPositionChanged: ({ line, column, position }) => {}, // optional
16
- initialOptions: {
17
- theme: 'light', // optional, defaults to light
18
- extensions: [ /* override extensions */ ] // optional, defaults to a sensible list of extensions.
19
- },
20
- initialSchema: { /* ... */ }, // optional, see example in demos
21
- initialValue: 'this is the text to show in the editor',
22
- initialPosition: { row: 2, column: 3}, // optional, rows are 1 based, columns are 0 based
23
- classNames: [], // optional, array of classnames to add to the root dom element.
24
- theme: 'light' // optional, should be light or dark, defaults to light
25
- };
9
+ ### Build notes
26
10
 
27
- const MyReactComponent = () => {
28
- return (
29
- <CypherEditor {...editorProps} />
30
- );
31
- }
32
- ```
11
+ We need to bundle the other project dependencies into the build until we've published those packages. When we do publish them, we can just do the same "tsc" build step as for example `language-support`.