@gjsify/adwaita-nativescript 0.64.2-next.252 → 0.64.2-next.255
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/builder/index.js +1 -1
- package/lib/esm/builder/param-values.js +1 -0
- package/lib/esm/canvas2d/canvas2d-bridge.js +1 -1
- package/lib/esm/capabilities.js +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/namespace/gdk.js +1 -1
- package/lib/esm/namespace/gio.js +1 -1
- package/lib/esm/namespace/glib.js +1 -1
- package/lib/esm/namespace/gobject.js +1 -1
- package/lib/esm/namespace/gtk.js +1 -1
- package/lib/esm/widgets/adw-about-dialog.js +2 -1
- package/lib/esm/widgets/adw-action-row.js +1 -1
- package/lib/esm/widgets/adw-avatar.js +1 -1
- package/lib/esm/widgets/adw-banner.js +1 -1
- package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
- package/lib/esm/widgets/adw-button-content.js +1 -1
- package/lib/esm/widgets/adw-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-entry-row.js +1 -1
- package/lib/esm/widgets/adw-expander-row.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-spinner.js +1 -1
- package/lib/esm/widgets/adw-split-button.js +1 -1
- package/lib/esm/widgets/adw-switch-row.js +1 -1
- package/lib/esm/widgets/adw-tab-view.js +1 -1
- package/lib/esm/widgets/adw-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/application.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-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/icon-path.js +1 -1
- package/lib/esm/widgets/icon-render.js +1 -0
- package/lib/esm/widgets/icon-theme.js +1 -1
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/signals.js +1 -1
- package/lib/esm/widgets/stack-page.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/widget-mapping.js +1 -0
- package/lib/types/about-dialog-doors.spec.d.ts +1 -0
- package/lib/types/builder/index.d.ts +4 -0
- package/lib/types/builder/param-values.d.ts +21 -0
- package/lib/types/carousel-doors.spec.d.ts +1 -0
- package/lib/types/gio-resource.spec.d.ts +1 -0
- package/lib/types/gio.spec.d.ts +2 -0
- package/lib/types/icon-resources.spec.d.ts +2 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/namespace/gdk.d.ts +1 -0
- package/lib/types/namespace/gio.d.ts +2 -0
- package/lib/types/namespace/glib.d.ts +2 -1
- package/lib/types/param-values.spec.d.ts +1 -0
- package/lib/types/testing/ns-core.d.mts +55 -14
- package/lib/types/widget-map.spec.d.ts +1 -0
- package/lib/types/widgets/adw-about-dialog.d.ts +32 -2
- package/lib/types/widgets/adw-action-row.d.ts +8 -1
- package/lib/types/widgets/adw-alert-dialog.d.ts +8 -1
- package/lib/types/widgets/adw-avatar.d.ts +8 -1
- package/lib/types/widgets/adw-banner.d.ts +8 -1
- package/lib/types/widgets/adw-bottom-sheet.d.ts +8 -1
- package/lib/types/widgets/adw-button-content.d.ts +8 -1
- package/lib/types/widgets/adw-carousel.d.ts +22 -3
- package/lib/types/widgets/adw-clamp.d.ts +8 -1
- package/lib/types/widgets/adw-combo-row.d.ts +4 -0
- package/lib/types/widgets/adw-data-grid.d.ts +8 -1
- package/lib/types/widgets/adw-header-bar.d.ts +8 -1
- package/lib/types/widgets/adw-image-button.d.ts +11 -2
- package/lib/types/widgets/adw-navigation-page.d.ts +8 -1
- package/lib/types/widgets/adw-navigation-view.d.ts +8 -1
- package/lib/types/widgets/adw-preferences-dialog.d.ts +8 -1
- package/lib/types/widgets/adw-preferences-group.d.ts +8 -1
- package/lib/types/widgets/adw-preferences-page.d.ts +8 -1
- package/lib/types/widgets/adw-shortcut-label.d.ts +8 -1
- package/lib/types/widgets/adw-sidebar.d.ts +8 -1
- package/lib/types/widgets/adw-slider-row.d.ts +8 -1
- package/lib/types/widgets/adw-spinner.d.ts +8 -1
- package/lib/types/widgets/adw-split-button.d.ts +8 -1
- package/lib/types/widgets/adw-status-page.d.ts +8 -1
- package/lib/types/widgets/adw-switch-row.d.ts +2 -0
- package/lib/types/widgets/adw-tab-view.d.ts +8 -1
- package/lib/types/widgets/adw-toast-overlay.d.ts +8 -1
- package/lib/types/widgets/adw-toggle-group.d.ts +8 -1
- package/lib/types/widgets/adw-toggle.d.ts +8 -1
- package/lib/types/widgets/adw-toolbar-view.d.ts +8 -1
- package/lib/types/widgets/adw-view-stack.d.ts +8 -1
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +8 -1
- package/lib/types/widgets/adw-window-title.d.ts +8 -1
- package/lib/types/widgets/adw-wrap-box.d.ts +8 -1
- package/lib/types/widgets/carousel-indicator-base.d.ts +8 -1
- package/lib/types/widgets/gtk-action-bar.d.ts +8 -1
- package/lib/types/widgets/gtk-button.d.ts +11 -2
- package/lib/types/widgets/gtk-check-button.d.ts +10 -0
- package/lib/types/widgets/gtk-drop-down.d.ts +8 -1
- package/lib/types/widgets/gtk-entry.d.ts +8 -1
- package/lib/types/widgets/gtk-image.d.ts +11 -2
- package/lib/types/widgets/gtk-label.d.ts +8 -1
- package/lib/types/widgets/gtk-popover-menu.d.ts +8 -1
- package/lib/types/widgets/gtk-stack.d.ts +8 -1
- package/lib/types/widgets/gtk-text-view.d.ts +8 -1
- package/lib/types/widgets/icon-path.d.ts +9 -0
- package/lib/types/widgets/icon-render.d.ts +9 -0
- package/lib/types/widgets/icon-theme.d.ts +43 -40
- package/lib/types/widgets/index.d.ts +1 -1
- package/lib/types/widgets/signals.d.ts +14 -1
- package/lib/types/widgets/split-view-base.d.ts +8 -1
- package/lib/types/widgets/stack-page.d.ts +8 -1
- package/lib/types/widgets/styled-layout-base.d.ts +8 -1
- package/lib/types/widgets/view-stack-page.d.ts +8 -1
- package/lib/types/widgets/view-switcher-base.d.ts +8 -1
- package/lib/types/widgets/widget-layout.d.ts +10 -0
- package/lib/types/widgets/widget-mapping.d.ts +9 -0
- package/package.json +13 -13
- package/src/testing/ns-core.mts +147 -18
- package/src/theme/adwaita.css +13 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{xmlBoolean as t,xmlNumber as n}from"./xml-values.js";import{withSignals as r}from"./signals.js";import{classNameWith as i}from"./style-classes.js";import{GridLayout as a,ItemSpec as o,TextView as s}from"@nativescript/core";const c=`notify::text`,l=[`none`,`char`,`word`,`word-char`];var GtkTextView=class extends r(a){static GTypeName=`GtkTextView`;_field;_text=``;_monospace=!1;_wrapMode=`none`;constructor(t){super(),this.className=`adw-text-view`,this.addColumn(new o(1,`star`)),this.addRow(new o(1,`star`));let n=new s;n.className=`adw-text-view-input`,n.set(`backgroundColor`,`transparent`),n.set(`borderWidth`,0),this.addChild(n),this._field=n,n.addEventListener(`textChange`,()=>this._applyText(this._field.text??``)),e(this,t)}_applyText(e){if(this._field.text!==e&&(this._field.text=e),e===this._text)return;this._text=e;let t={eventName:c,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=i(`adw-text-view`,this._monospace?[`monospace`]:[])}get wrapMode(){return this._wrapMode}set wrapMode(e){let t=typeof e==`number`?e:l.indexOf(String(e).replace(/_/g,`-`)),n=l[t];if(n===void 0)throw TypeError(`Gtk.TextView.wrapMode: ${JSON.stringify(e)} is not a Gtk.WrapMode; expected ${l.join(`, `)}.`);this._wrapMode=n}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{l as GTK_WRAP_MODES,GtkTextView,c as NOTIFY_TEXT_VIEW_TEXT};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{xmlBoolean as t}from"./xml-values.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=[...n.emittedSignals,r,i];_active=!1;_groupNext=null;_groupPrev=null;constructor(t){super(),this.addEventListener(`clicked`,()=>{this._active&&this._grouped||(this.active=!this._active)}),e(this,t)}get active(){return this._active}set active(e){let n=t(e,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{applyConstructProps as e}from"./construct-props.js";import{xmlBoolean as t,xmlNumber as n}from"./xml-values.js";import{surfaceSize as r}from"./window-state.js";import{windowHost as i}from"../window-host.js";import{defineWindowApplication as a}from"./application.js";import{AdwSingleChildBase as o}from"./single-child-base.js";import{CloseRequestState as s,HandledAccumulator as c,WindowMemberState as l}from"@gjsify/adwaita-core";const u=`notify::is-active`,d=`notify::maximized`,f=`notify::focus-widget`,p=`close-request`;var m=class GtkWindow extends o{static GTypeName=`GtkWindow`;_title=``;_defaultWidth=0;_defaultHeight=0;_members=new l(e=>{let t=e===`is-active`?u:d;this.notify({eventName:t,object:this,value:e===`is-active`?this.isActive:this.maximized})},{maximized:!0});_closeRequest=new s;_unwatchForeground=null;_unwatchBack=null;constructor(t){super(),e(this,t)}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(e){t(e,!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 c;return this.notify({eventName:p,object:this,accumulator:e}),e.stopped},hide:()=>{},destroy:()=>e.finish()})}_handleBack(){return this._consumeBack()||popInnermostNavigation(this)||this._requestClose(),!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(n(e,NaN),e,this._defaultWidth,`defaultWidth`)}get defaultHeight(){return this._defaultHeight}set defaultHeight(e){this._defaultHeight=r(n(e,NaN),e,this._defaultHeight,`defaultHeight`)}};function findView(e,t){let n=null;return e.eachChildView(e=>t(e)?(n=e,!1):(n=findView(e,t),n===null)),n}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}a(m.prototype);export{p as CLOSE_REQUEST,m as GtkWindow,f as NOTIFY_FOCUS_WIDGET,u as NOTIFY_IS_ACTIVE,d as NOTIFY_MAXIMIZED};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import"../_virtual/_rolldown/runtime.js";import{DEFAULT_ICON_COLOR as e,DEFAULT_ICON_COLOR_DARK as t}from"@gjsify/adwaita-core";const n=16,r=[1,0,0,1,0,0];function composeTransforms(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}const i=/([a-zA-Z]+)\s*\(([^)]*)\)/g,a=Math.PI/180;function parseIconTransform(e){let t=r,n=!1;i.lastIndex=0;let o;for(;(o=i.exec(e))!==null;){let e=o[2].split(/[\s,]+/).filter(e=>e!==``).map(Number);if(e.some(e=>!Number.isFinite(e)))return null;let r;switch(o[1]){case`matrix`:if(e.length!==6)return null;r=[e[0],e[1],e[2],e[3],e[4],e[5]];break;case`translate`:if(e.length<1||e.length>2)return null;r=[1,0,0,1,e[0],e[1]??0];break;case`scale`:if(e.length<1||e.length>2)return null;r=[e[0],0,0,e[1]??e[0],0,0];break;case`rotate`:{if(e.length!==1&&e.length!==3)return null;let t=Math.cos(e[0]*a),n=Math.sin(e[0]*a),i=[t,n,-n,t,0,0];if(e.length===1){r=i;break}let[o,s]=[e[1],e[2]];r=composeTransforms(composeTransforms([1,0,0,1,o,s],i),[1,0,0,1,-o,-s]);break}case`skewX`:if(e.length!==1)return null;r=[1,0,Math.tan(e[0]*a),1,0,0];break;case`skewY`:if(e.length!==1)return null;r=[1,Math.tan(e[0]*a),0,1,0,0];break;default:return null}t=composeTransforms(t,r),n=!0}return n?t:null}const o=/\s(d|fill|fill-rule|fill-opacity|transform|style)\s*=\s*"([^"]*)"/g;function tagAttributes(e){let t=new Map;o.lastIndex=0;let n;for(;(n=o.exec(e))!==null;)t.set(n[1],n[2]);return t}const s=new Set([`#2e3436`,`#2e3434`,`#474747`,`#222222`,`#222`,`#2d3336`]);function isNeutralSymbolicFill(e){return s.has(e.trim().toLowerCase())}function presentationValue(e,t){let n=e.get(`style`);if(n!==void 0){let e=RegExp(`(?:^|;)\\s*${t}\\s*:\\s*([^;]+)`).exec(n)?.[1];if(e!==void 0)return e.trim()}return e.get(t)}const c=/<!--[\s\S]*?-->|<!\[CDATA\[[\s\S]*?\]\]>/g,l=new Set([`defs`,`clipPath`,`mask`,`symbol`,`marker`,`pattern`]);function extractIconPaths(e){let t=[],n=/<(g|path|defs|clipPath|mask|symbol|marker|pattern)\b((?:"[^"]*"|'[^']*'|[^"'<>])*)>|<\/(g|defs|clipPath|mask|symbol|marker|pattern)\s*>/g,i=[],a=0,o,s=e.replace(c,``);for(;(o=n.exec(s))!==null;){let[e,n,s,c]=o;if(n===void 0){l.has(c)?a=Math.max(0,a-1):a===0&&i.pop();continue}let u=s.trimEnd().endsWith(`/`);if(l.has(n)){u||a++;continue}if(a>0)continue;let d=tagAttributes(e),f=d.has(`transform`)?parseIconTransform(d.get(`transform`)):r,p=i.length>0?i[i.length-1]:r,m=f===null?null:composeTransforms(p,f);if(n===`g`){u||i.push(m??p);continue}let h=d.get(`d`)?.trim();if(!h||m===null)continue;let g=presentationValue(d,`fill-opacity`),_=g===void 0?1:Number.parseFloat(g),v=presentationValue(d,`fill`);t.push({d:normalizeArcFlags(h),opacity:Number.isFinite(_)?Math.min(1,Math.max(0,_)):1,transform:m,fillRule:presentationValue(d,`fill-rule`)===`evenodd`?`evenodd`:`nonzero`,fill:v===void 0||v===`currentColor`||v===`none`||isNeutralSymbolicFill(v)?null:v})}return t}function extractPathData(e){return extractIconPaths(e).map(e=>e.d).join(` `)}function parseHexColor(e){return parseHexColorOrNull(e)??{red:0,green:0,blue:0,alpha:1}}function parseHexColorOrNull(e){let t=e.trim().replace(/^#/,``);if(!/^[0-9a-fA-F]+$/.test(t))return null;let n=255,r,i,a;if(t.length===3)r=Number.parseInt(t[0]+t[0],16),i=Number.parseInt(t[1]+t[1],16),a=Number.parseInt(t[2]+t[2],16);else if(t.length===6)r=Number.parseInt(t.slice(0,2),16),i=Number.parseInt(t.slice(2,4),16),a=Number.parseInt(t.slice(4,6),16);else if(t.length===8)n=Number.parseInt(t.slice(0,2),16),r=Number.parseInt(t.slice(2,4),16),i=Number.parseInt(t.slice(4,6),16),a=Number.parseInt(t.slice(6,8),16);else return null;return{red:r/255,green:i/255,blue:a/255,alpha:n/255}}function normalizeArcFlags(e){if(e.indexOf(`a`)===-1&&e.indexOf(`A`)===-1)return e;let t=e.length,isWs=e=>e===` `||e===`,`||e===` `||e===`
|
|
2
|
-
`||e===`\r`,isNumStart=e=>e>=`0`&&e<=`9`||e===`.`||e===`+`||e===`-`,n=0,r=``,skipWs=()=>{for(;n<t&&isWs(e[n]);)n++},readNumber=()=>{let r=n;for((e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`.`)for(n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`e`||e[n]===`E`)for(n++,(e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;return e.slice(r,n)};for(;n<t;){let i=e[n];if(i===`a`||i===`A`)for(r+=i,n++;skipWs(),!(n>=t||!isNumStart(e[n]));)r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+e[n++],skipWs(),r+=` `+e[n++],skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber();else r+=i,n++}return r}export{n as ADWAITA_ICON_GRID,e as DEFAULT_ICON_COLOR,t as DEFAULT_ICON_COLOR_DARK,r as IDENTITY_TRANSFORM,extractIconPaths,extractPathData,normalizeArcFlags,parseHexColor,parseHexColorOrNull,parseIconTransform};
|
|
2
|
+
`||e===`\r`,isNumStart=e=>e>=`0`&&e<=`9`||e===`.`||e===`+`||e===`-`,n=0,r=``,skipWs=()=>{for(;n<t&&isWs(e[n]);)n++},readNumber=()=>{let r=n;for((e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`.`)for(n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`e`||e[n]===`E`)for(n++,(e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;return e.slice(r,n)};for(;n<t;){let i=e[n];if(i===`a`||i===`A`)for(r+=i,n++;skipWs(),!(n>=t||!isNumStart(e[n]));)r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+e[n++],skipWs(),r+=` `+e[n++],skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber();else r+=i,n++}return r}const u=/<svg\b((?:"[^"]*"|'[^']*'|[^"'<>])*)>/;function rootAttribute(e,t){return RegExp(`\\s${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`).exec(e)?.slice(1).find(e=>e!==void 0)}function fitIconToGrid(e){let t=u.exec(e);if(t===null)return e;let n=t[1],r=rootAttribute(n,`viewBox`)?.trim().split(/[\s,]+/).map(Number),[i,a,o,s]=r?.length===4?r:[0,0,Number.parseFloat(rootAttribute(n,`width`)??``),Number.parseFloat(rootAttribute(n,`height`)??``)];if(![i,a,o,s].every(Number.isFinite)||!(o>0&&s>0)||i===0&&a===0&&o===16&&s===16)return e;let c=16/Math.max(o,s),l=(16-o*c)/2-i*c,d=(16-s*c)/2-a*c,f=e.lastIndexOf(`</svg>`);if(f<t.index)return e;let p=t.index+t[0].length;return`${e.slice(0,p)}<g transform="matrix(${c} 0 0 ${c} ${l} ${d})">${e.slice(p,f)}</g>${e.slice(f)}`}export{n as ADWAITA_ICON_GRID,e as DEFAULT_ICON_COLOR,t as DEFAULT_ICON_COLOR_DARK,r as IDENTITY_TRANSFORM,extractIconPaths,extractPathData,fitIconToGrid,normalizeArcFlags,parseHexColor,parseHexColorOrNull,parseIconTransform};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{IconTheme as e}from"../namespace/gtk-platform.js";import{onIconThemeChanged as t,resolveIconDrawing as n}from"./icon-theme.js";import{renderSymbolicIcon as r}from"./icons.js";import{ImageSource as i,Screen as a}from"@nativescript/core";const o=e.get_for_display(null);function drawIcon(e,t,s,c){let l=n(o,t,{size:s,scale:a.mainScreen?.scale||1});if(l!==null){if(l.kind===`svg`){let t=r(l.svg,{size:s,color:c});if(t===null)return;e.tintColor=void 0,e.imageSource=t;return}e.tintColor=l.symbolic?c:void 0,e.imageSource=i.fromBase64Sync(l.base64)}}function onIconsChanged(e){return t(o,e)}export{drawIcon,onIconsChanged};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{fitIconToGrid as e}from"./icon-path.js";import{iconLookupNames as t,lookupResourceIcon as n,normalizeIconName as r,resources_lookup_data as i}from"@gjsify/adwaita-core";import{contactNewSymbolic as a,documentEditSymbolic as o,documentOpenSymbolic as s,documentSaveSymbolic as c,editCopySymbolic as l,goHomeSymbolic as u,goNextSymbolic as d,goPreviousSymbolic as f,listAddSymbolic as p,listRemoveSymbolic as m,mailReplySenderSymbolic as h,mailSendSymbolic as g,openMenuSymbolic as _,sendToSymbolic as v,systemSearchSymbolic as y,viewConcealSymbolic as b,viewGridSymbolic as x,viewListSymbolic as S,viewMoreSymbolic as C,viewPagedSymbolic as w,viewRevealSymbolic as T}from"@gjsify/adwaita-icons/actions";import{preferencesSystemSymbolic as E}from"@gjsify/adwaita-icons/categories";import{cameraPhotoSymbolic as D,networkWirelessSymbolic as O}from"@gjsify/adwaita-icons/devices";import{emblemSystemSymbolic as k}from"@gjsify/adwaita-icons/legacy";import{faceSmileSymbolic as A}from"@gjsify/adwaita-icons/emotes";import{folderDocumentsSymbolic as j,folderDownloadSymbolic as M,folderMusicSymbolic as N,folderSymbolic as P,userTrashSymbolic as F}from"@gjsify/adwaita-icons/places";import{avatarDefaultSymbolic as I,imageMissingSymbolic as L,mailUnreadSymbolic as R,starredSymbolic as z}from"@gjsify/adwaita-icons/status";const B=`image-missing`,V={"avatar-default":I,"face-smile":A,"camera-photo":D,"contact-new":a,"document-edit":o,"document-open":s,"document-save":c,"edit-copy":l,"emblem-system":k,folder:P,"folder-documents":j,"folder-download":M,"folder-music":N,"go-home":u,"go-next":d,"go-previous":f,"image-missing":L,"list-add":p,"list-remove":m,"mail-reply-sender":h,"mail-send":g,"mail-unread":R,"network-wireless":O,"open-menu":_,"preferences-system":E,"send-to":v,starred:z,"system-search":y,"user-trash":F,"view-conceal":b,"view-grid":x,"view-list":S,"view-more":C,"view-paged":w,"view-reveal":T};function iconValueKind(e){let t=e??``;return t===``?`empty`:t.trimStart().startsWith(`<`)?`source`:`name`}function isIconAvailable(e){let t=r(e);return t!==``&&Object.hasOwn(V,t)}function compiledIconNames(){return Object.keys(V).sort()}function resolveIconSource(e){let t=e??``;switch(iconValueKind(t)){case`empty`:return``;case`source`:return t;default:{let e=r(t);return V[e]??L}}}const H=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;function toBase64(e){let t=``;for(let n=0;n<e.length;n+=3){let[r,i=0,a=0]=[e[n],e[n+1],e[n+2]],o=r<<16|i<<8|a;t+=H[o>>18]+H[o>>12&63],t+=n+1<e.length?H[o>>6&63]:`=`,t+=n+2<e.length?H[o&63]:`=`}return t}const U=new WeakMap;function stateOf(e){let t=U.get(e);if(t===void 0){let n={drawings:new Map,listeners:new Set};e.connect(`changed`,()=>{n.drawings.clear();for(let e of Array.from(n.listeners))e()}),U.set(e,n),t=n}return t}function onIconThemeChanged(e,t){let{listeners:n}=stateOf(e);return n.add(t),()=>{n.delete(t)}}const W={kind:`svg`,svg:L};function readResourceDrawing(t,n){let r=t.slice(t.lastIndexOf(`.`));if(r===`.svg`&&!n)return console.warn(`Gtk.IconTheme: ${t} is a colour SVG; NativeScript decodes no SVG and draws one only as a symbolic icon (ADR 0116 § 4).`),W;if(r!==`.svg`&&r!==`.png`)return console.warn(`Gtk.IconTheme: ${t} is not an SVG or a PNG, which is all NativeScript draws (ADR 0116 § 4).`),W;let a;try{a=i(t,0).get_data()}catch(e){return console.warn(`Gtk.IconTheme: ${t} cannot be drawn: ${e.message}`),W}return r===`.svg`?{kind:`svg`,svg:e(new TextDecoder().decode(a))}:{kind:`png`,base64:toBase64(a),symbolic:n}}function lookupThemeIcon(e,r,i){return n(e,{names:t(r,i.direction??null),size:i.size,scale:i.scale??1,themeHas:e=>isIconAvailable(e)})}function resolveIconDrawing(e,t,n){let r=t??``;if(iconValueKind(r)!==`name`)return r===``?null:{kind:`svg`,svg:r};let i=lookupThemeIcon(e,r,n);if(i===null||i.kind!==`resource`)return{kind:`svg`,svg:resolveIconSource(i===null?r:i.name)};let{drawings:a}=stateOf(e),o=a.get(i.path);return o===void 0&&(o=readResourceDrawing(i.path,i.symbolic),a.set(i.path,o)),o}export{B as ICON_FALLBACK_NAME,compiledIconNames,iconValueKind,isIconAvailable,lookupThemeIcon,onIconThemeChanged,resolveIconDrawing,resolveIconSource};
|
package/lib/esm/widgets/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{AdwBreakpoint as ee,addBreakpoints as e,evaluateBreakpointCondition as te,observeViewSize as ne,observeWindowSize as re,parseBreakpointCondition as ie}from"./breakpoint.js";import{GTK_ALIGN as ae}from"./gtk-align.js";import{DEFAULT_ICON_PIXEL_SIZE as oe,GTK_ICON_SIZE_NICKS as se,GTK_ICON_SIZE_PIXELS as ce,PIXEL_SIZE_UNSET as le,isGtkIconSizeNick as ue}from"./gtk-icon-size.js";import{applyConstructProps as de,nsAlignment as fe}from"./construct-props.js";import{lengthValue as pe}from"./ns-length.js";import{SimpleAction as me,SimpleActionGroup as he,activateWidgetAction as ge,findActionGroup as _e,insertActionGroup as ve}from"./actions.js";import{NOTIFY_HEXPAND as ye,NOTIFY_VEXPAND as be,withGtkWidgetLayout as xe}from"./widget-layout.js";import{DEFAULT_REVEALER_TRANSITION_DURATION as Se,DEFAULT_STACK_TRANSITION_DURATION as Ce,GTK_REVEALER_TRANSITIONS as we,GTK_STACK_TRANSITIONS as Te,transitionNick as Ee}from"./transition-type.js";import{ADW_DIALOG_PRESENTATION_MODES as De,DEFAULT_DIALOG_PRESENTATION_MODE as Oe,dialogPresentationMode as ke,findDialogHost as Ae,surfaceSize as je}from"./window-state.js";import{AdwAboutDialog as t,CLOSED as Me}from"./adw-about-dialog.js";import{adwaitaColorScheme as Ne,isThemeIconColor as Pe,onAdwaitaColorSchemeChanged as Fe,setAdwaitaColorScheme as Ie,themeIconColor as Le,toggleAdwaitaColorScheme as Re}from"./color-scheme.js";import{ADWAITA_ICON_GRID as ze,DEFAULT_ICON_COLOR as Be,DEFAULT_ICON_COLOR_DARK as Ve,extractIconPaths as He,extractPathData as Ue}from"./icon-path.js";import{ICON_FALLBACK_NAME as We,compiledIconNames as Ge,iconValueKind as Ke,isIconAvailable as qe,registerIcon as Je,registerIcons as Ye,registeredIconNames as Xe,resolveIconSource as Ze,unregisterIcon as Qe}from"./icon-theme.js";import{renderSymbolicIcon as $e}from"./icons.js";import{DEFAULT_GTK_IMAGE_SIZE as et,GtkImage as n}from"./gtk-image.js";import{ACTIVATED as tt,AdwActionRow as r}from"./adw-action-row.js";import{AdwAlertDialog as nt,AdwAlertResponses as rt}from"./adw-alert-dialog.js";import{GtkWindow as i}from"./gtk-window.js";import{ADW_WINDOW_CLASS as it,AdwWindowBase as at}from"./window-base.js";import{AdwApplicationWindow as a}from"./adw-application-window.js";import{avatarInitials as ot}from"./avatar-color.js";import{AVATAR_DEFAULT_ICON as st}from"./avatar-view.js";import{AdwAvatar as o,DEFAULT_AVATAR_SIZE as ct}from"./adw-avatar.js";import{DEFAULT_CLAMP_MAX_SIZE as lt,DEFAULT_SPINNER_SIZE as ut}from"./chrome.js";import{AdwBanner as s,BUTTON_CLICKED as dt}from"./adw-banner.js";import{AdwBin as c}from"./adw-bin.js";import{CLOSE_ATTEMPT as ft,NOTIFY_OPEN as pt,SHEET_CLOSE as mt}from"./bottom-sheet-state.js";import{SHEET_CONTENT_BOTTOM_GAP as ht,bottomSheetInsetPadding as gt}from"./bottom-sheet-insets.js";import{attachRowPressFeedback as _t}from"./row-press.js";import{AdwBottomSheet as l,bottomSheetPanel as vt}from"./adw-bottom-sheet.js";import{AdwButtonContent as u}from"./adw-button-content.js";import{AdwButtonRow as d}from"./adw-button-row.js";import{CarouselScrollSync as yt,DEFAULT_CAROUSEL_PAGE_WIDTH as bt,applyMarkerClasses as xt,carouselDotClasses as St,carouselNotifyPayload as Ct,carouselPositionAtOffset as wt,carouselScrollOffset as Tt,createCarouselState as Et,indicatorMarkerClasses as Dt,normalizeCarouselPageWidth as Ot}from"./carousel-state.js";import{AdwCarousel as f,NOTIFY_N_PAGES as kt,NOTIFY_POSITION as At,PAGE_CHANGED as jt}from"./adw-carousel.js";import{AdwCarouselIndicatorDots as p}from"./adw-carousel-indicator-dots.js";import{AdwCarouselIndicatorLines as m}from"./adw-carousel-indicator-lines.js";import{AdwClamp as h}from"./adw-clamp.js";import{AdwComboRow as g,ComboState as Mt,NOTIFY_SELECTED as Nt}from"./adw-combo-row.js";import{ADW_DIALOG_CLASS as Pt,ADW_DIALOG_CLOSED as Ft,ADW_DIALOG_CLOSE_ATTEMPT as It,AdwDialog as _}from"./adw-dialog.js";import{AdwImageButton as v,DEFAULT_ICON_BUTTON_ICON_SIZE as Lt}from"./adw-image-button.js";import{AdwEntryRow as y,NOTIFY_TEXT as Rt}from"./adw-entry-row.js";import{AdwExpanderRow as b,ExpanderState as zt,NOTIFY_EXPANDED as Bt}from"./adw-expander-row.js";import{AdwWindowTitle as x}from"./adw-window-title.js";import{AdwHeaderBar as S}from"./adw-header-bar.js";import{AdwViewStackPage as Vt}from"./view-stack-page.js";import{AdwViewStack as C,NOTIFY_VISIBLE_CHILD as Ht}from"./adw-view-stack.js";import{AdwViewSwitcherBase as Ut,NOTIFY_SELECTED as Wt}from"./view-switcher-base.js";import{AdwInlineViewSwitcher as w}from"./adw-inline-view-switcher.js";import{NsNavigationSplitViewState as Gt,NsOverlaySplitViewState as Kt,splitViewColumns as qt}from"./split-view-state.js";import{AdwSplitViewBase as Jt,NOTIFY_SHOW_SIDEBAR as Yt}from"./split-view-base.js";import{AdwNavigationSplitView as T}from"./adw-navigation-split-view.js";import{AdwNavigationPage as E}from"./adw-navigation-page.js";import{NOTIFY_VISIBLE_PAGE as Xt}from"./navigation-stack.js";import{AdwNavigationView as D}from"./adw-navigation-view.js";import{AdwOverlaySplitView as O}from"./adw-overlay-split-view.js";import{AdwPasswordEntryRow as k}from"./adw-password-entry-row.js";import{AdwPreferencesDialog as A,CLOSED as Zt}from"./adw-preferences-dialog.js";import{AdwPreferencesGroup as j}from"./adw-preferences-group.js";import{AdwPreferencesPage as M}from"./adw-preferences-page.js";import{SHORTCUT_LABEL_CAP_TEXT_CLASS as Qt,SHORTCUT_LABEL_CLASS as $t,SHORTCUT_LABEL_DIMMED_CLASS as en,SHORTCUT_LABEL_DISABLED_CLASS as tn,SHORTCUT_LABEL_KEYCAP_CLASS as nn,SHORTCUT_LABEL_KEYS_CLASS as rn,SHORTCUT_LABEL_SIDE_CLASS as an,SHORTCUT_LABEL_SPACED_CLASS as on,shortcutLabelDirection as sn,shortcutLabelPlatform as cn,shortcutLabelRenderPlan as ln}from"./shortcut-label.js";import{AdwShortcutLabel as N}from"./adw-shortcut-label.js";import{AdwSidebarItem as un,AdwSidebarSection as dn}from"../values/sidebar.js";import{AdwSidebar as P,NOTIFY_SELECTED as fn}from"./adw-sidebar.js";import{AdwSpinRow as F,NOTIFY_VALUE as pn,SpinState as mn}from"./adw-spin-row.js";import{AdwSpinner as I}from"./adw-spinner.js";import{GROUP_DIVIDER_API as hn,assertPopupMenuAssignable as gn,fillPopupMenu as _n,openPopupMenu as vn,refuseMenuString as yn}from"./popup-menu.js";import{showMenuPopup as bn}from"./popup-menu-view.js";import{DEFAULT_SCROLLBAR_POLICY as xn,GTK_POLICY_TYPES as Sn,normalizePolicy as Cn,policyScrolls as wn,scrollOrientationFor as Tn}from"./scrolled-window-policy.js";import{AdwSplitButton as L,CLICKED as En,MENU_TAPPED as Dn}from"./adw-split-button.js";import{AdwStatusPage as R}from"./adw-status-page.js";import{AdwSwitchRow as z,NOTIFY_ACTIVE as On}from"./adw-switch-row.js";import{AdwTabPage as kn}from"../values/tab-page.js";import{applyTabViewVisibility as An,createTabViewState as jn,tabBarVisibility as Mn,tabCloseVisibilities as Nn,tabLabelText as Pn,tabPageVisibilities as Fn,tabTooltipText as In,tabViewNotifyPayload as Ln}from"./tab-view-state.js";import{AdwTabView as B,CLOSE_PAGE as Rn,NOTIFY_SELECTED_PAGE as zn,PAGES_CHANGED as Bn}from"./adw-tab-view.js";import{AdwToast as Vn,AdwToastOverlay as V,AdwToastQueue as Hn,DEFAULT_TOAST_TIMEOUT as Un}from"./adw-toast-overlay.js";import{AdwToggle as Wn}from"./adw-toggle.js";import{AdwToggleGroup as H,NOTIFY_SELECTED as Gn,ToggleGroupState as Kn}from"./adw-toggle-group.js";import{WINDOW_BACKGROUND as qn,configureSystemBars as Jn,systemBarsConfig as Yn}from"./system-bars.js";import{AdwToolbarView as U}from"./adw-toolbar-view.js";import{AdwViewSwitcher as W}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as G}from"./adw-view-switcher-bar.js";import{AdwWindow as K}from"./adw-window.js";import{AdwWrapBox as q}from"./adw-wrap-box.js";import{GtkActionBar as J}from"./gtk-action-bar.js";import{DEFAULT_BOX_SPACING as Xn,boxChildTrack as Zn,boxSpacingChanges as Qn,boxTrackPlan as $n,normalizeBoxSpacing as er}from"./box-layout.js";import{GtkBox as Y}from"./gtk-box.js";import{buttonSlotAfterWrite as tr,buttonSlotDetaches as nr}from"./button-slot.js";import{GTK_BUTTON_CLICKED as rr,GTK_BUTTON_LABEL_CLASS as ir,GtkButton as X}from"./gtk-button.js";import{GtkDropDown as Z,NOTIFY_SELECTED as ar}from"./gtk-drop-down.js";import{GTK_CHECK_BUTTON_ACTIVATE as or,GTK_CHECK_BUTTON_CHECKED_CLASS as sr,GTK_CHECK_BUTTON_INCONSISTENT_CLASS as cr,GTK_CHECK_BUTTON_TOGGLED as lr,GtkCheckButton as Q,NOTIFY_CHECK_ACTIVE as ur}from"./gtk-check-button.js";import{DRAWING_AREA_REFUSAL as dr,GtkDrawingArea as $}from"./gtk-drawing-area.js";import{ACTIVATE as fr,GtkEntry as pr,NOTIFY_TEXT as mr}from"./gtk-entry.js";import{gridChildAt as hr,gridGap as gr,gridSpacing as _r,gridTrackCounts as vr}from"./grid-state.js";import{GtkGrid as yr}from"./gtk-grid.js";import{GtkFrame as br}from"./gtk-frame.js";import{GtkLabel as xr}from"./gtk-label.js";import{DEFAULT_LIST_SELECTION_MODE as Sr,GTK_SELECTION_MODES as Cr,selectionAfterModeChange as wr,selectionAfterTap as Tr,selectionMode as Er}from"./list-box-state.js";import{GtkListBox as Dr,LIST_BOX_ROW_ACTIVATED as Or,LIST_BOX_ROW_SELECTED as kr,LIST_ROW_SELECTED_CLASS as Ar}from"./gtk-list-box.js";import{GtkMenuButton as jr,MENU_ITEM_ACTIVATED as Mr}from"./gtk-menu-button.js";import{GtkPopoverMenu as Nr}from"./gtk-popover-menu.js";import{GtkOverlay as Pr}from"./gtk-overlay.js";import{revealerChildVisibility as Fr}from"./revealer-state.js";import{GtkRevealer as Ir,NOTIFY_REVEAL_CHILD as Lr}from"./gtk-revealer.js";import{GtkScrolledWindow as Rr}from"./gtk-scrolled-window.js";import{GtkSeparator as zr}from"./gtk-separator.js";import{GtkStackPage as Br}from"./stack-page.js";import{GtkStack as Vr,NOTIFY_STACK_VISIBLE_CHILD as Hr,NOTIFY_STACK_VISIBLE_CHILD_NAME as Ur}from"./gtk-stack.js";import{GTK_WRAP_MODES as Wr,GtkTextView as Gr,NOTIFY_TEXT_VIEW_TEXT as Kr}from"./gtk-text-view.js";import{GTK_TOGGLE_BUTTON_CHECKED_CLASS as qr,GTK_TOGGLE_BUTTON_TOGGLED as Jr,GtkToggleButton as Yr,NOTIFY_TOGGLE_ACTIVE as Xr}from"./gtk-toggle-button.js";import{AdwSliderRow as Zr,NOTIFY_SLIDER_VALUE as Qr}from"./adw-slider-row.js";import{DATA_GRID_HEADER_CELL_CLASS as $r,DATA_GRID_HEADER_ROW_CLASS as ei,DATA_GRID_SECTION_CELL_CLASS as ti,dataGridCellClass as ni,dataGridItemSpec as ri,dataGridRowClass as ii,dataGridShapeKey as ai,dataGridTracksKey as oi,parseDataGridWidth as si}from"./data-grid-model.js";import{AdwDataGrid as ci,ROW_ACTIVATED as li}from"./adw-data-grid.js";import{ADWAITA_NS_ACCENT_RULES as ui,adwaitaNsAccentColor as di,adwaitaNsAccentCss as fi}from"./accent-theme.js";import{applyAdwaitaNsAccent as pi,clearAdwaitaNsAccent as mi}from"./adw-accent.js";import{padForSystemInsets as hi,padSheetForSystemInsets as gi}from"./system-insets.js";import{labelDisplayText as _i,labelMarkupIsUnparseable as vi}from"@gjsify/adwaita-core";const yi={AdwPreferencesPage:M,AdwPreferencesGroup:j,AdwActionRow:r,AdwSwitchRow:z,AdwEntryRow:y,AdwPasswordEntryRow:k,GtkEntry:pr,AdwComboRow:g,GtkDropDown:Z,AdwSpinRow:F,AdwSliderRow:Zr,AdwExpanderRow:b,GtkButton:X,GtkBox:Y,GtkGrid:yr,GtkListBox:Dr,AdwWindow:K,AdwApplicationWindow:a,AdwDialog:_,GtkActionBar:J,AdwBin:c,GtkOverlay:Pr,GtkRevealer:Ir,GtkScrolledWindow:Rr,GtkWindow:i,GtkStack:Vr,GtkToggleButton:Yr,GtkCheckButton:Q,GtkDrawingArea:$,GtkFrame:br,GtkSeparator:zr,GtkTextView:Gr,GtkLabel:xr,AdwImageButton:v,GtkMenuButton:jr,GtkImage:n,AdwBanner:s,AdwAvatar:o,AdwWindowTitle:x,AdwClamp:h,AdwHeaderBar:S,AdwToolbarView:U,AdwWrapBox:q,AdwDataGrid:ci,AdwSpinner:I,AdwStatusPage:R,AdwButtonRow:d,AdwButtonContent:u,AdwSplitButton:L,AdwToggleGroup:H,AdwShortcutLabel:N,AdwViewStack:C,AdwViewSwitcher:W,AdwViewSwitcherBar:G,AdwInlineViewSwitcher:w,AdwTabView:B,AdwCarousel:f,AdwCarouselIndicatorDots:p,AdwCarouselIndicatorLines:m,AdwNavigationPage:E,AdwNavigationView:D,AdwNavigationSplitView:T,AdwOverlaySplitView:O,AdwSidebar:P,AdwBottomSheet:l,AdwToastOverlay:V,AdwAboutDialog:t,AdwPreferencesDialog:A};let bi=!1;function registerAdwaitaElements(){if(!bi&&typeof registerElement==`function`){for(let[ee,e]of Object.entries(yi))registerElement(ee,()=>e);bi=!0}}export{Me as ABOUT_CLOSED,tt as ACTIVATED,ze as ADWAITA_ICON_GRID,ui as ADWAITA_NS_ACCENT_RULES,Pt as ADW_DIALOG_CLASS,Ft as ADW_DIALOG_CLOSED,It as ADW_DIALOG_CLOSE_ATTEMPT,De as ADW_DIALOG_PRESENTATION_MODES,it as ADW_WINDOW_CLASS,st as AVATAR_DEFAULT_ICON,t as AdwAboutDialog,r as AdwActionRow,nt as AdwAlertDialog,rt as AdwAlertResponses,a as AdwApplicationWindow,o as AdwAvatar,s as AdwBanner,c as AdwBin,l as AdwBottomSheet,ee as AdwBreakpoint,u as AdwButtonContent,d as AdwButtonRow,f as AdwCarousel,p as AdwCarouselIndicatorDots,m as AdwCarouselIndicatorLines,h as AdwClamp,g as AdwComboRow,ci as AdwDataGrid,_ as AdwDialog,y as AdwEntryRow,b as AdwExpanderRow,S as AdwHeaderBar,v as AdwImageButton,w as AdwInlineViewSwitcher,E as AdwNavigationPage,T as AdwNavigationSplitView,D as AdwNavigationView,O as AdwOverlaySplitView,k as AdwPasswordEntryRow,A as AdwPreferencesDialog,j as AdwPreferencesGroup,M as AdwPreferencesPage,N as AdwShortcutLabel,P as AdwSidebar,un as AdwSidebarItem,dn as AdwSidebarSection,Zr as AdwSliderRow,F as AdwSpinRow,I as AdwSpinner,L as AdwSplitButton,Jt as AdwSplitViewBase,R as AdwStatusPage,z as AdwSwitchRow,kn as AdwTabPage,B as AdwTabView,Vn as AdwToast,V as AdwToastOverlay,Hn as AdwToastQueue,Wn as AdwToggle,H as AdwToggleGroup,U as AdwToolbarView,C as AdwViewStack,Vt as AdwViewStackPage,W as AdwViewSwitcher,G as AdwViewSwitcherBar,Ut as AdwViewSwitcherBase,K as AdwWindow,at as AdwWindowBase,x as AdwWindowTitle,q as AdwWrapBox,dt as BUTTON_CLICKED,En as CLICKED,ft as CLOSE_ATTEMPT,Rn as CLOSE_PAGE,yt as CarouselScrollSync,Mt as ComboState,$r as DATA_GRID_HEADER_CELL_CLASS,ei as DATA_GRID_HEADER_ROW_CLASS,ti as DATA_GRID_SECTION_CELL_CLASS,ct as DEFAULT_AVATAR_SIZE,Xn as DEFAULT_BOX_SPACING,bt as DEFAULT_CAROUSEL_PAGE_WIDTH,lt as DEFAULT_CLAMP_MAX_SIZE,Oe as DEFAULT_DIALOG_PRESENTATION_MODE,et as DEFAULT_GTK_IMAGE_SIZE,Lt as DEFAULT_ICON_BUTTON_ICON_SIZE,Be as DEFAULT_ICON_COLOR,Ve as DEFAULT_ICON_COLOR_DARK,oe as DEFAULT_ICON_PIXEL_SIZE,Sr as DEFAULT_LIST_SELECTION_MODE,Se as DEFAULT_REVEALER_TRANSITION_DURATION,xn as DEFAULT_SCROLLBAR_POLICY,ut as DEFAULT_SPINNER_SIZE,Ce as DEFAULT_STACK_TRANSITION_DURATION,Un as DEFAULT_TOAST_TIMEOUT,dr as DRAWING_AREA_REFUSAL,fr as ENTRY_ACTIVATE,zt as ExpanderState,hn as GROUP_DIVIDER_API,ae as GTK_ALIGN,rr as GTK_BUTTON_CLICKED,ir as GTK_BUTTON_LABEL_CLASS,or as GTK_CHECK_BUTTON_ACTIVATE,sr as GTK_CHECK_BUTTON_CHECKED_CLASS,cr as GTK_CHECK_BUTTON_INCONSISTENT_CLASS,lr as GTK_CHECK_BUTTON_TOGGLED,se as GTK_ICON_SIZE_NICKS,ce as GTK_ICON_SIZE_PIXELS,Sn as GTK_POLICY_TYPES,we as GTK_REVEALER_TRANSITIONS,Cr as GTK_SELECTION_MODES,Te as GTK_STACK_TRANSITIONS,qr as GTK_TOGGLE_BUTTON_CHECKED_CLASS,Jr as GTK_TOGGLE_BUTTON_TOGGLED,Wr as GTK_WRAP_MODES,J as GtkActionBar,Y as GtkBox,X as GtkButton,Q as GtkCheckButton,$ as GtkDrawingArea,Z as GtkDropDown,pr as GtkEntry,br as GtkFrame,yr as GtkGrid,n as GtkImage,xr as GtkLabel,Dr as GtkListBox,jr as GtkMenuButton,Pr as GtkOverlay,Nr as GtkPopoverMenu,Ir as GtkRevealer,Rr as GtkScrolledWindow,zr as GtkSeparator,Vr as GtkStack,Br as GtkStackPage,Gr as GtkTextView,Yr as GtkToggleButton,i as GtkWindow,We as ICON_FALLBACK_NAME,Or as LIST_BOX_ROW_ACTIVATED,kr as LIST_BOX_ROW_SELECTED,Ar as LIST_ROW_SELECTED_CLASS,Mr as MENU_ITEM_ACTIVATED,Dn as MENU_TAPPED,On as NOTIFY_ACTIVE,ur as NOTIFY_CHECK_ACTIVE,ar as NOTIFY_DROP_DOWN_SELECTED,mr as NOTIFY_ENTRY_TEXT,Bt as NOTIFY_EXPANDED,ye as NOTIFY_HEXPAND,kt as NOTIFY_N_PAGES,pt as NOTIFY_OPEN,At as NOTIFY_POSITION,Lr as NOTIFY_REVEAL_CHILD,Nt as NOTIFY_SELECTED,zn as NOTIFY_SELECTED_PAGE,Yt as NOTIFY_SHOW_SIDEBAR,fn as NOTIFY_SIDEBAR_SELECTED,Qr as NOTIFY_SLIDER_VALUE,Hr as NOTIFY_STACK_VISIBLE_CHILD,Ur as NOTIFY_STACK_VISIBLE_CHILD_NAME,Rt as NOTIFY_TEXT,Kr as NOTIFY_TEXT_VIEW_TEXT,Xr as NOTIFY_TOGGLE_ACTIVE,Gn as NOTIFY_TOGGLE_SELECTED,pn as NOTIFY_VALUE,be as NOTIFY_VEXPAND,Wt as NOTIFY_VIEW_SELECTED,Ht as NOTIFY_VISIBLE_CHILD,Xt as NOTIFY_VISIBLE_PAGE,Gt as NsNavigationSplitViewState,Kt as NsOverlaySplitViewState,Bn as PAGES_CHANGED,jt as PAGE_CHANGED,le as PIXEL_SIZE_UNSET,Zt as PREFERENCES_CLOSED,li as ROW_ACTIVATED,mt as SHEET_CLOSE,ht as SHEET_CONTENT_BOTTOM_GAP,Qt as SHORTCUT_LABEL_CAP_TEXT_CLASS,$t as SHORTCUT_LABEL_CLASS,en as SHORTCUT_LABEL_DIMMED_CLASS,tn as SHORTCUT_LABEL_DISABLED_CLASS,nn as SHORTCUT_LABEL_KEYCAP_CLASS,rn as SHORTCUT_LABEL_KEYS_CLASS,an as SHORTCUT_LABEL_SIDE_CLASS,on as SHORTCUT_LABEL_SPACED_CLASS,me as SimpleAction,he as SimpleActionGroup,mn as SpinState,Kn as ToggleGroupState,qn as WINDOW_BACKGROUND,ge as activateWidgetAction,e as addBreakpoints,Ne as adwaitaColorScheme,di as adwaitaNsAccentColor,fi as adwaitaNsAccentCss,pi as applyAdwaitaNsAccent,de as applyConstructProps,xt as applyMarkerClasses,An as applyTabViewVisibility,gn as assertPopupMenuAssignable,_t as attachRowPressFeedback,ot as avatarInitials,gt as bottomSheetInsetPadding,vt as bottomSheetPanel,Zn as boxChildTrack,Qn as boxSpacingChanges,$n as boxTrackPlan,tr as buttonSlotAfterWrite,nr as buttonSlotDetaches,St as carouselDotClasses,Ct as carouselNotifyPayload,wt as carouselPositionAtOffset,Tt as carouselScrollOffset,mi as clearAdwaitaNsAccent,Ge as compiledIconNames,Jn as configureSystemBars,Et as createCarouselState,jn as createTabViewState,ni as dataGridCellClass,ri as dataGridItemSpec,ii as dataGridRowClass,ai as dataGridShapeKey,oi as dataGridTracksKey,ke as dialogPresentationMode,te as evaluateBreakpointCondition,He as extractIconPaths,Ue as extractPathData,_n as fillPopupMenu,_e as findActionGroup,Ae as findDialogHost,hr as gridChildAt,gr as gridGap,_r as gridSpacing,vr as gridTrackCounts,Ke as iconValueKind,Dt as indicatorMarkerClasses,ve as insertActionGroup,ue as isGtkIconSizeNick,qe as isIconAvailable,Pe as isThemeIconColor,_i as labelDisplayText,vi as labelMarkupIsUnparseable,pe as lengthValue,er as normalizeBoxSpacing,Ot as normalizeCarouselPageWidth,Cn as normalizePolicy,fe as nsAlignment,ne as observeViewSize,re as observeWindowSize,Fe as onAdwaitaColorSchemeChanged,vn as openPopupMenu,hi as padForSystemInsets,gi as padSheetForSystemInsets,ie as parseBreakpointCondition,si as parseDataGridWidth,wn as policyScrolls,yn as refuseMenuString,registerAdwaitaElements,Je as registerIcon,Ye as registerIcons,Xe as registeredIconNames,$e as renderSymbolicIcon,Ze as resolveIconSource,Fr as revealerChildVisibility,Tn as scrollOrientationFor,wr as selectionAfterModeChange,Tr as selectionAfterTap,Er as selectionMode,Ie as setAdwaitaColorScheme,sn as shortcutLabelDirection,cn as shortcutLabelPlatform,ln as shortcutLabelRenderPlan,bn as showMenuPopup,qt as splitViewColumns,je as surfaceSize,Yn as systemBarsConfig,Mn as tabBarVisibility,Nn as tabCloseVisibilities,Pn as tabLabelText,Fn as tabPageVisibilities,In as tabTooltipText,Ln as tabViewNotifyPayload,Le as themeIconColor,Re as toggleAdwaitaColorScheme,Ee as transitionNick,Qe as unregisterIcon,xe as withGtkWidgetLayout};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwBreakpoint as ee,addBreakpoints as e,evaluateBreakpointCondition as te,observeViewSize as ne,observeWindowSize as re,parseBreakpointCondition as ie}from"./breakpoint.js";import{GTK_ALIGN as ae}from"./gtk-align.js";import{DEFAULT_ICON_PIXEL_SIZE as oe,GTK_ICON_SIZE_NICKS as se,GTK_ICON_SIZE_PIXELS as ce,PIXEL_SIZE_UNSET as le,isGtkIconSizeNick as ue}from"./gtk-icon-size.js";import{applyConstructProps as de,nsAlignment as fe}from"./construct-props.js";import{lengthValue as pe}from"./ns-length.js";import{SimpleAction as me,SimpleActionGroup as he,activateWidgetAction as ge,findActionGroup as _e,insertActionGroup as ve}from"./actions.js";import{NOTIFY_HEXPAND as ye,NOTIFY_VEXPAND as be,withGtkWidgetLayout as xe}from"./widget-layout.js";import{DEFAULT_REVEALER_TRANSITION_DURATION as Se,DEFAULT_STACK_TRANSITION_DURATION as Ce,GTK_REVEALER_TRANSITIONS as we,GTK_STACK_TRANSITIONS as Te,transitionNick as Ee}from"./transition-type.js";import{ADW_DIALOG_PRESENTATION_MODES as De,DEFAULT_DIALOG_PRESENTATION_MODE as Oe,dialogPresentationMode as ke,findDialogHost as Ae,surfaceSize as je}from"./window-state.js";import{AdwAboutDialog as t,CLOSED as Me}from"./adw-about-dialog.js";import{adwaitaColorScheme as Ne,isThemeIconColor as Pe,onAdwaitaColorSchemeChanged as Fe,setAdwaitaColorScheme as Ie,themeIconColor as Le,toggleAdwaitaColorScheme as Re}from"./color-scheme.js";import{ADWAITA_ICON_GRID as ze,DEFAULT_ICON_COLOR as Be,DEFAULT_ICON_COLOR_DARK as Ve,extractIconPaths as He,extractPathData as Ue}from"./icon-path.js";import{ICON_FALLBACK_NAME as We,compiledIconNames as Ge,iconValueKind as Ke,isIconAvailable as qe,resolveIconSource as Je}from"./icon-theme.js";import{renderSymbolicIcon as Ye}from"./icons.js";import{DEFAULT_GTK_IMAGE_SIZE as Xe,GtkImage as n}from"./gtk-image.js";import{ACTIVATED as Ze,AdwActionRow as r}from"./adw-action-row.js";import{AdwAlertDialog as Qe,AdwAlertResponses as $e}from"./adw-alert-dialog.js";import{GtkWindow as i}from"./gtk-window.js";import{ADW_WINDOW_CLASS as et,AdwWindowBase as tt}from"./window-base.js";import{AdwApplicationWindow as a}from"./adw-application-window.js";import{avatarInitials as nt}from"./avatar-color.js";import{AVATAR_DEFAULT_ICON as rt}from"./avatar-view.js";import{AdwAvatar as o,DEFAULT_AVATAR_SIZE as it}from"./adw-avatar.js";import{DEFAULT_CLAMP_MAX_SIZE as at,DEFAULT_SPINNER_SIZE as ot}from"./chrome.js";import{AdwBanner as s,BUTTON_CLICKED as st}from"./adw-banner.js";import{AdwBin as c}from"./adw-bin.js";import{CLOSE_ATTEMPT as ct,NOTIFY_OPEN as lt,SHEET_CLOSE as ut}from"./bottom-sheet-state.js";import{SHEET_CONTENT_BOTTOM_GAP as dt,bottomSheetInsetPadding as ft}from"./bottom-sheet-insets.js";import{attachRowPressFeedback as pt}from"./row-press.js";import{AdwBottomSheet as l,bottomSheetPanel as mt}from"./adw-bottom-sheet.js";import{AdwButtonContent as u}from"./adw-button-content.js";import{AdwButtonRow as d}from"./adw-button-row.js";import{CarouselScrollSync as ht,DEFAULT_CAROUSEL_PAGE_WIDTH as gt,applyMarkerClasses as _t,carouselDotClasses as vt,carouselNotifyPayload as yt,carouselPositionAtOffset as bt,carouselScrollOffset as xt,createCarouselState as St,indicatorMarkerClasses as Ct,normalizeCarouselPageWidth as wt}from"./carousel-state.js";import{AdwCarousel as f,NOTIFY_N_PAGES as Tt,NOTIFY_POSITION as Et,PAGE_CHANGED as Dt}from"./adw-carousel.js";import{AdwCarouselIndicatorDots as p}from"./adw-carousel-indicator-dots.js";import{AdwCarouselIndicatorLines as m}from"./adw-carousel-indicator-lines.js";import{AdwClamp as h}from"./adw-clamp.js";import{AdwComboRow as g,ComboState as Ot,NOTIFY_SELECTED as kt}from"./adw-combo-row.js";import{ADW_DIALOG_CLASS as At,ADW_DIALOG_CLOSED as jt,ADW_DIALOG_CLOSE_ATTEMPT as Mt,AdwDialog as _}from"./adw-dialog.js";import{AdwImageButton as v,DEFAULT_ICON_BUTTON_ICON_SIZE as Nt}from"./adw-image-button.js";import{AdwEntryRow as y,NOTIFY_TEXT as Pt}from"./adw-entry-row.js";import{AdwExpanderRow as b,ExpanderState as Ft,NOTIFY_EXPANDED as It}from"./adw-expander-row.js";import{AdwWindowTitle as x}from"./adw-window-title.js";import{AdwHeaderBar as S}from"./adw-header-bar.js";import{AdwViewStackPage as Lt}from"./view-stack-page.js";import{AdwViewStack as C,NOTIFY_VISIBLE_CHILD as Rt}from"./adw-view-stack.js";import{AdwViewSwitcherBase as zt,NOTIFY_SELECTED as Bt}from"./view-switcher-base.js";import{AdwInlineViewSwitcher as w}from"./adw-inline-view-switcher.js";import{NsNavigationSplitViewState as Vt,NsOverlaySplitViewState as Ht,splitViewColumns as Ut}from"./split-view-state.js";import{AdwSplitViewBase as Wt,NOTIFY_SHOW_SIDEBAR as Gt}from"./split-view-base.js";import{AdwNavigationSplitView as T}from"./adw-navigation-split-view.js";import{AdwNavigationPage as E}from"./adw-navigation-page.js";import{NOTIFY_VISIBLE_PAGE as Kt}from"./navigation-stack.js";import{AdwNavigationView as D}from"./adw-navigation-view.js";import{AdwOverlaySplitView as O}from"./adw-overlay-split-view.js";import{AdwPasswordEntryRow as k}from"./adw-password-entry-row.js";import{AdwPreferencesDialog as A,CLOSED as qt}from"./adw-preferences-dialog.js";import{AdwPreferencesGroup as j}from"./adw-preferences-group.js";import{AdwPreferencesPage as M}from"./adw-preferences-page.js";import{SHORTCUT_LABEL_CAP_TEXT_CLASS as Jt,SHORTCUT_LABEL_CLASS as Yt,SHORTCUT_LABEL_DIMMED_CLASS as Xt,SHORTCUT_LABEL_DISABLED_CLASS as Zt,SHORTCUT_LABEL_KEYCAP_CLASS as Qt,SHORTCUT_LABEL_KEYS_CLASS as $t,SHORTCUT_LABEL_SIDE_CLASS as en,SHORTCUT_LABEL_SPACED_CLASS as tn,shortcutLabelDirection as nn,shortcutLabelPlatform as rn,shortcutLabelRenderPlan as an}from"./shortcut-label.js";import{AdwShortcutLabel as N}from"./adw-shortcut-label.js";import{AdwSidebarItem as on,AdwSidebarSection as sn}from"../values/sidebar.js";import{AdwSidebar as P,NOTIFY_SELECTED as cn}from"./adw-sidebar.js";import{AdwSpinRow as F,NOTIFY_VALUE as ln,SpinState as un}from"./adw-spin-row.js";import{AdwSpinner as I}from"./adw-spinner.js";import{GROUP_DIVIDER_API as dn,assertPopupMenuAssignable as fn,fillPopupMenu as pn,openPopupMenu as mn,refuseMenuString as hn}from"./popup-menu.js";import{showMenuPopup as gn}from"./popup-menu-view.js";import{DEFAULT_SCROLLBAR_POLICY as _n,GTK_POLICY_TYPES as vn,normalizePolicy as yn,policyScrolls as bn,scrollOrientationFor as xn}from"./scrolled-window-policy.js";import{AdwSplitButton as L,CLICKED as Sn,MENU_TAPPED as Cn}from"./adw-split-button.js";import{AdwStatusPage as R}from"./adw-status-page.js";import{AdwSwitchRow as z,NOTIFY_ACTIVE as wn}from"./adw-switch-row.js";import{AdwTabPage as Tn}from"../values/tab-page.js";import{applyTabViewVisibility as En,createTabViewState as Dn,tabBarVisibility as On,tabCloseVisibilities as kn,tabLabelText as An,tabPageVisibilities as jn,tabTooltipText as Mn,tabViewNotifyPayload as Nn}from"./tab-view-state.js";import{AdwTabView as B,CLOSE_PAGE as Pn,NOTIFY_SELECTED_PAGE as Fn,PAGES_CHANGED as In}from"./adw-tab-view.js";import{AdwToast as Ln,AdwToastOverlay as V,AdwToastQueue as Rn,DEFAULT_TOAST_TIMEOUT as zn}from"./adw-toast-overlay.js";import{AdwToggle as Bn}from"./adw-toggle.js";import{AdwToggleGroup as H,NOTIFY_SELECTED as Vn,ToggleGroupState as Hn}from"./adw-toggle-group.js";import{WINDOW_BACKGROUND as Un,configureSystemBars as Wn,systemBarsConfig as Gn}from"./system-bars.js";import{AdwToolbarView as U}from"./adw-toolbar-view.js";import{AdwViewSwitcher as W}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as G}from"./adw-view-switcher-bar.js";import{AdwWindow as K}from"./adw-window.js";import{AdwWrapBox as q}from"./adw-wrap-box.js";import{GtkActionBar as J}from"./gtk-action-bar.js";import{DEFAULT_BOX_SPACING as Kn,boxChildTrack as qn,boxSpacingChanges as Jn,boxTrackPlan as Yn,normalizeBoxSpacing as Xn}from"./box-layout.js";import{GtkBox as Y}from"./gtk-box.js";import{buttonSlotAfterWrite as Zn,buttonSlotDetaches as Qn}from"./button-slot.js";import{GTK_BUTTON_CLICKED as $n,GTK_BUTTON_LABEL_CLASS as er,GtkButton as X}from"./gtk-button.js";import{GtkDropDown as Z,NOTIFY_SELECTED as tr}from"./gtk-drop-down.js";import{GTK_CHECK_BUTTON_ACTIVATE as nr,GTK_CHECK_BUTTON_CHECKED_CLASS as rr,GTK_CHECK_BUTTON_INCONSISTENT_CLASS as ir,GTK_CHECK_BUTTON_TOGGLED as ar,GtkCheckButton as Q,NOTIFY_CHECK_ACTIVE as or}from"./gtk-check-button.js";import{DRAWING_AREA_REFUSAL as sr,GtkDrawingArea as $}from"./gtk-drawing-area.js";import{ACTIVATE as cr,GtkEntry as lr,NOTIFY_TEXT as ur}from"./gtk-entry.js";import{gridChildAt as dr,gridGap as fr,gridSpacing as pr,gridTrackCounts as mr}from"./grid-state.js";import{GtkGrid as hr}from"./gtk-grid.js";import{GtkFrame as gr}from"./gtk-frame.js";import{GtkLabel as _r}from"./gtk-label.js";import{DEFAULT_LIST_SELECTION_MODE as vr,GTK_SELECTION_MODES as yr,selectionAfterModeChange as br,selectionAfterTap as xr,selectionMode as Sr}from"./list-box-state.js";import{GtkListBox as Cr,LIST_BOX_ROW_ACTIVATED as wr,LIST_BOX_ROW_SELECTED as Tr,LIST_ROW_SELECTED_CLASS as Er}from"./gtk-list-box.js";import{GtkMenuButton as Dr,MENU_ITEM_ACTIVATED as Or}from"./gtk-menu-button.js";import{GtkPopoverMenu as kr}from"./gtk-popover-menu.js";import{GtkOverlay as Ar}from"./gtk-overlay.js";import{revealerChildVisibility as jr}from"./revealer-state.js";import{GtkRevealer as Mr,NOTIFY_REVEAL_CHILD as Nr}from"./gtk-revealer.js";import{GtkScrolledWindow as Pr}from"./gtk-scrolled-window.js";import{GtkSeparator as Fr}from"./gtk-separator.js";import{GtkStackPage as Ir}from"./stack-page.js";import{GtkStack as Lr,NOTIFY_STACK_VISIBLE_CHILD as Rr,NOTIFY_STACK_VISIBLE_CHILD_NAME as zr}from"./gtk-stack.js";import{GTK_WRAP_MODES as Br,GtkTextView as Vr,NOTIFY_TEXT_VIEW_TEXT as Hr}from"./gtk-text-view.js";import{GTK_TOGGLE_BUTTON_CHECKED_CLASS as Ur,GTK_TOGGLE_BUTTON_TOGGLED as Wr,GtkToggleButton as Gr,NOTIFY_TOGGLE_ACTIVE as Kr}from"./gtk-toggle-button.js";import{AdwSliderRow as qr,NOTIFY_SLIDER_VALUE as Jr}from"./adw-slider-row.js";import{DATA_GRID_HEADER_CELL_CLASS as Yr,DATA_GRID_HEADER_ROW_CLASS as Xr,DATA_GRID_SECTION_CELL_CLASS as Zr,dataGridCellClass as Qr,dataGridItemSpec as $r,dataGridRowClass as ei,dataGridShapeKey as ti,dataGridTracksKey as ni,parseDataGridWidth as ri}from"./data-grid-model.js";import{AdwDataGrid as ii,ROW_ACTIVATED as ai}from"./adw-data-grid.js";import{ADWAITA_NS_ACCENT_RULES as oi,adwaitaNsAccentColor as si,adwaitaNsAccentCss as ci}from"./accent-theme.js";import{applyAdwaitaNsAccent as li,clearAdwaitaNsAccent as ui}from"./adw-accent.js";import{padForSystemInsets as di,padSheetForSystemInsets as fi}from"./system-insets.js";import{labelDisplayText as pi,labelMarkupIsUnparseable as mi}from"@gjsify/adwaita-core";const hi={AdwPreferencesPage:M,AdwPreferencesGroup:j,AdwActionRow:r,AdwSwitchRow:z,AdwEntryRow:y,AdwPasswordEntryRow:k,GtkEntry:lr,AdwComboRow:g,GtkDropDown:Z,AdwSpinRow:F,AdwSliderRow:qr,AdwExpanderRow:b,GtkButton:X,GtkBox:Y,GtkGrid:hr,GtkListBox:Cr,AdwWindow:K,AdwApplicationWindow:a,AdwDialog:_,GtkActionBar:J,AdwBin:c,GtkOverlay:Ar,GtkRevealer:Mr,GtkScrolledWindow:Pr,GtkWindow:i,GtkStack:Lr,GtkToggleButton:Gr,GtkCheckButton:Q,GtkDrawingArea:$,GtkFrame:gr,GtkSeparator:Fr,GtkTextView:Vr,GtkLabel:_r,AdwImageButton:v,GtkMenuButton:Dr,GtkImage:n,AdwBanner:s,AdwAvatar:o,AdwWindowTitle:x,AdwClamp:h,AdwHeaderBar:S,AdwToolbarView:U,AdwWrapBox:q,AdwDataGrid:ii,AdwSpinner:I,AdwStatusPage:R,AdwButtonRow:d,AdwButtonContent:u,AdwSplitButton:L,AdwToggleGroup:H,AdwShortcutLabel:N,AdwViewStack:C,AdwViewSwitcher:W,AdwViewSwitcherBar:G,AdwInlineViewSwitcher:w,AdwTabView:B,AdwCarousel:f,AdwCarouselIndicatorDots:p,AdwCarouselIndicatorLines:m,AdwNavigationPage:E,AdwNavigationView:D,AdwNavigationSplitView:T,AdwOverlaySplitView:O,AdwSidebar:P,AdwBottomSheet:l,AdwToastOverlay:V,AdwAboutDialog:t,AdwPreferencesDialog:A};let gi=!1;function registerAdwaitaElements(){if(!gi&&typeof registerElement==`function`){for(let[ee,e]of Object.entries(hi))registerElement(ee,()=>e);gi=!0}}export{Me as ABOUT_CLOSED,Ze as ACTIVATED,ze as ADWAITA_ICON_GRID,oi as ADWAITA_NS_ACCENT_RULES,At as ADW_DIALOG_CLASS,jt as ADW_DIALOG_CLOSED,Mt as ADW_DIALOG_CLOSE_ATTEMPT,De as ADW_DIALOG_PRESENTATION_MODES,et as ADW_WINDOW_CLASS,rt as AVATAR_DEFAULT_ICON,t as AdwAboutDialog,r as AdwActionRow,Qe as AdwAlertDialog,$e as AdwAlertResponses,a as AdwApplicationWindow,o as AdwAvatar,s as AdwBanner,c as AdwBin,l as AdwBottomSheet,ee as AdwBreakpoint,u as AdwButtonContent,d as AdwButtonRow,f as AdwCarousel,p as AdwCarouselIndicatorDots,m as AdwCarouselIndicatorLines,h as AdwClamp,g as AdwComboRow,ii as AdwDataGrid,_ as AdwDialog,y as AdwEntryRow,b as AdwExpanderRow,S as AdwHeaderBar,v as AdwImageButton,w as AdwInlineViewSwitcher,E as AdwNavigationPage,T as AdwNavigationSplitView,D as AdwNavigationView,O as AdwOverlaySplitView,k as AdwPasswordEntryRow,A as AdwPreferencesDialog,j as AdwPreferencesGroup,M as AdwPreferencesPage,N as AdwShortcutLabel,P as AdwSidebar,on as AdwSidebarItem,sn as AdwSidebarSection,qr as AdwSliderRow,F as AdwSpinRow,I as AdwSpinner,L as AdwSplitButton,Wt as AdwSplitViewBase,R as AdwStatusPage,z as AdwSwitchRow,Tn as AdwTabPage,B as AdwTabView,Ln as AdwToast,V as AdwToastOverlay,Rn as AdwToastQueue,Bn as AdwToggle,H as AdwToggleGroup,U as AdwToolbarView,C as AdwViewStack,Lt as AdwViewStackPage,W as AdwViewSwitcher,G as AdwViewSwitcherBar,zt as AdwViewSwitcherBase,K as AdwWindow,tt as AdwWindowBase,x as AdwWindowTitle,q as AdwWrapBox,st as BUTTON_CLICKED,Sn as CLICKED,ct as CLOSE_ATTEMPT,Pn as CLOSE_PAGE,ht as CarouselScrollSync,Ot as ComboState,Yr as DATA_GRID_HEADER_CELL_CLASS,Xr as DATA_GRID_HEADER_ROW_CLASS,Zr as DATA_GRID_SECTION_CELL_CLASS,it as DEFAULT_AVATAR_SIZE,Kn as DEFAULT_BOX_SPACING,gt as DEFAULT_CAROUSEL_PAGE_WIDTH,at as DEFAULT_CLAMP_MAX_SIZE,Oe as DEFAULT_DIALOG_PRESENTATION_MODE,Xe as DEFAULT_GTK_IMAGE_SIZE,Nt as DEFAULT_ICON_BUTTON_ICON_SIZE,Be as DEFAULT_ICON_COLOR,Ve as DEFAULT_ICON_COLOR_DARK,oe as DEFAULT_ICON_PIXEL_SIZE,vr as DEFAULT_LIST_SELECTION_MODE,Se as DEFAULT_REVEALER_TRANSITION_DURATION,_n as DEFAULT_SCROLLBAR_POLICY,ot as DEFAULT_SPINNER_SIZE,Ce as DEFAULT_STACK_TRANSITION_DURATION,zn as DEFAULT_TOAST_TIMEOUT,sr as DRAWING_AREA_REFUSAL,cr as ENTRY_ACTIVATE,Ft as ExpanderState,dn as GROUP_DIVIDER_API,ae as GTK_ALIGN,$n as GTK_BUTTON_CLICKED,er as GTK_BUTTON_LABEL_CLASS,nr as GTK_CHECK_BUTTON_ACTIVATE,rr as GTK_CHECK_BUTTON_CHECKED_CLASS,ir as GTK_CHECK_BUTTON_INCONSISTENT_CLASS,ar as GTK_CHECK_BUTTON_TOGGLED,se as GTK_ICON_SIZE_NICKS,ce as GTK_ICON_SIZE_PIXELS,vn as GTK_POLICY_TYPES,we as GTK_REVEALER_TRANSITIONS,yr as GTK_SELECTION_MODES,Te as GTK_STACK_TRANSITIONS,Ur as GTK_TOGGLE_BUTTON_CHECKED_CLASS,Wr as GTK_TOGGLE_BUTTON_TOGGLED,Br as GTK_WRAP_MODES,J as GtkActionBar,Y as GtkBox,X as GtkButton,Q as GtkCheckButton,$ as GtkDrawingArea,Z as GtkDropDown,lr as GtkEntry,gr as GtkFrame,hr as GtkGrid,n as GtkImage,_r as GtkLabel,Cr as GtkListBox,Dr as GtkMenuButton,Ar as GtkOverlay,kr as GtkPopoverMenu,Mr as GtkRevealer,Pr as GtkScrolledWindow,Fr as GtkSeparator,Lr as GtkStack,Ir as GtkStackPage,Vr as GtkTextView,Gr as GtkToggleButton,i as GtkWindow,We as ICON_FALLBACK_NAME,wr as LIST_BOX_ROW_ACTIVATED,Tr as LIST_BOX_ROW_SELECTED,Er as LIST_ROW_SELECTED_CLASS,Or as MENU_ITEM_ACTIVATED,Cn as MENU_TAPPED,wn as NOTIFY_ACTIVE,or as NOTIFY_CHECK_ACTIVE,tr as NOTIFY_DROP_DOWN_SELECTED,ur as NOTIFY_ENTRY_TEXT,It as NOTIFY_EXPANDED,ye as NOTIFY_HEXPAND,Tt as NOTIFY_N_PAGES,lt as NOTIFY_OPEN,Et as NOTIFY_POSITION,Nr as NOTIFY_REVEAL_CHILD,kt as NOTIFY_SELECTED,Fn as NOTIFY_SELECTED_PAGE,Gt as NOTIFY_SHOW_SIDEBAR,cn as NOTIFY_SIDEBAR_SELECTED,Jr as NOTIFY_SLIDER_VALUE,Rr as NOTIFY_STACK_VISIBLE_CHILD,zr as NOTIFY_STACK_VISIBLE_CHILD_NAME,Pt as NOTIFY_TEXT,Hr as NOTIFY_TEXT_VIEW_TEXT,Kr as NOTIFY_TOGGLE_ACTIVE,Vn as NOTIFY_TOGGLE_SELECTED,ln as NOTIFY_VALUE,be as NOTIFY_VEXPAND,Bt as NOTIFY_VIEW_SELECTED,Rt as NOTIFY_VISIBLE_CHILD,Kt as NOTIFY_VISIBLE_PAGE,Vt as NsNavigationSplitViewState,Ht as NsOverlaySplitViewState,In as PAGES_CHANGED,Dt as PAGE_CHANGED,le as PIXEL_SIZE_UNSET,qt as PREFERENCES_CLOSED,ai as ROW_ACTIVATED,ut as SHEET_CLOSE,dt as SHEET_CONTENT_BOTTOM_GAP,Jt as SHORTCUT_LABEL_CAP_TEXT_CLASS,Yt as SHORTCUT_LABEL_CLASS,Xt as SHORTCUT_LABEL_DIMMED_CLASS,Zt as SHORTCUT_LABEL_DISABLED_CLASS,Qt as SHORTCUT_LABEL_KEYCAP_CLASS,$t as SHORTCUT_LABEL_KEYS_CLASS,en as SHORTCUT_LABEL_SIDE_CLASS,tn as SHORTCUT_LABEL_SPACED_CLASS,me as SimpleAction,he as SimpleActionGroup,un as SpinState,Hn as ToggleGroupState,Un as WINDOW_BACKGROUND,ge as activateWidgetAction,e as addBreakpoints,Ne as adwaitaColorScheme,si as adwaitaNsAccentColor,ci as adwaitaNsAccentCss,li as applyAdwaitaNsAccent,de as applyConstructProps,_t as applyMarkerClasses,En as applyTabViewVisibility,fn as assertPopupMenuAssignable,pt as attachRowPressFeedback,nt as avatarInitials,ft as bottomSheetInsetPadding,mt as bottomSheetPanel,qn as boxChildTrack,Jn as boxSpacingChanges,Yn as boxTrackPlan,Zn as buttonSlotAfterWrite,Qn as buttonSlotDetaches,vt as carouselDotClasses,yt as carouselNotifyPayload,bt as carouselPositionAtOffset,xt as carouselScrollOffset,ui as clearAdwaitaNsAccent,Ge as compiledIconNames,Wn as configureSystemBars,St as createCarouselState,Dn as createTabViewState,Qr as dataGridCellClass,$r as dataGridItemSpec,ei as dataGridRowClass,ti as dataGridShapeKey,ni as dataGridTracksKey,ke as dialogPresentationMode,te as evaluateBreakpointCondition,He as extractIconPaths,Ue as extractPathData,pn as fillPopupMenu,_e as findActionGroup,Ae as findDialogHost,dr as gridChildAt,fr as gridGap,pr as gridSpacing,mr as gridTrackCounts,Ke as iconValueKind,Ct as indicatorMarkerClasses,ve as insertActionGroup,ue as isGtkIconSizeNick,qe as isIconAvailable,Pe as isThemeIconColor,pi as labelDisplayText,mi as labelMarkupIsUnparseable,pe as lengthValue,Xn as normalizeBoxSpacing,wt as normalizeCarouselPageWidth,yn as normalizePolicy,fe as nsAlignment,ne as observeViewSize,re as observeWindowSize,Fe as onAdwaitaColorSchemeChanged,mn as openPopupMenu,di as padForSystemInsets,fi as padSheetForSystemInsets,ie as parseBreakpointCondition,ri as parseDataGridWidth,bn as policyScrolls,hn as refuseMenuString,registerAdwaitaElements,Ye as renderSymbolicIcon,Je as resolveIconSource,jr as revealerChildVisibility,xn as scrollOrientationFor,br as selectionAfterModeChange,xr as selectionAfterTap,Sr as selectionMode,Ie as setAdwaitaColorScheme,nn as shortcutLabelDirection,rn as shortcutLabelPlatform,an as shortcutLabelRenderPlan,gn as showMenuPopup,Ut as splitViewColumns,je as surfaceSize,Gn as systemBarsConfig,On as tabBarVisibility,kn as tabCloseVisibilities,An as tabLabelText,jn as tabPageVisibilities,Mn as tabTooltipText,Nn as tabViewNotifyPayload,Le as themeIconColor,Re as toggleAdwaitaColorScheme,Ee as transitionNick,xe as withGtkWidgetLayout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{camelProperty as e,readGtkProperty as t,writeGtkProperty as n}from"./shadowed-properties.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{camelProperty as e,readGtkProperty as t,writeGtkProperty as n}from"./shadowed-properties.js";import{WIDGET_SIGNALS as r,watchMapping as i}from"./widget-mapping.js";import{withGtkWidgetLayout as a}from"./widget-layout.js";const o=new WeakMap;let s=1;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]}function withSignals(c){class WithSignals extends a(c){static emittedSignals=r;connect(e,t){let listener=e=>{let n=e.accumulator;if(n===void 0){t(this,e);return}n.stopped||n.collect(t(this,e))},n=s++,a=o.get(this);a===void 0&&(a=new Map,o.set(this,a));let c=r.includes(e)?i(this):void 0;return a.set(n,{eventName:e,listener,unwatch:c}),this.addEventListener(e,listener),n}disconnect(e){let t=o.get(this)?.get(e);if(t===void 0)throw TypeError(`${this.constructor.name} has no handler with id ${e}. connect() hands out each id once and disconnect() takes it once; a second disconnect, or an id another widget returned, is refused here rather than left as a silent no-op.`);this.removeEventListener(t.eventName,t.listener),t.unwatch?.(),o.get(this)?.delete(e)}emit(e,...t){this.notify({eventName:e,object:this,args:t})}get_property(n){return t(this,e(n))}set_property(t,r){n(this,e(t),r)}}return WithSignals}export{emittedSignalsOf,withSignals};
|
|
@@ -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{applyConstructProps as t}from"./construct-props.js";import{xmlBoolean as n}from"./xml-values.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(),t(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=n(e,this._needsAttention)}get useUnderline(){return this._useUnderline}set useUnderline(e){this._refuseAfterAdoption(`useUnderline`),this._useUnderline=n(e,this._useUnderline)}get visible(){return this._visible}set visible(e){this._visible=n(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";import{builderSlotsOf as e}from"./builder-slots.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.js";import{applyConstructProps as t}from"./construct-props.js";import{xmlBoolean as n,xmlNumber as r}from"./xml-values.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(),t(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=n(e,this._needsAttention)}get badgeNumber(){return this._badgeNumber}set badgeNumber(e){this._refuseAfterAdoption(`badgeNumber`),this._badgeNumber=r(e,this._badgeNumber)}get useUnderline(){return this._useUnderline}set useUnderline(e){this._refuseAfterAdoption(`useUnderline`),this._useUnderline=n(e,this._useUnderline)}get visible(){return this._visible}set visible(e){this._visible=n(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{
|
|
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{nsAlignment as i}from"./construct-props.js";import{lengthValue as a}from"./ns-length.js";import{xmlBoolean as o}from"./xml-values.js";import{insertActionGroup as s}from"./actions.js";import{focusView as c,isViewFocused as l}from"../window-source.js";import{applyNativeTooltip as u}from"./native-tooltip.js";import{isMapped as d}from"./widget-mapping.js";const f=`notify::hexpand`,p=`notify::vexpand`,m=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 h=[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 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;if(typeof e==`number`){let n=Object.keys(t).find(n=>t[n]===e);if(n!==void 0)return n}throw TypeError(`'${String(e)}' is not a Gtk.Align, so it cannot be '${n}'. The members are ${Object.keys(t).join(`, `)}; NativeScript's own alignment words go to ${n===`halign`?`horizontalAlignment`:`verticalAlignment`}.`)}function readAlign(e,t,n){for(let[n,r]of Object.entries(t))if(r===e)return n;return n!==null&&e===`left`?n?`end`:`start`:n!==null&&e===`right`?n?`start`:`end`:`fill`}function marginOf(e,t){let n=typeof e==`string`&&e.trim()!==``?Number(e):e;if(typeof n==`number`&&Number.isInteger(n)&&n>=0&&n<=m)return n;throw TypeError(`'${String(e)}' is not a margin: '${t}' takes an integer from 0 to ${m}.`)}function sizeRequestOf(e,t){let n=typeof e==`string`&&e.trim()!==``?Number(e):e;if(typeof n==`number`&&Number.isInteger(n)&&n>=-1&&n<=2147483647)return n;throw TypeError(`'${String(e)}' is not a size request: '${t}' takes an integer from -1 (unset) upward.`)}function readSizeRequest(e){let t=a(e);return t!==null&&t>0?Math.round(t):-1}const g=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap;function expandOf(e){let t=y.get(e);return t===void 0&&(t={h:!1,v:!1},y.set(e,t)),t}function withGtkWidgetLayout(t){class WithGtkWidgetLayout extends t{get halign(){let e=viewOf(this);return e===null?`fill`:readAlign(e.horizontalAlignment,n,e.style?.direction===`rtl`)}set halign(e){let t=laidOut(this,`halign`);t.horizontalAlignment=i(alignNick(e,`halign`),`horizontal`)}get valign(){let e=viewOf(this);return e===null?`fill`:readAlign(e.verticalAlignment,r,null)}set valign(e){let t=laidOut(this,`valign`);t.verticalAlignment=i(alignNick(e,`valign`),`vertical`)}get hexpand(){return y.get(this)?.h??!1}set hexpand(e){laidOut(this,`hexpand`);let t=expandOf(this),n=o(e,t.h);n!==t.h&&(t.h=n,this.notify({eventName:f,object:this}))}get vexpand(){return y.get(this)?.v??!1}set vexpand(e){laidOut(this,`vexpand`);let t=expandOf(this),n=o(e,t.v);n!==t.v&&(t.v=n,this.notify({eventName:p,object:this}))}get marginStart(){let e=viewOf(this);return e===null?0:a(e.style?.direction===`rtl`?e.marginRight:e.marginLeft)??0}set marginStart(e){let t=laidOut(this,`marginStart`),n=marginOf(e,`marginStart`);t.style?.direction===`rtl`?t.marginRight=n:t.marginLeft=n}get marginEnd(){let e=viewOf(this);return e===null?0:a(e.style?.direction===`rtl`?e.marginLeft:e.marginRight)??0}set marginEnd(e){let t=laidOut(this,`marginEnd`),n=marginOf(e,`marginEnd`);t.style?.direction===`rtl`?t.marginLeft=n:t.marginRight=n}get visible(){let e=viewOf(this);return e===null?!0:e.visibility===`visible`}set visible(e){let t=laidOut(this,`visible`);t.visibility=o(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=o(e,this.sensitive)}get name(){return g.get(this)??e(this)}set name(e){let t=laidOut(this,`name`),n=g.get(this),r=e??``;r===``?g.delete(this):g.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 d(this)}set_direction(e){if(!h.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)}insert_action_group(e,t){s(this,e,t)}get focusable(){return v.get(this)??!1}set focusable(e){let t=laidOut(this,`focusable`),n=o(e,v.get(this)??!1);v.set(this,n),t.nativeViewProtected?.setFocusable?.(n)}grab_focus(){let e=laidOut(this,`grab_focus`);return c(e),l(e)}get tooltipText(){return _.get(this)??``}set tooltipText(e){let t=laidOut(this,`tooltipText`),n=e??``;(t.accessibilityHint??``)===(_.get(this)??``)&&(t.accessibilityHint=n),_.set(this,n),u(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{f as NOTIFY_HEXPAND,p as NOTIFY_VEXPAND,withGtkWidgetLayout};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const e=new WeakMap,t=new Set;function isMapped(e){let t=e;if(t.isLoaded!==!0)return!1;for(let e=t;e;e=e.parent)if(e.visibility!==void 0&&e.visibility!==`visible`)return!1;return!0}function depthOf(e){let t=0;for(let n=e.parent;n;n=n.parent)t++;return t}function emitFor(e,t){t.mapped=!t.mapped,e.notify({eventName:t.mapped?`map`:`unmap`,object:e})}function recheckAll(){let n=[];for(let r of t){let i=r.deref();if(i===void 0){t.delete(r);continue}let a=e.get(i);isMapped(i)!==a.mapped&&n.push([i,a])}let deepestFirst=e=>e.map(e=>[e,depthOf(e[0])]).sort((e,t)=>t[1]-e[1]),r=deepestFirst(n.filter(([,e])=>e.mapped)),i=deepestFirst(n.filter(([,e])=>!e.mapped));for(let[[e,t]]of[...r,...i])emitFor(e,t)}function listenStyles(e,t){if(unlistenStyles(t),e.isLoaded===!0)for(let n=e;n;n=n.parent){let e=n.style;typeof e?.addEventListener==`function`&&(e.addEventListener(`visibilityChange`,recheckAll),t.styles.push(e))}}function unlistenStyles(e){for(let t of e.styles.splice(0))t.removeEventListener?.(`visibilityChange`,recheckAll)}function watchMapping(n){let r=n,i=e.get(r);if(i===void 0){let n={ref:new WeakRef(r),mapped:isMapped(r),listeners:0,styles:[],onLifecycle:()=>{listenStyles(r,n),isMapped(r)!==n.mapped&&emitFor(r,n)}};i=n,e.set(r,i),t.add(i.ref),r.addEventListener(`loaded`,i.onLifecycle),r.addEventListener(`unloaded`,i.onLifecycle),listenStyles(r,i)}i.listeners++;let a=!0;return()=>{if(!a)return;a=!1;let n=e.get(r);n===void 0||--n.listeners>0||(r.removeEventListener(`loaded`,n.onLifecycle),r.removeEventListener(`unloaded`,n.onLifecycle),unlistenStyles(n),t.delete(n.ref),e.delete(r))}}const n=[`map`,`unmap`];export{n as WIDGET_SIGNALS,isMapped,watchMapping};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdwAboutDialogDoorsNsTest: () => Promise<void>;
|
|
@@ -88,6 +88,10 @@ export interface BuildOptions {
|
|
|
88
88
|
* a plain accessor, so a setter declared `boolean` is handed `'true'`. Writing the authored
|
|
89
89
|
* boolean instead would drive the construct-props bag — a different door — and would leave
|
|
90
90
|
* the coercion `widgets/xml-values.ts` exists for untested on the trees the website ships.
|
|
91
|
+
* The exception is a property the APPLICATION declared: when a class `GObject.registerClass`
|
|
92
|
+
* registered declares a ParamSpec for it, nothing coerces behind the accessor, so the string is
|
|
93
|
+
* converted by the spec's type first, as `gtk_builder_value_from_string` does, and a value it
|
|
94
|
+
* cannot parse is refused (`param-values.ts`). Breakpoint setters take the same conversion.
|
|
91
95
|
*
|
|
92
96
|
* AN ATTRIBUTE THAT LANDS NOWHERE IS REFUSED HERE. `instance[name] = value` on a name
|
|
93
97
|
* nothing declares adds a dead own-property and returns, at exit 0 — this surface's own
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ParamSpec } from '@gjsify/adwaita-core';
|
|
2
|
+
/**
|
|
3
|
+
* The ParamSpec a class registered through the GObject subset declares for the camel-case
|
|
4
|
+
* property `prop` on `target`, nearest class first, or `undefined` when no registered class
|
|
5
|
+
* of its chain declares one — every widget of this port, which keeps the attribute door.
|
|
6
|
+
*/
|
|
7
|
+
export declare function registeredParamSpec(target: object, prop: string): ParamSpec | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* The authored text converted for `spec`, or `undefined` when GtkBuilder could not parse it
|
|
10
|
+
* (`GTK_BUILDER_ERROR_INVALID_VALUE`). A negative unsigned integer, which `g_ascii_strtoull`
|
|
11
|
+
* wraps around, is refused instead: a subset may refuse what GTK accepts, never invent a value.
|
|
12
|
+
*/
|
|
13
|
+
export declare function valueFromString(spec: ParamSpec, text: string): string | number | boolean | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* The value an authored property takes on `target`: converted by its registered ParamSpec when
|
|
16
|
+
* a class of the chain declares one, else `null` — the caller keeps its own door. `where` names
|
|
17
|
+
* the element and attribute for GtkBuilder's "Could not parse" refusal.
|
|
18
|
+
*/
|
|
19
|
+
export declare function authoredParamValue(target: object, prop: string, value: string | number | boolean, where: string): {
|
|
20
|
+
value: string | number | boolean;
|
|
21
|
+
} | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdwCarouselDoorsNsTest: () => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GioResourceNsTest: () => Promise<void>;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { assertNativeScript, isNativeScript, isAndroid, isIOS } from '@gjsify/native-platform';
|
|
2
|
-
export { NOTIFY_ACTIVE, NOTIFY_TEXT, ENTRY_ACTIVATE, NOTIFY_ENTRY_TEXT, ComboState, NOTIFY_SELECTED, NOTIFY_DROP_DOWN_SELECTED, SpinState, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, ExpanderState, NOTIFY_EXPANDED, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, MENU_ITEM_ACTIVATED, DEFAULT_GTK_IMAGE_SIZE, DEFAULT_BOX_SPACING, GTK_BUTTON_CLICKED, GTK_BUTTON_LABEL_CLASS, buttonSlotAfterWrite, buttonSlotDetaches, 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, CLICKED, MENU_TAPPED, ToggleGroupState, NOTIFY_TOGGLE_SELECTED, applyAdwaitaNsAccent, clearAdwaitaNsAccent, ADWAITA_NS_ACCENT_RULES, adwaitaNsAccentColor, adwaitaNsAccentCss, SHORTCUT_LABEL_CAP_TEXT_CLASS, SHORTCUT_LABEL_CLASS, SHORTCUT_LABEL_DIMMED_CLASS, SHORTCUT_LABEL_DISABLED_CLASS, SHORTCUT_LABEL_KEYCAP_CLASS, SHORTCUT_LABEL_KEYS_CLASS, SHORTCUT_LABEL_SIDE_CLASS, SHORTCUT_LABEL_SPACED_CLASS, shortcutLabelDirection, shortcutLabelPlatform, shortcutLabelRenderPlan, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, DEFAULT_CAROUSEL_PAGE_WIDTH, NOTIFY_POSITION, NOTIFY_VISIBLE_PAGE, AdwSplitViewBase, NOTIFY_SHOW_SIDEBAR, NsNavigationSplitViewState, NsOverlaySplitViewState, splitViewColumns, NOTIFY_SIDEBAR_SELECTED, NOTIFY_OPEN, AdwToast, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, 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,
|
|
2
|
+
export { NOTIFY_ACTIVE, NOTIFY_TEXT, ENTRY_ACTIVATE, NOTIFY_ENTRY_TEXT, ComboState, NOTIFY_SELECTED, NOTIFY_DROP_DOWN_SELECTED, SpinState, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, ExpanderState, NOTIFY_EXPANDED, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, MENU_ITEM_ACTIVATED, DEFAULT_GTK_IMAGE_SIZE, DEFAULT_BOX_SPACING, GTK_BUTTON_CLICKED, GTK_BUTTON_LABEL_CLASS, buttonSlotAfterWrite, buttonSlotDetaches, 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, CLICKED, MENU_TAPPED, ToggleGroupState, NOTIFY_TOGGLE_SELECTED, applyAdwaitaNsAccent, clearAdwaitaNsAccent, ADWAITA_NS_ACCENT_RULES, adwaitaNsAccentColor, adwaitaNsAccentCss, SHORTCUT_LABEL_CAP_TEXT_CLASS, SHORTCUT_LABEL_CLASS, SHORTCUT_LABEL_DIMMED_CLASS, SHORTCUT_LABEL_DISABLED_CLASS, SHORTCUT_LABEL_KEYCAP_CLASS, SHORTCUT_LABEL_KEYS_CLASS, SHORTCUT_LABEL_SIDE_CLASS, SHORTCUT_LABEL_SPACED_CLASS, shortcutLabelDirection, shortcutLabelPlatform, shortcutLabelRenderPlan, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, DEFAULT_CAROUSEL_PAGE_WIDTH, NOTIFY_POSITION, NOTIFY_VISIBLE_PAGE, AdwSplitViewBase, NOTIFY_SHOW_SIDEBAR, NsNavigationSplitViewState, NsOverlaySplitViewState, splitViewColumns, NOTIFY_SIDEBAR_SELECTED, NOTIFY_OPEN, AdwToast, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, 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
3
|
export type { BoxOrientation, ButtonSlot, ButtonSlotWrite, NotifyActiveEventData, NotifyTextEventData, NotifyEntryTextEventData, AdwComboOption, ComboStateChange, ComboStateListener, NotifySelectedEventData, NotifyDropDownSelectedEventData, NotifyValueEventData, SpinStateChange, SpinStateListener, NotifySliderValueEventData, NotifyExpandedEventData, ExpanderStateListener, 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';
|
|
@@ -5,5 +5,6 @@ export declare const Display: {
|
|
|
5
5
|
export declare const Clipboard: typeof import("@gjsify/adwaita-core").Clipboard;
|
|
6
6
|
export declare const ContentProvider: Pick<typeof import("@gjsify/adwaita-core").ContentProvider, "new_for_value">;
|
|
7
7
|
export declare const ContentFormats: typeof import("@gjsify/adwaita-core").ContentFormats;
|
|
8
|
+
export declare const AppLaunchContext: typeof import("@gjsify/adwaita-core").GdkAppLaunchContext;
|
|
8
9
|
export declare const CURRENT_TIME = 0;
|
|
9
10
|
export declare const KEY_space: 32, KEY_a: 97, KEY_d: 100, KEY_e: 101, KEY_q: 113, KEY_s: 115, KEY_w: 119, KEY_Return: 65293, KEY_Escape: 65307, KEY_Left: 65361, KEY_Up: 65362, KEY_Right: 65363, KEY_Down: 65364;
|
|
@@ -3,5 +3,7 @@ export { GioMenu as Menu, GioMenuItem as MenuItem } from '@gjsify/adwaita-core';
|
|
|
3
3
|
export { GioFile as File, GioListStore as ListStore, GioOutputStream as OutputStream, GioFileOutputStream as FileOutputStream, FileCreateFlags, IOErrorEnum, promisify as _promisify, } from '@gjsify/adwaita-core';
|
|
4
4
|
export { SimpleAction, SimpleActionGroup } from '../widgets/actions.js';
|
|
5
5
|
export { ApplicationFlags } from '@gjsify/adwaita-core';
|
|
6
|
+
export { GioResource as Resource, ResourceError, ResourceLookupFlags, resources_enumerate_children, resources_get_info, resources_lookup_data, resources_register, resources_unregister, } from '@gjsify/adwaita-core';
|
|
6
7
|
export { GioApplication as Application } from '../widgets/application.js';
|
|
7
8
|
export { Settings } from '@gjsify/app-settings/nativescript';
|
|
9
|
+
export declare const AppInfo: import("@gjsify/adwaita-core").GioAppInfo;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { GLibBytes as Bytes, GLibError as Error } from '@gjsify/adwaita-core';
|
|
2
|
-
import { buildFilenamev, getCurrentDir, getSystemDataDirs } from '@gjsify/adwaita-core';
|
|
2
|
+
import { buildFilenamev, getCurrentDir, getSystemDataDirs, uriEscapeString } from '@gjsify/adwaita-core';
|
|
3
3
|
export declare const PRIORITY_HIGH: number;
|
|
4
4
|
export declare const PRIORITY_DEFAULT: number;
|
|
5
5
|
export declare const PRIORITY_HIGH_IDLE: number;
|
|
@@ -14,3 +14,4 @@ export declare const MAXUINT32 = 4294967295;
|
|
|
14
14
|
export declare const build_filenamev: typeof buildFilenamev;
|
|
15
15
|
export declare const get_current_dir: typeof getCurrentDir;
|
|
16
16
|
export declare const get_system_data_dirs: typeof getSystemDataDirs;
|
|
17
|
+
export declare const uri_escape_string: typeof uriEscapeString;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdwParamValuesNsTest: () => Promise<void>;
|
|
@@ -46,20 +46,26 @@ export interface TouchGestureEventData extends EventData {
|
|
|
46
46
|
getX(): number;
|
|
47
47
|
getY(): number;
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* `ui/styling/style/index.ts`'s `Style` is an `Observable`, and a CSS property's setter notifies
|
|
51
|
+
* `<name>Change` on it (`CssProperty`, `ui/core/properties/index.ts`) — never on the view.
|
|
52
|
+
*/
|
|
53
|
+
export declare class Style extends Observable {
|
|
54
|
+
#private;
|
|
55
|
+
direction?: 'ltr' | 'rtl' | null;
|
|
56
|
+
readonly viewRef: WeakRef<View>;
|
|
57
|
+
constructor(view: View);
|
|
58
|
+
get visibility(): string;
|
|
59
|
+
set visibility(value: string);
|
|
60
|
+
}
|
|
49
61
|
export declare class View extends Observable {
|
|
50
62
|
/**
|
|
51
63
|
* `View` keeps its `Style` in `_style` and answers it from `style`: a subclass field of that
|
|
52
64
|
* name replaces it, and every inherited-CSS pass then reads `viewRef` off the wrong object
|
|
53
65
|
* (`Cannot read properties of undefined (reading 'get')`, measured on a device).
|
|
54
66
|
*/
|
|
55
|
-
_style:
|
|
56
|
-
|
|
57
|
-
viewRef: WeakRef<View>;
|
|
58
|
-
};
|
|
59
|
-
get style(): {
|
|
60
|
-
direction?: 'ltr' | 'rtl' | null;
|
|
61
|
-
viewRef: WeakRef<View>;
|
|
62
|
-
};
|
|
67
|
+
_style: Style;
|
|
68
|
+
get style(): Style;
|
|
63
69
|
/**
|
|
64
70
|
* UNSET, NOT EMPTY — a view nobody has written a class onto reads `undefined`.
|
|
65
71
|
*
|
|
@@ -111,8 +117,12 @@ export declare class View extends Observable {
|
|
|
111
117
|
marginBottom: number;
|
|
112
118
|
marginLeft: number;
|
|
113
119
|
marginRight: number;
|
|
114
|
-
/**
|
|
115
|
-
|
|
120
|
+
/**
|
|
121
|
+
* `'visible' | 'hidden' | 'collapse'` — NativeScript's own default is `'visible'`. A CSS
|
|
122
|
+
* property, so `View` reads and writes it on its {@link Style}, which notifies the change.
|
|
123
|
+
*/
|
|
124
|
+
get visibility(): string;
|
|
125
|
+
set visibility(value: string);
|
|
116
126
|
/** `isEnabledProperty` registers `defaultValue: true`. */
|
|
117
127
|
isEnabled: boolean;
|
|
118
128
|
/**
|
|
@@ -148,11 +158,22 @@ export declare class View extends Observable {
|
|
|
148
158
|
isUserInteractionEnabled: boolean;
|
|
149
159
|
translateX: number;
|
|
150
160
|
translateY: number;
|
|
151
|
-
/**
|
|
152
|
-
|
|
153
|
-
|
|
161
|
+
/**
|
|
162
|
+
* Loaded once something calls {@link onLoaded}: nothing mounts a view into a page without a
|
|
163
|
+
* platform, so a spec calls it to stand in for the platform's. Read from {@link LOADED} and
|
|
164
|
+
* not from this getter by the lifecycle, as upstream reads `_isLoaded`: a spec may pin the
|
|
165
|
+
* getter with `Object.defineProperty`.
|
|
166
|
+
*/
|
|
167
|
+
get isLoaded(): boolean;
|
|
168
|
+
/**
|
|
169
|
+
* `ViewBase.onLoaded` (`ui/core/view-base/index.ts`): loads the children BEFORE it emits
|
|
170
|
+
* `loaded` on itself, and a second call does nothing.
|
|
171
|
+
*/
|
|
154
172
|
onLoaded(): void;
|
|
173
|
+
/** `ViewBase.onUnloaded`: unloads the children before it emits `unloaded` on itself. */
|
|
155
174
|
onUnloaded(): void;
|
|
175
|
+
callLoaded(): void;
|
|
176
|
+
callUnloaded(): void;
|
|
156
177
|
androidOverflowEdge: string;
|
|
157
178
|
accessibilityRole: string | undefined;
|
|
158
179
|
accessibilityState: string | undefined;
|
|
@@ -196,6 +217,7 @@ export declare class Page extends View {
|
|
|
196
217
|
}
|
|
197
218
|
export declare class LayoutBase extends View {
|
|
198
219
|
#private;
|
|
220
|
+
/** `_addViewCore` loads a child added to a loaded parent; `_removeView` unloads it first. */
|
|
199
221
|
addChild(view: View): void;
|
|
200
222
|
insertChild(view: View, atIndex: number): void;
|
|
201
223
|
/** `_removeView` refuses a view that is not this parent's; a silent no-op would hide it. */
|
|
@@ -313,8 +335,16 @@ export declare class ScrollView extends View {
|
|
|
313
335
|
scrollToVerticalOffset(_value: number, _animated: boolean): void;
|
|
314
336
|
eachChildView(callback: (child: View) => boolean): void;
|
|
315
337
|
}
|
|
338
|
+
/**
|
|
339
|
+
* Upstream's `content` setter (`ui/content-view/index.ts`) `_removeView`s the old view and
|
|
340
|
+
* `_addView`s the new one, and `eachChildView` answers that one view — so the tree members see
|
|
341
|
+
* through it and a view already parented elsewhere is refused, as on a device.
|
|
342
|
+
*/
|
|
316
343
|
export declare class ContentView extends LayoutBase {
|
|
317
|
-
|
|
344
|
+
#private;
|
|
345
|
+
get content(): View | null;
|
|
346
|
+
set content(value: View | null);
|
|
347
|
+
eachChildView(callback: (child: View) => boolean): void;
|
|
318
348
|
}
|
|
319
349
|
export declare class WrapLayout extends LayoutBase {
|
|
320
350
|
orientation: 'horizontal' | 'vertical';
|
|
@@ -353,12 +383,23 @@ export declare class ImageSource {
|
|
|
353
383
|
readonly height: number;
|
|
354
384
|
readonly nativeSource?: unknown;
|
|
355
385
|
constructor(nativeSource?: unknown);
|
|
386
|
+
/** Decodes nothing: the source keeps the base64 it was given, for a spec to read back. */
|
|
387
|
+
static fromBase64Sync(source: string): ImageSource;
|
|
356
388
|
}
|
|
357
389
|
export declare class Image extends View {
|
|
358
390
|
src: string | ImageSource | undefined;
|
|
359
391
|
imageSource: ImageSource | undefined;
|
|
360
392
|
stretch: string;
|
|
393
|
+
tintColor: string | undefined;
|
|
361
394
|
}
|
|
395
|
+
/** One screen at scale 1, the density the port's own sizes are written in. */
|
|
396
|
+
export declare const Screen: {
|
|
397
|
+
mainScreen: {
|
|
398
|
+
scale: number;
|
|
399
|
+
widthDIPs: number;
|
|
400
|
+
heightDIPs: number;
|
|
401
|
+
};
|
|
402
|
+
};
|
|
362
403
|
export declare class SegmentedBarItem extends Observable {
|
|
363
404
|
title: string;
|
|
364
405
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdwWidgetMapNsTest: () => Promise<void>;
|
|
@@ -3,7 +3,7 @@ import { type ConstructProps } from './construct-props.js';
|
|
|
3
3
|
import type { View } from '@nativescript/core';
|
|
4
4
|
/** Event name emitted when the dialog is closed. */
|
|
5
5
|
export declare const CLOSED = "closed";
|
|
6
|
-
declare const AdwAboutDialog_base: (abstract new (...args: any[]) => {
|
|
6
|
+
declare const AdwAboutDialog_base: ((abstract new (...args: any[]) => {
|
|
7
7
|
connect(eventName: string, callback: (self: /*elided*/ any, data: EventData) => unknown): number;
|
|
8
8
|
disconnect(handlerId: number): void;
|
|
9
9
|
emit(eventName: string, ...args: unknown[]): void;
|
|
@@ -29,12 +29,17 @@ declare const AdwAboutDialog_base: (abstract new (...args: any[]) => {
|
|
|
29
29
|
set name(value: string | null);
|
|
30
30
|
get tooltipText(): string;
|
|
31
31
|
set tooltipText(value: string);
|
|
32
|
+
get tooltip_text(): string;
|
|
33
|
+
set tooltip_text(value: string);
|
|
32
34
|
get widthRequest(): number;
|
|
33
35
|
set widthRequest(value: number | string);
|
|
34
36
|
get heightRequest(): number;
|
|
35
37
|
set heightRequest(value: number | string);
|
|
36
38
|
get_visible(): boolean;
|
|
37
39
|
set_visible(visible: boolean): void;
|
|
40
|
+
get_mapped(): boolean;
|
|
41
|
+
get_tooltip_text(): string;
|
|
42
|
+
set_tooltip_text(text: string): void;
|
|
38
43
|
set_direction(direction: number): void;
|
|
39
44
|
get_direction(): number;
|
|
40
45
|
get_first_child(): object | null;
|
|
@@ -53,6 +58,8 @@ declare const AdwAboutDialog_base: (abstract new (...args: any[]) => {
|
|
|
53
58
|
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
54
59
|
set(name: string, value: unknown): void;
|
|
55
60
|
get(name: string): unknown;
|
|
61
|
+
}) & {
|
|
62
|
+
readonly emittedSignals: readonly string[];
|
|
56
63
|
}) & typeof GridLayout;
|
|
57
64
|
export declare class AdwAboutDialog extends AdwAboutDialog_base {
|
|
58
65
|
static readonly GTypeName: string;
|
|
@@ -64,6 +71,9 @@ export declare class AdwAboutDialog extends AdwAboutDialog_base {
|
|
|
64
71
|
protected readonly _commentsLabel: Label;
|
|
65
72
|
protected readonly _websiteLabel: Label;
|
|
66
73
|
protected readonly _copyrightLabel: Label;
|
|
74
|
+
protected readonly _releaseNotesLabel: Label;
|
|
75
|
+
protected readonly _linksLabel: Label;
|
|
76
|
+
protected readonly _debugInfoLabel: Label;
|
|
67
77
|
private _applicationName;
|
|
68
78
|
private _applicationIcon;
|
|
69
79
|
private _developerName;
|
|
@@ -71,6 +81,12 @@ export declare class AdwAboutDialog extends AdwAboutDialog_base {
|
|
|
71
81
|
private _comments;
|
|
72
82
|
private _website;
|
|
73
83
|
private _copyright;
|
|
84
|
+
private _releaseNotes;
|
|
85
|
+
private _releaseNotesVersion;
|
|
86
|
+
private _debugInfo;
|
|
87
|
+
private _links;
|
|
88
|
+
/** The What's New buffer; `version` alone never rebuilds it. */
|
|
89
|
+
private _releaseNotesSegments;
|
|
74
90
|
/** The window `present (parent)` mounted this in, so closing can take it back out. */
|
|
75
91
|
private _host;
|
|
76
92
|
constructor(props?: ConstructProps<AdwAboutDialog>);
|
|
@@ -96,8 +112,22 @@ export declare class AdwAboutDialog extends AdwAboutDialog_base {
|
|
|
96
112
|
/** The copyright line. */
|
|
97
113
|
get copyright(): string;
|
|
98
114
|
set copyright(value: string);
|
|
115
|
+
/** AppStream release-notes markup, shown as the What's New text. */
|
|
116
|
+
get releaseNotes(): string;
|
|
117
|
+
set releaseNotes(value: string);
|
|
118
|
+
/** The version the release-notes heading names, else `version`. */
|
|
119
|
+
get releaseNotesVersion(): string;
|
|
120
|
+
set releaseNotesVersion(value: string);
|
|
121
|
+
/** Debugging information, shown verbatim. */
|
|
122
|
+
get debugInfo(): string;
|
|
123
|
+
set debugInfo(value: string);
|
|
124
|
+
/** `adw_about_dialog_add_link`: an extra link; `_` marks a mnemonic. */
|
|
125
|
+
add_link(title: string, url: string): void;
|
|
126
|
+
/** `adw_about_dialog_new_from_appdata`, refused by name. */
|
|
127
|
+
static new_from_appdata(_resourcePath: string, _releaseNotesVersion?: string | null): never;
|
|
128
|
+
private _updateReleaseNotes;
|
|
99
129
|
/**
|
|
100
|
-
* Push the
|
|
130
|
+
* Push the ten strings onto their labels, and COLLAPSE the ones with nothing
|
|
101
131
|
* to say.
|
|
102
132
|
*
|
|
103
133
|
* Every label used to be unconditionally visible, so an about dialog without a
|