@gjsify/adwaita-nativescript 0.51.1 → 0.53.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/builder/index.js +1 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/namespace/adw.js +1 -1
- package/lib/esm/namespace/gio.js +1 -0
- package/lib/esm/namespace/gtk.js +1 -1
- package/lib/esm/values/sidebar.js +1 -0
- package/lib/esm/values/tab-page.js +1 -0
- 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-bottom-sheet.js +1 -1
- package/lib/esm/widgets/adw-button-row.js +1 -1
- package/lib/esm/widgets/adw-carousel-indicator-dots.js +1 -0
- package/lib/esm/widgets/adw-carousel-indicator-lines.js +1 -0
- 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-expander-row.js +1 -1
- package/lib/esm/widgets/adw-header-bar.js +1 -1
- package/lib/esm/widgets/adw-navigation-page.js +1 -0
- package/lib/esm/widgets/adw-navigation-view.js +1 -1
- package/lib/esm/widgets/adw-preferences-group.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-spin-row.js +1 -1
- package/lib/esm/widgets/adw-status-page.js +1 -1
- package/lib/esm/widgets/adw-tab-view.js +1 -1
- package/lib/esm/widgets/adw-toast-overlay.js +1 -1
- package/lib/esm/widgets/adw-toggle-group.js +1 -1
- package/lib/esm/widgets/adw-toggle.js +1 -0
- 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/bottom-sheet-state.js +1 -1
- package/lib/esm/widgets/box-layout.js +1 -1
- package/lib/esm/widgets/builder-slots.js +1 -1
- package/lib/esm/widgets/carousel-indicator-base.js +1 -0
- package/lib/esm/widgets/carousel-state.js +1 -1
- package/lib/esm/widgets/chrome.js +1 -1
- package/lib/esm/widgets/gtk-action-bar.js +1 -0
- package/lib/esm/widgets/gtk-box.js +1 -1
- package/lib/esm/widgets/gtk-button.js +1 -1
- package/lib/esm/widgets/gtk-drop-down.js +1 -1
- package/lib/esm/widgets/gtk-label.js +1 -1
- package/lib/esm/widgets/gtk-menu-button.js +1 -1
- package/lib/esm/widgets/icon-theme.js +1 -1
- package/lib/esm/widgets/id-reference.js +1 -0
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/signals.js +1 -1
- package/lib/esm/widgets/split-view-base.js +1 -1
- package/lib/esm/widgets/view-stack-page.js +1 -0
- package/lib/esm/widgets/view-switcher-base.js +1 -1
- package/lib/esm/widgets/widget-layout.js +1 -0
- package/lib/types/blueprint-markup.spec.d.ts +4 -0
- package/lib/types/blueprint-trees.spec.d.ts +1 -0
- package/lib/types/builder/index.d.ts +70 -0
- package/lib/types/clamp-child.spec.d.ts +2 -0
- package/lib/types/gallery-blueprints.spec.d.ts +1 -0
- package/lib/types/gtk-value-doors.spec.d.ts +1 -0
- package/lib/types/index.d.ts +2 -1
- package/lib/types/namespace/adw.d.ts +8 -0
- package/lib/types/namespace/gio.d.ts +1 -0
- package/lib/types/namespace/gtk.d.ts +3 -0
- package/lib/types/shared-trees.spec.d.ts +2 -0
- package/lib/types/testing/ns-core.d.mts +340 -0
- package/lib/types/value-lists.spec.d.ts +1 -0
- package/lib/types/values/sidebar.d.ts +46 -0
- package/lib/types/values/tab-page.d.ts +16 -0
- package/lib/types/view-switcher-stack.spec.d.ts +1 -0
- package/lib/types/widgets/adw-about-dialog.d.ts +12 -0
- package/lib/types/widgets/adw-action-row.d.ts +22 -0
- package/lib/types/widgets/adw-alert-dialog.d.ts +18 -1
- package/lib/types/widgets/adw-avatar.d.ts +12 -0
- package/lib/types/widgets/adw-banner.d.ts +12 -0
- package/lib/types/widgets/adw-bottom-sheet.d.ts +77 -6
- package/lib/types/widgets/adw-button-content.d.ts +12 -0
- package/lib/types/widgets/adw-button-row.d.ts +21 -0
- package/lib/types/widgets/adw-carousel-indicator-dots.d.ts +7 -0
- package/lib/types/widgets/adw-carousel-indicator-lines.d.ts +7 -0
- package/lib/types/widgets/adw-carousel.d.ts +31 -15
- package/lib/types/widgets/adw-clamp.d.ts +19 -0
- package/lib/types/widgets/adw-combo-row.d.ts +20 -1
- package/lib/types/widgets/adw-data-grid.d.ts +12 -0
- package/lib/types/widgets/adw-expander-row.d.ts +2 -0
- package/lib/types/widgets/adw-header-bar.d.ts +14 -0
- package/lib/types/widgets/adw-image-button.d.ts +12 -0
- package/lib/types/widgets/adw-navigation-page.d.ts +63 -0
- package/lib/types/widgets/adw-navigation-view.d.ts +18 -5
- package/lib/types/widgets/adw-preferences-dialog.d.ts +12 -0
- package/lib/types/widgets/adw-preferences-group.d.ts +14 -0
- package/lib/types/widgets/adw-preferences-page.d.ts +12 -0
- package/lib/types/widgets/adw-shortcut-label.d.ts +12 -0
- package/lib/types/widgets/adw-sidebar.d.ts +26 -0
- package/lib/types/widgets/adw-slider-row.d.ts +12 -0
- package/lib/types/widgets/adw-spin-row.d.ts +12 -1
- package/lib/types/widgets/adw-spinner.d.ts +12 -0
- package/lib/types/widgets/adw-split-button.d.ts +12 -0
- package/lib/types/widgets/adw-status-page.d.ts +46 -0
- package/lib/types/widgets/adw-tab-view.d.ts +60 -27
- package/lib/types/widgets/adw-toast-overlay.d.ts +20 -0
- package/lib/types/widgets/adw-toggle-group.d.ts +51 -3
- package/lib/types/widgets/adw-toggle.d.ts +41 -0
- package/lib/types/widgets/adw-toolbar-view.d.ts +22 -1
- package/lib/types/widgets/adw-view-stack.d.ts +53 -7
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +19 -2
- package/lib/types/widgets/adw-window-title.d.ts +12 -0
- package/lib/types/widgets/adw-wrap-box.d.ts +12 -0
- package/lib/types/widgets/avatar-view.d.ts +1 -1
- package/lib/types/widgets/bottom-sheet-state.d.ts +40 -7
- package/lib/types/widgets/box-layout.d.ts +3 -17
- package/lib/types/widgets/builder-slots.d.ts +48 -0
- package/lib/types/widgets/button-content.d.ts +4 -3
- package/lib/types/widgets/carousel-indicator-base.d.ts +54 -0
- package/lib/types/widgets/carousel-state.d.ts +12 -9
- package/lib/types/widgets/chrome.d.ts +32 -6
- package/lib/types/widgets/construct-props.d.ts +46 -5
- package/lib/types/widgets/gtk-action-bar.d.ts +53 -0
- package/lib/types/widgets/gtk-box.d.ts +12 -0
- package/lib/types/widgets/gtk-button.d.ts +27 -0
- package/lib/types/widgets/gtk-drop-down.d.ts +23 -1
- package/lib/types/widgets/gtk-entry.d.ts +12 -0
- package/lib/types/widgets/gtk-image.d.ts +12 -0
- package/lib/types/widgets/gtk-label.d.ts +47 -1
- package/lib/types/widgets/gtk-menu-button.d.ts +22 -0
- package/lib/types/widgets/id-reference.d.ts +13 -0
- package/lib/types/widgets/index.d.ts +16 -5
- package/lib/types/widgets/signals.d.ts +14 -1
- package/lib/types/widgets/split-view-base.d.ts +26 -2
- package/lib/types/widgets/tab-view-state.d.ts +3 -3
- package/lib/types/widgets/view-stack-page.d.ts +98 -0
- package/lib/types/widgets/view-stack-state.d.ts +7 -3
- package/lib/types/widgets/view-switcher-base.d.ts +62 -0
- package/lib/types/widgets/widget-layout.d.ts +50 -0
- package/package.json +21 -11
- package/src/theme/adwaita.css +123 -2
- package/lib/esm/widgets/label-text.js +0 -1
- package/lib/types/widgets/label-text.d.ts +0 -13
- /package/lib/types/{label-text.spec.d.ts → gio-menu.spec.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{BottomSheetPresentation as e}from"@gjsify/adwaita-core";const t=`notify::open`,n=`close-attempt`,r=`sheet.close`;function createBottomSheetPresentation(){return new e}function sheetVisibility(e){return e?`visible`:`collapse`}function
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{BottomSheetPresentation as e}from"@gjsify/adwaita-core";const t=`notify::open`,n=`close-attempt`,r=`sheet.close`;function createBottomSheetPresentation(){return new e}function sheetVisibility(e){return e?`visible`:`collapse`}const i=`adw-bottom-sheet-bottom-bar`,a=`adw-bottom-sheet-inert`,o=`adw-bottom-sheet-dimming`;function applyBottomSheetChrome(e,t){e.dimming.visibility=sheetVisibility(t.dimmed),e.panel.visibility=sheetVisibility(t.surfaceVisible),e.page.visibility=sheetVisibility(t.layer===`sheet`),e.bottomBar.visibility=sheetVisibility(t.layer===`bottom-bar`),e.bottomBar.className=t.bottomBarInert?addMarkerClass(e.bottomBar.className,a):removeMarkerClass(e.bottomBar.className,a)}function bottomSheetCloseEvent(e){switch(e){case`close-attempt`:return n;case`delegate`:return r;case`close`:case`ignored`:return null}}function requestBottomSheetClose(e,t){let n=e.requestClose(t);return{outcome:n,eventName:bottomSheetCloseEvent(n)}}function classList(e){return(e??``).split(` `).filter(e=>e.length>0)}function addMarkerClass(e,t){let n=classList(e);return n.includes(t)||n.push(t),n.join(` `)}function removeMarkerClass(e,t){return classList(e).filter(e=>e!==t).join(` `)}export{i as BOTTOM_BAR_CLASS,n as CLOSE_ATTEMPT,o as DIMMING_CLASS,a as INERT_CLASS,t as NOTIFY_OPEN,r as SHEET_CLOSE,addMarkerClass,applyBottomSheetChrome,bottomSheetCloseEvent,createBottomSheetPresentation,removeMarkerClass,requestBottomSheetClose,sheetVisibility};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{resolveWrapBoxChildOrder as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{DEFAULT_BOX_SPACING as e,normalizeBoxSpacing as t,resolveWrapBoxChildOrder as n}from"@gjsify/adwaita-core";function boxSpacingChanges(e,n){return t(n)!==t(e)}function boxChildMargin(e,n,r){let i=e<=0?0:t(n);return r===`vertical`?`${i} 0 0 0`:`0 0 0 ${i}`}export{e as DEFAULT_BOX_SPACING,boxChildMargin,boxSpacingChanges,t as normalizeBoxSpacing,n as resolveBoxChildOrder};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";function resolveBuilderSlot(e,t,n){if(typeof e!=`string`)return n;let r=e.lastIndexOf(`.`),i=r===-1?e:e.slice(r+1);return t.includes(i)?i:n}export{resolveBuilderSlot};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";function builderSlotsOf(e,t){return e.includes(t)?e:[...e,t]}function declaredBuilderSlots(e){let t=e?.builderSlots;return Array.isArray(t)?t:null}function resolveBuilderSlot(e,t,n){if(typeof e!=`string`)return n;let r=e.lastIndexOf(`.`),i=r===-1?e:e.slice(r+1);return t.includes(i)?i:n}function declaredBuilderReferences(e){let t=e?.builderReferences;return Array.isArray(t)?t:[]}export{builderSlotsOf,declaredBuilderReferences,declaredBuilderSlots,resolveBuilderSlot};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{withSignals as e}from"./signals.js";import{applyMarkerClasses as t,indicatorMarkerClasses as n}from"./carousel-state.js";import{AdwCarousel as r,NOTIFY_N_PAGES as i,NOTIFY_POSITION as a}from"./adw-carousel.js";import{resolveIdReference as o}from"./id-reference.js";import{GridLayout as s,ItemSpec as c,Label as l,StackLayout as u}from"@nativescript/core";const d=[`horizontal`,`vertical`];var AdwCarouselIndicatorBase=class extends e(s){static builderReferences=[`carousel`];_row;_carousel=null;_carouselId=null;_onChange=()=>this._render();constructor(e){super(),this.className=e,this.addColumn(new c(1,`star`)),this.addRow(new c(1,`auto`));let t=new u;t.orientation=`horizontal`,t.horizontalAlignment=`center`,t.verticalAlignment=`middle`,this.addChild(t),this._row=t,this.addEventListener(`loaded`,()=>this._resolveCarouselId())}get carousel(){return this._carousel}set carousel(e){if(typeof e==`string`){this._carouselId=e,this.isLoaded&&(this.carousel=o(this,`carousel`,e,r));return}this._carouselId=null;let t=e;t!==this._carousel&&(this._carousel!==null&&(this._carousel.removeEventListener(a,this._onChange),this._carousel.removeEventListener(i,this._onChange)),this._carousel=t,t!==null&&(t.addEventListener(a,this._onChange),t.addEventListener(i,this._onChange)),this._render())}_resolveCarouselId(){let e=this._carouselId;e!==null&&(this.carousel=o(this,`carousel`,e,r))}get orientation(){return this._row.orientation}set orientation(e){let t=d.find(t=>t===e);if(t===void 0)throw TypeError(`'${String(e)}' is not a Gtk.Orientation: the members are horizontal and vertical.`);this._row.orientation=t,this._row.horizontalAlignment=t===`horizontal`?`center`:`stretch`,this._row.verticalAlignment=t===`horizontal`?`middle`:`stretch`}_render(){let e=this._carousel,r=e?.nPages??0;if(this._row.getChildrenCount()!==r){for(;this._row.getChildrenCount()>0;)this._row.removeChild(this._row.getChildAt(0));for(let e=0;e<r;e++){let t=new l;t.text=this._markerText,t.addEventListener(`tap`,()=>{let t=this._carousel?.pages[e];t!==void 0&&this._carousel?.scroll_to(t)}),this._row.addChild(t)}}let i=[];for(let e=0;e<this._row.getChildrenCount();e++)i.push(this._row.getChildAt(e));t(i,n(this._markerClass,r,e?.currentPage??-1))}};export{AdwCarouselIndicatorBase};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{CAROUSEL_SETTLE_EPSILON as e,CarouselState as t}from"@gjsify/adwaita-core";const n=320;function createCarouselState(e={}){return new t({...e,animateScroll:!1})}function normalizeCarouselPageWidth(e){return Number.isFinite(e)&&e>0?e:320}function carouselScrollOffset(e,t){return e*t}function carouselPositionAtOffset(e,t){return t>0?e/t:0}var CarouselScrollSync=class{_expected=null;expect(e){this._expected=e}apply(t,n,r=e){return this._expected===null?(t.setPosition(n,!0),t.settleIfArrived(r),!0):(Math.abs(n-this._expected)<r&&(this._expected=null),!1)}};function
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{CAROUSEL_SETTLE_EPSILON as e,CarouselState as t}from"@gjsify/adwaita-core";const n=320;function createCarouselState(e={}){return new t({...e,animateScroll:!1})}function normalizeCarouselPageWidth(e){return Number.isFinite(e)&&e>0?e:320}function carouselScrollOffset(e,t){return e*t}function carouselPositionAtOffset(e,t){return t>0?e/t:0}var CarouselScrollSync=class{_expected=null;expect(e){this._expected=e}apply(t,n,r=e){return this._expected===null?(t.setPosition(n,!0),t.settleIfArrived(r),!0):(Math.abs(n-this._expected)<r&&(this._expected=null),!1)}};function indicatorMarkerClasses(e,t,n){return Array.from({length:t},(t,r)=>r===n?`${e} active`:e)}function carouselDotClasses(e){return indicatorMarkerClasses(`adw-carousel-dot`,e.ids.length,e.pageAt(e.position))}function applyMarkerClasses(e,t){e.forEach((e,n)=>{let r=t[n];r!==void 0&&(e.className=r)})}function carouselNotifyPayload(e){return{position:e.position,nPages:e.nPages,page:e.page,interactive:e.interactive}}export{CarouselScrollSync,n as DEFAULT_CAROUSEL_PAGE_WIDTH,applyMarkerClasses,carouselDotClasses,carouselNotifyPayload,carouselPositionAtOffset,carouselScrollOffset,createCarouselState,indicatorMarkerClasses,normalizeCarouselPageWidth};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{ADW_BANNER_BUTTON_STYLE_CLASSES as e,ADW_BANNER_DEFAULTS as t,ADW_CLAMP_DEFAULTS as n,ADW_CLAMP_SIZE_CLASSES as r,ADW_SPINNER_MIN_SIZE as i,ADW_TOOLBAR_BAR_CLASSES as a,ADW_TOOLBAR_VIEW_CLASSES as o,ADW_TOOLBAR_VIEW_DEFAULTS as s,bannerButtonStyleClasses as c,clampAllocate as l,normalizeClampSize as u,resolveSpinnerSize as d,spinnerGeometry as f,stripMarkup as p,toolbarViewClasses as m}from"@gjsify/adwaita-core";const h=n.maximumSize,g=n.tighteningThreshold;function defaultClampProps(){return{maximumSize:h,tighteningThreshold:g}}function normalizeClampProp(e,t){return u(e,t)}function clampAllocationFor(e,t){if(!(e>0))return{width:`auto`,sizeClass:null};let{childSize:n,sizeClass:r}=l(e,{maximumSize:t.maximumSize,tighteningThreshold:t.tighteningThreshold,childMin:0,childNat:0});return{width:n,sizeClass:r}}const _=i;function spinnerDiameter(e){let t=d(e);return f(t,t).diameter}function defaultToolbarViewProps(){return{topBarStyle:s.topBarStyle,bottomBarStyle:s.bottomBarStyle,extendContentToTopEdge:s.extendContentToTopEdge,extendContentToBottomEdge:s.extendContentToBottomEdge}}function replaceClasses(e,t,n){let r=e.split(/\s+/).filter(e=>e.length>0&&!t.includes(e));for(let e of n)r.includes(e)||r.push(e);return r.join(` `)}function clampChildClassName(e,t){return replaceClasses(e,r,t?[t]:[])}function defaultBannerProps(){return{...t}}function bannerTitleText(e,t){return t?p(e)??e:e}function bannerVisibility(e){return e?`visible`:`collapse`}function bannerButtonClassName(t,n){return replaceClasses(t,e,c(n))}function toolbarViewClassNames(e,t,n){let r=m({...t,...n});return{view:replaceClasses(e.view,o,r.view),topBar:replaceClasses(e.topBar,a,r.topBar),bottomBar:replaceClasses(e.bottomBar,a,r.bottomBar)}}export{e as ADW_BANNER_BUTTON_STYLE_CLASSES,t as ADW_BANNER_DEFAULTS,r as ADW_CLAMP_SIZE_CLASSES,i as ADW_SPINNER_MIN_SIZE,a as ADW_TOOLBAR_BAR_CLASSES,o as ADW_TOOLBAR_VIEW_CLASSES,s as ADW_TOOLBAR_VIEW_DEFAULTS,h as DEFAULT_CLAMP_MAX_SIZE,g as DEFAULT_CLAMP_TIGHTENING_THRESHOLD,_ as DEFAULT_SPINNER_SIZE,bannerButtonClassName,bannerTitleText,bannerVisibility,clampAllocationFor,clampChildClassName,defaultBannerProps,defaultClampProps,defaultToolbarViewProps,normalizeClampProp,replaceClasses,spinnerDiameter,toolbarViewClassNames};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{ADW_BANNER_BUTTON_STYLE_CLASSES as e,ADW_BANNER_DEFAULTS as t,ADW_CLAMP_DEFAULTS as n,ADW_CLAMP_SIZE_CLASSES as r,ADW_SPINNER_MIN_SIZE as i,ADW_TOOLBAR_BAR_CLASSES as a,ADW_TOOLBAR_VIEW_CLASSES as o,ADW_TOOLBAR_VIEW_DEFAULTS as s,bannerButtonStyleClasses as c,clampAllocate as l,normalizeClampSize as u,resolveSpinnerSize as d,spinnerGeometry as f,stripMarkup as p,toolbarViewClasses as m}from"@gjsify/adwaita-core";const h=n.maximumSize,g=n.tighteningThreshold;function defaultClampProps(){return{maximumSize:h,tighteningThreshold:g}}function normalizeClampProp(e,t){return u(e,t)}function clampAllocationFor(e,t){if(!(e>0))return{width:`auto`,sizeClass:null};let{childSize:n,sizeClass:r}=l(e,{maximumSize:t.maximumSize,tighteningThreshold:t.tighteningThreshold,childMin:0,childNat:0});return{width:n,sizeClass:r}}const _=i;function spinnerDiameter(e){let t=d(e);return f(t,t).diameter}function defaultToolbarViewProps(){return{topBarStyle:s.topBarStyle,bottomBarStyle:s.bottomBarStyle,extendContentToTopEdge:s.extendContentToTopEdge,extendContentToBottomEdge:s.extendContentToBottomEdge}}function replaceClasses(e,t,n){let r=(e??``).split(/\s+/).filter(e=>e.length>0&&!t.includes(e));for(let e of n)r.includes(e)||r.push(e);return r.join(` `)}function clampChildClassName(e,t){return replaceClasses(e,r,t?[t]:[])}function defaultBannerProps(){return{...t}}function bannerTitleText(e,t){return t?p(e)??e:e}function bannerVisibility(e){return e?`visible`:`collapse`}function bannerButtonClassName(t,n){return replaceClasses(t,e,c(n))}function toolbarViewClassNames(e,t,n){let r=m({...t,...n});return{view:replaceClasses(e.view,o,r.view),topBar:replaceClasses(e.topBar,a,r.topBar),bottomBar:replaceClasses(e.bottomBar,a,r.bottomBar)}}export{e as ADW_BANNER_BUTTON_STYLE_CLASSES,t as ADW_BANNER_DEFAULTS,r as ADW_CLAMP_SIZE_CLASSES,i as ADW_SPINNER_MIN_SIZE,a as ADW_TOOLBAR_BAR_CLASSES,o as ADW_TOOLBAR_VIEW_CLASSES,s as ADW_TOOLBAR_VIEW_DEFAULTS,h as DEFAULT_CLAMP_MAX_SIZE,g as DEFAULT_CLAMP_TIGHTENING_THRESHOLD,_ as DEFAULT_SPINNER_SIZE,bannerButtonClassName,bannerTitleText,bannerVisibility,clampAllocationFor,clampChildClassName,defaultBannerProps,defaultClampProps,defaultToolbarViewProps,normalizeClampProp,replaceClasses,spinnerDiameter,toolbarViewClassNames};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e,resolveBuilderSlot as t}from"./builder-slots.js";import{xmlBoolean as n}from"./xml-values.js";import{applyConstructProps as r}from"./construct-props.js";import{withSignals as i}from"./signals.js";import{GridLayout as a,ItemSpec as o,StackLayout as s}from"@nativescript/core";const c=[`start`,`center`,`end`];var GtkActionBar=class extends i(a){static builderSlots=e(c,`start`);_startBox;_endBox;_centerWidget=null;_revealed=!0;constructor(e){super(),this.className=`adw-action-bar`,this.addColumn(new o(1,`star`)),this.addColumn(new o(1,`auto`)),this.addColumn(new o(1,`star`)),this.addRow(new o(1,`auto`));let t=new s;t.orientation=`horizontal`,t.className=`adw-action-bar-start`,t.horizontalAlignment=`left`,a.setColumn(t,0),this.addChild(t),this._startBox=t;let n=new s;n.orientation=`horizontal`,n.className=`adw-action-bar-end`,n.horizontalAlignment=`right`,a.setColumn(n,2),this.addChild(n),this._endBox=n,r(this,e)}pack_start(e){this._startBox.addChild(e)}pack_end(e){this._endBox.insertChild(e,0)}set_center_widget(e){this._centerWidget&&this.removeChild(this._centerWidget),this._centerWidget=e,e&&(e.verticalAlignment=`middle`,a.setColumn(e,1),this.addChild(e))}get centerWidget(){return this._centerWidget}get startBox(){return this._startBox}get endBox(){return this._endBox}_addChildFromBuilder(e,n){switch(t(e,c,`start`)){case`center`:this.set_center_widget(n);return;case`end`:this.pack_end(n);return;default:this.pack_start(n)}}get revealed(){return this._revealed}set revealed(e){this._revealed=n(e,this._revealed),this.visibility=this._revealed?`visible`:`collapse`}};export{GtkActionBar};
|
|
@@ -1 +1 @@
|
|
|
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{classNameWith as r,normalizeStyleClasses as i,withCssClass as a,withoutCssClass as o}from"./style-classes.js";import{DEFAULT_BOX_SPACING as s,boxChildMargin as c,boxSpacingChanges as l,normalizeBoxSpacing as u,resolveBoxChildOrder as d}from"./box-layout.js";import{StackLayout as f}from"@nativescript/core";var GtkBox=class extends n(f){_spacing=
|
|
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{classNameWith as r,normalizeStyleClasses as i,withCssClass as a,withoutCssClass as o}from"./style-classes.js";import{DEFAULT_BOX_SPACING as s,boxChildMargin as c,boxSpacingChanges as l,normalizeBoxSpacing as u,resolveBoxChildOrder as d}from"./box-layout.js";import{StackLayout as f}from"@nativescript/core";var GtkBox=class extends n(f){_spacing=s;_styleClasses=[];constructor(e){super(),this.addEventListener(`orientationChange`,()=>this._applyChildren()),t(this,e)}append(e){this.addChild(e)}prepend(e){this.insertChild(e,0),this._applyChildren()}remove(e){this.removeChild(e),this._applyChildren()}addChild(e){super.addChild(e),this._applyChildren()}insert_child_after(e,t=null){return this._applyOrder(`insert-after`,e,t)}reorder_child_after(e,t=null){return this._applyOrder(`reorder-after`,e,t)}get spacing(){return this._spacing}set spacing(t){let n=e(t,this._spacing);l(this._spacing,n)&&(this._spacing=u(n),this._applyChildren(),this.notify({eventName:`notify::spacing`,object:this}))}get styleClasses(){return[...this._styleClasses]}set styleClasses(e){this._setClasses(i(e))}add_css_class(e){this._setClasses(a(this._styleClasses,e))}remove_css_class(e){this._setClasses(o(this._styleClasses,e))}has_css_class(e){return this._styleClasses.includes((e??``).trim())}get_css_classes(){return[...this._styleClasses]}set_css_classes(e){this._setClasses(i([...e].join(` `)))}_setClasses(e){this._styleClasses=[...e],this.className=r(``,this._styleClasses)}_childViews(){let e=[];for(let t=0;t<this.getChildrenCount();t++)e.push(this.getChildAt(t));return e}_applyOrder(e,t,n){let r=this._childViews(),i=d({children:r,child:t,sibling:n,op:e});return i===null?!1:(r.includes(t)&&this.removeChild(t),this.insertChild(t,i.indexOf(t)),this._applyChildren(),!0)}_applyChildren(){let e=this.orientation??`vertical`,t=this._childViews();for(let[n,r]of t.entries())r.set(`margin`,c(n,this._spacing,e))}};export{s as DEFAULT_BOX_SPACING,GtkBox};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.js";import{xmlBoolean 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{attachRowPressFeedback as a}from"./row-press.js";import{classNameWith as o,normalizeStyleClasses as s,withCssClass as c,withoutCssClass as l}from"./style-classes.js";import{buttonSlotAfterWrite as u,buttonSlotDetaches as d}from"./button-slot.js";import{GridLayout as f,ItemSpec as p,Label as m}from"@nativescript/core";import{labelDisplayText as h}from"@gjsify/adwaita-core";const g=`clicked`,_=`adw-button-label`;var GtkButton=class extends r(f){static builderSlots=e([`child`],`child`);_styleClasses=[];_label=``;_iconName=``;_useUnderline=!1;_slot=`empty`;_content=null;constructor(e){super(),this.className=o(`adw-button`,this._styleClasses),this.addRow(new p(1,`star`)),this.addColumn(new p(1,`star`)),a(this),this.addEventListener(`tap`,()=>{this.notify({eventName:g,object:this})}),n(this,e)}get label(){return this._label}set label(e){this._label=e??``,this._fill(`label`,this._label)}get iconName(){return this._iconName}set iconName(e){this._iconName=e??``,this._fill(`icon`,this._iconName)}get tooltipText(){return this.accessibilityHint??``}set tooltipText(e){this.accessibilityHint=e??``}get child(){return this._slot===`child`?this._content:null}set child(e){this._fill(`child`,e??null)}set_child(e){this.child=e}get_child(){return this.child}_addChildFromBuilder(e,t){this.child=t}get useUnderline(){return this._useUnderline}set useUnderline(e){this._useUnderline=t(e,this._useUnderline),this._slot===`label`&&this._fill(`label`,this._label)}get styleClasses(){return[...this._styleClasses]}set styleClasses(e){this._setClasses(s(e))}add_css_class(e){this._setClasses(c(this._styleClasses,e))}remove_css_class(e){this._setClasses(l(this._styleClasses,e))}has_css_class(e){return this._styleClasses.includes((e??``).trim())}get_css_classes(){return[...this._styleClasses]}set_css_classes(e){this._setClasses(s([...e].join(` `)))}_setClasses(e){this._styleClasses=[...e],this.className=o(`adw-button`,this._styleClasses)}_fill(e,t){let n=u(e,t);if(d(this._slot,n)&&this._detach(),this._slot=n,n===`empty`){this._detach();return}if(n===`child`){let e=t;if(this._content===e)return;this._detach(),this._adopt(e);let n=e;`hostButton`in n&&(n.hostButton=this);return}if(n===`label`){let e=this._content instanceof m?this._content:this._adopt(new m);e.className=_,e.text=h(this._label,!1,this._useUnderline);return}let r=this._content instanceof i?this._content:this._adopt(new i);r.iconName=this._iconName}_detach(){this._content&&this.removeChild(this._content),this._content=null}_adopt(e){return e.horizontalAlignment=`center`,e.verticalAlignment=`middle`,f.setColumn(e,0),f.setRow(e,0),this.addChild(e),this._content=e,e}};export{g as GTK_BUTTON_CLICKED,_ as GTK_BUTTON_LABEL_CLASS,GtkButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e,resolveBuilderSlot as t}from"./builder-slots.js";import{xmlNumber as n}from"./xml-values.js";import{applyConstructProps as r}from"./construct-props.js";import{withSignals as i}from"./signals.js";import{GtkImage as a}from"./gtk-image.js";import{attachRowPressFeedback as o}from"./row-press.js";import{Label as s,StackLayout as c,action as l}from"@nativescript/core";import{ComboState as u,normalizeComboOptions as d}from"@gjsify/adwaita-core";import{panDownSymbolic as f}from"@gjsify/adwaita-icons/ui";const p=`notify::selected`;var GtkDropDown=class extends i(c){static builderSlots=e([`model`],`model`);_label;_chevron;_state=new u;_chooserTitle=``;constructor(e){super(),this.orientation=`horizontal`,this.className=`adw-drop-down`;let t=new s;t.className=`adw-drop-down-label`,t.text=``;let n=new a;n.className=`adw-drop-down-chevron`,n.iconName=f,this.addChild(t),this.addChild(n),this._label=t,this._chevron=n,this._state.subscribe(e=>{if(this._label.text=e.label,e.interactive){let t={eventName:p,object:this,selected:e.selected,value:e.value,label:e.label};this.notify(t)}}),this.addEventListener(`tap`,()=>{this._openChooser()}),o(this),r(this,e)}async _openChooser(){if(this._state.count===0)return;let e=this._state.model.map(e=>e.label),t=await l({title:this._chooserTitle||void 0,cancelButtonText:`Cancel`,actions:e});this._state.select(e.indexOf(t))}get model(){return this._state.model}set model(e){this._state.setModel(d(e))}_addChildFromBuilder(e,n){if(t(e,[`model`],`child`)!==`model`)throw Error(`Gtk.DropDown takes no child widget; <${e}> is placed nowhere.`);this.model=n}get selected(){return this._state.selectedIndex}set selected(e){let t=n(e,this.selected);this._state.setSelectedIndex(t)}get selectedValue(){return this._state.selectedValue}set selectedValue(e){this._state.setSelectedValue(e)}get selectedItem(){return this._state.model[this._state.selectedIndex]??null}get chooserTitle(){return this._chooserTitle}set chooserTitle(e){this._chooserTitle=e??``}};export{GtkDropDown,p as NOTIFY_SELECTED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps 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{classNameWith as i,normalizeStyleClasses as a,withCssClass as o,withoutCssClass as s}from"./style-classes.js";import{Label as c}from"@nativescript/core";import{DEFAULT_LABEL_LINES as l,DEFAULT_LABEL_XALIGN as u,labelDisplayText as d,labelEffectiveLines as f,labelEllipsizeOverflowValue as p,normalizeLabelEllipsize as m,normalizeLabelLines as h,normalizeLabelXalign as g}from"@gjsify/adwaita-core";const _=new Map([[0,`start`],[.5,`center`],[1,`end`]]);var GtkLabel=class extends r(c){_label=``;_useMarkup=!1;_useUnderline=!1;_ellipsize=`none`;_lines=-1;_styleClasses=[];_xalign=u;constructor(e){super(),n(this,e)}get label(){return this._label}set label(e){this._label=e??``,this._render()}get useMarkup(){return this._useMarkup}set useMarkup(t){this._useMarkup=e(t,this._useMarkup),this._render()}get useUnderline(){return this._useUnderline}set useUnderline(t){this._useUnderline=e(t,this._useUnderline),this._render()}get wrap(){return this.textWrap}set wrap(t){this.textWrap=e(t,this.textWrap)}get ellipsize(){return this._ellipsize}set ellipsize(e){this._ellipsize=m(e),this.textOverflow=p(this._ellipsize),this._applyLines()}get lines(){return this._lines}set lines(e){this._lines=h(t(e,l)),this._applyLines()}_applyLines(){this.maxLines=f(this._lines,this._ellipsize)??0}get xalign(){return this._xalign}set xalign(e){let n=g(t(e,u)),r=_.get(n);if(r===void 0)throw TypeError(`Gtk.Label xalign ${n} has no NativeScript counterpart: textAlignment places text at the start, the centre or the end, so only 0, 0.5 and 1 render as written. Snapping it would show a different label than GTK does with no sign of the difference.`);this._xalign=n;let i=this.style?.direction===`rtl`;this.textAlignment=r===`start`?i?`right`:`left`:r===`end`?i?`left`:`right`:`center`}get styleClasses(){return[...this._styleClasses]}set styleClasses(e){this._setClasses(a(e))}set_markup(e){this._label=e??``,this._useMarkup=!0,this._render()}get_text(){return this.text??``}add_css_class(e){this._setClasses(o(this._styleClasses,e))}remove_css_class(e){this._setClasses(s(this._styleClasses,e))}has_css_class(e){return this._styleClasses.includes((e??``).trim())}get_css_classes(){return[...this._styleClasses]}set_css_classes(e){this._setClasses(a([...e].join(` `)))}_setClasses(e){this._styleClasses=[...e],this.className=i(``,this._styleClasses)}_render(){this.text=d(this._label,this._useMarkup,this._useUnderline)}};export{GtkLabel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{classNameWith as t,normalizeStyleClasses as n,withCssClass as r,withoutCssClass as i}from"./style-classes.js";import{AdwImageButton as a}from"./adw-image-button.js";import{MENU_CANCEL_LABEL as o,presentMenuSheet as s,refuseMenuString as c}from"./menu-sheet.js";import{action as l}from"@nativescript/core";import{ADW_MENU_SURFACE_NATIVESCRIPT as u,assertMenuRenderable as d,menuItemAt as f,normalizeMenuModel as p}from"@gjsify/adwaita-core";const m=`menuItemActivated`;var GtkMenuButton=class extends a{_model=[];_actions=null;_menuTitle=``;_baseClassName;_styleClasses=[];constructor(t){super(),this._baseClassName=`${this.className} adw-menu-button`.trim(),this.className=this._baseClassName,this.addEventListener(`tap`,()=>{this._openMenu()}),e(this,t)}get menuModel(){return this._model}set menuModel(e){c(e,`GtkMenuButton`);let t=p(e);d(t,u),this._model=t}get actions(){return this._actions}set actions(e){this._actions=e??null}get menuTitle(){return this._menuTitle}set menuTitle(e){this._menuTitle=e??``}get styleClasses(){return[...this._styleClasses]}set styleClasses(e){this._setClasses(n(e))}add_css_class(e){this._setClasses(r(this._styleClasses,e))}remove_css_class(e){this._setClasses(i(this._styleClasses,e))}has_css_class(e){return this._styleClasses.includes((e??``).trim())}get_css_classes(){return[...this._styleClasses]}set_css_classes(e){this._setClasses(n([...e].join(` `)))}_setClasses(e){this._styleClasses=e,this.className=t(this._baseClassName,e)}async _openMenu(){if(this._model.length===0)return;let e=await s(l,this._model,{title:this._menuTitle,actions:this._actions??void 0,cancelLabel:o});if(e===null)return;let t=f(this._model,e);if(t===null)return;let n={eventName:m,object:this,id:t.id??t.label,label:t.label,path:e,action:t.action};this.notify(n)}};export{GtkMenuButton,m as MENU_ITEM_ACTIVATED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{normalizeIconName as e}from"@gjsify/adwaita-core";import{contactNewSymbolic as t,documentEditSymbolic as n,documentOpenSymbolic as r,documentSaveSymbolic as i,
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{normalizeIconName as e}from"@gjsify/adwaita-core";import{contactNewSymbolic as t,documentEditSymbolic as n,documentOpenSymbolic as r,documentSaveSymbolic as i,editCopySymbolic as a,goHomeSymbolic as o,goNextSymbolic as s,goPreviousSymbolic as c,listAddSymbolic as l,listRemoveSymbolic as u,mailReplySenderSymbolic as d,mailSendSymbolic as f,openMenuSymbolic as p,sendToSymbolic as m,systemSearchSymbolic as h,viewConcealSymbolic as g,viewGridSymbolic as _,viewListSymbolic as v,viewMoreSymbolic as y,viewPagedSymbolic as b,viewRevealSymbolic as x}from"@gjsify/adwaita-icons/actions";import{preferencesSystemSymbolic as S}from"@gjsify/adwaita-icons/categories";import{cameraPhotoSymbolic as C,networkWirelessSymbolic as w}from"@gjsify/adwaita-icons/devices";import{emblemSystemSymbolic as T}from"@gjsify/adwaita-icons/legacy";import{folderDocumentsSymbolic as E,folderDownloadSymbolic as D,folderMusicSymbolic as O,folderSymbolic as k,userTrashSymbolic as A}from"@gjsify/adwaita-icons/places";import{avatarDefaultSymbolic as j,imageMissingSymbolic as M,mailUnreadSymbolic as N,starredSymbolic as P}from"@gjsify/adwaita-icons/status";const F=`image-missing`,I={"avatar-default":j,"camera-photo":C,"contact-new":t,"document-edit":n,"document-open":r,"document-save":i,"edit-copy":a,"emblem-system":T,folder:k,"folder-documents":E,"folder-download":D,"folder-music":O,"go-home":o,"go-next":s,"go-previous":c,"image-missing":M,"list-add":l,"list-remove":u,"mail-reply-sender":d,"mail-send":f,"mail-unread":N,"network-wireless":w,"open-menu":p,"preferences-system":S,"send-to":m,starred:P,"system-search":h,"user-trash":A,"view-conceal":g,"view-grid":_,"view-list":v,"view-more":y,"view-paged":b,"view-reveal":x},L=new Map;function iconValueKind(e){let t=e??``;return t===``?`empty`:t.trimStart().startsWith(`<`)?`source`:`name`}function isIconAvailable(t){let n=e(t);return n!==``&&(L.has(n)||Object.hasOwn(I,n))}function compiledIconNames(){return Object.keys(I).sort()}function registeredIconNames(){return[...L.keys()].sort()}function registerIcon(t,n){let r=e(t);if(r===``)throw TypeError(`registerIcon: ${JSON.stringify(t)} is not usable as an icon name — it has to be a single CSS token ([A-Za-z0-9_-]+) once an optional \`-symbolic\` suffix is removed.`);if(iconValueKind(n)!==`source`||!/<svg[\s>]/.test(n))throw TypeError(`registerIcon: the glyph for ${JSON.stringify(r)} has to be Adwaita symbolic SVG SOURCE (what @gjsify/adwaita-icons exports) — a document whose root element is \`<svg>\`.`);L.set(r,n)}function unregisterIcon(t){return L.delete(e(t))}function resolveIconSource(t){let n=t??``;switch(iconValueKind(n)){case`empty`:return``;case`source`:return n;default:{let t=e(n);return L.get(t)??I[t]??M}}}export{F as ICON_FALLBACK_NAME,compiledIconNames,iconValueKind,isIconAvailable,registerIcon,registeredIconNames,resolveIconSource,unregisterIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";function rootOf(e){let t=e;for(;t.parent!==null&&t.parent!==void 0;)t=t.parent;return t}function resolveIdReference(e,t,n,r){let i=rootOf(e).getViewById(n);if(i instanceof r)return i;throw Error(`${e.constructor.name}.${t}="${n}" names no ${r.name} in this tree: `+(i===void 0?`nothing carries the id '${n}'.`:`'${n}' is a ${i.constructor.name}.`))}export{resolveIdReference};
|
package/lib/esm/widgets/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{GTK_ALIGN as e}from"./gtk-align.js";import{DEFAULT_ICON_PIXEL_SIZE as t,GTK_ICON_SIZE_NICKS as ee,GTK_ICON_SIZE_PIXELS as te,PIXEL_SIZE_UNSET as ne,isGtkIconSizeNick as re}from"./gtk-icon-size.js";import{applyConstructProps as ie,nsAlignment as ae}from"./construct-props.js";import{AdwPreferencesPage as n}from"./adw-preferences-page.js";import{AdwPreferencesGroup as r}from"./adw-preferences-group.js";import{ACTIVATED as oe,AdwActionRow as i}from"./adw-action-row.js";import{AdwSwitchRow as a,NOTIFY_ACTIVE as se}from"./adw-switch-row.js";import{adwaitaColorScheme as o,isThemeIconColor as ce,onAdwaitaColorSchemeChanged as le,setAdwaitaColorScheme as ue,themeIconColor as de,toggleAdwaitaColorScheme as fe}from"./color-scheme.js";import{ADWAITA_ICON_GRID as pe,DEFAULT_ICON_COLOR as me,DEFAULT_ICON_COLOR_DARK as he,extractIconPaths as ge,extractPathData as _e}from"./icon-path.js";import{ICON_FALLBACK_NAME as ve,compiledIconNames as ye,iconValueKind as be,isIconAvailable as xe,registerIcon as Se,registeredIconNames as Ce,resolveIconSource as we,unregisterIcon as Te}from"./icon-theme.js";import{renderSymbolicIcon as Ee}from"./icons.js";import{DEFAULT_GTK_IMAGE_SIZE as De,GtkImage as s}from"./gtk-image.js";import{attachRowPressFeedback as Oe}from"./row-press.js";import{AdwImageButton as c,DEFAULT_ICON_BUTTON_ICON_SIZE as ke}from"./adw-image-button.js";import{AdwEntryRow as l,NOTIFY_TEXT as Ae}from"./adw-entry-row.js";import{AdwPasswordEntryRow as u}from"./adw-password-entry-row.js";import{ACTIVATE as je,GtkEntry as d,NOTIFY_TEXT as Me}from"./gtk-entry.js";import{AdwComboRow as f,ComboState as Ne,NOTIFY_SELECTED as Pe}from"./adw-combo-row.js";import{GtkDropDown as p,NOTIFY_SELECTED as Fe}from"./gtk-drop-down.js";import{AdwSpinRow as m,NOTIFY_VALUE as Ie,SpinState as h}from"./adw-spin-row.js";import{AdwSliderRow as g,NOTIFY_SLIDER_VALUE as _}from"./adw-slider-row.js";import{AdwExpanderRow as v,ExpanderState as Le,NOTIFY_EXPANDED as Re}from"./adw-expander-row.js";import{buttonSlotAfterWrite as ze,buttonSlotDetaches as Be}from"./button-slot.js";import{labelDisplayText as Ve,labelMarkupIsUnparseable as He}from"./label-text.js";import{GTK_BUTTON_CLICKED as Ue,GTK_BUTTON_LABEL_CLASS as We,GtkButton as y}from"./gtk-button.js";import{DEFAULT_BOX_SPACING as Ge,boxChildMargin as Ke,boxSpacingChanges as qe,normalizeBoxSpacing as Je}from"./box-layout.js";import{GtkBox as b}from"./gtk-box.js";import{GtkLabel as x}from"./gtk-label.js";import{MENU_CANCEL_LABEL as Ye,menuSheetActions as Xe,menuSheetRows as Ze,presentMenuSheet as Qe,resolveMenuChoice as $e}from"./menu-sheet.js";import{GtkMenuButton as S,MENU_ITEM_ACTIVATED as et}from"./gtk-menu-button.js";import{DEFAULT_CLAMP_MAX_SIZE as tt,DEFAULT_SPINNER_SIZE as nt}from"./chrome.js";import{AdwBanner as C,BUTTON_CLICKED as rt}from"./adw-banner.js";import{avatarInitials as it}from"./avatar-color.js";import{AVATAR_DEFAULT_ICON as at}from"./avatar-view.js";import{AdwAvatar as w,DEFAULT_AVATAR_SIZE as ot}from"./adw-avatar.js";import{AdwWindowTitle as T}from"./adw-window-title.js";import{AdwClamp as E}from"./adw-clamp.js";import{AdwHeaderBar as D}from"./adw-header-bar.js";import{AdwToolbarView as O}from"./adw-toolbar-view.js";import{AdwWrapBox as k}from"./adw-wrap-box.js";import{DATA_GRID_HEADER_CELL_CLASS as st,DATA_GRID_HEADER_ROW_CLASS as ct,DATA_GRID_SECTION_CELL_CLASS as lt,dataGridCellClass as ut,dataGridItemSpec as dt,dataGridRowClass as ft,dataGridShapeKey as pt,dataGridTracksKey as mt,parseDataGridWidth as ht}from"./data-grid-model.js";import{AdwDataGrid as A,ROW_ACTIVATED as gt}from"./adw-data-grid.js";import{AdwSpinner as j}from"./adw-spinner.js";import{AdwStatusPage as M}from"./adw-status-page.js";import{AdwButtonRow as N}from"./adw-button-row.js";import{AdwButtonContent as P}from"./adw-button-content.js";import{AdwSplitButton as F,CLICKED as _t,MENU_TAPPED as vt}from"./adw-split-button.js";import{AdwToggleGroup as I,NOTIFY_SELECTED as yt,ToggleGroupState as bt}from"./adw-toggle-group.js";import{ADWAITA_NS_ACCENT_RULES as xt,adwaitaNsAccentColor as St,adwaitaNsAccentCss as Ct}from"./accent-theme.js";import{applyAdwaitaNsAccent as wt,clearAdwaitaNsAccent as Tt}from"./adw-accent.js";import{SHORTCUT_LABEL_CAP_TEXT_CLASS as Et,SHORTCUT_LABEL_CLASS as Dt,SHORTCUT_LABEL_DIMMED_CLASS as Ot,SHORTCUT_LABEL_DISABLED_CLASS as kt,SHORTCUT_LABEL_KEYCAP_CLASS as At,SHORTCUT_LABEL_KEYS_CLASS as jt,SHORTCUT_LABEL_SIDE_CLASS as Mt,SHORTCUT_LABEL_SPACED_CLASS as Nt,shortcutLabelDirection as Pt,shortcutLabelPlatform as Ft,shortcutLabelRenderPlan as It}from"./shortcut-label.js";import{AdwShortcutLabel as L}from"./adw-shortcut-label.js";import{AdwViewStack as R,NOTIFY_VISIBLE_CHILD as Lt}from"./adw-view-stack.js";import{AdwViewSwitcherBase as Rt,NOTIFY_SELECTED as zt}from"./view-switcher-base.js";import{AdwViewSwitcher as z}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as B}from"./adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as V}from"./adw-inline-view-switcher.js";import{applyTabViewVisibility as Bt,createTabViewState as Vt,tabBarVisibility as Ht,tabCloseVisibilities as Ut,tabLabelText as Wt,tabPageVisibilities as Gt,tabTooltipText as Kt,tabViewNotifyPayload as qt}from"./tab-view-state.js";import{AdwTabView as H,CLOSE_PAGE as Jt,NOTIFY_SELECTED_PAGE as Yt,PAGES_CHANGED as Xt}from"./adw-tab-view.js";import{CarouselScrollSync as Zt,DEFAULT_CAROUSEL_PAGE_WIDTH as Qt,applyCarouselDots as $t,carouselDotClasses as en,carouselNotifyPayload as tn,carouselPositionAtOffset as nn,carouselScrollOffset as rn,createCarouselState as an,normalizeCarouselPageWidth as on}from"./carousel-state.js";import{AdwCarousel as U,NOTIFY_N_PAGES as sn,NOTIFY_POSITION as cn,PAGE_CHANGED as ln}from"./adw-carousel.js";import{NOTIFY_VISIBLE_PAGE as un}from"./navigation-stack.js";import{AdwNavigationView as W}from"./adw-navigation-view.js";import{NsNavigationSplitViewState as dn,NsOverlaySplitViewState as fn,splitViewColumns as pn}from"./split-view-state.js";import{AdwSplitViewBase as mn,NOTIFY_SHOW_SIDEBAR as hn}from"./split-view-base.js";import{AdwNavigationSplitView as G}from"./adw-navigation-split-view.js";import{AdwOverlaySplitView as K}from"./adw-overlay-split-view.js";import{AdwSidebar as q,NOTIFY_SELECTED as gn}from"./adw-sidebar.js";import{CLOSE_ATTEMPT as _n,NOTIFY_OPEN as vn,SHEET_CLOSE as yn}from"./bottom-sheet-state.js";import{AdwBottomSheet as J}from"./adw-bottom-sheet.js";import{AdwToast as bn,AdwToastOverlay as Y,AdwToastQueue as xn,DEFAULT_TOAST_TIMEOUT as Sn,TOAST_BUTTON_CLICKED as Cn}from"./adw-toast-overlay.js";import{AdwAlertDialog as wn,AdwAlertResponses as Tn,NOTIFY_RESPONSE as En}from"./adw-alert-dialog.js";import{AdwAboutDialog as X,CLOSED as Dn}from"./adw-about-dialog.js";import{AdwPreferencesDialog as Z,CLOSED as On}from"./adw-preferences-dialog.js";import{AdwBreakpoint as kn,addBreakpoints as Q,evaluateBreakpointCondition as An,parseBreakpointCondition as jn}from"./breakpoint.js";const Mn={AdwPreferencesPage:n,AdwPreferencesGroup:r,AdwActionRow:i,AdwSwitchRow:a,AdwEntryRow:l,AdwPasswordEntryRow:u,GtkEntry:d,AdwComboRow:f,GtkDropDown:p,AdwSpinRow:m,AdwSliderRow:g,AdwExpanderRow:v,GtkButton:y,GtkBox:b,GtkLabel:x,AdwImageButton:c,GtkMenuButton:S,GtkImage:s,AdwBanner:C,AdwAvatar:w,AdwWindowTitle:T,AdwClamp:E,AdwHeaderBar:D,AdwToolbarView:O,AdwWrapBox:k,AdwDataGrid:A,AdwSpinner:j,AdwStatusPage:M,AdwButtonRow:N,AdwButtonContent:P,AdwSplitButton:F,AdwToggleGroup:I,AdwShortcutLabel:L,AdwViewStack:R,AdwViewSwitcher:z,AdwViewSwitcherBar:B,AdwInlineViewSwitcher:V,AdwTabView:H,AdwCarousel:U,AdwNavigationView:W,AdwNavigationSplitView:G,AdwOverlaySplitView:K,AdwSidebar:q,AdwBottomSheet:J,AdwToastOverlay:Y,AdwAboutDialog:X,AdwPreferencesDialog:Z};let $=!1;function registerAdwaitaElements(){if(!$&&typeof registerElement==`function`){for(let[e,t]of Object.entries(Mn))registerElement(e,()=>t);$=!0}}export{Dn as ABOUT_CLOSED,oe as ACTIVATED,pe as ADWAITA_ICON_GRID,xt as ADWAITA_NS_ACCENT_RULES,at as AVATAR_DEFAULT_ICON,X as AdwAboutDialog,i as AdwActionRow,wn as AdwAlertDialog,Tn as AdwAlertResponses,w as AdwAvatar,C as AdwBanner,J as AdwBottomSheet,kn as AdwBreakpoint,P as AdwButtonContent,N as AdwButtonRow,U as AdwCarousel,E as AdwClamp,f as AdwComboRow,A as AdwDataGrid,l as AdwEntryRow,v as AdwExpanderRow,D as AdwHeaderBar,c as AdwImageButton,V as AdwInlineViewSwitcher,G as AdwNavigationSplitView,W as AdwNavigationView,K as AdwOverlaySplitView,u as AdwPasswordEntryRow,Z as AdwPreferencesDialog,r as AdwPreferencesGroup,n as AdwPreferencesPage,L as AdwShortcutLabel,q as AdwSidebar,g as AdwSliderRow,m as AdwSpinRow,j as AdwSpinner,F as AdwSplitButton,mn as AdwSplitViewBase,M as AdwStatusPage,a as AdwSwitchRow,H as AdwTabView,bn as AdwToast,Y as AdwToastOverlay,xn as AdwToastQueue,I as AdwToggleGroup,O as AdwToolbarView,R as AdwViewStack,z as AdwViewSwitcher,B as AdwViewSwitcherBar,Rt as AdwViewSwitcherBase,T as AdwWindowTitle,k as AdwWrapBox,rt as BUTTON_CLICKED,_t as CLICKED,_n as CLOSE_ATTEMPT,Jt as CLOSE_PAGE,Zt as CarouselScrollSync,Ne as ComboState,st as DATA_GRID_HEADER_CELL_CLASS,ct as DATA_GRID_HEADER_ROW_CLASS,lt as DATA_GRID_SECTION_CELL_CLASS,ot as DEFAULT_AVATAR_SIZE,Ge as DEFAULT_BOX_SPACING,Qt as DEFAULT_CAROUSEL_PAGE_WIDTH,tt as DEFAULT_CLAMP_MAX_SIZE,De as DEFAULT_GTK_IMAGE_SIZE,ke as DEFAULT_ICON_BUTTON_ICON_SIZE,me as DEFAULT_ICON_COLOR,he as DEFAULT_ICON_COLOR_DARK,t as DEFAULT_ICON_PIXEL_SIZE,nt as DEFAULT_SPINNER_SIZE,Sn as DEFAULT_TOAST_TIMEOUT,je as ENTRY_ACTIVATE,Le as ExpanderState,e as GTK_ALIGN,Ue as GTK_BUTTON_CLICKED,We as GTK_BUTTON_LABEL_CLASS,ee as GTK_ICON_SIZE_NICKS,te as GTK_ICON_SIZE_PIXELS,b as GtkBox,y as GtkButton,p as GtkDropDown,d as GtkEntry,s as GtkImage,x as GtkLabel,S as GtkMenuButton,ve as ICON_FALLBACK_NAME,Ye as MENU_CANCEL_LABEL,et as MENU_ITEM_ACTIVATED,vt as MENU_TAPPED,se as NOTIFY_ACTIVE,Fe as NOTIFY_DROP_DOWN_SELECTED,Me as NOTIFY_ENTRY_TEXT,Re as NOTIFY_EXPANDED,sn as NOTIFY_N_PAGES,vn as NOTIFY_OPEN,cn as NOTIFY_POSITION,En as NOTIFY_RESPONSE,Pe as NOTIFY_SELECTED,Yt as NOTIFY_SELECTED_PAGE,hn as NOTIFY_SHOW_SIDEBAR,gn as NOTIFY_SIDEBAR_SELECTED,_ as NOTIFY_SLIDER_VALUE,Ae as NOTIFY_TEXT,yt as NOTIFY_TOGGLE_SELECTED,Ie as NOTIFY_VALUE,zt as NOTIFY_VIEW_SELECTED,Lt as NOTIFY_VISIBLE_CHILD,un as NOTIFY_VISIBLE_PAGE,dn as NsNavigationSplitViewState,fn as NsOverlaySplitViewState,Xt as PAGES_CHANGED,ln as PAGE_CHANGED,ne as PIXEL_SIZE_UNSET,On as PREFERENCES_CLOSED,gt as ROW_ACTIVATED,yn as SHEET_CLOSE,Et as SHORTCUT_LABEL_CAP_TEXT_CLASS,Dt as SHORTCUT_LABEL_CLASS,Ot as SHORTCUT_LABEL_DIMMED_CLASS,kt as SHORTCUT_LABEL_DISABLED_CLASS,At as SHORTCUT_LABEL_KEYCAP_CLASS,jt as SHORTCUT_LABEL_KEYS_CLASS,Mt as SHORTCUT_LABEL_SIDE_CLASS,Nt as SHORTCUT_LABEL_SPACED_CLASS,h as SpinState,Cn as TOAST_BUTTON_CLICKED,bt as ToggleGroupState,Q as addBreakpoints,o as adwaitaColorScheme,St as adwaitaNsAccentColor,Ct as adwaitaNsAccentCss,wt as applyAdwaitaNsAccent,$t as applyCarouselDots,ie as applyConstructProps,Bt as applyTabViewVisibility,Oe as attachRowPressFeedback,it as avatarInitials,Ke as boxChildMargin,qe as boxSpacingChanges,ze as buttonSlotAfterWrite,Be as buttonSlotDetaches,en as carouselDotClasses,tn as carouselNotifyPayload,nn as carouselPositionAtOffset,rn as carouselScrollOffset,Tt as clearAdwaitaNsAccent,ye as compiledIconNames,an as createCarouselState,Vt as createTabViewState,ut as dataGridCellClass,dt as dataGridItemSpec,ft as dataGridRowClass,pt as dataGridShapeKey,mt as dataGridTracksKey,An as evaluateBreakpointCondition,ge as extractIconPaths,_e as extractPathData,be as iconValueKind,re as isGtkIconSizeNick,xe as isIconAvailable,ce as isThemeIconColor,Ve as labelDisplayText,He as labelMarkupIsUnparseable,Xe as menuSheetActions,Ze as menuSheetRows,Je as normalizeBoxSpacing,on as normalizeCarouselPageWidth,ae as nsAlignment,le as onAdwaitaColorSchemeChanged,jn as parseBreakpointCondition,ht as parseDataGridWidth,Qe as presentMenuSheet,registerAdwaitaElements,Se as registerIcon,Ce as registeredIconNames,Ee as renderSymbolicIcon,we as resolveIconSource,$e as resolveMenuChoice,ue as setAdwaitaColorScheme,Pt as shortcutLabelDirection,Ft as shortcutLabelPlatform,It as shortcutLabelRenderPlan,pn as splitViewColumns,Ht as tabBarVisibility,Ut as tabCloseVisibilities,Wt as tabLabelText,Gt as tabPageVisibilities,Kt as tabTooltipText,qt as tabViewNotifyPayload,de as themeIconColor,fe as toggleAdwaitaColorScheme,Te as unregisterIcon};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{GTK_ALIGN as e}from"./gtk-align.js";import{DEFAULT_ICON_PIXEL_SIZE as t,GTK_ICON_SIZE_NICKS as ee,GTK_ICON_SIZE_PIXELS as te,PIXEL_SIZE_UNSET as ne,isGtkIconSizeNick as re}from"./gtk-icon-size.js";import{applyConstructProps as ie,nsAlignment as ae}from"./construct-props.js";import{AdwAboutDialog as n,CLOSED as oe}from"./adw-about-dialog.js";import{ACTIVATED as se,AdwActionRow as r}from"./adw-action-row.js";import{AdwAlertDialog as ce,AdwAlertResponses as le,NOTIFY_RESPONSE as ue}from"./adw-alert-dialog.js";import{avatarInitials as de}from"./avatar-color.js";import{AVATAR_DEFAULT_ICON as fe}from"./avatar-view.js";import{adwaitaColorScheme as pe,isThemeIconColor as me,onAdwaitaColorSchemeChanged as he,setAdwaitaColorScheme as ge,themeIconColor as _e,toggleAdwaitaColorScheme as ve}from"./color-scheme.js";import{ADWAITA_ICON_GRID as ye,DEFAULT_ICON_COLOR as be,DEFAULT_ICON_COLOR_DARK as xe,extractIconPaths as Se,extractPathData as Ce}from"./icon-path.js";import{ICON_FALLBACK_NAME as we,compiledIconNames as Te,iconValueKind as Ee,isIconAvailable as De,registerIcon as Oe,registeredIconNames as ke,resolveIconSource as Ae,unregisterIcon as je}from"./icon-theme.js";import{renderSymbolicIcon as Me}from"./icons.js";import{DEFAULT_GTK_IMAGE_SIZE as Ne,GtkImage as i}from"./gtk-image.js";import{AdwAvatar as a,DEFAULT_AVATAR_SIZE as Pe}from"./adw-avatar.js";import{DEFAULT_CLAMP_MAX_SIZE as Fe,DEFAULT_SPINNER_SIZE as Ie}from"./chrome.js";import{AdwBanner as o,BUTTON_CLICKED as Le}from"./adw-banner.js";import{CLOSE_ATTEMPT as Re,NOTIFY_OPEN as ze,SHEET_CLOSE as Be}from"./bottom-sheet-state.js";import{attachRowPressFeedback as Ve}from"./row-press.js";import{AdwBottomSheet as s}from"./adw-bottom-sheet.js";import{AdwButtonContent as c}from"./adw-button-content.js";import{AdwButtonRow as l}from"./adw-button-row.js";import{CarouselScrollSync as He,DEFAULT_CAROUSEL_PAGE_WIDTH as Ue,applyMarkerClasses as We,carouselDotClasses as Ge,carouselNotifyPayload as Ke,carouselPositionAtOffset as qe,carouselScrollOffset as Je,createCarouselState as Ye,indicatorMarkerClasses as Xe,normalizeCarouselPageWidth as Ze}from"./carousel-state.js";import{AdwCarousel as u,NOTIFY_N_PAGES as Qe,NOTIFY_POSITION as $e,PAGE_CHANGED as et}from"./adw-carousel.js";import{AdwCarouselIndicatorDots as d}from"./adw-carousel-indicator-dots.js";import{AdwCarouselIndicatorLines as f}from"./adw-carousel-indicator-lines.js";import{AdwClamp as p}from"./adw-clamp.js";import{AdwComboRow as m,ComboState as tt,NOTIFY_SELECTED as nt}from"./adw-combo-row.js";import{AdwImageButton as h,DEFAULT_ICON_BUTTON_ICON_SIZE as rt}from"./adw-image-button.js";import{AdwEntryRow as g,NOTIFY_TEXT as it}from"./adw-entry-row.js";import{AdwExpanderRow as _,ExpanderState as at,NOTIFY_EXPANDED as ot}from"./adw-expander-row.js";import{AdwWindowTitle as v}from"./adw-window-title.js";import{AdwHeaderBar as y}from"./adw-header-bar.js";import{AdwViewStackPage as st}from"./view-stack-page.js";import{AdwViewStack as b,NOTIFY_VISIBLE_CHILD as ct}from"./adw-view-stack.js";import{AdwViewSwitcherBase as lt,NOTIFY_SELECTED as ut}from"./view-switcher-base.js";import{AdwInlineViewSwitcher as x}from"./adw-inline-view-switcher.js";import{NsNavigationSplitViewState as dt,NsOverlaySplitViewState as ft,splitViewColumns as pt}from"./split-view-state.js";import{AdwSplitViewBase as mt,NOTIFY_SHOW_SIDEBAR as ht}from"./split-view-base.js";import{AdwNavigationSplitView as S}from"./adw-navigation-split-view.js";import{AdwNavigationPage as C}from"./adw-navigation-page.js";import{NOTIFY_VISIBLE_PAGE as gt}from"./navigation-stack.js";import{AdwNavigationView as w}from"./adw-navigation-view.js";import{AdwOverlaySplitView as T}from"./adw-overlay-split-view.js";import{AdwPasswordEntryRow as E}from"./adw-password-entry-row.js";import{AdwPreferencesDialog as D,CLOSED as _t}from"./adw-preferences-dialog.js";import{AdwPreferencesGroup as O}from"./adw-preferences-group.js";import{AdwPreferencesPage as k}from"./adw-preferences-page.js";import{SHORTCUT_LABEL_CAP_TEXT_CLASS as vt,SHORTCUT_LABEL_CLASS as yt,SHORTCUT_LABEL_DIMMED_CLASS as bt,SHORTCUT_LABEL_DISABLED_CLASS as xt,SHORTCUT_LABEL_KEYCAP_CLASS as St,SHORTCUT_LABEL_KEYS_CLASS as Ct,SHORTCUT_LABEL_SIDE_CLASS as wt,SHORTCUT_LABEL_SPACED_CLASS as Tt,shortcutLabelDirection as Et,shortcutLabelPlatform as Dt,shortcutLabelRenderPlan as Ot}from"./shortcut-label.js";import{AdwShortcutLabel as A}from"./adw-shortcut-label.js";import{AdwSidebarItem as kt,AdwSidebarSection as At}from"../values/sidebar.js";import{AdwSidebar as j,NOTIFY_SELECTED as jt}from"./adw-sidebar.js";import{AdwSpinRow as M,NOTIFY_VALUE as Mt,SpinState as Nt}from"./adw-spin-row.js";import{AdwSpinner as N}from"./adw-spinner.js";import{MENU_CANCEL_LABEL as Pt,menuSheetActions as Ft,menuSheetRows as It,presentMenuSheet as Lt,resolveMenuChoice as Rt}from"./menu-sheet.js";import{AdwSplitButton as P,CLICKED as zt,MENU_TAPPED as Bt}from"./adw-split-button.js";import{AdwStatusPage as F}from"./adw-status-page.js";import{AdwSwitchRow as I,NOTIFY_ACTIVE as Vt}from"./adw-switch-row.js";import{AdwTabPage as Ht}from"../values/tab-page.js";import{applyTabViewVisibility as Ut,createTabViewState as Wt,tabBarVisibility as Gt,tabCloseVisibilities as Kt,tabLabelText as qt,tabPageVisibilities as Jt,tabTooltipText as Yt,tabViewNotifyPayload as Xt}from"./tab-view-state.js";import{AdwTabView as L,CLOSE_PAGE as Zt,NOTIFY_SELECTED_PAGE as Qt,PAGES_CHANGED as $t}from"./adw-tab-view.js";import{AdwToast as en,AdwToastOverlay as R,AdwToastQueue as tn,DEFAULT_TOAST_TIMEOUT as nn,TOAST_BUTTON_CLICKED as rn}from"./adw-toast-overlay.js";import{AdwToggle as an}from"./adw-toggle.js";import{AdwToggleGroup as z,NOTIFY_SELECTED as on,ToggleGroupState as sn}from"./adw-toggle-group.js";import{AdwToolbarView as B}from"./adw-toolbar-view.js";import{AdwViewSwitcher as V}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as H}from"./adw-view-switcher-bar.js";import{AdwWrapBox as U}from"./adw-wrap-box.js";import{GtkActionBar as W}from"./gtk-action-bar.js";import{DEFAULT_BOX_SPACING as cn,boxChildMargin as ln,boxSpacingChanges as un,normalizeBoxSpacing as dn}from"./box-layout.js";import{GtkBox as G}from"./gtk-box.js";import{buttonSlotAfterWrite as fn,buttonSlotDetaches as pn}from"./button-slot.js";import{GTK_BUTTON_CLICKED as mn,GTK_BUTTON_LABEL_CLASS as hn,GtkButton as K}from"./gtk-button.js";import{GtkDropDown as q,NOTIFY_SELECTED as gn}from"./gtk-drop-down.js";import{ACTIVATE as _n,GtkEntry as J,NOTIFY_TEXT as vn}from"./gtk-entry.js";import{GtkLabel as Y}from"./gtk-label.js";import{GtkMenuButton as X,MENU_ITEM_ACTIVATED as yn}from"./gtk-menu-button.js";import{AdwSliderRow as Z,NOTIFY_SLIDER_VALUE as bn}from"./adw-slider-row.js";import{DATA_GRID_HEADER_CELL_CLASS as xn,DATA_GRID_HEADER_ROW_CLASS as Sn,DATA_GRID_SECTION_CELL_CLASS as Cn,dataGridCellClass as wn,dataGridItemSpec as Tn,dataGridRowClass as En,dataGridShapeKey as Dn,dataGridTracksKey as On,parseDataGridWidth as kn}from"./data-grid-model.js";import{AdwDataGrid as Q,ROW_ACTIVATED as An}from"./adw-data-grid.js";import{ADWAITA_NS_ACCENT_RULES as jn,adwaitaNsAccentColor as Mn,adwaitaNsAccentCss as Nn}from"./accent-theme.js";import{applyAdwaitaNsAccent as Pn,clearAdwaitaNsAccent as Fn}from"./adw-accent.js";import{AdwBreakpoint as In,addBreakpoints as Ln,evaluateBreakpointCondition as Rn,parseBreakpointCondition as zn}from"./breakpoint.js";import{labelDisplayText as Bn,labelMarkupIsUnparseable as Vn}from"@gjsify/adwaita-core";const Hn={AdwPreferencesPage:k,AdwPreferencesGroup:O,AdwActionRow:r,AdwSwitchRow:I,AdwEntryRow:g,AdwPasswordEntryRow:E,GtkEntry:J,AdwComboRow:m,GtkDropDown:q,AdwSpinRow:M,AdwSliderRow:Z,AdwExpanderRow:_,GtkButton:K,GtkBox:G,GtkActionBar:W,GtkLabel:Y,AdwImageButton:h,GtkMenuButton:X,GtkImage:i,AdwBanner:o,AdwAvatar:a,AdwWindowTitle:v,AdwClamp:p,AdwHeaderBar:y,AdwToolbarView:B,AdwWrapBox:U,AdwDataGrid:Q,AdwSpinner:N,AdwStatusPage:F,AdwButtonRow:l,AdwButtonContent:c,AdwSplitButton:P,AdwToggleGroup:z,AdwShortcutLabel:A,AdwViewStack:b,AdwViewSwitcher:V,AdwViewSwitcherBar:H,AdwInlineViewSwitcher:x,AdwTabView:L,AdwCarousel:u,AdwCarouselIndicatorDots:d,AdwCarouselIndicatorLines:f,AdwNavigationPage:C,AdwNavigationView:w,AdwNavigationSplitView:S,AdwOverlaySplitView:T,AdwSidebar:j,AdwBottomSheet:s,AdwToastOverlay:R,AdwAboutDialog:n,AdwPreferencesDialog:D};let $=!1;function registerAdwaitaElements(){if(!$&&typeof registerElement==`function`){for(let[e,t]of Object.entries(Hn))registerElement(e,()=>t);$=!0}}export{oe as ABOUT_CLOSED,se as ACTIVATED,ye as ADWAITA_ICON_GRID,jn as ADWAITA_NS_ACCENT_RULES,fe as AVATAR_DEFAULT_ICON,n as AdwAboutDialog,r as AdwActionRow,ce as AdwAlertDialog,le as AdwAlertResponses,a as AdwAvatar,o as AdwBanner,s as AdwBottomSheet,In as AdwBreakpoint,c as AdwButtonContent,l as AdwButtonRow,u as AdwCarousel,d as AdwCarouselIndicatorDots,f as AdwCarouselIndicatorLines,p as AdwClamp,m as AdwComboRow,Q as AdwDataGrid,g as AdwEntryRow,_ as AdwExpanderRow,y as AdwHeaderBar,h as AdwImageButton,x as AdwInlineViewSwitcher,C as AdwNavigationPage,S as AdwNavigationSplitView,w as AdwNavigationView,T as AdwOverlaySplitView,E as AdwPasswordEntryRow,D as AdwPreferencesDialog,O as AdwPreferencesGroup,k as AdwPreferencesPage,A as AdwShortcutLabel,j as AdwSidebar,kt as AdwSidebarItem,At as AdwSidebarSection,Z as AdwSliderRow,M as AdwSpinRow,N as AdwSpinner,P as AdwSplitButton,mt as AdwSplitViewBase,F as AdwStatusPage,I as AdwSwitchRow,Ht as AdwTabPage,L as AdwTabView,en as AdwToast,R as AdwToastOverlay,tn as AdwToastQueue,an as AdwToggle,z as AdwToggleGroup,B as AdwToolbarView,b as AdwViewStack,st as AdwViewStackPage,V as AdwViewSwitcher,H as AdwViewSwitcherBar,lt as AdwViewSwitcherBase,v as AdwWindowTitle,U as AdwWrapBox,Le as BUTTON_CLICKED,zt as CLICKED,Re as CLOSE_ATTEMPT,Zt as CLOSE_PAGE,He as CarouselScrollSync,tt as ComboState,xn as DATA_GRID_HEADER_CELL_CLASS,Sn as DATA_GRID_HEADER_ROW_CLASS,Cn as DATA_GRID_SECTION_CELL_CLASS,Pe as DEFAULT_AVATAR_SIZE,cn as DEFAULT_BOX_SPACING,Ue as DEFAULT_CAROUSEL_PAGE_WIDTH,Fe as DEFAULT_CLAMP_MAX_SIZE,Ne as DEFAULT_GTK_IMAGE_SIZE,rt as DEFAULT_ICON_BUTTON_ICON_SIZE,be as DEFAULT_ICON_COLOR,xe as DEFAULT_ICON_COLOR_DARK,t as DEFAULT_ICON_PIXEL_SIZE,Ie as DEFAULT_SPINNER_SIZE,nn as DEFAULT_TOAST_TIMEOUT,_n as ENTRY_ACTIVATE,at as ExpanderState,e as GTK_ALIGN,mn as GTK_BUTTON_CLICKED,hn as GTK_BUTTON_LABEL_CLASS,ee as GTK_ICON_SIZE_NICKS,te as GTK_ICON_SIZE_PIXELS,W as GtkActionBar,G as GtkBox,K as GtkButton,q as GtkDropDown,J as GtkEntry,i as GtkImage,Y as GtkLabel,X as GtkMenuButton,we as ICON_FALLBACK_NAME,Pt as MENU_CANCEL_LABEL,yn as MENU_ITEM_ACTIVATED,Bt as MENU_TAPPED,Vt as NOTIFY_ACTIVE,gn as NOTIFY_DROP_DOWN_SELECTED,vn as NOTIFY_ENTRY_TEXT,ot as NOTIFY_EXPANDED,Qe as NOTIFY_N_PAGES,ze as NOTIFY_OPEN,$e as NOTIFY_POSITION,ue as NOTIFY_RESPONSE,nt as NOTIFY_SELECTED,Qt as NOTIFY_SELECTED_PAGE,ht as NOTIFY_SHOW_SIDEBAR,jt as NOTIFY_SIDEBAR_SELECTED,bn as NOTIFY_SLIDER_VALUE,it as NOTIFY_TEXT,on as NOTIFY_TOGGLE_SELECTED,Mt as NOTIFY_VALUE,ut as NOTIFY_VIEW_SELECTED,ct as NOTIFY_VISIBLE_CHILD,gt as NOTIFY_VISIBLE_PAGE,dt as NsNavigationSplitViewState,ft as NsOverlaySplitViewState,$t as PAGES_CHANGED,et as PAGE_CHANGED,ne as PIXEL_SIZE_UNSET,_t as PREFERENCES_CLOSED,An as ROW_ACTIVATED,Be as SHEET_CLOSE,vt as SHORTCUT_LABEL_CAP_TEXT_CLASS,yt as SHORTCUT_LABEL_CLASS,bt as SHORTCUT_LABEL_DIMMED_CLASS,xt as SHORTCUT_LABEL_DISABLED_CLASS,St as SHORTCUT_LABEL_KEYCAP_CLASS,Ct as SHORTCUT_LABEL_KEYS_CLASS,wt as SHORTCUT_LABEL_SIDE_CLASS,Tt as SHORTCUT_LABEL_SPACED_CLASS,Nt as SpinState,rn as TOAST_BUTTON_CLICKED,sn as ToggleGroupState,Ln as addBreakpoints,pe as adwaitaColorScheme,Mn as adwaitaNsAccentColor,Nn as adwaitaNsAccentCss,Pn as applyAdwaitaNsAccent,ie as applyConstructProps,We as applyMarkerClasses,Ut as applyTabViewVisibility,Ve as attachRowPressFeedback,de as avatarInitials,ln as boxChildMargin,un as boxSpacingChanges,fn as buttonSlotAfterWrite,pn as buttonSlotDetaches,Ge as carouselDotClasses,Ke as carouselNotifyPayload,qe as carouselPositionAtOffset,Je as carouselScrollOffset,Fn as clearAdwaitaNsAccent,Te as compiledIconNames,Ye as createCarouselState,Wt as createTabViewState,wn as dataGridCellClass,Tn as dataGridItemSpec,En as dataGridRowClass,Dn as dataGridShapeKey,On as dataGridTracksKey,Rn as evaluateBreakpointCondition,Se as extractIconPaths,Ce as extractPathData,Ee as iconValueKind,Xe as indicatorMarkerClasses,re as isGtkIconSizeNick,De as isIconAvailable,me as isThemeIconColor,Bn as labelDisplayText,Vn as labelMarkupIsUnparseable,Ft as menuSheetActions,It as menuSheetRows,dn as normalizeBoxSpacing,Ze as normalizeCarouselPageWidth,ae as nsAlignment,he as onAdwaitaColorSchemeChanged,zn as parseBreakpointCondition,kn as parseDataGridWidth,Lt as presentMenuSheet,registerAdwaitaElements,Oe as registerIcon,ke as registeredIconNames,Me as renderSymbolicIcon,Ae as resolveIconSource,Rt as resolveMenuChoice,ge as setAdwaitaColorScheme,Et as shortcutLabelDirection,Dt as shortcutLabelPlatform,Ot as shortcutLabelRenderPlan,pt as splitViewColumns,Gt as tabBarVisibility,Kt as tabCloseVisibilities,qt as tabLabelText,Jt as tabPageVisibilities,Yt as tabTooltipText,Xt as tabViewNotifyPayload,_e as themeIconColor,ve as toggleAdwaitaColorScheme,je as unregisterIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";const
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{withGtkWidgetLayout as e}from"./widget-layout.js";const t=new WeakMap;let n=1;function withSignals(r){class WithSignals extends e(r){connect(e,r){let listener=e=>r(this,e),i=n++,a=t.get(this);return a===void 0&&(a=new Map,t.set(this,a)),a.set(i,{eventName:e,listener}),this.addEventListener(e,listener),i}disconnect(e){let n=t.get(this)?.get(e);if(n===void 0)throw TypeError(`${this.constructor.name} has no handler with id ${e}. connect() hands out each id once and disconnect() takes it once; a second disconnect, or an id another widget returned, is refused here rather than left as a silent no-op.`);this.removeEventListener(n.eventName,n.listener),t.get(this)?.delete(e)}}return WithSignals}export{withSignals};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e,resolveBuilderSlot as t}from"./builder-slots.js";import{xmlBoolean as n,xmlNumber as r}from"./xml-values.js";import{withSignals as i}from"./signals.js";import{appliesDerivedSidebarWidth as a,defaultSidebarWidthProps as o,normalizeWidthFraction as s,normalizeWidthProp as c,sidebarWidthFor as l}from"./split-view-width.js";import{splitViewColumns as u}from"./split-view-state.js";import{GridLayout as d,ItemSpec as f}from"@nativescript/core";const p=`notify::show-sidebar`,m=[`sidebar`,`content`];var AdwSplitViewBase=class extends i(d){_widthRule;_state;static builderSlots=e(m,`content`);_sidebar=null;_content=null;_widthProps=o();_splitWidth=0;_sidebarWidthOverride=null;constructor(e,t,n){super(),this._widthRule=t,this._state=n,this.className=e,this.addRow(new f(1,`star`)),this._state.bind({applyLayout:()=>this._applyLayout(),transitionSidebar:()=>this._transitionSidebar(),notifyShowSidebar:e=>this._emitShowSidebar(e)}),this.addEventListener(`layoutChanged`,()=>this._applySidebarWidth()),this._syncColumns()}_syncColumns(){this.removeColumns(),u(this._state.sidebarPosition,this.textDirection).sidebar===0?(this.addColumn(new f(1,`auto`)),this.addColumn(new f(1,`star`))):(this.addColumn(new f(1,`star`)),this.addColumn(new f(1,`auto`)))}_syncSidebarSide(e=this._sidebar){if(!e)return;let t=u(this._state.sidebarPosition,this.textDirection).sidebar===0,n=(e.className??``).split(` `).filter(e=>e&&e!==`adw-sidebar-at-visual-start`&&e!==`adw-sidebar-at-visual-end`);n.push(t?`adw-sidebar-at-visual-start`:`adw-sidebar-at-visual-end`),e.className=n.join(` `)}get textDirection(){return this.style?.direction===`rtl`?`rtl`:`ltr`}_emitShowSidebar(e){let t={eventName:p,object:this,showSidebar:e.showSidebar,collapsed:e.collapsed};this.notify(t)}_transitionSidebar(){this._applyLayout()}_pending=[];_shouldAnimate(){return typeof(this._sidebar??this._content??this).animate==`function`&&this.isLoaded===!0}_track(e){return this._pending.push(e),e}_cancelPending(){for(let e of this._pending)try{e.cancel()}catch{}this._pending=[]}_isChild(e){for(let t=0;t<this.getChildrenCount();t++)if(this.getChildAt(t)===e)return!0;return!1}set_sidebar(e){this._sidebar&&this.removeChild(this._sidebar),this._sidebar=e,e&&(e.className=`${e.className??``} adw-split-view-sidebar`.trim(),this._syncSidebarSide(e),e.width=this.sidebarWidth,this.addChild(e)),this._state.setPaneMounted(`sidebar`,e!==null),this._applyLayout()}set_content(e){this._content&&this.removeChild(this._content),this._content=e,e&&(e.className=`${e.className??``} adw-split-view-content`.trim(),this.addChild(e)),this._state.setPaneMounted(`content`,e!==null),this._applyLayout()}_addChildFromBuilder(e,n){t(e,m,`content`)===`sidebar`?this.set_sidebar(n):this.set_content(n)}showSidebarPane(){this.showSidebar=!0}hideSidebarPane(){this.showSidebar=!1}get collapsed(){return this._state.collapsed}set collapsed(e){let t=n(e,this.collapsed);this._state.setCollapsed(!!t)}get showSidebar(){return this._state.showSidebar}set showSidebar(e){let t=n(e,this.showSidebar);this._state.setShowSidebar(!!t)}get sidebarWidth(){return this._sidebarWidthOverride??l(this._splitWidth,this._widthProps,this._widthRule,{collapsed:this._state.collapsed})}set sidebarWidth(e){let t=r(e,this.sidebarWidth);this._sidebarWidthOverride=Number.isFinite(t)&&t>0?t:null,this._applySidebarWidth()}get minSidebarWidth(){return this._widthProps.minSidebarWidth}set minSidebarWidth(e){let t=r(e,this.minSidebarWidth);this._widthProps.minSidebarWidth=c(t,o().minSidebarWidth),this._applySidebarWidth()}get maxSidebarWidth(){return this._widthProps.maxSidebarWidth}set maxSidebarWidth(e){let t=r(e,this.maxSidebarWidth);this._widthProps.maxSidebarWidth=c(t,o().maxSidebarWidth),this._applySidebarWidth()}get sidebarWidthFraction(){return this._widthProps.sidebarWidthFraction}set sidebarWidthFraction(e){let t=r(e,this.sidebarWidthFraction);this._widthProps.sidebarWidthFraction=s(t),this._applySidebarWidth()}_applySidebarWidth(){let e=this.getActualSize?.();e&&e.width>0&&(this._splitWidth=e.width),this._sidebar&&a(this._state.collapsed,this._widthRule)&&(this._sidebar.width=this.sidebarWidth)}get sidebarPosition(){return this._state.sidebarPosition}set sidebarPosition(e){this._state.setSidebarPosition(e===`end`?`end`:`start`)&&(this._syncColumns(),this._syncSidebarSide(),this._applyLayout())}get sidebar(){return this._sidebar}set sidebar(e){this.set_sidebar(e)}get content(){return this._content}set content(e){this.set_content(e)}};export{AdwSplitViewBase,p as NOTIFY_SHOW_SIDEBAR};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.js";import{xmlBoolean as t,xmlNumber as n}from"./xml-values.js";import{applyConstructProps as r}from"./construct-props.js";import{withSignals as i}from"./signals.js";import{Observable as a}from"@nativescript/core";var AdwViewStackPage=class extends i(a){static builderSlots=e([`child`],`child`);_child=null;_name=``;_title=null;_iconName=null;_needsAttention=!1;_badgeNumber=0;_visible=!0;_useUnderline=!1;_stack=null;_awaiting=null;constructor(e){super(),r(this,e)}get child(){return this._child}set child(e){this._refuseAfterAdoption(`child`),this._child=e;let t=this._awaiting;t===null||e===null||(this._awaiting=null,t._addChildFromBuilder(``,this))}get name(){return this._name}set name(e){this._refuseAfterAdoption(`name`),this._name=e??``}get title(){return this._title}set title(e){this._refuseAfterAdoption(`title`),this._title=e}get iconName(){return this._iconName}set iconName(e){this._refuseAfterAdoption(`iconName`),this._iconName=e}get needsAttention(){return this._needsAttention}set needsAttention(e){this._refuseAfterAdoption(`needsAttention`),this._needsAttention=t(e,this._needsAttention)}get badgeNumber(){return this._badgeNumber}set badgeNumber(e){this._refuseAfterAdoption(`badgeNumber`),this._badgeNumber=n(e,this._badgeNumber)}get useUnderline(){return this._useUnderline}set useUnderline(e){this._refuseAfterAdoption(`useUnderline`),this._useUnderline=t(e,this._useUnderline)}get visible(){return this._visible}set visible(e){this._visible=t(e,this._visible),this._stack?.setPageVisible(this._name,this._visible)}_addChildFromBuilder(e,t){this.child=t}_adoptBy(e){if(this._stack!==null)throw Error(`AdwViewStackPage '${this._name}' already belongs to a stack.`);this._stack=e}_awaitChild(e){this._awaiting=e}_refuseAfterAdoption(e){if(this._stack!==null)throw Error(`AdwViewStackPage '${this._name}' was read when its stack adopted it, so '${e}' can no longer reach the stack or a switcher bound to it. Write it before the page is added, or use the stack's own methods.`)}};export{AdwViewStackPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{withSignals as t}from"./signals.js";import{GtkImage as n}from"./gtk-image.js";import{attachRowPressFeedback as r}from"./row-press.js";import{applyViewSwitcherVisibility as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{withSignals as t}from"./signals.js";import{GtkImage as n}from"./gtk-image.js";import{attachRowPressFeedback as r}from"./row-press.js";import{NOTIFY_VISIBLE_CHILD as i}from"./adw-view-stack.js";import{applyViewSwitcherVisibility as a,createViewSwitcherState as o,switcherButtonVisible as s,viewSwitcherNotifyPayload as c,viewSwitcherPageSpecs as l}from"./view-switcher-model.js";import{GridLayout as u,ItemSpec as d,Label as f,StackLayout as p}from"@nativescript/core";import{buildViewSwitcherButtons as m}from"@gjsify/adwaita-core";const h=`notify::selected`;function viewPagesOfStack(e){let t=[];for(let n of e.pages)n.content!==void 0&&t.push({name:n.name,title:n.title,icon:n.icon.length>0?n.icon:void 0,visible:n.visible,badgeNumber:n.badgeNumber,needsAttention:n.needsAttention,useUnderline:n.useUnderline,content:n.content});return t}var AdwViewSwitcherBase=class extends t(u){static builderReferences=[`stack`];_bar;_policy=`narrow`;_contentArea;_pages=[];_state=o();_nodes=[];_stack=null;_stackListener=null;_ownsContent=!0;_syncingFromStack=!1;get policy(){return this._policy}get switcherPolicy(){return this._policy}set switcherPolicy(e){let t=e===`wide`?`wide`:`narrow`;t!==this._policy&&(this._policy=t,this._applySelection(),this.notify({eventName:`notify::policy`,object:this}))}get buttonDisplayMode(){return`both`}constructor(e){super(),this.className=e,this.addColumn(new d(1,`star`)),this.addRow(new d(1,`auto`)),this.addRow(new d(1,`star`));let t=new u;t.horizontalAlignment=`stretch`,t.addRow(new d(1,`auto`)),u.setRow(t,0),this.addChild(t),this._bar=t;let n=new u;n.addColumn(new d(1,`star`)),n.addRow(new d(1,`star`)),u.setRow(n,1),this.addChild(n),this._contentArea=n,this._state.subscribe(e=>{this._applySelection();let t={eventName:h,object:this,...c(e)};this.notify(t)})}_initClasses(){this._bar.className=this.barClass}setViews(e){this._stack!==null&&(this._unbindStack(),this._contentArea.visibility=`visible`),this._installPages(e,!0)}_installPages(e,t){for(let e of this._nodes)this._bar.removeChild(e.button);if(this._nodes=[],this._bar.removeColumns(),this._ownsContent)for(let e of this._pages)this._contentArea.removeChild(e.content);this._ownsContent=t,this._pages.length=0,this._pages.push(...e);for(let[e,n]of this._pages.entries())this._nodes.push(this._buildButton(e)),t&&(u.setColumn(n.content,0),u.setRow(n.content,0),this._contentArea.addChild(n.content));this._state.setPages(l(this._pages)),this._applySelection()}set_stack(e){if(this._unbindStack(),this._stack=e,this._contentArea.visibility=e===null?`visible`:`collapse`,e===null){this._installPages([],!0);return}let listener=()=>this._syncFromStack();e.addEventListener(i,listener),this._stackListener=listener,this._syncFromStack()}get stack(){return this._stack}set stack(e){this.set_stack(e)}_unbindStack(){this._stack!==null&&this._stackListener!==null&&this._stack.removeEventListener(i,this._stackListener),this._stackListener=null,this._stack=null}_syncFromStack(){let e=this._stack;if(!(e===null||this._syncingFromStack)){this._syncingFromStack=!0;try{e.pages.length!==this._pages.length&&this._installPages(viewPagesOfStack(e),!1),this._state.setSelected(e.visibleChildIndex),this._applySelection()}finally{this._syncingFromStack=!1}}}_buildButton(e){let t=new p;t.orientation=`horizontal`,t.className=this.buttonClass,t.horizontalAlignment=`center`;let i=new n;i.className=`${i.className} ${this.buttonClass}-icon`.trim(),i.verticalAlignment=`middle`,t.addChild(i);let a=new f;a.className=`${this.buttonClass}-label`,a.verticalAlignment=`middle`,t.addChild(a);let o=new f;return o.className=`${this.buttonClass}-badge`,o.verticalAlignment=`middle`,t.addChild(o),r(t),t.addEventListener(`tap`,()=>{this._state.setSelected(e)}),this._bar.addColumn(new d(1,`star`)),u.setColumn(t,e),u.setRow(t,0),this._bar.addChild(t),{button:t,icon:i,label:a,badge:o}}get switcherKind(){return`switcher`}_applySelection(){this._ownsContent?a(this._pages,this._state.selected):this._syncingFromStack||this._stack?.selectNthPage(this._state.selected);let e=this.buttonDisplayMode!==`labels`,t=this.buttonDisplayMode!==`icons`;m(this._state.pages,this._state.selected,this.policy).forEach((n,r)=>{let i=this._nodes[r];if(!i)return;let a=this._state.pages[r]?.visible??!1;i.button.visibility=s(this.switcherKind,n.visible,a)?`visible`:`collapse`,i.button.orientation=n.orientation===`horizontal`?`horizontal`:`vertical`,i.button.className=n.selected?`${this.buttonClass} active`:this.buttonClass,i.icon.iconName=n.iconName,i.icon.visibility=e?`visible`:`collapse`,i.label.text=n.label,i.label.visibility=t?`visible`:`collapse`,i.badge.text=n.badgeLabel,i.badge.visibility=n.badgeLabel.length>0||n.needsAttention?`visible`:`collapse`,n.badgeLabel.length===0&&n.needsAttention?i.badge.className=`${this.buttonClass}-badge needs-attention`:i.badge.className=`${this.buttonClass}-badge`,i.button.accessibilityLabel=n.description||n.label})}get views(){return this._pages}set views(e){this.setViews(Array.isArray(e)?e:[])}get selected(){return this._state.selected}set selected(t){let n=e(t,this.selected);this._state.setSelected(n)}get selectedName(){return this._state.selectedName}setPageVisible(e,t){let n=this._state.setPageVisible(e,t);return this._applySelection(),n}};export{AdwViewSwitcherBase,h as NOTIFY_SELECTED};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{GTK_ALIGN as t,NS_HORIZONTAL_ALIGNMENT as n,NS_VERTICAL_ALIGNMENT as r}from"./gtk-align.js";import{nsAlignment as i}from"./construct-props.js";const a=32767;function laidOut(e,t){let n=viewOf(e);if(n!==null)return n;throw TypeError(`${e.constructor.name} is not laid out by a parent, so it has no '${t}'. The GtkWidget layout properties reach views only; this class extends Observable.`)}function viewOf(e){return`horizontalAlignment`in e?e:null}function alignNick(e,n){if(typeof e==`string`&&Object.hasOwn(t,e))return e;if(typeof e==`number`){let n=Object.keys(t).find(n=>t[n]===e);if(n!==void 0)return n}throw TypeError(`'${String(e)}' is not a Gtk.Align, so it cannot be '${n}'. The members are ${Object.keys(t).join(`, `)}; NativeScript's own alignment words go to ${n===`halign`?`horizontalAlignment`:`verticalAlignment`}.`)}function readAlign(e,t,n){for(let[n,r]of Object.entries(t))if(r===e)return n;return n!==null&&e===`left`?n?`end`:`start`:n!==null&&e===`right`?n?`start`:`end`:`fill`}function marginOf(e,t){let n=typeof e==`string`&&e.trim()!==``?Number(e):e;if(typeof n==`number`&&Number.isInteger(n)&&n>=0&&n<=a)return n;throw TypeError(`'${String(e)}' is not a margin: '${t}' takes an integer from 0 to ${a}.`)}const o=new WeakMap;function expandOf(e){let t=o.get(e);return t===void 0&&(t={h:!1,v:!1},o.set(e,t)),t}function withGtkWidgetLayout(t){class WithGtkWidgetLayout extends t{get halign(){let e=viewOf(this);return e===null?`fill`:readAlign(e.horizontalAlignment,n,e.style?.direction===`rtl`)}set halign(e){let t=laidOut(this,`halign`);t.horizontalAlignment=i(alignNick(e,`halign`),`horizontal`)}get valign(){let e=viewOf(this);return e===null?`fill`:readAlign(e.verticalAlignment,r,null)}set valign(e){let t=laidOut(this,`valign`);t.verticalAlignment=i(alignNick(e,`valign`),`vertical`)}get hexpand(){return o.get(this)?.h??!1}set hexpand(t){laidOut(this,`hexpand`);let n=expandOf(this);n.h=e(t,n.h)}get vexpand(){return o.get(this)?.v??!1}set vexpand(t){laidOut(this,`vexpand`);let n=expandOf(this);n.v=e(t,n.v)}get marginStart(){let e=viewOf(this);return e===null?0:Number(e.style?.direction===`rtl`?e.marginRight:e.marginLeft)||0}set marginStart(e){let t=laidOut(this,`marginStart`),n=marginOf(e,`marginStart`);t.style?.direction===`rtl`?t.marginRight=n:t.marginLeft=n}get marginEnd(){let e=viewOf(this);return e===null?0:Number(e.style?.direction===`rtl`?e.marginLeft:e.marginRight)||0}set marginEnd(e){let t=laidOut(this,`marginEnd`),n=marginOf(e,`marginEnd`);t.style?.direction===`rtl`?t.marginLeft=n:t.marginRight=n}}return WithGtkWidgetLayout}export{withGtkWidgetLayout};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SharedTreeNode } from '@gjsify/adwaita-core/conformance';
|
|
2
|
+
/** Every one-Blueprint `.blp` of the gallery, by its path under `website/src/blueprints/`. */
|
|
3
|
+
export declare const GALLERY_BLUEPRINTS: Readonly<Record<string, SharedTreeNode>>;
|
|
4
|
+
export declare const AdwBlueprintMarkupNsTest: () => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdwBlueprintTreesNsTest: () => Promise<void>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { SharedTreeNode } from '@gjsify/adwaita-core/conformance';
|
|
2
|
+
import { View } from '@nativescript/core';
|
|
3
|
+
/**
|
|
4
|
+
* A class the barrel offers as an element. A widget is built with NO arguments, as
|
|
5
|
+
* NativeScript builds one; a value object ({@link build}) takes its construct bag.
|
|
6
|
+
*/
|
|
7
|
+
export type ElementClass = new (props?: Record<string, unknown>) => object;
|
|
8
|
+
/** `AdwSwitchRow` -> `<adw:SwitchRow>`: the element name, and the class behind it. */
|
|
9
|
+
export interface Element {
|
|
10
|
+
/** The XML name this dialect spells, which is also what an XML child arrives under. */
|
|
11
|
+
xmlName: string;
|
|
12
|
+
ctor: ElementClass;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The element a GIR class name is, in the `xmlns` barrel dialect.
|
|
16
|
+
*
|
|
17
|
+
* THE WHOLE TRANSFORM, and it is a split rather than a table: the prefix names the library,
|
|
18
|
+
* the member is the rest. What makes it safe is that the member is then READ OFF THE BARREL
|
|
19
|
+
* — the same module NativeScript would read — so a placement this split gets wrong is a
|
|
20
|
+
* missing member and throws, never another library's widget under this prefix. That is the
|
|
21
|
+
* measured hazard `generate-adwaita-nativescript-templates.mjs` records as the
|
|
22
|
+
* prefix-as-membership-test defect: the defect was deciding placement from the name ALONE.
|
|
23
|
+
*
|
|
24
|
+
* The class the barrel hands back must be the class the corpus NAMED, which is ADR 0034
|
|
25
|
+
* clause 1 — a widget is named after the library owning its GType — held at runtime instead
|
|
26
|
+
* of taken on trust. (The tree-driver bundles that reach this function are built
|
|
27
|
+
* `--no-minify` so a class name is the one the source declares; a mangled one fails here
|
|
28
|
+
* rather than resolving to a stranger.)
|
|
29
|
+
*/
|
|
30
|
+
export declare function elementFor(tag: string): Element;
|
|
31
|
+
/**
|
|
32
|
+
* Build one authored node the way NativeScript's XML builder does: construct with no
|
|
33
|
+
* arguments, write the attributes, then hand each child to the parent's own child door
|
|
34
|
+
* under the name its placement asks for ({@link builderNameFor}).
|
|
35
|
+
*
|
|
36
|
+
* AN OBJECT-VALUED PROPERTY IS WRITTEN LAST, with the object. `stack: stack` in a `.blp`
|
|
37
|
+
* projects as the string `"stack"`, and GtkBuilder resolves it to the object with that id
|
|
38
|
+
* once the whole file is parsed — which is what lets a switcher above its stack name it. The
|
|
39
|
+
* properties a widget declares object-valued (`builderReferences`, `widgets/builder-slots.ts`)
|
|
40
|
+
* are held back the same way here and assigned once every node exists, so the switcher also
|
|
41
|
+
* binds to a stack whose pages are all in. An id nothing in the tree carries is refused, as
|
|
42
|
+
* GtkBuilder refuses an unknown object id, rather than handing the widget a string.
|
|
43
|
+
*
|
|
44
|
+
* AN ATTRIBUTE IS ALWAYS A STRING, and that is the door rather than a choice of this
|
|
45
|
+
* builder: `setPropertyValue` ends in `instance[name] = value` with no conversion at all for
|
|
46
|
+
* a plain accessor, so a setter declared `boolean` is handed `'true'`. Writing the authored
|
|
47
|
+
* boolean instead would drive the construct-props bag — a different door — and would leave
|
|
48
|
+
* the coercion `widgets/xml-values.ts` exists for untested on the trees the website ships.
|
|
49
|
+
*
|
|
50
|
+
* AN ATTRIBUTE THAT LANDS NOWHERE IS REFUSED HERE. `instance[name] = value` on a name
|
|
51
|
+
* nothing declares adds a dead own-property and returns, at exit 0 — this surface's own
|
|
52
|
+
* silent drop. The membership test runs BEFORE the write, because afterwards the dead
|
|
53
|
+
* property answers it.
|
|
54
|
+
*
|
|
55
|
+
* The root is always a widget: a tree whose root is a value object has nothing to show.
|
|
56
|
+
*/
|
|
57
|
+
export declare function build(node: SharedTreeNode): View;
|
|
58
|
+
/** What {@link buildDialog} hands back: the object `present()` is called on. */
|
|
59
|
+
export interface PresentableRoot {
|
|
60
|
+
present(): unknown;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* A tree rooted at a DIALOG — ADR 0072's `responses`.
|
|
64
|
+
*
|
|
65
|
+
* This port's `Adw.AlertDialog` is not a `View`: it presents through the platform's own
|
|
66
|
+
* dialog, so {@link build} rightly refuses it as a root. Its own entry point keeps that
|
|
67
|
+
* refusal intact for every other value object, and admits a root by the one method a dialog
|
|
68
|
+
* is for rather than by a class list.
|
|
69
|
+
*/
|
|
70
|
+
export declare function buildDialog(node: SharedTreeNode): PresentableRoot;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdwGalleryBlueprintsNsTest: () => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdwGtkValueDoorsNsTest: () => Promise<void>;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { assertNativeScript, isNativeScript, isAndroid, isIOS } from '@gjsify/native-platform';
|
|
2
2
|
export { NOTIFY_ACTIVE, NOTIFY_TEXT, ENTRY_ACTIVATE, NOTIFY_ENTRY_TEXT, ComboState, NOTIFY_SELECTED, NOTIFY_DROP_DOWN_SELECTED, SpinState, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, ExpanderState, NOTIFY_EXPANDED, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, MENU_ITEM_ACTIVATED, DEFAULT_GTK_IMAGE_SIZE, DEFAULT_BOX_SPACING, GTK_BUTTON_CLICKED, GTK_BUTTON_LABEL_CLASS, buttonSlotAfterWrite, buttonSlotDetaches, boxChildMargin, boxSpacingChanges, normalizeBoxSpacing, labelDisplayText, labelMarkupIsUnparseable, BUTTON_CLICKED, AVATAR_DEFAULT_ICON, DEFAULT_AVATAR_SIZE, avatarInitials, DEFAULT_CLAMP_MAX_SIZE, AdwDataGrid, ROW_ACTIVATED, dataGridCellClass, dataGridItemSpec, dataGridRowClass, dataGridShapeKey, dataGridTracksKey, parseDataGridWidth, DATA_GRID_HEADER_CELL_CLASS, DATA_GRID_HEADER_ROW_CLASS, DATA_GRID_SECTION_CELL_CLASS, DEFAULT_SPINNER_SIZE, ACTIVATED, CLICKED, MENU_TAPPED, ToggleGroupState, NOTIFY_TOGGLE_SELECTED, applyAdwaitaNsAccent, clearAdwaitaNsAccent, ADWAITA_NS_ACCENT_RULES, adwaitaNsAccentColor, adwaitaNsAccentCss, SHORTCUT_LABEL_CAP_TEXT_CLASS, SHORTCUT_LABEL_CLASS, SHORTCUT_LABEL_DIMMED_CLASS, SHORTCUT_LABEL_DISABLED_CLASS, SHORTCUT_LABEL_KEYCAP_CLASS, SHORTCUT_LABEL_KEYS_CLASS, SHORTCUT_LABEL_SIDE_CLASS, SHORTCUT_LABEL_SPACED_CLASS, shortcutLabelDirection, shortcutLabelPlatform, shortcutLabelRenderPlan, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, DEFAULT_CAROUSEL_PAGE_WIDTH, NOTIFY_POSITION, NOTIFY_VISIBLE_PAGE, AdwSplitViewBase, NOTIFY_SHOW_SIDEBAR, NsNavigationSplitViewState, NsOverlaySplitViewState, splitViewColumns, NOTIFY_SIDEBAR_SELECTED, NOTIFY_OPEN, AdwToast, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, TOAST_BUTTON_CLICKED, AdwAlertResponses, NOTIFY_RESPONSE, ABOUT_CLOSED, PREFERENCES_CLOSED, applyConstructProps, nsAlignment, GTK_ALIGN, DEFAULT_ICON_PIXEL_SIZE, GTK_ICON_SIZE_NICKS, GTK_ICON_SIZE_PIXELS, type GtkIconSizeNick, isGtkIconSizeNick, PIXEL_SIZE_UNSET, attachRowPressFeedback, ICON_FALLBACK_NAME, compiledIconNames, iconValueKind, isIconAvailable, registerIcon, registeredIconNames, resolveIconSource, unregisterIcon, renderSymbolicIcon, extractIconPaths, extractPathData, ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, parseBreakpointCondition, registerAdwaitaElements, } from './widgets/index.js';
|
|
3
|
-
export type { BoxOrientation, ButtonSlot, ButtonSlotWrite, NotifyActiveEventData, NotifyTextEventData, NotifyEntryTextEventData, AdwComboOption, ComboStateChange, ComboStateListener, NotifySelectedEventData, NotifyDropDownSelectedEventData, NotifyValueEventData, SpinStateChange, SpinStateListener, NotifySliderValueEventData, NotifyExpandedEventData, ExpanderStateListener, MenuItemActivatedEventData, MenuSheetPresenter, MenuSheetRow, MenuTappedEventData, RowActivatedEventData, DataGridItemSpec, NotifyToggleSelectedEventData, ToggleGroupStateChange, ToggleGroupStateListener, AccentRole, AccentRule, ShortcutLabelRenderPlan, ShortcutLabelViewSpec,
|
|
3
|
+
export type { BoxOrientation, ButtonSlot, ButtonSlotWrite, NotifyActiveEventData, NotifyTextEventData, NotifyEntryTextEventData, AdwComboOption, ComboStateChange, ComboStateListener, NotifySelectedEventData, NotifyDropDownSelectedEventData, NotifyValueEventData, SpinStateChange, SpinStateListener, NotifySliderValueEventData, NotifyExpandedEventData, ExpanderStateListener, MenuItemActivatedEventData, MenuSheetPresenter, MenuSheetRow, MenuTappedEventData, RowActivatedEventData, DataGridItemSpec, NotifyToggleSelectedEventData, ToggleGroupStateChange, ToggleGroupStateListener, AccentRole, AccentRule, ShortcutLabelRenderPlan, ShortcutLabelViewSpec, AdwViewStackPageInfo, NotifyVisibleChildEventData, AdwViewPage, NotifyViewSelectedEventData, NotifyPositionEventData, NotifyVisiblePageEventData, NotifyShowSidebarEventData, NsShowSidebarNotification, NsSplitViewHost, NsSplitViewState, NotifySidebarSelectedEventData, NotifyOpenEventData, AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, NotifyResponseEventData, AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, OrderedConfirmResponses, ConstructProps, IconValueKind, SymbolicIconOptions, IconPath, AdwColorScheme, AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './widgets/index.js';
|
|
4
4
|
export * as Adw from './namespace/adw.js';
|
|
5
5
|
export * as Gtk from './namespace/gtk.js';
|
|
6
|
+
export * as Gio from './namespace/gio.js';
|
|
6
7
|
export { ADWAITA_SANS_FONT_FAMILY, ADWAITA_SANS_TTF_FILES, adwaitaFontInstallInstructions, hasAdwaitaSans, } from './fonts.js';
|
|
7
8
|
/**
|
|
8
9
|
* One-call convenience setup for the Adwaita NativeScript layer.
|
|
@@ -7,6 +7,8 @@ export { AdwBottomSheet as BottomSheet } from '../widgets/adw-bottom-sheet.js';
|
|
|
7
7
|
export { AdwButtonContent as ButtonContent } from '../widgets/adw-button-content.js';
|
|
8
8
|
export { AdwButtonRow as ButtonRow } from '../widgets/adw-button-row.js';
|
|
9
9
|
export { AdwCarousel as Carousel } from '../widgets/adw-carousel.js';
|
|
10
|
+
export { AdwCarouselIndicatorDots as CarouselIndicatorDots } from '../widgets/adw-carousel-indicator-dots.js';
|
|
11
|
+
export { AdwCarouselIndicatorLines as CarouselIndicatorLines } from '../widgets/adw-carousel-indicator-lines.js';
|
|
10
12
|
export { AdwClamp as Clamp } from '../widgets/adw-clamp.js';
|
|
11
13
|
export { AdwComboRow as ComboRow } from '../widgets/adw-combo-row.js';
|
|
12
14
|
export { AdwEntryRow as EntryRow } from '../widgets/adw-entry-row.js';
|
|
@@ -14,6 +16,7 @@ export { AdwExpanderRow as ExpanderRow } from '../widgets/adw-expander-row.js';
|
|
|
14
16
|
export { AdwHeaderBar as HeaderBar } from '../widgets/adw-header-bar.js';
|
|
15
17
|
export { AdwInlineViewSwitcher as InlineViewSwitcher } from '../widgets/adw-inline-view-switcher.js';
|
|
16
18
|
export { AdwNavigationSplitView as NavigationSplitView } from '../widgets/adw-navigation-split-view.js';
|
|
19
|
+
export { AdwNavigationPage as NavigationPage } from '../widgets/adw-navigation-page.js';
|
|
17
20
|
export { AdwNavigationView as NavigationView } from '../widgets/adw-navigation-view.js';
|
|
18
21
|
export { AdwOverlaySplitView as OverlaySplitView } from '../widgets/adw-overlay-split-view.js';
|
|
19
22
|
export { AdwPasswordEntryRow as PasswordEntryRow } from '../widgets/adw-password-entry-row.js';
|
|
@@ -22,16 +25,21 @@ export { AdwPreferencesGroup as PreferencesGroup } from '../widgets/adw-preferen
|
|
|
22
25
|
export { AdwPreferencesPage as PreferencesPage } from '../widgets/adw-preferences-page.js';
|
|
23
26
|
export { AdwShortcutLabel as ShortcutLabel } from '../widgets/adw-shortcut-label.js';
|
|
24
27
|
export { AdwSidebar as Sidebar } from '../widgets/adw-sidebar.js';
|
|
28
|
+
export { AdwSidebarItem as SidebarItem } from '../values/sidebar.js';
|
|
29
|
+
export { AdwSidebarSection as SidebarSection } from '../values/sidebar.js';
|
|
25
30
|
export { AdwSpinRow as SpinRow } from '../widgets/adw-spin-row.js';
|
|
26
31
|
export { AdwSpinner as Spinner } from '../widgets/adw-spinner.js';
|
|
27
32
|
export { AdwSplitButton as SplitButton } from '../widgets/adw-split-button.js';
|
|
28
33
|
export { AdwStatusPage as StatusPage } from '../widgets/adw-status-page.js';
|
|
29
34
|
export { AdwSwitchRow as SwitchRow } from '../widgets/adw-switch-row.js';
|
|
35
|
+
export { AdwTabPage as TabPage } from '../values/tab-page.js';
|
|
30
36
|
export { AdwTabView as TabView } from '../widgets/adw-tab-view.js';
|
|
31
37
|
export { AdwToastOverlay as ToastOverlay } from '../widgets/adw-toast-overlay.js';
|
|
38
|
+
export { AdwToggle as Toggle } from '../widgets/adw-toggle.js';
|
|
32
39
|
export { AdwToggleGroup as ToggleGroup } from '../widgets/adw-toggle-group.js';
|
|
33
40
|
export { AdwToolbarView as ToolbarView } from '../widgets/adw-toolbar-view.js';
|
|
34
41
|
export { AdwViewStack as ViewStack } from '../widgets/adw-view-stack.js';
|
|
42
|
+
export { AdwViewStackPage as ViewStackPage } from '../widgets/view-stack-page.js';
|
|
35
43
|
export { AdwViewSwitcher as ViewSwitcher } from '../widgets/adw-view-switcher.js';
|
|
36
44
|
export { AdwViewSwitcherBar as ViewSwitcherBar } from '../widgets/adw-view-switcher-bar.js';
|
|
37
45
|
export { AdwWindowTitle as WindowTitle } from '../widgets/adw-window-title.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GioMenu as Menu, GioMenuItem as MenuItem } from '@gjsify/adwaita-core';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { GtkAdjustment as Adjustment } from '@gjsify/adwaita-core';
|
|
2
|
+
export { GtkActionBar as ActionBar } from '../widgets/gtk-action-bar.js';
|
|
1
3
|
export { GtkBox as Box } from '../widgets/gtk-box.js';
|
|
2
4
|
export { GtkButton as Button } from '../widgets/gtk-button.js';
|
|
3
5
|
export { GtkDropDown as DropDown } from '../widgets/gtk-drop-down.js';
|
|
@@ -5,3 +7,4 @@ export { GtkEntry as Entry } from '../widgets/gtk-entry.js';
|
|
|
5
7
|
export { GtkImage as Image } from '../widgets/gtk-image.js';
|
|
6
8
|
export { GtkLabel as Label } from '../widgets/gtk-label.js';
|
|
7
9
|
export { GtkMenuButton as MenuButton } from '../widgets/gtk-menu-button.js';
|
|
10
|
+
export { GtkStringList as StringList } from '@gjsify/adwaita-core';
|