@gjsify/gtksource-nativescript 0.57.0 → 0.58.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/lib/esm/namespace/gtksource.js +1 -1
- package/lib/esm/native-editor.android.js +2 -2
- package/lib/esm/native-editor.js +1 -1
- package/lib/esm/view.js +1 -1
- package/lib/types/android-types.d.ts +2 -0
- package/lib/types/namespace/gtksource.d.ts +1 -0
- package/lib/types/native-editor.d.ts +1 -1
- package/lib/types/view.d.ts +5 -4
- package/package.json +7 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{GtkSourceView as t}from"../view.js";import{Buffer as n,
|
|
1
|
+
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{GtkSourceView as t}from"../view.js";import{Buffer as n,Gutter as r,GutterLines as i,GutterRenderer as a,GutterRendererText as o,Language as s,LanguageManager as c,StyleScheme as l,StyleSchemeManager as u,init as d}from"@gjsify/gtksource-core";var f=e({Buffer:()=>n,Gutter:()=>r,GutterLines:()=>i,GutterRenderer:()=>a,GutterRendererText:()=>o,Language:()=>s,LanguageManager:()=>c,StyleScheme:()=>l,StyleSchemeManager:()=>u,View:()=>t,init:()=>d});export{n as Buffer,r as Gutter,i as GutterLines,a as GutterRenderer,o as GutterRendererText,s as Language,c as LanguageManager,l as StyleScheme,u as StyleSchemeManager,t as View,f as gtksource_exports,d as init};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";import{LineStore as e,emphasisedLine as t,gutterWidth as n,visibleLines as r}from"@gjsify/gtksource-core";let i;function gutterEditText(){return i||(i=android.widget.EditText.extend({onDraw(e){let t=this.driver;t?.drawBehind(this,e),this.super.onDraw(e),t?.drawGutter(this,e)},onSelectionChanged(e,t){this.super.onSelectionChanged(e,t),this.driver?.selectionChanged(e,t)}}),i)}var AndroidEditorDriver=class{host=null;view=null;applying=!1;queue=[];keyListener=null;pendingText=``;selection={start:0,end:0};lineCount=1;layout=null;palette=null;runs=new e;spans=new e;fillPaint=null;textPaint=null;bind(e){this.host=e}createNativeView(e){let t=new(gutterEditText())(e);return t.driver=this,t}attach(e){let t=e;this.view=t,t.setInputType(android.text.InputType.TYPE_CLASS_TEXT|android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE|android.text.InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS),t.setHorizontallyScrolling(!0),t.setGravity(android.view.Gravity.TOP|android.view.Gravity.START),this.keyListener=t.getKeyListener(),t.addTextChangedListener(new android.text.TextWatcher({beforeTextChanged:()=>{},onTextChanged:(e,t,n,r)=>{this.applying||this.queue.push({start:t,removed:n,inserted:e.subSequence(t,t+r).toString()})},afterTextChanged:()=>this.flushEdits()})),this.applyLayout(),this.applyPalette(),this.applying=!0;try{t.setText(this.pendingText??``)}finally{this.applying=!1}this.pendingText=null,this.repaintAll(),this.applySelection()}detach(){this.view&&(this.pendingText=this.view.getText().toString()),this.view=null,this.spans.clear(),this.queue=[]}setText(e){if(this.removeAllSpans(),this.runs.clear(),!this.view){this.pendingText=e;return}this.applying=!0;try{this.view.setText(e)}finally{this.applying=!1}}replaceRange(e,t,n){let r=this.view;if(!r){let r=this.pendingText??``;this.pendingText=r.slice(0,e)+n+r.slice(t);return}let i=r.getText();this.applying=!0;try{i.replace(e,Math.min(t,i.length()),n)}finally{this.applying=!1}}setSelection(e,t){this.selection={start:e,end:t},this.applySelection()}setLineCount(e){this.lineCount=e,this.view&&this.layout?.showLineNumbers&&this.applyLayout()}setLayout(e){this.layout=e,this.applyLayout()}setPalette(e){this.palette=e,this.applyPalette()}spliceLines(e,t,n){let r=this.view?.getText();for(let i of this.spans.splice(e,t,n))if(r)for(let e of i)r.removeSpan(e);this.runs.splice(e,t,n)}paintLine(e,t,n){this.runs.set(e,n);let r=this.view?.getText();r&&this.applyRuns(r,e,t,n)}clearAll(){this.removeAllSpans(),this.runs.clear()}removeAllSpans(){let e=this.view?.getText(),t=this.spans.clear();if(e)for(let n of t)for(let t of n)e.removeSpan(t)}repaintAll(){let e=this.view?.getText();if(!e)return;let t=e.toString().split(`
|
|
2
|
-
`),n=0;t.forEach((t,r)=>{let i=this.runs.get(r);i&&this.applyRuns(e,r,n,i),n+=t.length+1})}applyRuns(e,t,n,r){for(let n of this.spans.get(t)??[])e.removeSpan(n);let i=e.length(),a=android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE,{ForegroundColorSpan:o,BackgroundColorSpan:s,StyleSpan:c,UnderlineSpan:l,StrikethroughSpan:u}=android.text.style,d=android.graphics.Typeface,f=[],put=(t,n,r)=>{e.setSpan(t,n,r,a),f.push(t)};for(let e of r){let t=n+e.start,r=Math.min(n+e.end,i);if(t>=r)continue;let{style:a}=e;a.foreground!==void 0&&put(new o(a.foreground),t,r),a.background!==void 0&&put(new s(a.background),t,r),(a.bold||a.italic)&&put(new c(a.bold&&a.italic?d.BOLD_ITALIC:a.bold?d.BOLD:d.ITALIC),t,r),a.underline&&put(new l,t,r),a.strikethrough&&put(new u,t,r)}this.spans.set(t,f)}density(e){return e.getResources().getDisplayMetrics().density}
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{LineStore as e,emphasisedLine as t,gutterWidth as n,visibleLines as r}from"@gjsify/gtksource-core";let i;function gutterEditText(){return i||(i=android.widget.EditText.extend({onDraw(e){let t=this.driver;t?.drawBehind(this,e),this.super.onDraw(e),t?.drawGutter(this,e)},onSelectionChanged(e,t){this.super.onSelectionChanged(e,t),this.driver?.selectionChanged(e,t)}}),i)}var AndroidEditorDriver=class{host=null;view=null;applying=!1;queue=[];keyListener=null;pendingText=``;selection={start:0,end:0};lineCount=1;layout=null;palette=null;runs=new e;spans=new e;fillPaint=null;textPaint=null;measured=[];appliedGutter=-1;bind(e){this.host=e}createNativeView(e){let t=new(gutterEditText())(e);return t.driver=this,t}attach(e){let t=e;this.view=t,t.setInputType(android.text.InputType.TYPE_CLASS_TEXT|android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE|android.text.InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS),t.setHorizontallyScrolling(!0),t.setGravity(android.view.Gravity.TOP|android.view.Gravity.START),this.keyListener=t.getKeyListener(),t.addTextChangedListener(new android.text.TextWatcher({beforeTextChanged:()=>{},onTextChanged:(e,t,n,r)=>{this.applying||this.queue.push({start:t,removed:n,inserted:e.subSequence(t,t+r).toString()})},afterTextChanged:()=>this.flushEdits()})),this.applyLayout(),this.applyPalette(),this.applying=!0;try{t.setText(this.pendingText??``)}finally{this.applying=!1}this.pendingText=null,this.repaintAll(),this.applySelection()}detach(){this.view&&(this.pendingText=this.view.getText().toString()),this.view=null,this.spans.clear(),this.queue=[]}setText(e){if(this.removeAllSpans(),this.runs.clear(),!this.view){this.pendingText=e;return}this.applying=!0;try{this.view.setText(e)}finally{this.applying=!1}}replaceRange(e,t,n){let r=this.view;if(!r){let r=this.pendingText??``;this.pendingText=r.slice(0,e)+n+r.slice(t);return}let i=r.getText();this.applying=!0;try{i.replace(e,Math.min(t,i.length()),n)}finally{this.applying=!1}}setSelection(e,t){this.selection={start:e,end:t},this.applySelection()}setLineCount(e){this.lineCount=e,this.view&&this.layout?.showLineNumbers&&this.applyLayout()}setLayout(e){this.layout=e,this.applyLayout()}setPalette(e){this.palette=e,this.applyPalette()}spliceLines(e,t,n){let r=this.view?.getText();for(let i of this.spans.splice(e,t,n))if(r)for(let e of i)r.removeSpan(e);this.runs.splice(e,t,n)}paintLine(e,t,n){this.runs.set(e,n);let r=this.view?.getText();r&&this.applyRuns(r,e,t,n)}clearAll(){this.removeAllSpans(),this.runs.clear()}removeAllSpans(){let e=this.view?.getText(),t=this.spans.clear();if(e)for(let n of t)for(let t of n)e.removeSpan(t)}repaintAll(){let e=this.view?.getText();if(!e)return;let t=e.toString().split(`
|
|
2
|
+
`),n=0;t.forEach((t,r)=>{let i=this.runs.get(r);i&&this.applyRuns(e,r,n,i),n+=t.length+1})}applyRuns(e,t,n,r){for(let n of this.spans.get(t)??[])e.removeSpan(n);let i=e.length(),a=android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE,{ForegroundColorSpan:o,BackgroundColorSpan:s,StyleSpan:c,UnderlineSpan:l,StrikethroughSpan:u}=android.text.style,d=android.graphics.Typeface,f=[],put=(t,n,r)=>{e.setSpan(t,n,r,a),f.push(t)};for(let e of r){let t=n+e.start,r=Math.min(n+e.end,i);if(t>=r)continue;let{style:a}=e;a.foreground!==void 0&&put(new o(a.foreground),t,r),a.background!==void 0&&put(new s(a.background),t,r),(a.bold||a.italic)&&put(new c(a.bold&&a.italic?d.BOLD_ITALIC:a.bold?d.BOLD:d.ITALIC),t,r),a.underline&&put(new l,t,r),a.strikethrough&&put(new u,t,r)}this.spans.set(t,f)}density(e){return e.getResources().getDisplayMetrics().density}columnPixels(e,t,n){return Math.ceil(Math.max(e.widthRequest*n,t)+(e.marginStart+e.marginEnd)*n)}numbersPixels(e,t){if(!this.layout?.showLineNumbers)return 0;let r=8*this.density(e);return n(t,this.paintFor(e).measureText(`0`),r)}gutterPixels(e,t=this.lineCount){let n=this.density(e),r=this.numbersPixels(e,t);return(this.host?.gutterColumns()??[]).forEach((e,t)=>{r+=this.columnPixels(e,this.measured[t]??0,n)}),r}paintFor(e){return this.textPaint??=new android.graphics.Paint(1),this.textPaint.setTextSize(e.getTextSize()),this.textPaint.setTypeface(e.getTypeface()),this.textPaint.setTextAlign(android.graphics.Paint.Align.RIGHT),this.textPaint}applyLayout(){let e=this.view,t=this.layout;if(!e||!t)return;e.setTypeface(t.monospace?android.graphics.Typeface.MONOSPACE:android.graphics.Typeface.DEFAULT);let n=this.density(e);e.setPadding(Math.round(t.leftMargin*n)+this.gutterPixels(e),Math.round(t.topMargin*n),Math.round(t.rightMargin*n),Math.round(t.bottomMargin*n)),e.setKeyListener(t.editable?this.keyListener:null),e.setCursorVisible(t.cursorVisible),this.appliedGutter=this.gutterPixels(e),e.invalidate()}applyPalette(){let e=this.view,t=this.palette;!e||!t||(e.setBackgroundColor(t.background),e.setTextColor(t.foreground),e.setHighlightColor(t.selectionBackground),e.invalidate())}applySelection(){let e=this.view;if(!e)return;let t=e.getText().length(),n=Math.min(this.selection.start,t);e.getSelectionStart()===n&&e.getSelectionEnd()===Math.min(this.selection.end,t)||e.setSelection(n,Math.min(this.selection.end,t))}flushEdits(){let e=this.view,t=this.host;if(this.applying||!e||!t||this.queue.length===0)return;let n=this.queue;this.queue=[];for(let e of n)t.onNativeEdit(e.start,e.removed,e.inserted);t.onNativeSelection(e.getSelectionStart(),e.getSelectionEnd())}selectionChanged(e,t){this.applying||this.queue.length>0||(this.selection={start:e,end:t},this.host?.onNativeSelection(e,t),this.view?.invalidate())}invalidateGutter(){let e=this.view;e&&(this.gutterPixels(e)===this.appliedGutter?e.invalidate():this.applyLayout())}fill(e,t,n,r,i,a){this.fillPaint??=new android.graphics.Paint(0),this.fillPaint.setColor(t),e.drawRect(n,r,i,a,this.fillPaint)}drawBehind(e,t){let n=this.palette,r=e.getLayout();if(!n||!r||!this.layout?.highlightCurrentLine||n.currentLineBackground===0)return;let i=r.getLineForOffset(e.getSelectionEnd()),a=e.getExtendedPaddingTop();this.fill(t,n.currentLineBackground,e.getScrollX(),a+r.getLineTop(i),e.getScrollX()+e.getWidth(),a+r.getLineBottom(i))}drawGutter(e,n){let i=this.palette,a=e.getLayout(),o=this.host;if(!i||!a||!o)return;let s=this.layout?.showLineNumbers===!0,c=this.density(e),l=e.getScrollY(),u=e.getExtendedPaddingTop(),d=r(a.getLineCount(),e=>u+a.getLineTop(e),e=>u+a.getLineBottom(e),l,l+e.getHeight()),f=d?o.queryGutter(d.first,d.last):o.gutterColumns().map(e=>({...e,cells:[]}));if(!s&&f.length===0)return;let p=this.paintFor(e);f.forEach((e,t)=>{let n=e.cells.reduce((e,t)=>Math.max(e,p.measureText(t.text)),0);this.measured[t]=Math.max(n,this.measured[t]??0)}),this.measured.length=f.length;let m=this.gutterPixels(e,a.getLineCount());m!==this.appliedGutter&&(this.appliedGutter=m,e.post(new java.lang.Runnable({run:()=>this.applyLayout()})));let h=e.getScrollX();if(this.fill(n,i.lineNumberBackground,h,l,h+m,l+e.getHeight()),!d)return;let g=8*c,_=t(this.layout?.highlightCurrentLine===!0,a.getLineForOffset(e.getSelectionEnd())),v=h,drawNumbers=()=>{let t=this.numbersPixels(e,a.getLineCount());p.setTextAlign(android.graphics.Paint.Align.RIGHT);for(let e=d.first;e<=d.last;e++){let r=e===_;r&&i.currentLineNumberBackground!==0&&this.fill(n,i.currentLineNumberBackground,v,u+a.getLineTop(e),v+t,u+a.getLineBottom(e)),p.setColor(r?i.currentLineNumberForeground:i.lineNumberForeground),n.drawText(String(e+1),v+t-g,u+a.getLineBaseline(e),p)}v+=t},y=!s;f.forEach((e,t)=>{!y&&e.position>=0&&(drawNumbers(),y=!0),p.setTextAlign(android.graphics.Paint.Align.LEFT),p.setColor(i.lineNumberForeground),e.cells.forEach((t,r)=>{if(t.text===``)return;let i=u+a.getLineBaseline(d.first+r);n.drawText(t.text,v+e.marginStart*c,i,p)}),v+=this.columnPixels(e,this.measured[t],c)}),y||drawNumbers()}};function createEditorDriver(){return new AndroidEditorDriver}export{createEditorDriver};
|
package/lib/esm/native-editor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";var UnsupportedEditorDriver=class{bind(e){}createNativeView(){throw Error(`Platform not supported: GtkSource.View is implemented for Android only`)}attach(){}detach(){}setText(){}replaceRange(){}setSelection(){}setLineCount(){}setLayout(){}spliceLines(){}paintLine(){}clearAll(){}setPalette(){}};function createEditorDriver(){return new UnsupportedEditorDriver}export{createEditorDriver};
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";var UnsupportedEditorDriver=class{bind(e){}createNativeView(){throw Error(`Platform not supported: GtkSource.View is implemented for Android only`)}attach(){}detach(){}setText(){}replaceRange(){}setSelection(){}setLineCount(){}setLayout(){}invalidateGutter(){}spliceLines(){}paintLine(){}clearAll(){}setPalette(){}};function createEditorDriver(){return new UnsupportedEditorDriver}export{createEditorDriver};
|
package/lib/esm/view.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";import{createEditorDriver as e}from"./native-editor.js";import{EditorSession as t,GtkSourceBuffer as n,
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{createEditorDriver as e}from"./native-editor.js";import{EditorSession as t,GtkSourceBuffer as n,GutterSet as r,toBoolean as i,toNumber as a}from"@gjsify/gtksource-core";import{View as o}from"@nativescript/core";import{adwaitaColorScheme as s,onAdwaitaColorSchemeChanged as c,withGtkWidgetLayout as l}from"@gjsify/adwaita-nativescript";import{Adjustment as u}from"@gjsify/adwaita-nativescript/gtk";var GtkSourceView=class extends l(o){static builderSlots=[`buffer`];driver=e();session;unsubscribe=null;vadj=new u;hadj=new u;direction=1;gutters=new r(this);constructor(){super(),this.className=`gtksource-view`,this.session=new t(this.driver,void 0,s()),this.session.bindGutters(this.gutters)}createNativeView(){return this.driver.createNativeView(this._context)}initNativeView(){super.initNativeView(),this.driver.attach(this.nativeViewProtected),this.unsubscribe=c(()=>this.session.setColorScheme(s())),this.session.setColorScheme(s())}disposeNativeView(){this.unsubscribe?.(),this.unsubscribe=null,this.driver.detach(),super.disposeNativeView()}_addChildFromBuilder(e,t){if(e!==`buffer`||!(t instanceof n))throw Error(`GtkSource.View takes only a \`buffer\` object child, not '${e}'.`);this.buffer=t}get buffer(){return this.session.buffer}set buffer(e){this.session.buffer=e}get autoIndent(){return this.session.autoIndent}set autoIndent(e){this.session.autoIndent=i(e,`GtkSource.View.autoIndent`)}get indentWidth(){return this.session.indentWidth}set indentWidth(e){this.session.indentWidth=a(e,`GtkSource.View.indentWidth`)}get showLineNumbers(){return this.session.showLineNumbers}set showLineNumbers(e){this.session.showLineNumbers=i(e,`GtkSource.View.showLineNumbers`)}get highlightCurrentLine(){return this.session.highlightCurrentLine}set highlightCurrentLine(e){this.session.highlightCurrentLine=i(e,`GtkSource.View.highlightCurrentLine`)}get monospace(){return this.session.monospace}set monospace(e){this.session.monospace=i(e,`GtkSource.View.monospace`)}get editable(){return this.session.editable}set editable(e){this.session.editable=i(e,`GtkSource.View.editable`)}get cursorVisible(){return this.session.cursorVisible}set cursorVisible(e){this.session.cursorVisible=i(e,`GtkSource.View.cursorVisible`)}get cursor_visible(){return this.cursorVisible}set cursor_visible(e){this.cursorVisible=e}get_cursor_visible(){return this.cursorVisible}set_cursor_visible(e){this.cursorVisible=e}get_editable(){return this.editable}set_editable(e){this.editable=e}get highlight_current_line(){return this.highlightCurrentLine}set highlight_current_line(e){this.highlightCurrentLine=e}get show_line_numbers(){return this.showLineNumbers}set show_line_numbers(e){this.showLineNumbers=e}get vadjustment(){return this.vadj}get hadjustment(){return this.hadj}get_vadjustment(){return this.vadj}get_hadjustment(){return this.hadj}set_direction(e){if(![0,1,2].includes(e))throw TypeError(`${e} is not a valid value for enum argument dir`);this.direction=e}get_direction(){return this.direction}get_first_child(){return null}get_next_sibling(){return null}get_parent(){return this.parent??null}get_gutter(e){return this.gutters.get(e)}get leftMargin(){return this.session.leftMargin}set leftMargin(e){this.session.leftMargin=a(e,`GtkSource.View.leftMargin`)}get rightMargin(){return this.session.rightMargin}set rightMargin(e){this.session.rightMargin=a(e,`GtkSource.View.rightMargin`)}get topMargin(){return this.session.topMargin}set topMargin(e){this.session.topMargin=a(e,`GtkSource.View.topMargin`)}get bottomMargin(){return this.session.bottomMargin}set bottomMargin(e){this.session.bottomMargin=a(e,`GtkSource.View.bottomMargin`)}connect(e,t){return this.session.connect(e,t)}disconnect(e){this.session.disconnect(e)}};export{GtkSourceView};
|
|
@@ -60,6 +60,7 @@ export interface AndroidEditText {
|
|
|
60
60
|
addTextChangedListener(watcher: unknown): void;
|
|
61
61
|
removeTextChangedListener(watcher: unknown): void;
|
|
62
62
|
invalidate(): void;
|
|
63
|
+
post(action: unknown): boolean;
|
|
63
64
|
}
|
|
64
65
|
export interface AndroidNamespace {
|
|
65
66
|
widget: {
|
|
@@ -71,6 +72,7 @@ export interface AndroidNamespace {
|
|
|
71
72
|
Paint: (new (flags: number) => AndroidPaint) & {
|
|
72
73
|
Align: {
|
|
73
74
|
RIGHT: unknown;
|
|
75
|
+
LEFT: unknown;
|
|
74
76
|
};
|
|
75
77
|
};
|
|
76
78
|
Typeface: {
|
|
@@ -2,4 +2,5 @@ export { Buffer } from '@gjsify/gtksource-core';
|
|
|
2
2
|
export { LanguageManager, Language } from '@gjsify/gtksource-core';
|
|
3
3
|
export { StyleSchemeManager, StyleScheme } from '@gjsify/gtksource-core';
|
|
4
4
|
export { GtkSourceView as View } from '../view.js';
|
|
5
|
+
export { Gutter, GutterLines, GutterRenderer, GutterRendererText } from '@gjsify/gtksource-core';
|
|
5
6
|
export { init } from '@gjsify/gtksource-core';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EditorDriver } from '@gjsify/gtksource-core';
|
|
2
2
|
export interface NativeEditorDriver extends EditorDriver {
|
|
3
3
|
/** Called from `createNativeView()` with the Android `Context`. */
|
|
4
|
-
createNativeView(context: unknown):
|
|
4
|
+
createNativeView(context: unknown): object;
|
|
5
5
|
/** The view `createNativeView()` returned is live: apply everything remembered so far. */
|
|
6
6
|
attach(nativeView: unknown): void;
|
|
7
7
|
detach(): void;
|
package/lib/types/view.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { View as NsView } from '@nativescript/core';
|
|
2
|
-
import { type Buffer } from '@gjsify/gtksource-core';
|
|
2
|
+
import { type Buffer, type Gutter } from '@gjsify/gtksource-core';
|
|
3
3
|
import { Adjustment as GtkAdjustment } from '@gjsify/adwaita-nativescript/gtk';
|
|
4
4
|
declare const GtkSourceView_base: (abstract new (...args: any[]) => {
|
|
5
5
|
get halign(): string;
|
|
@@ -41,8 +41,9 @@ export declare class GtkSourceView extends GtkSourceView_base {
|
|
|
41
41
|
private readonly vadj;
|
|
42
42
|
private readonly hadj;
|
|
43
43
|
private direction;
|
|
44
|
+
private readonly gutters;
|
|
44
45
|
constructor();
|
|
45
|
-
createNativeView():
|
|
46
|
+
createNativeView(): object;
|
|
46
47
|
initNativeView(): void;
|
|
47
48
|
disposeNativeView(): void;
|
|
48
49
|
_addChildFromBuilder(name: string, child: object): void;
|
|
@@ -85,8 +86,8 @@ export declare class GtkSourceView extends GtkSourceView_base {
|
|
|
85
86
|
get_first_child(): null;
|
|
86
87
|
get_next_sibling(): null;
|
|
87
88
|
get_parent(): unknown;
|
|
88
|
-
/**
|
|
89
|
-
get_gutter(
|
|
89
|
+
/** `null` for any side but LEFT and RIGHT, as in GtkSourceView (ADR 0103). */
|
|
90
|
+
get_gutter(window_type: number): Gutter | null;
|
|
90
91
|
get leftMargin(): number;
|
|
91
92
|
set leftMargin(value: number | string);
|
|
92
93
|
get rightMargin(): number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/gtksource-nativescript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
4
4
|
"description": "GtkSource.View for NativeScript — an Android EditText with incremental syntax highlighting, a line-number gutter and GtkSourceView language/scheme managers, driven by @gjsify/gtksource-core",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
],
|
|
27
27
|
"scripts": {
|
|
28
28
|
"clear": "gjsify clear lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.trees.gjs.mjs test.trees.node.mjs",
|
|
29
|
-
"check": "gjsify tsc --noEmit",
|
|
29
|
+
"check": "gjsify tsc --noEmit && gjsify run check:consumer",
|
|
30
|
+
"check:consumer": "gjsify tsc -p tsconfig.consumer.json",
|
|
30
31
|
"build": "gjsify run build:gjsify && gjsify run build:types",
|
|
31
32
|
"build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}'",
|
|
32
33
|
"build:types": "gjsify tsc",
|
|
@@ -48,8 +49,8 @@
|
|
|
48
49
|
"editor"
|
|
49
50
|
],
|
|
50
51
|
"dependencies": {
|
|
51
|
-
"@gjsify/adwaita-nativescript": "^0.
|
|
52
|
-
"@gjsify/gtksource-core": "^0.
|
|
52
|
+
"@gjsify/adwaita-nativescript": "^0.58.0",
|
|
53
|
+
"@gjsify/gtksource-core": "^0.58.0"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|
|
55
56
|
"@nativescript/core": "*"
|
|
@@ -60,8 +61,8 @@
|
|
|
60
61
|
}
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
63
|
-
"@gjsify/cli": "^0.
|
|
64
|
-
"@gjsify/unit": "^0.
|
|
64
|
+
"@gjsify/cli": "^0.58.0",
|
|
65
|
+
"@gjsify/unit": "^0.58.0",
|
|
65
66
|
"@types/node": "^25.9.2",
|
|
66
67
|
"typescript": "^6.0.3"
|
|
67
68
|
},
|