@gjsify/adwaita-nativescript 0.14.0 → 0.16.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/widgets/adw-alert-dialog.js +1 -1
- package/lib/esm/widgets/adw-combo-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-spin-row.js +1 -1
- package/lib/esm/widgets/adw-toast-overlay.js +1 -1
- package/lib/esm/widgets/adw-toggle-group.js +1 -1
- package/lib/esm/widgets/breakpoint.js +1 -1
- package/lib/esm/widgets/color-scheme.js +1 -1
- package/lib/esm/widgets/icon-path.js +2 -2
- package/lib/esm/widgets/icons.android.js +1 -1
- package/lib/esm/widgets/index.js +1 -1
- package/lib/types/index.d.ts +2 -2
- package/lib/types/index.spec.d.ts +2 -2
- package/lib/types/widgets/adw-alert-dialog.d.ts +15 -12
- package/lib/types/widgets/adw-combo-row.d.ts +5 -12
- package/lib/types/widgets/adw-expander-row.d.ts +4 -1
- package/lib/types/widgets/adw-spin-row.d.ts +6 -8
- package/lib/types/widgets/adw-toast-overlay.d.ts +11 -27
- package/lib/types/widgets/adw-toggle-group.d.ts +4 -1
- package/lib/types/widgets/breakpoint.d.ts +3 -60
- package/lib/types/widgets/color-scheme.d.ts +2 -22
- package/lib/types/widgets/icon-path.d.ts +1 -4
- package/lib/types/widgets/index.d.ts +13 -13
- package/package.json +8 -6
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
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{ADWAITA_SANS_FONT_FAMILY as ee,ADWAITA_SANS_TTF_FILES as te,adwaitaFontInstallInstructions as ne,hasAdwaitaSans as e}from"./fonts.js";import{AdwPreferencesPage as t}from"./widgets/adw-preferences-page.js";import{AdwPreferencesGroup as n}from"./widgets/adw-preferences-group.js";import{AdwActionRow as r}from"./widgets/adw-action-row.js";import{AdwSwitchRow as i,NOTIFY_ACTIVE as a}from"./widgets/adw-switch-row.js";import{AdwEntryRow as o,NOTIFY_TEXT as s}from"./widgets/adw-entry-row.js";import{adwaitaColorScheme as c,isThemeIconColor as l,onAdwaitaColorSchemeChanged as u,setAdwaitaColorScheme as d,themeIconColor as f,toggleAdwaitaColorScheme as p}from"./widgets/color-scheme.js";import{ADWAITA_ICON_GRID as m,DEFAULT_ICON_COLOR as h,DEFAULT_ICON_COLOR_DARK as g,extractIconPaths as _,extractPathData as v}from"./widgets/icon-path.js";import{renderSymbolicIcon as y}from"./widgets/icons.js";import{attachRowPressFeedback as b}from"./widgets/row-press.js";import{AdwImageButton as x,DEFAULT_ICON_BUTTON_ICON_SIZE as S}from"./widgets/adw-image-button.js";import{AdwPasswordEntryRow as C}from"./widgets/adw-password-entry-row.js";import{AdwIcon as w,DEFAULT_ADW_ICON_SIZE as T}from"./widgets/adw-icon.js";import{AdwComboRow as E,ComboState as D,NOTIFY_SELECTED as O}from"./widgets/adw-combo-row.js";import{AdwSpinRow as k,NOTIFY_VALUE as A,SpinState as j}from"./widgets/adw-spin-row.js";import{AdwSliderRow as M,NOTIFY_SLIDER_VALUE as N}from"./widgets/adw-slider-row.js";import{AdwExpanderRow as P,ExpanderState as F,NOTIFY_EXPANDED as I}from"./widgets/adw-expander-row.js";import{AdwButton as L}from"./widgets/adw-button.js";import{AdwMenuButton as R,MENU_ITEM_ACTIVATED as z}from"./widgets/adw-menu-button.js";import{AdwBanner as B,BUTTON_CLICKED as V}from"./widgets/adw-banner.js";import{AdwAvatar as H,DEFAULT_AVATAR_SIZE as U,avatarInitials as W}from"./widgets/adw-avatar.js";import{AdwWindowTitle as G}from"./widgets/adw-window-title.js";import{AdwClamp as K,DEFAULT_CLAMP_MAX_SIZE as q}from"./widgets/adw-clamp.js";import{AdwHeaderBar as J}from"./widgets/adw-header-bar.js";import{AdwToolbarView as Y}from"./widgets/adw-toolbar-view.js";import{AdwWrapBox as X}from"./widgets/adw-wrap-box.js";import{AdwSpinner as Z,DEFAULT_SPINNER_SIZE as re}from"./widgets/adw-spinner.js";import{AdwStatusPage as Q}from"./widgets/adw-status-page.js";import{ACTIVATED as ie,AdwButtonRow as ae}from"./widgets/adw-button-row.js";import{AdwButtonContent as oe}from"./widgets/adw-button-content.js";import{AdwSplitButton as se,CLICKED as ce,MENU_TAPPED as le}from"./widgets/adw-split-button.js";import{AdwToggleGroup as ue,NOTIFY_SELECTED as de,ToggleGroupState as fe}from"./widgets/adw-toggle-group.js";import{AdwViewStack as pe,NOTIFY_VISIBLE_CHILD as me}from"./widgets/adw-view-stack.js";import{AdwViewSwitcherBase as he,NOTIFY_SELECTED as ge}from"./widgets/view-switcher-base.js";import{AdwViewSwitcher as _e}from"./widgets/adw-view-switcher.js";import{AdwViewSwitcherBar as ve}from"./widgets/adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as ye}from"./widgets/adw-inline-view-switcher.js";import{AdwTabView as be}from"./widgets/adw-tab-view.js";import{AdwCarousel as xe,DEFAULT_CAROUSEL_PAGE_WIDTH as Se,NOTIFY_POSITION as Ce}from"./widgets/adw-carousel.js";import{AdwNavigationView as we,NOTIFY_VISIBLE_PAGE as Te}from"./widgets/adw-navigation-view.js";import{AdwSplitViewBase as Ee,DEFAULT_SIDEBAR_WIDTH as De,NOTIFY_SHOW_SIDEBAR as Oe}from"./widgets/split-view-base.js";import{AdwNavigationSplitView as ke}from"./widgets/adw-navigation-split-view.js";import{AdwOverlaySplitView as Ae}from"./widgets/adw-overlay-split-view.js";import{AdwSidebar as je,NOTIFY_SELECTED as Me}from"./widgets/adw-sidebar.js";import{AdwBottomSheet as Ne,NOTIFY_OPEN as Pe}from"./widgets/adw-bottom-sheet.js";import{AdwToast as Fe,AdwToastOverlay as Ie,AdwToastQueue as Le,DEFAULT_TOAST_TIMEOUT as Re,TOAST_BUTTON_CLICKED as ze}from"./widgets/adw-toast-overlay.js";import{AdwAlertDialog as Be,AdwAlertResponses as Ve,NOTIFY_RESPONSE as He}from"./widgets/adw-alert-dialog.js";import{AdwAboutDialog as Ue,CLOSED as We}from"./widgets/adw-about-dialog.js";import{AdwPreferencesDialog as Ge,CLOSED as Ke}from"./widgets/adw-preferences-dialog.js";import{AdwBreakpoint as qe,addBreakpoints as Je,evaluateBreakpointCondition as Ye,parseBreakpointCondition as Xe}from"./widgets/breakpoint.js";import{registerAdwaitaElements as $}from"./widgets/index.js";import{assertNativeScript as Ze,assertNativeScript as Qe,isAndroid as $e,isIOS as et,isNativeScript as tt}from"@gjsify/native-platform";function registerAdwaita(){Qe(),$()}export{We as ABOUT_CLOSED,ie as ACTIVATED,m as ADWAITA_ICON_GRID,ee as ADWAITA_SANS_FONT_FAMILY,te as ADWAITA_SANS_TTF_FILES,Ue as AdwAboutDialog,r as AdwActionRow,Be as AdwAlertDialog,Ve as AdwAlertResponses,H as AdwAvatar,B as AdwBanner,Ne as AdwBottomSheet,qe as AdwBreakpoint,L as AdwButton,oe as AdwButtonContent,ae as AdwButtonRow,xe as AdwCarousel,K as AdwClamp,E as AdwComboRow,o as AdwEntryRow,P as AdwExpanderRow,J as AdwHeaderBar,w as AdwIcon,x as AdwImageButton,ye as AdwInlineViewSwitcher,R as AdwMenuButton,ke as AdwNavigationSplitView,we as AdwNavigationView,Ae as AdwOverlaySplitView,C as AdwPasswordEntryRow,Ge as AdwPreferencesDialog,n as AdwPreferencesGroup,t as AdwPreferencesPage,je as AdwSidebar,M as AdwSliderRow,k as AdwSpinRow,Z as AdwSpinner,se as AdwSplitButton,Ee as AdwSplitViewBase,Q as AdwStatusPage,i as AdwSwitchRow,be as AdwTabView,Fe as AdwToast,Ie as AdwToastOverlay,Le as AdwToastQueue,ue as AdwToggleGroup,Y as AdwToolbarView,pe as AdwViewStack,_e as AdwViewSwitcher,ve as AdwViewSwitcherBar,he as AdwViewSwitcherBase,G as AdwWindowTitle,X as AdwWrapBox,V as BUTTON_CLICKED,ce as CLICKED,D as ComboState,T as DEFAULT_ADW_ICON_SIZE,U as DEFAULT_AVATAR_SIZE,Se as DEFAULT_CAROUSEL_PAGE_WIDTH,q as DEFAULT_CLAMP_MAX_SIZE,S as DEFAULT_ICON_BUTTON_ICON_SIZE,h as DEFAULT_ICON_COLOR,g as DEFAULT_ICON_COLOR_DARK,De as DEFAULT_SIDEBAR_WIDTH,re as DEFAULT_SPINNER_SIZE,Re as DEFAULT_TOAST_TIMEOUT,F as ExpanderState,z as MENU_ITEM_ACTIVATED,le as MENU_TAPPED,a as NOTIFY_ACTIVE,I as NOTIFY_EXPANDED,Pe as NOTIFY_OPEN,Ce as NOTIFY_POSITION,He as NOTIFY_RESPONSE,O as NOTIFY_SELECTED,Oe as NOTIFY_SHOW_SIDEBAR,Me as NOTIFY_SIDEBAR_SELECTED,N as NOTIFY_SLIDER_VALUE,s as NOTIFY_TEXT,de as NOTIFY_TOGGLE_SELECTED,A as NOTIFY_VALUE,ge as NOTIFY_VIEW_SELECTED,me as NOTIFY_VISIBLE_CHILD,Te as NOTIFY_VISIBLE_PAGE,Ke as PREFERENCES_CLOSED,j as SpinState,ze as TOAST_BUTTON_CLICKED,fe as ToggleGroupState,Je as addBreakpoints,c as adwaitaColorScheme,ne as adwaitaFontInstallInstructions,Ze as assertNativeScript,b as attachRowPressFeedback,W as avatarInitials,Ye as evaluateBreakpointCondition,_ as extractIconPaths,v as extractPathData,e as hasAdwaitaSans,$e as isAndroid,et as isIOS,tt as isNativeScript,l as isThemeIconColor,u as onAdwaitaColorSchemeChanged,Xe as parseBreakpointCondition,registerAdwaita,$ as registerAdwaitaElements,y as renderSymbolicIcon,d as setAdwaitaColorScheme,f as themeIconColor,p as toggleAdwaitaColorScheme};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{Observable as e,action as t,confirm as n}from"@nativescript/core";const
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Observable as e,action as t,confirm as n}from"@nativescript/core";import{AdwAlertResponses as r,AdwAlertResponses as i}from"@gjsify/adwaita-core";const a=`notify::response`;var AdwAlertDialog=class extends e{_responses;constructor(e=``,t=``){super(),this._responses=new i(e,t)}get heading(){return this._responses.heading}set heading(e){this._responses.heading=e}get body(){return this._responses.body}set body(e){this._responses.body=e}addResponse(e,t,n){this._responses.addResponse(e,t,n)}addResponses(...e){this._responses.addResponses(...e)}setResponseAppearance(e,t){this._responses.setResponseAppearance(e,t)}getResponseAppearance(e){return this._responses.getResponseAppearance(e)}setResponseEnabled(e,t){this._responses.setResponseEnabled(e,t)}getResponseEnabled(e){return this._responses.getResponseEnabled(e)}get defaultResponse(){return this._responses.defaultResponse}set defaultResponse(e){this._responses.defaultResponse=e}get closeResponse(){return this._responses.closeResponse}set closeResponse(e){this._responses.closeResponse=e}get responses(){return this._responses.responses}async present(){let e=this._responses.usesActionSheet?await this._presentAction():await this._presentConfirm();return this.notify({eventName:a,object:this,response:e}),e}async _presentConfirm(){let e=this._responses.orderResponses(),t=await n({title:this._responses.heading||void 0,message:this._responses.body||void 0,okButtonText:e.ok?.label,cancelButtonText:e.cancel?.label,neutralButtonText:e.neutral?.label,cancelable:!0});return t===!0?this._responses.resolveById(e.ok?.id):t===!1?this._responses.resolveById(e.cancel?.id):t===void 0?this._responses.resolveById(e.neutral?.id):this._responses.closeResponse}async _presentAction(){let e=await t({title:this._responses.heading||void 0,message:this._responses.body||void 0,cancelButtonText:`Cancel`,actions:this._responses.responses.map(e=>e.label)});return this._responses.resolveLabel(e)}};export{AdwAlertDialog,r as AdwAlertResponses,a as NOTIFY_RESPONSE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{attachRowPressFeedback as t}from"./row-press.js";import{AdwIcon as n}from"./adw-icon.js";import{Label as r,StackLayout as i,action as a}from"@nativescript/core";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{attachRowPressFeedback as t}from"./row-press.js";import{AdwIcon as n}from"./adw-icon.js";import{Label as r,StackLayout as i,action as a}from"@nativescript/core";import{ComboState as o,ComboState as s}from"@gjsify/adwaita-core";import{panDownSymbolic as c}from"@gjsify/adwaita-icons/ui";const l=`notify::selected`;var AdwComboRow=class extends e{_valueLabel;_chevron;_state=new s;constructor(){super(),this.className=`adw-row adw-action-row adw-combo-row`;let e=new i;e.orientation=`horizontal`,e.className=`adw-combo-suffix`;let a=new r;a.className=`adw-combo-value`,a.text=``;let o=new n;o.className=`adw-combo-chevron`,o.iconColor=`#9a9a9a`,o.iconSize=16,o.icon=c,e.addChild(a),e.addChild(o),this.setSuffix(e),this._valueLabel=a,this._chevron=o,this._state.subscribe(e=>{if(this._valueLabel.text=e.label,e.interactive){let t={eventName:l,object:this,selected:e.selected,value:e.value};this.notify(t)}}),this.addEventListener(`tap`,()=>{this._openChooser()}),t(this)}async _openChooser(){if(this._state.count===0)return;let e=this._state.options.map(e=>e.label),t=await a({title:this.title||void 0,cancelButtonText:`Cancel`,actions:e});this._state.select(e.indexOf(t))}get options(){return this._state.options}set options(e){this._state.setOptions(e)}get selectedIndex(){return this._state.selectedIndex}set selectedIndex(e){this._state.setSelectedIndex(e)}get selectedValue(){return this._state.selectedValue}set selectedValue(e){this._state.setSelectedValue(e)}};export{AdwComboRow,o as ComboState,l as NOTIFY_SELECTED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwIcon as t}from"./adw-icon.js";import{GridLayout as n,ItemSpec as r,StackLayout as i}from"@nativescript/core";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwIcon as t}from"./adw-icon.js";import{GridLayout as n,ItemSpec as r,StackLayout as i}from"@nativescript/core";import{ExpanderState as a,ExpanderState as o}from"@gjsify/adwaita-core";import{panDownSymbolic as s,panUpSymbolic as c}from"@gjsify/adwaita-icons/ui";const l=`notify::expanded`;var AdwExpanderRow=class extends e{_toggle;_disclosure;_state=new o;constructor(){super(),this.className=`adw-row adw-action-row adw-expander-row`,this.addRow(new r(1,`auto`));let e=new i;e.orientation=`vertical`,e.className=`adw-expander-disclosure`,e.visibility=`collapse`,n.setRow(e,1),n.setColumn(e,0),n.setColumnSpan(e,3),this.addChild(e),this._disclosure=e;let a=new t;a.icon=s,a.className=`${a.className} adw-expander-toggle`.trim(),this.setSuffix(a),this._toggle=a,this._state.subscribe(e=>{this._disclosure.visibility=e?`visible`:`collapse`,this._toggle.icon=e?c:s;let t={eventName:l,object:this,expanded:e};this.notify(t)}),a.addEventListener(`tap`,()=>{this._state.toggle()})}addRow(e){if(e instanceof r){super.addRow(e);return}this._disclosure.addChild(e)}removeRow(e){this._disclosure.removeChild(e)}get expanded(){return this._state.expanded}set expanded(e){this._state.setExpanded(e)}};export{AdwExpanderRow,a as ExpanderState,l as NOTIFY_EXPANDED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{onAdwaitaColorSchemeChanged as e,themeIconColor as t}from"./color-scheme.js";import{DEFAULT_ICON_COLOR as n}from"./icon-path.js";import{renderSymbolicIcon as r}from"./icons.js";import{Image as i}from"@nativescript/core";const a=16;var AdwIcon=class extends i{_iconSvg=``;_iconColor=t();_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??=e(()=>this._syncThemeColor())}),this.addEventListener(`unloaded`,()=>{this._unsubScheme?.(),this._unsubScheme=null})}_syncThemeColor(){if(this._explicitColor)return;let e=t();e!==this._iconColor&&(this._iconColor=e,this._render())}_render(){if(!this._iconSvg)return;let e=r(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._explicitColor=!0,this._iconColor=e||n,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,a as DEFAULT_ADW_ICON_SIZE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{onAdwaitaColorSchemeChanged as e,themeIconColor as t}from"./color-scheme.js";import{DEFAULT_ICON_COLOR as n}from"./icon-path.js";import{renderSymbolicIcon as r}from"./icons.js";import{attachRowPressFeedback as i}from"./row-press.js";import{GridLayout as a,Image as o,ItemSpec as s}from"@nativescript/core";const c=16;var AdwImageButton=class extends a{_image;_iconSvg=``;_iconColor=t();_explicitColor=!1;_iconSize=16;_unsubScheme=null;constructor(){super(),this.className=`adw-image-button`,this.addRow(new s(1,`star`)),this.addColumn(new s(1,`star`));let t=new o;t.className=`adw-image-button-icon`,t.stretch=`aspectFit`,t.width=this._iconSize,t.height=this._iconSize,t.horizontalAlignment=`center`,t.verticalAlignment=`middle`,this.addChild(t),this._image=t,i(this),this.addEventListener(`loaded`,()=>{this._syncThemeColor(),this._unsubScheme??=e(()=>this._syncThemeColor())}),this.addEventListener(`unloaded`,()=>{this._unsubScheme?.(),this._unsubScheme=null})}_syncThemeColor(){if(this._explicitColor)return;let e=t();e!==this._iconColor&&(this._iconColor=e,this._render())}_render(){if(!this._iconSvg)return;let e=r(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._explicitColor=!0,this._iconColor=e||n,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,c as DEFAULT_ICON_BUTTON_ICON_SIZE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwImageButton as t}from"./adw-image-button.js";import{Label as n,StackLayout as r}from"@nativescript/core";import{valueDecreaseSymbolic as i,valueIncreaseSymbolic as a}from"@gjsify/adwaita-icons/actions";const
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwActionRow as e}from"./adw-action-row.js";import{AdwImageButton as t}from"./adw-image-button.js";import{Label as n,StackLayout as r}from"@nativescript/core";import{valueDecreaseSymbolic as i,valueIncreaseSymbolic as a}from"@gjsify/adwaita-icons/actions";import{SpinState as o,SpinState as s}from"@gjsify/adwaita-core";const c=`notify::value`;var AdwSpinRow=class extends e{_minusButton;_plusButton;_valueLabel;_state=new s;constructor(){super(),this.className=`adw-row adw-action-row adw-spin-row`;let e=new r;e.orientation=`horizontal`,e.className=`adw-spin-control`;let o=new n;o.className=`adw-spin-value`,o.text=String(this._state.value);let s=new t;s.icon=i,s.className=`${s.className} adw-spin-button adw-spin-minus`.trim();let l=new t;l.icon=a,l.className=`${l.className} adw-spin-button adw-spin-plus`.trim(),e.addChild(o),e.addChild(s),e.addChild(l),this.setSuffix(e),this._minusButton=s,this._plusButton=l,this._valueLabel=o,this._state.subscribe(e=>{if(this._valueLabel.text=String(e.value),e.interactive){let t={eventName:c,object:this,value:e.value};this.notify(t)}}),s.addEventListener(`tap`,()=>this._state.decrement()),l.addEventListener(`tap`,()=>this._state.increment())}get value(){return this._state.value}set value(e){this._state.setValue(e)}get min(){return this._state.min}set min(e){this._state.setMin(e)}get max(){return this._state.max}set max(e){this._state.setMax(e)}get step(){return this._state.step}set step(e){this._state.setStep(e)}};export{AdwSpinRow,c as NOTIFY_VALUE,o as SpinState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{Button as e,GridLayout as t,ItemSpec as n,Label as r}from"@nativescript/core";
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{Button as e,GridLayout as t,ItemSpec as n,Label as r}from"@nativescript/core";import{AdwToast as i,AdwToast as a,AdwToastQueue as o,AdwToastQueue as s,DEFAULT_TOAST_TIMEOUT as c}from"@gjsify/adwaita-core";const l=`toastButtonClicked`,u={schedule:(e,t)=>setTimeout(e,t),cancel:e=>clearTimeout(e)};var AdwToastOverlay=class extends t{_content=null;_toastStrip;_toastLabel;_toastButton;_hasButton=!1;_queue;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 a=new r;a.className=`adw-toast-title`,a.textWrap=!0,t.setColumn(a,0),i.addChild(a),this._toastLabel=a;let o=new e;o.className=`adw-toast-button`,o.set(`androidElevation`,0),t.setColumn(o,1),o.addEventListener(`tap`,()=>{let e={eventName:l,object:this};this.notify(e),this._queue.dismiss()}),this._toastButton=o,this.addChild(i),this._toastStrip=i,this._queue=new s({scheduler:u,onShow:e=>this._renderStrip(e),onHide:()=>{this._toastStrip.visibility=`collapse`}})}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._queue.add(e)}showToast(e,t={}){this._queue.add(new a(e??``,t))}dismiss(){this._queue.dismiss()}_renderStrip(e){this._toastLabel.text=e.title,e.hasButton?(this._toastButton.text=e.buttonLabel,this._hasButton||=(this._toastStrip.addChild(this._toastButton),!0)):this._hasButton&&=(this._toastStrip.removeChild(this._toastButton),!1),this._toastStrip.visibility=`visible`}get visible(){return this._queue.showing}};export{i as AdwToast,AdwToastOverlay,o as AdwToastQueue,c as DEFAULT_TOAST_TIMEOUT,l as TOAST_BUTTON_CLICKED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{Label as t,StackLayout as n}from"@nativescript/core";const
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{Label as t,StackLayout as n}from"@nativescript/core";import{ToggleGroupState as r,ToggleGroupState as i}from"@gjsify/adwaita-core";const a=`notify::selected`;var AdwToggleGroup=class extends n{_toggles=[];_segments=[];_state=new i;constructor(){super(),this.orientation=`horizontal`,this.className=`adw-toggle-group`,this.horizontalAlignment=`center`,this._state.subscribe(e=>{this._applySelection();let t={eventName:a,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(r){for(let e of this._segments)this.removeChild(e);this._segments.length=0,this._toggles=Array.isArray(r)?r:[],this._toggles.forEach((r,i)=>{let a=new n;if(a.orientation=`horizontal`,a.className=`adw-toggle-button`,a.horizontalAlignment=`center`,r.icon){let t=new e;t.className=`${t.className} adw-toggle-icon`.trim(),t.verticalAlignment=`middle`,t.icon=r.icon,a.addChild(t)}let o=new t;o.text=r.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 selected(){return this._state.selected}set selected(e){this._state.setSelected(e)}get selectedValue(){return this._state.selectedValue}};export{AdwToggleGroup,a as NOTIFY_SELECTED,r as ToggleGroupState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwBreakpoint as e,evaluateBreakpointCondition as t,parseBreakpointCondition as n}from"@gjsify/adwaita-core";function measureView(e){let t=e.getActualSize?.();return t&&t.width>0&&t.height>0?{width:t.width,height:t.height}:null}function addBreakpoints(e,t){let recompute=()=>{let n=measureView(e);if(n)for(let e of t)e.evaluate(n)};return e.addEventListener(`layoutChanged`,recompute),e.addEventListener(`loaded`,recompute),recompute(),()=>{e.removeEventListener(`layoutChanged`,recompute),e.removeEventListener(`loaded`,recompute)}}export{e as AdwBreakpoint,addBreakpoints,t as evaluateBreakpointCondition,n as parseBreakpointCondition};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{adwaitaColorScheme as e,isThemeIconColor as t,onAdwaitaColorSchemeChanged as n,setAdwaitaColorScheme as r,themeIconColor as i,toggleAdwaitaColorScheme as a}from"@gjsify/adwaita-core";export{e as adwaitaColorScheme,t as isThemeIconColor,n as onAdwaitaColorSchemeChanged,r as setAdwaitaColorScheme,i as themeIconColor,a as toggleAdwaitaColorScheme};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";
|
|
2
|
-
`||e===`\r`,isNumStart=e=>e>=`0`&&e<=`9`||e===`.`||e===`+`||e===`-`,n=0,r=``,skipWs=()=>{for(;n<t&&isWs(e[n]);)n++},readNumber=()=>{let r=n;for((e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`.`)for(n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`e`||e[n]===`E`)for(n++,(e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;return e.slice(r,n)};for(;n<t;){let i=e[n];if(i===`a`||i===`A`)for(r+=i,n++;skipWs(),!(n>=t||!isNumStart(e[n]));)r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+e[n++],skipWs(),r+=` `+e[n++],skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber();else r+=i,n++}return r}export{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{DEFAULT_ICON_COLOR as e,DEFAULT_ICON_COLOR_DARK as t}from"@gjsify/adwaita-core";const n=16;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:normalizeArcFlags(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(` `)}function normalizeArcFlags(e){if(e.indexOf(`a`)===-1&&e.indexOf(`A`)===-1)return e;let t=e.length,isWs=e=>e===` `||e===`,`||e===` `||e===`
|
|
2
|
+
`||e===`\r`,isNumStart=e=>e>=`0`&&e<=`9`||e===`.`||e===`+`||e===`-`,n=0,r=``,skipWs=()=>{for(;n<t&&isWs(e[n]);)n++},readNumber=()=>{let r=n;for((e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`.`)for(n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`e`||e[n]===`E`)for(n++,(e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;return e.slice(r,n)};for(;n<t;){let i=e[n];if(i===`a`||i===`A`)for(r+=i,n++;skipWs(),!(n>=t||!isNumStart(e[n]));)r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+e[n++],skipWs(),r+=` `+e[n++],skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber();else r+=i,n++}return r}export{n as ADWAITA_ICON_GRID,e as DEFAULT_ICON_COLOR,t as DEFAULT_ICON_COLOR_DARK,extractIconPaths,extractPathData,normalizeArcFlags};
|
|
@@ -1 +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,
|
|
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,n){let i=android?.graphics,s=androidx?.core?.graphics?.PathParser;if(!i||!s)return null;let c=r(e);if(c.length===0)return null;let l=n?.size??16,u=o.mainScreen?.scale||1,d=Math.max(1,Math.round(l*u)),f=d/16,p=i.Bitmap.createBitmap(d,d,i.Bitmap.Config.ARGB_8888),m=new i.Canvas(p),h=i.Color.parseColor(n?.color??t),g=new i.Paint;g.setAntiAlias(!0),g.setStyle(i.Paint.Style.FILL);let _=!1;for(let{d:e,opacity:t}of c){let n=null;try{n=s.createPathFromPathData(e)}catch{n=null}if(!n)continue;let r=new i.Matrix;r.setScale(f,f),n.transform(r),g.setColor(h),g.setAlpha(Math.round(255*t)),m.drawPath(n,g),_=!0}return _?new a(p):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};
|
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{AdwActionRow as n}from"./adw-action-row.js";import{AdwSwitchRow as r,NOTIFY_ACTIVE as i}from"./adw-switch-row.js";import{AdwEntryRow as a,NOTIFY_TEXT as o}from"./adw-entry-row.js";import{
|
|
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 i}from"./adw-switch-row.js";import{AdwEntryRow as a,NOTIFY_TEXT as o}from"./adw-entry-row.js";import{adwaitaColorScheme as s,isThemeIconColor as ee,onAdwaitaColorSchemeChanged as te,setAdwaitaColorScheme as ne,themeIconColor as re,toggleAdwaitaColorScheme as ie}from"./color-scheme.js";import{ADWAITA_ICON_GRID as ae,DEFAULT_ICON_COLOR as oe,DEFAULT_ICON_COLOR_DARK as se,extractIconPaths as c,extractPathData as l}from"./icon-path.js";import{renderSymbolicIcon as u}from"./icons.js";import{attachRowPressFeedback as d}from"./row-press.js";import{AdwImageButton as f,DEFAULT_ICON_BUTTON_ICON_SIZE as p}from"./adw-image-button.js";import{AdwPasswordEntryRow as m}from"./adw-password-entry-row.js";import{AdwIcon as h,DEFAULT_ADW_ICON_SIZE as ce}from"./adw-icon.js";import{AdwComboRow as g,ComboState as le,NOTIFY_SELECTED as ue}from"./adw-combo-row.js";import{AdwSpinRow as _,NOTIFY_VALUE as de,SpinState as fe}from"./adw-spin-row.js";import{AdwSliderRow as v,NOTIFY_SLIDER_VALUE as pe}from"./adw-slider-row.js";import{AdwExpanderRow as y,ExpanderState as me,NOTIFY_EXPANDED as he}from"./adw-expander-row.js";import{AdwButton as b}from"./adw-button.js";import{AdwMenuButton as x,MENU_ITEM_ACTIVATED as ge}from"./adw-menu-button.js";import{AdwBanner as S,BUTTON_CLICKED as _e}from"./adw-banner.js";import{AdwAvatar as C,DEFAULT_AVATAR_SIZE as ve,avatarInitials as ye}from"./adw-avatar.js";import{AdwWindowTitle as w}from"./adw-window-title.js";import{AdwClamp as T,DEFAULT_CLAMP_MAX_SIZE 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{AdwSpinner as A,DEFAULT_SPINNER_SIZE as j}from"./adw-spinner.js";import{AdwStatusPage as M}from"./adw-status-page.js";import{ACTIVATED as N,AdwButtonRow as P}from"./adw-button-row.js";import{AdwButtonContent as F}from"./adw-button-content.js";import{AdwSplitButton as I,CLICKED as be,MENU_TAPPED as xe}from"./adw-split-button.js";import{AdwToggleGroup as L,NOTIFY_SELECTED as Se,ToggleGroupState as Ce}from"./adw-toggle-group.js";import{AdwViewStack as R,NOTIFY_VISIBLE_CHILD as we}from"./adw-view-stack.js";import{AdwViewSwitcherBase as Te,NOTIFY_SELECTED as Ee}from"./view-switcher-base.js";import{AdwViewSwitcher as z}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as B}from"./adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as V}from"./adw-inline-view-switcher.js";import{AdwTabView as H}from"./adw-tab-view.js";import{AdwCarousel as U,DEFAULT_CAROUSEL_PAGE_WIDTH as De,NOTIFY_POSITION as Oe}from"./adw-carousel.js";import{AdwNavigationView as W,NOTIFY_VISIBLE_PAGE as ke}from"./adw-navigation-view.js";import{AdwSplitViewBase as Ae,DEFAULT_SIDEBAR_WIDTH as je,NOTIFY_SHOW_SIDEBAR as Me}from"./split-view-base.js";import{AdwNavigationSplitView as G}from"./adw-navigation-split-view.js";import{AdwOverlaySplitView as K}from"./adw-overlay-split-view.js";import{AdwSidebar as q,NOTIFY_SELECTED as Ne}from"./adw-sidebar.js";import{AdwBottomSheet as J,NOTIFY_OPEN as Pe}from"./adw-bottom-sheet.js";import{AdwToast as Fe,AdwToastOverlay as Y,AdwToastQueue as Ie,DEFAULT_TOAST_TIMEOUT as Le,TOAST_BUTTON_CLICKED as X}from"./adw-toast-overlay.js";import{AdwAlertDialog as Re,AdwAlertResponses as ze,NOTIFY_RESPONSE as Be}from"./adw-alert-dialog.js";import{AdwAboutDialog as Z,CLOSED as Ve}from"./adw-about-dialog.js";import{AdwPreferencesDialog as Q,CLOSED as He}from"./adw-preferences-dialog.js";import{AdwBreakpoint as Ue,addBreakpoints as We,evaluateBreakpointCondition as Ge,parseBreakpointCondition as Ke}from"./breakpoint.js";const qe={AdwPreferencesPage:e,AdwPreferencesGroup:t,AdwActionRow:n,AdwSwitchRow:r,AdwEntryRow:a,AdwPasswordEntryRow:m,AdwComboRow:g,AdwSpinRow:_,AdwSliderRow:v,AdwExpanderRow:y,AdwButton:b,AdwImageButton:f,AdwMenuButton:x,AdwIcon:h,AdwBanner:S,AdwAvatar:C,AdwWindowTitle:w,AdwClamp:T,AdwHeaderBar:D,AdwToolbarView:O,AdwWrapBox:k,AdwSpinner:A,AdwStatusPage:M,AdwButtonRow:P,AdwButtonContent:F,AdwSplitButton:I,AdwToggleGroup:L,AdwViewStack:R,AdwViewSwitcher:z,AdwViewSwitcherBar:B,AdwInlineViewSwitcher:V,AdwTabView:H,AdwCarousel:U,AdwNavigationView:W,AdwNavigationSplitView:G,AdwOverlaySplitView:K,AdwSidebar:q,AdwBottomSheet:J,AdwToastOverlay:Y,AdwAboutDialog:Z,AdwPreferencesDialog:Q};let $=!1;function registerAdwaitaElements(){if(!$&&typeof registerElement==`function`){for(let[e,t]of Object.entries(qe))registerElement(e,()=>t);$=!0}}export{Ve as ABOUT_CLOSED,N as ACTIVATED,ae as ADWAITA_ICON_GRID,Z as AdwAboutDialog,n as AdwActionRow,Re as AdwAlertDialog,ze as AdwAlertResponses,C as AdwAvatar,S as AdwBanner,J as AdwBottomSheet,Ue as AdwBreakpoint,b as AdwButton,F as AdwButtonContent,P as AdwButtonRow,U as AdwCarousel,T as AdwClamp,g as AdwComboRow,a as AdwEntryRow,y as AdwExpanderRow,D as AdwHeaderBar,h as AdwIcon,f as AdwImageButton,V as AdwInlineViewSwitcher,x as AdwMenuButton,G as AdwNavigationSplitView,W as AdwNavigationView,K as AdwOverlaySplitView,m as AdwPasswordEntryRow,Q as AdwPreferencesDialog,t as AdwPreferencesGroup,e as AdwPreferencesPage,q as AdwSidebar,v as AdwSliderRow,_ as AdwSpinRow,A as AdwSpinner,I as AdwSplitButton,Ae as AdwSplitViewBase,M as AdwStatusPage,r as AdwSwitchRow,H as AdwTabView,Fe as AdwToast,Y as AdwToastOverlay,Ie as AdwToastQueue,L as AdwToggleGroup,O as AdwToolbarView,R as AdwViewStack,z as AdwViewSwitcher,B as AdwViewSwitcherBar,Te as AdwViewSwitcherBase,w as AdwWindowTitle,k as AdwWrapBox,_e as BUTTON_CLICKED,be as CLICKED,le as ComboState,ce as DEFAULT_ADW_ICON_SIZE,ve as DEFAULT_AVATAR_SIZE,De as DEFAULT_CAROUSEL_PAGE_WIDTH,E as DEFAULT_CLAMP_MAX_SIZE,p as DEFAULT_ICON_BUTTON_ICON_SIZE,oe as DEFAULT_ICON_COLOR,se as DEFAULT_ICON_COLOR_DARK,je as DEFAULT_SIDEBAR_WIDTH,j as DEFAULT_SPINNER_SIZE,Le as DEFAULT_TOAST_TIMEOUT,me as ExpanderState,ge as MENU_ITEM_ACTIVATED,xe as MENU_TAPPED,i as NOTIFY_ACTIVE,he as NOTIFY_EXPANDED,Pe as NOTIFY_OPEN,Oe as NOTIFY_POSITION,Be as NOTIFY_RESPONSE,ue as NOTIFY_SELECTED,Me as NOTIFY_SHOW_SIDEBAR,Ne as NOTIFY_SIDEBAR_SELECTED,pe as NOTIFY_SLIDER_VALUE,o as NOTIFY_TEXT,Se as NOTIFY_TOGGLE_SELECTED,de as NOTIFY_VALUE,Ee as NOTIFY_VIEW_SELECTED,we as NOTIFY_VISIBLE_CHILD,ke as NOTIFY_VISIBLE_PAGE,He as PREFERENCES_CLOSED,fe as SpinState,X as TOAST_BUTTON_CLICKED,Ce as ToggleGroupState,We as addBreakpoints,s as adwaitaColorScheme,d as attachRowPressFeedback,ye as avatarInitials,Ge as evaluateBreakpointCondition,c as extractIconPaths,l as extractPathData,ee as isThemeIconColor,te as onAdwaitaColorSchemeChanged,Ke as parseBreakpointCondition,registerAdwaitaElements,u as renderSymbolicIcon,ne as setAdwaitaColorScheme,re as themeIconColor,ie as toggleAdwaitaColorScheme};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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, AdwMenuButton, 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, AdwSpinner, DEFAULT_SPINNER_SIZE, AdwStatusPage, AdwButtonRow, ACTIVATED, AdwButtonContent, AdwSplitButton, CLICKED, MENU_TAPPED, AdwToggleGroup, NOTIFY_TOGGLE_SELECTED, AdwViewStack, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, AdwViewSwitcher, AdwViewSwitcherBar, 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, adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, parseBreakpointCondition, registerAdwaitaElements, } from './widgets/index.js';
|
|
3
|
-
export type { NotifyActiveEventData, NotifyTextEventData, AdwComboOption, NotifySelectedEventData, NotifyValueEventData, NotifySliderValueEventData, NotifyExpandedEventData, AdwButtonVariant, AdwMenuItem, MenuItemActivatedEventData, MenuTappedEventData, NotifyToggleSelectedEventData, AdwViewStackPage, NotifyVisibleChildEventData, AdwViewPage, NotifyViewSelectedEventData, NotifyPositionEventData, NotifyVisiblePageEventData, NotifyShowSidebarEventData, NotifySidebarSelectedEventData, NotifyOpenEventData, AdwToastOptions, NotifyResponseEventData, SymbolicIconOptions, IconPath, AdwColorScheme, AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './widgets/index.js';
|
|
2
|
+
export { AdwPreferencesPage, AdwPreferencesGroup, AdwActionRow, AdwSwitchRow, NOTIFY_ACTIVE, AdwEntryRow, NOTIFY_TEXT, AdwPasswordEntryRow, AdwComboRow, ComboState, NOTIFY_SELECTED, AdwSpinRow, SpinState, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, AdwExpanderRow, ExpanderState, NOTIFY_EXPANDED, AdwButton, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, AdwMenuButton, 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, AdwSpinner, DEFAULT_SPINNER_SIZE, AdwStatusPage, AdwButtonRow, ACTIVATED, AdwButtonContent, AdwSplitButton, CLICKED, MENU_TAPPED, AdwToggleGroup, ToggleGroupState, NOTIFY_TOGGLE_SELECTED, AdwViewStack, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, AdwViewSwitcher, AdwViewSwitcherBar, 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, 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
|
+
export type { NotifyActiveEventData, NotifyTextEventData, AdwComboOption, ComboStateChange, ComboStateListener, NotifySelectedEventData, NotifyValueEventData, SpinStateChange, SpinStateListener, NotifySliderValueEventData, NotifyExpandedEventData, ExpanderStateListener, AdwButtonVariant, AdwMenuItem, MenuItemActivatedEventData, MenuTappedEventData, NotifyToggleSelectedEventData, ToggleGroupStateChange, ToggleGroupStateListener, AdwViewStackPage, NotifyVisibleChildEventData, AdwViewPage, NotifyViewSelectedEventData, NotifyPositionEventData, NotifyVisiblePageEventData, NotifyShowSidebarEventData, 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
4
|
export { ADWAITA_SANS_FONT_FAMILY, ADWAITA_SANS_TTF_FILES, adwaitaFontInstallInstructions, hasAdwaitaSans, } from './fonts.js';
|
|
5
5
|
/**
|
|
6
6
|
* One-call convenience setup for the Adwaita NativeScript layer.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default
|
|
1
|
+
declare const _default: () => Promise<void>;
|
|
2
|
+
export default _default;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { Observable, type EventData } from '@nativescript/core';
|
|
2
|
+
import { AdwAlertResponses } from '@gjsify/adwaita-core';
|
|
3
|
+
import type { AdwResponseAppearance, AdwResponseOptions } from '@gjsify/adwaita-core';
|
|
4
|
+
export { AdwAlertResponses } from '@gjsify/adwaita-core';
|
|
5
|
+
export type { AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, OrderedConfirmResponses, } from '@gjsify/adwaita-core';
|
|
2
6
|
/** Event name emitted when a response is chosen. Mirrors GObject `notify::response`. */
|
|
3
7
|
export declare const NOTIFY_RESPONSE = "notify::response";
|
|
4
8
|
/** Payload of the `notify::response` event. */
|
|
@@ -6,16 +10,9 @@ export interface NotifyResponseEventData extends EventData {
|
|
|
6
10
|
/** The chosen response id. */
|
|
7
11
|
response: string;
|
|
8
12
|
}
|
|
9
|
-
interface ResponseInfo {
|
|
10
|
-
id: string;
|
|
11
|
-
label: string;
|
|
12
|
-
}
|
|
13
13
|
export declare class AdwAlertDialog extends Observable {
|
|
14
|
-
|
|
15
|
-
private _body;
|
|
14
|
+
/** The headless response registry + ordering + resolution (ADR 0004). */
|
|
16
15
|
private readonly _responses;
|
|
17
|
-
private _defaultResponse;
|
|
18
|
-
private _closeResponse;
|
|
19
16
|
constructor(heading?: string, body?: string);
|
|
20
17
|
/** The dialog heading (title). */
|
|
21
18
|
get heading(): string;
|
|
@@ -24,9 +21,17 @@ export declare class AdwAlertDialog extends Observable {
|
|
|
24
21
|
get body(): string;
|
|
25
22
|
set body(value: string);
|
|
26
23
|
/** Register a response button (`id` is what `present()` resolves to). */
|
|
27
|
-
addResponse(id: string, label: string): void;
|
|
24
|
+
addResponse(id: string, label: string, options?: AdwResponseOptions): void;
|
|
28
25
|
/** Register many responses at once (`id, label, id, label, …`). */
|
|
29
26
|
addResponses(...idLabelPairs: string[]): void;
|
|
27
|
+
/** Set a registered response's visual emphasis (suggested/destructive). */
|
|
28
|
+
setResponseAppearance(id: string, appearance: AdwResponseAppearance): void;
|
|
29
|
+
/** A registered response's emphasis (`'default'` for an unknown id). */
|
|
30
|
+
getResponseAppearance(id: string): AdwResponseAppearance;
|
|
31
|
+
/** Enable/disable a registered response. */
|
|
32
|
+
setResponseEnabled(id: string, enabled: boolean): void;
|
|
33
|
+
/** Whether a registered response is enabled (`true` for an unknown id). */
|
|
34
|
+
getResponseEnabled(id: string): boolean;
|
|
30
35
|
/** The default (emphasised) response id, used as the OK button in `confirm()`. */
|
|
31
36
|
get defaultResponse(): string | null;
|
|
32
37
|
set defaultResponse(id: string | null);
|
|
@@ -34,7 +39,7 @@ export declare class AdwAlertDialog extends Observable {
|
|
|
34
39
|
get closeResponse(): string;
|
|
35
40
|
set closeResponse(id: string);
|
|
36
41
|
/** The registered responses. */
|
|
37
|
-
get responses():
|
|
42
|
+
get responses(): AdwAlertResponses['responses'];
|
|
38
43
|
/**
|
|
39
44
|
* Present the dialog. Resolves to the chosen response id (or {@link closeResponse}
|
|
40
45
|
* on dismissal). Uses a native `confirm()` for ≤3 responses, else an `action()`
|
|
@@ -42,7 +47,5 @@ export declare class AdwAlertDialog extends Observable {
|
|
|
42
47
|
*/
|
|
43
48
|
present(): Promise<string>;
|
|
44
49
|
private _presentConfirm;
|
|
45
|
-
private _orderResponses;
|
|
46
50
|
private _presentAction;
|
|
47
51
|
}
|
|
48
|
-
export {};
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { Label, type EventData } from '@nativescript/core';
|
|
2
|
+
import type { AdwComboOption } from '@gjsify/adwaita-core';
|
|
2
3
|
import { AdwActionRow } from './adw-action-row.js';
|
|
3
4
|
import { AdwIcon } from './adw-icon.js';
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
/** Display label shown in the row + chooser. */
|
|
7
|
-
label: string;
|
|
8
|
-
/** Underlying value returned by {@link AdwComboRow.selectedValue}. */
|
|
9
|
-
value: string;
|
|
10
|
-
}
|
|
5
|
+
export { ComboState } from '@gjsify/adwaita-core';
|
|
6
|
+
export type { AdwComboOption, ComboStateChange, ComboStateListener } from '@gjsify/adwaita-core';
|
|
11
7
|
/** Event name emitted when {@link AdwComboRow.selectedIndex} changes. Mirrors GObject `notify::selected`. */
|
|
12
8
|
export declare const NOTIFY_SELECTED = "notify::selected";
|
|
13
9
|
/** Payload of the `notify::selected` event. */
|
|
@@ -22,14 +18,11 @@ export declare class AdwComboRow extends AdwActionRow {
|
|
|
22
18
|
protected readonly _valueLabel: Label;
|
|
23
19
|
/** The down-chevron — a real Adwaita `pan-down-symbolic` icon. */
|
|
24
20
|
protected readonly _chevron: AdwIcon;
|
|
25
|
-
|
|
26
|
-
private
|
|
21
|
+
/** The headless options list + selectedIndex↔selectedValue state machine (ADR 0004). */
|
|
22
|
+
private readonly _state;
|
|
27
23
|
constructor();
|
|
28
24
|
/** Open the native action chooser and apply the picked option. */
|
|
29
25
|
private _openChooser;
|
|
30
|
-
/** Refresh the inline value label from the current selection. */
|
|
31
|
-
private _syncValueLabel;
|
|
32
|
-
private _emitSelected;
|
|
33
26
|
/** The selectable options. Updates the inline value label. */
|
|
34
27
|
get options(): AdwComboOption[];
|
|
35
28
|
set options(value: AdwComboOption[]);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ItemSpec, StackLayout, View, type EventData } from '@nativescript/core';
|
|
2
2
|
import { AdwActionRow } from './adw-action-row.js';
|
|
3
3
|
import { AdwIcon } from './adw-icon.js';
|
|
4
|
+
export { ExpanderState } from '@gjsify/adwaita-core';
|
|
5
|
+
export type { ExpanderStateListener } from '@gjsify/adwaita-core';
|
|
4
6
|
/** Event name emitted when {@link AdwExpanderRow.expanded} changes. Mirrors GObject `notify::expanded`. */
|
|
5
7
|
export declare const NOTIFY_EXPANDED = "notify::expanded";
|
|
6
8
|
/** Payload of the `notify::expanded` event. */
|
|
@@ -13,7 +15,8 @@ export declare class AdwExpanderRow extends AdwActionRow {
|
|
|
13
15
|
protected readonly _toggle: AdwIcon;
|
|
14
16
|
/** The container of revealed child rows (second grid row). */
|
|
15
17
|
protected readonly _disclosure: StackLayout;
|
|
16
|
-
|
|
18
|
+
/** The headless expanded/collapsed disclosure state machine (ADR 0004). */
|
|
19
|
+
private readonly _state;
|
|
17
20
|
constructor();
|
|
18
21
|
/** Append a child row (or any view) to the disclosure container. */
|
|
19
22
|
addRow(viewOrSpec: View | ItemSpec): void;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { Label
|
|
1
|
+
import { Label } from '@nativescript/core';
|
|
2
|
+
import type { EventData } from '@nativescript/core';
|
|
2
3
|
import { AdwActionRow } from './adw-action-row.js';
|
|
3
4
|
import { AdwImageButton } from './adw-image-button.js';
|
|
5
|
+
export { SpinState } from '@gjsify/adwaita-core';
|
|
6
|
+
export type { SpinStateChange, SpinStateListener } from '@gjsify/adwaita-core';
|
|
4
7
|
/** Event name emitted when {@link AdwSpinRow.value} changes. Mirrors GObject `notify::value`. */
|
|
5
8
|
export declare const NOTIFY_VALUE = "notify::value";
|
|
6
9
|
/** Payload of the `notify::value` event. */
|
|
@@ -15,14 +18,9 @@ export declare class AdwSpinRow extends AdwActionRow {
|
|
|
15
18
|
protected readonly _plusButton: AdwImageButton;
|
|
16
19
|
/** The value display before the stepper buttons. */
|
|
17
20
|
protected readonly _valueLabel: Label;
|
|
18
|
-
|
|
19
|
-
private
|
|
20
|
-
private _max;
|
|
21
|
-
private _step;
|
|
21
|
+
/** The headless value/min/max/step clamp-and-step state machine (ADR 0004). */
|
|
22
|
+
private readonly _state;
|
|
22
23
|
constructor();
|
|
23
|
-
/** Apply a delta, clamp to `[min, max]`, update the label and emit `notify::value`. */
|
|
24
|
-
private _bump;
|
|
25
|
-
private _clamp;
|
|
26
24
|
/** The current numeric value (always within `[min, max]`). */
|
|
27
25
|
get value(): number;
|
|
28
26
|
set value(v: number);
|
|
@@ -1,28 +1,10 @@
|
|
|
1
1
|
import { Button, GridLayout, Label, View } from '@nativescript/core';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { AdwToast } from '@gjsify/adwaita-core';
|
|
3
|
+
import type { AdwToastOptions } from '@gjsify/adwaita-core';
|
|
4
|
+
export { AdwToast, AdwToastQueue, DEFAULT_TOAST_TIMEOUT } from '@gjsify/adwaita-core';
|
|
5
|
+
export type { AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, } from '@gjsify/adwaita-core';
|
|
4
6
|
/** Event name emitted when a toast's action button is tapped. */
|
|
5
7
|
export declare const TOAST_BUTTON_CLICKED = "toastButtonClicked";
|
|
6
|
-
/** Options for {@link AdwToastOverlay.showToast}. */
|
|
7
|
-
export interface AdwToastOptions {
|
|
8
|
-
/** Auto-dismiss timeout in ms (0 = no auto-dismiss). Default {@link DEFAULT_TOAST_TIMEOUT}. */
|
|
9
|
-
timeout?: number;
|
|
10
|
-
/** Optional action button label. */
|
|
11
|
-
buttonLabel?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* A single transient toast descriptor. Mirrors `Adw.Toast` — a value object
|
|
15
|
-
* (title + optional action) handed to {@link AdwToastOverlay.addToast}.
|
|
16
|
-
*/
|
|
17
|
-
export declare class AdwToast {
|
|
18
|
-
/** The toast message. */
|
|
19
|
-
title: string;
|
|
20
|
-
/** Auto-dismiss timeout in ms (0 = sticky). */
|
|
21
|
-
timeout: number;
|
|
22
|
-
/** Optional action button label (empty = no button). */
|
|
23
|
-
buttonLabel: string;
|
|
24
|
-
constructor(title?: string, options?: AdwToastOptions);
|
|
25
|
-
}
|
|
26
8
|
export declare class AdwToastOverlay extends GridLayout {
|
|
27
9
|
/** The always-visible content layer. */
|
|
28
10
|
private _content;
|
|
@@ -31,17 +13,19 @@ export declare class AdwToastOverlay extends GridLayout {
|
|
|
31
13
|
protected readonly _toastLabel: Label;
|
|
32
14
|
protected readonly _toastButton: Button;
|
|
33
15
|
private _hasButton;
|
|
34
|
-
|
|
16
|
+
/** The headless one-at-a-time + auto-dismiss state machine (ADR 0004). */
|
|
17
|
+
private readonly _queue;
|
|
35
18
|
constructor();
|
|
36
19
|
/** Set (or replace) the always-visible content layer (under the toast). */
|
|
37
20
|
setContent(view: View | null): void;
|
|
38
|
-
/**
|
|
21
|
+
/** Enqueue a {@link AdwToast} descriptor (shows now, or after the current one). */
|
|
39
22
|
addToast(toast: AdwToast): void;
|
|
40
|
-
/**
|
|
23
|
+
/** Enqueue a transient toast with the given message and options. */
|
|
41
24
|
showToast(title: string, options?: AdwToastOptions): void;
|
|
42
|
-
/** Dismiss the current toast immediately. */
|
|
25
|
+
/** Dismiss the current toast immediately (advances to the next queued one). */
|
|
43
26
|
dismiss(): void;
|
|
44
|
-
|
|
27
|
+
/** Mount `toast` as the visible strip — the NS render half of the queue's `onShow`. */
|
|
28
|
+
private _renderStrip;
|
|
45
29
|
/** Whether a toast is currently shown. */
|
|
46
30
|
get visible(): boolean;
|
|
47
31
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { StackLayout, type EventData } from '@nativescript/core';
|
|
2
|
+
export { ToggleGroupState } from '@gjsify/adwaita-core';
|
|
3
|
+
export type { ToggleGroupStateChange, ToggleGroupStateListener } from '@gjsify/adwaita-core';
|
|
2
4
|
/** Event name emitted when {@link AdwToggleGroup.selected} changes. Mirrors GObject `notify::selected`. */
|
|
3
5
|
export declare const NOTIFY_SELECTED = "notify::selected";
|
|
4
6
|
/** Payload of the `notify::selected` event. */
|
|
@@ -16,7 +18,8 @@ export interface AdwToggle {
|
|
|
16
18
|
export declare class AdwToggleGroup extends StackLayout {
|
|
17
19
|
private _toggles;
|
|
18
20
|
private readonly _segments;
|
|
19
|
-
|
|
21
|
+
/** The headless labels + selected-index state machine (ADR 0004). */
|
|
22
|
+
private readonly _state;
|
|
20
23
|
constructor();
|
|
21
24
|
/** The segment labels (icon-less). Setting them rebuilds the toggle group. */
|
|
22
25
|
get options(): string[];
|
|
@@ -1,64 +1,7 @@
|
|
|
1
1
|
import type { View } from '@nativescript/core';
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
export type BreakpointBound = 'min' | 'max';
|
|
6
|
-
/** A single `min-/max-width/height: <value>` comparison (value in DIPs). */
|
|
7
|
-
export interface BreakpointConditionLeaf {
|
|
8
|
-
dimension: BreakpointDimension;
|
|
9
|
-
bound: BreakpointBound;
|
|
10
|
-
/** Threshold in DIPs (the parsed `px` / `sp` / `pt` value). */
|
|
11
|
-
value: number;
|
|
12
|
-
}
|
|
13
|
-
/** A boolean combination of two condition nodes. */
|
|
14
|
-
export interface BreakpointConditionGroup {
|
|
15
|
-
op: 'and' | 'or';
|
|
16
|
-
left: BreakpointConditionNode;
|
|
17
|
-
right: BreakpointConditionNode;
|
|
18
|
-
}
|
|
19
|
-
/** A parsed breakpoint condition: a leaf comparison or an and/or group. */
|
|
20
|
-
export type BreakpointConditionNode = BreakpointConditionLeaf | BreakpointConditionGroup;
|
|
21
|
-
/** A measured size in DIPs. */
|
|
22
|
-
export interface BreakpointSize {
|
|
23
|
-
width: number;
|
|
24
|
-
height: number;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Parse a Libadwaita breakpoint condition string into a {@link BreakpointConditionNode}.
|
|
28
|
-
* Accepts a single comparison (`'max-width: 720sp'`), and/or chains
|
|
29
|
-
* (`'max-width: 720sp and max-height: 480sp'`), and parenthesised groups. Units
|
|
30
|
-
* are read as DIPs. Returns null when the string can't be parsed.
|
|
31
|
-
*/
|
|
32
|
-
export declare function parseBreakpointCondition(spec: string): BreakpointConditionNode | null;
|
|
33
|
-
/** Evaluate a parsed condition against a measured size (DIPs). */
|
|
34
|
-
export declare function evaluateBreakpointCondition(node: BreakpointConditionNode, size: BreakpointSize): boolean;
|
|
35
|
-
/** Callbacks run as a breakpoint's condition flips. */
|
|
36
|
-
export interface AdwBreakpointHandlers {
|
|
37
|
-
/** Run when the condition becomes true (the narrow/large state is entered). */
|
|
38
|
-
onApply: () => void;
|
|
39
|
-
/** Run when the condition becomes false again. Optional. */
|
|
40
|
-
onUnapply?: () => void;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* A single responsive breakpoint: a condition plus apply/unapply callbacks.
|
|
44
|
-
* Mirrors `Adw.Breakpoint`. Bind one or more to a view with {@link addBreakpoints}
|
|
45
|
-
* (or drive {@link evaluate} yourself from a custom size source).
|
|
46
|
-
*/
|
|
47
|
-
export declare class AdwBreakpoint {
|
|
48
|
-
/** The parsed condition (null when an invalid string was passed). */
|
|
49
|
-
readonly condition: BreakpointConditionNode | null;
|
|
50
|
-
private _handlers;
|
|
51
|
-
private _applied;
|
|
52
|
-
constructor(condition: string | BreakpointConditionNode | null, handlers: AdwBreakpointHandlers);
|
|
53
|
-
/** Whether the condition is currently satisfied (apply has fired, not unapply). */
|
|
54
|
-
get applied(): boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Re-evaluate against `size`, firing apply / unapply ONLY on a state change
|
|
57
|
-
* (so a steady stream of layout passes doesn't re-run the callbacks). Returns
|
|
58
|
-
* the post-evaluation applied state. A null condition never applies.
|
|
59
|
-
*/
|
|
60
|
-
evaluate(size: BreakpointSize): boolean;
|
|
61
|
-
}
|
|
2
|
+
import type { AdwBreakpoint } from '@gjsify/adwaita-core';
|
|
3
|
+
export { AdwBreakpoint, evaluateBreakpointCondition, parseBreakpointCondition, } from '@gjsify/adwaita-core';
|
|
4
|
+
export type { AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from '@gjsify/adwaita-core';
|
|
62
5
|
/**
|
|
63
6
|
* Bind breakpoints to a view so they re-evaluate on every layout pass (the NS
|
|
64
7
|
* stand-in for Adwaita's window-size signal): the view's `layoutChanged` event
|
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export type AdwColorScheme
|
|
3
|
-
/** The active color scheme (default `'light'`). */
|
|
4
|
-
export declare function adwaitaColorScheme(): AdwColorScheme;
|
|
5
|
-
/**
|
|
6
|
-
* Set the active color scheme. A no-op when unchanged; otherwise notifies every
|
|
7
|
-
* subscriber (so theme-aware icons re-render). The host app should also toggle
|
|
8
|
-
* the `ns-dark` class on its root view for the CSS half.
|
|
9
|
-
*/
|
|
10
|
-
export declare function setAdwaitaColorScheme(scheme: AdwColorScheme): void;
|
|
11
|
-
/** Flip light↔dark and return the new scheme. */
|
|
12
|
-
export declare function toggleAdwaitaColorScheme(): AdwColorScheme;
|
|
13
|
-
/** The default symbolic-icon fill for the active scheme (dark fg on light, near-white on dark). */
|
|
14
|
-
export declare function themeIconColor(): string;
|
|
15
|
-
/** Whether `color` is the current scheme-default fill (i.e. not a caller-set explicit colour). */
|
|
16
|
-
export declare function isThemeIconColor(color: string): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Subscribe to scheme changes. Returns an unsubscribe function. Icon widgets
|
|
19
|
-
* subscribe while `loaded` and unsubscribe on `unloaded`, so the registry only
|
|
20
|
-
* ever holds on-screen icons.
|
|
21
|
-
*/
|
|
22
|
-
export declare function onAdwaitaColorSchemeChanged(listener: () => void): () => void;
|
|
1
|
+
export { adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, } from '@gjsify/adwaita-core';
|
|
2
|
+
export type { AdwColorScheme } from '@gjsify/adwaita-core';
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/** The native grid (viewBox) Adwaita symbolic icons are authored on: 16×16. */
|
|
2
2
|
export declare const ADWAITA_ICON_GRID = 16;
|
|
3
|
-
|
|
4
|
-
export declare const DEFAULT_ICON_COLOR = "#33333A";
|
|
5
|
-
/** Default symbolic-icon fill for dark theme — near-white fg. */
|
|
6
|
-
export declare const DEFAULT_ICON_COLOR_DARK = "#FFFFFF";
|
|
3
|
+
export { DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK } from '@gjsify/adwaita-core';
|
|
7
4
|
/** Options for rendering a symbolic icon to a native image. */
|
|
8
5
|
export interface SymbolicIconOptions {
|
|
9
6
|
/** Rendered square size in DIPs (default {@link ADWAITA_ICON_GRID} = 16). */
|
|
@@ -6,14 +6,14 @@ 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 { AdwComboRow, NOTIFY_SELECTED } from './adw-combo-row.js';
|
|
10
|
-
export type { AdwComboOption, NotifySelectedEventData } from './adw-combo-row.js';
|
|
11
|
-
export { AdwSpinRow, NOTIFY_VALUE } from './adw-spin-row.js';
|
|
12
|
-
export type { NotifyValueEventData } from './adw-spin-row.js';
|
|
9
|
+
export { AdwComboRow, ComboState, NOTIFY_SELECTED } from './adw-combo-row.js';
|
|
10
|
+
export type { AdwComboOption, ComboStateChange, ComboStateListener, NotifySelectedEventData } from './adw-combo-row.js';
|
|
11
|
+
export { AdwSpinRow, NOTIFY_VALUE, SpinState } from './adw-spin-row.js';
|
|
12
|
+
export type { NotifyValueEventData, SpinStateChange, SpinStateListener } from './adw-spin-row.js';
|
|
13
13
|
export { AdwSliderRow, NOTIFY_SLIDER_VALUE } from './adw-slider-row.js';
|
|
14
14
|
export type { NotifySliderValueEventData } from './adw-slider-row.js';
|
|
15
|
-
export { AdwExpanderRow, NOTIFY_EXPANDED } from './adw-expander-row.js';
|
|
16
|
-
export type { NotifyExpandedEventData } from './adw-expander-row.js';
|
|
15
|
+
export { AdwExpanderRow, ExpanderState, NOTIFY_EXPANDED } from './adw-expander-row.js';
|
|
16
|
+
export type { ExpanderStateListener, NotifyExpandedEventData } from './adw-expander-row.js';
|
|
17
17
|
export { AdwButton } from './adw-button.js';
|
|
18
18
|
export type { AdwButtonVariant } from './adw-button.js';
|
|
19
19
|
export { AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE } from './adw-image-button.js';
|
|
@@ -33,8 +33,8 @@ export { AdwButtonRow, ACTIVATED } from './adw-button-row.js';
|
|
|
33
33
|
export { AdwButtonContent } from './adw-button-content.js';
|
|
34
34
|
export { AdwSplitButton, CLICKED, MENU_TAPPED } from './adw-split-button.js';
|
|
35
35
|
export type { MenuTappedEventData } from './adw-split-button.js';
|
|
36
|
-
export { AdwToggleGroup, NOTIFY_SELECTED as NOTIFY_TOGGLE_SELECTED } from './adw-toggle-group.js';
|
|
37
|
-
export type { NotifyToggleSelectedEventData } from './adw-toggle-group.js';
|
|
36
|
+
export { AdwToggleGroup, NOTIFY_SELECTED as NOTIFY_TOGGLE_SELECTED, ToggleGroupState } from './adw-toggle-group.js';
|
|
37
|
+
export type { NotifyToggleSelectedEventData, ToggleGroupStateChange, ToggleGroupStateListener, } from './adw-toggle-group.js';
|
|
38
38
|
export { AdwViewStack, NOTIFY_VISIBLE_CHILD } from './adw-view-stack.js';
|
|
39
39
|
export type { AdwViewStackPage, NotifyVisibleChildEventData } from './adw-view-stack.js';
|
|
40
40
|
export { AdwViewSwitcherBase, NOTIFY_SELECTED as NOTIFY_VIEW_SELECTED } from './view-switcher-base.js';
|
|
@@ -55,10 +55,10 @@ export { AdwSidebar, NOTIFY_SELECTED as NOTIFY_SIDEBAR_SELECTED } from './adw-si
|
|
|
55
55
|
export type { NotifySidebarSelectedEventData } from './adw-sidebar.js';
|
|
56
56
|
export { AdwBottomSheet, NOTIFY_OPEN } from './adw-bottom-sheet.js';
|
|
57
57
|
export type { NotifyOpenEventData } from './adw-bottom-sheet.js';
|
|
58
|
-
export { AdwToast, AdwToastOverlay, DEFAULT_TOAST_TIMEOUT, TOAST_BUTTON_CLICKED } from './adw-toast-overlay.js';
|
|
59
|
-
export type { AdwToastOptions } from './adw-toast-overlay.js';
|
|
60
|
-
export { AdwAlertDialog, NOTIFY_RESPONSE } from './adw-alert-dialog.js';
|
|
61
|
-
export type { NotifyResponseEventData } from './adw-alert-dialog.js';
|
|
58
|
+
export { AdwToast, AdwToastOverlay, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, TOAST_BUTTON_CLICKED, } from './adw-toast-overlay.js';
|
|
59
|
+
export type { AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, } from './adw-toast-overlay.js';
|
|
60
|
+
export { AdwAlertDialog, AdwAlertResponses, NOTIFY_RESPONSE } from './adw-alert-dialog.js';
|
|
61
|
+
export type { AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, NotifyResponseEventData, OrderedConfirmResponses, } from './adw-alert-dialog.js';
|
|
62
62
|
export { AdwAboutDialog, CLOSED as ABOUT_CLOSED } from './adw-about-dialog.js';
|
|
63
63
|
export { AdwPreferencesDialog, CLOSED as PREFERENCES_CLOSED } from './adw-preferences-dialog.js';
|
|
64
64
|
export { attachRowPressFeedback } from './row-press.js';
|
|
@@ -66,7 +66,7 @@ export { ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, extract
|
|
|
66
66
|
export type { IconPath, SymbolicIconOptions } from './icons.js';
|
|
67
67
|
export { adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, } from './color-scheme.js';
|
|
68
68
|
export type { AdwColorScheme } from './color-scheme.js';
|
|
69
|
-
export { AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, parseBreakpointCondition
|
|
69
|
+
export { AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, parseBreakpointCondition } from './breakpoint.js';
|
|
70
70
|
export type { AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './breakpoint.js';
|
|
71
71
|
/**
|
|
72
72
|
* Register all Adwaita widgets as NativeScript XML elements (idempotent).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/adwaita-nativescript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.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,9 +47,10 @@
|
|
|
47
47
|
"design-system"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@gjsify/adwaita-
|
|
51
|
-
"@gjsify/adwaita-
|
|
52
|
-
"@gjsify/
|
|
50
|
+
"@gjsify/adwaita-core": "^0.16.0",
|
|
51
|
+
"@gjsify/adwaita-fonts": "^0.16.0",
|
|
52
|
+
"@gjsify/adwaita-icons": "^0.16.0",
|
|
53
|
+
"@gjsify/native-platform": "^0.16.0"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|
|
55
56
|
"@nativescript/core": "*"
|
|
@@ -60,8 +61,8 @@
|
|
|
60
61
|
}
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
63
|
-
"@gjsify/cli": "^0.
|
|
64
|
-
"@gjsify/unit": "^0.
|
|
64
|
+
"@gjsify/cli": "^0.16.0",
|
|
65
|
+
"@gjsify/unit": "^0.16.0",
|
|
65
66
|
"@types/node": "^25.9.2",
|
|
66
67
|
"typescript": "^6.0.3"
|
|
67
68
|
},
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
"browser": "none",
|
|
73
74
|
"nativescript": "native"
|
|
74
75
|
},
|
|
76
|
+
"tier": 2,
|
|
75
77
|
"nativescriptPlatforms": [
|
|
76
78
|
"android",
|
|
77
79
|
"ios"
|