codemirror-graphql
Advanced tools
Comparing version 2.0.8 to 2.0.9-alpha.0
@@ -63,3 +63,3 @@ import CodeMirror from 'codemirror'; | ||
top: (box.top + box.bottom) / 2, | ||
}); | ||
}, 'window'); | ||
const state = cm.state.info; | ||
@@ -66,0 +66,0 @@ const { options } = state; |
{ | ||
"name": "codemirror-graphql", | ||
"version": "2.0.8", | ||
"version": "2.0.9-alpha.0", | ||
"description": "GraphQL mode and helpers for CodeMirror.", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
@@ -24,3 +24,3 @@ # GraphQL mode for CodeMirror | ||
```js | ||
```ts | ||
import type { ValidationContext, SDLValidationContext } from 'graphql'; | ||
@@ -60,3 +60,3 @@ | ||
const externalFragments = ` | ||
const externalFragments = /* GraphQL */ ` | ||
fragment MyFragment on Example { | ||
@@ -91,3 +91,3 @@ id: ID! | ||
```js | ||
```ts | ||
import type { ValidationRule } from 'graphql'; | ||
@@ -94,0 +94,0 @@ |
@@ -93,6 +93,9 @@ /** | ||
function onMouseHover(cm: CodeMirror.Editor, box: DOMRect) { | ||
const pos = cm.coordsChar({ | ||
left: (box.left + box.right) / 2, | ||
top: (box.top + box.bottom) / 2, | ||
}); | ||
const pos = cm.coordsChar( | ||
{ | ||
left: (box.left + box.right) / 2, | ||
top: (box.top + box.bottom) / 2, | ||
}, | ||
'window', | ||
); // 'window' allows to work when editor is not full page and window has scrolled | ||
@@ -99,0 +102,0 @@ const state = cm.state.info; |
@@ -63,3 +63,3 @@ import CodeMirror from 'codemirror'; | ||
top: (box.top + box.bottom) / 2, | ||
}); | ||
}, 'window'); | ||
const state = cm.state.info; | ||
@@ -66,0 +66,0 @@ const { options } = state; |
@@ -68,3 +68,3 @@ "use strict"; | ||
top: (box.top + box.bottom) / 2, | ||
}); | ||
}, 'window'); | ||
var state = cm.state.info; | ||
@@ -71,0 +71,0 @@ var options = state.options; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
446618
9229
1