@gjsify/adwaita-nativescript 0.30.0 → 0.32.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.
Files changed (146) hide show
  1. package/lib/esm/index.js +1 -1
  2. package/lib/esm/widgets/adw-action-row.js +1 -1
  3. package/lib/esm/widgets/adw-avatar.js +1 -1
  4. package/lib/esm/widgets/adw-banner.js +1 -1
  5. package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
  6. package/lib/esm/widgets/adw-button-content.js +1 -1
  7. package/lib/esm/widgets/adw-button-row.js +1 -1
  8. package/lib/esm/widgets/adw-carousel.js +1 -1
  9. package/lib/esm/widgets/adw-clamp.js +1 -1
  10. package/lib/esm/widgets/adw-combo-row.js +1 -1
  11. package/lib/esm/widgets/adw-data-grid.js +1 -0
  12. package/lib/esm/widgets/adw-drop-down.js +1 -0
  13. package/lib/esm/widgets/adw-entry-row.js +1 -1
  14. package/lib/esm/widgets/adw-entry.js +1 -0
  15. package/lib/esm/widgets/adw-expander-row.js +1 -1
  16. package/lib/esm/widgets/adw-header-bar.js +1 -1
  17. package/lib/esm/widgets/adw-inline-view-switcher.js +1 -1
  18. package/lib/esm/widgets/adw-navigation-split-view.js +1 -1
  19. package/lib/esm/widgets/adw-navigation-view.js +1 -1
  20. package/lib/esm/widgets/adw-overlay-split-view.js +1 -1
  21. package/lib/esm/widgets/adw-password-entry-row.js +1 -1
  22. package/lib/esm/widgets/adw-preferences-dialog.js +1 -1
  23. package/lib/esm/widgets/adw-preferences-group.js +1 -1
  24. package/lib/esm/widgets/adw-preferences-page.js +1 -1
  25. package/lib/esm/widgets/adw-sidebar.js +1 -1
  26. package/lib/esm/widgets/adw-spin-row.js +1 -1
  27. package/lib/esm/widgets/adw-spinner.js +1 -1
  28. package/lib/esm/widgets/adw-split-button.js +1 -1
  29. package/lib/esm/widgets/adw-status-page.js +1 -1
  30. package/lib/esm/widgets/adw-switch-row.js +1 -1
  31. package/lib/esm/widgets/adw-tab-view.js +1 -1
  32. package/lib/esm/widgets/adw-toolbar-view.js +1 -1
  33. package/lib/esm/widgets/adw-view-stack.js +1 -1
  34. package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
  35. package/lib/esm/widgets/adw-window-title.js +1 -1
  36. package/lib/esm/widgets/adw-wrap-box.js +1 -1
  37. package/lib/esm/widgets/avatar-color.js +1 -0
  38. package/lib/esm/widgets/bottom-sheet-state.js +1 -0
  39. package/lib/esm/widgets/button-content.js +1 -0
  40. package/lib/esm/widgets/carousel-state.js +1 -0
  41. package/lib/esm/widgets/chrome.js +1 -0
  42. package/lib/esm/widgets/data-grid-model.js +1 -0
  43. package/lib/esm/widgets/entry-row-view.js +1 -0
  44. package/lib/esm/widgets/icon-path.js +2 -2
  45. package/lib/esm/widgets/icons.ios.js +1 -0
  46. package/lib/esm/widgets/index.js +1 -1
  47. package/lib/esm/widgets/navigation-stack.js +1 -0
  48. package/lib/esm/widgets/preferences-group-state.js +1 -0
  49. package/lib/esm/widgets/preferences-search.js +1 -0
  50. package/lib/esm/widgets/row-state.js +1 -0
  51. package/lib/esm/widgets/sidebar-model.js +1 -0
  52. package/lib/esm/widgets/split-button.js +1 -0
  53. package/lib/esm/widgets/split-view-base.js +1 -1
  54. package/lib/esm/widgets/split-view-state.js +1 -0
  55. package/lib/esm/widgets/split-view-width.js +1 -0
  56. package/lib/esm/widgets/status-page-content.js +1 -0
  57. package/lib/esm/widgets/svg-path.js +2 -0
  58. package/lib/esm/widgets/tab-view-state.js +1 -0
  59. package/lib/esm/widgets/view-stack-state.js +1 -0
  60. package/lib/esm/widgets/view-switcher-base.js +1 -1
  61. package/lib/esm/widgets/view-switcher-model.js +1 -0
  62. package/lib/esm/widgets/wrap-box-layout.js +1 -0
  63. package/lib/types/banner.spec.d.ts +2 -0
  64. package/lib/types/bottom-sheet.spec.d.ts +2 -0
  65. package/lib/types/button-content.spec.d.ts +2 -0
  66. package/lib/types/carousel.spec.d.ts +1 -0
  67. package/lib/types/chrome.spec.d.ts +2 -0
  68. package/lib/types/data-grid.spec.d.ts +2 -0
  69. package/lib/types/drop-down.spec.d.ts +2 -0
  70. package/lib/types/entry-rows.spec.d.ts +2 -0
  71. package/lib/types/entry.spec.d.ts +2 -0
  72. package/lib/types/index.d.ts +2 -2
  73. package/lib/types/navigation-view.spec.d.ts +2 -0
  74. package/lib/types/preferences.spec.d.ts +2 -0
  75. package/lib/types/row-state.spec.d.ts +2 -0
  76. package/lib/types/sidebar.spec.d.ts +1 -0
  77. package/lib/types/split-button.spec.d.ts +1 -0
  78. package/lib/types/split-view-state.spec.d.ts +2 -0
  79. package/lib/types/split-view-width.spec.d.ts +2 -0
  80. package/lib/types/status-page.spec.d.ts +2 -0
  81. package/lib/types/svg-path.spec.d.ts +2 -0
  82. package/lib/types/tab-view.spec.d.ts +2 -0
  83. package/lib/types/view-stack.spec.d.ts +2 -0
  84. package/lib/types/view-switcher.spec.d.ts +1 -0
  85. package/lib/types/widgets/adw-action-row.d.ts +63 -7
  86. package/lib/types/widgets/adw-avatar.d.ts +2 -7
  87. package/lib/types/widgets/adw-banner.d.ts +26 -7
  88. package/lib/types/widgets/adw-bottom-sheet.d.ts +29 -11
  89. package/lib/types/widgets/adw-button-content.d.ts +41 -6
  90. package/lib/types/widgets/adw-button-row.d.ts +31 -9
  91. package/lib/types/widgets/adw-carousel.d.ts +70 -15
  92. package/lib/types/widgets/adw-clamp.d.ts +21 -4
  93. package/lib/types/widgets/adw-data-grid.d.ts +73 -0
  94. package/lib/types/widgets/adw-drop-down.d.ts +45 -0
  95. package/lib/types/widgets/adw-entry-row.d.ts +98 -2
  96. package/lib/types/widgets/adw-entry.d.ts +43 -0
  97. package/lib/types/widgets/adw-expander-row.d.ts +3 -0
  98. package/lib/types/widgets/adw-header-bar.d.ts +11 -2
  99. package/lib/types/widgets/adw-inline-view-switcher.d.ts +26 -0
  100. package/lib/types/widgets/adw-navigation-split-view.d.ts +2 -1
  101. package/lib/types/widgets/adw-navigation-view.d.ts +71 -16
  102. package/lib/types/widgets/adw-overlay-split-view.d.ts +29 -2
  103. package/lib/types/widgets/adw-password-entry-row.d.ts +33 -3
  104. package/lib/types/widgets/adw-preferences-dialog.d.ts +18 -0
  105. package/lib/types/widgets/adw-preferences-group.d.ts +56 -8
  106. package/lib/types/widgets/adw-preferences-page.d.ts +32 -1
  107. package/lib/types/widgets/adw-sidebar.d.ts +49 -7
  108. package/lib/types/widgets/adw-spinner.d.ts +8 -3
  109. package/lib/types/widgets/adw-split-button.d.ts +48 -13
  110. package/lib/types/widgets/adw-status-page.d.ts +5 -10
  111. package/lib/types/widgets/adw-switch-row.d.ts +21 -1
  112. package/lib/types/widgets/adw-tab-view.d.ts +129 -15
  113. package/lib/types/widgets/adw-toolbar-view.d.ts +39 -0
  114. package/lib/types/widgets/adw-view-stack.d.ts +30 -27
  115. package/lib/types/widgets/adw-view-switcher-bar.d.ts +22 -10
  116. package/lib/types/widgets/adw-window-title.d.ts +12 -8
  117. package/lib/types/widgets/adw-wrap-box.d.ts +21 -4
  118. package/lib/types/widgets/avatar-color.d.ts +14 -0
  119. package/lib/types/widgets/bottom-sheet-state.d.ts +73 -0
  120. package/lib/types/widgets/button-content.d.ts +43 -0
  121. package/lib/types/widgets/carousel-state.d.ts +85 -0
  122. package/lib/types/widgets/chrome.d.ts +159 -0
  123. package/lib/types/widgets/data-grid-model.d.ts +104 -0
  124. package/lib/types/widgets/entry-row-view.d.ts +88 -0
  125. package/lib/types/widgets/icon-path.d.ts +20 -0
  126. package/lib/types/widgets/icons.ios.d.ts +13 -0
  127. package/lib/types/widgets/index.d.ts +20 -5
  128. package/lib/types/widgets/navigation-stack.d.ts +153 -0
  129. package/lib/types/widgets/preferences-group-state.d.ts +52 -0
  130. package/lib/types/widgets/preferences-search.d.ts +68 -0
  131. package/lib/types/widgets/row-state.d.ts +71 -0
  132. package/lib/types/widgets/sidebar-model.d.ts +18 -0
  133. package/lib/types/widgets/split-button.d.ts +55 -0
  134. package/lib/types/widgets/split-view-base.d.ts +55 -12
  135. package/lib/types/widgets/split-view-state.d.ts +196 -0
  136. package/lib/types/widgets/split-view-width.d.ts +76 -0
  137. package/lib/types/widgets/status-page-content.d.ts +23 -0
  138. package/lib/types/widgets/svg-path.d.ts +28 -0
  139. package/lib/types/widgets/tab-view-state.d.ts +74 -0
  140. package/lib/types/widgets/view-stack-state.d.ts +35 -0
  141. package/lib/types/widgets/view-switcher-base.d.ts +61 -32
  142. package/lib/types/widgets/view-switcher-model.d.ts +114 -0
  143. package/lib/types/widgets/wrap-box-layout.d.ts +43 -0
  144. package/lib/types/wrap-box.spec.d.ts +2 -0
  145. package/package.json +7 -7
  146. package/src/theme/adwaita.css +393 -8
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{AdwActionRow as r}from"./widgets/adw-action-row.js";import{AdwSwitchRow as i,NOTIFY_ACTIVE as a}from"./widgets/adw-switch-row.js";import{AdwEntryRow as o,NOTIFY_TEXT as s}from"./widgets/adw-entry-row.js";import{adwaitaColorScheme as c,isThemeIconColor as l,onAdwaitaColorSchemeChanged as u,setAdwaitaColorScheme as d,themeIconColor as f,toggleAdwaitaColorScheme as p}from"./widgets/color-scheme.js";import{ADWAITA_ICON_GRID as m,DEFAULT_ICON_COLOR as h,DEFAULT_ICON_COLOR_DARK as g,extractIconPaths as _,extractPathData as v}from"./widgets/icon-path.js";import{renderSymbolicIcon as y}from"./widgets/icons.js";import{attachRowPressFeedback as b}from"./widgets/row-press.js";import{AdwImageButton as x,DEFAULT_ICON_BUTTON_ICON_SIZE as S}from"./widgets/adw-image-button.js";import{AdwPasswordEntryRow as C}from"./widgets/adw-password-entry-row.js";import{AdwIcon as w,DEFAULT_ADW_ICON_SIZE as T}from"./widgets/adw-icon.js";import{AdwComboRow as E,ComboState as D,NOTIFY_SELECTED as O}from"./widgets/adw-combo-row.js";import{AdwSpinRow as k,NOTIFY_VALUE as A,SpinState as j}from"./widgets/adw-spin-row.js";import{AdwSliderRow as M,NOTIFY_SLIDER_VALUE as N}from"./widgets/adw-slider-row.js";import{AdwExpanderRow as P,ExpanderState as F,NOTIFY_EXPANDED as I}from"./widgets/adw-expander-row.js";import{AdwButton as L}from"./widgets/adw-button.js";import{AdwMenuButton as R,MENU_ITEM_ACTIVATED as z}from"./widgets/adw-menu-button.js";import{AdwBanner as B,BUTTON_CLICKED as V}from"./widgets/adw-banner.js";import{AdwAvatar as H,DEFAULT_AVATAR_SIZE as U,avatarInitials as W}from"./widgets/adw-avatar.js";import{AdwWindowTitle as G}from"./widgets/adw-window-title.js";import{AdwClamp as K,DEFAULT_CLAMP_MAX_SIZE as q}from"./widgets/adw-clamp.js";import{AdwHeaderBar as J}from"./widgets/adw-header-bar.js";import{AdwToolbarView as Y}from"./widgets/adw-toolbar-view.js";import{AdwWrapBox as X}from"./widgets/adw-wrap-box.js";import{AdwSpinner as Z,DEFAULT_SPINNER_SIZE as re}from"./widgets/adw-spinner.js";import{AdwStatusPage as Q}from"./widgets/adw-status-page.js";import{ACTIVATED as ie,AdwButtonRow as ae}from"./widgets/adw-button-row.js";import{AdwButtonContent as oe}from"./widgets/adw-button-content.js";import{AdwSplitButton as se,CLICKED as ce,MENU_TAPPED as le}from"./widgets/adw-split-button.js";import{AdwToggleGroup as ue,NOTIFY_SELECTED as de,ToggleGroupState as fe}from"./widgets/adw-toggle-group.js";import{AdwViewStack as pe,NOTIFY_VISIBLE_CHILD as me}from"./widgets/adw-view-stack.js";import{AdwViewSwitcherBase as he,NOTIFY_SELECTED as ge}from"./widgets/view-switcher-base.js";import{AdwViewSwitcher as _e}from"./widgets/adw-view-switcher.js";import{AdwViewSwitcherBar as ve}from"./widgets/adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as ye}from"./widgets/adw-inline-view-switcher.js";import{AdwTabView as be}from"./widgets/adw-tab-view.js";import{AdwCarousel as xe,DEFAULT_CAROUSEL_PAGE_WIDTH as Se,NOTIFY_POSITION as Ce}from"./widgets/adw-carousel.js";import{AdwNavigationView as we,NOTIFY_VISIBLE_PAGE as Te}from"./widgets/adw-navigation-view.js";import{AdwSplitViewBase as Ee,DEFAULT_SIDEBAR_WIDTH as De,NOTIFY_SHOW_SIDEBAR as Oe}from"./widgets/split-view-base.js";import{AdwNavigationSplitView as ke}from"./widgets/adw-navigation-split-view.js";import{AdwOverlaySplitView as Ae}from"./widgets/adw-overlay-split-view.js";import{AdwSidebar as je,NOTIFY_SELECTED as Me}from"./widgets/adw-sidebar.js";import{AdwBottomSheet as Ne,NOTIFY_OPEN as Pe}from"./widgets/adw-bottom-sheet.js";import{AdwToast as Fe,AdwToastOverlay as Ie,AdwToastQueue as Le,DEFAULT_TOAST_TIMEOUT as Re,TOAST_BUTTON_CLICKED as ze}from"./widgets/adw-toast-overlay.js";import{AdwAlertDialog as Be,AdwAlertResponses as Ve,NOTIFY_RESPONSE as He}from"./widgets/adw-alert-dialog.js";import{AdwAboutDialog as Ue,CLOSED as We}from"./widgets/adw-about-dialog.js";import{AdwPreferencesDialog as Ge,CLOSED as Ke}from"./widgets/adw-preferences-dialog.js";import{AdwBreakpoint as qe,addBreakpoints as Je,evaluateBreakpointCondition as Ye,parseBreakpointCondition as Xe}from"./widgets/breakpoint.js";import{registerAdwaitaElements as $}from"./widgets/index.js";import{assertNativeScript as Ze,assertNativeScript as Qe,isAndroid as $e,isIOS as et,isNativeScript as tt}from"@gjsify/native-platform";function registerAdwaita(){Qe(),$()}export{We as ABOUT_CLOSED,ie as ACTIVATED,m as ADWAITA_ICON_GRID,ee as ADWAITA_SANS_FONT_FAMILY,te as ADWAITA_SANS_TTF_FILES,Ue as AdwAboutDialog,r as AdwActionRow,Be as AdwAlertDialog,Ve as AdwAlertResponses,H as AdwAvatar,B as AdwBanner,Ne as AdwBottomSheet,qe as AdwBreakpoint,L as AdwButton,oe as AdwButtonContent,ae as AdwButtonRow,xe as AdwCarousel,K as AdwClamp,E as AdwComboRow,o as AdwEntryRow,P as AdwExpanderRow,J as AdwHeaderBar,w as AdwIcon,x as AdwImageButton,ye as AdwInlineViewSwitcher,R as AdwMenuButton,ke as AdwNavigationSplitView,we as AdwNavigationView,Ae as AdwOverlaySplitView,C as AdwPasswordEntryRow,Ge as AdwPreferencesDialog,n as AdwPreferencesGroup,t as AdwPreferencesPage,je as AdwSidebar,M as AdwSliderRow,k as AdwSpinRow,Z as AdwSpinner,se as AdwSplitButton,Ee as AdwSplitViewBase,Q as AdwStatusPage,i as AdwSwitchRow,be as AdwTabView,Fe as AdwToast,Ie as AdwToastOverlay,Le as AdwToastQueue,ue as AdwToggleGroup,Y as AdwToolbarView,pe as AdwViewStack,_e as AdwViewSwitcher,ve as AdwViewSwitcherBar,he as AdwViewSwitcherBase,G as AdwWindowTitle,X as AdwWrapBox,V as BUTTON_CLICKED,ce as CLICKED,D as ComboState,T as DEFAULT_ADW_ICON_SIZE,U as DEFAULT_AVATAR_SIZE,Se as DEFAULT_CAROUSEL_PAGE_WIDTH,q as DEFAULT_CLAMP_MAX_SIZE,S as DEFAULT_ICON_BUTTON_ICON_SIZE,h as DEFAULT_ICON_COLOR,g as DEFAULT_ICON_COLOR_DARK,De as DEFAULT_SIDEBAR_WIDTH,re as DEFAULT_SPINNER_SIZE,Re as DEFAULT_TOAST_TIMEOUT,F as ExpanderState,z as MENU_ITEM_ACTIVATED,le as MENU_TAPPED,a as NOTIFY_ACTIVE,I as NOTIFY_EXPANDED,Pe as NOTIFY_OPEN,Ce as NOTIFY_POSITION,He as NOTIFY_RESPONSE,O as NOTIFY_SELECTED,Oe as NOTIFY_SHOW_SIDEBAR,Me as NOTIFY_SIDEBAR_SELECTED,N as NOTIFY_SLIDER_VALUE,s as NOTIFY_TEXT,de as NOTIFY_TOGGLE_SELECTED,A as NOTIFY_VALUE,ge as NOTIFY_VIEW_SELECTED,me as NOTIFY_VISIBLE_CHILD,Te as NOTIFY_VISIBLE_PAGE,Ke as PREFERENCES_CLOSED,j as SpinState,ze as TOAST_BUTTON_CLICKED,fe as ToggleGroupState,Je as addBreakpoints,c as adwaitaColorScheme,ne as adwaitaFontInstallInstructions,Ze as assertNativeScript,b as attachRowPressFeedback,W as avatarInitials,Ye as evaluateBreakpointCondition,_ as extractIconPaths,v as extractPathData,e as hasAdwaitaSans,$e as isAndroid,et as isIOS,tt as isNativeScript,l as isThemeIconColor,u as onAdwaitaColorSchemeChanged,Xe as parseBreakpointCondition,registerAdwaita,$ as registerAdwaitaElements,y as renderSymbolicIcon,d as setAdwaitaColorScheme,f as themeIconColor,p as toggleAdwaitaColorScheme};
1
+ 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 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t,Label as n,StackLayout as r}from"@nativescript/core";var AdwActionRow=class extends e{_textStack;_titleLabel;_subtitleLabel;_hasSubtitle=!1;_prefix=null;_suffix=null;constructor(){super(),this.className=`adw-row adw-action-row`,this.addColumn(new t(1,`auto`)),this.addColumn(new t(1,`star`)),this.addColumn(new t(1,`auto`)),this.addRow(new t(1,`auto`));let i=new r;i.orientation=`vertical`,i.className=`adw-row-text`,e.setColumn(i,1);let a=new n;a.className=`adw-row-title`,a.textWrap=!0,i.addChild(a);let o=new n;o.className=`adw-row-subtitle`,o.textWrap=!0,this.addChild(i),this._textStack=i,this._titleLabel=a,this._subtitleLabel=o}setPrefix(t){this._prefix&&=(this.removeChild(this._prefix),null),t&&(t.className=`${t.className??``} adw-row-prefix`.trim(),e.setColumn(t,0),this.addChild(t),this._prefix=t)}get prefix(){return this._prefix}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??``}get subtitle(){return this._hasSubtitle?this._subtitleLabel.text??``:``}set subtitle(e){let t=e??``;this._subtitleLabel.text=t;let n=t.length>0;n&&!this._hasSubtitle?(this._textStack.addChild(this._subtitleLabel),this._hasSubtitle=!0):!n&&this._hasSubtitle&&(this._textStack.removeChild(this._subtitleLabel),this._hasSubtitle=!1)}setSuffix(t){this._suffix&&=(this.removeChild(this._suffix),null),t&&(t.className=`${t.className??``} adw-row-suffix`.trim(),e.setColumn(t,2),this.addChild(t),this._suffix=t)}get suffix(){return this._suffix}};export{AdwActionRow};
1
+ import"../_virtual/_rolldown/runtime.js";import{ActionRowState as e,isViewSensitive as t,rowLabelVisuals as n}from"./row-state.js";import{GridLayout as r,ItemSpec as i,Label as a,StackLayout as o}from"@nativescript/core";const s=`activated`;var AdwActionRow=class extends r{isActionRow=!0;_textStack;_titleLabel;_subtitleLabel;_rowState=new e;_prefix=null;_suffix=null;constructor(){super(),this.className=`adw-row adw-action-row`,this.addColumn(new i(1,`auto`)),this.addColumn(new i(1,`star`)),this.addColumn(new i(1,`auto`)),this.addRow(new i(1,`auto`));let e=new o;e.orientation=`vertical`,e.className=`adw-row-text`,r.setColumn(e,1);let t=new a;t.className=`adw-row-title`,t.textWrap=!0,e.addChild(t);let n=new a;n.className=`adw-row-subtitle`,n.textWrap=!0,e.addChild(n),this.addChild(e),this._textStack=e,this._titleLabel=t,this._subtitleLabel=n,this._applyLabels(),this.addEventListener(`tap`,()=>this.activate())}setPrefix(e){this._prefix&&=(this.removeChild(this._prefix),null),e&&(e.className=`${e.className??``} adw-row-prefix`.trim(),r.setColumn(e,0),this.addChild(e),this._prefix=e)}get prefix(){return this._prefix}get title(){return this._rowState.title}set title(e){this._rowState.setTitle(e)&&this._applyLabels()}get subtitle(){return this._rowState.subtitle}set subtitle(e){this._rowState.setSubtitle(e)&&this._applyLabels()}setSuffix(e){this._suffix&&=(this.removeChild(this._suffix),null),e&&(e.className=`${e.className??``} adw-row-suffix`.trim(),r.setColumn(e,2),this.addChild(e),this._suffix=e)}get suffix(){return this._suffix}get activatableWidget(){return this._rowState.activatableWidget}set activatableWidget(e){this._rowState.setActivatableWidget(e,t(e))}syncActivatableWidgetSensitivity(){let e=this._rowState.activatableWidget;e&&this._rowState.setActivatableWidgetSensitive(t(e))}get activatable(){return this._rowState.activatable}set activatable(e){this._rowState.setActivatable(e)}activate(){if(!this._rowState.activatable)return;let e={eventName:s,object:this};this.notify(e)}_managesTitleVisibility=!0;_applyLabels(){let e=n({title:this._rowState.title,subtitle:this._rowState.subtitle});this._titleLabel.text=e.title,this._managesTitleVisibility&&(this._titleLabel.visibility=e.titleVisibility),this._subtitleLabel.text=e.subtitle,this._subtitleLabel.visibility=e.subtitleVisibility}};export{s as ACTIVATED,AdwActionRow};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t,Label as n}from"@nativescript/core";const r=48,i=[{fg:`#cfe1f5`,start:`#83b6ec`,stop:`#337fdc`},{fg:`#caeaf2`,start:`#7ad9f1`,stop:`#0f9ac8`},{fg:`#cef8d8`,start:`#8de6b1`,stop:`#29ae74`},{fg:`#e6f9d7`,start:`#b5e98a`,stop:`#6ab85b`},{fg:`#f9f4e1`,start:`#f8e359`,stop:`#d29d09`},{fg:`#ffead1`,start:`#ffcb62`,stop:`#d68400`},{fg:`#ffe5c5`,start:`#ffa95a`,stop:`#ed5b00`},{fg:`#f8d2ce`,start:`#f78773`,stop:`#e62d42`},{fg:`#fac7de`,start:`#e973ab`,stop:`#e33b6a`},{fg:`#e7c2e8`,start:`#cb78d4`,stop:`#9945b5`},{fg:`#d5d2f5`,start:`#9e91e8`,stop:`#7a59ca`},{fg:`#f2eade`,start:`#e3cf9c`,stop:`#b08952`},{fg:`#e5d6ca`,start:`#be916d`,stop:`#785336`},{fg:`#d8d7d3`,start:`#c0bfbc`,stop:`#6e6d71`}];function gStrHash(e){let t=5381;for(let n=0;n<e.length;n++)t=Math.imul(t,33)+e.charCodeAt(n)>>>0;return t>>>0}function blendHex(e,t){let n=Number.parseInt(e.slice(1),16),r=Number.parseInt(t.slice(1),16),mix=e=>Math.round(((n>>e&255)+(r>>e&255))/2).toString(16).padStart(2,`0`);return`#${mix(16)}${mix(8)}${mix(0)}`}function avatarColor(e){let t=i[gStrHash(e??``)%i.length];return{fill:blendHex(t.start,t.stop),fg:t.fg}}function avatarInitials(e){let t=(e??``).trim().split(/\s+/).filter(Boolean);return t.length===0?``:t.length===1?t[0].charAt(0).toUpperCase():(t[0].charAt(0)+t[t.length-1].charAt(0)).toUpperCase()}var AdwAvatar=class extends e{_label;_text=``;_size=48;constructor(){super(),this.className=`adw-avatar`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`star`));let r=new n;r.className=`adw-avatar-label`,r.horizontalAlignment=`center`,r.verticalAlignment=`middle`,e.setColumn(r,0),e.setRow(r,0),this.addChild(r),this._label=r,this._applySize()}_applySize(){this.width=this._size,this.height=this._size,this.set(`borderRadius`,this._size/2),this._label.set(`fontSize`,Math.round(this._size*.4))}get text(){return this._text}set text(e){this._text=e??``,this._label.text=avatarInitials(this._text);let{fill:t,fg:n}=avatarColor(this._text);this.set(`backgroundColor`,t),this._label.set(`color`,n)}get size(){return this._size}set size(e){this._size=Number.isFinite(e)&&e>0?e:48,this._applySize()}};export{AdwAvatar,r as DEFAULT_AVATAR_SIZE,avatarColor,avatarInitials};
1
+ import"../_virtual/_rolldown/runtime.js";import{avatarColor as e,avatarInitials as t}from"./avatar-color.js";import{GridLayout as n,ItemSpec as r,Label as i}from"@nativescript/core";import{avatarMaxFontSize as a}from"@gjsify/adwaita-core";const o=48;var AdwAvatar=class extends n{_label;_text=``;_size=48;constructor(){super(),this.className=`adw-avatar`,this.addColumn(new r(1,`star`)),this.addRow(new r(1,`star`));let e=new i;e.className=`adw-avatar-label`,e.horizontalAlignment=`center`,e.verticalAlignment=`middle`,n.setColumn(e,0),n.setRow(e,0),this.addChild(e),this._label=e,this._applySize()}_applySize(){this.width=this._size,this.height=this._size,this.set(`borderRadius`,this._size/2),this._label.set(`fontSize`,Math.round(Math.min(this._size*.4,a(this._size))))}get text(){return this._text}set text(n){this._text=n??``,this._label.text=t(this._text);let{fill:r,fg:i}=e(this._text);this.set(`backgroundColor`,r),this._label.set(`color`,i)}get size(){return this._size}set size(e){this._size=Number.isFinite(e)&&e>0?e:48,this._applySize()}};export{AdwAvatar,o as DEFAULT_AVATAR_SIZE,e as avatarColor,t as avatarInitials};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{Button as e,GridLayout as t,ItemSpec as n,Label as r}from"@nativescript/core";const i=`buttonClicked`;var AdwBanner=class extends t{_titleLabel;_button;_hasButton=!1;_revealed=!0;constructor(){super(),this.className=`adw-banner`,this.addColumn(new n(1,`star`)),this.addColumn(new n(1,`auto`)),this.addRow(new n(1,`auto`));let a=new r;a.className=`adw-banner-title`,a.textWrap=!0,t.setColumn(a,0),this.addChild(a),this._titleLabel=a;let o=new e;o.className=`adw-banner-button`,o.set(`androidElevation`,0),t.setColumn(o,1),this._button=o,o.addEventListener(`tap`,()=>{let e={eventName:i,object:this};this.notify(e)})}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??``}get buttonLabel(){return this._hasButton?this._button.text??``:``}set buttonLabel(e){let t=e??``;this._button.text=t;let n=t.length>0;n&&!this._hasButton?(this.addChild(this._button),this._hasButton=!0):!n&&this._hasButton&&(this.removeChild(this._button),this._hasButton=!1)}get revealed(){return this._revealed}set revealed(e){this._revealed=!!e,this.visibility=this._revealed?`visible`:`collapse`}};export{AdwBanner,i as BUTTON_CLICKED};
1
+ import"../_virtual/_rolldown/runtime.js";import{bannerButtonClassName as e,bannerTitleText as t,bannerVisibility as n,defaultBannerProps as r}from"./chrome.js";import{Button as i,GridLayout as a,ItemSpec as o,Label as s}from"@nativescript/core";import{bannerButtonText as c,bannerButtonVisible as l,parseBannerButtonStyle as u}from"@gjsify/adwaita-core";const d=`buttonClicked`;var AdwBanner=class extends a{_titleLabel;_button;_hasButton=!1;_props=r();constructor(){super(),this.className=`adw-banner`,this.addColumn(new o(1,`star`)),this.addColumn(new o(1,`auto`)),this.addRow(new o(1,`auto`));let e=new s;e.className=`adw-banner-title`,e.textWrap=!0,a.setColumn(e,0),this.addChild(e),this._titleLabel=e;let t=new i;t.className=`adw-banner-button`,t.set(`androidElevation`,0),a.setColumn(t,1),this._button=t,t.addEventListener(`tap`,()=>{let e={eventName:d,object:this};this.notify(e)}),this.visibility=n(this._props.revealed)}get title(){return this._props.title}set title(e){this._props.title=e??``,this._renderTitle()}get useMarkup(){return this._props.useMarkup}set useMarkup(e){this._props.useMarkup=!!e,this._renderTitle()}get buttonLabel(){return this._props.buttonLabel}set buttonLabel(e){let t=e??``;this._props.buttonLabel=t,this._button.text=c(t);let n=l(t);n&&!this._hasButton?(this.addChild(this._button),this._hasButton=!0):!n&&this._hasButton&&(this.removeChild(this._button),this._hasButton=!1)}get buttonStyle(){return this._props.buttonStyle}set buttonStyle(t){this._props.buttonStyle=u(t),this._button.className=e(this._button.className,this._props.buttonStyle)}get revealed(){return this._props.revealed}set revealed(e){this._props.revealed=!!e,this.visibility=n(this._props.revealed)}_renderTitle(){this._titleLabel.text=t(this._props.title,this._props.useMarkup)}};export{AdwBanner,d as BUTTON_CLICKED};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t,Label as n,StackLayout as r}from"@nativescript/core";const i=`notify::open`;var AdwBottomSheet=class extends e{_content=null;_sheetPanel;_sheetChild=null;_open=!1;constructor(){super(),this.className=`adw-bottom-sheet`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`star`));let i=new r;i.orientation=`vertical`,i.className=`adw-bottom-sheet-panel`,i.verticalAlignment=`bottom`,i.visibility=`collapse`,e.setColumn(i,0),e.setRow(i,0);let a=new n;a.text=`━`,a.className=`adw-bottom-sheet-handle`,a.horizontalAlignment=`center`,a.addEventListener(`tap`,()=>this.close()),i.addChild(a),this.addChild(i),this._sheetPanel=i}setContent(t){this._content&&this.removeChild(this._content),this._content=t,t&&(t.className=`${t.className??``} adw-bottom-sheet-content`.trim(),e.setColumn(t,0),e.setRow(t,0),this.insertChild(t,0))}setSheet(e){this._sheetChild&&this._sheetPanel.removeChild(this._sheetChild),this._sheetChild=e,e&&(e.className=`${e.className??``} adw-bottom-sheet-sheet`.trim(),this._sheetPanel.addChild(e))}open(){this.openState=!0}close(){this.openState=!1}get openState(){return this._open}set openState(e){let t=!!e;if(t===this._open)return;this._open=t,this._sheetPanel.visibility=t?`visible`:`collapse`;let n={eventName:i,object:this,open:t};this.notify(n)}};export{AdwBottomSheet,i as NOTIFY_OPEN};
1
+ import"../_virtual/_rolldown/runtime.js";import{CLOSE_ATTEMPT as e,NOTIFY_OPEN as t,SHEET_CLOSE as n,addMarkerClass as r,applySheetVisibility as i,createBottomSheetPresentation as a,removeMarkerClass as o,requestBottomSheetClose as s,sheetVisibility as c}from"./bottom-sheet-state.js";import{GridLayout as l,ItemSpec as u,Label as d,StackLayout as f}from"@nativescript/core";const p=`adw-bottom-sheet-content`,m=`adw-bottom-sheet-sheet`;var AdwBottomSheet=class extends l{_content=null;_sheetPanel;_sheetChild=null;_state=a();constructor(){super(),this.className=`adw-bottom-sheet`,this.addColumn(new u(1,`star`)),this.addRow(new u(1,`star`));let e=new f;e.orientation=`vertical`,e.className=`adw-bottom-sheet-panel`,e.verticalAlignment=`bottom`,e.visibility=c(this._state.open),l.setColumn(e,0),l.setRow(e,0);let n=new d;n.text=`━`,n.className=`adw-bottom-sheet-handle`,n.horizontalAlignment=`center`,n.isUserInteractionEnabled=!1,e.addChild(n),this.addChild(e),this._sheetPanel=e,this._state.subscribe(e=>{i(this._sheetPanel,e);let n={eventName:t,object:this,open:e};this.notify(n)})}setContent(e){this._content!==e&&(this._content&&(this._content.className=o(this._content.className,p),this.removeChild(this._content)),this._content=e,e&&(e.className=r(e.className,p),l.setColumn(e,0),l.setRow(e,0),this.insertChild(e,0)))}setSheet(e){this._sheetChild!==e&&(this._sheetChild&&(this._sheetChild.className=o(this._sheetChild.className,m),this._sheetPanel.removeChild(this._sheetChild)),this._sheetChild=e,e&&(e.className=r(e.className,m),this._sheetPanel.addChild(e)))}open(){this.openState=!0}close(){this.openState=!1}get openState(){return this._state.open}set openState(e){this._state.setOpen(e)}get canClose(){return this._state.canClose}set canClose(e){this._state.setCanClose(e)}requestClose(e){let{outcome:t,eventName:n}=s(this._state,e);return n&&this.notify({eventName:n,object:this}),t}};export{AdwBottomSheet,e as CLOSE_ATTEMPT,t as NOTIFY_OPEN,n as SHEET_CLOSE};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{Label as t,StackLayout as n}from"@nativescript/core";var AdwButtonContent=class extends n{_icon;_label;_hasIcon=!1;_iconSvg=``;constructor(){super(),this.orientation=`horizontal`,this.className=`adw-button-content`,this.horizontalAlignment=`center`;let n=new e;n.className=`${n.className} adw-button-content-icon`.trim(),n.verticalAlignment=`middle`,this._icon=n;let r=new t;r.className=`adw-button-content-label`,r.verticalAlignment=`middle`,this.addChild(r),this._label=r}get icon(){return this._iconSvg}set icon(e){this._iconSvg=e??``,this._icon.icon=this._iconSvg;let t=this._iconSvg.length>0;t&&!this._hasIcon?(this.removeChild(this._label),this.addChild(this._icon),this.addChild(this._label),this._hasIcon=!0):!t&&this._hasIcon&&(this.removeChild(this._icon),this._hasIcon=!1)}get iconColor(){return this._icon.iconColor}set iconColor(e){this._icon.iconColor=e}get label(){return this._label.text??``}set label(e){this._label.text=e??``}};export{AdwButtonContent};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{buttonContentClassName as t,buttonContentEllipsize as n,buttonContentIconIsFallback as r,buttonContentIconSvg as i,buttonContentLabelText as a,buttonContentLabelVisibility as o,buttonContentRootedParentClassName as s,buttonContentUnrootedParentClassName as c}from"./button-content.js";import{Label as l,StackLayout as u}from"@nativescript/core";import{ADW_BUTTON_CONTENT_DEFAULTS as d}from"@gjsify/adwaita-core";var AdwButtonContent=class extends u{_icon;_label;_props={...d};_hostButton=null;constructor(){super(),this.orientation=`horizontal`,this.className=`adw-button-content`,this.horizontalAlignment=`center`;let t=new e;t.className=`${t.className} adw-button-content-icon`.trim(),t.verticalAlignment=`middle`,t.icon=i(``),this.addChild(t),this._icon=t;let n=new l;n.className=`adw-button-content-label`,n.verticalAlignment=`middle`,n.visibility=o(``),this.addChild(n),this._label=n}get hostButton(){return this._hostButton}set hostButton(e){this._hostButton!==e&&(this._hostButton&&(this._hostButton.className=c(this._hostButton.className??``)),this._hostButton=e,e&&(e.className=s(e.className??``)))}get icon(){return this._props.iconName}set icon(e){this._props.iconName=e??``,this._icon.icon=i(this._props.iconName)}get iconIsFallback(){return r(this._props.iconName)}get iconColor(){return this._icon.iconColor}set iconColor(e){this._icon.iconColor=e}get label(){return this._props.label}set label(e){this._props.label=e??``,this._renderLabel()}get useUnderline(){return this._props.useUnderline}set useUnderline(e){this._props.useUnderline=!!e,this._renderLabel()}get canShrink(){return this._props.canShrink}set canShrink(e){this._props.canShrink=!!e,this.className=t(this.className,this._props.canShrink)}get ellipsize(){return n(this._props.canShrink)}_renderLabel(){this._label.text=a(this._props.label,this._props.useUnderline),this._label.visibility=o(this._props.label)}};export{AdwButtonContent};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{attachRowPressFeedback as t}from"./row-press.js";import{AdwIcon as n}from"./adw-icon.js";import{StackLayout as r}from"@nativescript/core";const i=`#3584e4`,a=`activated`;var AdwButtonRow=class extends e{_contentBox;_startIcon;_hasStartIcon=!1;_startIconSvg=``;constructor(){super(),this.className=`adw-row adw-action-row adw-button-row`,this._titleLabel.className=`adw-button-row-title`,this._titleLabel.horizontalAlignment=`center`,this._textStack.removeChild(this._titleLabel);let e=new r;e.orientation=`horizontal`,e.className=`adw-button-row-content`,e.horizontalAlignment=`center`;let o=new n;o.className=`${o.className} adw-button-row-start-icon`.trim(),o.verticalAlignment=`middle`,o.iconColor=i,e.addChild(this._titleLabel),this._textStack.addChild(e),this._textStack.horizontalAlignment=`center`,this._contentBox=e,this._startIcon=o,this.addEventListener(`tap`,()=>{let e={eventName:a,object:this};this.notify(e)}),t(this)}get startIcon(){return this._startIconSvg}set startIcon(e){this._startIconSvg=e??``,this._startIcon.icon=this._startIconSvg;let t=this._startIconSvg.length>0;t&&!this._hasStartIcon?(this._contentBox.removeChild(this._titleLabel),this._contentBox.addChild(this._startIcon),this._contentBox.addChild(this._titleLabel),this._hasStartIcon=!0):!t&&this._hasStartIcon&&(this._contentBox.removeChild(this._startIcon),this._hasStartIcon=!1)}get startIconColor(){return this._startIcon.iconColor}set startIconColor(e){this._startIcon.iconColor=e||i}};export{a as ACTIVATED,AdwButtonRow};
1
+ import"../_virtual/_rolldown/runtime.js";import{ButtonRowState as e,buttonRowIconVisuals as t}from"./row-state.js";import{ACTIVATED as n,AdwActionRow as r}from"./adw-action-row.js";import{AdwIcon as i}from"./adw-icon.js";import{attachRowPressFeedback as a}from"./row-press.js";import{StackLayout as o}from"@nativescript/core";const s=`#3584e4`;var c=class AdwButtonRow extends r{isActionRow=!1;_contentBox;_startIcon;_endIcon;_buttonState=new e;constructor(){super(),this.className=`adw-row adw-action-row adw-button-row`,this._titleLabel.className=`adw-button-row-title`,this._titleLabel.horizontalAlignment=`center`,this._textStack.removeChild(this._titleLabel);let e=new o;e.orientation=`horizontal`,e.className=`adw-button-row-content`,e.horizontalAlignment=`center`,this._startIcon=AdwButtonRow._makeIcon(`adw-button-row-start-icon`),this._endIcon=AdwButtonRow._makeIcon(`adw-button-row-end-icon`),e.addChild(this._startIcon),e.addChild(this._titleLabel),e.addChild(this._endIcon),this._textStack.addChild(e),this._textStack.horizontalAlignment=`center`,this._contentBox=e,this.activatable=!0,this._applyIcons(),a(this)}static _makeIcon(e){let t=new i;return t.className=`${t.className} ${e}`.trim(),t.verticalAlignment=`middle`,t.iconColor=s,t}get startIcon(){return this._buttonState.startIconName}set startIcon(e){this._buttonState.setStartIconName(e)&&this._applyIcons()}get endIcon(){return this._buttonState.endIconName}set endIcon(e){this._buttonState.setEndIconName(e)&&this._applyIcons()}get startIconColor(){return this._startIcon.iconColor}set startIconColor(e){this._startIcon.iconColor=e||s,this._endIcon.iconColor=e||s}_applyIcons(){let e=t(this._buttonState.state);this._startIcon.icon=e.startIcon,this._startIcon.visibility=e.startIconVisibility,this._endIcon.icon=e.endIcon,this._endIcon.visibility=e.endIconVisibility}};export{n as ACTIVATED,c as AdwButtonRow};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t,Label as n,ScrollView as r,StackLayout as i}from"@nativescript/core";const a=`notify::position`,o=320;var AdwCarousel=class extends e{_scroller;_track;_dots;_pages=[];_dotLabels=[];_position=0;_pageWidth=320;constructor(){super(),this.className=`adw-carousel`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`star`)),this.addRow(new t(1,`auto`));let n=new r;n.orientation=`horizontal`,n.className=`adw-carousel-scroller`,e.setRow(n,0);let a=new i;a.orientation=`horizontal`,a.className=`adw-carousel-track`,n.content=a,this.addChild(n),this._scroller=n,this._track=a;let o=new i;o.orientation=`horizontal`,o.className=`adw-carousel-dots`,o.horizontalAlignment=`center`,e.setRow(o,1),this.addChild(o),this._dots=o}addPage(e){e.width=this._pageWidth,e.className=`${e.className??``} adw-carousel-page`.trim(),this._track.addChild(e),this._pages.push(e);let t=new n;t.text=`●`,t.className=`adw-carousel-dot`;let r=this._dotLabels.length;t.addEventListener(`tap`,()=>this.scrollToPage(r)),this._dots.addChild(t),this._dotLabels.push(t),this._applyDots()}scrollToPage(e){let t=Math.max(0,Math.min(this._pages.length-1,e));this._scroller.scrollToHorizontalOffset(t*this._pageWidth,!0),this._setPosition(t,!0)}_setPosition(e,t){if(e===this._position){this._applyDots();return}if(this._position=e,this._applyDots(),t){let t={eventName:a,object:this,position:e};this.notify(t)}}_applyDots(){this._dotLabels.forEach((e,t)=>{e.className=t===this._position?`adw-carousel-dot active`:`adw-carousel-dot`})}get nPages(){return this._pages.length}get position(){return this._position}set position(e){this.scrollToPage(Number.isFinite(e)?Math.round(e):0)}get pageWidth(){return this._pageWidth}set pageWidth(e){this._pageWidth=Number.isFinite(e)&&e>0?e:320;for(let e of this._pages)e.width=this._pageWidth}};export{AdwCarousel,o as DEFAULT_CAROUSEL_PAGE_WIDTH,a as NOTIFY_POSITION};
1
+ import"../_virtual/_rolldown/runtime.js";import{CarouselScrollSync as e,DEFAULT_CAROUSEL_PAGE_WIDTH as t,applyCarouselDots as n,carouselNotifyPayload as r,carouselPositionAtOffset as i,carouselScrollOffset as a,createCarouselState as o,normalizeCarouselPageWidth as s}from"./carousel-state.js";import{GridLayout as c,ItemSpec as l,Label as u,ScrollView as d,StackLayout as f}from"@nativescript/core";const p=`notify::position`,m=`notify::n-pages`,h=`page-changed`;var AdwCarousel=class extends c{_scroller;_track;_dots;_state=o({onScrollTo:e=>this._performScroll(e)});_sync=new e;_views=new Map;_dotsById=new Map;_nextPageId=0;_pageWidth=320;constructor(){super(),this.className=`adw-carousel`,this.addColumn(new l(1,`star`)),this.addRow(new l(1,`star`)),this.addRow(new l(1,`auto`));let e=new d;e.orientation=`horizontal`,e.className=`adw-carousel-scroller`,c.setRow(e,0);let t=new f;t.orientation=`horizontal`,t.className=`adw-carousel-track`,e.content=t,this.addChild(e),this._scroller=e,this._track=t;let a=new f;a.orientation=`horizontal`,a.className=`adw-carousel-dots`,a.horizontalAlignment=`center`,c.setRow(a,1),this.addChild(a),this._dots=a,e.addEventListener(`scroll`,e=>{let t=i(e.scrollX,this._distance());this._sync.apply(this._state,t)}),this._state.subscribe(e=>{n(this._state,this._orderedDots());let t={eventName:e.reason===`n-pages`?m:p,object:this,...r(e)};this.notify(t)}),this._state.onPageChanged(e=>{let t={eventName:h,object:this,index:e};this.notify(t)})}addPage(e){this.insertPage(e,-1)}insertPage(e,t=-1){let n=`page-${this._nextPageId++}`;e.width=this._pageWidth,e.className=`${e.className??``} adw-carousel-page`.trim();let r=new u;return r.text=`●`,r.className=`adw-carousel-dot`,r.addEventListener(`tap`,()=>this.scrollToPage(this._state.indexOf(n))),this._views.set(n,e),this._dotsById.set(n,r),this._state.insertPage(n,t)?(this._state.skipReveal(n),this._syncTrack(),!0):(this._views.delete(n),this._dotsById.delete(n),!1)}removePage(e){let t=this._idOf(e);return t===null||!this._state.removePage(t)?!1:(this._state.skipReveal(t),this._views.delete(t),this._dotsById.delete(t),this._syncTrack(),!0)}reorderPage(e,t){let n=this._idOf(e);return n===null||!this._state.reorderPage(n,t)?!1:(this._syncTrack(),!0)}scrollToPage(e){this._state.scrollTo(e,{interactive:!0})}navigate(e){return this._state.navigate(e)}get nPages(){return this._state.nPages}get position(){return this._state.position}set position(e){if(!Number.isFinite(e))return;let t=this._state.pageAt(e);t>=0&&this.scrollToPage(t)}get currentPage(){return this._state.pageAt(this._state.position)}get interactive(){return this._state.interactive}set interactive(e){this._state.setInteractive(e)}get pageWidth(){return this._pageWidth}set pageWidth(e){this._pageWidth=s(e);for(let e of this._views.values())e.width=this._pageWidth}_distance(){return this._state.pageDistance(this._pageWidth)}_idOf(e){for(let[t,n]of this._views)if(n===e)return t;return null}_performScroll(e){this._sync.expect(e.position),this._scroller.scrollToHorizontalOffset(a(e.position,this._distance()),!0)}_orderedDots(){let e=[];for(let t of this._state.ids){let n=this._dotsById.get(t);n&&e.push(n)}return e}_syncTrack(){for(;this._track.getChildrenCount()>0;)this._track.removeChild(this._track.getChildAt(0));for(;this._dots.getChildrenCount()>0;)this._dots.removeChild(this._dots.getChildAt(0));let e=this._orderedDots();for(let e of this._state.ids){let t=this._views.get(e);t&&this._track.addChild(t)}for(let t of e)this._dots.addChild(t);n(this._state,e)}};export{AdwCarousel,t as DEFAULT_CAROUSEL_PAGE_WIDTH,m as NOTIFY_N_PAGES,p as NOTIFY_POSITION,h as PAGE_CHANGED};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t}from"@nativescript/core";const n=600;var AdwClamp=class extends e{_maximumSize=600;_child=null;constructor(){super(),this.className=`adw-clamp`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`auto`))}setChild(t){this._child&&=(this.removeChild(this._child),null),t&&(t.horizontalAlignment=`center`,t.width=this._maximumSize,e.setColumn(t,0),e.setRow(t,0),this.addChild(t),this._child=t)}get child(){return this._child}get maximumSize(){return this._maximumSize}set maximumSize(e){this._maximumSize=Number.isFinite(e)&&e>0?e:600,this._child&&(this._child.width=this._maximumSize)}};export{AdwClamp,n as DEFAULT_CLAMP_MAX_SIZE};
1
+ import"../_virtual/_rolldown/runtime.js";import{DEFAULT_CLAMP_MAX_SIZE as e,DEFAULT_CLAMP_TIGHTENING_THRESHOLD as t,clampAllocationFor as n,clampChildClassName as r,defaultClampProps as i,normalizeClampProp as a}from"./chrome.js";import{GridLayout as o,ItemSpec as s}from"@nativescript/core";var AdwClamp=class extends o{_props=i();_child=null;_measuredWidth=0;constructor(){super(),this.className=`adw-clamp`,this.addColumn(new s(1,`star`)),this.addRow(new s(1,`auto`)),this.addEventListener(`layoutChanged`,()=>this._allocate())}setChild(e){this._child&&=(this._child.className=r(this._child.className,null),this.removeChild(this._child),null),e&&(e.horizontalAlignment=`center`,o.setColumn(e,0),o.setRow(e,0),this.addChild(e),this._child=e,this._allocate())}get child(){return this._child}get maximumSize(){return this._props.maximumSize}set maximumSize(t){this._props.maximumSize=a(t,e),this._allocate()}get tighteningThreshold(){return this._props.tighteningThreshold}set tighteningThreshold(e){this._props.tighteningThreshold=a(e,t),this._allocate()}_allocate(){let e=this.getActualSize?.();if(e&&e.width>0&&(this._measuredWidth=e.width),!this._child)return;let{width:t,sizeClass:i}=n(this._measuredWidth,this._props);this._child.width=t;let a=r(this._child.className,i);this._child.className!==a&&(this._child.className=a)}};export{AdwClamp,e as DEFAULT_CLAMP_MAX_SIZE,t as DEFAULT_CLAMP_TIGHTENING_THRESHOLD};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{attachRowPressFeedback as t}from"./row-press.js";import{AdwIcon as n}from"./adw-icon.js";import{Label as r,StackLayout as i,action as a}from"@nativescript/core";import{ComboState as o,ComboState as s}from"@gjsify/adwaita-core";import{panDownSymbolic as c}from"@gjsify/adwaita-icons/ui";const l=`notify::selected`;var AdwComboRow=class extends e{_valueLabel;_chevron;_state=new s;constructor(){super(),this.className=`adw-row adw-action-row adw-combo-row`;let e=new i;e.orientation=`horizontal`,e.className=`adw-combo-suffix`;let a=new r;a.className=`adw-combo-value`,a.text=``;let o=new n;o.className=`adw-combo-chevron`,o.iconColor=`#9a9a9a`,o.iconSize=16,o.icon=c,e.addChild(a),e.addChild(o),this.setSuffix(e),this._valueLabel=a,this._chevron=o,this._state.subscribe(e=>{if(this._valueLabel.text=e.label,e.interactive){let t={eventName:l,object:this,selected:e.selected,value:e.value};this.notify(t)}}),this.addEventListener(`tap`,()=>{this._openChooser()}),t(this)}async _openChooser(){if(this._state.count===0)return;let e=this._state.options.map(e=>e.label),t=await a({title:this.title||void 0,cancelButtonText:`Cancel`,actions:e});this._state.select(e.indexOf(t))}get options(){return this._state.options}set options(e){this._state.setOptions(e)}get selectedIndex(){return this._state.selectedIndex}set selectedIndex(e){this._state.setSelectedIndex(e)}get selectedValue(){return this._state.selectedValue}set selectedValue(e){this._state.setSelectedValue(e)}};export{AdwComboRow,o as ComboState,l as NOTIFY_SELECTED};
1
+ 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};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{attachRowPressFeedback as e}from"./row-press.js";import{DATA_GRID_HEADER_CELL_CLASS as t,DATA_GRID_HEADER_ROW_CLASS as n,DATA_GRID_SECTION_CELL_CLASS as r,dataGridCellClass as i,dataGridItemSpec as a,dataGridRowClass as o,dataGridShapeKey as s,dataGridTracksKey as c}from"./data-grid-model.js";import{GridLayout as l,ItemSpec as u,Label as d,StackLayout as f}from"@nativescript/core";import{dataGridCellText as p,dataGridColumnClasses as m,dataGridRowInteractive as h,dataGridTracks as g,normalizeDataGridColumns as _,normalizeDataGridVariant as v}from"@gjsify/adwaita-core";const y=`row-activated`;var AdwDataGrid=class extends l{_columns=[];_rows=[];_interactive=!1;_header=null;_rowNodes=[];_trackKey=``;_shapeKey=``;constructor(){super(),this.className=`adw-data-grid`}get columns(){return this._columns}set columns(e){this._columns=_(e),this._render()}get rows(){return this._rows}set rows(e){this._rows=Array.isArray(e)?e.map(e=>({...e})):[],this._render()}get interactive(){return this._interactive}set interactive(e){this._interactive=!!e,this._paint()}_render(){this._syncColumns(),this._syncNodes(),this._paint()}_syncColumns(){let e=g(this._columns),t=c(e);if(t!==this._trackKey){this._trackKey=t,this.removeColumns();for(let t of e){let e=a(t);this.addColumn(new u(e.value,e.type))}}}_syncNodes(){let e=this._columns.length,t=s(e,this._rows.length);if(t!==this._shapeKey){this._shapeKey=t;for(let e of[this._header,...this._rowNodes])if(e!==null){this.removeChild(e.background);for(let t of e.cells)this.removeChild(t)}this._header=null,this._rowNodes=[],this.removeRows(),e!==0&&(this.addRow(new u(1,`auto`)),this._header=this._buildRow(0,e,!1),this._rowNodes=this._rows.map((t,n)=>(this.addRow(new u(1,`auto`)),this._buildRow(n+1,e,!0))))}}_buildRow(t,n,r){let i=new f;l.setRow(i,t),l.setColumn(i,0),l.setColumnSpan(i,n),this.addChild(i),r&&(e(i),i.addEventListener(`tap`,()=>this._activate(t-1)));let a=[];for(let e=0;e<n;e++){let n=new d;n.textWrap=!1,l.setRow(n,t),l.setColumn(n,e),this.addChild(n),a.push(n)}return{background:i,cells:a}}_paint(){let e=this._header;e!==null&&(e.background.className=n,this._columns.forEach((n,r)=>{let i=e.cells[r];i!==void 0&&(i.className=`${m(n).join(` `)} ${t}`,i.text=n.label??n.key,this._showCell(i,1))}),this._rows.forEach((e,t)=>{let n=this._rowNodes[t];if(n===void 0)return;let a=v(e.variant),s=h(a,e.interactive,this._interactive);if(n.background.className=o(a,s),a===`section`){let t=this._columns[0]?.key??``;n.cells.forEach((n,i)=>{i===0?(n.className=r,n.text=p(e[t]),this._showCell(n,this._columns.length)):(n.text=``,n.visibility=`collapse`,l.setColumnSpan(n,1))});return}this._columns.forEach((t,r)=>{let o=n.cells[r];o!==void 0&&(o.className=i(m(t),a),o.text=p(e[t.key]),this._showCell(o,1))})}))}_showCell(e,t){e.visibility=`visible`,l.setColumnSpan(e,t)}_activate(e){let t=this._rows[e];if(t===void 0||!h(v(t.variant),t.interactive,this._interactive))return;let n={eventName:y,object:this,index:e,row:t};this.notify(n)}};export{AdwDataGrid,y as ROW_ACTIVATED};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{attachRowPressFeedback as t}from"./row-press.js";import{Label as n,StackLayout as r,action as i}from"@nativescript/core";import{ComboState as a}from"@gjsify/adwaita-core";import{panDownSymbolic as o}from"@gjsify/adwaita-icons/ui";const s=`notify::selected`;var AdwDropDown=class extends r{_label;_chevron;_state=new a;_chooserTitle=``;constructor(){super(),this.orientation=`horizontal`,this.className=`adw-drop-down`;let r=new n;r.className=`adw-drop-down-label`,r.text=``;let i=new e;i.className=`adw-drop-down-chevron`,i.icon=o,this.addChild(r),this.addChild(i),this._label=r,this._chevron=i,this._state.subscribe(e=>{if(this._label.text=e.label,e.interactive){let t={eventName:s,object:this,selected:e.selected,value:e.value,label:e.label};this.notify(t)}}),this.addEventListener(`tap`,()=>{this._openChooser()}),t(this)}async _openChooser(){if(this._state.count===0)return;let e=this._state.options.map(e=>e.label),t=await i({title:this._chooserTitle||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 selected(){return this._state.selectedIndex}set selected(e){this._state.setSelectedIndex(e)}get selectedValue(){return this._state.selectedValue}set selectedValue(e){this._state.setSelectedValue(e)}get selectedItem(){return this._state.options[this._state.selectedIndex]??null}get chooserTitle(){return this._chooserTitle}set chooserTitle(e){this._chooserTitle=e??``}};export{AdwDropDown,s as NOTIFY_SELECTED};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{TextField as t}from"@nativescript/core";const n=`notify::text`;var AdwEntryRow=class extends e{_field;constructor(){super(),this.className=`adw-row adw-action-row adw-entry-row`,this._titleLabel.className=`adw-row-title adw-entry-title`;let e=new t;e.className=`adw-entry-field`,e.set(`backgroundColor`,`transparent`),e.set(`borderWidth`,0),this._textStack.addChild(e),this._field=e,e.addEventListener(`textChange`,()=>{let t={eventName:n,object:this,text:e.text??``};this.notify(t)})}get text(){return this._field.text??``}set text(e){let t=e??``;this._field.text!==t&&(this._field.text=t)}};export{AdwEntryRow,n as NOTIFY_TEXT};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwIcon as t}from"./adw-icon.js";import{AdwImageButton as n}from"./adw-image-button.js";import{NS_EDIT_ICON_CLASS as r,NS_ENTRY_ROW_CLASS as i,applyEntryRowState as a}from"./entry-row-view.js";import{Label as o,StackLayout as s,TextField as c}from"@nativescript/core";import{EntryRowState as l,EntryRowState as u}from"@gjsify/adwaita-core";import{documentEditSymbolic as d,objectSelectSymbolic as f}from"@gjsify/adwaita-icons/actions";const p=`notify::text`,m=`notify::text-length`,h=`apply`,g=`entry-activated`;var AdwEntryRow=class extends e{isActionRow=!1;_state=new u;_field;_emptyTitle;_suffixes;_editIcon;_indicator;_applyButton;_slotSuffix=null;_lastText=``;_lastLength=0;constructor(){super(),this._titleLabel.className=`adw-row-title adw-entry-title`,this._managesTitleVisibility=!1;let e=new o;e.className=`adw-row-title adw-entry-empty-title`,e.textWrap=!0,this._textStack.insertChild(e,0),this._emptyTitle=e;let i=new c;i.className=`adw-entry-field`,i.set(`backgroundColor`,`transparent`),i.set(`borderWidth`,0),this._textStack.addChild(i),this._field=i;let a=new s;a.orientation=`horizontal`,a.className=`adw-entry-row-suffixes`,this._suffixes=a;let l=new t;l.className=`adw-icon adw-entry-indicator`,a.addChild(l),this._indicator=l;let u=new n;u.className=`${u.className} adw-entry-apply`.trim(),u.icon=f,u.addEventListener(`tap`,()=>this.apply()),a.addChild(u),this._applyButton=u;let p=new t;p.className=r,p.icon=d,a.addChild(p),this._editIcon=p,super.setSuffix(a),this._field.addEventListener(`textChange`,()=>{this._state.setText(this._field.text??``)}),this._field.addEventListener(`focus`,()=>this._state.setEditing(!0)),this._field.addEventListener(`blur`,()=>this._state.setEditing(!1)),this._field.addEventListener(`returnPress`,()=>this._activate()),this._lastText=this._state.text,this._lastLength=this._state.textLength,this._render(this._state.state),this._state.subscribe(e=>this._onStateChanged(e))}get text(){return this._state.text}set text(e){this._state.setText(e??``)}get textLength(){return this._state.textLength}get maxLength(){return this._state.maxLength}set maxLength(e){this._state.setMaxLength(e)}get editable(){return this._state.editable}set editable(e){this._state.setEditable(e)}get showApplyButton(){return this._state.showApplyButton}set showApplyButton(e){this._state.setShowApplyButton(e)}get activatesDefault(){return this._state.activatesDefault}set activatesDefault(e){this._state.setActivatesDefault(e)}get editing(){return this._state.editing}addSuffix(e){e.className=`${e.className??``} adw-row-suffix`.trim(),this._suffixes.addChild(e)}setSuffix(e){this._slotSuffix&&=(this._suffixes.removeChild(this._slotSuffix),null),e&&(this.addSuffix(e),this._slotSuffix=e)}get suffix(){return this._slotSuffix}setShowIndicator(e){this._state.setShowIndicator(e)}setIndicatorIcon(e){this._indicator.icon=e}apply(){this._state.apply(),this.notify({eventName:h,object:this})}_activate(){let e=this._state.activate();if(e.signal===`apply`){this.notify({eventName:h,object:this});return}let t={eventName:g,object:this,activateDefault:e.activateDefault};this.notify(t)}_render(e){a({row:this,emptyTitle:this._emptyTitle,title:this._titleLabel,field:this._field,editIcon:this._editIcon,indicator:this._indicator,applyButton:this._applyButton},e,this._baseClassName)}get _baseClassName(){return i}_onStateChanged(e){if(this._render(e),e.text!==this._lastText){this._lastText=e.text;let t={eventName:p,object:this,text:e.text};this.notify(t)}if(e.textLength!==this._lastLength){this._lastLength=e.textLength;let t={eventName:m,object:this,textLength:e.textLength};this.notify(t)}}};export{AdwEntryRow,l as EntryRowState,p as NOTIFY_TEXT,m as NOTIFY_TEXT_LENGTH,h as SIGNAL_APPLY,g as SIGNAL_ENTRY_ACTIVATED};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t,TextField as n}from"@nativescript/core";import{ENTRY_ROW_MAX_LENGTH_LIMIT as r,clampEntryText as i,entryTextLength as a}from"@gjsify/adwaita-core";const o=`notify::text`,s=`activate`;var AdwEntry=class extends e{_field;_text=``;_maxLength=0;constructor(){super(),this.className=`adw-entry`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`auto`));let e=new n;e.className=`adw-entry-input`,e.set(`backgroundColor`,`transparent`),e.set(`borderWidth`,0),this.addChild(e),this._field=e,e.addEventListener(`textChange`,()=>this._applyText(this._field.text??``)),e.addEventListener(`returnPress`,()=>{let e={eventName:s,object:this};this.notify(e)})}_applyText(e){let t=i(e,this._maxLength);if(this._field.text!==t&&(this._field.text=t),t===this._text)return;this._text=t;let n={eventName:o,object:this,text:t,textLength:a(t)};this.notify(n)}get text(){return this._text}set text(e){this._applyText(e??``)}get textLength(){return a(this._text)}get maxLength(){return this._maxLength}set maxLength(e){this._maxLength=Number.isFinite(e)?Math.min(r,Math.max(0,Math.trunc(e))):0,this._applyText(this._text)}get placeholder(){return this._field.hint??``}set placeholder(e){this._field.hint=e??``}get editable(){return this._field.editable}set editable(e){this._field.editable=!!e}get field(){return this._field}};export{s as ACTIVATE,AdwEntry,o as NOTIFY_TEXT};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwIcon as t}from"./adw-icon.js";import{GridLayout as n,ItemSpec as r,StackLayout as i}from"@nativescript/core";import{ExpanderState as a,ExpanderState as o}from"@gjsify/adwaita-core";import{panDownSymbolic as s,panUpSymbolic as c}from"@gjsify/adwaita-icons/ui";const l=`notify::expanded`;var AdwExpanderRow=class extends e{_toggle;_disclosure;_state=new o;constructor(){super(),this.className=`adw-row adw-action-row adw-expander-row`,this.addRow(new r(1,`auto`));let e=new i;e.orientation=`vertical`,e.className=`adw-expander-disclosure`,e.visibility=`collapse`,n.setRow(e,1),n.setColumn(e,0),n.setColumnSpan(e,3),this.addChild(e),this._disclosure=e;let a=new t;a.icon=s,a.className=`${a.className} adw-expander-toggle`.trim(),this.setSuffix(a),this._toggle=a,this._state.subscribe(e=>{this._disclosure.visibility=e?`visible`:`collapse`,this._toggle.icon=e?c:s;let t={eventName:l,object:this,expanded:e};this.notify(t)}),a.addEventListener(`tap`,()=>{this._state.toggle()})}addRow(e){if(e instanceof r){super.addRow(e);return}this._disclosure.addChild(e)}removeRow(e){this._disclosure.removeChild(e)}get expanded(){return this._state.expanded}set expanded(e){this._state.setExpanded(e)}};export{AdwExpanderRow,a as ExpanderState,l as NOTIFY_EXPANDED};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwIcon as t}from"./adw-icon.js";import{GridLayout as n,ItemSpec as r,StackLayout as i}from"@nativescript/core";import{ExpanderState as a,ExpanderState as o}from"@gjsify/adwaita-core";import{panDownSymbolic as s,panUpSymbolic as c}from"@gjsify/adwaita-icons/ui";const l=`notify::expanded`;var AdwExpanderRow=class extends e{isActionRow=!1;_toggle;_disclosure;_state=new o;constructor(){super(),this.className=`adw-row adw-action-row adw-expander-row`,this.addRow(new r(1,`auto`));let e=new i;e.orientation=`vertical`,e.className=`adw-expander-disclosure`,e.visibility=`collapse`,n.setRow(e,1),n.setColumn(e,0),n.setColumnSpan(e,3),this.addChild(e),this._disclosure=e;let a=new t;a.icon=s,a.className=`${a.className} adw-expander-toggle`.trim(),this.setSuffix(a),this._toggle=a,this._state.subscribe(e=>{this._disclosure.visibility=e?`visible`:`collapse`,this._toggle.icon=e?c:s;let t={eventName:l,object:this,expanded:e};this.notify(t)}),a.addEventListener(`tap`,()=>{this._state.toggle()})}addRow(e){if(e instanceof r){super.addRow(e);return}this._disclosure.addChild(e)}removeRow(e){this._disclosure.removeChild(e)}get expanded(){return this._state.expanded}set expanded(e){this._state.setExpanded(e)}};export{AdwExpanderRow,a as ExpanderState,l as NOTIFY_EXPANDED};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwWindowTitle as e}from"./adw-window-title.js";import{GridLayout as t,ItemSpec as n,StackLayout as r}from"@nativescript/core";var AdwHeaderBar=class extends t{_startBox;_endBox;_titleWidget;_flat=!1;constructor(){super(),this.className=`adw-header-bar`,this.addColumn(new n(1,`auto`)),this.addColumn(new n(1,`star`)),this.addColumn(new n(1,`auto`)),this.addRow(new n(1,`auto`));let i=new r;i.orientation=`horizontal`,i.className=`adw-header-bar-start`,t.setColumn(i,0),this.addChild(i),this._startBox=i;let a=new e;a.horizontalAlignment=`center`,a.verticalAlignment=`middle`,t.setColumn(a,1),this.addChild(a),this._titleWidget=a;let o=new r;o.orientation=`horizontal`,o.className=`adw-header-bar-end`,o.horizontalAlignment=`right`,t.setColumn(o,2),this.addChild(o),this._endBox=o}get title(){return this._titleWidget instanceof e?this._titleWidget.title:``}set title(t){this._titleWidget instanceof e&&(this._titleWidget.title=t??``)}get subtitle(){return this._titleWidget instanceof e?this._titleWidget.subtitle:``}set subtitle(t){this._titleWidget instanceof e&&(this._titleWidget.subtitle=t??``)}get flat(){return this._flat}set flat(e){this._flat=!!e,this.className=this._flat?`adw-header-bar flat`:`adw-header-bar`}packStart(e){this._startBox.addChild(e)}packEnd(e){this._endBox.addChild(e)}setTitleWidget(e){this._titleWidget&&this.removeChild(this._titleWidget),e.horizontalAlignment=`center`,e.verticalAlignment=`middle`,t.setColumn(e,1),this.addChild(e),this._titleWidget=e}get titleWidget(){return this._titleWidget}get startBox(){return this._startBox}get endBox(){return this._endBox}};export{AdwHeaderBar};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwWindowTitle as e}from"./adw-window-title.js";import{GridLayout as t,ItemSpec as n,StackLayout as r}from"@nativescript/core";var AdwHeaderBar=class extends t{_startBox;_endBox;_titleWidget;_flat=!1;constructor(){super(),this.className=`adw-header-bar`,this.addColumn(new n(1,`auto`)),this.addColumn(new n(1,`star`)),this.addColumn(new n(1,`auto`)),this.addRow(new n(1,`auto`));let i=new r;i.orientation=`horizontal`,i.className=`adw-header-bar-start`,t.setColumn(i,0),this.addChild(i),this._startBox=i;let a=new e;a.horizontalAlignment=`center`,a.verticalAlignment=`middle`,t.setColumn(a,1),this.addChild(a),this._titleWidget=a;let o=new r;o.orientation=`horizontal`,o.className=`adw-header-bar-end`,o.horizontalAlignment=`right`,t.setColumn(o,2),this.addChild(o),this._endBox=o}get title(){return this._titleWidget instanceof e?this._titleWidget.title:``}set title(t){this._titleWidget instanceof e&&(this._titleWidget.title=t??``)}get subtitle(){return this._titleWidget instanceof e?this._titleWidget.subtitle:``}set subtitle(t){this._titleWidget instanceof e&&(this._titleWidget.subtitle=t??``)}get flat(){return this._flat}set flat(e){this._flat=!!e,this.className=this._flat?`adw-header-bar flat`:`adw-header-bar`}packStart(e){this._startBox.addChild(e)}packEnd(e){this._endBox.insertChild(e,0)}setTitleWidget(e){this._titleWidget&&this.removeChild(this._titleWidget),e.horizontalAlignment=`center`,e.verticalAlignment=`middle`,t.setColumn(e,1),this.addChild(e),this._titleWidget=e}get titleWidget(){return this._titleWidget}get startBox(){return this._startBox}get endBox(){return this._endBox}};export{AdwHeaderBar};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwViewSwitcherBase as e}from"./view-switcher-base.js";var AdwInlineViewSwitcher=class extends e{constructor(){super(`adw-inline-view-switcher`),this._initClasses()}get barClass(){return`adw-inline-view-switcher-bar`}get buttonClass(){return`adw-inline-view-switcher-button`}};export{AdwInlineViewSwitcher};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwViewSwitcherBase as e}from"./view-switcher-base.js";import{isInlineViewSwitcherDisplayMode as t}from"@gjsify/adwaita-core";var AdwInlineViewSwitcher=class extends e{_displayMode=`labels`;constructor(){super(`adw-inline-view-switcher`),this._initClasses()}get barClass(){return`adw-inline-view-switcher-bar`}get buttonClass(){return`adw-inline-view-switcher-button`}get buttonDisplayMode(){return this._displayMode}get switcherKind(){return`inline`}get displayMode(){return this._displayMode}set displayMode(e){t(e)&&e!==this._displayMode&&(this._displayMode=e,this._applySelection())}};export{AdwInlineViewSwitcher};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwSplitViewBase as e}from"./split-view-base.js";import{GridLayout as t}from"@nativescript/core";var AdwNavigationSplitView=class extends e{constructor(){super(`adw-navigation-split-view`),this._applyLayout()}_applyLayout(){if(!this._collapsed){this._sidebar&&(this._sidebar.visibility=`visible`,this._sidebar.translateX=0,t.setColumn(this._sidebar,0),t.setColumnSpan(this._sidebar,1),this._sidebar.width=this._sidebarWidth),this._content&&(this._content.visibility=`visible`,this._content.translateX=0,t.setColumn(this._content,1),t.setColumnSpan(this._content,1));return}this._sidebar&&(this._sidebar.visibility=this._showSidebar?`visible`:`collapse`,this._sidebar.translateX=0,t.setColumn(this._sidebar,0),t.setColumnSpan(this._sidebar,2),this._sidebar.width=`auto`),this._content&&(this._content.visibility=this._showSidebar?`collapse`:`visible`,this._content.translateX=0,t.setColumn(this._content,0),t.setColumnSpan(this._content,2))}_transitionSidebar(){if(!this._collapsed||!this._shouldAnimate()||!this._sidebar||!this._content){this._applyLayout();return}this._cancelPending();for(let e of[this._sidebar,this._content])t.setColumn(e,0),t.setColumnSpan(e,2);this._sidebar.width=`auto`;let e=this._paneWidth(),n=this._showSidebar?this._sidebar:this._content,r=this._showSidebar?this._content:this._sidebar,i=this._showSidebar?-e:e,a=this._showSidebar?e:-e;n.visibility=`visible`,n.translateX=i,r.visibility=`visible`,r.translateX=0,this._track(n.animate({translate:{x:0,y:0},duration:200,curve:`easeOut`})),this._track(r.animate({translate:{x:a,y:0},duration:200,curve:`easeIn`})).then(()=>this._settleAfterSwap(n,r)).catch(()=>{})}_settleAfterSwap(e,t){(this._showSidebar?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{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 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t}from"@nativescript/core";const n=`notify::visible-page`;var AdwNavigationView=class extends e{_pages=[];_stack=[];constructor(){super(),this.className=`adw-navigation-view`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`star`))}add(t,n=null){let r={view:t,tag:n};t.className=`${t.className??``} adw-navigation-page`.trim(),t.visibility=`collapse`,e.setColumn(t,0),e.setRow(t,0),this.addChild(t),this._pages.push(r),this._stack.length===0&&(this._stack.push(r),this._applyVisible(!1))}push(e){let t;if(typeof e==`string`)t=this._pages.find(t=>t.tag===e);else if(t=this._pages.find(t=>t.view===e),!t&&(this.add(e),t=this._pages[this._pages.length-1],this._stack[this._stack.length-1]===t)){this._applyVisible(!0);return}t&&(this._stack.push(t),this._applyVisible(!0))}pop(){return this._stack.length<=1?!1:(this._stack.pop(),this._applyVisible(!0),!0)}_applyVisible(e){let t=this._stack[this._stack.length-1];for(let e of this._pages)e.view.visibility=e===t?`visible`:`collapse`;if(e){let e={eventName:n,object:this,tag:t?.tag??null,depth:this._stack.length};this.notify(e)}}get visiblePage(){return this._stack[this._stack.length-1]?.view??null}get visiblePageTag(){return this._stack[this._stack.length-1]?.tag??null}get depth(){return this._stack.length}};export{AdwNavigationView,n as NOTIFY_VISIBLE_PAGE};
1
+ import"../_virtual/_rolldown/runtime.js";import{NOTIFY_VISIBLE_PAGE as e,NsNavigationStack as t,POPPED as n,PUSHED as r,REPLACED as i,navigationPageClassName as a}from"./navigation-stack.js";import{GridLayout as o,ItemSpec as s}from"@nativescript/core";import{describeNavigationDiagnostic as c}from"@gjsify/adwaita-core";var AdwNavigationView=class extends o{_nav;constructor(){super(),this.className=`adw-navigation-view`,this.addColumn(new s(1,`star`)),this.addRow(new s(1,`star`)),this._nav=new t({attachPage:e=>{e.className=a(e.className),o.setColumn(e,0),o.setRow(e,0),this.addChild(e)},detachPage:e=>this.removeChild(e),setPageVisibility:(e,t)=>{e.visibility=t},emit:e=>this._emit(e)},{onDiagnostic:e=>console.warn(`[AdwNavigationView] ${c(e)}`)})}add(e,t=null,n={}){return this._nav.add(e,t,n)}removePage(e){return this._nav.remove(e)}push(e,t={}){return this._nav.push(e,t)}pushByTag(e){return this._nav.pushByTag(e)}pop(){return this._nav.pop()}popToPage(e){return this._nav.popToPage(e)}popToTag(e){return this._nav.popToTag(e)}replace(e){this._nav.replace(e)}replaceWithTags(e){this._nav.replaceWithTags(e)}findPage(e){return this._nav.findPage(e)}getPreviousPage(e){return this._nav.getPreviousPage(e)}setPageTag(e,t){return this._nav.setTag(e,t)}setPageTitle(e,t){return this._nav.setTitle(e,t)}setPageCanPop(e,t){return this._nav.setCanPop(e,t)}canGoBack(){return this._nav.canGoBack()}backButtonTooltip(e){return this._nav.backButtonTooltip(e)}popFromShortcut(){return this._nav.popFromShortcut()}popFromEscape(){return this._nav.popFromEscape()}get visiblePage(){return this._nav.visiblePage}get visiblePageTag(){return this._nav.visiblePageTag}get depth(){return this._nav.depth}get navigationStack(){return this._nav.stack}get pages(){return this._nav.pages}get animateTransitions(){return this._nav.animateTransitions}set animateTransitions(e){this._nav.setAnimateTransitions(e)}get popOnEscape(){return this._nav.popOnEscape}set popOnEscape(e){this._nav.setPopOnEscape(e)}_emit(e){let t={eventName:e.name,object:this,page:e.page,tag:e.tag,depth:e.depth};this.notify(t)}};export{AdwNavigationView,e as NOTIFY_VISIBLE_PAGE,n as POPPED,r as PUSHED,i as REPLACED};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwSplitViewBase as e}from"./split-view-base.js";import{GridLayout as t}from"@nativescript/core";var AdwOverlaySplitView=class extends e{_scrim=null;constructor(){super(`adw-overlay-split-view`),this._applyLayout()}_applyLayout(){let e=this._sidebarPosition===`end`;if(!this._collapsed){this._detachScrim();let n=this._showSidebar;this._sidebar&&(this._sidebar.visibility=n?`visible`:`collapse`,this._sidebar.translateX=0,this._sidebar.opacity=1,t.setColumn(this._sidebar,+!!e),t.setColumnSpan(this._sidebar,1),this._sidebar.width=this._sidebarWidth),this._content&&(this._content.visibility=`visible`,t.setColumn(this._content,n?+!e:0),t.setColumnSpan(this._content,n?1:2));return}this._content&&(this._content.visibility=`visible`,t.setColumn(this._content,0),t.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(t.setColumn(this._scrim,0),t.setColumnSpan(this._scrim,2),this._scrim.visibility=this._showSidebar?`visible`:`collapse`,this._scrim.opacity=+!!this._showSidebar),this._sidebar&&(t.setColumn(this._sidebar,0),t.setColumnSpan(this._sidebar,2),this._sidebar.width=this._sidebarWidth,this._sidebar.horizontalAlignment=e?`right`:`left`,this._sidebar.className=`${this._stripOverlay(this._sidebar.className)} adw-split-view-sidebar adw-overlay-active`.trim(),this._sidebar.visibility=this._showSidebar?`visible`:`collapse`,this._sidebar.translateX=this._showSidebar?0:this._hiddenOffset(),this._sidebar.opacity=1)}_transitionSidebar(){if(!this._collapsed||!this._shouldAnimate()){this._applyLayout();return}this._cancelPending(),this._prepareCollapsedStructure(),this._showSidebar?this._animateOpen():this._animateClose()}_ensureScrim(){if(this._scrim)return this._scrim;let e=new t;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._sidebarPosition===`end`;this._content&&(this._content.visibility=`visible`,t.setColumn(this._content,0),t.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(t.setColumn(this._scrim,0),t.setColumnSpan(this._scrim,2)),this._sidebar&&(t.setColumn(this._sidebar,0),t.setColumnSpan(this._sidebar,2),this._sidebar.width=this._sidebarWidth,this._sidebar.horizontalAlignment=e?`right`:`left`,this._sidebar.className=`${this._stripOverlay(this._sidebar.className)} adw-split-view-sidebar adw-overlay-active`.trim())}_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._showSidebar||(t&&(t.visibility=`collapse`),e&&(e.visibility=`collapse`))}).catch(()=>{})}_hiddenOffset(){return this._sidebarPosition===`end`?this._sidebarWidth:-this._sidebarWidth}_stripOverlay(e){return(e??``).split(/\s+/).filter(e=>e&&e!==`adw-overlay-active`&&e!==`adw-split-view-sidebar`).join(` `)}};export{AdwOverlaySplitView};
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 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwEntryRow as e}from"./adw-entry-row.js";import{AdwImageButton as t}from"./adw-image-button.js";import{viewConcealSymbolic as n,viewRevealSymbolic as r}from"@gjsify/adwaita-icons/actions";var AdwPasswordEntryRow=class extends e{_peekButton;constructor(){super(),this.className=`adw-row adw-action-row adw-entry-row adw-password-entry-row`,this._field.className=`adw-entry-field adw-password-field`,this._field.secure=!0;let e=new t;e.className=`${e.className} adw-password-peek`.trim(),e.icon=r,e.addEventListener(`tap`,()=>this._togglePeek()),this.setSuffix(e),this._peekButton=e}_togglePeek(){this._field.secure=!this._field.secure,this._peekButton.icon=this._field.secure?r:n}get peeking(){return!this._field.secure}set peeking(e){let t=!!e;t!==this.peeking&&(this._field.secure=!t,this._peekButton.icon=this._field.secure?r:n)}};export{AdwPasswordEntryRow};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwImageButton as e}from"./adw-image-button.js";import{NS_PASSWORD_ENTRY_ROW_CLASS as t,applyPasswordEntryRowState as n}from"./entry-row-view.js";import{AdwEntryRow as r}from"./adw-entry-row.js";import{PasswordEntryRowState as i,PasswordEntryRowState as a}from"@gjsify/adwaita-core";import{dialogWarningSymbolic as o}from"@gjsify/adwaita-icons/status";const s=`notify::revealed`;var AdwPasswordEntryRow=class extends r{_password=new a(this._state);_peekButton;constructor(){super(),this._field.className=`adw-entry-field adw-password-field`;let t=new e;t.className=`${t.className} adw-password-peek`.trim(),t.addEventListener(`tap`,()=>this._password.togglePeek()),this.addSuffix(t),this._peekButton=t,this.setIndicatorIcon(o),this._renderPassword(this._password.state),this._password.subscribe(e=>{this._renderPassword(e);let t={eventName:s,object:this,revealed:e.revealed};this.notify(t)})}get revealed(){return this._password.revealed}set revealed(e){this._password.setRevealed(e)}get peeking(){return this._password.revealed}set peeking(e){this._password.setRevealed(e)}togglePeek(){return this._password.togglePeek()}get capsLockOn(){return this._password.capsLockOn}setCapsLockOn(e){this._password.setCapsLockOn(e)}get _baseClassName(){return t}_renderPassword(e){n({field:this._field,peekButton:this._peekButton},e)}};export{AdwPasswordEntryRow,s as NOTIFY_REVEALED,i as PasswordEntryRowState};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwImageButton as e}from"./adw-image-button.js";import{GridLayout as t,ItemSpec as n,Label as r,StackLayout as i}from"@nativescript/core";import{windowCloseSymbolic as a}from"@gjsify/adwaita-icons/ui";const o=`closed`;var AdwPreferencesDialog=class extends t{_card;_headerBox;_titleLabel;_body;constructor(){super(),this.className=`adw-preferences-dialog`,this.visibility=`collapse`,this.addColumn(new n(1,`star`)),this.addRow(new n(1,`star`));let o=new t;o.className=`adw-preferences-dialog-card`,o.verticalAlignment=`middle`,o.horizontalAlignment=`center`,o.addColumn(new n(1,`star`)),o.addRow(new n(1,`auto`)),o.addRow(new n(1,`star`)),t.setColumn(o,0),t.setRow(o,0),this.addChild(o),this._card=o;let s=new t;s.className=`adw-preferences-dialog-header`,s.addColumn(new n(1,`star`)),s.addColumn(new n(1,`auto`)),s.addRow(new n(1,`auto`)),t.setRow(s,0),o.addChild(s),this._headerBox=s;let c=new r;c.className=`adw-preferences-dialog-title`,c.text=`Preferences`,t.setColumn(c,0),s.addChild(c),this._titleLabel=c;let l=new e;l.icon=a,l.className=`${l.className} adw-preferences-dialog-close`.trim(),l.addEventListener(`tap`,()=>this.close()),t.setColumn(l,1),s.addChild(l);let u=new i;u.orientation=`vertical`,u.className=`adw-preferences-dialog-body`,t.setRow(u,1),o.addChild(u),this._body=u}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??`Preferences`}add(e){this._body.addChild(e)}remove(e){this._body.removeChild(e)}present(){this.visibility=`visible`}close(){this.visibility=`collapse`;let e={eventName:o,object:this};this.notify(e)}get open(){return this.visibility===`visible`}set open(e){e?this.present():this.close()}get body(){return this._body}};export{AdwPreferencesDialog,o as CLOSED};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwImageButton as e}from"./adw-image-button.js";import{searchNsPreferences as t}from"./preferences-search.js";import{GridLayout as n,ItemSpec as r,Label as i,StackLayout as a}from"@nativescript/core";import{windowCloseSymbolic as o}from"@gjsify/adwaita-icons/ui";const s=`closed`;var AdwPreferencesDialog=class extends n{_card;_headerBox;_titleLabel;_body;constructor(){super(),this.className=`adw-preferences-dialog`,this.visibility=`collapse`,this.addColumn(new r(1,`star`)),this.addRow(new r(1,`star`));let t=new n;t.className=`adw-preferences-dialog-card`,t.verticalAlignment=`middle`,t.horizontalAlignment=`center`,t.addColumn(new r(1,`star`)),t.addRow(new r(1,`auto`)),t.addRow(new r(1,`star`)),n.setColumn(t,0),n.setRow(t,0),this.addChild(t),this._card=t;let s=new n;s.className=`adw-preferences-dialog-header`,s.addColumn(new r(1,`star`)),s.addColumn(new r(1,`auto`)),s.addRow(new r(1,`auto`)),n.setRow(s,0),t.addChild(s),this._headerBox=s;let c=new i;c.className=`adw-preferences-dialog-title`,c.text=`Preferences`,n.setColumn(c,0),s.addChild(c),this._titleLabel=c;let l=new e;l.icon=o,l.className=`${l.className} adw-preferences-dialog-close`.trim(),l.addEventListener(`tap`,()=>this.close()),n.setColumn(l,1),s.addChild(l);let u=new a;u.orientation=`vertical`,u.className=`adw-preferences-dialog-body`,n.setRow(u,1),t.addChild(u),this._body=u}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??`Preferences`}add(e){this._body.addChild(e)}remove(e){this._body.removeChild(e)}get searchPages(){let e=[],t=this._body.getChildrenCount();for(let n=0;n<t;n++){let t=this._body.getChildAt(n);typeof t.searchGroups==`function`&&e.push(t)}return e}search(e,n){return t(this.searchPages,e,n)}present(){this.visibility=`visible`}close(){this.visibility=`collapse`;let e={eventName:s,object:this};this.notify(e)}get open(){return this.visibility===`visible`}set open(e){e?this.present():this.close()}get body(){return this._body}};export{AdwPreferencesDialog,s as CLOSED};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{Label as e,StackLayout as t}from"@nativescript/core";var AdwPreferencesGroup=class extends t{_titleLabel;_hasTitle=!1;_listbox;constructor(){super(),this.orientation=`vertical`,this.className=`adw-preferences-group`;let n=new e;n.className=`adw-preferences-group-title`,n.textWrap=!0;let r=new t;r.orientation=`vertical`,r.className=`boxed-list adw-preferences-group-listbox`,this.addChild(r),this._titleLabel=n,this._listbox=r}get title(){return this._hasTitle?this._titleLabel.text??``:``}set title(e){let t=e??``;this._titleLabel.text=t;let n=t.length>0;n&&!this._hasTitle?(this.removeChild(this._listbox),this.addChild(this._titleLabel),this.addChild(this._listbox),this._hasTitle=!0):!n&&this._hasTitle&&(this.removeChild(this._titleLabel),this._hasTitle=!1)}addRow(e){this._listbox.addChild(e),this._refreshRowEdges()}removeRow(e){this._listbox.removeChild(e),this._refreshRowEdges()}_refreshRowEdges(){let e=this._listbox.getChildrenCount();for(let t=0;t<e;t++){let e=this._listbox.getChildAt(t);e&&this._setFlushTop(e,t===0)}}_setFlushTop(e,t){let n=(e.className??``).replace(/\s*\badw-row-flush-top\b/g,``);e.className=t?`${n} adw-row-flush-top`.trim():n.trim()}get listbox(){return this._listbox}};export{AdwPreferencesGroup};
1
+ import"../_virtual/_rolldown/runtime.js";import{PREFERENCES_GROUP_HEADER_CLASS as e,preferencesGroupVisuals as t}from"./preferences-group-state.js";import{GridLayout as n,ItemSpec as r,Label as i,StackLayout as a}from"@nativescript/core";var AdwPreferencesGroup=class extends a{_header;_titleLabel;_descriptionLabel;_suffixHost;_listbox;_title=``;_description=``;_headerSuffix=null;constructor(){super(),this.orientation=`vertical`,this.className=`adw-preferences-group`;let t=new n;t.className=e,t.addColumn(new r(1,`star`)),t.addColumn(new r(1,`auto`)),t.addRow(new r(1,`auto`));let o=new a;o.orientation=`vertical`,o.className=`adw-preferences-group-labels`,o.verticalAlignment=`middle`,n.setColumn(o,0),t.addChild(o);let s=new i;s.className=`adw-preferences-group-title`,s.textWrap=!0,o.addChild(s);let c=new i;c.className=`adw-preferences-group-description`,c.textWrap=!0,o.addChild(c);let l=new a;l.orientation=`horizontal`,l.className=`adw-preferences-group-suffix`,l.verticalAlignment=`middle`,n.setColumn(l,1),t.addChild(l);let u=new a;u.orientation=`vertical`,u.className=`boxed-list adw-preferences-group-listbox`,this.addChild(t),this.addChild(u),this._header=t,this._titleLabel=s,this._descriptionLabel=c,this._suffixHost=l,this._listbox=u,this._applyVisuals()}get title(){return this._title}set title(e){this._title=e??``,this._titleLabel.text=this._title,this._applyVisuals()}get description(){return this._description}set description(e){this._description=e??``,this._descriptionLabel.text=this._description,this._applyVisuals()}get headerSuffix(){return this._headerSuffix}set headerSuffix(e){e!==this._headerSuffix&&(this._headerSuffix&&this._suffixHost.removeChild(this._headerSuffix),this._headerSuffix=e,this._headerSuffix&&this._suffixHost.addChild(this._headerSuffix),this._applyVisuals())}addRow(e){this._listbox.addChild(e),this._refreshRowEdges(),this._applyVisuals()}removeRow(e){this._listbox.removeChild(e),this._refreshRowEdges(),this._applyVisuals()}searchRows(){let e=[],t=this._listbox.getChildrenCount();for(let n=0;n<t;n++)e.push(this._listbox.getChildAt(n));return e}_applyVisuals(){let e=t({title:this._title,description:this._description,hasHeaderSuffix:this._headerSuffix!==null,rowCount:this._listbox.getChildrenCount()});this._titleLabel.visibility=e.titleVisibility,this._descriptionLabel.visibility=e.descriptionVisibility,this._header.visibility=e.headerVisibility,this._header.className=e.headerClassName,this._listbox.visibility=e.listboxVisibility}_refreshRowEdges(){let e=this._listbox.getChildrenCount();for(let t=0;t<e;t++){let e=this._listbox.getChildAt(t);e&&this._setFlushTop(e,t===0)}}_setFlushTop(e,t){let n=(e.className??``).replace(/\s*\badw-row-flush-top\b/g,``);e.className=t?`${n} adw-row-flush-top`.trim():n.trim()}get listbox(){return this._listbox}};export{AdwPreferencesGroup};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{ScrollView as e,StackLayout as t}from"@nativescript/core";var AdwPreferencesPage=class extends e{_content;constructor(){super(),this.orientation=`vertical`,this.className=`adw-preferences-page`;let e=new t;e.orientation=`vertical`,e.className=`adw-preferences-page-content`,this.content=e,this._content=e}addGroup(e){this._content.addChild(e)}removeGroup(e){this._content.removeChild(e)}get groups(){return this._content}};export{AdwPreferencesPage};
1
+ import"../_virtual/_rolldown/runtime.js";import{ScrollView as e,StackLayout as t}from"@nativescript/core";var AdwPreferencesPage=class extends e{_content;_title=``;_name=``;_iconName=``;_useUnderline=!1;constructor(){super(),this.orientation=`vertical`,this.className=`adw-preferences-page`;let e=new t;e.orientation=`vertical`,e.className=`adw-preferences-page-content`,this.content=e,this._content=e}get title(){return this._title}set title(e){this._title=e??``}get name(){return this._name}set name(e){this._name=e??``}get iconName(){return this._iconName}set iconName(e){this._iconName=e??``}get useUnderline(){return this._useUnderline}set useUnderline(e){this._useUnderline=e===!0}addGroup(e){this._content.addChild(e)}removeGroup(e){this._content.removeChild(e)}searchGroups(){let e=[],t=this._content.getChildrenCount();for(let n=0;n<t;n++){let t=this._content.getChildAt(n);typeof t.searchRows==`function`&&e.push(t)}return e}get groups(){return this._content}};export{AdwPreferencesPage};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{attachRowPressFeedback as e}from"./row-press.js";import{GridLayout as t,ItemSpec as n,Label as r,ScrollView as i,StackLayout as a}from"@nativescript/core";const o=`notify::selected`;var AdwSidebar=class extends i{_list;_rows=[];_items=[];_selected=0;constructor(){super(),this.orientation=`vertical`,this.className=`adw-sidebar`;let e=new a;e.orientation=`vertical`,e.className=`adw-sidebar-list`,this.content=e,this._list=e}setItems(i){for(let e of this._rows)this._list.removeChild(e);this._rows.length=0,this._items=Array.isArray(i)?i:[],this._items.forEach((i,a)=>{let o=new t;o.className=`adw-sidebar-row`,o.addColumn(new n(1,`star`)),o.addRow(new n(1,`auto`));let s=new r;s.className=`adw-sidebar-row-title`,s.text=i,s.textWrap=!0,t.setColumn(s,0),o.addChild(s),o.addEventListener(`tap`,()=>{this.selected=a}),e(o),this._list.addChild(o),this._rows.push(o)}),this._selected>=this._items.length&&(this._selected=0),this._applySelection()}_applySelection(){this._rows.forEach((e,t)=>{e.className=t===this._selected?`adw-sidebar-row active`:`adw-sidebar-row`})}get items(){return this._items}set items(e){this.setItems(e)}get selected(){return this._selected}set selected(e){let t=Number.isFinite(e)?e:0;if(t===this._selected||t<0||t>=this._items.length)return;this._selected=t,this._applySelection();let n={eventName:o,object:this,selected:t,title:this._items[t]??``};this.notify(n)}};export{AdwSidebar,o as NOTIFY_SELECTED};
1
+ import"../_virtual/_rolldown/runtime.js";import{attachRowPressFeedback as e}from"./row-press.js";import{SidebarState as t,sidebarRowClassName as n,sidebarSectionsFromLabels as r}from"./sidebar-model.js";import{GridLayout as i,ItemSpec as a,Label as o,ScrollView as s,StackLayout as c}from"@nativescript/core";const l=`notify::selected`,u=`activated`;var AdwSidebar=class extends s{_list;_state=new t;_rows=[];constructor(){super(),this.orientation=`vertical`,this.className=`adw-sidebar`;let e=new c;e.orientation=`vertical`,e.className=`adw-sidebar-list`,this.content=e,this._list=e,this._state.subscribe(e=>{this._applySelection();let t={eventName:l,object:this,selected:e.selected,title:e.item?.title??``,previous:e.previous,interactive:e.interactive};this.notify(t)})}setItems(e){this.setSections(r(Array.isArray(e)?e:[]))}setSections(e){this._state.setSections(e),this._rebuild()}_rebuild(){for(let e of this._rows)this._list.removeChild(e.view);this._rows.length=0;for(let t of this._state.visibleItems){let n=new i;n.className=`adw-sidebar-row`,n.addColumn(new a(1,`star`)),n.addRow(new a(1,`auto`));let r=new o;r.className=`adw-sidebar-row-title`,r.text=t.item.title,r.textWrap=!0,i.setColumn(r,0),n.addChild(r),t.item.visible===!1&&(n.visibility=`collapse`),t.item.enabled===!1&&(n.opacity=.5),n.addEventListener(`tap`,()=>this._activate(t.index)),e(n),this._list.addChild(n),this._rows.push({view:n,index:t.index})}this._applySelection()}_activate(e){if(!this._state.activate(e).activated)return;let t={eventName:u,object:this,index:e,title:this._state.itemAt(e)?.title??``};this.notify(t)}_applySelection(){let e=this._state.selected,t=this._state.selectionVisible;for(let r of this._rows)r.view.className=n(r.index===e,t)}get items(){return this._state.items.map(e=>e.item.title)}set items(e){this.setItems(e)}get sections(){return this._state.sections}set sections(e){this.setSections(e)}get selected(){return this._state.selected}set selected(e){this._state.setSelected(e)}get selectedItem(){return this._state.selectedItem}get mode(){return this._state.mode}set mode(e){this._state.setMode(e)&&this._applySelection()}get filter(){return this._state.filter}set filter(e){this._state.setFilter(e),this._rebuild()}get isEmpty(){return this._state.isEmpty}};export{u as ACTIVATED,AdwSidebar,l as NOTIFY_SELECTED};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwImageButton as t}from"./adw-image-button.js";import{Label as n,StackLayout as r}from"@nativescript/core";import{valueDecreaseSymbolic as i,valueIncreaseSymbolic as a}from"@gjsify/adwaita-icons/actions";import{SpinState as o,SpinState as s}from"@gjsify/adwaita-core";const c=`notify::value`;var AdwSpinRow=class extends e{_minusButton;_plusButton;_valueLabel;_state=new s;constructor(){super(),this.className=`adw-row adw-action-row adw-spin-row`;let e=new r;e.orientation=`horizontal`,e.className=`adw-spin-control`;let o=new n;o.className=`adw-spin-value`,o.text=String(this._state.value);let s=new t;s.icon=i,s.className=`${s.className} adw-spin-button adw-spin-minus`.trim();let l=new t;l.icon=a,l.className=`${l.className} adw-spin-button adw-spin-plus`.trim(),e.addChild(o),e.addChild(s),e.addChild(l),this.setSuffix(e),this._minusButton=s,this._plusButton=l,this._valueLabel=o,this._state.subscribe(e=>{if(this._valueLabel.text=String(e.value),e.interactive){let t={eventName:c,object:this,value:e.value};this.notify(t)}}),s.addEventListener(`tap`,()=>this._state.decrement()),l.addEventListener(`tap`,()=>this._state.increment())}get value(){return this._state.value}set value(e){this._state.setValue(e)}get min(){return this._state.min}set min(e){this._state.setMin(e)}get max(){return this._state.max}set max(e){this._state.setMax(e)}get step(){return this._state.step}set step(e){this._state.setStep(e)}};export{AdwSpinRow,c as NOTIFY_VALUE,o as SpinState};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwImageButton as t}from"./adw-image-button.js";import{Label as n,StackLayout as r}from"@nativescript/core";import{SpinState as i,SpinState as a}from"@gjsify/adwaita-core";import{valueDecreaseSymbolic as o,valueIncreaseSymbolic as s}from"@gjsify/adwaita-icons/actions";const c=`notify::value`;var AdwSpinRow=class extends e{_minusButton;_plusButton;_valueLabel;_state=new a;constructor(){super(),this.className=`adw-row adw-action-row adw-spin-row`;let e=new r;e.orientation=`horizontal`,e.className=`adw-spin-control`;let i=new n;i.className=`adw-spin-value`,i.text=String(this._state.value);let a=new t;a.icon=o,a.className=`${a.className} adw-spin-button adw-spin-minus`.trim();let l=new t;l.icon=s,l.className=`${l.className} adw-spin-button adw-spin-plus`.trim(),e.addChild(i),e.addChild(a),e.addChild(l),this.setSuffix(e),this._minusButton=a,this._plusButton=l,this._valueLabel=i,this._state.subscribe(e=>{if(this._valueLabel.text=String(e.value),e.interactive){let t={eventName:c,object:this,value:e.value};this.notify(t)}}),a.addEventListener(`tap`,()=>this._state.decrement()),l.addEventListener(`tap`,()=>this._state.increment())}get value(){return this._state.value}set value(e){this._state.setValue(e)}get min(){return this._state.min}set min(e){this._state.setMin(e)}get max(){return this._state.max}set max(e){this._state.setMax(e)}get step(){return this._state.step}set step(e){this._state.setStep(e)}};export{AdwSpinRow,c as NOTIFY_VALUE,i as SpinState};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{ActivityIndicator as e}from"@nativescript/core";const t=32;var AdwSpinner=class extends e{_size=32;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=Number.isFinite(e)&&e>0?e:32,this._applySize()}};export{AdwSpinner,t as DEFAULT_SPINNER_SIZE};
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 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{attachRowPressFeedback as e}from"./row-press.js";import{AdwIcon as t}from"./adw-icon.js";import{GridLayout as n,ItemSpec as r,Label as i,StackLayout as a,action as o}from"@nativescript/core";import{panDownSymbolic as s}from"@gjsify/adwaita-icons/ui";const c=`clicked`,l=`menuTapped`;var AdwSplitButton=class extends n{_actionPart;_actionLabel;_actionIcon;_dropdownPart;_chevron;_menu=[];_hasActionIcon=!1;_actionIconSvg=``;constructor(){super(),this.className=`adw-split-button`,this.addColumn(new r(1,`auto`)),this.addColumn(new r(1,`auto`)),this.addRow(new r(1,`auto`));let o=new a;o.orientation=`horizontal`,o.className=`adw-split-button-action`,o.horizontalAlignment=`center`,n.setColumn(o,0);let l=new i;l.className=`adw-split-button-label`,l.verticalAlignment=`middle`,o.addChild(l);let u=new t;u.className=`${u.className} adw-split-button-action-icon`.trim(),u.verticalAlignment=`middle`,this.addChild(o),this._actionPart=o,this._actionLabel=l,this._actionIcon=u;let d=new n;d.className=`adw-split-button-dropdown`,d.addColumn(new r(1,`star`)),d.addRow(new r(1,`star`)),n.setColumn(d,1);let f=new t;f.className=`${f.className} adw-split-button-chevron`.trim(),f.icon=s,f.horizontalAlignment=`center`,f.verticalAlignment=`middle`,d.addChild(f),this.addChild(d),this._dropdownPart=d,this._chevron=f,o.addEventListener(`tap`,()=>{let e={eventName:c,object:this};this.notify(e)}),d.addEventListener(`tap`,()=>{this._openMenu()}),e(o),e(d)}async _openMenu(){if(this._menu.length===0)return;let e=await o({title:this.label||void 0,cancelButtonText:`Cancel`,actions:this._menu}),t=this._menu.indexOf(e);if(t>=0){let n={eventName:l,object:this,item:e,index:t};this.notify(n)}}get label(){return this._actionLabel.text??``}set label(e){this._actionLabel.text=e??``}get actionIcon(){return this._actionIconSvg}set actionIcon(e){this._actionIconSvg=e??``,this._actionIcon.icon=this._actionIconSvg;let t=this._actionIconSvg.length>0;t&&!this._hasActionIcon?(this._actionPart.removeChild(this._actionLabel),this._actionPart.addChild(this._actionIcon),this._hasActionIcon=!0):!t&&this._hasActionIcon&&(this._actionPart.removeChild(this._actionIcon),this._actionPart.addChild(this._actionLabel),this._hasActionIcon=!1)}get menu(){return this._menu}set menu(e){this._menu=Array.isArray(e)?e:[]}get actionButton(){return this._actionPart}};export{AdwSplitButton,c as CLICKED,l as MENU_TAPPED};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{attachRowPressFeedback as t}from"./row-press.js";import{MENU_CANCEL_LABEL as n,menuSheetActions as r,resolveMenuChoice as i,setActionIcon as a,splitButtonArrowSvg as o,toMenuEntries as s}from"./split-button.js";import{GridLayout as c,ItemSpec as l,Label as u,StackLayout as d,action as f}from"@nativescript/core";import{SPLIT_BUTTON_DISABLED_OPACITY as p,SplitButtonState as m}from"@gjsify/adwaita-core";const h=`clicked`,g=`menuTapped`;var AdwSplitButton=class extends c{_actionPart;_actionLabel;_actionIcon;_dropdownPart;_chevron;_state=new m;_showingIcon=!1;_disabled=!1;constructor(){super(),this.className=`adw-split-button`,this.addColumn(new l(1,`auto`)),this.addColumn(new l(1,`auto`)),this.addRow(new l(1,`auto`));let n=new d;n.orientation=`horizontal`,n.className=`adw-split-button-action`,n.horizontalAlignment=`center`,c.setColumn(n,0);let r=new u;r.className=`adw-split-button-label`,r.verticalAlignment=`middle`,n.addChild(r);let i=new e;i.className=`${i.className} adw-split-button-action-icon`.trim(),i.verticalAlignment=`middle`,this.addChild(n),this._actionPart=n,this._actionLabel=r,this._actionIcon=i;let a=new c;a.className=`adw-split-button-dropdown`,a.addColumn(new l(1,`star`)),a.addRow(new l(1,`star`)),c.setColumn(a,1);let s=new e;s.className=`${s.className} adw-split-button-chevron`.trim(),s.icon=o(this._state.direction),s.horizontalAlignment=`center`,s.verticalAlignment=`middle`,a.addChild(s),this.addChild(a),this._dropdownPart=a,this._chevron=s,n.addEventListener(`tap`,()=>{if(this._disabled)return;let e={eventName:h,object:this};this.notify(e)}),a.addEventListener(`tap`,()=>{this._openMenu()}),t(n),t(a),this._state.subscribe(()=>this._render()),this._render()}async _openMenu(){if(this._disabled||this._state.open||!this._state.dropdownEnabled)return;let e=r(this._state.menuModel??[],n);this._state.toggleMenu();let t=i(e,await f({title:this._state.label||void 0,cancelButtonText:n,actions:e})),a=this._state.activateMenuEntry(t);if(a===null){this._state.closeMenu();return}let o={eventName:g,object:this,item:a.label,index:t,action:a.action};this.notify(o)}_render(){let{mode:e,label:t,iconName:n,direction:r,dropdownEnabled:i}=this._state,a=e===`icon`;a?this._actionIcon.icon=n??``:this._actionLabel.text=t??``,a!==this._showingIcon&&(this._actionPart.removeChild(this._showingIcon?this._actionIcon:this._actionLabel),this._actionPart.addChild(a?this._actionIcon:this._actionLabel),this._showingIcon=a),this._chevron.icon=o(r),this._dropdownPart.opacity=i?1:p,this.opacity=this._disabled?p:1}get label(){return this._state.label??``}set label(e){this._state.setLabel(e??``)}get actionIcon(){return this._state.iconName??``}set actionIcon(e){a(this._state,e)}get menu(){return this._state.menuModel??[]}set menu(e){this._state.setMenuModel(s(e))}get direction(){return this._state.direction}set direction(e){this._state.setDirection(e)}get dropdownTooltip(){return this._state.dropdownTooltip}set dropdownTooltip(e){this._state.setDropdownTooltip(e??``)}get useUnderline(){return this._state.useUnderline}set useUnderline(e){this._state.setUseUnderline(!!e)}get disabled(){return this._disabled}set disabled(e){let t=!!e;t!==this._disabled&&(this._disabled=t,this._render())}get actionButton(){return this._actionPart}};export{AdwSplitButton,h as CLICKED,g as MENU_TAPPED};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{GridLayout as t,ItemSpec as n,Label as r,StackLayout as i}from"@nativescript/core";var AdwStatusPage=class extends t{_stack;_icon;_iconSvg=``;_iconLabel;_iconGlyph=``;_iconNode=null;_titleLabel;_descriptionLabel;_hasDescription=!1;_child=null;constructor(){super(),this.className=`adw-status-page`,this.addColumn(new n(1,`star`)),this.addRow(new n(1,`star`));let a=new i;a.orientation=`vertical`,a.className=`adw-status-page-content`,a.horizontalAlignment=`center`,a.verticalAlignment=`middle`,t.setColumn(a,0),t.setRow(a,0),this.addChild(a),this._stack=a;let o=new e;o.className=`${o.className} adw-status-page-icon`.trim(),o.horizontalAlignment=`center`,o.iconColor=`#9b9b9b`,o.iconSize=96,this._icon=o;let s=new r;s.className=`adw-status-page-icon-glyph`,s.horizontalAlignment=`center`,this._iconLabel=s;let c=new r;c.className=`adw-status-page-title`,c.horizontalAlignment=`center`,c.textWrap=!0,a.addChild(c),this._titleLabel=c;let l=new r;l.className=`adw-status-page-description`,l.horizontalAlignment=`center`,l.textWrap=!0,this._descriptionLabel=l}get icon(){return this._iconSvg}set icon(e){this._iconSvg=e??``,this._icon.icon=this._iconSvg,this._setIconNode(this._iconSvg.length>0?this._icon:null)}get iconText(){return this._iconGlyph}set iconText(e){this._iconGlyph=e??``,this._iconLabel.text=this._iconGlyph,this._setIconNode(this._iconGlyph.length>0?this._iconLabel:null)}_setIconNode(e){this._iconNode!==e&&(this._iconNode&&this._stack.removeChild(this._iconNode),this._iconNode=e,e&&(this._stack.removeChild(this._titleLabel),this._hasDescription&&this._stack.removeChild(this._descriptionLabel),this._child&&this._stack.removeChild(this._child),this._stack.addChild(e),this._stack.addChild(this._titleLabel),this._hasDescription&&this._stack.addChild(this._descriptionLabel),this._child&&this._stack.addChild(this._child)))}get iconColor(){return this._icon.iconColor}set iconColor(e){this._icon.iconColor=e}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??``}get description(){return this._hasDescription?this._descriptionLabel.text??``:``}set description(e){let t=e??``;this._descriptionLabel.text=t;let n=t.length>0;n&&!this._hasDescription?(this._child&&this._stack.removeChild(this._child),this._stack.addChild(this._descriptionLabel),this._child&&this._stack.addChild(this._child),this._hasDescription=!0):!n&&this._hasDescription&&(this._stack.removeChild(this._descriptionLabel),this._hasDescription=!1)}setChild(e){this._child&&=(this._stack.removeChild(this._child),null),e&&(e.className=`${e.className??``} adw-status-page-child`.trim(),e.horizontalAlignment=`center`,this._stack.addChild(e),this._child=e)}get child(){return this._child}};export{AdwStatusPage};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{statusPageIconVisibility as t,statusPageLabelVisibility as n}from"./status-page-content.js";import{GridLayout as r,ItemSpec as i,Label as a,StackLayout as o}from"@nativescript/core";var AdwStatusPage=class extends r{_stack;_icon;_iconSvg=``;_iconLabel;_iconGlyph=``;_titleLabel;_descriptionLabel;_child=null;constructor(){super(),this.className=`adw-status-page`,this.addColumn(new i(1,`star`)),this.addRow(new i(1,`star`));let s=new o;s.orientation=`vertical`,s.className=`adw-status-page-content`,s.horizontalAlignment=`center`,s.verticalAlignment=`middle`,r.setColumn(s,0),r.setRow(s,0),this.addChild(s),this._stack=s;let c=new e;c.className=`${c.className} adw-status-page-icon`.trim(),c.horizontalAlignment=`center`,c.iconColor=`#9b9b9b`,c.iconSize=96,c.visibility=t(this._iconSvg),this._icon=c;let l=new a;l.className=`adw-status-page-icon-glyph`,l.horizontalAlignment=`center`,l.visibility=t(this._iconGlyph),this._iconLabel=l;let u=new a;u.className=`adw-status-page-title`,u.horizontalAlignment=`center`,u.textWrap=!0,u.visibility=n(u.text),this._titleLabel=u;let d=new a;d.className=`adw-status-page-description`,d.horizontalAlignment=`center`,d.textWrap=!0,d.visibility=n(d.text),this._descriptionLabel=d;for(let e of[c,l,u,d])s.addChild(e)}get icon(){return this._iconSvg}set icon(e){this._iconSvg=e??``,this._icon.icon=this._iconSvg,this._icon.visibility=t(this._iconSvg),this._iconLabel.visibility=`collapse`}get iconText(){return this._iconGlyph}set iconText(e){this._iconGlyph=e??``,this._iconLabel.text=this._iconGlyph,this._iconLabel.visibility=t(this._iconGlyph),this._icon.visibility=`collapse`}get iconColor(){return this._icon.iconColor}set iconColor(e){this._icon.iconColor=e}get title(){return this._titleLabel.text??``}set title(e){let t=e??``;this._titleLabel.text=t,this._titleLabel.visibility=n(t)}get description(){return this._descriptionLabel.text??``}set description(e){let t=e??``;this._descriptionLabel.text=t,this._descriptionLabel.visibility=n(t)}setChild(e){this._child&&=(this._stack.removeChild(this._child),null),e&&(e.className=`${e.className??``} adw-status-page-child`.trim(),e.horizontalAlignment=`center`,this._stack.addChild(e),this._child=e)}get child(){return this._child}};export{AdwStatusPage};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{Switch as t}from"@nativescript/core";const n=`notify::active`;var AdwSwitchRow=class extends e{_switch;constructor(){super(),this.className=`adw-row adw-action-row adw-switch-row`;let e=new t;e.className=`adw-switch`,this.setSuffix(e),this._switch=e,e.addEventListener(`checkedChange`,()=>{let t={eventName:n,object:this,active:e.checked};this.notify(t)})}get active(){return this._switch.checked}set active(e){let t=!!e;this._switch.checked!==t&&(this._switch.checked=t)}};export{AdwSwitchRow,n as NOTIFY_ACTIVE};
1
+ import"../_virtual/_rolldown/runtime.js";import{SwitchRowState as e}from"./row-state.js";import{AdwActionRow as t}from"./adw-action-row.js";import{Switch as n}from"@nativescript/core";const r=`notify::active`;var AdwSwitchRow=class extends t{_switch;_switchState=new e;constructor(){super(),this.className=`adw-row adw-action-row adw-switch-row`;let e=new n;e.className=`adw-switch`,this.setSuffix(e),this._switch=e,this.activatableWidget=e,this.activatable=!0,e.addEventListener(`checkedChange`,()=>this._apply(this._switchState.setActive(e.checked)))}get active(){return this._switchState.active}set active(e){this._apply(this._switchState.setActive(e))}activate(){this.activatable&&(this._apply(this._switchState.activate()),super.activate())}_apply(e){if(!e)return;this._switch.checked=this._switchState.active;let t={eventName:r,object:this,active:this._switchState.active};this.notify(t)}};export{AdwSwitchRow,r as NOTIFY_ACTIVE};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwImageButton as e}from"./adw-image-button.js";import{AdwViewSwitcherBase as t}from"./view-switcher-base.js";import{windowCloseSymbolic as n}from"@gjsify/adwaita-icons/ui";var AdwTabView=class extends t{_closeButtons=[];constructor(){super(`adw-tab-view`),this._initClasses(),this._bar.horizontalAlignment=`stretch`}get barClass(){return`adw-tab-view-bar`}get buttonClass(){return`adw-tab-view-tab`}_buildButtonExtras(t,r,i){let a=new e;a.className=`${a.className} adw-tab-close`.trim(),a.icon=n,a.iconSize=12,a.verticalAlignment=`middle`,a.addEventListener(`tap`,()=>this._closeTab(i)),t.addChild(a),this._closeButtons[i]=a}_applyButtonState(e,t,n){let r=this._closeButtons[t];r&&(r.visibility=n?`visible`:`collapse`)}_closeTab(e){if(this._pages.length<=1)return;let t=this._pages.filter((t,n)=>n!==e);(e<this._selected||this._selected>=t.length)&&(this._selected=Math.max(0,this._selected-1)),this.setViews(t)}setViews(e){this._closeButtons.length=0,super.setViews(e)}get tabs(){return this.views}set tabs(e){this.views=e}};export{AdwTabView};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{attachRowPressFeedback as t}from"./row-press.js";import{AdwImageButton as n}from"./adw-image-button.js";import{applyTabViewVisibility as r,createTabViewState as i,tabBarVisibility as a,tabCloseVisibilities as o,tabLabelText as s,tabViewNotifyPayload as c}from"./tab-view-state.js";import{GridLayout as l,ItemSpec as u,Label as d,StackLayout as f}from"@nativescript/core";import{tabIconState as p}from"@gjsify/adwaita-core";import{windowCloseSymbolic as m}from"@gjsify/adwaita-icons/ui";const h=`notify::selected-page`,g=`pages-changed`,_=`close-page`;var AdwTabView=class extends l{_state=i({onClosePage:e=>this._requestClose(e)});_bar;_contentArea;_chips=new Map;_autohide=!1;_defaultIcon=null;_generatedIds=0;closeHandler=null;constructor(){super(),this.className=`adw-tab-view`,this.addColumn(new u(1,`star`)),this.addRow(new u(1,`auto`)),this.addRow(new u(1,`star`));let e=new f;e.orientation=`horizontal`,e.horizontalAlignment=`stretch`,e.className=`adw-tab-view-bar`,l.setRow(e,0),this.addChild(e),this._bar=e;let t=new l;t.addColumn(new u(1,`star`)),t.addRow(new u(1,`star`)),l.setRow(t,1),this.addChild(t),this._contentArea=t,this._state.subscribePages(e=>this._onPagesChange(e)),this._state.subscribe(e=>{this._applySelection();let t={eventName:h,object:this,...c(e)};this.notify(t)})}get pages(){return this._state.pages}get nPages(){return this._state.nPages}get nPinnedPages(){return this._state.nPinnedPages}get selectedId(){return this._state.selectedId}get selectedIndex(){return this._state.selectedIndex}get selected(){return this._state.selectedIndex}set selected(e){this._state.selectNthPage(e)}isClosing(e){return this._state.isClosing(e)}setSelectedPage(e){return this._state.setSelectedPage(e)}selectNthPage(e){return this._state.selectNthPage(e)}selectPreviousPage(){return this._state.selectPreviousPage()}selectNextPage(){return this._state.selectNextPage()}selectFirstPage(){return this._state.selectFirstPage()}selectLastPage(){return this._state.selectLastPage()}cycleNextPage(){return this._state.cycleNextPage()}cyclePreviousPage(){return this._state.cyclePreviousPage()}addPage(e,t=null){return this._state.addPage(e,t)}insertPage(e,t){return this._state.insertPage(e,t)}prependPage(e){return this._state.prependPage(e)}appendPage(e){return this._state.appendPage(e)}insertPinnedPage(e,t){return this._state.insertPinnedPage(e,t)}prependPinnedPage(e){return this._state.prependPinnedPage(e)}appendPinnedPage(e){return this._state.appendPinnedPage(e)}setPagePinned(e,t){return this._state.setPagePinned(e,t)}closePage(e){return this._state.closePage(e)}closePageFinish(e,t){return this._state.closePageFinish(e,t)}closeOtherPages(e){this._state.closeOtherPages(e)}closePagesBefore(e){this._state.closePagesBefore(e)}closePagesAfter(e){this._state.closePagesAfter(e)}detachPage(e){return this._state.detachPage(e)}reorderPage(e,t){return this._state.reorderPage(e,t)}reorderBackward(e){return this._state.reorderBackward(e)}reorderForward(e){return this._state.reorderForward(e)}reorderFirst(e){return this._state.reorderFirst(e)}reorderLast(e){return this._state.reorderLast(e)}setPageTitle(e,t){return this._state.setPageTitle(e,t)}setPageIcon(e,t){return this._state.setPageIcon(e,t)}setPageLoading(e,t){return this._state.setPageLoading(e,t)}setPageNeedsAttention(e,t){return this._state.setPageNeedsAttention(e,t)}get diagnostics(){return this._state.diagnostics}get autohide(){return this._autohide}set autohide(e){this._autohide=!!e,this._applyBarVisibility()}get defaultIcon(){return this._defaultIcon}set defaultIcon(e){this._defaultIcon=e;for(let e of this._state.pages)this._refreshChip(e.id)}setViews(e){for(let e of this._state.pages)this._state.detachPage(e.id);for(let t of e)this._state.appendPage({id:this._nextId(),title:t.title,icon:t.icon??null,content:t.content})}get views(){return this._state.pages.map(e=>({title:e.title,content:e.content,icon:e.icon??void 0}))}set views(e){this.setViews(Array.isArray(e)?e:[])}get tabs(){return this.views}set tabs(e){this.views=e}_onPagesChange(e){switch(e.kind){case`attached`:{let t=this._state.getPage(e.id);t&&this._insertChip(t,e.position);break}case`detached`:{let t=this._chips.get(e.id);t&&this._bar.removeChild(t.button),this._chips.delete(e.id);break}case`reordered`:case`pinned`:{let t=this._chips.get(e.id);t&&(this._bar.removeChild(t.button),this._bar.insertChild(t.button,e.position)),this._refreshChip(e.id);break}case`updated`:this._refreshChip(e.id);break}this._applyBarVisibility(),this._applySelection();let t={eventName:g,object:this,...e};this.notify(t)}_insertChip(r,i){let a=new f;a.orientation=`horizontal`,a.className=`adw-tab-view-tab`,a.verticalAlignment=`middle`;let o=new e;o.className=`${o.className} adw-tab-view-tab-icon`.trim(),o.verticalAlignment=`middle`,a.addChild(o);let s=new e;s.className=`${s.className} adw-tab-view-tab-icon`.trim(),s.verticalAlignment=`middle`,a.addChild(s);let c=new d;c.className=`adw-tab-view-tab-label`,c.verticalAlignment=`middle`,a.addChild(c);let u=new n;u.className=`${u.className} adw-tab-close`.trim(),u.icon=m,u.iconSize=12,u.verticalAlignment=`middle`,u.addEventListener(`tap`,()=>this._state.closePage(r.id)),a.addChild(u),t(a),a.addEventListener(`tap`,()=>this._state.setSelectedPage(r.id)),this._bar.insertChild(a,i),this._chips.set(r.id,{button:a,icon:o,indicator:s,label:c,close:u});let p=r.content;p&&(l.setColumn(p,0),l.setRow(p,0),this._contentArea.addChild(p)),this._refreshChip(r.id)}_refreshChip(e){let t=this._state.getPage(e),n=this._chips.get(e);if(!t||!n)return;n.label.text=s(t),n.label.visibility=t.pinned?`collapse`:`visible`;let r=p(t,this._defaultIcon);n.icon.icon=r.icon??``,n.icon.visibility=r.iconVisible&&r.icon!==null?`visible`:`collapse`,n.indicator.icon=t.indicatorIcon??``,n.indicator.visibility=r.indicatorVisible?`visible`:`collapse`}_applySelection(){r(this._state);let e=o(this._state),t=this._state.selectedId;this._state.pages.forEach((n,r)=>{let i=this._chips.get(n.id);i&&(i.button.className=n.id===t?`adw-tab-view-tab active`:`adw-tab-view-tab`,i.close.visibility=e[r])})}_applyBarVisibility(){this._bar.visibility=a(this._state,this._autohide)}_requestClose(e){let t={eventName:_,object:this,id:e.id,index:this._state.getPagePosition(e.id)};return this.notify(t),this.closeHandler?this.closeHandler(e):!e.pinned}_nextId(){return this._generatedIds+=1,`tab-${this._generatedIds}`}};export{AdwTabView,_ as CLOSE_PAGE,h as NOTIFY_SELECTED_PAGE,g as PAGES_CHANGED};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t,StackLayout as n}from"@nativescript/core";var AdwToolbarView=class extends e{_topBox;_bottomBox;_content=null;constructor(){super(),this.className=`adw-toolbar-view`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`auto`)),this.addRow(new t(1,`star`)),this.addRow(new t(1,`auto`));let r=new n;r.orientation=`vertical`,r.className=`adw-toolbar-view-top`,e.setRow(r,0),this.addChild(r),this._topBox=r;let i=new n;i.orientation=`vertical`,i.className=`adw-toolbar-view-bottom`,e.setRow(i,2),this.addChild(i),this._bottomBox=i}addTopBar(e){this._topBox.addChild(e)}addBottomBar(e){this._bottomBox.addChild(e)}setContent(t){this._content&&=(this.removeChild(this._content),null),t&&(e.setRow(t,1),this.addChild(t),this._content=t)}get content(){return this._content}get topBar(){return this._topBox}get bottomBar(){return this._bottomBox}};export{AdwToolbarView};
1
+ import"../_virtual/_rolldown/runtime.js";import{defaultToolbarViewProps as e,toolbarViewClassNames as t}from"./chrome.js";import{GridLayout as n,ItemSpec as r,StackLayout as i}from"@nativescript/core";const a={view:`adw-toolbar-view`,topBar:`adw-toolbar-view-top`,bottomBar:`adw-toolbar-view-bottom`};var AdwToolbarView=class extends n{_topBox;_bottomBox;_content=null;_props=e();constructor(){super(),this.className=a.view,this.addColumn(new r(1,`star`)),this.addRow(new r(1,`auto`)),this.addRow(new r(1,`star`)),this.addRow(new r(1,`auto`));let e=new i;e.orientation=`vertical`,e.className=a.topBar,n.setRow(e,0),this.addChild(e),this._topBox=e;let t=new i;t.orientation=`vertical`,t.className=a.bottomBar,n.setRow(t,2),this.addChild(t),this._bottomBox=t,this.addEventListener(`layoutChanged`,()=>this._syncClasses())}addTopBar(e){this._topBox.addChild(e)}addBottomBar(e){this._bottomBox.addChild(e)}setContent(e){this._content&&=(this.removeChild(this._content),null),e&&(n.setRow(e,1),this.addChild(e),this._content=e),this._restackBars()}get content(){return this._content}get topBar(){return this._topBox}get bottomBar(){return this._bottomBox}get topBarStyle(){return this._props.topBarStyle}set topBarStyle(e){this._props.topBarStyle=e,this._syncClasses()}get bottomBarStyle(){return this._props.bottomBarStyle}set bottomBarStyle(e){this._props.bottomBarStyle=e,this._syncClasses()}get extendContentToTopEdge(){return this._props.extendContentToTopEdge}set extendContentToTopEdge(e){this._props.extendContentToTopEdge=!!e,this._applyBarPlacement()}get extendContentToBottomEdge(){return this._props.extendContentToBottomEdge}set extendContentToBottomEdge(e){this._props.extendContentToBottomEdge=!!e,this._applyBarPlacement()}_applyBarPlacement(){n.setRow(this._topBox,+!!this._props.extendContentToTopEdge),this._topBox.verticalAlignment=this._props.extendContentToTopEdge?`top`:`stretch`,n.setRow(this._bottomBox,this._props.extendContentToBottomEdge?1:2),this._bottomBox.verticalAlignment=this._props.extendContentToBottomEdge?`bottom`:`stretch`,this._restackBars(),this._syncClasses()}_restackBars(){if(!(!this._props.extendContentToTopEdge&&!this._props.extendContentToBottomEdge))for(let e of[this._topBox,this._bottomBox])this.removeChild(e),this.addChild(e)}_syncClasses(){let e={topBarHeight:this._topBox.getActualSize?.().height??0,bottomBarHeight:this._bottomBox.getActualSize?.().height??0},n=t({view:this.className,topBar:this._topBox.className,bottomBar:this._bottomBox.className},this._props,e);this.className!==n.view&&(this.className=n.view),this._topBox.className!==n.topBar&&(this._topBox.className=n.topBar),this._bottomBox.className!==n.bottomBar&&(this._bottomBox.className=n.bottomBar)}};export{AdwToolbarView};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t}from"@nativescript/core";const n=`notify::visible-child`;var AdwViewStack=class extends e{_pages=[];_visibleIndex=0;constructor(){super(),this.className=`adw-view-stack`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`star`))}add(t,n,r,i){let a={name:n,title:r??n,icon:i,content:t};return t.visibility=this._pages.length===0?`visible`:`collapse`,e.setColumn(t,0),e.setRow(t,0),this.addChild(t),this._pages.push(a),a}addTitled(e,t,n){return this.add(e,t,n)}get pages(){return this._pages}get visibleChildIndex(){return this._visibleIndex}set visibleChildIndex(e){!Number.isFinite(e)||e<0||e>=this._pages.length||e!==this._visibleIndex&&(this._visibleIndex=e,this._apply(!0))}get visibleChildName(){return this._pages[this._visibleIndex]?.name??``}set visibleChildName(e){let t=this._pages.findIndex(t=>t.name===e);t>=0&&(this.visibleChildIndex=t)}get visibleChild(){return this._pages[this._visibleIndex]?.content??null}_apply(e){if(this._pages.forEach((e,t)=>{e.content.visibility=t===this._visibleIndex?`visible`:`collapse`}),e){let e=this._pages[this._visibleIndex],t={eventName:n,object:this,index:this._visibleIndex,name:e?.name??``,title:e?.title??``};this.notify(t)}}};export{AdwViewStack,n as NOTIFY_VISIBLE_CHILD};
1
+ import"../_virtual/_rolldown/runtime.js";import{applyViewStackVisibility as e,createViewStackState as t,viewStackNotifyPayload as n}from"./view-stack-state.js";import{GridLayout as r,ItemSpec as i}from"@nativescript/core";const a=`notify::visible-child`;var AdwViewStack=class extends r{_state=t();constructor(){super(),this.className=`adw-view-stack`,this.addColumn(new i(1,`star`)),this.addRow(new i(1,`star`)),this._state.subscribe(t=>{e(this._state);let r={eventName:a,object:this,...n(t)};this.notify(r)})}add(t,n,i,a){let o=this._state.addPage({name:n,title:i,icon:a,content:t});return r.setColumn(t,0),r.setRow(t,0),this.addChild(t),e(this._state),o}addTitled(e,t,n){return this.add(e,t,n)}removePage(t){let n=this._state.pages[this._state.indexOfName(t)]?.content;return this._state.removePage(t)?(n&&this.removeChild(n),e(this._state),!0):!1}setPageVisible(t,n){let r=this._state.setPageVisible(t,n);return e(this._state),r}get pages(){return this._state.pages}get visibleChildIndex(){return this._state.visibleIndex}set visibleChildIndex(e){this._state.setVisibleIndex(e)}get visibleChildName(){return this._state.visibleName}set visibleChildName(e){this._state.setVisibleName(e)}get visibleChild(){return this._state.visiblePage?.content??null}};export{AdwViewStack,a as NOTIFY_VISIBLE_CHILD};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{attachRowPressFeedback as e}from"./row-press.js";import{AdwIcon as t}from"./adw-icon.js";import{NOTIFY_VISIBLE_CHILD as n}from"./adw-view-stack.js";import{GridLayout as r,ItemSpec as i,Label as a,StackLayout as o}from"@nativescript/core";var AdwViewSwitcherBar=class extends r{_bar;_buttons=[];_stack=null;_stackListener=null;_revealed=!0;constructor(){super(),this.className=`adw-viewswitcherbar`,this.addColumn(new i(1,`star`)),this.addRow(new i(1,`auto`));let e=new r;e.className=`adw-viewswitcherbar-box`,e.addRow(new i(1,`auto`)),r.setRow(e,0),this.addChild(e),this._bar=e,this.addEventListener(`loaded`,()=>this._syncActive())}setStack(e){if(this._stack&&this._stackListener&&this._stack.removeEventListener(n,this._stackListener),this._stack=e,this._stackListener=null,this._rebuild(),e){let listener=()=>this._syncActive();e.addEventListener(n,listener),this._stackListener=listener}}get stack(){return this._stack}set stack(e){this.setStack(e)}get revealed(){return this._revealed}set revealed(e){this._revealed=!!e,this.visibility=this._revealed?`visible`:`collapse`}refresh(){this._rebuild()}_rebuild(){for(let e of this._buttons)this._bar.removeChild(e);this._buttons.length=0,this._bar.removeColumns(),(this._stack?.pages??[]).forEach((n,s)=>{this._bar.addColumn(new i(1,`star`));let c=new o;if(c.orientation=`vertical`,c.className=`adw-viewswitcherbar-button`,c.horizontalAlignment=`stretch`,n.icon){let e=new t;e.className=`${e.className} adw-viewswitcherbar-button-icon`.trim(),e.horizontalAlignment=`center`,e.icon=n.icon,c.addChild(e)}let l=new a;l.text=n.title,l.className=`adw-viewswitcherbar-button-label`,l.horizontalAlignment=`center`,l.textAlignment=`center`,c.addChild(l),e(c),c.addEventListener(`tap`,()=>{this._stack&&(this._stack.visibleChildIndex=s)}),r.setColumn(c,s),this._bar.addChild(c),this._buttons.push(c)}),this._syncActive()}_syncActive(){let e=this._stack?.visibleChildIndex??-1;this._buttons.forEach((t,n)=>{t.className=n===e?`adw-viewswitcherbar-button active`:`adw-viewswitcherbar-button`})}};export{AdwViewSwitcherBar};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{attachRowPressFeedback as t}from"./row-press.js";import{NOTIFY_VISIBLE_CHILD as n}from"./adw-view-stack.js";import{createViewSwitcherBarState as r,nsIconSvg as i}from"./view-switcher-model.js";import{GridLayout as a,ItemSpec as o,Label as s,StackLayout as c}from"@nativescript/core";import{buildViewSwitcherButtons as l,viewSwitcherPagesFromStack as u}from"@gjsify/adwaita-core";var AdwViewSwitcherBar=class extends a{_bar;_nodes=[];_stack=null;_stackListener=null;_barState=r();constructor(){super(),this.className=`adw-viewswitcherbar`,this.addColumn(new o(1,`star`)),this.addRow(new o(1,`auto`));let e=new a;e.className=`adw-viewswitcherbar-box`,e.addRow(new o(1,`auto`)),a.setRow(e,0),this.addChild(e),this._bar=e,this._barState.subscribe(()=>this._applyRevealed()),this._applyRevealed(),this.addEventListener(`loaded`,()=>{this._bindStack(),this._rebuild()}),this.addEventListener(`unloaded`,()=>this._unbindStack())}setStack(e){this._unbindStack(),this._stack=e,this._bindStack(),this._rebuild()}get stack(){return this._stack}set stack(e){this.setStack(e)}get reveal(){return this._barState.reveal}set reveal(e){this._barState.setReveal(e)}get revealed(){return this._barState.revealed}refresh(){this._rebuild()}_bindStack(){if(!this._stack||this._stackListener)return;let listener=()=>this._rebuild();this._stack.addEventListener(n,listener),this._stackListener=listener}_unbindStack(){!this._stack||!this._stackListener||(this._stack.removeEventListener(n,this._stackListener),this._stackListener=null)}_rebuild(){let e=this._stack?.pages??[];this._barState.setPages(e);let t=l(u(e),this._stack?.visibleChildIndex??-1,`narrow`);if(t.length!==this._nodes.length){for(let e of this._nodes)this._bar.removeChild(e.button);this._nodes=[],this._bar.removeColumns(),this._nodes=t.map((e,t)=>(this._bar.addColumn(new o(1,`star`)),this._buildButton(e.pageIndex,t)))}t.forEach((e,t)=>{let n=this._nodes[t];n&&(n.button.visibility=e.visible?`visible`:`collapse`,n.button.className=e.selected?`adw-viewswitcherbar-button active`:`adw-viewswitcherbar-button`,n.icon.icon=i(e.iconName),n.label.text=e.label,n.badge.text=e.badgeLabel,n.badge.visibility=e.badgeLabel.length>0||e.needsAttention?`visible`:`collapse`,n.badge.className=e.badgeLabel.length===0&&e.needsAttention?`adw-viewswitcherbar-button-badge needs-attention`:`adw-viewswitcherbar-button-badge`)}),this._applyRevealed()}_buildButton(n,r){let i=new c;i.orientation=`vertical`,i.className=`adw-viewswitcherbar-button`,i.horizontalAlignment=`stretch`;let o=new e;o.className=`${o.className} adw-viewswitcherbar-button-icon`.trim(),o.horizontalAlignment=`center`,i.addChild(o);let l=new s;l.className=`adw-viewswitcherbar-button-label`,l.horizontalAlignment=`center`,l.textAlignment=`center`,i.addChild(l);let u=new s;return u.className=`adw-viewswitcherbar-button-badge`,u.horizontalAlignment=`center`,u.textAlignment=`center`,i.addChild(u),t(i),i.addEventListener(`tap`,()=>{this._stack&&(this._stack.visibleChildIndex=n)}),a.setColumn(i,r),this._bar.addChild(i),{button:i,icon:o,label:l,badge:u}}_applyRevealed(){this.visibility=this._barState.revealed?`visible`:`collapse`}};export{AdwViewSwitcherBar};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{Label as e,StackLayout as t}from"@nativescript/core";var AdwWindowTitle=class extends t{_titleLabel;_subtitleLabel;_hasSubtitle=!1;constructor(){super(),this.orientation=`vertical`,this.className=`adw-window-title`,this.horizontalAlignment=`center`;let t=new e;t.className=`adw-window-title-title`,t.horizontalAlignment=`center`,this.addChild(t),this._titleLabel=t;let n=new e;n.className=`adw-window-title-subtitle`,n.horizontalAlignment=`center`,this._subtitleLabel=n}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??``}get subtitle(){return this._hasSubtitle?this._subtitleLabel.text??``:``}set subtitle(e){let t=e??``;this._subtitleLabel.text=t;let n=t.length>0;n&&!this._hasSubtitle?(this.addChild(this._subtitleLabel),this._hasSubtitle=!0):!n&&this._hasSubtitle&&(this.removeChild(this._subtitleLabel),this._hasSubtitle=!1)}};export{AdwWindowTitle};
1
+ import"../_virtual/_rolldown/runtime.js";import{WindowTitleState as e,toLabelVisuals as t}from"./row-state.js";import{Label as n,StackLayout as r}from"@nativescript/core";const i=`notify::title`,a=`notify::subtitle`;var AdwWindowTitle=class extends r{_titleLabel;_subtitleLabel;_state=new e;constructor(){super(),this.orientation=`vertical`,this.className=`adw-window-title`,this.horizontalAlignment=`center`;let e=new n;e.className=`adw-window-title-title`,e.horizontalAlignment=`center`,this.addChild(e),this._titleLabel=e;let t=new n;t.className=`adw-window-title-subtitle`,t.horizontalAlignment=`center`,this.addChild(t),this._subtitleLabel=t,this._apply()}get title(){return this._state.title}set title(e){this._state.setTitle(e)&&(this._apply(),this._notify(i))}get subtitle(){return this._state.subtitle}set subtitle(e){this._state.setSubtitle(e)&&(this._apply(),this._notify(a))}_apply(){let e=t(this._state.state);this._titleLabel.text=e.title,this._titleLabel.visibility=e.titleVisibility,this._subtitleLabel.text=e.subtitle,this._subtitleLabel.visibility=e.subtitleVisibility}_notify(e){let t={eventName:e,object:this};this.notify(t)}};export{AdwWindowTitle,a as NOTIFY_SUBTITLE,i as NOTIFY_TITLE};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{WrapLayout as e}from"@nativescript/core";var AdwWrapBox=class extends e{_childSpacing=6;_lineSpacing=6;constructor(){super(),this.className=`adw-wrap-box`,this.orientation=`horizontal`}add(e){this._applySpacing(e),this.addChild(e)}remove(e){this.removeChild(e)}_applySpacing(e){let half=e=>Math.max(0,e/2);e.set(`margin`,`${half(this._lineSpacing)} ${half(this._childSpacing)} ${half(this._lineSpacing)} ${half(this._childSpacing)}`)}get childSpacing(){return this._childSpacing}set childSpacing(e){this._childSpacing=Number.isFinite(e)&&e>=0?e:0}get lineSpacing(){return this._lineSpacing}set lineSpacing(e){this._lineSpacing=Number.isFinite(e)&&e>=0?e:0}};export{AdwWrapBox};
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};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{avatarColor as e,avatarInitials as t,flattenAvatarGradient as n}from"@gjsify/adwaita-core";function avatarColor(t){let r=e(t??``);return{fill:n(r),fg:r.fg}}export{avatarColor,t as avatarInitials};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{BottomSheetPresentation as e}from"@gjsify/adwaita-core";const t=`notify::open`,n=`close-attempt`,r=`sheet.close`;function createBottomSheetPresentation(){return new e}function sheetVisibility(e){return e?`visible`:`collapse`}function applySheetVisibility(e,t){e.visibility=sheetVisibility(t)}function bottomSheetCloseEvent(e){switch(e){case`close-attempt`:return n;case`delegate`:return r;case`close`:case`ignored`:return null}}function requestBottomSheetClose(e,t){let n=e.requestClose(t);return{outcome:n,eventName:bottomSheetCloseEvent(n)}}function classList(e){return(e??``).split(` `).filter(e=>e.length>0)}function addMarkerClass(e,t){let n=classList(e);return n.includes(t)||n.push(t),n.join(` `)}function removeMarkerClass(e,t){return classList(e).filter(e=>e!==t).join(` `)}export{n as CLOSE_ATTEMPT,t as NOTIFY_OPEN,r as SHEET_CLOSE,addMarkerClass,applySheetVisibility,bottomSheetCloseEvent,createBottomSheetPresentation,removeMarkerClass,requestBottomSheetClose,sheetVisibility};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{replaceClasses as e}from"./chrome.js";import{BUTTON_CONTENT_STYLE_CLASS as t,buttonContentEllipsize as n,buttonContentIconIsEmpty as r,buttonContentLabelText as i,buttonContentLabelVisible as a}from"@gjsify/adwaita-core";import{imageMissingSymbolic as o}from"@gjsify/adwaita-icons/status";const s=`can-shrink`,c=[s];function buttonContentIconSvg(e){return r(e)?o:e}function buttonContentIconIsFallback(e){return r(e)}function buttonContentRootedParentClassName(n){return e(n,[t],[t])}function buttonContentUnrootedParentClassName(n){return e(n,[t],[])}function buttonContentLabelVisibility(e){return a(e)?`visible`:`collapse`}function buttonContentClassName(t,n){return e(t,c,n?[s]:[])}export{s as BUTTON_CONTENT_CAN_SHRINK_CLASS,t as BUTTON_CONTENT_STYLE_CLASS,buttonContentClassName,n as buttonContentEllipsize,buttonContentIconIsFallback,buttonContentIconSvg,i as buttonContentLabelText,buttonContentLabelVisibility,a as buttonContentLabelVisible,buttonContentRootedParentClassName,buttonContentUnrootedParentClassName};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{CAROUSEL_SETTLE_EPSILON as e,CarouselState as t}from"@gjsify/adwaita-core";const n=320;function createCarouselState(e={}){return new t({...e,animateScroll:!1})}function normalizeCarouselPageWidth(e){return Number.isFinite(e)&&e>0?e:320}function carouselScrollOffset(e,t){return e*t}function carouselPositionAtOffset(e,t){return t>0?e/t:0}var CarouselScrollSync=class{_expected=null;expect(e){this._expected=e}apply(t,n,r=e){return this._expected===null?(t.setPosition(n,!0),t.settleIfArrived(r),!0):(Math.abs(n-this._expected)<r&&(this._expected=null),!1)}};function carouselDotClasses(e){let t=e.pageAt(e.position);return e.ids.map((e,n)=>n===t?`adw-carousel-dot active`:`adw-carousel-dot`)}function applyCarouselDots(e,t){let n=carouselDotClasses(e);t.forEach((e,t)=>{let r=n[t];r!==void 0&&(e.className=r)})}function carouselNotifyPayload(e){return{position:e.position,nPages:e.nPages,page:e.page,interactive:e.interactive}}export{CarouselScrollSync,n as DEFAULT_CAROUSEL_PAGE_WIDTH,applyCarouselDots,carouselDotClasses,carouselNotifyPayload,carouselPositionAtOffset,carouselScrollOffset,createCarouselState,normalizeCarouselPageWidth};