@aquera/nile-elements 0.1.13 → 0.1.14

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent nile-elements following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "nile-elements",
6
- "version": "0.1.13",
6
+ "version": "0.1.14",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -381,6 +381,15 @@ export class NileCodeEditor extends NileElement {
381
381
  if(this.timeOut) clearTimeout(this.timeOut);
382
382
  this.timeOut=setTimeout(()=> this.emit('nile-change', value, false), this.debounceTimeout)
383
383
  }
384
+
385
+ public focusAtPosition(pos: number=this.view.state.doc.toString().length): void {
386
+ if (this.view) {
387
+ this.view.dispatch({
388
+ selection: { anchor: pos },
389
+ });
390
+ this.view.focus();
391
+ }
392
+ }
384
393
 
385
394
  public insertBetweenCode=(text: string) => {
386
395
  const transaction = this.view.state.changeByRange(range => {
@@ -19,8 +19,21 @@ export const CustomTheme = {
19
19
  lineHeight:'inherit',
20
20
  letterSpacing:'inherit'
21
21
  },
22
- '.cm-content': {},
23
- ".cm-scroller": {
24
- scrollbarWidth:'thin',
22
+
23
+ '.cm-content': {
24
+ fontSize: 'inherit',
25
+ fontStyle: 'inherit',
26
+ fontFamily: 'inherit',
27
+ fontWeight: 'inherit',
28
+ lineHeight:'inherit',
29
+ letterSpacing:'inherit'
30
+ },
31
+
32
+ ".cm-scroller":{
33
+ fontFamily: 'inherit'
34
+ },
35
+
36
+ ".cm-gutters": {
37
+ fontFamily: 'inherit', // Ensure the gutter font matches
25
38
  },
26
39
  };