@gjsify/adwaita-nativescript 0.47.0 → 0.49.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 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/namespace/adw.js +1 -0
- package/lib/esm/namespace/gtk.js +1 -0
- package/lib/esm/widgets/adw-about-dialog.js +1 -1
- package/lib/esm/widgets/adw-action-row.js +1 -1
- package/lib/esm/widgets/adw-alert-dialog.js +1 -1
- package/lib/esm/widgets/adw-avatar.js +1 -1
- package/lib/esm/widgets/adw-banner.js +1 -1
- package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
- package/lib/esm/widgets/adw-button-content.js +1 -1
- package/lib/esm/widgets/adw-button-row.js +1 -1
- package/lib/esm/widgets/adw-carousel.js +1 -1
- package/lib/esm/widgets/adw-clamp.js +1 -1
- package/lib/esm/widgets/adw-combo-row.js +1 -1
- package/lib/esm/widgets/adw-data-grid.js +1 -1
- package/lib/esm/widgets/adw-entry-row.js +1 -1
- package/lib/esm/widgets/adw-expander-row.js +1 -1
- package/lib/esm/widgets/adw-header-bar.js +1 -1
- package/lib/esm/widgets/adw-image-button.js +1 -1
- package/lib/esm/widgets/adw-inline-view-switcher.js +1 -1
- package/lib/esm/widgets/adw-navigation-split-view.js +1 -1
- package/lib/esm/widgets/adw-navigation-view.js +1 -1
- package/lib/esm/widgets/adw-overlay-split-view.js +1 -1
- package/lib/esm/widgets/adw-password-entry-row.js +1 -1
- package/lib/esm/widgets/adw-preferences-dialog.js +1 -1
- package/lib/esm/widgets/adw-preferences-group.js +1 -1
- package/lib/esm/widgets/adw-preferences-page.js +1 -1
- package/lib/esm/widgets/adw-shortcut-label.js +1 -1
- package/lib/esm/widgets/adw-sidebar.js +1 -1
- package/lib/esm/widgets/adw-slider-row.js +1 -1
- package/lib/esm/widgets/adw-spin-row.js +1 -1
- package/lib/esm/widgets/adw-spinner.js +1 -1
- package/lib/esm/widgets/adw-split-button.js +1 -1
- package/lib/esm/widgets/adw-status-page.js +1 -1
- package/lib/esm/widgets/adw-switch-row.js +1 -1
- package/lib/esm/widgets/adw-tab-view.js +1 -1
- package/lib/esm/widgets/adw-toast-overlay.js +1 -1
- package/lib/esm/widgets/adw-toggle-group.js +1 -1
- package/lib/esm/widgets/adw-toolbar-view.js +1 -1
- package/lib/esm/widgets/adw-view-stack.js +1 -1
- package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
- package/lib/esm/widgets/adw-view-switcher.js +1 -1
- package/lib/esm/widgets/adw-window-title.js +1 -1
- package/lib/esm/widgets/adw-wrap-box.js +1 -1
- package/lib/esm/widgets/avatar-view.js +1 -0
- package/lib/esm/widgets/box-layout.js +1 -0
- package/lib/esm/widgets/button-content.js +1 -1
- package/lib/esm/widgets/button-slot.js +1 -0
- package/lib/esm/widgets/construct-props.js +1 -0
- package/lib/esm/widgets/entry-row-view.js +1 -1
- package/lib/esm/widgets/gtk-align.js +1 -0
- package/lib/esm/widgets/gtk-box.js +1 -0
- package/lib/esm/widgets/gtk-button.js +1 -1
- package/lib/esm/widgets/gtk-drop-down.js +1 -1
- package/lib/esm/widgets/gtk-entry.js +1 -1
- package/lib/esm/widgets/gtk-image.js +1 -0
- package/lib/esm/widgets/gtk-label.js +1 -0
- package/lib/esm/widgets/gtk-menu-button.js +1 -1
- package/lib/esm/widgets/icon-theme.js +1 -0
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/label-text.js +1 -0
- package/lib/esm/widgets/menu-sheet.js +1 -0
- package/lib/esm/widgets/signals.js +1 -0
- package/lib/esm/widgets/split-button.js +1 -1
- package/lib/esm/widgets/split-view-base.js +1 -1
- package/lib/esm/widgets/style-classes.js +1 -0
- package/lib/esm/widgets/view-switcher-base.js +1 -1
- package/lib/esm/widgets/view-switcher-model.js +1 -1
- package/lib/types/avatar.spec.d.ts +2 -0
- package/lib/types/box-layout.spec.d.ts +2 -0
- package/lib/types/button-slot.spec.d.ts +2 -0
- package/lib/types/construct-props.spec.d.ts +2 -0
- package/lib/types/icon-theme.spec.d.ts +2 -0
- package/lib/types/index.d.ts +4 -3
- package/lib/types/label-text.spec.d.ts +2 -0
- package/lib/types/namespace/adw.d.ts +38 -0
- package/lib/types/namespace/gtk.d.ts +7 -0
- package/lib/types/signals.spec.d.ts +2 -0
- package/lib/types/style-classes.spec.d.ts +2 -0
- package/lib/types/widgets/adw-about-dialog.d.ts +16 -3
- package/lib/types/widgets/adw-action-row.d.ts +38 -10
- package/lib/types/widgets/adw-alert-dialog.d.ts +30 -13
- package/lib/types/widgets/adw-avatar.d.ts +49 -3
- package/lib/types/widgets/adw-banner.d.ts +16 -3
- package/lib/types/widgets/adw-bottom-sheet.d.ts +32 -16
- package/lib/types/widgets/adw-button-content.d.ts +20 -6
- package/lib/types/widgets/adw-button-row.d.ts +10 -7
- package/lib/types/widgets/adw-carousel.d.ts +19 -7
- package/lib/types/widgets/adw-clamp.d.ts +17 -5
- package/lib/types/widgets/adw-combo-row.d.ts +8 -7
- package/lib/types/widgets/adw-data-grid.d.ts +17 -4
- package/lib/types/widgets/adw-entry-row.d.ts +16 -14
- package/lib/types/widgets/adw-expander-row.d.ts +21 -10
- package/lib/types/widgets/adw-header-bar.d.ts +39 -14
- package/lib/types/widgets/adw-image-button.d.ts +22 -5
- package/lib/types/widgets/adw-inline-view-switcher.d.ts +2 -1
- package/lib/types/widgets/adw-navigation-split-view.d.ts +2 -1
- package/lib/types/widgets/adw-navigation-view.d.ts +40 -21
- package/lib/types/widgets/adw-overlay-split-view.d.ts +3 -2
- package/lib/types/widgets/adw-password-entry-row.d.ts +2 -1
- package/lib/types/widgets/adw-preferences-dialog.d.ts +16 -3
- package/lib/types/widgets/adw-preferences-group.d.ts +19 -6
- package/lib/types/widgets/adw-preferences-page.d.ts +37 -8
- package/lib/types/widgets/adw-shortcut-label.d.ts +15 -2
- package/lib/types/widgets/adw-sidebar.d.ts +15 -2
- package/lib/types/widgets/adw-slider-row.d.ts +30 -19
- package/lib/types/widgets/adw-spin-row.d.ts +18 -14
- package/lib/types/widgets/adw-spinner.d.ts +14 -2
- package/lib/types/widgets/adw-split-button.d.ts +60 -12
- package/lib/types/widgets/adw-status-page.d.ts +22 -8
- package/lib/types/widgets/adw-switch-row.d.ts +2 -1
- package/lib/types/widgets/adw-tab-view.d.ts +34 -8
- package/lib/types/widgets/adw-toast-overlay.d.ts +19 -7
- package/lib/types/widgets/adw-toggle-group.d.ts +14 -2
- package/lib/types/widgets/adw-toolbar-view.d.ts +21 -8
- package/lib/types/widgets/adw-view-stack.d.ts +38 -5
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +16 -3
- package/lib/types/widgets/adw-view-switcher.d.ts +2 -1
- package/lib/types/widgets/adw-window-title.d.ts +16 -3
- package/lib/types/widgets/adw-wrap-box.d.ts +21 -8
- package/lib/types/widgets/avatar-view.d.ts +57 -0
- package/lib/types/widgets/bottom-sheet-state.d.ts +1 -1
- package/lib/types/widgets/box-layout.d.ts +39 -0
- package/lib/types/widgets/button-content.d.ts +4 -4
- package/lib/types/widgets/button-slot.d.ts +16 -0
- package/lib/types/widgets/construct-props.d.ts +82 -0
- package/lib/types/widgets/entry-row-view.d.ts +9 -8
- package/lib/types/widgets/gtk-align.d.ts +59 -0
- package/lib/types/widgets/gtk-box.d.ts +75 -0
- package/lib/types/widgets/gtk-button.d.ts +110 -28
- package/lib/types/widgets/gtk-drop-down.d.ts +21 -8
- package/lib/types/widgets/gtk-entry.d.ts +15 -2
- package/lib/types/widgets/gtk-image.d.ts +42 -0
- package/lib/types/widgets/gtk-label.d.ts +82 -0
- package/lib/types/widgets/gtk-menu-button.d.ts +29 -18
- package/lib/types/widgets/icon-theme.d.ts +77 -0
- package/lib/types/widgets/icons.d.ts +3 -1
- package/lib/types/widgets/index.d.ts +18 -5
- package/lib/types/widgets/label-text.d.ts +13 -0
- package/lib/types/widgets/menu-sheet.d.ts +58 -0
- package/lib/types/widgets/row-state.d.ts +1 -1
- package/lib/types/widgets/signals.d.ts +40 -0
- package/lib/types/widgets/split-button.d.ts +2 -21
- package/lib/types/widgets/split-view-base.d.ts +18 -6
- package/lib/types/widgets/status-page-content.d.ts +1 -1
- package/lib/types/widgets/style-classes.d.ts +61 -0
- package/lib/types/widgets/view-switcher-base.d.ts +12 -1
- package/lib/types/widgets/view-switcher-model.d.ts +3 -12
- package/package.json +14 -10
- package/src/theme/adwaita.css +66 -8
- package/lib/esm/namespace.js +0 -1
- package/lib/esm/widgets/adw-icon.js +0 -1
- package/lib/types/namespace.d.ts +0 -92
- package/lib/types/widgets/adw-icon.d.ts +0 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.defineProperty,__name=(t,n)=>e(t,`name`,{value:n,configurable:!0});export{__name};
|
|
1
|
+
var e=Object.defineProperty,__name=(t,n)=>e(t,`name`,{value:n,configurable:!0}),__exportAll=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};export{__exportAll,__name};
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";import{ADWAITA_SANS_FONT_FAMILY as ee,ADWAITA_SANS_TTF_FILES as te,adwaitaFontInstallInstructions as ne,hasAdwaitaSans as e}from"./fonts.js";import{
|
|
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{GTK_ALIGN as t}from"./widgets/gtk-align.js";import{applyConstructProps as n,nsAlignment as r}from"./widgets/construct-props.js";import{ACTIVATED as i}from"./widgets/adw-action-row.js";import{NOTIFY_ACTIVE as a}from"./widgets/adw-switch-row.js";import{adwaitaColorScheme as o,isThemeIconColor as s,onAdwaitaColorSchemeChanged as c,setAdwaitaColorScheme as l,themeIconColor as u,toggleAdwaitaColorScheme as d}from"./widgets/color-scheme.js";import{ADWAITA_ICON_GRID as f,DEFAULT_ICON_COLOR as p,DEFAULT_ICON_COLOR_DARK as m,extractIconPaths as h,extractPathData as g}from"./widgets/icon-path.js";import{ICON_FALLBACK_NAME as _,compiledIconNames as v,iconValueKind as y,isIconAvailable as b,registerIcon as x,registeredIconNames as S,resolveIconSource as C,unregisterIcon as w}from"./widgets/icon-theme.js";import{renderSymbolicIcon as T}from"./widgets/icons.js";import{DEFAULT_GTK_IMAGE_SIZE as E}from"./widgets/gtk-image.js";import{attachRowPressFeedback as D}from"./widgets/row-press.js";import{AdwImageButton as O,DEFAULT_ICON_BUTTON_ICON_SIZE as k}from"./widgets/adw-image-button.js";import{NOTIFY_TEXT as A}from"./widgets/adw-entry-row.js";import{ACTIVATE as j,NOTIFY_TEXT as M}from"./widgets/gtk-entry.js";import{ComboState as N,NOTIFY_SELECTED as P}from"./widgets/adw-combo-row.js";import{NOTIFY_SELECTED as F}from"./widgets/gtk-drop-down.js";import{NOTIFY_VALUE as I,SpinState as L}from"./widgets/adw-spin-row.js";import{AdwSliderRow as R,NOTIFY_SLIDER_VALUE as z}from"./widgets/adw-slider-row.js";import{ExpanderState as B,NOTIFY_EXPANDED as V}from"./widgets/adw-expander-row.js";import{buttonSlotAfterWrite as H,buttonSlotDetaches as U}from"./widgets/button-slot.js";import{labelDisplayText as W,labelMarkupIsUnparseable as G}from"./widgets/label-text.js";import{GTK_BUTTON_CLICKED as K,GTK_BUTTON_LABEL_CLASS as q}from"./widgets/gtk-button.js";import{DEFAULT_BOX_SPACING as J,boxChildMargin as Y,boxSpacingChanges as X,normalizeBoxSpacing as Z}from"./widgets/box-layout.js";import{MENU_ITEM_ACTIVATED as re}from"./widgets/gtk-menu-button.js";import{DEFAULT_CLAMP_MAX_SIZE as ie,DEFAULT_SPINNER_SIZE as ae}from"./widgets/chrome.js";import{BUTTON_CLICKED as oe}from"./widgets/adw-banner.js";import{avatarInitials as se}from"./widgets/avatar-color.js";import{AVATAR_DEFAULT_ICON as ce}from"./widgets/avatar-view.js";import{DEFAULT_AVATAR_SIZE as le}from"./widgets/adw-avatar.js";import{DATA_GRID_HEADER_CELL_CLASS as ue,DATA_GRID_HEADER_ROW_CLASS as de,DATA_GRID_SECTION_CELL_CLASS as Q,dataGridCellClass as fe,dataGridItemSpec as pe,dataGridRowClass as me,dataGridShapeKey as he,dataGridTracksKey as ge,parseDataGridWidth as _e}from"./widgets/data-grid-model.js";import{AdwDataGrid as ve,ROW_ACTIVATED as ye}from"./widgets/adw-data-grid.js";import{CLICKED as be,MENU_TAPPED as xe}from"./widgets/adw-split-button.js";import{NOTIFY_SELECTED as Se,ToggleGroupState as Ce}from"./widgets/adw-toggle-group.js";import{ADWAITA_NS_ACCENT_RULES as we,adwaitaNsAccentColor as Te,adwaitaNsAccentCss as Ee}from"./widgets/accent-theme.js";import{applyAdwaitaNsAccent as De,clearAdwaitaNsAccent as Oe}from"./widgets/adw-accent.js";import{SHORTCUT_LABEL_CAP_TEXT_CLASS as ke,SHORTCUT_LABEL_CLASS as Ae,SHORTCUT_LABEL_DIMMED_CLASS as je,SHORTCUT_LABEL_DISABLED_CLASS as Me,SHORTCUT_LABEL_KEYCAP_CLASS as Ne,SHORTCUT_LABEL_KEYS_CLASS as Pe,SHORTCUT_LABEL_SIDE_CLASS as Fe,SHORTCUT_LABEL_SPACED_CLASS as Ie,shortcutLabelDirection as Le,shortcutLabelPlatform as Re,shortcutLabelRenderPlan as ze}from"./widgets/shortcut-label.js";import{NOTIFY_VISIBLE_CHILD as Be}from"./widgets/adw-view-stack.js";import{AdwViewSwitcherBase as Ve,NOTIFY_SELECTED as He}from"./widgets/view-switcher-base.js";import{DEFAULT_CAROUSEL_PAGE_WIDTH as Ue}from"./widgets/carousel-state.js";import{NOTIFY_POSITION as We}from"./widgets/adw-carousel.js";import{NOTIFY_VISIBLE_PAGE as Ge}from"./widgets/navigation-stack.js";import{NsNavigationSplitViewState as Ke,NsOverlaySplitViewState as qe,splitViewColumns as Je}from"./widgets/split-view-state.js";import{AdwSplitViewBase as Ye,NOTIFY_SHOW_SIDEBAR as Xe}from"./widgets/split-view-base.js";import{NOTIFY_SELECTED as Ze}from"./widgets/adw-sidebar.js";import{NOTIFY_OPEN as Qe}from"./widgets/bottom-sheet-state.js";import{AdwToast as $e,AdwToastQueue as et,DEFAULT_TOAST_TIMEOUT as tt,TOAST_BUTTON_CLICKED as nt}from"./widgets/adw-toast-overlay.js";import{AdwAlertResponses as rt,NOTIFY_RESPONSE as it}from"./widgets/adw-alert-dialog.js";import{CLOSED as at}from"./widgets/adw-about-dialog.js";import{CLOSED as ot}from"./widgets/adw-preferences-dialog.js";import{AdwBreakpoint as st,addBreakpoints as ct,evaluateBreakpointCondition as lt,parseBreakpointCondition as ut}from"./widgets/breakpoint.js";import{registerAdwaitaElements as $}from"./widgets/index.js";import{adw_exports as dt}from"./namespace/adw.js";import{gtk_exports as ft}from"./namespace/gtk.js";import{assertNativeScript as pt,assertNativeScript as mt,isAndroid as ht,isIOS as gt,isNativeScript as _t}from"@gjsify/native-platform";function registerAdwaita(){mt(),$()}export{at as ABOUT_CLOSED,i as ACTIVATED,f as ADWAITA_ICON_GRID,we as ADWAITA_NS_ACCENT_RULES,ee as ADWAITA_SANS_FONT_FAMILY,te as ADWAITA_SANS_TTF_FILES,ce as AVATAR_DEFAULT_ICON,dt as Adw,rt as AdwAlertResponses,st as AdwBreakpoint,ve as AdwDataGrid,O as AdwImageButton,R as AdwSliderRow,Ye as AdwSplitViewBase,$e as AdwToast,et as AdwToastQueue,Ve as AdwViewSwitcherBase,oe as BUTTON_CLICKED,be as CLICKED,N as ComboState,ue as DATA_GRID_HEADER_CELL_CLASS,de as DATA_GRID_HEADER_ROW_CLASS,Q as DATA_GRID_SECTION_CELL_CLASS,le as DEFAULT_AVATAR_SIZE,J as DEFAULT_BOX_SPACING,Ue as DEFAULT_CAROUSEL_PAGE_WIDTH,ie as DEFAULT_CLAMP_MAX_SIZE,E as DEFAULT_GTK_IMAGE_SIZE,k as DEFAULT_ICON_BUTTON_ICON_SIZE,p as DEFAULT_ICON_COLOR,m as DEFAULT_ICON_COLOR_DARK,ae as DEFAULT_SPINNER_SIZE,tt as DEFAULT_TOAST_TIMEOUT,j as ENTRY_ACTIVATE,B as ExpanderState,t as GTK_ALIGN,K as GTK_BUTTON_CLICKED,q as GTK_BUTTON_LABEL_CLASS,ft as Gtk,_ as ICON_FALLBACK_NAME,re as MENU_ITEM_ACTIVATED,xe as MENU_TAPPED,a as NOTIFY_ACTIVE,F as NOTIFY_DROP_DOWN_SELECTED,M as NOTIFY_ENTRY_TEXT,V as NOTIFY_EXPANDED,Qe as NOTIFY_OPEN,We as NOTIFY_POSITION,it as NOTIFY_RESPONSE,P as NOTIFY_SELECTED,Xe as NOTIFY_SHOW_SIDEBAR,Ze as NOTIFY_SIDEBAR_SELECTED,z as NOTIFY_SLIDER_VALUE,A as NOTIFY_TEXT,Se as NOTIFY_TOGGLE_SELECTED,I as NOTIFY_VALUE,He as NOTIFY_VIEW_SELECTED,Be as NOTIFY_VISIBLE_CHILD,Ge as NOTIFY_VISIBLE_PAGE,Ke as NsNavigationSplitViewState,qe as NsOverlaySplitViewState,ot as PREFERENCES_CLOSED,ye as ROW_ACTIVATED,ke as SHORTCUT_LABEL_CAP_TEXT_CLASS,Ae as SHORTCUT_LABEL_CLASS,je as SHORTCUT_LABEL_DIMMED_CLASS,Me as SHORTCUT_LABEL_DISABLED_CLASS,Ne as SHORTCUT_LABEL_KEYCAP_CLASS,Pe as SHORTCUT_LABEL_KEYS_CLASS,Fe as SHORTCUT_LABEL_SIDE_CLASS,Ie as SHORTCUT_LABEL_SPACED_CLASS,L as SpinState,nt as TOAST_BUTTON_CLICKED,Ce as ToggleGroupState,ct as addBreakpoints,o as adwaitaColorScheme,ne as adwaitaFontInstallInstructions,Te as adwaitaNsAccentColor,Ee as adwaitaNsAccentCss,De as applyAdwaitaNsAccent,n as applyConstructProps,pt as assertNativeScript,D as attachRowPressFeedback,se as avatarInitials,Y as boxChildMargin,X as boxSpacingChanges,H as buttonSlotAfterWrite,U as buttonSlotDetaches,Oe as clearAdwaitaNsAccent,v as compiledIconNames,fe as dataGridCellClass,pe as dataGridItemSpec,me as dataGridRowClass,he as dataGridShapeKey,ge as dataGridTracksKey,lt as evaluateBreakpointCondition,h as extractIconPaths,g as extractPathData,e as hasAdwaitaSans,y as iconValueKind,ht as isAndroid,gt as isIOS,b as isIconAvailable,_t as isNativeScript,s as isThemeIconColor,W as labelDisplayText,G as labelMarkupIsUnparseable,Z as normalizeBoxSpacing,r as nsAlignment,c as onAdwaitaColorSchemeChanged,ut as parseBreakpointCondition,_e as parseDataGridWidth,registerAdwaita,$ as registerAdwaitaElements,x as registerIcon,S as registeredIconNames,T as renderSymbolicIcon,C as resolveIconSource,l as setAdwaitaColorScheme,Le as shortcutLabelDirection,Re as shortcutLabelPlatform,ze as shortcutLabelRenderPlan,Je as splitViewColumns,u as themeIconColor,d as toggleAdwaitaColorScheme,w as unregisterIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__exportAll as e}from"../_virtual/_rolldown/runtime.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}from"../widgets/adw-switch-row.js";import{AdwEntryRow as a}from"../widgets/adw-entry-row.js";import{AdwPasswordEntryRow as o}from"../widgets/adw-password-entry-row.js";import{AdwComboRow as s}from"../widgets/adw-combo-row.js";import{AdwSpinRow as c}from"../widgets/adw-spin-row.js";import{AdwExpanderRow as l}from"../widgets/adw-expander-row.js";import{AdwBanner as u}from"../widgets/adw-banner.js";import{AdwAvatar as d}from"../widgets/adw-avatar.js";import{AdwWindowTitle as f}from"../widgets/adw-window-title.js";import{AdwClamp as p}from"../widgets/adw-clamp.js";import{AdwHeaderBar as m}from"../widgets/adw-header-bar.js";import{AdwToolbarView as h}from"../widgets/adw-toolbar-view.js";import{AdwWrapBox as g}from"../widgets/adw-wrap-box.js";import{AdwSpinner as _}from"../widgets/adw-spinner.js";import{AdwStatusPage as v}from"../widgets/adw-status-page.js";import{AdwButtonRow as y}from"../widgets/adw-button-row.js";import{AdwButtonContent as b}from"../widgets/adw-button-content.js";import{AdwSplitButton as x}from"../widgets/adw-split-button.js";import{AdwToggleGroup as S}from"../widgets/adw-toggle-group.js";import{AdwShortcutLabel as C}from"../widgets/adw-shortcut-label.js";import{AdwViewStack as w}from"../widgets/adw-view-stack.js";import{AdwViewSwitcher as T}from"../widgets/adw-view-switcher.js";import{AdwViewSwitcherBar as E}from"../widgets/adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as D}from"../widgets/adw-inline-view-switcher.js";import{AdwTabView as O}from"../widgets/adw-tab-view.js";import{AdwCarousel as k}from"../widgets/adw-carousel.js";import{AdwNavigationView as A}from"../widgets/adw-navigation-view.js";import{AdwNavigationSplitView as j}from"../widgets/adw-navigation-split-view.js";import{AdwOverlaySplitView as M}from"../widgets/adw-overlay-split-view.js";import{AdwSidebar as N}from"../widgets/adw-sidebar.js";import{AdwBottomSheet as P}from"../widgets/adw-bottom-sheet.js";import{AdwToastOverlay as F}from"../widgets/adw-toast-overlay.js";import{AdwAlertDialog as I}from"../widgets/adw-alert-dialog.js";import{AdwAboutDialog as L}from"../widgets/adw-about-dialog.js";import{AdwPreferencesDialog as R}from"../widgets/adw-preferences-dialog.js";var z=e({AboutDialog:()=>L,ActionRow:()=>r,AlertDialog:()=>I,Avatar:()=>d,Banner:()=>u,BottomSheet:()=>P,ButtonContent:()=>b,ButtonRow:()=>y,Carousel:()=>k,Clamp:()=>p,ComboRow:()=>s,EntryRow:()=>a,ExpanderRow:()=>l,HeaderBar:()=>m,InlineViewSwitcher:()=>D,NavigationSplitView:()=>j,NavigationView:()=>A,OverlaySplitView:()=>M,PasswordEntryRow:()=>o,PreferencesDialog:()=>R,PreferencesGroup:()=>n,PreferencesPage:()=>t,ShortcutLabel:()=>C,Sidebar:()=>N,SpinRow:()=>c,Spinner:()=>_,SplitButton:()=>x,StatusPage:()=>v,SwitchRow:()=>i,TabView:()=>O,ToastOverlay:()=>F,ToggleGroup:()=>S,ToolbarView:()=>h,ViewStack:()=>w,ViewSwitcher:()=>T,ViewSwitcherBar:()=>E,WindowTitle:()=>f,WrapBox:()=>g});export{L as AboutDialog,r as ActionRow,I as AlertDialog,d as Avatar,u as Banner,P as BottomSheet,b as ButtonContent,y as ButtonRow,k as Carousel,p as Clamp,s as ComboRow,a as EntryRow,l as ExpanderRow,m as HeaderBar,D as InlineViewSwitcher,j as NavigationSplitView,A as NavigationView,M as OverlaySplitView,o as PasswordEntryRow,R as PreferencesDialog,n as PreferencesGroup,t as PreferencesPage,C as ShortcutLabel,N as Sidebar,c as SpinRow,_ as Spinner,x as SplitButton,v as StatusPage,i as SwitchRow,O as TabView,F as ToastOverlay,S as ToggleGroup,h as ToolbarView,w as ViewStack,T as ViewSwitcher,E as ViewSwitcherBar,f as WindowTitle,g as WrapBox,z as adw_exports};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{GtkImage as t}from"../widgets/gtk-image.js";import{GtkEntry as n}from"../widgets/gtk-entry.js";import{GtkDropDown as r}from"../widgets/gtk-drop-down.js";import{GtkButton as i}from"../widgets/gtk-button.js";import{GtkBox as a}from"../widgets/gtk-box.js";import{GtkLabel as o}from"../widgets/gtk-label.js";import{GtkMenuButton as s}from"../widgets/gtk-menu-button.js";var c=e({Box:()=>a,Button:()=>i,DropDown:()=>r,Entry:()=>n,Image:()=>t,Label:()=>o,MenuButton:()=>s});export{a as Box,i as Button,r as DropDown,n as Entry,t as Image,o as Label,s as MenuButton,c as gtk_exports};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{Button as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{Button as r,GridLayout as i,ItemSpec as a,Label as o,ScrollView as s,StackLayout as c}from"@nativescript/core";import{aboutDialogVisibility as l}from"@gjsify/adwaita-core";const u=`closed`;var AdwAboutDialog=class extends n(i){_card;_iconLabel;_nameLabel;_versionLabel;_developerLabel;_commentsLabel;_websiteLabel;_copyrightLabel;_applicationName=``;_applicationIcon=``;_developerName=``;_version=``;_comments=``;_website=``;_copyright=``;constructor(e){super(),this.className=`adw-about-dialog`,this.visibility=`collapse`,this.addColumn(new a(1,`star`)),this.addRow(new a(1,`star`));let n=new s;n.orientation=`vertical`,n.verticalAlignment=`middle`,n.horizontalAlignment=`center`,i.setColumn(n,0),i.setRow(n,0);let o=new c;o.orientation=`vertical`,o.className=`adw-about-dialog-card`,n.content=o,this.addChild(n),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 l=new r;l.text=`Close`,l.className=`adw-about-dialog-close`,l.set(`androidElevation`,0),l.addEventListener(`tap`,()=>this.close()),o.addChild(l),this._render(),t(this,e)}_addCardLabel(e,t){let n=new o;return n.className=t,n.horizontalAlignment=`center`,n.textWrap=!0,e.addChild(n),n}get applicationName(){return this._applicationName}set applicationName(e){this._applicationName=e??``,this._render()}get applicationIcon(){return this._applicationIcon}set applicationIcon(e){this._applicationIcon=e??``,this._render()}get version(){return this._version}set version(e){this._version=e??``,this._render()}get developerName(){return this._developerName}set developerName(e){this._developerName=e??``,this._render()}get comments(){return this._comments}set comments(e){this._comments=e??``,this._render()}get website(){return this._website}set website(e){this._website=e??``,this._render()}get copyright(){return this._copyright}set copyright(e){this._copyright=e??``,this._render()}_render(){let e=l({applicationName:this._applicationName,applicationIcon:this._applicationIcon,developerName:this._developerName,version:this._version,comments:this._comments,website:this._website}),show=(e,t,n)=>{e.text=t,e.visibility=n?`visible`:`collapse`};show(this._iconLabel,this._applicationIcon,e.appIcon),show(this._nameLabel,this._applicationName,e.appName),show(this._versionLabel,this._version,e.version),show(this._developerLabel,this._developerName,e.developerName),show(this._commentsLabel,this._comments,e.commentsLabel),show(this._websiteLabel,this._website,e.websiteRow),show(this._copyrightLabel,this._copyright,this._copyright.length>0)}present(){this.visibility=`visible`}close(){this.visibility=`collapse`;let e={eventName:u,object:this};this.notify(e)}get open(){return this.visibility===`visible`}set open(t){e(t,!1)?this.present():this.close()}};export{AdwAboutDialog,u as CLOSED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{resolveBuilderSlot as r}from"./builder-slots.js";import{ActionRowState as i,isViewSensitive as a,rowLabelVisuals as o}from"./row-state.js";import{GridLayout as s,ItemSpec as c,Label as l,StackLayout as u}from"@nativescript/core";const d=`activated`,f=[`prefix`,`suffix`];var AdwActionRow=class extends n(s){isActionRow=!0;_textStack;_titleLabel;_subtitleLabel;_rowState=new i;_prefix=null;_suffix=null;constructor(e){super(),this.className=`adw-row adw-action-row`,this.addColumn(new c(1,`auto`)),this.addColumn(new c(1,`star`)),this.addColumn(new c(1,`auto`)),this.addRow(new c(1,`auto`));let n=new u;n.orientation=`vertical`,n.className=`adw-row-text`,s.setColumn(n,1);let r=new l;r.className=`adw-row-title`,r.textWrap=!0,n.addChild(r);let i=new l;i.className=`adw-row-subtitle`,i.textWrap=!0,n.addChild(i),this.addChild(n),this._textStack=n,this._titleLabel=r,this._subtitleLabel=i,this._applyLabels(),this.addEventListener(`tap`,()=>this.activate()),t(this,e)}add_prefix(e){this._prefix&&this.remove(this._prefix),e.className=`${e.className??``} adw-row-prefix`.trim(),s.setColumn(e,0),this.addChild(e),this._prefix=e}get prefix(){return this._prefix}get title(){return this._rowState.title}set title(e){this._rowState.setTitle(e)&&this._applyLabels()}get subtitle(){return this._rowState.subtitle}set subtitle(e){this._rowState.setSubtitle(e)&&this._applyLabels()}add_suffix(e){this._suffix&&this.remove(this._suffix),e.className=`${e.className??``} adw-row-suffix`.trim(),s.setColumn(e,2),this.addChild(e),this._suffix=e}remove(e){if(e===this._prefix)this._prefix=null;else if(e===this._suffix)this._suffix=null;else throw TypeError(`${this.constructor.name}.remove(): the view is neither this row's prefix nor its suffix. add_prefix()/add_suffix() are the only two slots remove() clears.`);this.removeChild(e)}get suffix(){return this._suffix}_addChildFromBuilder(e,t){r(e,f,`suffix`)===`prefix`?this.add_prefix(t):this.add_suffix(t)}get activatableWidget(){return this._rowState.activatableWidget}set activatableWidget(e){this._rowState.setActivatableWidget(e,a(e))}syncActivatableWidgetSensitivity(){let e=this._rowState.activatableWidget;e&&this._rowState.setActivatableWidgetSensitive(a(e))}get activatable(){return this._rowState.activatable}set activatable(t){this._rowState.setActivatable(e(t,!1))}activate(){if(!this._rowState.activatable)return;let e={eventName:d,object:this};this.notify(e)}_managesTitleVisibility=!0;_applyLabels(){let e=o({title:this._rowState.title,subtitle:this._rowState.subtitle});this._titleLabel.text=e.title,this._managesTitleVisibility&&(this._titleLabel.visibility=e.titleVisibility),this._subtitleLabel.text=e.subtitle,this._subtitleLabel.visibility=e.subtitleVisibility}};export{d as ACTIVATED,AdwActionRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{Observable as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{Observable as n,action as r,confirm as i}from"@nativescript/core";import{AdwAlertResponses as a,AdwAlertResponses as o}from"@gjsify/adwaita-core";const s=`notify::response`;var AdwAlertDialog=class extends t(n){_responses;constructor(t=``,n=``,r){super(),this._responses=new o(t,n),e(this,r)}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}add_response(e,t,n){this._responses.addResponse(e,t,n)}addResponses(...e){this._responses.addResponses(...e)}set_response_appearance(e,t){this._responses.setResponseAppearance(e,t)}get_response_appearance(e){return this._responses.getResponseAppearance(e)}set_response_enabled(e,t){this._responses.setResponseEnabled(e,t)}get_response_enabled(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:s,object:this,response:e}),e}async _presentConfirm(){let e=this._responses.orderResponses(),t=await i({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 r({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,a as AdwAlertResponses,s as NOTIFY_RESPONSE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{applyConstructProps as n}from"./construct-props.js";import{withSignals as r}from"./signals.js";import{GtkImage as i}from"./gtk-image.js";import{avatarColor as a,avatarInitials as o}from"./avatar-color.js";import{AVATAR_DEFAULT_ICON as s,avatarViewState as c}from"./avatar-view.js";import{GridLayout as l,ItemSpec as u,Label as d}from"@nativescript/core";import{avatarIconSize as f,avatarMaxFontSize as p}from"@gjsify/adwaita-core";const m=48;var AdwAvatar=class extends r(l){_label;_icon;_text=``;_size=48;_showInitials=!1;_iconName=``;constructor(e){super(),this.className=`adw-avatar`,this.addColumn(new u(1,`star`)),this.addRow(new u(1,`star`));let t=new d;t.className=`adw-avatar-label`,t.horizontalAlignment=`center`,t.verticalAlignment=`middle`,l.setColumn(t,0),l.setRow(t,0),this.addChild(t),this._label=t;let r=new i;r.className=`adw-icon adw-avatar-icon`,r.horizontalAlignment=`center`,r.verticalAlignment=`middle`,l.setColumn(r,0),l.setRow(r,0),this.addChild(r),this._icon=r,this._applySize(),this._applyColor(),this._applyMode(),n(this,e)}_applySize(){this.width=this._size,this.height=this._size,this.set(`borderRadius`,this._size/2),this._label.set(`fontSize`,Math.round(Math.min(this._size*.4,p(this._size)))),this._icon.iconSize=f(this._size)}_applyColor(){let{fill:e,fg:t}=a(this._text);this.set(`backgroundColor`,e),this._label.set(`color`,t),this._icon.iconColor=t}_applyMode(){let e=c({showInitials:this._showInitials,text:this._text,iconName:this._iconName});this._label.visibility=e.label,this._icon.visibility=e.icon,e.icon===`visible`&&(this._icon.iconName=e.iconName)}get text(){return this._text}set text(e){this._text=e??``,this._label.text=o(this._text),this._applyColor(),this._applyMode()}get size(){return this._size}set size(e){let n=t(e,48);this._size=n>0?n:48,this._applySize()}get showInitials(){return this._showInitials}set showInitials(t){this._showInitials=e(t,!1),this._applyMode()}get iconName(){return this._iconName}set iconName(e){this._iconName=e??``,this._applyMode()}};export{s as AVATAR_DEFAULT_ICON,AdwAvatar,m as DEFAULT_AVATAR_SIZE,a as avatarColor,o as avatarInitials};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{bannerButtonClassName as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{bannerButtonClassName as r,bannerTitleText as i,bannerVisibility as a,defaultBannerProps as o}from"./chrome.js";import{Button as s,GridLayout as c,ItemSpec as l,Label as u}from"@nativescript/core";import{bannerButtonText as d,bannerButtonVisible as f,parseBannerButtonStyle as p}from"@gjsify/adwaita-core";const m=`buttonClicked`;var AdwBanner=class extends n(c){_titleLabel;_button;_hasButton=!1;_props=o();constructor(e){super(),this.className=`adw-banner`,this.addColumn(new l(1,`star`)),this.addColumn(new l(1,`auto`)),this.addRow(new l(1,`auto`));let n=new u;n.className=`adw-banner-title`,n.textWrap=!0,c.setColumn(n,0),this.addChild(n),this._titleLabel=n;let r=new s;r.className=`adw-banner-button`,r.set(`androidElevation`,0),c.setColumn(r,1),this._button=r,r.addEventListener(`tap`,()=>{let e={eventName:m,object:this};this.notify(e)}),this.visibility=a(this._props.revealed),t(this,e)}get title(){return this._props.title}set title(e){this._props.title=e??``,this._renderTitle()}get useMarkup(){return this._props.useMarkup}set useMarkup(t){this._props.useMarkup=e(t,!1),this._renderTitle()}get buttonLabel(){return this._props.buttonLabel}set buttonLabel(e){let t=e??``;this._props.buttonLabel=t,this._button.text=d(t);let n=f(t);n&&!this._hasButton?(this.addChild(this._button),this._hasButton=!0):!n&&this._hasButton&&(this.removeChild(this._button),this._hasButton=!1)}get buttonStyle(){return this._props.buttonStyle}set buttonStyle(e){this._props.buttonStyle=p(e),this._button.className=r(this._button.className,this._props.buttonStyle)}get revealed(){return this._props.revealed}set revealed(t){this._props.revealed=e(t,!1),this.visibility=a(this._props.revealed)}_renderTitle(){this._titleLabel.text=i(this._props.title,this._props.useMarkup)}};export{AdwBanner,m as BUTTON_CLICKED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{resolveBuilderSlot as r}from"./builder-slots.js";import{CLOSE_ATTEMPT as i,NOTIFY_OPEN as a,SHEET_CLOSE as o,addMarkerClass as s,applySheetVisibility as c,createBottomSheetPresentation as l,removeMarkerClass as u,requestBottomSheetClose as d,sheetVisibility as f}from"./bottom-sheet-state.js";import{GridLayout as p,ItemSpec as m,Label as h,StackLayout as g}from"@nativescript/core";const _=`adw-bottom-sheet-content`,v=`adw-bottom-sheet-sheet`,y=[`sheet`,`content`];var AdwBottomSheet=class extends n(p){_content=null;_sheetPanel;_sheetChild=null;_state=l();constructor(e){super(),this.className=`adw-bottom-sheet`,this.addColumn(new m(1,`star`)),this.addRow(new m(1,`star`));let n=new g;n.orientation=`vertical`,n.className=`adw-bottom-sheet-panel`,n.verticalAlignment=`bottom`,n.visibility=f(this._state.open),p.setColumn(n,0),p.setRow(n,0);let r=new h;r.text=`━`,r.className=`adw-bottom-sheet-handle`,r.horizontalAlignment=`center`,r.isUserInteractionEnabled=!1,n.addChild(r),this.addChild(n),this._sheetPanel=n,this._state.subscribe(e=>{c(this._sheetPanel,e);let t={eventName:a,object:this,open:e};this.notify(t)}),t(this,e)}set_content(e){this._content!==e&&(this._content&&(this._content.className=u(this._content.className,_),this.removeChild(this._content)),this._content=e,e&&(e.className=s(e.className,_),p.setColumn(e,0),p.setRow(e,0),this.insertChild(e,0)))}set_sheet(e){this._sheetChild!==e&&(this._sheetChild&&(this._sheetChild.className=u(this._sheetChild.className,v),this._sheetPanel.removeChild(this._sheetChild)),this._sheetChild=e,e&&(e.className=s(e.className,v),this._sheetPanel.addChild(e)))}_addChildFromBuilder(e,t){r(e,y,`content`)===`sheet`?this.set_sheet(t):this.set_content(t)}get content(){return this._content}get sheet(){return this._sheetChild}get open(){return this._state.open}set open(t){this._state.setOpen(e(t,!1))}get canClose(){return this._state.canClose}set canClose(t){let n=e(t,this.canClose);this._state.setCanClose(n)}requestClose(e){let{outcome:t,eventName:n}=d(this._state,e);return n&&this.notify({eventName:n,object:this}),t}};export{AdwBottomSheet,i as CLOSE_ATTEMPT,a as NOTIFY_OPEN,o as SHEET_CLOSE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{GtkImage as r}from"./gtk-image.js";import{buttonContentClassName as i,buttonContentEllipsize as a,buttonContentIcon as o,buttonContentIconIsFallback as s,buttonContentLabelText as c,buttonContentLabelVisibility as l,buttonContentRootedParentClassName as u,buttonContentUnrootedParentClassName as d}from"./button-content.js";import{Label as f,StackLayout as p}from"@nativescript/core";import{ADW_BUTTON_CONTENT_DEFAULTS as m}from"@gjsify/adwaita-core";var AdwButtonContent=class extends n(p){_icon;_label;_props={...m};_hostButton=null;constructor(e){super(),this.orientation=`horizontal`,this.className=`adw-button-content`,this.horizontalAlignment=`center`;let n=new r;n.className=`${n.className} adw-button-content-icon`.trim(),n.verticalAlignment=`middle`,n.iconName=o(``),this.addChild(n),this._icon=n;let i=new f;i.className=`adw-button-content-label`,i.verticalAlignment=`middle`,i.visibility=l(``),this.addChild(i),this._label=i,t(this,e)}get hostButton(){return this._hostButton}set hostButton(e){this._hostButton!==e&&(this._hostButton&&(this._hostButton.className=d(this._hostButton.className??``)),this._hostButton=e,e&&(e.className=u(e.className??``)))}get iconName(){return this._props.iconName}set iconName(e){this._props.iconName=e??``,this._icon.iconName=o(this._props.iconName)}get iconIsFallback(){return s(this._props.iconName)}get iconColor(){return this._icon.iconColor}set iconColor(e){this._icon.iconColor=e}get label(){return this._props.label}set label(e){this._props.label=e??``,this._renderLabel()}get useUnderline(){return this._props.useUnderline}set useUnderline(t){let n=e(t,this.useUnderline);this._props.useUnderline=!!n,this._renderLabel()}get canShrink(){return this._props.canShrink}set canShrink(t){let n=e(t,this.canShrink);this._props.canShrink=!!n,this.className=i(this.className,this._props.canShrink)}get ellipsize(){return a(this._props.canShrink)}_renderLabel(){this._label.text=c(this._props.label,this._props.useUnderline),this._label.visibility=l(this._props.label)}};export{AdwButtonContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{ButtonRowState as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{ButtonRowState as t,buttonRowIconColor as n,buttonRowIconVisuals as r}from"./row-state.js";import{ACTIVATED as i,AdwActionRow as a}from"./adw-action-row.js";import{GtkImage as o}from"./gtk-image.js";import{attachRowPressFeedback as s}from"./row-press.js";import{StackLayout as c}from"@nativescript/core";import{adwaitaAccent as l,onAdwaitaAccentChanged as u}from"@gjsify/adwaita-core";var d=class AdwButtonRow extends a{isActionRow=!1;_contentBox;_startIcon;_endIcon;_pinnedIconColor=null;_unsubAccent=null;_buttonState=new t;constructor(t){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 n=new c;n.orientation=`horizontal`,n.className=`adw-button-row-content`,n.horizontalAlignment=`center`,this._startIcon=AdwButtonRow._makeIcon(`adw-button-row-start-icon`),this._endIcon=AdwButtonRow._makeIcon(`adw-button-row-end-icon`),this._applyIconColor(),this.addEventListener(`loaded`,()=>{this._applyIconColor(),this._unsubAccent??=u(()=>this._applyIconColor())}),this.addEventListener(`unloaded`,()=>{this._unsubAccent?.(),this._unsubAccent=null}),n.addChild(this._startIcon),n.addChild(this._titleLabel),n.addChild(this._endIcon),this._textStack.addChild(n),this._textStack.horizontalAlignment=`center`,this._contentBox=n,this.activatable=!0,this._applyIcons(),s(this),e(this,t)}static _makeIcon(e){let t=new o;return t.className=`${t.className} ${e}`.trim(),t.verticalAlignment=`middle`,t}get startIconName(){return this._buttonState.startIconName}set startIconName(e){this._buttonState.setStartIconName(e)&&this._applyIcons()}get endIconName(){return this._buttonState.endIconName}set endIconName(e){this._buttonState.setEndIconName(e)&&this._applyIcons()}get startIconColor(){return this._startIcon.iconColor}set startIconColor(e){this._pinnedIconColor=e||null,this._applyIconColor()}_applyIconColor(){let e=n(this._pinnedIconColor,l());this._startIcon.iconColor=e,this._endIcon.iconColor=e}_applyIcons(){let e=r(this._buttonState.state);this._startIcon.iconName=e.startIcon,this._startIcon.visibility=e.startIconVisibility,this._endIcon.iconName=e.endIcon,this._endIcon.visibility=e.endIconVisibility}};export{i as ACTIVATED,d as AdwButtonRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{CarouselScrollSync as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{applyConstructProps as n}from"./construct-props.js";import{withSignals as r}from"./signals.js";import{CarouselScrollSync as i,DEFAULT_CAROUSEL_PAGE_WIDTH as a,applyCarouselDots as o,carouselNotifyPayload as s,carouselPositionAtOffset as c,carouselScrollOffset as l,createCarouselState as u,normalizeCarouselPageWidth as d}from"./carousel-state.js";import{GridLayout as f,ItemSpec as p,Label as m,ScrollView as h,StackLayout as g}from"@nativescript/core";const _=`notify::position`,v=`notify::n-pages`,y=`page-changed`;var AdwCarousel=class extends r(f){_scroller;_track;_dots;_state=u({onScrollTo:e=>this._performScroll(e)});_sync=new i;_views=new Map;_dotsById=new Map;_nextPageId=0;_pageWidth=320;constructor(e){super(),this.className=`adw-carousel`,this.addColumn(new p(1,`star`)),this.addRow(new p(1,`star`)),this.addRow(new p(1,`auto`));let t=new h;t.orientation=`horizontal`,t.className=`adw-carousel-scroller`,f.setRow(t,0);let r=new g;r.orientation=`horizontal`,r.className=`adw-carousel-track`,t.content=r,this.addChild(t),this._scroller=t,this._track=r;let i=new g;i.orientation=`horizontal`,i.className=`adw-carousel-dots`,i.horizontalAlignment=`center`,f.setRow(i,1),this.addChild(i),this._dots=i,t.addEventListener(`scroll`,e=>{let t=c(e.scrollX,this._distance());this._sync.apply(this._state,t)}),this._state.subscribe(e=>{o(this._state,this._orderedDots());let t={eventName:e.reason===`n-pages`?v:_,object:this,...s(e)};this.notify(t)}),this._state.onPageChanged(e=>{let t={eventName:y,object:this,index:e};this.notify(t)}),n(this,e)}append(e){this.insert(e,-1)}_addChildFromBuilder(e,t){this.append(t)}insert(e,t=-1){let n=`page-${this._nextPageId++}`;e.width=this._pageWidth,e.className=`${e.className??``} adw-carousel-page`.trim();let r=new m;return r.text=`●`,r.className=`adw-carousel-dot`,r.addEventListener(`tap`,()=>this.scrollToPage(this._state.indexOf(n))),this._views.set(n,e),this._dotsById.set(n,r),this._state.insertPage(n,t)?(this._state.skipReveal(n),this._syncTrack(),!0):(this._views.delete(n),this._dotsById.delete(n),!1)}remove(e){let t=this._idOf(e);return t===null||!this._state.removePage(t)?!1:(this._state.skipReveal(t),this._views.delete(t),this._dotsById.delete(t),this._syncTrack(),!0)}reorder(e,t){let n=this._idOf(e);return n===null||!this._state.reorderPage(n,t)?!1:(this._syncTrack(),!0)}scrollToPage(e){this._state.scrollTo(e,{interactive:!0})}navigate(e){return this._state.navigate(e)}get pages(){let e=[];for(let t=0;t<this._track.getChildrenCount();t++)e.push(this._track.getChildAt(t));return e}get nPages(){return this._state.nPages}get position(){return this._state.position}set position(e){let n=t(e,this.position);if(!Number.isFinite(n))return;let r=this._state.pageAt(n);r>=0&&this.scrollToPage(r)}get currentPage(){return this._state.pageAt(this._state.position)}get interactive(){return this._state.interactive}set interactive(t){let n=e(t,this.interactive);this._state.setInteractive(n)}get pageWidth(){return this._pageWidth}set pageWidth(e){let n=t(e,this.pageWidth);this._pageWidth=d(n);for(let e of this._views.values())e.width=this._pageWidth}_distance(){return this._state.pageDistance(this._pageWidth)}_idOf(e){for(let[t,n]of this._views)if(n===e)return t;return null}_performScroll(e){this._sync.expect(e.position),this._scroller.scrollToHorizontalOffset(l(e.position,this._distance()),!0)}_orderedDots(){let e=[];for(let t of this._state.ids){let n=this._dotsById.get(t);n&&e.push(n)}return e}_syncTrack(){for(;this._track.getChildrenCount()>0;)this._track.removeChild(this._track.getChildAt(0));for(;this._dots.getChildrenCount()>0;)this._dots.removeChild(this._dots.getChildAt(0));let e=this._orderedDots();for(let e of this._state.ids){let t=this._views.get(e);t&&this._track.addChild(t)}for(let t of e)this._dots.addChild(t);o(this._state,e)}};export{AdwCarousel,a as DEFAULT_CAROUSEL_PAGE_WIDTH,v as NOTIFY_N_PAGES,_ as NOTIFY_POSITION,y as PAGE_CHANGED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{DEFAULT_CLAMP_MAX_SIZE as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{DEFAULT_CLAMP_MAX_SIZE as n,DEFAULT_CLAMP_TIGHTENING_THRESHOLD as r,clampAllocationFor as i,clampChildClassName as a,defaultClampProps as o,normalizeClampProp as s}from"./chrome.js";import{GridLayout as c,ItemSpec as l}from"@nativescript/core";var AdwClamp=class extends t(c){_props=o();_child=null;_clampWidth=0;constructor(t){super(),this.className=`adw-clamp`,this.addColumn(new l(1,`star`)),this.addRow(new l(1,`auto`)),this.addEventListener(`layoutChanged`,()=>this._allocate()),e(this,t)}set_child(e){this._child&&=(this._child.className=a(this._child.className,null),this.removeChild(this._child),null),e&&(e.horizontalAlignment=`center`,c.setColumn(e,0),c.setRow(e,0),this.addChild(e),this._child=e,this._allocate())}get child(){return this._child}_addChildFromBuilder(e,t){this.set_child(t)}get maximumSize(){return this._props.maximumSize}set maximumSize(e){this._props.maximumSize=s(e,n),this._allocate()}get tighteningThreshold(){return this._props.tighteningThreshold}set tighteningThreshold(e){this._props.tighteningThreshold=s(e,r),this._allocate()}_allocate(){let e=this.getActualSize?.();if(e&&e.width>0&&(this._clampWidth=e.width),!this._child)return;let{width:t,sizeClass:n}=i(this._clampWidth,this._props);this._child.width=t;let r=a(this._child.className,n);this._child.className!==r&&(this._child.className=r)}};export{AdwClamp,n as DEFAULT_CLAMP_MAX_SIZE,r as DEFAULT_CLAMP_TIGHTENING_THRESHOLD};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{AdwActionRow as n}from"./adw-action-row.js";import{GtkImage as r}from"./gtk-image.js";import{attachRowPressFeedback as i}from"./row-press.js";import{Label as a,StackLayout as o,action as s}from"@nativescript/core";import{ComboState as c,ComboState as l,normalizeComboOptions as u}from"@gjsify/adwaita-core";import{panDownSymbolic as d}from"@gjsify/adwaita-icons/ui";const f=`notify::selected`;var AdwComboRow=class extends n{_valueLabel;_chevron;_state=new l;constructor(e){super(),this.className=`adw-row adw-action-row adw-combo-row`;let n=new o;n.orientation=`horizontal`,n.className=`adw-combo-suffix`;let s=new a;s.className=`adw-combo-value`,s.text=``;let c=new r;c.className=`adw-combo-chevron`,c.iconColor=`#9a9a9a`,c.iconSize=16,c.iconName=d,n.addChild(s),n.addChild(c),this.add_suffix(n),this._valueLabel=s,this._chevron=c,this._state.subscribe(e=>{if(this._valueLabel.text=e.label,this._syncChooser(),e.interactive){let t={eventName:f,object:this,selected:e.selected,value:e.value};this.notify(t)}}),this.addEventListener(`tap`,()=>{this._openChooser()}),i(this),this._syncChooser(),t(this,e)}_syncChooser(){this._chevron.visibility=this._state.presentsChooser?`visible`:`collapse`}async _openChooser(){if(!this._state.presentsChooser)return;let e=this._state.model.map(e=>e.label),t=await s({title:this.title||void 0,cancelButtonText:`Cancel`,actions:e});this._state.select(e.indexOf(t))}get model(){return this._state.model}set model(e){this._state.setModel(u(e))}get selected(){return this._state.selectedIndex}set selected(t){let n=e(t,this.selected);this._state.setSelectedIndex(n)}get selectedValue(){return this._state.selectedValue}set selectedValue(e){this._state.setSelectedValue(e)}};export{AdwComboRow,c as ComboState,f as NOTIFY_SELECTED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{attachRowPressFeedback as r}from"./row-press.js";import{DATA_GRID_HEADER_CELL_CLASS as i,DATA_GRID_HEADER_ROW_CLASS as a,DATA_GRID_SECTION_CELL_CLASS as o,dataGridCellClass as s,dataGridItemSpec as c,dataGridRowClass as l,dataGridShapeKey as u,dataGridTracksKey as d}from"./data-grid-model.js";import{GridLayout as f,ItemSpec as p,Label as m,StackLayout as h}from"@nativescript/core";import{dataGridCellText as g,dataGridColumnClasses as _,dataGridRowInteractive as v,dataGridTracks as y,normalizeDataGridColumns as b,normalizeDataGridVariant as x}from"@gjsify/adwaita-core";const S=`row-activated`;var AdwDataGrid=class extends n(f){_columns=[];_dataRows=[];_interactive=!1;_header=null;_rowNodes=[];_trackKey=``;_shapeKey=``;constructor(e){super(),this.className=`adw-data-grid`,t(this,e)}get columns(){return this._columns}set columns(e){this._columns=b(e),this._render()}get rows(){return this._dataRows}set rows(e){this._dataRows=Array.isArray(e)?e.map(e=>({...e})):[],this._render()}get interactive(){return this._interactive}set interactive(t){let n=e(t,this.interactive);this._interactive=!!n,this._paint()}_render(){this._syncColumns(),this._syncNodes(),this._paint()}_syncColumns(){let e=y(this._columns),t=d(e);if(t!==this._trackKey){this._trackKey=t,this.removeColumns();for(let t of e){let e=c(t);this.addColumn(new p(e.value,e.type))}}}_syncNodes(){let e=this._columns.length,t=u(e,this._dataRows.length);if(t!==this._shapeKey){this._shapeKey=t;for(let e of[this._header,...this._rowNodes])if(e!==null){this.removeChild(e.background);for(let t of e.cells)this.removeChild(t)}this._header=null,this._rowNodes=[],this.removeRows(),e!==0&&(this.addRow(new p(1,`auto`)),this._header=this._buildRow(0,e,!1),this._rowNodes=this._dataRows.map((t,n)=>(this.addRow(new p(1,`auto`)),this._buildRow(n+1,e,!0))))}}_buildRow(e,t,n){let i=new h;f.setRow(i,e),f.setColumn(i,0),f.setColumnSpan(i,t),this.addChild(i),n&&(r(i),i.addEventListener(`tap`,()=>this._activate(e-1)));let a=[];for(let n=0;n<t;n++){let t=new m;t.textWrap=!1,f.setRow(t,e),f.setColumn(t,n),this.addChild(t),a.push(t)}return{background:i,cells:a}}_paint(){let e=this._header;e!==null&&(e.background.className=a,this._columns.forEach((t,n)=>{let r=e.cells[n];r!==void 0&&(r.className=`${_(t).join(` `)} ${i}`,r.text=t.label??t.key,this._showCell(r,1))}),this._dataRows.forEach((e,t)=>{let n=this._rowNodes[t];if(n===void 0)return;let r=x(e.variant),i=v(r,e.interactive,this._interactive);if(n.background.className=l(r,i),r===`section`){let t=this._columns[0]?.key??``;n.cells.forEach((n,r)=>{r===0?(n.className=o,n.text=g(e[t]),this._showCell(n,this._columns.length)):(n.text=``,n.visibility=`collapse`,f.setColumnSpan(n,1))});return}this._columns.forEach((t,i)=>{let a=n.cells[i];a!==void 0&&(a.className=s(_(t),r),a.text=g(e[t.key]),this._showCell(a,1))})}))}_showCell(e,t){e.visibility=`visible`,f.setColumnSpan(e,t)}_activate(e){let t=this._dataRows[e];if(t===void 0||!v(x(t.variant),t.interactive,this._interactive))return;let n={eventName:S,object:this,index:e,row:t};this.notify(n)}};export{AdwDataGrid,S as ROW_ACTIVATED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{applyConstructProps as n}from"./construct-props.js";import{AdwActionRow as r}from"./adw-action-row.js";import{GtkImage as i}from"./gtk-image.js";import{AdwImageButton as a}from"./adw-image-button.js";import{NS_EDIT_ICON_CLASS as o,NS_ENTRY_ROW_CLASS as s,applyEntryRowState as c}from"./entry-row-view.js";import{Label as l,StackLayout as u,TextField as d}from"@nativescript/core";import{ADW_ACCENT_FG_COLOR as f,EntryRowState as p,EntryRowState as m}from"@gjsify/adwaita-core";import{documentEditSymbolic as h,objectSelectSymbolic as g}from"@gjsify/adwaita-icons/actions";const _=`notify::text`,v=`notify::text-length`,y=`apply`,b=`entry-activated`;var AdwEntryRow=class extends r{isActionRow=!1;_state=new m;_field;_emptyTitle;_suffixes;_editIcon;_indicator;_applyButton;_slotSuffix=null;_lastText=``;_lastLength=0;constructor(e){super(),this._titleLabel.className=`adw-row-title adw-entry-title`,this._managesTitleVisibility=!1;let t=new l;t.className=`adw-row-title adw-entry-empty-title`,t.textWrap=!0,this._textStack.insertChild(t,0),this._emptyTitle=t;let r=new d;r.className=`adw-entry-field`,r.set(`backgroundColor`,`transparent`),r.set(`borderWidth`,0),this._textStack.addChild(r),this._field=r;let s=new u;s.orientation=`horizontal`,s.className=`adw-entry-row-suffixes`,this._suffixes=s;let c=new i;c.className=`gtk-image adw-entry-indicator`,s.addChild(c),this._indicator=c;let p=new a;p.className=`${p.className} adw-entry-apply`.trim(),p.iconName=g,p.iconColor=f,p.addEventListener(`tap`,()=>this.apply()),s.addChild(p),this._applyButton=p;let m=new i;m.className=o,m.iconName=h,s.addChild(m),this._editIcon=m,super.add_suffix(s),this._field.addEventListener(`textChange`,()=>{this._state.setText(this._field.text??``)}),this._field.addEventListener(`focus`,()=>this._state.setEditing(!0)),this._field.addEventListener(`blur`,()=>this._state.setEditing(!1)),this._field.addEventListener(`returnPress`,()=>this._activate()),this._lastText=this._state.text,this._lastLength=this._state.textLength,this._render(this._state.state),this._state.subscribe(e=>this._onStateChanged(e)),n(this,e)}get text(){return this._state.text}set text(e){this._state.setText(e??``)}get textLength(){return this._state.textLength}get maxLength(){return this._state.maxLength}set maxLength(e){let n=t(e,this.maxLength);this._state.setMaxLength(n)}get editable(){return this._state.editable}set editable(t){let n=e(t,this.editable);this._state.setEditable(n)}get showApplyButton(){return this._state.showApplyButton}set showApplyButton(t){let n=e(t,this.showApplyButton);this._state.setShowApplyButton(n)}get activatesDefault(){return this._state.activatesDefault}set activatesDefault(t){let n=e(t,this.activatesDefault);this._state.setActivatesDefault(n)}get editing(){return this._state.editing}add_suffix(e){e.className=`${e.className??``} adw-row-suffix`.trim(),this._suffixes.addChild(e),this._slotSuffix=e}remove(e){if(e===this.prefix){super.remove(e);return}this._suffixes.removeChild(e),e===this._slotSuffix&&(this._slotSuffix=null)}get suffix(){return this._slotSuffix}setShowIndicator(e){this._state.setShowIndicator(e)}setIndicatorIcon(e){this._indicator.iconName=e}apply(){this._state.apply(),this.notify({eventName:y,object:this})}_activate(){let e=this._state.activate();if(e.signal===`apply`){this.notify({eventName:y,object:this});return}let t={eventName:b,object:this,activateDefault:e.activateDefault};this.notify(t)}_render(e){c({row:this,emptyTitle:this._emptyTitle,title:this._titleLabel,field:this._field,editIcon:this._editIcon,indicator:this._indicator,applyButton:this._applyButton},e,this._baseClassName)}get _baseClassName(){return s}_onStateChanged(e){if(this._render(e),e.text!==this._lastText){this._lastText=e.text;let t={eventName:_,object:this,text:e.text};this.notify(t)}if(e.textLength!==this._lastLength){this._lastLength=e.textLength;let t={eventName:v,object:this,textLength:e.textLength};this.notify(t)}}};export{AdwEntryRow,p as EntryRowState,_ as NOTIFY_TEXT,v as NOTIFY_TEXT_LENGTH,y as SIGNAL_APPLY,b as SIGNAL_ENTRY_ACTIVATED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{resolveBuilderSlot as n}from"./builder-slots.js";import{AdwActionRow as r}from"./adw-action-row.js";import{GtkImage as i}from"./gtk-image.js";import{GridLayout as a,ItemSpec as o,StackLayout as s}from"@nativescript/core";import{ExpanderState as c,ExpanderState as l}from"@gjsify/adwaita-core";import{panDownSymbolic as u,panUpSymbolic as d}from"@gjsify/adwaita-icons/ui";const f=`notify::expanded`,p=[`prefix`,`suffix`];var AdwExpanderRow=class extends r{isActionRow=!1;_toggle;_disclosure;_state=new l;constructor(e){super(),this.className=`adw-row adw-action-row adw-expander-row`,this.addRow(new o(1,`auto`));let n=new s;n.orientation=`vertical`,n.className=`adw-expander-disclosure`,n.visibility=`collapse`,a.setRow(n,1),a.setColumn(n,0),a.setColumnSpan(n,3),this.addChild(n),this._disclosure=n;let r=new i;r.iconName=u,r.className=`${r.className} adw-expander-toggle`.trim(),this.add_suffix(r),this._toggle=r,this._state.subscribe(e=>{this._disclosure.visibility=e?`visible`:`collapse`,this._toggle.iconName=e?d:u;let t={eventName:f,object:this,expanded:e};this.notify(t)});let toggleOnTap=()=>{this._state.toggle()};this._textStack.addEventListener(`tap`,toggleOnTap),r.addEventListener(`tap`,toggleOnTap),t(this,e)}add_row(e){this._disclosure.addChild(e)}remove(e){this._disclosure.removeChild(e)}_addChildFromBuilder(e,t){let r=n(e,p,`row`);r===`row`?this.add_row(t):super._addChildFromBuilder(r,t)}get disclosureRows(){let e=[];for(let t=0;t<this._disclosure.getChildrenCount();t++)e.push(this._disclosure.getChildAt(t));return e}get expanded(){return this._state.expanded}set expanded(t){this._state.setExpanded(e(t,!1))}};export{AdwExpanderRow,c as ExpanderState,f as NOTIFY_EXPANDED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{resolveBuilderSlot as n}from"./builder-slots.js";import{classNameWith as r,normalizeStyleClasses as i}from"./style-classes.js";import{AdwWindowTitle as a}from"./adw-window-title.js";import{GridLayout as o,ItemSpec as s,StackLayout as c}from"@nativescript/core";const l=[`titleWidget`,`startBox`,`endBox`];var AdwHeaderBar=class extends t(o){_startBox;_endBox;_titleWidget;_styleClasses=[];constructor(t){super(),this.className=`adw-header-bar`,this.addColumn(new s(1,`auto`)),this.addColumn(new s(1,`star`)),this.addColumn(new s(1,`auto`)),this.addRow(new s(1,`auto`));let n=new c;n.orientation=`horizontal`,n.className=`adw-header-bar-start`,o.setColumn(n,0),this.addChild(n),this._startBox=n;let r=new a;r.horizontalAlignment=`center`,r.verticalAlignment=`middle`,o.setColumn(r,1),this.addChild(r),this._titleWidget=r;let i=new c;i.orientation=`horizontal`,i.className=`adw-header-bar-end`,i.horizontalAlignment=`right`,o.setColumn(i,2),this.addChild(i),this._endBox=i,e(this,t)}get title(){return this._titleWidget instanceof a?this._titleWidget.title:``}set title(e){this._titleWidget instanceof a&&(this._titleWidget.title=e??``)}get subtitle(){return this._titleWidget instanceof a?this._titleWidget.subtitle:``}set subtitle(e){this._titleWidget instanceof a&&(this._titleWidget.subtitle=e??``)}get styleClasses(){return[...this._styleClasses]}set styleClasses(e){this._styleClasses=i(e),this.className=r(`adw-header-bar`,this._styleClasses)}pack_start(e){this._startBox.addChild(e)}pack_end(e){this._endBox.insertChild(e,0)}set_title_widget(e){this._titleWidget&&this.removeChild(this._titleWidget),e.horizontalAlignment=`center`,e.verticalAlignment=`middle`,o.setColumn(e,1),this.addChild(e),this._titleWidget=e}_addChildFromBuilder(e,t){switch(n(e,l,`startBox`)){case`titleWidget`:this.set_title_widget(t);return;case`endBox`:this.pack_end(t);return;default:this.pack_start(t)}}get titleWidget(){return this._titleWidget}get startBox(){return this._startBox}get endBox(){return this._endBox}};export{AdwHeaderBar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{onAdwaitaColorSchemeChanged as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{onAdwaitaColorSchemeChanged as r,themeIconColor as i}from"./color-scheme.js";import{DEFAULT_ICON_COLOR as a}from"./icon-path.js";import{resolveIconSource as o}from"./icon-theme.js";import{renderSymbolicIcon as s}from"./icons.js";import{attachRowPressFeedback as c}from"./row-press.js";import{GridLayout as l,Image as u,ItemSpec as d}from"@nativescript/core";const f=16;var AdwImageButton=class extends n(l){_image;_icon=``;_iconColor=i();_explicitColor=!1;_iconSize=16;_unsubScheme=null;constructor(e){super(),this.className=`adw-image-button`,this.addRow(new d(1,`star`)),this.addColumn(new d(1,`star`));let n=new u;n.className=`adw-image-button-icon`,n.stretch=`aspectFit`,n.width=this._iconSize,n.height=this._iconSize,n.horizontalAlignment=`center`,n.verticalAlignment=`middle`,this.addChild(n),this._image=n,c(this),this.addEventListener(`loaded`,()=>{this._syncThemeColor(),this._unsubScheme??=r(()=>this._syncThemeColor())}),this.addEventListener(`unloaded`,()=>{this._unsubScheme?.(),this._unsubScheme=null}),t(this,e)}_syncThemeColor(){if(this._explicitColor)return;let e=i();e!==this._iconColor&&(this._iconColor=e,this._render())}_render(){let e=o(this._icon);if(!e)return;let t=s(e,{size:this._iconSize,color:this._iconColor});t&&(this._image.imageSource=t)}get iconName(){return this._icon}set iconName(e){this._icon=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||a,this._render()}get iconSize(){return this._iconSize}set iconSize(t){let n=e(t,this.iconSize);this._iconSize=Number.isFinite(n)&&n>0?n:16,this._image.width=this._iconSize,this._image.height=this._iconSize,this._render()}get image(){return this._image}};export{AdwImageButton,f as DEFAULT_ICON_BUTTON_ICON_SIZE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{AdwViewSwitcherBase as t}from"./view-switcher-base.js";import{isInlineViewSwitcherDisplayMode as n}from"@gjsify/adwaita-core";var AdwInlineViewSwitcher=class extends t{_displayMode=`labels`;constructor(t){super(`adw-inline-view-switcher`),this._initClasses(),e(this,t)}get barClass(){return`adw-inline-view-switcher-bar`}get buttonClass(){return`adw-inline-view-switcher-button`}get buttonDisplayMode(){return this._displayMode}get switcherKind(){return`inline`}get displayMode(){return this._displayMode}set displayMode(e){n(e)&&e!==this._displayMode&&(this._displayMode=e,this._applySelection())}};export{AdwInlineViewSwitcher};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{NsNavigationSplitViewState as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{NsNavigationSplitViewState as n,splitViewColumns as r}from"./split-view-state.js";import{AdwSplitViewBase as i}from"./split-view-base.js";import{GridLayout as a}from"@nativescript/core";var o=class AdwNavigationSplitView extends i{constructor(e){super(`adw-navigation-split-view`,`navigation`,new n({onCritical:e=>console.error(e),onDelegate:(e,t)=>{for(let n=this.parent;n;n=n.parent)if(n instanceof AdwNavigationSplitView)return(e===`push`?n.push(t):n.pop()).kind!==`not-found`;return!1}})),this._applyLayout(),t(this,e)}_applyLayout(){if(!this._state.collapsed){let e=r(this._state.sidebarPosition,this.textDirection);this._sidebar&&(this._sidebar.visibility=`visible`,this._sidebar.translateX=0,a.setColumn(this._sidebar,e.sidebar),a.setColumnSpan(this._sidebar,1),this._sidebar.width=this.sidebarWidth),this._content&&(this._content.visibility=`visible`,this._content.translateX=0,a.setColumn(this._content,e.content),a.setColumnSpan(this._content,1));return}let e=this._state.visiblePane;this._sidebar&&(this._sidebar.visibility=e===`sidebar`?`visible`:`collapse`,this._sidebar.translateX=0,a.setColumn(this._sidebar,0),a.setColumnSpan(this._sidebar,2),this._sidebar.width=`auto`),this._content&&(this._content.visibility=e===`content`?`visible`:`collapse`,this._content.translateX=0,a.setColumn(this._content,0),a.setColumnSpan(this._content,2))}_transitionSidebar(){if(!this._shouldAnimate()||!this._sidebar||!this._content){this._applyLayout();return}this._cancelPending();for(let e of[this._sidebar,this._content])a.setColumn(e,0),a.setColumnSpan(e,2);this._sidebar.width=`auto`;let e=this._paneWidth(),t=this._state.transition===`push`,n=this._state.visiblePane===`sidebar`?this._sidebar:this._content,r=n===this._sidebar?this._content:this._sidebar,i=t?e:-e,o=t?-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:o,y:0},duration:200,curve:`easeIn`})).then(()=>this._settleAfterSwap(n,r)).catch(()=>{})}_settleAfterSwap(e,t){(this._state.visiblePane===`sidebar`?this._sidebar:this._content)===e&&(t.visibility=`collapse`,t.translateX=0)}_paneWidth(){let e=this.getActualSize();return e&&e.width>0?e.width:1024}get sidebarTag(){return this._state.sidebarTag}set sidebarTag(e){this._state.setTag(`sidebar`,e)}get contentTag(){return this._state.contentTag}set contentTag(e){this._state.setTag(`content`,e)}push(e){return this._state.push(e)}pop(){return this._state.pop()}get showContent(){return this._state.showContent}set showContent(t){let n=e(t,this.showContent);this._state.showContent=n}};export{o as AdwNavigationSplitView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{NOTIFY_VISIBLE_PAGE as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{NOTIFY_VISIBLE_PAGE as r,NsNavigationStack as i,POPPED as a,PUSHED as o,REPLACED as s,navigationPageClassName as c}from"./navigation-stack.js";import{GridLayout as l,ItemSpec as u}from"@nativescript/core";import{describeNavigationDiagnostic as d}from"@gjsify/adwaita-core";var AdwNavigationView=class extends n(l){_nav;constructor(e){super(),this.className=`adw-navigation-view`,this.addColumn(new u(1,`star`)),this.addRow(new u(1,`star`)),this._nav=new i({attachPage:e=>{e.className=c(e.className),l.setColumn(e,0),l.setRow(e,0),this.addChild(e)},detachPage:e=>this.removeChild(e),setPageVisibility:(e,t)=>{e.visibility=t},emit:e=>this._emitNavigation(e)},{onDiagnostic:e=>console.warn(`[AdwNavigationView] ${d(e)}`)}),t(this,e)}add(e,t=null,n={}){return this._nav.add(e,t,n)}_addChildFromBuilder(e,t){this.add(t)}remove(e){return this._nav.remove(e)}push(e,t={}){return this._nav.push(e,t)}push_by_tag(e){return this._nav.pushByTag(e)}pop(){return this._nav.pop()}pop_to_page(e){return this._nav.popToPage(e)}pop_to_tag(e){return this._nav.popToTag(e)}replace(e){this._nav.replace(e)}replace_with_tags(e){this._nav.replaceWithTags(e)}find_page(e){return this._nav.findPage(e)}get_previous_page(e){return this._nav.getPreviousPage(e)}setPageTag(e,t){return this._nav.setTag(e,t)}setPageTitle(e,t){return this._nav.setTitle(e,t)}setPageCanPop(e,t){return this._nav.setCanPop(e,t)}canGoBack(){return this._nav.canGoBack()}backButtonTooltip(e){return this._nav.backButtonTooltip(e)}popFromShortcut(){return this._nav.popFromShortcut()}popFromEscape(){return this._nav.popFromEscape()}get visiblePage(){return this._nav.visiblePage}get visiblePageTag(){return this._nav.visiblePageTag}get depth(){return this._nav.depth}get navigationStack(){return this._nav.stack}get pages(){return this._nav.pages}get animateTransitions(){return this._nav.animateTransitions}set animateTransitions(t){let n=e(t,this.animateTransitions);this._nav.setAnimateTransitions(n)}get popOnEscape(){return this._nav.popOnEscape}set popOnEscape(t){let n=e(t,this.popOnEscape);this._nav.setPopOnEscape(n)}_emitNavigation(e){let t={eventName:e.name,object:this,page:e.page,tag:e.tag,depth:e.depth};this.notify(t)}};export{AdwNavigationView,r as NOTIFY_VISIBLE_PAGE,a as POPPED,o as PUSHED,s as REPLACED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{NsOverlaySplitViewState as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{NsOverlaySplitViewState as n,splitViewColumns as r}from"./split-view-state.js";import{AdwSplitViewBase as i}from"./split-view-base.js";import{GridLayout as a}from"@nativescript/core";var AdwOverlaySplitView=class extends i{_scrim=null;constructor(e){super(`adw-overlay-split-view`,`overlay`,new n),this._applyLayout(),t(this,e)}get pinSidebar(){return this._state.pinSidebar}set pinSidebar(t){let n=e(t,this.pinSidebar);this._state.setPinSidebar(!!n)}_applyLayout(){let e=r(this._state.sidebarPosition),t=this._state.sidebarPosition===`end`;if(!this._state.collapsed){this._detachScrim();let t=this._state.showSidebar;this._sidebar&&(this._sidebar.visibility=t?`visible`:`collapse`,this._sidebar.translateX=0,this._sidebar.opacity=1,a.setColumn(this._sidebar,e.sidebar),a.setColumnSpan(this._sidebar,1),this._sidebar.width=this.sidebarWidth,this._sidebar.className=this._paneClassName(this._sidebar.className,!1),this._sidebar.horizontalAlignment=`stretch`),this._content&&(this._content.visibility=`visible`,a.setColumn(this._content,t?e.content:0),a.setColumnSpan(this._content,t?1:2)),this._applyPaneFocus();return}this._content&&(this._content.visibility=`visible`,a.setColumn(this._content,0),a.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(a.setColumn(this._scrim,0),a.setColumnSpan(this._scrim,2),this._scrim.visibility=this._state.shieldVisible?`visible`:`collapse`,this._scrim.opacity=+!!this._state.shieldVisible),this._sidebar&&(a.setColumn(this._sidebar,0),a.setColumnSpan(this._sidebar,2),this._sidebar.width=this.sidebarWidth,this._sidebar.horizontalAlignment=t?`right`:`left`,this._sidebar.className=this._paneClassName(this._sidebar.className,!0),this._sidebar.visibility=this._state.showSidebar?`visible`:`collapse`,this._sidebar.translateX=this._state.showSidebar?0:this._hiddenOffset(),this._sidebar.opacity=1),this._applyPaneFocus()}_transitionSidebar(){if(!this._state.collapsed||!this._shouldAnimate()){this._applyLayout();return}this._cancelPending(),this._prepareCollapsedStructure(),this._applyPaneFocus(),this._state.showSidebar?this._animateOpen():this._animateClose()}_applyPaneFocus(){this._sidebar&&(this._sidebar.isUserInteractionEnabled=this._state.sidebarFocusable),this._content&&(this._content.isUserInteractionEnabled=this._state.contentFocusable)}_ensureScrim(){if(this._scrim)return this._scrim;let e=new a;return e.className=`adw-overlay-scrim`,e.visibility=`collapse`,e.opacity=0,e.addEventListener(`tap`,()=>this.hideSidebarPane()),this._scrim=e,e}_raiseOverlayChildren(){let e=this._ensureScrim();this._isChild(e)&&this.removeChild(e);let t=this._sidebar;t&&this._isChild(t)&&this.removeChild(t),this.addChild(e),t&&this.addChild(t)}_detachScrim(){this._scrim&&this._isChild(this._scrim)&&this.removeChild(this._scrim)}_prepareCollapsedStructure(){let e=this._state.sidebarPosition===`end`;this._content&&(this._content.visibility=`visible`,a.setColumn(this._content,0),a.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(a.setColumn(this._scrim,0),a.setColumnSpan(this._scrim,2)),this._sidebar&&(a.setColumn(this._sidebar,0),a.setColumnSpan(this._sidebar,2),this._sidebar.width=this.sidebarWidth,this._sidebar.horizontalAlignment=e?`right`:`left`,this._sidebar.className=this._paneClassName(this._sidebar.className,!0))}_animateOpen(){let e=this._scrim;e&&(e.visibility=`visible`,e.opacity=0,this._track(e.animate({opacity:1,duration:200,curve:`easeOut`})));let t=this._sidebar;t&&(t.visibility=`visible`,t.translateX=this._hiddenOffset(),t.opacity=1,this._track(t.animate({translate:{x:0,y:0},duration:200,curve:`easeOut`})))}_animateClose(){let e=this._scrim,t=this._sidebar,n=[];e&&n.push(this._track(e.animate({opacity:0,duration:200,curve:`easeIn`}))),t&&n.push(this._track(t.animate({translate:{x:this._hiddenOffset(),y:0},duration:200,curve:`easeIn`}))),Promise.all(n).then(()=>{this._state.showSidebar||(t&&(t.visibility=`collapse`),e&&(e.visibility=`collapse`))}).catch(()=>{})}_hiddenOffset(){let e=this.sidebarWidth;return this._state.sidebarPosition===`end`?e:-e}_paneClassName(e,t){return`${(e??``).split(/\s+/).filter(e=>e&&e!==`adw-overlay-active`&&e!==`adw-split-view-sidebar`).join(` `)} adw-split-view-sidebar${t?` adw-overlay-active`:``}`.trim()}};export{AdwOverlaySplitView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{AdwImageButton as n}from"./adw-image-button.js";import{NS_PASSWORD_ENTRY_ROW_CLASS as r,applyPasswordEntryRowState as i}from"./entry-row-view.js";import{AdwEntryRow as a}from"./adw-entry-row.js";import{PasswordEntryRowState as o,PasswordEntryRowState as s}from"@gjsify/adwaita-core";import{dialogWarningSymbolic as c}from"@gjsify/adwaita-icons/status";const l=`notify::revealed`;var AdwPasswordEntryRow=class extends a{_password=new s(this._state);_peekButton;constructor(e){super(),this._field.className=`adw-entry-field adw-password-field`;let r=new n;r.className=`${r.className} adw-password-peek`.trim(),r.addEventListener(`tap`,()=>this._password.togglePeek()),this.add_suffix(r),this._peekButton=r,this.setIndicatorIcon(c),this._renderPassword(this._password.state),this._password.subscribe(e=>{this._renderPassword(e);let t={eventName:l,object:this,revealed:e.revealed};this.notify(t)}),t(this,e)}get revealed(){return this._password.revealed}set revealed(t){this._password.setRevealed(e(t,!1))}get peeking(){return this._password.revealed}set peeking(t){this._password.setRevealed(e(t,!1))}togglePeek(){return this._password.togglePeek()}get capsLockOn(){return this._password.capsLockOn}setCapsLockOn(e){this._password.setCapsLockOn(e)}get _baseClassName(){return r}_renderPassword(e){i({field:this._field,peekButton:this._peekButton},e)}};export{AdwPasswordEntryRow,l as NOTIFY_REVEALED,o as PasswordEntryRowState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{AdwImageButton as r}from"./adw-image-button.js";import{searchNsPreferences as i}from"./preferences-search.js";import{GridLayout as a,ItemSpec as o,Label as s,StackLayout as c}from"@nativescript/core";import{windowCloseSymbolic as l}from"@gjsify/adwaita-icons/ui";const u=`closed`;var AdwPreferencesDialog=class extends n(a){_card;_headerBox;_titleLabel;_body;constructor(e){super(),this.className=`adw-preferences-dialog`,this.visibility=`collapse`,this.addColumn(new o(1,`star`)),this.addRow(new o(1,`star`));let n=new a;n.className=`adw-preferences-dialog-card`,n.verticalAlignment=`middle`,n.horizontalAlignment=`center`,n.addColumn(new o(1,`star`)),n.addRow(new o(1,`auto`)),n.addRow(new o(1,`star`)),a.setColumn(n,0),a.setRow(n,0),this.addChild(n),this._card=n;let i=new a;i.className=`adw-preferences-dialog-header`,i.addColumn(new o(1,`star`)),i.addColumn(new o(1,`auto`)),i.addRow(new o(1,`auto`)),a.setRow(i,0),n.addChild(i),this._headerBox=i;let u=new s;u.className=`adw-preferences-dialog-title`,u.text=`Preferences`,a.setColumn(u,0),i.addChild(u),this._titleLabel=u;let d=new r;d.iconName=l,d.className=`${d.className} adw-preferences-dialog-close`.trim(),d.addEventListener(`tap`,()=>this.close()),a.setColumn(d,1),i.addChild(d);let f=new c;f.orientation=`vertical`,f.className=`adw-preferences-dialog-body`,a.setRow(f,1),n.addChild(f),this._body=f,t(this,e)}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??`Preferences`}add(e){this._body.addChild(e)}_addChildFromBuilder(e,t){this.add(t)}remove(e){this._body.removeChild(e)}get searchPages(){let e=[],t=this._body.getChildrenCount();for(let n=0;n<t;n++){let t=this._body.getChildAt(n);typeof t.searchGroups==`function`&&e.push(t)}return e}search(e,t){return i(this.searchPages,e,t)}present(){this.visibility=`visible`}close(){this.visibility=`collapse`;let e={eventName:u,object:this};this.notify(e)}get open(){return this.visibility===`visible`}set open(t){e(t,!1)?this.present():this.close()}get body(){return this._body}};export{AdwPreferencesDialog,u as CLOSED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{resolveBuilderSlot as n}from"./builder-slots.js";import{PREFERENCES_GROUP_HEADER_CLASS as r,preferencesGroupVisuals as i}from"./preferences-group-state.js";import{GridLayout as a,ItemSpec as o,Label as s,StackLayout as c}from"@nativescript/core";const l=[`headerSuffix`];var AdwPreferencesGroup=class extends t(c){_header;_titleLabel;_descriptionLabel;_suffixHost;_listbox;_title=``;_description=``;_headerSuffix=null;constructor(t){super(),this.orientation=`vertical`,this.className=`adw-preferences-group`;let n=new a;n.className=r,n.addColumn(new o(1,`star`)),n.addColumn(new o(1,`auto`)),n.addRow(new o(1,`auto`));let i=new c;i.orientation=`vertical`,i.className=`adw-preferences-group-labels`,i.verticalAlignment=`middle`,a.setColumn(i,0),n.addChild(i);let l=new s;l.className=`adw-preferences-group-title`,l.textWrap=!0,i.addChild(l);let u=new s;u.className=`adw-preferences-group-description`,u.textWrap=!0,i.addChild(u);let d=new c;d.orientation=`horizontal`,d.className=`adw-preferences-group-suffix`,d.verticalAlignment=`middle`,a.setColumn(d,1),n.addChild(d);let f=new c;f.orientation=`vertical`,f.className=`boxed-list adw-preferences-group-listbox`,this.addChild(n),this.addChild(f),this._header=n,this._titleLabel=l,this._descriptionLabel=u,this._suffixHost=d,this._listbox=f,this._applyVisuals(),e(this,t)}get title(){return this._title}set title(e){this._title=e??``,this._titleLabel.text=this._title,this._applyVisuals()}get description(){return this._description}set description(e){this._description=e??``,this._descriptionLabel.text=this._description,this._applyVisuals()}get headerSuffix(){return this._headerSuffix}set headerSuffix(e){e!==this._headerSuffix&&(this._headerSuffix&&this._suffixHost.removeChild(this._headerSuffix),this._headerSuffix=e,this._headerSuffix&&this._suffixHost.addChild(this._headerSuffix),this._applyVisuals())}_addChildFromBuilder(e,t){if(n(e,l,`row`)===`headerSuffix`){this.headerSuffix=t;return}this.add(t)}add(e){this._listbox.addChild(e),this._refreshRowEdges(),this._applyVisuals()}remove(e){this._listbox.removeChild(e),this._refreshRowEdges(),this._applyVisuals()}searchRows(){let e=[],t=this._listbox.getChildrenCount();for(let n=0;n<t;n++)e.push(this._listbox.getChildAt(n));return e}_applyVisuals(){let e=i({title:this._title,description:this._description,hasHeaderSuffix:this._headerSuffix!==null,rowCount:this._listbox.getChildrenCount()});this._titleLabel.visibility=e.titleVisibility,this._descriptionLabel.visibility=e.descriptionVisibility,this._header.visibility=e.headerVisibility,this._header.className=e.headerClassName,this._listbox.visibility=e.listboxVisibility}_refreshRowEdges(){let e=this._listbox.getChildrenCount();for(let t=0;t<e;t++){let e=this._listbox.getChildAt(t);e&&this._setFlushTop(e,t===0)}}_setFlushTop(e,t){let n=(e.className??``).replace(/\s*\badw-row-flush-top\b/g,``);e.className=t?`${n} adw-row-flush-top`.trim():n.trim()}get listbox(){return this._listbox}};export{AdwPreferencesGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{ScrollView as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{ScrollView as r,StackLayout as i}from"@nativescript/core";var AdwPreferencesPage=class extends n(r){_groups;_title=``;_name=``;_iconName=``;_useUnderline=!1;constructor(e){super(),this.orientation=`vertical`,this.className=`adw-preferences-page`;let n=new i;n.orientation=`vertical`,n.className=`adw-preferences-page-content`,this.content=n,this._groups=n,t(this,e)}get title(){return this._title}set title(e){this._title=e??``}get name(){return this._name}set name(e){this._name=e??``}get iconName(){return this._iconName}set iconName(e){this._iconName=e??``}get useUnderline(){return this._useUnderline}set useUnderline(t){this._useUnderline=e(t,!1)}add(e){this._groups.addChild(e)}remove(e){this._groups.removeChild(e)}_addChildFromBuilder(e,t){this.add(t)}searchGroups(){let e=[],t=this._groups.getChildrenCount();for(let n=0;n<t;n++){let t=this._groups.getChildAt(n);typeof t.searchRows==`function`&&e.push(t)}return e}get groups(){return this._groups}};export{AdwPreferencesPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{SHORTCUT_LABEL_CLASS as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{SHORTCUT_LABEL_CLASS as n,shortcutLabelDirection as r,shortcutLabelPlatform as i,shortcutLabelRenderPlan as a}from"./shortcut-label.js";import{isIOS as o}from"@gjsify/native-platform";import{Label as s,StackLayout as c}from"@nativescript/core";var AdwShortcutLabel=class extends t(c){_accelerator=``;_disabledText=``;constructor(t){super(),this.orientation=`horizontal`,this.className=n,this.verticalAlignment=`middle`,this.accessibilityRole=`text`,this.addEventListener(`loaded`,()=>this._rebuild()),this._rebuild(),e(this,t)}get accelerator(){return this._accelerator}set accelerator(e){this._accelerator=e??``,this._rebuild()}get disabledText(){return this._disabledText}set disabledText(e){this._disabledText=e??``,this._rebuild()}_rebuild(){let e=a(this._accelerator,{disabledText:this._disabledText,direction:r(this.style.direction),platform:i(o)});this.removeChildren();for(let t of e.children)this.addChild(buildView(t));this.accessibilityLabel=e.accessibleLabel,e.error&&console.warn(`[AdwShortcutLabel] failed to parse ${e.error}, part of accelerator '${this._accelerator}'`)}};function buildView(e){if(e.kind===`label`){let t=new s;return t.className=e.className,t.text=e.text,t.verticalAlignment=`middle`,t}let t=new c;t.orientation=`horizontal`,t.className=e.className,t.verticalAlignment=`middle`,e.direction&&(t.style.direction=e.direction);for(let n of e.children)t.addChild(buildView(n));return t}export{AdwShortcutLabel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{attachRowPressFeedback as r}from"./row-press.js";import{SidebarState as i,sidebarRowClassName as a,sidebarSectionsFromLabels as o}from"./sidebar-model.js";import{GridLayout as s,ItemSpec as c,Label as l,ScrollView as u,StackLayout as d}from"@nativescript/core";const f=`notify::selected`,p=`activated`;var AdwSidebar=class extends n(u){_list;_state=new i;_rows=[];constructor(e){super(),this.orientation=`vertical`,this.className=`adw-sidebar`;let n=new d;n.orientation=`vertical`,n.className=`adw-sidebar-list`,this.content=n,this._list=n,this._state.subscribe(e=>{this._applySelection();let t={eventName:f,object:this,selected:e.selected,title:e.item?.title??``,previous:e.previous,interactive:e.interactive};this.notify(t)}),t(this,e)}setItems(e){this.setSections(o(Array.isArray(e)?e:[]))}setSections(e){this._state.setSections(e),this._rebuild()}_rebuild(){for(let e of this._rows)this._list.removeChild(e.view);this._rows.length=0;for(let e of this._state.visibleItems){let t=new s;t.className=`adw-sidebar-row`,t.addColumn(new c(1,`star`)),t.addRow(new c(1,`auto`));let n=new l;n.className=`adw-sidebar-row-title`,n.text=e.item.title,n.textWrap=!0,s.setColumn(n,0),t.addChild(n),e.item.visible===!1&&(t.visibility=`collapse`),e.item.enabled===!1&&(t.opacity=.5),t.addEventListener(`tap`,()=>this._activate(e.index)),r(t),this._list.addChild(t),this._rows.push({view:t,index:e.index})}this._applySelection()}_activate(e){if(!this._state.activate(e).activated)return;let t={eventName:p,object:this,index:e,title:this._state.itemAt(e)?.title??``};this.notify(t)}_applySelection(){let e=this._state.selected,t=this._state.selectionVisible;for(let n of this._rows)n.view.className=a(n.index===e,t)}get items(){return this._state.items.map(e=>e.item.title)}set items(e){this.setItems(e)}get sections(){return this._state.sections}set sections(e){this.setSections(e)}get selected(){return this._state.selected}set selected(t){let n=e(t,this.selected);this._state.setSelected(n)}get selectedItem(){return this._state.selectedItem}get mode(){return this._state.mode}set mode(e){this._state.setMode(e)&&this._applySelection()}get filter(){return this._state.filter}set filter(e){this._state.setFilter(e),this._rebuild()}get isEmpty(){return this._state.isEmpty}};export{p as ACTIVATED,AdwSidebar,f as NOTIFY_SELECTED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{GridLayout as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{GridLayout as r,ItemSpec as i,Label as a,Slider as o,StackLayout as s}from"@nativescript/core";import{SpinState as c,parseAdjustment as l,snapAdjustmentValue as u}from"@gjsify/adwaita-core";const d=`notify::value`;var AdwSliderRow=class extends n(s){_titleLabel;_valueLabel;_slider;_state=new c;_suppress=!1;constructor(e){super(),this.orientation=`vertical`,this.className=`adw-slider-row`;let n=new r;n.className=`adw-slider-header`,n.addRow(new i(1,`auto`)),n.addColumn(new i(1,`star`)),n.addColumn(new i(1,`auto`));let s=new a;s.className=`adw-slider-title`,s.textWrap=!1,r.setColumn(s,0),n.addChild(s);let c=new a;c.className=`adw-slider-value`,c.text=String(this._state.value),r.setColumn(c,1),n.addChild(c);let l=this._state.adjustment,f=new o;f.className=`adw-slider`,f.minValue=l.lower,f.maxValue=l.upper,f.value=l.value,this.addChild(n),this.addChild(f),this._titleLabel=s,this._valueLabel=c,this._slider=f,this._state.subscribe(e=>{if(this._valueLabel.text=String(e.value),e.interactive){let t={eventName:d,object:this,value:e.value};this.notify(t)}else this._sync()}),this._state.subscribeChanged(e=>{this._slider.minValue=e.lower,this._slider.maxValue=e.upper;let t=u(e,this._state.value);t===this._state.value?this._sync():this._state.setValue(t)}),f.addEventListener(`valueChange`,()=>{if(this._suppress)return;let e=u(this._state.adjustment,this._slider.value);e!==this._slider.value&&(this._suppress=!0,this._slider.value=e,this._suppress=!1),this._state.setValueInteractive(e)}),t(this,e)}_sync(){this._suppress=!0,this._slider.value=this._state.value,this._suppress=!1,this._valueLabel.text=String(this._state.value)}get title(){return this._titleLabel.text??``}set title(e){this._titleLabel.text=e??``}get value(){return this._state.value}set value(t){this._state.setValue(u(this._state.adjustment,e(t,this.value)))}get adjustment(){return this._state.adjustment}set adjustment(e){this._state.configure(typeof e==`string`?l(e):e)}get slider(){return this._slider}};export{AdwSliderRow,d as NOTIFY_SLIDER_VALUE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{AdwActionRow as n}from"./adw-action-row.js";import{AdwImageButton as r}from"./adw-image-button.js";import{Label as i,StackLayout as a}from"@nativescript/core";import{SpinState as o,SpinState as s,parseAdjustment as c}from"@gjsify/adwaita-core";import{valueDecreaseSymbolic as l,valueIncreaseSymbolic as u}from"@gjsify/adwaita-icons/actions";const d=`notify::value`;var AdwSpinRow=class extends n{_minusButton;_plusButton;_valueLabel;_state=new s;constructor(e){super(),this.className=`adw-row adw-action-row adw-spin-row`;let n=new a;n.orientation=`horizontal`,n.className=`adw-spin-control`;let o=new i;o.className=`adw-spin-value`,o.text=String(this._state.value);let s=new r;s.iconName=l,s.className=`${s.className} adw-spin-button adw-spin-minus`.trim();let c=new r;c.iconName=u,c.className=`${c.className} adw-spin-button adw-spin-plus`.trim(),n.addChild(o),n.addChild(s),n.addChild(c),this.add_suffix(n),this._minusButton=s,this._plusButton=c,this._valueLabel=o,this._state.subscribe(e=>{if(this._valueLabel.text=String(e.value),e.interactive){let t={eventName:d,object:this,value:e.value};this.notify(t)}}),s.addEventListener(`tap`,()=>this._state.decrement()),c.addEventListener(`tap`,()=>this._state.increment()),t(this,e)}get value(){return this._state.value}set value(t){this._state.setValue(e(t,this._state.value))}get adjustment(){return this._state.adjustment}set adjustment(e){this._state.configure(typeof e==`string`?c(e):e)}};export{AdwSpinRow,d as NOTIFY_VALUE,o as SpinState};
|