@gjsify/adwaita-nativescript 0.44.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/index.js +1 -1
- package/lib/esm/namespace.js +1 -0
- package/lib/esm/widgets/adw-about-dialog.js +1 -1
- package/lib/esm/widgets/adw-action-row.js +1 -1
- package/lib/esm/widgets/adw-avatar.js +1 -1
- package/lib/esm/widgets/adw-banner.js +1 -1
- package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
- package/lib/esm/widgets/adw-button-content.js +1 -1
- package/lib/esm/widgets/adw-button-row.js +1 -1
- package/lib/esm/widgets/adw-carousel.js +1 -1
- package/lib/esm/widgets/adw-clamp.js +1 -1
- package/lib/esm/widgets/adw-combo-row.js +1 -1
- package/lib/esm/widgets/adw-data-grid.js +1 -1
- package/lib/esm/widgets/adw-entry-row.js +1 -1
- package/lib/esm/widgets/adw-expander-row.js +1 -1
- package/lib/esm/widgets/adw-header-bar.js +1 -1
- package/lib/esm/widgets/adw-icon.js +1 -1
- package/lib/esm/widgets/adw-image-button.js +1 -1
- package/lib/esm/widgets/adw-navigation-split-view.js +1 -1
- package/lib/esm/widgets/adw-navigation-view.js +1 -1
- package/lib/esm/widgets/adw-overlay-split-view.js +1 -1
- package/lib/esm/widgets/adw-password-entry-row.js +1 -1
- package/lib/esm/widgets/adw-preferences-dialog.js +1 -1
- package/lib/esm/widgets/adw-preferences-group.js +1 -1
- package/lib/esm/widgets/adw-preferences-page.js +1 -1
- package/lib/esm/widgets/adw-sidebar.js +1 -1
- package/lib/esm/widgets/adw-slider-row.js +1 -1
- package/lib/esm/widgets/adw-spin-row.js +1 -1
- package/lib/esm/widgets/adw-spinner.js +1 -1
- package/lib/esm/widgets/adw-split-button.js +1 -1
- package/lib/esm/widgets/adw-status-page.js +1 -1
- package/lib/esm/widgets/adw-switch-row.js +1 -1
- package/lib/esm/widgets/adw-tab-view.js +1 -1
- package/lib/esm/widgets/adw-toggle-group.js +1 -1
- package/lib/esm/widgets/adw-toolbar-view.js +1 -1
- package/lib/esm/widgets/adw-view-stack.js +1 -1
- package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
- package/lib/esm/widgets/adw-wrap-box.js +1 -1
- package/lib/esm/widgets/builder-slots.js +1 -0
- package/lib/esm/widgets/entry-row-view.js +1 -1
- package/lib/esm/widgets/{adw-button.js → gtk-button.js} +1 -1
- package/lib/esm/widgets/gtk-drop-down.js +1 -0
- package/lib/esm/widgets/gtk-entry.js +1 -0
- package/lib/esm/widgets/{adw-menu-button.js → gtk-menu-button.js} +1 -1
- package/lib/esm/widgets/host-insets.android.js +1 -0
- package/lib/esm/widgets/host-insets.ios.js +1 -0
- package/lib/esm/widgets/host-insets.js +1 -0
- package/lib/esm/widgets/icon-path.js +2 -2
- package/lib/esm/widgets/icons.android.js +1 -1
- package/lib/esm/widgets/icons.ios.js +1 -1
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/split-view-base.js +1 -1
- package/lib/esm/widgets/view-switcher-base.js +1 -1
- package/lib/esm/widgets/window-insets.js +1 -1
- package/lib/esm/widgets/wrap-box-layout.js +1 -1
- package/lib/esm/widgets/xml-values.js +1 -0
- package/lib/types/index.d.ts +2 -1
- package/lib/types/namespace.d.ts +92 -0
- package/lib/types/widgets/adw-about-dialog.d.ts +1 -1
- package/lib/types/widgets/adw-action-row.d.ts +17 -2
- package/lib/types/widgets/adw-avatar.d.ts +1 -1
- package/lib/types/widgets/adw-banner.d.ts +2 -2
- package/lib/types/widgets/adw-bottom-sheet.d.ts +22 -3
- package/lib/types/widgets/adw-button-content.d.ts +4 -4
- package/lib/types/widgets/adw-button-row.d.ts +4 -4
- package/lib/types/widgets/adw-carousel.d.ts +16 -4
- package/lib/types/widgets/adw-clamp.d.ts +15 -3
- package/lib/types/widgets/adw-combo-row.d.ts +3 -3
- package/lib/types/widgets/adw-data-grid.d.ts +1 -1
- package/lib/types/widgets/adw-entry-row.d.ts +4 -4
- package/lib/types/widgets/adw-expander-row.d.ts +22 -2
- package/lib/types/widgets/adw-header-bar.d.ts +15 -2
- package/lib/types/widgets/adw-icon.d.ts +3 -3
- package/lib/types/widgets/adw-image-button.d.ts +3 -3
- package/lib/types/widgets/adw-navigation-split-view.d.ts +1 -1
- package/lib/types/widgets/adw-navigation-view.d.ts +13 -2
- package/lib/types/widgets/adw-overlay-split-view.d.ts +1 -1
- package/lib/types/widgets/adw-password-entry-row.d.ts +2 -2
- package/lib/types/widgets/adw-preferences-dialog.d.ts +9 -2
- package/lib/types/widgets/adw-preferences-group.d.ts +13 -1
- package/lib/types/widgets/adw-preferences-page.d.ts +9 -2
- package/lib/types/widgets/adw-sidebar.d.ts +1 -1
- package/lib/types/widgets/adw-slider-row.d.ts +4 -4
- package/lib/types/widgets/adw-spin-row.d.ts +4 -4
- package/lib/types/widgets/adw-spinner.d.ts +2 -2
- package/lib/types/widgets/adw-split-button.d.ts +23 -7
- package/lib/types/widgets/adw-status-page.d.ts +11 -3
- package/lib/types/widgets/adw-switch-row.d.ts +1 -1
- package/lib/types/widgets/adw-tab-view.d.ts +2 -2
- package/lib/types/widgets/adw-toast-overlay.d.ts +2 -1
- package/lib/types/widgets/adw-toggle-group.d.ts +2 -2
- package/lib/types/widgets/adw-toolbar-view.d.ts +22 -4
- package/lib/types/widgets/adw-view-stack.d.ts +3 -2
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +2 -2
- package/lib/types/widgets/adw-wrap-box.d.ts +7 -7
- package/lib/types/widgets/builder-slots.d.ts +16 -0
- package/lib/types/widgets/entry-row-view.d.ts +1 -1
- package/lib/types/widgets/{adw-button.d.ts → gtk-button.d.ts} +7 -2
- package/lib/types/widgets/{adw-drop-down.d.ts → gtk-drop-down.d.ts} +4 -4
- package/lib/types/widgets/{adw-entry.d.ts → gtk-entry.d.ts} +6 -6
- package/lib/types/widgets/{adw-menu-button.d.ts → gtk-menu-button.d.ts} +3 -3
- package/lib/types/widgets/host-insets.android.d.ts +4 -0
- package/lib/types/widgets/host-insets.d.ts +13 -0
- package/lib/types/widgets/host-insets.ios.d.ts +4 -0
- package/lib/types/widgets/icon-path.d.ts +72 -7
- package/lib/types/widgets/index.d.ts +21 -14
- package/lib/types/widgets/split-button.d.ts +2 -2
- package/lib/types/widgets/split-view-base.d.ts +15 -6
- package/lib/types/widgets/view-switcher-base.d.ts +1 -1
- package/lib/types/widgets/window-insets.d.ts +24 -0
- package/lib/types/widgets/wrap-box-layout.d.ts +3 -60
- package/lib/types/widgets/xml-values.d.ts +18 -0
- package/package.json +11 -8
- package/lib/esm/widgets/adw-drop-down.js +0 -1
- package/lib/esm/widgets/adw-entry.js +0 -1
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";import{ADWAITA_SANS_FONT_FAMILY as ee,ADWAITA_SANS_TTF_FILES as te,adwaitaFontInstallInstructions as ne,hasAdwaitaSans as e}from"./fonts.js";import{AdwPreferencesPage as t}from"./widgets/adw-preferences-page.js";import{AdwPreferencesGroup as n}from"./widgets/adw-preferences-group.js";import{ACTIVATED as r,AdwActionRow as i}from"./widgets/adw-action-row.js";import{AdwSwitchRow as a,NOTIFY_ACTIVE as o}from"./widgets/adw-switch-row.js";import{adwaitaColorScheme as s,isThemeIconColor as c,onAdwaitaColorSchemeChanged as l,setAdwaitaColorScheme as u,themeIconColor as d,toggleAdwaitaColorScheme as f}from"./widgets/color-scheme.js";import{ADWAITA_ICON_GRID as p,DEFAULT_ICON_COLOR as m,DEFAULT_ICON_COLOR_DARK as h,extractIconPaths as g,extractPathData as _}from"./widgets/icon-path.js";import{renderSymbolicIcon as v}from"./widgets/icons.js";import{AdwIcon as y,DEFAULT_ADW_ICON_SIZE as b}from"./widgets/adw-icon.js";import{attachRowPressFeedback as x}from"./widgets/row-press.js";import{AdwImageButton as S,DEFAULT_ICON_BUTTON_ICON_SIZE as C}from"./widgets/adw-image-button.js";import{AdwEntryRow as w,NOTIFY_TEXT as T}from"./widgets/adw-entry-row.js";import{AdwPasswordEntryRow as E}from"./widgets/adw-password-entry-row.js";import{ACTIVATE as D,
|
|
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,GtkEntry as O,NOTIFY_TEXT as k}from"./widgets/gtk-entry.js";import{AdwComboRow as A,ComboState as j,NOTIFY_SELECTED as M}from"./widgets/adw-combo-row.js";import{GtkDropDown as N,NOTIFY_SELECTED as P}from"./widgets/gtk-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{GtkButton as U}from"./widgets/gtk-button.js";import{GtkMenuButton as W,MENU_ITEM_ACTIVATED as G}from"./widgets/gtk-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 be}from"./widgets/adw-spinner.js";import{AdwStatusPage as xe}from"./widgets/adw-status-page.js";import{AdwButtonRow as Se}from"./widgets/adw-button-row.js";import{AdwButtonContent as Ce}from"./widgets/adw-button-content.js";import{AdwSplitButton as we,CLICKED as Te,MENU_TAPPED as Ee}from"./widgets/adw-split-button.js";import{AdwToggleGroup as De,NOTIFY_SELECTED as Q,ToggleGroupState as Oe}from"./widgets/adw-toggle-group.js";import{ADWAITA_NS_ACCENT_RULES as ke,adwaitaNsAccentColor as Ae,adwaitaNsAccentCss as je}from"./widgets/accent-theme.js";import{applyAdwaitaNsAccent as Me,clearAdwaitaNsAccent as Ne}from"./widgets/adw-accent.js";import{SHORTCUT_LABEL_CAP_TEXT_CLASS as Pe,SHORTCUT_LABEL_CLASS as Fe,SHORTCUT_LABEL_DIMMED_CLASS as Ie,SHORTCUT_LABEL_DISABLED_CLASS as Le,SHORTCUT_LABEL_KEYCAP_CLASS as Re,SHORTCUT_LABEL_KEYS_CLASS as ze,SHORTCUT_LABEL_SIDE_CLASS as Be,SHORTCUT_LABEL_SPACED_CLASS as Ve,shortcutLabelDirection as He,shortcutLabelPlatform as Ue,shortcutLabelRenderPlan as We}from"./widgets/shortcut-label.js";import{AdwShortcutLabel as Ge}from"./widgets/adw-shortcut-label.js";import{AdwViewStack as Ke,NOTIFY_VISIBLE_CHILD as qe}from"./widgets/adw-view-stack.js";import{AdwViewSwitcherBase as Je,NOTIFY_SELECTED as Ye}from"./widgets/view-switcher-base.js";import{AdwViewSwitcher as Xe}from"./widgets/adw-view-switcher.js";import{AdwViewSwitcherBar as Ze}from"./widgets/adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as Qe}from"./widgets/adw-inline-view-switcher.js";import{AdwTabView as $e}from"./widgets/adw-tab-view.js";import{DEFAULT_CAROUSEL_PAGE_WIDTH as et}from"./widgets/carousel-state.js";import{AdwCarousel as tt,NOTIFY_POSITION as nt}from"./widgets/adw-carousel.js";import{NOTIFY_VISIBLE_PAGE as rt}from"./widgets/navigation-stack.js";import{AdwNavigationView as it}from"./widgets/adw-navigation-view.js";import{NsNavigationSplitViewState as at,NsOverlaySplitViewState as ot,splitViewColumns as st}from"./widgets/split-view-state.js";import{AdwSplitViewBase as ct,NOTIFY_SHOW_SIDEBAR as lt}from"./widgets/split-view-base.js";import{AdwNavigationSplitView as ut}from"./widgets/adw-navigation-split-view.js";import{AdwOverlaySplitView as dt}from"./widgets/adw-overlay-split-view.js";import{AdwSidebar as ft,NOTIFY_SELECTED as pt}from"./widgets/adw-sidebar.js";import{NOTIFY_OPEN as mt}from"./widgets/bottom-sheet-state.js";import{AdwBottomSheet as ht}from"./widgets/adw-bottom-sheet.js";import{AdwToast as gt,AdwToastOverlay as _t,AdwToastQueue as vt,DEFAULT_TOAST_TIMEOUT as yt,TOAST_BUTTON_CLICKED as bt}from"./widgets/adw-toast-overlay.js";import{AdwAlertDialog as xt,AdwAlertResponses as St,NOTIFY_RESPONSE as Ct}from"./widgets/adw-alert-dialog.js";import{AdwAboutDialog as wt,CLOSED as Tt}from"./widgets/adw-about-dialog.js";import{AdwPreferencesDialog as Et,CLOSED as Dt}from"./widgets/adw-preferences-dialog.js";import{AdwBreakpoint as Ot,addBreakpoints as kt,evaluateBreakpointCondition as At,parseBreakpointCondition as jt}from"./widgets/breakpoint.js";import{registerAdwaitaElements as $}from"./widgets/index.js";import{Adw as Mt,Gtk as Nt}from"./namespace.js";import{assertNativeScript as Pt,assertNativeScript as Ft,isAndroid as It,isIOS as Lt,isNativeScript as Rt}from"@gjsify/native-platform";function registerAdwaita(){Ft(),$()}export{Tt as ABOUT_CLOSED,r as ACTIVATED,p as ADWAITA_ICON_GRID,ke as ADWAITA_NS_ACCENT_RULES,ee as ADWAITA_SANS_FONT_FAMILY,te as ADWAITA_SANS_TTF_FILES,Mt as Adw,wt as AdwAboutDialog,i as AdwActionRow,xt as AdwAlertDialog,St as AdwAlertResponses,Z as AdwAvatar,J as AdwBanner,ht as AdwBottomSheet,Ot as AdwBreakpoint,Ce as AdwButtonContent,Se as AdwButtonRow,tt as AdwCarousel,ae as AdwClamp,A as AdwComboRow,ve as AdwDataGrid,w as AdwEntryRow,B as AdwExpanderRow,oe as AdwHeaderBar,y as AdwIcon,S as AdwImageButton,Qe as AdwInlineViewSwitcher,ut as AdwNavigationSplitView,it as AdwNavigationView,dt as AdwOverlaySplitView,E as AdwPasswordEntryRow,Et as AdwPreferencesDialog,n as AdwPreferencesGroup,t as AdwPreferencesPage,Ge as AdwShortcutLabel,ft as AdwSidebar,R as AdwSliderRow,F as AdwSpinRow,be as AdwSpinner,we as AdwSplitButton,ct as AdwSplitViewBase,xe as AdwStatusPage,a as AdwSwitchRow,$e as AdwTabView,gt as AdwToast,_t as AdwToastOverlay,vt as AdwToastQueue,De as AdwToggleGroup,se as AdwToolbarView,Ke as AdwViewStack,Xe as AdwViewSwitcher,Ze as AdwViewSwitcherBar,Je as AdwViewSwitcherBase,ie as AdwWindowTitle,ce as AdwWrapBox,Y as BUTTON_CLICKED,Te 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,et 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,yt as DEFAULT_TOAST_TIMEOUT,D as ENTRY_ACTIVATE,V as ExpanderState,Nt as Gtk,U as GtkButton,N as GtkDropDown,O as GtkEntry,W as GtkMenuButton,G as MENU_ITEM_ACTIVATED,Ee as MENU_TAPPED,o as NOTIFY_ACTIVE,P as NOTIFY_DROP_DOWN_SELECTED,k as NOTIFY_ENTRY_TEXT,H as NOTIFY_EXPANDED,mt as NOTIFY_OPEN,nt as NOTIFY_POSITION,Ct as NOTIFY_RESPONSE,M as NOTIFY_SELECTED,lt as NOTIFY_SHOW_SIDEBAR,pt as NOTIFY_SIDEBAR_SELECTED,z as NOTIFY_SLIDER_VALUE,T as NOTIFY_TEXT,Q as NOTIFY_TOGGLE_SELECTED,I as NOTIFY_VALUE,Ye as NOTIFY_VIEW_SELECTED,qe as NOTIFY_VISIBLE_CHILD,rt as NOTIFY_VISIBLE_PAGE,at as NsNavigationSplitViewState,ot as NsOverlaySplitViewState,Dt as PREFERENCES_CLOSED,ye as ROW_ACTIVATED,Pe as SHORTCUT_LABEL_CAP_TEXT_CLASS,Fe as SHORTCUT_LABEL_CLASS,Ie as SHORTCUT_LABEL_DIMMED_CLASS,Le as SHORTCUT_LABEL_DISABLED_CLASS,Re as SHORTCUT_LABEL_KEYCAP_CLASS,ze as SHORTCUT_LABEL_KEYS_CLASS,Be as SHORTCUT_LABEL_SIDE_CLASS,Ve as SHORTCUT_LABEL_SPACED_CLASS,L as SpinState,bt as TOAST_BUTTON_CLICKED,Oe as ToggleGroupState,kt as addBreakpoints,s as adwaitaColorScheme,ne as adwaitaFontInstallInstructions,Ae as adwaitaNsAccentColor,je as adwaitaNsAccentCss,Me as applyAdwaitaNsAccent,Pt as assertNativeScript,x as attachRowPressFeedback,X as avatarInitials,Ne as clearAdwaitaNsAccent,fe as dataGridCellClass,pe as dataGridItemSpec,me as dataGridRowClass,he as dataGridShapeKey,ge as dataGridTracksKey,At as evaluateBreakpointCondition,g as extractIconPaths,_ as extractPathData,e as hasAdwaitaSans,It as isAndroid,Lt as isIOS,Rt as isNativeScript,c as isThemeIconColor,l as onAdwaitaColorSchemeChanged,jt as parseBreakpointCondition,_e as parseDataGridWidth,registerAdwaita,$ as registerAdwaitaElements,v as renderSymbolicIcon,u as setAdwaitaColorScheme,He as shortcutLabelDirection,Ue as shortcutLabelPlatform,We as shortcutLabelRenderPlan,st as splitViewColumns,d as themeIconColor,f as toggleAdwaitaColorScheme};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AdwPreferencesPage as e}from"./widgets/adw-preferences-page.js";import{AdwPreferencesGroup as t}from"./widgets/adw-preferences-group.js";import{AdwActionRow as n}from"./widgets/adw-action-row.js";import{AdwSwitchRow as r}from"./widgets/adw-switch-row.js";import{AdwIcon as i}from"./widgets/adw-icon.js";import{AdwEntryRow as a}from"./widgets/adw-entry-row.js";import{AdwPasswordEntryRow as o}from"./widgets/adw-password-entry-row.js";import{GtkEntry as s}from"./widgets/gtk-entry.js";import{AdwComboRow as c}from"./widgets/adw-combo-row.js";import{GtkDropDown as l}from"./widgets/gtk-drop-down.js";import{AdwSpinRow as u}from"./widgets/adw-spin-row.js";import{AdwExpanderRow as d}from"./widgets/adw-expander-row.js";import{GtkButton as f}from"./widgets/gtk-button.js";import{GtkMenuButton as p}from"./widgets/gtk-menu-button.js";import{AdwBanner as m}from"./widgets/adw-banner.js";import{AdwAvatar as h}from"./widgets/adw-avatar.js";import{AdwWindowTitle as g}from"./widgets/adw-window-title.js";import{AdwClamp as _}from"./widgets/adw-clamp.js";import{AdwHeaderBar as v}from"./widgets/adw-header-bar.js";import{AdwToolbarView as y}from"./widgets/adw-toolbar-view.js";import{AdwWrapBox as b}from"./widgets/adw-wrap-box.js";import{AdwSpinner as x}from"./widgets/adw-spinner.js";import{AdwStatusPage as S}from"./widgets/adw-status-page.js";import{AdwButtonRow as C}from"./widgets/adw-button-row.js";import{AdwButtonContent as w}from"./widgets/adw-button-content.js";import{AdwSplitButton as T}from"./widgets/adw-split-button.js";import{AdwToggleGroup as E}from"./widgets/adw-toggle-group.js";import{AdwShortcutLabel as D}from"./widgets/adw-shortcut-label.js";import{AdwViewStack as O}from"./widgets/adw-view-stack.js";import{AdwViewSwitcher as k}from"./widgets/adw-view-switcher.js";import{AdwViewSwitcherBar as A}from"./widgets/adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as j}from"./widgets/adw-inline-view-switcher.js";import{AdwTabView as M}from"./widgets/adw-tab-view.js";import{AdwCarousel as N}from"./widgets/adw-carousel.js";import{AdwNavigationView as P}from"./widgets/adw-navigation-view.js";import{AdwNavigationSplitView as F}from"./widgets/adw-navigation-split-view.js";import{AdwOverlaySplitView as I}from"./widgets/adw-overlay-split-view.js";import{AdwSidebar as L}from"./widgets/adw-sidebar.js";import{AdwBottomSheet as R}from"./widgets/adw-bottom-sheet.js";import{AdwToastOverlay as z}from"./widgets/adw-toast-overlay.js";import{AdwAlertDialog as B}from"./widgets/adw-alert-dialog.js";import{AdwAboutDialog as V}from"./widgets/adw-about-dialog.js";import{AdwPreferencesDialog as H}from"./widgets/adw-preferences-dialog.js";const U={AboutDialog:V,ActionRow:n,AlertDialog:B,Avatar:h,Banner:m,BottomSheet:R,ButtonContent:w,ButtonRow:C,Carousel:N,Clamp:_,ComboRow:c,EntryRow:a,ExpanderRow:d,HeaderBar:v,InlineViewSwitcher:j,NavigationSplitView:F,NavigationView:P,OverlaySplitView:I,PasswordEntryRow:o,PreferencesDialog:H,PreferencesGroup:t,PreferencesPage:e,ShortcutLabel:D,Sidebar:L,Spinner:x,SpinRow:u,SplitButton:T,StatusPage:S,SwitchRow:r,TabView:M,ToastOverlay:z,ToggleGroup:E,ToolbarView:y,ViewStack:O,ViewSwitcher:k,ViewSwitcherBar:A,WindowTitle:g,WrapBox:b},W={Button:f,DropDown:l,Entry:s,Image:i,MenuButton:p};export{U as Adw,W as Gtk};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{Button as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{Button as t,GridLayout as n,ItemSpec as r,Label as i,ScrollView as a,StackLayout as o}from"@nativescript/core";import{aboutDialogVisibility as s}from"@gjsify/adwaita-core";const c=`closed`;var AdwAboutDialog=class extends n{_card;_iconLabel;_nameLabel;_versionLabel;_developerLabel;_commentsLabel;_websiteLabel;_copyrightLabel;_applicationName=``;_applicationIcon=``;_developerName=``;_version=``;_comments=``;_website=``;_copyright=``;constructor(){super(),this.className=`adw-about-dialog`,this.visibility=`collapse`,this.addColumn(new r(1,`star`)),this.addRow(new r(1,`star`));let e=new a;e.orientation=`vertical`,e.verticalAlignment=`middle`,e.horizontalAlignment=`center`,n.setColumn(e,0),n.setRow(e,0);let i=new o;i.orientation=`vertical`,i.className=`adw-about-dialog-card`,e.content=i,this.addChild(e),this._card=i,this._iconLabel=this._addCardLabel(i,`adw-about-dialog-icon`),this._nameLabel=this._addCardLabel(i,`adw-about-dialog-name`),this._versionLabel=this._addCardLabel(i,`adw-about-dialog-version`),this._developerLabel=this._addCardLabel(i,`adw-about-dialog-developer`),this._commentsLabel=this._addCardLabel(i,`adw-about-dialog-comments`),this._websiteLabel=this._addCardLabel(i,`adw-about-dialog-website`),this._copyrightLabel=this._addCardLabel(i,`adw-about-dialog-copyright`);let s=new t;s.text=`Close`,s.className=`adw-about-dialog-close`,s.set(`androidElevation`,0),s.addEventListener(`tap`,()=>this.close()),i.addChild(s),this._render()}_addCardLabel(e,t){let n=new i;return n.className=t,n.horizontalAlignment=`center`,n.textWrap=!0,e.addChild(n),n}get applicationName(){return this._applicationName}set applicationName(e){this._applicationName=e??``,this._render()}get applicationIcon(){return this._applicationIcon}set applicationIcon(e){this._applicationIcon=e??``,this._render()}get version(){return this._version}set version(e){this._version=e??``,this._render()}get developerName(){return this._developerName}set developerName(e){this._developerName=e??``,this._render()}get comments(){return this._comments}set comments(e){this._comments=e??``,this._render()}get website(){return this._website}set website(e){this._website=e??``,this._render()}get copyright(){return this._copyright}set copyright(e){this._copyright=e??``,this._render()}_render(){let e=s({applicationName:this._applicationName,applicationIcon:this._applicationIcon,developerName:this._developerName,version:this._version,comments:this._comments,website:this._website}),show=(e,t,n)=>{e.text=t,e.visibility=n?`visible`:`collapse`};show(this._iconLabel,this._applicationIcon,e.appIcon),show(this._nameLabel,this._applicationName,e.appName),show(this._versionLabel,this._version,e.version),show(this._developerLabel,this._developerName,e.developerName),show(this._commentsLabel,this._comments,e.commentsLabel),show(this._websiteLabel,this._website,e.websiteRow),show(this._copyrightLabel,this._copyright,this._copyright.length>0)}present(){this.visibility=`visible`}close(){this.visibility=`collapse`;let e={eventName:c,object:this};this.notify(e)}get open(){return this.visibility===`visible`}set open(t){e(t,!1)?this.present():this.close()}};export{AdwAboutDialog,c as CLOSED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{ActionRowState as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{resolveBuilderSlot as t}from"./builder-slots.js";import{ActionRowState as n,isViewSensitive as r,rowLabelVisuals as i}from"./row-state.js";import{GridLayout as a,ItemSpec as o,Label as s,StackLayout as c}from"@nativescript/core";const l=`activated`,u=[`prefix`,`suffix`];var AdwActionRow=class extends a{isActionRow=!0;_textStack;_titleLabel;_subtitleLabel;_rowState=new n;_prefix=null;_suffix=null;constructor(){super(),this.className=`adw-row adw-action-row`,this.addColumn(new o(1,`auto`)),this.addColumn(new o(1,`star`)),this.addColumn(new o(1,`auto`)),this.addRow(new o(1,`auto`));let e=new c;e.orientation=`vertical`,e.className=`adw-row-text`,a.setColumn(e,1);let t=new s;t.className=`adw-row-title`,t.textWrap=!0,e.addChild(t);let n=new s;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(),a.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(),a.setColumn(e,2),this.addChild(e),this._suffix=e)}get suffix(){return this._suffix}_addChildFromBuilder(e,n){t(e,u,`suffix`)===`prefix`?this.setPrefix(n):this.setSuffix(n)}get activatableWidget(){return this._rowState.activatableWidget}set activatableWidget(e){this._rowState.setActivatableWidget(e,r(e))}syncActivatableWidgetSensitivity(){let e=this._rowState.activatableWidget;e&&this._rowState.setActivatableWidgetSensitive(r(e))}get activatable(){return this._rowState.activatable}set activatable(t){this._rowState.setActivatable(e(t,!1))}activate(){if(!this._rowState.activatable)return;let e={eventName:l,object:this};this.notify(e)}_managesTitleVisibility=!0;_applyLabels(){let e=i({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{l as ACTIVATED,AdwActionRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{avatarColor as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{avatarColor as t,avatarInitials as n}from"./avatar-color.js";import{GridLayout as r,ItemSpec as i,Label as a}from"@nativescript/core";import{avatarMaxFontSize as o}from"@gjsify/adwaita-core";const s=48;var AdwAvatar=class extends r{_label;_text=``;_size=48;constructor(){super(),this.className=`adw-avatar`,this.addColumn(new i(1,`star`)),this.addRow(new i(1,`star`));let e=new a;e.className=`adw-avatar-label`,e.horizontalAlignment=`center`,e.verticalAlignment=`middle`,r.setColumn(e,0),r.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,o(this._size))))}get text(){return this._text}set text(e){this._text=e??``,this._label.text=n(this._text);let{fill:r,fg:i}=t(this._text);this.set(`backgroundColor`,r),this._label.set(`color`,i)}get size(){return this._size}set size(t){let n=e(t,48);this._size=n>0?n:48,this._applySize()}};export{AdwAvatar,s as DEFAULT_AVATAR_SIZE,t as avatarColor,n as avatarInitials};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{bannerButtonClassName as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{bannerButtonClassName as t,bannerTitleText as n,bannerVisibility as r,defaultBannerProps as i}from"./chrome.js";import{Button as a,GridLayout as o,ItemSpec as s,Label as c}from"@nativescript/core";import{bannerButtonText as l,bannerButtonVisible as u,parseBannerButtonStyle as d}from"@gjsify/adwaita-core";const f=`buttonClicked`;var AdwBanner=class extends o{_titleLabel;_button;_hasButton=!1;_props=i();constructor(){super(),this.className=`adw-banner`,this.addColumn(new s(1,`star`)),this.addColumn(new s(1,`auto`)),this.addRow(new s(1,`auto`));let e=new c;e.className=`adw-banner-title`,e.textWrap=!0,o.setColumn(e,0),this.addChild(e),this._titleLabel=e;let t=new a;t.className=`adw-banner-button`,t.set(`androidElevation`,0),o.setColumn(t,1),this._button=t,t.addEventListener(`tap`,()=>{let e={eventName:f,object:this};this.notify(e)}),this.visibility=r(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(t){this._props.useMarkup=e(t,!1),this._renderTitle()}get buttonLabel(){return this._props.buttonLabel}set buttonLabel(e){let t=e??``;this._props.buttonLabel=t,this._button.text=l(t);let n=u(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(e){this._props.buttonStyle=d(e),this._button.className=t(this._button.className,this._props.buttonStyle)}get revealed(){return this._props.revealed}set revealed(t){this._props.revealed=e(t,!1),this.visibility=r(this._props.revealed)}_renderTitle(){this._titleLabel.text=n(this._props.title,this._props.useMarkup)}};export{AdwBanner,f as BUTTON_CLICKED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{CLOSE_ATTEMPT as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{resolveBuilderSlot as t}from"./builder-slots.js";import{CLOSE_ATTEMPT as n,NOTIFY_OPEN as r,SHEET_CLOSE as i,addMarkerClass as a,applySheetVisibility as o,createBottomSheetPresentation as s,removeMarkerClass as c,requestBottomSheetClose as l,sheetVisibility as u}from"./bottom-sheet-state.js";import{GridLayout as d,ItemSpec as f,Label as p,StackLayout as m}from"@nativescript/core";const h=`adw-bottom-sheet-content`,g=`adw-bottom-sheet-sheet`,_=[`sheet`,`content`];var AdwBottomSheet=class extends d{_content=null;_sheetPanel;_sheetChild=null;_state=s();constructor(){super(),this.className=`adw-bottom-sheet`,this.addColumn(new f(1,`star`)),this.addRow(new f(1,`star`));let e=new m;e.orientation=`vertical`,e.className=`adw-bottom-sheet-panel`,e.verticalAlignment=`bottom`,e.visibility=u(this._state.open),d.setColumn(e,0),d.setRow(e,0);let t=new p;t.text=`━`,t.className=`adw-bottom-sheet-handle`,t.horizontalAlignment=`center`,t.isUserInteractionEnabled=!1,e.addChild(t),this.addChild(e),this._sheetPanel=e,this._state.subscribe(e=>{o(this._sheetPanel,e);let t={eventName:r,object:this,open:e};this.notify(t)})}setContent(e){this._content!==e&&(this._content&&(this._content.className=c(this._content.className,h),this.removeChild(this._content)),this._content=e,e&&(e.className=a(e.className,h),d.setColumn(e,0),d.setRow(e,0),this.insertChild(e,0)))}setSheet(e){this._sheetChild!==e&&(this._sheetChild&&(this._sheetChild.className=c(this._sheetChild.className,g),this._sheetPanel.removeChild(this._sheetChild)),this._sheetChild=e,e&&(e.className=a(e.className,g),this._sheetPanel.addChild(e)))}_addChildFromBuilder(e,n){t(e,_,`content`)===`sheet`?this.setSheet(n):this.setContent(n)}get content(){return this._content}get sheet(){return this._sheetChild}open(){this.openState=!0}close(){this.openState=!1}get openState(){return this._state.open}set openState(t){this._state.setOpen(e(t,!1))}get canClose(){return this._state.canClose}set canClose(t){let n=e(t,this.canClose);this._state.setCanClose(n)}requestClose(e){let{outcome:t,eventName:n}=l(this._state,e);return n&&this.notify({eventName:n,object:this}),t}};export{AdwBottomSheet,n as CLOSE_ATTEMPT,r as NOTIFY_OPEN,i as SHEET_CLOSE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{AdwIcon as t}from"./adw-icon.js";import{buttonContentClassName as n,buttonContentEllipsize as r,buttonContentIconIsFallback as i,buttonContentIconSvg as a,buttonContentLabelText as o,buttonContentLabelVisibility as s,buttonContentRootedParentClassName as c,buttonContentUnrootedParentClassName as l}from"./button-content.js";import{Label as u,StackLayout as d}from"@nativescript/core";import{ADW_BUTTON_CONTENT_DEFAULTS as f}from"@gjsify/adwaita-core";var AdwButtonContent=class extends d{_icon;_label;_props={...f};_hostButton=null;constructor(){super(),this.orientation=`horizontal`,this.className=`adw-button-content`,this.horizontalAlignment=`center`;let e=new t;e.className=`${e.className} adw-button-content-icon`.trim(),e.verticalAlignment=`middle`,e.iconName=a(``),this.addChild(e),this._icon=e;let n=new u;n.className=`adw-button-content-label`,n.verticalAlignment=`middle`,n.visibility=s(``),this.addChild(n),this._label=n}get hostButton(){return this._hostButton}set hostButton(e){this._hostButton!==e&&(this._hostButton&&(this._hostButton.className=l(this._hostButton.className??``)),this._hostButton=e,e&&(e.className=c(e.className??``)))}get iconName(){return this._props.iconName}set iconName(e){this._props.iconName=e??``,this._icon.iconName=a(this._props.iconName)}get iconIsFallback(){return i(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(t){let n=e(t,this.useUnderline);this._props.useUnderline=!!n,this._renderLabel()}get canShrink(){return this._props.canShrink}set canShrink(t){let r=e(t,this.canShrink);this._props.canShrink=!!r,this.className=n(this.className,this._props.canShrink)}get ellipsize(){return r(this._props.canShrink)}_renderLabel(){this._label.text=o(this._props.label,this._props.useUnderline),this._label.visibility=s(this._props.label)}};export{AdwButtonContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{ButtonRowState as e,buttonRowIconColor as t,buttonRowIconVisuals as n}from"./row-state.js";import{ACTIVATED as r,AdwActionRow as i}from"./adw-action-row.js";import{AdwIcon as a}from"./adw-icon.js";import{attachRowPressFeedback as o}from"./row-press.js";import{StackLayout as s}from"@nativescript/core";import{adwaitaAccent as c,onAdwaitaAccentChanged as l}from"@gjsify/adwaita-core";var u=class AdwButtonRow extends i{isActionRow=!1;_contentBox;_startIcon;_endIcon;_pinnedIconColor=null;_unsubAccent=null;_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 s;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`),this._applyIconColor(),this.addEventListener(`loaded`,()=>{this._applyIconColor(),this._unsubAccent??=l(()=>this._applyIconColor())}),this.addEventListener(`unloaded`,()=>{this._unsubAccent?.(),this._unsubAccent=null}),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(),o(this)}static _makeIcon(e){let t=new a;return t.className=`${t.className} ${e}`.trim(),t.verticalAlignment=`middle`,t}get
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{ButtonRowState as e,buttonRowIconColor as t,buttonRowIconVisuals as n}from"./row-state.js";import{ACTIVATED as r,AdwActionRow as i}from"./adw-action-row.js";import{AdwIcon as a}from"./adw-icon.js";import{attachRowPressFeedback as o}from"./row-press.js";import{StackLayout as s}from"@nativescript/core";import{adwaitaAccent as c,onAdwaitaAccentChanged as l}from"@gjsify/adwaita-core";var u=class AdwButtonRow extends i{isActionRow=!1;_contentBox;_startIcon;_endIcon;_pinnedIconColor=null;_unsubAccent=null;_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 s;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`),this._applyIconColor(),this.addEventListener(`loaded`,()=>{this._applyIconColor(),this._unsubAccent??=l(()=>this._applyIconColor())}),this.addEventListener(`unloaded`,()=>{this._unsubAccent?.(),this._unsubAccent=null}),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(),o(this)}static _makeIcon(e){let t=new a;return t.className=`${t.className} ${e}`.trim(),t.verticalAlignment=`middle`,t}get startIconName(){return this._buttonState.startIconName}set startIconName(e){this._buttonState.setStartIconName(e)&&this._applyIcons()}get endIconName(){return this._buttonState.endIconName}set endIconName(e){this._buttonState.setEndIconName(e)&&this._applyIcons()}get startIconColor(){return this._startIcon.iconColor}set startIconColor(e){this._pinnedIconColor=e||null,this._applyIconColor()}_applyIconColor(){let e=t(this._pinnedIconColor,c());this._startIcon.iconColor=e,this._endIcon.iconColor=e}_applyIcons(){let e=n(this._buttonState.state);this._startIcon.iconName=e.startIcon,this._startIcon.visibility=e.startIconVisibility,this._endIcon.iconName=e.endIcon,this._endIcon.visibility=e.endIconVisibility}};export{r as ACTIVATED,u as AdwButtonRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{CarouselScrollSync as n,DEFAULT_CAROUSEL_PAGE_WIDTH as r,applyCarouselDots as i,carouselNotifyPayload as a,carouselPositionAtOffset as o,carouselScrollOffset as s,createCarouselState as c,normalizeCarouselPageWidth as l}from"./carousel-state.js";import{GridLayout as u,ItemSpec as d,Label as f,ScrollView as p,StackLayout as m}from"@nativescript/core";const h=`notify::position`,g=`notify::n-pages`,_=`page-changed`;var AdwCarousel=class extends u{_scroller;_track;_dots;_state=c({onScrollTo:e=>this._performScroll(e)});_sync=new n;_views=new Map;_dotsById=new Map;_nextPageId=0;_pageWidth=320;constructor(){super(),this.className=`adw-carousel`,this.addColumn(new d(1,`star`)),this.addRow(new d(1,`star`)),this.addRow(new d(1,`auto`));let e=new p;e.orientation=`horizontal`,e.className=`adw-carousel-scroller`,u.setRow(e,0);let t=new m;t.orientation=`horizontal`,t.className=`adw-carousel-track`,e.content=t,this.addChild(e),this._scroller=e,this._track=t;let n=new m;n.orientation=`horizontal`,n.className=`adw-carousel-dots`,n.horizontalAlignment=`center`,u.setRow(n,1),this.addChild(n),this._dots=n,e.addEventListener(`scroll`,e=>{let t=o(e.scrollX,this._distance());this._sync.apply(this._state,t)}),this._state.subscribe(e=>{i(this._state,this._orderedDots());let t={eventName:e.reason===`n-pages`?g:h,object:this,...a(e)};this.notify(t)}),this._state.onPageChanged(e=>{let t={eventName:_,object:this,index:e};this.notify(t)})}addPage(e){this.insertPage(e,-1)}_addChildFromBuilder(e,t){this.addPage(t)}insertPage(e,t=-1){let n=`page-${this._nextPageId++}`;e.width=this._pageWidth,e.className=`${e.className??``} adw-carousel-page`.trim();let r=new f;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 pages(){let e=[];for(let t=0;t<this._track.getChildrenCount();t++)e.push(this._track.getChildAt(t));return e}get nPages(){return this._state.nPages}get position(){return this._state.position}set position(e){let n=t(e,this.position);if(!Number.isFinite(n))return;let r=this._state.pageAt(n);r>=0&&this.scrollToPage(r)}get currentPage(){return this._state.pageAt(this._state.position)}get interactive(){return this._state.interactive}set interactive(t){let n=e(t,this.interactive);this._state.setInteractive(n)}get pageWidth(){return this._pageWidth}set pageWidth(e){let n=t(e,this.pageWidth);this._pageWidth=l(n);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(s(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);i(this._state,e)}};export{AdwCarousel,r as DEFAULT_CAROUSEL_PAGE_WIDTH,g as NOTIFY_N_PAGES,h as NOTIFY_POSITION,_ as PAGE_CHANGED};
|
|
@@ -1 +1 @@
|
|
|
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
|
+
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}_addChildFromBuilder(e,t){this.setChild(t)}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{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{AdwActionRow as t}from"./adw-action-row.js";import{AdwIcon as n}from"./adw-icon.js";import{attachRowPressFeedback as r}from"./row-press.js";import{Label as i,StackLayout as a,action as o}from"@nativescript/core";import{ComboState as s,ComboState as c}from"@gjsify/adwaita-core";import{panDownSymbolic as l}from"@gjsify/adwaita-icons/ui";const u=`notify::selected`;var AdwComboRow=class extends t{_valueLabel;_chevron;_state=new c;constructor(){super(),this.className=`adw-row adw-action-row adw-combo-row`;let e=new a;e.orientation=`horizontal`,e.className=`adw-combo-suffix`;let t=new i;t.className=`adw-combo-value`,t.text=``;let o=new n;o.className=`adw-combo-chevron`,o.iconColor=`#9a9a9a`,o.iconSize=16,o.iconName=l,e.addChild(t),e.addChild(o),this.setSuffix(e),this._valueLabel=t,this._chevron=o,this._state.subscribe(e=>{if(this._valueLabel.text=e.label,this._syncChooser(),e.interactive){let t={eventName:u,object:this,selected:e.selected,value:e.value};this.notify(t)}}),this.addEventListener(`tap`,()=>{this._openChooser()}),r(this),this._syncChooser()}_syncChooser(){this._chevron.visibility=this._state.presentsChooser?`visible`:`collapse`}async _openChooser(){if(!this._state.presentsChooser)return;let e=this._state.options.map(e=>e.label),t=await o({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 selected(){return this._state.selectedIndex}set selected(t){let n=e(t,this.selected);this._state.setSelectedIndex(n)}get selectedValue(){return this._state.selectedValue}set selectedValue(e){this._state.setSelectedValue(e)}};export{AdwComboRow,s as ComboState,u as NOTIFY_SELECTED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{attachRowPressFeedback as t}from"./row-press.js";import{DATA_GRID_HEADER_CELL_CLASS as n,DATA_GRID_HEADER_ROW_CLASS as r,DATA_GRID_SECTION_CELL_CLASS as i,dataGridCellClass as a,dataGridItemSpec as o,dataGridRowClass as s,dataGridShapeKey as c,dataGridTracksKey as l}from"./data-grid-model.js";import{GridLayout as u,ItemSpec as d,Label as f,StackLayout as p}from"@nativescript/core";import{dataGridCellText as m,dataGridColumnClasses as h,dataGridRowInteractive as g,dataGridTracks as _,normalizeDataGridColumns as v,normalizeDataGridVariant as y}from"@gjsify/adwaita-core";const b=`row-activated`;var AdwDataGrid=class extends u{_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=v(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(t){let n=e(t,this.interactive);this._interactive=!!n,this._paint()}_render(){this._syncColumns(),this._syncNodes(),this._paint()}_syncColumns(){let e=_(this._columns),t=l(e);if(t!==this._trackKey){this._trackKey=t,this.removeColumns();for(let t of e){let e=o(t);this.addColumn(new d(e.value,e.type))}}}_syncNodes(){let e=this._columns.length,t=c(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 d(1,`auto`)),this._header=this._buildRow(0,e,!1),this._rowNodes=this._rows.map((t,n)=>(this.addRow(new d(1,`auto`)),this._buildRow(n+1,e,!0))))}}_buildRow(e,n,r){let i=new p;u.setRow(i,e),u.setColumn(i,0),u.setColumnSpan(i,n),this.addChild(i),r&&(t(i),i.addEventListener(`tap`,()=>this._activate(e-1)));let a=[];for(let t=0;t<n;t++){let n=new f;n.textWrap=!1,u.setRow(n,e),u.setColumn(n,t),this.addChild(n),a.push(n)}return{background:i,cells:a}}_paint(){let e=this._header;e!==null&&(e.background.className=r,this._columns.forEach((t,r)=>{let i=e.cells[r];i!==void 0&&(i.className=`${h(t).join(` `)} ${n}`,i.text=t.label??t.key,this._showCell(i,1))}),this._rows.forEach((e,t)=>{let n=this._rowNodes[t];if(n===void 0)return;let r=y(e.variant),o=g(r,e.interactive,this._interactive);if(n.background.className=s(r,o),r===`section`){let t=this._columns[0]?.key??``;n.cells.forEach((n,r)=>{r===0?(n.className=i,n.text=m(e[t]),this._showCell(n,this._columns.length)):(n.text=``,n.visibility=`collapse`,u.setColumnSpan(n,1))});return}this._columns.forEach((t,i)=>{let o=n.cells[i];o!==void 0&&(o.className=a(h(t),r),o.text=m(e[t.key]),this._showCell(o,1))})}))}_showCell(e,t){e.visibility=`visible`,u.setColumnSpan(e,t)}_activate(e){let t=this._rows[e];if(t===void 0||!g(y(t.variant),t.interactive,this._interactive))return;let n={eventName:b,object:this,index:e,row:t};this.notify(n)}};export{AdwDataGrid,b as ROW_ACTIVATED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{AdwActionRow as n}from"./adw-action-row.js";import{AdwIcon as r}from"./adw-icon.js";import{AdwImageButton as i}from"./adw-image-button.js";import{NS_EDIT_ICON_CLASS as a,NS_ENTRY_ROW_CLASS as o,applyEntryRowState as s}from"./entry-row-view.js";import{Label as c,StackLayout as l,TextField as u}from"@nativescript/core";import{ADW_ACCENT_FG_COLOR as d,EntryRowState as f,EntryRowState as p}from"@gjsify/adwaita-core";import{documentEditSymbolic as m,objectSelectSymbolic as h}from"@gjsify/adwaita-icons/actions";const g=`notify::text`,_=`notify::text-length`,v=`apply`,y=`entry-activated`;var AdwEntryRow=class extends n{isActionRow=!1;_state=new p;_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 c;e.className=`adw-row-title adw-entry-empty-title`,e.textWrap=!0,this._textStack.insertChild(e,0),this._emptyTitle=e;let t=new u;t.className=`adw-entry-field`,t.set(`backgroundColor`,`transparent`),t.set(`borderWidth`,0),this._textStack.addChild(t),this._field=t;let n=new l;n.orientation=`horizontal`,n.className=`adw-entry-row-suffixes`,this._suffixes=n;let o=new r;o.className=`adw-icon adw-entry-indicator`,n.addChild(o),this._indicator=o;let s=new i;s.className=`${s.className} adw-entry-apply`.trim(),s.iconName=h,s.iconColor=d,s.addEventListener(`tap`,()=>this.apply()),n.addChild(s),this._applyButton=s;let f=new r;f.className=a,f.iconName=m,n.addChild(f),this._editIcon=f,super.setSuffix(n),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){let n=t(e,this.maxLength);this._state.setMaxLength(n)}get editable(){return this._state.editable}set editable(t){let n=e(t,this.editable);this._state.setEditable(n)}get showApplyButton(){return this._state.showApplyButton}set showApplyButton(t){let n=e(t,this.showApplyButton);this._state.setShowApplyButton(n)}get activatesDefault(){return this._state.activatesDefault}set activatesDefault(t){let n=e(t,this.activatesDefault);this._state.setActivatesDefault(n)}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.iconName=e}apply(){this._state.apply(),this.notify({eventName:v,object:this})}_activate(){let e=this._state.activate();if(e.signal===`apply`){this.notify({eventName:v,object:this});return}let t={eventName:y,object:this,activateDefault:e.activateDefault};this.notify(t)}_render(e){s({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 o}_onStateChanged(e){if(this._render(e),e.text!==this._lastText){this._lastText=e.text;let t={eventName:g,object:this,text:e.text};this.notify(t)}if(e.textLength!==this._lastLength){this._lastLength=e.textLength;let t={eventName:_,object:this,textLength:e.textLength};this.notify(t)}}};export{AdwEntryRow,f as EntryRowState,g as NOTIFY_TEXT,_ as NOTIFY_TEXT_LENGTH,v as SIGNAL_APPLY,y as SIGNAL_ENTRY_ACTIVATED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{resolveBuilderSlot as t}from"./builder-slots.js";import{AdwActionRow as n}from"./adw-action-row.js";import{AdwIcon as r}from"./adw-icon.js";import{GridLayout as i,ItemSpec as a,StackLayout as o}from"@nativescript/core";import{ExpanderState as s,ExpanderState as c}from"@gjsify/adwaita-core";import{panDownSymbolic as l,panUpSymbolic as u}from"@gjsify/adwaita-icons/ui";const d=`notify::expanded`,f=[`prefix`,`suffix`];var AdwExpanderRow=class extends n{isActionRow=!1;_toggle;_disclosure;_state=new c;constructor(){super(),this.className=`adw-row adw-action-row adw-expander-row`,this.addRow(new a(1,`auto`));let e=new o;e.orientation=`vertical`,e.className=`adw-expander-disclosure`,e.visibility=`collapse`,i.setRow(e,1),i.setColumn(e,0),i.setColumnSpan(e,3),this.addChild(e),this._disclosure=e;let t=new r;t.iconName=l,t.className=`${t.className} adw-expander-toggle`.trim(),this.setSuffix(t),this._toggle=t,this._state.subscribe(e=>{this._disclosure.visibility=e?`visible`:`collapse`,this._toggle.iconName=e?u:l;let t={eventName:d,object:this,expanded:e};this.notify(t)});let toggleOnTap=()=>{this._state.toggle()};this._textStack.addEventListener(`tap`,toggleOnTap),t.addEventListener(`tap`,toggleOnTap)}addRow(e){if(e instanceof a){super.addRow(e);return}this._disclosure.addChild(e)}removeRow(e){this._disclosure.removeChild(e)}_addChildFromBuilder(e,n){let r=t(e,f,`row`);r===`row`?this.addRow(n):super._addChildFromBuilder(r,n)}get disclosureRows(){let e=[];for(let t=0;t<this._disclosure.getChildrenCount();t++)e.push(this._disclosure.getChildAt(t));return e}get expanded(){return this._state.expanded}set expanded(t){this._state.setExpanded(e(t,!1))}};export{AdwExpanderRow,s as ExpanderState,d as NOTIFY_EXPANDED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{resolveBuilderSlot as t}from"./builder-slots.js";import{AdwWindowTitle as n}from"./adw-window-title.js";import{GridLayout as r,ItemSpec as i,StackLayout as a}from"@nativescript/core";const o=[`titleWidget`,`startBox`,`endBox`];var AdwHeaderBar=class extends r{_startBox;_endBox;_titleWidget;_flat=!1;constructor(){super(),this.className=`adw-header-bar`,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 a;e.orientation=`horizontal`,e.className=`adw-header-bar-start`,r.setColumn(e,0),this.addChild(e),this._startBox=e;let t=new n;t.horizontalAlignment=`center`,t.verticalAlignment=`middle`,r.setColumn(t,1),this.addChild(t),this._titleWidget=t;let o=new a;o.orientation=`horizontal`,o.className=`adw-header-bar-end`,o.horizontalAlignment=`right`,r.setColumn(o,2),this.addChild(o),this._endBox=o}get title(){return this._titleWidget instanceof n?this._titleWidget.title:``}set title(e){this._titleWidget instanceof n&&(this._titleWidget.title=e??``)}get subtitle(){return this._titleWidget instanceof n?this._titleWidget.subtitle:``}set subtitle(e){this._titleWidget instanceof n&&(this._titleWidget.subtitle=e??``)}get flat(){return this._flat}set flat(t){let n=e(t,this.flat);this._flat=!!n,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`,r.setColumn(e,1),this.addChild(e),this._titleWidget=e}_addChildFromBuilder(e,n){switch(t(e,o,`startBox`)){case`titleWidget`:this.setTitleWidget(n);return;case`endBox`:this.packEnd(n);return;default:this.packStart(n)}}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{onAdwaitaColorSchemeChanged as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{onAdwaitaColorSchemeChanged as t,themeIconColor as n}from"./color-scheme.js";import{DEFAULT_ICON_COLOR as r}from"./icon-path.js";import{renderSymbolicIcon as i}from"./icons.js";import{Image as a}from"@nativescript/core";const o=16;var AdwIcon=class extends a{_iconSvg=``;_iconColor=n();_explicitColor=!1;_iconSize=16;_unsubScheme=null;constructor(){super(),this.className=`adw-icon`,this.stretch=`aspectFit`,this.width=this._iconSize,this.height=this._iconSize,this.addEventListener(`loaded`,()=>{this._syncThemeColor(),this._unsubScheme??=t(()=>this._syncThemeColor())}),this.addEventListener(`unloaded`,()=>{this._unsubScheme?.(),this._unsubScheme=null})}_syncThemeColor(){if(this._explicitColor)return;let e=n();e!==this._iconColor&&(this._iconColor=e,this._render())}_render(){if(!this._iconSvg)return;let e=i(this._iconSvg,{size:this._iconSize,color:this._iconColor});e&&(this.imageSource=e)}get iconName(){return this._iconSvg}set iconName(e){this._iconSvg=e??``,this._render()}get iconColor(){return this._iconColor}set iconColor(e){this._explicitColor=!0,this._iconColor=e||r,this._render()}get iconSize(){return this._iconSize}set iconSize(t){let n=e(t,this.iconSize);this._iconSize=Number.isFinite(n)&&n>0?n:16,this.width=this._iconSize,this.height=this._iconSize,this._render()}};export{AdwIcon,o as DEFAULT_ADW_ICON_SIZE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{onAdwaitaColorSchemeChanged as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{onAdwaitaColorSchemeChanged as t,themeIconColor as n}from"./color-scheme.js";import{DEFAULT_ICON_COLOR as r}from"./icon-path.js";import{renderSymbolicIcon as i}from"./icons.js";import{attachRowPressFeedback as a}from"./row-press.js";import{GridLayout as o,Image as s,ItemSpec as c}from"@nativescript/core";const l=16;var AdwImageButton=class extends o{_image;_iconSvg=``;_iconColor=n();_explicitColor=!1;_iconSize=16;_unsubScheme=null;constructor(){super(),this.className=`adw-image-button`,this.addRow(new c(1,`star`)),this.addColumn(new c(1,`star`));let e=new s;e.className=`adw-image-button-icon`,e.stretch=`aspectFit`,e.width=this._iconSize,e.height=this._iconSize,e.horizontalAlignment=`center`,e.verticalAlignment=`middle`,this.addChild(e),this._image=e,a(this),this.addEventListener(`loaded`,()=>{this._syncThemeColor(),this._unsubScheme??=t(()=>this._syncThemeColor())}),this.addEventListener(`unloaded`,()=>{this._unsubScheme?.(),this._unsubScheme=null})}_syncThemeColor(){if(this._explicitColor)return;let e=n();e!==this._iconColor&&(this._iconColor=e,this._render())}_render(){if(!this._iconSvg)return;let e=i(this._iconSvg,{size:this._iconSize,color:this._iconColor});e&&(this._image.imageSource=e)}get iconName(){return this._iconSvg}set iconName(e){this._iconSvg=e??``,this._image.width=this._iconSize,this._image.height=this._iconSize,this._render()}get iconColor(){return this._iconColor}set iconColor(e){this._explicitColor=!0,this._iconColor=e||r,this._render()}get iconSize(){return this._iconSize}set iconSize(t){let n=e(t,this.iconSize);this._iconSize=Number.isFinite(n)&&n>0?n:16,this._image.width=this._iconSize,this._image.height=this._iconSize,this._render()}get image(){return this._image}};export{AdwImageButton,l as DEFAULT_ICON_BUTTON_ICON_SIZE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{NsNavigationSplitViewState as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{NsNavigationSplitViewState as t,splitViewColumns as n}from"./split-view-state.js";import{AdwSplitViewBase as r}from"./split-view-base.js";import{GridLayout as i}from"@nativescript/core";var a=class AdwNavigationSplitView extends r{constructor(){super(`adw-navigation-split-view`,`navigation`,new t({onCritical:e=>console.error(e),onDelegate:(e,t)=>{for(let n=this.parent;n;n=n.parent)if(n instanceof AdwNavigationSplitView)return(e===`push`?n.push(t):n.pop()).kind!==`not-found`;return!1}})),this._applyLayout()}_applyLayout(){if(!this._state.collapsed){let e=n(this._state.sidebarPosition,this.textDirection);this._sidebar&&(this._sidebar.visibility=`visible`,this._sidebar.translateX=0,i.setColumn(this._sidebar,e.sidebar),i.setColumnSpan(this._sidebar,1),this._sidebar.width=this.sidebarWidth),this._content&&(this._content.visibility=`visible`,this._content.translateX=0,i.setColumn(this._content,e.content),i.setColumnSpan(this._content,1));return}let e=this._state.visiblePane;this._sidebar&&(this._sidebar.visibility=e===`sidebar`?`visible`:`collapse`,this._sidebar.translateX=0,i.setColumn(this._sidebar,0),i.setColumnSpan(this._sidebar,2),this._sidebar.width=`auto`),this._content&&(this._content.visibility=e===`content`?`visible`:`collapse`,this._content.translateX=0,i.setColumn(this._content,0),i.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])i.setColumn(e,0),i.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,r=n===this._sidebar?this._content:this._sidebar,a=t?e:-e,o=t?-e:e;n.visibility=`visible`,n.translateX=a,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:o,y:0},duration:200,curve:`easeIn`})).then(()=>this._settleAfterSwap(n,r)).catch(()=>{})}_settleAfterSwap(e,t){(this._state.visiblePane===`sidebar`?this._sidebar:this._content)===e&&(t.visibility=`collapse`,t.translateX=0)}_paneWidth(){let e=this.getActualSize();return e&&e.width>0?e.width:1024}get sidebarTag(){return this._state.sidebarTag}set sidebarTag(e){this._state.setTag(`sidebar`,e)}get contentTag(){return this._state.contentTag}set contentTag(e){this._state.setTag(`content`,e)}push(e){return this._state.push(e)}pop(){return this._state.pop()}get showContent(){return this._state.showContent}set showContent(t){let n=e(t,this.showContent);this._state.showContent=n}};export{a as AdwNavigationSplitView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{NOTIFY_VISIBLE_PAGE as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{NOTIFY_VISIBLE_PAGE as t,NsNavigationStack as n,POPPED as r,PUSHED as i,REPLACED as a,navigationPageClassName as o}from"./navigation-stack.js";import{GridLayout as s,ItemSpec as c}from"@nativescript/core";import{describeNavigationDiagnostic as l}from"@gjsify/adwaita-core";var AdwNavigationView=class extends s{_nav;constructor(){super(),this.className=`adw-navigation-view`,this.addColumn(new c(1,`star`)),this.addRow(new c(1,`star`)),this._nav=new n({attachPage:e=>{e.className=o(e.className),s.setColumn(e,0),s.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] ${l(e)}`)})}add(e,t=null,n={}){return this._nav.add(e,t,n)}_addChildFromBuilder(e,t){this.add(t)}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(t){let n=e(t,this.animateTransitions);this._nav.setAnimateTransitions(n)}get popOnEscape(){return this._nav.popOnEscape}set popOnEscape(t){let n=e(t,this.popOnEscape);this._nav.setPopOnEscape(n)}_emit(e){let t={eventName:e.name,object:this,page:e.page,tag:e.tag,depth:e.depth};this.notify(t)}};export{AdwNavigationView,t as NOTIFY_VISIBLE_PAGE,r as POPPED,i as PUSHED,a as REPLACED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{NsOverlaySplitViewState as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{NsOverlaySplitViewState as t,splitViewColumns as n}from"./split-view-state.js";import{AdwSplitViewBase as r}from"./split-view-base.js";import{GridLayout as i}from"@nativescript/core";var AdwOverlaySplitView=class extends r{_scrim=null;constructor(){super(`adw-overlay-split-view`,`overlay`,new t),this._applyLayout()}get pinSidebar(){return this._state.pinSidebar}set pinSidebar(t){let n=e(t,this.pinSidebar);this._state.setPinSidebar(!!n)}_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,i.setColumn(this._sidebar,e.sidebar),i.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`,i.setColumn(this._content,t?e.content:0),i.setColumnSpan(this._content,t?1:2)),this._applyPaneFocus();return}this._content&&(this._content.visibility=`visible`,i.setColumn(this._content,0),i.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(i.setColumn(this._scrim,0),i.setColumnSpan(this._scrim,2),this._scrim.visibility=this._state.shieldVisible?`visible`:`collapse`,this._scrim.opacity=+!!this._state.shieldVisible),this._sidebar&&(i.setColumn(this._sidebar,0),i.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 i;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`,i.setColumn(this._content,0),i.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(i.setColumn(this._scrim,0),i.setColumnSpan(this._scrim,2)),this._sidebar&&(i.setColumn(this._sidebar,0),i.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{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{AdwImageButton as t}from"./adw-image-button.js";import{NS_PASSWORD_ENTRY_ROW_CLASS as n,applyPasswordEntryRowState as r}from"./entry-row-view.js";import{AdwEntryRow as i}from"./adw-entry-row.js";import{PasswordEntryRowState as a,PasswordEntryRowState as o}from"@gjsify/adwaita-core";import{dialogWarningSymbolic as s}from"@gjsify/adwaita-icons/status";const c=`notify::revealed`;var AdwPasswordEntryRow=class extends i{_password=new o(this._state);_peekButton;constructor(){super(),this._field.className=`adw-entry-field adw-password-field`;let e=new t;e.className=`${e.className} adw-password-peek`.trim(),e.addEventListener(`tap`,()=>this._password.togglePeek()),this.addSuffix(e),this._peekButton=e,this.setIndicatorIcon(s),this._renderPassword(this._password.state),this._password.subscribe(e=>{this._renderPassword(e);let t={eventName:c,object:this,revealed:e.revealed};this.notify(t)})}get revealed(){return this._password.revealed}set revealed(t){this._password.setRevealed(e(t,!1))}get peeking(){return this._password.revealed}set peeking(t){this._password.setRevealed(e(t,!1))}togglePeek(){return this._password.togglePeek()}get capsLockOn(){return this._password.capsLockOn}setCapsLockOn(e){this._password.setCapsLockOn(e)}get _baseClassName(){return n}_renderPassword(e){r({field:this._field,peekButton:this._peekButton},e)}};export{AdwPasswordEntryRow,c as NOTIFY_REVEALED,a as PasswordEntryRowState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{AdwImageButton as t}from"./adw-image-button.js";import{searchNsPreferences as n}from"./preferences-search.js";import{GridLayout as r,ItemSpec as i,Label as a,StackLayout as o}from"@nativescript/core";import{windowCloseSymbolic as s}from"@gjsify/adwaita-icons/ui";const c=`closed`;var AdwPreferencesDialog=class extends r{_card;_headerBox;_titleLabel;_body;constructor(){super(),this.className=`adw-preferences-dialog`,this.visibility=`collapse`,this.addColumn(new i(1,`star`)),this.addRow(new i(1,`star`));let e=new r;e.className=`adw-preferences-dialog-card`,e.verticalAlignment=`middle`,e.horizontalAlignment=`center`,e.addColumn(new i(1,`star`)),e.addRow(new i(1,`auto`)),e.addRow(new i(1,`star`)),r.setColumn(e,0),r.setRow(e,0),this.addChild(e),this._card=e;let n=new r;n.className=`adw-preferences-dialog-header`,n.addColumn(new i(1,`star`)),n.addColumn(new i(1,`auto`)),n.addRow(new i(1,`auto`)),r.setRow(n,0),e.addChild(n),this._headerBox=n;let c=new a;c.className=`adw-preferences-dialog-title`,c.text=`Preferences`,r.setColumn(c,0),n.addChild(c),this._titleLabel=c;let l=new t;l.iconName=s,l.className=`${l.className} adw-preferences-dialog-close`.trim(),l.addEventListener(`tap`,()=>this.close()),r.setColumn(l,1),n.addChild(l);let u=new o;u.orientation=`vertical`,u.className=`adw-preferences-dialog-body`,r.setRow(u,1),e.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)}_addChildFromBuilder(e,t){this.add(t)}remove(e){this._body.removeChild(e)}get searchPages(){let e=[],t=this._body.getChildrenCount();for(let n=0;n<t;n++){let t=this._body.getChildAt(n);typeof t.searchGroups==`function`&&e.push(t)}return e}search(e,t){return n(this.searchPages,e,t)}present(){this.visibility=`visible`}close(){this.visibility=`collapse`;let e={eventName:c,object:this};this.notify(e)}get open(){return this.visibility===`visible`}set open(t){e(t,!1)?this.present():this.close()}get body(){return this._body}};export{AdwPreferencesDialog,c as CLOSED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{PREFERENCES_GROUP_HEADER_CLASS as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{resolveBuilderSlot as e}from"./builder-slots.js";import{PREFERENCES_GROUP_HEADER_CLASS as t,preferencesGroupVisuals as n}from"./preferences-group-state.js";import{GridLayout as r,ItemSpec as i,Label as a,StackLayout as o}from"@nativescript/core";const s=[`headerSuffix`];var AdwPreferencesGroup=class extends o{_header;_titleLabel;_descriptionLabel;_suffixHost;_listbox;_title=``;_description=``;_headerSuffix=null;constructor(){super(),this.orientation=`vertical`,this.className=`adw-preferences-group`;let e=new r;e.className=t,e.addColumn(new i(1,`star`)),e.addColumn(new i(1,`auto`)),e.addRow(new i(1,`auto`));let n=new o;n.orientation=`vertical`,n.className=`adw-preferences-group-labels`,n.verticalAlignment=`middle`,r.setColumn(n,0),e.addChild(n);let s=new a;s.className=`adw-preferences-group-title`,s.textWrap=!0,n.addChild(s);let c=new a;c.className=`adw-preferences-group-description`,c.textWrap=!0,n.addChild(c);let l=new o;l.orientation=`horizontal`,l.className=`adw-preferences-group-suffix`,l.verticalAlignment=`middle`,r.setColumn(l,1),e.addChild(l);let u=new o;u.orientation=`vertical`,u.className=`boxed-list adw-preferences-group-listbox`,this.addChild(e),this.addChild(u),this._header=e,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())}_addChildFromBuilder(t,n){if(e(t,s,`row`)===`headerSuffix`){this.headerSuffix=n;return}this.addRow(n)}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=n({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
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{ScrollView as t,StackLayout as n}from"@nativescript/core";var AdwPreferencesPage=class extends t{_content;_title=``;_name=``;_iconName=``;_useUnderline=!1;constructor(){super(),this.orientation=`vertical`,this.className=`adw-preferences-page`;let e=new n;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(t){this._useUnderline=e(t,!1)}addGroup(e){this._content.addChild(e)}removeGroup(e){this._content.removeChild(e)}_addChildFromBuilder(e,t){this.addGroup(t)}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{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{attachRowPressFeedback as t}from"./row-press.js";import{SidebarState as n,sidebarRowClassName as r,sidebarSectionsFromLabels as i}from"./sidebar-model.js";import{GridLayout as a,ItemSpec as o,Label as s,ScrollView as c,StackLayout as l}from"@nativescript/core";const u=`notify::selected`,d=`activated`;var AdwSidebar=class extends c{_list;_state=new n;_rows=[];constructor(){super(),this.orientation=`vertical`,this.className=`adw-sidebar`;let e=new l;e.orientation=`vertical`,e.className=`adw-sidebar-list`,this.content=e,this._list=e,this._state.subscribe(e=>{this._applySelection();let t={eventName:u,object:this,selected:e.selected,title:e.item?.title??``,previous:e.previous,interactive:e.interactive};this.notify(t)})}setItems(e){this.setSections(i(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 e of this._state.visibleItems){let n=new a;n.className=`adw-sidebar-row`,n.addColumn(new o(1,`star`)),n.addRow(new o(1,`auto`));let r=new s;r.className=`adw-sidebar-row-title`,r.text=e.item.title,r.textWrap=!0,a.setColumn(r,0),n.addChild(r),e.item.visible===!1&&(n.visibility=`collapse`),e.item.enabled===!1&&(n.opacity=.5),n.addEventListener(`tap`,()=>this._activate(e.index)),t(n),this._list.addChild(n),this._rows.push({view:n,index:e.index})}this._applySelection()}_activate(e){if(!this._state.activate(e).activated)return;let t={eventName:d,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 n of this._rows)n.view.className=r(n.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(t){let n=e(t,this.selected);this._state.setSelected(n)}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{d as ACTIVATED,AdwSidebar,u as NOTIFY_SELECTED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{GridLayout as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{GridLayout as t,ItemSpec as n,Label as r,Slider as i,StackLayout as a}from"@nativescript/core";const o=`notify::value`;var AdwSliderRow=class extends a{_titleLabel;_valueLabel;_slider;_value=0;_min=0;_max=100;_step=1;_suppress=!1;constructor(){super(),this.orientation=`vertical`,this.className=`adw-slider-row`;let e=new t;e.className=`adw-slider-header`,e.addRow(new n(1,`auto`)),e.addColumn(new n(1,`star`)),e.addColumn(new n(1,`auto`));let a=new r;a.className=`adw-slider-title`,a.textWrap=!1,t.setColumn(a,0),e.addChild(a);let s=new r;s.className=`adw-slider-value`,s.text=String(this._value),t.setColumn(s,1),e.addChild(s);let c=new i;c.className=`adw-slider`,c.minValue=this._min,c.maxValue=this._max,c.value=this._value,this.addChild(e),this.addChild(c),this._titleLabel=a,this._valueLabel=s,this._slider=c,c.addEventListener(`valueChange`,()=>{if(this._suppress)return;let e=this._snap(this._slider.value);if(e!==this._slider.value&&(this._suppress=!0,this._slider.value=e,this._suppress=!1),e!==this._value){this._value=e,this._valueLabel.text=String(e);let t={eventName:o,object:this,value:e};this.notify(t)}})}_snap(e){let t=Math.min(this._max,Math.max(this._min,e)),n=Math.round((t-this._min)/this._step);return Math.min(this._max,this._min+n*this._step)}_sync(){this._suppress=!0,this._slider.value=this._value,this._suppress=!1,this._valueLabel.text=String(this._value)}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??``}get value(){return this._value}set value(t){let n=e(t,this.value),r=this._snap(Number.isFinite(n)?n:0);r!==this._value&&(this._value=r,this._sync())}get min(){return this._min}set min(t){let n=e(t,this.min);this._min=Number.isFinite(n)?n:0,this._slider.minValue=this._min,this.value=this._value}get max(){return this._max}set max(t){let n=e(t,this.max);this._max=Number.isFinite(n)?n:100,this._slider.maxValue=this._max,this.value=this._value}get step(){return this._step}set step(t){let n=e(t,this.step);this._step=Number.isFinite(n)&&n>0?n:1}get slider(){return this._slider}};export{AdwSliderRow,o as NOTIFY_SLIDER_VALUE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{AdwActionRow as t}from"./adw-action-row.js";import{AdwImageButton as n}from"./adw-image-button.js";import{Label as r,StackLayout as i}from"@nativescript/core";import{SpinState as a,SpinState as o}from"@gjsify/adwaita-core";import{valueDecreaseSymbolic as s,valueIncreaseSymbolic as c}from"@gjsify/adwaita-icons/actions";const l=`notify::value`;var AdwSpinRow=class extends t{_minusButton;_plusButton;_valueLabel;_state=new o;constructor(){super(),this.className=`adw-row adw-action-row adw-spin-row`;let e=new i;e.orientation=`horizontal`,e.className=`adw-spin-control`;let t=new r;t.className=`adw-spin-value`,t.text=String(this._state.value);let a=new n;a.iconName=s,a.className=`${a.className} adw-spin-button adw-spin-minus`.trim();let o=new n;o.iconName=c,o.className=`${o.className} adw-spin-button adw-spin-plus`.trim(),e.addChild(t),e.addChild(a),e.addChild(o),this.setSuffix(e),this._minusButton=a,this._plusButton=o,this._valueLabel=t,this._state.subscribe(e=>{if(this._valueLabel.text=String(e.value),e.interactive){let t={eventName:l,object:this,value:e.value};this.notify(t)}}),a.addEventListener(`tap`,()=>this._state.decrement()),o.addEventListener(`tap`,()=>this._state.increment())}get value(){return this._state.value}set value(t){this._state.setValue(e(t,this._state.value))}get min(){return this._state.min}set min(t){this._state.setMin(e(t,this._state.min))}get max(){return this._state.max}set max(t){this._state.setMax(e(t,this._state.max))}get step(){return this._state.step}set step(t){this._state.setStep(e(t,this._state.step))}};export{AdwSpinRow,l as NOTIFY_VALUE,a as SpinState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{DEFAULT_SPINNER_SIZE as t}from"./chrome.js";import{ActivityIndicator as n,GridLayout as r,ItemSpec as i}from"@nativescript/core";import{resolveSpinnerSize as a,spinnerGeometry as o}from"@gjsify/adwaita-core";var AdwSpinner=class extends r{_indicator;_size=t;_spinning=!0;constructor(){super(),this.className=`adw-spinner`,this.addRow(new i(1,`star`)),this.addColumn(new i(1,`star`));let e=new n;e.className=`adw-spinner-ring`,e.horizontalAlignment=`center`,e.verticalAlignment=`center`,this._indicator=e,this.addChild(e),this.accessibilityRole=`progressbar`,this.accessibilityState=`busy`,this.addEventListener(`loaded`,()=>this._applySpinning()),this.addEventListener(`unloaded`,()=>{this._indicator.busy=!1}),this._applySize(),this._applySpinning()}_applySize(){this.width=this._size,this.height=this._size;let{diameter:e}=o(this._size,this._size);this._indicator.width=e,this._indicator.height=e}_applySpinning(){let e=this.isLoaded!==!1;this._indicator.busy=this._spinning&&e}get spinning(){return this._spinning}set spinning(t){this._spinning=e(t,!1),this._applySpinning()}get size(){return this._size}set size(e){this._size=a(e),this._applySize()}get ringDiameter(){return o(this._size,this._size).diameter}};export{AdwSpinner,t as DEFAULT_SPINNER_SIZE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{AdwIcon as t}from"./adw-icon.js";import{attachRowPressFeedback as n}from"./row-press.js";import{MENU_CANCEL_LABEL as r,menuSheetActions as i,resolveMenuChoice as a,setActionIcon as o,splitButtonArrowSvg as s,toMenuEntries as c}from"./split-button.js";import{GridLayout as l,ItemSpec as u,Label as d,StackLayout as f,action as p}from"@nativescript/core";import{SPLIT_BUTTON_DISABLED_OPACITY as m,SplitButtonState as h}from"@gjsify/adwaita-core";const g=`clicked`,_=`menuTapped`;var AdwSplitButton=class extends l{_actionPart;_actionLabel;_actionIcon;_dropdownPart;_chevron;_state=new h;_showingIcon=!1;_sensitive=!0;constructor(){super(),this.className=`adw-split-button`,this.addColumn(new u(1,`auto`)),this.addColumn(new u(1,`auto`)),this.addRow(new u(1,`auto`));let e=new f;e.orientation=`horizontal`,e.className=`adw-split-button-action`,e.horizontalAlignment=`center`,l.setColumn(e,0);let r=new d;r.className=`adw-split-button-label`,r.verticalAlignment=`middle`,e.addChild(r);let i=new t;i.className=`${i.className} adw-split-button-action-icon`.trim(),i.verticalAlignment=`middle`,this.addChild(e),this._actionPart=e,this._actionLabel=r,this._actionIcon=i;let a=new l;a.className=`adw-split-button-dropdown`,a.addColumn(new u(1,`star`)),a.addRow(new u(1,`star`)),l.setColumn(a,1);let o=new t;o.className=`${o.className} adw-split-button-chevron`.trim(),o.iconName=s(this._state.direction),o.horizontalAlignment=`center`,o.verticalAlignment=`middle`,a.addChild(o),this.addChild(a),this._dropdownPart=a,this._chevron=o,e.addEventListener(`tap`,()=>{if(!this._sensitive)return;let e={eventName:g,object:this};this.notify(e)}),a.addEventListener(`tap`,()=>{this._openMenu()}),n(e),n(a),this._state.subscribe(()=>this._render()),this._render()}async _openMenu(){if(!this._sensitive||this._state.open||!this._state.dropdownEnabled)return;let e=i(this._state.menuModel??[],r);this._state.toggleMenu();let t=a(e,await p({title:this._state.label||void 0,cancelButtonText:r,actions:e})),n=this._state.activateMenuEntry(t);if(n===null){this._state.closeMenu();return}let o={eventName:_,object:this,item:n.label,index:t,action:n.action};this.notify(o)}_render(){let{mode:e,label:t,iconName:n,direction:r,dropdownEnabled:i}=this._state,a=e===`icon`;a?this._actionIcon.iconName=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.iconName=s(r),this._dropdownPart.opacity=i?1:m,this.opacity=this._sensitive?1:m}get label(){return this._state.label??``}set label(e){this._state.setLabel(e??``)}get iconName(){return this._state.iconName??``}set iconName(e){o(this._state,e)}get menu(){return this._state.menuModel??[]}set menu(e){this._state.setMenuModel(c(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(t){let n=e(t,this.useUnderline);this._state.setUseUnderline(!!n)}get sensitive(){return this._sensitive}set sensitive(t){let n=!!e(t,this._sensitive);n!==this._sensitive&&(this._sensitive=n,this._render())}get actionButton(){return this._actionPart}};export{AdwSplitButton,g as CLICKED,_ as MENU_TAPPED};
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 iconName(){return this._iconSvg}set iconName(e){this._iconSvg=e??``,this._icon.iconName=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}_addChildFromBuilder(e,t){this.setChild(t)}};export{AdwStatusPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{SwitchRowState as t}from"./row-state.js";import{AdwActionRow as n}from"./adw-action-row.js";import{Switch as r}from"@nativescript/core";const i=`notify::active`;var AdwSwitchRow=class extends n{_switch;_switchState=new t;constructor(){super(),this.className=`adw-row adw-action-row adw-switch-row`;let e=new r;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(t){this._apply(this._switchState.setActive(e(t,!1)))}activate(){this.activatable&&(this._apply(this._switchState.activate()),super.activate())}_apply(e){if(!e)return;this._switch.checked=this._switchState.active;let t={eventName:i,object:this,active:this._switchState.active};this.notify(t)}};export{AdwSwitchRow,i as NOTIFY_ACTIVE};
|