@gjsify/adwaita-nativescript 0.32.0 → 0.33.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 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{ACTIVATED as r,AdwActionRow as i}from"./widgets/adw-action-row.js";import{AdwSwitchRow as a,NOTIFY_ACTIVE as o}from"./widgets/adw-switch-row.js";import{adwaitaColorScheme as s,isThemeIconColor as c,onAdwaitaColorSchemeChanged as l,setAdwaitaColorScheme as u,themeIconColor as d,toggleAdwaitaColorScheme as f}from"./widgets/color-scheme.js";import{ADWAITA_ICON_GRID as p,DEFAULT_ICON_COLOR as m,DEFAULT_ICON_COLOR_DARK as h,extractIconPaths as g,extractPathData as _}from"./widgets/icon-path.js";import{renderSymbolicIcon as v}from"./widgets/icons.js";import{AdwIcon as y,DEFAULT_ADW_ICON_SIZE as b}from"./widgets/adw-icon.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{AdwEntryRow as w,NOTIFY_TEXT as T}from"./widgets/adw-entry-row.js";import{AdwPasswordEntryRow as E}from"./widgets/adw-password-entry-row.js";import{ACTIVATE as D,AdwEntry as O,NOTIFY_TEXT as k}from"./widgets/adw-entry.js";import{AdwComboRow as A,ComboState as j,NOTIFY_SELECTED as M}from"./widgets/adw-combo-row.js";import{AdwDropDown as N,NOTIFY_SELECTED as P}from"./widgets/adw-drop-down.js";import{AdwSpinRow as F,NOTIFY_VALUE as I,SpinState as L}from"./widgets/adw-spin-row.js";import{AdwSliderRow as R,NOTIFY_SLIDER_VALUE as z}from"./widgets/adw-slider-row.js";import{AdwExpanderRow as B,ExpanderState as V,NOTIFY_EXPANDED as H}from"./widgets/adw-expander-row.js";import{AdwButton as U}from"./widgets/adw-button.js";import{AdwMenuButton as W,MENU_ITEM_ACTIVATED as G}from"./widgets/adw-menu-button.js";import{DEFAULT_CLAMP_MAX_SIZE as K,DEFAULT_SPINNER_SIZE as q}from"./widgets/chrome.js";import{AdwBanner as J,BUTTON_CLICKED as Y}from"./widgets/adw-banner.js";import{avatarInitials as X}from"./widgets/avatar-color.js";import{AdwAvatar as Z,DEFAULT_AVATAR_SIZE as re}from"./widgets/adw-avatar.js";import{AdwWindowTitle as ie}from"./widgets/adw-window-title.js";import{AdwClamp as ae}from"./widgets/adw-clamp.js";import{AdwHeaderBar as oe}from"./widgets/adw-header-bar.js";import{AdwToolbarView as se}from"./widgets/adw-toolbar-view.js";import{AdwWrapBox as ce}from"./widgets/adw-wrap-box.js";import{DATA_GRID_HEADER_CELL_CLASS as le,DATA_GRID_HEADER_ROW_CLASS as ue,DATA_GRID_SECTION_CELL_CLASS as de,dataGridCellClass as fe,dataGridItemSpec as pe,dataGridRowClass as me,dataGridShapeKey as he,dataGridTracksKey as ge,parseDataGridWidth as _e}from"./widgets/data-grid-model.js";import{AdwDataGrid as ve,ROW_ACTIVATED as ye}from"./widgets/adw-data-grid.js";import{AdwSpinner as Q}from"./widgets/adw-spinner.js";import{AdwStatusPage as be}from"./widgets/adw-status-page.js";import{AdwButtonRow as xe}from"./widgets/adw-button-row.js";import{AdwButtonContent as Se}from"./widgets/adw-button-content.js";import{AdwSplitButton as Ce,CLICKED as we,MENU_TAPPED as Te}from"./widgets/adw-split-button.js";import{AdwToggleGroup as Ee,NOTIFY_SELECTED as De,ToggleGroupState as Oe}from"./widgets/adw-toggle-group.js";import{AdwViewStack as ke,NOTIFY_VISIBLE_CHILD as Ae}from"./widgets/adw-view-stack.js";import{AdwViewSwitcherBase as je,NOTIFY_SELECTED as Me}from"./widgets/view-switcher-base.js";import{AdwViewSwitcher as Ne}from"./widgets/adw-view-switcher.js";import{AdwViewSwitcherBar as Pe}from"./widgets/adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as Fe}from"./widgets/adw-inline-view-switcher.js";import{AdwTabView as Ie}from"./widgets/adw-tab-view.js";import{DEFAULT_CAROUSEL_PAGE_WIDTH as Le}from"./widgets/carousel-state.js";import{AdwCarousel as Re,NOTIFY_POSITION as ze}from"./widgets/adw-carousel.js";import{NOTIFY_VISIBLE_PAGE as Be}from"./widgets/navigation-stack.js";import{AdwNavigationView as Ve}from"./widgets/adw-navigation-view.js";import{AdwSplitViewBase as He,NOTIFY_SHOW_SIDEBAR as Ue}from"./widgets/split-view-base.js";import{NsNavigationSplitViewState as We,NsOverlaySplitViewState as Ge,splitViewColumns as Ke}from"./widgets/split-view-state.js";import{AdwNavigationSplitView as qe}from"./widgets/adw-navigation-split-view.js";import{AdwOverlaySplitView as Je}from"./widgets/adw-overlay-split-view.js";import{AdwSidebar as Ye,NOTIFY_SELECTED as Xe}from"./widgets/adw-sidebar.js";import{NOTIFY_OPEN as Ze}from"./widgets/bottom-sheet-state.js";import{AdwBottomSheet as Qe}from"./widgets/adw-bottom-sheet.js";import{AdwToast as $e,AdwToastOverlay as et,AdwToastQueue as tt,DEFAULT_TOAST_TIMEOUT as nt,TOAST_BUTTON_CLICKED as rt}from"./widgets/adw-toast-overlay.js";import{AdwAlertDialog as it,AdwAlertResponses as at,NOTIFY_RESPONSE as ot}from"./widgets/adw-alert-dialog.js";import{AdwAboutDialog as st,CLOSED as ct}from"./widgets/adw-about-dialog.js";import{AdwPreferencesDialog as lt,CLOSED as ut}from"./widgets/adw-preferences-dialog.js";import{AdwBreakpoint as dt,addBreakpoints as ft,evaluateBreakpointCondition as pt,parseBreakpointCondition as mt}from"./widgets/breakpoint.js";import{registerAdwaitaElements as $}from"./widgets/index.js";import{assertNativeScript as ht,assertNativeScript as gt,isAndroid as _t,isIOS as vt,isNativeScript as yt}from"@gjsify/native-platform";function registerAdwaita(){gt(),$()}export{ct as ABOUT_CLOSED,r as ACTIVATED,p as ADWAITA_ICON_GRID,ee as ADWAITA_SANS_FONT_FAMILY,te as ADWAITA_SANS_TTF_FILES,st as AdwAboutDialog,i as AdwActionRow,it as AdwAlertDialog,at as AdwAlertResponses,Z as AdwAvatar,J as AdwBanner,Qe as AdwBottomSheet,dt as AdwBreakpoint,U as AdwButton,Se as AdwButtonContent,xe as AdwButtonRow,Re as AdwCarousel,ae as AdwClamp,A as AdwComboRow,ve as AdwDataGrid,N as AdwDropDown,O as AdwEntry,w as AdwEntryRow,B as AdwExpanderRow,oe as AdwHeaderBar,y as AdwIcon,S as AdwImageButton,Fe as AdwInlineViewSwitcher,W as AdwMenuButton,qe as AdwNavigationSplitView,Ve as AdwNavigationView,Je as AdwOverlaySplitView,E as AdwPasswordEntryRow,lt as AdwPreferencesDialog,n as AdwPreferencesGroup,t as AdwPreferencesPage,Ye as AdwSidebar,R as AdwSliderRow,F as AdwSpinRow,Q as AdwSpinner,Ce as AdwSplitButton,He as AdwSplitViewBase,be as AdwStatusPage,a as AdwSwitchRow,Ie as AdwTabView,$e as AdwToast,et as AdwToastOverlay,tt as AdwToastQueue,Ee as AdwToggleGroup,se as AdwToolbarView,ke as AdwViewStack,Ne as AdwViewSwitcher,Pe as AdwViewSwitcherBar,je as AdwViewSwitcherBase,ie as AdwWindowTitle,ce as AdwWrapBox,Y as BUTTON_CLICKED,we as CLICKED,j as ComboState,le as DATA_GRID_HEADER_CELL_CLASS,ue as DATA_GRID_HEADER_ROW_CLASS,de as DATA_GRID_SECTION_CELL_CLASS,b as DEFAULT_ADW_ICON_SIZE,re as DEFAULT_AVATAR_SIZE,Le as DEFAULT_CAROUSEL_PAGE_WIDTH,K as DEFAULT_CLAMP_MAX_SIZE,C as DEFAULT_ICON_BUTTON_ICON_SIZE,m as DEFAULT_ICON_COLOR,h as DEFAULT_ICON_COLOR_DARK,q as DEFAULT_SPINNER_SIZE,nt as DEFAULT_TOAST_TIMEOUT,D as ENTRY_ACTIVATE,V as ExpanderState,G as MENU_ITEM_ACTIVATED,Te as MENU_TAPPED,o as NOTIFY_ACTIVE,P as NOTIFY_DROP_DOWN_SELECTED,k as NOTIFY_ENTRY_TEXT,H as NOTIFY_EXPANDED,Ze as NOTIFY_OPEN,ze as NOTIFY_POSITION,ot as NOTIFY_RESPONSE,M as NOTIFY_SELECTED,Ue as NOTIFY_SHOW_SIDEBAR,Xe as NOTIFY_SIDEBAR_SELECTED,z as NOTIFY_SLIDER_VALUE,T as NOTIFY_TEXT,De as NOTIFY_TOGGLE_SELECTED,I as NOTIFY_VALUE,Me as NOTIFY_VIEW_SELECTED,Ae as NOTIFY_VISIBLE_CHILD,Be as NOTIFY_VISIBLE_PAGE,We as NsNavigationSplitViewState,Ge as NsOverlaySplitViewState,ut as PREFERENCES_CLOSED,ye as ROW_ACTIVATED,L as SpinState,rt as TOAST_BUTTON_CLICKED,Oe as ToggleGroupState,ft as addBreakpoints,s as adwaitaColorScheme,ne as adwaitaFontInstallInstructions,ht as assertNativeScript,x as attachRowPressFeedback,X as avatarInitials,fe as dataGridCellClass,pe as dataGridItemSpec,me as dataGridRowClass,he as dataGridShapeKey,ge as dataGridTracksKey,pt as evaluateBreakpointCondition,g as extractIconPaths,_ as extractPathData,e as hasAdwaitaSans,_t as isAndroid,vt as isIOS,yt as isNativeScript,c as isThemeIconColor,l as onAdwaitaColorSchemeChanged,mt as parseBreakpointCondition,_e as parseDataGridWidth,registerAdwaita,$ as registerAdwaitaElements,v as renderSymbolicIcon,u as setAdwaitaColorScheme,Ke as splitViewColumns,d as themeIconColor,f 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{ACTIVATED as r,AdwActionRow as i}from"./widgets/adw-action-row.js";import{AdwSwitchRow as a,NOTIFY_ACTIVE as o}from"./widgets/adw-switch-row.js";import{adwaitaColorScheme as s,isThemeIconColor as c,onAdwaitaColorSchemeChanged as l,setAdwaitaColorScheme as u,themeIconColor as d,toggleAdwaitaColorScheme as f}from"./widgets/color-scheme.js";import{ADWAITA_ICON_GRID as p,DEFAULT_ICON_COLOR as m,DEFAULT_ICON_COLOR_DARK as h,extractIconPaths as g,extractPathData as _}from"./widgets/icon-path.js";import{renderSymbolicIcon as v}from"./widgets/icons.js";import{AdwIcon as y,DEFAULT_ADW_ICON_SIZE as b}from"./widgets/adw-icon.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{AdwEntryRow as w,NOTIFY_TEXT as T}from"./widgets/adw-entry-row.js";import{AdwPasswordEntryRow as E}from"./widgets/adw-password-entry-row.js";import{ACTIVATE as D,AdwEntry as O,NOTIFY_TEXT as k}from"./widgets/adw-entry.js";import{AdwComboRow as A,ComboState as j,NOTIFY_SELECTED as M}from"./widgets/adw-combo-row.js";import{AdwDropDown as N,NOTIFY_SELECTED as P}from"./widgets/adw-drop-down.js";import{AdwSpinRow as F,NOTIFY_VALUE as I,SpinState as L}from"./widgets/adw-spin-row.js";import{AdwSliderRow as R,NOTIFY_SLIDER_VALUE as z}from"./widgets/adw-slider-row.js";import{AdwExpanderRow as B,ExpanderState as V,NOTIFY_EXPANDED as H}from"./widgets/adw-expander-row.js";import{AdwButton as U}from"./widgets/adw-button.js";import{AdwMenuButton as W,MENU_ITEM_ACTIVATED as G}from"./widgets/adw-menu-button.js";import{DEFAULT_CLAMP_MAX_SIZE as K,DEFAULT_SPINNER_SIZE as q}from"./widgets/chrome.js";import{AdwBanner as J,BUTTON_CLICKED as Y}from"./widgets/adw-banner.js";import{avatarInitials as X}from"./widgets/avatar-color.js";import{AdwAvatar as Z,DEFAULT_AVATAR_SIZE as re}from"./widgets/adw-avatar.js";import{AdwWindowTitle as ie}from"./widgets/adw-window-title.js";import{AdwClamp as ae}from"./widgets/adw-clamp.js";import{AdwHeaderBar as oe}from"./widgets/adw-header-bar.js";import{AdwToolbarView as se}from"./widgets/adw-toolbar-view.js";import{AdwWrapBox as ce}from"./widgets/adw-wrap-box.js";import{DATA_GRID_HEADER_CELL_CLASS as le,DATA_GRID_HEADER_ROW_CLASS as ue,DATA_GRID_SECTION_CELL_CLASS as de,dataGridCellClass as fe,dataGridItemSpec as pe,dataGridRowClass as me,dataGridShapeKey as he,dataGridTracksKey as ge,parseDataGridWidth as _e}from"./widgets/data-grid-model.js";import{AdwDataGrid as ve,ROW_ACTIVATED as ye}from"./widgets/adw-data-grid.js";import{AdwSpinner as Q}from"./widgets/adw-spinner.js";import{AdwStatusPage as be}from"./widgets/adw-status-page.js";import{AdwButtonRow as xe}from"./widgets/adw-button-row.js";import{AdwButtonContent as Se}from"./widgets/adw-button-content.js";import{AdwSplitButton as Ce,CLICKED as we,MENU_TAPPED as Te}from"./widgets/adw-split-button.js";import{AdwToggleGroup as Ee,NOTIFY_SELECTED as De,ToggleGroupState as Oe}from"./widgets/adw-toggle-group.js";import{AdwViewStack as ke,NOTIFY_VISIBLE_CHILD as Ae}from"./widgets/adw-view-stack.js";import{AdwViewSwitcherBase as je,NOTIFY_SELECTED as Me}from"./widgets/view-switcher-base.js";import{AdwViewSwitcher as Ne}from"./widgets/adw-view-switcher.js";import{AdwViewSwitcherBar as Pe}from"./widgets/adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as Fe}from"./widgets/adw-inline-view-switcher.js";import{AdwTabView as Ie}from"./widgets/adw-tab-view.js";import{DEFAULT_CAROUSEL_PAGE_WIDTH as Le}from"./widgets/carousel-state.js";import{AdwCarousel as Re,NOTIFY_POSITION as ze}from"./widgets/adw-carousel.js";import{NOTIFY_VISIBLE_PAGE as Be}from"./widgets/navigation-stack.js";import{AdwNavigationView as Ve}from"./widgets/adw-navigation-view.js";import{NsNavigationSplitViewState as He,NsOverlaySplitViewState as Ue,splitViewColumns as We}from"./widgets/split-view-state.js";import{AdwSplitViewBase as Ge,NOTIFY_SHOW_SIDEBAR as Ke}from"./widgets/split-view-base.js";import{AdwNavigationSplitView as qe}from"./widgets/adw-navigation-split-view.js";import{AdwOverlaySplitView as Je}from"./widgets/adw-overlay-split-view.js";import{AdwSidebar as Ye,NOTIFY_SELECTED as Xe}from"./widgets/adw-sidebar.js";import{NOTIFY_OPEN as Ze}from"./widgets/bottom-sheet-state.js";import{AdwBottomSheet as Qe}from"./widgets/adw-bottom-sheet.js";import{AdwToast as $e,AdwToastOverlay as et,AdwToastQueue as tt,DEFAULT_TOAST_TIMEOUT as nt,TOAST_BUTTON_CLICKED as rt}from"./widgets/adw-toast-overlay.js";import{AdwAlertDialog as it,AdwAlertResponses as at,NOTIFY_RESPONSE as ot}from"./widgets/adw-alert-dialog.js";import{AdwAboutDialog as st,CLOSED as ct}from"./widgets/adw-about-dialog.js";import{AdwPreferencesDialog as lt,CLOSED as ut}from"./widgets/adw-preferences-dialog.js";import{AdwBreakpoint as dt,addBreakpoints as ft,evaluateBreakpointCondition as pt,parseBreakpointCondition as mt}from"./widgets/breakpoint.js";import{registerAdwaitaElements as $}from"./widgets/index.js";import{assertNativeScript as ht,assertNativeScript as gt,isAndroid as _t,isIOS as vt,isNativeScript as yt}from"@gjsify/native-platform";function registerAdwaita(){gt(),$()}export{ct as ABOUT_CLOSED,r as ACTIVATED,p as ADWAITA_ICON_GRID,ee as ADWAITA_SANS_FONT_FAMILY,te as ADWAITA_SANS_TTF_FILES,st as AdwAboutDialog,i as AdwActionRow,it as AdwAlertDialog,at as AdwAlertResponses,Z as AdwAvatar,J as AdwBanner,Qe as AdwBottomSheet,dt as AdwBreakpoint,U as AdwButton,Se as AdwButtonContent,xe as AdwButtonRow,Re as AdwCarousel,ae as AdwClamp,A as AdwComboRow,ve as AdwDataGrid,N as AdwDropDown,O as AdwEntry,w as AdwEntryRow,B as AdwExpanderRow,oe as AdwHeaderBar,y as AdwIcon,S as AdwImageButton,Fe as AdwInlineViewSwitcher,W as AdwMenuButton,qe as AdwNavigationSplitView,Ve as AdwNavigationView,Je as AdwOverlaySplitView,E as AdwPasswordEntryRow,lt as AdwPreferencesDialog,n as AdwPreferencesGroup,t as AdwPreferencesPage,Ye as AdwSidebar,R as AdwSliderRow,F as AdwSpinRow,Q as AdwSpinner,Ce as AdwSplitButton,Ge as AdwSplitViewBase,be as AdwStatusPage,a as AdwSwitchRow,Ie as AdwTabView,$e as AdwToast,et as AdwToastOverlay,tt as AdwToastQueue,Ee as AdwToggleGroup,se as AdwToolbarView,ke as AdwViewStack,Ne as AdwViewSwitcher,Pe as AdwViewSwitcherBar,je as AdwViewSwitcherBase,ie as AdwWindowTitle,ce as AdwWrapBox,Y as BUTTON_CLICKED,we as CLICKED,j as ComboState,le as DATA_GRID_HEADER_CELL_CLASS,ue as DATA_GRID_HEADER_ROW_CLASS,de as DATA_GRID_SECTION_CELL_CLASS,b as DEFAULT_ADW_ICON_SIZE,re as DEFAULT_AVATAR_SIZE,Le as DEFAULT_CAROUSEL_PAGE_WIDTH,K as DEFAULT_CLAMP_MAX_SIZE,C as DEFAULT_ICON_BUTTON_ICON_SIZE,m as DEFAULT_ICON_COLOR,h as DEFAULT_ICON_COLOR_DARK,q as DEFAULT_SPINNER_SIZE,nt as DEFAULT_TOAST_TIMEOUT,D as ENTRY_ACTIVATE,V as ExpanderState,G as MENU_ITEM_ACTIVATED,Te as MENU_TAPPED,o as NOTIFY_ACTIVE,P as NOTIFY_DROP_DOWN_SELECTED,k as NOTIFY_ENTRY_TEXT,H as NOTIFY_EXPANDED,Ze as NOTIFY_OPEN,ze as NOTIFY_POSITION,ot as NOTIFY_RESPONSE,M as NOTIFY_SELECTED,Ke as NOTIFY_SHOW_SIDEBAR,Xe as NOTIFY_SIDEBAR_SELECTED,z as NOTIFY_SLIDER_VALUE,T as NOTIFY_TEXT,De as NOTIFY_TOGGLE_SELECTED,I as NOTIFY_VALUE,Me as NOTIFY_VIEW_SELECTED,Ae as NOTIFY_VISIBLE_CHILD,Be as NOTIFY_VISIBLE_PAGE,He as NsNavigationSplitViewState,Ue as NsOverlaySplitViewState,ut as PREFERENCES_CLOSED,ye as ROW_ACTIVATED,L as SpinState,rt as TOAST_BUTTON_CLICKED,Oe as ToggleGroupState,ft as addBreakpoints,s as adwaitaColorScheme,ne as adwaitaFontInstallInstructions,ht as assertNativeScript,x as attachRowPressFeedback,X as avatarInitials,fe as dataGridCellClass,pe as dataGridItemSpec,me as dataGridRowClass,he as dataGridShapeKey,ge as dataGridTracksKey,pt as evaluateBreakpointCondition,g as extractIconPaths,_ as extractPathData,e as hasAdwaitaSans,_t as isAndroid,vt as isIOS,yt as isNativeScript,c as isThemeIconColor,l as onAdwaitaColorSchemeChanged,mt as parseBreakpointCondition,_e as parseDataGridWidth,registerAdwaita,$ as registerAdwaitaElements,v as renderSymbolicIcon,u as setAdwaitaColorScheme,We as splitViewColumns,d as themeIconColor,f as toggleAdwaitaColorScheme};
@@ -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{attachRowPressFeedback as n}from"./row-press.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 t;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()}),n(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
+ import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwIcon as t}from"./adw-icon.js";import{attachRowPressFeedback as n}from"./row-press.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 t;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,this._syncChooser(),e.interactive){let t={eventName:l,object:this,selected:e.selected,value:e.value};this.notify(t)}}),this.addEventListener(`tap`,()=>{this._openChooser()}),n(this),this._syncChooser()}_syncChooser(){this._chevron.visibility=this._state.presentsChooser?`visible`:`collapse`}async _openChooser(){if(!this._state.presentsChooser)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{AdwSplitViewBase as e}from"./split-view-base.js";import{NsNavigationSplitViewState as t,splitViewColumns as n}from"./split-view-state.js";import{GridLayout as r}from"@nativescript/core";var AdwNavigationSplitView=class extends e{constructor(){super(`adw-navigation-split-view`,`navigation`,new t),this._applyLayout()}_applyLayout(){if(!this._state.collapsed){let e=n(this._state.sidebarPosition);this._sidebar&&(this._sidebar.visibility=`visible`,this._sidebar.translateX=0,r.setColumn(this._sidebar,e.sidebar),r.setColumnSpan(this._sidebar,1),this._sidebar.width=this.sidebarWidth),this._content&&(this._content.visibility=`visible`,this._content.translateX=0,r.setColumn(this._content,e.content),r.setColumnSpan(this._content,1));return}let e=this._state.visiblePane;this._sidebar&&(this._sidebar.visibility=e===`sidebar`?`visible`:`collapse`,this._sidebar.translateX=0,r.setColumn(this._sidebar,0),r.setColumnSpan(this._sidebar,2),this._sidebar.width=`auto`),this._content&&(this._content.visibility=e===`content`?`visible`:`collapse`,this._content.translateX=0,r.setColumn(this._content,0),r.setColumnSpan(this._content,2))}_transitionSidebar(){if(!this._shouldAnimate()||!this._sidebar||!this._content){this._applyLayout();return}this._cancelPending();for(let e of[this._sidebar,this._content])r.setColumn(e,0),r.setColumnSpan(e,2);this._sidebar.width=`auto`;let e=this._paneWidth(),t=this._state.transition===`push`,n=this._state.visiblePane===`sidebar`?this._sidebar:this._content,i=n===this._sidebar?this._content:this._sidebar,a=t?e:-e,o=t?-e:e;n.visibility=`visible`,n.translateX=a,i.visibility=`visible`,i.translateX=0,this._track(n.animate({translate:{x:0,y:0},duration:200,curve:`easeOut`})),this._track(i.animate({translate:{x:o,y:0},duration:200,curve:`easeIn`})).then(()=>this._settleAfterSwap(n,i)).catch(()=>{})}_settleAfterSwap(e,t){(this._state.visiblePane===`sidebar`?this._sidebar:this._content)===e&&(t.visibility=`collapse`,t.translateX=0)}_paneWidth(){let e=this.getActualSize();return e&&e.width>0?e.width:1024}};export{AdwNavigationSplitView};
1
+ import"../_virtual/_rolldown/runtime.js";import{NsNavigationSplitViewState as e,splitViewColumns as t}from"./split-view-state.js";import{AdwSplitViewBase as n}from"./split-view-base.js";import{GridLayout as r}from"@nativescript/core";var i=class AdwNavigationSplitView extends n{constructor(){super(`adw-navigation-split-view`,`navigation`,new e({onCritical:e=>console.error(e),onDelegate:(e,t)=>{for(let n=this.parent;n;n=n.parent)if(n instanceof AdwNavigationSplitView)return(e===`push`?n.push(t):n.pop()).kind!==`not-found`;return!1}})),this._applyLayout()}_applyLayout(){if(!this._state.collapsed){let e=t(this._state.sidebarPosition,this.textDirection);this._sidebar&&(this._sidebar.visibility=`visible`,this._sidebar.translateX=0,r.setColumn(this._sidebar,e.sidebar),r.setColumnSpan(this._sidebar,1),this._sidebar.width=this.sidebarWidth),this._content&&(this._content.visibility=`visible`,this._content.translateX=0,r.setColumn(this._content,e.content),r.setColumnSpan(this._content,1));return}let e=this._state.visiblePane;this._sidebar&&(this._sidebar.visibility=e===`sidebar`?`visible`:`collapse`,this._sidebar.translateX=0,r.setColumn(this._sidebar,0),r.setColumnSpan(this._sidebar,2),this._sidebar.width=`auto`),this._content&&(this._content.visibility=e===`content`?`visible`:`collapse`,this._content.translateX=0,r.setColumn(this._content,0),r.setColumnSpan(this._content,2))}_transitionSidebar(){if(!this._shouldAnimate()||!this._sidebar||!this._content){this._applyLayout();return}this._cancelPending();for(let e of[this._sidebar,this._content])r.setColumn(e,0),r.setColumnSpan(e,2);this._sidebar.width=`auto`;let e=this._paneWidth(),t=this._state.transition===`push`,n=this._state.visiblePane===`sidebar`?this._sidebar:this._content,i=n===this._sidebar?this._content:this._sidebar,a=t?e:-e,o=t?-e:e;n.visibility=`visible`,n.translateX=a,i.visibility=`visible`,i.translateX=0,this._track(n.animate({translate:{x:0,y:0},duration:200,curve:`easeOut`})),this._track(i.animate({translate:{x:o,y:0},duration:200,curve:`easeIn`})).then(()=>this._settleAfterSwap(n,i)).catch(()=>{})}_settleAfterSwap(e,t){(this._state.visiblePane===`sidebar`?this._sidebar:this._content)===e&&(t.visibility=`collapse`,t.translateX=0)}_paneWidth(){let e=this.getActualSize();return e&&e.width>0?e.width:1024}get sidebarTag(){return this._state.sidebarTag}set sidebarTag(e){this._state.setTag(`sidebar`,e)}get contentTag(){return this._state.contentTag}set contentTag(e){this._state.setTag(`content`,e)}push(e){return this._state.push(e)}pop(){return this._state.pop()}get showContent(){return this._state.showContent}set showContent(e){this._state.showContent=e}};export{i as AdwNavigationSplitView};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwSplitViewBase as e}from"./split-view-base.js";import{NsOverlaySplitViewState as t,splitViewColumns as n}from"./split-view-state.js";import{GridLayout as r}from"@nativescript/core";var AdwOverlaySplitView=class extends e{_scrim=null;constructor(){super(`adw-overlay-split-view`,`overlay`,new t),this._applyLayout()}get pinSidebar(){return this._state.pinSidebar}set pinSidebar(e){this._state.setPinSidebar(!!e)}_applyLayout(){let e=n(this._state.sidebarPosition),t=this._state.sidebarPosition===`end`;if(!this._state.collapsed){this._detachScrim();let t=this._state.showSidebar;this._sidebar&&(this._sidebar.visibility=t?`visible`:`collapse`,this._sidebar.translateX=0,this._sidebar.opacity=1,r.setColumn(this._sidebar,e.sidebar),r.setColumnSpan(this._sidebar,1),this._sidebar.width=this.sidebarWidth,this._sidebar.className=this._paneClassName(this._sidebar.className,!1),this._sidebar.horizontalAlignment=`stretch`),this._content&&(this._content.visibility=`visible`,r.setColumn(this._content,t?e.content:0),r.setColumnSpan(this._content,t?1:2)),this._applyPaneFocus();return}this._content&&(this._content.visibility=`visible`,r.setColumn(this._content,0),r.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(r.setColumn(this._scrim,0),r.setColumnSpan(this._scrim,2),this._scrim.visibility=this._state.shieldVisible?`visible`:`collapse`,this._scrim.opacity=+!!this._state.shieldVisible),this._sidebar&&(r.setColumn(this._sidebar,0),r.setColumnSpan(this._sidebar,2),this._sidebar.width=this.sidebarWidth,this._sidebar.horizontalAlignment=t?`right`:`left`,this._sidebar.className=this._paneClassName(this._sidebar.className,!0),this._sidebar.visibility=this._state.showSidebar?`visible`:`collapse`,this._sidebar.translateX=this._state.showSidebar?0:this._hiddenOffset(),this._sidebar.opacity=1),this._applyPaneFocus()}_transitionSidebar(){if(!this._state.collapsed||!this._shouldAnimate()){this._applyLayout();return}this._cancelPending(),this._prepareCollapsedStructure(),this._applyPaneFocus(),this._state.showSidebar?this._animateOpen():this._animateClose()}_applyPaneFocus(){this._sidebar&&(this._sidebar.isUserInteractionEnabled=this._state.sidebarFocusable),this._content&&(this._content.isUserInteractionEnabled=this._state.contentFocusable)}_ensureScrim(){if(this._scrim)return this._scrim;let e=new r;return e.className=`adw-overlay-scrim`,e.visibility=`collapse`,e.opacity=0,e.addEventListener(`tap`,()=>this.hideSidebarPane()),this._scrim=e,e}_raiseOverlayChildren(){let e=this._ensureScrim();this._isChild(e)&&this.removeChild(e);let t=this._sidebar;t&&this._isChild(t)&&this.removeChild(t),this.addChild(e),t&&this.addChild(t)}_detachScrim(){this._scrim&&this._isChild(this._scrim)&&this.removeChild(this._scrim)}_prepareCollapsedStructure(){let e=this._state.sidebarPosition===`end`;this._content&&(this._content.visibility=`visible`,r.setColumn(this._content,0),r.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(r.setColumn(this._scrim,0),r.setColumnSpan(this._scrim,2)),this._sidebar&&(r.setColumn(this._sidebar,0),r.setColumnSpan(this._sidebar,2),this._sidebar.width=this.sidebarWidth,this._sidebar.horizontalAlignment=e?`right`:`left`,this._sidebar.className=this._paneClassName(this._sidebar.className,!0))}_animateOpen(){let e=this._scrim;e&&(e.visibility=`visible`,e.opacity=0,this._track(e.animate({opacity:1,duration:200,curve:`easeOut`})));let t=this._sidebar;t&&(t.visibility=`visible`,t.translateX=this._hiddenOffset(),t.opacity=1,this._track(t.animate({translate:{x:0,y:0},duration:200,curve:`easeOut`})))}_animateClose(){let e=this._scrim,t=this._sidebar,n=[];e&&n.push(this._track(e.animate({opacity:0,duration:200,curve:`easeIn`}))),t&&n.push(this._track(t.animate({translate:{x:this._hiddenOffset(),y:0},duration:200,curve:`easeIn`}))),Promise.all(n).then(()=>{this._state.showSidebar||(t&&(t.visibility=`collapse`),e&&(e.visibility=`collapse`))}).catch(()=>{})}_hiddenOffset(){let e=this.sidebarWidth;return this._state.sidebarPosition===`end`?e:-e}_paneClassName(e,t){return`${(e??``).split(/\s+/).filter(e=>e&&e!==`adw-overlay-active`&&e!==`adw-split-view-sidebar`).join(` `)} adw-split-view-sidebar${t?` adw-overlay-active`:``}`.trim()}};export{AdwOverlaySplitView};
1
+ import"../_virtual/_rolldown/runtime.js";import{NsOverlaySplitViewState as e,splitViewColumns as t}from"./split-view-state.js";import{AdwSplitViewBase as n}from"./split-view-base.js";import{GridLayout as r}from"@nativescript/core";var AdwOverlaySplitView=class extends n{_scrim=null;constructor(){super(`adw-overlay-split-view`,`overlay`,new e),this._applyLayout()}get pinSidebar(){return this._state.pinSidebar}set pinSidebar(e){this._state.setPinSidebar(!!e)}_applyLayout(){let e=t(this._state.sidebarPosition),n=this._state.sidebarPosition===`end`;if(!this._state.collapsed){this._detachScrim();let t=this._state.showSidebar;this._sidebar&&(this._sidebar.visibility=t?`visible`:`collapse`,this._sidebar.translateX=0,this._sidebar.opacity=1,r.setColumn(this._sidebar,e.sidebar),r.setColumnSpan(this._sidebar,1),this._sidebar.width=this.sidebarWidth,this._sidebar.className=this._paneClassName(this._sidebar.className,!1),this._sidebar.horizontalAlignment=`stretch`),this._content&&(this._content.visibility=`visible`,r.setColumn(this._content,t?e.content:0),r.setColumnSpan(this._content,t?1:2)),this._applyPaneFocus();return}this._content&&(this._content.visibility=`visible`,r.setColumn(this._content,0),r.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(r.setColumn(this._scrim,0),r.setColumnSpan(this._scrim,2),this._scrim.visibility=this._state.shieldVisible?`visible`:`collapse`,this._scrim.opacity=+!!this._state.shieldVisible),this._sidebar&&(r.setColumn(this._sidebar,0),r.setColumnSpan(this._sidebar,2),this._sidebar.width=this.sidebarWidth,this._sidebar.horizontalAlignment=n?`right`:`left`,this._sidebar.className=this._paneClassName(this._sidebar.className,!0),this._sidebar.visibility=this._state.showSidebar?`visible`:`collapse`,this._sidebar.translateX=this._state.showSidebar?0:this._hiddenOffset(),this._sidebar.opacity=1),this._applyPaneFocus()}_transitionSidebar(){if(!this._state.collapsed||!this._shouldAnimate()){this._applyLayout();return}this._cancelPending(),this._prepareCollapsedStructure(),this._applyPaneFocus(),this._state.showSidebar?this._animateOpen():this._animateClose()}_applyPaneFocus(){this._sidebar&&(this._sidebar.isUserInteractionEnabled=this._state.sidebarFocusable),this._content&&(this._content.isUserInteractionEnabled=this._state.contentFocusable)}_ensureScrim(){if(this._scrim)return this._scrim;let e=new r;return e.className=`adw-overlay-scrim`,e.visibility=`collapse`,e.opacity=0,e.addEventListener(`tap`,()=>this.hideSidebarPane()),this._scrim=e,e}_raiseOverlayChildren(){let e=this._ensureScrim();this._isChild(e)&&this.removeChild(e);let t=this._sidebar;t&&this._isChild(t)&&this.removeChild(t),this.addChild(e),t&&this.addChild(t)}_detachScrim(){this._scrim&&this._isChild(this._scrim)&&this.removeChild(this._scrim)}_prepareCollapsedStructure(){let e=this._state.sidebarPosition===`end`;this._content&&(this._content.visibility=`visible`,r.setColumn(this._content,0),r.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(r.setColumn(this._scrim,0),r.setColumnSpan(this._scrim,2)),this._sidebar&&(r.setColumn(this._sidebar,0),r.setColumnSpan(this._sidebar,2),this._sidebar.width=this.sidebarWidth,this._sidebar.horizontalAlignment=e?`right`:`left`,this._sidebar.className=this._paneClassName(this._sidebar.className,!0))}_animateOpen(){let e=this._scrim;e&&(e.visibility=`visible`,e.opacity=0,this._track(e.animate({opacity:1,duration:200,curve:`easeOut`})));let t=this._sidebar;t&&(t.visibility=`visible`,t.translateX=this._hiddenOffset(),t.opacity=1,this._track(t.animate({translate:{x:0,y:0},duration:200,curve:`easeOut`})))}_animateClose(){let e=this._scrim,t=this._sidebar,n=[];e&&n.push(this._track(e.animate({opacity:0,duration:200,curve:`easeIn`}))),t&&n.push(this._track(t.animate({translate:{x:this._hiddenOffset(),y:0},duration:200,curve:`easeIn`}))),Promise.all(n).then(()=>{this._state.showSidebar||(t&&(t.visibility=`collapse`),e&&(e.visibility=`collapse`))}).catch(()=>{})}_hiddenOffset(){let e=this.sidebarWidth;return this._state.sidebarPosition===`end`?e:-e}_paneClassName(e,t){return`${(e??``).split(/\s+/).filter(e=>e&&e!==`adw-overlay-active`&&e!==`adw-split-view-sidebar`).join(` `)} adw-split-view-sidebar${t?` adw-overlay-active`:``}`.trim()}};export{AdwOverlaySplitView};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{DEFAULT_SPINNER_SIZE as e,spinnerDiameter as t}from"./chrome.js";import{ActivityIndicator as n}from"@nativescript/core";var AdwSpinner=class extends n{_size=e;constructor(){super(),this.className=`adw-spinner`,this.busy=!0,this._applySize()}_applySize(){this.width=this._size,this.height=this._size}get spinning(){return this.busy}set spinning(e){this.busy=!!e}get size(){return this._size}set size(e){this._size=t(e),this._applySize()}};export{AdwSpinner,e as DEFAULT_SPINNER_SIZE};
1
+ import"../_virtual/_rolldown/runtime.js";import{DEFAULT_SPINNER_SIZE as e}from"./chrome.js";import{ActivityIndicator as t,GridLayout as n,ItemSpec as r}from"@nativescript/core";import{resolveSpinnerSize as i,spinnerGeometry as a}from"@gjsify/adwaita-core";var AdwSpinner=class extends n{_indicator;_size=e;_spinning=!0;constructor(){super(),this.className=`adw-spinner`,this.addRow(new r(1,`star`)),this.addColumn(new r(1,`star`));let e=new t;e.className=`adw-spinner-ring`,e.horizontalAlignment=`center`,e.verticalAlignment=`center`,this._indicator=e,this.addChild(e),this.accessibilityRole=`progressbar`,this.accessibilityState=`busy`,this.addEventListener(`loaded`,()=>this._applySpinning()),this.addEventListener(`unloaded`,()=>{this._indicator.busy=!1}),this._applySize(),this._applySpinning()}_applySize(){this.width=this._size,this.height=this._size;let{diameter:e}=a(this._size,this._size);this._indicator.width=e,this._indicator.height=e}_applySpinning(){let e=this.isLoaded!==!1;this._indicator.busy=this._spinning&&e}get spinning(){return this._spinning}set spinning(e){this._spinning=!!e,this._applySpinning()}get size(){return this._size}set size(e){this._size=i(e),this._applySize()}get ringDiameter(){return a(this._size,this._size).diameter}};export{AdwSpinner,e as DEFAULT_SPINNER_SIZE};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{normalizeWrapBoxSpacing as e,wrapBoxChildMargin as t,wrapBoxSpacingChanges as n}from"./wrap-box-layout.js";import{WrapLayout as r}from"@nativescript/core";var AdwWrapBox=class extends r{_childSpacing=0;_lineSpacing=0;constructor(){super(),this.className=`adw-wrap-box`,this.orientation=`horizontal`}add(e){this.addChild(e)}remove(e){this.removeChild(e)}addChild(e){super.addChild(e),this._applySpacing(e)}get childSpacing(){return this._childSpacing}set childSpacing(t){n(this._childSpacing,t)&&(this._childSpacing=e(t),this._applySpacingToChildren())}get lineSpacing(){return this._lineSpacing}set lineSpacing(t){n(this._lineSpacing,t)&&(this._lineSpacing=e(t),this._applySpacingToChildren())}_applySpacingToChildren(){for(let e=0;e<this.getChildrenCount();e++)this._applySpacing(this.getChildAt(e))}_applySpacing(e){e.set(`margin`,t(this._childSpacing,this._lineSpacing))}};export{AdwWrapBox};
1
+ import"../_virtual/_rolldown/runtime.js";import{DEFAULT_WRAP_BOX_SPACING as e,normalizeWrapBoxSpacing as t,wrapBoxChildFlex as n,wrapBoxChildMargin as r,wrapBoxFlexStyle as i,wrapBoxSpacingChanges as a}from"./wrap-box-layout.js";import{FlexboxLayout as o}from"@nativescript/core";import{ADW_WRAP_BOX_DEFAULT_ALIGN as s,ADW_WRAP_BOX_DEFAULT_JUSTIFY as c,ADW_WRAP_BOX_DEFAULT_LENGTH_UNIT as l,ADW_WRAP_BOX_DEFAULT_PACK_DIRECTION as u,ADW_WRAP_BOX_DEFAULT_WRAP_POLICY as d,ADW_WRAP_BOX_NATURAL_LINE_LENGTH_UNSET as f,normalizeNaturalLineLength as p,normalizeWrapBoxAlign as m,normalizeWrapBoxJustify as h,normalizeWrapBoxLengthUnit as g,normalizeWrapBoxPackDirection as _,normalizeWrapPolicy as v,resolveWrapBoxChildOrder as y,wrapBoxLengthToPx as b}from"@gjsify/adwaita-core";var AdwWrapBox=class extends o{_childSpacing=e;_lineSpacing=e;_childSpacingUnit=l;_lineSpacingUnit=l;_align=s;_justify=c;_justifyLastLine=!1;_lineHomogeneous=!1;_wrapReverse=!1;_wrapPolicy=d;_packDirection=u;_orientation=`horizontal`;_naturalLineLength=f;_naturalLineLengthUnit=l;constructor(){super(),this.className=`adw-wrap-box`,this._applyLayout()}add(e){this.addChild(e)}remove(e){this.removeChild(e)}removeAll(){this.removeChildren()}addChild(e){super.addChild(e),this._applyChildren()}insertChildAfter(e,t=null){return this._applyOrder(`insert-after`,e,t)}reorderChildAfter(e,t=null){return this._applyOrder(`reorder-after`,e,t)}_childViews(){let e=[];for(let t=0;t<this.getChildrenCount();t++)e.push(this.getChildAt(t));return e}_applyOrder(e,t,n){let r=this._childViews(),i=y({children:r,child:t,sibling:n,op:e});return i===null?!1:(r.includes(t)&&this.removeChild(t),this.insertChild(t,i.indexOf(t)),this._applyChildren(),!0)}get childSpacing(){return this._childSpacing}set childSpacing(e){a(this._childSpacing,e)&&(this._childSpacing=t(e),this._applyChildren(),this._notify(`child-spacing`))}get childSpacingUnit(){return this._childSpacingUnit}set childSpacingUnit(e){let t=g(e);t!==this._childSpacingUnit&&(this._childSpacingUnit=t,this._applyChildren(),this._notify(`child-spacing-unit`))}get lineSpacing(){return this._lineSpacing}set lineSpacing(e){a(this._lineSpacing,e)&&(this._lineSpacing=t(e),this._applyChildren(),this._notify(`line-spacing`))}get lineSpacingUnit(){return this._lineSpacingUnit}set lineSpacingUnit(e){let t=g(e);t!==this._lineSpacingUnit&&(this._lineSpacingUnit=t,this._applyChildren(),this._notify(`line-spacing-unit`))}get align(){return this._align}set align(e){let t=m(e);t!==this._align&&(this._align=t,this._applyLayout(),this._notify(`align`))}get justify(){return this._justify}set justify(e){let t=h(e);t!==this._justify&&(this._justify=t,this._applyLayout(),this._notify(`justify`))}get justifyLastLine(){return this._justifyLastLine}set justifyLastLine(e){let t=!!e;t!==this._justifyLastLine&&(this._justifyLastLine=t,this._applyLayout(),this._notify(`justify-last-line`))}get lineHomogeneous(){return this._lineHomogeneous}set lineHomogeneous(e){let t=!!e;t!==this._lineHomogeneous&&(this._lineHomogeneous=t,this._applyLayout(),this._notify(`line-homogeneous`))}get wrapReverse(){return this._wrapReverse}set wrapReverse(e){let t=!!e;t!==this._wrapReverse&&(this._wrapReverse=t,this._applyLayout(),this._notify(`wrap-reverse`))}get wrapPolicy(){return this._wrapPolicy}set wrapPolicy(e){let t=v(e);t!==this._wrapPolicy&&(this._wrapPolicy=t,this._applyLayout(),this._notify(`wrap-policy`))}get packDirection(){return this._packDirection}set packDirection(e){let t=_(e);t!==this._packDirection&&(this._packDirection=t,this._applyLayout(),this._notify(`pack-direction`))}get orientation(){return this._orientation}set orientation(e){let t=e===`vertical`?`vertical`:`horizontal`;t!==this._orientation&&(this._orientation=t,this._applyLayout(),this._notify(`orientation`))}get naturalLineLength(){return this._naturalLineLength}set naturalLineLength(e){let t=p(e);t!==this._naturalLineLength&&(this._naturalLineLength=t,this._notify(`natural-line-length`))}get naturalLineLengthUnit(){return this._naturalLineLengthUnit}set naturalLineLengthUnit(e){let t=g(e);t!==this._naturalLineLengthUnit&&(this._naturalLineLengthUnit=t,this._notify(`natural-line-length-unit`))}get naturalLineLengthPx(){return b(this._naturalLineLength,this._naturalLineLengthUnit)}_notify(e){this.notify({eventName:`notify::${e}`,object:this})}_flexInput(){return{orientation:this._orientation,packDirection:this._packDirection,wrapReverse:this._wrapReverse,justify:this._justify,justifyLastLine:this._justifyLastLine,align:this._align,lineHomogeneous:this._lineHomogeneous,wrapPolicy:this._wrapPolicy}}_applyLayout(){let e=i(this._flexInput());this.flexDirection=e.flexDirection,this.flexWrap=e.flexWrap,this.justifyContent=e.justifyContent,this.alignContent=e.alignContent,this.alignItems=`stretch`,this._applyChildren()}_applyChildren(){let e=r(b(this._childSpacing,this._childSpacingUnit),b(this._lineSpacing,this._lineSpacingUnit)),t=this._childViews(),i=n(this._flexInput(),t.length);for(let n of t)n.set(`margin`,e),o.setFlexGrow(n,i.flexGrow),o.setFlexShrink(n,i.flexShrink)}};export{AdwWrapBox};
@@ -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{ACTIVATED as ee,AdwActionRow as n}from"./adw-action-row.js";import{AdwSwitchRow as r,NOTIFY_ACTIVE as i}from"./adw-switch-row.js";import{adwaitaColorScheme as a,isThemeIconColor as te,onAdwaitaColorSchemeChanged as ne,setAdwaitaColorScheme as re,themeIconColor as ie,toggleAdwaitaColorScheme as ae}from"./color-scheme.js";import{ADWAITA_ICON_GRID as oe,DEFAULT_ICON_COLOR as se,DEFAULT_ICON_COLOR_DARK as ce,extractIconPaths as le,extractPathData as ue}from"./icon-path.js";import{renderSymbolicIcon as o}from"./icons.js";import{AdwIcon as s,DEFAULT_ADW_ICON_SIZE as c}from"./adw-icon.js";import{attachRowPressFeedback as l}from"./row-press.js";import{AdwImageButton as u,DEFAULT_ICON_BUTTON_ICON_SIZE as de}from"./adw-image-button.js";import{AdwEntryRow as d,NOTIFY_TEXT as fe}from"./adw-entry-row.js";import{AdwPasswordEntryRow as f}from"./adw-password-entry-row.js";import{ACTIVATE as pe,AdwEntry as p,NOTIFY_TEXT as me}from"./adw-entry.js";import{AdwComboRow as m,ComboState as he,NOTIFY_SELECTED as ge}from"./adw-combo-row.js";import{AdwDropDown as h,NOTIFY_SELECTED as _e}from"./adw-drop-down.js";import{AdwSpinRow as g,NOTIFY_VALUE as ve,SpinState as ye}from"./adw-spin-row.js";import{AdwSliderRow as _,NOTIFY_SLIDER_VALUE as be}from"./adw-slider-row.js";import{AdwExpanderRow as v,ExpanderState as xe,NOTIFY_EXPANDED as Se}from"./adw-expander-row.js";import{AdwButton as y}from"./adw-button.js";import{AdwMenuButton as b,MENU_ITEM_ACTIVATED as Ce}from"./adw-menu-button.js";import{DEFAULT_CLAMP_MAX_SIZE as we,DEFAULT_SPINNER_SIZE as Te}from"./chrome.js";import{AdwBanner as x,BUTTON_CLICKED as S}from"./adw-banner.js";import{avatarInitials as C}from"./avatar-color.js";import{AdwAvatar as w,DEFAULT_AVATAR_SIZE as T}from"./adw-avatar.js";import{AdwWindowTitle as E}from"./adw-window-title.js";import{AdwClamp as D}from"./adw-clamp.js";import{AdwHeaderBar as O}from"./adw-header-bar.js";import{AdwToolbarView as k}from"./adw-toolbar-view.js";import{AdwWrapBox as A}from"./adw-wrap-box.js";import{DATA_GRID_HEADER_CELL_CLASS as Ee,DATA_GRID_HEADER_ROW_CLASS as De,DATA_GRID_SECTION_CELL_CLASS as Oe,dataGridCellClass as ke,dataGridItemSpec as Ae,dataGridRowClass as je,dataGridShapeKey as Me,dataGridTracksKey as Ne,parseDataGridWidth as Pe}from"./data-grid-model.js";import{AdwDataGrid as j,ROW_ACTIVATED as Fe}from"./adw-data-grid.js";import{AdwSpinner as M}from"./adw-spinner.js";import{AdwStatusPage as N}from"./adw-status-page.js";import{AdwButtonRow as P}from"./adw-button-row.js";import{AdwButtonContent as F}from"./adw-button-content.js";import{AdwSplitButton as I,CLICKED as Ie,MENU_TAPPED as Le}from"./adw-split-button.js";import{AdwToggleGroup as L,NOTIFY_SELECTED as Re,ToggleGroupState as ze}from"./adw-toggle-group.js";import{AdwViewStack as R,NOTIFY_VISIBLE_CHILD as Be}from"./adw-view-stack.js";import{AdwViewSwitcherBase as Ve,NOTIFY_SELECTED as He}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{applyTabViewVisibility as H,createTabViewState as Ue,tabBarVisibility as We,tabCloseVisibilities as Ge,tabLabelText as Ke,tabPageVisibilities as qe,tabTooltipText as Je,tabViewNotifyPayload as Ye}from"./tab-view-state.js";import{AdwTabView as U,CLOSE_PAGE as Xe,NOTIFY_SELECTED_PAGE as Ze,PAGES_CHANGED as Qe}from"./adw-tab-view.js";import{CarouselScrollSync as $e,DEFAULT_CAROUSEL_PAGE_WIDTH as et,applyCarouselDots as tt,carouselDotClasses as nt,carouselNotifyPayload as rt,carouselPositionAtOffset as it,carouselScrollOffset as at,createCarouselState as ot,normalizeCarouselPageWidth as st}from"./carousel-state.js";import{AdwCarousel as W,NOTIFY_N_PAGES as ct,NOTIFY_POSITION as lt,PAGE_CHANGED as ut}from"./adw-carousel.js";import{NOTIFY_VISIBLE_PAGE as dt}from"./navigation-stack.js";import{AdwNavigationView as G}from"./adw-navigation-view.js";import{AdwSplitViewBase as ft,NOTIFY_SHOW_SIDEBAR as pt}from"./split-view-base.js";import{NsNavigationSplitViewState as mt,NsOverlaySplitViewState as ht,splitViewColumns as gt}from"./split-view-state.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 _t}from"./adw-sidebar.js";import{CLOSE_ATTEMPT as vt,NOTIFY_OPEN as yt,SHEET_CLOSE as bt}from"./bottom-sheet-state.js";import{AdwBottomSheet as Y}from"./adw-bottom-sheet.js";import{AdwToast as xt,AdwToastOverlay as X,AdwToastQueue as St,DEFAULT_TOAST_TIMEOUT as Ct,TOAST_BUTTON_CLICKED as wt}from"./adw-toast-overlay.js";import{AdwAlertDialog as Tt,AdwAlertResponses as Et,NOTIFY_RESPONSE as Dt}from"./adw-alert-dialog.js";import{AdwAboutDialog as Z,CLOSED as Ot}from"./adw-about-dialog.js";import{AdwPreferencesDialog as Q,CLOSED as kt}from"./adw-preferences-dialog.js";import{AdwBreakpoint as At,addBreakpoints as jt,evaluateBreakpointCondition as Mt,parseBreakpointCondition as Nt}from"./breakpoint.js";const Pt={AdwPreferencesPage:e,AdwPreferencesGroup:t,AdwActionRow:n,AdwSwitchRow:r,AdwEntryRow:d,AdwPasswordEntryRow:f,AdwEntry:p,AdwComboRow:m,AdwDropDown:h,AdwSpinRow:g,AdwSliderRow:_,AdwExpanderRow:v,AdwButton:y,AdwImageButton:u,AdwMenuButton:b,AdwIcon:s,AdwBanner:x,AdwAvatar:w,AdwWindowTitle:E,AdwClamp:D,AdwHeaderBar:O,AdwToolbarView:k,AdwWrapBox:A,AdwDataGrid:j,AdwSpinner:M,AdwStatusPage:N,AdwButtonRow:P,AdwButtonContent:F,AdwSplitButton:I,AdwToggleGroup:L,AdwViewStack:R,AdwViewSwitcher:z,AdwViewSwitcherBar:B,AdwInlineViewSwitcher:V,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(Pt))registerElement(e,()=>t);$=!0}}export{Ot as ABOUT_CLOSED,ee as ACTIVATED,oe as ADWAITA_ICON_GRID,Z as AdwAboutDialog,n as AdwActionRow,Tt as AdwAlertDialog,Et as AdwAlertResponses,w as AdwAvatar,x as AdwBanner,Y as AdwBottomSheet,At as AdwBreakpoint,y as AdwButton,F as AdwButtonContent,P as AdwButtonRow,W as AdwCarousel,D as AdwClamp,m as AdwComboRow,j as AdwDataGrid,h as AdwDropDown,p as AdwEntry,d as AdwEntryRow,v as AdwExpanderRow,O as AdwHeaderBar,s as AdwIcon,u as AdwImageButton,V as AdwInlineViewSwitcher,b as AdwMenuButton,K as AdwNavigationSplitView,G as AdwNavigationView,q as AdwOverlaySplitView,f as AdwPasswordEntryRow,Q as AdwPreferencesDialog,t as AdwPreferencesGroup,e as AdwPreferencesPage,J as AdwSidebar,_ as AdwSliderRow,g as AdwSpinRow,M as AdwSpinner,I as AdwSplitButton,ft as AdwSplitViewBase,N as AdwStatusPage,r as AdwSwitchRow,U as AdwTabView,xt as AdwToast,X as AdwToastOverlay,St as AdwToastQueue,L as AdwToggleGroup,k as AdwToolbarView,R as AdwViewStack,z as AdwViewSwitcher,B as AdwViewSwitcherBar,Ve as AdwViewSwitcherBase,E as AdwWindowTitle,A as AdwWrapBox,S as BUTTON_CLICKED,Ie as CLICKED,vt as CLOSE_ATTEMPT,Xe as CLOSE_PAGE,$e as CarouselScrollSync,he as ComboState,Ee as DATA_GRID_HEADER_CELL_CLASS,De as DATA_GRID_HEADER_ROW_CLASS,Oe as DATA_GRID_SECTION_CELL_CLASS,c as DEFAULT_ADW_ICON_SIZE,T as DEFAULT_AVATAR_SIZE,et as DEFAULT_CAROUSEL_PAGE_WIDTH,we as DEFAULT_CLAMP_MAX_SIZE,de as DEFAULT_ICON_BUTTON_ICON_SIZE,se as DEFAULT_ICON_COLOR,ce as DEFAULT_ICON_COLOR_DARK,Te as DEFAULT_SPINNER_SIZE,Ct as DEFAULT_TOAST_TIMEOUT,pe as ENTRY_ACTIVATE,xe as ExpanderState,Ce as MENU_ITEM_ACTIVATED,Le as MENU_TAPPED,i as NOTIFY_ACTIVE,_e as NOTIFY_DROP_DOWN_SELECTED,me as NOTIFY_ENTRY_TEXT,Se as NOTIFY_EXPANDED,ct as NOTIFY_N_PAGES,yt as NOTIFY_OPEN,lt as NOTIFY_POSITION,Dt as NOTIFY_RESPONSE,ge as NOTIFY_SELECTED,Ze as NOTIFY_SELECTED_PAGE,pt as NOTIFY_SHOW_SIDEBAR,_t as NOTIFY_SIDEBAR_SELECTED,be as NOTIFY_SLIDER_VALUE,fe as NOTIFY_TEXT,Re as NOTIFY_TOGGLE_SELECTED,ve as NOTIFY_VALUE,He as NOTIFY_VIEW_SELECTED,Be as NOTIFY_VISIBLE_CHILD,dt as NOTIFY_VISIBLE_PAGE,mt as NsNavigationSplitViewState,ht as NsOverlaySplitViewState,Qe as PAGES_CHANGED,ut as PAGE_CHANGED,kt as PREFERENCES_CLOSED,Fe as ROW_ACTIVATED,bt as SHEET_CLOSE,ye as SpinState,wt as TOAST_BUTTON_CLICKED,ze as ToggleGroupState,jt as addBreakpoints,a as adwaitaColorScheme,tt as applyCarouselDots,H as applyTabViewVisibility,l as attachRowPressFeedback,C as avatarInitials,nt as carouselDotClasses,rt as carouselNotifyPayload,it as carouselPositionAtOffset,at as carouselScrollOffset,ot as createCarouselState,Ue as createTabViewState,ke as dataGridCellClass,Ae as dataGridItemSpec,je as dataGridRowClass,Me as dataGridShapeKey,Ne as dataGridTracksKey,Mt as evaluateBreakpointCondition,le as extractIconPaths,ue as extractPathData,te as isThemeIconColor,st as normalizeCarouselPageWidth,ne as onAdwaitaColorSchemeChanged,Nt as parseBreakpointCondition,Pe as parseDataGridWidth,registerAdwaitaElements,o as renderSymbolicIcon,re as setAdwaitaColorScheme,gt as splitViewColumns,We as tabBarVisibility,Ge as tabCloseVisibilities,Ke as tabLabelText,qe as tabPageVisibilities,Je as tabTooltipText,Ye as tabViewNotifyPayload,ie as themeIconColor,ae 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{ACTIVATED as ee,AdwActionRow as n}from"./adw-action-row.js";import{AdwSwitchRow as r,NOTIFY_ACTIVE as i}from"./adw-switch-row.js";import{adwaitaColorScheme as a,isThemeIconColor as te,onAdwaitaColorSchemeChanged as ne,setAdwaitaColorScheme as re,themeIconColor as ie,toggleAdwaitaColorScheme as ae}from"./color-scheme.js";import{ADWAITA_ICON_GRID as oe,DEFAULT_ICON_COLOR as se,DEFAULT_ICON_COLOR_DARK as ce,extractIconPaths as le,extractPathData as ue}from"./icon-path.js";import{renderSymbolicIcon as o}from"./icons.js";import{AdwIcon as s,DEFAULT_ADW_ICON_SIZE as c}from"./adw-icon.js";import{attachRowPressFeedback as l}from"./row-press.js";import{AdwImageButton as u,DEFAULT_ICON_BUTTON_ICON_SIZE as de}from"./adw-image-button.js";import{AdwEntryRow as d,NOTIFY_TEXT as fe}from"./adw-entry-row.js";import{AdwPasswordEntryRow as f}from"./adw-password-entry-row.js";import{ACTIVATE as pe,AdwEntry as p,NOTIFY_TEXT as me}from"./adw-entry.js";import{AdwComboRow as m,ComboState as he,NOTIFY_SELECTED as ge}from"./adw-combo-row.js";import{AdwDropDown as h,NOTIFY_SELECTED as _e}from"./adw-drop-down.js";import{AdwSpinRow as g,NOTIFY_VALUE as ve,SpinState as ye}from"./adw-spin-row.js";import{AdwSliderRow as _,NOTIFY_SLIDER_VALUE as be}from"./adw-slider-row.js";import{AdwExpanderRow as v,ExpanderState as xe,NOTIFY_EXPANDED as Se}from"./adw-expander-row.js";import{AdwButton as y}from"./adw-button.js";import{AdwMenuButton as b,MENU_ITEM_ACTIVATED as Ce}from"./adw-menu-button.js";import{DEFAULT_CLAMP_MAX_SIZE as we,DEFAULT_SPINNER_SIZE as Te}from"./chrome.js";import{AdwBanner as x,BUTTON_CLICKED as S}from"./adw-banner.js";import{avatarInitials as C}from"./avatar-color.js";import{AdwAvatar as w,DEFAULT_AVATAR_SIZE as T}from"./adw-avatar.js";import{AdwWindowTitle as E}from"./adw-window-title.js";import{AdwClamp as D}from"./adw-clamp.js";import{AdwHeaderBar as O}from"./adw-header-bar.js";import{AdwToolbarView as k}from"./adw-toolbar-view.js";import{AdwWrapBox as A}from"./adw-wrap-box.js";import{DATA_GRID_HEADER_CELL_CLASS as Ee,DATA_GRID_HEADER_ROW_CLASS as De,DATA_GRID_SECTION_CELL_CLASS as Oe,dataGridCellClass as ke,dataGridItemSpec as Ae,dataGridRowClass as je,dataGridShapeKey as Me,dataGridTracksKey as Ne,parseDataGridWidth as Pe}from"./data-grid-model.js";import{AdwDataGrid as j,ROW_ACTIVATED as Fe}from"./adw-data-grid.js";import{AdwSpinner as M}from"./adw-spinner.js";import{AdwStatusPage as N}from"./adw-status-page.js";import{AdwButtonRow as P}from"./adw-button-row.js";import{AdwButtonContent as F}from"./adw-button-content.js";import{AdwSplitButton as I,CLICKED as Ie,MENU_TAPPED as Le}from"./adw-split-button.js";import{AdwToggleGroup as L,NOTIFY_SELECTED as Re,ToggleGroupState as ze}from"./adw-toggle-group.js";import{AdwViewStack as R,NOTIFY_VISIBLE_CHILD as Be}from"./adw-view-stack.js";import{AdwViewSwitcherBase as Ve,NOTIFY_SELECTED as He}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{applyTabViewVisibility as H,createTabViewState as Ue,tabBarVisibility as We,tabCloseVisibilities as Ge,tabLabelText as Ke,tabPageVisibilities as qe,tabTooltipText as Je,tabViewNotifyPayload as Ye}from"./tab-view-state.js";import{AdwTabView as U,CLOSE_PAGE as Xe,NOTIFY_SELECTED_PAGE as Ze,PAGES_CHANGED as Qe}from"./adw-tab-view.js";import{CarouselScrollSync as $e,DEFAULT_CAROUSEL_PAGE_WIDTH as et,applyCarouselDots as tt,carouselDotClasses as nt,carouselNotifyPayload as rt,carouselPositionAtOffset as it,carouselScrollOffset as at,createCarouselState as ot,normalizeCarouselPageWidth as st}from"./carousel-state.js";import{AdwCarousel as W,NOTIFY_N_PAGES as ct,NOTIFY_POSITION as lt,PAGE_CHANGED as ut}from"./adw-carousel.js";import{NOTIFY_VISIBLE_PAGE as dt}from"./navigation-stack.js";import{AdwNavigationView as G}from"./adw-navigation-view.js";import{NsNavigationSplitViewState as ft,NsOverlaySplitViewState as pt,splitViewColumns as mt}from"./split-view-state.js";import{AdwSplitViewBase as ht,NOTIFY_SHOW_SIDEBAR as gt}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 _t}from"./adw-sidebar.js";import{CLOSE_ATTEMPT as vt,NOTIFY_OPEN as yt,SHEET_CLOSE as bt}from"./bottom-sheet-state.js";import{AdwBottomSheet as Y}from"./adw-bottom-sheet.js";import{AdwToast as xt,AdwToastOverlay as X,AdwToastQueue as St,DEFAULT_TOAST_TIMEOUT as Ct,TOAST_BUTTON_CLICKED as wt}from"./adw-toast-overlay.js";import{AdwAlertDialog as Tt,AdwAlertResponses as Et,NOTIFY_RESPONSE as Dt}from"./adw-alert-dialog.js";import{AdwAboutDialog as Z,CLOSED as Ot}from"./adw-about-dialog.js";import{AdwPreferencesDialog as Q,CLOSED as kt}from"./adw-preferences-dialog.js";import{AdwBreakpoint as At,addBreakpoints as jt,evaluateBreakpointCondition as Mt,parseBreakpointCondition as Nt}from"./breakpoint.js";const Pt={AdwPreferencesPage:e,AdwPreferencesGroup:t,AdwActionRow:n,AdwSwitchRow:r,AdwEntryRow:d,AdwPasswordEntryRow:f,AdwEntry:p,AdwComboRow:m,AdwDropDown:h,AdwSpinRow:g,AdwSliderRow:_,AdwExpanderRow:v,AdwButton:y,AdwImageButton:u,AdwMenuButton:b,AdwIcon:s,AdwBanner:x,AdwAvatar:w,AdwWindowTitle:E,AdwClamp:D,AdwHeaderBar:O,AdwToolbarView:k,AdwWrapBox:A,AdwDataGrid:j,AdwSpinner:M,AdwStatusPage:N,AdwButtonRow:P,AdwButtonContent:F,AdwSplitButton:I,AdwToggleGroup:L,AdwViewStack:R,AdwViewSwitcher:z,AdwViewSwitcherBar:B,AdwInlineViewSwitcher:V,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(Pt))registerElement(e,()=>t);$=!0}}export{Ot as ABOUT_CLOSED,ee as ACTIVATED,oe as ADWAITA_ICON_GRID,Z as AdwAboutDialog,n as AdwActionRow,Tt as AdwAlertDialog,Et as AdwAlertResponses,w as AdwAvatar,x as AdwBanner,Y as AdwBottomSheet,At as AdwBreakpoint,y as AdwButton,F as AdwButtonContent,P as AdwButtonRow,W as AdwCarousel,D as AdwClamp,m as AdwComboRow,j as AdwDataGrid,h as AdwDropDown,p as AdwEntry,d as AdwEntryRow,v as AdwExpanderRow,O as AdwHeaderBar,s as AdwIcon,u as AdwImageButton,V as AdwInlineViewSwitcher,b as AdwMenuButton,K as AdwNavigationSplitView,G as AdwNavigationView,q as AdwOverlaySplitView,f as AdwPasswordEntryRow,Q as AdwPreferencesDialog,t as AdwPreferencesGroup,e as AdwPreferencesPage,J as AdwSidebar,_ as AdwSliderRow,g as AdwSpinRow,M as AdwSpinner,I as AdwSplitButton,ht as AdwSplitViewBase,N as AdwStatusPage,r as AdwSwitchRow,U as AdwTabView,xt as AdwToast,X as AdwToastOverlay,St as AdwToastQueue,L as AdwToggleGroup,k as AdwToolbarView,R as AdwViewStack,z as AdwViewSwitcher,B as AdwViewSwitcherBar,Ve as AdwViewSwitcherBase,E as AdwWindowTitle,A as AdwWrapBox,S as BUTTON_CLICKED,Ie as CLICKED,vt as CLOSE_ATTEMPT,Xe as CLOSE_PAGE,$e as CarouselScrollSync,he as ComboState,Ee as DATA_GRID_HEADER_CELL_CLASS,De as DATA_GRID_HEADER_ROW_CLASS,Oe as DATA_GRID_SECTION_CELL_CLASS,c as DEFAULT_ADW_ICON_SIZE,T as DEFAULT_AVATAR_SIZE,et as DEFAULT_CAROUSEL_PAGE_WIDTH,we as DEFAULT_CLAMP_MAX_SIZE,de as DEFAULT_ICON_BUTTON_ICON_SIZE,se as DEFAULT_ICON_COLOR,ce as DEFAULT_ICON_COLOR_DARK,Te as DEFAULT_SPINNER_SIZE,Ct as DEFAULT_TOAST_TIMEOUT,pe as ENTRY_ACTIVATE,xe as ExpanderState,Ce as MENU_ITEM_ACTIVATED,Le as MENU_TAPPED,i as NOTIFY_ACTIVE,_e as NOTIFY_DROP_DOWN_SELECTED,me as NOTIFY_ENTRY_TEXT,Se as NOTIFY_EXPANDED,ct as NOTIFY_N_PAGES,yt as NOTIFY_OPEN,lt as NOTIFY_POSITION,Dt as NOTIFY_RESPONSE,ge as NOTIFY_SELECTED,Ze as NOTIFY_SELECTED_PAGE,gt as NOTIFY_SHOW_SIDEBAR,_t as NOTIFY_SIDEBAR_SELECTED,be as NOTIFY_SLIDER_VALUE,fe as NOTIFY_TEXT,Re as NOTIFY_TOGGLE_SELECTED,ve as NOTIFY_VALUE,He as NOTIFY_VIEW_SELECTED,Be as NOTIFY_VISIBLE_CHILD,dt as NOTIFY_VISIBLE_PAGE,ft as NsNavigationSplitViewState,pt as NsOverlaySplitViewState,Qe as PAGES_CHANGED,ut as PAGE_CHANGED,kt as PREFERENCES_CLOSED,Fe as ROW_ACTIVATED,bt as SHEET_CLOSE,ye as SpinState,wt as TOAST_BUTTON_CLICKED,ze as ToggleGroupState,jt as addBreakpoints,a as adwaitaColorScheme,tt as applyCarouselDots,H as applyTabViewVisibility,l as attachRowPressFeedback,C as avatarInitials,nt as carouselDotClasses,rt as carouselNotifyPayload,it as carouselPositionAtOffset,at as carouselScrollOffset,ot as createCarouselState,Ue as createTabViewState,ke as dataGridCellClass,Ae as dataGridItemSpec,je as dataGridRowClass,Me as dataGridShapeKey,Ne as dataGridTracksKey,Mt as evaluateBreakpointCondition,le as extractIconPaths,ue as extractPathData,te as isThemeIconColor,st as normalizeCarouselPageWidth,ne as onAdwaitaColorSchemeChanged,Nt as parseBreakpointCondition,Pe as parseDataGridWidth,registerAdwaitaElements,o as renderSymbolicIcon,re as setAdwaitaColorScheme,mt as splitViewColumns,We as tabBarVisibility,Ge as tabCloseVisibilities,Ke as tabLabelText,qe as tabPageVisibilities,Je as tabTooltipText,Ye as tabViewNotifyPayload,ie as themeIconColor,ae as toggleAdwaitaColorScheme};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{appliesDerivedSidebarWidth as e,defaultSidebarWidthProps as t,normalizeWidthFraction as n,normalizeWidthProp as r,sidebarWidthFor as i}from"./split-view-width.js";import{GridLayout as a,ItemSpec as o}from"@nativescript/core";const s=`notify::show-sidebar`;var AdwSplitViewBase=class extends a{_widthRule;_state;_sidebar=null;_content=null;_widthProps=t();_measuredWidth=0;_sidebarWidthOverride=null;constructor(e,t,n){super(),this._widthRule=t,this._state=n,this.className=e,this.addRow(new o(1,`star`)),this._state.bind({applyLayout:()=>this._applyLayout(),transitionSidebar:()=>this._transitionSidebar(),notifyShowSidebar:e=>this._emitShowSidebar(e)}),this.addEventListener(`layoutChanged`,()=>this._applySidebarWidth()),this._syncColumns()}_syncColumns(){this.removeColumns(),this._state.sidebarPosition===`end`?(this.addColumn(new o(1,`star`)),this.addColumn(new o(1,`auto`))):(this.addColumn(new o(1,`auto`)),this.addColumn(new o(1,`star`)))}_emitShowSidebar(e){let t={eventName:s,object:this,showSidebar:e.showSidebar,collapsed:e.collapsed};this.notify(t)}_transitionSidebar(){this._applyLayout()}_pending=[];_shouldAnimate(){return typeof(this._sidebar??this._content??this).animate==`function`&&this.isLoaded===!0}_track(e){return this._pending.push(e),e}_cancelPending(){for(let e of this._pending)try{e.cancel()}catch{}this._pending=[]}_isChild(e){for(let t=0;t<this.getChildrenCount();t++)if(this.getChildAt(t)===e)return!0;return!1}setSidebar(e){this._sidebar&&this.removeChild(this._sidebar),this._sidebar=e,e&&(e.className=`${e.className??``} adw-split-view-sidebar`.trim(),e.width=this.sidebarWidth,this.addChild(e)),this._state.setPaneMounted(`sidebar`,e!==null),this._applyLayout()}setContent(e){this._content&&this.removeChild(this._content),this._content=e,e&&(e.className=`${e.className??``} adw-split-view-content`.trim(),this.addChild(e)),this._state.setPaneMounted(`content`,e!==null),this._applyLayout()}showSidebarPane(){this.showSidebar=!0}hideSidebarPane(){this.showSidebar=!1}get collapsed(){return this._state.collapsed}set collapsed(e){this._state.setCollapsed(!!e)}get showSidebar(){return this._state.showSidebar}set showSidebar(e){this._state.setShowSidebar(!!e)}get sidebarWidth(){return this._sidebarWidthOverride??i(this._measuredWidth,this._widthProps,this._widthRule,{collapsed:this._state.collapsed})}set sidebarWidth(e){this._sidebarWidthOverride=Number.isFinite(e)&&e>0?e:null,this._applySidebarWidth()}get minSidebarWidth(){return this._widthProps.minSidebarWidth}set minSidebarWidth(e){this._widthProps.minSidebarWidth=r(e,t().minSidebarWidth),this._applySidebarWidth()}get maxSidebarWidth(){return this._widthProps.maxSidebarWidth}set maxSidebarWidth(e){this._widthProps.maxSidebarWidth=r(e,t().maxSidebarWidth),this._applySidebarWidth()}get sidebarWidthFraction(){return this._widthProps.sidebarWidthFraction}set sidebarWidthFraction(e){this._widthProps.sidebarWidthFraction=n(e),this._applySidebarWidth()}_applySidebarWidth(){let t=this.getActualSize?.();t&&t.width>0&&(this._measuredWidth=t.width),this._sidebar&&e(this._state.collapsed,this._widthRule)&&(this._sidebar.width=this.sidebarWidth)}get sidebarPosition(){return this._state.sidebarPosition}set sidebarPosition(e){this._state.setSidebarPosition(e===`end`?`end`:`start`)&&(this._syncColumns(),this._applyLayout())}get sidebar(){return this._sidebar}get content(){return this._content}};export{AdwSplitViewBase,s as NOTIFY_SHOW_SIDEBAR};
1
+ import"../_virtual/_rolldown/runtime.js";import{appliesDerivedSidebarWidth as e,defaultSidebarWidthProps as t,normalizeWidthFraction as n,normalizeWidthProp as r,sidebarWidthFor as i}from"./split-view-width.js";import{splitViewColumns as a}from"./split-view-state.js";import{GridLayout as o,ItemSpec as s}from"@nativescript/core";const c=`notify::show-sidebar`;var AdwSplitViewBase=class extends o{_widthRule;_state;_sidebar=null;_content=null;_widthProps=t();_measuredWidth=0;_sidebarWidthOverride=null;constructor(e,t,n){super(),this._widthRule=t,this._state=n,this.className=e,this.addRow(new s(1,`star`)),this._state.bind({applyLayout:()=>this._applyLayout(),transitionSidebar:()=>this._transitionSidebar(),notifyShowSidebar:e=>this._emitShowSidebar(e)}),this.addEventListener(`layoutChanged`,()=>this._applySidebarWidth()),this._syncColumns()}_syncColumns(){this.removeColumns(),a(this._state.sidebarPosition,this.textDirection).sidebar===0?(this.addColumn(new s(1,`auto`)),this.addColumn(new s(1,`star`))):(this.addColumn(new s(1,`star`)),this.addColumn(new s(1,`auto`)))}_syncSidebarSide(e=this._sidebar){if(!e)return;let t=a(this._state.sidebarPosition,this.textDirection).sidebar===0,n=(e.className??``).split(` `).filter(e=>e&&e!==`adw-sidebar-at-visual-start`&&e!==`adw-sidebar-at-visual-end`);n.push(t?`adw-sidebar-at-visual-start`:`adw-sidebar-at-visual-end`),e.className=n.join(` `)}get textDirection(){return this.style?.direction===`rtl`?`rtl`:`ltr`}_emitShowSidebar(e){let t={eventName:c,object:this,showSidebar:e.showSidebar,collapsed:e.collapsed};this.notify(t)}_transitionSidebar(){this._applyLayout()}_pending=[];_shouldAnimate(){return typeof(this._sidebar??this._content??this).animate==`function`&&this.isLoaded===!0}_track(e){return this._pending.push(e),e}_cancelPending(){for(let e of this._pending)try{e.cancel()}catch{}this._pending=[]}_isChild(e){for(let t=0;t<this.getChildrenCount();t++)if(this.getChildAt(t)===e)return!0;return!1}setSidebar(e){this._sidebar&&this.removeChild(this._sidebar),this._sidebar=e,e&&(e.className=`${e.className??``} adw-split-view-sidebar`.trim(),this._syncSidebarSide(e),e.width=this.sidebarWidth,this.addChild(e)),this._state.setPaneMounted(`sidebar`,e!==null),this._applyLayout()}setContent(e){this._content&&this.removeChild(this._content),this._content=e,e&&(e.className=`${e.className??``} adw-split-view-content`.trim(),this.addChild(e)),this._state.setPaneMounted(`content`,e!==null),this._applyLayout()}showSidebarPane(){this.showSidebar=!0}hideSidebarPane(){this.showSidebar=!1}get collapsed(){return this._state.collapsed}set collapsed(e){this._state.setCollapsed(!!e)}get showSidebar(){return this._state.showSidebar}set showSidebar(e){this._state.setShowSidebar(!!e)}get sidebarWidth(){return this._sidebarWidthOverride??i(this._measuredWidth,this._widthProps,this._widthRule,{collapsed:this._state.collapsed})}set sidebarWidth(e){this._sidebarWidthOverride=Number.isFinite(e)&&e>0?e:null,this._applySidebarWidth()}get minSidebarWidth(){return this._widthProps.minSidebarWidth}set minSidebarWidth(e){this._widthProps.minSidebarWidth=r(e,t().minSidebarWidth),this._applySidebarWidth()}get maxSidebarWidth(){return this._widthProps.maxSidebarWidth}set maxSidebarWidth(e){this._widthProps.maxSidebarWidth=r(e,t().maxSidebarWidth),this._applySidebarWidth()}get sidebarWidthFraction(){return this._widthProps.sidebarWidthFraction}set sidebarWidthFraction(e){this._widthProps.sidebarWidthFraction=n(e),this._applySidebarWidth()}_applySidebarWidth(){let t=this.getActualSize?.();t&&t.width>0&&(this._measuredWidth=t.width),this._sidebar&&e(this._state.collapsed,this._widthRule)&&(this._sidebar.width=this.sidebarWidth)}get sidebarPosition(){return this._state.sidebarPosition}set sidebarPosition(e){this._state.setSidebarPosition(e===`end`?`end`:`start`)&&(this._syncColumns(),this._syncSidebarSide(),this._applyLayout())}get sidebar(){return this._sidebar}get content(){return this._content}};export{AdwSplitViewBase,c as NOTIFY_SHOW_SIDEBAR};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{NavigationSplitViewState as e,OverlaySplitViewState as t}from"@gjsify/adwaita-core";function splitViewColumns(e){return e===`end`?{sidebar:1,content:0}:{sidebar:0,content:1}}var NsOverlaySplitViewState=class{_state;_host=null;_coupling=!1;constructor(e={}){this._state=new t(e),this._state.subscribe(e=>this._apply(e))}bind(e){this._host=e}get collapsed(){return this._state.collapsed}get showSidebar(){return this._state.showSidebar}get pinSidebar(){return this._state.pinSidebar}get sidebarPosition(){return this._state.sidebarPosition}get showProgress(){return this._state.showProgress}get shieldVisible(){return this._state.shieldVisible}get sidebarFocusable(){return this._state.sidebarFocusable}get contentFocusable(){return this._state.contentFocusable}setCollapsed(e){this._coupling=!0;try{return this._state.setCollapsed(e)}finally{this._coupling=!1}}setShowSidebar(e){return this._state.setShowSidebar(e)}setPinSidebar(e){return this._state.setPinSidebar(e)}setSidebarPosition(e){return this._state.setSidebarPosition(e)}setPaneMounted(e,t){return!1}dismissShield(){return this._state.dismissShield()}_apply(e){let t=this._host;if(t!==null){if(e.property===`show-sidebar`){this._coupling||t.transitionSidebar(),t.notifyShowSidebar({showSidebar:e.showSidebar,collapsed:e.collapsed});return}e.property===`collapsed`&&t.applyLayout()}}},NsNavigationSplitViewState=class{_state;_markers={sidebar:{},content:{}};_host=null;_plan;constructor(t={}){this._state=new e(t),this._plan=this._state.stack,this._state.subscribe(e=>this._apply(e))}bind(e){this._host=e}get collapsed(){return this._state.collapsed}get showSidebar(){return!this._state.showContent}get sidebarPosition(){return this._state.sidebarPosition}get stack(){return this._state.stack.stack}get visiblePane(){return this._state.visiblePane}isVisible(e){return this.visiblePane===e}get transition(){return this._plan.transition}setCollapsed(e){return this._state.setCollapsed(e)}setShowSidebar(e){return this._state.setShowContent(!e)}setSidebarPosition(e){return this._state.setSidebarPosition(e)}setPaneMounted(e,t){let n=t?this._markers[e]:null;return e===`sidebar`?this._state.setSidebar(n):this._state.setContent(n)}_apply(e){this._plan=e.plan;let t=this._host;if(t!==null){if(e.property===`show-content`){e.plan.transition===`replace`?t.applyLayout():t.transitionSidebar(),t.notifyShowSidebar({showSidebar:this.showSidebar,collapsed:this.collapsed});return}e.property===`collapsed`&&t.applyLayout()}}};export{NsNavigationSplitViewState,NsOverlaySplitViewState,splitViewColumns};
1
+ import"../_virtual/_rolldown/runtime.js";import{NavigationSplitViewState as e,OverlaySplitViewState as t,isSidebarAtVisualStart as n}from"@gjsify/adwaita-core";function splitViewColumns(e,t=`ltr`){return n(e,t)?{sidebar:0,content:1}:{sidebar:1,content:0}}var NsOverlaySplitViewState=class{_state;_host=null;_coupling=!1;constructor(e={}){this._state=new t(e),this._state.subscribe(e=>this._apply(e))}bind(e){this._host=e}get collapsed(){return this._state.collapsed}get showSidebar(){return this._state.showSidebar}get pinSidebar(){return this._state.pinSidebar}get sidebarPosition(){return this._state.sidebarPosition}get showProgress(){return this._state.showProgress}get shieldVisible(){return this._state.shieldVisible}get sidebarFocusable(){return this._state.sidebarFocusable}get contentFocusable(){return this._state.contentFocusable}setCollapsed(e){this._coupling=!0;try{return this._state.setCollapsed(e)}finally{this._coupling=!1}}setShowSidebar(e){return this._state.setShowSidebar(e)}setPinSidebar(e){return this._state.setPinSidebar(e)}setSidebarPosition(e){return this._state.setSidebarPosition(e)}setPaneMounted(e,t){return!1}dismissShield(){return this._state.dismissShield()}_apply(e){let t=this._host;if(t!==null){if(e.property===`show-sidebar`){this._coupling||t.transitionSidebar(),t.notifyShowSidebar({showSidebar:e.showSidebar,collapsed:e.collapsed});return}e.property===`collapsed`&&t.applyLayout()}}},NsNavigationSplitViewState=class{_state;_markers={sidebar:{},content:{}};_host=null;_plan;constructor(t={}){this._state=new e(t),this._plan=this._state.stack,this._state.subscribe(e=>this._apply(e))}bind(e){this._host=e}setTag(e,t){return this._state.setTag(e,t)}get sidebarTag(){return this._state.sidebarTag}get contentTag(){return this._state.contentTag}push(e){return this._state.push(e)}pop(){return this._state.pop()}get showContent(){return!this.showSidebar}set showContent(e){this.setShowSidebar(!e)}get collapsed(){return this._state.collapsed}get showSidebar(){return!this._state.showContent}get sidebarPosition(){return this._state.sidebarPosition}get stack(){return this._state.stack.stack}get visiblePane(){return this._state.visiblePane}isVisible(e){return this.visiblePane===e}get transition(){return this._plan.transition}setCollapsed(e){return this._state.setCollapsed(e)}setShowSidebar(e){return this._state.setShowContent(!e)}setSidebarPosition(e){return this._state.setSidebarPosition(e)}setPaneMounted(e,t){let n=t?this._markers[e]:null;return e===`sidebar`?this._state.setSidebar(n):this._state.setContent(n)}_apply(e){this._plan=e.plan;let t=this._host;if(t!==null){if(e.property===`show-content`){e.plan.transition===`replace`?t.applyLayout():t.transitionSidebar(),t.notifyShowSidebar({showSidebar:this.showSidebar,collapsed:this.collapsed});return}e.property===`collapsed`&&t.applyLayout()}}};export{NsNavigationSplitViewState,NsOverlaySplitViewState,splitViewColumns};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{attachRowPressFeedback as t}from"./row-press.js";import{applyViewSwitcherVisibility as n,createViewSwitcherState as r,nsIconSvg as i,switcherButtonVisible as a,viewSwitcherNotifyPayload as o,viewSwitcherPageSpecs as s}from"./view-switcher-model.js";import{GridLayout as c,ItemSpec as l,Label as u,StackLayout as d}from"@nativescript/core";import{buildViewSwitcherButtons as f}from"@gjsify/adwaita-core";const p=`notify::selected`;var AdwViewSwitcherBase=class extends c{_bar;_contentArea;_pages=[];_state=r();_nodes=[];get policy(){return`wide`}get buttonDisplayMode(){return`both`}constructor(e){super(),this.className=e,this.addColumn(new l(1,`star`)),this.addRow(new l(1,`auto`)),this.addRow(new l(1,`star`));let t=new d;t.orientation=`horizontal`,t.horizontalAlignment=`center`,c.setRow(t,0),this.addChild(t),this._bar=t;let n=new c;n.addColumn(new l(1,`star`)),n.addRow(new l(1,`star`)),c.setRow(n,1),this.addChild(n),this._contentArea=n,this._state.subscribe(e=>{this._applySelection();let t={eventName:p,object:this,...o(e)};this.notify(t)})}_initClasses(){this._bar.className=this.barClass}setViews(e){for(let e of this._nodes)this._bar.removeChild(e.button);this._nodes=[];for(let e of this._pages)this._contentArea.removeChild(e.content);this._pages.length=0,this._pages.push(...e);for(let[e,t]of this._pages.entries())this._nodes.push(this._buildButton(e)),c.setColumn(t.content,0),c.setRow(t.content,0),this._contentArea.addChild(t.content);this._state.setPages(s(this._pages)),this._applySelection()}_buildButton(n){let r=new d;r.orientation=`horizontal`,r.className=this.buttonClass,r.horizontalAlignment=`center`;let i=new e;i.className=`${i.className} ${this.buttonClass}-icon`.trim(),i.verticalAlignment=`middle`,r.addChild(i);let a=new u;a.className=`${this.buttonClass}-label`,a.verticalAlignment=`middle`,r.addChild(a);let o=new u;return o.className=`${this.buttonClass}-badge`,o.verticalAlignment=`middle`,r.addChild(o),t(r),r.addEventListener(`tap`,()=>{this._state.setSelected(n)}),this._bar.addChild(r),{button:r,icon:i,label:a,badge:o}}get switcherKind(){return`switcher`}_applySelection(){n(this._pages,this._state.selected);let e=this.buttonDisplayMode!==`labels`,t=this.buttonDisplayMode!==`icons`;f(this._state.pages,this._state.selected,this.policy).forEach((n,r)=>{let o=this._nodes[r];if(!o)return;let s=this._state.pages[r]?.visible??!1;o.button.visibility=a(this.switcherKind,n.visible,s)?`visible`:`collapse`,o.button.orientation=n.orientation===`horizontal`?`horizontal`:`vertical`,o.button.className=n.selected?`${this.buttonClass} active`:this.buttonClass,o.icon.icon=i(n.iconName),o.icon.visibility=e?`visible`:`collapse`,o.label.text=n.label,o.label.visibility=t?`visible`:`collapse`,o.badge.text=n.badgeLabel,o.badge.visibility=n.badgeLabel.length>0||n.needsAttention?`visible`:`collapse`,n.badgeLabel.length===0&&n.needsAttention?o.badge.className=`${this.buttonClass}-badge needs-attention`:o.badge.className=`${this.buttonClass}-badge`})}get views(){return this._pages}set views(e){this.setViews(Array.isArray(e)?e:[])}get selected(){return this._state.selected}set selected(e){this._state.setSelected(e)}get selectedName(){return this._state.selectedName}setPageVisible(e,t){let n=this._state.setPageVisible(e,t);return this._applySelection(),n}};export{AdwViewSwitcherBase,p as NOTIFY_SELECTED};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{attachRowPressFeedback as t}from"./row-press.js";import{applyViewSwitcherVisibility as n,createViewSwitcherState as r,nsIconSvg as i,switcherButtonVisible as a,viewSwitcherNotifyPayload as o,viewSwitcherPageSpecs as s}from"./view-switcher-model.js";import{GridLayout as c,ItemSpec as l,Label as u,StackLayout as d}from"@nativescript/core";import{buildViewSwitcherButtons as f}from"@gjsify/adwaita-core";const p=`notify::selected`;var AdwViewSwitcherBase=class extends c{_bar;_policy=`narrow`;_contentArea;_pages=[];_state=r();_nodes=[];get policy(){return this._policy}get switcherPolicy(){return this._policy}set switcherPolicy(e){let t=e===`wide`?`wide`:`narrow`;t!==this._policy&&(this._policy=t,this._applySelection(),this.notify({eventName:`notify::policy`,object:this}))}get buttonDisplayMode(){return`both`}constructor(e){super(),this.className=e,this.addColumn(new l(1,`star`)),this.addRow(new l(1,`auto`)),this.addRow(new l(1,`star`));let t=new c;t.horizontalAlignment=`stretch`,t.addRow(new l(1,`auto`)),c.setRow(t,0),this.addChild(t),this._bar=t;let n=new c;n.addColumn(new l(1,`star`)),n.addRow(new l(1,`star`)),c.setRow(n,1),this.addChild(n),this._contentArea=n,this._state.subscribe(e=>{this._applySelection();let t={eventName:p,object:this,...o(e)};this.notify(t)})}_initClasses(){this._bar.className=this.barClass}setViews(e){for(let e of this._nodes)this._bar.removeChild(e.button);this._nodes=[],this._bar.removeColumns();for(let e of this._pages)this._contentArea.removeChild(e.content);this._pages.length=0,this._pages.push(...e);for(let[e,t]of this._pages.entries())this._nodes.push(this._buildButton(e)),c.setColumn(t.content,0),c.setRow(t.content,0),this._contentArea.addChild(t.content);this._state.setPages(s(this._pages)),this._applySelection()}_buildButton(n){let r=new d;r.orientation=`horizontal`,r.className=this.buttonClass,r.horizontalAlignment=`center`;let i=new e;i.className=`${i.className} ${this.buttonClass}-icon`.trim(),i.verticalAlignment=`middle`,r.addChild(i);let a=new u;a.className=`${this.buttonClass}-label`,a.verticalAlignment=`middle`,r.addChild(a);let o=new u;return o.className=`${this.buttonClass}-badge`,o.verticalAlignment=`middle`,r.addChild(o),t(r),r.addEventListener(`tap`,()=>{this._state.setSelected(n)}),this._bar.addColumn(new l(1,`star`)),c.setColumn(r,n),c.setRow(r,0),this._bar.addChild(r),{button:r,icon:i,label:a,badge:o}}get switcherKind(){return`switcher`}_applySelection(){n(this._pages,this._state.selected);let e=this.buttonDisplayMode!==`labels`,t=this.buttonDisplayMode!==`icons`;f(this._state.pages,this._state.selected,this.policy).forEach((n,r)=>{let o=this._nodes[r];if(!o)return;let s=this._state.pages[r]?.visible??!1;o.button.visibility=a(this.switcherKind,n.visible,s)?`visible`:`collapse`,o.button.orientation=n.orientation===`horizontal`?`horizontal`:`vertical`,o.button.className=n.selected?`${this.buttonClass} active`:this.buttonClass,o.icon.icon=i(n.iconName),o.icon.visibility=e?`visible`:`collapse`,o.label.text=n.label,o.label.visibility=t?`visible`:`collapse`,o.badge.text=n.badgeLabel,o.badge.visibility=n.badgeLabel.length>0||n.needsAttention?`visible`:`collapse`,n.badgeLabel.length===0&&n.needsAttention?o.badge.className=`${this.buttonClass}-badge needs-attention`:o.badge.className=`${this.buttonClass}-badge`,o.button.accessibilityLabel=n.description||n.label})}get views(){return this._pages}set views(e){this.setViews(Array.isArray(e)?e:[])}get selected(){return this._state.selected}set selected(e){this._state.setSelected(e)}get selectedName(){return this._state.selectedName}setPageVisible(e,t){let n=this._state.setPageVisible(e,t);return this._applySelection(),n}};export{AdwViewSwitcherBase,p as NOTIFY_SELECTED};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";const e=0;function normalizeWrapBoxSpacing(e){let t=typeof e==`number`?e:Number.parseFloat(String(e??``));return!Number.isFinite(t)||t<0?0:t}function wrapBoxSpacingChanges(e,t){return normalizeWrapBoxSpacing(t)!==normalizeWrapBoxSpacing(e)}function wrapBoxChildMargin(e,t){let n=normalizeWrapBoxSpacing(e)/2,r=normalizeWrapBoxSpacing(t)/2;return`${r} ${n} ${r} ${n}`}export{e as DEFAULT_WRAP_BOX_SPACING,normalizeWrapBoxSpacing,wrapBoxChildMargin,wrapBoxSpacingChanges};
1
+ import"../_virtual/_rolldown/runtime.js";import{ADW_WRAP_BOX_DEFAULT_SPACING as e,normalizeWrapBoxSpacing as t,resolveWrapBoxLine as n,wrapPolicyFlexShrink as r}from"@gjsify/adwaita-core";const i=e;function wrapBoxSpacingChanges(e,n){return t(n)!==t(e)}function wrapBoxChildMargin(e,n){let r=t(e)/2,i=t(n)/2;return`${i} ${r} ${i} ${r}`}function alignToJustifyContent(e){return e<.25?`flex-start`:e<.75?`center`:`flex-end`}function wrapBoxFlexStyle(e){let t=e.orientation===`vertical`?`column`:`row`,i=n({justify:e.justify,justifyLastLine:e.justifyLastLine,align:e.align,lastLine:!1,childrenInLine:2});return{flexDirection:e.packDirection===`end-to-start`?`${t}-reverse`:t,flexWrap:e.wrapReverse?`wrap-reverse`:`wrap`,justifyContent:i.growGaps?`space-between`:alignToJustifyContent(i.align),alignContent:e.lineHomogeneous?`stretch`:`flex-start`,childFlexGrow:+!!i.growChildren,childFlexShrink:r(e.wrapPolicy)}}function wrapBoxChildFlex(e,t){let i=t===1;return{flexGrow:+!!n({justify:e.justify,justifyLastLine:e.justifyLastLine,align:e.align,lastLine:i,childrenInLine:i?1:2}).growChildren,flexShrink:r(e.wrapPolicy)}}export{i as DEFAULT_WRAP_BOX_SPACING,t as normalizeWrapBoxSpacing,wrapBoxChildFlex,wrapBoxChildMargin,wrapBoxFlexStyle,wrapBoxSpacingChanges};
@@ -21,6 +21,15 @@ export declare class AdwComboRow extends AdwActionRow {
21
21
  /** The headless options list + selectedIndex↔selectedValue state machine (ADR 0004). */
22
22
  private readonly _state;
23
23
  constructor();
24
+ /**
25
+ * `model_changed` (adw-combo-row.c:187-195) — one option or none is not a
26
+ * choice, so the chevron goes and the row stops being activatable.
27
+ *
28
+ * Both halves matter. Hiding the chevron alone would leave a row that still
29
+ * opens a one-entry `action()` sheet on tap; the tap guard is in
30
+ * {@link _openChooser}, which reads the same predicate.
31
+ */
32
+ private _syncChooser;
24
33
  /** Open the native action chooser and apply the picked option. */
25
34
  private _openChooser;
26
35
  /** The selectable options. Updates the inline value label. */
@@ -1,5 +1,6 @@
1
1
  import { AdwSplitViewBase } from './split-view-base.js';
2
2
  import { NsNavigationSplitViewState } from './split-view-state.js';
3
+ import type { NavigationActionResult } from '@gjsify/adwaita-core';
3
4
  export declare class AdwNavigationSplitView extends AdwSplitViewBase<NsNavigationSplitViewState> {
4
5
  constructor();
5
6
  protected _applyLayout(): void;
@@ -9,4 +10,24 @@ export declare class AdwNavigationSplitView extends AdwSplitViewBase<NsNavigatio
9
10
  private _settleAfterSwap;
10
11
  /** Full-width of a collapsed pane (post-layout), or a fallback before measure. */
11
12
  private _paneWidth;
13
+ /** `Adw.NavigationPage:tag` for the sidebar pane, or `null` when untagged. */
14
+ get sidebarTag(): string | null;
15
+ set sidebarTag(value: string | null);
16
+ /** `Adw.NavigationPage:tag` for the content pane, or `null` when untagged. */
17
+ get contentTag(): string | null;
18
+ set contentTag(value: string | null);
19
+ /**
20
+ * `navigation.push` with `tag` — `navigation_push_cb` (:644-685).
21
+ *
22
+ * An unmatched tag delegates to the parent before it may become a critical,
23
+ * which is how a nested split view forwards a push outwards. Returns what
24
+ * the routing decided; the ten-row NAVIGATION_ACTION_VECTORS table had no
25
+ * consumer in either renderer before this.
26
+ */
27
+ push(tag: string): NavigationActionResult;
28
+ /** `navigation.pop` — `navigation_pop_cb` (:687-702). */
29
+ pop(): NavigationActionResult;
30
+ /** `Adw.NavigationSplitView:show-content`, the C's own spelling of the flag. */
31
+ get showContent(): boolean;
32
+ set showContent(value: boolean);
12
33
  }
@@ -1,19 +1,30 @@
1
- import { ActivityIndicator } from '@nativescript/core';
1
+ import { GridLayout } from '@nativescript/core';
2
2
  import { DEFAULT_SPINNER_SIZE } from './chrome.js';
3
3
  export { DEFAULT_SPINNER_SIZE };
4
- export declare class AdwSpinner extends ActivityIndicator {
4
+ export declare class AdwSpinner extends GridLayout {
5
+ /** The platform indicator — the RING, capped at 64 DIPs. */
6
+ private readonly _indicator;
7
+ /** The requested BOX size, floored at the measured minimum 16. */
5
8
  private _size;
9
+ /** Whether the consumer wants it spinning, independent of whether it is mapped. */
10
+ private _spinning;
6
11
  constructor();
7
12
  private _applySize;
8
- /** Whether the spinner is animating. Two-way bound to the indicator's `busy`. */
13
+ private _applySpinning;
14
+ /** Whether the spinner is animating. Gated on being mapped, as in GTK. */
9
15
  get spinning(): boolean;
10
16
  set spinning(value: boolean);
11
17
  /**
12
- * The spinner diameter in DIPs — the DRAWN one, so reading it back after
13
- * `size = 200` reports 64 and after `size = 8` reports 16. Adwaita's ring is
14
- * bounded on both ends, and a getter that echoed the request would be
15
- * describing something that is not on screen.
18
+ * The BOX size in DIPs — what was requested, floored at the measured
19
+ * minimum 16 and NOT capped.
20
+ *
21
+ * Reading it back after `size = 200` reports 200, because that is what the
22
+ * widget occupies. {@link ringDiameter} is the drawn ring, which is where
23
+ * the 64 cap lives. The two used to be one number, so an oversized spinner
24
+ * silently took 64 DIPs of layout instead of the 200 it was given.
16
25
  */
17
26
  get size(): number;
18
27
  set size(value: number);
28
+ /** The drawn ring diameter — `spinnerGeometry`, capped at 64. */
29
+ get ringDiameter(): number;
19
30
  }
@@ -1,12 +1,29 @@
1
- import { View, WrapLayout } from '@nativescript/core';
2
- export declare class AdwWrapBox extends WrapLayout {
1
+ import { FlexboxLayout, type View } from '@nativescript/core';
2
+ import { type AdwLengthUnit, type AdwWrapBoxJustify, type AdwWrapBoxOrientation, type AdwWrapBoxPackDirection, type AdwWrapPolicy } from '@gjsify/adwaita-core';
3
+ /** Every `notify::` an `Adw.WrapBox` emits (adw-wrap-box.c:284-497). */
4
+ export type AdwWrapBoxProperty = 'child-spacing' | 'child-spacing-unit' | 'pack-direction' | 'align' | 'justify' | 'justify-last-line' | 'line-spacing' | 'line-spacing-unit' | 'line-homogeneous' | 'natural-line-length' | 'natural-line-length-unit' | 'wrap-reverse' | 'wrap-policy' | 'orientation';
5
+ export declare class AdwWrapBox extends FlexboxLayout {
3
6
  private _childSpacing;
4
7
  private _lineSpacing;
8
+ private _childSpacingUnit;
9
+ private _lineSpacingUnit;
10
+ private _align;
11
+ private _justify;
12
+ private _justifyLastLine;
13
+ private _lineHomogeneous;
14
+ private _wrapReverse;
15
+ private _wrapPolicy;
16
+ private _packDirection;
17
+ private _orientation;
18
+ private _naturalLineLength;
19
+ private _naturalLineLengthUnit;
5
20
  constructor();
6
- /** Append a child. */
21
+ /** Append a child — `adw_wrap_box_append` (adw-wrap-box.c:1344-1352). */
7
22
  add(view: View): void;
8
- /** Remove a previously-added child. */
23
+ /** Remove a previously-added child — `adw_wrap_box_remove` (:1387-1395). */
9
24
  remove(view: View): void;
25
+ /** `adw_wrap_box_remove_all` (:1406-1414). */
26
+ removeAll(): void;
10
27
  /**
11
28
  * Every path a child can enter by — `add()`, a direct `addChild()`, and XML
12
29
  * inflation via `_addChildFromBuilder` — ends here, which is why the spacing
@@ -15,20 +32,72 @@ export declare class AdwWrapBox extends WrapLayout {
15
32
  * `add_child` through the same append for the same reason.
16
33
  */
17
34
  addChild(view: View): void;
18
- /** Horizontal gap between items in a line, in DIPs. Defaults to 0, as in C. */
35
+ /**
36
+ * `adw_wrap_box_insert_child_after` (:1283-1300).
37
+ *
38
+ * A NULL/absent `sibling` inserts at the FIRST position, not the last —
39
+ * `gtk_widget_insert_after`'s documented rule, pinned by
40
+ * `WRAP_BOX_CHILD_ORDER_VECTORS`. Returns whether the insert happened; a
41
+ * refusal is where C would have hit a `g_return_if_fail`.
42
+ */
43
+ insertChildAfter(view: View, sibling?: View | null): boolean;
44
+ /** `adw_wrap_box_reorder_child_after` (:1315-1332). Same NULL rule. */
45
+ reorderChildAfter(view: View, sibling?: View | null): boolean;
46
+ private _childViews;
47
+ private _applyOrder;
48
+ /** Gap between items in a line, in {@link childSpacingUnit}. Defaults to 0, as in C. */
19
49
  get childSpacing(): number;
20
50
  set childSpacing(value: number);
21
- /** Vertical gap between wrapped lines, in DIPs. Defaults to 0, as in C. */
51
+ /** The unit {@link childSpacing} is written in. Defaults to `px`, as in C. */
52
+ get childSpacingUnit(): AdwLengthUnit;
53
+ set childSpacingUnit(value: AdwLengthUnit);
54
+ /** Gap between wrapped lines, in {@link lineSpacingUnit}. Defaults to 0, as in C. */
22
55
  get lineSpacing(): number;
23
56
  set lineSpacing(value: number);
57
+ /** The unit {@link lineSpacing} is written in. Defaults to `px`, as in C. */
58
+ get lineSpacingUnit(): AdwLengthUnit;
59
+ set lineSpacingUnit(value: AdwLengthUnit);
60
+ /** Where the children sit ALONG the line (main axis): 0 start, 0.5 middle, 1 end. */
61
+ get align(): number;
62
+ set align(value: number);
63
+ /** Whether and how each line is stretched to fill the widget. */
64
+ get justify(): AdwWrapBoxJustify;
65
+ set justify(value: AdwWrapBoxJustify);
66
+ /** Whether the FINAL line is justified too. Default false, as in C. */
67
+ get justifyLastLine(): boolean;
68
+ set justifyLastLine(value: boolean);
69
+ /** Whether every line takes the same amount of space. */
70
+ get lineHomogeneous(): boolean;
71
+ set lineHomogeneous(value: boolean);
72
+ /** Whether lines wrap upwards (horizontal) / towards the start (vertical). */
73
+ get wrapReverse(): boolean;
74
+ set wrapReverse(value: boolean);
75
+ /** Whether an overflowing line squeezes its children or lets them spill. */
76
+ get wrapPolicy(): AdwWrapPolicy;
77
+ set wrapPolicy(value: AdwWrapPolicy);
78
+ /** The direction children are packed in each line. */
79
+ get packDirection(): AdwWrapBoxPackDirection;
80
+ set packDirection(value: AdwWrapBoxPackDirection);
81
+ /** The axis children are packed along. */
82
+ get orientation(): AdwWrapBoxOrientation;
83
+ set orientation(value: AdwWrapBoxOrientation);
24
84
  /**
25
- * Re-apply the spacing to every child already in the tree.
85
+ * The natural line length in {@link naturalLineLengthUnit}, or `-1` unset.
26
86
  *
27
- * The spacing used to be baked in at add time, so `box.childSpacing = 12`
28
- * after the children were added did nothing; `adw_wrap_box_set_child_spacing`
29
- * hands the new value to the layout manager, which re-runs the allocation for
30
- * children that are already there.
87
+ * CARRIED, NOT APPLIED — see the header: NativeScript's `Style` has no
88
+ * maximum-size property to cap a line with.
31
89
  */
32
- private _applySpacingToChildren;
33
- private _applySpacing;
90
+ get naturalLineLength(): number;
91
+ set naturalLineLength(value: number);
92
+ /** The unit {@link naturalLineLength} is written in. Defaults to `px`, as in C. */
93
+ get naturalLineLengthUnit(): AdwLengthUnit;
94
+ set naturalLineLengthUnit(value: AdwLengthUnit);
95
+ /** {@link naturalLineLength} resolved through its unit, `-1` when unset. */
96
+ get naturalLineLengthPx(): number;
97
+ /** Re-emit `notify::<property>`, as GObject does on a real change. */
98
+ private _notify;
99
+ /** The widget's properties, as the pure resolvers take them. */
100
+ private _flexInput;
101
+ private _applyLayout;
102
+ private _applyChildren;
34
103
  }
@@ -57,11 +57,13 @@ export declare function clampAllocationFor(availableWidth: number, props: ClampP
57
57
  */
58
58
  export declare const DEFAULT_SPINNER_SIZE = 16;
59
59
  /**
60
- * The diameter an `ActivityIndicator` is sized to for a requested `size`.
60
+ * The RING diameter for a requested BOX size — floored at the measured minimum
61
+ * 16 and capped at Adwaita's 64, with the odd-size flooring (`31` draws a 30 DIP
62
+ * ring) coming from the paintable rather than from here.
61
63
  *
62
- * The platform indicator fills its view, so the view IS the ring: floored at the
63
- * measured minimum 16 and capped at Adwaita's 64, with the odd-size flooring
64
- * (`31` draws a 30 DIP ring) coming from the paintable rather than from here.
64
+ * The two are different numbers, which is the whole point: `AdwSpinner` sizes
65
+ * its BOX to the request and its `ActivityIndicator` to this. They used to be
66
+ * one, so `size = 200` occupied 64 DIPs of layout where GTK occupies 200.
65
67
  */
66
68
  export declare function spinnerDiameter(value: number | string | null | undefined): number;
67
69
  /** The four toolbar-view properties the style classes are derived from. */
@@ -1,6 +1,7 @@
1
1
  import { type Cancelable, type EventData, GridLayout, type View } from '@nativescript/core';
2
2
  import { type SidebarWidthProps, type SplitViewWidthRule } from './split-view-width.js';
3
3
  import type { AdwPackType, NsShowSidebarNotification, NsSplitViewState } from './split-view-state.js';
4
+ import type { AdwTextDirection } from '@gjsify/adwaita-core';
4
5
  /** Event name emitted when the sidebar visibility changes. */
5
6
  export declare const NOTIFY_SHOW_SIDEBAR = "notify::show-sidebar";
6
7
  /** Payload of the `notify::show-sidebar` event. */
@@ -40,6 +41,22 @@ export declare abstract class AdwSplitViewBase<TState extends NsSplitViewState =
40
41
  * expanding column with the content squeezed into the fixed one.
41
42
  */
42
43
  protected _syncColumns(): void;
44
+ /**
45
+ * Publish which visual side the pane is on, so the theme can put the divider
46
+ * there — the CSS counterpart to `_sidebars.scss`'s `:dir()` x `.end`
47
+ * product. A fixed `border-right` drew it on the wrong edge for an `end`
48
+ * sidebar and for every RTL layout.
49
+ */
50
+ protected _syncSidebarSide(view?: View | null): void;
51
+ /**
52
+ * The reading direction `start` / `end` resolve against.
53
+ *
54
+ * `direction` is an INHERITED CSS property on NativeScript's `Style`, so a
55
+ * `direction: rtl` on the Page reaches every split view under it — the same
56
+ * way GTK's text direction reaches a widget from its window. It defaults to
57
+ * unset, which is `ltr`.
58
+ */
59
+ get textDirection(): AdwTextDirection;
43
60
  /** Re-emit `notify::show-sidebar` for a state change. */
44
61
  protected _emitShowSidebar(event: NsShowSidebarNotification): void;
45
62
  /** Subclass-specific layout application for the current collapsed/show state. */
@@ -1,4 +1,4 @@
1
- import type { AdwPackType, NavigationStackPlan, OverlaySplitViewOptions, SplitViewPane } from '@gjsify/adwaita-core';
1
+ import type { AdwPackType, AdwTextDirection, NavigationActionResult, NavigationStackPlan, OverlaySplitViewOptions, SplitViewPane } from '@gjsify/adwaita-core';
2
2
  export type { AdwPackType, NavigationStackPlan, SplitViewPane };
3
3
  /** Payload of the `notify::show-sidebar` a state change asks the widget to emit. */
4
4
  export interface NsShowSidebarNotification {
@@ -54,7 +54,7 @@ export interface NsSplitViewState {
54
54
  * already made column 0 the star column. libadwaita allocates an `end` sidebar at
55
55
  * `width - sidebar_width` (adw-navigation-split-view.c:306-316).
56
56
  */
57
- export declare function splitViewColumns(sidebarPosition: AdwPackType): {
57
+ export declare function splitViewColumns(sidebarPosition: AdwPackType, direction?: AdwTextDirection): {
58
58
  sidebar: number;
59
59
  content: number;
60
60
  };
@@ -138,11 +138,13 @@ export declare class NsOverlaySplitViewState implements NsSplitViewState {
138
138
  * `sidebar-position` × `show-content` × which children exist, and whether
139
139
  * reaching it is a push or a pop.
140
140
  *
141
- * Tags and the `navigation.push`/`navigation.pop` actions are NOT wired on
142
- * NativeScript, so the panes are tracked by presence with a marker object rather
143
- * than by handing the core a `View` — a `View` is not a `NavigationPageRef` and
144
- * pretending otherwise would silently give a pane whatever `tag` property
145
- * NativeScript happens to put on a view.
141
+ * Tags and the `navigation.push`/`navigation.pop` actions ARE wired, through an
142
+ * explicit {@link setTag} rather than by handing the core a `View`: a `View` is
143
+ * not a `NavigationPageRef`, and reading a `tag` property off one would silently
144
+ * adopt whatever NativeScript happens to put there. The panes stay tracked by
145
+ * presence with a marker object, and the tag of record lives in the core — which
146
+ * is where it lives in the browser port too, because `setTag` CLEARS a colliding
147
+ * tag and mutating a caller's view to do that would be a surprise.
146
148
  */
147
149
  export declare class NsNavigationSplitViewState implements NsSplitViewState {
148
150
  private readonly _state;
@@ -154,8 +156,38 @@ export declare class NsNavigationSplitViewState implements NsSplitViewState {
154
156
  sidebarPosition?: AdwPackType;
155
157
  collapsed?: boolean;
156
158
  showContent?: boolean;
159
+ /** Where a `g_critical` goes on this port. */
160
+ onCritical?: (message: string) => void;
161
+ /** Offer an unmatched `navigation.*` to the parent — how nesting forwards a push. */
162
+ onDelegate?: (action: 'push' | 'pop', tag?: string) => boolean;
157
163
  });
158
164
  bind(host: NsSplitViewHost): void;
165
+ /**
166
+ * Retag a mounted pane — `check_tags_cb` (adw-navigation-split-view.c:431-460).
167
+ *
168
+ * On a collision the pane KEEPS its page and loses the tag, which is a
169
+ * different failure from mounting a colliding page (that one is refused
170
+ * outright). Returns whether the tag stuck.
171
+ */
172
+ setTag(pane: SplitViewPane, tag: string | null): boolean;
173
+ /** The sidebar page's tag of record, or `null`. */
174
+ get sidebarTag(): string | null;
175
+ /** The content page's tag of record, or `null`. */
176
+ get contentTag(): string | null;
177
+ /** `navigation.push` with `tag` — `navigation_push_cb` (:644-685). */
178
+ push(tag: string): NavigationActionResult;
179
+ /** `navigation.pop` — `navigation_pop_cb` (:687-702). */
180
+ pop(): NavigationActionResult;
181
+ /**
182
+ * `Adw.NavigationSplitView:show-content` under ITS OWN NAME.
183
+ *
184
+ * This port spells the visible pane `showSidebar`, which is the negation —
185
+ * and that costs every consumer a `!(…)`, including the storybook, which
186
+ * carries one purely to bind a shared story arg. Both spellings are here now
187
+ * and neither is derived from a second copy of the flag.
188
+ */
189
+ get showContent(): boolean;
190
+ set showContent(value: boolean);
159
191
  /** Whether the panes are stacked (one at a time) rather than side by side. */
160
192
  get collapsed(): boolean;
161
193
  /** Whether the SIDEBAR is the visible pane — GTK's `show-content`, negated. */
@@ -1,4 +1,4 @@
1
- import { GridLayout, StackLayout, type EventData } from '@nativescript/core';
1
+ import { GridLayout, type EventData } from '@nativescript/core';
2
2
  import type { AdwInlineViewSwitcherDisplayMode, AdwViewSwitcherPolicy, ViewSwitcherState } from '@gjsify/adwaita-core';
3
3
  import { type AdwViewPage, type ViewSwitcherKind, type ViewSwitcherNotifyPayload } from './view-switcher-model.js';
4
4
  export type { AdwViewPage };
@@ -17,7 +17,9 @@ export interface NotifyViewSelectedEventData extends EventData, ViewSwitcherNoti
17
17
  */
18
18
  export declare abstract class AdwViewSwitcherBase extends GridLayout {
19
19
  /** The horizontal switcher bar holding the buttons. */
20
- protected readonly _bar: StackLayout;
20
+ protected readonly _bar: GridLayout;
21
+ /** `Adw.ViewSwitcher:policy`, default NARROW (adw-view-switcher.c:447-451). */
22
+ private _policy;
21
23
  /** The content area where the selected page is shown. */
22
24
  protected readonly _contentArea: GridLayout;
23
25
  /** The registered pages, in bar order. */
@@ -31,13 +33,24 @@ export declare abstract class AdwViewSwitcherBase extends GridLayout {
31
33
  protected abstract get buttonClass(): string;
32
34
  /**
33
35
  * `AdwViewSwitcher:policy`, which decides the button orientation
34
- * (adw-view-switcher.c:534-537). `'wide'` — icon beside label — because that
35
- * is the layout all three NS switchers have always used; the icon-over-label
36
- * narrow form lives in the separate `AdwViewSwitcherBar`. There is no policy
37
- * PROPERTY on NS yet, so this is a constant a subclass can override rather
38
- * than settable state.
36
+ * (adw-view-switcher.c:534-537).
37
+ *
38
+ * It used to be a HARD-CODED `'wide'` with a note saying there was no policy
39
+ * property on NS — so a consumer could not follow a breakpoint, and the
40
+ * default was the opposite of C's, which is `ADW_VIEW_SWITCHER_POLICY_NARROW`
41
+ * (adw-view-switcher.c:447-451). It is a real property now, defaulting to
42
+ * `narrow`; a subclass may still pin it.
39
43
  */
40
44
  protected get policy(): AdwViewSwitcherPolicy;
45
+ /**
46
+ * `Adw.ViewSwitcher:policy` — settable, defaulting to NARROW as in C
47
+ * (adw-view-switcher.c:447-451).
48
+ *
49
+ * A hard-coded `'wide'` meant an NS consumer could not follow a breakpoint
50
+ * at all, and the value it was pinned to was not even the default.
51
+ */
52
+ get switcherPolicy(): AdwViewSwitcherPolicy;
53
+ set switcherPolicy(value: AdwViewSwitcherPolicy);
41
54
  /**
42
55
  * What the buttons show. `'both'` for the classic switcher, whose buttons
43
56
  * "always have an icon and a label" (adw-view-switcher.c class docs);
@@ -1,3 +1,5 @@
1
+ import { normalizeWrapBoxSpacing, type AdwWrapBoxJustify, type AdwWrapBoxOrientation, type AdwWrapBoxPackDirection, type AdwWrapPolicy } from '@gjsify/adwaita-core';
2
+ export { normalizeWrapBoxSpacing };
1
3
  /**
2
4
  * `Adw.WrapBox:child-spacing` / `:line-spacing` default, in DIPs.
3
5
  *
@@ -7,16 +9,6 @@
7
9
  * DIPs tall.
8
10
  */
9
11
  export declare const DEFAULT_WRAP_BOX_SPACING = 0;
10
- /**
11
- * Normalise one spacing property, the way `adw_wrap_box_set_child_spacing` does.
12
- *
13
- * C clamps a negative value to 0 before anything else happens
14
- * (adw-wrap-box.c:587-588, :927-928); the property's declared minimum is 0, so
15
- * without the clamp GObject would reject it outright. The non-numeric cases have
16
- * no C counterpart — the property is an `int` — and resolve to the default, so a
17
- * `NaN` can never reach a native layout pass.
18
- */
19
- export declare function normalizeWrapBoxSpacing(value: unknown): number;
20
12
  /**
21
13
  * Whether writing `next` over `current` is a change the widget must act on.
22
14
  *
@@ -27,12 +19,12 @@ export declare function normalizeWrapBoxSpacing(value: unknown): number;
27
19
  */
28
20
  export declare function wrapBoxSpacingChanges(current: number, next: unknown): boolean;
29
21
  /**
30
- * The uniform margin that gives an NS `WrapLayout` child its share of the gaps.
22
+ * The uniform margin that gives a `FlexboxLayout` child its share of the gaps.
31
23
  *
32
- * `WrapLayout` has no gap property, so the inter-item spacing has to come out of
33
- * the children: half of it on each facing edge adds up to the whole gap between
34
- * any two neighbours. The margin string is NS's `top right bottom left`
35
- * shorthand.
24
+ * NativeScript has no gap property on any layout — `Style` carries no
25
+ * `columnGap`/`rowGap` — so the inter-item spacing has to come out of the
26
+ * children: half of it on each facing edge adds up to the whole gap between any
27
+ * two neighbours. The margin string is NS's `top right bottom left` shorthand.
36
28
  *
37
29
  * This is the one place the port is knowingly looser than libadwaita: the halves
38
30
  * on the OUTER edges are an inset `Adw.WrapBox` does not have. It is invisible
@@ -41,3 +33,65 @@ export declare function wrapBoxSpacingChanges(current: number, next: unknown): b
41
33
  * subset can be trusted with.
42
34
  */
43
35
  export declare function wrapBoxChildMargin(childSpacing: number, lineSpacing: number): string;
36
+ /** The `FlexboxLayout` knobs a wrap box's properties resolve to. */
37
+ export interface WrapBoxFlexStyle {
38
+ /** `FlexboxLayout:flexDirection` — the main axis, reversed for `end-to-start`. */
39
+ flexDirection: 'row' | 'row-reverse' | 'column' | 'column-reverse';
40
+ /** `FlexboxLayout:flexWrap` — always wrapping; reversed by `wrap-reverse`. */
41
+ flexWrap: 'wrap' | 'wrap-reverse';
42
+ /** `FlexboxLayout:justifyContent` — where a COMPLETE line's leftover goes. */
43
+ justifyContent: 'flex-start' | 'center' | 'flex-end' | 'space-between';
44
+ /** `FlexboxLayout:alignContent` — `line-homogeneous` stretches the lines. */
45
+ alignContent: 'stretch' | 'flex-start';
46
+ /** `FlexboxLayout.setFlexGrow` for a child on a complete line. */
47
+ childFlexGrow: number;
48
+ /** `FlexboxLayout.setFlexShrink` for every child — `wrap-policy`. */
49
+ childFlexShrink: number;
50
+ }
51
+ /** The widget properties the two resolvers read. */
52
+ export interface WrapBoxFlexInput {
53
+ orientation: AdwWrapBoxOrientation;
54
+ packDirection: AdwWrapBoxPackDirection;
55
+ wrapReverse: boolean;
56
+ justify: AdwWrapBoxJustify;
57
+ justifyLastLine: boolean;
58
+ align: number;
59
+ lineHomogeneous: boolean;
60
+ wrapPolicy: AdwWrapPolicy;
61
+ }
62
+ /**
63
+ * The CONTAINER half of the decision, resolved onto `FlexboxLayout`.
64
+ *
65
+ * The line DECISION is `resolveWrapBoxLine` in `@gjsify/adwaita-core`, held to
66
+ * `WRAP_BOX_LINE_VECTORS` — this function only maps its answer onto the knobs NS
67
+ * has, exactly as the browser element maps it onto CSS.
68
+ *
69
+ * Like a flex container, `FlexboxLayout` has ONE `justifyContent` for every
70
+ * line, so it can only carry the COMPLETE-line rule. NativeScript offers no
71
+ * `:only-child` selector and no generated content, so the final-line rule has no
72
+ * container-level expression at all; what it CAN reach is the single-child case,
73
+ * through {@link wrapBoxChildFlex}.
74
+ */
75
+ export declare function wrapBoxFlexStyle(input: WrapBoxFlexInput): WrapBoxFlexStyle;
76
+ /** What one child of the box gets set on it. */
77
+ export interface WrapBoxChildFlex {
78
+ /** `FlexboxLayout.setFlexGrow` — whether this child absorbs the line's leftover. */
79
+ flexGrow: number;
80
+ /** `FlexboxLayout.setFlexShrink` — `wrap-policy`, the same for every child. */
81
+ flexShrink: number;
82
+ }
83
+ /**
84
+ * The PER-CHILD half of the decision, which the container knobs cannot carry.
85
+ *
86
+ * Two of libadwaita's rules are facts about a child rather than about the box,
87
+ * and a single `justifyContent` has nowhere to put either. A box with exactly
88
+ * ONE child has one line, that line is the LAST one, and its child is alone on
89
+ * it — so it is governed by `justify-last-line`, and `spread` STRETCHES it
90
+ * rather than spreading anything (`n_children > 1` guards the keep-at-minimum
91
+ * branch, adw-wrap-layout.c:338; adw-wrap-box.c:349-352 says so outright).
92
+ *
93
+ * `childCount` is the box's own child count, which is the most a renderer knows
94
+ * without a layout pass: 1 means the lone-child-on-the-final-line case exactly,
95
+ * anything more means at least one complete line.
96
+ */
97
+ export declare function wrapBoxChildFlex(input: WrapBoxFlexInput, childCount: number): WrapBoxChildFlex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/adwaita-nativescript",
3
- "version": "0.32.0",
3
+ "version": "0.33.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,10 +47,10 @@
47
47
  "design-system"
48
48
  ],
49
49
  "dependencies": {
50
- "@gjsify/adwaita-core": "^0.32.0",
51
- "@gjsify/adwaita-fonts": "^0.32.0",
52
- "@gjsify/adwaita-icons": "^0.32.0",
53
- "@gjsify/native-platform": "^0.32.0"
50
+ "@gjsify/adwaita-core": "^0.33.0",
51
+ "@gjsify/adwaita-fonts": "^0.33.0",
52
+ "@gjsify/adwaita-icons": "^0.33.0",
53
+ "@gjsify/native-platform": "^0.33.0"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@nativescript/core": "*"
@@ -61,8 +61,8 @@
61
61
  }
62
62
  },
63
63
  "devDependencies": {
64
- "@gjsify/cli": "^0.32.0",
65
- "@gjsify/unit": "^0.32.0",
64
+ "@gjsify/cli": "^0.33.0",
65
+ "@gjsify/unit": "^0.33.0",
66
66
  "@types/node": "^25.9.2",
67
67
  "typescript": "^6.0.3"
68
68
  },
@@ -1182,12 +1182,25 @@ Page.adw-window {
1182
1182
  background-color: #fafafb;
1183
1183
  }
1184
1184
 
1185
+ /* The divider is on the side the sidebar is DRAWN on, which is `:dir()` x `.end`
1186
+ * in _sidebars.scss:21-39 — not a fixed right edge. The widget adds
1187
+ * `.adw-sidebar-at-visual-start` when the pane leads, so an `end` sidebar, and a
1188
+ * `start` one under RTL, get their divider on the correct edge instead of
1189
+ * drawing it inside the content. */
1185
1190
  .adw-split-view-sidebar {
1186
1191
  background-color: #ebebed;
1192
+ }
1193
+
1194
+ .adw-split-view-sidebar.adw-sidebar-at-visual-start {
1187
1195
  border-right-width: 1;
1188
1196
  border-right-color: rgba(0, 0, 0, 0.1);
1189
1197
  }
1190
1198
 
1199
+ .adw-split-view-sidebar.adw-sidebar-at-visual-end {
1200
+ border-left-width: 1;
1201
+ border-left-color: rgba(0, 0, 0, 0.1);
1202
+ }
1203
+
1191
1204
  .adw-split-view-content {
1192
1205
  background-color: #fafafb;
1193
1206
  }
@@ -1790,9 +1803,16 @@ Page.ns-dark.adw-window {
1790
1803
  .ns-dark .adw-split-view-sidebar,
1791
1804
  .ns-dark .adw-overlay-active {
1792
1805
  background-color: #2a2a2e;
1806
+ }
1807
+
1808
+ .ns-dark .adw-split-view-sidebar.adw-sidebar-at-visual-start {
1793
1809
  border-right-color: rgba(255, 255, 255, 0.12);
1794
1810
  }
1795
1811
 
1812
+ .ns-dark .adw-split-view-sidebar.adw-sidebar-at-visual-end {
1813
+ border-left-color: rgba(255, 255, 255, 0.12);
1814
+ }
1815
+
1796
1816
  .ns-dark .adw-split-view-content {
1797
1817
  background-color: #222226;
1798
1818
  }