@gjsify/adwaita-nativescript 0.14.0 → 0.16.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/index.js CHANGED
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";import{ADWAITA_SANS_FONT_FAMILY as ee,ADWAITA_SANS_TTF_FILES as e,adwaitaFontInstallInstructions as te,hasAdwaitaSans as t}from"./fonts.js";import{AdwPreferencesPage as n}from"./widgets/adw-preferences-page.js";import{AdwPreferencesGroup as r}from"./widgets/adw-preferences-group.js";import{AdwActionRow as i}from"./widgets/adw-action-row.js";import{AdwSwitchRow as a,NOTIFY_ACTIVE as o}from"./widgets/adw-switch-row.js";import{AdwEntryRow as s,NOTIFY_TEXT as c}from"./widgets/adw-entry-row.js";import{ADWAITA_ICON_GRID as l,DEFAULT_ICON_COLOR as u,DEFAULT_ICON_COLOR_DARK as d,extractIconPaths as f,extractPathData as p}from"./widgets/icon-path.js";import{adwaitaColorScheme as m,isThemeIconColor as h,onAdwaitaColorSchemeChanged as g,setAdwaitaColorScheme as _,themeIconColor as v,toggleAdwaitaColorScheme as y}from"./widgets/color-scheme.js";import{renderSymbolicIcon as b}from"./widgets/icons.js";import{attachRowPressFeedback as x}from"./widgets/row-press.js";import{AdwImageButton as S,DEFAULT_ICON_BUTTON_ICON_SIZE as C}from"./widgets/adw-image-button.js";import{AdwPasswordEntryRow as w}from"./widgets/adw-password-entry-row.js";import{AdwIcon as T,DEFAULT_ADW_ICON_SIZE as E}from"./widgets/adw-icon.js";import{AdwComboRow as D,NOTIFY_SELECTED as O}from"./widgets/adw-combo-row.js";import{AdwSpinRow as k,NOTIFY_VALUE as A}from"./widgets/adw-spin-row.js";import{AdwSliderRow as j,NOTIFY_SLIDER_VALUE as M}from"./widgets/adw-slider-row.js";import{AdwExpanderRow as N,NOTIFY_EXPANDED as P}from"./widgets/adw-expander-row.js";import{AdwButton as F}from"./widgets/adw-button.js";import{AdwMenuButton as I,MENU_ITEM_ACTIVATED as L}from"./widgets/adw-menu-button.js";import{AdwBanner as R,BUTTON_CLICKED as z}from"./widgets/adw-banner.js";import{AdwAvatar as B,DEFAULT_AVATAR_SIZE as V,avatarInitials as H}from"./widgets/adw-avatar.js";import{AdwWindowTitle as U}from"./widgets/adw-window-title.js";import{AdwClamp as W,DEFAULT_CLAMP_MAX_SIZE as G}from"./widgets/adw-clamp.js";import{AdwHeaderBar as K}from"./widgets/adw-header-bar.js";import{AdwToolbarView as q}from"./widgets/adw-toolbar-view.js";import{AdwWrapBox as J}from"./widgets/adw-wrap-box.js";import{AdwSpinner as Y,DEFAULT_SPINNER_SIZE as X}from"./widgets/adw-spinner.js";import{AdwStatusPage as Z}from"./widgets/adw-status-page.js";import{ACTIVATED as ne,AdwButtonRow as re}from"./widgets/adw-button-row.js";import{AdwButtonContent as Q}from"./widgets/adw-button-content.js";import{AdwSplitButton as ie,CLICKED as ae,MENU_TAPPED as oe}from"./widgets/adw-split-button.js";import{AdwToggleGroup as se,NOTIFY_SELECTED as ce}from"./widgets/adw-toggle-group.js";import{AdwViewStack as le,NOTIFY_VISIBLE_CHILD as ue}from"./widgets/adw-view-stack.js";import{AdwViewSwitcherBase as de,NOTIFY_SELECTED as fe}from"./widgets/view-switcher-base.js";import{AdwViewSwitcher as pe}from"./widgets/adw-view-switcher.js";import{AdwViewSwitcherBar as me}from"./widgets/adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as he}from"./widgets/adw-inline-view-switcher.js";import{AdwTabView as ge}from"./widgets/adw-tab-view.js";import{AdwCarousel as _e,DEFAULT_CAROUSEL_PAGE_WIDTH as ve,NOTIFY_POSITION as ye}from"./widgets/adw-carousel.js";import{AdwNavigationView as be,NOTIFY_VISIBLE_PAGE as xe}from"./widgets/adw-navigation-view.js";import{AdwSplitViewBase as Se,DEFAULT_SIDEBAR_WIDTH as Ce,NOTIFY_SHOW_SIDEBAR as we}from"./widgets/split-view-base.js";import{AdwNavigationSplitView as Te}from"./widgets/adw-navigation-split-view.js";import{AdwOverlaySplitView as Ee}from"./widgets/adw-overlay-split-view.js";import{AdwSidebar as De,NOTIFY_SELECTED as Oe}from"./widgets/adw-sidebar.js";import{AdwBottomSheet as ke,NOTIFY_OPEN as Ae}from"./widgets/adw-bottom-sheet.js";import{AdwToast as je,AdwToastOverlay as Me,DEFAULT_TOAST_TIMEOUT as Ne,TOAST_BUTTON_CLICKED as Pe}from"./widgets/adw-toast-overlay.js";import{AdwAlertDialog as Fe,NOTIFY_RESPONSE as Ie}from"./widgets/adw-alert-dialog.js";import{AdwAboutDialog as Le,CLOSED as Re}from"./widgets/adw-about-dialog.js";import{AdwPreferencesDialog as ze,CLOSED as Be}from"./widgets/adw-preferences-dialog.js";import{AdwBreakpoint as Ve,addBreakpoints as He,evaluateBreakpointCondition as Ue,parseBreakpointCondition as We}from"./widgets/breakpoint.js";import{registerAdwaitaElements as $}from"./widgets/index.js";import{assertNativeScript as Ge,assertNativeScript as Ke,isAndroid as qe,isIOS as Je,isNativeScript as Ye}from"@gjsify/native-platform";function registerAdwaita(){Ke(),$()}export{Re as ABOUT_CLOSED,ne as ACTIVATED,l as ADWAITA_ICON_GRID,ee as ADWAITA_SANS_FONT_FAMILY,e as ADWAITA_SANS_TTF_FILES,Le as AdwAboutDialog,i as AdwActionRow,Fe as AdwAlertDialog,B as AdwAvatar,R as AdwBanner,ke as AdwBottomSheet,Ve as AdwBreakpoint,F as AdwButton,Q as AdwButtonContent,re as AdwButtonRow,_e as AdwCarousel,W as AdwClamp,D as AdwComboRow,s as AdwEntryRow,N as AdwExpanderRow,K as AdwHeaderBar,T as AdwIcon,S as AdwImageButton,he as AdwInlineViewSwitcher,I as AdwMenuButton,Te as AdwNavigationSplitView,be as AdwNavigationView,Ee as AdwOverlaySplitView,w as AdwPasswordEntryRow,ze as AdwPreferencesDialog,r as AdwPreferencesGroup,n as AdwPreferencesPage,De as AdwSidebar,j as AdwSliderRow,k as AdwSpinRow,Y as AdwSpinner,ie as AdwSplitButton,Se as AdwSplitViewBase,Z as AdwStatusPage,a as AdwSwitchRow,ge as AdwTabView,je as AdwToast,Me as AdwToastOverlay,se as AdwToggleGroup,q as AdwToolbarView,le as AdwViewStack,pe as AdwViewSwitcher,me as AdwViewSwitcherBar,de as AdwViewSwitcherBase,U as AdwWindowTitle,J as AdwWrapBox,z as BUTTON_CLICKED,ae as CLICKED,E as DEFAULT_ADW_ICON_SIZE,V as DEFAULT_AVATAR_SIZE,ve as DEFAULT_CAROUSEL_PAGE_WIDTH,G as DEFAULT_CLAMP_MAX_SIZE,C as DEFAULT_ICON_BUTTON_ICON_SIZE,u as DEFAULT_ICON_COLOR,d as DEFAULT_ICON_COLOR_DARK,Ce as DEFAULT_SIDEBAR_WIDTH,X as DEFAULT_SPINNER_SIZE,Ne as DEFAULT_TOAST_TIMEOUT,L as MENU_ITEM_ACTIVATED,oe as MENU_TAPPED,o as NOTIFY_ACTIVE,P as NOTIFY_EXPANDED,Ae as NOTIFY_OPEN,ye as NOTIFY_POSITION,Ie as NOTIFY_RESPONSE,O as NOTIFY_SELECTED,we as NOTIFY_SHOW_SIDEBAR,Oe as NOTIFY_SIDEBAR_SELECTED,M as NOTIFY_SLIDER_VALUE,c as NOTIFY_TEXT,ce as NOTIFY_TOGGLE_SELECTED,A as NOTIFY_VALUE,fe as NOTIFY_VIEW_SELECTED,ue as NOTIFY_VISIBLE_CHILD,xe as NOTIFY_VISIBLE_PAGE,Be as PREFERENCES_CLOSED,Pe as TOAST_BUTTON_CLICKED,He as addBreakpoints,m as adwaitaColorScheme,te as adwaitaFontInstallInstructions,Ge as assertNativeScript,x as attachRowPressFeedback,H as avatarInitials,Ue as evaluateBreakpointCondition,f as extractIconPaths,p as extractPathData,t as hasAdwaitaSans,qe as isAndroid,Je as isIOS,Ye as isNativeScript,h as isThemeIconColor,g as onAdwaitaColorSchemeChanged,We as parseBreakpointCondition,registerAdwaita,$ as registerAdwaitaElements,b as renderSymbolicIcon,_ as setAdwaitaColorScheme,v as themeIconColor,y as toggleAdwaitaColorScheme};
1
+ import"./_virtual/_rolldown/runtime.js";import{ADWAITA_SANS_FONT_FAMILY as ee,ADWAITA_SANS_TTF_FILES as te,adwaitaFontInstallInstructions as ne,hasAdwaitaSans as e}from"./fonts.js";import{AdwPreferencesPage as t}from"./widgets/adw-preferences-page.js";import{AdwPreferencesGroup as n}from"./widgets/adw-preferences-group.js";import{AdwActionRow as r}from"./widgets/adw-action-row.js";import{AdwSwitchRow as i,NOTIFY_ACTIVE as a}from"./widgets/adw-switch-row.js";import{AdwEntryRow as o,NOTIFY_TEXT as s}from"./widgets/adw-entry-row.js";import{adwaitaColorScheme as c,isThemeIconColor as l,onAdwaitaColorSchemeChanged as u,setAdwaitaColorScheme as d,themeIconColor as f,toggleAdwaitaColorScheme as p}from"./widgets/color-scheme.js";import{ADWAITA_ICON_GRID as m,DEFAULT_ICON_COLOR as h,DEFAULT_ICON_COLOR_DARK as g,extractIconPaths as _,extractPathData as v}from"./widgets/icon-path.js";import{renderSymbolicIcon as y}from"./widgets/icons.js";import{attachRowPressFeedback as b}from"./widgets/row-press.js";import{AdwImageButton as x,DEFAULT_ICON_BUTTON_ICON_SIZE as S}from"./widgets/adw-image-button.js";import{AdwPasswordEntryRow as C}from"./widgets/adw-password-entry-row.js";import{AdwIcon as w,DEFAULT_ADW_ICON_SIZE as T}from"./widgets/adw-icon.js";import{AdwComboRow as E,ComboState as D,NOTIFY_SELECTED as O}from"./widgets/adw-combo-row.js";import{AdwSpinRow as k,NOTIFY_VALUE as A,SpinState as j}from"./widgets/adw-spin-row.js";import{AdwSliderRow as M,NOTIFY_SLIDER_VALUE as N}from"./widgets/adw-slider-row.js";import{AdwExpanderRow as P,ExpanderState as F,NOTIFY_EXPANDED as I}from"./widgets/adw-expander-row.js";import{AdwButton as L}from"./widgets/adw-button.js";import{AdwMenuButton as R,MENU_ITEM_ACTIVATED as z}from"./widgets/adw-menu-button.js";import{AdwBanner as B,BUTTON_CLICKED as V}from"./widgets/adw-banner.js";import{AdwAvatar as H,DEFAULT_AVATAR_SIZE as U,avatarInitials as W}from"./widgets/adw-avatar.js";import{AdwWindowTitle as G}from"./widgets/adw-window-title.js";import{AdwClamp as K,DEFAULT_CLAMP_MAX_SIZE as q}from"./widgets/adw-clamp.js";import{AdwHeaderBar as J}from"./widgets/adw-header-bar.js";import{AdwToolbarView as Y}from"./widgets/adw-toolbar-view.js";import{AdwWrapBox as X}from"./widgets/adw-wrap-box.js";import{AdwSpinner as Z,DEFAULT_SPINNER_SIZE as re}from"./widgets/adw-spinner.js";import{AdwStatusPage as Q}from"./widgets/adw-status-page.js";import{ACTIVATED as ie,AdwButtonRow as ae}from"./widgets/adw-button-row.js";import{AdwButtonContent as oe}from"./widgets/adw-button-content.js";import{AdwSplitButton as se,CLICKED as ce,MENU_TAPPED as le}from"./widgets/adw-split-button.js";import{AdwToggleGroup as ue,NOTIFY_SELECTED as de,ToggleGroupState as fe}from"./widgets/adw-toggle-group.js";import{AdwViewStack as pe,NOTIFY_VISIBLE_CHILD as me}from"./widgets/adw-view-stack.js";import{AdwViewSwitcherBase as he,NOTIFY_SELECTED as ge}from"./widgets/view-switcher-base.js";import{AdwViewSwitcher as _e}from"./widgets/adw-view-switcher.js";import{AdwViewSwitcherBar as ve}from"./widgets/adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as ye}from"./widgets/adw-inline-view-switcher.js";import{AdwTabView as be}from"./widgets/adw-tab-view.js";import{AdwCarousel as xe,DEFAULT_CAROUSEL_PAGE_WIDTH as Se,NOTIFY_POSITION as Ce}from"./widgets/adw-carousel.js";import{AdwNavigationView as we,NOTIFY_VISIBLE_PAGE as Te}from"./widgets/adw-navigation-view.js";import{AdwSplitViewBase as Ee,DEFAULT_SIDEBAR_WIDTH as De,NOTIFY_SHOW_SIDEBAR as Oe}from"./widgets/split-view-base.js";import{AdwNavigationSplitView as ke}from"./widgets/adw-navigation-split-view.js";import{AdwOverlaySplitView as Ae}from"./widgets/adw-overlay-split-view.js";import{AdwSidebar as je,NOTIFY_SELECTED as Me}from"./widgets/adw-sidebar.js";import{AdwBottomSheet as Ne,NOTIFY_OPEN as Pe}from"./widgets/adw-bottom-sheet.js";import{AdwToast as Fe,AdwToastOverlay as Ie,AdwToastQueue as Le,DEFAULT_TOAST_TIMEOUT as Re,TOAST_BUTTON_CLICKED as ze}from"./widgets/adw-toast-overlay.js";import{AdwAlertDialog as Be,AdwAlertResponses as Ve,NOTIFY_RESPONSE as He}from"./widgets/adw-alert-dialog.js";import{AdwAboutDialog as Ue,CLOSED as We}from"./widgets/adw-about-dialog.js";import{AdwPreferencesDialog as Ge,CLOSED as Ke}from"./widgets/adw-preferences-dialog.js";import{AdwBreakpoint as qe,addBreakpoints as Je,evaluateBreakpointCondition as Ye,parseBreakpointCondition as Xe}from"./widgets/breakpoint.js";import{registerAdwaitaElements as $}from"./widgets/index.js";import{assertNativeScript as Ze,assertNativeScript as Qe,isAndroid as $e,isIOS as et,isNativeScript as tt}from"@gjsify/native-platform";function registerAdwaita(){Qe(),$()}export{We as ABOUT_CLOSED,ie as ACTIVATED,m as ADWAITA_ICON_GRID,ee as ADWAITA_SANS_FONT_FAMILY,te as ADWAITA_SANS_TTF_FILES,Ue as AdwAboutDialog,r as AdwActionRow,Be as AdwAlertDialog,Ve as AdwAlertResponses,H as AdwAvatar,B as AdwBanner,Ne as AdwBottomSheet,qe as AdwBreakpoint,L as AdwButton,oe as AdwButtonContent,ae as AdwButtonRow,xe as AdwCarousel,K as AdwClamp,E as AdwComboRow,o as AdwEntryRow,P as AdwExpanderRow,J as AdwHeaderBar,w as AdwIcon,x as AdwImageButton,ye as AdwInlineViewSwitcher,R as AdwMenuButton,ke as AdwNavigationSplitView,we as AdwNavigationView,Ae as AdwOverlaySplitView,C as AdwPasswordEntryRow,Ge as AdwPreferencesDialog,n as AdwPreferencesGroup,t as AdwPreferencesPage,je as AdwSidebar,M as AdwSliderRow,k as AdwSpinRow,Z as AdwSpinner,se as AdwSplitButton,Ee as AdwSplitViewBase,Q as AdwStatusPage,i as AdwSwitchRow,be as AdwTabView,Fe as AdwToast,Ie as AdwToastOverlay,Le as AdwToastQueue,ue as AdwToggleGroup,Y as AdwToolbarView,pe as AdwViewStack,_e as AdwViewSwitcher,ve as AdwViewSwitcherBar,he as AdwViewSwitcherBase,G as AdwWindowTitle,X as AdwWrapBox,V as BUTTON_CLICKED,ce as CLICKED,D as ComboState,T as DEFAULT_ADW_ICON_SIZE,U as DEFAULT_AVATAR_SIZE,Se as DEFAULT_CAROUSEL_PAGE_WIDTH,q as DEFAULT_CLAMP_MAX_SIZE,S as DEFAULT_ICON_BUTTON_ICON_SIZE,h as DEFAULT_ICON_COLOR,g as DEFAULT_ICON_COLOR_DARK,De as DEFAULT_SIDEBAR_WIDTH,re as DEFAULT_SPINNER_SIZE,Re as DEFAULT_TOAST_TIMEOUT,F as ExpanderState,z as MENU_ITEM_ACTIVATED,le as MENU_TAPPED,a as NOTIFY_ACTIVE,I as NOTIFY_EXPANDED,Pe as NOTIFY_OPEN,Ce as NOTIFY_POSITION,He as NOTIFY_RESPONSE,O as NOTIFY_SELECTED,Oe as NOTIFY_SHOW_SIDEBAR,Me as NOTIFY_SIDEBAR_SELECTED,N as NOTIFY_SLIDER_VALUE,s as NOTIFY_TEXT,de as NOTIFY_TOGGLE_SELECTED,A as NOTIFY_VALUE,ge as NOTIFY_VIEW_SELECTED,me as NOTIFY_VISIBLE_CHILD,Te as NOTIFY_VISIBLE_PAGE,Ke as PREFERENCES_CLOSED,j as SpinState,ze as TOAST_BUTTON_CLICKED,fe as ToggleGroupState,Je as addBreakpoints,c as adwaitaColorScheme,ne as adwaitaFontInstallInstructions,Ze as assertNativeScript,b as attachRowPressFeedback,W as avatarInitials,Ye as evaluateBreakpointCondition,_ as extractIconPaths,v as extractPathData,e as hasAdwaitaSans,$e as isAndroid,et as isIOS,tt as isNativeScript,l as isThemeIconColor,u as onAdwaitaColorSchemeChanged,Xe as parseBreakpointCondition,registerAdwaita,$ as registerAdwaitaElements,y as renderSymbolicIcon,d as setAdwaitaColorScheme,f as themeIconColor,p as toggleAdwaitaColorScheme};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{Observable as e,action as t,confirm as n}from"@nativescript/core";const r=`notify::response`;var AdwAlertDialog=class extends e{_heading=``;_body=``;_responses=[];_defaultResponse=null;_closeResponse=`close`;constructor(e=``,t=``){super(),this._heading=e,this._body=t}get heading(){return this._heading}set heading(e){this._heading=e??``}get body(){return this._body}set body(e){this._body=e??``}addResponse(e,t){this._responses.push({id:e,label:t})}addResponses(...e){for(let t=0;t+1<e.length;t+=2)this.addResponse(e[t],e[t+1])}get defaultResponse(){return this._defaultResponse}set defaultResponse(e){this._defaultResponse=e}get closeResponse(){return this._closeResponse}set closeResponse(e){this._closeResponse=e||`close`}get responses(){return this._responses}async present(){let e=this._responses.length<=3?await this._presentConfirm():await this._presentAction();return this.notify({eventName:r,object:this,response:e}),e}async _presentConfirm(){let e=this._orderResponses(),t=e.ok?.label,r=e.cancel?.label,i=e.neutral?.label,a=await n({title:this._heading||void 0,message:this._body||void 0,okButtonText:t,cancelButtonText:r,neutralButtonText:i,cancelable:!0});return a===!0&&e.ok?e.ok.id:a===!1&&e.cancel?e.cancel.id:a===void 0&&e.neutral?e.neutral.id:this._closeResponse}_orderResponses(){let byId=e=>this._responses.find(t=>t.id===e),e=byId(this._defaultResponse)??this._responses[0],t=this._responses.filter(t=>t!==e);return{ok:e,cancel:t[t.length-1],neutral:t.length>=2?t[0]:void 0}}async _presentAction(){let e=this._responses.map(e=>e.label),n=await t({title:this._heading||void 0,message:this._body||void 0,cancelButtonText:`Cancel`,actions:e});return this._responses.find(e=>e.label===n)?.id??this._closeResponse}};export{AdwAlertDialog,r as NOTIFY_RESPONSE};
1
+ import"../_virtual/_rolldown/runtime.js";import{Observable as e,action as t,confirm as n}from"@nativescript/core";import{AdwAlertResponses as r,AdwAlertResponses as i}from"@gjsify/adwaita-core";const a=`notify::response`;var AdwAlertDialog=class extends e{_responses;constructor(e=``,t=``){super(),this._responses=new i(e,t)}get heading(){return this._responses.heading}set heading(e){this._responses.heading=e}get body(){return this._responses.body}set body(e){this._responses.body=e}addResponse(e,t,n){this._responses.addResponse(e,t,n)}addResponses(...e){this._responses.addResponses(...e)}setResponseAppearance(e,t){this._responses.setResponseAppearance(e,t)}getResponseAppearance(e){return this._responses.getResponseAppearance(e)}setResponseEnabled(e,t){this._responses.setResponseEnabled(e,t)}getResponseEnabled(e){return this._responses.getResponseEnabled(e)}get defaultResponse(){return this._responses.defaultResponse}set defaultResponse(e){this._responses.defaultResponse=e}get closeResponse(){return this._responses.closeResponse}set closeResponse(e){this._responses.closeResponse=e}get responses(){return this._responses.responses}async present(){let e=this._responses.usesActionSheet?await this._presentAction():await this._presentConfirm();return this.notify({eventName:a,object:this,response:e}),e}async _presentConfirm(){let e=this._responses.orderResponses(),t=await n({title:this._responses.heading||void 0,message:this._responses.body||void 0,okButtonText:e.ok?.label,cancelButtonText:e.cancel?.label,neutralButtonText:e.neutral?.label,cancelable:!0});return t===!0?this._responses.resolveById(e.ok?.id):t===!1?this._responses.resolveById(e.cancel?.id):t===void 0?this._responses.resolveById(e.neutral?.id):this._responses.closeResponse}async _presentAction(){let e=await t({title:this._responses.heading||void 0,message:this._responses.body||void 0,cancelButtonText:`Cancel`,actions:this._responses.responses.map(e=>e.label)});return this._responses.resolveLabel(e)}};export{AdwAlertDialog,r as AdwAlertResponses,a as NOTIFY_RESPONSE};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{attachRowPressFeedback as t}from"./row-press.js";import{AdwIcon as n}from"./adw-icon.js";import{Label as r,StackLayout as i,action as a}from"@nativescript/core";import{panDownSymbolic as o}from"@gjsify/adwaita-icons/ui";const s=`notify::selected`;var AdwComboRow=class extends e{_valueLabel;_chevron;_options=[];_selectedIndex=0;constructor(){super(),this.className=`adw-row adw-action-row adw-combo-row`;let e=new i;e.orientation=`horizontal`,e.className=`adw-combo-suffix`;let a=new r;a.className=`adw-combo-value`,a.text=``;let s=new n;s.className=`adw-combo-chevron`,s.iconColor=`#9a9a9a`,s.iconSize=16,s.icon=o,e.addChild(a),e.addChild(s),this.setSuffix(e),this._valueLabel=a,this._chevron=s,this.addEventListener(`tap`,()=>{this._openChooser()}),t(this)}async _openChooser(){if(this._options.length===0)return;let e=this._options.map(e=>e.label),t=await a({title:this.title||void 0,cancelButtonText:`Cancel`,actions:e}),n=e.indexOf(t);n>=0&&n!==this._selectedIndex&&(this.selectedIndex=n,this._emitSelected())}_syncValueLabel(){this._valueLabel.text=this._options[this._selectedIndex]?.label??``}_emitSelected(){let e={eventName:s,object:this,selected:this._selectedIndex,value:this.selectedValue};this.notify(e)}get options(){return this._options}set options(e){this._options=Array.isArray(e)?e:[],this._selectedIndex>=this._options.length&&(this._selectedIndex=0),this._syncValueLabel()}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){let t=Number.isFinite(e)?e:0;t!==this._selectedIndex&&(this._selectedIndex=t,this._syncValueLabel())}get selectedValue(){return this._options[this._selectedIndex]?.value??``}set selectedValue(e){let t=this._options.findIndex(t=>t.value===e);t>=0&&(this.selectedIndex=t)}};export{AdwComboRow,s as NOTIFY_SELECTED};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{attachRowPressFeedback as t}from"./row-press.js";import{AdwIcon as n}from"./adw-icon.js";import{Label as r,StackLayout as i,action as a}from"@nativescript/core";import{ComboState as o,ComboState as s}from"@gjsify/adwaita-core";import{panDownSymbolic as c}from"@gjsify/adwaita-icons/ui";const l=`notify::selected`;var AdwComboRow=class extends e{_valueLabel;_chevron;_state=new s;constructor(){super(),this.className=`adw-row adw-action-row adw-combo-row`;let e=new i;e.orientation=`horizontal`,e.className=`adw-combo-suffix`;let a=new r;a.className=`adw-combo-value`,a.text=``;let o=new n;o.className=`adw-combo-chevron`,o.iconColor=`#9a9a9a`,o.iconSize=16,o.icon=c,e.addChild(a),e.addChild(o),this.setSuffix(e),this._valueLabel=a,this._chevron=o,this._state.subscribe(e=>{if(this._valueLabel.text=e.label,e.interactive){let t={eventName:l,object:this,selected:e.selected,value:e.value};this.notify(t)}}),this.addEventListener(`tap`,()=>{this._openChooser()}),t(this)}async _openChooser(){if(this._state.count===0)return;let e=this._state.options.map(e=>e.label),t=await a({title:this.title||void 0,cancelButtonText:`Cancel`,actions:e});this._state.select(e.indexOf(t))}get options(){return this._state.options}set options(e){this._state.setOptions(e)}get selectedIndex(){return this._state.selectedIndex}set selectedIndex(e){this._state.setSelectedIndex(e)}get selectedValue(){return this._state.selectedValue}set selectedValue(e){this._state.setSelectedValue(e)}};export{AdwComboRow,o as ComboState,l as NOTIFY_SELECTED};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwIcon as t}from"./adw-icon.js";import{GridLayout as n,ItemSpec as r,StackLayout as i}from"@nativescript/core";import{panDownSymbolic as a,panUpSymbolic as o}from"@gjsify/adwaita-icons/ui";const s=`notify::expanded`;var AdwExpanderRow=class extends e{_toggle;_disclosure;_expanded=!1;constructor(){super(),this.className=`adw-row adw-action-row adw-expander-row`,this.addRow(new r(1,`auto`));let e=new i;e.orientation=`vertical`,e.className=`adw-expander-disclosure`,e.visibility=`collapse`,n.setRow(e,1),n.setColumn(e,0),n.setColumnSpan(e,3),this.addChild(e),this._disclosure=e;let o=new t;o.icon=a,o.className=`${o.className} adw-expander-toggle`.trim(),this.setSuffix(o),this._toggle=o,o.addEventListener(`tap`,()=>{this.expanded=!this._expanded})}addRow(e){if(e instanceof r){super.addRow(e);return}this._disclosure.addChild(e)}removeRow(e){this._disclosure.removeChild(e)}get expanded(){return this._expanded}set expanded(e){let t=!!e;if(t===this._expanded)return;this._expanded=t,this._disclosure.visibility=t?`visible`:`collapse`,this._toggle.icon=t?o:a;let n={eventName:s,object:this,expanded:t};this.notify(n)}};export{AdwExpanderRow,s as NOTIFY_EXPANDED};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwIcon as t}from"./adw-icon.js";import{GridLayout as n,ItemSpec as r,StackLayout as i}from"@nativescript/core";import{ExpanderState as a,ExpanderState as o}from"@gjsify/adwaita-core";import{panDownSymbolic as s,panUpSymbolic as c}from"@gjsify/adwaita-icons/ui";const l=`notify::expanded`;var AdwExpanderRow=class extends e{_toggle;_disclosure;_state=new o;constructor(){super(),this.className=`adw-row adw-action-row adw-expander-row`,this.addRow(new r(1,`auto`));let e=new i;e.orientation=`vertical`,e.className=`adw-expander-disclosure`,e.visibility=`collapse`,n.setRow(e,1),n.setColumn(e,0),n.setColumnSpan(e,3),this.addChild(e),this._disclosure=e;let a=new t;a.icon=s,a.className=`${a.className} adw-expander-toggle`.trim(),this.setSuffix(a),this._toggle=a,this._state.subscribe(e=>{this._disclosure.visibility=e?`visible`:`collapse`,this._toggle.icon=e?c:s;let t={eventName:l,object:this,expanded:e};this.notify(t)}),a.addEventListener(`tap`,()=>{this._state.toggle()})}addRow(e){if(e instanceof r){super.addRow(e);return}this._disclosure.addChild(e)}removeRow(e){this._disclosure.removeChild(e)}get expanded(){return this._state.expanded}set expanded(e){this._state.setExpanded(e)}};export{AdwExpanderRow,a as ExpanderState,l as NOTIFY_EXPANDED};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import"./icon-path.js";import{onAdwaitaColorSchemeChanged as e,themeIconColor as t}from"./color-scheme.js";import{renderSymbolicIcon as n}from"./icons.js";import{Image as r}from"@nativescript/core";const i=16;var AdwIcon=class extends r{_iconSvg=``;_iconColor=t();_explicitColor=!1;_iconSize=16;_unsubScheme=null;constructor(){super(),this.className=`adw-icon`,this.stretch=`aspectFit`,this.width=this._iconSize,this.height=this._iconSize,this.addEventListener(`loaded`,()=>{this._syncThemeColor(),this._unsubScheme??=e(()=>this._syncThemeColor())}),this.addEventListener(`unloaded`,()=>{this._unsubScheme?.(),this._unsubScheme=null})}_syncThemeColor(){if(this._explicitColor)return;let e=t();e!==this._iconColor&&(this._iconColor=e,this._render())}_render(){if(!this._iconSvg)return;let e=n(this._iconSvg,{size:this._iconSize,color:this._iconColor});e&&(this.imageSource=e)}get icon(){return this._iconSvg}set icon(e){this._iconSvg=e??``,this._render()}get iconColor(){return this._iconColor}set iconColor(e){this._explicitColor=!0,this._iconColor=e||`#33333A`,this._render()}get iconSize(){return this._iconSize}set iconSize(e){this._iconSize=Number.isFinite(e)&&e>0?e:16,this.width=this._iconSize,this.height=this._iconSize,this._render()}};export{AdwIcon,i as DEFAULT_ADW_ICON_SIZE};
1
+ import"../_virtual/_rolldown/runtime.js";import{onAdwaitaColorSchemeChanged as e,themeIconColor as t}from"./color-scheme.js";import{DEFAULT_ICON_COLOR as n}from"./icon-path.js";import{renderSymbolicIcon as r}from"./icons.js";import{Image as i}from"@nativescript/core";const a=16;var AdwIcon=class extends i{_iconSvg=``;_iconColor=t();_explicitColor=!1;_iconSize=16;_unsubScheme=null;constructor(){super(),this.className=`adw-icon`,this.stretch=`aspectFit`,this.width=this._iconSize,this.height=this._iconSize,this.addEventListener(`loaded`,()=>{this._syncThemeColor(),this._unsubScheme??=e(()=>this._syncThemeColor())}),this.addEventListener(`unloaded`,()=>{this._unsubScheme?.(),this._unsubScheme=null})}_syncThemeColor(){if(this._explicitColor)return;let e=t();e!==this._iconColor&&(this._iconColor=e,this._render())}_render(){if(!this._iconSvg)return;let e=r(this._iconSvg,{size:this._iconSize,color:this._iconColor});e&&(this.imageSource=e)}get icon(){return this._iconSvg}set icon(e){this._iconSvg=e??``,this._render()}get iconColor(){return this._iconColor}set iconColor(e){this._explicitColor=!0,this._iconColor=e||n,this._render()}get iconSize(){return this._iconSize}set iconSize(e){this._iconSize=Number.isFinite(e)&&e>0?e:16,this.width=this._iconSize,this.height=this._iconSize,this._render()}};export{AdwIcon,a as DEFAULT_ADW_ICON_SIZE};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import"./icon-path.js";import{onAdwaitaColorSchemeChanged as e,themeIconColor as t}from"./color-scheme.js";import{renderSymbolicIcon as n}from"./icons.js";import{attachRowPressFeedback as r}from"./row-press.js";import{GridLayout as i,Image as a,ItemSpec as o}from"@nativescript/core";const s=16;var AdwImageButton=class extends i{_image;_iconSvg=``;_iconColor=t();_explicitColor=!1;_iconSize=16;_unsubScheme=null;constructor(){super(),this.className=`adw-image-button`,this.addRow(new o(1,`star`)),this.addColumn(new o(1,`star`));let t=new a;t.className=`adw-image-button-icon`,t.stretch=`aspectFit`,t.width=this._iconSize,t.height=this._iconSize,t.horizontalAlignment=`center`,t.verticalAlignment=`middle`,this.addChild(t),this._image=t,r(this),this.addEventListener(`loaded`,()=>{this._syncThemeColor(),this._unsubScheme??=e(()=>this._syncThemeColor())}),this.addEventListener(`unloaded`,()=>{this._unsubScheme?.(),this._unsubScheme=null})}_syncThemeColor(){if(this._explicitColor)return;let e=t();e!==this._iconColor&&(this._iconColor=e,this._render())}_render(){if(!this._iconSvg)return;let e=n(this._iconSvg,{size:this._iconSize,color:this._iconColor});e&&(this._image.imageSource=e)}get icon(){return this._iconSvg}set icon(e){this._iconSvg=e??``,this._image.width=this._iconSize,this._image.height=this._iconSize,this._render()}get iconColor(){return this._iconColor}set iconColor(e){this._explicitColor=!0,this._iconColor=e||`#33333A`,this._render()}get iconSize(){return this._iconSize}set iconSize(e){this._iconSize=Number.isFinite(e)&&e>0?e:16,this._image.width=this._iconSize,this._image.height=this._iconSize,this._render()}get image(){return this._image}};export{AdwImageButton,s as DEFAULT_ICON_BUTTON_ICON_SIZE};
1
+ import"../_virtual/_rolldown/runtime.js";import{onAdwaitaColorSchemeChanged as e,themeIconColor as t}from"./color-scheme.js";import{DEFAULT_ICON_COLOR as n}from"./icon-path.js";import{renderSymbolicIcon as r}from"./icons.js";import{attachRowPressFeedback as i}from"./row-press.js";import{GridLayout as a,Image as o,ItemSpec as s}from"@nativescript/core";const c=16;var AdwImageButton=class extends a{_image;_iconSvg=``;_iconColor=t();_explicitColor=!1;_iconSize=16;_unsubScheme=null;constructor(){super(),this.className=`adw-image-button`,this.addRow(new s(1,`star`)),this.addColumn(new s(1,`star`));let t=new o;t.className=`adw-image-button-icon`,t.stretch=`aspectFit`,t.width=this._iconSize,t.height=this._iconSize,t.horizontalAlignment=`center`,t.verticalAlignment=`middle`,this.addChild(t),this._image=t,i(this),this.addEventListener(`loaded`,()=>{this._syncThemeColor(),this._unsubScheme??=e(()=>this._syncThemeColor())}),this.addEventListener(`unloaded`,()=>{this._unsubScheme?.(),this._unsubScheme=null})}_syncThemeColor(){if(this._explicitColor)return;let e=t();e!==this._iconColor&&(this._iconColor=e,this._render())}_render(){if(!this._iconSvg)return;let e=r(this._iconSvg,{size:this._iconSize,color:this._iconColor});e&&(this._image.imageSource=e)}get icon(){return this._iconSvg}set icon(e){this._iconSvg=e??``,this._image.width=this._iconSize,this._image.height=this._iconSize,this._render()}get iconColor(){return this._iconColor}set iconColor(e){this._explicitColor=!0,this._iconColor=e||n,this._render()}get iconSize(){return this._iconSize}set iconSize(e){this._iconSize=Number.isFinite(e)&&e>0?e:16,this._image.width=this._iconSize,this._image.height=this._iconSize,this._render()}get image(){return this._image}};export{AdwImageButton,c as DEFAULT_ICON_BUTTON_ICON_SIZE};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwImageButton as t}from"./adw-image-button.js";import{Label as n,StackLayout as r}from"@nativescript/core";import{valueDecreaseSymbolic as i,valueIncreaseSymbolic as a}from"@gjsify/adwaita-icons/actions";const o=`notify::value`;var AdwSpinRow=class extends e{_minusButton;_plusButton;_valueLabel;_value=0;_min=0;_max=100;_step=1;constructor(){super(),this.className=`adw-row adw-action-row adw-spin-row`;let e=new r;e.orientation=`horizontal`,e.className=`adw-spin-control`;let o=new n;o.className=`adw-spin-value`,o.text=String(this._value);let s=new t;s.icon=i,s.className=`${s.className} adw-spin-button adw-spin-minus`.trim();let c=new t;c.icon=a,c.className=`${c.className} adw-spin-button adw-spin-plus`.trim(),e.addChild(o),e.addChild(s),e.addChild(c),this.setSuffix(e),this._minusButton=s,this._plusButton=c,this._valueLabel=o,s.addEventListener(`tap`,()=>this._bump(-this._step)),c.addEventListener(`tap`,()=>this._bump(this._step))}_bump(e){let t=this._clamp(this._value+e);if(t!==this._value){this._value=t,this._valueLabel.text=String(t);let e={eventName:o,object:this,value:t};this.notify(e)}}_clamp(e){return Math.min(this._max,Math.max(this._min,e))}get value(){return this._value}set value(e){let t=this._clamp(Number.isFinite(e)?e:0);t!==this._value&&(this._value=t,this._valueLabel.text=String(t))}get min(){return this._min}set min(e){this._min=Number.isFinite(e)?e:0,this.value=this._value}get max(){return this._max}set max(e){this._max=Number.isFinite(e)?e:0,this.value=this._value}get step(){return this._step}set step(e){this._step=Number.isFinite(e)&&e>0?e:1}};export{AdwSpinRow,o as NOTIFY_VALUE};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwImageButton as t}from"./adw-image-button.js";import{Label as n,StackLayout as r}from"@nativescript/core";import{valueDecreaseSymbolic as i,valueIncreaseSymbolic as a}from"@gjsify/adwaita-icons/actions";import{SpinState as o,SpinState as s}from"@gjsify/adwaita-core";const c=`notify::value`;var AdwSpinRow=class extends e{_minusButton;_plusButton;_valueLabel;_state=new s;constructor(){super(),this.className=`adw-row adw-action-row adw-spin-row`;let e=new r;e.orientation=`horizontal`,e.className=`adw-spin-control`;let o=new n;o.className=`adw-spin-value`,o.text=String(this._state.value);let s=new t;s.icon=i,s.className=`${s.className} adw-spin-button adw-spin-minus`.trim();let l=new t;l.icon=a,l.className=`${l.className} adw-spin-button adw-spin-plus`.trim(),e.addChild(o),e.addChild(s),e.addChild(l),this.setSuffix(e),this._minusButton=s,this._plusButton=l,this._valueLabel=o,this._state.subscribe(e=>{if(this._valueLabel.text=String(e.value),e.interactive){let t={eventName:c,object:this,value:e.value};this.notify(t)}}),s.addEventListener(`tap`,()=>this._state.decrement()),l.addEventListener(`tap`,()=>this._state.increment())}get value(){return this._state.value}set value(e){this._state.setValue(e)}get min(){return this._state.min}set min(e){this._state.setMin(e)}get max(){return this._state.max}set max(e){this._state.setMax(e)}get step(){return this._state.step}set step(e){this._state.setStep(e)}};export{AdwSpinRow,c as NOTIFY_VALUE,o as SpinState};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{Button as e,GridLayout as t,ItemSpec as n,Label as r}from"@nativescript/core";const i=5e3,a=`toastButtonClicked`;var AdwToast=class{title;timeout;buttonLabel;constructor(e=``,t={}){this.title=e,this.timeout=t.timeout??5e3,this.buttonLabel=t.buttonLabel??``}},AdwToastOverlay=class extends t{_content=null;_toastStrip;_toastLabel;_toastButton;_hasButton=!1;_dismissTimer=null;constructor(){super(),this.className=`adw-toast-overlay`,this.addColumn(new n(1,`star`)),this.addRow(new n(1,`star`));let i=new t;i.className=`adw-toast`,i.visibility=`collapse`,i.verticalAlignment=`bottom`,i.horizontalAlignment=`center`,i.addColumn(new n(1,`star`)),i.addColumn(new n(1,`auto`)),i.addRow(new n(1,`auto`)),t.setColumn(i,0),t.setRow(i,0);let o=new r;o.className=`adw-toast-title`,o.textWrap=!0,t.setColumn(o,0),i.addChild(o),this._toastLabel=o;let s=new e;s.className=`adw-toast-button`,s.set(`androidElevation`,0),t.setColumn(s,1),s.addEventListener(`tap`,()=>{let e={eventName:a,object:this};this.notify(e),this._dismiss()}),this._toastButton=s,this.addChild(i),this._toastStrip=i}setContent(e){this._content&&this.removeChild(this._content),this._content=e,e&&(e.className=`${e.className??``} adw-toast-overlay-content`.trim(),t.setColumn(e,0),t.setRow(e,0),this.insertChild(e,0))}addToast(e){this.showToast(e.title,{timeout:e.timeout,buttonLabel:e.buttonLabel})}showToast(e,t={}){this._dismissTimer&&=(clearTimeout(this._dismissTimer),null),this._toastLabel.text=e??``;let n=t.buttonLabel??``;n.length>0?(this._toastButton.text=n,this._hasButton||=(this._toastStrip.addChild(this._toastButton),!0)):this._hasButton&&=(this._toastStrip.removeChild(this._toastButton),!1),this._toastStrip.visibility=`visible`;let r=t.timeout??5e3;r>0&&(this._dismissTimer=setTimeout(()=>this._dismiss(),r))}dismiss(){this._dismiss()}_dismiss(){this._dismissTimer&&=(clearTimeout(this._dismissTimer),null),this._toastStrip.visibility=`collapse`}get visible(){return this._toastStrip.visibility===`visible`}};export{AdwToast,AdwToastOverlay,i as DEFAULT_TOAST_TIMEOUT,a as TOAST_BUTTON_CLICKED};
1
+ import"../_virtual/_rolldown/runtime.js";import{Button as e,GridLayout as t,ItemSpec as n,Label as r}from"@nativescript/core";import{AdwToast as i,AdwToast as a,AdwToastQueue as o,AdwToastQueue as s,DEFAULT_TOAST_TIMEOUT as c}from"@gjsify/adwaita-core";const l=`toastButtonClicked`,u={schedule:(e,t)=>setTimeout(e,t),cancel:e=>clearTimeout(e)};var AdwToastOverlay=class extends t{_content=null;_toastStrip;_toastLabel;_toastButton;_hasButton=!1;_queue;constructor(){super(),this.className=`adw-toast-overlay`,this.addColumn(new n(1,`star`)),this.addRow(new n(1,`star`));let i=new t;i.className=`adw-toast`,i.visibility=`collapse`,i.verticalAlignment=`bottom`,i.horizontalAlignment=`center`,i.addColumn(new n(1,`star`)),i.addColumn(new n(1,`auto`)),i.addRow(new n(1,`auto`)),t.setColumn(i,0),t.setRow(i,0);let a=new r;a.className=`adw-toast-title`,a.textWrap=!0,t.setColumn(a,0),i.addChild(a),this._toastLabel=a;let o=new e;o.className=`adw-toast-button`,o.set(`androidElevation`,0),t.setColumn(o,1),o.addEventListener(`tap`,()=>{let e={eventName:l,object:this};this.notify(e),this._queue.dismiss()}),this._toastButton=o,this.addChild(i),this._toastStrip=i,this._queue=new s({scheduler:u,onShow:e=>this._renderStrip(e),onHide:()=>{this._toastStrip.visibility=`collapse`}})}setContent(e){this._content&&this.removeChild(this._content),this._content=e,e&&(e.className=`${e.className??``} adw-toast-overlay-content`.trim(),t.setColumn(e,0),t.setRow(e,0),this.insertChild(e,0))}addToast(e){this._queue.add(e)}showToast(e,t={}){this._queue.add(new a(e??``,t))}dismiss(){this._queue.dismiss()}_renderStrip(e){this._toastLabel.text=e.title,e.hasButton?(this._toastButton.text=e.buttonLabel,this._hasButton||=(this._toastStrip.addChild(this._toastButton),!0)):this._hasButton&&=(this._toastStrip.removeChild(this._toastButton),!1),this._toastStrip.visibility=`visible`}get visible(){return this._queue.showing}};export{i as AdwToast,AdwToastOverlay,o as AdwToastQueue,c as DEFAULT_TOAST_TIMEOUT,l as TOAST_BUTTON_CLICKED};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{Label as t,StackLayout as n}from"@nativescript/core";const r=`notify::selected`;var AdwToggleGroup=class extends n{_toggles=[];_segments=[];_selected=0;constructor(){super(),this.orientation=`horizontal`,this.className=`adw-toggle-group`,this.horizontalAlignment=`center`}get options(){return this._toggles.map(e=>e.label)}set options(e){this.setToggles((Array.isArray(e)?e:[]).map(e=>({label:e})))}setToggles(r){for(let e of this._segments)this.removeChild(e);this._segments.length=0,this._toggles=Array.isArray(r)?r:[],this._toggles.forEach((r,i)=>{let a=new n;if(a.orientation=`horizontal`,a.className=`adw-toggle-button`,a.horizontalAlignment=`center`,r.icon){let t=new e;t.className=`${t.className} adw-toggle-icon`.trim(),t.verticalAlignment=`middle`,t.icon=r.icon,a.addChild(t)}let o=new t;o.text=r.label,o.className=`adw-toggle-label`,o.verticalAlignment=`middle`,a.addChild(o),a.addEventListener(`tap`,()=>{this.selected=i}),this.addChild(a),this._segments.push(a)}),this._selected>=this._toggles.length&&(this._selected=0),this._applySelection()}_applySelection(){this._segments.forEach((e,t)=>{e.className=t===this._selected?`adw-toggle-button active`:`adw-toggle-button`})}get selected(){return this._selected}set selected(e){let t=Number.isFinite(e)?e:0;if(t===this._selected||t<0||t>=this._toggles.length)return;this._selected=t,this._applySelection();let n={eventName:r,object:this,selected:t,value:this._toggles[t]?.label??``};this.notify(n)}get selectedValue(){return this._toggles[this._selected]?.label??``}};export{AdwToggleGroup,r as NOTIFY_SELECTED};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{Label as t,StackLayout as n}from"@nativescript/core";import{ToggleGroupState as r,ToggleGroupState as i}from"@gjsify/adwaita-core";const a=`notify::selected`;var AdwToggleGroup=class extends n{_toggles=[];_segments=[];_state=new i;constructor(){super(),this.orientation=`horizontal`,this.className=`adw-toggle-group`,this.horizontalAlignment=`center`,this._state.subscribe(e=>{this._applySelection();let t={eventName:a,object:this,selected:e.selected,value:e.value};this.notify(t)})}get options(){return this._toggles.map(e=>e.label)}set options(e){this.setToggles((Array.isArray(e)?e:[]).map(e=>({label:e})))}setToggles(r){for(let e of this._segments)this.removeChild(e);this._segments.length=0,this._toggles=Array.isArray(r)?r:[],this._toggles.forEach((r,i)=>{let a=new n;if(a.orientation=`horizontal`,a.className=`adw-toggle-button`,a.horizontalAlignment=`center`,r.icon){let t=new e;t.className=`${t.className} adw-toggle-icon`.trim(),t.verticalAlignment=`middle`,t.icon=r.icon,a.addChild(t)}let o=new t;o.text=r.label,o.className=`adw-toggle-label`,o.verticalAlignment=`middle`,a.addChild(o),a.addEventListener(`tap`,()=>{this._state.setSelected(i)}),this.addChild(a),this._segments.push(a)}),this._state.setLabels(this._toggles.map(e=>e.label)),this._applySelection()}_applySelection(){let e=this._state.selected;this._segments.forEach((t,n)=>{t.className=n===e?`adw-toggle-button active`:`adw-toggle-button`})}get selected(){return this._state.selected}set selected(e){this._state.setSelected(e)}get selectedValue(){return this._state.selectedValue}};export{AdwToggleGroup,a as NOTIFY_SELECTED,r as ToggleGroupState};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";const e=/^(min|max)-(width|height)\s*:\s*(\d+(?:\.\d+)?)\s*(px|sp|pt)?$/i;function isLeaf(e){return e.op===void 0}function splitOn(e,t){let n=0;for(let r=e.length-1;r>=0;r--){let i=e[r];if(i===`)`)n++;else if(i===`(`)n--;else if(n===0){let n=r-t.length+1;if(n>0&&r+1<e.length&&/\s/.test(e[n-1])&&/\s/.test(e[r+1])&&e.slice(n,r+1).toLowerCase()===t)return{left:e.slice(0,n),right:e.slice(r+1)}}}return null}function splitTopLevel(e){for(let t of[`or`,`and`]){let n=splitOn(e,t);if(n)return{op:t,...n}}return null}function parseBreakpointCondition(t){let n=t.trim();if(!n)return null;let r=splitTopLevel(n);if(r){let e=parseBreakpointCondition(r.left),t=parseBreakpointCondition(r.right);return!e||!t?null:{op:r.op,left:e,right:t}}if(n.startsWith(`(`)&&n.endsWith(`)`))return parseBreakpointCondition(n.slice(1,-1));let i=e.exec(n);return i?{bound:i[1].toLowerCase(),dimension:i[2].toLowerCase(),value:Number.parseFloat(i[3])}:null}function evaluateBreakpointCondition(e,t){if(isLeaf(e)){let n=e.dimension===`width`?t.width:t.height;return e.bound===`max`?n<=e.value:n>=e.value}let n=evaluateBreakpointCondition(e.left,t);return e.op===`and`?n&&evaluateBreakpointCondition(e.right,t):n||evaluateBreakpointCondition(e.right,t)}var AdwBreakpoint=class{condition;_handlers;_applied=!1;constructor(e,t){this.condition=typeof e==`string`?parseBreakpointCondition(e):e??null,this._handlers=t}get applied(){return this._applied}evaluate(e){let t=this.condition?evaluateBreakpointCondition(this.condition,e):!1;return t===this._applied?this._applied:(this._applied=t,t?this._handlers.onApply():this._handlers.onUnapply?.(),this._applied)}};function measureView(e){let t=e.getActualSize?.();return t&&t.width>0&&t.height>0?{width:t.width,height:t.height}:null}function addBreakpoints(e,t){let recompute=()=>{let n=measureView(e);if(n)for(let e of t)e.evaluate(n)};return e.addEventListener(`layoutChanged`,recompute),e.addEventListener(`loaded`,recompute),recompute(),()=>{e.removeEventListener(`layoutChanged`,recompute),e.removeEventListener(`loaded`,recompute)}}export{AdwBreakpoint,addBreakpoints,evaluateBreakpointCondition,parseBreakpointCondition};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwBreakpoint as e,evaluateBreakpointCondition as t,parseBreakpointCondition as n}from"@gjsify/adwaita-core";function measureView(e){let t=e.getActualSize?.();return t&&t.width>0&&t.height>0?{width:t.width,height:t.height}:null}function addBreakpoints(e,t){let recompute=()=>{let n=measureView(e);if(n)for(let e of t)e.evaluate(n)};return e.addEventListener(`layoutChanged`,recompute),e.addEventListener(`loaded`,recompute),recompute(),()=>{e.removeEventListener(`layoutChanged`,recompute),e.removeEventListener(`loaded`,recompute)}}export{e as AdwBreakpoint,addBreakpoints,t as evaluateBreakpointCondition,n as parseBreakpointCondition};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{DEFAULT_ICON_COLOR as e,DEFAULT_ICON_COLOR_DARK as t}from"./icon-path.js";let n=`light`;const r=new Set;function adwaitaColorScheme(){return n}function setAdwaitaColorScheme(e){let t=e===`dark`?`dark`:`light`;if(t!==n){n=t;for(let e of[...r])try{e()}catch{}}}function toggleAdwaitaColorScheme(){return setAdwaitaColorScheme(n===`dark`?`light`:`dark`),n}function themeIconColor(){return n===`dark`?t:e}function isThemeIconColor(e){return e===`#33333A`||e===`#FFFFFF`}function onAdwaitaColorSchemeChanged(e){return r.add(e),()=>{r.delete(e)}}export{adwaitaColorScheme,isThemeIconColor,onAdwaitaColorSchemeChanged,setAdwaitaColorScheme,themeIconColor,toggleAdwaitaColorScheme};
1
+ import{adwaitaColorScheme as e,isThemeIconColor as t,onAdwaitaColorSchemeChanged as n,setAdwaitaColorScheme as r,themeIconColor as i,toggleAdwaitaColorScheme as a}from"@gjsify/adwaita-core";export{e as adwaitaColorScheme,t as isThemeIconColor,n as onAdwaitaColorSchemeChanged,r as setAdwaitaColorScheme,i as themeIconColor,a as toggleAdwaitaColorScheme};
@@ -1,2 +1,2 @@
1
- import"../_virtual/_rolldown/runtime.js";const e=16,t=`#33333A`,n=`#FFFFFF`;function extractIconPaths(e){let t=[],n=/<path\b[^>]*>/g,r;for(;(r=n.exec(e))!==null;){let e=/\bd="([^"]*)"/.exec(r[0])?.[1]?.trim();if(!e)continue;let n=/\bfill-opacity="([^"]*)"/.exec(r[0])?.[1],i=n===void 0?1:Number.parseFloat(n);t.push({d:normalizeArcFlags(e),opacity:Number.isFinite(i)?Math.min(1,Math.max(0,i)):1})}return t}function extractPathData(e){return extractIconPaths(e).map(e=>e.d).join(` `)}function normalizeArcFlags(e){if(e.indexOf(`a`)===-1&&e.indexOf(`A`)===-1)return e;let t=e.length,isWs=e=>e===` `||e===`,`||e===` `||e===`
2
- `||e===`\r`,isNumStart=e=>e>=`0`&&e<=`9`||e===`.`||e===`+`||e===`-`,n=0,r=``,skipWs=()=>{for(;n<t&&isWs(e[n]);)n++},readNumber=()=>{let r=n;for((e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`.`)for(n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`e`||e[n]===`E`)for(n++,(e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;return e.slice(r,n)};for(;n<t;){let i=e[n];if(i===`a`||i===`A`)for(r+=i,n++;skipWs(),!(n>=t||!isNumStart(e[n]));)r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+e[n++],skipWs(),r+=` `+e[n++],skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber();else r+=i,n++}return r}export{e as ADWAITA_ICON_GRID,t as DEFAULT_ICON_COLOR,n as DEFAULT_ICON_COLOR_DARK,extractIconPaths,extractPathData,normalizeArcFlags};
1
+ import"../_virtual/_rolldown/runtime.js";import{DEFAULT_ICON_COLOR as e,DEFAULT_ICON_COLOR_DARK as t}from"@gjsify/adwaita-core";const n=16;function extractIconPaths(e){let t=[],n=/<path\b[^>]*>/g,r;for(;(r=n.exec(e))!==null;){let e=/\bd="([^"]*)"/.exec(r[0])?.[1]?.trim();if(!e)continue;let n=/\bfill-opacity="([^"]*)"/.exec(r[0])?.[1],i=n===void 0?1:Number.parseFloat(n);t.push({d:normalizeArcFlags(e),opacity:Number.isFinite(i)?Math.min(1,Math.max(0,i)):1})}return t}function extractPathData(e){return extractIconPaths(e).map(e=>e.d).join(` `)}function normalizeArcFlags(e){if(e.indexOf(`a`)===-1&&e.indexOf(`A`)===-1)return e;let t=e.length,isWs=e=>e===` `||e===`,`||e===` `||e===`
2
+ `||e===`\r`,isNumStart=e=>e>=`0`&&e<=`9`||e===`.`||e===`+`||e===`-`,n=0,r=``,skipWs=()=>{for(;n<t&&isWs(e[n]);)n++},readNumber=()=>{let r=n;for((e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`.`)for(n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`e`||e[n]===`E`)for(n++,(e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;return e.slice(r,n)};for(;n<t;){let i=e[n];if(i===`a`||i===`A`)for(r+=i,n++;skipWs(),!(n>=t||!isNumStart(e[n]));)r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+e[n++],skipWs(),r+=` `+e[n++],skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber();else r+=i,n++}return r}export{n as ADWAITA_ICON_GRID,e as DEFAULT_ICON_COLOR,t as DEFAULT_ICON_COLOR_DARK,extractIconPaths,extractPathData,normalizeArcFlags};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{ADWAITA_ICON_GRID as e,DEFAULT_ICON_COLOR as t,DEFAULT_ICON_COLOR_DARK as n,extractIconPaths as r,extractPathData as i}from"./icon-path.js";import{ImageSource as a,Screen as o}from"@nativescript/core";function renderSymbolicIcon(e,t){let n=android?.graphics,i=androidx?.core?.graphics?.PathParser;if(!n||!i)return null;let s=r(e);if(s.length===0)return null;let c=t?.size??16,l=o.mainScreen?.scale||1,u=Math.max(1,Math.round(c*l)),d=u/16,f=n.Bitmap.createBitmap(u,u,n.Bitmap.Config.ARGB_8888),p=new n.Canvas(f),m=n.Color.parseColor(t?.color??`#33333A`),h=new n.Paint;h.setAntiAlias(!0),h.setStyle(n.Paint.Style.FILL);let g=!1;for(let{d:e,opacity:t}of s){let r=null;try{r=i.createPathFromPathData(e)}catch{r=null}if(!r)continue;let a=new n.Matrix;a.setScale(d,d),r.transform(a),h.setColor(m),h.setAlpha(Math.round(255*t)),p.drawPath(r,h),g=!0}return g?new a(f):null}export{e as ADWAITA_ICON_GRID,t as DEFAULT_ICON_COLOR,n as DEFAULT_ICON_COLOR_DARK,r as extractIconPaths,i as extractPathData,renderSymbolicIcon};
1
+ import"../_virtual/_rolldown/runtime.js";import{ADWAITA_ICON_GRID as e,DEFAULT_ICON_COLOR as t,DEFAULT_ICON_COLOR_DARK as n,extractIconPaths as r,extractPathData as i}from"./icon-path.js";import{ImageSource as a,Screen as o}from"@nativescript/core";function renderSymbolicIcon(e,n){let i=android?.graphics,s=androidx?.core?.graphics?.PathParser;if(!i||!s)return null;let c=r(e);if(c.length===0)return null;let l=n?.size??16,u=o.mainScreen?.scale||1,d=Math.max(1,Math.round(l*u)),f=d/16,p=i.Bitmap.createBitmap(d,d,i.Bitmap.Config.ARGB_8888),m=new i.Canvas(p),h=i.Color.parseColor(n?.color??t),g=new i.Paint;g.setAntiAlias(!0),g.setStyle(i.Paint.Style.FILL);let _=!1;for(let{d:e,opacity:t}of c){let n=null;try{n=s.createPathFromPathData(e)}catch{n=null}if(!n)continue;let r=new i.Matrix;r.setScale(f,f),n.transform(r),g.setColor(h),g.setAlpha(Math.round(255*t)),m.drawPath(n,g),_=!0}return _?new a(p):null}export{e as ADWAITA_ICON_GRID,t as DEFAULT_ICON_COLOR,n as DEFAULT_ICON_COLOR_DARK,r as extractIconPaths,i as extractPathData,renderSymbolicIcon};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwPreferencesPage as e}from"./adw-preferences-page.js";import{AdwPreferencesGroup as t}from"./adw-preferences-group.js";import{AdwActionRow as n}from"./adw-action-row.js";import{AdwSwitchRow as r,NOTIFY_ACTIVE as i}from"./adw-switch-row.js";import{AdwEntryRow as a,NOTIFY_TEXT as o}from"./adw-entry-row.js";import{ADWAITA_ICON_GRID as s,DEFAULT_ICON_COLOR as c,DEFAULT_ICON_COLOR_DARK as ee,extractIconPaths as te,extractPathData as ne}from"./icon-path.js";import{adwaitaColorScheme as re,isThemeIconColor as ie,onAdwaitaColorSchemeChanged as ae,setAdwaitaColorScheme as oe,themeIconColor as se,toggleAdwaitaColorScheme as ce}from"./color-scheme.js";import{renderSymbolicIcon as l}from"./icons.js";import{attachRowPressFeedback as u}from"./row-press.js";import{AdwImageButton as d,DEFAULT_ICON_BUTTON_ICON_SIZE as f}from"./adw-image-button.js";import{AdwPasswordEntryRow as p}from"./adw-password-entry-row.js";import{AdwIcon as m,DEFAULT_ADW_ICON_SIZE as h}from"./adw-icon.js";import{AdwComboRow as g,NOTIFY_SELECTED as le}from"./adw-combo-row.js";import{AdwSpinRow as _,NOTIFY_VALUE as ue}from"./adw-spin-row.js";import{AdwSliderRow as v,NOTIFY_SLIDER_VALUE as de}from"./adw-slider-row.js";import{AdwExpanderRow as y,NOTIFY_EXPANDED as fe}from"./adw-expander-row.js";import{AdwButton as b}from"./adw-button.js";import{AdwMenuButton as x,MENU_ITEM_ACTIVATED as pe}from"./adw-menu-button.js";import{AdwBanner as S,BUTTON_CLICKED as me}from"./adw-banner.js";import{AdwAvatar as C,DEFAULT_AVATAR_SIZE as he,avatarInitials as ge}from"./adw-avatar.js";import{AdwWindowTitle as w}from"./adw-window-title.js";import{AdwClamp as T,DEFAULT_CLAMP_MAX_SIZE as _e}from"./adw-clamp.js";import{AdwHeaderBar as E}from"./adw-header-bar.js";import{AdwToolbarView as D}from"./adw-toolbar-view.js";import{AdwWrapBox as O}from"./adw-wrap-box.js";import{AdwSpinner as k,DEFAULT_SPINNER_SIZE as A}from"./adw-spinner.js";import{AdwStatusPage as j}from"./adw-status-page.js";import{ACTIVATED as M,AdwButtonRow as N}from"./adw-button-row.js";import{AdwButtonContent as P}from"./adw-button-content.js";import{AdwSplitButton as F,CLICKED as I,MENU_TAPPED as L}from"./adw-split-button.js";import{AdwToggleGroup as R,NOTIFY_SELECTED as ve}from"./adw-toggle-group.js";import{AdwViewStack as z,NOTIFY_VISIBLE_CHILD as ye}from"./adw-view-stack.js";import{AdwViewSwitcherBase as be,NOTIFY_SELECTED as xe}from"./view-switcher-base.js";import{AdwViewSwitcher as B}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as V}from"./adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as H}from"./adw-inline-view-switcher.js";import{AdwTabView as U}from"./adw-tab-view.js";import{AdwCarousel as W,DEFAULT_CAROUSEL_PAGE_WIDTH as Se,NOTIFY_POSITION as Ce}from"./adw-carousel.js";import{AdwNavigationView as G,NOTIFY_VISIBLE_PAGE as we}from"./adw-navigation-view.js";import{AdwSplitViewBase as Te,DEFAULT_SIDEBAR_WIDTH as Ee,NOTIFY_SHOW_SIDEBAR as De}from"./split-view-base.js";import{AdwNavigationSplitView as K}from"./adw-navigation-split-view.js";import{AdwOverlaySplitView as q}from"./adw-overlay-split-view.js";import{AdwSidebar as J,NOTIFY_SELECTED as Oe}from"./adw-sidebar.js";import{AdwBottomSheet as Y,NOTIFY_OPEN as ke}from"./adw-bottom-sheet.js";import{AdwToast as Ae,AdwToastOverlay as X,DEFAULT_TOAST_TIMEOUT as je,TOAST_BUTTON_CLICKED as Me}from"./adw-toast-overlay.js";import{AdwAlertDialog as Ne,NOTIFY_RESPONSE as Pe}from"./adw-alert-dialog.js";import{AdwAboutDialog as Z,CLOSED as Fe}from"./adw-about-dialog.js";import{AdwPreferencesDialog as Q,CLOSED as Ie}from"./adw-preferences-dialog.js";import{AdwBreakpoint as Le,addBreakpoints as Re,evaluateBreakpointCondition as ze,parseBreakpointCondition as Be}from"./breakpoint.js";const Ve={AdwPreferencesPage:e,AdwPreferencesGroup:t,AdwActionRow:n,AdwSwitchRow:r,AdwEntryRow:a,AdwPasswordEntryRow:p,AdwComboRow:g,AdwSpinRow:_,AdwSliderRow:v,AdwExpanderRow:y,AdwButton:b,AdwImageButton:d,AdwMenuButton:x,AdwIcon:m,AdwBanner:S,AdwAvatar:C,AdwWindowTitle:w,AdwClamp:T,AdwHeaderBar:E,AdwToolbarView:D,AdwWrapBox:O,AdwSpinner:k,AdwStatusPage:j,AdwButtonRow:N,AdwButtonContent:P,AdwSplitButton:F,AdwToggleGroup:R,AdwViewStack:z,AdwViewSwitcher:B,AdwViewSwitcherBar:V,AdwInlineViewSwitcher:H,AdwTabView:U,AdwCarousel:W,AdwNavigationView:G,AdwNavigationSplitView:K,AdwOverlaySplitView:q,AdwSidebar:J,AdwBottomSheet:Y,AdwToastOverlay:X,AdwAboutDialog:Z,AdwPreferencesDialog:Q};let $=!1;function registerAdwaitaElements(){if(!$&&typeof registerElement==`function`){for(let[e,t]of Object.entries(Ve))registerElement(e,()=>t);$=!0}}export{Fe as ABOUT_CLOSED,M as ACTIVATED,s as ADWAITA_ICON_GRID,Z as AdwAboutDialog,n as AdwActionRow,Ne as AdwAlertDialog,C as AdwAvatar,S as AdwBanner,Y as AdwBottomSheet,Le as AdwBreakpoint,b as AdwButton,P as AdwButtonContent,N as AdwButtonRow,W as AdwCarousel,T as AdwClamp,g as AdwComboRow,a as AdwEntryRow,y as AdwExpanderRow,E as AdwHeaderBar,m as AdwIcon,d as AdwImageButton,H as AdwInlineViewSwitcher,x as AdwMenuButton,K as AdwNavigationSplitView,G as AdwNavigationView,q as AdwOverlaySplitView,p as AdwPasswordEntryRow,Q as AdwPreferencesDialog,t as AdwPreferencesGroup,e as AdwPreferencesPage,J as AdwSidebar,v as AdwSliderRow,_ as AdwSpinRow,k as AdwSpinner,F as AdwSplitButton,Te as AdwSplitViewBase,j as AdwStatusPage,r as AdwSwitchRow,U as AdwTabView,Ae as AdwToast,X as AdwToastOverlay,R as AdwToggleGroup,D as AdwToolbarView,z as AdwViewStack,B as AdwViewSwitcher,V as AdwViewSwitcherBar,be as AdwViewSwitcherBase,w as AdwWindowTitle,O as AdwWrapBox,me as BUTTON_CLICKED,I as CLICKED,h as DEFAULT_ADW_ICON_SIZE,he as DEFAULT_AVATAR_SIZE,Se as DEFAULT_CAROUSEL_PAGE_WIDTH,_e as DEFAULT_CLAMP_MAX_SIZE,f as DEFAULT_ICON_BUTTON_ICON_SIZE,c as DEFAULT_ICON_COLOR,ee as DEFAULT_ICON_COLOR_DARK,Ee as DEFAULT_SIDEBAR_WIDTH,A as DEFAULT_SPINNER_SIZE,je as DEFAULT_TOAST_TIMEOUT,pe as MENU_ITEM_ACTIVATED,L as MENU_TAPPED,i as NOTIFY_ACTIVE,fe as NOTIFY_EXPANDED,ke as NOTIFY_OPEN,Ce as NOTIFY_POSITION,Pe as NOTIFY_RESPONSE,le as NOTIFY_SELECTED,De as NOTIFY_SHOW_SIDEBAR,Oe as NOTIFY_SIDEBAR_SELECTED,de as NOTIFY_SLIDER_VALUE,o as NOTIFY_TEXT,ve as NOTIFY_TOGGLE_SELECTED,ue as NOTIFY_VALUE,xe as NOTIFY_VIEW_SELECTED,ye as NOTIFY_VISIBLE_CHILD,we as NOTIFY_VISIBLE_PAGE,Ie as PREFERENCES_CLOSED,Me as TOAST_BUTTON_CLICKED,Re as addBreakpoints,re as adwaitaColorScheme,u as attachRowPressFeedback,ge as avatarInitials,ze as evaluateBreakpointCondition,te as extractIconPaths,ne as extractPathData,ie as isThemeIconColor,ae as onAdwaitaColorSchemeChanged,Be as parseBreakpointCondition,registerAdwaitaElements,l as renderSymbolicIcon,oe as setAdwaitaColorScheme,se as themeIconColor,ce as toggleAdwaitaColorScheme};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwPreferencesPage as e}from"./adw-preferences-page.js";import{AdwPreferencesGroup as t}from"./adw-preferences-group.js";import{AdwActionRow as n}from"./adw-action-row.js";import{AdwSwitchRow as r,NOTIFY_ACTIVE as i}from"./adw-switch-row.js";import{AdwEntryRow as a,NOTIFY_TEXT as o}from"./adw-entry-row.js";import{adwaitaColorScheme as s,isThemeIconColor as ee,onAdwaitaColorSchemeChanged as te,setAdwaitaColorScheme as ne,themeIconColor as re,toggleAdwaitaColorScheme as ie}from"./color-scheme.js";import{ADWAITA_ICON_GRID as ae,DEFAULT_ICON_COLOR as oe,DEFAULT_ICON_COLOR_DARK as se,extractIconPaths as c,extractPathData as l}from"./icon-path.js";import{renderSymbolicIcon as u}from"./icons.js";import{attachRowPressFeedback as d}from"./row-press.js";import{AdwImageButton as f,DEFAULT_ICON_BUTTON_ICON_SIZE as p}from"./adw-image-button.js";import{AdwPasswordEntryRow as m}from"./adw-password-entry-row.js";import{AdwIcon as h,DEFAULT_ADW_ICON_SIZE as ce}from"./adw-icon.js";import{AdwComboRow as g,ComboState as le,NOTIFY_SELECTED as ue}from"./adw-combo-row.js";import{AdwSpinRow as _,NOTIFY_VALUE as de,SpinState as fe}from"./adw-spin-row.js";import{AdwSliderRow as v,NOTIFY_SLIDER_VALUE as pe}from"./adw-slider-row.js";import{AdwExpanderRow as y,ExpanderState as me,NOTIFY_EXPANDED as he}from"./adw-expander-row.js";import{AdwButton as b}from"./adw-button.js";import{AdwMenuButton as x,MENU_ITEM_ACTIVATED as ge}from"./adw-menu-button.js";import{AdwBanner as S,BUTTON_CLICKED as _e}from"./adw-banner.js";import{AdwAvatar as C,DEFAULT_AVATAR_SIZE as ve,avatarInitials as ye}from"./adw-avatar.js";import{AdwWindowTitle as w}from"./adw-window-title.js";import{AdwClamp as T,DEFAULT_CLAMP_MAX_SIZE as E}from"./adw-clamp.js";import{AdwHeaderBar as D}from"./adw-header-bar.js";import{AdwToolbarView as O}from"./adw-toolbar-view.js";import{AdwWrapBox as k}from"./adw-wrap-box.js";import{AdwSpinner as A,DEFAULT_SPINNER_SIZE as j}from"./adw-spinner.js";import{AdwStatusPage as M}from"./adw-status-page.js";import{ACTIVATED as N,AdwButtonRow as P}from"./adw-button-row.js";import{AdwButtonContent as F}from"./adw-button-content.js";import{AdwSplitButton as I,CLICKED as be,MENU_TAPPED as xe}from"./adw-split-button.js";import{AdwToggleGroup as L,NOTIFY_SELECTED as Se,ToggleGroupState as Ce}from"./adw-toggle-group.js";import{AdwViewStack as R,NOTIFY_VISIBLE_CHILD as we}from"./adw-view-stack.js";import{AdwViewSwitcherBase as Te,NOTIFY_SELECTED as Ee}from"./view-switcher-base.js";import{AdwViewSwitcher as z}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as B}from"./adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as V}from"./adw-inline-view-switcher.js";import{AdwTabView as H}from"./adw-tab-view.js";import{AdwCarousel as U,DEFAULT_CAROUSEL_PAGE_WIDTH as De,NOTIFY_POSITION as Oe}from"./adw-carousel.js";import{AdwNavigationView as W,NOTIFY_VISIBLE_PAGE as ke}from"./adw-navigation-view.js";import{AdwSplitViewBase as Ae,DEFAULT_SIDEBAR_WIDTH as je,NOTIFY_SHOW_SIDEBAR as Me}from"./split-view-base.js";import{AdwNavigationSplitView as G}from"./adw-navigation-split-view.js";import{AdwOverlaySplitView as K}from"./adw-overlay-split-view.js";import{AdwSidebar as q,NOTIFY_SELECTED as Ne}from"./adw-sidebar.js";import{AdwBottomSheet as J,NOTIFY_OPEN as Pe}from"./adw-bottom-sheet.js";import{AdwToast as Fe,AdwToastOverlay as Y,AdwToastQueue as Ie,DEFAULT_TOAST_TIMEOUT as Le,TOAST_BUTTON_CLICKED as X}from"./adw-toast-overlay.js";import{AdwAlertDialog as Re,AdwAlertResponses as ze,NOTIFY_RESPONSE as Be}from"./adw-alert-dialog.js";import{AdwAboutDialog as Z,CLOSED as Ve}from"./adw-about-dialog.js";import{AdwPreferencesDialog as Q,CLOSED as He}from"./adw-preferences-dialog.js";import{AdwBreakpoint as Ue,addBreakpoints as We,evaluateBreakpointCondition as Ge,parseBreakpointCondition as Ke}from"./breakpoint.js";const qe={AdwPreferencesPage:e,AdwPreferencesGroup:t,AdwActionRow:n,AdwSwitchRow:r,AdwEntryRow:a,AdwPasswordEntryRow:m,AdwComboRow:g,AdwSpinRow:_,AdwSliderRow:v,AdwExpanderRow:y,AdwButton:b,AdwImageButton:f,AdwMenuButton:x,AdwIcon:h,AdwBanner:S,AdwAvatar:C,AdwWindowTitle:w,AdwClamp:T,AdwHeaderBar:D,AdwToolbarView:O,AdwWrapBox:k,AdwSpinner:A,AdwStatusPage:M,AdwButtonRow:P,AdwButtonContent:F,AdwSplitButton:I,AdwToggleGroup:L,AdwViewStack:R,AdwViewSwitcher:z,AdwViewSwitcherBar:B,AdwInlineViewSwitcher:V,AdwTabView:H,AdwCarousel:U,AdwNavigationView:W,AdwNavigationSplitView:G,AdwOverlaySplitView:K,AdwSidebar:q,AdwBottomSheet:J,AdwToastOverlay:Y,AdwAboutDialog:Z,AdwPreferencesDialog:Q};let $=!1;function registerAdwaitaElements(){if(!$&&typeof registerElement==`function`){for(let[e,t]of Object.entries(qe))registerElement(e,()=>t);$=!0}}export{Ve as ABOUT_CLOSED,N as ACTIVATED,ae as ADWAITA_ICON_GRID,Z as AdwAboutDialog,n as AdwActionRow,Re as AdwAlertDialog,ze as AdwAlertResponses,C as AdwAvatar,S as AdwBanner,J as AdwBottomSheet,Ue as AdwBreakpoint,b as AdwButton,F as AdwButtonContent,P as AdwButtonRow,U as AdwCarousel,T as AdwClamp,g as AdwComboRow,a as AdwEntryRow,y as AdwExpanderRow,D as AdwHeaderBar,h as AdwIcon,f as AdwImageButton,V as AdwInlineViewSwitcher,x as AdwMenuButton,G as AdwNavigationSplitView,W as AdwNavigationView,K as AdwOverlaySplitView,m as AdwPasswordEntryRow,Q as AdwPreferencesDialog,t as AdwPreferencesGroup,e as AdwPreferencesPage,q as AdwSidebar,v as AdwSliderRow,_ as AdwSpinRow,A as AdwSpinner,I as AdwSplitButton,Ae as AdwSplitViewBase,M as AdwStatusPage,r as AdwSwitchRow,H as AdwTabView,Fe as AdwToast,Y as AdwToastOverlay,Ie as AdwToastQueue,L as AdwToggleGroup,O as AdwToolbarView,R as AdwViewStack,z as AdwViewSwitcher,B as AdwViewSwitcherBar,Te as AdwViewSwitcherBase,w as AdwWindowTitle,k as AdwWrapBox,_e as BUTTON_CLICKED,be as CLICKED,le as ComboState,ce as DEFAULT_ADW_ICON_SIZE,ve as DEFAULT_AVATAR_SIZE,De as DEFAULT_CAROUSEL_PAGE_WIDTH,E as DEFAULT_CLAMP_MAX_SIZE,p as DEFAULT_ICON_BUTTON_ICON_SIZE,oe as DEFAULT_ICON_COLOR,se as DEFAULT_ICON_COLOR_DARK,je as DEFAULT_SIDEBAR_WIDTH,j as DEFAULT_SPINNER_SIZE,Le as DEFAULT_TOAST_TIMEOUT,me as ExpanderState,ge as MENU_ITEM_ACTIVATED,xe as MENU_TAPPED,i as NOTIFY_ACTIVE,he as NOTIFY_EXPANDED,Pe as NOTIFY_OPEN,Oe as NOTIFY_POSITION,Be as NOTIFY_RESPONSE,ue as NOTIFY_SELECTED,Me as NOTIFY_SHOW_SIDEBAR,Ne as NOTIFY_SIDEBAR_SELECTED,pe as NOTIFY_SLIDER_VALUE,o as NOTIFY_TEXT,Se as NOTIFY_TOGGLE_SELECTED,de as NOTIFY_VALUE,Ee as NOTIFY_VIEW_SELECTED,we as NOTIFY_VISIBLE_CHILD,ke as NOTIFY_VISIBLE_PAGE,He as PREFERENCES_CLOSED,fe as SpinState,X as TOAST_BUTTON_CLICKED,Ce as ToggleGroupState,We as addBreakpoints,s as adwaitaColorScheme,d as attachRowPressFeedback,ye as avatarInitials,Ge as evaluateBreakpointCondition,c as extractIconPaths,l as extractPathData,ee as isThemeIconColor,te as onAdwaitaColorSchemeChanged,Ke as parseBreakpointCondition,registerAdwaitaElements,u as renderSymbolicIcon,ne as setAdwaitaColorScheme,re as themeIconColor,ie as toggleAdwaitaColorScheme};
@@ -1,6 +1,6 @@
1
1
  export { assertNativeScript, isNativeScript, isAndroid, isIOS } from '@gjsify/native-platform';
2
- export { AdwPreferencesPage, AdwPreferencesGroup, AdwActionRow, AdwSwitchRow, NOTIFY_ACTIVE, AdwEntryRow, NOTIFY_TEXT, AdwPasswordEntryRow, AdwComboRow, NOTIFY_SELECTED, AdwSpinRow, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, AdwExpanderRow, NOTIFY_EXPANDED, AdwButton, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, AdwMenuButton, MENU_ITEM_ACTIVATED, AdwIcon, DEFAULT_ADW_ICON_SIZE, AdwBanner, BUTTON_CLICKED, AdwAvatar, DEFAULT_AVATAR_SIZE, avatarInitials, AdwWindowTitle, AdwClamp, DEFAULT_CLAMP_MAX_SIZE, AdwHeaderBar, AdwToolbarView, AdwWrapBox, AdwSpinner, DEFAULT_SPINNER_SIZE, AdwStatusPage, AdwButtonRow, ACTIVATED, AdwButtonContent, AdwSplitButton, CLICKED, MENU_TAPPED, AdwToggleGroup, NOTIFY_TOGGLE_SELECTED, AdwViewStack, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, AdwViewSwitcher, AdwViewSwitcherBar, AdwInlineViewSwitcher, AdwTabView, AdwCarousel, DEFAULT_CAROUSEL_PAGE_WIDTH, NOTIFY_POSITION, AdwNavigationView, NOTIFY_VISIBLE_PAGE, AdwSplitViewBase, DEFAULT_SIDEBAR_WIDTH, NOTIFY_SHOW_SIDEBAR, AdwNavigationSplitView, AdwOverlaySplitView, AdwSidebar, NOTIFY_SIDEBAR_SELECTED, AdwBottomSheet, NOTIFY_OPEN, AdwToast, AdwToastOverlay, DEFAULT_TOAST_TIMEOUT, TOAST_BUTTON_CLICKED, AdwAlertDialog, NOTIFY_RESPONSE, AdwAboutDialog, ABOUT_CLOSED, AdwPreferencesDialog, PREFERENCES_CLOSED, attachRowPressFeedback, renderSymbolicIcon, extractIconPaths, extractPathData, ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, parseBreakpointCondition, registerAdwaitaElements, } from './widgets/index.js';
3
- export type { NotifyActiveEventData, NotifyTextEventData, AdwComboOption, NotifySelectedEventData, NotifyValueEventData, NotifySliderValueEventData, NotifyExpandedEventData, AdwButtonVariant, AdwMenuItem, MenuItemActivatedEventData, MenuTappedEventData, NotifyToggleSelectedEventData, AdwViewStackPage, NotifyVisibleChildEventData, AdwViewPage, NotifyViewSelectedEventData, NotifyPositionEventData, NotifyVisiblePageEventData, NotifyShowSidebarEventData, NotifySidebarSelectedEventData, NotifyOpenEventData, AdwToastOptions, NotifyResponseEventData, SymbolicIconOptions, IconPath, AdwColorScheme, AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './widgets/index.js';
2
+ export { AdwPreferencesPage, AdwPreferencesGroup, AdwActionRow, AdwSwitchRow, NOTIFY_ACTIVE, AdwEntryRow, NOTIFY_TEXT, AdwPasswordEntryRow, AdwComboRow, ComboState, NOTIFY_SELECTED, AdwSpinRow, SpinState, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, AdwExpanderRow, ExpanderState, NOTIFY_EXPANDED, AdwButton, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, AdwMenuButton, MENU_ITEM_ACTIVATED, AdwIcon, DEFAULT_ADW_ICON_SIZE, AdwBanner, BUTTON_CLICKED, AdwAvatar, DEFAULT_AVATAR_SIZE, avatarInitials, AdwWindowTitle, AdwClamp, DEFAULT_CLAMP_MAX_SIZE, AdwHeaderBar, AdwToolbarView, AdwWrapBox, AdwSpinner, DEFAULT_SPINNER_SIZE, AdwStatusPage, AdwButtonRow, ACTIVATED, AdwButtonContent, AdwSplitButton, CLICKED, MENU_TAPPED, AdwToggleGroup, ToggleGroupState, NOTIFY_TOGGLE_SELECTED, AdwViewStack, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, AdwViewSwitcher, AdwViewSwitcherBar, AdwInlineViewSwitcher, AdwTabView, AdwCarousel, DEFAULT_CAROUSEL_PAGE_WIDTH, NOTIFY_POSITION, AdwNavigationView, NOTIFY_VISIBLE_PAGE, AdwSplitViewBase, DEFAULT_SIDEBAR_WIDTH, NOTIFY_SHOW_SIDEBAR, AdwNavigationSplitView, AdwOverlaySplitView, AdwSidebar, NOTIFY_SIDEBAR_SELECTED, AdwBottomSheet, NOTIFY_OPEN, AdwToast, AdwToastOverlay, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, TOAST_BUTTON_CLICKED, AdwAlertDialog, AdwAlertResponses, NOTIFY_RESPONSE, AdwAboutDialog, ABOUT_CLOSED, AdwPreferencesDialog, PREFERENCES_CLOSED, attachRowPressFeedback, renderSymbolicIcon, extractIconPaths, extractPathData, ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, parseBreakpointCondition, registerAdwaitaElements, } from './widgets/index.js';
3
+ export type { NotifyActiveEventData, NotifyTextEventData, AdwComboOption, ComboStateChange, ComboStateListener, NotifySelectedEventData, NotifyValueEventData, SpinStateChange, SpinStateListener, NotifySliderValueEventData, NotifyExpandedEventData, ExpanderStateListener, AdwButtonVariant, AdwMenuItem, MenuItemActivatedEventData, MenuTappedEventData, NotifyToggleSelectedEventData, ToggleGroupStateChange, ToggleGroupStateListener, AdwViewStackPage, NotifyVisibleChildEventData, AdwViewPage, NotifyViewSelectedEventData, NotifyPositionEventData, NotifyVisiblePageEventData, NotifyShowSidebarEventData, NotifySidebarSelectedEventData, NotifyOpenEventData, AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, NotifyResponseEventData, AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, OrderedConfirmResponses, SymbolicIconOptions, IconPath, AdwColorScheme, AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './widgets/index.js';
4
4
  export { ADWAITA_SANS_FONT_FAMILY, ADWAITA_SANS_TTF_FILES, adwaitaFontInstallInstructions, hasAdwaitaSans, } from './fonts.js';
5
5
  /**
6
6
  * One-call convenience setup for the Adwaita NativeScript layer.
@@ -1,2 +1,2 @@
1
- declare const _default_1: () => Promise<void>;
2
- export default _default_1;
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -1,4 +1,8 @@
1
1
  import { Observable, type EventData } from '@nativescript/core';
2
+ import { AdwAlertResponses } from '@gjsify/adwaita-core';
3
+ import type { AdwResponseAppearance, AdwResponseOptions } from '@gjsify/adwaita-core';
4
+ export { AdwAlertResponses } from '@gjsify/adwaita-core';
5
+ export type { AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, OrderedConfirmResponses, } from '@gjsify/adwaita-core';
2
6
  /** Event name emitted when a response is chosen. Mirrors GObject `notify::response`. */
3
7
  export declare const NOTIFY_RESPONSE = "notify::response";
4
8
  /** Payload of the `notify::response` event. */
@@ -6,16 +10,9 @@ export interface NotifyResponseEventData extends EventData {
6
10
  /** The chosen response id. */
7
11
  response: string;
8
12
  }
9
- interface ResponseInfo {
10
- id: string;
11
- label: string;
12
- }
13
13
  export declare class AdwAlertDialog extends Observable {
14
- private _heading;
15
- private _body;
14
+ /** The headless response registry + ordering + resolution (ADR 0004). */
16
15
  private readonly _responses;
17
- private _defaultResponse;
18
- private _closeResponse;
19
16
  constructor(heading?: string, body?: string);
20
17
  /** The dialog heading (title). */
21
18
  get heading(): string;
@@ -24,9 +21,17 @@ export declare class AdwAlertDialog extends Observable {
24
21
  get body(): string;
25
22
  set body(value: string);
26
23
  /** Register a response button (`id` is what `present()` resolves to). */
27
- addResponse(id: string, label: string): void;
24
+ addResponse(id: string, label: string, options?: AdwResponseOptions): void;
28
25
  /** Register many responses at once (`id, label, id, label, …`). */
29
26
  addResponses(...idLabelPairs: string[]): void;
27
+ /** Set a registered response's visual emphasis (suggested/destructive). */
28
+ setResponseAppearance(id: string, appearance: AdwResponseAppearance): void;
29
+ /** A registered response's emphasis (`'default'` for an unknown id). */
30
+ getResponseAppearance(id: string): AdwResponseAppearance;
31
+ /** Enable/disable a registered response. */
32
+ setResponseEnabled(id: string, enabled: boolean): void;
33
+ /** Whether a registered response is enabled (`true` for an unknown id). */
34
+ getResponseEnabled(id: string): boolean;
30
35
  /** The default (emphasised) response id, used as the OK button in `confirm()`. */
31
36
  get defaultResponse(): string | null;
32
37
  set defaultResponse(id: string | null);
@@ -34,7 +39,7 @@ export declare class AdwAlertDialog extends Observable {
34
39
  get closeResponse(): string;
35
40
  set closeResponse(id: string);
36
41
  /** The registered responses. */
37
- get responses(): ReadonlyArray<ResponseInfo>;
42
+ get responses(): AdwAlertResponses['responses'];
38
43
  /**
39
44
  * Present the dialog. Resolves to the chosen response id (or {@link closeResponse}
40
45
  * on dismissal). Uses a native `confirm()` for ≤3 responses, else an `action()`
@@ -42,7 +47,5 @@ export declare class AdwAlertDialog extends Observable {
42
47
  */
43
48
  present(): Promise<string>;
44
49
  private _presentConfirm;
45
- private _orderResponses;
46
50
  private _presentAction;
47
51
  }
48
- export {};
@@ -1,13 +1,9 @@
1
1
  import { Label, type EventData } from '@nativescript/core';
2
+ import type { AdwComboOption } from '@gjsify/adwaita-core';
2
3
  import { AdwActionRow } from './adw-action-row.js';
3
4
  import { AdwIcon } from './adw-icon.js';
4
- /** One selectable option in an {@link AdwComboRow}. */
5
- export interface AdwComboOption {
6
- /** Display label shown in the row + chooser. */
7
- label: string;
8
- /** Underlying value returned by {@link AdwComboRow.selectedValue}. */
9
- value: string;
10
- }
5
+ export { ComboState } from '@gjsify/adwaita-core';
6
+ export type { AdwComboOption, ComboStateChange, ComboStateListener } from '@gjsify/adwaita-core';
11
7
  /** Event name emitted when {@link AdwComboRow.selectedIndex} changes. Mirrors GObject `notify::selected`. */
12
8
  export declare const NOTIFY_SELECTED = "notify::selected";
13
9
  /** Payload of the `notify::selected` event. */
@@ -22,14 +18,11 @@ export declare class AdwComboRow extends AdwActionRow {
22
18
  protected readonly _valueLabel: Label;
23
19
  /** The down-chevron — a real Adwaita `pan-down-symbolic` icon. */
24
20
  protected readonly _chevron: AdwIcon;
25
- private _options;
26
- private _selectedIndex;
21
+ /** The headless options list + selectedIndex↔selectedValue state machine (ADR 0004). */
22
+ private readonly _state;
27
23
  constructor();
28
24
  /** Open the native action chooser and apply the picked option. */
29
25
  private _openChooser;
30
- /** Refresh the inline value label from the current selection. */
31
- private _syncValueLabel;
32
- private _emitSelected;
33
26
  /** The selectable options. Updates the inline value label. */
34
27
  get options(): AdwComboOption[];
35
28
  set options(value: AdwComboOption[]);
@@ -1,6 +1,8 @@
1
1
  import { ItemSpec, StackLayout, View, type EventData } from '@nativescript/core';
2
2
  import { AdwActionRow } from './adw-action-row.js';
3
3
  import { AdwIcon } from './adw-icon.js';
4
+ export { ExpanderState } from '@gjsify/adwaita-core';
5
+ export type { ExpanderStateListener } from '@gjsify/adwaita-core';
4
6
  /** Event name emitted when {@link AdwExpanderRow.expanded} changes. Mirrors GObject `notify::expanded`. */
5
7
  export declare const NOTIFY_EXPANDED = "notify::expanded";
6
8
  /** Payload of the `notify::expanded` event. */
@@ -13,7 +15,8 @@ export declare class AdwExpanderRow extends AdwActionRow {
13
15
  protected readonly _toggle: AdwIcon;
14
16
  /** The container of revealed child rows (second grid row). */
15
17
  protected readonly _disclosure: StackLayout;
16
- private _expanded;
18
+ /** The headless expanded/collapsed disclosure state machine (ADR 0004). */
19
+ private readonly _state;
17
20
  constructor();
18
21
  /** Append a child row (or any view) to the disclosure container. */
19
22
  addRow(viewOrSpec: View | ItemSpec): void;
@@ -1,6 +1,9 @@
1
- import { Label, type EventData } from '@nativescript/core';
1
+ import { Label } from '@nativescript/core';
2
+ import type { EventData } from '@nativescript/core';
2
3
  import { AdwActionRow } from './adw-action-row.js';
3
4
  import { AdwImageButton } from './adw-image-button.js';
5
+ export { SpinState } from '@gjsify/adwaita-core';
6
+ export type { SpinStateChange, SpinStateListener } from '@gjsify/adwaita-core';
4
7
  /** Event name emitted when {@link AdwSpinRow.value} changes. Mirrors GObject `notify::value`. */
5
8
  export declare const NOTIFY_VALUE = "notify::value";
6
9
  /** Payload of the `notify::value` event. */
@@ -15,14 +18,9 @@ export declare class AdwSpinRow extends AdwActionRow {
15
18
  protected readonly _plusButton: AdwImageButton;
16
19
  /** The value display before the stepper buttons. */
17
20
  protected readonly _valueLabel: Label;
18
- private _value;
19
- private _min;
20
- private _max;
21
- private _step;
21
+ /** The headless value/min/max/step clamp-and-step state machine (ADR 0004). */
22
+ private readonly _state;
22
23
  constructor();
23
- /** Apply a delta, clamp to `[min, max]`, update the label and emit `notify::value`. */
24
- private _bump;
25
- private _clamp;
26
24
  /** The current numeric value (always within `[min, max]`). */
27
25
  get value(): number;
28
26
  set value(v: number);
@@ -1,28 +1,10 @@
1
1
  import { Button, GridLayout, Label, View } from '@nativescript/core';
2
- /** Default toast lifetime, in milliseconds (Adwaita's default ≈ 5 s). */
3
- export declare const DEFAULT_TOAST_TIMEOUT = 5000;
2
+ import { AdwToast } from '@gjsify/adwaita-core';
3
+ import type { AdwToastOptions } from '@gjsify/adwaita-core';
4
+ export { AdwToast, AdwToastQueue, DEFAULT_TOAST_TIMEOUT } from '@gjsify/adwaita-core';
5
+ export type { AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, } from '@gjsify/adwaita-core';
4
6
  /** Event name emitted when a toast's action button is tapped. */
5
7
  export declare const TOAST_BUTTON_CLICKED = "toastButtonClicked";
6
- /** Options for {@link AdwToastOverlay.showToast}. */
7
- export interface AdwToastOptions {
8
- /** Auto-dismiss timeout in ms (0 = no auto-dismiss). Default {@link DEFAULT_TOAST_TIMEOUT}. */
9
- timeout?: number;
10
- /** Optional action button label. */
11
- buttonLabel?: string;
12
- }
13
- /**
14
- * A single transient toast descriptor. Mirrors `Adw.Toast` — a value object
15
- * (title + optional action) handed to {@link AdwToastOverlay.addToast}.
16
- */
17
- export declare class AdwToast {
18
- /** The toast message. */
19
- title: string;
20
- /** Auto-dismiss timeout in ms (0 = sticky). */
21
- timeout: number;
22
- /** Optional action button label (empty = no button). */
23
- buttonLabel: string;
24
- constructor(title?: string, options?: AdwToastOptions);
25
- }
26
8
  export declare class AdwToastOverlay extends GridLayout {
27
9
  /** The always-visible content layer. */
28
10
  private _content;
@@ -31,17 +13,19 @@ export declare class AdwToastOverlay extends GridLayout {
31
13
  protected readonly _toastLabel: Label;
32
14
  protected readonly _toastButton: Button;
33
15
  private _hasButton;
34
- private _dismissTimer;
16
+ /** The headless one-at-a-time + auto-dismiss state machine (ADR 0004). */
17
+ private readonly _queue;
35
18
  constructor();
36
19
  /** Set (or replace) the always-visible content layer (under the toast). */
37
20
  setContent(view: View | null): void;
38
- /** Show a {@link AdwToast} descriptor. */
21
+ /** Enqueue a {@link AdwToast} descriptor (shows now, or after the current one). */
39
22
  addToast(toast: AdwToast): void;
40
- /** Show a transient toast with the given message and options. */
23
+ /** Enqueue a transient toast with the given message and options. */
41
24
  showToast(title: string, options?: AdwToastOptions): void;
42
- /** Dismiss the current toast immediately. */
25
+ /** Dismiss the current toast immediately (advances to the next queued one). */
43
26
  dismiss(): void;
44
- private _dismiss;
27
+ /** Mount `toast` as the visible strip — the NS render half of the queue's `onShow`. */
28
+ private _renderStrip;
45
29
  /** Whether a toast is currently shown. */
46
30
  get visible(): boolean;
47
31
  }
@@ -1,4 +1,6 @@
1
1
  import { StackLayout, type EventData } from '@nativescript/core';
2
+ export { ToggleGroupState } from '@gjsify/adwaita-core';
3
+ export type { ToggleGroupStateChange, ToggleGroupStateListener } from '@gjsify/adwaita-core';
2
4
  /** Event name emitted when {@link AdwToggleGroup.selected} changes. Mirrors GObject `notify::selected`. */
3
5
  export declare const NOTIFY_SELECTED = "notify::selected";
4
6
  /** Payload of the `notify::selected` event. */
@@ -16,7 +18,8 @@ export interface AdwToggle {
16
18
  export declare class AdwToggleGroup extends StackLayout {
17
19
  private _toggles;
18
20
  private readonly _segments;
19
- private _selected;
21
+ /** The headless labels + selected-index state machine (ADR 0004). */
22
+ private readonly _state;
20
23
  constructor();
21
24
  /** The segment labels (icon-less). Setting them rebuilds the toggle group. */
22
25
  get options(): string[];
@@ -1,64 +1,7 @@
1
1
  import type { View } from '@nativescript/core';
2
- /** The two size axes a condition can test. */
3
- export type BreakpointDimension = 'width' | 'height';
4
- /** Whether a leaf is a lower (`min`) or upper (`max`) bound. */
5
- export type BreakpointBound = 'min' | 'max';
6
- /** A single `min-/max-width/height: <value>` comparison (value in DIPs). */
7
- export interface BreakpointConditionLeaf {
8
- dimension: BreakpointDimension;
9
- bound: BreakpointBound;
10
- /** Threshold in DIPs (the parsed `px` / `sp` / `pt` value). */
11
- value: number;
12
- }
13
- /** A boolean combination of two condition nodes. */
14
- export interface BreakpointConditionGroup {
15
- op: 'and' | 'or';
16
- left: BreakpointConditionNode;
17
- right: BreakpointConditionNode;
18
- }
19
- /** A parsed breakpoint condition: a leaf comparison or an and/or group. */
20
- export type BreakpointConditionNode = BreakpointConditionLeaf | BreakpointConditionGroup;
21
- /** A measured size in DIPs. */
22
- export interface BreakpointSize {
23
- width: number;
24
- height: number;
25
- }
26
- /**
27
- * Parse a Libadwaita breakpoint condition string into a {@link BreakpointConditionNode}.
28
- * Accepts a single comparison (`'max-width: 720sp'`), and/or chains
29
- * (`'max-width: 720sp and max-height: 480sp'`), and parenthesised groups. Units
30
- * are read as DIPs. Returns null when the string can't be parsed.
31
- */
32
- export declare function parseBreakpointCondition(spec: string): BreakpointConditionNode | null;
33
- /** Evaluate a parsed condition against a measured size (DIPs). */
34
- export declare function evaluateBreakpointCondition(node: BreakpointConditionNode, size: BreakpointSize): boolean;
35
- /** Callbacks run as a breakpoint's condition flips. */
36
- export interface AdwBreakpointHandlers {
37
- /** Run when the condition becomes true (the narrow/large state is entered). */
38
- onApply: () => void;
39
- /** Run when the condition becomes false again. Optional. */
40
- onUnapply?: () => void;
41
- }
42
- /**
43
- * A single responsive breakpoint: a condition plus apply/unapply callbacks.
44
- * Mirrors `Adw.Breakpoint`. Bind one or more to a view with {@link addBreakpoints}
45
- * (or drive {@link evaluate} yourself from a custom size source).
46
- */
47
- export declare class AdwBreakpoint {
48
- /** The parsed condition (null when an invalid string was passed). */
49
- readonly condition: BreakpointConditionNode | null;
50
- private _handlers;
51
- private _applied;
52
- constructor(condition: string | BreakpointConditionNode | null, handlers: AdwBreakpointHandlers);
53
- /** Whether the condition is currently satisfied (apply has fired, not unapply). */
54
- get applied(): boolean;
55
- /**
56
- * Re-evaluate against `size`, firing apply / unapply ONLY on a state change
57
- * (so a steady stream of layout passes doesn't re-run the callbacks). Returns
58
- * the post-evaluation applied state. A null condition never applies.
59
- */
60
- evaluate(size: BreakpointSize): boolean;
61
- }
2
+ import type { AdwBreakpoint } from '@gjsify/adwaita-core';
3
+ export { AdwBreakpoint, evaluateBreakpointCondition, parseBreakpointCondition, } from '@gjsify/adwaita-core';
4
+ export type { AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from '@gjsify/adwaita-core';
62
5
  /**
63
6
  * Bind breakpoints to a view so they re-evaluate on every layout pass (the NS
64
7
  * stand-in for Adwaita's window-size signal): the view's `layoutChanged` event
@@ -1,22 +1,2 @@
1
- /** The two Adwaita color schemes. */
2
- export type AdwColorScheme = 'light' | 'dark';
3
- /** The active color scheme (default `'light'`). */
4
- export declare function adwaitaColorScheme(): AdwColorScheme;
5
- /**
6
- * Set the active color scheme. A no-op when unchanged; otherwise notifies every
7
- * subscriber (so theme-aware icons re-render). The host app should also toggle
8
- * the `ns-dark` class on its root view for the CSS half.
9
- */
10
- export declare function setAdwaitaColorScheme(scheme: AdwColorScheme): void;
11
- /** Flip light↔dark and return the new scheme. */
12
- export declare function toggleAdwaitaColorScheme(): AdwColorScheme;
13
- /** The default symbolic-icon fill for the active scheme (dark fg on light, near-white on dark). */
14
- export declare function themeIconColor(): string;
15
- /** Whether `color` is the current scheme-default fill (i.e. not a caller-set explicit colour). */
16
- export declare function isThemeIconColor(color: string): boolean;
17
- /**
18
- * Subscribe to scheme changes. Returns an unsubscribe function. Icon widgets
19
- * subscribe while `loaded` and unsubscribe on `unloaded`, so the registry only
20
- * ever holds on-screen icons.
21
- */
22
- export declare function onAdwaitaColorSchemeChanged(listener: () => void): () => void;
1
+ export { adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, } from '@gjsify/adwaita-core';
2
+ export type { AdwColorScheme } from '@gjsify/adwaita-core';
@@ -1,9 +1,6 @@
1
1
  /** The native grid (viewBox) Adwaita symbolic icons are authored on: 16×16. */
2
2
  export declare const ADWAITA_ICON_GRID = 16;
3
- /** Default symbolic-icon fill for light theme — Adwaita's ~`rgba(0,0,0,0.8)` fg. */
4
- export declare const DEFAULT_ICON_COLOR = "#33333A";
5
- /** Default symbolic-icon fill for dark theme — near-white fg. */
6
- export declare const DEFAULT_ICON_COLOR_DARK = "#FFFFFF";
3
+ export { DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK } from '@gjsify/adwaita-core';
7
4
  /** Options for rendering a symbolic icon to a native image. */
8
5
  export interface SymbolicIconOptions {
9
6
  /** Rendered square size in DIPs (default {@link ADWAITA_ICON_GRID} = 16). */
@@ -6,14 +6,14 @@ export type { NotifyActiveEventData } from './adw-switch-row.js';
6
6
  export { AdwEntryRow, NOTIFY_TEXT } from './adw-entry-row.js';
7
7
  export type { NotifyTextEventData } from './adw-entry-row.js';
8
8
  export { AdwPasswordEntryRow } from './adw-password-entry-row.js';
9
- export { AdwComboRow, NOTIFY_SELECTED } from './adw-combo-row.js';
10
- export type { AdwComboOption, NotifySelectedEventData } from './adw-combo-row.js';
11
- export { AdwSpinRow, NOTIFY_VALUE } from './adw-spin-row.js';
12
- export type { NotifyValueEventData } from './adw-spin-row.js';
9
+ export { AdwComboRow, ComboState, NOTIFY_SELECTED } from './adw-combo-row.js';
10
+ export type { AdwComboOption, ComboStateChange, ComboStateListener, NotifySelectedEventData } from './adw-combo-row.js';
11
+ export { AdwSpinRow, NOTIFY_VALUE, SpinState } from './adw-spin-row.js';
12
+ export type { NotifyValueEventData, SpinStateChange, SpinStateListener } from './adw-spin-row.js';
13
13
  export { AdwSliderRow, NOTIFY_SLIDER_VALUE } from './adw-slider-row.js';
14
14
  export type { NotifySliderValueEventData } from './adw-slider-row.js';
15
- export { AdwExpanderRow, NOTIFY_EXPANDED } from './adw-expander-row.js';
16
- export type { NotifyExpandedEventData } from './adw-expander-row.js';
15
+ export { AdwExpanderRow, ExpanderState, NOTIFY_EXPANDED } from './adw-expander-row.js';
16
+ export type { ExpanderStateListener, NotifyExpandedEventData } from './adw-expander-row.js';
17
17
  export { AdwButton } from './adw-button.js';
18
18
  export type { AdwButtonVariant } from './adw-button.js';
19
19
  export { AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE } from './adw-image-button.js';
@@ -33,8 +33,8 @@ export { AdwButtonRow, ACTIVATED } from './adw-button-row.js';
33
33
  export { AdwButtonContent } from './adw-button-content.js';
34
34
  export { AdwSplitButton, CLICKED, MENU_TAPPED } from './adw-split-button.js';
35
35
  export type { MenuTappedEventData } from './adw-split-button.js';
36
- export { AdwToggleGroup, NOTIFY_SELECTED as NOTIFY_TOGGLE_SELECTED } from './adw-toggle-group.js';
37
- export type { NotifyToggleSelectedEventData } from './adw-toggle-group.js';
36
+ export { AdwToggleGroup, NOTIFY_SELECTED as NOTIFY_TOGGLE_SELECTED, ToggleGroupState } from './adw-toggle-group.js';
37
+ export type { NotifyToggleSelectedEventData, ToggleGroupStateChange, ToggleGroupStateListener, } from './adw-toggle-group.js';
38
38
  export { AdwViewStack, NOTIFY_VISIBLE_CHILD } from './adw-view-stack.js';
39
39
  export type { AdwViewStackPage, NotifyVisibleChildEventData } from './adw-view-stack.js';
40
40
  export { AdwViewSwitcherBase, NOTIFY_SELECTED as NOTIFY_VIEW_SELECTED } from './view-switcher-base.js';
@@ -55,10 +55,10 @@ export { AdwSidebar, NOTIFY_SELECTED as NOTIFY_SIDEBAR_SELECTED } from './adw-si
55
55
  export type { NotifySidebarSelectedEventData } from './adw-sidebar.js';
56
56
  export { AdwBottomSheet, NOTIFY_OPEN } from './adw-bottom-sheet.js';
57
57
  export type { NotifyOpenEventData } from './adw-bottom-sheet.js';
58
- export { AdwToast, AdwToastOverlay, DEFAULT_TOAST_TIMEOUT, TOAST_BUTTON_CLICKED } from './adw-toast-overlay.js';
59
- export type { AdwToastOptions } from './adw-toast-overlay.js';
60
- export { AdwAlertDialog, NOTIFY_RESPONSE } from './adw-alert-dialog.js';
61
- export type { NotifyResponseEventData } from './adw-alert-dialog.js';
58
+ export { AdwToast, AdwToastOverlay, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, TOAST_BUTTON_CLICKED, } from './adw-toast-overlay.js';
59
+ export type { AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, } from './adw-toast-overlay.js';
60
+ export { AdwAlertDialog, AdwAlertResponses, NOTIFY_RESPONSE } from './adw-alert-dialog.js';
61
+ export type { AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, NotifyResponseEventData, OrderedConfirmResponses, } from './adw-alert-dialog.js';
62
62
  export { AdwAboutDialog, CLOSED as ABOUT_CLOSED } from './adw-about-dialog.js';
63
63
  export { AdwPreferencesDialog, CLOSED as PREFERENCES_CLOSED } from './adw-preferences-dialog.js';
64
64
  export { attachRowPressFeedback } from './row-press.js';
@@ -66,7 +66,7 @@ export { ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, extract
66
66
  export type { IconPath, SymbolicIconOptions } from './icons.js';
67
67
  export { adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, } from './color-scheme.js';
68
68
  export type { AdwColorScheme } from './color-scheme.js';
69
- export { AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, parseBreakpointCondition, } from './breakpoint.js';
69
+ export { AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, parseBreakpointCondition } from './breakpoint.js';
70
70
  export type { AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './breakpoint.js';
71
71
  /**
72
72
  * Register all Adwaita widgets as NativeScript XML elements (idempotent).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/adwaita-nativescript",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
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",
@@ -47,9 +47,10 @@
47
47
  "design-system"
48
48
  ],
49
49
  "dependencies": {
50
- "@gjsify/adwaita-fonts": "^0.14.0",
51
- "@gjsify/adwaita-icons": "^0.14.0",
52
- "@gjsify/native-platform": "^0.14.0"
50
+ "@gjsify/adwaita-core": "^0.16.0",
51
+ "@gjsify/adwaita-fonts": "^0.16.0",
52
+ "@gjsify/adwaita-icons": "^0.16.0",
53
+ "@gjsify/native-platform": "^0.16.0"
53
54
  },
54
55
  "peerDependencies": {
55
56
  "@nativescript/core": "*"
@@ -60,8 +61,8 @@
60
61
  }
61
62
  },
62
63
  "devDependencies": {
63
- "@gjsify/cli": "^0.14.0",
64
- "@gjsify/unit": "^0.14.0",
64
+ "@gjsify/cli": "^0.16.0",
65
+ "@gjsify/unit": "^0.16.0",
65
66
  "@types/node": "^25.9.2",
66
67
  "typescript": "^6.0.3"
67
68
  },
@@ -72,6 +73,7 @@
72
73
  "browser": "none",
73
74
  "nativescript": "native"
74
75
  },
76
+ "tier": 2,
75
77
  "nativescriptPlatforms": [
76
78
  "android",
77
79
  "ios"