@gjsify/adwaita-nativescript 0.64.2-next.254 → 0.64.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{xmlBoolean as t}from"./xml-values.js";import{withSignals as n}from"./signals.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{xmlBoolean as t}from"./xml-values.js";import{withSignals as n}from"./signals.js";import{findDialogHost as r}from"./window-state.js";import{AdwImageButton as i}from"./adw-image-button.js";import{searchNsPreferences as a}from"./preferences-search.js";import{GridLayout as o,ItemSpec as s,Label as c,StackLayout as l}from"@nativescript/core";import{windowCloseSymbolic as u}from"@gjsify/adwaita-icons/ui";const d=`closed`;var AdwPreferencesDialog=class extends n(o){static GTypeName=`AdwPreferencesDialog`;_card;_headerBox;_titleLabel;_body;_host=null;constructor(t){super(),this.className=`adw-preferences-dialog`,this.visibility=`collapse`,this.addColumn(new s(1,`star`)),this.addRow(new s(1,`star`));let n=new o;n.className=`adw-preferences-dialog-card`,n.verticalAlignment=`middle`,n.horizontalAlignment=`center`,n.addColumn(new s(1,`star`)),n.addRow(new s(1,`auto`)),n.addRow(new s(1,`star`)),o.setColumn(n,0),o.setRow(n,0),this.addChild(n),this._card=n;let r=new o;r.className=`adw-preferences-dialog-header`,r.addColumn(new s(1,`star`)),r.addColumn(new s(1,`auto`)),r.addRow(new s(1,`auto`)),o.setRow(r,0),n.addChild(r),this._headerBox=r;let a=new c;a.className=`adw-preferences-dialog-title`,a.text=`Preferences`,o.setColumn(a,0),r.addChild(a),this._titleLabel=a;let d=new i;d.iconName=u,d.className=`${d.className} adw-preferences-dialog-close`.trim(),d.addEventListener(`tap`,()=>this.close()),o.setColumn(d,1),r.addChild(d);let f=new l;f.orientation=`vertical`,f.className=`adw-preferences-dialog-body`,o.setRow(f,1),n.addChild(f),this._body=f,e(this,t)}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??`Preferences`}add(e){this._body.addChild(e)}_addChildFromBuilder(e,t){this.add(t)}remove(e){this._body.removeChild(e)}get searchPages(){let e=[],t=this._body.getChildrenCount();for(let n=0;n<t;n++){let t=this._body.getChildAt(n);typeof t.searchGroups==`function`&&e.push(t)}return e}search(e,t){return a(this.searchPages,e,t)}present(e){if(!this.open){if(this.parent===null||this.parent===void 0){let t=r(e??null);if(t===null)throw Error(`${this.constructor.name} has no window to appear in: pass a widget that sits inside an Adw.Window / Adw.ApplicationWindow to present(), or add the dialog to a layout first.`);t._hostDialog(this),this._host=t}this.visibility=`visible`}}close(){this.visibility=`collapse`,this._host!==null&&(this._host._unhostDialog(this),this._host=null);let e={eventName:d,object:this};this.notify(e)}get open(){return this.visibility===`visible`}set open(e){t(e,!1)?this.present():this.close()}get body(){return this._body}};export{AdwPreferencesDialog,d as CLOSED};
|
|
@@ -69,6 +69,8 @@ export declare class AdwPreferencesDialog extends AdwPreferencesDialog_base {
|
|
|
69
69
|
protected readonly _headerBox: GridLayout;
|
|
70
70
|
protected readonly _titleLabel: Label;
|
|
71
71
|
protected readonly _body: StackLayout;
|
|
72
|
+
/** The window `present (parent)` mounted this in, so closing can take it back out. */
|
|
73
|
+
private _host;
|
|
72
74
|
constructor(props?: ConstructProps<AdwPreferencesDialog>);
|
|
73
75
|
/** The dialog title. */
|
|
74
76
|
get title(): string;
|
|
@@ -99,9 +101,14 @@ export declare class AdwPreferencesDialog extends AdwPreferencesDialog_base {
|
|
|
99
101
|
* keeps a results list populated before the user types.
|
|
100
102
|
*/
|
|
101
103
|
search(query: string, options?: SearchPreferencesOptions): NsPreferencesSearchResult[];
|
|
102
|
-
/**
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
/**
|
|
105
|
+
* Reveal the preferences overlay — `adw_dialog_present`.
|
|
106
|
+
*
|
|
107
|
+
* With a `parent` it is hosted in that widget's window like every other AdwDialog, so the
|
|
108
|
+
* window's back handling closes it first. Without one it must already sit in a layout.
|
|
109
|
+
*/
|
|
110
|
+
present(parent?: View | null): void;
|
|
111
|
+
/** Hide the preferences overlay, take it out of its window and emit `closed`. */
|
|
105
112
|
close(): void;
|
|
106
113
|
/** Whether the dialog is currently shown. */
|
|
107
114
|
get open(): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/adwaita-nativescript",
|
|
3
|
-
"version": "0.64.2
|
|
3
|
+
"version": "0.64.2",
|
|
4
4
|
"description": "Native Adwaita widgets for the NativeScript runtime — real NativeScript components (StackLayout/GridLayout/Switch/Label) styled like Libadwaita, not a webview",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"design-system"
|
|
74
74
|
],
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@gjsify/adwaita-core": "0.64.2
|
|
77
|
-
"@gjsify/adwaita-fonts": "0.64.2
|
|
78
|
-
"@gjsify/adwaita-icons": "0.64.2
|
|
79
|
-
"@gjsify/canvas2d-core": "0.64.2
|
|
80
|
-
"@gjsify/native-platform": "0.64.2
|
|
76
|
+
"@gjsify/adwaita-core": "^0.64.2",
|
|
77
|
+
"@gjsify/adwaita-fonts": "^0.64.2",
|
|
78
|
+
"@gjsify/adwaita-icons": "^0.64.2",
|
|
79
|
+
"@gjsify/canvas2d-core": "^0.64.2",
|
|
80
|
+
"@gjsify/native-platform": "^0.64.2"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"@nativescript/core": "*",
|
|
84
|
-
"@gjsify/app-settings": "0.64.2
|
|
84
|
+
"@gjsify/app-settings": "^0.64.2"
|
|
85
85
|
},
|
|
86
86
|
"peerDependenciesMeta": {
|
|
87
87
|
"@nativescript/core": {
|
|
@@ -92,11 +92,11 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@gjsify/app-settings": "0.64.2
|
|
96
|
-
"@gjsify/blueprint": "0.64.2
|
|
97
|
-
"@gjsify/cli": "0.64.2
|
|
98
|
-
"@gjsify/unit": "0.64.2
|
|
99
|
-
"@gjsify/vite-plugin-blueprint": "0.64.2
|
|
95
|
+
"@gjsify/app-settings": "^0.64.2",
|
|
96
|
+
"@gjsify/blueprint": "^0.64.2",
|
|
97
|
+
"@gjsify/cli": "^0.64.2",
|
|
98
|
+
"@gjsify/unit": "^0.64.2",
|
|
99
|
+
"@gjsify/vite-plugin-blueprint": "^0.64.2",
|
|
100
100
|
"@types/node": "^25.9.2",
|
|
101
101
|
"typescript": "^6.0.3"
|
|
102
102
|
},
|
|
@@ -125,6 +125,5 @@
|
|
|
125
125
|
"bugs": {
|
|
126
126
|
"url": "https://github.com/gjsify/gjsify/issues"
|
|
127
127
|
},
|
|
128
|
-
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/nativescript-bridge/adwaita#readme"
|
|
129
|
-
"gitHead": "6c88ac780b9742fce781e9b35aa2f45c125d8064"
|
|
128
|
+
"homepage": "https://github.com/gjsify/gjsify/tree/main/packages/nativescript-bridge/adwaita#readme"
|
|
130
129
|
}
|