@gjsify/adwaita-nativescript 0.45.0 → 0.47.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-button-content.js +1 -1
- package/lib/esm/widgets/adw-button-row.js +1 -1
- package/lib/esm/widgets/adw-combo-row.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-icon.js +1 -1
- package/lib/esm/widgets/adw-image-button.js +1 -1
- package/lib/esm/widgets/adw-preferences-dialog.js +1 -1
- package/lib/esm/widgets/adw-spin-row.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-tab-view.js +1 -1
- package/lib/esm/widgets/adw-toggle-group.js +1 -1
- package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
- 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/{adw-entry.js → gtk-entry.js} +1 -1
- package/lib/esm/widgets/{adw-menu-button.js → gtk-menu-button.js} +1 -1
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/view-switcher-base.js +1 -1
- package/lib/esm/widgets/wrap-box-layout.js +1 -1
- package/lib/types/index.d.ts +2 -1
- package/lib/types/namespace.d.ts +92 -0
- package/lib/types/widgets/adw-action-row.d.ts +2 -1
- package/lib/types/widgets/adw-bottom-sheet.d.ts +2 -1
- package/lib/types/widgets/adw-button-content.d.ts +2 -2
- package/lib/types/widgets/adw-button-row.d.ts +4 -4
- package/lib/types/widgets/adw-carousel.d.ts +2 -1
- package/lib/types/widgets/adw-clamp.d.ts +2 -1
- package/lib/types/widgets/adw-combo-row.d.ts +3 -3
- package/lib/types/widgets/adw-expander-row.d.ts +2 -1
- package/lib/types/widgets/adw-header-bar.d.ts +2 -1
- package/lib/types/widgets/adw-icon.d.ts +2 -2
- package/lib/types/widgets/adw-image-button.d.ts +2 -2
- package/lib/types/widgets/adw-preferences-dialog.d.ts +2 -1
- package/lib/types/widgets/adw-preferences-group.d.ts +2 -1
- package/lib/types/widgets/adw-preferences-page.d.ts +2 -1
- package/lib/types/widgets/adw-split-button.d.ts +22 -6
- package/lib/types/widgets/adw-status-page.d.ts +4 -3
- 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 +2 -1
- package/lib/types/widgets/adw-view-stack.d.ts +2 -1
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +1 -1
- 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} +3 -3
- package/lib/types/widgets/{adw-entry.d.ts → gtk-entry.d.ts} +4 -4
- package/lib/types/widgets/{adw-menu-button.d.ts → gtk-menu-button.d.ts} +3 -3
- package/lib/types/widgets/index.d.ts +8 -8
- package/lib/types/widgets/split-button.d.ts +2 -2
- package/lib/types/widgets/wrap-box-layout.d.ts +3 -60
- package/package.json +7 -7
- package/lib/esm/widgets/adw-drop-down.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{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.
|
|
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{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.
|
|
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{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.
|
|
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{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.
|
|
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{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
|
|
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{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
|
|
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{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.
|
|
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{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.
|
|
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{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;
|
|
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{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{AdwIcon as n}from"./adw-icon.js";import{attachRowPressFeedback as r}from"./row-press.js";import{AdwImageButton as i}from"./adw-image-button.js";import{applyTabViewVisibility as a,createTabViewState as o,tabBarVisibility as s,tabCloseVisibilities as c,tabLabelText as l,tabViewNotifyPayload as u}from"./tab-view-state.js";import{GridLayout as d,ItemSpec as f,Label as p,StackLayout as m}from"@nativescript/core";import{tabIconState as h}from"@gjsify/adwaita-core";import{windowCloseSymbolic as g}from"@gjsify/adwaita-icons/ui";const _=`notify::selected-page`,v=`pages-changed`,y=`close-page`;var AdwTabView=class extends d{_state=o({onClosePage:e=>this._requestClose(e)});_bar;_contentArea;_chips=new Map;_autohide=!1;_defaultIcon=null;_generatedIds=0;closeHandler=null;constructor(){super(),this.className=`adw-tab-view`,this.addColumn(new f(1,`star`)),this.addRow(new f(1,`auto`)),this.addRow(new f(1,`star`));let e=new m;e.orientation=`horizontal`,e.horizontalAlignment=`stretch`,e.className=`adw-tab-view-bar`,d.setRow(e,0),this.addChild(e),this._bar=e;let t=new d;t.addColumn(new f(1,`star`)),t.addRow(new f(1,`star`)),d.setRow(t,1),this.addChild(t),this._contentArea=t,this._state.subscribePages(e=>this._onPagesChange(e)),this._state.subscribe(e=>{this._applySelection();let t={eventName:_,object:this,...u(e)};this.notify(t)})}get pages(){return this._state.pages}get nPages(){return this._state.nPages}get nPinnedPages(){return this._state.nPinnedPages}get selectedId(){return this._state.selectedId}get selectedIndex(){return this._state.selectedIndex}get selected(){return this._state.selectedIndex}set selected(e){let n=t(e,this.selected);this._state.selectNthPage(n)}isClosing(e){return this._state.isClosing(e)}setSelectedPage(e){return this._state.setSelectedPage(e)}selectNthPage(e){return this._state.selectNthPage(e)}selectPreviousPage(){return this._state.selectPreviousPage()}selectNextPage(){return this._state.selectNextPage()}selectFirstPage(){return this._state.selectFirstPage()}selectLastPage(){return this._state.selectLastPage()}cycleNextPage(){return this._state.cycleNextPage()}cyclePreviousPage(){return this._state.cyclePreviousPage()}addPage(e,t=null){return this._state.addPage(e,t)}insertPage(e,t){return this._state.insertPage(e,t)}prependPage(e){return this._state.prependPage(e)}appendPage(e){return this._state.appendPage(e)}insertPinnedPage(e,t){return this._state.insertPinnedPage(e,t)}prependPinnedPage(e){return this._state.prependPinnedPage(e)}appendPinnedPage(e){return this._state.appendPinnedPage(e)}setPagePinned(e,t){return this._state.setPagePinned(e,t)}closePage(e){return this._state.closePage(e)}closePageFinish(e,t){return this._state.closePageFinish(e,t)}closeOtherPages(e){this._state.closeOtherPages(e)}closePagesBefore(e){this._state.closePagesBefore(e)}closePagesAfter(e){this._state.closePagesAfter(e)}detachPage(e){return this._state.detachPage(e)}reorderPage(e,t){return this._state.reorderPage(e,t)}reorderBackward(e){return this._state.reorderBackward(e)}reorderForward(e){return this._state.reorderForward(e)}reorderFirst(e){return this._state.reorderFirst(e)}reorderLast(e){return this._state.reorderLast(e)}setPageTitle(e,t){return this._state.setPageTitle(e,t)}setPageIcon(e,t){return this._state.setPageIcon(e,t)}setPageLoading(e,t){return this._state.setPageLoading(e,t)}setPageNeedsAttention(e,t){return this._state.setPageNeedsAttention(e,t)}get diagnostics(){return this._state.diagnostics}get autohide(){return this._autohide}set autohide(t){let n=e(t,this.autohide);this._autohide=!!n,this._applyBarVisibility()}get defaultIcon(){return this._defaultIcon}set defaultIcon(e){this._defaultIcon=e;for(let e of this._state.pages)this._refreshChip(e.id)}setViews(e){for(let e of this._state.pages)this._state.detachPage(e.id);for(let t of e)this._state.appendPage({id:this._nextId(),title:t.title,icon:t.icon??null,content:t.content})}get views(){return this._state.pages.map(e=>({title:e.title,content:e.content,icon:e.icon??void 0}))}set views(e){this.setViews(Array.isArray(e)?e:[])}get tabs(){return this.views}set tabs(e){this.views=e}_onPagesChange(e){switch(e.kind){case`attached`:{let t=this._state.getPage(e.id);t&&this._insertChip(t,e.position);break}case`detached`:{let t=this._chips.get(e.id);t&&this._bar.removeChild(t.button),this._chips.delete(e.id);break}case`reordered`:case`pinned`:{let t=this._chips.get(e.id);t&&(this._bar.removeChild(t.button),this._bar.insertChild(t.button,e.position)),this._refreshChip(e.id);break}case`updated`:this._refreshChip(e.id);break}this._applyBarVisibility(),this._applySelection();let t={eventName:v,object:this,...e};this.notify(t)}_insertChip(e,t){let a=new m;a.orientation=`horizontal`,a.className=`adw-tab-view-tab`,a.verticalAlignment=`middle`;let o=new n;o.className=`${o.className} adw-tab-view-tab-icon`.trim(),o.verticalAlignment=`middle`,a.addChild(o);let s=new n;s.className=`${s.className} adw-tab-view-tab-icon`.trim(),s.verticalAlignment=`middle`,a.addChild(s);let c=new p;c.className=`adw-tab-view-tab-label`,c.verticalAlignment=`middle`,a.addChild(c);let l=new i;l.className=`${l.className} adw-tab-close`.trim(),l.
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{AdwIcon as n}from"./adw-icon.js";import{attachRowPressFeedback as r}from"./row-press.js";import{AdwImageButton as i}from"./adw-image-button.js";import{applyTabViewVisibility as a,createTabViewState as o,tabBarVisibility as s,tabCloseVisibilities as c,tabLabelText as l,tabViewNotifyPayload as u}from"./tab-view-state.js";import{GridLayout as d,ItemSpec as f,Label as p,StackLayout as m}from"@nativescript/core";import{tabIconState as h}from"@gjsify/adwaita-core";import{windowCloseSymbolic as g}from"@gjsify/adwaita-icons/ui";const _=`notify::selected-page`,v=`pages-changed`,y=`close-page`;var AdwTabView=class extends d{_state=o({onClosePage:e=>this._requestClose(e)});_bar;_contentArea;_chips=new Map;_autohide=!1;_defaultIcon=null;_generatedIds=0;closeHandler=null;constructor(){super(),this.className=`adw-tab-view`,this.addColumn(new f(1,`star`)),this.addRow(new f(1,`auto`)),this.addRow(new f(1,`star`));let e=new m;e.orientation=`horizontal`,e.horizontalAlignment=`stretch`,e.className=`adw-tab-view-bar`,d.setRow(e,0),this.addChild(e),this._bar=e;let t=new d;t.addColumn(new f(1,`star`)),t.addRow(new f(1,`star`)),d.setRow(t,1),this.addChild(t),this._contentArea=t,this._state.subscribePages(e=>this._onPagesChange(e)),this._state.subscribe(e=>{this._applySelection();let t={eventName:_,object:this,...u(e)};this.notify(t)})}get pages(){return this._state.pages}get nPages(){return this._state.nPages}get nPinnedPages(){return this._state.nPinnedPages}get selectedId(){return this._state.selectedId}get selectedIndex(){return this._state.selectedIndex}get selected(){return this._state.selectedIndex}set selected(e){let n=t(e,this.selected);this._state.selectNthPage(n)}isClosing(e){return this._state.isClosing(e)}setSelectedPage(e){return this._state.setSelectedPage(e)}selectNthPage(e){return this._state.selectNthPage(e)}selectPreviousPage(){return this._state.selectPreviousPage()}selectNextPage(){return this._state.selectNextPage()}selectFirstPage(){return this._state.selectFirstPage()}selectLastPage(){return this._state.selectLastPage()}cycleNextPage(){return this._state.cycleNextPage()}cyclePreviousPage(){return this._state.cyclePreviousPage()}addPage(e,t=null){return this._state.addPage(e,t)}insertPage(e,t){return this._state.insertPage(e,t)}prependPage(e){return this._state.prependPage(e)}appendPage(e){return this._state.appendPage(e)}insertPinnedPage(e,t){return this._state.insertPinnedPage(e,t)}prependPinnedPage(e){return this._state.prependPinnedPage(e)}appendPinnedPage(e){return this._state.appendPinnedPage(e)}setPagePinned(e,t){return this._state.setPagePinned(e,t)}closePage(e){return this._state.closePage(e)}closePageFinish(e,t){return this._state.closePageFinish(e,t)}closeOtherPages(e){this._state.closeOtherPages(e)}closePagesBefore(e){this._state.closePagesBefore(e)}closePagesAfter(e){this._state.closePagesAfter(e)}detachPage(e){return this._state.detachPage(e)}reorderPage(e,t){return this._state.reorderPage(e,t)}reorderBackward(e){return this._state.reorderBackward(e)}reorderForward(e){return this._state.reorderForward(e)}reorderFirst(e){return this._state.reorderFirst(e)}reorderLast(e){return this._state.reorderLast(e)}setPageTitle(e,t){return this._state.setPageTitle(e,t)}setPageIcon(e,t){return this._state.setPageIcon(e,t)}setPageLoading(e,t){return this._state.setPageLoading(e,t)}setPageNeedsAttention(e,t){return this._state.setPageNeedsAttention(e,t)}get diagnostics(){return this._state.diagnostics}get autohide(){return this._autohide}set autohide(t){let n=e(t,this.autohide);this._autohide=!!n,this._applyBarVisibility()}get defaultIcon(){return this._defaultIcon}set defaultIcon(e){this._defaultIcon=e;for(let e of this._state.pages)this._refreshChip(e.id)}setViews(e){for(let e of this._state.pages)this._state.detachPage(e.id);for(let t of e)this._state.appendPage({id:this._nextId(),title:t.title,icon:t.icon??null,content:t.content})}get views(){return this._state.pages.map(e=>({title:e.title,content:e.content,icon:e.icon??void 0}))}set views(e){this.setViews(Array.isArray(e)?e:[])}get tabs(){return this.views}set tabs(e){this.views=e}_onPagesChange(e){switch(e.kind){case`attached`:{let t=this._state.getPage(e.id);t&&this._insertChip(t,e.position);break}case`detached`:{let t=this._chips.get(e.id);t&&this._bar.removeChild(t.button),this._chips.delete(e.id);break}case`reordered`:case`pinned`:{let t=this._chips.get(e.id);t&&(this._bar.removeChild(t.button),this._bar.insertChild(t.button,e.position)),this._refreshChip(e.id);break}case`updated`:this._refreshChip(e.id);break}this._applyBarVisibility(),this._applySelection();let t={eventName:v,object:this,...e};this.notify(t)}_insertChip(e,t){let a=new m;a.orientation=`horizontal`,a.className=`adw-tab-view-tab`,a.verticalAlignment=`middle`;let o=new n;o.className=`${o.className} adw-tab-view-tab-icon`.trim(),o.verticalAlignment=`middle`,a.addChild(o);let s=new n;s.className=`${s.className} adw-tab-view-tab-icon`.trim(),s.verticalAlignment=`middle`,a.addChild(s);let c=new p;c.className=`adw-tab-view-tab-label`,c.verticalAlignment=`middle`,a.addChild(c);let l=new i;l.className=`${l.className} adw-tab-close`.trim(),l.iconName=g,l.iconSize=12,l.verticalAlignment=`middle`,l.addEventListener(`tap`,()=>this._state.closePage(e.id)),a.addChild(l),r(a),a.addEventListener(`tap`,()=>this._state.setSelectedPage(e.id)),this._bar.insertChild(a,t),this._chips.set(e.id,{button:a,icon:o,indicator:s,label:c,close:l});let u=e.content;u&&(d.setColumn(u,0),d.setRow(u,0),this._contentArea.addChild(u)),this._refreshChip(e.id)}_refreshChip(e){let t=this._state.getPage(e),n=this._chips.get(e);if(!t||!n)return;n.label.text=l(t),n.label.visibility=t.pinned?`collapse`:`visible`;let r=h(t,this._defaultIcon);n.icon.iconName=r.icon??``,n.icon.visibility=r.iconVisible&&r.icon!==null?`visible`:`collapse`,n.indicator.iconName=t.indicatorIcon??``,n.indicator.visibility=r.indicatorVisible?`visible`:`collapse`}_applySelection(){a(this._state);let e=c(this._state),t=this._state.selectedId;this._state.pages.forEach((n,r)=>{let i=this._chips.get(n.id);i&&(i.button.className=n.id===t?`adw-tab-view-tab active`:`adw-tab-view-tab`,i.close.visibility=e[r])})}_applyBarVisibility(){this._bar.visibility=s(this._state,this._autohide)}_requestClose(e){let t={eventName:y,object:this,id:e.id,index:this._state.getPagePosition(e.id)};return this.notify(t),this.closeHandler?this.closeHandler(e):!e.pinned}_nextId(){return this._generatedIds+=1,`tab-${this._generatedIds}`}};export{AdwTabView,y as CLOSE_PAGE,_ as NOTIFY_SELECTED_PAGE,v as PAGES_CHANGED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{AdwIcon as t}from"./adw-icon.js";import{Label as n,StackLayout as r}from"@nativescript/core";import{ToggleGroupState as i,ToggleGroupState as a}from"@gjsify/adwaita-core";const o=`notify::selected`;var AdwToggleGroup=class extends r{_toggles=[];_segments=[];_state=new a;constructor(){super(),this.orientation=`horizontal`,this.className=`adw-toggle-group`,this.horizontalAlignment=`center`,this._state.subscribe(e=>{this._applySelection();let t={eventName:o,object:this,selected:e.selected,value:e.value};this.notify(t)})}get options(){return this._toggles.map(e=>e.label)}set options(e){this.setToggles((Array.isArray(e)?e:[]).map(e=>({label:e})))}setToggles(e){for(let e of this._segments)this.removeChild(e);this._segments.length=0,this._toggles=Array.isArray(e)?e:[],this._toggles.forEach((e,i)=>{let a=new r;if(a.orientation=`horizontal`,a.className=`adw-toggle-button`,a.horizontalAlignment=`center`,e.icon){let n=new t;n.className=`${n.className} adw-toggle-icon`.trim(),n.verticalAlignment=`middle`,n.
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{AdwIcon as t}from"./adw-icon.js";import{Label as n,StackLayout as r}from"@nativescript/core";import{ToggleGroupState as i,ToggleGroupState as a}from"@gjsify/adwaita-core";const o=`notify::selected`;var AdwToggleGroup=class extends r{_toggles=[];_segments=[];_state=new a;constructor(){super(),this.orientation=`horizontal`,this.className=`adw-toggle-group`,this.horizontalAlignment=`center`,this._state.subscribe(e=>{this._applySelection();let t={eventName:o,object:this,selected:e.selected,value:e.value};this.notify(t)})}get options(){return this._toggles.map(e=>e.label)}set options(e){this.setToggles((Array.isArray(e)?e:[]).map(e=>({label:e})))}setToggles(e){for(let e of this._segments)this.removeChild(e);this._segments.length=0,this._toggles=Array.isArray(e)?e:[],this._toggles.forEach((e,i)=>{let a=new r;if(a.orientation=`horizontal`,a.className=`adw-toggle-button`,a.horizontalAlignment=`center`,e.icon){let n=new t;n.className=`${n.className} adw-toggle-icon`.trim(),n.verticalAlignment=`middle`,n.iconName=e.icon,a.addChild(n)}let o=new n;o.text=e.label,o.className=`adw-toggle-label`,o.verticalAlignment=`middle`,a.addChild(o),a.addEventListener(`tap`,()=>{this._state.setSelected(i)}),this.addChild(a),this._segments.push(a)}),this._state.setLabels(this._toggles.map(e=>e.label)),this._applySelection()}_applySelection(){let e=this._state.selected;this._segments.forEach((t,n)=>{t.className=n===e?`adw-toggle-button active`:`adw-toggle-button`})}get active(){return this._state.selected}set active(t){let n=e(t,this.active);this._state.setSelected(n)}get selectedValue(){return this._state.selectedValue}};export{AdwToggleGroup,o as NOTIFY_SELECTED,i as ToggleGroupState};
|
|
@@ -1 +1 @@
|
|
|
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{NOTIFY_VISIBLE_CHILD as r}from"./adw-view-stack.js";import{createViewSwitcherBarState as i,nsIconSvg as a}from"./view-switcher-model.js";import{GridLayout as o,ItemSpec as s,Label as c,StackLayout as l}from"@nativescript/core";import{buildViewSwitcherButtons as u,viewSwitcherPagesFromStack as d}from"@gjsify/adwaita-core";var AdwViewSwitcherBar=class extends o{_bar;_nodes=[];_stack=null;_stackListener=null;_barState=i();constructor(){super(),this.className=`adw-viewswitcherbar`,this.addColumn(new s(1,`star`)),this.addRow(new s(1,`auto`));let e=new o;e.className=`adw-viewswitcherbar-box`,e.addRow(new s(1,`auto`)),o.setRow(e,0),this.addChild(e),this._bar=e,this._barState.subscribe(()=>this._applyRevealed()),this._applyRevealed(),this.addEventListener(`loaded`,()=>{this._bindStack(),this._rebuild()}),this.addEventListener(`unloaded`,()=>this._unbindStack())}setStack(e){this._unbindStack(),this._stack=e,this._bindStack(),this._rebuild()}get stack(){return this._stack}set stack(e){this.setStack(e)}get reveal(){return this._barState.reveal}set reveal(t){let n=e(t,this.reveal);this._barState.setReveal(n)}get revealed(){return this._barState.revealed}refresh(){this._rebuild()}_bindStack(){if(!this._stack||this._stackListener)return;let listener=()=>this._rebuild();this._stack.addEventListener(r,listener),this._stackListener=listener}_unbindStack(){!this._stack||!this._stackListener||(this._stack.removeEventListener(r,this._stackListener),this._stackListener=null)}_rebuild(){let e=this._stack?.pages??[];this._barState.setPages(e);let t=u(d(e),this._stack?.visibleChildIndex??-1,`narrow`);if(t.length!==this._nodes.length){for(let e of this._nodes)this._bar.removeChild(e.button);this._nodes=[],this._bar.removeColumns(),this._nodes=t.map((e,t)=>(this._bar.addColumn(new s(1,`star`)),this._buildButton(e.pageIndex,t)))}t.forEach((e,t)=>{let n=this._nodes[t];n&&(n.button.visibility=e.visible?`visible`:`collapse`,n.button.className=e.selected?`adw-viewswitcherbar-button active`:`adw-viewswitcherbar-button`,n.icon.
|
|
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{NOTIFY_VISIBLE_CHILD as r}from"./adw-view-stack.js";import{createViewSwitcherBarState as i,nsIconSvg as a}from"./view-switcher-model.js";import{GridLayout as o,ItemSpec as s,Label as c,StackLayout as l}from"@nativescript/core";import{buildViewSwitcherButtons as u,viewSwitcherPagesFromStack as d}from"@gjsify/adwaita-core";var AdwViewSwitcherBar=class extends o{_bar;_nodes=[];_stack=null;_stackListener=null;_barState=i();constructor(){super(),this.className=`adw-viewswitcherbar`,this.addColumn(new s(1,`star`)),this.addRow(new s(1,`auto`));let e=new o;e.className=`adw-viewswitcherbar-box`,e.addRow(new s(1,`auto`)),o.setRow(e,0),this.addChild(e),this._bar=e,this._barState.subscribe(()=>this._applyRevealed()),this._applyRevealed(),this.addEventListener(`loaded`,()=>{this._bindStack(),this._rebuild()}),this.addEventListener(`unloaded`,()=>this._unbindStack())}setStack(e){this._unbindStack(),this._stack=e,this._bindStack(),this._rebuild()}get stack(){return this._stack}set stack(e){this.setStack(e)}get reveal(){return this._barState.reveal}set reveal(t){let n=e(t,this.reveal);this._barState.setReveal(n)}get revealed(){return this._barState.revealed}refresh(){this._rebuild()}_bindStack(){if(!this._stack||this._stackListener)return;let listener=()=>this._rebuild();this._stack.addEventListener(r,listener),this._stackListener=listener}_unbindStack(){!this._stack||!this._stackListener||(this._stack.removeEventListener(r,this._stackListener),this._stackListener=null)}_rebuild(){let e=this._stack?.pages??[];this._barState.setPages(e);let t=u(d(e),this._stack?.visibleChildIndex??-1,`narrow`);if(t.length!==this._nodes.length){for(let e of this._nodes)this._bar.removeChild(e.button);this._nodes=[],this._bar.removeColumns(),this._nodes=t.map((e,t)=>(this._bar.addColumn(new s(1,`star`)),this._buildButton(e.pageIndex,t)))}t.forEach((e,t)=>{let n=this._nodes[t];n&&(n.button.visibility=e.visible?`visible`:`collapse`,n.button.className=e.selected?`adw-viewswitcherbar-button active`:`adw-viewswitcherbar-button`,n.icon.iconName=a(e.iconName),n.label.text=e.label,n.badge.text=e.badgeLabel,n.badge.visibility=e.badgeLabel.length>0||e.needsAttention?`visible`:`collapse`,n.badge.className=e.badgeLabel.length===0&&e.needsAttention?`adw-viewswitcherbar-button-badge needs-attention`:`adw-viewswitcherbar-button-badge`)}),this._applyRevealed()}_buildButton(e,r){let i=new l;i.orientation=`vertical`,i.className=`adw-viewswitcherbar-button`,i.horizontalAlignment=`stretch`;let a=new t;a.className=`${a.className} adw-viewswitcherbar-button-icon`.trim(),a.horizontalAlignment=`center`,i.addChild(a);let s=new c;s.className=`adw-viewswitcherbar-button-label`,s.horizontalAlignment=`center`,s.textAlignment=`center`,i.addChild(s);let u=new c;return u.className=`adw-viewswitcherbar-button-badge`,u.horizontalAlignment=`center`,u.textAlignment=`center`,i.addChild(u),n(i),i.addEventListener(`tap`,()=>{this._stack&&(this._stack.visibleChildIndex=e)}),o.setColumn(i,r),this._bar.addChild(i),{button:i,icon:a,label:s,badge:u}}_applyRevealed(){this.visibility=this._barState.revealed?`visible`:`collapse`}};export{AdwViewSwitcherBar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{viewConcealSymbolic as e,viewRevealSymbolic as t}from"@gjsify/adwaita-icons/actions";const n=`adw-row adw-action-row adw-entry-row`,r=`${n} adw-password-entry-row`,i=`adw-icon adw-entry-edit`,a=`adw-insensitive`,o=.3;function nsVisibility(e){return e?`visible`:`collapse`}function entryRowClassName(e,t){let n=e;return t.editing&&(n+=` focused`),t.empty&&(n+=` empty`),n}function applyEntryRowState(e,t,n){e.row.className=entryRowClassName(n,t),e.field.text!==t.text&&(e.field.text=t.text),e.field.editable=t.editable,e.emptyTitle.visibility=nsVisibility(t.emptyTarget===0),e.title.visibility=nsVisibility(t.emptyTarget===1),e.editIcon.visibility=nsVisibility(t.editIconVisible),e.editIcon.className=t.editIconSensitive?i:`${i} ${a}`,e.editIcon.opacity=t.editIconSensitive?1:o,e.indicator.visibility=nsVisibility(t.indicatorVisible),e.applyButton.visibility=nsVisibility(t.applyButtonVisible)}function peekIconSvg(n){return n===`view-conceal-symbolic`?e:t}function applyPasswordEntryRowState(e,t){e.field.secure=!t.revealed,e.peekButton.
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{viewConcealSymbolic as e,viewRevealSymbolic as t}from"@gjsify/adwaita-icons/actions";const n=`adw-row adw-action-row adw-entry-row`,r=`${n} adw-password-entry-row`,i=`adw-icon adw-entry-edit`,a=`adw-insensitive`,o=.3;function nsVisibility(e){return e?`visible`:`collapse`}function entryRowClassName(e,t){let n=e;return t.editing&&(n+=` focused`),t.empty&&(n+=` empty`),n}function applyEntryRowState(e,t,n){e.row.className=entryRowClassName(n,t),e.field.text!==t.text&&(e.field.text=t.text),e.field.editable=t.editable,e.emptyTitle.visibility=nsVisibility(t.emptyTarget===0),e.title.visibility=nsVisibility(t.emptyTarget===1),e.editIcon.visibility=nsVisibility(t.editIconVisible),e.editIcon.className=t.editIconSensitive?i:`${i} ${a}`,e.editIcon.opacity=t.editIconSensitive?1:o,e.indicator.visibility=nsVisibility(t.indicatorVisible),e.applyButton.visibility=nsVisibility(t.applyButtonVisible)}function peekIconSvg(n){return n===`view-conceal-symbolic`?e:t}function applyPasswordEntryRowState(e,t){e.field.secure=!t.revealed,e.peekButton.iconName=peekIconSvg(t.peekIconName)}export{i as NS_EDIT_ICON_CLASS,n as NS_ENTRY_ROW_CLASS,a as NS_INSENSITIVE_CLASS,o as NS_INSENSITIVE_OPACITY,r as NS_PASSWORD_ENTRY_ROW_CLASS,applyEntryRowState,applyPasswordEntryRowState,entryRowClassName,nsVisibility,peekIconSvg};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{Button as e}from"@nativescript/core";import{ADW_BUTTON_STYLE_CLASSES as t,buttonStyleClass as n}from"@gjsify/adwaita-core";var
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Button as e}from"@nativescript/core";import{ADW_BUTTON_STYLE_CLASSES as t,buttonStyleClass as n}from"@gjsify/adwaita-core";var GtkButton=class extends e{_variant=`default`;constructor(){super(),this.className=`adw-button`,this.set(`androidElevation`,0)}get variant(){return this._variant}set variant(e){this._variant=e;let t=e==="default"?null:n(e);this.className=t?`adw-button ${t}`:`adw-button`}static get variantClasses(){return t}};export{GtkButton};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{AdwIcon as t}from"./adw-icon.js";import{attachRowPressFeedback as n}from"./row-press.js";import{Label as r,StackLayout as i,action as a}from"@nativescript/core";import{ComboState as o}from"@gjsify/adwaita-core";import{panDownSymbolic as s}from"@gjsify/adwaita-icons/ui";const c=`notify::selected`;var GtkDropDown=class extends i{_label;_chevron;_state=new o;_chooserTitle=``;constructor(){super(),this.orientation=`horizontal`,this.className=`adw-drop-down`;let e=new r;e.className=`adw-drop-down-label`,e.text=``;let i=new t;i.className=`adw-drop-down-chevron`,i.iconName=s,this.addChild(e),this.addChild(i),this._label=e,this._chevron=i,this._state.subscribe(e=>{if(this._label.text=e.label,e.interactive){let t={eventName:c,object:this,selected:e.selected,value:e.value,label:e.label};this.notify(t)}}),this.addEventListener(`tap`,()=>{this._openChooser()}),n(this)}async _openChooser(){if(this._state.count===0)return;let e=this._state.options.map(e=>e.label),t=await a({title:this._chooserTitle||void 0,cancelButtonText:`Cancel`,actions:e});this._state.select(e.indexOf(t))}get options(){return this._state.options}set options(e){this._state.setOptions(e)}get selected(){return this._state.selectedIndex}set selected(t){let n=e(t,this.selected);this._state.setSelectedIndex(n)}get selectedValue(){return this._state.selectedValue}set selectedValue(e){this._state.setSelectedValue(e)}get selectedItem(){return this._state.options[this._state.selectedIndex]??null}get chooserTitle(){return this._chooserTitle}set chooserTitle(e){this._chooserTitle=e??``}};export{GtkDropDown,c as NOTIFY_SELECTED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{GridLayout as n,ItemSpec as r,TextField as i}from"@nativescript/core";import{ENTRY_ROW_MAX_LENGTH_LIMIT as a,clampEntryText as o,entryTextLength as s}from"@gjsify/adwaita-core";const c=`notify::text`,l=`activate`;var
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{GridLayout as n,ItemSpec as r,TextField as i}from"@nativescript/core";import{ENTRY_ROW_MAX_LENGTH_LIMIT as a,clampEntryText as o,entryTextLength as s}from"@gjsify/adwaita-core";const c=`notify::text`,l=`activate`;var GtkEntry=class extends n{_field;_text=``;_maxLength=0;constructor(){super(),this.className=`adw-entry`,this.addColumn(new r(1,`star`)),this.addRow(new r(1,`auto`));let e=new i;e.className=`adw-entry-input`,e.set(`backgroundColor`,`transparent`),e.set(`borderWidth`,0),this.addChild(e),this._field=e,e.addEventListener(`textChange`,()=>this._applyText(this._field.text??``)),e.addEventListener(`returnPress`,()=>{let e={eventName:l,object:this};this.notify(e)})}_applyText(e){let t=o(e,this._maxLength);if(this._field.text!==t&&(this._field.text=t),t===this._text)return;this._text=t;let n={eventName:c,object:this,text:t,textLength:s(t)};this.notify(n)}get text(){return this._text}set text(e){this._applyText(e??``)}get textLength(){return s(this._text)}get maxLength(){return this._maxLength}set maxLength(e){let n=t(e,this.maxLength);this._maxLength=Number.isFinite(n)?Math.min(a,Math.max(0,Math.trunc(n))):0,this._applyText(this._text)}get placeholderText(){return this._field.hint??``}set placeholderText(e){this._field.hint=e??``}get editable(){return this._field.editable}set editable(t){let n=e(t,this.editable);this._field.editable=!!n}get field(){return this._field}};export{l as ACTIVATE,GtkEntry,c as NOTIFY_TEXT};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{AdwImageButton as e}from"./adw-image-button.js";import{action as t}from"@nativescript/core";const n=`menuItemActivated`;var
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwImageButton as e}from"./adw-image-button.js";import{action as t}from"@nativescript/core";const n=`menuItemActivated`;var GtkMenuButton=class extends e{_items=[];_menuTitle=``;constructor(){super(),this.className=`${this.className} adw-menu-button`.trim(),this.addEventListener(`tap`,()=>{this._openMenu()})}get menuItems(){return this._items}set menuItems(e){this._items=Array.isArray(e)?e:[]}get menuTitle(){return this._menuTitle}set menuTitle(e){this._menuTitle=e??``}async _openMenu(){if(this._items.length===0)return;let e=this._items.map(e=>e.label),r=await t({title:this._menuTitle||void 0,cancelButtonText:`Cancel`,actions:e}),i=e.indexOf(r);if(i<0)return;let a=this._items[i],o={eventName:n,object:this,id:a.id??a.label,label:a.label,index:i};this.notify(o)}};export{GtkMenuButton,n as MENU_ITEM_ACTIVATED};
|
package/lib/esm/widgets/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{AdwPreferencesPage as e}from"./adw-preferences-page.js";import{AdwPreferencesGroup as t}from"./adw-preferences-group.js";import{ACTIVATED as n,AdwActionRow as r}from"./adw-action-row.js";import{AdwSwitchRow as i,NOTIFY_ACTIVE as ee}from"./adw-switch-row.js";import{adwaitaColorScheme as te,isThemeIconColor as ne,onAdwaitaColorSchemeChanged as re,setAdwaitaColorScheme as ie,themeIconColor as ae,toggleAdwaitaColorScheme as oe}from"./color-scheme.js";import{ADWAITA_ICON_GRID as se,DEFAULT_ICON_COLOR as ce,DEFAULT_ICON_COLOR_DARK as le,extractIconPaths as ue,extractPathData as de}from"./icon-path.js";import{renderSymbolicIcon as a}from"./icons.js";import{AdwIcon as o,DEFAULT_ADW_ICON_SIZE as s}from"./adw-icon.js";import{attachRowPressFeedback as c}from"./row-press.js";import{AdwImageButton as l,DEFAULT_ICON_BUTTON_ICON_SIZE as fe}from"./adw-image-button.js";import{AdwEntryRow as u,NOTIFY_TEXT as pe}from"./adw-entry-row.js";import{AdwPasswordEntryRow as d}from"./adw-password-entry-row.js";import{ACTIVATE as me,AdwEntry as f,NOTIFY_TEXT as he}from"./adw-entry.js";import{AdwComboRow as p,ComboState as ge,NOTIFY_SELECTED as _e}from"./adw-combo-row.js";import{AdwDropDown as m,NOTIFY_SELECTED as ve}from"./adw-drop-down.js";import{AdwSpinRow as h,NOTIFY_VALUE as ye,SpinState as be}from"./adw-spin-row.js";import{AdwSliderRow as g,NOTIFY_SLIDER_VALUE as xe}from"./adw-slider-row.js";import{AdwExpanderRow as _,ExpanderState as Se,NOTIFY_EXPANDED as Ce}from"./adw-expander-row.js";import{AdwButton as v}from"./adw-button.js";import{AdwMenuButton as y,MENU_ITEM_ACTIVATED as we}from"./adw-menu-button.js";import{DEFAULT_CLAMP_MAX_SIZE as Te,DEFAULT_SPINNER_SIZE as Ee}from"./chrome.js";import{AdwBanner as b,BUTTON_CLICKED as x}from"./adw-banner.js";import{avatarInitials as S}from"./avatar-color.js";import{AdwAvatar as C,DEFAULT_AVATAR_SIZE as w}from"./adw-avatar.js";import{AdwWindowTitle as T}from"./adw-window-title.js";import{AdwClamp as E}from"./adw-clamp.js";import{AdwHeaderBar as D}from"./adw-header-bar.js";import{AdwToolbarView as O}from"./adw-toolbar-view.js";import{AdwWrapBox as k}from"./adw-wrap-box.js";import{DATA_GRID_HEADER_CELL_CLASS as De,DATA_GRID_HEADER_ROW_CLASS as Oe,DATA_GRID_SECTION_CELL_CLASS as ke,dataGridCellClass as Ae,dataGridItemSpec as je,dataGridRowClass as Me,dataGridShapeKey as Ne,dataGridTracksKey as Pe,parseDataGridWidth as Fe}from"./data-grid-model.js";import{AdwDataGrid as A,ROW_ACTIVATED as Ie}from"./adw-data-grid.js";import{AdwSpinner as j}from"./adw-spinner.js";import{AdwStatusPage as M}from"./adw-status-page.js";import{AdwButtonRow as N}from"./adw-button-row.js";import{AdwButtonContent as P}from"./adw-button-content.js";import{AdwSplitButton as F,CLICKED as Le,MENU_TAPPED as Re}from"./adw-split-button.js";import{AdwToggleGroup as I,NOTIFY_SELECTED as ze,ToggleGroupState as Be}from"./adw-toggle-group.js";import{ADWAITA_NS_ACCENT_RULES as Ve,adwaitaNsAccentColor as He,adwaitaNsAccentCss as Ue}from"./accent-theme.js";import{applyAdwaitaNsAccent as We,clearAdwaitaNsAccent as Ge}from"./adw-accent.js";import{SHORTCUT_LABEL_CAP_TEXT_CLASS as Ke,SHORTCUT_LABEL_CLASS as qe,SHORTCUT_LABEL_DIMMED_CLASS as Je,SHORTCUT_LABEL_DISABLED_CLASS as Ye,SHORTCUT_LABEL_KEYCAP_CLASS as Xe,SHORTCUT_LABEL_KEYS_CLASS as L,SHORTCUT_LABEL_SIDE_CLASS as Ze,SHORTCUT_LABEL_SPACED_CLASS as Qe,shortcutLabelDirection as $e,shortcutLabelPlatform as et,shortcutLabelRenderPlan as tt}from"./shortcut-label.js";import{AdwShortcutLabel as R}from"./adw-shortcut-label.js";import{AdwViewStack as z,NOTIFY_VISIBLE_CHILD as nt}from"./adw-view-stack.js";import{AdwViewSwitcherBase as rt,NOTIFY_SELECTED as it}from"./view-switcher-base.js";import{AdwViewSwitcher as B}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as V}from"./adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as H}from"./adw-inline-view-switcher.js";import{applyTabViewVisibility as at,createTabViewState as ot,tabBarVisibility as st,tabCloseVisibilities as ct,tabLabelText as lt,tabPageVisibilities as ut,tabTooltipText as dt,tabViewNotifyPayload as ft}from"./tab-view-state.js";import{AdwTabView as U,CLOSE_PAGE as pt,NOTIFY_SELECTED_PAGE as mt,PAGES_CHANGED as ht}from"./adw-tab-view.js";import{CarouselScrollSync as gt,DEFAULT_CAROUSEL_PAGE_WIDTH as _t,applyCarouselDots as vt,carouselDotClasses as yt,carouselNotifyPayload as bt,carouselPositionAtOffset as xt,carouselScrollOffset as St,createCarouselState as Ct,normalizeCarouselPageWidth as wt}from"./carousel-state.js";import{AdwCarousel as W,NOTIFY_N_PAGES as Tt,NOTIFY_POSITION as Et,PAGE_CHANGED as Dt}from"./adw-carousel.js";import{NOTIFY_VISIBLE_PAGE as Ot}from"./navigation-stack.js";import{AdwNavigationView as G}from"./adw-navigation-view.js";import{NsNavigationSplitViewState as kt,NsOverlaySplitViewState as At,splitViewColumns as jt}from"./split-view-state.js";import{AdwSplitViewBase as Mt,NOTIFY_SHOW_SIDEBAR as Nt}from"./split-view-base.js";import{AdwNavigationSplitView as K}from"./adw-navigation-split-view.js";import{AdwOverlaySplitView as q}from"./adw-overlay-split-view.js";import{AdwSidebar as J,NOTIFY_SELECTED as Pt}from"./adw-sidebar.js";import{CLOSE_ATTEMPT as Ft,NOTIFY_OPEN as It,SHEET_CLOSE as Lt}from"./bottom-sheet-state.js";import{AdwBottomSheet as Y}from"./adw-bottom-sheet.js";import{AdwToast as Rt,AdwToastOverlay as X,AdwToastQueue as zt,DEFAULT_TOAST_TIMEOUT as Bt,TOAST_BUTTON_CLICKED as Vt}from"./adw-toast-overlay.js";import{AdwAlertDialog as Ht,AdwAlertResponses as Ut,NOTIFY_RESPONSE as Wt}from"./adw-alert-dialog.js";import{AdwAboutDialog as Z,CLOSED as Gt}from"./adw-about-dialog.js";import{AdwPreferencesDialog as Q,CLOSED as Kt}from"./adw-preferences-dialog.js";import{AdwBreakpoint as qt,addBreakpoints as Jt,evaluateBreakpointCondition as Yt,parseBreakpointCondition as Xt}from"./breakpoint.js";const Zt={AdwPreferencesPage:e,AdwPreferencesGroup:t,AdwActionRow:r,AdwSwitchRow:i,AdwEntryRow:u,AdwPasswordEntryRow:d,AdwEntry:f,AdwComboRow:p,AdwDropDown:m,AdwSpinRow:h,AdwSliderRow:g,AdwExpanderRow:_,AdwButton:v,AdwImageButton:l,AdwMenuButton:y,AdwIcon:o,AdwBanner:b,AdwAvatar:C,AdwWindowTitle:T,AdwClamp:E,AdwHeaderBar:D,AdwToolbarView:O,AdwWrapBox:k,AdwDataGrid:A,AdwSpinner:j,AdwStatusPage:M,AdwButtonRow:N,AdwButtonContent:P,AdwSplitButton:F,AdwToggleGroup:I,AdwShortcutLabel:R,AdwViewStack:z,AdwViewSwitcher:B,AdwViewSwitcherBar:V,AdwInlineViewSwitcher:H,AdwTabView:U,AdwCarousel:W,AdwNavigationView:G,AdwNavigationSplitView:K,AdwOverlaySplitView:q,AdwSidebar:J,AdwBottomSheet:Y,AdwToastOverlay:X,AdwAboutDialog:Z,AdwPreferencesDialog:Q};let $=!1;function registerAdwaitaElements(){if(!$&&typeof registerElement==`function`){for(let[e,t]of Object.entries(Zt))registerElement(e,()=>t);$=!0}}export{Gt as ABOUT_CLOSED,n as ACTIVATED,se as ADWAITA_ICON_GRID,Ve as ADWAITA_NS_ACCENT_RULES,Z as AdwAboutDialog,r as AdwActionRow,Ht as AdwAlertDialog,Ut as AdwAlertResponses,C as AdwAvatar,b as AdwBanner,Y as AdwBottomSheet,qt as AdwBreakpoint,v as AdwButton,P as AdwButtonContent,N as AdwButtonRow,W as AdwCarousel,E as AdwClamp,p as AdwComboRow,A as AdwDataGrid,m as AdwDropDown,f as AdwEntry,u as AdwEntryRow,_ as AdwExpanderRow,D as AdwHeaderBar,o as AdwIcon,l as AdwImageButton,H as AdwInlineViewSwitcher,y as AdwMenuButton,K as AdwNavigationSplitView,G as AdwNavigationView,q as AdwOverlaySplitView,d as AdwPasswordEntryRow,Q as AdwPreferencesDialog,t as AdwPreferencesGroup,e as AdwPreferencesPage,R as AdwShortcutLabel,J as AdwSidebar,g as AdwSliderRow,h as AdwSpinRow,j as AdwSpinner,F as AdwSplitButton,Mt as AdwSplitViewBase,M as AdwStatusPage,i as AdwSwitchRow,U as AdwTabView,Rt as AdwToast,X as AdwToastOverlay,zt as AdwToastQueue,I as AdwToggleGroup,O as AdwToolbarView,z as AdwViewStack,B as AdwViewSwitcher,V as AdwViewSwitcherBar,rt as AdwViewSwitcherBase,T as AdwWindowTitle,k as AdwWrapBox,x as BUTTON_CLICKED,Le as CLICKED,Ft as CLOSE_ATTEMPT,pt as CLOSE_PAGE,gt as CarouselScrollSync,ge as ComboState,De as DATA_GRID_HEADER_CELL_CLASS,Oe as DATA_GRID_HEADER_ROW_CLASS,ke as DATA_GRID_SECTION_CELL_CLASS,s as DEFAULT_ADW_ICON_SIZE,w as DEFAULT_AVATAR_SIZE,_t as DEFAULT_CAROUSEL_PAGE_WIDTH,Te as DEFAULT_CLAMP_MAX_SIZE,fe as DEFAULT_ICON_BUTTON_ICON_SIZE,ce as DEFAULT_ICON_COLOR,le as DEFAULT_ICON_COLOR_DARK,Ee as DEFAULT_SPINNER_SIZE,Bt as DEFAULT_TOAST_TIMEOUT,me as ENTRY_ACTIVATE,Se as ExpanderState,we as MENU_ITEM_ACTIVATED,Re as MENU_TAPPED,ee as NOTIFY_ACTIVE,ve as NOTIFY_DROP_DOWN_SELECTED,he as NOTIFY_ENTRY_TEXT,Ce as NOTIFY_EXPANDED,Tt as NOTIFY_N_PAGES,It as NOTIFY_OPEN,Et as NOTIFY_POSITION,Wt as NOTIFY_RESPONSE,_e as NOTIFY_SELECTED,mt as NOTIFY_SELECTED_PAGE,Nt as NOTIFY_SHOW_SIDEBAR,Pt as NOTIFY_SIDEBAR_SELECTED,xe as NOTIFY_SLIDER_VALUE,pe as NOTIFY_TEXT,ze as NOTIFY_TOGGLE_SELECTED,ye as NOTIFY_VALUE,it as NOTIFY_VIEW_SELECTED,nt as NOTIFY_VISIBLE_CHILD,Ot as NOTIFY_VISIBLE_PAGE,kt as NsNavigationSplitViewState,At as NsOverlaySplitViewState,ht as PAGES_CHANGED,Dt as PAGE_CHANGED,Kt as PREFERENCES_CLOSED,Ie as ROW_ACTIVATED,Lt as SHEET_CLOSE,Ke as SHORTCUT_LABEL_CAP_TEXT_CLASS,qe as SHORTCUT_LABEL_CLASS,Je as SHORTCUT_LABEL_DIMMED_CLASS,Ye as SHORTCUT_LABEL_DISABLED_CLASS,Xe as SHORTCUT_LABEL_KEYCAP_CLASS,L as SHORTCUT_LABEL_KEYS_CLASS,Ze as SHORTCUT_LABEL_SIDE_CLASS,Qe as SHORTCUT_LABEL_SPACED_CLASS,be as SpinState,Vt as TOAST_BUTTON_CLICKED,Be as ToggleGroupState,Jt as addBreakpoints,te as adwaitaColorScheme,He as adwaitaNsAccentColor,Ue as adwaitaNsAccentCss,We as applyAdwaitaNsAccent,vt as applyCarouselDots,at as applyTabViewVisibility,c as attachRowPressFeedback,S as avatarInitials,yt as carouselDotClasses,bt as carouselNotifyPayload,xt as carouselPositionAtOffset,St as carouselScrollOffset,Ge as clearAdwaitaNsAccent,Ct as createCarouselState,ot as createTabViewState,Ae as dataGridCellClass,je as dataGridItemSpec,Me as dataGridRowClass,Ne as dataGridShapeKey,Pe as dataGridTracksKey,Yt as evaluateBreakpointCondition,ue as extractIconPaths,de as extractPathData,ne as isThemeIconColor,wt as normalizeCarouselPageWidth,re as onAdwaitaColorSchemeChanged,Xt as parseBreakpointCondition,Fe as parseDataGridWidth,registerAdwaitaElements,a as renderSymbolicIcon,ie as setAdwaitaColorScheme,$e as shortcutLabelDirection,et as shortcutLabelPlatform,tt as shortcutLabelRenderPlan,jt as splitViewColumns,st as tabBarVisibility,ct as tabCloseVisibilities,lt as tabLabelText,ut as tabPageVisibilities,dt as tabTooltipText,ft as tabViewNotifyPayload,ae as themeIconColor,oe as toggleAdwaitaColorScheme};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwPreferencesPage as e}from"./adw-preferences-page.js";import{AdwPreferencesGroup as t}from"./adw-preferences-group.js";import{ACTIVATED as n,AdwActionRow as r}from"./adw-action-row.js";import{AdwSwitchRow as i,NOTIFY_ACTIVE as ee}from"./adw-switch-row.js";import{adwaitaColorScheme as te,isThemeIconColor as ne,onAdwaitaColorSchemeChanged as re,setAdwaitaColorScheme as ie,themeIconColor as ae,toggleAdwaitaColorScheme as oe}from"./color-scheme.js";import{ADWAITA_ICON_GRID as se,DEFAULT_ICON_COLOR as ce,DEFAULT_ICON_COLOR_DARK as le,extractIconPaths as ue,extractPathData as de}from"./icon-path.js";import{renderSymbolicIcon as a}from"./icons.js";import{AdwIcon as o,DEFAULT_ADW_ICON_SIZE as s}from"./adw-icon.js";import{attachRowPressFeedback as c}from"./row-press.js";import{AdwImageButton as l,DEFAULT_ICON_BUTTON_ICON_SIZE as fe}from"./adw-image-button.js";import{AdwEntryRow as u,NOTIFY_TEXT as pe}from"./adw-entry-row.js";import{AdwPasswordEntryRow as d}from"./adw-password-entry-row.js";import{ACTIVATE as me,GtkEntry as f,NOTIFY_TEXT as he}from"./gtk-entry.js";import{AdwComboRow as p,ComboState as ge,NOTIFY_SELECTED as _e}from"./adw-combo-row.js";import{GtkDropDown as m,NOTIFY_SELECTED as ve}from"./gtk-drop-down.js";import{AdwSpinRow as h,NOTIFY_VALUE as ye,SpinState as be}from"./adw-spin-row.js";import{AdwSliderRow as g,NOTIFY_SLIDER_VALUE as xe}from"./adw-slider-row.js";import{AdwExpanderRow as _,ExpanderState as Se,NOTIFY_EXPANDED as Ce}from"./adw-expander-row.js";import{GtkButton as v}from"./gtk-button.js";import{GtkMenuButton as y,MENU_ITEM_ACTIVATED as we}from"./gtk-menu-button.js";import{DEFAULT_CLAMP_MAX_SIZE as Te,DEFAULT_SPINNER_SIZE as Ee}from"./chrome.js";import{AdwBanner as b,BUTTON_CLICKED as x}from"./adw-banner.js";import{avatarInitials as S}from"./avatar-color.js";import{AdwAvatar as C,DEFAULT_AVATAR_SIZE as w}from"./adw-avatar.js";import{AdwWindowTitle as T}from"./adw-window-title.js";import{AdwClamp as E}from"./adw-clamp.js";import{AdwHeaderBar as D}from"./adw-header-bar.js";import{AdwToolbarView as O}from"./adw-toolbar-view.js";import{AdwWrapBox as k}from"./adw-wrap-box.js";import{DATA_GRID_HEADER_CELL_CLASS as De,DATA_GRID_HEADER_ROW_CLASS as Oe,DATA_GRID_SECTION_CELL_CLASS as ke,dataGridCellClass as Ae,dataGridItemSpec as je,dataGridRowClass as Me,dataGridShapeKey as Ne,dataGridTracksKey as Pe,parseDataGridWidth as Fe}from"./data-grid-model.js";import{AdwDataGrid as A,ROW_ACTIVATED as Ie}from"./adw-data-grid.js";import{AdwSpinner as j}from"./adw-spinner.js";import{AdwStatusPage as M}from"./adw-status-page.js";import{AdwButtonRow as N}from"./adw-button-row.js";import{AdwButtonContent as P}from"./adw-button-content.js";import{AdwSplitButton as F,CLICKED as Le,MENU_TAPPED as Re}from"./adw-split-button.js";import{AdwToggleGroup as I,NOTIFY_SELECTED as ze,ToggleGroupState as Be}from"./adw-toggle-group.js";import{ADWAITA_NS_ACCENT_RULES as Ve,adwaitaNsAccentColor as He,adwaitaNsAccentCss as Ue}from"./accent-theme.js";import{applyAdwaitaNsAccent as We,clearAdwaitaNsAccent as Ge}from"./adw-accent.js";import{SHORTCUT_LABEL_CAP_TEXT_CLASS as Ke,SHORTCUT_LABEL_CLASS as qe,SHORTCUT_LABEL_DIMMED_CLASS as Je,SHORTCUT_LABEL_DISABLED_CLASS as Ye,SHORTCUT_LABEL_KEYCAP_CLASS as Xe,SHORTCUT_LABEL_KEYS_CLASS as L,SHORTCUT_LABEL_SIDE_CLASS as Ze,SHORTCUT_LABEL_SPACED_CLASS as Qe,shortcutLabelDirection as $e,shortcutLabelPlatform as et,shortcutLabelRenderPlan as tt}from"./shortcut-label.js";import{AdwShortcutLabel as R}from"./adw-shortcut-label.js";import{AdwViewStack as z,NOTIFY_VISIBLE_CHILD as nt}from"./adw-view-stack.js";import{AdwViewSwitcherBase as rt,NOTIFY_SELECTED as it}from"./view-switcher-base.js";import{AdwViewSwitcher as B}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as V}from"./adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as H}from"./adw-inline-view-switcher.js";import{applyTabViewVisibility as at,createTabViewState as ot,tabBarVisibility as st,tabCloseVisibilities as ct,tabLabelText as lt,tabPageVisibilities as ut,tabTooltipText as dt,tabViewNotifyPayload as ft}from"./tab-view-state.js";import{AdwTabView as U,CLOSE_PAGE as pt,NOTIFY_SELECTED_PAGE as mt,PAGES_CHANGED as ht}from"./adw-tab-view.js";import{CarouselScrollSync as gt,DEFAULT_CAROUSEL_PAGE_WIDTH as _t,applyCarouselDots as vt,carouselDotClasses as yt,carouselNotifyPayload as bt,carouselPositionAtOffset as xt,carouselScrollOffset as St,createCarouselState as Ct,normalizeCarouselPageWidth as wt}from"./carousel-state.js";import{AdwCarousel as W,NOTIFY_N_PAGES as Tt,NOTIFY_POSITION as Et,PAGE_CHANGED as Dt}from"./adw-carousel.js";import{NOTIFY_VISIBLE_PAGE as Ot}from"./navigation-stack.js";import{AdwNavigationView as G}from"./adw-navigation-view.js";import{NsNavigationSplitViewState as kt,NsOverlaySplitViewState as At,splitViewColumns as jt}from"./split-view-state.js";import{AdwSplitViewBase as Mt,NOTIFY_SHOW_SIDEBAR as Nt}from"./split-view-base.js";import{AdwNavigationSplitView as K}from"./adw-navigation-split-view.js";import{AdwOverlaySplitView as q}from"./adw-overlay-split-view.js";import{AdwSidebar as J,NOTIFY_SELECTED as Pt}from"./adw-sidebar.js";import{CLOSE_ATTEMPT as Ft,NOTIFY_OPEN as It,SHEET_CLOSE as Lt}from"./bottom-sheet-state.js";import{AdwBottomSheet as Y}from"./adw-bottom-sheet.js";import{AdwToast as Rt,AdwToastOverlay as X,AdwToastQueue as zt,DEFAULT_TOAST_TIMEOUT as Bt,TOAST_BUTTON_CLICKED as Vt}from"./adw-toast-overlay.js";import{AdwAlertDialog as Ht,AdwAlertResponses as Ut,NOTIFY_RESPONSE as Wt}from"./adw-alert-dialog.js";import{AdwAboutDialog as Z,CLOSED as Gt}from"./adw-about-dialog.js";import{AdwPreferencesDialog as Q,CLOSED as Kt}from"./adw-preferences-dialog.js";import{AdwBreakpoint as qt,addBreakpoints as Jt,evaluateBreakpointCondition as Yt,parseBreakpointCondition as Xt}from"./breakpoint.js";const Zt={AdwPreferencesPage:e,AdwPreferencesGroup:t,AdwActionRow:r,AdwSwitchRow:i,AdwEntryRow:u,AdwPasswordEntryRow:d,GtkEntry:f,AdwComboRow:p,GtkDropDown:m,AdwSpinRow:h,AdwSliderRow:g,AdwExpanderRow:_,GtkButton:v,AdwImageButton:l,GtkMenuButton:y,AdwIcon:o,AdwBanner:b,AdwAvatar:C,AdwWindowTitle:T,AdwClamp:E,AdwHeaderBar:D,AdwToolbarView:O,AdwWrapBox:k,AdwDataGrid:A,AdwSpinner:j,AdwStatusPage:M,AdwButtonRow:N,AdwButtonContent:P,AdwSplitButton:F,AdwToggleGroup:I,AdwShortcutLabel:R,AdwViewStack:z,AdwViewSwitcher:B,AdwViewSwitcherBar:V,AdwInlineViewSwitcher:H,AdwTabView:U,AdwCarousel:W,AdwNavigationView:G,AdwNavigationSplitView:K,AdwOverlaySplitView:q,AdwSidebar:J,AdwBottomSheet:Y,AdwToastOverlay:X,AdwAboutDialog:Z,AdwPreferencesDialog:Q};let $=!1;function registerAdwaitaElements(){if(!$&&typeof registerElement==`function`){for(let[e,t]of Object.entries(Zt))registerElement(e,()=>t);$=!0}}export{Gt as ABOUT_CLOSED,n as ACTIVATED,se as ADWAITA_ICON_GRID,Ve as ADWAITA_NS_ACCENT_RULES,Z as AdwAboutDialog,r as AdwActionRow,Ht as AdwAlertDialog,Ut as AdwAlertResponses,C as AdwAvatar,b as AdwBanner,Y as AdwBottomSheet,qt as AdwBreakpoint,P as AdwButtonContent,N as AdwButtonRow,W as AdwCarousel,E as AdwClamp,p as AdwComboRow,A as AdwDataGrid,u as AdwEntryRow,_ as AdwExpanderRow,D as AdwHeaderBar,o as AdwIcon,l as AdwImageButton,H as AdwInlineViewSwitcher,K as AdwNavigationSplitView,G as AdwNavigationView,q as AdwOverlaySplitView,d as AdwPasswordEntryRow,Q as AdwPreferencesDialog,t as AdwPreferencesGroup,e as AdwPreferencesPage,R as AdwShortcutLabel,J as AdwSidebar,g as AdwSliderRow,h as AdwSpinRow,j as AdwSpinner,F as AdwSplitButton,Mt as AdwSplitViewBase,M as AdwStatusPage,i as AdwSwitchRow,U as AdwTabView,Rt as AdwToast,X as AdwToastOverlay,zt as AdwToastQueue,I as AdwToggleGroup,O as AdwToolbarView,z as AdwViewStack,B as AdwViewSwitcher,V as AdwViewSwitcherBar,rt as AdwViewSwitcherBase,T as AdwWindowTitle,k as AdwWrapBox,x as BUTTON_CLICKED,Le as CLICKED,Ft as CLOSE_ATTEMPT,pt as CLOSE_PAGE,gt as CarouselScrollSync,ge as ComboState,De as DATA_GRID_HEADER_CELL_CLASS,Oe as DATA_GRID_HEADER_ROW_CLASS,ke as DATA_GRID_SECTION_CELL_CLASS,s as DEFAULT_ADW_ICON_SIZE,w as DEFAULT_AVATAR_SIZE,_t as DEFAULT_CAROUSEL_PAGE_WIDTH,Te as DEFAULT_CLAMP_MAX_SIZE,fe as DEFAULT_ICON_BUTTON_ICON_SIZE,ce as DEFAULT_ICON_COLOR,le as DEFAULT_ICON_COLOR_DARK,Ee as DEFAULT_SPINNER_SIZE,Bt as DEFAULT_TOAST_TIMEOUT,me as ENTRY_ACTIVATE,Se as ExpanderState,v as GtkButton,m as GtkDropDown,f as GtkEntry,y as GtkMenuButton,we as MENU_ITEM_ACTIVATED,Re as MENU_TAPPED,ee as NOTIFY_ACTIVE,ve as NOTIFY_DROP_DOWN_SELECTED,he as NOTIFY_ENTRY_TEXT,Ce as NOTIFY_EXPANDED,Tt as NOTIFY_N_PAGES,It as NOTIFY_OPEN,Et as NOTIFY_POSITION,Wt as NOTIFY_RESPONSE,_e as NOTIFY_SELECTED,mt as NOTIFY_SELECTED_PAGE,Nt as NOTIFY_SHOW_SIDEBAR,Pt as NOTIFY_SIDEBAR_SELECTED,xe as NOTIFY_SLIDER_VALUE,pe as NOTIFY_TEXT,ze as NOTIFY_TOGGLE_SELECTED,ye as NOTIFY_VALUE,it as NOTIFY_VIEW_SELECTED,nt as NOTIFY_VISIBLE_CHILD,Ot as NOTIFY_VISIBLE_PAGE,kt as NsNavigationSplitViewState,At as NsOverlaySplitViewState,ht as PAGES_CHANGED,Dt as PAGE_CHANGED,Kt as PREFERENCES_CLOSED,Ie as ROW_ACTIVATED,Lt as SHEET_CLOSE,Ke as SHORTCUT_LABEL_CAP_TEXT_CLASS,qe as SHORTCUT_LABEL_CLASS,Je as SHORTCUT_LABEL_DIMMED_CLASS,Ye as SHORTCUT_LABEL_DISABLED_CLASS,Xe as SHORTCUT_LABEL_KEYCAP_CLASS,L as SHORTCUT_LABEL_KEYS_CLASS,Ze as SHORTCUT_LABEL_SIDE_CLASS,Qe as SHORTCUT_LABEL_SPACED_CLASS,be as SpinState,Vt as TOAST_BUTTON_CLICKED,Be as ToggleGroupState,Jt as addBreakpoints,te as adwaitaColorScheme,He as adwaitaNsAccentColor,Ue as adwaitaNsAccentCss,We as applyAdwaitaNsAccent,vt as applyCarouselDots,at as applyTabViewVisibility,c as attachRowPressFeedback,S as avatarInitials,yt as carouselDotClasses,bt as carouselNotifyPayload,xt as carouselPositionAtOffset,St as carouselScrollOffset,Ge as clearAdwaitaNsAccent,Ct as createCarouselState,ot as createTabViewState,Ae as dataGridCellClass,je as dataGridItemSpec,Me as dataGridRowClass,Ne as dataGridShapeKey,Pe as dataGridTracksKey,Yt as evaluateBreakpointCondition,ue as extractIconPaths,de as extractPathData,ne as isThemeIconColor,wt as normalizeCarouselPageWidth,re as onAdwaitaColorSchemeChanged,Xt as parseBreakpointCondition,Fe as parseDataGridWidth,registerAdwaitaElements,a as renderSymbolicIcon,ie as setAdwaitaColorScheme,$e as shortcutLabelDirection,et as shortcutLabelPlatform,tt as shortcutLabelRenderPlan,jt as splitViewColumns,st as tabBarVisibility,ct as tabCloseVisibilities,lt as tabLabelText,ut as tabPageVisibilities,dt as tabTooltipText,ft as tabViewNotifyPayload,ae as themeIconColor,oe as toggleAdwaitaColorScheme};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{AdwIcon as t}from"./adw-icon.js";import{attachRowPressFeedback as n}from"./row-press.js";import{applyViewSwitcherVisibility as r,createViewSwitcherState as i,nsIconSvg as a,switcherButtonVisible as o,viewSwitcherNotifyPayload as s,viewSwitcherPageSpecs as c}from"./view-switcher-model.js";import{GridLayout as l,ItemSpec as u,Label as d,StackLayout as f}from"@nativescript/core";import{buildViewSwitcherButtons as p}from"@gjsify/adwaita-core";const m=`notify::selected`;var AdwViewSwitcherBase=class extends l{_bar;_policy=`narrow`;_contentArea;_pages=[];_state=i();_nodes=[];get policy(){return this._policy}get switcherPolicy(){return this._policy}set switcherPolicy(e){let t=e===`wide`?`wide`:`narrow`;t!==this._policy&&(this._policy=t,this._applySelection(),this.notify({eventName:`notify::policy`,object:this}))}get buttonDisplayMode(){return`both`}constructor(e){super(),this.className=e,this.addColumn(new u(1,`star`)),this.addRow(new u(1,`auto`)),this.addRow(new u(1,`star`));let t=new l;t.horizontalAlignment=`stretch`,t.addRow(new u(1,`auto`)),l.setRow(t,0),this.addChild(t),this._bar=t;let n=new l;n.addColumn(new u(1,`star`)),n.addRow(new u(1,`star`)),l.setRow(n,1),this.addChild(n),this._contentArea=n,this._state.subscribe(e=>{this._applySelection();let t={eventName:m,object:this,...s(e)};this.notify(t)})}_initClasses(){this._bar.className=this.barClass}setViews(e){for(let e of this._nodes)this._bar.removeChild(e.button);this._nodes=[],this._bar.removeColumns();for(let e of this._pages)this._contentArea.removeChild(e.content);this._pages.length=0,this._pages.push(...e);for(let[e,t]of this._pages.entries())this._nodes.push(this._buildButton(e)),l.setColumn(t.content,0),l.setRow(t.content,0),this._contentArea.addChild(t.content);this._state.setPages(c(this._pages)),this._applySelection()}_buildButton(e){let r=new f;r.orientation=`horizontal`,r.className=this.buttonClass,r.horizontalAlignment=`center`;let i=new t;i.className=`${i.className} ${this.buttonClass}-icon`.trim(),i.verticalAlignment=`middle`,r.addChild(i);let a=new d;a.className=`${this.buttonClass}-label`,a.verticalAlignment=`middle`,r.addChild(a);let o=new d;return o.className=`${this.buttonClass}-badge`,o.verticalAlignment=`middle`,r.addChild(o),n(r),r.addEventListener(`tap`,()=>{this._state.setSelected(e)}),this._bar.addColumn(new u(1,`star`)),l.setColumn(r,e),l.setRow(r,0),this._bar.addChild(r),{button:r,icon:i,label:a,badge:o}}get switcherKind(){return`switcher`}_applySelection(){r(this._pages,this._state.selected);let e=this.buttonDisplayMode!==`labels`,t=this.buttonDisplayMode!==`icons`;p(this._state.pages,this._state.selected,this.policy).forEach((n,r)=>{let i=this._nodes[r];if(!i)return;let s=this._state.pages[r]?.visible??!1;i.button.visibility=o(this.switcherKind,n.visible,s)?`visible`:`collapse`,i.button.orientation=n.orientation===`horizontal`?`horizontal`:`vertical`,i.button.className=n.selected?`${this.buttonClass} active`:this.buttonClass,i.icon.
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{AdwIcon as t}from"./adw-icon.js";import{attachRowPressFeedback as n}from"./row-press.js";import{applyViewSwitcherVisibility as r,createViewSwitcherState as i,nsIconSvg as a,switcherButtonVisible as o,viewSwitcherNotifyPayload as s,viewSwitcherPageSpecs as c}from"./view-switcher-model.js";import{GridLayout as l,ItemSpec as u,Label as d,StackLayout as f}from"@nativescript/core";import{buildViewSwitcherButtons as p}from"@gjsify/adwaita-core";const m=`notify::selected`;var AdwViewSwitcherBase=class extends l{_bar;_policy=`narrow`;_contentArea;_pages=[];_state=i();_nodes=[];get policy(){return this._policy}get switcherPolicy(){return this._policy}set switcherPolicy(e){let t=e===`wide`?`wide`:`narrow`;t!==this._policy&&(this._policy=t,this._applySelection(),this.notify({eventName:`notify::policy`,object:this}))}get buttonDisplayMode(){return`both`}constructor(e){super(),this.className=e,this.addColumn(new u(1,`star`)),this.addRow(new u(1,`auto`)),this.addRow(new u(1,`star`));let t=new l;t.horizontalAlignment=`stretch`,t.addRow(new u(1,`auto`)),l.setRow(t,0),this.addChild(t),this._bar=t;let n=new l;n.addColumn(new u(1,`star`)),n.addRow(new u(1,`star`)),l.setRow(n,1),this.addChild(n),this._contentArea=n,this._state.subscribe(e=>{this._applySelection();let t={eventName:m,object:this,...s(e)};this.notify(t)})}_initClasses(){this._bar.className=this.barClass}setViews(e){for(let e of this._nodes)this._bar.removeChild(e.button);this._nodes=[],this._bar.removeColumns();for(let e of this._pages)this._contentArea.removeChild(e.content);this._pages.length=0,this._pages.push(...e);for(let[e,t]of this._pages.entries())this._nodes.push(this._buildButton(e)),l.setColumn(t.content,0),l.setRow(t.content,0),this._contentArea.addChild(t.content);this._state.setPages(c(this._pages)),this._applySelection()}_buildButton(e){let r=new f;r.orientation=`horizontal`,r.className=this.buttonClass,r.horizontalAlignment=`center`;let i=new t;i.className=`${i.className} ${this.buttonClass}-icon`.trim(),i.verticalAlignment=`middle`,r.addChild(i);let a=new d;a.className=`${this.buttonClass}-label`,a.verticalAlignment=`middle`,r.addChild(a);let o=new d;return o.className=`${this.buttonClass}-badge`,o.verticalAlignment=`middle`,r.addChild(o),n(r),r.addEventListener(`tap`,()=>{this._state.setSelected(e)}),this._bar.addColumn(new u(1,`star`)),l.setColumn(r,e),l.setRow(r,0),this._bar.addChild(r),{button:r,icon:i,label:a,badge:o}}get switcherKind(){return`switcher`}_applySelection(){r(this._pages,this._state.selected);let e=this.buttonDisplayMode!==`labels`,t=this.buttonDisplayMode!==`icons`;p(this._state.pages,this._state.selected,this.policy).forEach((n,r)=>{let i=this._nodes[r];if(!i)return;let s=this._state.pages[r]?.visible??!1;i.button.visibility=o(this.switcherKind,n.visible,s)?`visible`:`collapse`,i.button.orientation=n.orientation===`horizontal`?`horizontal`:`vertical`,i.button.className=n.selected?`${this.buttonClass} active`:this.buttonClass,i.icon.iconName=a(n.iconName),i.icon.visibility=e?`visible`:`collapse`,i.label.text=n.label,i.label.visibility=t?`visible`:`collapse`,i.badge.text=n.badgeLabel,i.badge.visibility=n.badgeLabel.length>0||n.needsAttention?`visible`:`collapse`,n.badgeLabel.length===0&&n.needsAttention?i.badge.className=`${this.buttonClass}-badge needs-attention`:i.badge.className=`${this.buttonClass}-badge`,i.button.accessibilityLabel=n.description||n.label})}get views(){return this._pages}set views(e){this.setViews(Array.isArray(e)?e:[])}get selected(){return this._state.selected}set selected(t){let n=e(t,this.selected);this._state.setSelected(n)}get selectedName(){return this._state.selectedName}setPageVisible(e,t){let n=this._state.setPageVisible(e,t);return this._applySelection(),n}};export{AdwViewSwitcherBase,m as NOTIFY_SELECTED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{ADW_WRAP_BOX_DEFAULT_SPACING as e,normalizeWrapBoxSpacing as t,
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{ADW_WRAP_BOX_DEFAULT_SPACING as e,normalizeWrapBoxSpacing as t,wrapBoxChildFlex as n,wrapBoxFlexStyle as r}from"@gjsify/adwaita-core";const i=e;function wrapBoxSpacingChanges(e,n){return t(n)!==t(e)}function wrapBoxChildMargin(e,n){let r=t(e)/2,i=t(n)/2;return`${i} ${r} ${i} ${r}`}export{i as DEFAULT_WRAP_BOX_SPACING,t as normalizeWrapBoxSpacing,n as wrapBoxChildFlex,wrapBoxChildMargin,r as wrapBoxFlexStyle,wrapBoxSpacingChanges};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { assertNativeScript, isNativeScript, isAndroid, isIOS } from '@gjsify/native-platform';
|
|
2
|
-
export { AdwPreferencesPage, AdwPreferencesGroup, AdwActionRow, AdwSwitchRow, NOTIFY_ACTIVE, AdwEntryRow, NOTIFY_TEXT, AdwPasswordEntryRow,
|
|
2
|
+
export { AdwPreferencesPage, AdwPreferencesGroup, AdwActionRow, AdwSwitchRow, NOTIFY_ACTIVE, AdwEntryRow, NOTIFY_TEXT, AdwPasswordEntryRow, GtkEntry, ENTRY_ACTIVATE, NOTIFY_ENTRY_TEXT, AdwComboRow, ComboState, NOTIFY_SELECTED, GtkDropDown, NOTIFY_DROP_DOWN_SELECTED, AdwSpinRow, SpinState, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, AdwExpanderRow, ExpanderState, NOTIFY_EXPANDED, GtkButton, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, GtkMenuButton, MENU_ITEM_ACTIVATED, AdwIcon, DEFAULT_ADW_ICON_SIZE, AdwBanner, BUTTON_CLICKED, AdwAvatar, DEFAULT_AVATAR_SIZE, avatarInitials, AdwWindowTitle, AdwClamp, DEFAULT_CLAMP_MAX_SIZE, AdwHeaderBar, AdwToolbarView, AdwWrapBox, AdwDataGrid, ROW_ACTIVATED, dataGridCellClass, dataGridItemSpec, dataGridRowClass, dataGridShapeKey, dataGridTracksKey, parseDataGridWidth, DATA_GRID_HEADER_CELL_CLASS, DATA_GRID_HEADER_ROW_CLASS, DATA_GRID_SECTION_CELL_CLASS, AdwSpinner, DEFAULT_SPINNER_SIZE, AdwStatusPage, AdwButtonRow, ACTIVATED, AdwButtonContent, AdwSplitButton, CLICKED, MENU_TAPPED, AdwToggleGroup, ToggleGroupState, NOTIFY_TOGGLE_SELECTED, applyAdwaitaNsAccent, clearAdwaitaNsAccent, ADWAITA_NS_ACCENT_RULES, adwaitaNsAccentColor, adwaitaNsAccentCss, AdwShortcutLabel, SHORTCUT_LABEL_CAP_TEXT_CLASS, SHORTCUT_LABEL_CLASS, SHORTCUT_LABEL_DIMMED_CLASS, SHORTCUT_LABEL_DISABLED_CLASS, SHORTCUT_LABEL_KEYCAP_CLASS, SHORTCUT_LABEL_KEYS_CLASS, SHORTCUT_LABEL_SIDE_CLASS, SHORTCUT_LABEL_SPACED_CLASS, shortcutLabelDirection, shortcutLabelPlatform, shortcutLabelRenderPlan, AdwViewStack, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, AdwViewSwitcher, AdwViewSwitcherBar, AdwInlineViewSwitcher, AdwTabView, AdwCarousel, DEFAULT_CAROUSEL_PAGE_WIDTH, NOTIFY_POSITION, AdwNavigationView, NOTIFY_VISIBLE_PAGE, AdwSplitViewBase, NOTIFY_SHOW_SIDEBAR, AdwNavigationSplitView, AdwOverlaySplitView, NsNavigationSplitViewState, NsOverlaySplitViewState, splitViewColumns, AdwSidebar, NOTIFY_SIDEBAR_SELECTED, AdwBottomSheet, NOTIFY_OPEN, AdwToast, AdwToastOverlay, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, TOAST_BUTTON_CLICKED, AdwAlertDialog, AdwAlertResponses, NOTIFY_RESPONSE, AdwAboutDialog, ABOUT_CLOSED, AdwPreferencesDialog, PREFERENCES_CLOSED, attachRowPressFeedback, renderSymbolicIcon, extractIconPaths, extractPathData, ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, parseBreakpointCondition, registerAdwaitaElements, } from './widgets/index.js';
|
|
3
3
|
export type { NotifyActiveEventData, NotifyTextEventData, NotifyEntryTextEventData, AdwComboOption, ComboStateChange, ComboStateListener, NotifySelectedEventData, NotifyDropDownSelectedEventData, NotifyValueEventData, SpinStateChange, SpinStateListener, NotifySliderValueEventData, NotifyExpandedEventData, ExpanderStateListener, AdwButtonVariant, AdwMenuItem, MenuItemActivatedEventData, MenuTappedEventData, RowActivatedEventData, DataGridItemSpec, NotifyToggleSelectedEventData, ToggleGroupStateChange, ToggleGroupStateListener, AccentRole, AccentRule, ShortcutLabelRenderPlan, ShortcutLabelViewSpec, AdwViewStackPage, NotifyVisibleChildEventData, AdwViewPage, NotifyViewSelectedEventData, NotifyPositionEventData, NotifyVisiblePageEventData, NotifyShowSidebarEventData, NsShowSidebarNotification, NsSplitViewHost, NsSplitViewState, NotifySidebarSelectedEventData, NotifyOpenEventData, AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, NotifyResponseEventData, AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, OrderedConfirmResponses, SymbolicIconOptions, IconPath, AdwColorScheme, AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './widgets/index.js';
|
|
4
|
+
export { Adw, Gtk } from './namespace.js';
|
|
4
5
|
export { ADWAITA_SANS_FONT_FAMILY, ADWAITA_SANS_TTF_FILES, adwaitaFontInstallInstructions, hasAdwaitaSans, } from './fonts.js';
|
|
5
6
|
/**
|
|
6
7
|
* One-call convenience setup for the Adwaita NativeScript layer.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { AdwAboutDialog } from './widgets/adw-about-dialog.js';
|
|
2
|
+
import { AdwActionRow } from './widgets/adw-action-row.js';
|
|
3
|
+
import { AdwAlertDialog } from './widgets/adw-alert-dialog.js';
|
|
4
|
+
import { AdwAvatar } from './widgets/adw-avatar.js';
|
|
5
|
+
import { AdwBanner } from './widgets/adw-banner.js';
|
|
6
|
+
import { AdwBottomSheet } from './widgets/adw-bottom-sheet.js';
|
|
7
|
+
import { AdwButtonContent } from './widgets/adw-button-content.js';
|
|
8
|
+
import { AdwButtonRow } from './widgets/adw-button-row.js';
|
|
9
|
+
import { AdwCarousel } from './widgets/adw-carousel.js';
|
|
10
|
+
import { AdwClamp } from './widgets/adw-clamp.js';
|
|
11
|
+
import { AdwComboRow } from './widgets/adw-combo-row.js';
|
|
12
|
+
import { AdwEntryRow } from './widgets/adw-entry-row.js';
|
|
13
|
+
import { AdwExpanderRow } from './widgets/adw-expander-row.js';
|
|
14
|
+
import { AdwHeaderBar } from './widgets/adw-header-bar.js';
|
|
15
|
+
import { AdwIcon } from './widgets/adw-icon.js';
|
|
16
|
+
import { AdwInlineViewSwitcher } from './widgets/adw-inline-view-switcher.js';
|
|
17
|
+
import { AdwNavigationSplitView } from './widgets/adw-navigation-split-view.js';
|
|
18
|
+
import { AdwNavigationView } from './widgets/adw-navigation-view.js';
|
|
19
|
+
import { AdwOverlaySplitView } from './widgets/adw-overlay-split-view.js';
|
|
20
|
+
import { AdwPasswordEntryRow } from './widgets/adw-password-entry-row.js';
|
|
21
|
+
import { AdwPreferencesDialog } from './widgets/adw-preferences-dialog.js';
|
|
22
|
+
import { AdwPreferencesGroup } from './widgets/adw-preferences-group.js';
|
|
23
|
+
import { AdwPreferencesPage } from './widgets/adw-preferences-page.js';
|
|
24
|
+
import { AdwShortcutLabel } from './widgets/adw-shortcut-label.js';
|
|
25
|
+
import { AdwSidebar } from './widgets/adw-sidebar.js';
|
|
26
|
+
import { AdwSpinRow } from './widgets/adw-spin-row.js';
|
|
27
|
+
import { AdwSpinner } from './widgets/adw-spinner.js';
|
|
28
|
+
import { AdwSplitButton } from './widgets/adw-split-button.js';
|
|
29
|
+
import { AdwStatusPage } from './widgets/adw-status-page.js';
|
|
30
|
+
import { AdwSwitchRow } from './widgets/adw-switch-row.js';
|
|
31
|
+
import { AdwTabView } from './widgets/adw-tab-view.js';
|
|
32
|
+
import { AdwToastOverlay } from './widgets/adw-toast-overlay.js';
|
|
33
|
+
import { AdwToggleGroup } from './widgets/adw-toggle-group.js';
|
|
34
|
+
import { AdwToolbarView } from './widgets/adw-toolbar-view.js';
|
|
35
|
+
import { AdwViewStack } from './widgets/adw-view-stack.js';
|
|
36
|
+
import { AdwViewSwitcherBar } from './widgets/adw-view-switcher-bar.js';
|
|
37
|
+
import { AdwViewSwitcher } from './widgets/adw-view-switcher.js';
|
|
38
|
+
import { AdwWindowTitle } from './widgets/adw-window-title.js';
|
|
39
|
+
import { AdwWrapBox } from './widgets/adw-wrap-box.js';
|
|
40
|
+
import { GtkButton } from './widgets/gtk-button.js';
|
|
41
|
+
import { GtkDropDown } from './widgets/gtk-drop-down.js';
|
|
42
|
+
import { GtkEntry } from './widgets/gtk-entry.js';
|
|
43
|
+
import { GtkMenuButton } from './widgets/gtk-menu-button.js';
|
|
44
|
+
/** The libadwaita half: every widget whose own spelling is an `adw-*` tag. */
|
|
45
|
+
export declare const Adw: {
|
|
46
|
+
AboutDialog: typeof AdwAboutDialog;
|
|
47
|
+
ActionRow: typeof AdwActionRow;
|
|
48
|
+
AlertDialog: typeof AdwAlertDialog;
|
|
49
|
+
Avatar: typeof AdwAvatar;
|
|
50
|
+
Banner: typeof AdwBanner;
|
|
51
|
+
BottomSheet: typeof AdwBottomSheet;
|
|
52
|
+
ButtonContent: typeof AdwButtonContent;
|
|
53
|
+
ButtonRow: typeof AdwButtonRow;
|
|
54
|
+
Carousel: typeof AdwCarousel;
|
|
55
|
+
Clamp: typeof AdwClamp;
|
|
56
|
+
ComboRow: typeof AdwComboRow;
|
|
57
|
+
EntryRow: typeof AdwEntryRow;
|
|
58
|
+
ExpanderRow: typeof AdwExpanderRow;
|
|
59
|
+
HeaderBar: typeof AdwHeaderBar;
|
|
60
|
+
InlineViewSwitcher: typeof AdwInlineViewSwitcher;
|
|
61
|
+
NavigationSplitView: typeof AdwNavigationSplitView;
|
|
62
|
+
NavigationView: typeof AdwNavigationView;
|
|
63
|
+
OverlaySplitView: typeof AdwOverlaySplitView;
|
|
64
|
+
PasswordEntryRow: typeof AdwPasswordEntryRow;
|
|
65
|
+
PreferencesDialog: typeof AdwPreferencesDialog;
|
|
66
|
+
PreferencesGroup: typeof AdwPreferencesGroup;
|
|
67
|
+
PreferencesPage: typeof AdwPreferencesPage;
|
|
68
|
+
ShortcutLabel: typeof AdwShortcutLabel;
|
|
69
|
+
Sidebar: typeof AdwSidebar;
|
|
70
|
+
Spinner: typeof AdwSpinner;
|
|
71
|
+
SpinRow: typeof AdwSpinRow;
|
|
72
|
+
SplitButton: typeof AdwSplitButton;
|
|
73
|
+
StatusPage: typeof AdwStatusPage;
|
|
74
|
+
SwitchRow: typeof AdwSwitchRow;
|
|
75
|
+
TabView: typeof AdwTabView;
|
|
76
|
+
ToastOverlay: typeof AdwToastOverlay;
|
|
77
|
+
ToggleGroup: typeof AdwToggleGroup;
|
|
78
|
+
ToolbarView: typeof AdwToolbarView;
|
|
79
|
+
ViewStack: typeof AdwViewStack;
|
|
80
|
+
ViewSwitcher: typeof AdwViewSwitcher;
|
|
81
|
+
ViewSwitcherBar: typeof AdwViewSwitcherBar;
|
|
82
|
+
WindowTitle: typeof AdwWindowTitle;
|
|
83
|
+
WrapBox: typeof AdwWrapBox;
|
|
84
|
+
};
|
|
85
|
+
/** The GTK half: the widgets `NS_WIDGET_ALIGNMENT` declares a `gir` alias of a GTK type. */
|
|
86
|
+
export declare const Gtk: {
|
|
87
|
+
Button: typeof GtkButton;
|
|
88
|
+
DropDown: typeof GtkDropDown;
|
|
89
|
+
Entry: typeof GtkEntry;
|
|
90
|
+
Image: typeof AdwIcon;
|
|
91
|
+
MenuButton: typeof GtkMenuButton;
|
|
92
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, StackLayout, Label } from '@nativescript/core';
|
|
2
3
|
import { ActionRowState } from './row-state.js';
|
|
3
4
|
/** Event name emitted when the row is activated. Mirrors `Adw.ActionRow::activated`. */
|
|
4
5
|
export declare const ACTIVATED = "activated";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, StackLayout } from '@nativescript/core';
|
|
2
3
|
import type { BottomSheetCloseOutcome, BottomSheetCloseSource } from '@gjsify/adwaita-core';
|
|
3
4
|
import { CLOSE_ATTEMPT, NOTIFY_OPEN, SHEET_CLOSE, type NotifyOpenEventData } from './bottom-sheet-state.js';
|
|
4
5
|
export { CLOSE_ATTEMPT, NOTIFY_OPEN, SHEET_CLOSE };
|
|
@@ -26,8 +26,8 @@ export declare class AdwButtonContent extends StackLayout {
|
|
|
26
26
|
* the C sets that fallback (:355-356) and never hides `self->icon`. The doc
|
|
27
27
|
* comments at :228/:343 say otherwise — see `buttonContentIconSvg`.
|
|
28
28
|
*/
|
|
29
|
-
get
|
|
30
|
-
set
|
|
29
|
+
get iconName(): string;
|
|
30
|
+
set iconName(svg: string);
|
|
31
31
|
/** Whether the icon currently shown is the empty-slot fallback. */
|
|
32
32
|
get iconIsFallback(): boolean;
|
|
33
33
|
/** The icon fill colour (hex). Set to the button's foreground (e.g. white on suggested-action). */
|
|
@@ -34,14 +34,14 @@ export declare class AdwButtonRow extends AdwActionRow {
|
|
|
34
34
|
* A leading Adwaita symbolic SVG string before the centered title (e.g.
|
|
35
35
|
* `listAddSymbolic`). Empty collapses the icon.
|
|
36
36
|
*/
|
|
37
|
-
get
|
|
38
|
-
set
|
|
37
|
+
get startIconName(): string;
|
|
38
|
+
set startIconName(value: string);
|
|
39
39
|
/**
|
|
40
40
|
* A trailing Adwaita symbolic SVG string after the centered title (e.g.
|
|
41
41
|
* `goNextSymbolic`) — `Adw.ButtonRow:end-icon-name`. Empty collapses it.
|
|
42
42
|
*/
|
|
43
|
-
get
|
|
44
|
-
set
|
|
43
|
+
get endIconName(): string;
|
|
44
|
+
set endIconName(value: string);
|
|
45
45
|
/**
|
|
46
46
|
* The icons' fill colour (hex). Defaults to the Adwaita accent; callers set
|
|
47
47
|
* the destructive red when the row carries `destructive-action` so the
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, ScrollView, StackLayout, type EventData } from '@nativescript/core';
|
|
2
3
|
import { DEFAULT_CAROUSEL_PAGE_WIDTH, type CarouselNotifyPayload } from './carousel-state.js';
|
|
3
4
|
export { DEFAULT_CAROUSEL_PAGE_WIDTH };
|
|
4
5
|
/** Event name emitted when {@link AdwCarousel.position} changes. Mirrors GObject `notify::position`. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout } from '@nativescript/core';
|
|
2
3
|
import { DEFAULT_CLAMP_MAX_SIZE, DEFAULT_CLAMP_TIGHTENING_THRESHOLD } from './chrome.js';
|
|
3
4
|
export { DEFAULT_CLAMP_MAX_SIZE, DEFAULT_CLAMP_TIGHTENING_THRESHOLD };
|
|
4
5
|
export declare class AdwClamp extends GridLayout {
|
|
@@ -4,7 +4,7 @@ import { AdwActionRow } from './adw-action-row.js';
|
|
|
4
4
|
import { AdwIcon } from './adw-icon.js';
|
|
5
5
|
export { ComboState } from '@gjsify/adwaita-core';
|
|
6
6
|
export type { AdwComboOption, ComboStateChange, ComboStateListener } from '@gjsify/adwaita-core';
|
|
7
|
-
/** Event name emitted when {@link AdwComboRow.
|
|
7
|
+
/** Event name emitted when {@link AdwComboRow.selected} changes. Mirrors GObject `notify::selected`. */
|
|
8
8
|
export declare const NOTIFY_SELECTED = "notify::selected";
|
|
9
9
|
/** Payload of the `notify::selected` event. */
|
|
10
10
|
export interface NotifySelectedEventData extends EventData {
|
|
@@ -36,8 +36,8 @@ export declare class AdwComboRow extends AdwActionRow {
|
|
|
36
36
|
get options(): AdwComboOption[];
|
|
37
37
|
set options(value: AdwComboOption[]);
|
|
38
38
|
/** The selected option index. Updates the inline value label. */
|
|
39
|
-
get
|
|
40
|
-
set
|
|
39
|
+
get selected(): number;
|
|
40
|
+
set selected(raw: number | string);
|
|
41
41
|
/** The selected option's `value`, or `''` when out of range. */
|
|
42
42
|
get selectedValue(): string;
|
|
43
43
|
set selectedValue(value: string);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { ItemSpec, StackLayout, type EventData } from '@nativescript/core';
|
|
2
3
|
import { AdwActionRow } from './adw-action-row.js';
|
|
3
4
|
import { AdwIcon } from './adw-icon.js';
|
|
4
5
|
export { ExpanderState } from '@gjsify/adwaita-core';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, StackLayout } from '@nativescript/core';
|
|
2
3
|
export declare class AdwHeaderBar extends GridLayout {
|
|
3
4
|
/** The start (left) slot — a horizontal stack. */
|
|
4
5
|
protected readonly _startBox: StackLayout;
|
|
@@ -12,8 +12,8 @@ export declare class AdwIcon extends Image {
|
|
|
12
12
|
private _syncThemeColor;
|
|
13
13
|
private _render;
|
|
14
14
|
/** The Adwaita symbolic SVG string to render (e.g. `panDownSymbolic`). */
|
|
15
|
-
get
|
|
16
|
-
set
|
|
15
|
+
get iconName(): string;
|
|
16
|
+
set iconName(svg: string);
|
|
17
17
|
/** The icon fill colour (hex). Setting it PINS the colour (it no longer follows
|
|
18
18
|
* the light/dark scheme) — use it for context colours like white on a suggested
|
|
19
19
|
* button or destructive red, which must survive both schemes. */
|
|
@@ -15,8 +15,8 @@ export declare class AdwImageButton extends GridLayout {
|
|
|
15
15
|
/** Re-render the icon bitmap from the current svg / colour / size. */
|
|
16
16
|
private _render;
|
|
17
17
|
/** The Adwaita symbolic SVG string to render (e.g. `goPreviousSymbolic`). */
|
|
18
|
-
get
|
|
19
|
-
set
|
|
18
|
+
get iconName(): string;
|
|
19
|
+
set iconName(svg: string);
|
|
20
20
|
/** The icon fill colour (hex). Setting it PINS the colour (it no longer follows
|
|
21
21
|
* the light/dark scheme) — for context colours that must survive both schemes. */
|
|
22
22
|
get iconColor(): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, Label, StackLayout } from '@nativescript/core';
|
|
2
3
|
import type { SearchPreferencesOptions } from '@gjsify/adwaita-core';
|
|
3
4
|
import { type NsPreferencesSearchResult, type NsSearchablePage } from './preferences-search.js';
|
|
4
5
|
/** Event name emitted when the dialog is closed. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, Label, StackLayout } from '@nativescript/core';
|
|
2
3
|
import type { NsSearchableGroup, NsSearchableRow } from './preferences-search.js';
|
|
3
4
|
export declare class AdwPreferencesGroup extends StackLayout implements NsSearchableGroup {
|
|
4
5
|
/** The header box: labels on the leading edge, suffix on the trailing one. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { ScrollView, StackLayout } from '@nativescript/core';
|
|
2
3
|
import type { NsSearchableGroup, NsSearchablePage } from './preferences-search.js';
|
|
3
4
|
export declare class AdwPreferencesPage extends ScrollView implements NsSearchablePage {
|
|
4
5
|
/** The vertical stack that actually holds the groups. */
|
|
@@ -28,7 +28,16 @@ export declare class AdwSplitButton extends GridLayout {
|
|
|
28
28
|
private readonly _state;
|
|
29
29
|
/** Which of the two action views is currently parented. */
|
|
30
30
|
private _showingIcon;
|
|
31
|
-
|
|
31
|
+
/**
|
|
32
|
+
* `GtkWidget:sensitive`, in GTK's polarity and no other.
|
|
33
|
+
*
|
|
34
|
+
* The field was `_disabled` while the property was, and the rename INVERTED the
|
|
35
|
+
* property. Keeping the old polarity inside would have left every reader holding
|
|
36
|
+
* two of them, one negation apart, in a class where a forgotten `!` dims a live
|
|
37
|
+
* button and emits nothing — silently, because NativeScript has no insensitive
|
|
38
|
+
* state to contradict it. One polarity, so there is nothing to forget.
|
|
39
|
+
*/
|
|
40
|
+
private _sensitive;
|
|
32
41
|
constructor();
|
|
33
42
|
/**
|
|
34
43
|
* Present the dropdown menu and dispatch the choice BY POSITION.
|
|
@@ -53,8 +62,8 @@ export declare class AdwSplitButton extends GridLayout {
|
|
|
53
62
|
* The SVG string IS the icon identity here, so it is what the state machine
|
|
54
63
|
* stores as the icon name; NS resolves no icon theme.
|
|
55
64
|
*/
|
|
56
|
-
get
|
|
57
|
-
set
|
|
65
|
+
get iconName(): string;
|
|
66
|
+
set iconName(svg: string);
|
|
58
67
|
/** The dropdown menu entries (opened as a native `action()` sheet on arrow tap). */
|
|
59
68
|
get menu(): readonly AdwMenuEntry[];
|
|
60
69
|
set menu(value: readonly (string | AdwMenuEntry)[]);
|
|
@@ -71,9 +80,16 @@ export declare class AdwSplitButton extends GridLayout {
|
|
|
71
80
|
/** Whether an underline in the label marks a mnemonic. */
|
|
72
81
|
get useUnderline(): boolean;
|
|
73
82
|
set useUnderline(raw: boolean | string);
|
|
74
|
-
/**
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
/**
|
|
84
|
+
* Whether the control is sensitive — `GtkWidget:sensitive`, so `false` is the
|
|
85
|
+
* insensitive state: dimmed, and emitting neither signal.
|
|
86
|
+
*
|
|
87
|
+
* The port spelled this `disabled` until ADR 0034 clause 1. Converging the name
|
|
88
|
+
* INVERTS it, which is why the ledger recorded the pair rather than renaming
|
|
89
|
+
* quietly: a `sensitive` that still meant `disabled` is worse than either name.
|
|
90
|
+
*/
|
|
91
|
+
get sensitive(): boolean;
|
|
92
|
+
set sensitive(raw: boolean | string);
|
|
77
93
|
/** The main action part (for composing a custom content widget). */
|
|
78
94
|
get actionButton(): StackLayout;
|
|
79
95
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, Label, StackLayout } from '@nativescript/core';
|
|
2
3
|
import { AdwIcon } from './adw-icon.js';
|
|
3
4
|
export declare class AdwStatusPage extends GridLayout {
|
|
4
5
|
/** The centered vertical stack. */
|
|
@@ -21,8 +22,8 @@ export declare class AdwStatusPage extends GridLayout {
|
|
|
21
22
|
* hides it. Matches `Adw.StatusPage`'s themed icon. Mutually exclusive with
|
|
22
23
|
* {@link iconText} — whichever was set last wins.
|
|
23
24
|
*/
|
|
24
|
-
get
|
|
25
|
-
set
|
|
25
|
+
get iconName(): string;
|
|
26
|
+
set iconName(value: string);
|
|
26
27
|
/**
|
|
27
28
|
* A large glyph shown above the title (emoji / font glyph — the legacy
|
|
28
29
|
* fallback for callers that have no symbolic SVG). Mutually exclusive with
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { Button, GridLayout, Label } from '@nativescript/core';
|
|
2
3
|
import { AdwToast } from '@gjsify/adwaita-core';
|
|
3
4
|
import type { AdwToastOptions } from '@gjsify/adwaita-core';
|
|
4
5
|
export { AdwToast, AdwToastQueue, DEFAULT_TOAST_TIMEOUT } from '@gjsify/adwaita-core';
|
|
@@ -29,8 +29,8 @@ export declare class AdwToggleGroup extends StackLayout {
|
|
|
29
29
|
/** Mark only the selected segment `.active` (the raised white pill). */
|
|
30
30
|
private _applySelection;
|
|
31
31
|
/** The selected segment index. Swaps the active pill + emits `notify::selected`. */
|
|
32
|
-
get
|
|
33
|
-
set
|
|
32
|
+
get active(): number;
|
|
33
|
+
set active(raw: number | string);
|
|
34
34
|
/** The selected segment's label, or `''` when out of range. */
|
|
35
35
|
get selectedValue(): string;
|
|
36
36
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, StackLayout } from '@nativescript/core';
|
|
2
3
|
import { type AdwToolbarStyle } from './chrome.js';
|
|
3
4
|
export declare class AdwToolbarView extends GridLayout {
|
|
4
5
|
/** The top-bar slot (row 0) — stack of header bars / toolbars. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { View } from '@nativescript/core';
|
|
2
|
+
import { GridLayout, type EventData } from '@nativescript/core';
|
|
2
3
|
import { type AdwViewStackPage, type ViewStackNotifyPayload } from './view-stack-state.js';
|
|
3
4
|
export type { AdwViewStackPage };
|
|
4
5
|
/** Event name emitted when the visible child changes. Mirrors GObject `notify::visible-child`. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridLayout } from '@nativescript/core';
|
|
2
|
-
import { AdwViewStack } from './adw-view-stack.js';
|
|
2
|
+
import type { AdwViewStack } from './adw-view-stack.js';
|
|
3
3
|
export declare class AdwViewSwitcherBar extends GridLayout {
|
|
4
4
|
/** The horizontal (homogeneous) row of buttons. */
|
|
5
5
|
private readonly _bar;
|
|
@@ -6,14 +6,19 @@ import { Button } from '@nativescript/core';
|
|
|
6
6
|
* The class list is `@gjsify/adwaita-core`'s, not a local table: this widget's own
|
|
7
7
|
* one was MISSING `circular`, which the browser element had, and neither file could
|
|
8
8
|
* see the other. `circular` is now here because the shared table says it exists.
|
|
9
|
+
*
|
|
10
|
+
* STILL `Adw…`, on a class that is not: the variants ARE libadwaita style classes
|
|
11
|
+
* (`.suggested-action`, `.pill`, `_buttons.scss`), so the prefix names what they are.
|
|
12
|
+
* ADR 0034 clause 1 renames WIDGETS after the library owning their GType; a style-class
|
|
13
|
+
* vocabulary is not a widget, and renaming it would have moved a true name to a false one.
|
|
9
14
|
*/
|
|
10
15
|
export type AdwButtonVariant = 'default' | AdwButtonStyleClass;
|
|
11
|
-
export declare class
|
|
16
|
+
export declare class GtkButton extends Button {
|
|
12
17
|
private _variant;
|
|
13
18
|
constructor();
|
|
14
19
|
/**
|
|
15
20
|
* The Adwaita style variant. Setting it swaps the corresponding CSS class
|
|
16
|
-
* (one of `
|
|
21
|
+
* (one of `GtkButton.variantClasses`) onto the button,
|
|
17
22
|
* preserving the base `adw-button` class. Note that `pill` is the rounded
|
|
18
23
|
* SHAPE and combines with no other variant here (set the shape OR the accent
|
|
19
24
|
* intent — matching how this CSS subset expresses them as flat classes).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Label, StackLayout, type EventData } from '@nativescript/core';
|
|
2
2
|
import type { AdwComboOption } from '@gjsify/adwaita-core';
|
|
3
3
|
import { AdwIcon } from './adw-icon.js';
|
|
4
|
-
/** Event name emitted when {@link
|
|
4
|
+
/** Event name emitted when {@link GtkDropDown.selected} changes through a pick. Mirrors GObject `notify::selected`. */
|
|
5
5
|
export declare const NOTIFY_SELECTED = "notify::selected";
|
|
6
6
|
/** Payload of the `notify::selected` event. */
|
|
7
7
|
export interface NotifyDropDownSelectedEventData extends EventData {
|
|
@@ -12,7 +12,7 @@ export interface NotifyDropDownSelectedEventData extends EventData {
|
|
|
12
12
|
/** The newly-selected option's `label` — what the button now shows. */
|
|
13
13
|
label: string;
|
|
14
14
|
}
|
|
15
|
-
export declare class
|
|
15
|
+
export declare class GtkDropDown extends StackLayout {
|
|
16
16
|
/** The button label — the selected option. */
|
|
17
17
|
protected readonly _label: Label;
|
|
18
18
|
/** The down-chevron — a real Adwaita `pan-down-symbolic` icon. */
|
|
@@ -38,7 +38,7 @@ export declare class AdwDropDown extends StackLayout {
|
|
|
38
38
|
/**
|
|
39
39
|
* Optional title shown atop the chooser sheet. A SUBSTITUTION affordance:
|
|
40
40
|
* GTK's popover has no title, but a bare native sheet gives no clue what is
|
|
41
|
-
* being chosen — the same reason `
|
|
41
|
+
* being chosen — the same reason `GtkMenuButton` carries `menuTitle`.
|
|
42
42
|
*/
|
|
43
43
|
get chooserTitle(): string;
|
|
44
44
|
set chooserTitle(value: string);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridLayout, TextField, type EventData } from '@nativescript/core';
|
|
2
|
-
/** Event name emitted when {@link
|
|
2
|
+
/** Event name emitted when {@link GtkEntry.text} changes. Mirrors GObject `notify::text`. */
|
|
3
3
|
export declare const NOTIFY_TEXT = "notify::text";
|
|
4
4
|
/** Event name emitted when the return key is pressed — `Gtk.Entry::activate`. */
|
|
5
5
|
export declare const ACTIVATE = "activate";
|
|
@@ -10,7 +10,7 @@ export interface NotifyEntryTextEventData extends EventData {
|
|
|
10
10
|
/** The new number of CHARACTERS (not UTF-16 units). */
|
|
11
11
|
textLength: number;
|
|
12
12
|
}
|
|
13
|
-
export declare class
|
|
13
|
+
export declare class GtkEntry extends GridLayout {
|
|
14
14
|
/** The real input. Chrome-less: the box around it paints the Adwaita surface. */
|
|
15
15
|
protected readonly _field: TextField;
|
|
16
16
|
private _text;
|
|
@@ -33,8 +33,8 @@ export declare class AdwEntry extends GridLayout {
|
|
|
33
33
|
get maxLength(): number;
|
|
34
34
|
set maxLength(raw: number | string);
|
|
35
35
|
/** Placeholder shown while the entry is empty (`Gtk.Entry:placeholder-text`). */
|
|
36
|
-
get
|
|
37
|
-
set
|
|
36
|
+
get placeholderText(): string;
|
|
37
|
+
set placeholderText(value: string);
|
|
38
38
|
/** Whether the entry accepts edits (`GtkEditable:editable`). */
|
|
39
39
|
get editable(): boolean;
|
|
40
40
|
set editable(raw: boolean | string);
|
|
@@ -4,7 +4,7 @@ import { AdwImageButton } from './adw-image-button.js';
|
|
|
4
4
|
/** Event name emitted when a menu item is chosen. */
|
|
5
5
|
export declare const MENU_ITEM_ACTIVATED = "menuItemActivated";
|
|
6
6
|
/**
|
|
7
|
-
* One entry in an {@link
|
|
7
|
+
* One entry in an {@link GtkMenuButton}'s menu — `@gjsify/adwaita-core`'s
|
|
8
8
|
* {@link AdwMenuEntry}, under the name this widget has always used.
|
|
9
9
|
*
|
|
10
10
|
* It used to be a THIRD declaration of the same shape (the browser element had a
|
|
@@ -19,10 +19,10 @@ export interface MenuItemActivatedEventData extends EventData {
|
|
|
19
19
|
id: string;
|
|
20
20
|
/** The chosen item's label. */
|
|
21
21
|
label: string;
|
|
22
|
-
/** The chosen item's index in {@link
|
|
22
|
+
/** The chosen item's index in {@link GtkMenuButton.menuItems}. */
|
|
23
23
|
index: number;
|
|
24
24
|
}
|
|
25
|
-
export declare class
|
|
25
|
+
export declare class GtkMenuButton extends AdwImageButton {
|
|
26
26
|
private _items;
|
|
27
27
|
private _menuTitle;
|
|
28
28
|
constructor();
|
|
@@ -6,23 +6,23 @@ export type { NotifyActiveEventData } from './adw-switch-row.js';
|
|
|
6
6
|
export { AdwEntryRow, NOTIFY_TEXT } from './adw-entry-row.js';
|
|
7
7
|
export type { NotifyTextEventData } from './adw-entry-row.js';
|
|
8
8
|
export { AdwPasswordEntryRow } from './adw-password-entry-row.js';
|
|
9
|
-
export {
|
|
10
|
-
export type { NotifyEntryTextEventData } from './
|
|
9
|
+
export { GtkEntry, ACTIVATE as ENTRY_ACTIVATE, NOTIFY_TEXT as NOTIFY_ENTRY_TEXT } from './gtk-entry.js';
|
|
10
|
+
export type { NotifyEntryTextEventData } from './gtk-entry.js';
|
|
11
11
|
export { AdwComboRow, ComboState, NOTIFY_SELECTED } from './adw-combo-row.js';
|
|
12
12
|
export type { AdwComboOption, ComboStateChange, ComboStateListener, NotifySelectedEventData } from './adw-combo-row.js';
|
|
13
|
-
export {
|
|
14
|
-
export type { NotifyDropDownSelectedEventData } from './
|
|
13
|
+
export { GtkDropDown, NOTIFY_SELECTED as NOTIFY_DROP_DOWN_SELECTED } from './gtk-drop-down.js';
|
|
14
|
+
export type { NotifyDropDownSelectedEventData } from './gtk-drop-down.js';
|
|
15
15
|
export { AdwSpinRow, NOTIFY_VALUE, SpinState } from './adw-spin-row.js';
|
|
16
16
|
export type { NotifyValueEventData, SpinStateChange, SpinStateListener } from './adw-spin-row.js';
|
|
17
17
|
export { AdwSliderRow, NOTIFY_SLIDER_VALUE } from './adw-slider-row.js';
|
|
18
18
|
export type { NotifySliderValueEventData } from './adw-slider-row.js';
|
|
19
19
|
export { AdwExpanderRow, ExpanderState, NOTIFY_EXPANDED } from './adw-expander-row.js';
|
|
20
20
|
export type { ExpanderStateListener, NotifyExpandedEventData } from './adw-expander-row.js';
|
|
21
|
-
export {
|
|
22
|
-
export type { AdwButtonVariant } from './
|
|
21
|
+
export { GtkButton } from './gtk-button.js';
|
|
22
|
+
export type { AdwButtonVariant } from './gtk-button.js';
|
|
23
23
|
export { AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE } from './adw-image-button.js';
|
|
24
|
-
export {
|
|
25
|
-
export type { AdwMenuItem, MenuItemActivatedEventData } from './
|
|
24
|
+
export { GtkMenuButton, MENU_ITEM_ACTIVATED } from './gtk-menu-button.js';
|
|
25
|
+
export type { AdwMenuItem, MenuItemActivatedEventData } from './gtk-menu-button.js';
|
|
26
26
|
export { AdwIcon, DEFAULT_ADW_ICON_SIZE } from './adw-icon.js';
|
|
27
27
|
export { AdwBanner, BUTTON_CLICKED } from './adw-banner.js';
|
|
28
28
|
export { AdwAvatar, DEFAULT_AVATAR_SIZE, avatarInitials } from './adw-avatar.js';
|
|
@@ -28,11 +28,11 @@ export declare function resolveMenuChoice(sheetActions: readonly string[], chose
|
|
|
28
28
|
/** The arrow SVG for a direction; the split button's `none` is the down caret, not a hamburger. */
|
|
29
29
|
export declare function splitButtonArrowSvg(direction: SplitButtonDirection): string;
|
|
30
30
|
/**
|
|
31
|
-
* Apply `AdwSplitButton.
|
|
31
|
+
* Apply `AdwSplitButton.iconName = svg` to the content machine. The SVG string IS
|
|
32
32
|
* the icon identity on NativeScript, so it goes where GTK puts the icon NAME.
|
|
33
33
|
*
|
|
34
34
|
* C offers no "unset the icon", only the side effect of filling another slot, so an
|
|
35
35
|
* empty SVG clears the content and lets the label half take over again — what a
|
|
36
|
-
* caller assigning `
|
|
36
|
+
* caller assigning `iconName` from a nullable lookup expects.
|
|
37
37
|
*/
|
|
38
38
|
export declare function setActionIcon(state: SplitButtonState, svg: string | null | undefined): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { normalizeWrapBoxSpacing,
|
|
2
|
-
export { normalizeWrapBoxSpacing };
|
|
1
|
+
import { normalizeWrapBoxSpacing, wrapBoxChildFlex, wrapBoxFlexStyle, type WrapBoxChildFlex, type WrapBoxFlexInput, type WrapBoxFlexStyle } from '@gjsify/adwaita-core';
|
|
2
|
+
export { normalizeWrapBoxSpacing, wrapBoxChildFlex, wrapBoxFlexStyle };
|
|
3
|
+
export type { WrapBoxChildFlex, WrapBoxFlexInput, WrapBoxFlexStyle };
|
|
3
4
|
/** `Adw.WrapBox:child-spacing` / `:line-spacing` default, in DIPs. Both are 0 in C. */
|
|
4
5
|
export declare const DEFAULT_WRAP_BOX_SPACING = 0;
|
|
5
6
|
/**
|
|
@@ -22,61 +23,3 @@ export declare function wrapBoxSpacingChanges(current: number, next: unknown): b
|
|
|
22
23
|
* the NS CSS subset cannot be trusted with.
|
|
23
24
|
*/
|
|
24
25
|
export declare function wrapBoxChildMargin(childSpacing: number, lineSpacing: number): string;
|
|
25
|
-
/** The `FlexboxLayout` knobs a wrap box's properties resolve to. */
|
|
26
|
-
export interface WrapBoxFlexStyle {
|
|
27
|
-
/** `FlexboxLayout:flexDirection` — the main axis, reversed for `end-to-start`. */
|
|
28
|
-
flexDirection: 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
29
|
-
/** `FlexboxLayout:flexWrap` — always wrapping; reversed by `wrap-reverse`. */
|
|
30
|
-
flexWrap: 'wrap' | 'wrap-reverse';
|
|
31
|
-
/** `FlexboxLayout:justifyContent` — where a COMPLETE line's leftover goes. */
|
|
32
|
-
justifyContent: 'flex-start' | 'center' | 'flex-end' | 'space-between';
|
|
33
|
-
/** `FlexboxLayout:alignContent` — `line-homogeneous` stretches the lines. */
|
|
34
|
-
alignContent: 'stretch' | 'flex-start';
|
|
35
|
-
/** `FlexboxLayout.setFlexGrow` for a child on a complete line. */
|
|
36
|
-
childFlexGrow: number;
|
|
37
|
-
/** `FlexboxLayout.setFlexShrink` for every child — `wrap-policy`. */
|
|
38
|
-
childFlexShrink: number;
|
|
39
|
-
}
|
|
40
|
-
/** The widget properties the two resolvers read. */
|
|
41
|
-
export interface WrapBoxFlexInput {
|
|
42
|
-
orientation: AdwWrapBoxOrientation;
|
|
43
|
-
packDirection: AdwWrapBoxPackDirection;
|
|
44
|
-
wrapReverse: boolean;
|
|
45
|
-
justify: AdwWrapBoxJustify;
|
|
46
|
-
justifyLastLine: boolean;
|
|
47
|
-
align: number;
|
|
48
|
-
lineHomogeneous: boolean;
|
|
49
|
-
wrapPolicy: AdwWrapPolicy;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* The CONTAINER half of the decision, resolved onto `FlexboxLayout`.
|
|
53
|
-
*
|
|
54
|
-
* The line DECISION is `resolveWrapBoxLine` in `@gjsify/adwaita-core`, held to
|
|
55
|
-
* `WRAP_BOX_LINE_VECTORS`; this function only maps its answer onto the knobs NS has.
|
|
56
|
-
*
|
|
57
|
-
* `FlexboxLayout` has ONE `justifyContent` for every line, so it can only carry the
|
|
58
|
-
* COMPLETE-line rule. NativeScript offers no `:only-child` selector and no generated
|
|
59
|
-
* content, so the final-line rule has no container-level expression at all; the
|
|
60
|
-
* single-child case is reached through {@link wrapBoxChildFlex}.
|
|
61
|
-
*/
|
|
62
|
-
export declare function wrapBoxFlexStyle(input: WrapBoxFlexInput): WrapBoxFlexStyle;
|
|
63
|
-
/** What one child of the box gets set on it. */
|
|
64
|
-
export interface WrapBoxChildFlex {
|
|
65
|
-
/** `FlexboxLayout.setFlexGrow` — whether this child absorbs the line's leftover. */
|
|
66
|
-
flexGrow: number;
|
|
67
|
-
/** `FlexboxLayout.setFlexShrink` — `wrap-policy`, the same for every child. */
|
|
68
|
-
flexShrink: number;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* The PER-CHILD half of the decision, which the container knobs cannot carry.
|
|
72
|
-
*
|
|
73
|
-
* A box with exactly ONE child has one line, that line is the LAST one, and its
|
|
74
|
-
* child is alone on it — so it is governed by `justify-last-line`, and `spread`
|
|
75
|
-
* STRETCHES it rather than spreading anything (C guards the keep-at-minimum branch
|
|
76
|
-
* with `n_children > 1`).
|
|
77
|
-
*
|
|
78
|
-
* `childCount` is the box's own child count, the most a renderer knows without a
|
|
79
|
-
* layout pass: 1 is the lone-child-on-the-final-line case exactly, anything more
|
|
80
|
-
* means at least one complete line.
|
|
81
|
-
*/
|
|
82
|
-
export declare function wrapBoxChildFlex(input: WrapBoxFlexInput, childCount: number): WrapBoxChildFlex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/adwaita-nativescript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"description": "Native Adwaita widgets for the NativeScript runtime — real NativeScript components (StackLayout/GridLayout/Switch/Label) styled like Libadwaita, not a webview",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"design-system"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@gjsify/adwaita-core": "^0.
|
|
51
|
-
"@gjsify/adwaita-fonts": "^0.
|
|
52
|
-
"@gjsify/adwaita-icons": "^0.
|
|
53
|
-
"@gjsify/native-platform": "^0.
|
|
50
|
+
"@gjsify/adwaita-core": "^0.47.0",
|
|
51
|
+
"@gjsify/adwaita-fonts": "^0.47.0",
|
|
52
|
+
"@gjsify/adwaita-icons": "^0.47.0",
|
|
53
|
+
"@gjsify/native-platform": "^0.47.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@nativescript/core": "*"
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@gjsify/cli": "^0.
|
|
65
|
-
"@gjsify/unit": "^0.
|
|
64
|
+
"@gjsify/cli": "^0.47.0",
|
|
65
|
+
"@gjsify/unit": "^0.47.0",
|
|
66
66
|
"@types/node": "^25.9.2",
|
|
67
67
|
"typescript": "^6.0.3"
|
|
68
68
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{AdwIcon as t}from"./adw-icon.js";import{attachRowPressFeedback as n}from"./row-press.js";import{Label as r,StackLayout as i,action as a}from"@nativescript/core";import{ComboState as o}from"@gjsify/adwaita-core";import{panDownSymbolic as s}from"@gjsify/adwaita-icons/ui";const c=`notify::selected`;var AdwDropDown=class extends i{_label;_chevron;_state=new o;_chooserTitle=``;constructor(){super(),this.orientation=`horizontal`,this.className=`adw-drop-down`;let e=new r;e.className=`adw-drop-down-label`,e.text=``;let i=new t;i.className=`adw-drop-down-chevron`,i.icon=s,this.addChild(e),this.addChild(i),this._label=e,this._chevron=i,this._state.subscribe(e=>{if(this._label.text=e.label,e.interactive){let t={eventName:c,object:this,selected:e.selected,value:e.value,label:e.label};this.notify(t)}}),this.addEventListener(`tap`,()=>{this._openChooser()}),n(this)}async _openChooser(){if(this._state.count===0)return;let e=this._state.options.map(e=>e.label),t=await a({title:this._chooserTitle||void 0,cancelButtonText:`Cancel`,actions:e});this._state.select(e.indexOf(t))}get options(){return this._state.options}set options(e){this._state.setOptions(e)}get selected(){return this._state.selectedIndex}set selected(t){let n=e(t,this.selected);this._state.setSelectedIndex(n)}get selectedValue(){return this._state.selectedValue}set selectedValue(e){this._state.setSelectedValue(e)}get selectedItem(){return this._state.options[this._state.selectedIndex]??null}get chooserTitle(){return this._chooserTitle}set chooserTitle(e){this._chooserTitle=e??``}};export{AdwDropDown,c as NOTIFY_SELECTED};
|