@gjsify/gtksource-nativescript 0.63.0 → 0.63.1-next.235
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/view.js +1 -1
- package/lib/types/view.d.ts +2 -42
- package/package.json +7 -6
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,GutterSet as r,STOP_EMISSION as i,toBoolean as a,toNumber as o}from"@gjsify/gtksource-core";import{View as s}from"@nativescript/core";import{adwaitaColorScheme as c,onAdwaitaColorSchemeChanged as l,withGtkWidgetLayout as u}from"@gjsify/adwaita-nativescript";import{Adjustment as d}from"@gjsify/adwaita-nativescript/gtk";var GtkSourceView=class extends u(s){static GTypeName=`GtkSourceView`;static builderSlots=[`buffer`];driver=e();session;unsubscribe=null;vadj=new d;hadj=new d;
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{createEditorDriver as e}from"./native-editor.js";import{EditorSession as t,GtkSourceBuffer as n,GutterSet as r,STOP_EMISSION as i,toBoolean as a,toNumber as o}from"@gjsify/gtksource-core";import{View as s}from"@nativescript/core";import{adwaitaColorScheme as c,onAdwaitaColorSchemeChanged as l,withGtkWidgetLayout as u}from"@gjsify/adwaita-nativescript";import{Adjustment as d}from"@gjsify/adwaita-nativescript/gtk";var GtkSourceView=class extends u(s){static GTypeName=`GtkSourceView`;static builderSlots=[`buffer`];driver=e();session;unsubscribe=null;vadj=new d;hadj=new d;_direction=1;gutters=new r(this);constructor(){super(),this.className=`gtksource-view`,this.session=new t(this.driver,void 0,c()),this.session.bindGutters(this.gutters)}createNativeView(){return this.driver.createNativeView(this._context)}initNativeView(){super.initNativeView(),this.driver.attach(this.nativeViewProtected),this.unsubscribe=l(()=>this.session.setColorScheme(c())),this.session.setColorScheme(c())}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=a(e,`GtkSource.View.autoIndent`)}get indentWidth(){return this.session.indentWidth}set indentWidth(e){this.session.indentWidth=o(e,`GtkSource.View.indentWidth`)}get showLineNumbers(){return this.session.showLineNumbers}set showLineNumbers(e){this.session.showLineNumbers=a(e,`GtkSource.View.showLineNumbers`)}get highlightCurrentLine(){return this.session.highlightCurrentLine}set highlightCurrentLine(e){this.session.highlightCurrentLine=a(e,`GtkSource.View.highlightCurrentLine`)}get monospace(){return this.session.monospace}set monospace(e){this.session.monospace=a(e,`GtkSource.View.monospace`)}get editable(){return this.session.editable}set editable(e){this.session.editable=a(e,`GtkSource.View.editable`)}get cursorVisible(){return this.session.cursorVisible}set cursorVisible(e){this.session.cursorVisible=a(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_gutter(e){return this.gutters.get(e)}get leftMargin(){return this.session.leftMargin}set leftMargin(e){this.session.leftMargin=o(e,`GtkSource.View.leftMargin`)}get rightMargin(){return this.session.rightMargin}set rightMargin(e){this.session.rightMargin=o(e,`GtkSource.View.rightMargin`)}get topMargin(){return this.session.topMargin}set topMargin(e){this.session.topMargin=o(e,`GtkSource.View.topMargin`)}get bottomMargin(){return this.session.bottomMargin}set bottomMargin(e){this.session.bottomMargin=o(e,`GtkSource.View.bottomMargin`)}connect(e,t){return this.session.connect(e,((e,...n)=>t(this,...n)))}connect_after(e,t){return this.session.connect_after(e,((e,...n)=>t(this,...n)))}[i](e){this.session[i](e)}disconnect(e){this.session.disconnect(e)}};export{GtkSourceView};
|
package/lib/types/view.d.ts
CHANGED
|
@@ -2,47 +2,7 @@ import { View as NsView } from '@nativescript/core';
|
|
|
2
2
|
import { type Buffer, type Gutter } from '@gjsify/gtksource-core';
|
|
3
3
|
import { STOP_EMISSION } from '@gjsify/gtksource-core';
|
|
4
4
|
import { Adjustment as GtkAdjustment } from '@gjsify/adwaita-nativescript/gtk';
|
|
5
|
-
declare const GtkSourceView_base: (abstract new (...args: any[]) =>
|
|
6
|
-
get halign(): string;
|
|
7
|
-
set halign(value: string | number): any;
|
|
8
|
-
get valign(): string;
|
|
9
|
-
set valign(value: string | number): any;
|
|
10
|
-
get hexpand(): boolean;
|
|
11
|
-
set hexpand(value: boolean | string): any;
|
|
12
|
-
get vexpand(): boolean;
|
|
13
|
-
set vexpand(value: boolean | string): any;
|
|
14
|
-
get marginStart(): number;
|
|
15
|
-
set marginStart(value: number | string): any;
|
|
16
|
-
get marginEnd(): number;
|
|
17
|
-
set marginEnd(value: number | string): any;
|
|
18
|
-
get visible(): boolean;
|
|
19
|
-
set visible(value: boolean | string): any;
|
|
20
|
-
get sensitive(): boolean;
|
|
21
|
-
set sensitive(value: boolean | string): any;
|
|
22
|
-
get name(): string;
|
|
23
|
-
set name(value: string | null): any;
|
|
24
|
-
set_direction(direction: number): void;
|
|
25
|
-
get_direction(): number;
|
|
26
|
-
get_first_child(): object | null;
|
|
27
|
-
get_last_child(): object | null;
|
|
28
|
-
get_next_sibling(): object | null;
|
|
29
|
-
get_prev_sibling(): object | null;
|
|
30
|
-
get_parent(): object | null;
|
|
31
|
-
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
32
|
-
get tooltipText(): string;
|
|
33
|
-
set tooltipText(value: string): any;
|
|
34
|
-
get widthRequest(): number;
|
|
35
|
-
set widthRequest(value: number | string): any;
|
|
36
|
-
get heightRequest(): number;
|
|
37
|
-
set heightRequest(value: number | string): any;
|
|
38
|
-
_emit(eventName: string): void;
|
|
39
|
-
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
40
|
-
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
41
|
-
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
42
|
-
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
43
|
-
set(name: string, value: unknown): void;
|
|
44
|
-
get(name: string): unknown;
|
|
45
|
-
}) & typeof NsView;
|
|
5
|
+
declare const GtkSourceView_base: (abstract new (...args: any[]) => import("@gjsify/adwaita-nativescript").GtkWidgetLayoutMembers) & typeof NsView;
|
|
46
6
|
export declare class GtkSourceView extends GtkSourceView_base {
|
|
47
7
|
static readonly GTypeName: string;
|
|
48
8
|
/** The one slot a `.blp` fills with an object: `buffer: GtkSource.Buffer { … }`. */
|
|
@@ -52,7 +12,7 @@ export declare class GtkSourceView extends GtkSourceView_base {
|
|
|
52
12
|
private unsubscribe;
|
|
53
13
|
private readonly vadj;
|
|
54
14
|
private readonly hadj;
|
|
55
|
-
private
|
|
15
|
+
private _direction;
|
|
56
16
|
private readonly gutters;
|
|
57
17
|
constructor();
|
|
58
18
|
createNativeView(): object;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/gtksource-nativescript",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.1-next.235",
|
|
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",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"editor"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@gjsify/adwaita-nativescript": "
|
|
53
|
-
"@gjsify/gtksource-core": "
|
|
52
|
+
"@gjsify/adwaita-nativescript": "0.63.1-next.235",
|
|
53
|
+
"@gjsify/gtksource-core": "0.63.1-next.235"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@nativescript/core": "*"
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@gjsify/cli": "
|
|
65
|
-
"@gjsify/unit": "
|
|
64
|
+
"@gjsify/cli": "0.63.1-next.235",
|
|
65
|
+
"@gjsify/unit": "0.63.1-next.235",
|
|
66
66
|
"@types/node": "^25.9.2",
|
|
67
67
|
"typescript": "^6.0.3"
|
|
68
68
|
},
|
|
@@ -87,5 +87,6 @@
|
|
|
87
87
|
"bugs": {
|
|
88
88
|
"url": "https://github.com/gjsify/gjsify/issues"
|
|
89
89
|
},
|
|
90
|
-
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/nativescript-bridge/gtksource#readme"
|
|
90
|
+
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/nativescript-bridge/gtksource#readme",
|
|
91
|
+
"gitHead": "9d2cca56170a0215b3e0792e98421ed1f83e7f72"
|
|
91
92
|
}
|