@gjsify/adwaita-nativescript 0.64.12-next.280 → 0.64.12

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.
Files changed (45) hide show
  1. package/lib/esm/builder/index.js +1 -1
  2. package/lib/esm/builder/param-values.js +1 -1
  3. package/lib/esm/gobject-siblings.d.blp.js +0 -0
  4. package/lib/esm/index.js +1 -1
  5. package/lib/esm/namespace/adw.js +1 -1
  6. package/lib/esm/namespace/gdk.js +1 -1
  7. package/lib/esm/namespace/gio.js +1 -1
  8. package/lib/esm/namespace/gobject.js +1 -1
  9. package/lib/esm/namespace/gtk.js +1 -1
  10. package/lib/esm/widgets/adw-button-content.js +1 -1
  11. package/lib/esm/widgets/adw-button-row.js +1 -1
  12. package/lib/esm/widgets/adw-combo-row.js +1 -1
  13. package/lib/esm/widgets/adw-split-button.js +1 -1
  14. package/lib/esm/widgets/gtk-button.js +1 -1
  15. package/lib/esm/widgets/gtk-check-button.js +1 -1
  16. package/lib/esm/widgets/gtk-drop-down.js +1 -1
  17. package/lib/esm/widgets/gtk-list-box.js +1 -1
  18. package/lib/esm/widgets/gtk-window.js +1 -1
  19. package/lib/esm/widgets/index.js +1 -1
  20. package/lib/esm/widgets/signals.js +1 -1
  21. package/lib/esm/widgets/split-button.js +1 -1
  22. package/lib/esm/window-host.js +1 -1
  23. package/lib/esm/window-source.android.js +1 -1
  24. package/lib/esm/window-source.ios.js +1 -1
  25. package/lib/esm/window-source.js +1 -1
  26. package/lib/types/builder/index.d.ts +5 -2
  27. package/lib/types/button-content-properties.spec.d.ts +1 -0
  28. package/lib/types/index.d.ts +1 -1
  29. package/lib/types/namespace/gdk.d.ts +1 -1
  30. package/lib/types/namespace/gio.d.ts +1 -0
  31. package/lib/types/namespace/gtk.d.ts +1 -1
  32. package/lib/types/split-button-properties.spec.d.ts +1 -0
  33. package/lib/types/widgets/adw-button-content.d.ts +21 -13
  34. package/lib/types/widgets/adw-combo-row.d.ts +32 -8
  35. package/lib/types/widgets/adw-split-button.d.ts +28 -29
  36. package/lib/types/widgets/construct-props.d.ts +22 -16
  37. package/lib/types/widgets/gtk-drop-down.d.ts +29 -6
  38. package/lib/types/widgets/gtk-window.d.ts +10 -2
  39. package/lib/types/widgets/index.d.ts +2 -2
  40. package/lib/types/widgets/signals.d.ts +13 -5
  41. package/lib/types/widgets/split-button.d.ts +1 -10
  42. package/lib/types/window-source.android.d.ts +1 -1
  43. package/lib/types/window-source.d.ts +7 -2
  44. package/lib/types/window-source.ios.d.ts +1 -1
  45. package/package.json +13 -14
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{ENGINE_TARGET as e}from"../engine-target.js";import{camelProperty as t,readGtkProperty as n,writeGtkProperty as r}from"./shadowed-properties.js";import{WIDGET_SIGNALS as i,watchMapping as a}from"./widget-mapping.js";import{withGtkWidgetLayout as o}from"./widget-layout.js";import{engineForTarget as s}from"@gjsify/adwaita-core";function coerceDeclared(e,t,n,r){return t.normalize===void 0?readDeclaredValue(e,t.kind,n):t.normalize(n,r)}function readDeclaredValue(e,t,n){if(typeof n!=`string`||t===`string`)return n;let r=n.trim();if(t===`boolean`){let t=r.toLowerCase();if(t===`true`)return!0;if(t===`false`)return!1;throw TypeError(`Property '${e}' is a boolean; '${n}' is neither 'true' nor 'false'.`)}let i=r===``?NaN:Number(r);if(!Number.isFinite(i))throw TypeError(`Property '${e}' is a number; '${n}' is not one.`);return i}const c=new WeakMap;let l=1;const u=1073741824,d=new WeakMap,f=new WeakMap;function unknownHandler(e,t){return TypeError(`${e.constructor.name} has no handler with id ${t}. connect() hands out each id once and disconnect() takes it once; a second disconnect, or an id another widget returned, is refused here rather than left as a silent no-op.`)}const p=new WeakMap;function pureConnect(e,t,n){let r=l++,o=c.get(e);o===void 0&&(o=new Map,c.set(e,o));let s=i.includes(t)?a(e):void 0;return o.set(r,{eventName:t,listener:n,unwatch:s}),e.addEventListener(t,n),r}function pureDisconnect(e,t){let n=c.get(e)?.get(t);if(n===void 0)throw unknownHandler(e,t);e.removeEventListener(n.eventName,n.listener),n.unwatch?.(),c.get(e)?.delete(t)}function declaredConnect(e,t,n,r){let i=l++,a=p.get(e);return a===void 0&&p.set(e,a=new Map),a.set(i,{key:t,eventName:n,callback:r}),i}function declaredDisconnect(e,t){return p.get(e)?.delete(t)===!0}function emitDeclared(e,t,n){let r=p.get(e);if(r===void 0)return;let i=t.startsWith(`notify::`),a=[...r];for(let[o,s]of a){if(s.key!==t||r.get(o)!==s)continue;let a=i?{eventName:s.eventName,object:e}:{eventName:s.eventName,object:e,args:n};try{s.callback(e,a)}catch(t){console.error(`[${e.constructor.name}] unhandled exception in a '${s.eventName}' handler:`,t)}}}function refuseDeclaredEvent(e,t,n){let r=giKeyOf(resolvedFor(e.constructor),t);if(r===null)return;let i=r.startsWith(`notify::`),a=i?`a declared property's notification`:`a declared signal`,o=n===`notify`?i?`write the property, or emit it with notify('${r.slice(8)}')`:`emit it with emit('${r}', …)`:`subscribe with connect('${t}', (self, data) => …), whose id disconnect() takes`;throw TypeError(`${e.constructor.name}.${n}('${t}'): '${r}' is ${a} and GObject owns it — ${o}. On Android the emission belongs to the GObject and no NativeScript listener can see it, so ${n} would work off-device and be silent on it.`)}function spellingsOf(e){return[...new Set([e,e.replace(/-/g,`_`),t(e)])]}function emittedSignalsOf(e){let t=[];for(let n=e;typeof n==`function`;n=Object.getPrototypeOf(n))t.unshift(n);let n=new Set;for(let e of t)if(Object.hasOwn(e,`emittedSignals`))for(let t of e.emittedSignals)n.add(t);return[...n]}const m=new WeakMap,h=new WeakSet,g=new WeakSet,_=new WeakMap;function declarationsOf(e){let t=[];for(let n=e;typeof n==`function`;n=Object.getPrototypeOf(n)){let e=m.get(n);e!==void 0&&t.unshift(e)}return t}function resolvedFor(e){let t=_.get(e);if(t!==void 0)return t;let n=new Map,r=new Set,i={canonicalOf:n,declaredSignals:r,routeD:!1,giConnect:void 0,giDisconnect:void 0,giEmit:void 0},a=i;for(let t of declarationsOf(e)){for(let[e,r]of t.canonicalOf)n.set(e,r);for(let e of t.declaredSignals)r.add(e);t.routeD&&(a.routeD=!0),t.giConnect!==void 0&&(a.giConnect=t.giConnect),t.giDisconnect!==void 0&&(a.giDisconnect=t.giDisconnect),t.giEmit!==void 0&&(a.giEmit=t.giEmit)}return _.set(e,i),i}function giKeyOf(e,t){if(e.declaredSignals.has(t))return t;if(!t.startsWith(`notify::`))return null;let n=e.canonicalOf.get(t.slice(8));return n===void 0?null:`notify::${n}`}function declare(e,t,n){let r=new Map;for(let e of Object.keys(t?.Properties??{}))for(let t of spellingsOf(e))r.set(t,e);let i={meta:t,klass:e,prototype:e.prototype,canonicalOf:r,declaredSignals:new Set(Object.keys(t?.Signals??{})),routers:n,realized:!1,routeD:!1};return m.set(e,i),i}function declaredEmissionsOf(e){return[...Object.keys(e?.Signals??{}),...Object.keys(e?.Properties??{}).map(e=>`notify::${e}`)]}function realizeChain(e){if(!h.has(e)){h.add(e);for(let t of declarationsOf(e))realize(t)}}function realize(t){if(t.realized||(t.realized=!0,t.meta===void 0))return;let n=s(e);if(n?.supportsForeignParentClasses===!0){registerRouteD(t,n.registerForeignClass.bind(n));return}installPureJsProperties(t)}function registerRouteD(e,t){let{meta:n,prototype:r,routers:i}=e;if(i!==void 0&&(delete r.connect,delete r.disconnect,delete r.emit,delete r.notify),t(e.klass,n),wrapRouteDAccessors(e),i!==void 0){if(e.giConnect=r.connect,e.giDisconnect=r.disconnect,e.giEmit=r.emit,e.giConnect===void 0||e.giDisconnect===void 0||e.giEmit===void 0)throw Error(`Registering '${n.GTypeName}' over its NativeScript base installed no connect/disconnect/emit, so the widget would answer neither GObject nor this port. ADR 0105 refuses a silent fallback here: the subset is reachable only by calling usePureJsGObjectEngine() from '@gjsify/adwaita-core' before the port loads.`);for(let[e,t]of Object.entries(i))Object.defineProperty(r,e,{configurable:!0,writable:!0,enumerable:!1,value:t});refuseDeclaredNotifyPayload(r,r.notify)}e.routeD=!0}function refuseDeclaredNotifyPayload(e,t){let n=function notify(e,...n){if(typeof e==`object`&&e){let{eventName:t}=e;typeof t==`string`&&refuseDeclaredEvent(this,t,`notify`)}return t.call(this,e,...n)};g.add(n),Object.defineProperty(e,"notify",{configurable:!0,writable:!0,enumerable:!1,value:n})}function wrapRouteDAccessors(e){let{meta:t,prototype:n}=e;for(let[e,r]of Object.entries(t.Properties??{}))if(!(r.kind===`string`&&r.normalize===void 0))for(let i of spellingsOf(e)){let a=Object.getOwnPropertyDescriptor(n,i);if(a?.set===void 0)throw Error(`Registering '${t.GTypeName}' installed no setter for '${i}', so a string from XML would reach the GObject uncoerced. The host chain probably owns that name (see the class's \$foreignSkipped); rename the property.`);let o=a.set;Object.defineProperty(n,i,{...a,set(t){o.call(this,coerceDeclared(e,r,t,this))}})}}function installPureJsProperties(e){let{meta:t,prototype:n}=e;for(let[e,r]of Object.entries(t.Properties??{})){let t=defaultValueOf(r);for(let i of spellingsOf(e))i in n||Object.defineProperty(n,i,{configurable:!0,enumerable:!1,get(){let n=valuesOf(this);return n.has(e)||n.set(e,t),n.get(e)},set(t){let n=coerceDeclared(e,r,t,this),i=valuesOf(this);i.has(e)&&i.get(e)===n||(i.set(e,n),emitDeclared(this,`notify::${e}`,[]))}})}installPureNotify(e)}function installPureNotify(e){let{prototype:t}=e,n=t.notify;if(g.has(n))return;let r=function notify(e,...t){if(typeof e!=`string`){if(typeof e==`object`&&e){let{eventName:t}=e;typeof t==`string`&&refuseDeclaredEvent(this,t,`notify`)}return n.call(this,e,...t)}let{canonicalOf:r}=resolvedFor(this.constructor),i=r.get(e);if(i===void 0)throw TypeError(`${this.constructor.name} has no property '${e}' to notify. The declared ones are ${[...r.keys()].join(`, `)||`(none)`}; a NativeScript event is notified with its payload object, not with a name.`);emitDeclared(this,`notify::${i}`,[])};g.add(r),Object.defineProperty(t,"notify",{configurable:!0,writable:!0,enumerable:!1,value:r})}function withSignals(e,a){class WithSignals extends o(e){static emittedSignals=[...i,...declaredEmissionsOf(a)];constructor(...e){super(...e),realizeChain(new.target)}addEventListener(e,t,n,r){refuseDeclaredEvent(this,e,`addEventListener`),super.addEventListener(e,t,n,r)}removeEventListener(e,t,n){refuseDeclaredEvent(this,e,`removeEventListener`),super.removeEventListener(e,t,n)}connect(e,t){let n=resolvedFor(this.constructor),r=giKeyOf(n,e);if(n.routeD&&r!==null){let i=r.startsWith(`notify::`),a=n.giConnect.call(this,r,(n,...r)=>{let a=n;return t(n,i?{eventName:e,object:a}:{eventName:e,object:a,args:r})}),o=d.get(this);return o===void 0&&d.set(this,o=new Set),o.add(a),u+a}if(r!==null)return declaredConnect(this,r,e,t);let listener=e=>{let n=e.accumulator;if(n===void 0){t(this,e);return}n.stopped||n.collect(t(this,e))};return pureConnect(this,e,listener)}disconnect(e){if(e>=u){let t=e-u;if(d.get(this)?.delete(t)!==!0)throw unknownHandler(this,e);resolvedFor(this.constructor).giDisconnect.call(this,t);return}declaredDisconnect(this,e)||pureDisconnect(this,e)}emit(e,...t){let n=resolvedFor(this.constructor),r=giKeyOf(n,e);if(r!==null){n.routeD?n.giEmit.call(this,r,...t):emitDeclared(this,r,t);return}throw Error(`No signal '${e}' on object '${this.constructor.name}'. emit() is GObject's and takes a declared signal or a declared property's notify::<prop>; to dispatch a NativeScript event use notify({ eventName: '${e}', object: this }).`)}get_property(e){return n(this,t(e))}set_property(e,n){r(this,t(e),n)}}return declare(WithSignals,a,{connect:WithSignals.prototype.connect,disconnect:WithSignals.prototype.disconnect,emit:WithSignals.prototype.emit}),WithSignals}function withProperties(e,t){class WithProperties extends e{static emittedSignals=declaredEmissionsOf(t)}return declare(WithProperties,t,void 0),WithProperties}function valuesOf(e){let t=f.get(e);return t===void 0&&f.set(e,t=new Map),t}function defaultValueOf(e){return e.default===void 0?e.kind===`string`?``:e.kind===`boolean`?!1:0:e.default}export{emittedSignalsOf,readDeclaredValue,withProperties,withSignals};
1
+ import"../_virtual/_rolldown/runtime.js";import{ENGINE_TARGET as e}from"../engine-target.js";import{camelProperty as t,readGtkProperty as n,writeGtkProperty as r}from"./shadowed-properties.js";import{WIDGET_SIGNALS as i,watchMapping as a}from"./widget-mapping.js";import{withGtkWidgetLayout as o}from"./widget-layout.js";import{engineForTarget as s}from"@gjsify/adwaita-core";function coerceDeclared(e,t,n,r){return t.normalize===void 0?readDeclaredValue(e,t.kind,n):t.normalize(n,r)}function readDeclaredValue(e,t,n){if(typeof n!=`string`||t===`string`)return n;let r=n.trim();if(t===`object`)throw TypeError(`Property '${e}' holds an object; '${n}' is a string.`);if(t===`boolean`){let t=r.toLowerCase();if(t===`true`)return!0;if(t===`false`)return!1;throw TypeError(`Property '${e}' is a boolean; '${n}' is neither 'true' nor 'false'.`)}let i=r===``?NaN:Number(r);if(!Number.isFinite(i))throw TypeError(`Property '${e}' is a number; '${n}' is not one.`);return i}const c=new WeakMap;let l=1;const u=1073741824,d=new WeakMap,f=new WeakMap;function unknownHandler(e,t){return TypeError(`${e.constructor.name} has no handler with id ${t}. connect() hands out each id once and disconnect() takes it once; a second disconnect, or an id another widget returned, is refused here rather than left as a silent no-op.`)}const p=new WeakMap;function pureConnect(e,t,n){let r=l++,o=c.get(e);o===void 0&&(o=new Map,c.set(e,o));let s=i.includes(t)?a(e):void 0;return o.set(r,{eventName:t,listener:n,unwatch:s}),e.addEventListener(t,n),r}function pureDisconnect(e,t){let n=c.get(e)?.get(t);if(n===void 0)throw unknownHandler(e,t);e.removeEventListener(n.eventName,n.listener),n.unwatch?.(),c.get(e)?.delete(t)}function declaredConnect(e,t,n,r){let i=l++,a=p.get(e);return a===void 0&&p.set(e,a=new Map),a.set(i,{key:t,eventName:n,callback:r}),i}function declaredDisconnect(e,t){return p.get(e)?.delete(t)===!0}function emitDeclared(e,t,n){let r=p.get(e);if(r===void 0)return;let i=t.startsWith(`notify::`),a=[...r];for(let[o,s]of a){if(s.key!==t||r.get(o)!==s)continue;let a=i?{eventName:s.eventName,object:e}:{eventName:s.eventName,object:e,args:n};try{s.callback(e,a)}catch(t){console.error(`[${e.constructor.name}] unhandled exception in a '${s.eventName}' handler:`,t)}}}function refuseDeclaredEvent(e,t,n){let r=giKeyOf(resolvedFor(e.constructor),t);if(r===null)return;let i=r.startsWith(`notify::`),a=i?`a declared property's notification`:`a declared signal`,o=n===`notify`?i?`write the property, or emit it with notify('${r.slice(8)}')`:`emit it with emit('${r}', …)`:`subscribe with connect('${t}', (self, data) => …), whose id disconnect() takes`;throw TypeError(`${e.constructor.name}.${n}('${t}'): '${r}' is ${a} and GObject owns it — ${o}. On Android the emission belongs to the GObject and no NativeScript listener can see it, so ${n} would work off-device and be silent on it.`)}function spellingsOf(e){return[...new Set([e,e.replace(/-/g,`_`),t(e)])]}function emittedSignalsOf(e){let t=[];for(let n=e;typeof n==`function`;n=Object.getPrototypeOf(n))t.unshift(n);let n=new Set;for(let e of t)if(Object.hasOwn(e,`emittedSignals`))for(let t of e.emittedSignals)n.add(t);return[...n]}const m=new WeakMap,h=new WeakSet,g=new WeakSet,_=new WeakMap;function declarationsOf(e){let t=[];for(let n=e;typeof n==`function`;n=Object.getPrototypeOf(n)){let e=m.get(n);e!==void 0&&t.unshift(e)}return t}function resolvedFor(e){let t=_.get(e);if(t!==void 0)return t;let n=new Map,r=new Set,i={canonicalOf:n,declaredSignals:r,routeD:!1,giConnect:void 0,giDisconnect:void 0,giEmit:void 0},a=i;for(let t of declarationsOf(e)){for(let[e,r]of t.canonicalOf)n.set(e,r);for(let e of t.declaredSignals)r.add(e);t.routeD&&(a.routeD=!0),t.giConnect!==void 0&&(a.giConnect=t.giConnect),t.giDisconnect!==void 0&&(a.giDisconnect=t.giDisconnect),t.giEmit!==void 0&&(a.giEmit=t.giEmit)}return _.set(e,i),i}function giKeyOf(e,t){if(e.declaredSignals.has(t))return t;if(!t.startsWith(`notify::`))return null;let n=e.canonicalOf.get(t.slice(8));return n===void 0?null:`notify::${n}`}function declare(e,t,n){let r=new Map;for(let e of Object.keys(t?.Properties??{}))for(let t of spellingsOf(e))r.set(t,e);let i={meta:t,klass:e,prototype:e.prototype,canonicalOf:r,declaredSignals:new Set(Object.keys(t?.Signals??{})),routers:n,realized:!1,routeD:!1};return m.set(e,i),i}function declaredEmissionsOf(e){return[...Object.keys(e?.Signals??{}),...Object.keys(e?.Properties??{}).map(e=>`notify::${e}`)]}function realizeChain(e){if(!h.has(e)){h.add(e);for(let t of declarationsOf(e))realize(t)}}function realize(t){if(t.realized||(t.realized=!0,t.meta===void 0))return;let n=s(e);if(n?.supportsForeignParentClasses===!0){registerRouteD(t,n.registerForeignClass.bind(n));return}installPureJsProperties(t)}function registerRouteD(e,t){let{meta:n,prototype:r,routers:i}=e;if(i!==void 0&&(delete r.connect,delete r.disconnect,delete r.emit,delete r.notify),t(e.klass,n),wrapRouteDAccessors(e),i!==void 0){if(e.giConnect=r.connect,e.giDisconnect=r.disconnect,e.giEmit=r.emit,e.giConnect===void 0||e.giDisconnect===void 0||e.giEmit===void 0)throw Error(`Registering '${n.GTypeName}' over its NativeScript base installed no connect/disconnect/emit, so the widget would answer neither GObject nor this port. ADR 0105 refuses a silent fallback here: the subset is reachable only by calling usePureJsGObjectEngine() from '@gjsify/adwaita-core' before the port loads.`);for(let[e,t]of Object.entries(i))Object.defineProperty(r,e,{configurable:!0,writable:!0,enumerable:!1,value:t});refuseDeclaredNotifyPayload(r,r.notify)}e.routeD=!0}function refuseDeclaredNotifyPayload(e,t){let n=function notify(e,...n){if(typeof e==`object`&&e){let{eventName:t}=e;typeof t==`string`&&refuseDeclaredEvent(this,t,`notify`)}return t.call(this,e,...n)};g.add(n),Object.defineProperty(e,"notify",{configurable:!0,writable:!0,enumerable:!1,value:n})}function wrapRouteDAccessors(e){let{meta:t,prototype:n}=e;for(let[e,r]of Object.entries(t.Properties??{}))if(!(r.kind===`string`&&r.normalize===void 0))for(let i of spellingsOf(e)){let a=Object.getOwnPropertyDescriptor(n,i);if(a?.set===void 0)throw Error(`Registering '${t.GTypeName}' installed no setter for '${i}', so a string from XML would reach the GObject uncoerced. The host chain probably owns that name (see the class's \$foreignSkipped); rename the property.`);let o=a.set;Object.defineProperty(n,i,{...a,set(t){o.call(this,coerceDeclared(e,r,t,this))}})}}function installPureJsProperties(e){let{meta:t,prototype:n}=e;for(let[e,r]of Object.entries(t.Properties??{})){let t=defaultValueOf(r);for(let i of spellingsOf(e))i in n||Object.defineProperty(n,i,{configurable:!0,enumerable:!1,get(){let n=valuesOf(this);return n.has(e)||n.set(e,t),n.get(e)},set(t){let n=coerceDeclared(e,r,t,this),i=valuesOf(this);i.has(e)&&i.get(e)===n||(i.set(e,n),emitDeclared(this,`notify::${e}`,[]))}})}installPureNotify(e)}function installPureNotify(e){let{prototype:t}=e,n=t.notify;if(g.has(n))return;let r=function notify(e,...t){if(typeof e!=`string`){if(typeof e==`object`&&e){let{eventName:t}=e;typeof t==`string`&&refuseDeclaredEvent(this,t,`notify`)}return n.call(this,e,...t)}let{canonicalOf:r}=resolvedFor(this.constructor),i=r.get(e);if(i===void 0)throw TypeError(`${this.constructor.name} has no property '${e}' to notify. The declared ones are ${[...r.keys()].join(`, `)||`(none)`}; a NativeScript event is notified with its payload object, not with a name.`);emitDeclared(this,`notify::${i}`,[])};g.add(r),Object.defineProperty(t,"notify",{configurable:!0,writable:!0,enumerable:!1,value:r})}function withSignals(e,a){class WithSignals extends o(e){static emittedSignals=[...i,...declaredEmissionsOf(a)];constructor(...e){super(...e),realizeChain(new.target)}addEventListener(e,t,n,r){refuseDeclaredEvent(this,e,`addEventListener`),super.addEventListener(e,t,n,r)}removeEventListener(e,t,n){refuseDeclaredEvent(this,e,`removeEventListener`),super.removeEventListener(e,t,n)}connect(e,t){let n=resolvedFor(this.constructor),r=giKeyOf(n,e);if(n.routeD&&r!==null){let i=r.startsWith(`notify::`),a=n.giConnect.call(this,r,(n,...r)=>{let a=n;return t(n,i?{eventName:e,object:a}:{eventName:e,object:a,args:r})}),o=d.get(this);return o===void 0&&d.set(this,o=new Set),o.add(a),u+a}if(r!==null)return declaredConnect(this,r,e,t);let listener=e=>{let n=e.accumulator;if(n===void 0){t(this,e);return}n.stopped||n.collect(t(this,e))};return pureConnect(this,e,listener)}disconnect(e){if(e>=u){let t=e-u;if(d.get(this)?.delete(t)!==!0)throw unknownHandler(this,e);resolvedFor(this.constructor).giDisconnect.call(this,t);return}declaredDisconnect(this,e)||pureDisconnect(this,e)}emit(e,...t){let n=resolvedFor(this.constructor),r=giKeyOf(n,e);if(r!==null){n.routeD?n.giEmit.call(this,r,...t):emitDeclared(this,r,t);return}throw Error(`No signal '${e}' on object '${this.constructor.name}'. emit() is GObject's and takes a declared signal or a declared property's notify::<prop>; to dispatch a NativeScript event use notify({ eventName: '${e}', object: this }).`)}get_property(e){return n(this,t(e))}set_property(e,n){r(this,t(e),n)}}return declare(WithSignals,a,{connect:WithSignals.prototype.connect,disconnect:WithSignals.prototype.disconnect,emit:WithSignals.prototype.emit}),WithSignals}function withProperties(e,t){class WithProperties extends e{static emittedSignals=declaredEmissionsOf(t)}return declare(WithProperties,t,void 0),WithProperties}function valuesOf(e){let t=f.get(e);return t===void 0&&f.set(e,t=new Map),t}function defaultValueOf(e){return e.kind===`object`?null:e.default===void 0?e.kind===`string`?``:e.kind===`boolean`?!1:0:e.default}export{emittedSignalsOf,readDeclaredValue,withProperties,withSignals};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{splitButtonArrowIcon as e}from"@gjsify/adwaita-core";import{openMenuSymbolic as t}from"@gjsify/adwaita-icons/actions";import{panDownSymbolic as n,panEndSymbolic as r,panStartSymbolic as i,panUpSymbolic as a}from"@gjsify/adwaita-icons/ui";const o={"open-menu-symbolic":t,"pan-down-symbolic":n,"pan-up-symbolic":a,"pan-start-symbolic":i,"pan-end-symbolic":r};function splitButtonArrowSvg(t){return o[e(t)]}function setActionIcon(e,t){let n=t??``;n.length>0?e.setIconName(n):e.mode===`icon`&&e.setChild(null)}export{o as ARROW_SVGS,setActionIcon,splitButtonArrowSvg};
1
+ import"../_virtual/_rolldown/runtime.js";import{splitButtonArrowIcon as e}from"@gjsify/adwaita-core";import{openMenuSymbolic as t}from"@gjsify/adwaita-icons/actions";import{panDownSymbolic as n,panEndSymbolic as r,panStartSymbolic as i,panUpSymbolic as a}from"@gjsify/adwaita-icons/ui";const o={"open-menu-symbolic":t,"pan-down-symbolic":n,"pan-up-symbolic":a,"pan-start-symbolic":i,"pan-end-symbolic":r};function splitButtonArrowSvg(t){return o[e(t)]}export{o as ARROW_SVGS,splitButtonArrowSvg};
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";import{blurView as e,finishWindow as t,focusView as n,isViewFocused as r,watchBackButton as i}from"./window-source.js";import{Application as a}from"@nativescript/core";let o=null;function useWindowHost(e){o=e}const s={canFinish:!1,isForeground:()=>!0,watchForeground(e){let resume=()=>e(!0),suspend=()=>e(!1);return a.on(`resume`,resume),a.on(`suspend`,suspend),()=>{a.off(`resume`,resume),a.off(`suspend`,suspend)}},watchBack(e){return i(t=>{e()&&(t.cancel=!0)})},finish:t,isFocused:r,requestFocus:n,clearFocus:e};function windowHost(){return o??s}export{s as nativeWindowHost,useWindowHost,windowHost};
1
+ import"./_virtual/_rolldown/runtime.js";import{blurView as e,canFinishWindow as t,finishWindow as n,focusView as r,isViewFocused as i,watchBackButton as a}from"./window-source.js";import{Application as o}from"@nativescript/core";let s=null;function useWindowHost(e){s=e}const c={get canFinish(){return t()},isForeground:()=>!0,watchForeground(e){let resume=()=>e(!0),suspend=()=>e(!1);return o.on(`resume`,resume),o.on(`suspend`,suspend),()=>{o.off(`resume`,resume),o.off(`suspend`,suspend)}},watchBack(e){return a(t=>{e()&&(t.cancel=!0)})},finish:n,isFocused:i,requestFocus:r,clearFocus:e};function windowHost(){return s??c}export{c as nativeWindowHost,useWindowHost,windowHost};
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";import{Application as e}from"@nativescript/core";const t=!0,n=`activityBackPressed`;function watchBackButton(t){let r=e.android;return r?(r.on(n,t),()=>r.off(n,t)):()=>{}}function finishWindow(){let t=e.android?.foregroundActivity??e.android?.startActivity;if(!t?.finish)throw Error(`Android has no activity to finish for this window`);t.finish()}const peer=e=>e.nativeViewProtected;function isViewFocused(e){return peer(e)?.isFocused?.()===!0}function focusView(e){peer(e)?.requestFocus?.()}function blurView(e){peer(e)?.clearFocus?.()}export{blurView,t as canFinishWindow,finishWindow,focusView,isViewFocused,watchBackButton};
1
+ import"./_virtual/_rolldown/runtime.js";import{Application as e}from"@nativescript/core";function canFinishWindow(){return!0}const t=`activityBackPressed`;function watchBackButton(n){let r=e.android;return r?(r.on(t,n),()=>r.off(t,n)):()=>{}}function finishWindow(){let t=e.android?.foregroundActivity??e.android?.startActivity;if(!t?.finish)throw Error(`Android has no activity to finish for this window`);t.finish()}const peer=e=>e.nativeViewProtected;function isViewFocused(e){return peer(e)?.isFocused?.()===!0}function focusView(e){peer(e)?.requestFocus?.()}function blurView(e){peer(e)?.clearFocus?.()}export{blurView,canFinishWindow,finishWindow,focusView,isViewFocused,watchBackButton};
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";const e=!1;function finishWindow(){throw Error(`iOS has no public API for an app to close its own window`)}const peer=e=>e.nativeViewProtected;function isViewFocused(e){return peer(e)?.isFirstResponder===!0}function focusView(e){peer(e)?.becomeFirstResponder?.()}function blurView(e){peer(e)?.resignFirstResponder?.()}function watchBackButton(e){return()=>{}}export{blurView,e as canFinishWindow,finishWindow,focusView,isViewFocused,watchBackButton};
1
+ import"./_virtual/_rolldown/runtime.js";function canFinishWindow(){return!1}function finishWindow(){throw Error(`iOS has no public API for an app to close its own window`)}const peer=e=>e.nativeViewProtected;function isViewFocused(e){return peer(e)?.isFirstResponder===!0}function focusView(e){peer(e)?.becomeFirstResponder?.()}function blurView(e){peer(e)?.resignFirstResponder?.()}function watchBackButton(e){return()=>{}}export{blurView,canFinishWindow,finishWindow,focusView,isViewFocused,watchBackButton};
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";const e=!1;function finishWindow(){throw Error(`there is no platform window to close on this host`)}function isViewFocused(e){throw Error(`there is no platform focus to read on this host`)}function focusView(e){throw Error(`there is no platform focus to move on this host`)}function blurView(e){throw Error(`there is no platform focus to clear on this host`)}function watchBackButton(e){return()=>{}}export{blurView,e as canFinishWindow,finishWindow,focusView,isViewFocused,watchBackButton};
1
+ import"./_virtual/_rolldown/runtime.js";function canFinishWindow(){return!1}function finishWindow(){throw Error(`there is no platform window to close on this host`)}function isViewFocused(e){throw Error(`there is no platform focus to read on this host`)}function focusView(e){throw Error(`there is no platform focus to move on this host`)}function blurView(e){throw Error(`there is no platform focus to clear on this host`)}function watchBackButton(e){return()=>{}}export{blurView,canFinishWindow,finishWindow,focusView,isViewFocused,watchBackButton};
@@ -158,8 +158,11 @@ export declare function buildWithSiblings(node: SharedTreeNode, options?: BuildO
158
158
  * `root`, whose class has to be the one the root names (or a subclass of it): a template of an
159
159
  * `Adw.Bin` built into a `Gtk.Box` would be a different widget wearing the wrong tree. The ids of
160
160
  * the tree stay reachable through `root.getViewById`, and the returned map holds every object the
161
- * tree names by id (what `InternalChildren` installs). A tree with siblings is refused, as it is
162
- * by {@link build}.
161
+ * tree names by id (what `InternalChildren` installs). The objects written beside the template in
162
+ * the same file (`Adw.AlertDialog dialog { }`) are built in that id scope and are in the map too,
163
+ * as `gtk_widget_class_bind_template_child` reaches any object id of the template's builder; they
164
+ * are no children of `root`. A value object's id (a dialog, a `Gtk.StackPage`) is reachable here
165
+ * for the same reason.
163
166
  */
164
167
  export declare function buildInto(root: View, node: SharedTreeNode, options?: BuildOptions): ReadonlyMap<string, object>;
165
168
  /**
@@ -0,0 +1 @@
1
+ export declare const AdwButtonContentPropertiesNsTest: () => Promise<void>;
@@ -1,5 +1,5 @@
1
1
  export { assertNativeScript, isNativeScript, isAndroid, isIOS } from '@gjsify/native-platform';
2
- export { NOTIFY_ACTIVE, NOTIFY_TEXT, NOTIFY_TEXT_LENGTH, NOTIFY_MAX_LENGTH, NOTIFY_EDITABLE, NOTIFY_SHOW_APPLY_BUTTON, NOTIFY_ACTIVATES_DEFAULT, SIGNAL_APPLY, SIGNAL_ENTRY_ACTIVATED, ENTRY_ACTIVATE, NOTIFY_ENTRY_TEXT, ComboState, NOTIFY_SELECTED, NOTIFY_DROP_DOWN_SELECTED, SpinState, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, NOTIFY_EXPANDED, NOTIFY_ENABLE_EXPANSION, NOTIFY_SHOW_ENABLE_SWITCH, NS_EXPANDER_ARROW_DISABLED_OPACITY, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, MENU_ITEM_ACTIVATED, DEFAULT_GTK_IMAGE_SIZE, DEFAULT_BOX_SPACING, GTK_BUTTON_CLICKED, GTK_BUTTON_LABEL_CLASS, buttonSlotAfterWrite, buttonSlotDetaches, boxChildTrack, boxTrackPlan, boxSpacingChanges, normalizeBoxSpacing, NOTIFY_REVEAL_CHILD, ADW_DIALOG_CLOSED, ADW_DIALOG_CLOSE_ATTEMPT, LIST_BOX_ROW_ACTIVATED, LIST_BOX_ROW_SELECTED, NOTIFY_HEXPAND, NOTIFY_VEXPAND, withGtkWidgetLayout, NOTIFY_STACK_VISIBLE_CHILD, NOTIFY_STACK_VISIBLE_CHILD_NAME, DRAWING_AREA_REFUSAL, GTK_CHECK_BUTTON_TOGGLED, GTK_CHECK_BUTTON_ACTIVATE, GTK_CHECK_BUTTON_CHECKED_CLASS, GTK_CHECK_BUTTON_INCONSISTENT_CLASS, NOTIFY_CHECK_ACTIVE, GTK_WRAP_MODES, NOTIFY_TEXT_VIEW_TEXT, GTK_TOGGLE_BUTTON_CHECKED_CLASS, GTK_TOGGLE_BUTTON_TOGGLED, NOTIFY_TOGGLE_ACTIVE, labelDisplayText, labelMarkupIsUnparseable, BUTTON_CLICKED, AVATAR_DEFAULT_ICON, DEFAULT_AVATAR_SIZE, avatarInitials, DEFAULT_CLAMP_MAX_SIZE, padForSystemInsets, padSheetForSystemInsets, bottomSheetPanel, AdwDataGrid, ROW_ACTIVATED, dataGridCellClass, dataGridItemSpec, dataGridRowClass, dataGridShapeKey, dataGridTracksKey, parseDataGridWidth, DATA_GRID_HEADER_CELL_CLASS, DATA_GRID_HEADER_ROW_CLASS, DATA_GRID_SECTION_CELL_CLASS, DEFAULT_SPINNER_SIZE, ACTIVATED, CLICKED, MENU_TAPPED, ToggleGroupState, NOTIFY_TOGGLE_SELECTED, applyAdwaitaNsAccent, clearAdwaitaNsAccent, ADWAITA_NS_ACCENT_RULES, adwaitaNsAccentColor, adwaitaNsAccentCss, SHORTCUT_LABEL_CAP_TEXT_CLASS, SHORTCUT_LABEL_CLASS, SHORTCUT_LABEL_DIMMED_CLASS, SHORTCUT_LABEL_DISABLED_CLASS, SHORTCUT_LABEL_KEYCAP_CLASS, SHORTCUT_LABEL_KEYS_CLASS, SHORTCUT_LABEL_SIDE_CLASS, SHORTCUT_LABEL_SPACED_CLASS, shortcutLabelDirection, shortcutLabelPlatform, shortcutLabelRenderPlan, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, DEFAULT_CAROUSEL_PAGE_WIDTH, NOTIFY_POSITION, NOTIFY_VISIBLE_PAGE, AdwSplitViewBase, NOTIFY_SHOW_SIDEBAR, NsNavigationSplitViewState, NsOverlaySplitViewState, splitViewColumns, NOTIFY_SIDEBAR_SELECTED, NOTIFY_OPEN, AdwToast, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, AdwAlertResponses, ABOUT_CLOSED, PREFERENCES_CLOSED, applyConstructProps, nsAlignment, GTK_ALIGN, DEFAULT_ICON_PIXEL_SIZE, GTK_ICON_SIZE_NICKS, GTK_ICON_SIZE_PIXELS, type GtkIconSizeNick, isGtkIconSizeNick, PIXEL_SIZE_UNSET, activateWidgetAction, findActionGroup, insertActionGroup, attachRowPressFeedback, ICON_FALLBACK_NAME, compiledIconNames, iconValueKind, isIconAvailable, resolveIconSource, renderSymbolicIcon, extractIconPaths, extractPathData, ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, observeViewSize, observeWindowSize, parseBreakpointCondition, registerAdwaitaElements, } from './widgets/index.js';
2
+ export { NOTIFY_ACTIVE, NOTIFY_TEXT, NOTIFY_TEXT_LENGTH, NOTIFY_MAX_LENGTH, NOTIFY_EDITABLE, NOTIFY_SHOW_APPLY_BUTTON, NOTIFY_ACTIVATES_DEFAULT, SIGNAL_APPLY, SIGNAL_ENTRY_ACTIVATED, ENTRY_ACTIVATE, NOTIFY_ENTRY_TEXT, ComboState, NOTIFY_SELECTED, NOTIFY_DROP_DOWN_SELECTED, SpinState, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, NOTIFY_EXPANDED, NOTIFY_ENABLE_EXPANSION, NOTIFY_SHOW_ENABLE_SWITCH, NS_EXPANDER_ARROW_DISABLED_OPACITY, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, MENU_ITEM_ACTIVATED, DEFAULT_GTK_IMAGE_SIZE, DEFAULT_BOX_SPACING, GTK_BUTTON_CLICKED, GTK_BUTTON_LABEL_CLASS, buttonSlotAfterWrite, buttonSlotDetaches, boxChildTrack, boxTrackPlan, boxSpacingChanges, normalizeBoxSpacing, NOTIFY_REVEAL_CHILD, ADW_DIALOG_CLOSED, ADW_DIALOG_CLOSE_ATTEMPT, LIST_BOX_ROW_ACTIVATED, LIST_BOX_ROW_SELECTED, NOTIFY_HEXPAND, NOTIFY_VEXPAND, withGtkWidgetLayout, NOTIFY_STACK_VISIBLE_CHILD, NOTIFY_STACK_VISIBLE_CHILD_NAME, DRAWING_AREA_REFUSAL, GTK_CHECK_BUTTON_TOGGLED, GTK_CHECK_BUTTON_ACTIVATE, GTK_CHECK_BUTTON_CHECKED_CLASS, GTK_CHECK_BUTTON_INCONSISTENT_CLASS, NOTIFY_CHECK_ACTIVE, GTK_WRAP_MODES, NOTIFY_TEXT_VIEW_TEXT, GTK_TOGGLE_BUTTON_CHECKED_CLASS, GTK_TOGGLE_BUTTON_TOGGLED, NOTIFY_TOGGLE_ACTIVE, labelDisplayText, labelMarkupIsUnparseable, BUTTON_CLICKED, AVATAR_DEFAULT_ICON, DEFAULT_AVATAR_SIZE, avatarInitials, DEFAULT_CLAMP_MAX_SIZE, padForSystemInsets, padSheetForSystemInsets, bottomSheetPanel, AdwDataGrid, ROW_ACTIVATED, dataGridCellClass, dataGridItemSpec, dataGridRowClass, dataGridShapeKey, dataGridTracksKey, parseDataGridWidth, DATA_GRID_HEADER_CELL_CLASS, DATA_GRID_HEADER_ROW_CLASS, DATA_GRID_SECTION_CELL_CLASS, DEFAULT_SPINNER_SIZE, ACTIVATED, MENU_TAPPED, ToggleGroupState, NOTIFY_TOGGLE_SELECTED, applyAdwaitaNsAccent, clearAdwaitaNsAccent, ADWAITA_NS_ACCENT_RULES, adwaitaNsAccentColor, adwaitaNsAccentCss, SHORTCUT_LABEL_CAP_TEXT_CLASS, SHORTCUT_LABEL_CLASS, SHORTCUT_LABEL_DIMMED_CLASS, SHORTCUT_LABEL_DISABLED_CLASS, SHORTCUT_LABEL_KEYCAP_CLASS, SHORTCUT_LABEL_KEYS_CLASS, SHORTCUT_LABEL_SIDE_CLASS, SHORTCUT_LABEL_SPACED_CLASS, shortcutLabelDirection, shortcutLabelPlatform, shortcutLabelRenderPlan, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, DEFAULT_CAROUSEL_PAGE_WIDTH, NOTIFY_POSITION, NOTIFY_VISIBLE_PAGE, AdwSplitViewBase, NOTIFY_SHOW_SIDEBAR, NsNavigationSplitViewState, NsOverlaySplitViewState, splitViewColumns, NOTIFY_SIDEBAR_SELECTED, NOTIFY_OPEN, AdwToast, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, AdwAlertResponses, ABOUT_CLOSED, PREFERENCES_CLOSED, applyConstructProps, nsAlignment, GTK_ALIGN, DEFAULT_ICON_PIXEL_SIZE, GTK_ICON_SIZE_NICKS, GTK_ICON_SIZE_PIXELS, type GtkIconSizeNick, isGtkIconSizeNick, PIXEL_SIZE_UNSET, activateWidgetAction, findActionGroup, insertActionGroup, attachRowPressFeedback, ICON_FALLBACK_NAME, compiledIconNames, iconValueKind, isIconAvailable, resolveIconSource, renderSymbolicIcon, extractIconPaths, extractPathData, ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, observeViewSize, observeWindowSize, parseBreakpointCondition, registerAdwaitaElements, } from './widgets/index.js';
3
3
  export type { BoxOrientation, ButtonSlot, ButtonSlotWrite, NotifyEntryTextEventData, AdwComboOption, ComboStateChange, ComboStateListener, NotifySelectedEventData, NotifyDropDownSelectedEventData, NotifyValueEventData, SpinStateChange, SpinStateListener, NotifySliderValueEventData, MenuItemActivatedEventData, MenuTappedEventData, RowActivatedEventData, DataGridItemSpec, NotifyToggleSelectedEventData, ToggleGroupStateChange, ToggleGroupStateListener, AccentRole, AccentRule, ShortcutLabelRenderPlan, ShortcutLabelViewSpec, AdwViewStackPageInfo, NotifyVisibleChildEventData, AdwViewPage, NotifyViewSelectedEventData, NotifyPositionEventData, NotifyVisiblePageEventData, NotifyShowSidebarEventData, NsShowSidebarNotification, NsSplitViewHost, NsSplitViewState, NotifySidebarSelectedEventData, NotifyOpenEventData, AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, OrderedConfirmResponses, ConstructProps, SystemInsetEdges, IconValueKind, SymbolicIconOptions, IconPath, AdwColorScheme, AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './widgets/index.js';
4
4
  export type { GtkWidgetLayout, GtkWidgetLayoutMembers } from './widgets/widget-layout.js';
5
5
  export * as Adw from './namespace/adw.js';
@@ -8,4 +8,4 @@ export declare const ContentProvider: Pick<typeof import("@gjsify/adwaita-core")
8
8
  export declare const ContentFormats: typeof import("@gjsify/adwaita-core").ContentFormats;
9
9
  export declare const AppLaunchContext: typeof import("@gjsify/adwaita-core").GdkAppLaunchContext;
10
10
  export declare const CURRENT_TIME = 0;
11
- export declare const KEY_space: 32, KEY_a: 97, KEY_d: 100, KEY_e: 101, KEY_q: 113, KEY_s: 115, KEY_w: 119, KEY_Return: 65293, KEY_Escape: 65307, KEY_Left: 65361, KEY_Up: 65362, KEY_Right: 65363, KEY_Down: 65364;
11
+ export declare const KEY_space: 32, KEY_a: 97, KEY_d: 100, KEY_e: 101, KEY_q: 113, KEY_s: 115, KEY_w: 119, KEY_Return: 65293, KEY_Escape: 65307, KEY_Left: 65361, KEY_Up: 65362, KEY_Right: 65363, KEY_Down: 65364, KEY_Back: 269025062;
@@ -1,5 +1,6 @@
1
1
  import '../file-chooser-host.js';
2
2
  export { GioMenu as Menu, GioMenuItem as MenuItem } from '@gjsify/adwaita-core';
3
+ export { ListModel } from '@gjsify/adwaita-core';
3
4
  export { GioFile as File, GioListStore as ListStore, GioOutputStream as OutputStream, GioFileOutputStream as FileOutputStream, FileCreateFlags, IOErrorEnum, promisify as _promisify, } from '@gjsify/adwaita-core';
4
5
  export { SimpleAction, SimpleActionGroup } from '../widgets/actions.js';
5
6
  export { ApplicationFlags } from '@gjsify/adwaita-core';
@@ -24,7 +24,7 @@ export type { WindowCommon } from '@gjsify/adwaita-core';
24
24
  export { GtkSeparator as Separator } from '../widgets/gtk-separator.js';
25
25
  export { GtkStack as Stack } from '../widgets/gtk-stack.js';
26
26
  export { GtkStackPage as StackPage } from '../widgets/stack-page.js';
27
- export { GtkStringList as StringList } from '@gjsify/adwaita-core';
27
+ export { GtkStringList as StringList, GtkStringObject as StringObject } from '@gjsify/adwaita-core';
28
28
  export { GtkTextView as TextView } from '../widgets/gtk-text-view.js';
29
29
  export { GtkToggleButton as ToggleButton } from '../widgets/gtk-toggle-button.js';
30
30
  export { ApplicationInhibitFlags } from '@gjsify/adwaita-core';
@@ -0,0 +1 @@
1
+ export declare const AdwSplitButtonPropertiesNsTest: () => Promise<void>;
@@ -2,6 +2,14 @@ import { Label, StackLayout, type View } from '@nativescript/core';
2
2
  import type { ButtonContentEllipsize } from '@gjsify/adwaita-core';
3
3
  import { GtkImage } from './gtk-image.js';
4
4
  import { type ConstructProps } from './construct-props.js';
5
+ /** Event name emitted when {@link AdwButtonContent.iconName} changes. Mirrors GObject `notify::icon-name`. */
6
+ export declare const NOTIFY_BUTTON_CONTENT_ICON_NAME = "notify::icon-name";
7
+ /** Event name emitted when {@link AdwButtonContent.label} changes. */
8
+ export declare const NOTIFY_BUTTON_CONTENT_LABEL = "notify::label";
9
+ /** Event name emitted when {@link AdwButtonContent.useUnderline} changes. */
10
+ export declare const NOTIFY_BUTTON_CONTENT_USE_UNDERLINE = "notify::use-underline";
11
+ /** Event name emitted when {@link AdwButtonContent.canShrink} changes. */
12
+ export declare const NOTIFY_BUTTON_CONTENT_CAN_SHRINK = "notify::can-shrink";
5
13
  declare const AdwButtonContent_base: ((abstract new (...args: any[]) => {
6
14
  addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
7
15
  removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
@@ -73,7 +81,6 @@ export declare class AdwButtonContent extends AdwButtonContent_base {
73
81
  protected readonly _icon: GtkImage;
74
82
  /** The text label. */
75
83
  protected readonly _label: Label;
76
- private readonly _props;
77
84
  private _hostButton;
78
85
  constructor(props?: ConstructProps<AdwButtonContent>);
79
86
  /**
@@ -83,6 +90,12 @@ export declare class AdwButtonContent extends AdwButtonContent_base {
83
90
  * Setting it adds `image-text-button` (:115); clearing it, or replacing it,
84
91
  * removes the class from the previous host first (:126), so a button that
85
92
  * loses its content goes back to plain-button padding.
93
+ *
94
+ * NATIVESCRIPT-ONLY, and deliberately NOT a declared property: `Adw.ButtonContent` has no
95
+ * `host-button` — C finds its button through `gtk_widget_get_ancestor`, so GJS has nothing
96
+ * to match. The value is a `View`, which is not a GObject, so no ParamSpec could hold it
97
+ * either. It is a plain accessor on both legs: equal writes (identity) are ignored and
98
+ * nothing emits `notify::host-button`.
86
99
  */
87
100
  get hostButton(): View | null;
88
101
  set hostButton(view: View | null);
@@ -94,22 +107,16 @@ export declare class AdwButtonContent extends AdwButtonContent_base {
94
107
  * the C sets that fallback (:355-356) and never hides `self->icon`. The doc
95
108
  * comments at :228/:343 say otherwise — see `buttonContentIcon`.
96
109
  */
97
- get iconName(): string;
98
- set iconName(svg: string);
110
+ iconName: string;
99
111
  /** Whether the icon currently shown is the empty-slot fallback. */
100
112
  get iconIsFallback(): boolean;
101
113
  /** The icon fill colour (hex). Set to the button's foreground (e.g. white on suggested-action). */
102
114
  get iconColor(): string;
103
115
  set iconColor(value: string);
104
116
  /** The button content text. Empty collapses the label view (:398). */
105
- get label(): string;
106
- set label(value: string);
107
- /**
108
- * Whether an underline in {@link label} marks a mnemonic (:431-445).
109
- * Defaults to FALSE (:253-256), so an underscore is a literal unless asked.
110
- */
111
- get useUnderline(): boolean;
112
- set useUnderline(raw: boolean | string);
117
+ label: string;
118
+ /** Whether an underline in {@link label} marks a mnemonic (:431-445). */
119
+ useUnderline: boolean;
113
120
  /**
114
121
  * Whether the label may be smaller than its natural size (:489-491).
115
122
  *
@@ -118,10 +125,11 @@ export declare class AdwButtonContent extends AdwButtonContent_base {
118
125
  * {@link ellipsize}, and reflected as a `can-shrink` class for the theme —
119
126
  * but the truncation ellipsis is not available on this platform.
120
127
  */
121
- get canShrink(): boolean;
122
- set canShrink(raw: boolean | string);
128
+ canShrink: boolean;
123
129
  /** The label's `PangoEllipsizeMode` for the current `canShrink` (:462). */
124
130
  get ellipsize(): ButtonContentEllipsize;
131
+ private _applyIcon;
132
+ private _applyCanShrink;
125
133
  private _renderLabel;
126
134
  }
127
135
  export {};
@@ -1,5 +1,5 @@
1
1
  import { Label, type EventData, type View } from '@nativescript/core';
2
- import type { AdwComboOption, AdwListModelInput } from '@gjsify/adwaita-core';
2
+ import type { AdwComboOption, ComboWatchableModel } from '@gjsify/adwaita-core';
3
3
  import { AdwActionRow } from './adw-action-row.js';
4
4
  import { GtkImage } from './gtk-image.js';
5
5
  import { type ConstructProps } from './construct-props.js';
@@ -27,6 +27,13 @@ export declare class AdwComboRow extends AdwActionRow {
27
27
  protected readonly _chevron: GtkImage;
28
28
  /** The headless options list + selectedIndex↔selectedValue state machine (ADR 0004). */
29
29
  private readonly _state;
30
+ /**
31
+ * The list the MARKUP door fills — `<adw:ComboRow model='[…]'>` is JSON text, and a real
32
+ * `Gio.ListModel` has no attribute spelling (ADR 0122 § 5). Held for the row's whole life so
33
+ * re-parsing the attribute splices the list the row already points at rather than replacing
34
+ * it, which would reset the selection.
35
+ */
36
+ private readonly _authored;
30
37
  /**
31
38
  * A `selected` written while the row has no model yet. NativeScript's XML builder assigns
32
39
  * every attribute before it adds the children, so `<adw:ComboRow selected="1">` reaches
@@ -47,15 +54,23 @@ export declare class AdwComboRow extends AdwActionRow {
47
54
  private _syncChooser;
48
55
  /** Open the native action chooser and apply the picked option. */
49
56
  private _openChooser;
50
- /** The list model (`Adw.ComboRow:model`). Updates the inline value label. */
51
- get model(): AdwComboOption[];
52
- set model(value: AdwListModelInput);
57
+ /**
58
+ * The list model (`Adw.ComboRow:model`) — the OBJECT that was assigned, by identity, as
59
+ * `row.model === model` is measured to hold in libadwaita (ADR 0122 § 4). The normalised
60
+ * descriptors are {@link options}.
61
+ */
62
+ get model(): ComboWatchableModel | null;
63
+ set model(value: ComboWatchableModel | string | null);
64
+ /** The held model's items as `{ value, label }` descriptors. */
65
+ get options(): AdwComboOption[];
53
66
  /** `adw_combo_row_set_model`. */
54
- set_model(model: AdwListModelInput | null): void;
67
+ set_model(model: ComboWatchableModel | null): void;
68
+ /** `adw_combo_row_get_model`. */
69
+ get_model(): ComboWatchableModel | null;
55
70
  /**
56
- * XML inflation: a child at `model` is the row's list — a `Gtk.StringList` is already an
57
- * `AdwListModelInput`, so it goes through the same setter as the property. Everything
58
- * else is a row edge, as on any action row.
71
+ * XML inflation: a child at `model` is the row's list — a `Gtk.StringList` IS a
72
+ * `Gio.ListModel`, so it goes through the same setter as the property. Everything else is a
73
+ * row edge, as on any action row.
59
74
  */
60
75
  _addChildFromBuilder(name: string, child: View): void;
61
76
  /** The selected option index. Updates the inline value label. */
@@ -66,4 +81,13 @@ export declare class AdwComboRow extends AdwActionRow {
66
81
  /** The selected option's `value`, or `''` when out of range. */
67
82
  get selectedValue(): string;
68
83
  set selectedValue(value: string);
84
+ /**
85
+ * The selected ITEM (`Adw.ComboRow:selected-item`) — the model's own object at
86
+ * {@link selected}, read through `get_item`, so the identity comparison a `selected-item`
87
+ * consumer writes holds. `null` for the sentinel and for no model. Read-only, as in
88
+ * libadwaita.
89
+ */
90
+ get selectedItem(): unknown;
91
+ /** `adw_combo_row_get_selected_item`. */
92
+ get_selected_item(): unknown;
69
93
  }
@@ -2,8 +2,7 @@ import { GridLayout, Label, StackLayout, type EventData } from '@nativescript/co
2
2
  import type { AdwMenuActions, AdwMenuInput, AdwMenuModel, SplitButtonDirection } from '@gjsify/adwaita-core';
3
3
  import { GtkImage } from './gtk-image.js';
4
4
  import { type ConstructProps } from './construct-props.js';
5
- /** Event name emitted when the main action part is tapped. Mirrors `Adw.SplitButton::clicked`. */
6
- export declare const CLICKED = "clicked";
5
+ import { type GObjectNotify } from './signals.js';
7
6
  /** Emitted when {@link AdwSplitButton.set_direction} moves the arrow. */
8
7
  export declare const NOTIFY_DIRECTION = "notify::direction";
9
8
  /** Event name emitted when a dropdown menu item is chosen. */
@@ -91,6 +90,26 @@ declare const AdwSplitButton_base: ((abstract new (...args: any[]) => {
91
90
  export declare class AdwSplitButton extends AdwSplitButton_base {
92
91
  static readonly GTypeName: string;
93
92
  static readonly emittedSignals: readonly string[];
93
+ notify: GObjectNotify;
94
+ /** The main button's text, or `null` while an icon fills the action half. */
95
+ label: string | null;
96
+ /**
97
+ * The action half's icon — an icon theme NAME or a symbolic SVG source, which `GtkImage`
98
+ * resolves alike. Setting one clears {@link label}; `''` reads back `null`.
99
+ */
100
+ iconName: string | null;
101
+ /** Whether an underline in {@link label} marks a mnemonic. */
102
+ useUnderline: boolean;
103
+ /**
104
+ * Whether the label can be smaller than its natural size. FIDELITY GAP: GTK ellipsizes, and the
105
+ * NS CSS subset has no ellipsize, so it is held and reflected as a `can-shrink` class only.
106
+ */
107
+ canShrink: boolean;
108
+ /**
109
+ * The dropdown tooltip as set — `''` while unset. Resolve it through `resolveDropdownTooltip()`
110
+ * for what should be shown; a PopupMenu has no tooltip surface, so this is carried for parity.
111
+ */
112
+ dropdownTooltip: string;
94
113
  /** The main action part (column 0). */
95
114
  protected readonly _actionPart: StackLayout;
96
115
  /** The action label (shown in label mode). */
@@ -115,6 +134,8 @@ export declare class AdwSplitButton extends AdwSplitButton_base {
115
134
  * state to contradict it. One polarity, so there is nothing to forget.
116
135
  */
117
136
  private _sensitive;
137
+ /** See {@link SplitButtonContent._contentGate}. One write's argument, not state. */
138
+ private _contentGate;
118
139
  constructor(props?: ConstructProps<AdwSplitButton, {
119
140
  direction: number | SplitButtonDirection;
120
141
  }>);
@@ -125,24 +146,12 @@ export declare class AdwSplitButton extends AdwSplitButton_base {
125
146
  * is disabled" (adw-split-button.c:376-378).
126
147
  */
127
148
  private _openMenu;
128
- /** Repaint both halves from the state machine. */
149
+ /** A click on the action half: nothing while insensitive, else one `clicked`. */
150
+ private _click;
151
+ /** Repaint the action half from the declared content properties. */
152
+ private _renderContent;
153
+ /** Repaint the dropdown half and the dimming from the state machine. */
129
154
  private _render;
130
- /**
131
- * The main action button's text label, or `''` when the action half shows an
132
- * icon or nothing — never the stale value behind a swapped-out view.
133
- */
134
- get label(): string;
135
- set label(value: string);
136
- /**
137
- * A symbolic SVG for the action part (e.g. `documentSaveSymbolic`). Setting
138
- * one replaces the label, clearing it returns the action half to its label —
139
- * the mutual exclusion `Adw.SplitButton` enforces (adw-split-button.c:749-771).
140
- *
141
- * The SVG string IS the icon identity here, so it is what the state machine
142
- * stores as the icon name; NS resolves no icon theme.
143
- */
144
- get iconName(): string;
145
- set iconName(svg: string);
146
155
  /**
147
156
  * The dropdown menu, normalised (ADR 0042) — opened as a `PopupMenu` on an
148
157
  * arrow tap.
@@ -190,16 +199,6 @@ export declare class AdwSplitButton extends AdwSplitButton_base {
190
199
  * Emits `notify::direction` when the arrow moves.
191
200
  */
192
201
  set_direction(direction: number): void;
193
- /**
194
- * The dropdown tooltip as set — `''` while unset. Resolve it through
195
- * `resolveDropdownTooltip()` for what should be shown; a PopupMenu has no
196
- * tooltip surface, so this is carried for parity and for host bindings.
197
- */
198
- get dropdownTooltip(): string;
199
- set dropdownTooltip(value: string);
200
- /** Whether an underline in the label marks a mnemonic. */
201
- get useUnderline(): boolean;
202
- set useUnderline(raw: boolean | string);
203
202
  /**
204
203
  * Whether the control is sensitive — `GtkWidget:sensitive`, so `false` is the
205
204
  * insensitive state: dimmed, and emitting neither signal.
@@ -1,4 +1,4 @@
1
- import type { AdwAdjustmentInput, AdwListModelInput } from '@gjsify/adwaita-core';
1
+ import type { AdwAdjustmentInput } from '@gjsify/adwaita-core';
2
2
  import { type ShadowedName } from './shadowed-properties.js';
3
3
  /**
4
4
  * The keys a widget's construct-props bag accepts, derived from the widget itself.
@@ -33,31 +33,37 @@ export type WithSnakeCase<Props> = Props & {
33
33
  [K in keyof Props as K extends string ? SnakeCase<K> : K]: Props[K];
34
34
  };
35
35
  /**
36
- * The two properties whose SETTER takes a portable VALUE the getter does not hand back, and
37
- * what each one accepts.
36
+ * The two properties whose SETTER takes a value the getter does not hand back, and what each
37
+ * one accepts BEYOND its getter's type.
38
38
  *
39
39
  * THE GETTER TYPE IS NOT THE WHOLE DOOR HERE, and the difference is not an XML artifact like
40
- * `size`'s `| string`. `set model` takes `AdwListModelInput` — bare strings included, which
41
- * is `Gtk.StringList`'s own model and what `Gtk.StringList` itself is — and hands back
42
- * normalised `AdwComboOption`s; `set adjustment` takes a PARTIAL and hands back a whole one,
43
- * which is what makes `adjustment: { upper: 20 }` move one bound. Read off the getter alone,
44
- * the bag refused both — `new Adw.ComboRow({ model: ['Blue', 'Teal'] })` and
45
- * `new Adw.SpinRow({ adjustment: { lower: 0, upper: 100 } })` are the spellings the website
46
- * gallery has published on every such block, and every one of them was `TS2322` while the
47
- * runtime took it: `applyConstructProps` assigns through the setter, so nothing could fail.
40
+ * `size`'s `| string`. `set adjustment` takes a PARTIAL and hands back a whole one, which is
41
+ * what makes `adjustment: { upper: 20 }` move one bound. Read off the getter alone, the bag
42
+ * refused `new Adw.SpinRow({ adjustment: { lower: 0, upper: 100 } })` — a spelling the website
43
+ * gallery has published on every such block — with `TS2322` while the runtime took it:
44
+ * `applyConstructProps` assigns through the setter, so nothing could fail.
45
+ *
46
+ * `model` IS NARROWER THAN IT WAS, and the narrowing is the point. It used to widen to
47
+ * `AdwListModelInput`, arrays included, which was right while a `Gtk.StringList` WAS an array;
48
+ * since ADR 0122 § 4 `model` is an object property over `Gio.ListModel`, so
49
+ * `new Adw.ComboRow({ model: ['Blue', 'Teal'] })` is a `TypeError` at runtime and has to be one
50
+ * at compile time too — a bag that still admitted it would only move the failure to the first
51
+ * person who ran it. What is left to widen is the STRING: `model='[…]'` is the XML attribute's
52
+ * JSON door, which a `Gio.ListModel` has no attribute spelling for, and the getter hands back a
53
+ * model rather than the string it parsed.
48
54
  *
49
55
  * TWO KEY NAMES AND FOUR ACCESSORS: `model` on `AdwComboRow` and `GtkDropDown`, `adjustment`
50
56
  * on `AdwSpinRow` and `AdwSliderRow`, each pair declaring the same input type as the other.
51
57
  * Keyed by NAME like {@link ALIGNMENT_AXES}, because a widget that grows one of these
52
58
  * properties grows it with that meaning or the vocabulary gate refuses the name.
53
59
  *
54
- * It is held by `gtk-value-doors.spec.ts`, which writes all four spellings — array, a
55
- * `Gtk.StringList`, an object literal and a `Gtk.Adjustment` — through this door and is
56
- * type-checked with the rest of the package, so narrowing this table stops that file
57
- * compiling.
60
+ * It is held by `gtk-value-doors.spec.ts`, which writes every accepted spelling — a
61
+ * `Gtk.StringList`, an object literal and a `Gtk.Adjustment` — through this door and asserts
62
+ * the array as the refusal it became, and is type-checked with the rest of the package, so
63
+ * narrowing this table further stops that file compiling.
58
64
  */
59
65
  export interface ValueProps {
60
- model: AdwListModelInput;
66
+ model: string;
61
67
  adjustment: AdwAdjustmentInput;
62
68
  }
63
69
  /** The keys {@link ValueProps} declares — {@link ConstructProps} widens exactly these. */
@@ -1,5 +1,5 @@
1
1
  import { Label, StackLayout, type EventData, type View } from '@nativescript/core';
2
- import type { AdwComboOption, AdwListModelInput } from '@gjsify/adwaita-core';
2
+ import type { AdwComboOption, ComboWatchableModel } from '@gjsify/adwaita-core';
3
3
  import { GtkImage } from './gtk-image.js';
4
4
  import { type ConstructProps } from './construct-props.js';
5
5
  /** Event name emitted when {@link GtkDropDown.selected} changes through a pick. Mirrors GObject `notify::selected`. */
@@ -95,14 +95,31 @@ export declare class GtkDropDown extends GtkDropDown_base {
95
95
  protected readonly _chevron: GtkImage;
96
96
  /** The headless options list + selectedIndex↔selectedValue state machine (ADR 0004). */
97
97
  private readonly _state;
98
+ /**
99
+ * The list the MARKUP door fills — `<gtk:DropDown model='[…]'>` is JSON text, and a real
100
+ * `Gio.ListModel` has no attribute spelling (ADR 0122 § 5). Held for the widget's whole life
101
+ * so re-parsing the attribute splices the list it already points at rather than replacing
102
+ * it, which would reset the selection.
103
+ */
104
+ private readonly _authored;
98
105
  /** Title shown atop the substituted `action()` sheet. */
99
106
  private _chooserTitle;
100
107
  constructor(props?: ConstructProps<GtkDropDown>);
101
108
  /** Open the native chooser and apply the picked option. */
102
109
  private _openChooser;
103
- /** The list model (`Gtk.DropDown:model`). Updates the button label. */
104
- get model(): AdwComboOption[];
105
- set model(value: AdwListModelInput);
110
+ /**
111
+ * The list model (`Gtk.DropDown:model`) — the OBJECT that was assigned, by identity, as
112
+ * `dropdown.model === model` is measured to hold in GTK (ADR 0122 § 4). The normalised
113
+ * descriptors are {@link options}.
114
+ */
115
+ get model(): ComboWatchableModel | null;
116
+ set model(value: ComboWatchableModel | string | null);
117
+ /** The held model's items as `{ value, label }` descriptors. */
118
+ get options(): AdwComboOption[];
119
+ /** `gtk_drop_down_set_model`. */
120
+ set_model(model: ComboWatchableModel | null): void;
121
+ /** `gtk_drop_down_get_model`. */
122
+ get_model(): ComboWatchableModel | null;
106
123
  /**
107
124
  * XML inflation: a child at `model` is the list, written through the property's setter.
108
125
  * Anything else is refused, as GTK refuses a child widget on a `GtkDropDown`.
@@ -118,8 +135,14 @@ export declare class GtkDropDown extends GtkDropDown_base {
118
135
  /** The selected option's `value`, or `''` when out of range. */
119
136
  get selectedValue(): string;
120
137
  set selectedValue(value: string);
121
- /** The selected option descriptor, or `null` when out of range (`Gtk.DropDown:selected-item`). */
122
- get selectedItem(): AdwComboOption | null;
138
+ /**
139
+ * The selected ITEM (`Gtk.DropDown:selected-item`) — the model's own object at
140
+ * {@link selected}, read through `get_item`, so the identity comparison a `selected-item`
141
+ * consumer writes holds. `null` for the sentinel and for no model. Read-only, as in GTK.
142
+ */
143
+ get selectedItem(): unknown;
144
+ /** `gtk_drop_down_get_selected_item`. */
145
+ get_selected_item(): unknown;
123
146
  /**
124
147
  * Optional title shown atop the chooser sheet. A SUBSTITUTION affordance:
125
148
  * GTK's popover has no title, but a bare native sheet gives no clue what is
@@ -50,11 +50,19 @@ export declare class GtkWindow extends AdwSingleChildBase {
50
50
  close(): void;
51
51
  private _requestClose;
52
52
  /**
53
- * What the back button does, in order: the topmost dialog, the innermost navigation view, then
54
- * `close-request`. Always consumes the press — the system's own back would `finish()` too, but
53
+ * What the back button does, in order: the topmost dialog, an open bottom sheet, the innermost
54
+ * navigation view, the window's key controllers (`Gdk.KEY_Back`), then `close-request`. The sheet sits over the content a navigation view lives
55
+ * in, and libadwaita closes it on Escape before anything under it sees the key. Always consumes the press — the system's own back would `finish()` too, but
55
56
  * without asking the handlers.
56
57
  */
57
58
  private _handleBack;
59
+ /**
60
+ * Back as GTK would see it: a `key-pressed` of `Gdk.KEY_Back` reaching the toplevel's key
61
+ * controllers AFTER the focused content (dialog, sheet, navigation view) had its turn, since the
62
+ * key travels from the focus up. The press arrives by NativeScript's back event, not through
63
+ * the view's key listener, so it is handed to the controllers here.
64
+ */
65
+ private _deliverBackKey;
58
66
  /** A subclass that shows things over the window (dialogs) takes the press first; true = taken. */
59
67
  protected _consumeBack(): boolean;
60
68
  /** Only a window with no window above it owns the back button. */
@@ -85,8 +85,8 @@ export type { DataGridItemSpec } from './data-grid-model.js';
85
85
  export { AdwSpinner, DEFAULT_SPINNER_SIZE } from './adw-spinner.js';
86
86
  export { AdwStatusPage } from './adw-status-page.js';
87
87
  export { AdwButtonRow, ACTIVATED } from './adw-button-row.js';
88
- export { AdwButtonContent } from './adw-button-content.js';
89
- export { AdwSplitButton, CLICKED, MENU_TAPPED } from './adw-split-button.js';
88
+ export { AdwButtonContent, NOTIFY_BUTTON_CONTENT_ICON_NAME, NOTIFY_BUTTON_CONTENT_LABEL, NOTIFY_BUTTON_CONTENT_USE_UNDERLINE, NOTIFY_BUTTON_CONTENT_CAN_SHRINK, } from './adw-button-content.js';
89
+ export { AdwSplitButton, MENU_TAPPED } from './adw-split-button.js';
90
90
  export type { MenuTappedEventData } from './adw-split-button.js';
91
91
  export { AdwToggleGroup, NOTIFY_SELECTED as NOTIFY_TOGGLE_SELECTED, ToggleGroupState } from './adw-toggle-group.js';
92
92
  export { AdwToggle } from './adw-toggle.js';
@@ -1,10 +1,15 @@
1
1
  import type { EventData, Observable } from '@nativescript/core';
2
- import { type ForeignClassMeta, type ForeignProperty } from '@gjsify/adwaita-core';
2
+ import { type ForeignClassMeta, type ForeignObjectProperty, type ForeignProperty, type ForeignScalarProperty } from '@gjsify/adwaita-core';
3
3
  /**
4
- * A declared property, plus the one thing the engine's vocabulary has no room for: how a value is
5
- * brought into the property's shape BEFORE it is stored. The engine never sees `normalize`.
4
+ * One arm of {@link ForeignProperty}, plus the one thing the engine's vocabulary has no room for:
5
+ * how a value is brought into the property's shape BEFORE it is stored. The engine never sees
6
+ * `normalize`.
7
+ *
8
+ * Applied per ARM rather than to the union, because `ForeignProperty` is a discriminated union
9
+ * since ADR 0122 § 6 and `property.kind === 'object'` has to keep narrowing to the arm that
10
+ * carries `valueType`.
6
11
  */
7
- export interface DeclaredProperty extends ForeignProperty {
12
+ type Declared<P> = P & {
8
13
  /**
9
14
  * Replaces the seam's own coercion for EVERY write, typed or not — a floor, a clamp, a lenient
10
15
  * parse. Runs identically on both legs, ahead of the store and of the equal-write check, so a
@@ -16,7 +21,9 @@ export interface DeclaredProperty extends ForeignProperty {
16
21
  * here, since a write that resolves to the value already held is not a change.
17
22
  */
18
23
  readonly normalize?: (value: unknown, self: object) => unknown;
19
- }
24
+ };
25
+ /** A declared property of any kind, with its optional {@link Declared.normalize}. */
26
+ export type DeclaredProperty = Declared<ForeignScalarProperty> | Declared<ForeignObjectProperty>;
20
27
  /** {@link ForeignClassMeta} whose properties may carry a {@link DeclaredProperty.normalize}. */
21
28
  export interface DeclaredClassMeta extends Omit<ForeignClassMeta, 'Properties'> {
22
29
  readonly Properties?: Readonly<Record<string, DeclaredProperty>>;
@@ -187,3 +194,4 @@ export declare function withProperties<TBase extends ObservableConstructor>(Base
187
194
  /** Only what this class ADDS; `emittedSignalsOf` merges it with the base's. */
188
195
  readonly emittedSignals: readonly string[];
189
196
  }) & TBase;
197
+ export {};
@@ -1,4 +1,4 @@
1
- import type { AdwArrowIcon, SplitButtonDirection, SplitButtonState } from '@gjsify/adwaita-core';
1
+ import type { AdwArrowIcon, SplitButtonDirection } from '@gjsify/adwaita-core';
2
2
  export type { SplitButtonDirection };
3
3
  /**
4
4
  * The libadwaita arrow glyph names mapped to real Adwaita symbolic SVGs. Keyed by
@@ -8,12 +8,3 @@ export type { SplitButtonDirection };
8
8
  export declare const ARROW_SVGS: Readonly<Record<AdwArrowIcon, string>>;
9
9
  /** The arrow SVG for a direction; the split button's `none` is the down caret, not a hamburger. */
10
10
  export declare function splitButtonArrowSvg(direction: SplitButtonDirection): string;
11
- /**
12
- * Apply `AdwSplitButton.iconName = svg` to the content machine. The SVG string IS
13
- * the icon identity on NativeScript, so it goes where GTK puts the icon NAME.
14
- *
15
- * C offers no "unset the icon", only the side effect of filling another slot, so an
16
- * empty SVG clears the content and lets the label half take over again — what a
17
- * caller assigning `iconName` from a nullable lookup expects.
18
- */
19
- export declare function setActionIcon(state: SplitButtonState, svg: string | null | undefined): void;
@@ -1,6 +1,6 @@
1
1
  import { type View } from '@nativescript/core';
2
2
  import type { BackPressedEvent } from './window-source.js';
3
- export declare const canFinishWindow = true;
3
+ export declare function canFinishWindow(): boolean;
4
4
  export declare function watchBackButton(onBack: (event: BackPressedEvent) => void): () => void;
5
5
  export declare function finishWindow(): void;
6
6
  export declare function isViewFocused(view: View): boolean;