@gjsify/gtksource-nativescript 0.59.1 → 0.61.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/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 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_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=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};
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};
@@ -21,6 +21,16 @@ declare const GtkSourceView_base: (abstract new (...args: any[]) => {
21
21
  set sensitive(value: boolean | string): any;
22
22
  get name(): string;
23
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;
24
34
  get widthRequest(): number;
25
35
  set widthRequest(value: number | string): any;
26
36
  get heightRequest(): number;
@@ -34,6 +44,7 @@ declare const GtkSourceView_base: (abstract new (...args: any[]) => {
34
44
  get(name: string): unknown;
35
45
  }) & typeof NsView;
36
46
  export declare class GtkSourceView extends GtkSourceView_base {
47
+ static readonly GTypeName: string;
37
48
  /** The one slot a `.blp` fills with an object: `buffer: GtkSource.Buffer { … }`. */
38
49
  static readonly builderSlots: readonly string[];
39
50
  private readonly driver;
@@ -83,10 +94,6 @@ export declare class GtkSourceView extends GtkSourceView_base {
83
94
  /** `gtk_widget_set_direction`: held and read back; no widget mirrors under RTL here. */
84
95
  set_direction(direction: number): void;
85
96
  get_direction(): number;
86
- /** A view has no widget children of its own here: its parts are the platform's. */
87
- get_first_child(): null;
88
- get_next_sibling(): null;
89
- get_parent(): unknown;
90
97
  /** `null` for any side but LEFT and RIGHT, as in GtkSourceView (ADR 0103). */
91
98
  get_gutter(window_type: number): Gutter | null;
92
99
  get leftMargin(): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/gtksource-nativescript",
3
- "version": "0.59.1",
3
+ "version": "0.61.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",
@@ -49,8 +49,8 @@
49
49
  "editor"
50
50
  ],
51
51
  "dependencies": {
52
- "@gjsify/adwaita-nativescript": "^0.59.1",
53
- "@gjsify/gtksource-core": "^0.59.1"
52
+ "@gjsify/adwaita-nativescript": "^0.61.0",
53
+ "@gjsify/gtksource-core": "^0.61.0"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@nativescript/core": "*"
@@ -61,8 +61,8 @@
61
61
  }
62
62
  },
63
63
  "devDependencies": {
64
- "@gjsify/cli": "^0.59.1",
65
- "@gjsify/unit": "^0.59.1",
64
+ "@gjsify/cli": "^0.61.0",
65
+ "@gjsify/unit": "^0.61.0",
66
66
  "@types/node": "^25.9.2",
67
67
  "typescript": "^6.0.3"
68
68
  },