@gjsify/adwaita-nativescript 0.11.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/_virtual/_rolldown/runtime.js +1 -0
- package/lib/esm/fonts.js +2 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/widgets/adw-about-dialog.js +1 -0
- package/lib/esm/widgets/adw-action-row.js +1 -0
- package/lib/esm/widgets/adw-alert-dialog.js +1 -0
- package/lib/esm/widgets/adw-avatar.js +1 -0
- package/lib/esm/widgets/adw-banner.js +1 -0
- package/lib/esm/widgets/adw-bottom-sheet.js +1 -0
- package/lib/esm/widgets/adw-button-content.js +1 -0
- package/lib/esm/widgets/adw-button-row.js +1 -0
- package/lib/esm/widgets/adw-button.js +1 -0
- package/lib/esm/widgets/adw-carousel.js +1 -0
- package/lib/esm/widgets/adw-clamp.js +1 -0
- package/lib/esm/widgets/adw-combo-row.js +1 -0
- package/lib/esm/widgets/adw-entry-row.js +1 -0
- package/lib/esm/widgets/adw-expander-row.js +1 -0
- package/lib/esm/widgets/adw-header-bar.js +1 -0
- package/lib/esm/widgets/adw-icon.js +1 -0
- package/lib/esm/widgets/adw-image-button.js +1 -0
- package/lib/esm/widgets/adw-inline-view-switcher.js +1 -0
- package/lib/esm/widgets/adw-navigation-split-view.js +1 -0
- package/lib/esm/widgets/adw-navigation-view.js +1 -0
- package/lib/esm/widgets/adw-overlay-split-view.js +1 -0
- package/lib/esm/widgets/adw-password-entry-row.js +1 -0
- package/lib/esm/widgets/adw-preferences-dialog.js +1 -0
- package/lib/esm/widgets/adw-preferences-group.js +1 -0
- package/lib/esm/widgets/adw-preferences-page.js +1 -0
- package/lib/esm/widgets/adw-sidebar.js +1 -0
- package/lib/esm/widgets/adw-slider-row.js +1 -0
- package/lib/esm/widgets/adw-spin-row.js +1 -0
- package/lib/esm/widgets/adw-spinner.js +1 -0
- package/lib/esm/widgets/adw-split-button.js +1 -0
- package/lib/esm/widgets/adw-status-page.js +1 -0
- package/lib/esm/widgets/adw-switch-row.js +1 -0
- package/lib/esm/widgets/adw-tab-view.js +1 -0
- package/lib/esm/widgets/adw-toast-overlay.js +1 -0
- package/lib/esm/widgets/adw-toggle-group.js +1 -0
- package/lib/esm/widgets/adw-toolbar-view.js +1 -0
- package/lib/esm/widgets/adw-view-switcher.js +1 -0
- package/lib/esm/widgets/adw-window-title.js +1 -0
- package/lib/esm/widgets/adw-wrap-box.js +1 -0
- package/lib/esm/widgets/icon-path.js +1 -0
- package/lib/esm/widgets/icons.android.js +1 -0
- package/lib/esm/widgets/icons.js +1 -0
- package/lib/esm/widgets/index.js +1 -0
- package/lib/esm/widgets/row-press.js +1 -0
- package/lib/esm/widgets/split-view-base.js +1 -0
- package/lib/esm/widgets/view-switcher-base.js +1 -0
- package/lib/types/fonts.d.ts +38 -0
- package/lib/types/index.d.ts +16 -0
- package/lib/types/index.spec.d.ts +2 -0
- package/lib/types/widgets/adw-about-dialog.d.ts +50 -0
- package/lib/types/widgets/adw-action-row.d.ts +30 -0
- package/lib/types/widgets/adw-alert-dialog.d.ts +48 -0
- package/lib/types/widgets/adw-avatar.d.ts +20 -0
- package/lib/types/widgets/adw-banner.d.ts +25 -0
- package/lib/types/widgets/adw-bottom-sheet.d.ts +28 -0
- package/lib/types/widgets/adw-button-content.d.ts +18 -0
- package/lib/types/widgets/adw-button-row.d.ts +18 -0
- package/lib/types/widgets/adw-button.d.ts +21 -0
- package/lib/types/widgets/adw-carousel.d.ts +41 -0
- package/lib/types/widgets/adw-clamp.d.ts +15 -0
- package/lib/types/widgets/adw-combo-row.d.ts +42 -0
- package/lib/types/widgets/adw-entry-row.d.ts +17 -0
- package/lib/types/widgets/adw-expander-row.d.ts +24 -0
- package/lib/types/widgets/adw-header-bar.d.ts +35 -0
- package/lib/types/widgets/adw-icon.d.ts +19 -0
- package/lib/types/widgets/adw-image-button.d.ts +24 -0
- package/lib/types/widgets/adw-inline-view-switcher.d.ts +6 -0
- package/lib/types/widgets/adw-navigation-split-view.d.ts +11 -0
- package/lib/types/widgets/adw-navigation-view.d.ts +33 -0
- package/lib/types/widgets/adw-overlay-split-view.d.ts +28 -0
- package/lib/types/widgets/adw-password-entry-row.d.ts +4 -0
- package/lib/types/widgets/adw-preferences-dialog.d.ts +26 -0
- package/lib/types/widgets/adw-preferences-group.d.ts +23 -0
- package/lib/types/widgets/adw-preferences-page.d.ts +12 -0
- package/lib/types/widgets/adw-sidebar.d.ts +27 -0
- package/lib/types/widgets/adw-slider-row.d.ts +44 -0
- package/lib/types/widgets/adw-spin-row.d.ts +37 -0
- package/lib/types/widgets/adw-spinner.d.ts +14 -0
- package/lib/types/widgets/adw-split-button.d.ts +29 -0
- package/lib/types/widgets/adw-status-page.d.ts +36 -0
- package/lib/types/widgets/adw-switch-row.d.ts +17 -0
- package/lib/types/widgets/adw-tab-view.d.ts +9 -0
- package/lib/types/widgets/adw-toast-overlay.d.ts +47 -0
- package/lib/types/widgets/adw-toggle-group.d.ts +22 -0
- package/lib/types/widgets/adw-toolbar-view.d.ts +22 -0
- package/lib/types/widgets/adw-view-switcher.d.ts +6 -0
- package/lib/types/widgets/adw-window-title.d.ts +19 -0
- package/lib/types/widgets/adw-wrap-box.d.ts +17 -0
- package/lib/types/widgets/icon-path.d.ts +36 -0
- package/lib/types/widgets/icons.android.d.ts +11 -0
- package/lib/types/widgets/icons.d.ts +10 -0
- package/lib/types/widgets/index.d.ts +71 -0
- package/lib/types/widgets/row-press.d.ts +8 -0
- package/lib/types/widgets/split-view-base.d.ts +67 -0
- package/lib/types/widgets/view-switcher-base.d.ts +47 -0
- package/package.json +89 -0
- package/src/theme/adwaita.css +1234 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.defineProperty,__name=(t,n)=>e(t,`name`,{value:n,configurable:!0});export{__name};
|
package/lib/esm/fonts.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{isNativeScript as e}from"@gjsify/native-platform";const t=`'Adwaita Sans', 'AdwaitaSans-Regular'`,n={regular:{source:`@gjsify/adwaita-fonts/files/adwaita-sans-400.ttf`,target:`AdwaitaSans-Regular.ttf`,postscriptName:`Adwaita Sans`},italic:{source:`@gjsify/adwaita-fonts/files/adwaita-sans-400-italic.ttf`,target:`AdwaitaSans-Italic.ttf`,postscriptName:`Adwaita Sans`}};function adwaitaFontInstallInstructions(){let{regular:e,italic:r}=n;return[`Install Adwaita Sans into your NativeScript app:`,``,`1. Resolve the TTFs from @gjsify/adwaita-fonts:`,` ${e.source}`,` ${r.source}`,``,`2. Copy them into BOTH platform resource font dirs, renamed so the`,` Android file name matches the font-family:`,` App_Resources/Android/src/main/assets/fonts/${e.target}`,` App_Resources/Android/src/main/assets/fonts/${r.target}`,` App_Resources/iOS/fonts/${e.target}`,` App_Resources/iOS/fonts/${r.target}`,``,`3. Use the dual font-family string: ${t}`,` (iOS resolves the PostScript name "Adwaita Sans"; Android resolves the`,` file name "AdwaitaSans-Regular".)`].join(`
|
|
2
|
+
`)}function hasAdwaitaSans(){return e}export{t as ADWAITA_SANS_FONT_FAMILY,n as ADWAITA_SANS_TTF_FILES,adwaitaFontInstallInstructions,hasAdwaitaSans};
|
package/lib/esm/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{AdwPreferencesPage as e}from"./widgets/adw-preferences-page.js";import{AdwPreferencesGroup as t}from"./widgets/adw-preferences-group.js";import{AdwActionRow as ee}from"./widgets/adw-action-row.js";import{AdwSwitchRow as n,NOTIFY_ACTIVE as r}from"./widgets/adw-switch-row.js";import{AdwEntryRow as i,NOTIFY_TEXT as a}from"./widgets/adw-entry-row.js";import{AdwPasswordEntryRow as o}from"./widgets/adw-password-entry-row.js";import{ADWAITA_ICON_GRID as s,DEFAULT_ICON_COLOR as c,DEFAULT_ICON_COLOR_DARK as l,extractIconPaths as u,extractPathData as d}from"./widgets/icon-path.js";import{renderSymbolicIcon as f}from"./widgets/icons.js";import{AdwIcon as p,DEFAULT_ADW_ICON_SIZE as m}from"./widgets/adw-icon.js";import{attachRowPressFeedback as h}from"./widgets/row-press.js";import{AdwComboRow as g,NOTIFY_SELECTED as _}from"./widgets/adw-combo-row.js";import{AdwSpinRow as v,NOTIFY_VALUE as y}from"./widgets/adw-spin-row.js";import{AdwSliderRow as b,NOTIFY_SLIDER_VALUE as x}from"./widgets/adw-slider-row.js";import{AdwExpanderRow as S,NOTIFY_EXPANDED as C}from"./widgets/adw-expander-row.js";import{AdwButton as w}from"./widgets/adw-button.js";import{AdwImageButton as T,DEFAULT_ICON_BUTTON_ICON_SIZE as E}from"./widgets/adw-image-button.js";import{AdwBanner as D,BUTTON_CLICKED as O}from"./widgets/adw-banner.js";import{AdwAvatar as k,DEFAULT_AVATAR_SIZE as A,avatarInitials as j}from"./widgets/adw-avatar.js";import{AdwWindowTitle as M}from"./widgets/adw-window-title.js";import{AdwClamp as N,DEFAULT_CLAMP_MAX_SIZE as P}from"./widgets/adw-clamp.js";import{AdwHeaderBar as F}from"./widgets/adw-header-bar.js";import{AdwToolbarView as I}from"./widgets/adw-toolbar-view.js";import{AdwWrapBox as L}from"./widgets/adw-wrap-box.js";import{AdwSpinner as R,DEFAULT_SPINNER_SIZE as z}from"./widgets/adw-spinner.js";import{AdwStatusPage as B}from"./widgets/adw-status-page.js";import{ACTIVATED as V,AdwButtonRow as H}from"./widgets/adw-button-row.js";import{AdwButtonContent as U}from"./widgets/adw-button-content.js";import{AdwSplitButton as W,CLICKED as te,MENU_TAPPED as G}from"./widgets/adw-split-button.js";import{AdwToggleGroup as K,NOTIFY_SELECTED as q}from"./widgets/adw-toggle-group.js";import{AdwViewSwitcherBase as J,NOTIFY_SELECTED as Y}from"./widgets/view-switcher-base.js";import{AdwViewSwitcher as X}from"./widgets/adw-view-switcher.js";import{AdwInlineViewSwitcher as Z}from"./widgets/adw-inline-view-switcher.js";import{AdwTabView as Q}from"./widgets/adw-tab-view.js";import{AdwCarousel as ne,DEFAULT_CAROUSEL_PAGE_WIDTH as re,NOTIFY_POSITION as ie}from"./widgets/adw-carousel.js";import{AdwNavigationView as ae,NOTIFY_VISIBLE_PAGE as oe}from"./widgets/adw-navigation-view.js";import{AdwSplitViewBase as se,DEFAULT_SIDEBAR_WIDTH as ce,NOTIFY_SHOW_SIDEBAR as le}from"./widgets/split-view-base.js";import{AdwNavigationSplitView as ue}from"./widgets/adw-navigation-split-view.js";import{AdwOverlaySplitView as de}from"./widgets/adw-overlay-split-view.js";import{AdwSidebar as fe,NOTIFY_SELECTED as pe}from"./widgets/adw-sidebar.js";import{AdwBottomSheet as me,NOTIFY_OPEN as he}from"./widgets/adw-bottom-sheet.js";import{AdwToast as ge,AdwToastOverlay as _e,DEFAULT_TOAST_TIMEOUT as ve,TOAST_BUTTON_CLICKED as ye}from"./widgets/adw-toast-overlay.js";import{AdwAlertDialog as be,NOTIFY_RESPONSE as xe}from"./widgets/adw-alert-dialog.js";import{AdwAboutDialog as Se,CLOSED as Ce}from"./widgets/adw-about-dialog.js";import{AdwPreferencesDialog as we,CLOSED as Te}from"./widgets/adw-preferences-dialog.js";import{registerAdwaitaElements as $}from"./widgets/index.js";import{ADWAITA_SANS_FONT_FAMILY as Ee,ADWAITA_SANS_TTF_FILES as De,adwaitaFontInstallInstructions as Oe,hasAdwaitaSans as ke}from"./fonts.js";import{assertNativeScript as Ae,assertNativeScript as je,isAndroid as Me,isIOS as Ne,isNativeScript as Pe}from"@gjsify/native-platform";function registerAdwaita(){je(),$()}export{Ce as ABOUT_CLOSED,V as ACTIVATED,s as ADWAITA_ICON_GRID,Ee as ADWAITA_SANS_FONT_FAMILY,De as ADWAITA_SANS_TTF_FILES,Se as AdwAboutDialog,ee as AdwActionRow,be as AdwAlertDialog,k as AdwAvatar,D as AdwBanner,me as AdwBottomSheet,w as AdwButton,U as AdwButtonContent,H as AdwButtonRow,ne as AdwCarousel,N as AdwClamp,g as AdwComboRow,i as AdwEntryRow,S as AdwExpanderRow,F as AdwHeaderBar,p as AdwIcon,T as AdwImageButton,Z as AdwInlineViewSwitcher,ue as AdwNavigationSplitView,ae as AdwNavigationView,de as AdwOverlaySplitView,o as AdwPasswordEntryRow,we as AdwPreferencesDialog,t as AdwPreferencesGroup,e as AdwPreferencesPage,fe as AdwSidebar,b as AdwSliderRow,v as AdwSpinRow,R as AdwSpinner,W as AdwSplitButton,se as AdwSplitViewBase,B as AdwStatusPage,n as AdwSwitchRow,Q as AdwTabView,ge as AdwToast,_e as AdwToastOverlay,K as AdwToggleGroup,I as AdwToolbarView,X as AdwViewSwitcher,J as AdwViewSwitcherBase,M as AdwWindowTitle,L as AdwWrapBox,O as BUTTON_CLICKED,te as CLICKED,m as DEFAULT_ADW_ICON_SIZE,A as DEFAULT_AVATAR_SIZE,re as DEFAULT_CAROUSEL_PAGE_WIDTH,P as DEFAULT_CLAMP_MAX_SIZE,E as DEFAULT_ICON_BUTTON_ICON_SIZE,c as DEFAULT_ICON_COLOR,l as DEFAULT_ICON_COLOR_DARK,ce as DEFAULT_SIDEBAR_WIDTH,z as DEFAULT_SPINNER_SIZE,ve as DEFAULT_TOAST_TIMEOUT,G as MENU_TAPPED,r as NOTIFY_ACTIVE,C as NOTIFY_EXPANDED,he as NOTIFY_OPEN,ie as NOTIFY_POSITION,xe as NOTIFY_RESPONSE,_ as NOTIFY_SELECTED,le as NOTIFY_SHOW_SIDEBAR,pe as NOTIFY_SIDEBAR_SELECTED,x as NOTIFY_SLIDER_VALUE,a as NOTIFY_TEXT,q as NOTIFY_TOGGLE_SELECTED,y as NOTIFY_VALUE,Y as NOTIFY_VIEW_SELECTED,oe as NOTIFY_VISIBLE_PAGE,Te as PREFERENCES_CLOSED,ye as TOAST_BUTTON_CLICKED,Oe as adwaitaFontInstallInstructions,Ae as assertNativeScript,h as attachRowPressFeedback,j as avatarInitials,u as extractIconPaths,d as extractPathData,ke as hasAdwaitaSans,Me as isAndroid,Ne as isIOS,Pe as isNativeScript,registerAdwaita,$ as registerAdwaitaElements,f as renderSymbolicIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Button as e,GridLayout as t,ItemSpec as n,Label as r,ScrollView as i,StackLayout as a}from"@nativescript/core";const o=`closed`;var AdwAboutDialog=class extends t{_card;_iconLabel;_nameLabel;_versionLabel;_developerLabel;_commentsLabel;_websiteLabel;_copyrightLabel;_applicationName=``;_applicationIcon=``;_developerName=``;_version=``;_comments=``;_website=``;_copyright=``;constructor(){super(),this.className=`adw-about-dialog`,this.visibility=`collapse`,this.addColumn(new n(1,`star`)),this.addRow(new n(1,`star`));let r=new i;r.orientation=`vertical`,r.verticalAlignment=`middle`,r.horizontalAlignment=`center`,t.setColumn(r,0),t.setRow(r,0);let o=new a;o.orientation=`vertical`,o.className=`adw-about-dialog-card`,r.content=o,this.addChild(r),this._card=o,this._iconLabel=this._addCardLabel(o,`adw-about-dialog-icon`),this._nameLabel=this._addCardLabel(o,`adw-about-dialog-name`),this._versionLabel=this._addCardLabel(o,`adw-about-dialog-version`),this._developerLabel=this._addCardLabel(o,`adw-about-dialog-developer`),this._commentsLabel=this._addCardLabel(o,`adw-about-dialog-comments`),this._websiteLabel=this._addCardLabel(o,`adw-about-dialog-website`),this._copyrightLabel=this._addCardLabel(o,`adw-about-dialog-copyright`);let s=new e;s.text=`Close`,s.className=`adw-about-dialog-close`,s.set(`androidElevation`,0),s.addEventListener(`tap`,()=>this.close()),o.addChild(s)}_addCardLabel(e,t){let n=new r;return n.className=t,n.horizontalAlignment=`center`,n.textWrap=!0,e.addChild(n),n}get applicationName(){return this._applicationName}set applicationName(e){this._applicationName=e??``,this._nameLabel.text=this._applicationName}get applicationIcon(){return this._applicationIcon}set applicationIcon(e){this._applicationIcon=e??``,this._iconLabel.text=this._applicationIcon}get version(){return this._version}set version(e){this._version=e??``,this._versionLabel.text=this._version}get developerName(){return this._developerName}set developerName(e){this._developerName=e??``,this._developerLabel.text=this._developerName}get comments(){return this._comments}set comments(e){this._comments=e??``,this._commentsLabel.text=this._comments}get website(){return this._website}set website(e){this._website=e??``,this._websiteLabel.text=this._website}get copyright(){return this._copyright}set copyright(e){this._copyright=e??``,this._copyrightLabel.text=this._copyright}present(){this.visibility=`visible`}close(){this.visibility=`collapse`;let e={eventName:o,object:this};this.notify(e)}get open(){return this.visibility===`visible`}set open(e){e?this.present():this.close()}};export{AdwAboutDialog,o as CLOSED};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t,Label as n,StackLayout as r}from"@nativescript/core";var AdwActionRow=class extends e{_textStack;_titleLabel;_subtitleLabel;_hasSubtitle=!1;_suffix=null;constructor(){super(),this.className=`adw-row adw-action-row`,this.addColumn(new t(1,`star`)),this.addColumn(new t(1,`auto`)),this.addRow(new t(1,`auto`));let i=new r;i.orientation=`vertical`,i.className=`adw-row-text`,e.setColumn(i,0);let a=new n;a.className=`adw-row-title`,a.textWrap=!0,i.addChild(a);let o=new n;o.className=`adw-row-subtitle`,o.textWrap=!0,this.addChild(i),this._textStack=i,this._titleLabel=a,this._subtitleLabel=o}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??``}get subtitle(){return this._hasSubtitle?this._subtitleLabel.text??``:``}set subtitle(e){let t=e??``;this._subtitleLabel.text=t;let n=t.length>0;n&&!this._hasSubtitle?(this._textStack.addChild(this._subtitleLabel),this._hasSubtitle=!0):!n&&this._hasSubtitle&&(this._textStack.removeChild(this._subtitleLabel),this._hasSubtitle=!1)}setSuffix(t){this._suffix&&=(this.removeChild(this._suffix),null),t&&(t.className=`${t.className??``} adw-row-suffix`.trim(),e.setColumn(t,1),this.addChild(t),this._suffix=t)}get suffix(){return this._suffix}};export{AdwActionRow};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Observable as e,action as t,confirm as n}from"@nativescript/core";const r=`notify::response`;var AdwAlertDialog=class extends e{_heading=``;_body=``;_responses=[];_defaultResponse=null;_closeResponse=`close`;constructor(e=``,t=``){super(),this._heading=e,this._body=t}get heading(){return this._heading}set heading(e){this._heading=e??``}get body(){return this._body}set body(e){this._body=e??``}addResponse(e,t){this._responses.push({id:e,label:t})}addResponses(...e){for(let t=0;t+1<e.length;t+=2)this.addResponse(e[t],e[t+1])}get defaultResponse(){return this._defaultResponse}set defaultResponse(e){this._defaultResponse=e}get closeResponse(){return this._closeResponse}set closeResponse(e){this._closeResponse=e||`close`}get responses(){return this._responses}async present(){let e=this._responses.length<=3?await this._presentConfirm():await this._presentAction();return this.notify({eventName:r,object:this,response:e}),e}async _presentConfirm(){let e=this._orderResponses(),t=e.ok?.label,r=e.cancel?.label,i=e.neutral?.label,a=await n({title:this._heading||void 0,message:this._body||void 0,okButtonText:t,cancelButtonText:r,neutralButtonText:i,cancelable:!0});return a===!0&&e.ok?e.ok.id:a===!1&&e.cancel?e.cancel.id:a===void 0&&e.neutral?e.neutral.id:this._closeResponse}_orderResponses(){let byId=e=>this._responses.find(t=>t.id===e),e=byId(this._defaultResponse)??this._responses[0],t=this._responses.filter(t=>t!==e);return{ok:e,cancel:t[t.length-1],neutral:t.length>=2?t[0]:void 0}}async _presentAction(){let e=this._responses.map(e=>e.label),n=await t({title:this._heading||void 0,message:this._body||void 0,cancelButtonText:`Cancel`,actions:e});return this._responses.find(e=>e.label===n)?.id??this._closeResponse}};export{AdwAlertDialog,r as NOTIFY_RESPONSE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t,Label as n}from"@nativescript/core";const r=48;function avatarInitials(e){let t=(e??``).trim().split(/\s+/).filter(Boolean);return t.length===0?``:t.length===1?t[0].charAt(0).toUpperCase():(t[0].charAt(0)+t[t.length-1].charAt(0)).toUpperCase()}var AdwAvatar=class extends e{_label;_text=``;_size=48;constructor(){super(),this.className=`adw-avatar`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`star`));let r=new n;r.className=`adw-avatar-label`,r.horizontalAlignment=`center`,r.verticalAlignment=`middle`,e.setColumn(r,0),e.setRow(r,0),this.addChild(r),this._label=r,this._applySize()}_applySize(){this.width=this._size,this.height=this._size,this.set(`borderRadius`,this._size/2),this._label.set(`fontSize`,Math.round(this._size*.4))}get text(){return this._text}set text(e){this._text=e??``,this._label.text=avatarInitials(this._text)}get size(){return this._size}set size(e){this._size=Number.isFinite(e)&&e>0?e:48,this._applySize()}};export{AdwAvatar,r as DEFAULT_AVATAR_SIZE,avatarInitials};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Button as e,GridLayout as t,ItemSpec as n,Label as r}from"@nativescript/core";const i=`buttonClicked`;var AdwBanner=class extends t{_titleLabel;_button;_hasButton=!1;_revealed=!0;constructor(){super(),this.className=`adw-banner`,this.addColumn(new n(1,`star`)),this.addColumn(new n(1,`auto`)),this.addRow(new n(1,`auto`));let a=new r;a.className=`adw-banner-title`,a.textWrap=!0,t.setColumn(a,0),this.addChild(a),this._titleLabel=a;let o=new e;o.className=`adw-banner-button`,o.set(`androidElevation`,0),t.setColumn(o,1),this._button=o,o.addEventListener(`tap`,()=>{let e={eventName:i,object:this};this.notify(e)})}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??``}get buttonLabel(){return this._hasButton?this._button.text??``:``}set buttonLabel(e){let t=e??``;this._button.text=t;let n=t.length>0;n&&!this._hasButton?(this.addChild(this._button),this._hasButton=!0):!n&&this._hasButton&&(this.removeChild(this._button),this._hasButton=!1)}get revealed(){return this._revealed}set revealed(e){this._revealed=!!e,this.visibility=this._revealed?`visible`:`collapse`}};export{AdwBanner,i as BUTTON_CLICKED};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t,Label as n,StackLayout as r}from"@nativescript/core";const i=`notify::open`;var AdwBottomSheet=class extends e{_content=null;_sheetPanel;_sheetChild=null;_open=!1;constructor(){super(),this.className=`adw-bottom-sheet`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`star`));let i=new r;i.orientation=`vertical`,i.className=`adw-bottom-sheet-panel`,i.verticalAlignment=`bottom`,i.visibility=`collapse`,e.setColumn(i,0),e.setRow(i,0);let a=new n;a.text=`━`,a.className=`adw-bottom-sheet-handle`,a.horizontalAlignment=`center`,a.addEventListener(`tap`,()=>this.close()),i.addChild(a),this.addChild(i),this._sheetPanel=i}setContent(t){this._content&&this.removeChild(this._content),this._content=t,t&&(t.className=`${t.className??``} adw-bottom-sheet-content`.trim(),e.setColumn(t,0),e.setRow(t,0),this.insertChild(t,0))}setSheet(e){this._sheetChild&&this._sheetPanel.removeChild(this._sheetChild),this._sheetChild=e,e&&(e.className=`${e.className??``} adw-bottom-sheet-sheet`.trim(),this._sheetPanel.addChild(e))}open(){this.openState=!0}close(){this.openState=!1}get openState(){return this._open}set openState(e){let t=!!e;if(t===this._open)return;this._open=t,this._sheetPanel.visibility=t?`visible`:`collapse`;let n={eventName:i,object:this,open:t};this.notify(n)}};export{AdwBottomSheet,i as NOTIFY_OPEN};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Label as e,StackLayout as t}from"@nativescript/core";var AdwButtonContent=class extends t{_iconLabel;_label;_hasIcon=!1;constructor(){super(),this.orientation=`horizontal`,this.className=`adw-button-content`,this.horizontalAlignment=`center`;let t=new e;t.className=`adw-button-content-icon`,t.verticalAlignment=`middle`,this._iconLabel=t;let n=new e;n.className=`adw-button-content-label`,n.verticalAlignment=`middle`,this.addChild(n),this._label=n}get iconName(){return this._hasIcon?this._iconLabel.text??``:``}set iconName(e){let t=e??``;this._iconLabel.text=t;let n=t.length>0;n&&!this._hasIcon?(this.removeChild(this._label),this.addChild(this._iconLabel),this.addChild(this._label),this._hasIcon=!0):!n&&this._hasIcon&&(this.removeChild(this._iconLabel),this._hasIcon=!1)}get label(){return this._label.text??``}set label(e){this._label.text=e??``}};export{AdwButtonContent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{attachRowPressFeedback as t}from"./row-press.js";import{Label as n,StackLayout as r}from"@nativescript/core";const i=`activated`;var AdwButtonRow=class extends e{_contentBox;_startIconLabel;_hasStartIcon=!1;constructor(){super(),this.className=`adw-row adw-action-row adw-button-row`,this._titleLabel.className=`adw-button-row-title`,this._titleLabel.horizontalAlignment=`center`,this._textStack.removeChild(this._titleLabel);let e=new r;e.orientation=`horizontal`,e.className=`adw-button-row-content`,e.horizontalAlignment=`center`;let a=new n;a.className=`adw-button-row-start-icon`,e.addChild(this._titleLabel),this._textStack.addChild(e),this._textStack.horizontalAlignment=`center`,this._contentBox=e,this._startIconLabel=a,this.addEventListener(`tap`,()=>{let e={eventName:i,object:this};this.notify(e)}),t(this)}get startIcon(){return this._hasStartIcon?this._startIconLabel.text??``:``}set startIcon(e){let t=e??``;this._startIconLabel.text=t;let n=t.length>0;n&&!this._hasStartIcon?(this._contentBox.removeChild(this._titleLabel),this._contentBox.addChild(this._startIconLabel),this._contentBox.addChild(this._titleLabel),this._hasStartIcon=!0):!n&&this._hasStartIcon&&(this._contentBox.removeChild(this._startIconLabel),this._hasStartIcon=!1)}};export{i as ACTIVATED,AdwButtonRow};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Button as e}from"@nativescript/core";const t={"suggested-action":`suggested-action`,"destructive-action":`destructive-action`,flat:`flat`,pill:`pill`},n=Object.values(t);var AdwButton=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 n=[`adw-button`];e!==`default`&&n.push(t[e]),this.className=n.join(` `)}static get variantClasses(){return n}};export{AdwButton};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t,Label as n,ScrollView as r,StackLayout as i}from"@nativescript/core";const a=`notify::position`,o=320;var AdwCarousel=class extends e{_scroller;_track;_dots;_pages=[];_dotLabels=[];_position=0;_pageWidth=320;constructor(){super(),this.className=`adw-carousel`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`star`)),this.addRow(new t(1,`auto`));let n=new r;n.orientation=`horizontal`,n.className=`adw-carousel-scroller`,e.setRow(n,0);let a=new i;a.orientation=`horizontal`,a.className=`adw-carousel-track`,n.content=a,this.addChild(n),this._scroller=n,this._track=a;let o=new i;o.orientation=`horizontal`,o.className=`adw-carousel-dots`,o.horizontalAlignment=`center`,e.setRow(o,1),this.addChild(o),this._dots=o}addPage(e){e.width=this._pageWidth,e.className=`${e.className??``} adw-carousel-page`.trim(),this._track.addChild(e),this._pages.push(e);let t=new n;t.text=`●`,t.className=`adw-carousel-dot`;let r=this._dotLabels.length;t.addEventListener(`tap`,()=>this.scrollToPage(r)),this._dots.addChild(t),this._dotLabels.push(t),this._applyDots()}scrollToPage(e){let t=Math.max(0,Math.min(this._pages.length-1,e));this._scroller.scrollToHorizontalOffset(t*this._pageWidth,!0),this._setPosition(t,!0)}_setPosition(e,t){if(e===this._position){this._applyDots();return}if(this._position=e,this._applyDots(),t){let t={eventName:a,object:this,position:e};this.notify(t)}}_applyDots(){this._dotLabels.forEach((e,t)=>{e.className=t===this._position?`adw-carousel-dot active`:`adw-carousel-dot`})}get nPages(){return this._pages.length}get position(){return this._position}set position(e){this.scrollToPage(Number.isFinite(e)?Math.round(e):0)}get pageWidth(){return this._pageWidth}set pageWidth(e){this._pageWidth=Number.isFinite(e)&&e>0?e:320;for(let e of this._pages)e.width=this._pageWidth}};export{AdwCarousel,o as DEFAULT_CAROUSEL_PAGE_WIDTH,a as NOTIFY_POSITION};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t}from"@nativescript/core";const n=600;var AdwClamp=class extends e{_maximumSize=600;_child=null;constructor(){super(),this.className=`adw-clamp`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`star`))}setChild(t){this._child&&=(this.removeChild(this._child),null),t&&(t.horizontalAlignment=`center`,t.width=this._maximumSize,e.setColumn(t,0),e.setRow(t,0),this.addChild(t),this._child=t)}get child(){return this._child}get maximumSize(){return this._maximumSize}set maximumSize(e){this._maximumSize=Number.isFinite(e)&&e>0?e:600,this._child&&(this._child.width=this._maximumSize)}};export{AdwClamp,n as DEFAULT_CLAMP_MAX_SIZE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwIcon as t}from"./adw-icon.js";import{attachRowPressFeedback as n}from"./row-press.js";import{Label as r,StackLayout as i,action as a}from"@nativescript/core";import{panDownSymbolic as o}from"@gjsify/adwaita-icons/ui";const s=`notify::selected`;var AdwComboRow=class extends e{_valueLabel;_chevron;_options=[];_selectedIndex=0;constructor(){super(),this.className=`adw-row adw-action-row adw-combo-row`;let e=new i;e.orientation=`horizontal`,e.className=`adw-combo-suffix`;let a=new r;a.className=`adw-combo-value`,a.text=``;let s=new t;s.className=`adw-combo-chevron`,s.iconColor=`#9a9a9a`,s.iconSize=16,s.icon=o,e.addChild(a),e.addChild(s),this.setSuffix(e),this._valueLabel=a,this._chevron=s,this.addEventListener(`tap`,()=>{this._openChooser()}),n(this)}async _openChooser(){if(this._options.length===0)return;let e=this._options.map(e=>e.label),t=await a({title:this.title||void 0,cancelButtonText:`Cancel`,actions:e}),n=e.indexOf(t);n>=0&&n!==this._selectedIndex&&(this.selectedIndex=n,this._emitSelected())}_syncValueLabel(){this._valueLabel.text=this._options[this._selectedIndex]?.label??``}_emitSelected(){let e={eventName:s,object:this,selected:this._selectedIndex,value:this.selectedValue};this.notify(e)}get options(){return this._options}set options(e){this._options=Array.isArray(e)?e:[],this._selectedIndex>=this._options.length&&(this._selectedIndex=0),this._syncValueLabel()}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){let t=Number.isFinite(e)?e:0;t!==this._selectedIndex&&(this._selectedIndex=t,this._syncValueLabel())}get selectedValue(){return this._options[this._selectedIndex]?.value??``}set selectedValue(e){let t=this._options.findIndex(t=>t.value===e);t>=0&&(this.selectedIndex=t)}};export{AdwComboRow,s as NOTIFY_SELECTED};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{TextField as t}from"@nativescript/core";const n=`notify::text`;var AdwEntryRow=class extends e{_field;constructor(){super(),this.className=`adw-row adw-action-row adw-entry-row`,this._titleLabel.className=`adw-row-title adw-entry-title`;let e=new t;e.className=`adw-entry-field`,e.set(`backgroundColor`,`transparent`),e.set(`borderWidth`,0),this._textStack.addChild(e),this._field=e,e.addEventListener(`textChange`,()=>{let t={eventName:n,object:this,text:e.text??``};this.notify(t)})}get text(){return this._field.text??``}set text(e){let t=e??``;this._field.text!==t&&(this._field.text=t)}};export{AdwEntryRow,n as NOTIFY_TEXT};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{Button as t,GridLayout as n,ItemSpec as r,StackLayout as i}from"@nativescript/core";const a=`notify::expanded`;var AdwExpanderRow=class extends e{_toggle;_disclosure;_expanded=!1;constructor(){super(),this.className=`adw-row adw-action-row adw-expander-row`,this.addRow(new r(1,`auto`));let e=new i;e.orientation=`vertical`,e.className=`adw-expander-disclosure`,e.visibility=`collapse`,n.setRow(e,1),n.setColumn(e,0),n.setColumnSpan(e,2),this.addChild(e),this._disclosure=e;let a=new t;a.text=`▾`,a.className=`adw-expander-toggle`,a.set(`androidElevation`,0),this.setSuffix(a),this._toggle=a,a.addEventListener(`tap`,()=>{this.expanded=!this._expanded})}addRow(e){if(e instanceof r){super.addRow(e);return}this._disclosure.addChild(e)}removeRow(e){this._disclosure.removeChild(e)}get expanded(){return this._expanded}set expanded(e){let t=!!e;if(t===this._expanded)return;this._expanded=t,this._disclosure.visibility=t?`visible`:`collapse`,this._toggle.text=t?`▴`:`▾`;let n={eventName:a,object:this,expanded:t};this.notify(n)}};export{AdwExpanderRow,a as NOTIFY_EXPANDED};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwWindowTitle as e}from"./adw-window-title.js";import{GridLayout as t,ItemSpec as n,StackLayout as r}from"@nativescript/core";var AdwHeaderBar=class extends t{_startBox;_endBox;_titleWidget;_flat=!1;constructor(){super(),this.className=`adw-header-bar`,this.addColumn(new n(1,`auto`)),this.addColumn(new n(1,`star`)),this.addColumn(new n(1,`auto`)),this.addRow(new n(1,`auto`));let i=new r;i.orientation=`horizontal`,i.className=`adw-header-bar-start`,t.setColumn(i,0),this.addChild(i),this._startBox=i;let a=new e;a.horizontalAlignment=`center`,a.verticalAlignment=`middle`,t.setColumn(a,1),this.addChild(a),this._titleWidget=a;let o=new r;o.orientation=`horizontal`,o.className=`adw-header-bar-end`,o.horizontalAlignment=`right`,t.setColumn(o,2),this.addChild(o),this._endBox=o}get title(){return this._titleWidget instanceof e?this._titleWidget.title:``}set title(t){this._titleWidget instanceof e&&(this._titleWidget.title=t??``)}get subtitle(){return this._titleWidget instanceof e?this._titleWidget.subtitle:``}set subtitle(t){this._titleWidget instanceof e&&(this._titleWidget.subtitle=t??``)}get flat(){return this._flat}set flat(e){this._flat=!!e,this.className=this._flat?`adw-header-bar flat`:`adw-header-bar`}packStart(e){this._startBox.addChild(e)}packEnd(e){this._endBox.addChild(e)}setTitleWidget(e){this._titleWidget&&this.removeChild(this._titleWidget),e.horizontalAlignment=`center`,e.verticalAlignment=`middle`,t.setColumn(e,1),this.addChild(e),this._titleWidget=e}get titleWidget(){return this._titleWidget}get startBox(){return this._startBox}get endBox(){return this._endBox}};export{AdwHeaderBar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{DEFAULT_ICON_COLOR as e}from"./icon-path.js";import{renderSymbolicIcon as t}from"./icons.js";import{Image as n}from"@nativescript/core";const r=16;var AdwIcon=class extends n{_iconSvg=``;_iconColor=e;_iconSize=16;constructor(){super(),this.className=`adw-icon`,this.stretch=`aspectFit`,this.width=this._iconSize,this.height=this._iconSize}_render(){if(!this._iconSvg)return;let e=t(this._iconSvg,{size:this._iconSize,color:this._iconColor});e&&(this.imageSource=e)}get icon(){return this._iconSvg}set icon(e){this._iconSvg=e??``,this._render()}get iconColor(){return this._iconColor}set iconColor(e){this._iconColor=e||`#33333A`,this._render()}get iconSize(){return this._iconSize}set iconSize(e){this._iconSize=Number.isFinite(e)&&e>0?e:16,this.width=this._iconSize,this.height=this._iconSize,this._render()}};export{AdwIcon,r as DEFAULT_ADW_ICON_SIZE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{DEFAULT_ICON_COLOR as e}from"./icon-path.js";import{renderSymbolicIcon as t}from"./icons.js";import{attachRowPressFeedback as n}from"./row-press.js";import{GridLayout as r,Image as i,ItemSpec as a}from"@nativescript/core";const o=16;var AdwImageButton=class extends r{_image;_iconSvg=``;_iconColor=e;_iconSize=16;constructor(){super(),this.className=`adw-image-button`,this.addRow(new a(1,`star`)),this.addColumn(new a(1,`star`));let e=new i;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,n(this)}_render(){if(!this._iconSvg)return;let e=t(this._iconSvg,{size:this._iconSize,color:this._iconColor});e&&(this._image.imageSource=e)}get icon(){return this._iconSvg}set icon(e){this._iconSvg=e??``,this._image.width=this._iconSize,this._image.height=this._iconSize,this._render()}get iconColor(){return this._iconColor}set iconColor(e){this._iconColor=e||`#33333A`,this._render()}get iconSize(){return this._iconSize}set iconSize(e){this._iconSize=Number.isFinite(e)&&e>0?e:16,this._image.width=this._iconSize,this._image.height=this._iconSize,this._render()}get image(){return this._image}};export{AdwImageButton,o as DEFAULT_ICON_BUTTON_ICON_SIZE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwViewSwitcherBase as e}from"./view-switcher-base.js";var AdwInlineViewSwitcher=class extends e{constructor(){super(`adw-inline-view-switcher`),this._initClasses()}get barClass(){return`adw-inline-view-switcher-bar`}get buttonClass(){return`adw-inline-view-switcher-button`}};export{AdwInlineViewSwitcher};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwSplitViewBase as e}from"./split-view-base.js";import{GridLayout as t}from"@nativescript/core";var AdwNavigationSplitView=class extends e{constructor(){super(`adw-navigation-split-view`),this._applyLayout()}_applyLayout(){if(!this._collapsed){this._sidebar&&(this._sidebar.visibility=`visible`,this._sidebar.translateX=0,t.setColumn(this._sidebar,0),t.setColumnSpan(this._sidebar,1),this._sidebar.width=this._sidebarWidth),this._content&&(this._content.visibility=`visible`,this._content.translateX=0,t.setColumn(this._content,1),t.setColumnSpan(this._content,1));return}this._sidebar&&(this._sidebar.visibility=this._showSidebar?`visible`:`collapse`,this._sidebar.translateX=0,t.setColumn(this._sidebar,0),t.setColumnSpan(this._sidebar,2),this._sidebar.width=`auto`),this._content&&(this._content.visibility=this._showSidebar?`collapse`:`visible`,this._content.translateX=0,t.setColumn(this._content,0),t.setColumnSpan(this._content,2))}_transitionSidebar(){if(!this._collapsed||!this._shouldAnimate()||!this._sidebar||!this._content){this._applyLayout();return}this._cancelPending();for(let e of[this._sidebar,this._content])t.setColumn(e,0),t.setColumnSpan(e,2);this._sidebar.width=`auto`;let e=this._paneWidth(),n=this._showSidebar?this._sidebar:this._content,r=this._showSidebar?this._content:this._sidebar,i=this._showSidebar?-e:e,a=this._showSidebar?e:-e;n.visibility=`visible`,n.translateX=i,r.visibility=`visible`,r.translateX=0,this._track(n.animate({translate:{x:0,y:0},duration:200,curve:`easeOut`})),this._track(r.animate({translate:{x:a,y:0},duration:200,curve:`easeIn`})).then(()=>this._settleAfterSwap(n,r)).catch(()=>{})}_settleAfterSwap(e,t){(this._showSidebar?this._sidebar:this._content)===e&&(t.visibility=`collapse`,t.translateX=0)}_paneWidth(){let e=this.getActualSize();return e&&e.width>0?e.width:1024}};export{AdwNavigationSplitView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t}from"@nativescript/core";const n=`notify::visible-page`;var AdwNavigationView=class extends e{_pages=[];_stack=[];constructor(){super(),this.className=`adw-navigation-view`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`star`))}add(t,n=null){let r={view:t,tag:n};t.className=`${t.className??``} adw-navigation-page`.trim(),t.visibility=`collapse`,e.setColumn(t,0),e.setRow(t,0),this.addChild(t),this._pages.push(r),this._stack.length===0&&(this._stack.push(r),this._applyVisible(!1))}push(e){let t;if(typeof e==`string`)t=this._pages.find(t=>t.tag===e);else if(t=this._pages.find(t=>t.view===e),!t&&(this.add(e),t=this._pages[this._pages.length-1],this._stack[this._stack.length-1]===t)){this._applyVisible(!0);return}t&&(this._stack.push(t),this._applyVisible(!0))}pop(){return this._stack.length<=1?!1:(this._stack.pop(),this._applyVisible(!0),!0)}_applyVisible(e){let t=this._stack[this._stack.length-1];for(let e of this._pages)e.view.visibility=e===t?`visible`:`collapse`;if(e){let e={eventName:n,object:this,tag:t?.tag??null,depth:this._stack.length};this.notify(e)}}get visiblePage(){return this._stack[this._stack.length-1]?.view??null}get visiblePageTag(){return this._stack[this._stack.length-1]?.tag??null}get depth(){return this._stack.length}};export{AdwNavigationView,n as NOTIFY_VISIBLE_PAGE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwSplitViewBase as e}from"./split-view-base.js";import{GridLayout as t}from"@nativescript/core";var AdwOverlaySplitView=class extends e{_scrim=null;constructor(){super(`adw-overlay-split-view`),this._applyLayout()}_applyLayout(){let e=this._sidebarPosition===`end`;if(!this._collapsed){this._detachScrim(),this._sidebar&&(this._sidebar.visibility=`visible`,this._sidebar.translateX=0,this._sidebar.opacity=1,t.setColumn(this._sidebar,+!!e),t.setColumnSpan(this._sidebar,1),this._sidebar.width=this._sidebarWidth),this._content&&(this._content.visibility=`visible`,t.setColumn(this._content,+!e),t.setColumnSpan(this._content,1));return}this._content&&(this._content.visibility=`visible`,t.setColumn(this._content,0),t.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(t.setColumn(this._scrim,0),t.setColumnSpan(this._scrim,2),this._scrim.visibility=this._showSidebar?`visible`:`collapse`,this._scrim.opacity=+!!this._showSidebar),this._sidebar&&(t.setColumn(this._sidebar,0),t.setColumnSpan(this._sidebar,2),this._sidebar.width=this._sidebarWidth,this._sidebar.horizontalAlignment=e?`right`:`left`,this._sidebar.className=`${this._stripOverlay(this._sidebar.className)} adw-split-view-sidebar adw-overlay-active`.trim(),this._sidebar.visibility=this._showSidebar?`visible`:`collapse`,this._sidebar.translateX=this._showSidebar?0:this._hiddenOffset(),this._sidebar.opacity=1)}_transitionSidebar(){if(!this._collapsed||!this._shouldAnimate()){this._applyLayout();return}this._cancelPending(),this._prepareCollapsedStructure(),this._showSidebar?this._animateOpen():this._animateClose()}_ensureScrim(){if(this._scrim)return this._scrim;let e=new t;return e.className=`adw-overlay-scrim`,e.visibility=`collapse`,e.opacity=0,e.addEventListener(`tap`,()=>this.hideSidebarPane()),this._scrim=e,e}_raiseOverlayChildren(){let e=this._ensureScrim();this._isChild(e)&&this.removeChild(e);let t=this._sidebar;t&&this._isChild(t)&&this.removeChild(t),this.addChild(e),t&&this.addChild(t)}_detachScrim(){this._scrim&&this._isChild(this._scrim)&&this.removeChild(this._scrim)}_prepareCollapsedStructure(){let e=this._sidebarPosition===`end`;this._content&&(this._content.visibility=`visible`,t.setColumn(this._content,0),t.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(t.setColumn(this._scrim,0),t.setColumnSpan(this._scrim,2)),this._sidebar&&(t.setColumn(this._sidebar,0),t.setColumnSpan(this._sidebar,2),this._sidebar.width=this._sidebarWidth,this._sidebar.horizontalAlignment=e?`right`:`left`,this._sidebar.className=`${this._stripOverlay(this._sidebar.className)} adw-split-view-sidebar adw-overlay-active`.trim())}_animateOpen(){let e=this._scrim;e&&(e.visibility=`visible`,e.opacity=0,this._track(e.animate({opacity:1,duration:200,curve:`easeOut`})));let t=this._sidebar;t&&(t.visibility=`visible`,t.translateX=this._hiddenOffset(),t.opacity=1,this._track(t.animate({translate:{x:0,y:0},duration:200,curve:`easeOut`})))}_animateClose(){let e=this._scrim,t=this._sidebar,n=[];e&&n.push(this._track(e.animate({opacity:0,duration:200,curve:`easeIn`}))),t&&n.push(this._track(t.animate({translate:{x:this._hiddenOffset(),y:0},duration:200,curve:`easeIn`}))),Promise.all(n).then(()=>{this._showSidebar||(t&&(t.visibility=`collapse`),e&&(e.visibility=`collapse`))}).catch(()=>{})}_hiddenOffset(){return this._sidebarPosition===`end`?this._sidebarWidth:-this._sidebarWidth}_stripOverlay(e){return(e??``).split(/\s+/).filter(e=>e&&e!==`adw-overlay-active`&&e!==`adw-split-view-sidebar`).join(` `)}};export{AdwOverlaySplitView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwEntryRow as e}from"./adw-entry-row.js";var AdwPasswordEntryRow=class extends e{constructor(){super(),this.className=`adw-row adw-action-row adw-entry-row adw-password-entry-row`,this._field.className=`adw-entry-field adw-password-field`,this._field.secure=!0}};export{AdwPasswordEntryRow};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Button as e,GridLayout as t,ItemSpec as n,Label as r,StackLayout as i}from"@nativescript/core";const a=`closed`;var AdwPreferencesDialog=class extends t{_card;_headerBox;_titleLabel;_body;constructor(){super(),this.className=`adw-preferences-dialog`,this.visibility=`collapse`,this.addColumn(new n(1,`star`)),this.addRow(new n(1,`star`));let a=new t;a.className=`adw-preferences-dialog-card`,a.verticalAlignment=`middle`,a.horizontalAlignment=`center`,a.addColumn(new n(1,`star`)),a.addRow(new n(1,`auto`)),a.addRow(new n(1,`star`)),t.setColumn(a,0),t.setRow(a,0),this.addChild(a),this._card=a;let o=new t;o.className=`adw-preferences-dialog-header`,o.addColumn(new n(1,`star`)),o.addColumn(new n(1,`auto`)),o.addRow(new n(1,`auto`)),t.setRow(o,0),a.addChild(o),this._headerBox=o;let s=new r;s.className=`adw-preferences-dialog-title`,s.text=`Preferences`,t.setColumn(s,0),o.addChild(s),this._titleLabel=s;let c=new e;c.text=`✕`,c.className=`adw-preferences-dialog-close`,c.set(`androidElevation`,0),c.addEventListener(`tap`,()=>this.close()),t.setColumn(c,1),o.addChild(c);let l=new i;l.orientation=`vertical`,l.className=`adw-preferences-dialog-body`,t.setRow(l,1),a.addChild(l),this._body=l}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??`Preferences`}add(e){this._body.addChild(e)}remove(e){this._body.removeChild(e)}present(){this.visibility=`visible`}close(){this.visibility=`collapse`;let e={eventName:a,object:this};this.notify(e)}get open(){return this.visibility===`visible`}set open(e){e?this.present():this.close()}get body(){return this._body}};export{AdwPreferencesDialog,a as CLOSED};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Label as e,StackLayout as t}from"@nativescript/core";var AdwPreferencesGroup=class extends t{_titleLabel;_hasTitle=!1;_listbox;constructor(){super(),this.orientation=`vertical`,this.className=`adw-preferences-group`;let n=new e;n.className=`adw-preferences-group-title`,n.textWrap=!0;let r=new t;r.orientation=`vertical`,r.className=`boxed-list adw-preferences-group-listbox`,this.addChild(r),this._titleLabel=n,this._listbox=r}get title(){return this._hasTitle?this._titleLabel.text??``:``}set title(e){let t=e??``;this._titleLabel.text=t;let n=t.length>0;n&&!this._hasTitle?(this.removeChild(this._listbox),this.addChild(this._titleLabel),this.addChild(this._listbox),this._hasTitle=!0):!n&&this._hasTitle&&(this.removeChild(this._titleLabel),this._hasTitle=!1)}addRow(e){this._listbox.addChild(e)}removeRow(e){this._listbox.removeChild(e)}get listbox(){return this._listbox}};export{AdwPreferencesGroup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{ScrollView as e,StackLayout as t}from"@nativescript/core";var AdwPreferencesPage=class extends e{_content;constructor(){super(),this.orientation=`vertical`,this.className=`adw-preferences-page`;let e=new t;e.orientation=`vertical`,e.className=`adw-preferences-page-content`,this.content=e,this._content=e}addGroup(e){this._content.addChild(e)}removeGroup(e){this._content.removeChild(e)}get groups(){return this._content}};export{AdwPreferencesPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{attachRowPressFeedback as e}from"./row-press.js";import{GridLayout as t,ItemSpec as n,Label as r,ScrollView as i,StackLayout as a}from"@nativescript/core";const o=`notify::selected`;var AdwSidebar=class extends i{_list;_rows=[];_items=[];_selected=0;constructor(){super(),this.orientation=`vertical`,this.className=`adw-sidebar`;let e=new a;e.orientation=`vertical`,e.className=`adw-sidebar-list`,this.content=e,this._list=e}setItems(i){for(let e of this._rows)this._list.removeChild(e);this._rows.length=0,this._items=Array.isArray(i)?i:[],this._items.forEach((i,a)=>{let o=new t;o.className=`adw-sidebar-row`,o.addColumn(new n(1,`star`)),o.addRow(new n(1,`auto`));let s=new r;s.className=`adw-sidebar-row-title`,s.text=i,s.textWrap=!0,t.setColumn(s,0),o.addChild(s),o.addEventListener(`tap`,()=>{this.selected=a}),e(o),this._list.addChild(o),this._rows.push(o)}),this._selected>=this._items.length&&(this._selected=0),this._applySelection()}_applySelection(){this._rows.forEach((e,t)=>{e.className=t===this._selected?`adw-sidebar-row active`:`adw-sidebar-row`})}get items(){return this._items}set items(e){this.setItems(e)}get selected(){return this._selected}set selected(e){let t=Number.isFinite(e)?e:0;if(t===this._selected||t<0||t>=this._items.length)return;this._selected=t,this._applySelection();let n={eventName:o,object:this,selected:t,title:this._items[t]??``};this.notify(n)}};export{AdwSidebar,o as NOTIFY_SELECTED};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t,Label as n,Slider as r,StackLayout as i}from"@nativescript/core";const a=`notify::value`;var AdwSliderRow=class extends i{_titleLabel;_valueLabel;_slider;_value=0;_min=0;_max=100;_step=1;_suppress=!1;constructor(){super(),this.orientation=`vertical`,this.className=`adw-slider-row`;let i=new e;i.className=`adw-slider-header`,i.addRow(new t(1,`auto`)),i.addColumn(new t(1,`star`)),i.addColumn(new t(1,`auto`));let o=new n;o.className=`adw-slider-title`,o.textWrap=!1,e.setColumn(o,0),i.addChild(o);let s=new n;s.className=`adw-slider-value`,s.text=String(this._value),e.setColumn(s,1),i.addChild(s);let c=new r;c.className=`adw-slider`,c.minValue=this._min,c.maxValue=this._max,c.value=this._value,this.addChild(i),this.addChild(c),this._titleLabel=o,this._valueLabel=s,this._slider=c,c.addEventListener(`valueChange`,()=>{if(this._suppress)return;let e=this._snap(this._slider.value);if(e!==this._slider.value&&(this._suppress=!0,this._slider.value=e,this._suppress=!1),e!==this._value){this._value=e,this._valueLabel.text=String(e);let t={eventName:a,object:this,value:e};this.notify(t)}})}_snap(e){let t=Math.min(this._max,Math.max(this._min,e)),n=Math.round((t-this._min)/this._step);return Math.min(this._max,this._min+n*this._step)}_sync(){this._suppress=!0,this._slider.value=this._value,this._suppress=!1,this._valueLabel.text=String(this._value)}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??``}get value(){return this._value}set value(e){let t=this._snap(Number.isFinite(e)?e:0);t!==this._value&&(this._value=t,this._sync())}get min(){return this._min}set min(e){this._min=Number.isFinite(e)?e:0,this._slider.minValue=this._min,this.value=this._value}get max(){return this._max}set max(e){this._max=Number.isFinite(e)?e:100,this._slider.maxValue=this._max,this.value=this._value}get step(){return this._step}set step(e){this._step=Number.isFinite(e)&&e>0?e:1}get slider(){return this._slider}};export{AdwSliderRow,a as NOTIFY_SLIDER_VALUE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{Button as t,Label as n,StackLayout as r}from"@nativescript/core";const i=`notify::value`;var AdwSpinRow=class extends e{_minusButton;_plusButton;_valueLabel;_value=0;_min=0;_max=100;_step=1;constructor(){super(),this.className=`adw-row adw-action-row adw-spin-row`;let e=new r;e.orientation=`horizontal`,e.className=`adw-spin-control`;let i=new t;i.text=`−`,i.className=`adw-spin-button adw-spin-minus`,i.set(`androidElevation`,0);let a=new n;a.className=`adw-spin-value`,a.text=String(this._value);let o=new t;o.text=`+`,o.className=`adw-spin-button adw-spin-plus`,o.set(`androidElevation`,0),e.addChild(i),e.addChild(a),e.addChild(o),this.setSuffix(e),this._minusButton=i,this._plusButton=o,this._valueLabel=a,i.addEventListener(`tap`,()=>this._bump(-this._step)),o.addEventListener(`tap`,()=>this._bump(this._step))}_bump(e){let t=this._clamp(this._value+e);if(t!==this._value){this._value=t,this._valueLabel.text=String(t);let e={eventName:i,object:this,value:t};this.notify(e)}}_clamp(e){return Math.min(this._max,Math.max(this._min,e))}get value(){return this._value}set value(e){let t=this._clamp(Number.isFinite(e)?e:0);t!==this._value&&(this._value=t,this._valueLabel.text=String(t))}get min(){return this._min}set min(e){this._min=Number.isFinite(e)?e:0,this.value=this._value}get max(){return this._max}set max(e){this._max=Number.isFinite(e)?e:0,this.value=this._value}get step(){return this._step}set step(e){this._step=Number.isFinite(e)&&e>0?e:1}};export{AdwSpinRow,i as NOTIFY_VALUE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{ActivityIndicator as e}from"@nativescript/core";const t=32;var AdwSpinner=class extends e{_size=32;constructor(){super(),this.className=`adw-spinner`,this.busy=!0,this._applySize()}_applySize(){this.width=this._size,this.height=this._size}get spinning(){return this.busy}set spinning(e){this.busy=!!e}get size(){return this._size}set size(e){this._size=Number.isFinite(e)&&e>0?e:32,this._applySize()}};export{AdwSpinner,t as DEFAULT_SPINNER_SIZE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Button as e,GridLayout as t,ItemSpec as n,action as r}from"@nativescript/core";const i=`clicked`,a=`menuTapped`;var AdwSplitButton=class extends t{_actionButton;_dropdownButton;_menu=[];constructor(){super(),this.className=`adw-split-button`,this.addColumn(new n(1,`star`)),this.addColumn(new n(1,`auto`)),this.addRow(new n(1,`auto`));let r=new e;r.className=`adw-split-button-action`,r.set(`androidElevation`,0),t.setColumn(r,0),this.addChild(r),this._actionButton=r;let a=new e;a.className=`adw-split-button-dropdown`,a.text=`⌄`,a.set(`androidElevation`,0),t.setColumn(a,1),this.addChild(a),this._dropdownButton=a,r.addEventListener(`tap`,()=>{let e={eventName:i,object:this};this.notify(e)}),a.addEventListener(`tap`,()=>{this._openMenu()})}async _openMenu(){if(this._menu.length===0)return;let e=await r({title:this.label||void 0,cancelButtonText:`Cancel`,actions:this._menu}),t=this._menu.indexOf(e);if(t>=0){let n={eventName:a,object:this,item:e,index:t};this.notify(n)}}get label(){return this._actionButton.text??``}set label(e){this._actionButton.text=e??``}get menu(){return this._menu}set menu(e){this._menu=Array.isArray(e)?e:[]}get actionButton(){return this._actionButton}};export{AdwSplitButton,i as CLICKED,a as MENU_TAPPED};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t,Label as n,StackLayout as r}from"@nativescript/core";var AdwStatusPage=class extends e{_stack;_iconLabel;_titleLabel;_descriptionLabel;_hasIcon=!1;_hasDescription=!1;_child=null;constructor(){super(),this.className=`adw-status-page`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`star`));let i=new r;i.orientation=`vertical`,i.className=`adw-status-page-content`,i.horizontalAlignment=`center`,i.verticalAlignment=`middle`,e.setColumn(i,0),e.setRow(i,0),this.addChild(i),this._stack=i;let a=new n;a.className=`adw-status-page-icon`,a.horizontalAlignment=`center`,this._iconLabel=a;let o=new n;o.className=`adw-status-page-title`,o.horizontalAlignment=`center`,o.textWrap=!0,i.addChild(o),this._titleLabel=o;let s=new n;s.className=`adw-status-page-description`,s.horizontalAlignment=`center`,s.textWrap=!0,this._descriptionLabel=s}get iconText(){return this._hasIcon?this._iconLabel.text??``:``}set iconText(e){let t=e??``;this._iconLabel.text=t;let n=t.length>0;n&&!this._hasIcon?(this._stack.removeChild(this._titleLabel),this._hasDescription&&this._stack.removeChild(this._descriptionLabel),this._stack.addChild(this._iconLabel),this._stack.addChild(this._titleLabel),this._hasDescription&&this._stack.addChild(this._descriptionLabel),this._hasIcon=!0):!n&&this._hasIcon&&(this._stack.removeChild(this._iconLabel),this._hasIcon=!1)}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??``}get description(){return this._hasDescription?this._descriptionLabel.text??``:``}set description(e){let t=e??``;this._descriptionLabel.text=t;let n=t.length>0;n&&!this._hasDescription?(this._child&&this._stack.removeChild(this._child),this._stack.addChild(this._descriptionLabel),this._child&&this._stack.addChild(this._child),this._hasDescription=!0):!n&&this._hasDescription&&(this._stack.removeChild(this._descriptionLabel),this._hasDescription=!1)}setChild(e){this._child&&=(this._stack.removeChild(this._child),null),e&&(e.className=`${e.className??``} adw-status-page-child`.trim(),e.horizontalAlignment=`center`,this._stack.addChild(e),this._child=e)}get child(){return this._child}};export{AdwStatusPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{Switch as t}from"@nativescript/core";const n=`notify::active`;var AdwSwitchRow=class extends e{_switch;constructor(){super(),this.className=`adw-row adw-action-row adw-switch-row`;let e=new t;e.className=`adw-switch`,this.setSuffix(e),this._switch=e,e.addEventListener(`checkedChange`,()=>{let t={eventName:n,object:this,active:e.checked};this.notify(t)})}get active(){return this._switch.checked}set active(e){let t=!!e;this._switch.checked!==t&&(this._switch.checked=t)}};export{AdwSwitchRow,n as NOTIFY_ACTIVE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwViewSwitcherBase as e}from"./view-switcher-base.js";var AdwTabView=class extends e{constructor(){super(`adw-tab-view`),this._initClasses(),this._bar.horizontalAlignment=`stretch`}get barClass(){return`adw-tab-view-bar`}get buttonClass(){return`adw-tab-view-tab`}get tabs(){return this.views}set tabs(e){this.views=e}};export{AdwTabView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Button as e,GridLayout as t,ItemSpec as n,Label as r}from"@nativescript/core";const i=5e3,a=`toastButtonClicked`;var AdwToast=class{title;timeout;buttonLabel;constructor(e=``,t={}){this.title=e,this.timeout=t.timeout??5e3,this.buttonLabel=t.buttonLabel??``}},AdwToastOverlay=class extends t{_content=null;_toastStrip;_toastLabel;_toastButton;_hasButton=!1;_dismissTimer=null;constructor(){super(),this.className=`adw-toast-overlay`,this.addColumn(new n(1,`star`)),this.addRow(new n(1,`star`));let i=new t;i.className=`adw-toast`,i.visibility=`collapse`,i.verticalAlignment=`bottom`,i.horizontalAlignment=`center`,i.addColumn(new n(1,`star`)),i.addColumn(new n(1,`auto`)),i.addRow(new n(1,`auto`)),t.setColumn(i,0),t.setRow(i,0);let o=new r;o.className=`adw-toast-title`,o.textWrap=!0,t.setColumn(o,0),i.addChild(o),this._toastLabel=o;let s=new e;s.className=`adw-toast-button`,s.set(`androidElevation`,0),t.setColumn(s,1),s.addEventListener(`tap`,()=>{let e={eventName:a,object:this};this.notify(e),this._dismiss()}),this._toastButton=s,this.addChild(i),this._toastStrip=i}setContent(e){this._content&&this.removeChild(this._content),this._content=e,e&&(e.className=`${e.className??``} adw-toast-overlay-content`.trim(),t.setColumn(e,0),t.setRow(e,0),this.insertChild(e,0))}addToast(e){this.showToast(e.title,{timeout:e.timeout,buttonLabel:e.buttonLabel})}showToast(e,t={}){this._dismissTimer&&=(clearTimeout(this._dismissTimer),null),this._toastLabel.text=e??``;let n=t.buttonLabel??``;n.length>0?(this._toastButton.text=n,this._hasButton||=(this._toastStrip.addChild(this._toastButton),!0)):this._hasButton&&=(this._toastStrip.removeChild(this._toastButton),!1),this._toastStrip.visibility=`visible`;let r=t.timeout??5e3;r>0&&(this._dismissTimer=setTimeout(()=>this._dismiss(),r))}dismiss(){this._dismiss()}_dismiss(){this._dismissTimer&&=(clearTimeout(this._dismissTimer),null),this._toastStrip.visibility=`collapse`}get visible(){return this._toastStrip.visibility===`visible`}};export{AdwToast,AdwToastOverlay,i as DEFAULT_TOAST_TIMEOUT,a as TOAST_BUTTON_CLICKED};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{SegmentedBar as e,SegmentedBarItem as t}from"@nativescript/core";const n=`notify::selected`;var AdwToggleGroup=class extends e{_options=[];constructor(){super(),this.className=`adw-toggle-group`,this.addEventListener(`selectedIndexChanged`,()=>{let e={eventName:n,object:this,selected:this.selectedIndex,value:this._options[this.selectedIndex]??``};this.notify(e)})}get options(){return this._options}set options(e){this._options=Array.isArray(e)?e:[],this.items=this._options.map(e=>{let n=new t;return n.title=e,n})}get selected(){return this.selectedIndex}set selected(e){let t=Number.isFinite(e)?e:0;t!==this.selectedIndex&&(this.selectedIndex=t)}get selectedValue(){return this._options[this.selectedIndex]??``}};export{AdwToggleGroup,n as NOTIFY_SELECTED};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t,StackLayout as n}from"@nativescript/core";var AdwToolbarView=class extends e{_topBox;_bottomBox;_content=null;constructor(){super(),this.className=`adw-toolbar-view`,this.addColumn(new t(1,`star`)),this.addRow(new t(1,`auto`)),this.addRow(new t(1,`star`)),this.addRow(new t(1,`auto`));let r=new n;r.orientation=`vertical`,r.className=`adw-toolbar-view-top`,e.setRow(r,0),this.addChild(r),this._topBox=r;let i=new n;i.orientation=`vertical`,i.className=`adw-toolbar-view-bottom`,e.setRow(i,2),this.addChild(i),this._bottomBox=i}addTopBar(e){this._topBox.addChild(e)}addBottomBar(e){this._bottomBox.addChild(e)}setContent(t){this._content&&=(this.removeChild(this._content),null),t&&(e.setRow(t,1),this.addChild(t),this._content=t)}get content(){return this._content}get topBar(){return this._topBox}get bottomBar(){return this._bottomBox}};export{AdwToolbarView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwViewSwitcherBase as e}from"./view-switcher-base.js";var AdwViewSwitcher=class extends e{constructor(){super(`adw-view-switcher`),this._initClasses()}get barClass(){return`adw-view-switcher-bar`}get buttonClass(){return`adw-view-switcher-button`}};export{AdwViewSwitcher};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Label as e,StackLayout as t}from"@nativescript/core";var AdwWindowTitle=class extends t{_titleLabel;_subtitleLabel;_hasSubtitle=!1;constructor(){super(),this.orientation=`vertical`,this.className=`adw-window-title`,this.horizontalAlignment=`center`;let t=new e;t.className=`adw-window-title-title`,t.horizontalAlignment=`center`,this.addChild(t),this._titleLabel=t;let n=new e;n.className=`adw-window-title-subtitle`,n.horizontalAlignment=`center`,this._subtitleLabel=n}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??``}get subtitle(){return this._hasSubtitle?this._subtitleLabel.text??``:``}set subtitle(e){let t=e??``;this._subtitleLabel.text=t;let n=t.length>0;n&&!this._hasSubtitle?(this.addChild(this._subtitleLabel),this._hasSubtitle=!0):!n&&this._hasSubtitle&&(this.removeChild(this._subtitleLabel),this._hasSubtitle=!1)}};export{AdwWindowTitle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{WrapLayout as e}from"@nativescript/core";var AdwWrapBox=class extends e{_childSpacing=6;_lineSpacing=6;constructor(){super(),this.className=`adw-wrap-box`,this.orientation=`horizontal`}add(e){this._applySpacing(e),this.addChild(e)}remove(e){this.removeChild(e)}_applySpacing(e){let half=e=>Math.max(0,e/2);e.set(`margin`,`${half(this._lineSpacing)} ${half(this._childSpacing)} ${half(this._lineSpacing)} ${half(this._childSpacing)}`)}get childSpacing(){return this._childSpacing}set childSpacing(e){this._childSpacing=Number.isFinite(e)&&e>=0?e:0}get lineSpacing(){return this._lineSpacing}set lineSpacing(e){this._lineSpacing=Number.isFinite(e)&&e>=0?e:0}};export{AdwWrapBox};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const e=16,t=`#33333A`,n=`#FFFFFF`;function extractIconPaths(e){let t=[],n=/<path\b[^>]*>/g,r;for(;(r=n.exec(e))!==null;){let e=/\bd="([^"]*)"/.exec(r[0])?.[1]?.trim();if(!e)continue;let n=/\bfill-opacity="([^"]*)"/.exec(r[0])?.[1],i=n===void 0?1:Number.parseFloat(n);t.push({d:e,opacity:Number.isFinite(i)?Math.min(1,Math.max(0,i)):1})}return t}function extractPathData(e){return extractIconPaths(e).map(e=>e.d).join(` `)}export{e as ADWAITA_ICON_GRID,t as DEFAULT_ICON_COLOR,n as DEFAULT_ICON_COLOR_DARK,extractIconPaths,extractPathData};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{ADWAITA_ICON_GRID as e,DEFAULT_ICON_COLOR as t,DEFAULT_ICON_COLOR_DARK as n,extractIconPaths as r,extractPathData as i}from"./icon-path.js";import{ImageSource as a,Screen as o}from"@nativescript/core";function renderSymbolicIcon(e,t){let n=android?.graphics,i=androidx?.core?.graphics?.PathParser;if(!n||!i)return null;let s=r(e);if(s.length===0)return null;let c=t?.size??16,l=o.mainScreen?.scale||1,u=Math.max(1,Math.round(c*l)),d=u/16,f=n.Bitmap.createBitmap(u,u,n.Bitmap.Config.ARGB_8888),p=new n.Canvas(f),m=n.Color.parseColor(t?.color??`#33333A`),h=new n.Paint;h.setAntiAlias(!0),h.setStyle(n.Paint.Style.FILL);let g=!1;for(let{d:e,opacity:t}of s){let r=i.createPathFromPathData(e);if(!r)continue;let a=new n.Matrix;a.setScale(d,d),r.transform(a),h.setColor(m),h.setAlpha(Math.round(255*t)),p.drawPath(r,h),g=!0}return g?new a(f):null}export{e as ADWAITA_ICON_GRID,t as DEFAULT_ICON_COLOR,n as DEFAULT_ICON_COLOR_DARK,r as extractIconPaths,i as extractPathData,renderSymbolicIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{ADWAITA_ICON_GRID as e,DEFAULT_ICON_COLOR as t,DEFAULT_ICON_COLOR_DARK as n,extractIconPaths as r,extractPathData as i}from"./icon-path.js";function renderSymbolicIcon(e,t){return null}export{e as ADWAITA_ICON_GRID,t as DEFAULT_ICON_COLOR,n as DEFAULT_ICON_COLOR_DARK,r as extractIconPaths,i as extractPathData,renderSymbolicIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwPreferencesPage as e}from"./adw-preferences-page.js";import{AdwPreferencesGroup as t}from"./adw-preferences-group.js";import{AdwActionRow as n}from"./adw-action-row.js";import{AdwSwitchRow as r,NOTIFY_ACTIVE as ee}from"./adw-switch-row.js";import{AdwEntryRow as i,NOTIFY_TEXT as a}from"./adw-entry-row.js";import{AdwPasswordEntryRow as o}from"./adw-password-entry-row.js";import{ADWAITA_ICON_GRID as te,DEFAULT_ICON_COLOR as ne,DEFAULT_ICON_COLOR_DARK as re,extractIconPaths as s,extractPathData as c}from"./icon-path.js";import{renderSymbolicIcon as l}from"./icons.js";import{AdwIcon as u,DEFAULT_ADW_ICON_SIZE as ie}from"./adw-icon.js";import{attachRowPressFeedback as ae}from"./row-press.js";import{AdwComboRow as d,NOTIFY_SELECTED as oe}from"./adw-combo-row.js";import{AdwSpinRow as f,NOTIFY_VALUE as se}from"./adw-spin-row.js";import{AdwSliderRow as p,NOTIFY_SLIDER_VALUE as m}from"./adw-slider-row.js";import{AdwExpanderRow as h,NOTIFY_EXPANDED as g}from"./adw-expander-row.js";import{AdwButton as _}from"./adw-button.js";import{AdwImageButton as v,DEFAULT_ICON_BUTTON_ICON_SIZE as y}from"./adw-image-button.js";import{AdwBanner as b,BUTTON_CLICKED as x}from"./adw-banner.js";import{AdwAvatar as S,DEFAULT_AVATAR_SIZE as ce,avatarInitials as le}from"./adw-avatar.js";import{AdwWindowTitle as C}from"./adw-window-title.js";import{AdwClamp as w,DEFAULT_CLAMP_MAX_SIZE as ue}from"./adw-clamp.js";import{AdwHeaderBar as T}from"./adw-header-bar.js";import{AdwToolbarView as E}from"./adw-toolbar-view.js";import{AdwWrapBox as D}from"./adw-wrap-box.js";import{AdwSpinner as O,DEFAULT_SPINNER_SIZE as de}from"./adw-spinner.js";import{AdwStatusPage as k}from"./adw-status-page.js";import{ACTIVATED as A,AdwButtonRow as j}from"./adw-button-row.js";import{AdwButtonContent as M}from"./adw-button-content.js";import{AdwSplitButton as N,CLICKED as P,MENU_TAPPED as F}from"./adw-split-button.js";import{AdwToggleGroup as I,NOTIFY_SELECTED as L}from"./adw-toggle-group.js";import{AdwViewSwitcherBase as R,NOTIFY_SELECTED as z}from"./view-switcher-base.js";import{AdwViewSwitcher as B}from"./adw-view-switcher.js";import{AdwInlineViewSwitcher as V}from"./adw-inline-view-switcher.js";import{AdwTabView as H}from"./adw-tab-view.js";import{AdwCarousel as U,DEFAULT_CAROUSEL_PAGE_WIDTH as fe,NOTIFY_POSITION as pe}from"./adw-carousel.js";import{AdwNavigationView as W,NOTIFY_VISIBLE_PAGE as G}from"./adw-navigation-view.js";import{AdwSplitViewBase as me,DEFAULT_SIDEBAR_WIDTH as he,NOTIFY_SHOW_SIDEBAR as ge}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 _e}from"./adw-sidebar.js";import{AdwBottomSheet as Y,NOTIFY_OPEN as ve}from"./adw-bottom-sheet.js";import{AdwToast as ye,AdwToastOverlay as X,DEFAULT_TOAST_TIMEOUT as be,TOAST_BUTTON_CLICKED as xe}from"./adw-toast-overlay.js";import{AdwAlertDialog as Se,NOTIFY_RESPONSE as Ce}from"./adw-alert-dialog.js";import{AdwAboutDialog as Z,CLOSED as we}from"./adw-about-dialog.js";import{AdwPreferencesDialog as Q,CLOSED as Te}from"./adw-preferences-dialog.js";const Ee={AdwPreferencesPage:e,AdwPreferencesGroup:t,AdwActionRow:n,AdwSwitchRow:r,AdwEntryRow:i,AdwPasswordEntryRow:o,AdwComboRow:d,AdwSpinRow:f,AdwSliderRow:p,AdwExpanderRow:h,AdwButton:_,AdwImageButton:v,AdwIcon:u,AdwBanner:b,AdwAvatar:S,AdwWindowTitle:C,AdwClamp:w,AdwHeaderBar:T,AdwToolbarView:E,AdwWrapBox:D,AdwSpinner:O,AdwStatusPage:k,AdwButtonRow:j,AdwButtonContent:M,AdwSplitButton:N,AdwToggleGroup:I,AdwViewSwitcher:B,AdwInlineViewSwitcher:V,AdwTabView:H,AdwCarousel:U,AdwNavigationView:W,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(Ee))registerElement(e,()=>t);$=!0}}export{we as ABOUT_CLOSED,A as ACTIVATED,te as ADWAITA_ICON_GRID,Z as AdwAboutDialog,n as AdwActionRow,Se as AdwAlertDialog,S as AdwAvatar,b as AdwBanner,Y as AdwBottomSheet,_ as AdwButton,M as AdwButtonContent,j as AdwButtonRow,U as AdwCarousel,w as AdwClamp,d as AdwComboRow,i as AdwEntryRow,h as AdwExpanderRow,T as AdwHeaderBar,u as AdwIcon,v as AdwImageButton,V as AdwInlineViewSwitcher,K as AdwNavigationSplitView,W as AdwNavigationView,q as AdwOverlaySplitView,o as AdwPasswordEntryRow,Q as AdwPreferencesDialog,t as AdwPreferencesGroup,e as AdwPreferencesPage,J as AdwSidebar,p as AdwSliderRow,f as AdwSpinRow,O as AdwSpinner,N as AdwSplitButton,me as AdwSplitViewBase,k as AdwStatusPage,r as AdwSwitchRow,H as AdwTabView,ye as AdwToast,X as AdwToastOverlay,I as AdwToggleGroup,E as AdwToolbarView,B as AdwViewSwitcher,R as AdwViewSwitcherBase,C as AdwWindowTitle,D as AdwWrapBox,x as BUTTON_CLICKED,P as CLICKED,ie as DEFAULT_ADW_ICON_SIZE,ce as DEFAULT_AVATAR_SIZE,fe as DEFAULT_CAROUSEL_PAGE_WIDTH,ue as DEFAULT_CLAMP_MAX_SIZE,y as DEFAULT_ICON_BUTTON_ICON_SIZE,ne as DEFAULT_ICON_COLOR,re as DEFAULT_ICON_COLOR_DARK,he as DEFAULT_SIDEBAR_WIDTH,de as DEFAULT_SPINNER_SIZE,be as DEFAULT_TOAST_TIMEOUT,F as MENU_TAPPED,ee as NOTIFY_ACTIVE,g as NOTIFY_EXPANDED,ve as NOTIFY_OPEN,pe as NOTIFY_POSITION,Ce as NOTIFY_RESPONSE,oe as NOTIFY_SELECTED,ge as NOTIFY_SHOW_SIDEBAR,_e as NOTIFY_SIDEBAR_SELECTED,m as NOTIFY_SLIDER_VALUE,a as NOTIFY_TEXT,L as NOTIFY_TOGGLE_SELECTED,se as NOTIFY_VALUE,z as NOTIFY_VIEW_SELECTED,G as NOTIFY_VISIBLE_PAGE,Te as PREFERENCES_CLOSED,xe as TOAST_BUTTON_CLICKED,ae as attachRowPressFeedback,le as avatarInitials,s as extractIconPaths,c as extractPathData,registerAdwaitaElements,l as renderSymbolicIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const e=`highlighted`;function attachRowPressFeedback(t){t.addEventListener(`touch`,n=>{switch(n.action){case`down`:t.addPseudoClass(e);break;case`up`:case`cancel`:t.deletePseudoClass(e);break}})}export{attachRowPressFeedback};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t}from"@nativescript/core";const n=`notify::show-sidebar`,r=240;var AdwSplitViewBase=class extends e{_sidebar=null;_content=null;_collapsed=!1;_showSidebar=!0;_sidebarWidth=240;_sidebarPosition=`start`;constructor(e){super(),this.className=e,this.addRow(new t(1,`star`)),this.addColumn(new t(1,`auto`)),this.addColumn(new t(1,`star`))}_transitionSidebar(){this._applyLayout()}_pending=[];_shouldAnimate(){return typeof(this._sidebar??this._content??this).animate==`function`&&this.isLoaded===!0}_track(e){return this._pending.push(e),e}_cancelPending(){for(let e of this._pending)try{e.cancel()}catch{}this._pending=[]}_isChild(e){for(let t=0;t<this.getChildrenCount();t++)if(this.getChildAt(t)===e)return!0;return!1}setSidebar(e){this._sidebar&&this.removeChild(this._sidebar),this._sidebar=e,e&&(e.className=`${e.className??``} adw-split-view-sidebar`.trim(),e.width=this._sidebarWidth,this.addChild(e)),this._applyLayout()}setContent(e){this._content&&this.removeChild(this._content),this._content=e,e&&(e.className=`${e.className??``} adw-split-view-content`.trim(),this.addChild(e)),this._applyLayout()}showSidebarPane(){this.showSidebar=!0}hideSidebarPane(){this.showSidebar=!1}get collapsed(){return this._collapsed}set collapsed(e){this._collapsed=!!e,this._applyLayout()}get showSidebar(){return this._showSidebar}set showSidebar(e){let t=!!e;if(t===this._showSidebar)return;this._showSidebar=t,this._transitionSidebar();let r={eventName:n,object:this,showSidebar:t,collapsed:this._collapsed};this.notify(r)}get sidebarWidth(){return this._sidebarWidth}set sidebarWidth(e){this._sidebarWidth=Number.isFinite(e)&&e>0?e:240,this._sidebar&&(this._sidebar.width=this._sidebarWidth)}get sidebarPosition(){return this._sidebarPosition}set sidebarPosition(e){this._sidebarPosition=e===`end`?`end`:`start`,this._applyLayout()}get sidebar(){return this._sidebar}get content(){return this._content}};export{AdwSplitViewBase,r as DEFAULT_SIDEBAR_WIDTH,n as NOTIFY_SHOW_SIDEBAR};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Button as e,GridLayout as t,ItemSpec as n,StackLayout as r}from"@nativescript/core";const i=`notify::selected`;var AdwViewSwitcherBase=class extends t{_bar;_contentArea;_pages=[];_buttons=[];_selected=0;constructor(e){super(),this.className=e,this.addColumn(new n(1,`star`)),this.addRow(new n(1,`auto`)),this.addRow(new n(1,`star`));let i=new r;i.orientation=`horizontal`,i.horizontalAlignment=`center`,t.setRow(i,0),this.addChild(i),this._bar=i;let a=new t;a.addColumn(new n(1,`star`)),a.addRow(new n(1,`star`)),t.setRow(a,1),this.addChild(a),this._contentArea=a}_initClasses(){this._bar.className=this.barClass}setViews(n){for(let e of this._buttons)this._bar.removeChild(e);this._buttons.length=0;for(let e of this._pages)this._contentArea.removeChild(e.content);this._pages.length=0;for(let r of n){this._pages.push(r);let n=new e;n.text=r.title,n.className=this.buttonClass,n.set(`androidElevation`,0);let i=this._buttons.length;n.addEventListener(`tap`,()=>{this.selected=i}),this._bar.addChild(n),this._buttons.push(n),t.setColumn(r.content,0),t.setRow(r.content,0),this._contentArea.addChild(r.content)}this._selected>=this._pages.length&&(this._selected=0),this._applySelection()}_applySelection(){this._pages.forEach((e,t)=>{e.content.visibility=t===this._selected?`visible`:`collapse`}),this._buttons.forEach((e,t)=>{e.className=t===this._selected?`${this.buttonClass} active`:this.buttonClass})}get views(){return this._pages}set views(e){this.setViews(Array.isArray(e)?e:[])}get selected(){return this._selected}set selected(e){let t=Number.isFinite(e)?e:0;if(t===this._selected||t<0||t>=this._pages.length)return;this._selected=t,this._applySelection();let n={eventName:i,object:this,selected:t,title:this._pages[t]?.title??``};this.notify(n)}};export{AdwViewSwitcherBase,i as NOTIFY_SELECTED};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `font-family` value that resolves Adwaita Sans on BOTH Android and iOS.
|
|
3
|
+
*
|
|
4
|
+
* Order matters: `'Adwaita Sans'` is the iOS PostScript name; `'AdwaitaSans-Regular'`
|
|
5
|
+
* is the Android TTF file name (drop `adwaita-sans-400.ttf` in renamed, or rename
|
|
6
|
+
* it on copy — see {@link ADWAITA_SANS_TTF_FILES}). Apply it via CSS
|
|
7
|
+
* `font-family: 'Adwaita Sans', 'AdwaitaSans-Regular';` or a widget's `.style.fontFamily`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ADWAITA_SANS_FONT_FAMILY = "'Adwaita Sans', 'AdwaitaSans-Regular'";
|
|
10
|
+
/** The TTF assets shipped by `@gjsify/adwaita-fonts`, with their target NS file names. */
|
|
11
|
+
export declare const ADWAITA_SANS_TTF_FILES: {
|
|
12
|
+
/** Regular 400. Source path within `@gjsify/adwaita-fonts`. */
|
|
13
|
+
readonly regular: {
|
|
14
|
+
readonly source: "@gjsify/adwaita-fonts/files/adwaita-sans-400.ttf";
|
|
15
|
+
/** File name to use under `App_Resources/.../fonts/` (Android matches on this). */
|
|
16
|
+
readonly target: "AdwaitaSans-Regular.ttf";
|
|
17
|
+
/** iOS PostScript family name. */
|
|
18
|
+
readonly postscriptName: "Adwaita Sans";
|
|
19
|
+
};
|
|
20
|
+
/** Italic 400. */
|
|
21
|
+
readonly italic: {
|
|
22
|
+
readonly source: "@gjsify/adwaita-fonts/files/adwaita-sans-400-italic.ttf";
|
|
23
|
+
readonly target: "AdwaitaSans-Italic.ttf";
|
|
24
|
+
readonly postscriptName: "Adwaita Sans";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Human-readable, copy-pasteable instructions for installing the Adwaita Sans
|
|
29
|
+
* TTFs into a NativeScript app's `App_Resources`. Returned as a string so it can
|
|
30
|
+
* be logged from a setup script or surfaced in docs/tests.
|
|
31
|
+
*/
|
|
32
|
+
export declare function adwaitaFontInstallInstructions(): string;
|
|
33
|
+
/**
|
|
34
|
+
* Returns whether Adwaita Sans can be relied upon — true only under NativeScript
|
|
35
|
+
* (where the resource-dir fonts apply). Off NativeScript this is always `false`;
|
|
36
|
+
* it never throws, so callers can branch on it to fall back to a system font.
|
|
37
|
+
*/
|
|
38
|
+
export declare function hasAdwaitaSans(): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { assertNativeScript, isNativeScript, isAndroid, isIOS } from '@gjsify/native-platform';
|
|
2
|
+
export { AdwPreferencesPage, AdwPreferencesGroup, AdwActionRow, AdwSwitchRow, NOTIFY_ACTIVE, AdwEntryRow, NOTIFY_TEXT, AdwPasswordEntryRow, AdwComboRow, NOTIFY_SELECTED, AdwSpinRow, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, AdwExpanderRow, NOTIFY_EXPANDED, AdwButton, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, AdwIcon, DEFAULT_ADW_ICON_SIZE, AdwBanner, BUTTON_CLICKED, AdwAvatar, DEFAULT_AVATAR_SIZE, avatarInitials, AdwWindowTitle, AdwClamp, DEFAULT_CLAMP_MAX_SIZE, AdwHeaderBar, AdwToolbarView, AdwWrapBox, AdwSpinner, DEFAULT_SPINNER_SIZE, AdwStatusPage, AdwButtonRow, ACTIVATED, AdwButtonContent, AdwSplitButton, CLICKED, MENU_TAPPED, AdwToggleGroup, NOTIFY_TOGGLE_SELECTED, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, AdwViewSwitcher, AdwInlineViewSwitcher, AdwTabView, AdwCarousel, DEFAULT_CAROUSEL_PAGE_WIDTH, NOTIFY_POSITION, AdwNavigationView, NOTIFY_VISIBLE_PAGE, AdwSplitViewBase, DEFAULT_SIDEBAR_WIDTH, NOTIFY_SHOW_SIDEBAR, AdwNavigationSplitView, AdwOverlaySplitView, AdwSidebar, NOTIFY_SIDEBAR_SELECTED, AdwBottomSheet, NOTIFY_OPEN, AdwToast, AdwToastOverlay, DEFAULT_TOAST_TIMEOUT, TOAST_BUTTON_CLICKED, AdwAlertDialog, NOTIFY_RESPONSE, AdwAboutDialog, ABOUT_CLOSED, AdwPreferencesDialog, PREFERENCES_CLOSED, attachRowPressFeedback, renderSymbolicIcon, extractIconPaths, extractPathData, ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, registerAdwaitaElements, } from './widgets/index.js';
|
|
3
|
+
export type { NotifyActiveEventData, NotifyTextEventData, AdwComboOption, NotifySelectedEventData, NotifyValueEventData, NotifySliderValueEventData, NotifyExpandedEventData, AdwButtonVariant, MenuTappedEventData, NotifyToggleSelectedEventData, AdwViewPage, NotifyViewSelectedEventData, NotifyPositionEventData, NotifyVisiblePageEventData, NotifyShowSidebarEventData, NotifySidebarSelectedEventData, NotifyOpenEventData, AdwToastOptions, NotifyResponseEventData, SymbolicIconOptions, IconPath, } from './widgets/index.js';
|
|
4
|
+
export { ADWAITA_SANS_FONT_FAMILY, ADWAITA_SANS_TTF_FILES, adwaitaFontInstallInstructions, hasAdwaitaSans, } from './fonts.js';
|
|
5
|
+
/**
|
|
6
|
+
* One-call convenience setup for the Adwaita NativeScript layer.
|
|
7
|
+
*
|
|
8
|
+
* Asserts we are running under NativeScript (throws `'Platform not supported'`
|
|
9
|
+
* otherwise — same guard `@gjsify/native-fs-bridge` uses) and registers every
|
|
10
|
+
* Adwaita widget as an XML element so markup like `<AdwSwitchRow />` resolves.
|
|
11
|
+
* Idempotent. Note: the Adwaita CSS theme and the Adwaita Sans fonts are NOT
|
|
12
|
+
* auto-installed — wire `./theme/adwaita.css` into your app CSS and copy the
|
|
13
|
+
* fonts per {@link adwaitaFontInstallInstructions} (a bundler can't drop files
|
|
14
|
+
* into the native resource dirs).
|
|
15
|
+
*/
|
|
16
|
+
export declare function registerAdwaita(): void;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { GridLayout, Label, StackLayout } from '@nativescript/core';
|
|
2
|
+
/** Event name emitted when the dialog is closed. */
|
|
3
|
+
export declare const CLOSED = "closed";
|
|
4
|
+
export declare class AdwAboutDialog extends GridLayout {
|
|
5
|
+
protected readonly _card: StackLayout;
|
|
6
|
+
protected readonly _iconLabel: Label;
|
|
7
|
+
protected readonly _nameLabel: Label;
|
|
8
|
+
protected readonly _versionLabel: Label;
|
|
9
|
+
protected readonly _developerLabel: Label;
|
|
10
|
+
protected readonly _commentsLabel: Label;
|
|
11
|
+
protected readonly _websiteLabel: Label;
|
|
12
|
+
protected readonly _copyrightLabel: Label;
|
|
13
|
+
private _applicationName;
|
|
14
|
+
private _applicationIcon;
|
|
15
|
+
private _developerName;
|
|
16
|
+
private _version;
|
|
17
|
+
private _comments;
|
|
18
|
+
private _website;
|
|
19
|
+
private _copyright;
|
|
20
|
+
constructor();
|
|
21
|
+
private _addCardLabel;
|
|
22
|
+
/** The application name (bold, centered). */
|
|
23
|
+
get applicationName(): string;
|
|
24
|
+
set applicationName(value: string);
|
|
25
|
+
/** A glyph standing in for the app icon (no icon-theme lookup in the NS subset). */
|
|
26
|
+
get applicationIcon(): string;
|
|
27
|
+
set applicationIcon(value: string);
|
|
28
|
+
/** The version string. */
|
|
29
|
+
get version(): string;
|
|
30
|
+
set version(value: string);
|
|
31
|
+
/** The developer/author name. */
|
|
32
|
+
get developerName(): string;
|
|
33
|
+
set developerName(value: string);
|
|
34
|
+
/** A short comments/description line. */
|
|
35
|
+
get comments(): string;
|
|
36
|
+
set comments(value: string);
|
|
37
|
+
/** The website URL (plain text — not a tappable link in this subset). */
|
|
38
|
+
get website(): string;
|
|
39
|
+
set website(value: string);
|
|
40
|
+
/** The copyright line. */
|
|
41
|
+
get copyright(): string;
|
|
42
|
+
set copyright(value: string);
|
|
43
|
+
/** Reveal the about overlay. */
|
|
44
|
+
present(): void;
|
|
45
|
+
/** Hide the about overlay and emit `closed`. */
|
|
46
|
+
close(): void;
|
|
47
|
+
/** Whether the dialog is currently shown. */
|
|
48
|
+
get open(): boolean;
|
|
49
|
+
set open(value: boolean);
|
|
50
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { GridLayout, StackLayout, Label, View } from '@nativescript/core';
|
|
2
|
+
export declare class AdwActionRow extends GridLayout {
|
|
3
|
+
/** The text/value column (column 0). */
|
|
4
|
+
protected readonly _textStack: StackLayout;
|
|
5
|
+
/** The title label. */
|
|
6
|
+
protected readonly _titleLabel: Label;
|
|
7
|
+
/** The subtitle label (created lazily — only added to the tree when set). */
|
|
8
|
+
protected readonly _subtitleLabel: Label;
|
|
9
|
+
private _hasSubtitle;
|
|
10
|
+
/** The currently-installed suffix view (column 1), if any. */
|
|
11
|
+
private _suffix;
|
|
12
|
+
constructor();
|
|
13
|
+
/** The row title (column 0, top line). */
|
|
14
|
+
get title(): string;
|
|
15
|
+
set title(value: string);
|
|
16
|
+
/**
|
|
17
|
+
* The row subtitle (column 0, dim second line). Setting a non-empty value
|
|
18
|
+
* adds the subtitle label to the tree; setting empty removes it again so an
|
|
19
|
+
* empty subtitle leaves no blank gap — matching `Adw.ActionRow`.
|
|
20
|
+
*/
|
|
21
|
+
get subtitle(): string;
|
|
22
|
+
set subtitle(value: string);
|
|
23
|
+
/**
|
|
24
|
+
* Install a suffix widget in column 1 (e.g. a `Switch`, `Button`, or icon).
|
|
25
|
+
* Replaces any previously-installed suffix. Pass `null` to clear it.
|
|
26
|
+
*/
|
|
27
|
+
setSuffix(view: View | null): void;
|
|
28
|
+
/** The currently-installed suffix view, or `null`. */
|
|
29
|
+
get suffix(): View | null;
|
|
30
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Observable, type EventData } from '@nativescript/core';
|
|
2
|
+
/** Event name emitted when a response is chosen. Mirrors GObject `notify::response`. */
|
|
3
|
+
export declare const NOTIFY_RESPONSE = "notify::response";
|
|
4
|
+
/** Payload of the `notify::response` event. */
|
|
5
|
+
export interface NotifyResponseEventData extends EventData {
|
|
6
|
+
/** The chosen response id. */
|
|
7
|
+
response: string;
|
|
8
|
+
}
|
|
9
|
+
interface ResponseInfo {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class AdwAlertDialog extends Observable {
|
|
14
|
+
private _heading;
|
|
15
|
+
private _body;
|
|
16
|
+
private readonly _responses;
|
|
17
|
+
private _defaultResponse;
|
|
18
|
+
private _closeResponse;
|
|
19
|
+
constructor(heading?: string, body?: string);
|
|
20
|
+
/** The dialog heading (title). */
|
|
21
|
+
get heading(): string;
|
|
22
|
+
set heading(value: string);
|
|
23
|
+
/** The dialog body text. */
|
|
24
|
+
get body(): string;
|
|
25
|
+
set body(value: string);
|
|
26
|
+
/** Register a response button (`id` is what `present()` resolves to). */
|
|
27
|
+
addResponse(id: string, label: string): void;
|
|
28
|
+
/** Register many responses at once (`id, label, id, label, …`). */
|
|
29
|
+
addResponses(...idLabelPairs: string[]): void;
|
|
30
|
+
/** The default (emphasised) response id, used as the OK button in `confirm()`. */
|
|
31
|
+
get defaultResponse(): string | null;
|
|
32
|
+
set defaultResponse(id: string | null);
|
|
33
|
+
/** The response id used when the dialog is dismissed without a choice. */
|
|
34
|
+
get closeResponse(): string;
|
|
35
|
+
set closeResponse(id: string);
|
|
36
|
+
/** The registered responses. */
|
|
37
|
+
get responses(): ReadonlyArray<ResponseInfo>;
|
|
38
|
+
/**
|
|
39
|
+
* Present the dialog. Resolves to the chosen response id (or {@link closeResponse}
|
|
40
|
+
* on dismissal). Uses a native `confirm()` for ≤3 responses, else an `action()`
|
|
41
|
+
* sheet.
|
|
42
|
+
*/
|
|
43
|
+
present(): Promise<string>;
|
|
44
|
+
private _presentConfirm;
|
|
45
|
+
private _orderResponses;
|
|
46
|
+
private _presentAction;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GridLayout, Label } from '@nativescript/core';
|
|
2
|
+
/** Default avatar diameter in DIPs (Adwaita's common avatar size). */
|
|
3
|
+
export declare const DEFAULT_AVATAR_SIZE = 48;
|
|
4
|
+
/** Derive up to two-letter initials from a name (`"Ada Lovelace"` → `"AL"`). */
|
|
5
|
+
export declare function avatarInitials(text: string): string;
|
|
6
|
+
export declare class AdwAvatar extends GridLayout {
|
|
7
|
+
/** The centered initials label. */
|
|
8
|
+
protected readonly _label: Label;
|
|
9
|
+
private _text;
|
|
10
|
+
private _size;
|
|
11
|
+
constructor();
|
|
12
|
+
/** Sync the inline width/height/border-radius/font-size for the current size. */
|
|
13
|
+
private _applySize;
|
|
14
|
+
/** The name the initials are derived from. */
|
|
15
|
+
get text(): string;
|
|
16
|
+
set text(value: string);
|
|
17
|
+
/** The circular diameter in DIPs. Updates width/height/border-radius. */
|
|
18
|
+
get size(): number;
|
|
19
|
+
set size(value: number);
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Button, GridLayout, Label } from '@nativescript/core';
|
|
2
|
+
/** Event name emitted when the banner's action button is tapped. */
|
|
3
|
+
export declare const BUTTON_CLICKED = "buttonClicked";
|
|
4
|
+
export declare class AdwBanner extends GridLayout {
|
|
5
|
+
/** The message label (column 0). */
|
|
6
|
+
protected readonly _titleLabel: Label;
|
|
7
|
+
/** The action button (column 1, created lazily — only in the tree when a label is set). */
|
|
8
|
+
protected readonly _button: Button;
|
|
9
|
+
private _hasButton;
|
|
10
|
+
private _revealed;
|
|
11
|
+
constructor();
|
|
12
|
+
/** The banner message text. */
|
|
13
|
+
get title(): string;
|
|
14
|
+
set title(value: string);
|
|
15
|
+
/**
|
|
16
|
+
* The action button label. Setting a non-empty value adds the button to the
|
|
17
|
+
* tree; setting empty removes it — so a banner with no button label shows no
|
|
18
|
+
* button, matching `Adw.Banner`.
|
|
19
|
+
*/
|
|
20
|
+
get buttonLabel(): string;
|
|
21
|
+
set buttonLabel(value: string);
|
|
22
|
+
/** Whether the banner is shown. Toggles the view's `visibility`. */
|
|
23
|
+
get revealed(): boolean;
|
|
24
|
+
set revealed(value: boolean);
|
|
25
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { GridLayout, StackLayout, View, type EventData } from '@nativescript/core';
|
|
2
|
+
/** Event name emitted when {@link AdwBottomSheet.open} changes. Mirrors GObject `notify::open`. */
|
|
3
|
+
export declare const NOTIFY_OPEN = "notify::open";
|
|
4
|
+
/** Payload of the `notify::open` event. */
|
|
5
|
+
export interface NotifyOpenEventData extends EventData {
|
|
6
|
+
/** Whether the sheet is now open. */
|
|
7
|
+
open: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class AdwBottomSheet extends GridLayout {
|
|
10
|
+
/** The always-visible content layer. */
|
|
11
|
+
private _content;
|
|
12
|
+
/** The bottom sheet panel wrapper (drag handle + sheet child). */
|
|
13
|
+
protected readonly _sheetPanel: StackLayout;
|
|
14
|
+
private _sheetChild;
|
|
15
|
+
private _open;
|
|
16
|
+
constructor();
|
|
17
|
+
/** Set (or replace) the always-visible content layer (painted under the sheet). */
|
|
18
|
+
setContent(view: View | null): void;
|
|
19
|
+
/** Set (or replace) the sheet panel's child (shown when open). */
|
|
20
|
+
setSheet(view: View | null): void;
|
|
21
|
+
/** Open the sheet. */
|
|
22
|
+
open(): void;
|
|
23
|
+
/** Close the sheet. */
|
|
24
|
+
close(): void;
|
|
25
|
+
/** Whether the sheet is open. Toggling shows/hides the panel + emits `notify::open`. */
|
|
26
|
+
get openState(): boolean;
|
|
27
|
+
set openState(value: boolean);
|
|
28
|
+
}
|