@gjsify/adwaita-nativescript 0.64.13-next.283 → 0.64.13
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/widgets/adw-about-dialog.js +3 -3
- package/lib/esm/widgets/adw-avatar.js +1 -1
- package/lib/esm/widgets/adw-banner.js +1 -1
- package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
- package/lib/esm/widgets/adw-carousel.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 -1
- package/lib/esm/widgets/adw-image-button.js +1 -1
- package/lib/esm/widgets/adw-navigation-page.js +1 -1
- package/lib/esm/widgets/adw-navigation-split-view.js +1 -1
- package/lib/esm/widgets/adw-navigation-view.js +1 -1
- package/lib/esm/widgets/adw-overlay-split-view.js +1 -1
- package/lib/esm/widgets/adw-password-entry-row.js +1 -1
- package/lib/esm/widgets/adw-preferences-dialog.js +1 -1
- package/lib/esm/widgets/adw-preferences-page.js +1 -1
- package/lib/esm/widgets/adw-sidebar.js +1 -1
- package/lib/esm/widgets/adw-slider-row.js +1 -1
- package/lib/esm/widgets/adw-spin-row.js +1 -1
- package/lib/esm/widgets/adw-split-button.js +1 -1
- package/lib/esm/widgets/adw-tab-view.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-switcher-bar.js +1 -1
- package/lib/esm/widgets/adw-wrap-box.js +1 -1
- package/lib/esm/widgets/construct-props.js +1 -1
- package/lib/esm/widgets/gtk-action-bar.js +1 -1
- 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 -1
- package/lib/esm/widgets/gtk-drawing-area.js +1 -1
- package/lib/esm/widgets/gtk-drop-down.js +1 -1
- package/lib/esm/widgets/gtk-entry.js +1 -1
- package/lib/esm/widgets/gtk-grid.js +1 -1
- package/lib/esm/widgets/gtk-icon-size.js +1 -1
- package/lib/esm/widgets/gtk-image.js +1 -1
- package/lib/esm/widgets/gtk-label.js +1 -1
- package/lib/esm/widgets/gtk-list-box.js +1 -1
- package/lib/esm/widgets/gtk-menu-button.js +1 -1
- package/lib/esm/widgets/gtk-revealer.js +1 -1
- package/lib/esm/widgets/gtk-scrolled-window.js +1 -1
- package/lib/esm/widgets/gtk-stack.js +1 -1
- package/lib/esm/widgets/gtk-text-view.js +1 -1
- package/lib/esm/widgets/gtk-toggle-button.js +1 -1
- package/lib/esm/widgets/gtk-window.js +1 -1
- package/lib/esm/widgets/label-markup.js +1 -1
- package/lib/esm/widgets/scrolled-window-policy.js +1 -1
- package/lib/esm/widgets/signals.js +1 -1
- package/lib/esm/widgets/single-child-base.js +1 -1
- package/lib/esm/widgets/single-child-cell.js +1 -0
- package/lib/esm/widgets/stack-page.js +1 -1
- package/lib/esm/widgets/transition-type.js +1 -1
- package/lib/esm/widgets/view-stack-page.js +1 -1
- package/lib/esm/widgets/widget-layout.js +1 -1
- package/lib/esm/widgets/xml-values.js +1 -1
- package/lib/types/clamped-bin.spec.d.ts +2 -0
- package/lib/types/combo-row-properties.spec.d.ts +2 -0
- package/lib/types/drop-down-properties.spec.d.ts +2 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/single-child-cell.spec.d.ts +2 -0
- package/lib/types/testing/ns-core.d.mts +24 -2
- package/lib/types/widgets/adw-combo-row.d.ts +42 -26
- package/lib/types/widgets/gtk-drop-down.d.ts +41 -33
- package/lib/types/widgets/index.d.ts +1 -2
- package/lib/types/widgets/signals.d.ts +33 -8
- package/lib/types/widgets/single-child-base.d.ts +2 -0
- package/lib/types/widgets/single-child-cell.d.ts +8 -0
- package/lib/types/widgets/xml-values.d.ts +12 -0
- package/package.json +13 -14
- package/src/testing/ns-core.mts +55 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e,resolveBuilderSlot as t}from"./builder-slots.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{GridLayout as a,ItemSpec as o,StackLayout as s}from"@nativescript/core";const c=[`start`,`center`,`end`];var GtkActionBar=class extends i(a){static GTypeName=`GtkActionBar`;static builderSlots=e(c,`start`);_startBox;_endBox;_centerWidget=null;_revealed=!0;constructor(e){super(),this.className=`adw-action-bar`,this.addColumn(new o(1,`star`)),this.addColumn(new o(1,`auto`)),this.addColumn(new o(1,`star`)),this.addRow(new o(1,`auto`));let t=new s;t.orientation=`horizontal`,t.className=`adw-action-bar-start`,t.horizontalAlignment=`left`,a.setColumn(t,0),this.addChild(t),this._startBox=t;let n=new s;n.orientation=`horizontal`,n.className=`adw-action-bar-end`,n.horizontalAlignment=`right`,a.setColumn(n,2),this.addChild(n),this._endBox=n,r(this,e)}pack_start(e){this._startBox.addChild(e)}pack_end(e){this._endBox.insertChild(e,0)}set_center_widget(e){this._centerWidget&&this.removeChild(this._centerWidget),this._centerWidget=e,e&&(e.verticalAlignment=`middle`,a.setColumn(e,1),this.addChild(e))}get centerWidget(){return this._centerWidget}get startBox(){return this._startBox}get endBox(){return this._endBox}_addChildFromBuilder(e,n){switch(t(e,c,`start`)){case`center`:this.set_center_widget(n);return;case`end`:this.pack_end(n);return;default:this.pack_start(n)}}get revealed(){return this._revealed}set revealed(e){this._revealed=n(e,this._revealed),this.visibility=this._revealed?`visible`:`collapse`}};export{GtkActionBar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
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{static GTypeName=`GtkBox`;_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){let n=super.insertChild(e,t);return this._follow(e),this._applyChildren(),n}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{
|
|
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{activateWidgetAction as r}from"./actions.js";import{applyNativeTooltip as i}from"./native-tooltip.js";import{withSignals as a}from"./signals.js";import{GtkImage as o}from"./gtk-image.js";import{attachRowPressFeedback as s}from"./row-press.js";import{classNameWith as c,normalizeStyleClasses as l,withCssClass as u,withoutCssClass as d}from"./style-classes.js";import{buttonSlotAfterWrite as f,buttonSlotDetaches as p}from"./button-slot.js";import{labelDisplayText as m}from"@gjsify/adwaita-core";import{GridLayout as h,ItemSpec as g,Label as _}from"@nativescript/core";const v=`clicked`,y=`image-button`,b=`adw-button-label`;var GtkButton=class extends a(h,{GTypeName:`GtkButton`,Signals:{clicked:{}}}){static GTypeName=`GtkButton`;static builderSlots=e([`child`],`child`);_styleClasses=[];_label=``;_iconName=``;_tooltipText=``;_useUnderline=!1;_slot=`empty`;_content=null;constructor(e){super(),this.className=c(`adw-button`,this._styleClasses),this.addRow(new g(1,`star`)),this.addColumn(new g(1,`star`)),s(this),this.addEventListener(`tap`,()=>{this.emit(v),this.actionName&&r(this,this.actionName)}),this.addEventListener(`loaded`,()=>{i(this,this.tooltipText),this._pinIconColor()}),n(this,e)}get label(){return this._label}set label(e){this._label=e??``,this._fill(`label`,this._label)}actionName=null;get iconName(){return this._iconName}set iconName(e){this._iconName=e??``,this._fill(`icon`,this._iconName)}get tooltipText(){return this._tooltipText}set tooltipText(e){let t=e??``;(this.accessibilityHint??``)===this._tooltipText&&(this.accessibilityHint=t),this._tooltipText=t,i(this,t)}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(l(e))}add_css_class(e){this._setClasses(u(this._styleClasses,e))}remove_css_class(e){this._setClasses(d(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(l([...e].join(` `)))}_setClasses(e){this._styleClasses=[...e],this._restyle()}_restyle(){this.className=c(`adw-button`,[...this._styleClasses,...this._stateClasses()]),this._pinIconColor()}_stateClasses(){return this._slot===`icon`?[y]:[]}_fill(e,t){let n=f(e,t);p(this._slot,n)&&this._detach();let r=this._slot===`icon`;if(this._slot=n,r!==(n===`icon`)&&this._restyle(),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 _?this._content:this._adopt(new _);e.className=b,e.text=m(this._label,!1,this._useUnderline);return}let i=this._content instanceof o?this._content:this._adopt(new o);i.iconName=this._iconName,this._pinIconColor()}_pinIconColor(){this._content instanceof o&&(this._styleClasses.some(e=>e===`osd`||e===`suggested-action`)||this._inOsdContainer())&&(this._content.iconColor=`#ffffff`)}_inOsdContainer(){for(let e=this.parent;e;e=e.parent)if((e.className??``).split(/\s+/).includes(`osd`))return!0;return!1}_detach(){this._content&&this.removeChild(this._content),this._content=null}_adopt(e){return e.horizontalAlignment=`center`,e.verticalAlignment=`middle`,h.setColumn(e,0),h.setRow(e,0),this.addChild(e),this._content=e,e}};export{v as GTK_BUTTON_CLICKED,y as GTK_BUTTON_IMAGE_CLASS,b as GTK_BUTTON_LABEL_CLASS,GtkButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.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{GtkImage as r}from"./gtk-image.js";import{attachRowPressFeedback as i}from"./row-press.js";import{classNameWith as a}from"./style-classes.js";import{AdwStyledLayoutBase as o}from"./styled-layout-base.js";import{resolveIdReference as s}from"./id-reference.js";import{checkActivationFlips as c,checkGroupNeighbours as l,isRadioCheck as u,labelDisplayText as d,setCheckGroup as f}from"@gjsify/adwaita-core";import{GridLayout as p,ItemSpec as m,Label as h}from"@nativescript/core";import{objectSelectSymbolic as g}from"@gjsify/adwaita-icons/actions";const _=`toggled`,v=`activate`,y=`notify::active`,b=`checked`,x=`inconsistent`;var S=class GtkCheckButton extends o{static GTypeName=`GtkCheckButton`;static emittedSignals=[_,v,y];static builderSlots=e([`child`],`child`);static builderReferences=[`group`];_indicator;_mark;_text;_active=!1;_inconsistent=!1;_label=null;_useUnderline=!1;_child=null;_groupId=null;_contentUnit=`auto`;constructor(e){super(),this.addColumn(new m(1,`auto`)),this.addColumn(new m(1,`auto`)),this.addRow(new m(1,`auto`));let t=new p;t.className=`adw-check-indicator`,t.addColumn(new m(1,`star`)),t.addRow(new m(1,`star`)),t.verticalAlignment=`middle`,p.setColumn(t,0),p.setRow(t,0);let a=new r;a.iconName=g,a.pixelSize=14,a.iconColor=`#ffffff`,a.horizontalAlignment=`center`,a.verticalAlignment=`middle`,a.visibility=`collapse`,t.addChild(a),this.addChild(t),this._indicator=t,this._mark=a;let o=new h;o.className=`adw-check-label`,o.verticalAlignment=`middle`,o.visibility=`collapse`,p.setColumn(o,1),p.setRow(o,0),this.addChild(o),this._text=o,this.addEventListener(`loaded`,()=>this._resolveGroupId()),i(this),this.addEventListener(`tap`,()=>{c(this,this._active)&&(this._inconsistent=!1,this.active=!this._active,this._restyle(),this.notify({eventName:v,object:this}))}),this._restyle(),n(this,e)}get active(){return this._active}set active(e){let n=t(e,this._active);if(n!==this._active){if(n)for(let e of l(this))e.active=!1;this._active=n,this._restyle(),this.notify({eventName:_,object:this}),this.notify({eventName:y,object:this})}}set group(e){if(typeof e==`string`){this._groupId=e,this.isLoaded&&this.set_group(s(this,`group`,e,GtkCheckButton));return}this._groupId=null,this.set_group(e)}set_group(e){f(this,e),this._restyle(),e?._restyle()}_resolveGroupId(){let e=this._groupId;e!==null&&(this._groupId=null,this.set_group(s(this,`group`,e,GtkCheckButton)))}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=d(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&&(p.setColumn(t,1),p.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(){let e=!!this._child||!!this._label;this._text.visibility=!this._child&&this._label?`visible`:`collapse`;let t=e?`star`:`auto`;t!==this._contentUnit&&(this._contentUnit=t,this.removeColumns(),this.addColumn(new m(1,`auto`)),this.addColumn(new m(1,t)))}get _ownClass(){return`adw-check-button`}_restyle(){let e=[];this._active&&e.push(b),this._inconsistent&&e.push(x),this.className=a(this._ownClass,[...this.styleClasses,...e]),this._indicator.className=a(`adw-check-indicator`,u(this)?[...e,`radio`]:e),this._mark.visibility=this._active||this._inconsistent?`visible`:`collapse`}};export{v as GTK_CHECK_BUTTON_ACTIVATE,b as GTK_CHECK_BUTTON_CHECKED_CLASS,x as GTK_CHECK_BUTTON_INCONSISTENT_CLASS,_ as GTK_CHECK_BUTTON_TOGGLED,S as GtkCheckButton,y as NOTIFY_CHECK_ACTIVE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{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{static GTypeName=`GtkDrawingArea`;_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{applyConstructProps as n}from"./construct-props.js";import{
|
|
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{pushDeclared as r,readDeclaredValue as i,withSignals as a}from"./signals.js";import{GtkImage as o}from"./gtk-image.js";import{attachRowPressFeedback as s}from"./row-press.js";import{ADW_COMBO_NO_SELECTION as c,ComboState as l,GjsifyOptionList as u,ListModel as d,TYPE_OBJECT as f,readModelWrite as p}from"@gjsify/adwaita-core";import{Label as m,StackLayout as h,action as g}from"@nativescript/core";import{panDownSymbolic as _}from"@gjsify/adwaita-icons/ui";const v=`notify::selected`,y=`notify::selected-item`;var GtkDropDown=class extends a(h,{GTypeName:`GtkDropDown`,Properties:{model:{kind:`object`,valueType:d,explicitNotify:!0,blurb:`Model for the displayed items`,normalize:(e,t)=>p(e,t._authored),afterNotify:e=>e._applyModel()},selected:{kind:`int`,default:c,explicitNotify:!0,blurb:`Position of the selected item`,normalize:(e,t)=>{let n=t,r=i(`selected`,`int`,e);return n._state.count===0?(n._pendingSelected=r,n.selected):n._state.hasIndex(r)?r:n.selected},afterNotify:e=>e._applySelected()},"selected-item":{kind:`object`,valueType:f,explicitNotify:!0,blurb:`The selected item`,normalize:(e,t)=>t._state.selectedItem}}}){static GTypeName=`GtkDropDown`;static builderSlots=e([`model`],`model`);_label;_chevron;_state=new l;_authored=u.new(null);_chooserTitle=``;_pendingSelected=null;_applyModel(){this._state.setModel(this.model);let e=this._pendingSelected;e!==null&&this._state.hasIndex(e)&&(this._pendingSelected=null,this._state.setSelectedIndex(e))}_applySelected(){this._state.setSelectedIndex(this.selected)}constructor(e){super(),this.orientation=`horizontal`,this.className=`adw-drop-down`;let t=new m;t.className=`adw-drop-down-label`,t.text=``;let i=new o;i.className=`adw-drop-down-chevron`,i.iconName=_,this.addChild(t),this.addChild(i),this._label=t,this._chevron=i,this._state.subscribe(e=>{r(this,`selected`,e.selected),r(this,`selected-item`,this._state.selectedItem),this._label.text=e.label}),this._state.subscribeNotify(e=>{r(this,e,this._valueOf(e)),this.notify(e)}),this.addEventListener(`tap`,()=>{this._openChooser()}),s(this),n(this,e)}_valueOf(e){return e===`model`?this._state.model:e===`selected`?this._state.selectedIndex:this._state.selectedItem}async _openChooser(){if(this._state.count===0)return;let e=this._state.options.map(e=>e.label),t=await g({title:this._chooserTitle||void 0,cancelButtonText:`Cancel`,actions:e});this._state.select(e.indexOf(t))}get options(){return this._state.options}set_model(e){this.model=e}get_model(){return this.model}_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.selected}set_selected(e){this.selected=e}get selectedValue(){return this._state.selectedValue}set selectedValue(e){this._state.setSelectedValue(e)}get_selected_item(){return this.selectedItem}get chooserTitle(){return this._chooserTitle}set chooserTitle(e){this._chooserTitle=e??``}};export{GtkDropDown,v as NOTIFY_SELECTED,y as NOTIFY_SELECTED_ITEM};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.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`,f=`changed`;var GtkEntry=class extends r(s){static GTypeName=`GtkEntry`;static emittedSignals=[f,u,d];_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({eventName:f,object:this}),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,f as CHANGED,GtkEntry,u as NOTIFY_TEXT};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.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{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{static GTypeName=`GtkGrid`;_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){let n=super.insertChild(e,t);return this._follow(e),this._relayout(),n}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";const
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{gtkBuilderInteger as e}from"./xml-values.js";const t=[`inherit`,`normal`,`large`],n={inherit:16,normal:16,large:32},r=n.inherit,i=Object.freeze(Object.fromEntries(t.map((e,t)=>[e,t])));function isGtkIconSizeNick(e){return typeof e==`string`&&t.includes(e)}function iconSizeNickOf(e){if(typeof e!=`number`)return e;let n=t.find(t=>i[t]===e);if(n!==void 0)return n;throw TypeError(`${e} is not a Gtk.IconSize constant. The three members are ${t.join(`, `)}, holding the values ${t.map(e=>i[e]).join(`, `)}. For a size in DIPs use \`pixelSize\`, which is what \`Gtk.Image:pixel-size\` is.`)}function gtkIconSizeNick(n,r){if(isGtkIconSizeNick(n))return n;let i=typeof n==`string`?e(n):void 0;if(i!==void 0){let e=iconSizeNickOf(i);if(isGtkIconSizeNick(e))return e}throw TypeError(`Gtk.IconSize: ${JSON.stringify(n)} is not a member — it takes one of ${t.join(`, `)} (staying at '${r}'). For a size in DIPs use \`pixelSize\`, which is what \`Gtk.Image:pixel-size\` is.`)}const a=-1;function storedPixelSize(e){return Number.isFinite(e)&&e>0?e:-1}function iconPixelSize(e,t){return Number.isFinite(t)&&t>0?t:n[e]}export{r as DEFAULT_ICON_PIXEL_SIZE,i as GTK_ICON_SIZE,t as GTK_ICON_SIZE_NICKS,n as GTK_ICON_SIZE_PIXELS,a as PIXEL_SIZE_UNSET,gtkIconSizeNick,iconPixelSize,iconSizeNickOf,isGtkIconSizeNick,storedPixelSize};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{DEFAULT_ICON_PIXEL_SIZE as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{DEFAULT_ICON_PIXEL_SIZE as t,gtkIconSizeNick as n,iconPixelSize as r,storedPixelSize as i}from"./gtk-icon-size.js";import{applyConstructProps as a}from"./construct-props.js";import{withSignals as o}from"./signals.js";import{onAdwaitaColorSchemeChanged as s,themeIconColor as c}from"./color-scheme.js";import{DEFAULT_ICON_COLOR as l}from"./icon-path.js";import{drawIcon as u,onIconsChanged as d}from"./icon-render.js";import{Image as f}from"@nativescript/core";const p=t;var GtkImage=class extends o(f){static GTypeName=`GtkImage`;_icon=``;_iconColor=c();_explicitColor=!1;_iconSize=`inherit`;_pixelSize=-1;_unsubScheme=null;_unsubIcons=null;constructor(e){super(),this.className=`adw-icon`,this.stretch=`aspectFit`,this._applySize(),this.addEventListener(`loaded`,()=>{this._syncThemeColor(),this._unsubScheme??=s(()=>this._syncThemeColor()),this._unsubIcons??=d(()=>this._render())}),this.addEventListener(`unloaded`,()=>{this._unsubScheme?.(),this._unsubScheme=null,this._unsubIcons?.(),this._unsubIcons=null}),a(this,e)}_syncThemeColor(){if(this._explicitColor)return;let e=c();e!==this._iconColor&&(this._iconColor=e,this._render())}get _renderedSize(){return r(this._iconSize,this._pixelSize)}_applySize(){let e=this._renderedSize;this.width=e,this.height=e,this._render()}_render(){u(this,this._icon,this._renderedSize,this._iconColor)}get iconName(){return this._icon}set iconName(e){this._icon=e??``,this._render()}get iconColor(){return this._iconColor}set iconColor(e){this._explicitColor=!0,this._iconColor=e||l,this._render()}get iconSize(){return this._iconSize}set iconSize(e){this._iconSize=n(e,this._iconSize),this._applySize()}get pixelSize(){return this._pixelSize}set pixelSize(t){this._pixelSize=i(e(t,this._pixelSize)),this._applySize()}};export{p as DEFAULT_GTK_IMAGE_SIZE,GtkImage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.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{androidApiLevel as r}from"./native-tooltip.js";import{withSignals as i}from"./signals.js";import{nativePlatformHost as a}from"../platform-host.js";import{classNameWith as o,normalizeStyleClasses as s,withCssClass as c,withoutCssClass as l}from"./style-classes.js";import{labelMarkupFormattedString as u,labelMarkupNeedsSpans as d}from"./label-markup.js";import{DEFAULT_LABEL_LINES as f,DEFAULT_LABEL_XALIGN as p,HandledAccumulator as m,LABEL_JUSTIFICATIONS as h,createAppInfo as g,labelActivateLink as _,labelDisplayText as v,labelEffectiveLines as y,labelEllipsizeOverflowValue as b,labelHasLinks as x,labelLinkVisited as S,labelMarkupRender as C,normalizeLabelEllipsize as w,normalizeLabelLines as T,normalizeLabelXalign as E}from"@gjsify/adwaita-core";import{Label as D}from"@nativescript/core";const O=`activate-link`,k=g(a),A=new Map([[0,`start`],[.5,`center`],[1,`end`]]),j={left:`start`,right:`end`,center:`center`,fill:`start`};function physical(e,t){return e===`center`?`center`:e===`start`===t?`right`:`left`}var GtkLabel=class extends i(D){static GTypeName=`GtkLabel`;_label=``;_useMarkup=!1;_useUnderline=!1;_ellipsize=`none`;_lines=-1;_styleClasses=[];_xalign=p;_xalignWritten=!1;_justify=`left`;_selectable=!1;_links=[];constructor(e){super(),this.addEventListener(`loaded`,()=>{this._applySelectable(),this._applyJustificationMode()}),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){let n=e(t,this.textWrap);this._applyAlignment({wrap:n}),this.textWrap=n}get ellipsize(){return this._ellipsize}set ellipsize(e){this._ellipsize=w(e),this.textOverflow=b(this._ellipsize),this._applyLines()}get lines(){return this._lines}set lines(e){this._lines=T(t(e,f)),this._applyLines()}get selectable(){return this._selectable}set selectable(t){this._selectable=e(t,this._selectable),this._applySelectable()}_applySelectable(){this.nativeViewProtected?.setTextIsSelectable?.(this._selectable)}_applyLines(){this.maxLines=y(this._lines,this._ellipsize)??0}get justify(){return this._justify}set justify(e){let n=h.includes(e)?e:h[t(e,-1)];if(n===void 0)throw TypeError(`'${String(e)}' is not a Gtk.Justification, so it cannot be 'justify'. The members are ${h.join(`, `)}, or their values 0 to 3.`);this._applyAlignment({justify:n})}get xalign(){return this._xalign}set xalign(e){let n=E(t(e,p));if(!A.has(n))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._applyAlignment({xalign:n})}_applyAlignment(e){let t=e.xalign??(this._xalignWritten?this._xalign:null),n=e.justify??this._justify,r=e.text??this.text??``,i=(e.wrap??this.textWrap)||r.includes(`
|
|
2
2
|
`),a=j[n],o=t===null?null:A.get(t),s;if(o===null)s=n===`left`?null:a;else if(o===a||!i||n===`left`)s=o;else throw TypeError(`Gtk.Label justify ${n} beside xalign ${t} has no NativeScript counterpart on a label that can show several lines: GTK places the text block at its ${o} and aligns the lines inside it to their ${a}, and textAlignment is one alignment for both. An xalign on the justify edge, or a label without wrap and newline, renders exactly.`);if(e.xalign!==void 0&&(this._xalign=e.xalign,this._xalignWritten=!0),e.justify!==void 0&&(this._justify=e.justify),s===null){(e.xalign!==void 0||e.justify!==void 0)&&(this.textAlignment=`initial`);return}let c=physical(s,this.style?.direction===`rtl`);this.textAlignment=n===`fill`&&c===`left`?`justify`:c,this._applyJustificationMode()}_applyJustificationMode(){this.textAlignment===`justify`||r()<26||this.nativeViewProtected?.setJustificationMode?.(+(this._justify===`fill`))}get styleClasses(){return[...this._styleClasses]}set styleClasses(e){this._setClasses(s(e))}get_label(){return this.label}set_label(e){this.label=e}set_markup(e){this._label=e??``,this._useMarkup=!0,this._render()}get_text(){return this.text??``}add_css_class(e){this._setClasses(c(this._styleClasses,e))}remove_css_class(e){this._setClasses(l(this._styleClasses,e))}has_css_class(e){return this._styleClasses.includes((e??``).trim())}get_css_classes(){return[...this._styleClasses]}set_css_classes(e){this._setClasses(s([...e].join(` `)))}_setClasses(e){this._styleClasses=[...e],this.className=o(``,this._styleClasses)}_render(){let e=this._useMarkup?C(this._label,this._links):null;this._links=e?.links??[];let t=v(this._label,this._useMarkup,this._useUnderline);this._applyAlignment({text:t});let n=x(this._links);if(n!==this._styleClasses.includes(`link`)&&this._setClasses(n?c(this._styleClasses,`link`):l(this._styleClasses,`link`)),e!==null&&d(e)){this.text=t,this.formattedText=u(e,this._useUnderline,this.style.fontSize,e=>this._activateLink(e));return}this.formattedText!==null&&this.formattedText!==void 0&&(this.formattedText=null),this.text=t}_activateLink(e){let t=this._links[e];t!==void 0&&_(t.href,{rooted:this.isLoaded,emit:()=>{let e=new m;return this.notify({eventName:O,object:this,uri:t.href,accumulator:e}),e.stopped},launch:e=>this.launch(e)})&&(this._links=S(this._links,e))}launch(e){try{k.launch_default_for_uri(e,null)}catch{}}};export{O as ACTIVATE_LINK,GtkLabel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.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{ACTIVATED as n}from"./adw-action-row.js";import{addMarkerClass as r,removeMarkerClass as i}from"./bottom-sheet-state.js";import{AdwStyledLayoutBase as a}from"./styled-layout-base.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 a=n?r(e.className,t):i(e.className,t);a!==(e.className??``)&&(e.className=a)}var GtkListBox=class extends a{static GTypeName=`GtkListBox`;_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){let n=super.insertChild(e,t);return this._adopt(e),n}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{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{classNameWith as n,normalizeStyleClasses as r,withCssClass as i,withoutCssClass as a}from"./style-classes.js";import{AdwImageButton as o}from"./adw-image-button.js";import{assertPopupMenuAssignable as s,refuseMenuString as c}from"./popup-menu.js";import{showMenuPopup as l}from"./popup-menu-view.js";import{normalizeMenuModel as u}from"@gjsify/adwaita-core";const d=`menuItemActivated`;var GtkMenuButton=class extends o{static GTypeName=`GtkMenuButton`;_model=[];_actions=null;_menuTitle=``;_primary=!1;_baseClassName;_styleClasses=[];constructor(e){super(),this._baseClassName=`${this.className} adw-menu-button`.trim(),this.className=this._baseClassName,this.addEventListener(`tap`,()=>this._openMenu()),t(this,e)}get menuModel(){return this._model}set menuModel(e){c(e,`GtkMenuButton`);let t=u(e);s(t),this._model=t}get menu_model(){return this.menuModel}set menu_model(e){this.menuModel=e}get_menu_model(){return this.menuModel}set_menu_model(e){this.menuModel=e}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(r(e))}get primary(){return this._primary}set primary(t){this._primary=e(t,this._primary)}add_css_class(e){this._setClasses(i(this._styleClasses,e))}remove_css_class(e){this._setClasses(a(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(r([...e].join(` `)))}_setClasses(e){this._styleClasses=e,this.className=n(this._baseClassName,e)}_openMenu(){this._model.length!==0&&l(this,{model:this._model,actions:this._actions,onActivated:(e,t)=>{let n={eventName:d,object:this,id:e.id??e.label,label:e.label,path:t,action:e.action};this.notify(n)}})}};export{GtkMenuButton,d as MENU_ITEM_ACTIVATED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.js";import{
|
|
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{GTK_REVEALER_TRANSITIONS as i,transitionNick as a}from"./transition-type.js";import{AdwSingleChildBase as o}from"./single-child-base.js";import{revealerChildVisibility as s}from"./revealer-state.js";const c=`notify::reveal-child`;var GtkRevealer=class extends o{static GTypeName=`GtkRevealer`;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=a(e,i,`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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.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{AdwSingleChildBase as r}from"./single-child-base.js";import{DEFAULT_SCROLLBAR_POLICY as i,GTK_POLICY_TYPES as a,normalizePolicy as o,scrollOrientationFor as s}from"./scrolled-window-policy.js";import{GtkAdjustment as c}from"@gjsify/adwaita-core";import{ContentView as l,GridLayout as u,ScrollView as d}from"@nativescript/core";var GtkScrolledWindow=class extends r{static GTypeName=`GtkScrolledWindow`;static builderSlots=e([`child`],`child`);_scroll=new d;_viewport=new l;_hscrollbarPolicy=i;_vscrollbarPolicy=i;_hasFrame=!1;_hadjustment=null;_vadjustment=null;_listening=!1;_syncing=!1;constructor(e){super(),u.setColumn(this._scroll,0),u.setRow(this._scroll,0),this._scroll.content=this._viewport,this.addChild(this._scroll),this._applyOrientation(),n(this,e)}get hscrollbarPolicy(){return this._hscrollbarPolicy}set hscrollbarPolicy(e){this._hscrollbarPolicy=o(e,`hscrollbar-policy`),this._applyOrientation()}get vscrollbarPolicy(){return this._vscrollbarPolicy}set vscrollbarPolicy(e){this._vscrollbarPolicy=o(e,`vscrollbar-policy`),this._applyOrientation()}get_policy(){return[a.indexOf(this._hscrollbarPolicy),a.indexOf(this._vscrollbarPolicy)]}set_policy(e,t){for(let[n,r]of[[e,`hscrollbar_policy`],[t,`vscrollbar_policy`]])if(!Number.isInteger(n)||a[n]===void 0)throw TypeError(`${n} is not a valid value for enum argument ${r}`);this.hscrollbarPolicy=a[e],this.vscrollbarPolicy=a[t]}get hadjustment(){return this._hadjustment??=this._track(`horizontal`,new c)}get vadjustment(){return this._vadjustment??=this._track(`vertical`,new c)}get_hadjustment(){return this.hadjustment}get_vadjustment(){return this.vadjustment}set_hadjustment(e){this._hadjustment=this._track(`horizontal`,e)}set_vadjustment(e){this._vadjustment=this._track(`vertical`,e)}_track(e,t){return this._listening||(this._listening=!0,this._scroll.addEventListener(`scroll`,this._syncAdjustments),this._scroll.addEventListener(`layoutChanged`,this._syncAdjustments),this._viewport.addEventListener(`layoutChanged`,this._syncAdjustments)),t.connect(`value-changed`,()=>{let n=e===`horizontal`?this._hadjustment:this._vadjustment;this._syncing||n!==t||(e===`horizontal`?this._scroll.scrollToHorizontalOffset(t.value,!1):this._scroll.scrollToVerticalOffset(t.value,!1))}),this._syncAxis(e,t),t}_syncAdjustments=()=>{this._hadjustment&&this._syncAxis(`horizontal`,this._hadjustment),this._vadjustment&&this._syncAxis(`vertical`,this._vadjustment)};_syncAxis(e,t){let n=e===`vertical`,r=this._scroll.getActualSize(),i=this._viewport.getActualSize(),a=n?r.height:r.width,o=Math.max(n?i.height:i.width,a),s=n?this._scroll.verticalOffset:this._scroll.horizontalOffset;this._syncing=!0;try{t.configure(s,0,o,a*.1,a*.9,a)}finally{this._syncing=!1}}get hasFrame(){return this._hasFrame}set hasFrame(e){this._hasFrame=t(e,this._hasFrame)}_adopt(e){this._viewport.content=e}_release(e){this._viewport.content===e&&(this._viewport.content=null)}_applyOrientation(){let e=s(this._hscrollbarPolicy,this._vscrollbarPolicy);this._scroll.orientation=e}};export{GtkScrolledWindow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.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{GTK_STACK_TRANSITIONS as i,transitionNick as a}from"./transition-type.js";import{StyleClassList as o}from"./style-classes.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 GTypeName=`GtkStack`;static emittedSignals=[p,m];static builderSlots=[];_state=c();_classList=new o;_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_visible_child_name(){return this.visibleChildName}set_visible_child_name(e){this.visibleChildName=e}get_visible_child(){return this.visibleChild}set_visible_child(e){this.visibleChild=e}get transitionType(){return this._transitionType}set transitionType(e){this._transitionType=a(e,i,`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._classList.classes}set styleClasses(e){this._classList.replace(e),this._restyle()}add_css_class(e){this._classList.add(e),this._restyle()}remove_css_class(e){this._classList.remove(e),this._restyle()}has_css_class(e){return this._classList.has(e)}get_css_classes(){return this._classList.classes}set_css_classes(e){this._classList.replaceAll(e),this._restyle()}_restyle(){this.className=this._classList.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{gtkBuilderInteger as e,xmlBoolean as t,xmlNumber as n}from"./xml-values.js";import{applyConstructProps as r}from"./construct-props.js";import{withSignals as i}from"./signals.js";import{classNameWith as a}from"./style-classes.js";import{GridLayout as o,ItemSpec as s,TextView as c}from"@nativescript/core";const l=`notify::text`,u=[`none`,`char`,`word`,`word-char`];var GtkTextView=class extends i(o){static GTypeName=`GtkTextView`;_field;_text=``;_monospace=!1;_wrapMode=`none`;constructor(e){super(),this.className=`adw-text-view`,this.addColumn(new s(1,`star`)),this.addRow(new s(1,`star`));let t=new c;t.className=`adw-text-view-input`,t.set(`backgroundColor`,`transparent`),t.set(`borderWidth`,0),this.addChild(t),this._field=t,t.addEventListener(`textChange`,()=>this._applyText(this._field.text??``)),r(this,e)}_applyText(e){if(this._field.text!==e&&(this._field.text=e),e===this._text)return;this._text=e;let t={eventName:l,object:this};this.notify(t)}get text(){return this._text}set text(e){this._applyText(e??``)}get editable(){return this._field.editable}set editable(e){this._field.editable=!!t(e,this.editable)}get monospace(){return this._monospace}set monospace(e){this._monospace=!!t(e,this._monospace),this.className=a(`adw-text-view`,this._monospace?[`monospace`]:[])}get wrapMode(){return this._wrapMode}set wrapMode(t){let n=e(t)??u.indexOf(String(t).replace(/_/g,`-`)),r=u[n];if(r===void 0)throw TypeError(`Gtk.TextView.wrapMode: ${JSON.stringify(t)} is not a Gtk.WrapMode; expected ${u.join(`, `)}.`);this._wrapMode=r}get topMargin(){return this._margin(`paddingTop`)}set topMargin(e){this._field.paddingTop=n(e,this._margin(`paddingTop`))}get bottomMargin(){return this._margin(`paddingBottom`)}set bottomMargin(e){this._field.paddingBottom=n(e,this._margin(`paddingBottom`))}get leftMargin(){return this._margin(`paddingLeft`)}set leftMargin(e){this._field.paddingLeft=n(e,this._margin(`paddingLeft`))}get rightMargin(){return this._margin(`paddingRight`)}set rightMargin(e){this._field.paddingRight=n(e,this._margin(`paddingRight`))}_margin(e){let t=this._field[e],n=typeof t==`number`?t:Number.parseFloat(String(t??0));return Number.isFinite(n)?n:0}get buffer(){return this._buffer??=this._makeBuffer()}_buffer;_cursor=0;_makeBuffer(){let read=()=>this._text,cursor=()=>Math.min(this._cursor,this._text.length),clip=(e,t)=>t<0?e??``:(e??``).slice(0,t),set_text=(e,t=-1)=>{let n=clip(e,t);this._applyText(n),this._cursor=n.length};return{get text(){return read()},set text(e){set_text(e,-1)},get cursor_position(){return cursor()},get_text:read,set_text,insert_at_cursor:(e,t=-1)=>{let n=clip(e,t),r=cursor();this._applyText(this._text.slice(0,r)+n+this._text.slice(r)),this._cursor=r+n.length}}}get field(){return this._field}};export{u as GTK_WRAP_MODES,GtkTextView,l as NOTIFY_TEXT_VIEW_TEXT};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.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{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 GTypeName=`GtkToggleButton`;static emittedSignals=[r,i];_active=!1;_groupNext=null;_groupPrev=null;constructor(e){super(),this.connect(`clicked`,e=>{e._active&&e._grouped||(e.active=!e._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(){let e=super._stateClasses();return this._active?[...e,a]:e}};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{
|
|
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{surfaceSize as r}from"./window-state.js";import{windowHost as i}from"../window-host.js";import{AdwBottomSheet as a}from"./adw-bottom-sheet.js";import{defineWindowApplication as o}from"./application.js";import{AdwSingleChildBase as s}from"./single-child-base.js";import{CloseRequestState as c,GDK_KEYS as l,HandledAccumulator as u,WindowMemberState as d,deliverKeyToControllers as f,stepDefaultSize as p}from"@gjsify/adwaita-core";const m=`notify::is-active`,h=`notify::maximized`,g=`notify::focus-widget`,_=`close-request`;var v=class GtkWindow extends s{static GTypeName=`GtkWindow`;_title=``;_defaultWidth=0;_defaultHeight=0;_members=new d(e=>{let t=e===`is-active`?m:h;this.notify({eventName:t,object:this,value:e===`is-active`?this.isActive:this.maximized})},{maximized:!0});_closeRequest=new c;_unwatchForeground=null;_unwatchBack=null;constructor(e){super(),n(this,e)}onLoaded(){super.onLoaded();let e=i();this._unwatchForeground?.(),this._unwatchForeground=e.watchForeground(e=>this._members.reportActive(e)),this._members.reportActive(e.isForeground()),this._unwatchBack?.(),this._unwatchBack=this._isToplevel()?e.watchBack(()=>this._handleBack()):null}onUnloaded(){this._unwatchForeground?.(),this._unwatchForeground=null,this._unwatchBack?.(),this._unwatchBack=null,this._members.reportActive(!1),super.onUnloaded()}get isActive(){return this._members.active}get is_active(){return this._members.active}get maximized(){return this._members.maximized}set maximized(t){e(t,!0)?this.maximize():this.unmaximize()}is_maximized(){return this.maximized}maximize(){}unmaximize(){throw Error(`GtkWindow.unmaximize is not supported on NativeScript: the window is the whole screen and the platform has no un-maximized state to go back to.`)}present(){}get focusWidget(){return this.get_focus()}get focus_widget(){return this.get_focus()}set focus_widget(e){this.set_focus(e)}get_focus(){let e=i();return findView(this,t=>e.isFocused(t))}set_focus(e){let t=i();if(e===null){let e=this.get_focus();e!==null&&t.clearFocus(e);return}if(findView(this,t=>t===e)===null)throw Error(`GtkWindow.set_focus: the widget is not a descendant of this window.`);t.requestFocus(e)}close(){let e=i();if(this.isLoaded&&!e.canFinish)throw Error(`GtkWindow.close is not supported on this platform: iOS has no public API to close the root window. Android finishes the foreground activity.`);this._requestClose()}_requestClose(){let e=i();this._closeRequest.close({realized:this.isLoaded,hideOnClose:!1,emit:()=>{let e=new u;return this.notify({eventName:_,object:this,accumulator:e}),e.stopped},hide:()=>{},destroy:()=>e.finish()})}_handleBack(){return this._consumeBack()||closeOpenBottomSheet(this)||popInnermostNavigation(this)||this._deliverBackKey()||this._requestClose(),!0}_deliverBackKey(){return f(this,{key:`BrowserBack`,keycode:l.KEY_Back,state:0,pressed:!0})}_consumeBack(){return!1}_isToplevel(){for(let e=this.parent;e;e=e.parent)if(e instanceof GtkWindow)return!1;return!0}connect(e,t){if(e===`notify::focus-widget`)throw Error(`GtkWindow notify::focus-widget is not supported on NativeScript: focus the user moves is not observable here. Read get_focus() when you need it.`);return super.connect(e,t)}get title(){return this._title}set title(e){this._title=e??``}get defaultWidth(){return this._defaultWidth}set defaultWidth(e){this._defaultWidth=r(t(e,NaN),e,this._defaultWidth,`defaultWidth`)}get defaultHeight(){return this._defaultHeight}set defaultHeight(e){this._defaultHeight=r(t(e,NaN),e,this._defaultHeight,`defaultHeight`)}get_default_size(){return[this._defaultWidth,this._defaultHeight]}set_default_size(e,t){let n=p(this.get_default_size(),e,t);if(n!==null){this._defaultWidth=n.width,this._defaultHeight=n.height;for(let e of n.changed){let t=e===`default-width`?n.width:n.height;this.notify({eventName:`notify::${e}`,object:this,value:t})}}}};function findView(e,t){let n=null;return e.eachChildView(e=>t(e)?(n=e,!1):(n=findView(e,t),n===null)),n}function closeOpenBottomSheet(e){let t=!1;return e.eachChildView(e=>e.visibility===`visible`?closeOpenBottomSheet(e)?(t=!0,!1):e instanceof a&&e.open&&e.canClose?(e.open=!1,t=!0,!1):!0:!0),t}const popsOnBack=e=>typeof e.popFromShortcut==`function`;function popInnermostNavigation(e){let t=!1;return e.eachChildView(e=>e.visibility===`visible`&&(popInnermostNavigation(e)||popsOnBack(e)&&e.isLoaded&&e.popFromShortcut()===`stop`)?(t=!0,!1):!0),t}o(v.prototype);export{_ as CLOSE_REQUEST,v as GtkWindow,g as NOTIFY_FOCUS_WIDGET,m as NOTIFY_IS_ACTIVE,h as NOTIFY_MAXIMIZED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{stripMnemonic as e}from"@gjsify/adwaita-core";import{FormattedString as t,Span as n}from"@nativescript/core";function decoration(e,t){let n=e.underline||t;if(n&&e.strikethrough)return`underline line-through`;if(n)return`underline`;if(e.strikethrough)return`line-through`}const r={thin:`100`,ultralight:`200`,light:`300`,normal:`normal`,medium:`500`,semibold:`600`,bold:`bold`,ultrabold:`800`,heavy:`900`},i=new Set([`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`]);function applySpanAttributes(e,t){for(let[n,a]of Object.entries(t))switch(n){case`font_family`:case`family`:e.fontFamily=a;break;case`font_style`:case`style`:(a===`normal`||a===`italic`)&&(e.fontStyle=a);break;case`font_weight`:case`weight`:{let t=r[a]??(i.has(a)?a:void 0);t!==void 0&&(e.fontWeight=t);break}case`underline`:a!==`none`&&(e.textDecoration=`underline`);break;case`strikethrough`:a!==`false`&&a!==`none`&&(e.textDecoration=`line-through`);break;default:break}}function labelMarkupSpan(t,r,i){let a=new n;a.text=r?e(t.text):t.text;for(let e of t.style.spans)applySpanAttributes(a,e);t.style.monospace&&(a.fontFamily=`monospace`),t.style.bold&&(a.fontWeight=`bold`),t.style.italic&&(a.fontStyle=`italic`);let o=decoration(t.style,t.link!==null);o!==void 0&&(a.textDecoration=o),t.style.script!==null&&(a.style.verticalAlignment=t.style.script);let s=t.style.sizeSteps;
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{stripMnemonic as e}from"@gjsify/adwaita-core";import{FormattedString as t,Span as n}from"@nativescript/core";function decoration(e,t){let n=e.underline||t;if(n&&e.strikethrough)return`underline line-through`;if(n)return`underline`;if(e.strikethrough)return`line-through`}const r={thin:`100`,ultralight:`200`,light:`300`,normal:`normal`,medium:`500`,semibold:`600`,bold:`bold`,ultrabold:`800`,heavy:`900`},i=new Set([`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`]);function applySpanAttributes(e,t){for(let[n,a]of Object.entries(t))switch(n){case`font_family`:case`family`:e.fontFamily=a;break;case`font_style`:case`style`:(a===`normal`||a===`italic`)&&(e.fontStyle=a);break;case`font_weight`:case`weight`:{let t=r[a]??(i.has(a)?a:void 0);t!==void 0&&(e.fontWeight=t);break}case`underline`:a!==`none`&&(e.textDecoration=`underline`);break;case`strikethrough`:a!==`false`&&a!==`none`&&(e.textDecoration=`line-through`);break;default:break}}function labelMarkupSpan(t,r,i){let a=new n;a.text=r?e(t.text):t.text;for(let e of t.style.spans)applySpanAttributes(a,e);t.style.monospace&&(a.fontFamily=`monospace`),t.style.bold&&(a.fontWeight=`bold`),t.style.italic&&(a.fontStyle=`italic`);let o=decoration(t.style,t.link!==null);o!==void 0&&(a.textDecoration=o),t.style.script!==null&&(a.style.verticalAlignment=t.style.script);let s=t.style.sizeSteps;if(i!==void 0&&(s!==0||t.style.script!==null)){let e=t.style.script===null?1:.8333333333333334;a.fontSize=i*(s>0?1.2:.8333333333333)**Math.abs(s)*e}return a}function labelMarkupNeedsSpans(e){return e.links.length>0?!0:e.runs.some(e=>e.link!==null||styled(e.style))}function styled(e){return e.bold||e.italic||e.underline||e.strikethrough||e.monospace||e.script!==null||e.sizeSteps!==0||e.spans.length>0}function labelMarkupFormattedString(e,r,i,a){let o=new t;for(let t of e.runs){let e=labelMarkupSpan(t,r,i);if(t.link!==null){let r=t.link;e.addEventListener(n.linkTapEvent,()=>a(r))}o.spans.push(e)}return o}export{labelMarkupFormattedString,labelMarkupNeedsSpans,labelMarkupSpan};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";const
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{gtkBuilderInteger as e}from"./xml-values.js";const t=[`always`,`automatic`,`never`,`external`],n=`automatic`;function normalizePolicy(n,r){let i=e(n);if(i!==void 0&&t[i]!==void 0)return t[i];if(typeof n==`string`){let e=n.trim(),r=t.find(t=>t===e);if(r!==void 0)return r}throw TypeError(`'${String(n)}' is not a Gtk.PolicyType, so it cannot be '${r}'. The members are ${t.join(`, `)}.`)}function policyScrolls(e){return e!==`never`}function scrollOrientationFor(e,t){return policyScrolls(e)&&!policyScrolls(t)?`horizontal`:`vertical`}export{n as DEFAULT_SCROLLBAR_POLICY,t as GTK_POLICY_TYPES,normalizePolicy,policyScrolls,scrollOrientationFor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{ENGINE_TARGET as e}from"../engine-target.js";import{camelProperty as t,readGtkProperty as n,writeGtkProperty as r}from"./shadowed-properties.js";import{WIDGET_SIGNALS as i,watchMapping as a}from"./widget-mapping.js";import{withGtkWidgetLayout as o}from"./widget-layout.js";import{engineForTarget as s}from"@gjsify/adwaita-core";function coerceDeclared(e,t,n,r){return t.normalize===void 0?readDeclaredValue(e,t.kind,n):t.normalize(n,r)}function isDeclaredChange(e,t,n,r,i){return e.changed===void 0?n!==t:e.changed(t,n,r,i)}function readDeclaredValue(e,t,n){if(typeof n!=`string`||t===`string`)return n;let r=n.trim();if(t===`object`)throw TypeError(`Property '${e}' holds an object; '${n}' is a string.`);if(t===`boolean`){let t=r.toLowerCase();if(t===`true`)return!0;if(t===`false`)return!1;throw TypeError(`Property '${e}' is a boolean; '${n}' is neither 'true' nor 'false'.`)}let i=r===``?NaN:Number(r);if(!Number.isFinite(i))throw TypeError(`Property '${e}' is a number; '${n}' is not one.`);return i}const c=new WeakMap;let l=1;const u=1073741824,d=new WeakMap,f=new WeakMap;function unknownHandler(e,t){return TypeError(`${e.constructor.name} has no handler with id ${t}. connect() hands out each id once and disconnect() takes it once; a second disconnect, or an id another widget returned, is refused here rather than left as a silent no-op.`)}const p=new WeakMap;function pureConnect(e,t,n){let r=l++,o=c.get(e);o===void 0&&(o=new Map,c.set(e,o));let s=i.includes(t)?a(e):void 0;return o.set(r,{eventName:t,listener:n,unwatch:s}),e.addEventListener(t,n),r}function pureDisconnect(e,t){let n=c.get(e)?.get(t);if(n===void 0)throw unknownHandler(e,t);e.removeEventListener(n.eventName,n.listener),n.unwatch?.(),c.get(e)?.delete(t)}function declaredConnect(e,t,n,r){let i=l++,a=p.get(e);return a===void 0&&p.set(e,a=new Map),a.set(i,{key:t,eventName:n,callback:r}),i}function declaredDisconnect(e,t){return p.get(e)?.delete(t)===!0}function emitDeclared(e,t,n){let r=p.get(e);if(r===void 0)return;let i=t.startsWith(`notify::`),a=[...r];for(let[o,s]of a){if(s.key!==t||r.get(o)!==s)continue;let a=i?{eventName:s.eventName,object:e}:{eventName:s.eventName,object:e,args:n};try{s.callback(e,a)}catch(t){console.error(`[${e.constructor.name}] unhandled exception in a '${s.eventName}' handler:`,t)}}}function refuseDeclaredEvent(e,t,n){let r=giKeyOf(resolvedFor(e.constructor),t);if(r===null)return;let i=r.startsWith(`notify::`),a=i?`a declared property's notification`:`a declared signal`,o=n===`notify`?i?`write the property, or emit it with notify('${r.slice(8)}')`:`emit it with emit('${r}', …)`:`subscribe with connect('${t}', (self, data) => …), whose id disconnect() takes`;throw TypeError(`${e.constructor.name}.${n}('${t}'): '${r}' is ${a} and GObject owns it — ${o}. On Android the emission belongs to the GObject and no NativeScript listener can see it, so ${n} would work off-device and be silent on it.`)}function spellingsOf(e){return[...new Set([e,e.replace(/-/g,`_`),t(e)])]}function emittedSignalsOf(e){let t=[];for(let n=e;typeof n==`function`;n=Object.getPrototypeOf(n))t.unshift(n);let n=new Set;for(let e of t)if(Object.hasOwn(e,`emittedSignals`))for(let t of e.emittedSignals)n.add(t);return[...n]}const m=new WeakMap,h=new WeakSet,g=new WeakSet,_=new WeakMap;function declarationsOf(e){let t=[];for(let n=e;typeof n==`function`;n=Object.getPrototypeOf(n)){let e=m.get(n);e!==void 0&&t.unshift(e)}return t}function resolvedFor(e){let t=_.get(e);if(t!==void 0)return t;let n=new Map,r=new Set,i={canonicalOf:n,declaredSignals:r,routeD:!1,giConnect:void 0,giDisconnect:void 0,giEmit:void 0},a=i;for(let t of declarationsOf(e)){for(let[e,r]of t.canonicalOf)n.set(e,r);for(let e of t.declaredSignals)r.add(e);t.routeD&&(a.routeD=!0),t.giConnect!==void 0&&(a.giConnect=t.giConnect),t.giDisconnect!==void 0&&(a.giDisconnect=t.giDisconnect),t.giEmit!==void 0&&(a.giEmit=t.giEmit)}return _.set(e,i),i}function giKeyOf(e,t){if(e.declaredSignals.has(t))return t;if(!t.startsWith(`notify::`))return null;let n=e.canonicalOf.get(t.slice(8));return n===void 0?null:`notify::${n}`}function declare(e,t,n){let r=new Map;for(let e of Object.keys(t?.Properties??{}))for(let t of spellingsOf(e))r.set(t,e);let i={meta:t,klass:e,prototype:e.prototype,canonicalOf:r,declaredSignals:new Set(Object.keys(t?.Signals??{})),routers:n,realized:!1,routeD:!1};return m.set(e,i),i}function declaredEmissionsOf(e){return[...Object.keys(e?.Signals??{}),...Object.keys(e?.Properties??{}).map(e=>`notify::${e}`)]}function realizeChain(e){if(!h.has(e)){h.add(e);for(let t of declarationsOf(e))realize(t)}}function realize(t){if(t.realized||(t.realized=!0,t.meta===void 0))return;let n=s(e);if(n?.supportsForeignParentClasses===!0){registerRouteD(t,n.registerForeignClass.bind(n));return}installPureJsProperties(t)}function registerRouteD(e,t){let{meta:n,prototype:r,routers:i}=e;if(i!==void 0&&(delete r.connect,delete r.disconnect,delete r.emit,delete r.notify),t(e.klass,n),wrapRouteDAccessors(e),i!==void 0){if(e.giConnect=r.connect,e.giDisconnect=r.disconnect,e.giEmit=r.emit,e.giConnect===void 0||e.giDisconnect===void 0||e.giEmit===void 0)throw Error(`Registering '${n.GTypeName}' over its NativeScript base installed no connect/disconnect/emit, so the widget would answer neither GObject nor this port. ADR 0105 refuses a silent fallback here: the subset is reachable only by calling usePureJsGObjectEngine() from '@gjsify/adwaita-core' before the port loads.`);for(let[e,t]of Object.entries(i))Object.defineProperty(r,e,{configurable:!0,writable:!0,enumerable:!1,value:t});refuseDeclaredNotifyPayload(r,r.notify)}e.routeD=!0}function refuseDeclaredNotifyPayload(e,t){let n=function notify(e,...n){if(typeof e==`object`&&e){let{eventName:t}=e;typeof t==`string`&&refuseDeclaredEvent(this,t,`notify`)}return t.call(this,e,...n)};g.add(n),Object.defineProperty(e,"notify",{configurable:!0,writable:!0,enumerable:!1,value:n})}function wrapRouteDAccessors(e){let{meta:t,prototype:n}=e;for(let[e,r]of Object.entries(t.Properties??{}))if(!(r.kind===`string`&&r.normalize===void 0))for(let i of spellingsOf(e)){let a=Object.getOwnPropertyDescriptor(n,i);if(a?.set===void 0)throw Error(`Registering '${t.GTypeName}' installed no setter for '${i}', so a string from XML would reach the GObject uncoerced. The host chain probably owns that name (see the class's \$foreignSkipped); rename the property.`);let o=a.set;Object.defineProperty(n,i,{...a,set(t){o.call(this,coerceDeclared(e,r,t,this))}})}}function installPureJsProperties(e){let{meta:t,prototype:n}=e;for(let[e,r]of Object.entries(t.Properties??{})){let t=defaultValueOf(r);for(let i of spellingsOf(e))i in n||Object.defineProperty(n,i,{configurable:!0,enumerable:!1,get(){let n=valuesOf(this);return n.has(e)||n.set(e,t),n.get(e)},set(t){let n=coerceDeclared(e,r,t,this),i=valuesOf(this);i.has(e)&&!isDeclaredChange(r,n,i.get(e),t,this)||(i.set(e,n),emitDeclared(this,`notify::${e}`,[]),r.afterNotify?.(this))}})}installPureNotify(e)}function installPureNotify(e){let{prototype:t}=e,n=t.notify;if(g.has(n))return;let r=function notify(e,...t){if(typeof e!=`string`){if(typeof e==`object`&&e){let{eventName:t}=e;typeof t==`string`&&refuseDeclaredEvent(this,t,`notify`)}return n.call(this,e,...t)}let{canonicalOf:r}=resolvedFor(this.constructor),i=r.get(e);if(i===void 0)throw TypeError(`${this.constructor.name} has no property '${e}' to notify. The declared ones are ${[...r.keys()].join(`, `)||`(none)`}; a NativeScript event is notified with its payload object, not with a name.`);emitDeclared(this,`notify::${i}`,[])};g.add(r),Object.defineProperty(t,"notify",{configurable:!0,writable:!0,enumerable:!1,value:r})}function withSignals(e,a){class WithSignals extends o(e){static emittedSignals=[...i,...declaredEmissionsOf(a)];constructor(...e){super(...e),realizeChain(new.target)}addEventListener(e,t,n,r){refuseDeclaredEvent(this,e,`addEventListener`),super.addEventListener(e,t,n,r)}removeEventListener(e,t,n){refuseDeclaredEvent(this,e,`removeEventListener`),super.removeEventListener(e,t,n)}connect(e,t){let n=resolvedFor(this.constructor),r=giKeyOf(n,e);if(n.routeD&&r!==null){let i=r.startsWith(`notify::`),a=n.giConnect.call(this,r,(n,...r)=>{let a=n;return t(n,i?{eventName:e,object:a}:{eventName:e,object:a,args:r})}),o=d.get(this);return o===void 0&&d.set(this,o=new Set),o.add(a),u+a}if(r!==null)return declaredConnect(this,r,e,t);let listener=e=>{let n=e.accumulator;if(n===void 0){t(this,e);return}n.stopped||n.collect(t(this,e))};return pureConnect(this,e,listener)}disconnect(e){if(e>=u){let t=e-u;if(d.get(this)?.delete(t)!==!0)throw unknownHandler(this,e);resolvedFor(this.constructor).giDisconnect.call(this,t);return}declaredDisconnect(this,e)||pureDisconnect(this,e)}emit(e,...t){let n=resolvedFor(this.constructor),r=giKeyOf(n,e);if(r!==null){n.routeD?n.giEmit.call(this,r,...t):emitDeclared(this,r,t);return}throw Error(`No signal '${e}' on object '${this.constructor.name}'. emit() is GObject's and takes a declared signal or a declared property's notify::<prop>; to dispatch a NativeScript event use notify({ eventName: '${e}', object: this }).`)}get_property(e){return n(this,t(e))}set_property(e,n){r(this,t(e),n)}}return declare(WithSignals,a,{connect:WithSignals.prototype.connect,disconnect:WithSignals.prototype.disconnect,emit:WithSignals.prototype.emit}),WithSignals}function withProperties(e,t){class WithProperties extends e{static emittedSignals=declaredEmissionsOf(t)}return declare(WithProperties,t,void 0),WithProperties}function valuesOf(e){let t=f.get(e);return t===void 0&&f.set(e,t=new Map),t}function defaultValueOf(e){return e.kind===`object`?null:e.default===void 0?e.kind===`string`?``:e.kind===`boolean`?!1:0:e.default}export{emittedSignalsOf,readDeclaredValue,withProperties,withSignals};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{ENGINE_TARGET as e}from"../engine-target.js";import{camelProperty as t,readGtkProperty as n,writeGtkProperty as r}from"./shadowed-properties.js";import{WIDGET_SIGNALS as i,watchMapping as a}from"./widget-mapping.js";import{withGtkWidgetLayout as o}from"./widget-layout.js";import{engineForTarget as s}from"@gjsify/adwaita-core";function coerceDeclared(e,t,n,r){return t.normalize===void 0?readDeclaredValue(e,t.kind,n):t.normalize(n,r)}function isDeclaredChange(e,t,n,r,i){return e.changed===void 0?n!==t:e.changed(t,n,r,i)}function readDeclaredValue(e,t,n){if(typeof n!=`string`||t===`string`)return n;let r=n.trim();if(t===`object`)throw TypeError(`Property '${e}' holds an object; '${n}' is a string.`);if(t===`boolean`){let t=r.toLowerCase();if(t===`true`)return!0;if(t===`false`)return!1;throw TypeError(`Property '${e}' is a boolean; '${n}' is neither 'true' nor 'false'.`)}let i=r===``?NaN:Number(r);if(!Number.isFinite(i))throw TypeError(`Property '${e}' is a number; '${n}' is not one.`);return i}const c=new WeakMap;let l=1;const u=1073741824,d=new WeakMap,f=new WeakMap;function unknownHandler(e,t){return TypeError(`${e.constructor.name} has no handler with id ${t}. connect() hands out each id once and disconnect() takes it once; a second disconnect, or an id another widget returned, is refused here rather than left as a silent no-op.`)}const p=new WeakMap;function pureConnect(e,t,n){let r=l++,o=c.get(e);o===void 0&&(o=new Map,c.set(e,o));let s=i.includes(t)?a(e):void 0;return o.set(r,{eventName:t,listener:n,unwatch:s}),e.addEventListener(t,n),r}function pureDisconnect(e,t){let n=c.get(e)?.get(t);if(n===void 0)throw unknownHandler(e,t);e.removeEventListener(n.eventName,n.listener),n.unwatch?.(),c.get(e)?.delete(t)}function declaredConnect(e,t,n,r){let i=l++,a=p.get(e);return a===void 0&&p.set(e,a=new Map),a.set(i,{key:t,eventName:n,callback:r}),i}function declaredDisconnect(e,t){return p.get(e)?.delete(t)===!0}function emitDeclared(e,t,n){let r=p.get(e);if(r===void 0)return;let i=t.startsWith(`notify::`),a=[...r];for(let[o,s]of a){if(s.key!==t||r.get(o)!==s)continue;let a=i?{eventName:s.eventName,object:e}:{eventName:s.eventName,object:e,args:n};try{s.callback(e,a)}catch(t){console.error(`[${e.constructor.name}] unhandled exception in a '${s.eventName}' handler:`,t)}}}function refuseDeclaredEvent(e,t,n){let r=giKeyOf(resolvedFor(e.constructor),t);if(r===null)return;let i=r.startsWith(`notify::`),a=i?`a declared property's notification`:`a declared signal`,o=n===`notify`?i?`write the property, or emit it with notify('${r.slice(8)}')`:`emit it with emit('${r}', …)`:`subscribe with connect('${t}', (self, data) => …), whose id disconnect() takes`;throw TypeError(`${e.constructor.name}.${n}('${t}'): '${r}' is ${a} and GObject owns it — ${o}. On Android the emission belongs to the GObject and no NativeScript listener can see it, so ${n} would work off-device and be silent on it.`)}function spellingsOf(e){return[...new Set([e,e.replace(/-/g,`_`),t(e)])]}function emittedSignalsOf(e){let t=[];for(let n=e;typeof n==`function`;n=Object.getPrototypeOf(n))t.unshift(n);let n=new Set;for(let e of t)if(Object.hasOwn(e,`emittedSignals`))for(let t of e.emittedSignals)n.add(t);return[...n]}const m=new WeakMap,h=new WeakSet,g=new WeakSet,_=new WeakMap;function declarationsOf(e){let t=[];for(let n=e;typeof n==`function`;n=Object.getPrototypeOf(n)){let e=m.get(n);e!==void 0&&t.unshift(e)}return t}function resolvedFor(e){let t=_.get(e);if(t!==void 0)return t;let n=new Map,r=new Set,i=new Set,a={canonicalOf:n,seamOwned:r,declaredSignals:i,routeD:!1,giConnect:void 0,giDisconnect:void 0,giEmit:void 0},o=a;for(let t of declarationsOf(e)){for(let[e,r]of t.canonicalOf)n.set(e,r);for(let e of t.seamOwned)r.add(e);for(let e of t.declaredSignals)i.add(e);t.routeD&&(o.routeD=!0),t.giConnect!==void 0&&(o.giConnect=t.giConnect),t.giDisconnect!==void 0&&(o.giDisconnect=t.giDisconnect),t.giEmit!==void 0&&(o.giEmit=t.giEmit)}return _.set(e,a),a}function giKeyOf(e,t){if(e.declaredSignals.has(t))return t;if(!t.startsWith(`notify::`))return null;let n=e.canonicalOf.get(t.slice(8));return n===void 0?null:`notify::${n}`}function declare(e,t,n){let r=new Map,i=new Set;for(let[e,n]of Object.entries(t?.Properties??{})){for(let t of spellingsOf(e))r.set(t,e);isSeamOwned(n)&&i.add(e)}let a={meta:t,klass:e,prototype:e.prototype,canonicalOf:r,seamOwned:i,declaredSignals:new Set(Object.keys(t?.Signals??{})),routers:n,realized:!1,routeD:!1};return m.set(e,a),a}function declaredEmissionsOf(e){return[...Object.keys(e?.Signals??{}),...Object.keys(e?.Properties??{}).map(e=>`notify::${e}`)]}function realizeChain(e){if(!h.has(e)){h.add(e);for(let t of declarationsOf(e))realize(t)}}function realize(t){if(t.realized||(t.realized=!0,t.meta===void 0))return;let n=s(e);if(n?.supportsForeignParentClasses===!0){registerRouteD(t,n.registerForeignClass.bind(n));return}installPureJsProperties(t)}function registerRouteD(e,t){let{meta:n,prototype:r,routers:i}=e;if(i!==void 0&&(delete r.connect,delete r.disconnect,delete r.emit,delete r.notify),t(e.klass,n),wrapRouteDAccessors(e),i!==void 0){if(e.giConnect=r.connect,e.giDisconnect=r.disconnect,e.giEmit=r.emit,e.giConnect===void 0||e.giDisconnect===void 0||e.giEmit===void 0)throw Error(`Registering '${n.GTypeName}' over its NativeScript base installed no connect/disconnect/emit, so the widget would answer neither GObject nor this port. ADR 0105 refuses a silent fallback here: the subset is reachable only by calling usePureJsGObjectEngine() from '@gjsify/adwaita-core' before the port loads.`);for(let[e,t]of Object.entries(i))Object.defineProperty(r,e,{configurable:!0,writable:!0,enumerable:!1,value:t});refuseDeclaredNotifyPayload(r,r.notify)}e.routeD=!0}function refuseDeclaredNotifyPayload(e,t){let n=function notify(e,...n){if(typeof e==`object`&&e){let{eventName:t}=e;typeof t==`string`&&refuseDeclaredEvent(this,t,`notify`)}return t.call(this,e,...n)};g.add(n),Object.defineProperty(e,"notify",{configurable:!0,writable:!0,enumerable:!1,value:n})}function isSeamOwned(e){return e.kind===`object`||e.explicitNotify===!0}function seamOwnedDescriptor(e,t,n){let r=defaultValueOf(t);return{configurable:!0,enumerable:!1,get(){let t=valuesOf(this);return t.has(e)||t.set(e,r),t.get(e)},set(r){let i=coerceDeclared(e,t,r,this),a=valuesOf(this);a.has(e)&&!isDeclaredChange(t,i,a.get(e),r,this)||(a.set(e,i),t.explicitNotify!==!0&&n(this,e),t.afterNotify?.(this))}}}function notifyThrough(e,t){e.notify(t)}function wrapRouteDAccessors(e){let{meta:t,prototype:n}=e;for(let[e,r]of Object.entries(t.Properties??{})){let i=r.changed!==void 0||r.afterNotify!==void 0,a=isSeamOwned(r);if(!(!a&&!i&&r.kind===`string`&&r.normalize===void 0))for(let o of spellingsOf(e)){let s=Object.getOwnPropertyDescriptor(n,o);if(s?.set===void 0||s.get===void 0)throw Error(`Registering '${t.GTypeName}' installed no accessor for '${o}', so a string from XML would reach the GObject uncoerced. The host chain probably owns that name (see the class's \$foreignSkipped); rename the property.`);if(a){Object.defineProperty(n,o,seamOwnedDescriptor(e,r,notifyThrough));continue}let{get:c,set:l}=s;Object.defineProperty(n,o,{...s,set(t){let n=coerceDeclared(e,r,t,this);if(!i){l.call(this,n);return}let a=c.call(this);l.call(this,n);let o=c.call(this)!==a,s=r.changed===void 0?o:r.changed(n,a,t,this);s&&!o&¬ifyThrough(this,e),s&&r.afterNotify?.(this)}})}}}function installPureJsProperties(e){let{meta:t,prototype:n}=e;for(let[e,r]of Object.entries(t.Properties??{})){let t=seamOwnedDescriptor(e,r,emitPureNotify);for(let r of spellingsOf(e))r in n||Object.defineProperty(n,r,t)}installPureNotify(e)}function emitPureNotify(e,t){emitDeclared(e,`notify::${t}`,[])}function installPureNotify(e){let{prototype:t}=e,n=t.notify;if(g.has(n))return;let r=function notify(e,...t){if(typeof e!=`string`){if(typeof e==`object`&&e){let{eventName:t}=e;typeof t==`string`&&refuseDeclaredEvent(this,t,`notify`)}return n.call(this,e,...t)}let{canonicalOf:r}=resolvedFor(this.constructor),i=r.get(e);if(i===void 0)throw TypeError(`${this.constructor.name} has no property '${e}' to notify. The declared ones are ${[...r.keys()].join(`, `)||`(none)`}; a NativeScript event is notified with its payload object, not with a name.`);emitDeclared(this,`notify::${i}`,[])};g.add(r),Object.defineProperty(t,"notify",{configurable:!0,writable:!0,enumerable:!1,value:r})}function withSignals(e,a){class WithSignals extends o(e){static emittedSignals=[...i,...declaredEmissionsOf(a)];constructor(...e){super(...e),realizeChain(new.target)}addEventListener(e,t,n,r){refuseDeclaredEvent(this,e,`addEventListener`),super.addEventListener(e,t,n,r)}removeEventListener(e,t,n){refuseDeclaredEvent(this,e,`removeEventListener`),super.removeEventListener(e,t,n)}connect(e,t){let n=resolvedFor(this.constructor),r=giKeyOf(n,e);if(n.routeD&&r!==null){let i=r.startsWith(`notify::`),a=n.giConnect.call(this,r,(n,...r)=>{let a=n;return t(n,i?{eventName:e,object:a}:{eventName:e,object:a,args:r})}),o=d.get(this);return o===void 0&&d.set(this,o=new Set),o.add(a),u+a}if(r!==null)return declaredConnect(this,r,e,t);let listener=e=>{let n=e.accumulator;if(n===void 0){t(this,e);return}n.stopped||n.collect(t(this,e))};return pureConnect(this,e,listener)}disconnect(e){if(e>=u){let t=e-u;if(d.get(this)?.delete(t)!==!0)throw unknownHandler(this,e);resolvedFor(this.constructor).giDisconnect.call(this,t);return}declaredDisconnect(this,e)||pureDisconnect(this,e)}emit(e,...t){let n=resolvedFor(this.constructor),r=giKeyOf(n,e);if(r!==null){n.routeD?n.giEmit.call(this,r,...t):emitDeclared(this,r,t);return}throw Error(`No signal '${e}' on object '${this.constructor.name}'. emit() is GObject's and takes a declared signal or a declared property's notify::<prop>; to dispatch a NativeScript event use notify({ eventName: '${e}', object: this }).`)}get_property(e){return n(this,t(e))}set_property(e,n){r(this,t(e),n)}}return declare(WithSignals,a,{connect:WithSignals.prototype.connect,disconnect:WithSignals.prototype.disconnect,emit:WithSignals.prototype.emit}),WithSignals}function withProperties(e,t){class WithProperties extends e{static emittedSignals=declaredEmissionsOf(t)}return declare(WithProperties,t,void 0),WithProperties}function pushDeclared(e,t,n){let{canonicalOf:r,seamOwned:i}=resolvedFor(e.constructor),a=r.get(t);if(a===void 0||!i.has(a))throw TypeError(`${e.constructor.name} cannot push '${t}': only a property the seam owns on both legs can be moved without notifying — declare it as object-kind or with explicitNotify. The pushable ones are ${[...i].join(`, `)||`(none)`}.`);valuesOf(e).set(a,n)}function valuesOf(e){let t=f.get(e);return t===void 0&&f.set(e,t=new Map),t}function defaultValueOf(e){return e.kind===`object`?null:e.default===void 0?e.kind===`string`?``:e.kind===`boolean`?!1:0:e.default}export{emittedSignalsOf,pushDeclared,readDeclaredValue,withProperties,withSignals};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{AdwStyledLayoutBase as e}from"./styled-layout-base.js";import{GridLayout as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwStyledLayoutBase as e}from"./styled-layout-base.js";import{singleChildCellIsStar as t}from"./single-child-cell.js";import{GridLayout as n,ItemSpec as r}from"@nativescript/core";var AdwSingleChildBase=class extends e{_child=null;constructor(){super(),this.addColumn(new r(1,`star`)),this.addRow(new r(1,`star`))}_columnIsStar=!0;onLoaded(){super.onLoaded(),this._syncColumnToAlignment(),this.style.addEventListener(`widthChange`,this._onWidthChangeSyncColumn)}onUnloaded(){this.style.removeEventListener(`widthChange`,this._onWidthChangeSyncColumn),super.onUnloaded()}_onWidthChangeSyncColumn=()=>{this._syncColumnToAlignment()};_syncColumnToAlignment(){let e=t(this.horizontalAlignment,this.width);e!==this._columnIsStar&&(this._columnIsStar=e,this.removeColumns(),this.addColumn(new r(1,e?`star`:`auto`)))}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){n.setColumn(e,0),n.setRow(e,0),this.insertChild(e,0)}_release(e){this.removeChild(e)}};export{AdwSingleChildBase};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";function widthIsSettled(e){if(typeof e==`number`)return Number.isFinite(e)&&e>0;if(typeof e!=`object`||!e)return!1;let t=e.value;return typeof t==`number`&&Number.isFinite(t)&&t>0}function singleChildCellIsStar(e,t){return e===`stretch`||widthIsSettled(t)}export{singleChildCellIsStar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.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{Observable as i}from"@nativescript/core";var GtkStackPage=class extends r(i){static GTypeName=`GtkStackPage`;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";const
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{gtkBuilderInteger as e}from"./xml-values.js";const t=[`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`],n=[`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`],r=200,i=250;function transitionNick(t,n,r){let i=e(t);if(i!==void 0&&n[i]!==void 0)return n[i];if(typeof t==`string`){let e=t.trim().replaceAll(`_`,`-`),r=n.find(t=>t===e);if(r!==void 0)return r}throw TypeError(`'${String(t)}' is not a ${r}. The members are ${n.join(`, `)}.`)}export{i as DEFAULT_REVEALER_TRANSITION_DURATION,r as DEFAULT_STACK_TRANSITION_DURATION,t as GTK_REVEALER_TRANSITIONS,n as GTK_STACK_TRANSITIONS,transitionNick};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.js";import{xmlBoolean as t,xmlNumber as n}from"./xml-values.js";import{applyConstructProps as r}from"./construct-props.js";import{withSignals as i}from"./signals.js";import{Observable as a}from"@nativescript/core";var AdwViewStackPage=class extends i(a){static GTypeName=`AdwViewStackPage`;static builderSlots=e([`child`],`child`);_child=null;_name=``;_title=null;_iconName=null;_needsAttention=!1;_badgeNumber=0;_visible=!0;_useUnderline=!1;_stack=null;_awaiting=null;constructor(e){super(),r(this,e)}get child(){return this._child}set child(e){this._refuseAfterAdoption(`child`),this._child=e;let t=this._awaiting;t===null||e===null||(this._awaiting=null,t._addChildFromBuilder(``,this))}get name(){return this._name}set name(e){this._refuseAfterAdoption(`name`),this._name=e??``}get title(){return this._title}set title(e){this._refuseAfterAdoption(`title`),this._title=e}get iconName(){return this._iconName}set iconName(e){this._refuseAfterAdoption(`iconName`),this._iconName=e}get needsAttention(){return this._needsAttention}set needsAttention(e){this._refuseAfterAdoption(`needsAttention`),this._needsAttention=t(e,this._needsAttention)}get badgeNumber(){return this._badgeNumber}set badgeNumber(e){this._refuseAfterAdoption(`badgeNumber`),this._badgeNumber=n(e,this._badgeNumber)}get useUnderline(){return this._useUnderline}set useUnderline(e){this._refuseAfterAdoption(`useUnderline`),this._useUnderline=t(e,this._useUnderline)}get visible(){return this._visible}set visible(e){this._visible=t(e,this._visible),this._stack?.setPageVisible(this._name,this._visible)}_addChildFromBuilder(e,t){this.child=t}_adoptBy(e){if(this._stack!==null)throw Error(`AdwViewStackPage '${this._name}' already belongs to a stack.`);this._stack=e}_awaitChild(e){this._awaiting=e}_refuseAfterAdoption(e){if(this._stack!==null)throw Error(`AdwViewStackPage '${this._name}' was read when its stack adopted it, so '${e}' can no longer reach the stack or a switcher bound to it. Write it before the page is added, or use the stack's own methods.`)}};export{AdwViewStackPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{gtypeNameOfInstance as e}from"./gtype-name.js";import{GTK_ALIGN as t,NS_HORIZONTAL_ALIGNMENT as n,NS_VERTICAL_ALIGNMENT as r}from"./gtk-align.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{gtypeNameOfInstance as e}from"./gtype-name.js";import{GTK_ALIGN as t,NS_HORIZONTAL_ALIGNMENT as n,NS_VERTICAL_ALIGNMENT as r}from"./gtk-align.js";import{gtkBuilderInteger as i,xmlBoolean as a}from"./xml-values.js";import{nsAlignment as o}from"./construct-props.js";import{lengthValue as s}from"./ns-length.js";import{insertActionGroup as c}from"./actions.js";import{focusView as l,isViewFocused as u}from"../window-source.js";import{applyNativeTooltip as d}from"./native-tooltip.js";import{isMapped as f}from"./widget-mapping.js";import{Point as p}from"@gjsify/adwaita-core";const m=`notify::hexpand`,h=`notify::vexpand`,g=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}const _=[0,1,2];function isWidget(e){return typeof e.get_first_child==`function`}function childrenOf(e){let t=[];return e.eachChildView?.(e=>(isWidget(e)?t.push(e):t.push(...childrenOf(e)),!0)),t}function parentOf(e){let t=e.parent??null;for(;t!==null&&!isWidget(t);)t=t.parent??null;return t}function topOf(e){let t=e;for(;t.parent;)t=t.parent;return t}function computePointOf(e,t,n){let r=e,i=t;if(topOf(r)!==topOf(i))return[!1,new p];let a=r.getLocationInWindow?.(),o=i.getLocationInWindow?.();return!a||!o?[!1,new p]:[!0,new p({x:n.x+(a.x-o.x),y:n.y+(a.y-o.y)})]}function siblingOf(e,t){let n=parentOf(e);if(n===null)return null;let r=childrenOf(n);return r[r.indexOf(e)+t]??null}function alignNick(e,n){if(typeof e==`string`&&Object.hasOwn(t,e))return e;let r=i(e);if(r!==void 0){let e=Object.keys(t).find(e=>t[e]===r);if(e!==void 0)return e}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<=g)return n;throw TypeError(`'${String(e)}' is not a margin: '${t}' takes an integer from 0 to ${g}.`)}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=s(e);return t!==null&&t>0?Math.round(t):-1}const v=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,S=new WeakMap;function expandOf(e){let t=S.get(e);return t===void 0&&(t={h:!1,v:!1},S.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=o(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=o(alignNick(e,`valign`),`vertical`)}get hexpand(){return S.get(this)?.h??!1}set hexpand(e){laidOut(this,`hexpand`);let t=expandOf(this),n=a(e,t.h);n!==t.h&&(t.h=n,this.notify({eventName:m,object:this}))}get vexpand(){return S.get(this)?.v??!1}set vexpand(e){laidOut(this,`vexpand`);let t=expandOf(this),n=a(e,t.v);n!==t.v&&(t.v=n,this.notify({eventName:h,object:this}))}get marginStart(){let e=viewOf(this);return e===null?0:s(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:s(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(e){let t=laidOut(this,`visible`);t.visibility=a(e,this.visible)?`visible`:`collapse`}get sensitive(){let e=viewOf(this);return e===null?!0:e.isEnabled!==!1}set sensitive(e){let t=laidOut(this,`sensitive`);t.isEnabled=a(e,this.sensitive)}get name(){return v.get(this)??e(this)}set name(e){let t=laidOut(this,`name`),n=v.get(this),r=e??``;r===``?v.delete(this):v.set(this,r),(t.id===void 0||t.id===n)&&(t.id=r===``?void 0:r)}get_visible(){return this.visible}set_visible(e){this.visible=e}get_mapped(){return f(this)}set_direction(e){if(!_.includes(e))throw TypeError(`${e} is not a valid value for enum argument dir`);let t=this.style;t!==void 0&&(t.direction=e===0?``:e===2?`rtl`:`ltr`)}get_direction(){return this.style?.direction===`rtl`?2:1}get_first_child(){return childrenOf(this)[0]??null}get_last_child(){return childrenOf(this).at(-1)??null}get_next_sibling(){return siblingOf(this,1)}get_prev_sibling(){return siblingOf(this,-1)}get_parent(){return parentOf(this)}get_width(){return Math.round(this.getActualSize?.().width??0)}get_height(){return Math.round(this.getActualSize?.().height??0)}compute_point(e,t){return computePointOf(this,e,t)}insert_action_group(e,t){c(this,e,t)}get focusable(){return b.get(this)??!1}set focusable(e){let t=laidOut(this,`focusable`),n=a(e,b.get(this)??!1);b.set(this,n),t.nativeViewProtected?.setFocusable?.(n)}get focusOnClick(){return x.get(this)??!0}set focusOnClick(e){x.set(this,a(e,x.get(this)??!0))}get_focus_on_click(){return this.focusOnClick}set_focus_on_click(e){this.focusOnClick=e}grab_focus(){let e=laidOut(this,`grab_focus`);return l(e),u(e)}get tooltipText(){return y.get(this)??``}set tooltipText(e){let t=laidOut(this,`tooltipText`),n=e??``;(t.accessibilityHint??``)===(y.get(this)??``)&&(t.accessibilityHint=n),y.set(this,n),d(this,n)}get tooltip_text(){return this.tooltipText}set tooltip_text(e){this.tooltipText=e}get_tooltip_text(){return this.tooltipText}set_tooltip_text(e){this.tooltipText=e}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{m as NOTIFY_HEXPAND,h as NOTIFY_VEXPAND,withGtkWidgetLayout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";function xmlNumber(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`)return t;let n=e.trim();if(n===``)return t;let r=Number(n);return Number.isFinite(r)?r:t}function xmlBoolean(e,t){if(typeof e==`boolean`)return e;if(typeof e!=`string`)return t;let n=e.trim().toLowerCase();return n===`true`?!0:n===`false`?!1:t}export{xmlBoolean,xmlNumber};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";function xmlNumber(e,t){if(typeof e==`number`)return Number.isFinite(e)?e:t;if(typeof e!=`string`)return t;let n=e.trim();if(n===``)return t;let r=Number(n);return Number.isFinite(r)?r:t}function gtkBuilderInteger(e){if(typeof e==`number`)return Number.isInteger(e)?e:void 0;if(typeof e!=`string`)return;let t=/^([+-]?)(?:(0[xX][0-9a-fA-F]+)|(0[0-7]+)|([0-9]+))$/.exec(e.trim());if(t===null)return;let n=t[2]===void 0?t[3]===void 0?Number.parseInt(t[4],10):Number.parseInt(t[3],8):Number.parseInt(t[2],16);return t[1]===`-`?-n:n}function xmlBoolean(e,t){if(typeof e==`boolean`)return e;if(typeof e!=`string`)return t;let n=e.trim().toLowerCase();return n===`true`?!0:n===`false`?!1:t}export{gtkBuilderInteger,xmlBoolean,xmlNumber};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { assertNativeScript, isNativeScript, isAndroid, isIOS } from '@gjsify/native-platform';
|
|
2
2
|
export { NOTIFY_ACTIVE, NOTIFY_TEXT, NOTIFY_TEXT_LENGTH, NOTIFY_MAX_LENGTH, NOTIFY_EDITABLE, NOTIFY_SHOW_APPLY_BUTTON, NOTIFY_ACTIVATES_DEFAULT, SIGNAL_APPLY, SIGNAL_ENTRY_ACTIVATED, ENTRY_ACTIVATE, NOTIFY_ENTRY_TEXT, ComboState, NOTIFY_SELECTED, NOTIFY_DROP_DOWN_SELECTED, SpinState, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, NOTIFY_EXPANDED, NOTIFY_ENABLE_EXPANSION, NOTIFY_SHOW_ENABLE_SWITCH, NS_EXPANDER_ARROW_DISABLED_OPACITY, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, MENU_ITEM_ACTIVATED, DEFAULT_GTK_IMAGE_SIZE, DEFAULT_BOX_SPACING, GTK_BUTTON_CLICKED, GTK_BUTTON_LABEL_CLASS, buttonSlotAfterWrite, buttonSlotDetaches, boxChildTrack, boxTrackPlan, boxSpacingChanges, normalizeBoxSpacing, NOTIFY_REVEAL_CHILD, ADW_DIALOG_CLOSED, ADW_DIALOG_CLOSE_ATTEMPT, LIST_BOX_ROW_ACTIVATED, LIST_BOX_ROW_SELECTED, NOTIFY_HEXPAND, NOTIFY_VEXPAND, withGtkWidgetLayout, NOTIFY_STACK_VISIBLE_CHILD, NOTIFY_STACK_VISIBLE_CHILD_NAME, DRAWING_AREA_REFUSAL, GTK_CHECK_BUTTON_TOGGLED, GTK_CHECK_BUTTON_ACTIVATE, GTK_CHECK_BUTTON_CHECKED_CLASS, GTK_CHECK_BUTTON_INCONSISTENT_CLASS, NOTIFY_CHECK_ACTIVE, GTK_WRAP_MODES, NOTIFY_TEXT_VIEW_TEXT, GTK_TOGGLE_BUTTON_CHECKED_CLASS, GTK_TOGGLE_BUTTON_TOGGLED, NOTIFY_TOGGLE_ACTIVE, labelDisplayText, labelMarkupIsUnparseable, BUTTON_CLICKED, AVATAR_DEFAULT_ICON, DEFAULT_AVATAR_SIZE, avatarInitials, DEFAULT_CLAMP_MAX_SIZE, padForSystemInsets, padSheetForSystemInsets, bottomSheetPanel, AdwDataGrid, ROW_ACTIVATED, dataGridCellClass, dataGridItemSpec, dataGridRowClass, dataGridShapeKey, dataGridTracksKey, parseDataGridWidth, DATA_GRID_HEADER_CELL_CLASS, DATA_GRID_HEADER_ROW_CLASS, DATA_GRID_SECTION_CELL_CLASS, DEFAULT_SPINNER_SIZE, ACTIVATED, MENU_TAPPED, ToggleGroupState, NOTIFY_TOGGLE_SELECTED, applyAdwaitaNsAccent, clearAdwaitaNsAccent, ADWAITA_NS_ACCENT_RULES, adwaitaNsAccentColor, adwaitaNsAccentCss, SHORTCUT_LABEL_CAP_TEXT_CLASS, SHORTCUT_LABEL_CLASS, SHORTCUT_LABEL_DIMMED_CLASS, SHORTCUT_LABEL_DISABLED_CLASS, SHORTCUT_LABEL_KEYCAP_CLASS, SHORTCUT_LABEL_KEYS_CLASS, SHORTCUT_LABEL_SIDE_CLASS, SHORTCUT_LABEL_SPACED_CLASS, shortcutLabelDirection, shortcutLabelPlatform, shortcutLabelRenderPlan, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, DEFAULT_CAROUSEL_PAGE_WIDTH, NOTIFY_POSITION, NOTIFY_VISIBLE_PAGE, AdwSplitViewBase, NOTIFY_SHOW_SIDEBAR, NsNavigationSplitViewState, NsOverlaySplitViewState, splitViewColumns, NOTIFY_SIDEBAR_SELECTED, NOTIFY_OPEN, AdwToast, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, AdwAlertResponses, ABOUT_CLOSED, PREFERENCES_CLOSED, applyConstructProps, nsAlignment, GTK_ALIGN, DEFAULT_ICON_PIXEL_SIZE, GTK_ICON_SIZE_NICKS, GTK_ICON_SIZE_PIXELS, type GtkIconSizeNick, isGtkIconSizeNick, PIXEL_SIZE_UNSET, activateWidgetAction, findActionGroup, insertActionGroup, attachRowPressFeedback, ICON_FALLBACK_NAME, compiledIconNames, iconValueKind, isIconAvailable, resolveIconSource, renderSymbolicIcon, extractIconPaths, extractPathData, ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, observeViewSize, observeWindowSize, parseBreakpointCondition, registerAdwaitaElements, } from './widgets/index.js';
|
|
3
|
-
export type { BoxOrientation, ButtonSlot, ButtonSlotWrite, NotifyEntryTextEventData, AdwComboOption, ComboStateChange, ComboStateListener,
|
|
3
|
+
export type { BoxOrientation, ButtonSlot, ButtonSlotWrite, NotifyEntryTextEventData, AdwComboOption, ComboStateChange, ComboStateListener, NotifyValueEventData, SpinStateChange, SpinStateListener, NotifySliderValueEventData, MenuItemActivatedEventData, MenuTappedEventData, RowActivatedEventData, DataGridItemSpec, NotifyToggleSelectedEventData, ToggleGroupStateChange, ToggleGroupStateListener, AccentRole, AccentRule, ShortcutLabelRenderPlan, ShortcutLabelViewSpec, AdwViewStackPageInfo, NotifyVisibleChildEventData, AdwViewPage, NotifyViewSelectedEventData, NotifyPositionEventData, NotifyVisiblePageEventData, NotifyShowSidebarEventData, NsShowSidebarNotification, NsSplitViewHost, NsSplitViewState, NotifySidebarSelectedEventData, NotifyOpenEventData, AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, OrderedConfirmResponses, ConstructProps, SystemInsetEdges, IconValueKind, SymbolicIconOptions, IconPath, AdwColorScheme, AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './widgets/index.js';
|
|
4
4
|
export type { GtkWidgetLayout, GtkWidgetLayoutMembers } from './widgets/widget-layout.js';
|
|
5
5
|
export * as Adw from './namespace/adw.js';
|
|
6
6
|
export * as Gtk from './namespace/gtk.js';
|