@gjsify/adwaita-nativescript 0.53.0 → 0.55.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 -1
- package/lib/esm/builder/template-classes.js +1 -0
- package/lib/esm/capabilities.js +1 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/namespace/adw.js +1 -1
- package/lib/esm/namespace/gtk.js +1 -1
- package/lib/esm/widgets/accent-theme.js +1 -1
- package/lib/esm/widgets/adw-about-dialog.js +1 -1
- package/lib/esm/widgets/adw-accent.js +1 -1
- package/lib/esm/widgets/adw-alert-dialog.js +1 -1
- package/lib/esm/widgets/adw-application-window.js +1 -0
- package/lib/esm/widgets/adw-avatar.js +1 -1
- package/lib/esm/widgets/adw-banner.js +1 -1
- package/lib/esm/widgets/adw-bin.js +1 -0
- package/lib/esm/widgets/adw-button-content.js +1 -1
- package/lib/esm/widgets/adw-button-row.js +1 -1
- package/lib/esm/widgets/adw-combo-row.js +1 -1
- package/lib/esm/widgets/adw-data-grid.js +1 -1
- package/lib/esm/widgets/adw-dialog.js +1 -0
- package/lib/esm/widgets/adw-entry-row.js +1 -1
- package/lib/esm/widgets/adw-expander-row.js +1 -1
- package/lib/esm/widgets/adw-navigation-view.js +1 -1
- package/lib/esm/widgets/adw-slider-row.js +1 -1
- package/lib/esm/widgets/adw-spin-row.js +1 -1
- package/lib/esm/widgets/adw-spinner.js +1 -1
- package/lib/esm/widgets/adw-split-button.js +1 -1
- package/lib/esm/widgets/adw-status-page.js +1 -1
- package/lib/esm/widgets/adw-switch-row.js +1 -1
- package/lib/esm/widgets/adw-tab-view.js +1 -1
- package/lib/esm/widgets/adw-toast-overlay.js +1 -1
- package/lib/esm/widgets/adw-toggle-group.js +1 -1
- package/lib/esm/widgets/adw-toolbar-view.js +1 -1
- package/lib/esm/widgets/adw-view-stack.js +1 -1
- package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
- package/lib/esm/widgets/adw-window.js +1 -0
- package/lib/esm/widgets/adw-wrap-box.js +1 -1
- package/lib/esm/widgets/box-layout.js +1 -1
- package/lib/esm/widgets/breakpoint.js +1 -1
- package/lib/esm/widgets/grid-state.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-check-button.js +1 -0
- package/lib/esm/widgets/gtk-drawing-area.js +1 -0
- package/lib/esm/widgets/gtk-drop-down.js +1 -1
- package/lib/esm/widgets/gtk-entry.js +1 -1
- package/lib/esm/widgets/gtk-frame.js +1 -0
- package/lib/esm/widgets/gtk-grid.js +1 -0
- package/lib/esm/widgets/gtk-label.js +1 -1
- package/lib/esm/widgets/gtk-list-box.js +1 -0
- package/lib/esm/widgets/gtk-menu-button.js +1 -1
- package/lib/esm/widgets/gtk-overlay.js +1 -0
- package/lib/esm/widgets/gtk-revealer.js +1 -0
- package/lib/esm/widgets/gtk-scrolled-window.js +1 -0
- package/lib/esm/widgets/gtk-separator.js +1 -0
- package/lib/esm/widgets/gtk-stack.js +1 -0
- package/lib/esm/widgets/gtk-text-view.js +1 -0
- package/lib/esm/widgets/gtk-toggle-button.js +1 -0
- package/lib/esm/widgets/host-insets.android.js +1 -1
- package/lib/esm/widgets/icon-path.js +1 -1
- package/lib/esm/widgets/icon-theme.js +1 -1
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/list-box-state.js +1 -0
- package/lib/esm/widgets/ns-length.js +1 -0
- package/lib/esm/widgets/revealer-state.js +1 -0
- package/lib/esm/widgets/row-state.js +1 -1
- package/lib/esm/widgets/scrolled-window-policy.js +1 -0
- package/lib/esm/widgets/single-child-base.js +1 -0
- package/lib/esm/widgets/stack-page.js +1 -0
- package/lib/esm/widgets/style-classes.js +1 -1
- package/lib/esm/widgets/styled-layout-base.js +1 -0
- package/lib/esm/widgets/system-bars-source.android.js +1 -0
- package/lib/esm/widgets/system-bars-source.ios.js +1 -0
- package/lib/esm/widgets/system-bars-source.js +1 -0
- package/lib/esm/widgets/system-bars.js +1 -0
- package/lib/esm/widgets/transition-type.js +1 -0
- package/lib/esm/widgets/view-switcher-base.js +1 -1
- package/lib/esm/widgets/widget-layout.js +1 -1
- package/lib/esm/widgets/window-base.js +1 -0
- package/lib/esm/widgets/window-state.js +1 -0
- package/lib/types/builder/index.d.ts +20 -3
- package/lib/types/builder/template-classes.d.ts +13 -0
- package/lib/types/capabilities.d.ts +2 -0
- package/lib/types/construct-vectors.spec.d.ts +1 -0
- package/lib/types/containers.spec.d.ts +2 -0
- package/lib/types/grid-layout.spec.d.ts +1 -0
- package/lib/types/grid-state.spec.d.ts +2 -0
- package/lib/types/gtk-box.spec.d.ts +1 -0
- package/lib/types/gtk-controls.spec.d.ts +1 -0
- package/lib/types/gtk-grid.spec.d.ts +1 -0
- package/lib/types/gtk-list-box.spec.d.ts +1 -0
- package/lib/types/gtk-stack.spec.d.ts +2 -0
- package/lib/types/gtk-toggle-button.spec.d.ts +2 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/list-box-state.spec.d.ts +2 -0
- package/lib/types/namespace/adw.d.ts +4 -0
- package/lib/types/namespace/gtk.d.ts +13 -0
- package/lib/types/ns-length.spec.d.ts +2 -0
- package/lib/types/revealer-state.spec.d.ts +2 -0
- package/lib/types/scrolled-window-policy.spec.d.ts +2 -0
- package/lib/types/system-bars.spec.d.ts +2 -0
- package/lib/types/testing/ns-core.d.mts +44 -0
- package/lib/types/transition-type.spec.d.ts +2 -0
- package/lib/types/widget-base.spec.d.ts +1 -0
- package/lib/types/widgets/adw-about-dialog.d.ts +10 -0
- package/lib/types/widgets/adw-action-row.d.ts +10 -0
- package/lib/types/widgets/adw-alert-dialog.d.ts +10 -0
- package/lib/types/widgets/adw-application-window.d.ts +5 -0
- package/lib/types/widgets/adw-avatar.d.ts +10 -0
- package/lib/types/widgets/adw-banner.d.ts +10 -0
- package/lib/types/widgets/adw-bin.d.ts +7 -0
- package/lib/types/widgets/adw-bottom-sheet.d.ts +10 -0
- package/lib/types/widgets/adw-button-content.d.ts +10 -0
- package/lib/types/widgets/adw-carousel.d.ts +10 -0
- package/lib/types/widgets/adw-clamp.d.ts +10 -0
- package/lib/types/widgets/adw-data-grid.d.ts +10 -0
- package/lib/types/widgets/adw-dialog.d.ts +62 -0
- package/lib/types/widgets/adw-header-bar.d.ts +10 -0
- package/lib/types/widgets/adw-image-button.d.ts +10 -0
- package/lib/types/widgets/adw-navigation-page.d.ts +10 -0
- package/lib/types/widgets/adw-navigation-view.d.ts +10 -0
- package/lib/types/widgets/adw-preferences-dialog.d.ts +10 -0
- package/lib/types/widgets/adw-preferences-group.d.ts +10 -0
- package/lib/types/widgets/adw-preferences-page.d.ts +10 -0
- package/lib/types/widgets/adw-shortcut-label.d.ts +10 -0
- package/lib/types/widgets/adw-sidebar.d.ts +10 -0
- package/lib/types/widgets/adw-slider-row.d.ts +10 -0
- package/lib/types/widgets/adw-spinner.d.ts +10 -0
- package/lib/types/widgets/adw-split-button.d.ts +10 -0
- package/lib/types/widgets/adw-status-page.d.ts +10 -0
- package/lib/types/widgets/adw-tab-view.d.ts +10 -0
- package/lib/types/widgets/adw-toast-overlay.d.ts +16 -2
- package/lib/types/widgets/adw-toggle-group.d.ts +10 -0
- package/lib/types/widgets/adw-toggle.d.ts +10 -0
- package/lib/types/widgets/adw-toolbar-view.d.ts +21 -0
- package/lib/types/widgets/adw-view-stack.d.ts +23 -0
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +10 -0
- package/lib/types/widgets/adw-window-title.d.ts +10 -0
- package/lib/types/widgets/adw-window.d.ts +5 -0
- package/lib/types/widgets/adw-wrap-box.d.ts +10 -0
- package/lib/types/widgets/box-layout.d.ts +19 -5
- package/lib/types/widgets/breakpoint.d.ts +7 -1
- package/lib/types/widgets/carousel-indicator-base.d.ts +10 -0
- package/lib/types/widgets/grid-state.d.ts +34 -0
- package/lib/types/widgets/gtk-action-bar.d.ts +10 -0
- package/lib/types/widgets/gtk-box.d.ts +27 -52
- package/lib/types/widgets/gtk-button.d.ts +20 -0
- package/lib/types/widgets/gtk-check-button.d.ts +51 -0
- package/lib/types/widgets/gtk-drawing-area.d.ts +19 -0
- package/lib/types/widgets/gtk-drop-down.d.ts +10 -0
- package/lib/types/widgets/gtk-entry.d.ts +10 -0
- package/lib/types/widgets/gtk-frame.d.ts +25 -0
- package/lib/types/widgets/gtk-grid.d.ts +57 -0
- package/lib/types/widgets/gtk-image.d.ts +10 -0
- package/lib/types/widgets/gtk-label.d.ts +10 -0
- package/lib/types/widgets/gtk-list-box.d.ts +73 -0
- package/lib/types/widgets/gtk-overlay.d.ts +17 -0
- package/lib/types/widgets/gtk-revealer.d.ts +30 -0
- package/lib/types/widgets/gtk-scrolled-window.d.ts +25 -0
- package/lib/types/widgets/gtk-separator.d.ts +11 -0
- package/lib/types/widgets/gtk-stack.d.ts +124 -0
- package/lib/types/widgets/gtk-text-view.d.ts +63 -0
- package/lib/types/widgets/gtk-toggle-button.d.ts +33 -0
- package/lib/types/widgets/index.d.ts +40 -2
- package/lib/types/widgets/list-box-state.d.ts +19 -0
- package/lib/types/widgets/ns-length.d.ts +10 -0
- package/lib/types/widgets/revealer-state.d.ts +7 -0
- package/lib/types/widgets/row-state.d.ts +6 -0
- package/lib/types/widgets/scrolled-window-policy.d.ts +17 -0
- package/lib/types/widgets/signals.d.ts +10 -0
- package/lib/types/widgets/single-child-base.d.ts +22 -0
- package/lib/types/widgets/split-view-base.d.ts +10 -0
- package/lib/types/widgets/stack-page.d.ts +93 -0
- package/lib/types/widgets/style-classes.d.ts +28 -0
- package/lib/types/widgets/styled-layout-base.d.ts +63 -0
- package/lib/types/widgets/system-bars-source.android.d.ts +2 -0
- package/lib/types/widgets/system-bars-source.d.ts +2 -0
- package/lib/types/widgets/system-bars-source.ios.d.ts +2 -0
- package/lib/types/widgets/system-bars.d.ts +71 -0
- package/lib/types/widgets/transition-type.d.ts +13 -0
- package/lib/types/widgets/view-stack-page.d.ts +10 -0
- package/lib/types/widgets/view-switcher-base.d.ts +10 -0
- package/lib/types/widgets/widget-layout.d.ts +23 -0
- package/lib/types/widgets/window-base.d.ts +41 -0
- package/lib/types/widgets/window-state.d.ts +37 -0
- package/lib/types/window-roots.spec.d.ts +1 -0
- package/lib/types/window-state.spec.d.ts +2 -0
- package/package.json +13 -9
- package/src/theme/adwaita.css +273 -40
|
@@ -1 +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{defaultToolbarViewProps as a,toolbarViewClassNames as o}from"./chrome.js";import{NO_INSETS as s,insetsOwedBy as c,toolbarViewInsetPadding as l}from"./window-insets.js";import{resolveHostInsets as u}from"./host-insets.js";import{observeWindowInsets as d}from"./window-insets-source.js";import{
|
|
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{defaultToolbarViewProps as a,toolbarViewClassNames as o}from"./chrome.js";import{NO_INSETS as s,insetsOwedBy as c,toolbarViewInsetPadding as l}from"./window-insets.js";import{resolveHostInsets as u}from"./host-insets.js";import{observeWindowInsets as d}from"./window-insets-source.js";import{observeSystemBars as f}from"./system-bars-source.js";import{insetsForEdges as p,resolveEdges as m,systemBarsConfig as h}from"./system-bars.js";import{GridLayout as g,ItemSpec as _,StackLayout as v}from"@nativescript/core";const y={view:`adw-toolbar-view`,topBar:`adw-toolbar-view-top`,bottomBar:`adw-toolbar-view-bottom`},b=[`topBar`,`bottomBar`,`content`,`top`,`bottom`];var AdwToolbarView=class extends i(g){static builderSlots=e(b,`content`);_topBox;_bottomBox;_content=null;_props=a();_insets=s;_topBarCount=0;_bottomBarCount=0;_detachInsets=null;_detachBars=null;_detachConfig=null;_systemInsets=null;constructor(e){super(),this.className=y.view,this.addColumn(new _(1,`star`)),this.addRow(new _(1,`auto`)),this.addRow(new _(1,`star`)),this.addRow(new _(1,`auto`));let t=new v;t.orientation=`vertical`,t.className=y.topBar,g.setRow(t,0),this.addChild(t),this._topBox=t;let n=new v;n.orientation=`vertical`,n.className=y.bottomBar,g.setRow(n,2),this.addChild(n),this._bottomBox=n,this.addEventListener(`layoutChanged`,()=>this._syncClasses()),this.addEventListener(`loaded`,()=>{this._detachInsets??=d(e=>this._applyInsets(e)),this._detachBars??=f(),this._detachConfig??=h.subscribe(()=>this._applyInsets(this._insets))}),this.addEventListener(`unloaded`,()=>{this._detachInsets?.(),this._detachInsets=null,this._detachBars?.(),this._detachBars=null,this._detachConfig?.(),this._detachConfig=null}),r(this,e)}add_top_bar(e){this._topBox.addChild(e),this._topBarCount+=1,this._applyInsets(this._insets)}add_bottom_bar(e){this._bottomBox.addChild(e),this._bottomBarCount+=1,this._applyInsets(this._insets)}set_content(e){this._content&&=(this.removeChild(this._content),null),e&&(g.setRow(e,1),this.addChild(e),this._content=e),this._restackBars()}_addChildFromBuilder(e,n){switch(t(e,b,`content`)){case`topBar`:case`top`:this.add_top_bar(n);return;case`bottomBar`:case`bottom`:this.add_bottom_bar(n);return;default:this.set_content(n)}}get content(){return this._content}set content(e){this.set_content(e)}get topBar(){return this._topBox}get bottomBar(){return this._bottomBox}get systemInsets(){return this._systemInsets}set systemInsets(e){if(typeof e==`string`){let t=/^\s*(true|false)\s*$/i.test(e);this._systemInsets=t?n(e,!0):null}else this._systemInsets=e;this._applyInsets(this._insets)}get topBarStyle(){return this._props.topBarStyle}set topBarStyle(e){this._props.topBarStyle=e,this._syncClasses()}get bottomBarStyle(){return this._props.bottomBarStyle}set bottomBarStyle(e){this._props.bottomBarStyle=e,this._syncClasses()}get extendContentToTopEdge(){return this._props.extendContentToTopEdge}set extendContentToTopEdge(e){let t=n(e,this.extendContentToTopEdge);this._props.extendContentToTopEdge=!!t,this._applyBarPlacement()}get extendContentToBottomEdge(){return this._props.extendContentToBottomEdge}set extendContentToBottomEdge(e){let t=n(e,this.extendContentToBottomEdge);this._props.extendContentToBottomEdge=!!t,this._applyBarPlacement()}_applyBarPlacement(){g.setRow(this._topBox,+!!this._props.extendContentToTopEdge),this._topBox.verticalAlignment=this._props.extendContentToTopEdge?`top`:`stretch`,g.setRow(this._bottomBox,this._props.extendContentToBottomEdge?1:2),this._bottomBox.verticalAlignment=this._props.extendContentToBottomEdge?`bottom`:`stretch`,this._restackBars(),this._syncClasses()}_restackBars(){if(!(!this._props.extendContentToTopEdge&&!this._props.extendContentToBottomEdge))for(let e of[this._topBox,this._bottomBox])this.removeChild(e),this.addChild(e)}_applyInsets(e){this._insets=e;let t=m(this._systemInsets,h.bars.insets),n=l(p(c(e,u(this,e)),t),{hasTopBar:this._topBarCount>0,hasBottomBar:this._bottomBarCount>0});this._topBox.paddingTop=n.topBarTop,this._bottomBox.paddingBottom=n.bottomBarBottom,this.paddingTop=n.contentTop,this.paddingBottom=n.contentBottom}_syncClasses(){let e={topBarHeight:this._topBox.getActualSize?.().height??0,bottomBarHeight:this._bottomBox.getActualSize?.().height??0},t=o({view:this.className,topBar:this._topBox.className,bottomBar:this._bottomBox.className},this._props,e);this.className!==t.view&&(this.className=t.view),this._topBox.className!==t.topBar&&(this._topBox.className=t.topBar),this._bottomBox.className!==t.bottomBar&&(this._bottomBox.className=t.bottomBar)}};export{AdwToolbarView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{applyViewStackVisibility as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{iconValueKind as n}from"./icon-theme.js";import{applyViewStackVisibility as r,createViewStackState as i,viewStackNotifyPayload as a}from"./view-stack-state.js";import{AdwViewStackPage as o}from"./view-stack-page.js";import{GridLayout as s,ItemSpec as c}from"@nativescript/core";const l=`notify::visible-child`;var AdwViewStack=class extends t(s){static builderSlots=[];_state=i();_sourceIcons=new Map;constructor(t){super(),this.className=`adw-view-stack`,this.addColumn(new c(1,`star`)),this.addRow(new c(1,`star`)),this._state.subscribe(e=>{r(this._state);let t={eventName:l,object:this,...a(e)};this.notify(t)}),e(this,t)}add(e,t,n,r){let i=this._state.addPage({name:t,title:n,icon:r,content:e});return this._rememberSourceIcon(e,r),this._placePage(e),i}_placePage(e){s.setColumn(e,0),s.setRow(e,0),this.addChild(e),r(this._state)}_addChildFromBuilder(e,t){if(!(t instanceof o)){this.add(t,``);return}let n=t.child;if(n===null){t._awaitChild(this);return}t._adoptBy(this),this._state.addPage({name:t.name,title:t.title,icon:t.iconName,content:n,visible:t.visible,badgeNumber:t.badgeNumber,needsAttention:t.needsAttention,useUnderline:t.useUnderline}),this._rememberSourceIcon(n,t.iconName),this._placePage(n)}_rememberSourceIcon(e,t){t&&n(t)===`source`&&this._sourceIcons.set(e,t)}pageIcons(){return this._state.pages.map(e=>(e.content?this._sourceIcons.get(e.content):void 0)??e.icon)}add_titled(e,t,n){return this.add(e,t,n)}add_titled_with_icon(e,t,n,r){return this.add(e,t,n,r)}remove(e){let t=typeof e==`string`?e:this._nameOf(e)??``,n=this._state.pages[this._state.indexOfName(t)]?.content;return this._state.removePage(t)?(n&&(this.removeChild(n),this._sourceIcons.delete(n)),r(this._state),!0):!1}setPageVisible(e,t){let n=this._state.setPageVisible(e,t);return r(this._state),n}_nameOf(e){for(let t of this._state.pages)if(t.content===e)return t.name;return null}get pages(){return this._state.pages}get visibleChildIndex(){return this._state.visibleIndex}selectNthPage(e){return this._state.setVisibleIndex(e)}get visibleChildName(){return this._state.visibleName}set visibleChildName(e){this._state.setVisibleName(e)}get visibleChild(){return this._state.visiblePage?.content??null}};export{AdwViewStack,l as NOTIFY_VISIBLE_CHILD};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{GtkImage as r}from"./gtk-image.js";import{attachRowPressFeedback as i}from"./row-press.js";import{resolveIdReference as a}from"./id-reference.js";import{AdwViewStack as o,NOTIFY_VISIBLE_CHILD as s}from"./adw-view-stack.js";import{createViewSwitcherBarState as c}from"./view-switcher-model.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{GtkImage as r}from"./gtk-image.js";import{attachRowPressFeedback as i}from"./row-press.js";import{resolveIdReference as a}from"./id-reference.js";import{AdwViewStack as o,NOTIFY_VISIBLE_CHILD as s}from"./adw-view-stack.js";import{createViewSwitcherBarState as c}from"./view-switcher-model.js";import{buildViewSwitcherButtons as l,viewSwitcherPagesFromStack as u}from"@gjsify/adwaita-core";import{GridLayout as d,ItemSpec as f,Label as p,StackLayout as m}from"@nativescript/core";var AdwViewSwitcherBar=class extends n(d){static builderReferences=[`stack`];_bar;_nodes=[];_stack=null;_stackId=null;_stackListener=null;_barState=c();constructor(e){super(),this.className=`adw-viewswitcherbar`,this.addColumn(new f(1,`star`)),this.addRow(new f(1,`auto`));let n=new d;n.className=`adw-viewswitcherbar-box`,n.addRow(new f(1,`auto`)),d.setRow(n,0),this.addChild(n),this._bar=n,this._barState.subscribe(()=>this._applyRevealed()),this._applyRevealed(),this.addEventListener(`loaded`,()=>{this._stackId!==null&&(this.stack=a(this,`stack`,this._stackId,o)),this._bindStack(),this._rebuild()}),this.addEventListener(`unloaded`,()=>this._unbindStack()),t(this,e)}set_stack(e){this._unbindStack(),this._stack=e,this._bindStack(),this._rebuild()}get stack(){return this._stack}set stack(e){if(typeof e==`string`){this._stackId=e,this.isLoaded&&(this.stack=a(this,`stack`,e,o));return}this._stackId=null,this.set_stack(e)}get reveal(){return this._barState.reveal}set reveal(t){let n=e(t,this.reveal);this._barState.setReveal(n)}get revealed(){return this._barState.revealed}refresh(){this._rebuild()}_bindStack(){if(!this._stack||this._stackListener)return;let listener=()=>this._rebuild();this._stack.addEventListener(s,listener),this._stackListener=listener}_unbindStack(){!this._stack||!this._stackListener||(this._stack.removeEventListener(s,this._stackListener),this._stackListener=null)}_rebuild(){let e=this._stack?.pages??[];this._barState.setPages(e);let t=this._stack?.pageIcons()??[],n=l(u(e).map((e,n)=>({...e,iconName:(t[n]??``).length>0?t[n]:e.iconName})),this._stack?.visibleChildIndex??-1,`narrow`);if(n.length!==this._nodes.length){for(let e of this._nodes)this._bar.removeChild(e.button);this._nodes=[],this._bar.removeColumns(),this._nodes=n.map((e,t)=>(this._bar.addColumn(new f(1,`star`)),this._buildButton(e.pageIndex,t)))}n.forEach((e,t)=>{let n=this._nodes[t];n&&(n.button.visibility=e.visible?`visible`:`collapse`,n.button.className=e.selected?`adw-viewswitcherbar-button active`:`adw-viewswitcherbar-button`,n.icon.iconName=e.iconName,n.label.text=e.label,n.badge.text=e.badgeLabel,n.badge.visibility=e.badgeLabel.length>0||e.needsAttention?`visible`:`collapse`,n.badge.className=e.badgeLabel.length===0&&e.needsAttention?`adw-viewswitcherbar-button-badge needs-attention`:`adw-viewswitcherbar-button-badge`)}),this._applyRevealed()}_buildButton(e,t){let n=new m;n.orientation=`vertical`,n.className=`adw-viewswitcherbar-button`,n.horizontalAlignment=`stretch`;let a=new r;a.className=`${a.className} adw-viewswitcherbar-button-icon`.trim(),a.horizontalAlignment=`center`,n.addChild(a);let o=new p;o.className=`adw-viewswitcherbar-button-label`,o.horizontalAlignment=`center`,o.textAlignment=`center`,n.addChild(o);let s=new p;return s.className=`adw-viewswitcherbar-button-badge`,s.horizontalAlignment=`center`,s.textAlignment=`center`,n.addChild(s),i(n),n.addEventListener(`tap`,()=>{this._stack?.selectNthPage(e)}),d.setColumn(n,t),this._bar.addChild(n),{button:n,icon:a,label:o,badge:s}}_applyRevealed(){this.visibility=this._barState.revealed?`visible`:`collapse`}};export{AdwViewSwitcherBar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{AdwWindowBase as t}from"./window-base.js";var AdwWindow=class extends t{constructor(t){super(),e(this,t)}};export{AdwWindow};
|
|
@@ -1 +1 @@
|
|
|
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{DEFAULT_WRAP_BOX_SPACING as i,normalizeWrapBoxSpacing as a,wrapBoxChildFlex as o,wrapBoxChildMargin as s,wrapBoxFlexStyle as c,wrapBoxSpacingChanges as l}from"./wrap-box-layout.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{applyConstructProps as n}from"./construct-props.js";import{withSignals as r}from"./signals.js";import{DEFAULT_WRAP_BOX_SPACING as i,normalizeWrapBoxSpacing as a,wrapBoxChildFlex as o,wrapBoxChildMargin as s,wrapBoxFlexStyle as c,wrapBoxSpacingChanges as l}from"./wrap-box-layout.js";import{ADW_WRAP_BOX_DEFAULT_ALIGN as u,ADW_WRAP_BOX_DEFAULT_JUSTIFY as d,ADW_WRAP_BOX_DEFAULT_LENGTH_UNIT as f,ADW_WRAP_BOX_DEFAULT_PACK_DIRECTION as p,ADW_WRAP_BOX_DEFAULT_WRAP_POLICY as m,ADW_WRAP_BOX_NATURAL_LINE_LENGTH_UNSET as h,normalizeNaturalLineLength as g,normalizeWrapBoxAlign as _,normalizeWrapBoxJustify as v,normalizeWrapBoxLengthUnit as y,normalizeWrapBoxPackDirection as b,normalizeWrapPolicy as x,resolveWrapBoxChildOrder as S,wrapBoxLengthToPx as C}from"@gjsify/adwaita-core";import{FlexboxLayout as w}from"@nativescript/core";var AdwWrapBox=class extends r(w){_childSpacing=i;_lineSpacing=i;_childSpacingUnit=f;_lineSpacingUnit=f;_align=u;_justify=d;_justifyLastLine=!1;_lineHomogeneous=!1;_wrapReverse=!1;_wrapPolicy=m;_packDirection=p;_orientation=`horizontal`;_naturalLineLength=h;_naturalLineLengthUnit=f;constructor(e){super(),this.className=`adw-wrap-box`,this._applyLayout(),n(this,e)}append(e){this.addChild(e)}remove(e){this.removeChild(e)}remove_all(){this.removeChildren()}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)}_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=S({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)}get childSpacing(){return this._childSpacing}set childSpacing(e){let n=t(e,this._childSpacing);l(this._childSpacing,n)&&(this._childSpacing=a(n),this._applyChildren(),this._notify(`child-spacing`))}get childSpacingUnit(){return this._childSpacingUnit}set childSpacingUnit(e){let t=y(e);t!==this._childSpacingUnit&&(this._childSpacingUnit=t,this._applyChildren(),this._notify(`child-spacing-unit`))}get lineSpacing(){return this._lineSpacing}set lineSpacing(e){let n=t(e,this._lineSpacing);l(this._lineSpacing,n)&&(this._lineSpacing=a(n),this._applyChildren(),this._notify(`line-spacing`))}get lineSpacingUnit(){return this._lineSpacingUnit}set lineSpacingUnit(e){let t=y(e);t!==this._lineSpacingUnit&&(this._lineSpacingUnit=t,this._applyChildren(),this._notify(`line-spacing-unit`))}get align(){return this._align}set align(e){let n=_(t(e,this.align));n!==this._align&&(this._align=n,this._applyLayout(),this._notify(`align`))}get justify(){return this._justify}set justify(e){let t=v(e);t!==this._justify&&(this._justify=t,this._applyLayout(),this._notify(`justify`))}get justifyLastLine(){return this._justifyLastLine}set justifyLastLine(t){let n=!!e(t,this.justifyLastLine);n!==this._justifyLastLine&&(this._justifyLastLine=n,this._applyLayout(),this._notify(`justify-last-line`))}get lineHomogeneous(){return this._lineHomogeneous}set lineHomogeneous(t){let n=!!e(t,this.lineHomogeneous);n!==this._lineHomogeneous&&(this._lineHomogeneous=n,this._applyLayout(),this._notify(`line-homogeneous`))}get wrapReverse(){return this._wrapReverse}set wrapReverse(t){let n=!!e(t,this.wrapReverse);n!==this._wrapReverse&&(this._wrapReverse=n,this._applyLayout(),this._notify(`wrap-reverse`))}get wrapPolicy(){return this._wrapPolicy}set wrapPolicy(e){let t=x(e);t!==this._wrapPolicy&&(this._wrapPolicy=t,this._applyLayout(),this._notify(`wrap-policy`))}get packDirection(){return this._packDirection}set packDirection(e){let t=b(e);t!==this._packDirection&&(this._packDirection=t,this._applyLayout(),this._notify(`pack-direction`))}get orientation(){return this._orientation}set orientation(e){let t=e===`vertical`?`vertical`:`horizontal`;t!==this._orientation&&(this._orientation=t,this._applyLayout(),this._notify(`orientation`))}get naturalLineLength(){return this._naturalLineLength}set naturalLineLength(e){let n=g(t(e,this.naturalLineLength));n!==this._naturalLineLength&&(this._naturalLineLength=n,this._notify(`natural-line-length`))}get naturalLineLengthUnit(){return this._naturalLineLengthUnit}set naturalLineLengthUnit(e){let t=y(e);t!==this._naturalLineLengthUnit&&(this._naturalLineLengthUnit=t,this._notify(`natural-line-length-unit`))}get naturalLineLengthPx(){return C(this._naturalLineLength,this._naturalLineLengthUnit)}_notify(e){this.notify({eventName:`notify::${e}`,object:this})}_flexInput(){return{orientation:this._orientation,packDirection:this._packDirection,wrapReverse:this._wrapReverse,justify:this._justify,justifyLastLine:this._justifyLastLine,align:this._align,lineHomogeneous:this._lineHomogeneous,wrapPolicy:this._wrapPolicy}}_applyLayout(){let e=c(this._flexInput());this.flexDirection=e.flexDirection,this.flexWrap=e.flexWrap,this.justifyContent=e.justifyContent,this.alignContent=e.alignContent,this.alignItems=`stretch`,this._applyChildren()}_applyChildren(){let e=s(C(this._childSpacing,this._childSpacingUnit),C(this._lineSpacing,this._lineSpacingUnit)),t=this._childViews(),n=o(this._flexInput(),t.length);for(let r of t)r.set(`margin`,e),w.setFlexGrow(r,n.flexGrow),w.setFlexShrink(r,n.flexShrink)}};export{AdwWrapBox};
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 boxTrackPlan(e,n,r){let i=t(n),a=[];for(let[t,n]of e.entries())t>0&&a.push({unit:`pixel`,value:i}),a.push({unit:r||n?`star`:`auto`,value:1});return a}function boxChildTrack(e){return e*2}export{e as DEFAULT_BOX_SPACING,boxChildTrack,boxSpacingChanges,boxTrackPlan,t as normalizeBoxSpacing,n as resolveBoxChildOrder};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{AdwBreakpoint as e,evaluateBreakpointCondition as t,parseBreakpointCondition as n}from"@gjsify/adwaita-core";function measureView(e){let t=e.getActualSize?.();return t&&t.width>0&&t.height>0?{width:t.width,height:t.height}:null}function
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwBreakpoint as e,evaluateBreakpointCondition as t,parseBreakpointCondition as n}from"@gjsify/adwaita-core";function measureView(e){let t=e.getActualSize?.();return t&&t.width>0&&t.height>0?{width:t.width,height:t.height}:null}function observeViewSize(e,t){let recompute=()=>{let n=measureView(e);n&&t(n)};return e.addEventListener(`layoutChanged`,recompute),e.addEventListener(`loaded`,recompute),recompute(),()=>{e.removeEventListener(`layoutChanged`,recompute),e.removeEventListener(`loaded`,recompute)}}function addBreakpoints(e,t){return observeViewSize(e,e=>{for(let n of t)n.evaluate(e)})}export{e as AdwBreakpoint,addBreakpoints,t as evaluateBreakpointCondition,observeViewSize,n as parseBreakpointCondition};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const e=65535;function gridSpacing(t,n,r,i){if(typeof n==`string`&&n.trim()===``)return r;if(Number.isInteger(t)&&t>=0&&t<=e)return t;throw TypeError(`'${String(n)}' is not a spacing: '${i}' takes an integer from 0 to ${e}.`)}function gridTrackCounts(e){let t=0,n=0;for(let{column:r,row:i,columnSpan:a,rowSpan:o}of e)t=Math.max(t,r+a),n=Math.max(n,i+o);return{columns:t,rows:n}}function gridGap(e,t,n){return{left:e.column>0?t:0,top:e.row>0?n:0}}function gridChildAt(e,t,n){for(let{child:r,placement:i}of e){let e=t>=i.column&&t<i.column+i.columnSpan,a=n>=i.row&&n<i.row+i.rowSpan;if(e&&a)return r}return null}export{gridChildAt,gridGap,gridSpacing,gridTrackCounts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{applyConstructProps as n}from"./construct-props.js";import{NOTIFY_HEXPAND as r,NOTIFY_VEXPAND as i}from"./widget-layout.js";import{AdwStyledLayoutBase as a}from"./styled-layout-base.js";import{DEFAULT_BOX_SPACING as o,boxChildTrack as s,boxSpacingChanges as c,boxTrackPlan as l,normalizeBoxSpacing as u,resolveBoxChildOrder as d}from"./box-layout.js";import{normalizeBoxOrientation as f}from"@gjsify/adwaita-core";import{GridLayout as p,ItemSpec as m}from"@nativescript/core";var GtkBox=class extends a{_spacing=o;_orientation=`horizontal`;_homogeneous=!1;_trackKey=``;_followers=new Map;constructor(e){super(),n(this,e)}append(e){this.addChild(e)}prepend(e){this.insertChild(e,0)}remove(e){this.removeChild(e)}addChild(e){super.addChild(e),this._follow(e),this._applyChildren()}insertChild(e,t){super.insertChild(e,t),this._follow(e),this._applyChildren()}removeChild(e){this._unfollow(e),super.removeChild(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(e){let n=t(e,this._spacing);c(this._spacing,n)&&(this._spacing=u(n),this._applyChildren(),this.notify({eventName:`notify::spacing`,object:this}))}get orientation(){return this._orientation}set orientation(e){let t=f(e===1?`vertical`:e);t!==this._orientation&&(this._orientation=t,this._applyChildren(),this.notify({eventName:`notify::orientation`,object:this}))}get homogeneous(){return this._homogeneous}set homogeneous(t){let n=e(t,this._homogeneous);n!==this._homogeneous&&(this._homogeneous=n,this._applyChildren())}_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)),!0)}_follow(e){if(this._followers.has(e))return;let follower=()=>this._applyChildren();this._followers.set(e,follower),e.addEventListener(r,follower),e.addEventListener(i,follower)}_unfollow(e){let t=this._followers.get(e);t!==void 0&&(e.removeEventListener(r,t),e.removeEventListener(i,t),this._followers.delete(e))}_applyChildren(){let e=this._orientation===`vertical`,t=this._childViews(),n=l(t.map(t=>{let n=t;return(e?n.vexpand:n.hexpand)===!0}),this._spacing,this._homogeneous),r=`${e?`v`:`h`}${n.map(({unit:e,value:t})=>`${e}${t}`).join(`,`)}`;if(r!==this._trackKey){this._trackKey=r,this.removeColumns(),this.removeRows();let cross=()=>new m(1,`star`),along=e=>{for(let{unit:t,value:r}of n)e(new m(r,t))};e?(this.addColumn(cross()),along(e=>this.addRow(e))):(this.addRow(cross()),along(e=>this.addColumn(e)))}for(let[n,r]of t.entries())p.setColumn(r,e?0:s(n)),p.setRow(r,e?s(n):0)}};export{o as DEFAULT_BOX_SPACING,GtkBox};
|
|
@@ -1 +1 @@
|
|
|
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{
|
|
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{classNameWith as i,normalizeStyleClasses as a,withCssClass as o,withoutCssClass as s}from"./style-classes.js";import{GtkImage as c}from"./gtk-image.js";import{attachRowPressFeedback as l}from"./row-press.js";import{buttonSlotAfterWrite as u,buttonSlotDetaches as d}from"./button-slot.js";import{labelDisplayText as f}from"@gjsify/adwaita-core";import{GridLayout as p,ItemSpec as m,Label as h}from"@nativescript/core";const g=`clicked`,_=`adw-button-label`;var GtkButton=class extends r(p){static emittedSignals=[g];static builderSlots=e([`child`],`child`);_styleClasses=[];_label=``;_iconName=``;_useUnderline=!1;_slot=`empty`;_content=null;constructor(e){super(),this.className=i(`adw-button`,this._styleClasses),this.addRow(new m(1,`star`)),this.addColumn(new m(1,`star`)),l(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(a(e))}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._restyle()}_restyle(){this.className=i(`adw-button`,[...this._styleClasses,...this._stateClasses()])}_stateClasses(){return[]}_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 h?this._content:this._adopt(new h);e.className=_,e.text=f(this._label,!1,this._useUnderline);return}let r=this._content instanceof c?this._content:this._adopt(new c);r.iconName=this._iconName}_detach(){this._content&&this.removeChild(this._content),this._content=null}_adopt(e){return e.horizontalAlignment=`center`,e.verticalAlignment=`middle`,p.setColumn(e,0),p.setRow(e,0),this.addChild(e),this._content=e,e}};export{g as GTK_BUTTON_CLICKED,_ as GTK_BUTTON_LABEL_CLASS,GtkButton};
|
|
@@ -0,0 +1 @@
|
|
|
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{classNameWith as r}from"./style-classes.js";import{AdwStyledLayoutBase as i}from"./styled-layout-base.js";import{GtkImage as a}from"./gtk-image.js";import{attachRowPressFeedback as o}from"./row-press.js";import{labelDisplayText as s}from"@gjsify/adwaita-core";import{GridLayout as c,ItemSpec as l,Label as u}from"@nativescript/core";import{objectSelectSymbolic as d}from"@gjsify/adwaita-icons/actions";const f=`toggled`,p=`activate`,m=`notify::active`,h=`checked`,g=`inconsistent`;var GtkCheckButton=class extends i{static builderSlots=e([`child`],`child`);_indicator;_mark;_text;_active=!1;_inconsistent=!1;_label=null;_useUnderline=!1;_child=null;constructor(e){super(),this.addColumn(new l(1,`auto`)),this.addColumn(new l(1,`star`)),this.addRow(new l(1,`auto`));let t=new c;t.className=`adw-check-indicator`,t.addColumn(new l(1,`star`)),t.addRow(new l(1,`star`)),t.verticalAlignment=`middle`,c.setColumn(t,0),c.setRow(t,0);let r=new a;r.iconName=d,r.pixelSize=14,r.iconColor=`#ffffff`,r.horizontalAlignment=`center`,r.verticalAlignment=`middle`,r.visibility=`collapse`,t.addChild(r),this.addChild(t),this._indicator=t,this._mark=r;let i=new u;i.className=`adw-check-label`,i.verticalAlignment=`middle`,i.visibility=`collapse`,c.setColumn(i,1),c.setRow(i,0),this.addChild(i),this._text=i,o(this),this.addEventListener(`tap`,()=>{this._inconsistent=!1,this.active=!this._active,this._restyle(),this.notify({eventName:p,object:this})}),this._restyle(),n(this,e)}get active(){return this._active}set active(e){let n=t(e,this._active);n!==this._active&&(this._active=n,this._restyle(),this.notify({eventName:f,object:this}),this.notify({eventName:m,object:this}))}get inconsistent(){return this._inconsistent}set inconsistent(e){let n=t(e,this._inconsistent);n!==this._inconsistent&&(this._inconsistent=n,this._restyle(),this.notify({eventName:`notify::inconsistent`,object:this}))}get label(){return this._label}set label(e){this._label=e??null,this._paintLabel()}get useUnderline(){return this._useUnderline}set useUnderline(e){this._useUnderline=!!t(e,this._useUnderline),this._paintLabel()}_paintLabel(){this._text.text=s(this._label??``,!1,this._useUnderline),this._syncContent()}get child(){return this._child}set child(e){let t=e??null;t!==this._child&&(this._child&&this.removeChild(this._child),this._child=t,t&&(c.setColumn(t,1),c.setRow(t,0),this.addChild(t)),this._syncContent())}set_child(e){this.child=e}get_child(){return this._child}get_active(){return this._active}set_active(e){this.active=e}_addChildFromBuilder(e,t){this.child=t}_syncContent(){this._text.visibility=!this._child&&this._label?`visible`:`collapse`}get _ownClass(){return`adw-check-button`}_restyle(){let e=[];this._active&&e.push(h),this._inconsistent&&e.push(g),this.className=r(this._ownClass,[...this.styleClasses,...e]),this._indicator.className=r(`adw-check-indicator`,e),this._mark.visibility=this._active||this._inconsistent?`visible`:`collapse`}};export{p as GTK_CHECK_BUTTON_ACTIVATE,h as GTK_CHECK_BUTTON_CHECKED_CLASS,g as GTK_CHECK_BUTTON_INCONSISTENT_CLASS,f as GTK_CHECK_BUTTON_TOGGLED,GtkCheckButton,m as NOTIFY_CHECK_ACTIVE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{AdwStyledLayoutBase as n}from"./styled-layout-base.js";const r=`Gtk.DrawingArea.set_draw_func is not supported on NativeScript: there is no cairo context to draw into. Render through a NativeScript view (an Image, or @nativescript/canvas) instead.`;var GtkDrawingArea=class extends n{_contentWidth=0;_contentHeight=0;constructor(e){super(),t(this,e)}get contentWidth(){return this._contentWidth}set contentWidth(t){let n=Math.max(0,Math.trunc(e(t,this._contentWidth)));this._contentWidth=n,this.minWidth=n}get contentHeight(){return this._contentHeight}set contentHeight(t){let n=Math.max(0,Math.trunc(e(t,this._contentHeight)));this._contentHeight=n,this.minHeight=n}set_draw_func(e){throw Error(r)}queue_draw(){}};export{r as DRAWING_AREA_REFUSAL,GtkDrawingArea};
|
|
@@ -1 +1 @@
|
|
|
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{
|
|
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{ComboState as s,normalizeComboOptions as c}from"@gjsify/adwaita-core";import{Label as l,StackLayout as u,action as d}from"@nativescript/core";import{panDownSymbolic as f}from"@gjsify/adwaita-icons/ui";const p=`notify::selected`;var GtkDropDown=class extends i(u){static builderSlots=e([`model`],`model`);_label;_chevron;_state=new s;_chooserTitle=``;constructor(e){super(),this.orientation=`horizontal`,this.className=`adw-drop-down`;let t=new l;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 d({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(c(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,xmlNumber as t}from"./xml-values.js";import{applyConstructProps as n}from"./construct-props.js";import{withSignals as r}from"./signals.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{applyConstructProps as n}from"./construct-props.js";import{withSignals as r}from"./signals.js";import{ENTRY_ROW_MAX_LENGTH_LIMIT as i,clampEntryText as a,entryTextLength as o}from"@gjsify/adwaita-core";import{GridLayout as s,ItemSpec as c,TextField as l}from"@nativescript/core";const u=`notify::text`,d=`activate`;var GtkEntry=class extends r(s){_field;_text=``;_maxLength=0;constructor(e){super(),this.className=`adw-entry`,this.addColumn(new c(1,`star`)),this.addRow(new c(1,`auto`));let t=new l;t.className=`adw-entry-input`,t.set(`backgroundColor`,`transparent`),t.set(`borderWidth`,0),this.addChild(t),this._field=t,t.addEventListener(`textChange`,()=>this._applyText(this._field.text??``)),t.addEventListener(`returnPress`,()=>{let e={eventName:d,object:this};this.notify(e)}),n(this,e)}_applyText(e){let t=a(e,this._maxLength);if(this._field.text!==t&&(this._field.text=t),t===this._text)return;this._text=t;let n={eventName:u,object:this,text:t,textLength:o(t)};this.notify(n)}get text(){return this._text}set text(e){this._applyText(e??``)}get textLength(){return o(this._text)}get maxLength(){return this._maxLength}set maxLength(e){let n=t(e,this.maxLength);this._maxLength=Number.isFinite(n)?Math.min(i,Math.max(0,Math.trunc(n))):0,this._applyText(this._text)}get placeholderText(){return this._field.hint??``}set placeholderText(e){this._field.hint=e??``}get editable(){return this._field.editable}set editable(t){let n=e(t,this.editable);this._field.editable=!!n}get field(){return this._field}};export{d as ACTIVATE,GtkEntry,u as NOTIFY_TEXT};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.js";import{applyConstructProps as t}from"./construct-props.js";import{AdwStyledLayoutBase as n}from"./styled-layout-base.js";import{GridLayout as r,ItemSpec as i,Label as a}from"@nativescript/core";var GtkFrame=class extends n{static builderSlots=e([`child`,`labelWidget`,`label-widget`],`child`);_labelCell;_labelWidget=null;_label=null;_child=null;constructor(e){super(),this.addColumn(new i(1,`star`)),this.addRow(new i(1,`auto`)),this.addRow(new i(1,`star`));let n=new a;n.className=`adw-frame-label`,n.visibility=`collapse`,r.setRow(n,0),r.setColumn(n,0),this.addChild(n),this._labelCell=n,this._restyle(),t(this,e)}get label(){return this._label}set label(e){this._label=e??null,!this._labelWidget&&(this._labelCell.text=this._label??``,this._labelCell.visibility=this._label?`visible`:`collapse`)}get labelWidget(){return this._labelWidget}set labelWidget(e){let t=e??null;t!==this._labelWidget&&(this._labelWidget&&this.removeChild(this._labelWidget),this._labelWidget=t,t?(r.setRow(t,0),r.setColumn(t,0),this.addChild(t),this._labelCell.visibility=`collapse`):this._labelCell.visibility=this._label?`visible`:`collapse`)}set_label_widget(e){this.labelWidget=e}get child(){return this._child}set child(e){let t=e??null;t!==this._child&&(this._child&&this.removeChild(this._child),this._child=t,t&&(r.setRow(t,1),r.setColumn(t,0),this.addChild(t)))}set_child(e){this.child=e}get_child(){return this._child}_addChildFromBuilder(e,t){e===`labelWidget`||e===`label-widget`?this.labelWidget=t:this.child=t}get _ownClass(){return`adw-frame`}};export{GtkFrame};
|
|
@@ -0,0 +1 @@
|
|
|
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{lengthValue as r}from"./ns-length.js";import{AdwStyledLayoutBase as i}from"./styled-layout-base.js";import{gridChildAt as a,gridGap as o,gridSpacing as s,gridTrackCounts as c}from"./grid-state.js";import{GridLayout as l,ItemSpec as u}from"@nativescript/core";const d=[`colChange`,`rowChange`,`colSpanChange`,`rowSpanChange`];var GtkGrid=class extends i{_rowSpacing=0;_columnSpacing=0;_rowHomogeneous=!1;_columnHomogeneous=!1;_columnKey=``;_rowKey=``;_gaps=new Map;_followers=new Map;constructor(e){super(),n(this,e)}attach(e,t,n,r=1,i=1){e.column=t,e.row=n,e.columnSpan=r,e.rowSpan=i,this.addChild(e)}remove(e){this.removeChild(e)}get_child_at(e,t){return a(this._placed(),e,t)}addChild(e){super.addChild(e),this._follow(e),this._relayout()}insertChild(e,t){super.insertChild(e,t),this._follow(e),this._relayout()}removeChild(e){this._unfollow(e),super.removeChild(e),this._relayout()}get rowSpacing(){return this._rowSpacing}set rowSpacing(e){let n=s(t(e,NaN),e,this._rowSpacing,`rowSpacing`);n!==this._rowSpacing&&(this._rowSpacing=n,this._relayout())}get columnSpacing(){return this._columnSpacing}set columnSpacing(e){let n=s(t(e,NaN),e,this._columnSpacing,`columnSpacing`);n!==this._columnSpacing&&(this._columnSpacing=n,this._relayout())}get rowHomogeneous(){return this._rowHomogeneous}set rowHomogeneous(t){let n=e(t,this._rowHomogeneous);n!==this._rowHomogeneous&&(this._rowHomogeneous=n,this._relayout())}get columnHomogeneous(){return this._columnHomogeneous}set columnHomogeneous(t){let n=e(t,this._columnHomogeneous);n!==this._columnHomogeneous&&(this._columnHomogeneous=n,this._relayout())}_childViews(){let e=[];for(let t=0;t<this.getChildrenCount();t++)e.push(this.getChildAt(t));return e}_placementOf(e){return{column:l.getColumn(e),row:l.getRow(e),columnSpan:l.getColumnSpan(e),rowSpan:l.getRowSpan(e)}}_placed(){return this._childViews().map(e=>({child:e,placement:this._placementOf(e)}))}_follow(e){if(this._followers.has(e))return;let follower=()=>this._relayout();this._followers.set(e,follower);for(let t of d)e.addEventListener(t,follower)}_unfollow(e){let t=this._followers.get(e);if(t!==void 0){for(let n of d)e.removeEventListener(n,t);this._followers.delete(e),this._withGap(e,{left:0,top:0}),this._gaps.delete(e)}}_withGap(e,t){let n=this._gaps.get(e)??{left:0,top:0};n.left!==t.left&&(e.marginLeft=(r(e.marginLeft)??0)-n.left+t.left),n.top!==t.top&&(e.marginTop=(r(e.marginTop)??0)-n.top+t.top),this._gaps.set(e,t)}_relayout(){let e=this._placed(),{columns:t,rows:n}=c(e.map(({placement:e})=>e));this._syncTracks(t,n);for(let{child:t,placement:n}of e)this._withGap(t,o(n,this._columnSpacing,this._rowSpacing))}_syncTracks(e,t){let n=`${e}:${this._columnHomogeneous}`,r=`${t}:${this._rowHomogeneous}`;if(n!==this._columnKey){this.removeColumns();for(let t=0;t<e;t++)this.addColumn(new u(1,this._columnHomogeneous?`star`:`auto`));this._columnKey=n}if(r!==this._rowKey){this.removeRows();for(let e=0;e<t;e++)this.addRow(new u(1,this._rowHomogeneous?`star`:`auto`));this._rowKey=r}}};export{GtkGrid};
|
|
@@ -1 +1 @@
|
|
|
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{
|
|
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{DEFAULT_LABEL_LINES as c,DEFAULT_LABEL_XALIGN as l,labelDisplayText as u,labelEffectiveLines as d,labelEllipsizeOverflowValue as f,normalizeLabelEllipsize as p,normalizeLabelLines as m,normalizeLabelXalign as h}from"@gjsify/adwaita-core";import{Label as g}from"@nativescript/core";const _=new Map([[0,`start`],[.5,`center`],[1,`end`]]);var GtkLabel=class extends r(g){_label=``;_useMarkup=!1;_useUnderline=!1;_ellipsize=`none`;_lines=-1;_styleClasses=[];_xalign=l;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=p(e),this.textOverflow=f(this._ellipsize),this._applyLines()}get lines(){return this._lines}set lines(e){this._lines=m(t(e,c)),this._applyLines()}_applyLines(){this.maxLines=d(this._lines,this._ellipsize)??0}get xalign(){return this._xalign}set xalign(e){let n=h(t(e,l)),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=u(this._label,this._useMarkup,this._useUnderline)}};export{GtkLabel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{ACTIVATED as n}from"./adw-action-row.js";import{AdwStyledLayoutBase as r}from"./styled-layout-base.js";import{addMarkerClass as i,removeMarkerClass as a}from"./bottom-sheet-state.js";import{DEFAULT_LIST_SELECTION_MODE as o,selectionAfterModeChange as s,selectionAfterTap as c,selectionMode as l}from"./list-box-state.js";import{GridLayout as u,ItemSpec as d}from"@nativescript/core";const f=`row-activated`,p=`row-selected`,m=`adw-list-row-selected`,h=`adw-row-flush-top`;function markRow(e,t,n){let r=n?i(e.className,t):a(e.className,t);r!==(e.className??``)&&(e.className=r)}var GtkListBox=class extends r{_selectionMode=o;_activateOnSingleClick=!0;_showSeparators=!1;_acceptUnpairedRelease=!1;_selected=[];_listeners=new Map;constructor(e){super(),this.addColumn(new d(1,`star`)),t(this,e)}append(e){this.addChild(e)}prepend(e){this.insert(e,0)}insert(e,t){let n=this.getChildrenCount();if(t<0||t>=n){this.addChild(e);return}this.insertChild(e,t)}remove(e){this.removeChild(e)}remove_all(){for(let e of this._rowViews())this.removeChild(e)}get_row_at_index(e){return this._rowViews()[e]??null}addChild(e){super.addChild(e),this._adopt(e)}insertChild(e,t){super.insertChild(e,t),this._adopt(e)}removeChild(e){this._release(e),super.removeChild(e),this._renumber()}_addChildFromBuilder(e,t){this.append(t)}get_selected_row(){return this._selected[0]??null}get_selected_rows(){return this._rowViews().filter(e=>this._selected.includes(e))}select_row(e){if(e===null){this.unselect_all();return}this._selectionMode===`none`||!this._rowViews().includes(e)||this._setSelected(this._selectionMode===`multiple`?[...this._selected,e]:[e])}unselect_row(e){this._setSelected(this._selected.filter(t=>t!==e))}select_all(){this._selectionMode===`multiple`&&this._setSelected(this._rowViews())}unselect_all(){this._setSelected([])}get selectionMode(){return this._selectionMode}set selectionMode(e){this._selectionMode=l(e),this._setSelected(s(this._selectionMode,this._selected))}get activateOnSingleClick(){return this._activateOnSingleClick}set activateOnSingleClick(t){this._activateOnSingleClick=e(t,this._activateOnSingleClick)}get showSeparators(){return this._showSeparators}set showSeparators(t){this._showSeparators=e(t,this._showSeparators)}get acceptUnpairedRelease(){return this._acceptUnpairedRelease}set acceptUnpairedRelease(t){this._acceptUnpairedRelease=e(t,this._acceptUnpairedRelease)}_rowViews(){let e=[];for(let t=0;t<this.getChildrenCount();t++)e.push(this.getChildAt(t));return e}_renumber(){let e=this._rowViews();this.removeRows();for(let[t,n]of e.entries())this.addRow(new d(1,`auto`)),u.setColumn(n,0),u.setRow(n,t),markRow(n,h,t===0)}_adopt(e){if(this._renumber(),this._listeners.has(e))return;let t={tap:()=>{this._tapped(e),`activatable`in e||this._activated(e)},activated:()=>this._activated(e)};this._listeners.set(e,t),e.addEventListener(`tap`,t.tap),e.addEventListener(n,t.activated)}_release(e){let t=this._listeners.get(e);t!==void 0&&(e.removeEventListener(`tap`,t.tap),e.removeEventListener(n,t.activated),this._listeners.delete(e)),markRow(e,h,!1),markRow(e,m,!1),this._selected.includes(e)&&this._setSelected(this._selected.filter(t=>t!==e))}_tapped(e){this._setSelected(c(this._selectionMode,this._selected,e))}_activated(e){let t={eventName:f,object:this,row:e};this.notify(t)}_setSelected(e){let t=this._selected;if(t.length===e.length&&t.every((t,n)=>t===e[n]))return;for(let n of t)e.includes(n)||markRow(n,m,!1);for(let t of e)markRow(t,m,!0);this._selected=[...e];let n={eventName:p,object:this,row:this._selected[0]??null};this.notify(n)}};export{GtkListBox,f as LIST_BOX_ROW_ACTIVATED,p as LIST_BOX_ROW_SELECTED,m as LIST_ROW_SELECTED_CLASS};
|
|
@@ -1 +1 @@
|
|
|
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{
|
|
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{ADW_MENU_SURFACE_NATIVESCRIPT as l,assertMenuRenderable as u,menuItemAt as d,normalizeMenuModel as f}from"@gjsify/adwaita-core";import{action as p}from"@nativescript/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=f(e);u(t,l),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(p,this._model,{title:this._menuTitle,actions:this._actions??void 0,cancelLabel:o});if(e===null)return;let t=d(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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e,resolveBuilderSlot as t}from"./builder-slots.js";import{applyConstructProps as n}from"./construct-props.js";import{AdwSingleChildBase as r}from"./single-child-base.js";import{GridLayout as i}from"@nativescript/core";var GtkOverlay=class extends r{static builderSlots=e([`child`,`overlay`],`child`);_overlays=[];constructor(e){super(),n(this,e)}add_overlay(e){this._overlays.includes(e)||(i.setColumn(e,0),i.setRow(e,0),this.addChild(e),this._overlays.push(e))}remove_overlay(e){let t=this._overlays.indexOf(e);t!==-1&&(this._overlays.splice(t,1),this.removeChild(e))}get overlays(){return[...this._overlays]}_addChildFromBuilder(e,n){t(e,[`overlay`],`child`)===`overlay`?this.add_overlay(n):this.child=n}};export{GtkOverlay};
|
|
@@ -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{AdwSingleChildBase as i}from"./single-child-base.js";import{GTK_REVEALER_TRANSITIONS as a,transitionNick as o}from"./transition-type.js";import{revealerChildVisibility as s}from"./revealer-state.js";const c=`notify::reveal-child`;var GtkRevealer=class extends i{static builderSlots=e([`child`],`child`);_revealChild=!1;_transitionType=`slide-down`;_transitionDuration=250;constructor(e){super(),r(this,e)}get revealChild(){return this._revealChild}set revealChild(e){let n=t(e,this._revealChild);n!==this._revealChild&&(this._revealChild=n,this._applyReveal(),this.notify({eventName:c,object:this}))}get childRevealed(){return this._revealChild}get transitionType(){return this._transitionType}set transitionType(e){this._transitionType=o(e,a,`Gtk.RevealerTransitionType`)}get transitionDuration(){return this._transitionDuration}set transitionDuration(e){this._transitionDuration=Math.max(0,n(e,this._transitionDuration))}_adopt(e){super._adopt(e),this._applyReveal()}_applyReveal(){let e=this.child;e&&(e.visibility=s(this._revealChild))}};export{GtkRevealer,c as NOTIFY_REVEAL_CHILD};
|
|
@@ -0,0 +1 @@
|
|
|
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{AdwSingleChildBase as r}from"./single-child-base.js";import{DEFAULT_SCROLLBAR_POLICY as i,normalizePolicy as a,scrollOrientationFor as o}from"./scrolled-window-policy.js";import{GridLayout as s,ScrollView as c}from"@nativescript/core";var GtkScrolledWindow=class extends r{static builderSlots=e([`child`],`child`);_scroll=new c;_hscrollbarPolicy=i;_vscrollbarPolicy=i;_hasFrame=!1;constructor(e){super(),s.setColumn(this._scroll,0),s.setRow(this._scroll,0),this.addChild(this._scroll),this._applyOrientation(),n(this,e)}get hscrollbarPolicy(){return this._hscrollbarPolicy}set hscrollbarPolicy(e){this._hscrollbarPolicy=a(e,`hscrollbar-policy`),this._applyOrientation()}get vscrollbarPolicy(){return this._vscrollbarPolicy}set vscrollbarPolicy(e){this._vscrollbarPolicy=a(e,`vscrollbar-policy`),this._applyOrientation()}get hasFrame(){return this._hasFrame}set hasFrame(e){this._hasFrame=t(e,this._hasFrame)}_adopt(e){this._scroll.content=e}_release(e){this._scroll.content=null}_applyOrientation(){this._scroll.orientation=o(this._hscrollbarPolicy,this._vscrollbarPolicy)}};export{GtkScrolledWindow};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{AdwStyledLayoutBase as t}from"./styled-layout-base.js";import{normalizeBoxOrientation as n}from"@gjsify/adwaita-core";var GtkSeparator=class extends t{_orientation=`horizontal`;constructor(t){super(),this._restyle(),e(this,t)}get orientation(){return this._orientation}set orientation(e){let t=n(e===1?`vertical`:e);t!==this._orientation&&(this._orientation=t,this._restyle(),this.notify({eventName:`notify::orientation`,object:this}))}get _ownClass(){return`adw-separator ${this._orientation}`}};export{GtkSeparator};
|
|
@@ -0,0 +1 @@
|
|
|
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{StyleClassList as i}from"./style-classes.js";import{GTK_STACK_TRANSITIONS as a,transitionNick as o}from"./transition-type.js";import{applyViewStackVisibility as s,createViewStackState as c,viewStackNotifyPayload as l}from"./view-stack-state.js";import{GtkStackPage as u}from"./stack-page.js";import{GridLayout as d,ItemSpec as f}from"@nativescript/core";const p=`notify::visible-child`,m=`notify::visible-child-name`;var GtkStack=class extends r(d){static builderSlots=[];_state=c();_style=new i;_transitionType=`none`;_transitionDuration=200;_hhomogeneous=!0;_vhomogeneous=!0;_interpolateSize=!1;constructor(e){super(),this.addColumn(new f(1,`star`)),this.addRow(new f(1,`star`)),this._state.subscribe(e=>{s(this._state);let t=l(e);for(let e of[p,m]){let n={eventName:e,object:this,...t};this.notify(n)}}),n(this,e)}add_named(e,t){return this._add(e,t??``)}add_titled(e,t,n){return this._add(e,t??``,n)}add_child(e){return this._add(e,``)}remove(e){let t=this._state.pages.find(t=>t.content===e);return!t||!this._state.removePage(t.name)?!1:(this.removeChild(e),s(this._state),!0)}get_child_by_name(e){return this._state.pages[this._state.indexOfName(e)]?.content??null}setPageVisible(e,t){let n=this._state.setPageVisible(e,t);return s(this._state),n}_addChildFromBuilder(e,t){if(!(t instanceof u)){this._add(t,``);return}let n=t.child;if(n===null){t._awaitChild(this);return}t._adoptBy(this),this._state.addPage({name:t.name,title:t.title,icon:t.iconName,content:n,visible:t.visible,needsAttention:t.needsAttention,useUnderline:t.useUnderline}),this._place(n)}get visibleChildName(){return this._state.visibleName||null}set visibleChildName(e){this._state.setVisibleName(e)}get visibleChild(){return this._state.visiblePage?.content??null}set visibleChild(e){let t=this._state.pages.findIndex(t=>t.content===e);t!==-1&&this._state.setVisibleIndex(t)}get transitionType(){return this._transitionType}set transitionType(e){this._transitionType=o(e,a,`Gtk.StackTransitionType`)}get transitionDuration(){return this._transitionDuration}set transitionDuration(e){this._transitionDuration=Math.max(0,t(e,this._transitionDuration))}get hhomogeneous(){return this._hhomogeneous}set hhomogeneous(t){this._hhomogeneous=e(t,this._hhomogeneous)}get vhomogeneous(){return this._vhomogeneous}set vhomogeneous(t){this._vhomogeneous=e(t,this._vhomogeneous)}get interpolateSize(){return this._interpolateSize}set interpolateSize(t){this._interpolateSize=e(t,this._interpolateSize)}get styleClasses(){return this._style.classes}set styleClasses(e){this._style.replace(e),this._restyle()}add_css_class(e){this._style.add(e),this._restyle()}remove_css_class(e){this._style.remove(e),this._restyle()}has_css_class(e){return this._style.has(e)}get_css_classes(){return this._style.classes}set_css_classes(e){this._style.replaceAll(e),this._restyle()}_restyle(){this.className=this._style.className}_add(e,t,n){let r=this._state.addPage({name:t,title:n,content:e});return this._place(e),r}_place(e){d.setColumn(e,0),d.setRow(e,0),this.addChild(e),s(this._state)}};export{GtkStack,p as NOTIFY_STACK_VISIBLE_CHILD,m as NOTIFY_STACK_VISIBLE_CHILD_NAME};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{classNameWith as r}from"./style-classes.js";import{GridLayout as i,ItemSpec as a,TextView as o}from"@nativescript/core";const s=`notify::text`,c=[`none`,`char`,`word`,`word-char`];var GtkTextView=class extends n(i){_field;_text=``;_monospace=!1;_wrapMode=`none`;constructor(e){super(),this.className=`adw-text-view`,this.addColumn(new a(1,`star`)),this.addRow(new a(1,`star`));let n=new o;n.className=`adw-text-view-input`,n.set(`backgroundColor`,`transparent`),n.set(`borderWidth`,0),this.addChild(n),this._field=n,n.addEventListener(`textChange`,()=>this._applyText(this._field.text??``)),t(this,e)}_applyText(e){if(this._field.text!==e&&(this._field.text=e),e===this._text)return;this._text=e;let t={eventName:s,object:this};this.notify(t)}get text(){return this._text}set text(e){this._applyText(e??``)}get editable(){return this._field.editable}set editable(t){this._field.editable=!!e(t,this.editable)}get monospace(){return this._monospace}set monospace(t){this._monospace=!!e(t,this._monospace),this.className=r(`adw-text-view`,this._monospace?[`monospace`]:[])}get wrapMode(){return this._wrapMode}set wrapMode(e){let t=typeof e==`number`?e:c.indexOf(e),n=c[t];if(n===void 0)throw TypeError(`Gtk.TextView.wrapMode: ${JSON.stringify(e)} is not a Gtk.WrapMode; expected ${c.join(`, `)}.`);this._wrapMode=n}get field(){return this._field}};export{c as GTK_WRAP_MODES,GtkTextView,s as NOTIFY_TEXT_VIEW_TEXT};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{GtkButton as n}from"./gtk-button.js";const r=`toggled`,i=`notify::active`,a=`checked`,o=`notify::group`;var s=class GtkToggleButton extends n{static emittedSignals=[...n.emittedSignals,r,i];_active=!1;_groupNext=null;_groupPrev=null;constructor(e){super(),this.addEventListener(`clicked`,()=>{this._active&&this._grouped||(this.active=!this._active)}),t(this,e)}get active(){return this._active}set active(t){let n=e(t,this._active);n!==this._active&&(n&&this._grouped&&this._clearGroup(),this._active=n,this._restyle(),this.notify({eventName:r,object:this}),this.notify({eventName:i,object:this}))}set group(e){this._setGroup(e)}get _grouped(){return this._groupNext!==null||this._groupPrev!==null}_setGroup(e){if(e===this){console.error(`Gtk.ToggleButton cannot be its own group; the group is unchanged.`);return}if(e===null)this._groupPrev&&(this._groupPrev._groupNext=this._groupNext),this._groupNext&&(this._groupNext._groupPrev=this._groupPrev),this._groupNext=null,this._groupPrev=null;else{if(this._groupNext===e)return;if(this._groupPrev=null,e._groupPrev){let t=e._groupPrev;t._groupNext=this,this._groupPrev=t}e._groupPrev=this,this._groupNext=e}this.notify({eventName:o,object:this})}_clearGroup(){for(let e=GtkToggleButton._groupHead(this);e!==null;e=e._groupNext)e!==this&&(e.active=!1)}static _groupHead(e){let t=e;for(let e=0;t._groupPrev!==null&&e<1024;e++)t=t._groupPrev;return t}_stateClasses(){return this._active?[a]:[]}};export{a as GTK_TOGGLE_BUTTON_CHECKED_CLASS,r as GTK_TOGGLE_BUTTON_TOGGLED,s as GtkToggleButton,i as NOTIFY_TOGGLE_ACTIVE,o as NOTIFY_TOGGLE_GROUP};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{NO_HOST_PAYMENT as e}from"./window-insets.js";const
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{NO_HOST_PAYMENT as e}from"./window-insets.js";import{withPageClass as t}from"./system-bars.js";const n={top:!1,bottom:!0};function resolveHostInsets(r,i){let a=r.page;return a?(a.className=t(a.className),i.top>0&&a.androidOverflowEdge!==`top`&&(a.androidOverflowEdge=`top`),n):e}export{resolveHostInsets};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{DEFAULT_ICON_COLOR as e,DEFAULT_ICON_COLOR_DARK as t}from"@gjsify/adwaita-core";const n=16,r=[1,0,0,1,0,0];function composeTransforms(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}const i=/([a-zA-Z]+)\s*\(([^)]*)\)/g,a=Math.PI/180;function parseIconTransform(e){let t=r,n=!1;i.lastIndex=0;let o;for(;(o=i.exec(e))!==null;){let e=o[2].split(/[\s,]+/).filter(e=>e!==``).map(Number);if(e.some(e=>!Number.isFinite(e)))return null;let r;switch(o[1]){case`matrix`:if(e.length!==6)return null;r=[e[0],e[1],e[2],e[3],e[4],e[5]];break;case`translate`:if(e.length<1||e.length>2)return null;r=[1,0,0,1,e[0],e[1]??0];break;case`scale`:if(e.length<1||e.length>2)return null;r=[e[0],0,0,e[1]??e[0],0,0];break;case`rotate`:{if(e.length!==1&&e.length!==3)return null;let t=Math.cos(e[0]*a),n=Math.sin(e[0]*a),i=[t,n,-n,t,0,0];if(e.length===1){r=i;break}let[o,s]=[e[1],e[2]];r=composeTransforms(composeTransforms([1,0,0,1,o,s],i),[1,0,0,1,-o,-s]);break}case`skewX`:if(e.length!==1)return null;r=[1,0,Math.tan(e[0]*a),1,0,0];break;case`skewY`:if(e.length!==1)return null;r=[1,Math.tan(e[0]*a),0,1,0,0];break;default:return null}t=composeTransforms(t,r),n=!0}return n?t:null}const o=/\s(d|fill|fill-rule|fill-opacity|transform|style)\s*=\s*"([^"]*)"/g;function tagAttributes(e){let t=new Map;o.lastIndex=0;let n;for(;(n=o.exec(e))!==null;)t.set(n[1],n[2]);return t}function presentationValue(e,t){let n=e.get(`style`);if(n!==void 0){let e=RegExp(`(?:^|;)\\s*${t}\\s*:\\s*([^;]+)`).exec(n)?.[1];if(e!==void 0)return e.trim()}return e.get(t)}const
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{DEFAULT_ICON_COLOR as e,DEFAULT_ICON_COLOR_DARK as t}from"@gjsify/adwaita-core";const n=16,r=[1,0,0,1,0,0];function composeTransforms(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}const i=/([a-zA-Z]+)\s*\(([^)]*)\)/g,a=Math.PI/180;function parseIconTransform(e){let t=r,n=!1;i.lastIndex=0;let o;for(;(o=i.exec(e))!==null;){let e=o[2].split(/[\s,]+/).filter(e=>e!==``).map(Number);if(e.some(e=>!Number.isFinite(e)))return null;let r;switch(o[1]){case`matrix`:if(e.length!==6)return null;r=[e[0],e[1],e[2],e[3],e[4],e[5]];break;case`translate`:if(e.length<1||e.length>2)return null;r=[1,0,0,1,e[0],e[1]??0];break;case`scale`:if(e.length<1||e.length>2)return null;r=[e[0],0,0,e[1]??e[0],0,0];break;case`rotate`:{if(e.length!==1&&e.length!==3)return null;let t=Math.cos(e[0]*a),n=Math.sin(e[0]*a),i=[t,n,-n,t,0,0];if(e.length===1){r=i;break}let[o,s]=[e[1],e[2]];r=composeTransforms(composeTransforms([1,0,0,1,o,s],i),[1,0,0,1,-o,-s]);break}case`skewX`:if(e.length!==1)return null;r=[1,0,Math.tan(e[0]*a),1,0,0];break;case`skewY`:if(e.length!==1)return null;r=[1,Math.tan(e[0]*a),0,1,0,0];break;default:return null}t=composeTransforms(t,r),n=!0}return n?t:null}const o=/\s(d|fill|fill-rule|fill-opacity|transform|style)\s*=\s*"([^"]*)"/g;function tagAttributes(e){let t=new Map;o.lastIndex=0;let n;for(;(n=o.exec(e))!==null;)t.set(n[1],n[2]);return t}const s=new Set([`#2e3436`,`#2e3434`,`#474747`,`#222222`,`#222`,`#2d3336`]);function isNeutralSymbolicFill(e){return s.has(e.trim().toLowerCase())}function presentationValue(e,t){let n=e.get(`style`);if(n!==void 0){let e=RegExp(`(?:^|;)\\s*${t}\\s*:\\s*([^;]+)`).exec(n)?.[1];if(e!==void 0)return e.trim()}return e.get(t)}const c=/<!--[\s\S]*?-->|<!\[CDATA\[[\s\S]*?\]\]>/g,l=new Set([`defs`,`clipPath`,`mask`,`symbol`,`marker`,`pattern`]);function extractIconPaths(e){let t=[],n=/<(g|path|defs|clipPath|mask|symbol|marker|pattern)\b((?:"[^"]*"|'[^']*'|[^"'<>])*)>|<\/(g|defs|clipPath|mask|symbol|marker|pattern)\s*>/g,i=[],a=0,o,s=e.replace(c,``);for(;(o=n.exec(s))!==null;){let[e,n,s,c]=o;if(n===void 0){l.has(c)?a=Math.max(0,a-1):a===0&&i.pop();continue}let u=s.trimEnd().endsWith(`/`);if(l.has(n)){u||a++;continue}if(a>0)continue;let d=tagAttributes(e),f=d.has(`transform`)?parseIconTransform(d.get(`transform`)):r,p=i.length>0?i[i.length-1]:r,m=f===null?null:composeTransforms(p,f);if(n===`g`){u||i.push(m??p);continue}let h=d.get(`d`)?.trim();if(!h||m===null)continue;let g=presentationValue(d,`fill-opacity`),_=g===void 0?1:Number.parseFloat(g),v=presentationValue(d,`fill`);t.push({d:normalizeArcFlags(h),opacity:Number.isFinite(_)?Math.min(1,Math.max(0,_)):1,transform:m,fillRule:presentationValue(d,`fill-rule`)===`evenodd`?`evenodd`:`nonzero`,fill:v===void 0||v===`currentColor`||v===`none`||isNeutralSymbolicFill(v)?null:v})}return t}function extractPathData(e){return extractIconPaths(e).map(e=>e.d).join(` `)}function parseHexColor(e){return parseHexColorOrNull(e)??{red:0,green:0,blue:0,alpha:1}}function parseHexColorOrNull(e){let t=e.trim().replace(/^#/,``);if(!/^[0-9a-fA-F]+$/.test(t))return null;let n=255,r,i,a;if(t.length===3)r=Number.parseInt(t[0]+t[0],16),i=Number.parseInt(t[1]+t[1],16),a=Number.parseInt(t[2]+t[2],16);else if(t.length===6)r=Number.parseInt(t.slice(0,2),16),i=Number.parseInt(t.slice(2,4),16),a=Number.parseInt(t.slice(4,6),16);else if(t.length===8)n=Number.parseInt(t.slice(0,2),16),r=Number.parseInt(t.slice(2,4),16),i=Number.parseInt(t.slice(4,6),16),a=Number.parseInt(t.slice(6,8),16);else return null;return{red:r/255,green:i/255,blue:a/255,alpha:n/255}}function normalizeArcFlags(e){if(e.indexOf(`a`)===-1&&e.indexOf(`A`)===-1)return e;let t=e.length,isWs=e=>e===` `||e===`,`||e===` `||e===`
|
|
2
2
|
`||e===`\r`,isNumStart=e=>e>=`0`&&e<=`9`||e===`.`||e===`+`||e===`-`,n=0,r=``,skipWs=()=>{for(;n<t&&isWs(e[n]);)n++},readNumber=()=>{let r=n;for((e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`.`)for(n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`e`||e[n]===`E`)for(n++,(e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;return e.slice(r,n)};for(;n<t;){let i=e[n];if(i===`a`||i===`A`)for(r+=i,n++;skipWs(),!(n>=t||!isNumStart(e[n]));)r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+e[n++],skipWs(),r+=` `+e[n++],skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber();else r+=i,n++}return r}export{n as ADWAITA_ICON_GRID,e as DEFAULT_ICON_COLOR,t as DEFAULT_ICON_COLOR_DARK,r as IDENTITY_TRANSFORM,extractIconPaths,extractPathData,normalizeArcFlags,parseHexColor,parseHexColorOrNull,parseIconTransform};
|
|
@@ -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,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
|
|
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{faceSmileSymbolic as E}from"@gjsify/adwaita-icons/emotes";import{folderDocumentsSymbolic as D,folderDownloadSymbolic as O,folderMusicSymbolic as k,folderSymbolic as A,userTrashSymbolic as j}from"@gjsify/adwaita-icons/places";import{avatarDefaultSymbolic as M,imageMissingSymbolic as N,mailUnreadSymbolic as P,starredSymbolic as F}from"@gjsify/adwaita-icons/status";const I=`image-missing`,L={"avatar-default":M,"face-smile":E,"camera-photo":C,"contact-new":t,"document-edit":n,"document-open":r,"document-save":i,"edit-copy":a,"emblem-system":T,folder:A,"folder-documents":D,"folder-download":O,"folder-music":k,"go-home":o,"go-next":s,"go-previous":c,"image-missing":N,"list-add":l,"list-remove":u,"mail-reply-sender":d,"mail-send":f,"mail-unread":P,"network-wireless":w,"open-menu":p,"preferences-system":S,"send-to":m,starred:F,"system-search":h,"user-trash":j,"view-conceal":g,"view-grid":_,"view-list":v,"view-more":y,"view-paged":b,"view-reveal":x},R=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!==``&&(R.has(n)||Object.hasOwn(L,n))}function compiledIconNames(){return Object.keys(L).sort()}function registeredIconNames(){return[...R.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>\`.`);R.set(r,n)}function unregisterIcon(t){return R.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 R.get(t)??L[t]??N}}}export{I as ICON_FALLBACK_NAME,compiledIconNames,iconValueKind,isIconAvailable,registerIcon,registeredIconNames,resolveIconSource,unregisterIcon};
|
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{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
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwBreakpoint as ee,addBreakpoints as e,evaluateBreakpointCondition as te,observeViewSize as ne,parseBreakpointCondition as re}from"./breakpoint.js";import{GTK_ALIGN as ie}from"./gtk-align.js";import{DEFAULT_ICON_PIXEL_SIZE as ae,GTK_ICON_SIZE_NICKS as oe,GTK_ICON_SIZE_PIXELS as se,PIXEL_SIZE_UNSET as ce,isGtkIconSizeNick as le}from"./gtk-icon-size.js";import{applyConstructProps as ue,nsAlignment as de}from"./construct-props.js";import{lengthValue as fe}from"./ns-length.js";import{NOTIFY_HEXPAND as pe,NOTIFY_VEXPAND as me}from"./widget-layout.js";import{AdwAboutDialog as t,CLOSED as he}from"./adw-about-dialog.js";import{ACTIVATED as ge,AdwActionRow as n}from"./adw-action-row.js";import{AdwAlertDialog as _e,AdwAlertResponses as ve,NOTIFY_RESPONSE as ye}from"./adw-alert-dialog.js";import{DEFAULT_REVEALER_TRANSITION_DURATION as be,DEFAULT_STACK_TRANSITION_DURATION as xe,GTK_REVEALER_TRANSITIONS as Se,GTK_STACK_TRANSITIONS as Ce,transitionNick as we}from"./transition-type.js";import{ADW_DIALOG_PRESENTATION_MODES as Te,DEFAULT_DIALOG_PRESENTATION_MODE as Ee,dialogPresentationMode as De,findDialogHost as Oe,surfaceSize as ke}from"./window-state.js";import{ADW_WINDOW_CLASS as Ae,AdwWindowBase as je}from"./window-base.js";import{AdwApplicationWindow as r}from"./adw-application-window.js";import{avatarInitials as Me}from"./avatar-color.js";import{AVATAR_DEFAULT_ICON as Ne}from"./avatar-view.js";import{adwaitaColorScheme as Pe,isThemeIconColor as Fe,onAdwaitaColorSchemeChanged as Ie,setAdwaitaColorScheme as Le,themeIconColor as Re,toggleAdwaitaColorScheme as ze}from"./color-scheme.js";import{ADWAITA_ICON_GRID as Be,DEFAULT_ICON_COLOR as Ve,DEFAULT_ICON_COLOR_DARK as He,extractIconPaths as Ue,extractPathData as We}from"./icon-path.js";import{ICON_FALLBACK_NAME as Ge,compiledIconNames as Ke,iconValueKind as qe,isIconAvailable as Je,registerIcon as Ye,registeredIconNames as Xe,resolveIconSource as Ze,unregisterIcon as Qe}from"./icon-theme.js";import{renderSymbolicIcon as $e}from"./icons.js";import{DEFAULT_GTK_IMAGE_SIZE as et,GtkImage as i}from"./gtk-image.js";import{AdwAvatar as a,DEFAULT_AVATAR_SIZE as tt}from"./adw-avatar.js";import{DEFAULT_CLAMP_MAX_SIZE as nt,DEFAULT_SPINNER_SIZE as rt}from"./chrome.js";import{AdwBanner as o,BUTTON_CLICKED as it}from"./adw-banner.js";import{AdwBin as s}from"./adw-bin.js";import{CLOSE_ATTEMPT as at,NOTIFY_OPEN as ot,SHEET_CLOSE as st}from"./bottom-sheet-state.js";import{attachRowPressFeedback as ct}from"./row-press.js";import{AdwBottomSheet as c}from"./adw-bottom-sheet.js";import{AdwButtonContent as l}from"./adw-button-content.js";import{AdwButtonRow as u}from"./adw-button-row.js";import{CarouselScrollSync as lt,DEFAULT_CAROUSEL_PAGE_WIDTH as ut,applyMarkerClasses as dt,carouselDotClasses as ft,carouselNotifyPayload as pt,carouselPositionAtOffset as mt,carouselScrollOffset as ht,createCarouselState as gt,indicatorMarkerClasses as _t,normalizeCarouselPageWidth as vt}from"./carousel-state.js";import{AdwCarousel as d,NOTIFY_N_PAGES as yt,NOTIFY_POSITION as bt,PAGE_CHANGED as xt}from"./adw-carousel.js";import{AdwCarouselIndicatorDots as f}from"./adw-carousel-indicator-dots.js";import{AdwCarouselIndicatorLines as p}from"./adw-carousel-indicator-lines.js";import{AdwClamp as m}from"./adw-clamp.js";import{AdwComboRow as h,ComboState as St,NOTIFY_SELECTED as Ct}from"./adw-combo-row.js";import{ADW_DIALOG_CLASS as wt,ADW_DIALOG_CLOSED as Tt,ADW_DIALOG_CLOSE_ATTEMPT as Et,AdwDialog as g}from"./adw-dialog.js";import{AdwImageButton as _,DEFAULT_ICON_BUTTON_ICON_SIZE as Dt}from"./adw-image-button.js";import{AdwEntryRow as v,NOTIFY_TEXT as Ot}from"./adw-entry-row.js";import{AdwExpanderRow as y,ExpanderState as kt,NOTIFY_EXPANDED as At}from"./adw-expander-row.js";import{AdwWindowTitle as b}from"./adw-window-title.js";import{AdwHeaderBar as x}from"./adw-header-bar.js";import{AdwViewStackPage as jt}from"./view-stack-page.js";import{AdwViewStack as S,NOTIFY_VISIBLE_CHILD as Mt}from"./adw-view-stack.js";import{AdwViewSwitcherBase as Nt,NOTIFY_SELECTED as Pt}from"./view-switcher-base.js";import{AdwInlineViewSwitcher as C}from"./adw-inline-view-switcher.js";import{NsNavigationSplitViewState as Ft,NsOverlaySplitViewState as It,splitViewColumns as Lt}from"./split-view-state.js";import{AdwSplitViewBase as Rt,NOTIFY_SHOW_SIDEBAR as zt}from"./split-view-base.js";import{AdwNavigationSplitView as w}from"./adw-navigation-split-view.js";import{AdwNavigationPage as T}from"./adw-navigation-page.js";import{NOTIFY_VISIBLE_PAGE as Bt}from"./navigation-stack.js";import{AdwNavigationView as E}from"./adw-navigation-view.js";import{AdwOverlaySplitView as D}from"./adw-overlay-split-view.js";import{AdwPasswordEntryRow as O}from"./adw-password-entry-row.js";import{AdwPreferencesDialog as k,CLOSED as Vt}from"./adw-preferences-dialog.js";import{AdwPreferencesGroup as A}from"./adw-preferences-group.js";import{AdwPreferencesPage as j}from"./adw-preferences-page.js";import{SHORTCUT_LABEL_CAP_TEXT_CLASS as Ht,SHORTCUT_LABEL_CLASS as Ut,SHORTCUT_LABEL_DIMMED_CLASS as Wt,SHORTCUT_LABEL_DISABLED_CLASS as Gt,SHORTCUT_LABEL_KEYCAP_CLASS as Kt,SHORTCUT_LABEL_KEYS_CLASS as qt,SHORTCUT_LABEL_SIDE_CLASS as Jt,SHORTCUT_LABEL_SPACED_CLASS as Yt,shortcutLabelDirection as Xt,shortcutLabelPlatform as Zt,shortcutLabelRenderPlan as Qt}from"./shortcut-label.js";import{AdwShortcutLabel as M}from"./adw-shortcut-label.js";import{AdwSidebarItem as $t,AdwSidebarSection as en}from"../values/sidebar.js";import{AdwSidebar as N,NOTIFY_SELECTED as tn}from"./adw-sidebar.js";import{AdwSpinRow as P,NOTIFY_VALUE as nn,SpinState as rn}from"./adw-spin-row.js";import{AdwSpinner as F}from"./adw-spinner.js";import{MENU_CANCEL_LABEL as an,menuSheetActions as on,menuSheetRows as sn,presentMenuSheet as cn,resolveMenuChoice as ln}from"./menu-sheet.js";import{AdwSplitButton as I,CLICKED as un,MENU_TAPPED as dn}from"./adw-split-button.js";import{AdwStatusPage as fn}from"./adw-status-page.js";import{AdwSwitchRow as L,NOTIFY_ACTIVE as pn}from"./adw-switch-row.js";import{AdwTabPage as mn}from"../values/tab-page.js";import{applyTabViewVisibility as hn,createTabViewState as gn,tabBarVisibility as _n,tabCloseVisibilities as vn,tabLabelText as yn,tabPageVisibilities as bn,tabTooltipText as xn,tabViewNotifyPayload as Sn}from"./tab-view-state.js";import{AdwTabView as R,CLOSE_PAGE as Cn,NOTIFY_SELECTED_PAGE as wn,PAGES_CHANGED as Tn}from"./adw-tab-view.js";import{AdwToast as En,AdwToastOverlay as z,AdwToastQueue as Dn,DEFAULT_TOAST_TIMEOUT as On,TOAST_BUTTON_CLICKED as kn}from"./adw-toast-overlay.js";import{AdwToggle as An}from"./adw-toggle.js";import{AdwToggleGroup as B,NOTIFY_SELECTED as jn,ToggleGroupState as Mn}from"./adw-toggle-group.js";import{WINDOW_BACKGROUND as Nn,configureSystemBars as Pn,systemBarsConfig as Fn}from"./system-bars.js";import{AdwToolbarView as V}from"./adw-toolbar-view.js";import{AdwViewSwitcher as H}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as U}from"./adw-view-switcher-bar.js";import{AdwWindow as W}from"./adw-window.js";import{AdwWrapBox as G}from"./adw-wrap-box.js";import{GtkActionBar as K}from"./gtk-action-bar.js";import{DEFAULT_BOX_SPACING as In,boxChildTrack as Ln,boxSpacingChanges as Rn,boxTrackPlan as zn,normalizeBoxSpacing as Bn}from"./box-layout.js";import{GtkBox as q}from"./gtk-box.js";import{buttonSlotAfterWrite as Vn,buttonSlotDetaches as Hn}from"./button-slot.js";import{GTK_BUTTON_CLICKED as Un,GTK_BUTTON_LABEL_CLASS as Wn,GtkButton as J}from"./gtk-button.js";import{GtkDropDown as Y,NOTIFY_SELECTED as Gn}from"./gtk-drop-down.js";import{GTK_CHECK_BUTTON_ACTIVATE as Kn,GTK_CHECK_BUTTON_CHECKED_CLASS as qn,GTK_CHECK_BUTTON_INCONSISTENT_CLASS as Jn,GTK_CHECK_BUTTON_TOGGLED as Yn,GtkCheckButton as X,NOTIFY_CHECK_ACTIVE as Xn}from"./gtk-check-button.js";import{DRAWING_AREA_REFUSAL as Zn,GtkDrawingArea as Z}from"./gtk-drawing-area.js";import{ACTIVATE as Qn,GtkEntry as Q,NOTIFY_TEXT as $n}from"./gtk-entry.js";import{gridChildAt as er,gridGap as tr,gridSpacing as nr,gridTrackCounts as rr}from"./grid-state.js";import{GtkGrid as $}from"./gtk-grid.js";import{GtkFrame as ir}from"./gtk-frame.js";import{GtkLabel as ar}from"./gtk-label.js";import{DEFAULT_LIST_SELECTION_MODE as or,GTK_SELECTION_MODES as sr,selectionAfterModeChange as cr,selectionAfterTap as lr,selectionMode as ur}from"./list-box-state.js";import{GtkListBox as dr,LIST_BOX_ROW_ACTIVATED as fr,LIST_BOX_ROW_SELECTED as pr,LIST_ROW_SELECTED_CLASS as mr}from"./gtk-list-box.js";import{GtkMenuButton as hr,MENU_ITEM_ACTIVATED as gr}from"./gtk-menu-button.js";import{GtkOverlay as _r}from"./gtk-overlay.js";import{revealerChildVisibility as vr}from"./revealer-state.js";import{GtkRevealer as yr,NOTIFY_REVEAL_CHILD as br}from"./gtk-revealer.js";import{DEFAULT_SCROLLBAR_POLICY as xr,GTK_POLICY_TYPES as Sr,normalizePolicy as Cr,policyScrolls as wr,scrollOrientationFor as Tr}from"./scrolled-window-policy.js";import{GtkScrolledWindow as Er}from"./gtk-scrolled-window.js";import{GtkSeparator as Dr}from"./gtk-separator.js";import{GtkStackPage as Or}from"./stack-page.js";import{GtkStack as kr,NOTIFY_STACK_VISIBLE_CHILD as Ar,NOTIFY_STACK_VISIBLE_CHILD_NAME as jr}from"./gtk-stack.js";import{GTK_WRAP_MODES as Mr,GtkTextView as Nr,NOTIFY_TEXT_VIEW_TEXT as Pr}from"./gtk-text-view.js";import{GTK_TOGGLE_BUTTON_CHECKED_CLASS as Fr,GTK_TOGGLE_BUTTON_TOGGLED as Ir,GtkToggleButton as Lr,NOTIFY_TOGGLE_ACTIVE as Rr}from"./gtk-toggle-button.js";import{AdwSliderRow as zr,NOTIFY_SLIDER_VALUE as Br}from"./adw-slider-row.js";import{DATA_GRID_HEADER_CELL_CLASS as Vr,DATA_GRID_HEADER_ROW_CLASS as Hr,DATA_GRID_SECTION_CELL_CLASS as Ur,dataGridCellClass as Wr,dataGridItemSpec as Gr,dataGridRowClass as Kr,dataGridShapeKey as qr,dataGridTracksKey as Jr,parseDataGridWidth as Yr}from"./data-grid-model.js";import{AdwDataGrid as Xr,ROW_ACTIVATED as Zr}from"./adw-data-grid.js";import{ADWAITA_NS_ACCENT_RULES as Qr,adwaitaNsAccentColor as $r,adwaitaNsAccentCss as ei}from"./accent-theme.js";import{applyAdwaitaNsAccent as ti,clearAdwaitaNsAccent as ni}from"./adw-accent.js";import{labelDisplayText as ri,labelMarkupIsUnparseable as ii}from"@gjsify/adwaita-core";const ai={AdwPreferencesPage:j,AdwPreferencesGroup:A,AdwActionRow:n,AdwSwitchRow:L,AdwEntryRow:v,AdwPasswordEntryRow:O,GtkEntry:Q,AdwComboRow:h,GtkDropDown:Y,AdwSpinRow:P,AdwSliderRow:zr,AdwExpanderRow:y,GtkButton:J,GtkBox:q,GtkGrid:$,GtkListBox:dr,AdwWindow:W,AdwApplicationWindow:r,AdwDialog:g,GtkActionBar:K,AdwBin:s,GtkOverlay:_r,GtkRevealer:yr,GtkScrolledWindow:Er,GtkStack:kr,GtkToggleButton:Lr,GtkCheckButton:X,GtkDrawingArea:Z,GtkFrame:ir,GtkSeparator:Dr,GtkTextView:Nr,GtkLabel:ar,AdwImageButton:_,GtkMenuButton:hr,GtkImage:i,AdwBanner:o,AdwAvatar:a,AdwWindowTitle:b,AdwClamp:m,AdwHeaderBar:x,AdwToolbarView:V,AdwWrapBox:G,AdwDataGrid:Xr,AdwSpinner:F,AdwStatusPage:fn,AdwButtonRow:u,AdwButtonContent:l,AdwSplitButton:I,AdwToggleGroup:B,AdwShortcutLabel:M,AdwViewStack:S,AdwViewSwitcher:H,AdwViewSwitcherBar:U,AdwInlineViewSwitcher:C,AdwTabView:R,AdwCarousel:d,AdwCarouselIndicatorDots:f,AdwCarouselIndicatorLines:p,AdwNavigationPage:T,AdwNavigationView:E,AdwNavigationSplitView:w,AdwOverlaySplitView:D,AdwSidebar:N,AdwBottomSheet:c,AdwToastOverlay:z,AdwAboutDialog:t,AdwPreferencesDialog:k};let oi=!1;function registerAdwaitaElements(){if(!oi&&typeof registerElement==`function`){for(let[ee,e]of Object.entries(ai))registerElement(ee,()=>e);oi=!0}}export{he as ABOUT_CLOSED,ge as ACTIVATED,Be as ADWAITA_ICON_GRID,Qr as ADWAITA_NS_ACCENT_RULES,wt as ADW_DIALOG_CLASS,Tt as ADW_DIALOG_CLOSED,Et as ADW_DIALOG_CLOSE_ATTEMPT,Te as ADW_DIALOG_PRESENTATION_MODES,Ae as ADW_WINDOW_CLASS,Ne as AVATAR_DEFAULT_ICON,t as AdwAboutDialog,n as AdwActionRow,_e as AdwAlertDialog,ve as AdwAlertResponses,r as AdwApplicationWindow,a as AdwAvatar,o as AdwBanner,s as AdwBin,c as AdwBottomSheet,ee as AdwBreakpoint,l as AdwButtonContent,u as AdwButtonRow,d as AdwCarousel,f as AdwCarouselIndicatorDots,p as AdwCarouselIndicatorLines,m as AdwClamp,h as AdwComboRow,Xr as AdwDataGrid,g as AdwDialog,v as AdwEntryRow,y as AdwExpanderRow,x as AdwHeaderBar,_ as AdwImageButton,C as AdwInlineViewSwitcher,T as AdwNavigationPage,w as AdwNavigationSplitView,E as AdwNavigationView,D as AdwOverlaySplitView,O as AdwPasswordEntryRow,k as AdwPreferencesDialog,A as AdwPreferencesGroup,j as AdwPreferencesPage,M as AdwShortcutLabel,N as AdwSidebar,$t as AdwSidebarItem,en as AdwSidebarSection,zr as AdwSliderRow,P as AdwSpinRow,F as AdwSpinner,I as AdwSplitButton,Rt as AdwSplitViewBase,fn as AdwStatusPage,L as AdwSwitchRow,mn as AdwTabPage,R as AdwTabView,En as AdwToast,z as AdwToastOverlay,Dn as AdwToastQueue,An as AdwToggle,B as AdwToggleGroup,V as AdwToolbarView,S as AdwViewStack,jt as AdwViewStackPage,H as AdwViewSwitcher,U as AdwViewSwitcherBar,Nt as AdwViewSwitcherBase,W as AdwWindow,je as AdwWindowBase,b as AdwWindowTitle,G as AdwWrapBox,it as BUTTON_CLICKED,un as CLICKED,at as CLOSE_ATTEMPT,Cn as CLOSE_PAGE,lt as CarouselScrollSync,St as ComboState,Vr as DATA_GRID_HEADER_CELL_CLASS,Hr as DATA_GRID_HEADER_ROW_CLASS,Ur as DATA_GRID_SECTION_CELL_CLASS,tt as DEFAULT_AVATAR_SIZE,In as DEFAULT_BOX_SPACING,ut as DEFAULT_CAROUSEL_PAGE_WIDTH,nt as DEFAULT_CLAMP_MAX_SIZE,Ee as DEFAULT_DIALOG_PRESENTATION_MODE,et as DEFAULT_GTK_IMAGE_SIZE,Dt as DEFAULT_ICON_BUTTON_ICON_SIZE,Ve as DEFAULT_ICON_COLOR,He as DEFAULT_ICON_COLOR_DARK,ae as DEFAULT_ICON_PIXEL_SIZE,or as DEFAULT_LIST_SELECTION_MODE,be as DEFAULT_REVEALER_TRANSITION_DURATION,xr as DEFAULT_SCROLLBAR_POLICY,rt as DEFAULT_SPINNER_SIZE,xe as DEFAULT_STACK_TRANSITION_DURATION,On as DEFAULT_TOAST_TIMEOUT,Zn as DRAWING_AREA_REFUSAL,Qn as ENTRY_ACTIVATE,kt as ExpanderState,ie as GTK_ALIGN,Un as GTK_BUTTON_CLICKED,Wn as GTK_BUTTON_LABEL_CLASS,Kn as GTK_CHECK_BUTTON_ACTIVATE,qn as GTK_CHECK_BUTTON_CHECKED_CLASS,Jn as GTK_CHECK_BUTTON_INCONSISTENT_CLASS,Yn as GTK_CHECK_BUTTON_TOGGLED,oe as GTK_ICON_SIZE_NICKS,se as GTK_ICON_SIZE_PIXELS,Sr as GTK_POLICY_TYPES,Se as GTK_REVEALER_TRANSITIONS,sr as GTK_SELECTION_MODES,Ce as GTK_STACK_TRANSITIONS,Fr as GTK_TOGGLE_BUTTON_CHECKED_CLASS,Ir as GTK_TOGGLE_BUTTON_TOGGLED,Mr as GTK_WRAP_MODES,K as GtkActionBar,q as GtkBox,J as GtkButton,X as GtkCheckButton,Z as GtkDrawingArea,Y as GtkDropDown,Q as GtkEntry,ir as GtkFrame,$ as GtkGrid,i as GtkImage,ar as GtkLabel,dr as GtkListBox,hr as GtkMenuButton,_r as GtkOverlay,yr as GtkRevealer,Er as GtkScrolledWindow,Dr as GtkSeparator,kr as GtkStack,Or as GtkStackPage,Nr as GtkTextView,Lr as GtkToggleButton,Ge as ICON_FALLBACK_NAME,fr as LIST_BOX_ROW_ACTIVATED,pr as LIST_BOX_ROW_SELECTED,mr as LIST_ROW_SELECTED_CLASS,an as MENU_CANCEL_LABEL,gr as MENU_ITEM_ACTIVATED,dn as MENU_TAPPED,pn as NOTIFY_ACTIVE,Xn as NOTIFY_CHECK_ACTIVE,Gn as NOTIFY_DROP_DOWN_SELECTED,$n as NOTIFY_ENTRY_TEXT,At as NOTIFY_EXPANDED,pe as NOTIFY_HEXPAND,yt as NOTIFY_N_PAGES,ot as NOTIFY_OPEN,bt as NOTIFY_POSITION,ye as NOTIFY_RESPONSE,br as NOTIFY_REVEAL_CHILD,Ct as NOTIFY_SELECTED,wn as NOTIFY_SELECTED_PAGE,zt as NOTIFY_SHOW_SIDEBAR,tn as NOTIFY_SIDEBAR_SELECTED,Br as NOTIFY_SLIDER_VALUE,Ar as NOTIFY_STACK_VISIBLE_CHILD,jr as NOTIFY_STACK_VISIBLE_CHILD_NAME,Ot as NOTIFY_TEXT,Pr as NOTIFY_TEXT_VIEW_TEXT,Rr as NOTIFY_TOGGLE_ACTIVE,jn as NOTIFY_TOGGLE_SELECTED,nn as NOTIFY_VALUE,me as NOTIFY_VEXPAND,Pt as NOTIFY_VIEW_SELECTED,Mt as NOTIFY_VISIBLE_CHILD,Bt as NOTIFY_VISIBLE_PAGE,Ft as NsNavigationSplitViewState,It as NsOverlaySplitViewState,Tn as PAGES_CHANGED,xt as PAGE_CHANGED,ce as PIXEL_SIZE_UNSET,Vt as PREFERENCES_CLOSED,Zr as ROW_ACTIVATED,st as SHEET_CLOSE,Ht as SHORTCUT_LABEL_CAP_TEXT_CLASS,Ut as SHORTCUT_LABEL_CLASS,Wt as SHORTCUT_LABEL_DIMMED_CLASS,Gt as SHORTCUT_LABEL_DISABLED_CLASS,Kt as SHORTCUT_LABEL_KEYCAP_CLASS,qt as SHORTCUT_LABEL_KEYS_CLASS,Jt as SHORTCUT_LABEL_SIDE_CLASS,Yt as SHORTCUT_LABEL_SPACED_CLASS,rn as SpinState,kn as TOAST_BUTTON_CLICKED,Mn as ToggleGroupState,Nn as WINDOW_BACKGROUND,e as addBreakpoints,Pe as adwaitaColorScheme,$r as adwaitaNsAccentColor,ei as adwaitaNsAccentCss,ti as applyAdwaitaNsAccent,ue as applyConstructProps,dt as applyMarkerClasses,hn as applyTabViewVisibility,ct as attachRowPressFeedback,Me as avatarInitials,Ln as boxChildTrack,Rn as boxSpacingChanges,zn as boxTrackPlan,Vn as buttonSlotAfterWrite,Hn as buttonSlotDetaches,ft as carouselDotClasses,pt as carouselNotifyPayload,mt as carouselPositionAtOffset,ht as carouselScrollOffset,ni as clearAdwaitaNsAccent,Ke as compiledIconNames,Pn as configureSystemBars,gt as createCarouselState,gn as createTabViewState,Wr as dataGridCellClass,Gr as dataGridItemSpec,Kr as dataGridRowClass,qr as dataGridShapeKey,Jr as dataGridTracksKey,De as dialogPresentationMode,te as evaluateBreakpointCondition,Ue as extractIconPaths,We as extractPathData,Oe as findDialogHost,er as gridChildAt,tr as gridGap,nr as gridSpacing,rr as gridTrackCounts,qe as iconValueKind,_t as indicatorMarkerClasses,le as isGtkIconSizeNick,Je as isIconAvailable,Fe as isThemeIconColor,ri as labelDisplayText,ii as labelMarkupIsUnparseable,fe as lengthValue,on as menuSheetActions,sn as menuSheetRows,Bn as normalizeBoxSpacing,vt as normalizeCarouselPageWidth,Cr as normalizePolicy,de as nsAlignment,ne as observeViewSize,Ie as onAdwaitaColorSchemeChanged,re as parseBreakpointCondition,Yr as parseDataGridWidth,wr as policyScrolls,cn as presentMenuSheet,registerAdwaitaElements,Ye as registerIcon,Xe as registeredIconNames,$e as renderSymbolicIcon,Ze as resolveIconSource,ln as resolveMenuChoice,vr as revealerChildVisibility,Tr as scrollOrientationFor,cr as selectionAfterModeChange,lr as selectionAfterTap,ur as selectionMode,Le as setAdwaitaColorScheme,Xt as shortcutLabelDirection,Zt as shortcutLabelPlatform,Qt as shortcutLabelRenderPlan,Lt as splitViewColumns,ke as surfaceSize,Fn as systemBarsConfig,_n as tabBarVisibility,vn as tabCloseVisibilities,yn as tabLabelText,bn as tabPageVisibilities,xn as tabTooltipText,Sn as tabViewNotifyPayload,Re as themeIconColor,ze as toggleAdwaitaColorScheme,we as transitionNick,Qe as unregisterIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{transitionNick as e}from"./transition-type.js";const t=[`none`,`single`,`browse`,`multiple`],n=`single`;function selectionMode(n){return e(n,t,`Gtk.SelectionMode`)}function selectionAfterTap(e,t,n){switch(e){case`none`:return[];case`multiple`:return t.includes(n)?t.filter(e=>e!==n):[...t,n];default:return[n]}}function selectionAfterModeChange(e,t){return e===`none`||e!==`multiple`&&t.length>1?[]:[...t]}export{n as DEFAULT_LIST_SELECTION_MODE,t as GTK_SELECTION_MODES,selectionAfterModeChange,selectionAfterTap,selectionMode};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";function lengthValue(e){if(typeof e==`object`&&e)return e.unit===`%`?null:Number.isFinite(e.value)?e.value:null;if(typeof e==`string`){let t=e.trim();if(t===``||t.endsWith(`%`))return null;let n=Number.parseFloat(t);return Number.isFinite(n)?n:null}return typeof e==`number`&&Number.isFinite(e)?e:null}export{lengthValue};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";function revealerChildVisibility(e){return e?`visible`:`collapse`}export{revealerChildVisibility};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{ActionRowState as e,ButtonRowState as t,SwitchRowState as n,WindowTitleState as r,adwaitaAccentBgColor as i,deriveRowLabels as a}from"@gjsify/adwaita-core";function nsVisibility(e){return e?`visible`:`collapse`}function rowLabelVisuals(e){return toLabelVisuals(a(e))}function toLabelVisuals(e){return{title:e.title,titleVisibility:nsVisibility(e.titleVisible),subtitle:e.subtitle,subtitleVisibility:nsVisibility(e.subtitleVisible)}}function buttonRowIconVisuals(e){return{startIcon:e.startIconName,startIconVisibility:nsVisibility(e.startIconVisible),endIcon:e.endIconName,endIconVisibility:nsVisibility(e.endIconVisible)}}function buttonRowIconColor(e,t){return e||i(t)}function isViewSensitive(e){return e?e.isUserInteractionEnabled!==!1:!0}export{e as ActionRowState,t as ButtonRowState,n as SwitchRowState,r as WindowTitleState,buttonRowIconColor,buttonRowIconVisuals,isViewSensitive,nsVisibility,rowLabelVisuals,toLabelVisuals};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{ActionRowState as e,ButtonRowState as t,SwitchRowState as n,WindowTitleState as r,adwaitaAccentBgColor as i,deriveRowLabels as a}from"@gjsify/adwaita-core";function nsVisibility(e){return e?`visible`:`collapse`}function switchClassName(e){return e?`adw-switch`:`adw-switch off`}function rowLabelVisuals(e){return toLabelVisuals(a(e))}function toLabelVisuals(e){return{title:e.title,titleVisibility:nsVisibility(e.titleVisible),subtitle:e.subtitle,subtitleVisibility:nsVisibility(e.subtitleVisible)}}function buttonRowIconVisuals(e){return{startIcon:e.startIconName,startIconVisibility:nsVisibility(e.startIconVisible),endIcon:e.endIconName,endIconVisibility:nsVisibility(e.endIconVisible)}}function buttonRowIconColor(e,t){return e||i(t)}function isViewSensitive(e){return e?e.isUserInteractionEnabled!==!1:!0}export{e as ActionRowState,t as ButtonRowState,n as SwitchRowState,r as WindowTitleState,buttonRowIconColor,buttonRowIconVisuals,isViewSensitive,nsVisibility,rowLabelVisuals,switchClassName,toLabelVisuals};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const e=[`always`,`automatic`,`never`,`external`],t=`automatic`;function normalizePolicy(t,n){if(typeof t==`number`&&Number.isInteger(t)&&e[t]!==void 0)return e[t];if(typeof t==`string`){let n=t.trim(),r=e.find(e=>e===n);if(r!==void 0)return r}throw TypeError(`'${String(t)}' is not a Gtk.PolicyType, so it cannot be '${n}'. The members are ${e.join(`, `)}.`)}function policyScrolls(e){return e!==`never`}function scrollOrientationFor(e,t){return policyScrolls(e)&&!policyScrolls(t)?`horizontal`:`vertical`}export{t as DEFAULT_SCROLLBAR_POLICY,e as GTK_POLICY_TYPES,normalizePolicy,policyScrolls,scrollOrientationFor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwStyledLayoutBase as e}from"./styled-layout-base.js";import{GridLayout as t,ItemSpec as n}from"@nativescript/core";var AdwSingleChildBase=class extends e{_child=null;constructor(){super(),this.addColumn(new n(1,`star`)),this.addRow(new n(1,`star`))}get child(){return this._child}set child(e){let t=e??null;t!==this._child&&(this._child&&=(this._release(this._child),null),t&&(this._child=t,this._adopt(t)))}set_child(e){this.child=e}get_child(){return this._child}_addChildFromBuilder(e,t){this.child=t}_adopt(e){t.setColumn(e,0),t.setRow(e,0),this.insertChild(e,0)}_release(e){this.removeChild(e)}};export{AdwSingleChildBase};
|
|
@@ -0,0 +1 @@
|
|
|
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{Observable as i}from"@nativescript/core";var GtkStackPage=class extends r(i){static builderSlots=e([`child`],`child`);_child=null;_name=``;_title=null;_iconName=null;_needsAttention=!1;_visible=!0;_useUnderline=!1;_stack=null;_awaiting=null;constructor(e){super(),n(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 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(`GtkStackPage '${this._name}' already belongs to a stack.`);this._stack=e}_awaitChild(e){this._awaiting=e}_refuseAfterAdoption(e){if(this._stack!==null)throw Error(`GtkStackPage '${this._name}' was read when its stack adopted it, so '${e}' can no longer reach the stack. Write it before the page is added, or use the stack's own methods.`)}};export{GtkStackPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";function normalizeStyleClasses(e){if(e==null)return[];let t=new Set;for(let n of e.split(/\s+/))n&&t.add(n);return[...t]}function classNameWith(e,t){return[e,...t].filter(e=>e!==``).join(` `)}function withCssClass(e,t){let n=(t??``).trim();return n===``||e.includes(n)?[...e]:[...e,n]}function withoutCssClass(e,t){let n=(t??``).trim();return e.filter(e=>e!==n)}export{classNameWith,normalizeStyleClasses,withCssClass,withoutCssClass};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";function normalizeStyleClasses(e){if(e==null)return[];let t=new Set;for(let n of e.split(/\s+/))n&&t.add(n);return[...t]}function classNameWith(e,t){return[e,...t].filter(e=>e!==``).join(` `)}function withCssClass(e,t){let n=(t??``).trim();return n===``||e.includes(n)?[...e]:[...e,n]}function withoutCssClass(e,t){let n=(t??``).trim();return e.filter(e=>e!==n)}var StyleClassList=class{_base;_classes=[];constructor(e=``){this._base=e}get classes(){return[...this._classes]}get className(){return classNameWith(this._base,this._classes)}replace(e){this._classes=normalizeStyleClasses(e)}replaceAll(e){this._classes=normalizeStyleClasses([...e].join(` `))}add(e){this._classes=withCssClass(this._classes,e)}remove(e){this._classes=withoutCssClass(this._classes,e)}has(e){return this._classes.includes((e??``).trim())}};export{StyleClassList,classNameWith,normalizeStyleClasses,withCssClass,withoutCssClass};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{withSignals as e}from"./signals.js";import{StyleClassList as t,classNameWith as n}from"./style-classes.js";import{GridLayout as r}from"@nativescript/core";var AdwStyledLayoutBase=class extends e(r){_style=new t;constructor(){super()}get styleClasses(){return this._style.classes}set styleClasses(e){this._style.replace(e),this._restyle()}add_css_class(e){this._style.add(e),this._restyle()}remove_css_class(e){this._style.remove(e),this._restyle()}has_css_class(e){return this._style.has(e)}get_css_classes(){return this._style.classes}set_css_classes(e){this._style.replaceAll(e),this._restyle()}get _ownClass(){return``}_restyle(){this.className=n(this._ownClass,this._style.classes)}};export{AdwStyledLayoutBase};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{systemBarsAppearance as e,systemBarsConfig as t}from"./system-bars.js";import{adwaitaColorScheme as n,onAdwaitaColorSchemeChanged as r}from"@gjsify/adwaita-core";import{Application as i}from"@nativescript/core";function apply(t){let r=(i.android?.foregroundActivity??i.android?.startActivity)?.getWindow?.(),a=r?.getDecorView?.(),o=androidx?.core?.view;if(!r||!a||!o)return;let s=e(t,n()),c=o.WindowCompat.getInsetsController(r,a);c?.setAppearanceLightStatusBars(s.lightStatusBars),c?.setAppearanceLightNavigationBars(s.lightNavigationBars);let l=s.background===null?0:android.graphics.Color.parseColor(s.background);r.setBackgroundDrawable(new android.graphics.drawable.ColorDrawable(l)),a.setBackgroundColor(l),android.os.Build.VERSION.SDK_INT>=29&&r.setNavigationBarContrastEnforced(!1)}let a=0,o=[];function observeSystemBars(){return a++===0&&(apply(t.bars),o=[r(()=>apply(t.bars)),t.subscribe(apply)]),()=>{if(--a===0){for(let e of o)e();o=[]}}}export{observeSystemBars};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";function observeSystemBars(){return()=>{}}export{observeSystemBars};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";function observeSystemBars(){return()=>{}}export{observeSystemBars};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const e={light:`#fafafb`,dark:`#222226`},t={insets:{top:!0,bottom:!0},statusBarIcons:`auto`,navigationBarIcons:`auto`,background:`window`};function resolveEdges(e,n=t.insets){return typeof e==`boolean`?{top:e,bottom:e}:e?{top:e.top??n.top,bottom:e.bottom??n.bottom}:n}function resolveSystemBars(e,n=t){return{insets:resolveEdges(e?.insets,n.insets),statusBarIcons:e?.statusBarIcons??n.statusBarIcons,navigationBarIcons:e?.navigationBarIcons??n.navigationBarIcons,background:e?.background??n.background}}function insetsForEdges(e,t){return{top:t.top?e.top:0,bottom:t.bottom?e.bottom:0,left:e.left,right:e.right}}function lightBarFlag(e,t){return e===`light`?!1:e===`dark`?!0:t===`light`}function barBackgroundColor(t,n){return t===`transparent`?null:t===`window`?e[n]:t}function systemBarsAppearance(e,t){return{lightStatusBars:lightBarFlag(e.statusBarIcons,t),lightNavigationBars:lightBarFlag(e.navigationBarIcons,t),background:barBackgroundColor(e.background,t)}}var SystemBarsConfig=class{_bars=t;_listeners=new Set;get bars(){return this._bars}configure(e){this._bars=resolveSystemBars(e,this._bars);for(let e of this._listeners)e(this._bars)}reset(){this._bars=t;for(let e of this._listeners)e(this._bars)}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}};const n=new SystemBarsConfig;function configureSystemBars(e){n.configure(e)}function withPageClass(e){let t=(e??``).split(/\s+/).filter(Boolean);return t.includes(`adw-window`)||t.push(`adw-window`),t.join(` `)}export{t as DEFAULT_SYSTEM_BARS,SystemBarsConfig,e as WINDOW_BACKGROUND,barBackgroundColor,configureSystemBars,insetsForEdges,lightBarFlag,resolveEdges,resolveSystemBars,systemBarsAppearance,n as systemBarsConfig,withPageClass};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const e=[`none`,`crossfade`,`slide-right`,`slide-left`,`slide-up`,`slide-down`,`swing-right`,`swing-left`,`swing-up`,`swing-down`,`fade-slide-right`,`fade-slide-left`,`fade-slide-up`,`fade-slide-down`],t=[`none`,`crossfade`,`slide-right`,`slide-left`,`slide-up`,`slide-down`,`slide-left-right`,`slide-up-down`,`over-up`,`over-down`,`over-left`,`over-right`,`under-up`,`under-down`,`under-left`,`under-right`,`over-up-down`,`over-down-up`,`over-left-right`,`over-right-left`,`rotate-left`,`rotate-right`,`rotate-left-right`],n=200,r=250;function transitionNick(e,t,n){if(typeof e==`number`&&Number.isInteger(e)&&t[e]!==void 0)return t[e];if(typeof e==`string`){let n=e.trim().replaceAll(`_`,`-`),r=t.find(e=>e===n);if(r!==void 0)return r}throw TypeError(`'${String(e)}' is not a ${n}. The members are ${t.join(`, `)}.`)}export{r as DEFAULT_REVEALER_TRANSITION_DURATION,n as DEFAULT_STACK_TRANSITION_DURATION,e as GTK_REVEALER_TRANSITIONS,t as GTK_STACK_TRANSITIONS,transitionNick};
|
|
@@ -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{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{
|
|
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{buildViewSwitcherButtons as u}from"@gjsify/adwaita-core";import{GridLayout as d,ItemSpec as f,Label as p,StackLayout as m}from"@nativescript/core";const h=`notify::selected`;function viewPagesOfStack(e){let t=[],n=e.pageIcons();for(let[r,i]of e.pages.entries())i.content!==void 0&&t.push({name:i.name,title:i.title,icon:(n[r]??``).length>0?n[r]:void 0,visible:i.visible,badgeNumber:i.badgeNumber,needsAttention:i.needsAttention,useUnderline:i.useUnderline,content:i.content});return t}var AdwViewSwitcherBase=class extends t(d){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 f(1,`star`)),this.addRow(new f(1,`auto`)),this.addRow(new f(1,`star`));let t=new d;t.horizontalAlignment=`stretch`,t.addRow(new f(1,`auto`)),d.setRow(t,0),this.addChild(t),this._bar=t;let n=new d;n.addColumn(new f(1,`star`)),n.addRow(new f(1,`star`)),d.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&&(d.setColumn(n.content,0),d.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 m;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 p;a.className=`${this.buttonClass}-label`,a.verticalAlignment=`middle`,t.addChild(a);let o=new p;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 f(1,`star`)),d.setColumn(t,e),d.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`;u(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};
|
|
@@ -1 +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
|
|
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";import{lengthValue as a}from"./ns-length.js";const o=`notify::hexpand`,s=`notify::vexpand`,c=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<=c)return n;throw TypeError(`'${String(e)}' is not a margin: '${t}' takes an integer from 0 to ${c}.`)}function sizeRequestOf(e,t){let n=typeof e==`string`&&e.trim()!==``?Number(e):e;if(typeof n==`number`&&Number.isInteger(n)&&n>=-1&&n<=2147483647)return n;throw TypeError(`'${String(e)}' is not a size request: '${t}' takes an integer from -1 (unset) upward.`)}function readSizeRequest(e){let t=a(e);return t!==null&&t>0?Math.round(t):-1}const l=new WeakMap,u=new WeakMap;function expandOf(e){let t=u.get(e);return t===void 0&&(t={h:!1,v:!1},u.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 u.get(this)?.h??!1}set hexpand(t){laidOut(this,`hexpand`);let n=expandOf(this),r=e(t,n.h);r!==n.h&&(n.h=r,this.notify({eventName:o,object:this}))}get vexpand(){return u.get(this)?.v??!1}set vexpand(t){laidOut(this,`vexpand`);let n=expandOf(this),r=e(t,n.v);r!==n.v&&(n.v=r,this.notify({eventName:s,object:this}))}get marginStart(){let e=viewOf(this);return e===null?0:a(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:a(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}get visible(){let e=viewOf(this);return e===null?!0:e.visibility===`visible`}set visible(t){let n=laidOut(this,`visible`);n.visibility=e(t,this.visible)?`visible`:`collapse`}get sensitive(){let e=viewOf(this);return e===null?!0:e.isEnabled!==!1}set sensitive(t){let n=laidOut(this,`sensitive`);n.isEnabled=e(t,this.sensitive)}get name(){return l.get(this)??this.constructor.name}set name(e){let t=laidOut(this,`name`),n=l.get(this),r=e??``;r===``?l.delete(this):l.set(this,r),(t.id===void 0||t.id===n)&&(t.id=r===``?void 0:r)}get widthRequest(){let e=viewOf(this);return e===null?-1:readSizeRequest(e.minWidth)}set widthRequest(e){let t=laidOut(this,`widthRequest`);t.minWidth=Math.max(0,sizeRequestOf(e,`widthRequest`))}get heightRequest(){let e=viewOf(this);return e===null?-1:readSizeRequest(e.minHeight)}set heightRequest(e){let t=laidOut(this,`heightRequest`);t.minHeight=Math.max(0,sizeRequestOf(e,`heightRequest`))}}return WithGtkWidgetLayout}export{o as NOTIFY_HEXPAND,s as NOTIFY_VEXPAND,withGtkWidgetLayout};
|