@gjsify/adwaita-nativescript 0.64.12-next.279 → 0.64.12-next.281
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 -1
- package/lib/esm/gobject-siblings.d.blp.js +0 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/namespace/adw.js +1 -1
- package/lib/esm/namespace/gdk.js +1 -1
- package/lib/esm/namespace/gio.js +1 -1
- package/lib/esm/namespace/graphene.js +1 -0
- package/lib/esm/namespace/gtk.js +1 -1
- package/lib/esm/widgets/adw-alert-dialog.js +1 -1
- package/lib/esm/widgets/adw-button-content.js +1 -1
- package/lib/esm/widgets/adw-button-row.js +1 -1
- package/lib/esm/widgets/adw-combo-row.js +1 -1
- package/lib/esm/widgets/adw-expander-row.js +1 -1
- package/lib/esm/widgets/adw-overlay-split-view.js +1 -1
- package/lib/esm/widgets/adw-split-button.js +1 -1
- package/lib/esm/widgets/adw-view-stack.js +1 -1
- package/lib/esm/widgets/gtk-application-window.js +1 -0
- package/lib/esm/widgets/gtk-button.js +1 -1
- package/lib/esm/widgets/gtk-check-button.js +1 -1
- package/lib/esm/widgets/gtk-drop-down.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-scrolled-window.js +1 -1
- package/lib/esm/widgets/gtk-stack.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/index.js +1 -1
- package/lib/esm/widgets/signals.js +1 -1
- package/lib/esm/widgets/split-button.js +1 -1
- package/lib/esm/widgets/style-manager-host.js +1 -1
- package/lib/esm/widgets/style-manager.js +1 -1
- package/lib/esm/widgets/system-accent.js +1 -0
- package/lib/esm/widgets/widget-layout.js +1 -1
- package/lib/types/builder/index.d.ts +5 -2
- package/lib/types/button-content-properties.spec.d.ts +1 -0
- package/lib/types/expander-row-properties.spec.d.ts +2 -0
- package/lib/types/gtk-button-clicked.spec.d.ts +1 -0
- package/lib/types/index.d.ts +3 -2
- package/lib/types/namespace/adw.d.ts +1 -1
- package/lib/types/namespace/gdk.d.ts +1 -0
- package/lib/types/namespace/gio.d.ts +1 -0
- package/lib/types/namespace/graphene.d.ts +1 -0
- package/lib/types/namespace/gtk.d.ts +2 -1
- package/lib/types/split-button-properties.spec.d.ts +1 -0
- package/lib/types/system-accent.spec.d.ts +2 -0
- package/lib/types/testing/ns-core.d.mts +9 -9
- package/lib/types/widgets/adw-about-dialog.d.ts +3 -0
- package/lib/types/widgets/adw-action-row.d.ts +3 -0
- package/lib/types/widgets/adw-alert-dialog.d.ts +3 -0
- package/lib/types/widgets/adw-application-window.d.ts +7 -0
- package/lib/types/widgets/adw-avatar.d.ts +3 -0
- package/lib/types/widgets/adw-banner.d.ts +3 -0
- package/lib/types/widgets/adw-bottom-sheet.d.ts +3 -0
- package/lib/types/widgets/adw-button-content.d.ts +24 -13
- package/lib/types/widgets/adw-carousel.d.ts +3 -0
- package/lib/types/widgets/adw-clamp.d.ts +3 -0
- package/lib/types/widgets/adw-combo-row.d.ts +1 -1
- package/lib/types/widgets/adw-data-grid.d.ts +3 -0
- package/lib/types/widgets/adw-expander-row.d.ts +93 -16
- package/lib/types/widgets/adw-header-bar.d.ts +3 -0
- package/lib/types/widgets/adw-image-button.d.ts +3 -0
- package/lib/types/widgets/adw-navigation-page.d.ts +3 -0
- package/lib/types/widgets/adw-navigation-view.d.ts +3 -0
- package/lib/types/widgets/adw-overlay-split-view.d.ts +5 -0
- package/lib/types/widgets/adw-preferences-group.d.ts +3 -0
- package/lib/types/widgets/adw-preferences-page.d.ts +3 -0
- package/lib/types/widgets/adw-shortcut-label.d.ts +3 -0
- package/lib/types/widgets/adw-sidebar.d.ts +3 -0
- package/lib/types/widgets/adw-slider-row.d.ts +3 -0
- package/lib/types/widgets/adw-spinner.d.ts +3 -0
- package/lib/types/widgets/adw-split-button.d.ts +31 -29
- package/lib/types/widgets/adw-status-page.d.ts +3 -0
- package/lib/types/widgets/adw-tab-view.d.ts +3 -0
- package/lib/types/widgets/adw-toast-overlay.d.ts +3 -0
- package/lib/types/widgets/adw-toggle-group.d.ts +3 -0
- package/lib/types/widgets/adw-toggle.d.ts +3 -0
- package/lib/types/widgets/adw-toolbar-view.d.ts +3 -0
- package/lib/types/widgets/adw-view-stack.d.ts +13 -0
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +3 -0
- package/lib/types/widgets/adw-window-title.d.ts +3 -0
- package/lib/types/widgets/adw-wrap-box.d.ts +3 -0
- package/lib/types/widgets/carousel-indicator-base.d.ts +3 -0
- package/lib/types/widgets/gtk-action-bar.d.ts +3 -0
- package/lib/types/widgets/gtk-application-window.d.ts +13 -0
- package/lib/types/widgets/gtk-button.d.ts +3 -2
- package/lib/types/widgets/gtk-drop-down.d.ts +4 -1
- package/lib/types/widgets/gtk-entry.d.ts +3 -0
- package/lib/types/widgets/gtk-image.d.ts +3 -0
- package/lib/types/widgets/gtk-label.d.ts +3 -0
- package/lib/types/widgets/gtk-menu-button.d.ts +5 -0
- package/lib/types/widgets/gtk-popover-menu.d.ts +3 -0
- package/lib/types/widgets/gtk-scrolled-window.d.ts +11 -1
- package/lib/types/widgets/gtk-stack.d.ts +11 -0
- package/lib/types/widgets/gtk-text-view.d.ts +3 -0
- package/lib/types/widgets/gtk-window.d.ts +10 -2
- package/lib/types/widgets/index.d.ts +4 -4
- package/lib/types/widgets/signals.d.ts +9 -1
- package/lib/types/widgets/split-button.d.ts +1 -10
- package/lib/types/widgets/split-view-base.d.ts +3 -0
- package/lib/types/widgets/stack-page.d.ts +3 -0
- package/lib/types/widgets/style-manager.d.ts +7 -2
- package/lib/types/widgets/styled-layout-base.d.ts +3 -0
- package/lib/types/widgets/system-accent.d.ts +22 -0
- package/lib/types/widgets/view-stack-page.d.ts +3 -0
- package/lib/types/widgets/view-switcher-base.d.ts +3 -0
- package/lib/types/widgets/widget-layout.d.ts +7 -1
- package/package.json +13 -13
- package/src/testing/ns-core.mts +21 -15
- package/src/theme/adwaita.css +25 -4
package/lib/esm/builder/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{capabilities as e}from"../capabilities.js";import{observeWindowSize as t}from"../widgets/breakpoint.js";import{gtypeNameOf as n,gtypeNameOfInstance as r}from"../widgets/gtype-name.js";import{declaredBuilderReferences as i,declaredBuilderSlots as a}from"../widgets/builder-slots.js";import{gtkPropertyRefusal as o,hasGtkProperty as s,readGtkProperty as c,writeGtkProperty as l}from"../widgets/shadowed-properties.js";import{emittedSignalsOf as u}from"../widgets/signals.js";import{authoredParamValue as d}from"./param-values.js";import{registerTemplateClass as f,templateClassFor as p}from"./template-classes.js";import{adw_exports as m}from"../namespace/adw.js";import{gtk_exports as h}from"../namespace/gtk.js";import{createBreakpointDriver as g,menuAssignments as _,parseBreakpointCondition as v}from"@gjsify/adwaita-core";import{assertTreeConstructs as y}from"@gjsify/adwaita-core/conformance";import{propertyOf as b}from"@gjsify/adwaita-core/tags";import{View as x}from"@nativescript/core";const S=[{prefix:`adw`,library:`Adw`,namespace:m},{prefix:`gtk`,library:`Gtk`,namespace:h}];function registerBarrel(e,t,n){let r=S.find(t=>t.prefix===e);if(r!==void 0&&r.library!==t)throw Error(`The prefix '${e}' already names \`${r.library}\`; it cannot also name \`${t}\`.`);r===void 0?S.push({prefix:e,library:t,namespace:n}):r.namespace=n}const C={GtkPopoverMenuBar:`Android has no menu-bar surface, and a row of PopupMenus would be a design choice, not GTK's widget (ADR 0097 § 2). Use a GtkMenuButton or a GtkPopoverMenu.`};function elementFor(e){let t=C[e];if(t!==void 0)throw Error(`\`${e}\` is refused on this port: ${t}`);let r=[...S].sort((e,t)=>t.library.length-e.library.length);for(let{prefix:t,library:i,namespace:a}of r){if(!e.startsWith(i))continue;let r=e.slice(i.length),o=a[r];if(typeof o!=`function`)throw Error(`Module '~/${t}' has no member for element '${t}:${r}' — the name \`${e}\` is authored in the shared corpus and this dialect cannot spell it. Give the widget a namespace member (ADR 0034 clause 2), or ledger the block as divergent.`);if(n(o)!==e)throw Error(`'${t}:${r}' resolves to class \`${n(o)}\`, not \`${e}\`. The corpus is authored in GIR class names and ADR 0034 clause 1 says a widget carries that name, so a barrel member bound to another class would build the wrong widget at exit 0.`);return{xmlName:`${t}:${r}`,ctor:o}}throw Error(`\`${e}\` starts with no library this dialect has a barrel for (${S.map(e=>e.prefix).join(`, `)}).`)}function elementOf(e){return e.extern===!0?{xmlName:`app:${e.tag}`,ctor:p(e.tag)}:elementFor(e.tag)}function translated(e,t,n){return n===void 0||e===void 0||typeof t!=`string`?t:e(t,n.context)}function build(e,t={}){refuseSiblings(e,`build`);let n=buildTree(e,t).root;if(!(n instanceof x))throw Error(`\`${e.tag}\` is not a widget, so a tree cannot root at it: there is nothing to show.`);return n}function buildDialog(e,t={}){refuseSiblings(e,`buildDialog`);let n=buildTree(e,t).root;if(n instanceof x||typeof n.present!=`function`)throw Error(`\`${e.tag}\` is not a dialog: it has no \`present()\`, so use \`build\` for it.`);return n}function buildWithSiblings(e,t={}){let n=buildTree(e,t,!0);if(!(n.root instanceof x))throw Error(`\`${e.tag}\` is not a widget, so a tree cannot root at it: there is nothing to show.`);return{root:n.root,siblings:n.siblings,objects:n.objects}}function buildInto(e,t,n={}){refuseSiblings(t,`buildInto`);let r=elementOf(t);if(!(e instanceof r.ctor))throw Error(`\`buildInto\` was handed a ${e.constructor.name}, and the tree's root is \`${t.tag}\`: a template builds into an instance of the class it extends (<${r.xmlName}>).`);return buildTree(t,n,!1,e).objects}function refuseSiblings(e,t){if((e.siblings?.length??0)!==0)throw Error(`\`${e.tag}\` carries ${e.siblings.length} sibling object(s), and \`${t}\` returns one object so they would be built and lost. Use \`buildWithSiblings\`, which hands them back by id.`)}function buildTree(n,r,i=!1,a){y(`adwaita-nativescript`,e,n,Object.keys(T));let o={ids:new Map,pending:[],binds:[],breakpointHosts:[],observeSize:r.observeSize??t,menus:n.menus,scope:r.scope,template:r.template,translate:r.translate,values:i?new Map:void 0},s=buildNode(n,o,a),c=new Map;for(let e of n.siblings??[]){if(e.id===void 0)throw Error(`the sibling \`${e.tag}\` has no id, so nothing could ever ask for it: give it one in the .blp.`);c.set(e.id,buildNode(e,o))}for(let{view:e,element:t,prop:n,id:r}of o.pending){let i=o.ids.get(r);if(i===void 0)throw Error(`<${t.xmlName} ${n}="${r}"> names no object: nothing in this tree has the id '${r}', so \`${n}\` would be handed the string instead of the widget it refers to.`);l(e,n,i)}for(let e of o.binds)bindProperty(e,o);for(let e of o.breakpointHosts)bindBreakpoints(e,o);return{root:s,siblings:c,objects:new Map([...o.ids,...o.values??[]])}}function bindProperty(e,t){let{target:n,element:r,property:i,source:a,sourceProperty:d,flags:f}=e,p=`<${r.xmlName}> \`${i}: bind ${a}.${d}\``,m=t.template,h=a===`template`&&m!==void 0?m.instance:t.ids.get(a);if(h===void 0)throw Error(`${p} names no object: nothing in this tree has the id '${a}'.`);if(f.length>0&&m===void 0)throw Error(`${p} carries ${f.join(`, `)}: adwaita-nativescript binds the plain form only until each flag is verified against GObject.`);let g=b(d),_=b(i),v=u(h.constructor),y=`notify::${d}`;if(!s(h,g)||!v.includes(y))throw Error(`${p}: ${h.constructor.name} does not emit '${y}', so the target would follow the source once and never again. It emits: ${v.join(`, `)||`none`}.`);if(!s(n,_)){let e=o(n,_);throw Error(`${p}: the target has no property '${_}'.${e===null?``:` ${e}`}`)}if(m!==void 0){bindThroughEngine(m,{...e,from:h,where:p,notification:y});return}let follow=()=>l(n,_,c(h,g));follow(),h.connect(y,follow)}function engineFlags(e,t){for(let n of e)if(n!==`bidirectional`&&n!==`inverted`&&n!==`no-sync-create`)throw Error(`${t} carries the unknown flag '${n}'.`);let n=e.includes(`no-sync-create`)?[]:[`sync-create`];return e.includes(`bidirectional`)&&n.push(`bidirectional`),e.includes(`inverted`)&&n.push(`invert-boolean`),n}function viaProperties(e){let key=e=>typeof e==`string`?b(e):e;return new Proxy(e,{get(e,t){let n=typeof t==`string`&&s(e,key(t))?c(e,key(t)):Reflect.get(e,key(t));return typeof n==`function`?n.bind(e):n},set(e,t,n){return typeof t==`string`?(l(e,b(t),n),!0):Reflect.set(e,t,n)}})}function bindThroughEngine(e,t){let{target:n,from:r,property:i,sourceProperty:a,flags:o,where:s}=t,c=engineFlags(o,s),l=u(n.constructor);if(c.includes(`bidirectional`)&&!l.includes(`notify::${i}`))throw Error(`${s}: bidirectional, but ${n.constructor.name} does not emit 'notify::${i}', so the source would never follow the target back. It emits: ${l.join(`, `)||`none`}.`);e.bind(viaProperties(r),a,viaProperties(n),i,c)}function bindBreakpoints({view:e,element:t,node:n},r){if(!(e instanceof x))throw Error(`<${t.xmlName}> is not a view, so it has no size for a breakpoint to read.`);wireBreakpoints(t.xmlName,e,n.breakpoints??[],r.ids,r.observeSize,r.translate)}function applyBreakpoints(e,n,i,a={}){wireBreakpoints(r(e),e,n,new Map(Object.entries(i)),a.observeSize??t,a.translate)}function wireBreakpoints(e,t,n,r,i,a){let u=g(n.map(t=>{if(v(t.condition)===null)throw Error(`<${e}> \`condition ("${t.condition}")\` is not an Adwaita breakpoint condition.`);return{condition:t.condition,setters:t.setters.map(t=>{let n=r.get(t.object),i=`<${e}> breakpoint setter \`${t.object}.${t.property}\``;if(n===void 0)throw Error(`${i} names no object: nothing in this tree has the id '${t.object}'.`);if(!s(n,b(t.property))){let e=o(n,b(t.property));throw Error(`${i}: the target declares no '${b(t.property)}'.`+(e===null?``:` ${e}`))}let c=translated(a,t.value,t.translatable),l=d(n,b(t.property),c,i);return{object:n,property:t.property,value:{authored:l===null?String(c):l.value}}})}}),{read:(e,t)=>({original:c(e,b(t))}),write(e,t,n){let r=n;l(e,b(t),`authored`in r?r.authored:r.original)}});i(t,e=>u.evaluate(e))}function buildNode(e,t,n){let r=elementOf(e),i=n??new r.ctor,a=i instanceof x?buildView(e,r,i,t):buildValue(e,r,i,t);bindSignals(a,r,e,t);for(let[n,i]of Object.entries(e.bindings??{}))t.binds.push({target:a,element:r,property:n,source:i.source,sourceProperty:i.property,flags:i.flags??[]});e.breakpoints!==void 0&&t.breakpointHosts.push({view:a,element:r,node:e});for(let n of e.children??[]){let i=a;if(typeof i._addChildFromBuilder!=`function`)throw Error(`<${r.xmlName}> takes no XML child: \`${e.tag}\` has no \`_addChildFromBuilder\`, so the corpus nests a node this element cannot hold.`);let o=buildNode(n,t);applyLayout(n,o,r,e.tag),i._addChildFromBuilder(builderNameFor(r,e.tag,n),o)}return a}function bindSignals(e,t,n,r){if(n.signals===void 0)return;let i=u(t.ctor),a=e;for(let e of n.signals){let n=e.detail===void 0?e.name:`${e.name}::${e.detail}`;if(typeof a.connect!=`function`||!i.includes(n))throw Error(`<${t.xmlName}> declares no signal '${n}', so the handler '${e.handler}' would never run. It emits: ${i.join(`, `)||`none`}.`);let o=(e.flags??[]).filter(e=>r.template===void 0||e!==`swapped`);if(e.object!==void 0||o.length>0)throw Error(`the handler '${e.handler}' for '${n}' uses ${e.object===void 0?``:`an object `}${(e.flags??[]).join(`, `)}: adwaita-nativescript binds plain handlers only until each of those is verified against GTK.`);if(r.template!==void 0){a.connect(n,r.template.handler(e.handler,{flags:e.flags}));continue}let s=r.scope?.[e.handler];if(typeof s!=`function`)throw Error(`the tree binds the handler '${e.handler}' for '${n}', and the scope ${r.scope===void 0?"was not given (pass `scope`)":`has no such function`}.`);a.connect(n,(...e)=>s.apply(r.scope,e))}}const w={row:`row`,column:`column`,"row-span":`rowSpan`,"column-span":`columnSpan`};function applyLayout(e,t,n,r){if(e.layout!==void 0){if(typeof n.ctor.prototype.attach!=`function`)throw Error(`<${elementOf(e).xmlName}> authored layout (${Object.keys(e.layout).join(`, `)}) under \`${r}\`, which has no \`attach\`: this port's only layout manager is the grid, so the placement would be dropped.`);if(!(t instanceof x))throw Error(`\`${e.tag}\` is not a view, so it has no cell to place.`);for(let[n,r]of Object.entries(e.layout)){let i=w[n];if(i===void 0)throw Error(`layout \`${n}\` on \`${e.tag}\` reaches nothing: a grid child takes ${Object.keys(w).join(`, `)}.`);if(typeof r!=`number`||!Number.isInteger(r))throw Error(`layout \`${n}: ${String(r)}\` on \`${e.tag}\` is not a whole number.`);t[i]=r}}}function unknownProperty(e,t,n,r,i,a){let s=o(a,r);return Error(s===null?`<${e.xmlName} ${n}="${String(i)}"> reaches nothing: \`${t}\` declares no '${r}'. NativeScript's builder assigns it anyway, as a dead own-property at exit 0, so the attribute door cannot report this and the tree would render without it.`:`<${e.xmlName} ${n}="${String(i)}"> reaches nothing on \`${t}\`: ${s}`)}function buildView(e,t,n,r){if(e.page!==void 0)throw Error(`<${t.xmlName}> is a page (${JSON.stringify(e.page)}), and adwaita-nativescript builds no pages: there is no NS widget yet for Gtk.Notebook, and Gtk.StackPage is not on this branch.`);if(e.id!==void 0){if(r.ids.has(e.id)||r.values?.has(e.id))throw Error(`Two nodes of this tree carry the id '${e.id}'; GtkBuilder refuses a duplicate id.`);r.ids.set(e.id,n),n.id=e.id}let a=i(t.ctor);for(let[i,a]of _(e,r.menus)){let r=b(i);if(!s(n,r))throw unknownProperty(t,e.tag,i,r,i,n);l(n,r,a)}for(let[i,o]of Object.entries(e.props??{})){if(i===`menu-model`)continue;let c=b(i);if(!s(n,c))throw unknownProperty(t,e.tag,i,c,o,n);if(a.includes(c)){r.pending.push({view:n,element:t,prop:c,id:String(o)});continue}let u=translated(r.translate,o,e.translatable?.[i]),f=d(n,c,u,`<${t.xmlName} ${i}="${String(u)}">`);l(n,c,f===null?String(u):f.value)}if(e.styleClasses!==void 0&&e.styleClasses.length>0){if(!(`styleClasses`in n))throw Error(`<${t.xmlName}> takes no style classes: \`${e.tag}\` declares no 'styleClasses', so [${e.styleClasses.join(`, `)}] would be dropped.`);n.styleClasses=e.styleClasses.join(` `)}if(applyAccessibility(n,e,r),e.extensions?.strings!==void 0)throw Error(`<${t.xmlName}> takes no string-list items: \`${e.tag}\` is a widget, and only a list model holds them, so [${e.extensions.strings.map(e=>e.value).join(`, `)}] would be dropped.`);return applyResponses(n,t,e,r),n}const T={label:`accessibilityLabel`,description:`accessibilityHint`};function applyAccessibility(e,t,n){for(let[r,i]of Object.entries(t.accessibility??{}))e[T[r]]=String(translated(n.translate,i.value,i.translatable))}function buildValue(e,t,n,r){if(e.id!==void 0&&r.values===void 0)throw Error(`<${t.xmlName} id="${e.id}"> reaches nothing: \`${e.tag}\` is not a view, and \`getViewById\` walks views, so code beside the \`.blp\` could never look it up. \`buildWithSiblings\` hands every object back by id.`);if(e.styleClasses!==void 0&&e.styleClasses.length>0)throw Error(`<${t.xmlName}> takes no style classes: \`${e.tag}\` is not a widget, so [${e.styleClasses.join(`, `)}] would be dropped.`);if(e.accessibility!==void 0)throw Error(`<${t.xmlName}> takes no accessibility: \`${e.tag}\` is not a widget, so ${Object.keys(e.accessibility).join(`, `)} would be dropped.`);let i={};for(let[a,o]of _(e,r.menus)){let r=b(a);if(!s(n,r))throw unknownProperty(t,e.tag,a,r,a,n);i[r]=o}for(let[a,o]of Object.entries(e.props??{})){if(a===`menu-model`)continue;let c=b(a);if(!s(n,c))throw unknownProperty(t,e.tag,a,c,o,n);i[c]=translated(r.translate,o,e.translatable?.[a])}let a=e.extensions?.strings;if(a!==void 0){if(typeof n.append!=`function`)throw Error(`<${t.xmlName}> takes no string-list items: \`${e.tag}\` has no \`append\`, so [${a.map(e=>e.value).join(`, `)}] would be dropped.`);i.strings=a.map(e=>String(translated(r.translate,e.value,e.translatable)))}let o=new t.ctor(i);if(applyResponses(o,t,e,r),e.id!==void 0&&r.values!==void 0){if(r.values.has(e.id)||r.ids.has(e.id))throw Error(`Two nodes of this tree carry the id '${e.id}'; GtkBuilder refuses a duplicate id.`);r.values.set(e.id,o)}return o}function applyResponses(e,t,n,r){let i=e,a=n.extensions?.responses;if(a!==void 0){if(typeof i.add_response!=`function`)throw Error(`<${t.xmlName}> takes no responses: \`${n.tag}\` has no \`add_response\`, so [${a.map(e=>e.id).join(`, `)}] would be dropped.`);for(let{id:e,label:t,appearance:n,enabled:o,translatable:s}of a)i.add_response(e,String(translated(r.translate,t,s)),{...n===void 0?{}:{appearance:n},...o===void 0?{}:{enabled:o}})}}function builderNameFor(e,t,n){let r=elementOf(n);if(n.slot===void 0)return r.xmlName;let i=n.slot,o=a(e.ctor);if(o===null||!o.includes(i))throw Error(`<${e.xmlName}.${i}> reaches nothing: \`${t}\` declares no such builder slot, so NativeScript would hand <${r.xmlName}> to its fallback placement instead — at exit 0, in a cell the tree never asked for. Known slots: ${o===null||o.length===0?`none`:o.join(`, `)}.`);return i}export{applyBreakpoints,build,buildDialog,buildInto,buildWithSiblings,elementFor,registerBarrel,f as registerTemplateClass};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{capabilities as e}from"../capabilities.js";import{observeWindowSize as t}from"../widgets/breakpoint.js";import{gtypeNameOf as n,gtypeNameOfInstance as r}from"../widgets/gtype-name.js";import{declaredBuilderReferences as i,declaredBuilderSlots as a}from"../widgets/builder-slots.js";import{gtkPropertyRefusal as o,hasGtkProperty as s,readGtkProperty as c,writeGtkProperty as l}from"../widgets/shadowed-properties.js";import{emittedSignalsOf as u}from"../widgets/signals.js";import{authoredParamValue as d}from"./param-values.js";import{registerTemplateClass as f,templateClassFor as p}from"./template-classes.js";import{adw_exports as m}from"../namespace/adw.js";import{gtk_exports as h}from"../namespace/gtk.js";import{createBreakpointDriver as g,menuAssignments as _,parseBreakpointCondition as v}from"@gjsify/adwaita-core";import{assertTreeConstructs as y}from"@gjsify/adwaita-core/conformance";import{propertyOf as b}from"@gjsify/adwaita-core/tags";import{View as x}from"@nativescript/core";const S=[{prefix:`adw`,library:`Adw`,namespace:m},{prefix:`gtk`,library:`Gtk`,namespace:h}];function registerBarrel(e,t,n){let r=S.find(t=>t.prefix===e);if(r!==void 0&&r.library!==t)throw Error(`The prefix '${e}' already names \`${r.library}\`; it cannot also name \`${t}\`.`);r===void 0?S.push({prefix:e,library:t,namespace:n}):r.namespace=n}const C={GtkPopoverMenuBar:`Android has no menu-bar surface, and a row of PopupMenus would be a design choice, not GTK's widget (ADR 0097 § 2). Use a GtkMenuButton or a GtkPopoverMenu.`};function elementFor(e){let t=C[e];if(t!==void 0)throw Error(`\`${e}\` is refused on this port: ${t}`);let r=[...S].sort((e,t)=>t.library.length-e.library.length);for(let{prefix:t,library:i,namespace:a}of r){if(!e.startsWith(i))continue;let r=e.slice(i.length),o=a[r];if(typeof o!=`function`)throw Error(`Module '~/${t}' has no member for element '${t}:${r}' — the name \`${e}\` is authored in the shared corpus and this dialect cannot spell it. Give the widget a namespace member (ADR 0034 clause 2), or ledger the block as divergent.`);if(n(o)!==e)throw Error(`'${t}:${r}' resolves to class \`${n(o)}\`, not \`${e}\`. The corpus is authored in GIR class names and ADR 0034 clause 1 says a widget carries that name, so a barrel member bound to another class would build the wrong widget at exit 0.`);return{xmlName:`${t}:${r}`,ctor:o}}throw Error(`\`${e}\` starts with no library this dialect has a barrel for (${S.map(e=>e.prefix).join(`, `)}).`)}function elementOf(e){return e.extern===!0?{xmlName:`app:${e.tag}`,ctor:p(e.tag)}:elementFor(e.tag)}function translated(e,t,n){return n===void 0||e===void 0||typeof t!=`string`?t:e(t,n.context)}function build(e,t={}){refuseSiblings(e,`build`);let n=buildTree(e,t).root;if(!(n instanceof x))throw Error(`\`${e.tag}\` is not a widget, so a tree cannot root at it: there is nothing to show.`);return n}function buildDialog(e,t={}){refuseSiblings(e,`buildDialog`);let n=buildTree(e,t).root;if(n instanceof x||typeof n.present!=`function`)throw Error(`\`${e.tag}\` is not a dialog: it has no \`present()\`, so use \`build\` for it.`);return n}function buildWithSiblings(e,t={}){let n=buildTree(e,t,!0);if(!(n.root instanceof x))throw Error(`\`${e.tag}\` is not a widget, so a tree cannot root at it: there is nothing to show.`);return{root:n.root,siblings:n.siblings,objects:n.objects}}function buildInto(e,t,n={}){let r=elementOf(t);if(!(e instanceof r.ctor))throw Error(`\`buildInto\` was handed a ${e.constructor.name}, and the tree's root is \`${t.tag}\`: a template builds into an instance of the class it extends (<${r.xmlName}>).`);return buildTree(t,n,!0,e).objects}function refuseSiblings(e,t){if((e.siblings?.length??0)!==0)throw Error(`\`${e.tag}\` carries ${e.siblings.length} sibling object(s), and \`${t}\` returns one object so they would be built and lost. Use \`buildWithSiblings\`, which hands them back by id.`)}function buildTree(n,r,i=!1,a){y(`adwaita-nativescript`,e,n,Object.keys(T));let o={ids:new Map,pending:[],binds:[],breakpointHosts:[],observeSize:r.observeSize??t,menus:n.menus,scope:r.scope,template:r.template,translate:r.translate,values:i?new Map:void 0},s=buildNode(n,o,a),c=new Map;for(let e of n.siblings??[]){if(e.id===void 0)throw Error(`the sibling \`${e.tag}\` has no id, so nothing could ever ask for it: give it one in the .blp.`);c.set(e.id,buildNode(e,o))}for(let{view:e,element:t,prop:n,id:r}of o.pending){let i=o.ids.get(r);if(i===void 0)throw Error(`<${t.xmlName} ${n}="${r}"> names no object: nothing in this tree has the id '${r}', so \`${n}\` would be handed the string instead of the widget it refers to.`);l(e,n,i)}for(let e of o.binds)bindProperty(e,o);for(let e of o.breakpointHosts)bindBreakpoints(e,o);return{root:s,siblings:c,objects:new Map([...o.ids,...o.values??[]])}}function bindProperty(e,t){let{target:n,element:r,property:i,source:a,sourceProperty:d,flags:f}=e,p=`<${r.xmlName}> \`${i}: bind ${a}.${d}\``,m=t.template,h=a===`template`&&m!==void 0?m.instance:t.ids.get(a);if(h===void 0)throw Error(`${p} names no object: nothing in this tree has the id '${a}'.`);if(f.length>0&&m===void 0)throw Error(`${p} carries ${f.join(`, `)}: adwaita-nativescript binds the plain form only until each flag is verified against GObject.`);let g=b(d),_=b(i),v=u(h.constructor),y=`notify::${d}`;if(!s(h,g)||!v.includes(y))throw Error(`${p}: ${h.constructor.name} does not emit '${y}', so the target would follow the source once and never again. It emits: ${v.join(`, `)||`none`}.`);if(!s(n,_)){let e=o(n,_);throw Error(`${p}: the target has no property '${_}'.${e===null?``:` ${e}`}`)}if(m!==void 0){bindThroughEngine(m,{...e,from:h,where:p,notification:y});return}let follow=()=>l(n,_,c(h,g));follow(),h.connect(y,follow)}function engineFlags(e,t){for(let n of e)if(n!==`bidirectional`&&n!==`inverted`&&n!==`no-sync-create`)throw Error(`${t} carries the unknown flag '${n}'.`);let n=e.includes(`no-sync-create`)?[]:[`sync-create`];return e.includes(`bidirectional`)&&n.push(`bidirectional`),e.includes(`inverted`)&&n.push(`invert-boolean`),n}function viaProperties(e){let key=e=>typeof e==`string`?b(e):e;return new Proxy(e,{get(e,t){let n=typeof t==`string`&&s(e,key(t))?c(e,key(t)):Reflect.get(e,key(t));return typeof n==`function`?n.bind(e):n},set(e,t,n){return typeof t==`string`?(l(e,b(t),n),!0):Reflect.set(e,t,n)}})}function bindThroughEngine(e,t){let{target:n,from:r,property:i,sourceProperty:a,flags:o,where:s}=t,c=engineFlags(o,s),l=u(n.constructor);if(c.includes(`bidirectional`)&&!l.includes(`notify::${i}`))throw Error(`${s}: bidirectional, but ${n.constructor.name} does not emit 'notify::${i}', so the source would never follow the target back. It emits: ${l.join(`, `)||`none`}.`);e.bind(viaProperties(r),a,viaProperties(n),i,c)}function bindBreakpoints({view:e,element:t,node:n},r){if(!(e instanceof x))throw Error(`<${t.xmlName}> is not a view, so it has no size for a breakpoint to read.`);wireBreakpoints(t.xmlName,e,n.breakpoints??[],r.ids,r.observeSize,r.translate)}function applyBreakpoints(e,n,i,a={}){wireBreakpoints(r(e),e,n,new Map(Object.entries(i)),a.observeSize??t,a.translate)}function wireBreakpoints(e,t,n,r,i,a){let u=g(n.map(t=>{if(v(t.condition)===null)throw Error(`<${e}> \`condition ("${t.condition}")\` is not an Adwaita breakpoint condition.`);return{condition:t.condition,setters:t.setters.map(t=>{let n=r.get(t.object),i=`<${e}> breakpoint setter \`${t.object}.${t.property}\``;if(n===void 0)throw Error(`${i} names no object: nothing in this tree has the id '${t.object}'.`);if(!s(n,b(t.property))){let e=o(n,b(t.property));throw Error(`${i}: the target declares no '${b(t.property)}'.`+(e===null?``:` ${e}`))}let c=translated(a,t.value,t.translatable),l=d(n,b(t.property),c,i);return{object:n,property:t.property,value:{authored:l===null?String(c):l.value}}})}}),{read:(e,t)=>({original:c(e,b(t))}),write(e,t,n){let r=n;l(e,b(t),`authored`in r?r.authored:r.original)}});i(t,e=>u.evaluate(e))}function buildNode(e,t,n){let r=elementOf(e),i=n??new r.ctor,a=i instanceof x?buildView(e,r,i,t):buildValue(e,r,i,t);bindSignals(a,r,e,t);for(let[n,i]of Object.entries(e.bindings??{}))t.binds.push({target:a,element:r,property:n,source:i.source,sourceProperty:i.property,flags:i.flags??[]});e.breakpoints!==void 0&&t.breakpointHosts.push({view:a,element:r,node:e});for(let n of e.children??[]){let i=a;if(typeof i._addChildFromBuilder!=`function`)throw Error(`<${r.xmlName}> takes no XML child: \`${e.tag}\` has no \`_addChildFromBuilder\`, so the corpus nests a node this element cannot hold.`);let o=buildNode(n,t);applyLayout(n,o,r,e.tag),i._addChildFromBuilder(builderNameFor(r,e.tag,n),o)}return a}function bindSignals(e,t,n,r){if(n.signals===void 0)return;let i=u(t.ctor),a=e;for(let e of n.signals){let n=e.detail===void 0?e.name:`${e.name}::${e.detail}`;if(typeof a.connect!=`function`||!i.includes(n))throw Error(`<${t.xmlName}> declares no signal '${n}', so the handler '${e.handler}' would never run. It emits: ${i.join(`, `)||`none`}.`);let o=(e.flags??[]).filter(e=>r.template===void 0||e!==`swapped`);if(e.object!==void 0||o.length>0)throw Error(`the handler '${e.handler}' for '${n}' uses ${e.object===void 0?``:`an object `}${(e.flags??[]).join(`, `)}: adwaita-nativescript binds plain handlers only until each of those is verified against GTK.`);if(r.template!==void 0){a.connect(n,r.template.handler(e.handler,{flags:e.flags}));continue}let s=r.scope?.[e.handler];if(typeof s!=`function`)throw Error(`the tree binds the handler '${e.handler}' for '${n}', and the scope ${r.scope===void 0?"was not given (pass `scope`)":`has no such function`}.`);a.connect(n,(...e)=>s.apply(r.scope,e))}}const w={row:`row`,column:`column`,"row-span":`rowSpan`,"column-span":`columnSpan`};function applyLayout(e,t,n,r){if(e.layout!==void 0){if(typeof n.ctor.prototype.attach!=`function`)throw Error(`<${elementOf(e).xmlName}> authored layout (${Object.keys(e.layout).join(`, `)}) under \`${r}\`, which has no \`attach\`: this port's only layout manager is the grid, so the placement would be dropped.`);if(!(t instanceof x))throw Error(`\`${e.tag}\` is not a view, so it has no cell to place.`);for(let[n,r]of Object.entries(e.layout)){let i=w[n];if(i===void 0)throw Error(`layout \`${n}\` on \`${e.tag}\` reaches nothing: a grid child takes ${Object.keys(w).join(`, `)}.`);if(typeof r!=`number`||!Number.isInteger(r))throw Error(`layout \`${n}: ${String(r)}\` on \`${e.tag}\` is not a whole number.`);t[i]=r}}}function unknownProperty(e,t,n,r,i,a){let s=o(a,r);return Error(s===null?`<${e.xmlName} ${n}="${String(i)}"> reaches nothing: \`${t}\` declares no '${r}'. NativeScript's builder assigns it anyway, as a dead own-property at exit 0, so the attribute door cannot report this and the tree would render without it.`:`<${e.xmlName} ${n}="${String(i)}"> reaches nothing on \`${t}\`: ${s}`)}function buildView(e,t,n,r){if(e.page!==void 0)throw Error(`<${t.xmlName}> is a page (${JSON.stringify(e.page)}), and adwaita-nativescript builds no pages: there is no NS widget yet for Gtk.Notebook, and Gtk.StackPage is not on this branch.`);if(e.id!==void 0){if(r.ids.has(e.id)||r.values?.has(e.id))throw Error(`Two nodes of this tree carry the id '${e.id}'; GtkBuilder refuses a duplicate id.`);r.ids.set(e.id,n),n.id=e.id}let a=i(t.ctor);for(let[i,a]of _(e,r.menus)){let r=b(i);if(!s(n,r))throw unknownProperty(t,e.tag,i,r,i,n);l(n,r,a)}for(let[i,o]of Object.entries(e.props??{})){if(i===`menu-model`)continue;let c=b(i);if(!s(n,c))throw unknownProperty(t,e.tag,i,c,o,n);if(a.includes(c)){r.pending.push({view:n,element:t,prop:c,id:String(o)});continue}let u=translated(r.translate,o,e.translatable?.[i]),f=d(n,c,u,`<${t.xmlName} ${i}="${String(u)}">`);l(n,c,f===null?String(u):f.value)}if(e.styleClasses!==void 0&&e.styleClasses.length>0){if(!(`styleClasses`in n))throw Error(`<${t.xmlName}> takes no style classes: \`${e.tag}\` declares no 'styleClasses', so [${e.styleClasses.join(`, `)}] would be dropped.`);n.styleClasses=e.styleClasses.join(` `)}if(applyAccessibility(n,e,r),e.extensions?.strings!==void 0)throw Error(`<${t.xmlName}> takes no string-list items: \`${e.tag}\` is a widget, and only a list model holds them, so [${e.extensions.strings.map(e=>e.value).join(`, `)}] would be dropped.`);return applyResponses(n,t,e,r),n}const T={label:`accessibilityLabel`,description:`accessibilityHint`};function applyAccessibility(e,t,n){for(let[r,i]of Object.entries(t.accessibility??{}))e[T[r]]=String(translated(n.translate,i.value,i.translatable))}function buildValue(e,t,n,r){if(e.id!==void 0&&r.values===void 0)throw Error(`<${t.xmlName} id="${e.id}"> reaches nothing: \`${e.tag}\` is not a view, and \`getViewById\` walks views, so code beside the \`.blp\` could never look it up. \`buildWithSiblings\` hands every object back by id.`);if(e.styleClasses!==void 0&&e.styleClasses.length>0)throw Error(`<${t.xmlName}> takes no style classes: \`${e.tag}\` is not a widget, so [${e.styleClasses.join(`, `)}] would be dropped.`);if(e.accessibility!==void 0)throw Error(`<${t.xmlName}> takes no accessibility: \`${e.tag}\` is not a widget, so ${Object.keys(e.accessibility).join(`, `)} would be dropped.`);let i={};for(let[a,o]of _(e,r.menus)){let r=b(a);if(!s(n,r))throw unknownProperty(t,e.tag,a,r,a,n);i[r]=o}for(let[a,o]of Object.entries(e.props??{})){if(a===`menu-model`)continue;let c=b(a);if(!s(n,c))throw unknownProperty(t,e.tag,a,c,o,n);i[c]=translated(r.translate,o,e.translatable?.[a])}let a=e.extensions?.strings;if(a!==void 0){if(typeof n.append!=`function`)throw Error(`<${t.xmlName}> takes no string-list items: \`${e.tag}\` has no \`append\`, so [${a.map(e=>e.value).join(`, `)}] would be dropped.`);i.strings=a.map(e=>String(translated(r.translate,e.value,e.translatable)))}let o=new t.ctor(i);if(applyResponses(o,t,e,r),e.id!==void 0&&r.values!==void 0){if(r.values.has(e.id)||r.ids.has(e.id))throw Error(`Two nodes of this tree carry the id '${e.id}'; GtkBuilder refuses a duplicate id.`);r.values.set(e.id,o)}return o}function applyResponses(e,t,n,r){let i=e,a=n.extensions?.responses;if(a!==void 0){if(typeof i.add_response!=`function`)throw Error(`<${t.xmlName}> takes no responses: \`${n.tag}\` has no \`add_response\`, so [${a.map(e=>e.id).join(`, `)}] would be dropped.`);for(let{id:e,label:t,appearance:n,enabled:o,translatable:s}of a)i.add_response(e,String(translated(r.translate,t,s)),{...n===void 0?{}:{appearance:n},...o===void 0?{}:{enabled:o}})}}function builderNameFor(e,t,n){let r=elementOf(n);if(n.slot===void 0)return r.xmlName;let i=n.slot,o=a(e.ctor);if(o===null||!o.includes(i))throw Error(`<${e.xmlName}.${i}> reaches nothing: \`${t}\` declares no such builder slot, so NativeScript would hand <${r.xmlName}> to its fallback placement instead — at exit 0, in a cell the tree never asked for. Known slots: ${o===null||o.length===0?`none`:o.join(`, `)}.`);return i}export{applyBreakpoints,build,buildDialog,buildInto,buildWithSiblings,elementFor,registerBarrel,f as registerTemplateClass};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{registeredClassOf as e}from"@gjsify/adwaita-core";import{propertyOf as t}from"@gjsify/adwaita-core/tags";function registeredParamSpec(n,r){for(let i=n.constructor;typeof i==`function`;i=Object.getPrototypeOf(i)){let n=e(i)?.properties.find(e=>t(e.name)===r);if(n!==void 0)return n}}const n=/^\s*([+-]?)(?:0[xX]([0-9a-fA-F]+)|(0[0-7]*)|([1-9][0-9]*))/,r=/^\s*([+-]?)(?:(\d+\.?\d*(?:[eE][+-]?\d+)?|\.\d+(?:[eE][+-]?\d+)?)|(inf(?:inity)?)|(nan))/i;function parseBoolean(e){if(e.length===1)return`1yYtT`.includes(e)?!0:`0nNfF`.includes(e)?!1:void 0;let t=e.toLowerCase();if(t===`true`||t===`yes`)return!0;if(t===`false`||t===`no`)return!1}function parseInteger(e){let t=n.exec(e);if(t===null)return;let[,r,i,a,o]=t,s=i===void 0?a===void 0?parseInt(o,10):parseInt(a,8):parseInt(i,16);return r===`-`?-s:s}function parseDouble(e){let t=r.exec(e);if(t===null)return;let[,n,i,a]=t,o=i===void 0?a===void 0?NaN:1/0:Number(i);return n===`-`?-o:o}function valueFromString(e,t){switch(e.kind){case`string`:return t;case`boolean`:return parseBoolean(t);case`int`:return parseInteger(t);case`uint`:{let e=parseInteger(t);return e===void 0||e<0||Object.is(e,-0)?void 0:e}case`double`:return parseDouble(t)}}const i={boolean:`boolean`,string:`string`,int:`integer`,uint:`unsigned integer`,double:`double`};function authoredParamValue(e,t,n,r){let a=registeredParamSpec(e,t);if(a===void 0)return null;let o=String(n),s=valueFromString(a,o);if(s===void 0)throw Error(`${r}: Could not parse ${i[a.kind]} '${o}' for the property '${a.name}', which ${e.constructor.name} registers as a ${a.kind} ParamSpec.`);return{value:s}}export{authoredParamValue,registeredParamSpec,valueFromString};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{registeredClassOf as e}from"@gjsify/adwaita-core";import{propertyOf as t}from"@gjsify/adwaita-core/tags";function registeredParamSpec(n,r){for(let i=n.constructor;typeof i==`function`;i=Object.getPrototypeOf(i)){let n=e(i)?.properties.find(e=>t(e.name)===r);if(n!==void 0)return n}}const n=/^\s*([+-]?)(?:0[xX]([0-9a-fA-F]+)|(0[0-7]*)|([1-9][0-9]*))/,r=/^\s*([+-]?)(?:(\d+\.?\d*(?:[eE][+-]?\d+)?|\.\d+(?:[eE][+-]?\d+)?)|(inf(?:inity)?)|(nan))/i;function parseBoolean(e){if(e.length===1)return`1yYtT`.includes(e)?!0:`0nNfF`.includes(e)?!1:void 0;let t=e.toLowerCase();if(t===`true`||t===`yes`)return!0;if(t===`false`||t===`no`)return!1}function parseInteger(e){let t=n.exec(e);if(t===null)return;let[,r,i,a,o]=t,s=i===void 0?a===void 0?parseInt(o,10):parseInt(a,8):parseInt(i,16);return r===`-`?-s:s}function parseDouble(e){let t=r.exec(e);if(t===null)return;let[,n,i,a]=t,o=i===void 0?a===void 0?NaN:1/0:Number(i);return n===`-`?-o:o}function valueFromString(e,t){switch(e.kind){case`string`:return t;case`boolean`:return parseBoolean(t);case`int`:return parseInteger(t);case`uint`:{let e=parseInteger(t);return e===void 0||e<0||Object.is(e,-0)?void 0:e}case`double`:return parseDouble(t)}}const i={boolean:`boolean`,string:`string`,int:`integer`,uint:`unsigned integer`,double:`double`,object:`object`};function authoredParamValue(e,t,n,r){let a=registeredParamSpec(e,t);if(a===void 0)return null;let o=String(n),s=valueFromString(a,o);if(s===void 0)throw Error(`${r}: Could not parse ${i[a.kind]} '${o}' for the property '${a.name}', which ${e.constructor.name} registers as a ${a.kind} ParamSpec.`);return{value:s}}export{authoredParamValue,registeredParamSpec,valueFromString};
|
|
File without changes
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";import{AdwBreakpoint as ee,addBreakpoints as te,evaluateBreakpointCondition as ne,observeViewSize as e,observeWindowSize as t,parseBreakpointCondition as n}from"./widgets/breakpoint.js";import{ENGINE_TARGET as r}from"./engine-target.js";import{GTK_ALIGN as i}from"./widgets/gtk-align.js";import{DEFAULT_ICON_PIXEL_SIZE as a,GTK_ICON_SIZE_NICKS as o,GTK_ICON_SIZE_PIXELS as s,PIXEL_SIZE_UNSET as c,isGtkIconSizeNick as l}from"./widgets/gtk-icon-size.js";import{applyConstructProps as u,nsAlignment as d}from"./widgets/construct-props.js";import{activateWidgetAction as f,findActionGroup as p,insertActionGroup as m}from"./widgets/actions.js";import{NOTIFY_HEXPAND as h,NOTIFY_VEXPAND as g,withGtkWidgetLayout as _}from"./widgets/widget-layout.js";import{adwaitaColorScheme as v,isThemeIconColor as y,onAdwaitaColorSchemeChanged as b,setAdwaitaColorScheme as x,themeIconColor as S,toggleAdwaitaColorScheme as C}from"./widgets/color-scheme.js";import{ADWAITA_ICON_GRID as w,DEFAULT_ICON_COLOR as T,DEFAULT_ICON_COLOR_DARK as E,extractIconPaths as D,extractPathData as O}from"./widgets/icon-path.js";import{ICON_FALLBACK_NAME as k,compiledIconNames as A,iconValueKind as j,isIconAvailable as M,resolveIconSource as N}from"./widgets/icon-theme.js";import{renderSymbolicIcon as P}from"./widgets/icons.js";import{DEFAULT_GTK_IMAGE_SIZE as F}from"./widgets/gtk-image.js";import{CLOSED as I}from"./widgets/adw-about-dialog.js";import{ACTIVATED as L}from"./widgets/adw-action-row.js";import{AdwAlertResponses as R}from"./widgets/adw-alert-dialog.js";import{avatarInitials as z}from"./widgets/avatar-color.js";import{AVATAR_DEFAULT_ICON as B}from"./widgets/avatar-view.js";import{DEFAULT_AVATAR_SIZE as V}from"./widgets/adw-avatar.js";import{DEFAULT_CLAMP_MAX_SIZE as H,DEFAULT_SPINNER_SIZE as U}from"./widgets/chrome.js";import{BUTTON_CLICKED as W}from"./widgets/adw-banner.js";import{NOTIFY_OPEN as G}from"./widgets/bottom-sheet-state.js";import{attachRowPressFeedback as K}from"./widgets/row-press.js";import{bottomSheetPanel as q}from"./widgets/adw-bottom-sheet.js";import{DEFAULT_CAROUSEL_PAGE_WIDTH as J}from"./widgets/carousel-state.js";import{NOTIFY_POSITION as Y}from"./widgets/adw-carousel.js";import{ComboState as X,NOTIFY_SELECTED as Z}from"./widgets/adw-combo-row.js";import{ADW_DIALOG_CLOSED as re,ADW_DIALOG_CLOSE_ATTEMPT as ie}from"./widgets/adw-dialog.js";import{AdwImageButton as ae,DEFAULT_ICON_BUTTON_ICON_SIZE as oe}from"./widgets/adw-image-button.js";import{NOTIFY_ACTIVATES_DEFAULT as se,NOTIFY_EDITABLE as ce,NOTIFY_MAX_LENGTH as le,NOTIFY_SHOW_APPLY_BUTTON as ue,NOTIFY_TEXT as de,NOTIFY_TEXT_LENGTH as fe,SIGNAL_APPLY as pe,SIGNAL_ENTRY_ACTIVATED as me}from"./widgets/adw-entry-row.js";import{ExpanderState as he,NOTIFY_EXPANDED as ge}from"./widgets/adw-expander-row.js";import{NOTIFY_VISIBLE_CHILD as _e}from"./widgets/adw-view-stack.js";import{AdwViewSwitcherBase as ve,NOTIFY_SELECTED as ye}from"./widgets/view-switcher-base.js";import{NsNavigationSplitViewState as be,NsOverlaySplitViewState as xe,splitViewColumns as Se}from"./widgets/split-view-state.js";import{AdwSplitViewBase as Ce,NOTIFY_SHOW_SIDEBAR as we}from"./widgets/split-view-base.js";import{NOTIFY_VISIBLE_PAGE as Te}from"./widgets/navigation-stack.js";import{CLOSED as Ee}from"./widgets/adw-preferences-dialog.js";import{SHORTCUT_LABEL_CAP_TEXT_CLASS as De,SHORTCUT_LABEL_CLASS as Oe,SHORTCUT_LABEL_DIMMED_CLASS as ke,SHORTCUT_LABEL_DISABLED_CLASS as Ae,SHORTCUT_LABEL_KEYCAP_CLASS as je,SHORTCUT_LABEL_KEYS_CLASS as Me,SHORTCUT_LABEL_SIDE_CLASS as Ne,SHORTCUT_LABEL_SPACED_CLASS as Pe,shortcutLabelDirection as Fe,shortcutLabelPlatform as Q,shortcutLabelRenderPlan as Ie}from"./widgets/shortcut-label.js";import{NOTIFY_SELECTED as Le}from"./widgets/adw-sidebar.js";import{NOTIFY_VALUE as Re,SpinState as ze}from"./widgets/adw-spin-row.js";import{CLICKED as Be,MENU_TAPPED as Ve}from"./widgets/adw-split-button.js";import{NOTIFY_ACTIVE as He}from"./widgets/adw-switch-row.js";import{AdwToast as Ue,AdwToastQueue as We,DEFAULT_TOAST_TIMEOUT as Ge}from"./widgets/adw-toast-overlay.js";import{NOTIFY_SELECTED as Ke,ToggleGroupState as qe}from"./widgets/adw-toggle-group.js";import{adw_exports as Je}from"./namespace/adw.js";import{DEFAULT_BOX_SPACING as Ye,boxChildTrack as Xe,boxSpacingChanges as Ze,boxTrackPlan as Qe,normalizeBoxSpacing as $e}from"./widgets/box-layout.js";import{buttonSlotAfterWrite as et,buttonSlotDetaches as tt}from"./widgets/button-slot.js";import{GTK_BUTTON_CLICKED as nt,GTK_BUTTON_LABEL_CLASS as rt}from"./widgets/gtk-button.js";import{NOTIFY_SELECTED as it}from"./widgets/gtk-drop-down.js";import{GTK_CHECK_BUTTON_ACTIVATE as at,GTK_CHECK_BUTTON_CHECKED_CLASS as ot,GTK_CHECK_BUTTON_INCONSISTENT_CLASS as st,GTK_CHECK_BUTTON_TOGGLED as ct,NOTIFY_CHECK_ACTIVE as lt}from"./widgets/gtk-check-button.js";import{DRAWING_AREA_REFUSAL as ut}from"./widgets/gtk-drawing-area.js";import{ACTIVATE as dt,NOTIFY_TEXT as ft}from"./widgets/gtk-entry.js";import{LIST_BOX_ROW_ACTIVATED as pt,LIST_BOX_ROW_SELECTED as mt}from"./widgets/gtk-list-box.js";import{MENU_ITEM_ACTIVATED as ht}from"./widgets/gtk-menu-button.js";import{NOTIFY_REVEAL_CHILD as gt}from"./widgets/gtk-revealer.js";import{NOTIFY_STACK_VISIBLE_CHILD as _t,NOTIFY_STACK_VISIBLE_CHILD_NAME as vt}from"./widgets/gtk-stack.js";import{GTK_WRAP_MODES as yt,NOTIFY_TEXT_VIEW_TEXT as bt}from"./widgets/gtk-text-view.js";import{GTK_TOGGLE_BUTTON_CHECKED_CLASS as xt,GTK_TOGGLE_BUTTON_TOGGLED as St,NOTIFY_TOGGLE_ACTIVE as Ct}from"./widgets/gtk-toggle-button.js";import{gtk_exports as wt}from"./namespace/gtk.js";import{ADWAITA_SANS_FONT_FAMILY as Tt,ADWAITA_SANS_TTF_FILES as Et,adwaitaFontInstallInstructions as Dt,hasAdwaitaSans as Ot}from"./fonts.js";import{AdwSliderRow as kt,NOTIFY_SLIDER_VALUE as At}from"./widgets/adw-slider-row.js";import{DATA_GRID_HEADER_CELL_CLASS as jt,DATA_GRID_HEADER_ROW_CLASS as Mt,DATA_GRID_SECTION_CELL_CLASS as Nt,dataGridCellClass as Pt,dataGridItemSpec as Ft,dataGridRowClass as It,dataGridShapeKey as Lt,dataGridTracksKey as Rt,parseDataGridWidth as zt}from"./widgets/data-grid-model.js";import{AdwDataGrid as Bt,ROW_ACTIVATED as Vt}from"./widgets/adw-data-grid.js";import{ADWAITA_NS_ACCENT_RULES as Ht,adwaitaNsAccentColor as Ut,adwaitaNsAccentCss as Wt}from"./widgets/accent-theme.js";import{applyAdwaitaNsAccent as Gt,clearAdwaitaNsAccent as Kt}from"./widgets/adw-accent.js";import{padForSystemInsets as qt,padSheetForSystemInsets as Jt}from"./widgets/system-insets.js";import{labelDisplayText as Yt,labelMarkupIsUnparseable as Xt,registerAdwaitaElements as $}from"./widgets/index.js";import{gio_exports as Zt}from"./namespace/gio.js";import{gdk_exports as Qt}from"./namespace/gdk.js";import{glib_exports as $t}from"./namespace/glib.js";import{assertNativeScript as en,assertNativeScript as tn,isAndroid as nn,isIOS as rn,isNativeScript as an}from"@gjsify/native-platform";function registerAdwaita(){tn(),$()}export{I as ABOUT_CLOSED,L as ACTIVATED,w as ADWAITA_ICON_GRID,Ht as ADWAITA_NS_ACCENT_RULES,Tt as ADWAITA_SANS_FONT_FAMILY,Et as ADWAITA_SANS_TTF_FILES,re as ADW_DIALOG_CLOSED,ie as ADW_DIALOG_CLOSE_ATTEMPT,B as AVATAR_DEFAULT_ICON,Je as Adw,R as AdwAlertResponses,ee as AdwBreakpoint,Bt as AdwDataGrid,ae as AdwImageButton,kt as AdwSliderRow,Ce as AdwSplitViewBase,Ue as AdwToast,We as AdwToastQueue,ve as AdwViewSwitcherBase,W as BUTTON_CLICKED,Be as CLICKED,X as ComboState,jt as DATA_GRID_HEADER_CELL_CLASS,Mt as DATA_GRID_HEADER_ROW_CLASS,Nt as DATA_GRID_SECTION_CELL_CLASS,V as DEFAULT_AVATAR_SIZE,Ye as DEFAULT_BOX_SPACING,J as DEFAULT_CAROUSEL_PAGE_WIDTH,H as DEFAULT_CLAMP_MAX_SIZE,F as DEFAULT_GTK_IMAGE_SIZE,oe as DEFAULT_ICON_BUTTON_ICON_SIZE,T as DEFAULT_ICON_COLOR,E as DEFAULT_ICON_COLOR_DARK,a as DEFAULT_ICON_PIXEL_SIZE,U as DEFAULT_SPINNER_SIZE,Ge as DEFAULT_TOAST_TIMEOUT,ut as DRAWING_AREA_REFUSAL,r as ENGINE_TARGET,dt as ENTRY_ACTIVATE,he as ExpanderState,$t as GLib,i as GTK_ALIGN,nt as GTK_BUTTON_CLICKED,rt as GTK_BUTTON_LABEL_CLASS,at as GTK_CHECK_BUTTON_ACTIVATE,ot as GTK_CHECK_BUTTON_CHECKED_CLASS,st as GTK_CHECK_BUTTON_INCONSISTENT_CLASS,ct as GTK_CHECK_BUTTON_TOGGLED,o as GTK_ICON_SIZE_NICKS,s as GTK_ICON_SIZE_PIXELS,xt as GTK_TOGGLE_BUTTON_CHECKED_CLASS,St as GTK_TOGGLE_BUTTON_TOGGLED,yt as GTK_WRAP_MODES,Qt as Gdk,Zt as Gio,wt as Gtk,k as ICON_FALLBACK_NAME,pt as LIST_BOX_ROW_ACTIVATED,mt as LIST_BOX_ROW_SELECTED,ht as MENU_ITEM_ACTIVATED,Ve as MENU_TAPPED,se as NOTIFY_ACTIVATES_DEFAULT,He as NOTIFY_ACTIVE,lt as NOTIFY_CHECK_ACTIVE,it as NOTIFY_DROP_DOWN_SELECTED,ce as NOTIFY_EDITABLE,ft as NOTIFY_ENTRY_TEXT,ge as NOTIFY_EXPANDED,h as NOTIFY_HEXPAND,le as NOTIFY_MAX_LENGTH,G as NOTIFY_OPEN,Y as NOTIFY_POSITION,gt as NOTIFY_REVEAL_CHILD,Z as NOTIFY_SELECTED,ue as NOTIFY_SHOW_APPLY_BUTTON,we as NOTIFY_SHOW_SIDEBAR,Le as NOTIFY_SIDEBAR_SELECTED,At as NOTIFY_SLIDER_VALUE,_t as NOTIFY_STACK_VISIBLE_CHILD,vt as NOTIFY_STACK_VISIBLE_CHILD_NAME,de as NOTIFY_TEXT,fe as NOTIFY_TEXT_LENGTH,bt as NOTIFY_TEXT_VIEW_TEXT,Ct as NOTIFY_TOGGLE_ACTIVE,Ke as NOTIFY_TOGGLE_SELECTED,Re as NOTIFY_VALUE,g as NOTIFY_VEXPAND,ye as NOTIFY_VIEW_SELECTED,_e as NOTIFY_VISIBLE_CHILD,Te as NOTIFY_VISIBLE_PAGE,be as NsNavigationSplitViewState,xe as NsOverlaySplitViewState,c as PIXEL_SIZE_UNSET,Ee as PREFERENCES_CLOSED,Vt as ROW_ACTIVATED,De as SHORTCUT_LABEL_CAP_TEXT_CLASS,Oe as SHORTCUT_LABEL_CLASS,ke as SHORTCUT_LABEL_DIMMED_CLASS,Ae as SHORTCUT_LABEL_DISABLED_CLASS,je as SHORTCUT_LABEL_KEYCAP_CLASS,Me as SHORTCUT_LABEL_KEYS_CLASS,Ne as SHORTCUT_LABEL_SIDE_CLASS,Pe as SHORTCUT_LABEL_SPACED_CLASS,pe as SIGNAL_APPLY,me as SIGNAL_ENTRY_ACTIVATED,ze as SpinState,qe as ToggleGroupState,f as activateWidgetAction,te as addBreakpoints,v as adwaitaColorScheme,Dt as adwaitaFontInstallInstructions,Ut as adwaitaNsAccentColor,Wt as adwaitaNsAccentCss,Gt as applyAdwaitaNsAccent,u as applyConstructProps,en as assertNativeScript,K as attachRowPressFeedback,z as avatarInitials,q as bottomSheetPanel,Xe as boxChildTrack,Ze as boxSpacingChanges,Qe as boxTrackPlan,et as buttonSlotAfterWrite,tt as buttonSlotDetaches,Kt as clearAdwaitaNsAccent,A as compiledIconNames,Pt as dataGridCellClass,Ft as dataGridItemSpec,It as dataGridRowClass,Lt as dataGridShapeKey,Rt as dataGridTracksKey,ne as evaluateBreakpointCondition,D as extractIconPaths,O as extractPathData,p as findActionGroup,Ot as hasAdwaitaSans,j as iconValueKind,m as insertActionGroup,nn as isAndroid,l as isGtkIconSizeNick,rn as isIOS,M as isIconAvailable,an as isNativeScript,y as isThemeIconColor,Yt as labelDisplayText,Xt as labelMarkupIsUnparseable,$e as normalizeBoxSpacing,d as nsAlignment,e as observeViewSize,t as observeWindowSize,b as onAdwaitaColorSchemeChanged,qt as padForSystemInsets,Jt as padSheetForSystemInsets,n as parseBreakpointCondition,zt as parseDataGridWidth,registerAdwaita,$ as registerAdwaitaElements,P as renderSymbolicIcon,N as resolveIconSource,x as setAdwaitaColorScheme,Fe as shortcutLabelDirection,Q as shortcutLabelPlatform,Ie as shortcutLabelRenderPlan,Se as splitViewColumns,S as themeIconColor,C as toggleAdwaitaColorScheme,_ as withGtkWidgetLayout};
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{AdwBreakpoint as ee,addBreakpoints as te,evaluateBreakpointCondition as ne,observeViewSize as e,observeWindowSize as t,parseBreakpointCondition as n}from"./widgets/breakpoint.js";import{ENGINE_TARGET as r}from"./engine-target.js";import{GTK_ALIGN as i}from"./widgets/gtk-align.js";import{DEFAULT_ICON_PIXEL_SIZE as a,GTK_ICON_SIZE_NICKS as o,GTK_ICON_SIZE_PIXELS as s,PIXEL_SIZE_UNSET as c,isGtkIconSizeNick as l}from"./widgets/gtk-icon-size.js";import{applyConstructProps as u,nsAlignment as d}from"./widgets/construct-props.js";import{activateWidgetAction as f,findActionGroup as p,insertActionGroup as m}from"./widgets/actions.js";import{NOTIFY_HEXPAND as h,NOTIFY_VEXPAND as g,withGtkWidgetLayout as _}from"./widgets/widget-layout.js";import{adwaitaColorScheme as v,isThemeIconColor as y,onAdwaitaColorSchemeChanged as b,setAdwaitaColorScheme as x,themeIconColor as S,toggleAdwaitaColorScheme as C}from"./widgets/color-scheme.js";import{ADWAITA_ICON_GRID as w,DEFAULT_ICON_COLOR as T,DEFAULT_ICON_COLOR_DARK as E,extractIconPaths as D,extractPathData as O}from"./widgets/icon-path.js";import{ICON_FALLBACK_NAME as k,compiledIconNames as A,iconValueKind as j,isIconAvailable as M,resolveIconSource as N}from"./widgets/icon-theme.js";import{renderSymbolicIcon as P}from"./widgets/icons.js";import{DEFAULT_GTK_IMAGE_SIZE as F}from"./widgets/gtk-image.js";import{CLOSED as I}from"./widgets/adw-about-dialog.js";import{ACTIVATED as L}from"./widgets/adw-action-row.js";import{AdwAlertResponses as R}from"./widgets/adw-alert-dialog.js";import{NOTIFY_OPEN as z}from"./widgets/bottom-sheet-state.js";import{attachRowPressFeedback as B}from"./widgets/row-press.js";import{bottomSheetPanel as V}from"./widgets/adw-bottom-sheet.js";import{avatarInitials as H}from"./widgets/avatar-color.js";import{AVATAR_DEFAULT_ICON as U}from"./widgets/avatar-view.js";import{DEFAULT_AVATAR_SIZE as W}from"./widgets/adw-avatar.js";import{DEFAULT_CLAMP_MAX_SIZE as G,DEFAULT_SPINNER_SIZE as K}from"./widgets/chrome.js";import{BUTTON_CLICKED as q}from"./widgets/adw-banner.js";import{DEFAULT_CAROUSEL_PAGE_WIDTH as J}from"./widgets/carousel-state.js";import{NOTIFY_POSITION as Y}from"./widgets/adw-carousel.js";import{ComboState as X,NOTIFY_SELECTED as Z}from"./widgets/adw-combo-row.js";import{ADW_DIALOG_CLOSED as re,ADW_DIALOG_CLOSE_ATTEMPT as ie}from"./widgets/adw-dialog.js";import{AdwImageButton as ae,DEFAULT_ICON_BUTTON_ICON_SIZE as oe}from"./widgets/adw-image-button.js";import{NOTIFY_ACTIVATES_DEFAULT as se,NOTIFY_EDITABLE as ce,NOTIFY_MAX_LENGTH as le,NOTIFY_SHOW_APPLY_BUTTON as ue,NOTIFY_TEXT as de,NOTIFY_TEXT_LENGTH as fe,SIGNAL_APPLY as pe,SIGNAL_ENTRY_ACTIVATED as me}from"./widgets/adw-entry-row.js";import{NOTIFY_ENABLE_EXPANSION as he,NOTIFY_EXPANDED as ge,NOTIFY_SHOW_ENABLE_SWITCH as _e,NS_EXPANDER_ARROW_DISABLED_OPACITY as ve}from"./widgets/adw-expander-row.js";import{NOTIFY_VISIBLE_CHILD as ye}from"./widgets/adw-view-stack.js";import{AdwViewSwitcherBase as be,NOTIFY_SELECTED as xe}from"./widgets/view-switcher-base.js";import{NsNavigationSplitViewState as Se,NsOverlaySplitViewState as Ce,splitViewColumns as we}from"./widgets/split-view-state.js";import{AdwSplitViewBase as Te,NOTIFY_SHOW_SIDEBAR as Ee}from"./widgets/split-view-base.js";import{NOTIFY_VISIBLE_PAGE as De}from"./widgets/navigation-stack.js";import{CLOSED as Oe}from"./widgets/adw-preferences-dialog.js";import{SHORTCUT_LABEL_CAP_TEXT_CLASS as ke,SHORTCUT_LABEL_CLASS as Ae,SHORTCUT_LABEL_DIMMED_CLASS as je,SHORTCUT_LABEL_DISABLED_CLASS as Me,SHORTCUT_LABEL_KEYCAP_CLASS as Ne,SHORTCUT_LABEL_KEYS_CLASS as Pe,SHORTCUT_LABEL_SIDE_CLASS as Fe,SHORTCUT_LABEL_SPACED_CLASS as Ie,shortcutLabelDirection as Le,shortcutLabelPlatform as Re,shortcutLabelRenderPlan as ze}from"./widgets/shortcut-label.js";import{NOTIFY_SELECTED as Q}from"./widgets/adw-sidebar.js";import{NOTIFY_VALUE as Be,SpinState as Ve}from"./widgets/adw-spin-row.js";import{MENU_TAPPED as He}from"./widgets/adw-split-button.js";import{NOTIFY_ACTIVE as Ue}from"./widgets/adw-switch-row.js";import{AdwToast as We,AdwToastQueue as Ge,DEFAULT_TOAST_TIMEOUT as Ke}from"./widgets/adw-toast-overlay.js";import{NOTIFY_SELECTED as qe,ToggleGroupState as Je}from"./widgets/adw-toggle-group.js";import{ADWAITA_NS_ACCENT_RULES as Ye,adwaitaNsAccentColor as Xe,adwaitaNsAccentCss as Ze}from"./widgets/accent-theme.js";import{applyAdwaitaNsAccent as Qe,clearAdwaitaNsAccent as $e}from"./widgets/adw-accent.js";import{adw_exports as et}from"./namespace/adw.js";import{DEFAULT_BOX_SPACING as tt,boxChildTrack as nt,boxSpacingChanges as rt,boxTrackPlan as it,normalizeBoxSpacing as at}from"./widgets/box-layout.js";import{buttonSlotAfterWrite as ot,buttonSlotDetaches as st}from"./widgets/button-slot.js";import{GTK_BUTTON_CLICKED as ct,GTK_BUTTON_LABEL_CLASS as lt}from"./widgets/gtk-button.js";import{NOTIFY_SELECTED as ut}from"./widgets/gtk-drop-down.js";import{GTK_CHECK_BUTTON_ACTIVATE as dt,GTK_CHECK_BUTTON_CHECKED_CLASS as ft,GTK_CHECK_BUTTON_INCONSISTENT_CLASS as pt,GTK_CHECK_BUTTON_TOGGLED as mt,NOTIFY_CHECK_ACTIVE as ht}from"./widgets/gtk-check-button.js";import{DRAWING_AREA_REFUSAL as gt}from"./widgets/gtk-drawing-area.js";import{ACTIVATE as _t,NOTIFY_TEXT as vt}from"./widgets/gtk-entry.js";import{LIST_BOX_ROW_ACTIVATED as yt,LIST_BOX_ROW_SELECTED as bt}from"./widgets/gtk-list-box.js";import{MENU_ITEM_ACTIVATED as xt}from"./widgets/gtk-menu-button.js";import{NOTIFY_REVEAL_CHILD as St}from"./widgets/gtk-revealer.js";import{NOTIFY_STACK_VISIBLE_CHILD as Ct,NOTIFY_STACK_VISIBLE_CHILD_NAME as wt}from"./widgets/gtk-stack.js";import{GTK_WRAP_MODES as Tt,NOTIFY_TEXT_VIEW_TEXT as Et}from"./widgets/gtk-text-view.js";import{GTK_TOGGLE_BUTTON_CHECKED_CLASS as Dt,GTK_TOGGLE_BUTTON_TOGGLED as Ot,NOTIFY_TOGGLE_ACTIVE as kt}from"./widgets/gtk-toggle-button.js";import{gtk_exports as At}from"./namespace/gtk.js";import{ADWAITA_SANS_FONT_FAMILY as jt,ADWAITA_SANS_TTF_FILES as Mt,adwaitaFontInstallInstructions as Nt,hasAdwaitaSans as Pt}from"./fonts.js";import{AdwSliderRow as Ft,NOTIFY_SLIDER_VALUE as It}from"./widgets/adw-slider-row.js";import{DATA_GRID_HEADER_CELL_CLASS as Lt,DATA_GRID_HEADER_ROW_CLASS as Rt,DATA_GRID_SECTION_CELL_CLASS as zt,dataGridCellClass as Bt,dataGridItemSpec as Vt,dataGridRowClass as Ht,dataGridShapeKey as Ut,dataGridTracksKey as Wt,parseDataGridWidth as Gt}from"./widgets/data-grid-model.js";import{AdwDataGrid as Kt,ROW_ACTIVATED as qt}from"./widgets/adw-data-grid.js";import{padForSystemInsets as Jt,padSheetForSystemInsets as Yt}from"./widgets/system-insets.js";import{labelDisplayText as Xt,labelMarkupIsUnparseable as Zt,registerAdwaitaElements as $}from"./widgets/index.js";import{gio_exports as Qt}from"./namespace/gio.js";import{gdk_exports as $t}from"./namespace/gdk.js";import{graphene_exports as en}from"./namespace/graphene.js";import{glib_exports as tn}from"./namespace/glib.js";import{assertNativeScript as nn,assertNativeScript as rn,isAndroid as an,isIOS as on,isNativeScript as sn}from"@gjsify/native-platform";function registerAdwaita(){rn(),$()}export{I as ABOUT_CLOSED,L as ACTIVATED,w as ADWAITA_ICON_GRID,Ye as ADWAITA_NS_ACCENT_RULES,jt as ADWAITA_SANS_FONT_FAMILY,Mt as ADWAITA_SANS_TTF_FILES,re as ADW_DIALOG_CLOSED,ie as ADW_DIALOG_CLOSE_ATTEMPT,U as AVATAR_DEFAULT_ICON,et as Adw,R as AdwAlertResponses,ee as AdwBreakpoint,Kt as AdwDataGrid,ae as AdwImageButton,Ft as AdwSliderRow,Te as AdwSplitViewBase,We as AdwToast,Ge as AdwToastQueue,be as AdwViewSwitcherBase,q as BUTTON_CLICKED,X as ComboState,Lt as DATA_GRID_HEADER_CELL_CLASS,Rt as DATA_GRID_HEADER_ROW_CLASS,zt as DATA_GRID_SECTION_CELL_CLASS,W as DEFAULT_AVATAR_SIZE,tt as DEFAULT_BOX_SPACING,J as DEFAULT_CAROUSEL_PAGE_WIDTH,G as DEFAULT_CLAMP_MAX_SIZE,F as DEFAULT_GTK_IMAGE_SIZE,oe as DEFAULT_ICON_BUTTON_ICON_SIZE,T as DEFAULT_ICON_COLOR,E as DEFAULT_ICON_COLOR_DARK,a as DEFAULT_ICON_PIXEL_SIZE,K as DEFAULT_SPINNER_SIZE,Ke as DEFAULT_TOAST_TIMEOUT,gt as DRAWING_AREA_REFUSAL,r as ENGINE_TARGET,_t as ENTRY_ACTIVATE,tn as GLib,i as GTK_ALIGN,ct as GTK_BUTTON_CLICKED,lt as GTK_BUTTON_LABEL_CLASS,dt as GTK_CHECK_BUTTON_ACTIVATE,ft as GTK_CHECK_BUTTON_CHECKED_CLASS,pt as GTK_CHECK_BUTTON_INCONSISTENT_CLASS,mt as GTK_CHECK_BUTTON_TOGGLED,o as GTK_ICON_SIZE_NICKS,s as GTK_ICON_SIZE_PIXELS,Dt as GTK_TOGGLE_BUTTON_CHECKED_CLASS,Ot as GTK_TOGGLE_BUTTON_TOGGLED,Tt as GTK_WRAP_MODES,$t as Gdk,Qt as Gio,en as Graphene,At as Gtk,k as ICON_FALLBACK_NAME,yt as LIST_BOX_ROW_ACTIVATED,bt as LIST_BOX_ROW_SELECTED,xt as MENU_ITEM_ACTIVATED,He as MENU_TAPPED,se as NOTIFY_ACTIVATES_DEFAULT,Ue as NOTIFY_ACTIVE,ht as NOTIFY_CHECK_ACTIVE,ut as NOTIFY_DROP_DOWN_SELECTED,ce as NOTIFY_EDITABLE,he as NOTIFY_ENABLE_EXPANSION,vt as NOTIFY_ENTRY_TEXT,ge as NOTIFY_EXPANDED,h as NOTIFY_HEXPAND,le as NOTIFY_MAX_LENGTH,z as NOTIFY_OPEN,Y as NOTIFY_POSITION,St as NOTIFY_REVEAL_CHILD,Z as NOTIFY_SELECTED,ue as NOTIFY_SHOW_APPLY_BUTTON,_e as NOTIFY_SHOW_ENABLE_SWITCH,Ee as NOTIFY_SHOW_SIDEBAR,Q as NOTIFY_SIDEBAR_SELECTED,It as NOTIFY_SLIDER_VALUE,Ct as NOTIFY_STACK_VISIBLE_CHILD,wt as NOTIFY_STACK_VISIBLE_CHILD_NAME,de as NOTIFY_TEXT,fe as NOTIFY_TEXT_LENGTH,Et as NOTIFY_TEXT_VIEW_TEXT,kt as NOTIFY_TOGGLE_ACTIVE,qe as NOTIFY_TOGGLE_SELECTED,Be as NOTIFY_VALUE,g as NOTIFY_VEXPAND,xe as NOTIFY_VIEW_SELECTED,ye as NOTIFY_VISIBLE_CHILD,De as NOTIFY_VISIBLE_PAGE,ve as NS_EXPANDER_ARROW_DISABLED_OPACITY,Se as NsNavigationSplitViewState,Ce as NsOverlaySplitViewState,c as PIXEL_SIZE_UNSET,Oe as PREFERENCES_CLOSED,qt as ROW_ACTIVATED,ke as SHORTCUT_LABEL_CAP_TEXT_CLASS,Ae as SHORTCUT_LABEL_CLASS,je as SHORTCUT_LABEL_DIMMED_CLASS,Me as SHORTCUT_LABEL_DISABLED_CLASS,Ne as SHORTCUT_LABEL_KEYCAP_CLASS,Pe as SHORTCUT_LABEL_KEYS_CLASS,Fe as SHORTCUT_LABEL_SIDE_CLASS,Ie as SHORTCUT_LABEL_SPACED_CLASS,pe as SIGNAL_APPLY,me as SIGNAL_ENTRY_ACTIVATED,Ve as SpinState,Je as ToggleGroupState,f as activateWidgetAction,te as addBreakpoints,v as adwaitaColorScheme,Nt as adwaitaFontInstallInstructions,Xe as adwaitaNsAccentColor,Ze as adwaitaNsAccentCss,Qe as applyAdwaitaNsAccent,u as applyConstructProps,nn as assertNativeScript,B as attachRowPressFeedback,H as avatarInitials,V as bottomSheetPanel,nt as boxChildTrack,rt as boxSpacingChanges,it as boxTrackPlan,ot as buttonSlotAfterWrite,st as buttonSlotDetaches,$e as clearAdwaitaNsAccent,A as compiledIconNames,Bt as dataGridCellClass,Vt as dataGridItemSpec,Ht as dataGridRowClass,Ut as dataGridShapeKey,Wt as dataGridTracksKey,ne as evaluateBreakpointCondition,D as extractIconPaths,O as extractPathData,p as findActionGroup,Pt as hasAdwaitaSans,j as iconValueKind,m as insertActionGroup,an as isAndroid,l as isGtkIconSizeNick,on as isIOS,M as isIconAvailable,sn as isNativeScript,y as isThemeIconColor,Xt as labelDisplayText,Zt as labelMarkupIsUnparseable,at as normalizeBoxSpacing,d as nsAlignment,e as observeViewSize,t as observeWindowSize,b as onAdwaitaColorSchemeChanged,Jt as padForSystemInsets,Yt as padSheetForSystemInsets,n as parseBreakpointCondition,Gt as parseDataGridWidth,registerAdwaita,$ as registerAdwaitaElements,P as renderSymbolicIcon,N as resolveIconSource,x as setAdwaitaColorScheme,Le as shortcutLabelDirection,Re as shortcutLabelPlatform,ze as shortcutLabelRenderPlan,we as splitViewColumns,S as themeIconColor,C as toggleAdwaitaColorScheme,_ as withGtkWidgetLayout};
|
package/lib/esm/namespace/adw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__exportAll as ee}from"../_virtual/_rolldown/runtime.js";import{AdwAboutDialog as e}from"../widgets/adw-about-dialog.js";import{AdwActionRow as t}from"../widgets/adw-action-row.js";import{AdwAlertDialog as n}from"../widgets/adw-alert-dialog.js";import{
|
|
1
|
+
import{__exportAll as ee}from"../_virtual/_rolldown/runtime.js";import{AdwAboutDialog as e}from"../widgets/adw-about-dialog.js";import{AdwActionRow as t}from"../widgets/adw-action-row.js";import{AdwAlertDialog as n}from"../widgets/adw-alert-dialog.js";import{AdwBottomSheet as r}from"../widgets/adw-bottom-sheet.js";import{AdwApplication as i}from"../widgets/application.js";import{AdwApplicationWindow as a}from"../widgets/adw-application-window.js";import{AdwAvatar as o}from"../widgets/adw-avatar.js";import{AdwBanner as s}from"../widgets/adw-banner.js";import{AdwBin as c}from"../widgets/adw-bin.js";import{AdwButtonContent as l}from"../widgets/adw-button-content.js";import{AdwButtonRow as u}from"../widgets/adw-button-row.js";import{AdwCarousel as d}from"../widgets/adw-carousel.js";import{AdwCarouselIndicatorDots as f}from"../widgets/adw-carousel-indicator-dots.js";import{AdwCarouselIndicatorLines as p}from"../widgets/adw-carousel-indicator-lines.js";import{AdwClamp as m}from"../widgets/adw-clamp.js";import{AdwComboRow as h}from"../widgets/adw-combo-row.js";import{AdwDialog as g}from"../widgets/adw-dialog.js";import{AdwEntryRow as _}from"../widgets/adw-entry-row.js";import{AdwExpanderRow as v}from"../widgets/adw-expander-row.js";import{AdwWindowTitle as y}from"../widgets/adw-window-title.js";import{AdwHeaderBar as b}from"../widgets/adw-header-bar.js";import{AdwViewStackPage as x}from"../widgets/view-stack-page.js";import{AdwViewStack as S}from"../widgets/adw-view-stack.js";import{AdwInlineViewSwitcher as C}from"../widgets/adw-inline-view-switcher.js";import{AdwNavigationSplitView as w}from"../widgets/adw-navigation-split-view.js";import{AdwNavigationPage as T}from"../widgets/adw-navigation-page.js";import{AdwNavigationView as E}from"../widgets/adw-navigation-view.js";import{AdwOverlaySplitView as D}from"../widgets/adw-overlay-split-view.js";import{AdwPasswordEntryRow as te}from"../widgets/adw-password-entry-row.js";import{AdwPreferencesDialog as O}from"../widgets/adw-preferences-dialog.js";import{AdwPreferencesGroup as k}from"../widgets/adw-preferences-group.js";import{AdwPreferencesPage as A}from"../widgets/adw-preferences-page.js";import{AdwShortcutLabel as j}from"../widgets/adw-shortcut-label.js";import{AdwSidebarItem as M,AdwSidebarSection as N}from"../values/sidebar.js";import{AdwSidebar as P}from"../widgets/adw-sidebar.js";import{AdwSpinRow as F}from"../widgets/adw-spin-row.js";import{AdwSpinner as I}from"../widgets/adw-spinner.js";import{AdwSplitButton as L}from"../widgets/adw-split-button.js";import{AdwStatusPage as R}from"../widgets/adw-status-page.js";import{AdwSwitchRow as z}from"../widgets/adw-switch-row.js";import{AdwTabPage as B}from"../values/tab-page.js";import{AdwTabView as V}from"../widgets/adw-tab-view.js";import{AdwToastOverlay as H}from"../widgets/adw-toast-overlay.js";import{AdwToggle as U}from"../widgets/adw-toggle.js";import{AdwToggleGroup as W}from"../widgets/adw-toggle-group.js";import{AdwToolbarView as G}from"../widgets/adw-toolbar-view.js";import{AdwViewSwitcher as K}from"../widgets/adw-view-switcher.js";import{AdwViewSwitcherBar as q}from"../widgets/adw-view-switcher-bar.js";import{AdwWindow as J}from"../widgets/adw-window.js";import{AdwWrapBox as Y}from"../widgets/adw-wrap-box.js";import{AdwStyleManager as X}from"../widgets/style-manager.js";import"../widgets/style-manager-host.js";import{AccentColor as Z,ColorScheme as Q,Toast as $,ToastPriority as ne}from"@gjsify/adwaita-core";var re=ee({AboutDialog:()=>e,AccentColor:()=>Z,ActionRow:()=>t,AlertDialog:()=>n,Application:()=>i,ApplicationWindow:()=>a,Avatar:()=>o,Banner:()=>s,Bin:()=>c,BottomSheet:()=>r,ButtonContent:()=>l,ButtonRow:()=>u,Carousel:()=>d,CarouselIndicatorDots:()=>f,CarouselIndicatorLines:()=>p,Clamp:()=>m,ColorScheme:()=>Q,ComboRow:()=>h,Dialog:()=>g,EntryRow:()=>_,ExpanderRow:()=>v,HeaderBar:()=>b,InlineViewSwitcher:()=>C,NavigationPage:()=>T,NavigationSplitView:()=>w,NavigationView:()=>E,OverlaySplitView:()=>D,PasswordEntryRow:()=>te,PreferencesDialog:()=>O,PreferencesGroup:()=>k,PreferencesPage:()=>A,ShortcutLabel:()=>j,Sidebar:()=>P,SidebarItem:()=>M,SidebarSection:()=>N,SpinRow:()=>F,Spinner:()=>I,SplitButton:()=>L,StatusPage:()=>R,StyleManager:()=>X,SwitchRow:()=>z,TabPage:()=>B,TabView:()=>V,Toast:()=>$,ToastOverlay:()=>H,ToastPriority:()=>ne,Toggle:()=>U,ToggleGroup:()=>W,ToolbarView:()=>G,ViewStack:()=>S,ViewStackPage:()=>x,ViewSwitcher:()=>K,ViewSwitcherBar:()=>q,Window:()=>J,WindowTitle:()=>y,WrapBox:()=>Y});export{e as AboutDialog,Z as AccentColor,t as ActionRow,n as AlertDialog,i as Application,a as ApplicationWindow,o as Avatar,s as Banner,c as Bin,r as BottomSheet,l as ButtonContent,u as ButtonRow,d as Carousel,f as CarouselIndicatorDots,p as CarouselIndicatorLines,m as Clamp,Q as ColorScheme,h as ComboRow,g as Dialog,_ as EntryRow,v as ExpanderRow,b as HeaderBar,C as InlineViewSwitcher,T as NavigationPage,w as NavigationSplitView,E as NavigationView,D as OverlaySplitView,te as PasswordEntryRow,O as PreferencesDialog,k as PreferencesGroup,A as PreferencesPage,j as ShortcutLabel,P as Sidebar,M as SidebarItem,N as SidebarSection,F as SpinRow,I as Spinner,L as SplitButton,R as StatusPage,X as StyleManager,z as SwitchRow,B as TabPage,V as TabView,$ as Toast,H as ToastOverlay,ne as ToastPriority,U as Toggle,W as ToggleGroup,G as ToolbarView,S as ViewStack,x as ViewStackPage,K as ViewSwitcher,q as ViewSwitcherBar,J as Window,y as WindowTitle,Y as WrapBox,re as adw_exports};
|
package/lib/esm/namespace/gdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{nativeClipboardHost as t}from"../clipboard-host.js";import{CURRENT_TIME as n,GDK_KEYS as r,createGdk as
|
|
1
|
+
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{nativeClipboardHost as t}from"../clipboard-host.js";import{CURRENT_TIME as n,GDK_KEYS as r,RGBA as i,createGdk as a}from"@gjsify/adwaita-core";var o=e({AppLaunchContext:()=>f,CURRENT_TIME:()=>p,Clipboard:()=>l,ContentFormats:()=>d,ContentProvider:()=>u,Display:()=>c,KEY_Down:()=>E,KEY_Escape:()=>S,KEY_Left:()=>C,KEY_Return:()=>x,KEY_Right:()=>T,KEY_Up:()=>w,KEY_a:()=>h,KEY_d:()=>g,KEY_e:()=>_,KEY_q:()=>v,KEY_s:()=>y,KEY_space:()=>m,KEY_w:()=>b,RGBA:()=>i,gdk:()=>s});const s=a(t),c=s.Display,l=s.Clipboard,u=s.ContentProvider,d=s.ContentFormats,f=s.AppLaunchContext,p=n,{KEY_space:m,KEY_a:h,KEY_d:g,KEY_e:_,KEY_q:v,KEY_s:y,KEY_w:b,KEY_Return:x,KEY_Escape:S,KEY_Left:C,KEY_Up:w,KEY_Right:T,KEY_Down:E}=r;export{f as AppLaunchContext,p as CURRENT_TIME,l as Clipboard,d as ContentFormats,u as ContentProvider,c as Display,E as KEY_Down,S as KEY_Escape,C as KEY_Left,x as KEY_Return,T as KEY_Right,w as KEY_Up,h as KEY_a,g as KEY_d,_ as KEY_e,v as KEY_q,y as KEY_s,m as KEY_space,b as KEY_w,i as RGBA,s as gdk,o as gdk_exports};
|
package/lib/esm/namespace/gio.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{SimpleAction as t,SimpleActionGroup as n}from"../widgets/actions.js";import{nativePlatformHost as r}from"../platform-host.js";import{GioApplication as i}from"../widgets/application.js";import"../file-chooser-host.js";import{ApplicationFlags as a,FileCreateFlags as o,GioFile as s,GioFileOutputStream as c,GioListStore as l,GioMenu as u,GioMenuItem as d,GioOutputStream as f,GioResource as p,IOErrorEnum as m,
|
|
1
|
+
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{SimpleAction as t,SimpleActionGroup as n}from"../widgets/actions.js";import{nativePlatformHost as r}from"../platform-host.js";import{GioApplication as i}from"../widgets/application.js";import"../file-chooser-host.js";import{ApplicationFlags as a,FileCreateFlags as o,GioFile as s,GioFileOutputStream as c,GioListStore as l,GioMenu as u,GioMenuItem as d,GioOutputStream as f,GioResource as p,IOErrorEnum as m,ListModel as h,ResourceError as g,ResourceLookupFlags as _,createAppInfo as v,promisify as y,resources_enumerate_children as b,resources_get_info as x,resources_lookup_data as S,resources_register as C,resources_unregister as w}from"@gjsify/adwaita-core";import{Settings as T}from"@gjsify/app-settings/nativescript";var E=e({AppInfo:()=>D,Application:()=>i,ApplicationFlags:()=>a,File:()=>s,FileCreateFlags:()=>o,FileOutputStream:()=>c,IOErrorEnum:()=>m,ListModel:()=>h,ListStore:()=>l,Menu:()=>u,MenuItem:()=>d,OutputStream:()=>f,Resource:()=>p,ResourceError:()=>g,ResourceLookupFlags:()=>_,Settings:()=>T,SimpleAction:()=>t,SimpleActionGroup:()=>n,_promisify:()=>y,resources_enumerate_children:()=>b,resources_get_info:()=>x,resources_lookup_data:()=>S,resources_register:()=>C,resources_unregister:()=>w});const D=v(r);export{D as AppInfo,i as Application,a as ApplicationFlags,s as File,o as FileCreateFlags,c as FileOutputStream,m as IOErrorEnum,h as ListModel,l as ListStore,u as Menu,d as MenuItem,f as OutputStream,p as Resource,g as ResourceError,_ as ResourceLookupFlags,T as Settings,t as SimpleAction,n as SimpleActionGroup,y as _promisify,E as gio_exports,b as resources_enumerate_children,x as resources_get_info,S as resources_lookup_data,C as resources_register,w as resources_unregister};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{Point as t}from"@gjsify/adwaita-core";var n=e({Point:()=>t});export{t as Point,n as graphene_exports};
|
package/lib/esm/namespace/gtk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{CssProvider as t,EventControllerKey as n,IconTheme as r,Settings as i,StyleContext as a,show_uri as o}from"./gtk-platform.js";import{GtkImage as s}from"../widgets/gtk-image.js";import{GtkApplication as c}from"../widgets/application.js";import{GtkWindow as l}from"../widgets/gtk-window.js";import{ArrowType as u,License as d,PolicyType as f,TextDirection as p,TextExtendSelection as m,TextWindowType as h}from"../widgets/gtk-enums.js";import{GtkActionBar as g}from"../widgets/gtk-action-bar.js";import{GtkBox as _}from"../widgets/gtk-box.js";import{GtkButton as v}from"../widgets/gtk-button.js";import{GtkDropDown as y}from"../widgets/gtk-drop-down.js";import{GtkCheckButton as b}from"../widgets/gtk-check-button.js";import{GtkDrawingArea as x}from"../widgets/gtk-drawing-area.js";import{GtkEntry as S}from"../widgets/gtk-entry.js";import{GtkGrid as C}from"../widgets/gtk-grid.js";import{GtkFrame as w}from"../widgets/gtk-frame.js";import{GtkLabel as T}from"../widgets/gtk-label.js";import{GtkListBox as E}from"../widgets/gtk-list-box.js";import{GtkMenuButton as D}from"../widgets/gtk-menu-button.js";import{GtkPopoverMenu as O}from"../widgets/gtk-popover-menu.js";import{GtkOverlay as k}from"../widgets/gtk-overlay.js";import{GtkRevealer as A}from"../widgets/gtk-revealer.js";import{GtkScrolledWindow as j}from"../widgets/gtk-scrolled-window.js";import{
|
|
1
|
+
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{CssProvider as t,EventControllerKey as n,IconTheme as r,Settings as i,StyleContext as a,show_uri as o}from"./gtk-platform.js";import{GtkImage as s}from"../widgets/gtk-image.js";import{GtkApplication as c}from"../widgets/application.js";import{GtkWindow as l}from"../widgets/gtk-window.js";import{ArrowType as u,License as d,PolicyType as f,TextDirection as p,TextExtendSelection as m,TextWindowType as h}from"../widgets/gtk-enums.js";import{GtkActionBar as g}from"../widgets/gtk-action-bar.js";import{GtkBox as _}from"../widgets/gtk-box.js";import{GtkButton as v}from"../widgets/gtk-button.js";import{GtkDropDown as y}from"../widgets/gtk-drop-down.js";import{GtkCheckButton as b}from"../widgets/gtk-check-button.js";import{GtkDrawingArea as x}from"../widgets/gtk-drawing-area.js";import{GtkEntry as S}from"../widgets/gtk-entry.js";import{GtkGrid as C}from"../widgets/gtk-grid.js";import{GtkFrame as w}from"../widgets/gtk-frame.js";import{GtkLabel as T}from"../widgets/gtk-label.js";import{GtkListBox as E}from"../widgets/gtk-list-box.js";import{GtkMenuButton as D}from"../widgets/gtk-menu-button.js";import{GtkPopoverMenu as O}from"../widgets/gtk-popover-menu.js";import{GtkOverlay as k}from"../widgets/gtk-overlay.js";import{GtkRevealer as A}from"../widgets/gtk-revealer.js";import{GtkScrolledWindow as j}from"../widgets/gtk-scrolled-window.js";import{GtkApplicationWindow as M}from"../widgets/gtk-application-window.js";import{GtkSeparator as N}from"../widgets/gtk-separator.js";import{GtkStackPage as P}from"../widgets/stack-page.js";import{GtkStack as F}from"../widgets/gtk-stack.js";import{GtkTextView as I}from"../widgets/gtk-text-view.js";import{GtkToggleButton as L}from"../widgets/gtk-toggle-button.js";import{ApplicationInhibitFlags as R,DialogError as z,GtkAdjustment as B,GtkFileDialog as V,GtkFileFilter as H,GtkStringList as U,GtkStringObject as W,STYLE_PROVIDER_PRIORITY_APPLICATION as G,STYLE_PROVIDER_PRIORITY_FALLBACK as K,STYLE_PROVIDER_PRIORITY_SETTINGS as q,STYLE_PROVIDER_PRIORITY_THEME as J,STYLE_PROVIDER_PRIORITY_USER as Y}from"@gjsify/adwaita-core";var X=e({ActionBar:()=>g,Adjustment:()=>B,Application:()=>c,ApplicationInhibitFlags:()=>R,ApplicationWindow:()=>M,ArrowType:()=>u,Box:()=>_,Button:()=>v,CheckButton:()=>b,CssProvider:()=>t,DialogError:()=>z,DrawingArea:()=>x,DropDown:()=>y,Entry:()=>S,EventControllerKey:()=>n,FileDialog:()=>V,FileFilter:()=>H,Frame:()=>w,Grid:()=>C,IconTheme:()=>r,Image:()=>s,Label:()=>T,License:()=>d,ListBox:()=>E,MenuButton:()=>D,Overlay:()=>k,PolicyType:()=>f,PopoverMenu:()=>O,Revealer:()=>A,STYLE_PROVIDER_PRIORITY_APPLICATION:()=>G,STYLE_PROVIDER_PRIORITY_FALLBACK:()=>K,STYLE_PROVIDER_PRIORITY_SETTINGS:()=>q,STYLE_PROVIDER_PRIORITY_THEME:()=>J,STYLE_PROVIDER_PRIORITY_USER:()=>Y,ScrolledWindow:()=>j,Separator:()=>N,Settings:()=>i,Stack:()=>F,StackPage:()=>P,StringList:()=>U,StringObject:()=>W,StyleContext:()=>a,TextDirection:()=>p,TextExtendSelection:()=>m,TextView:()=>I,TextWindowType:()=>h,ToggleButton:()=>L,Window:()=>l,show_uri:()=>o});export{g as ActionBar,B as Adjustment,c as Application,R as ApplicationInhibitFlags,M as ApplicationWindow,u as ArrowType,_ as Box,v as Button,b as CheckButton,t as CssProvider,z as DialogError,x as DrawingArea,y as DropDown,S as Entry,n as EventControllerKey,V as FileDialog,H as FileFilter,w as Frame,C as Grid,r as IconTheme,s as Image,T as Label,d as License,E as ListBox,D as MenuButton,k as Overlay,f as PolicyType,O as PopoverMenu,A as Revealer,G as STYLE_PROVIDER_PRIORITY_APPLICATION,K as STYLE_PROVIDER_PRIORITY_FALLBACK,q as STYLE_PROVIDER_PRIORITY_SETTINGS,J as STYLE_PROVIDER_PRIORITY_THEME,Y as STYLE_PROVIDER_PRIORITY_USER,j as ScrolledWindow,N as Separator,i as Settings,F as Stack,P as StackPage,U as StringList,W as StringObject,a as StyleContext,p as TextDirection,m as TextExtendSelection,I as TextView,h as TextWindowType,L as ToggleButton,l as Window,X as gtk_exports,o as show_uri};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{AdwAlertResponses as n,AdwAlertResponses as r}from"@gjsify/adwaita-core";import{Observable as i,action as a,confirm as o}from"@nativescript/core";var AdwAlertDialog=class extends t(i){static GTypeName=`AdwAlertDialog`;_responses;constructor(t=``,n=``,i){super();let a=typeof t==`string`;this._responses=new r(a?t:``,n),a||(i=t),e(this,i)}get heading(){return this._responses.heading}set heading(e){this._responses.heading=e}get body(){return this._responses.body}set body(e){this._responses.body=e}connect(e,t){return e===`response`?super.connect(e,(e,n)=>t(e,n.args?.[0])):super.connect(e,t)}add_response(e,t,n){this._responses.addResponse(e,t,n)}addResponses(...e){this._responses.addResponses(...e)}has_response(e){return this._responses.hasResponse(e)}get_response_label(e){return this._responses.responses.find(t=>t.id===e)?.label??null}set_response_label(e,t){if(!this._responses.hasResponse(e)){console.warn(`[AdwAlertDialog] Trying to set label on a response with id '${e}', but such a response does not exist`);return}this._responses.addResponse(e,t)}set_response_appearance(e,t){this._responses.setResponseAppearance(e,t)}get_response_appearance(e){return this._responses.getResponseAppearance(e)}set_response_enabled(e,t){this._responses.setResponseEnabled(e,t)}get_response_enabled(e){return this._responses.getResponseEnabled(e)}get defaultResponse(){return this._responses.defaultResponse}set defaultResponse(e){this._responses.defaultResponse=e}get_default_response(){return this._responses.defaultResponse}set_default_response(e){this._responses.defaultResponse=e}get closeResponse(){return this._responses.closeResponse}set closeResponse(e){this._responses.closeResponse=e}get_close_response(){return this._responses.closeResponse}set_close_response(e){this._responses.closeResponse=e}get responses(){return this._responses.responses}present(e){(this._responses.usesActionSheet?this._presentAction():this._presentConfirm()).then(e=>this.
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{AdwAlertResponses as n,AdwAlertResponses as r}from"@gjsify/adwaita-core";import{Observable as i,action as a,confirm as o}from"@nativescript/core";var AdwAlertDialog=class extends t(i){static GTypeName=`AdwAlertDialog`;_responses;constructor(t=``,n=``,i){super();let a=typeof t==`string`;this._responses=new r(a?t:``,n),a||(i=t),e(this,i)}get heading(){return this._responses.heading}set heading(e){this._responses.heading=e}get body(){return this._responses.body}set body(e){this._responses.body=e}connect(e,t){return e===`response`?super.connect(e,(e,n)=>t(e,n.args?.[0])):super.connect(e,t)}add_response(e,t,n){this._responses.addResponse(e,t,n)}addResponses(...e){this._responses.addResponses(...e)}has_response(e){return this._responses.hasResponse(e)}get_response_label(e){return this._responses.responses.find(t=>t.id===e)?.label??null}set_response_label(e,t){if(!this._responses.hasResponse(e)){console.warn(`[AdwAlertDialog] Trying to set label on a response with id '${e}', but such a response does not exist`);return}this._responses.addResponse(e,t)}set_response_appearance(e,t){this._responses.setResponseAppearance(e,t)}get_response_appearance(e){return this._responses.getResponseAppearance(e)}set_response_enabled(e,t){this._responses.setResponseEnabled(e,t)}get_response_enabled(e){return this._responses.getResponseEnabled(e)}get defaultResponse(){return this._responses.defaultResponse}set defaultResponse(e){this._responses.defaultResponse=e}get_default_response(){return this._responses.defaultResponse}set_default_response(e){this._responses.defaultResponse=e}get closeResponse(){return this._responses.closeResponse}set closeResponse(e){this._responses.closeResponse=e}get_close_response(){return this._responses.closeResponse}set_close_response(e){this._responses.closeResponse=e}get responses(){return this._responses.responses}present(e){(this._responses.usesActionSheet?this._presentAction():this._presentConfirm()).then(e=>this.notify({eventName:`response`,object:this,args:[e]}),e=>console.error(`[AdwAlertDialog] the native dialog failed:`,e))}async _presentConfirm(){let e=this._responses.orderResponses(),t=await o({title:this._responses.heading||void 0,message:this._responses.body||void 0,okButtonText:e.ok?.label,cancelButtonText:e.cancel?.label,neutralButtonText:e.neutral?.label,cancelable:!0});return t===!0?this._responses.resolveById(e.ok?.id):t===!1?this._responses.resolveById(e.cancel?.id):t===void 0?this._responses.resolveById(e.neutral?.id):this._responses.closeResponse}async _presentAction(){let e=await a({title:this._responses.heading||void 0,message:this._responses.body||void 0,cancelButtonText:`Cancel`,actions:this._responses.responses.map(e=>e.label)});return this._responses.resolveLabel(e)}};export{AdwAlertDialog,n as AdwAlertResponses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{GtkImage as n}from"./gtk-image.js";import{buttonContentClassName as r,buttonContentEllipsize as i,buttonContentIcon as a,buttonContentIconIsFallback as o,buttonContentLabelText as s,buttonContentLabelVisibility as c,buttonContentRootedParentClassName as l,buttonContentUnrootedParentClassName as u}from"./button-content.js";import{Label as d,StackLayout as f}from"@nativescript/core";const p=`notify::icon-name`,m=`notify::label`,h=`notify::use-underline`,g=`notify::can-shrink`,emptyIfNull=e=>e??``;var AdwButtonContent=class extends t(f,{GTypeName:`AdwButtonContent`,Properties:{"icon-name":{kind:`string`,default:``,blurb:`The name of the displayed icon`,normalize:emptyIfNull},label:{kind:`string`,default:``,blurb:`The displayed label`,normalize:emptyIfNull},"use-underline":{kind:`boolean`,default:!1,blurb:`Whether an underline in the text marks a mnemonic`},"can-shrink":{kind:`boolean`,default:!1,blurb:`Whether the label can be shrunk`}}}){static GTypeName=`AdwButtonContent`;_icon;_label;_hostButton=null;constructor(t){super(),this.orientation=`horizontal`,this.className=`adw-button-content`,this.horizontalAlignment=`center`;let r=new n;r.className=`${r.className} adw-button-content-icon`.trim(),r.verticalAlignment=`middle`,r.iconName=a(``),this.addChild(r),this._icon=r;let i=new d;i.className=`adw-button-content-label`,i.verticalAlignment=`middle`,i.visibility=c(``),this.addChild(i),this._label=i,this.connect(p,e=>e._applyIcon()),this.connect(m,e=>e._renderLabel()),this.connect(h,e=>e._renderLabel()),this.connect(g,e=>e._applyCanShrink()),e(this,t)}get hostButton(){return this._hostButton}set hostButton(e){this._hostButton!==e&&(this._hostButton&&(this._hostButton.className=u(this._hostButton.className??``)),this._hostButton=e,e&&(e.className=l(e.className??``)))}get iconIsFallback(){return o(this.iconName)}get iconColor(){return this._icon.iconColor}set iconColor(e){this._icon.iconColor=e}get ellipsize(){return i(this.canShrink)}_applyIcon(){this._icon.iconName=a(this.iconName)}_applyCanShrink(){this.className=r(this.className,this.canShrink)}_renderLabel(){this._label.text=s(this.label,this.useUnderline),this._label.visibility=c(this.label)}};export{AdwButtonContent,g as NOTIFY_BUTTON_CONTENT_CAN_SHRINK,p as NOTIFY_BUTTON_CONTENT_ICON_NAME,m as NOTIFY_BUTTON_CONTENT_LABEL,h as NOTIFY_BUTTON_CONTENT_USE_UNDERLINE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{GtkImage as t}from"./gtk-image.js";import{ButtonRowState as n,buttonRowIconColor as r,buttonRowIconVisuals as i}from"./row-state.js";import{ACTIVATED as a,AdwActionRow as o}from"./adw-action-row.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{GtkImage as t}from"./gtk-image.js";import{ButtonRowState as n,buttonRowIconColor as r,buttonRowIconVisuals as i}from"./row-state.js";import{ACTIVATED as a,AdwActionRow as o}from"./adw-action-row.js";import{attachRowPressFeedback as s}from"./row-press.js";import{classNameWith as c,normalizeStyleClasses as l,withCssClass as u,withoutCssClass as d}from"./style-classes.js";import{adwaitaAccent as f,onAdwaitaAccentChanged as p}from"@gjsify/adwaita-core";import{StackLayout as m}from"@nativescript/core";const h=`adw-row adw-action-row adw-button-row`;var g=class AdwButtonRow extends o{static GTypeName=`AdwButtonRow`;isActionRow=!1;_contentBox;_startIcon;_endIcon;_pinnedIconColor=null;_unsubAccent=null;_buttonState=new n;_styleClasses=[];constructor(t){super(),this.className=h,this._titleLabel.className=`adw-button-row-title`,this._titleLabel.horizontalAlignment=`center`,this._textStack.removeChild(this._titleLabel);let n=new m;n.orientation=`horizontal`,n.className=`adw-button-row-content`,n.horizontalAlignment=`center`,this._startIcon=AdwButtonRow._makeIcon(`adw-button-row-start-icon`),this._endIcon=AdwButtonRow._makeIcon(`adw-button-row-end-icon`),this._applyIconColor(),this.addEventListener(`loaded`,()=>{this._applyIconColor(),this._unsubAccent??=p(()=>this._applyIconColor())}),this.addEventListener(`unloaded`,()=>{this._unsubAccent?.(),this._unsubAccent=null}),n.addChild(this._startIcon),n.addChild(this._titleLabel),n.addChild(this._endIcon),this._textStack.addChild(n),this._textStack.horizontalAlignment=`center`,this._contentBox=n,this.activatable=!0,this._applyIcons(),s(this),e(this,t)}get styleClasses(){return[...this._styleClasses]}set styleClasses(e){this._setClasses(l(e))}add_css_class(e){this._setClasses(u(this._styleClasses,e))}remove_css_class(e){this._setClasses(d(this._styleClasses,e))}has_css_class(e){return this._styleClasses.includes((e??``).trim())}get_css_classes(){return[...this._styleClasses]}set_css_classes(e){this._setClasses(l([...e].join(` `)))}_setClasses(e){this._styleClasses=e,this.className=c(h,e)}static _makeIcon(e){let n=new t;return n.className=`${n.className} ${e}`.trim(),n.verticalAlignment=`middle`,n}get startIconName(){return this._buttonState.startIconName}set startIconName(e){this._buttonState.setStartIconName(e)&&this._applyIcons()}get endIconName(){return this._buttonState.endIconName}set endIconName(e){this._buttonState.setEndIconName(e)&&this._applyIcons()}get startIconColor(){return this._startIcon.iconColor}set startIconColor(e){this._pinnedIconColor=e||null,this._applyIconColor()}_applyIconColor(){let e=r(this._pinnedIconColor,f());this._startIcon.iconColor=e,this._endIcon.iconColor=e}_applyIcons(){let e=i(this._buttonState.state);this._startIcon.iconName=e.startIcon,this._startIcon.visibility=e.startIconVisibility,this._endIcon.iconName=e.endIcon,this._endIcon.visibility=e.endIconVisibility}};export{a as ACTIVATED,g as AdwButtonRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e,resolveBuilderSlot as t}from"./builder-slots.js";import{applyConstructProps as n}from"./construct-props.js";import{xmlNumber as r}from"./xml-values.js";import{GtkImage as i}from"./gtk-image.js";import{AdwActionRow as a}from"./adw-action-row.js";import{attachRowPressFeedback as o}from"./row-press.js";import{ComboState as s,ComboState as c,normalizeComboOptions as l}from"@gjsify/adwaita-core";import{Label as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e,resolveBuilderSlot as t}from"./builder-slots.js";import{applyConstructProps as n}from"./construct-props.js";import{xmlNumber as r}from"./xml-values.js";import{GtkImage as i}from"./gtk-image.js";import{AdwActionRow as a}from"./adw-action-row.js";import{attachRowPressFeedback as o}from"./row-press.js";import{ComboState as s,ComboState as c,normalizeComboOptions as l,parseListModel as u}from"@gjsify/adwaita-core";import{Label as d,StackLayout as f,action as p}from"@nativescript/core";import{panDownSymbolic as m}from"@gjsify/adwaita-icons/ui";const h=`notify::selected`;var AdwComboRow=class extends a{static GTypeName=`AdwComboRow`;static builderSlots=e([...a.builderSlots,`model`],`suffix`);_valueLabel;_chevron;_state=new c;_pendingSelected=null;constructor(e){super(),this.className=`adw-row adw-action-row adw-combo-row`;let t=new f;t.orientation=`horizontal`,t.className=`adw-combo-suffix`;let r=new d;r.className=`adw-combo-value`,r.text=``;let a=new i;a.className=`adw-combo-chevron`,a.iconColor=`#9a9a9a`,a.pixelSize=16,a.iconName=m,t.addChild(r),t.addChild(a),this.add_suffix(t),this._valueLabel=r,this._chevron=a,this._state.subscribe(e=>{if(this._valueLabel.text=e.label,this._syncChooser(),e.interactive){let t={eventName:h,object:this,selected:e.selected,value:e.value};this.notify(t)}}),this.addEventListener(`tap`,()=>{this._openChooser()}),o(this),this._syncChooser(),n(this,e)}_syncChooser(){this._chevron.visibility=this._state.presentsChooser?`visible`:`collapse`}async _openChooser(){if(!this._state.presentsChooser)return;let e=this._state.model.map(e=>e.label),t=await p({title:this.title||void 0,cancelButtonText:`Cancel`,actions:e});this._state.select(e.indexOf(t))}get model(){return this._state.model}set model(e){if(this._state.setModel(typeof e==`string`?u(e):l(e)),this._pendingSelected!==null&&this._pendingSelected<this._state.model.length){let e=this._pendingSelected;this._pendingSelected=null,this._state.setSelectedIndex(e)}}set_model(e){this.model=e??[]}_addChildFromBuilder(e,n){if(t(e,[`model`],`edge`)===`model`){this.model=n;return}super._addChildFromBuilder(e,n)}get selected(){return this._state.selectedIndex}set selected(e){let t=r(e,this.selected);if(this._state.model.length===0){this._pendingSelected=t;return}this._state.setSelectedIndex(t)}get_selected(){return this.selected}set_selected(e){this.selected=e}get selectedValue(){return this._state.selectedValue}set selectedValue(e){this._state.setSelectedValue(e)}};export{AdwComboRow,s as ComboState,h as NOTIFY_SELECTED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e,resolveBuilderSlot as t}from"./builder-slots.js";import{applyConstructProps as n}from"./construct-props.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e,resolveBuilderSlot as t}from"./builder-slots.js";import{applyConstructProps as n}from"./construct-props.js";import{readDeclaredValue as r,withProperties as i}from"./signals.js";import{GtkImage as a}from"./gtk-image.js";import{switchClassName as o}from"./row-state.js";import{AdwActionRow as s}from"./adw-action-row.js";import{GridLayout as c,ItemSpec as l,StackLayout as u,Switch as d}from"@nativescript/core";import{panDownSymbolic as f,panUpSymbolic as p}from"@gjsify/adwaita-icons/ui";const m=`notify::expanded`,h=`notify::enable-expansion`,g=`notify::show-enable-switch`,_=.5,v=[`prefix`,`suffix`];var AdwExpanderRow=class extends i(s,{GTypeName:`AdwExpanderRow`,Properties:{expanded:{kind:`boolean`,default:!1,blurb:`Whether the row is expanded`,normalize:(e,t)=>{let n=t;return r(`expanded`,`boolean`,e)&&(n._expansionGate??n.enableExpansion)}},"enable-expansion":{kind:`boolean`,default:!0,blurb:`Whether the expansion is enabled`,normalize:(e,t)=>{let n=t,i=r(`enable-expansion`,`boolean`,e);if(i===n.enableExpansion)return i;n._expansionGate=i;try{n.expanded=i}finally{n._expansionGate=void 0}return i}},"show-enable-switch":{kind:`boolean`,default:!1,blurb:`Whether the switch enabling the expansion is visible`}}}){static GTypeName=`AdwExpanderRow`;static builderSlots=e(v,`row`);isActionRow=!1;_toggle;_enableSwitch;_suffixes;_disclosure;_expansionGate=void 0;_slotSuffix=null;constructor(e){super(),this.className=`adw-row adw-action-row adw-expander-row`,this.activatable=!1,this.addRow(new l(1,`auto`));let t=new u;t.orientation=`vertical`,t.className=`adw-expander-disclosure`,t.visibility=`collapse`,c.setRow(t,1),c.setColumn(t,0),c.setColumnSpan(t,3),this.addChild(t),this._disclosure=t;let r=new u;r.orientation=`horizontal`,r.className=`adw-expander-row-cluster`;let i=new u;i.orientation=`horizontal`,i.className=`adw-expander-row-suffixes`,i.visibility=`collapse`,r.addChild(i),this._suffixes=i;let s=new d;s.className=o(!0),s.visibility=`collapse`,r.addChild(s),this._enableSwitch=s;let p=new a;p.iconName=f,p.className=`${p.className} adw-expander-toggle`.trim(),r.addChild(p),this._toggle=p,super.add_suffix(r),s.addEventListener(`checkedChange`,()=>{this.enableExpansion=s.checked}),this.connect(m,e=>e._applyExpanded()),this.connect(h,e=>e._applyEnableExpansion()),this.connect(g,e=>e._applyShowEnableSwitch()),this._applyExpanded(),this._applyEnableExpansion(),this._applyShowEnableSwitch();let toggleOnTap=()=>{this.expanded=!this.expanded};this._textStack.addEventListener(`tap`,toggleOnTap),p.addEventListener(`tap`,toggleOnTap),n(this,e)}get_expanded(){return this.expanded}set_expanded(e){this.expanded=e}get_enable_expansion(){return this.enableExpansion}set_enable_expansion(e){this.enableExpansion=e}get_show_enable_switch(){return this.showEnableSwitch}set_show_enable_switch(e){this.showEnableSwitch=e}add_row(e){this._disclosure.addChild(e)}add_suffix(e){e.className=`${e.className??``} adw-row-suffix`.trim(),this._suffixes.insertChild(e,0),this._suffixes.visibility=`visible`,this._slotSuffix=e}remove(e){if(e===this.prefix){super.remove(e);return}if(this._suffixes.getChildIndex(e)!==-1){this._suffixes.removeChild(e),this._suffixes.getChildrenCount()===0&&(this._suffixes.visibility=`collapse`),e===this._slotSuffix&&(this._slotSuffix=this._lastSuffix());return}this._disclosure.removeChild(e)}get suffix(){return this._slotSuffix}_addChildFromBuilder(e,n){let r=t(e,v,`row`);r===`row`?this.add_row(n):super._addChildFromBuilder(r,n)}get disclosureRows(){let e=[];for(let t=0;t<this._disclosure.getChildrenCount();t++)e.push(this._disclosure.getChildAt(t));return e}_lastSuffix(){return this._suffixes.getChildrenCount()===0?null:this._suffixes.getChildAt(0)}_applyExpanded(){let e=this.expanded;this._disclosure.visibility=e?`visible`:`collapse`,this._toggle.iconName=e?p:f}_applyEnableExpansion(){let e=this.enableExpansion;this._enableSwitch.checked=e,this._enableSwitch.className=o(e),this._toggle.opacity=e?1:_,this._toggle.isUserInteractionEnabled=e}_applyShowEnableSwitch(){this._enableSwitch.visibility=this.showEnableSwitch?`visible`:`collapse`}};export{AdwExpanderRow,h as NOTIFY_ENABLE_EXPANSION,m as NOTIFY_EXPANDED,g as NOTIFY_SHOW_ENABLE_SWITCH,_ as NS_EXPANDER_ARROW_DISABLED_OPACITY};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{xmlBoolean as t}from"./xml-values.js";import{NsOverlaySplitViewState as n,splitViewColumns as r}from"./split-view-state.js";import{AdwSplitViewBase as i}from"./split-view-base.js";import{GridLayout as a}from"@nativescript/core";var AdwOverlaySplitView=class extends i{static GTypeName=`AdwOverlaySplitView`;_scrim=null;constructor(t){super(`adw-overlay-split-view`,`overlay`,new n),this._applyLayout(),e(this,t)}get pinSidebar(){return this._state.pinSidebar}set pinSidebar(e){let n=t(e,this.pinSidebar);this._state.setPinSidebar(!!n)}_applyLayout(){let e=r(this._state.sidebarPosition),t=this._state.sidebarPosition===`end`;if(!this._state.collapsed){this._detachScrim();let t=this._state.showSidebar;this._sidebar&&(this._sidebar.visibility=t?`visible`:`collapse`,this._sidebar.translateX=0,this._sidebar.opacity=1,a.setColumn(this._sidebar,e.sidebar),a.setColumnSpan(this._sidebar,1),this._sidebar.width=this.sidebarWidth,this._sidebar.className=this._paneClassName(this._sidebar.className,!1),this._sidebar.horizontalAlignment=`stretch`),this._content&&(this._content.visibility=`visible`,a.setColumn(this._content,t?e.content:0),a.setColumnSpan(this._content,t?1:2)),this._applyPaneFocus();return}this._content&&(this._content.visibility=`visible`,a.setColumn(this._content,0),a.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(a.setColumn(this._scrim,0),a.setColumnSpan(this._scrim,2),this._scrim.visibility=this._state.shieldVisible?`visible`:`collapse`,this._scrim.opacity=+!!this._state.shieldVisible),this._sidebar&&(a.setColumn(this._sidebar,0),a.setColumnSpan(this._sidebar,2),this._sidebar.width=this.sidebarWidth,this._sidebar.horizontalAlignment=t?`right`:`left`,this._sidebar.className=this._paneClassName(this._sidebar.className,!0),this._sidebar.visibility=this._state.showSidebar?`visible`:`collapse`,this._sidebar.translateX=this._state.showSidebar?0:this._hiddenOffset(),this._sidebar.opacity=1),this._applyPaneFocus()}_transitionSidebar(){if(!this._state.collapsed||!this._shouldAnimate()){this._applyLayout();return}this._cancelPending(),this._prepareCollapsedStructure(),this._applyPaneFocus(),this._state.showSidebar?this._animateOpen():this._animateClose()}_applyPaneFocus(){this._sidebar&&(this._sidebar.isUserInteractionEnabled=this._state.sidebarFocusable),this._content&&(this._content.isUserInteractionEnabled=this._state.contentFocusable)}_ensureScrim(){if(this._scrim)return this._scrim;let e=new a;return e.className=`adw-overlay-scrim`,e.visibility=`collapse`,e.opacity=0,e.addEventListener(`tap`,()=>this.hideSidebarPane()),this._scrim=e,e}_raiseOverlayChildren(){let e=this._ensureScrim();this._isChild(e)&&this.removeChild(e);let t=this._sidebar;t&&this._isChild(t)&&this.removeChild(t),this.addChild(e),t&&this.addChild(t)}_detachScrim(){this._scrim&&this._isChild(this._scrim)&&this.removeChild(this._scrim)}_prepareCollapsedStructure(){let e=this._state.sidebarPosition===`end`;this._content&&(this._content.visibility=`visible`,a.setColumn(this._content,0),a.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(a.setColumn(this._scrim,0),a.setColumnSpan(this._scrim,2)),this._sidebar&&(a.setColumn(this._sidebar,0),a.setColumnSpan(this._sidebar,2),this._sidebar.width=this.sidebarWidth,this._sidebar.horizontalAlignment=e?`right`:`left`,this._sidebar.className=this._paneClassName(this._sidebar.className,!0))}_animateOpen(){let e=this._scrim;e&&(e.visibility=`visible`,e.opacity=0,this._track(e.animate({opacity:1,duration:200,curve:`easeOut`})));let t=this._sidebar;t&&(t.visibility=`visible`,t.translateX=this._hiddenOffset(),t.opacity=1,this._track(t.animate({translate:{x:0,y:0},duration:200,curve:`easeOut`})))}_animateClose(){let e=this._scrim,t=this._sidebar,n=[];e&&n.push(this._track(e.animate({opacity:0,duration:200,curve:`easeIn`}))),t&&n.push(this._track(t.animate({translate:{x:this._hiddenOffset(),y:0},duration:200,curve:`easeIn`}))),Promise.all(n).then(()=>{this._state.showSidebar||(t&&(t.visibility=`collapse`),e&&(e.visibility=`collapse`))}).catch(()=>{})}_hiddenOffset(){let e=this.sidebarWidth;return this._state.sidebarPosition===`end`?e:-e}_paneClassName(e,t){return`${(e??``).split(/\s+/).filter(e=>e&&e!==`adw-overlay-active`&&e!==`adw-split-view-sidebar`).join(` `)} adw-split-view-sidebar${t?` adw-overlay-active`:``}`.trim()}};export{AdwOverlaySplitView};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{xmlBoolean as t}from"./xml-values.js";import{NsOverlaySplitViewState as n,splitViewColumns as r}from"./split-view-state.js";import{AdwSplitViewBase as i}from"./split-view-base.js";import{GridLayout as a}from"@nativescript/core";var AdwOverlaySplitView=class extends i{static GTypeName=`AdwOverlaySplitView`;_scrim=null;constructor(t){super(`adw-overlay-split-view`,`overlay`,new n),this._applyLayout(),e(this,t)}get show_sidebar(){return this.showSidebar}set show_sidebar(e){this.showSidebar=t(e,this.showSidebar)}get_show_sidebar(){return this.showSidebar}set_show_sidebar(e){this.showSidebar=e}get pinSidebar(){return this._state.pinSidebar}set pinSidebar(e){let n=t(e,this.pinSidebar);this._state.setPinSidebar(!!n)}_applyLayout(){let e=r(this._state.sidebarPosition),t=this._state.sidebarPosition===`end`;if(!this._state.collapsed){this._detachScrim();let t=this._state.showSidebar;this._sidebar&&(this._sidebar.visibility=t?`visible`:`collapse`,this._sidebar.translateX=0,this._sidebar.opacity=1,a.setColumn(this._sidebar,e.sidebar),a.setColumnSpan(this._sidebar,1),this._sidebar.width=this.sidebarWidth,this._sidebar.className=this._paneClassName(this._sidebar.className,!1),this._sidebar.horizontalAlignment=`stretch`),this._content&&(this._content.visibility=`visible`,a.setColumn(this._content,t?e.content:0),a.setColumnSpan(this._content,t?1:2)),this._applyPaneFocus();return}this._content&&(this._content.visibility=`visible`,a.setColumn(this._content,0),a.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(a.setColumn(this._scrim,0),a.setColumnSpan(this._scrim,2),this._scrim.visibility=this._state.shieldVisible?`visible`:`collapse`,this._scrim.opacity=+!!this._state.shieldVisible),this._sidebar&&(a.setColumn(this._sidebar,0),a.setColumnSpan(this._sidebar,2),this._sidebar.width=this.sidebarWidth,this._sidebar.horizontalAlignment=t?`right`:`left`,this._sidebar.className=this._paneClassName(this._sidebar.className,!0),this._sidebar.visibility=this._state.showSidebar?`visible`:`collapse`,this._sidebar.translateX=this._state.showSidebar?0:this._hiddenOffset(),this._sidebar.opacity=1),this._applyPaneFocus()}_transitionSidebar(){if(!this._state.collapsed||!this._shouldAnimate()){this._applyLayout();return}this._cancelPending(),this._prepareCollapsedStructure(),this._applyPaneFocus(),this._state.showSidebar?this._animateOpen():this._animateClose()}_applyPaneFocus(){this._sidebar&&(this._sidebar.isUserInteractionEnabled=this._state.sidebarFocusable),this._content&&(this._content.isUserInteractionEnabled=this._state.contentFocusable)}_ensureScrim(){if(this._scrim)return this._scrim;let e=new a;return e.className=`adw-overlay-scrim`,e.visibility=`collapse`,e.opacity=0,e.addEventListener(`tap`,()=>this.hideSidebarPane()),this._scrim=e,e}_raiseOverlayChildren(){let e=this._ensureScrim();this._isChild(e)&&this.removeChild(e);let t=this._sidebar;t&&this._isChild(t)&&this.removeChild(t),this.addChild(e),t&&this.addChild(t)}_detachScrim(){this._scrim&&this._isChild(this._scrim)&&this.removeChild(this._scrim)}_prepareCollapsedStructure(){let e=this._state.sidebarPosition===`end`;this._content&&(this._content.visibility=`visible`,a.setColumn(this._content,0),a.setColumnSpan(this._content,2)),this._raiseOverlayChildren(),this._scrim&&(a.setColumn(this._scrim,0),a.setColumnSpan(this._scrim,2)),this._sidebar&&(a.setColumn(this._sidebar,0),a.setColumnSpan(this._sidebar,2),this._sidebar.width=this.sidebarWidth,this._sidebar.horizontalAlignment=e?`right`:`left`,this._sidebar.className=this._paneClassName(this._sidebar.className,!0))}_animateOpen(){let e=this._scrim;e&&(e.visibility=`visible`,e.opacity=0,this._track(e.animate({opacity:1,duration:200,curve:`easeOut`})));let t=this._sidebar;t&&(t.visibility=`visible`,t.translateX=this._hiddenOffset(),t.opacity=1,this._track(t.animate({translate:{x:0,y:0},duration:200,curve:`easeOut`})))}_animateClose(){let e=this._scrim,t=this._sidebar,n=[];e&&n.push(this._track(e.animate({opacity:0,duration:200,curve:`easeIn`}))),t&&n.push(this._track(t.animate({translate:{x:this._hiddenOffset(),y:0},duration:200,curve:`easeIn`}))),Promise.all(n).then(()=>{this._state.showSidebar||(t&&(t.visibility=`collapse`),e&&(e.visibility=`collapse`))}).catch(()=>{})}_hiddenOffset(){let e=this.sidebarWidth;return this._state.sidebarPosition===`end`?e:-e}_paneClassName(e,t){return`${(e??``).split(/\s+/).filter(e=>e&&e!==`adw-overlay-active`&&e!==`adw-split-view-sidebar`).join(` `)} adw-split-view-sidebar${t?` adw-overlay-active`:``}`.trim()}};export{AdwOverlaySplitView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{xmlBoolean as t}from"./xml-values.js";import{withSignals as n}from"./signals.js";import{GtkImage as r}from"./gtk-image.js";import{attachRowPressFeedback as i}from"./row-press.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{xmlBoolean as t}from"./xml-values.js";import{withSignals as n}from"./signals.js";import{GtkImage as r}from"./gtk-image.js";import{attachRowPressFeedback as i}from"./row-press.js";import{buttonContentClassName as a,buttonContentLabelText as o}from"./button-content.js";import{assertPopupMenuAssignable as s,refuseMenuString as c}from"./popup-menu.js";import{showMenuPopup as l}from"./popup-menu-view.js";import{splitButtonArrowSvg as u}from"./split-button.js";import{ArrowType as d}from"./gtk-enums.js";import{SPLIT_BUTTON_DISABLED_OPACITY as f,SplitButtonState as p}from"@gjsify/adwaita-core";import{GridLayout as m,ItemSpec as h,Label as g,StackLayout as _}from"@nativescript/core";const v=`notify::direction`,y=`menuTapped`,clearingSlot=(e,t)=>{e._contentGate=!0;try{t()}finally{e._contentGate=!1}};var AdwSplitButton=class extends n(m,{GTypeName:`AdwSplitButton`,Signals:{clicked:{},activate:{}},Properties:{label:{kind:`string`,default:null,blurb:`The label to show in the button`,normalize:(e,t)=>{let n=t;if(n._contentGate)return null;if(e==null)return n.label;let r=String(e);return r!==n.label&&n.iconName!==null&&clearingSlot(n,()=>n.iconName=null),r}},"icon-name":{kind:`string`,default:null,blurb:`The name of the icon used to automatically populate the button`,normalize:(e,t)=>{let n=t;if(n._contentGate)return null;if(e==null)return n.iconName;let r=String(e)===``?null:String(e);return n.label!==null&&clearingSlot(n,()=>n.label=null),r}},"use-underline":{kind:`boolean`,default:!1,blurb:`Whether an underline in the text indicates a mnemonic`},"can-shrink":{kind:`boolean`,default:!1,blurb:`Whether the button can be smaller than the natural size of its contents`},"dropdown-tooltip":{kind:`string`,default:``,blurb:`The tooltip of the dropdown button`}}}){static GTypeName=`AdwSplitButton`;static emittedSignals=[v];_actionPart;_actionLabel;_actionIcon;_dropdownPart;_chevron;_state=new p;_actions=null;_showingIcon=!1;_sensitive=!0;_contentGate=!1;constructor(t){super(),this.className=`adw-split-button`,this.addColumn(new h(1,`auto`)),this.addColumn(new h(1,`auto`)),this.addRow(new h(1,`auto`));let n=new _;n.orientation=`horizontal`,n.className=`adw-split-button-action`,n.horizontalAlignment=`center`,m.setColumn(n,0);let o=new g;o.className=`adw-split-button-label`,o.verticalAlignment=`middle`,n.addChild(o);let s=new r;s.className=`${s.className} adw-split-button-action-icon`.trim(),s.verticalAlignment=`middle`,this.addChild(n),this._actionPart=n,this._actionLabel=o,this._actionIcon=s;let c=new m;c.className=`adw-split-button-dropdown`,c.addColumn(new h(1,`star`)),c.addRow(new h(1,`star`)),m.setColumn(c,1);let l=new r;l.className=`${l.className} adw-split-button-chevron`.trim(),l.iconName=u(this._state.direction),l.horizontalAlignment=`center`,l.verticalAlignment=`middle`,c.addChild(l),this.addChild(c),this._dropdownPart=c,this._chevron=l,n.addEventListener(`tap`,()=>this._click()),this.connect(`activate`,e=>e._click()),c.addEventListener(`tap`,()=>{this._openMenu()}),i(n),i(c),this.connect(`notify::label`,e=>e._renderContent()),this.connect(`notify::icon-name`,e=>e._renderContent()),this.connect(`notify::use-underline`,e=>e._renderContent()),this.connect(`notify::can-shrink`,e=>{e._actionLabel.className=a(e._actionLabel.className,e.canShrink)}),this._state.subscribe(()=>this._render()),this._render(),e(this,t)}_openMenu(){if(!(!this._sensitive||this._state.open||!this._state.dropdownEnabled)){this._state.toggleMenu();try{l(this._dropdownPart,{model:this._state.menuModel??[],actions:this._actions,onActivated:(e,t)=>{let n=this._state.activateMenuItem(t);if(n===null)return;let r={eventName:y,object:this,item:n.label,id:n.id??n.label,path:t,action:n.action};this.notify(r)},onDismiss:()=>this._state.closeMenu()})}catch(e){throw this._state.closeMenu(),e}}}_click(){this._sensitive&&this.emit(`clicked`)}_renderContent(){let e=this.iconName!==null;e?this._actionIcon.iconName=this.iconName??``:this._actionLabel.text=o(this.label??``,this.useUnderline),e!==this._showingIcon&&(this._actionPart.removeChild(this._showingIcon?this._actionIcon:this._actionLabel),this._actionPart.addChild(e?this._actionIcon:this._actionLabel),this._showingIcon=e)}_render(){let{direction:e,dropdownEnabled:t}=this._state;this._chevron.iconName=u(e),this._dropdownPart.opacity=t?1:f,this.opacity=this._sensitive?1:f}get menuModel(){return this._state.menuModel??[]}set menuModel(e){c(e,`AdwSplitButton`),this._state.setMenuModel(e),s(this._state.menuModel??[])}get actions(){return this._actions}set actions(e){this._actions=e??null}get_direction(){return d[this._state.direction.toUpperCase()]}set_direction(e){let t=e,n=typeof t==`number`?t:/^\d+$/.test(String(t))?Number(t):d[String(t).toUpperCase()],r=Object.keys(d).find(e=>d[e]===n)?.toLowerCase();if(r===void 0)throw TypeError(`${String(t)} is not a valid value for enum argument direction (Gtk.ArrowType)`);this._state.setDirection(r)&&this.notify({eventName:v,object:this,value:this.get_direction()})}get sensitive(){return this._sensitive}set sensitive(e){let n=!!t(e,this._sensitive);n!==this._sensitive&&(this._sensitive=n,this._render())}get actionButton(){return this._actionPart}};export{AdwSplitButton,y as MENU_TAPPED,v as NOTIFY_DIRECTION};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{iconValueKind as n}from"./icon-theme.js";import{applyViewStackVisibility as r,createViewStackState as i,viewStackNotifyPayload as a}from"./view-stack-state.js";import{AdwViewStackPage as o}from"./view-stack-page.js";import{GridLayout as s,ItemSpec as c}from"@nativescript/core";const l=`notify::visible-child`,u=`notify::visible-child-name`;var AdwViewStack=class extends t(s){static GTypeName=`AdwViewStack`;static emittedSignals=[l,u];static builderSlots=[];_state=i();_sourceIcons=new Map;constructor(t){super(),this.className=`adw-view-stack`,this.addColumn(new c(1,`star`)),this.addRow(new c(1,`star`)),this._state.subscribe(e=>{r(this._state);let t={eventName:l,object:this,...a(e)};this.notify(t),this.notify({...t,eventName:u})}),e(this,t)}add(e,t,n,r){let i=this._state.addPage({name:t,title:n,icon:r,content:e});return this._rememberSourceIcon(e,r),this._placePage(e),i}_placePage(e){s.setColumn(e,0),s.setRow(e,0),this.addChild(e),r(this._state)}_addChildFromBuilder(e,t){if(!(t instanceof o)){this.add(t,``);return}let n=t.child;if(n===null){t._awaitChild(this);return}t._adoptBy(this),this._state.addPage({name:t.name,title:t.title,icon:t.iconName,content:n,visible:t.visible,badgeNumber:t.badgeNumber,needsAttention:t.needsAttention,useUnderline:t.useUnderline}),this._rememberSourceIcon(n,t.iconName),this._placePage(n)}_rememberSourceIcon(e,t){t&&n(t)===`source`&&this._sourceIcons.set(e,t)}pageIcons(){return this._state.pages.map(e=>(e.content?this._sourceIcons.get(e.content):void 0)??e.icon)}add_titled(e,t,n){return this.add(e,t,n)}add_titled_with_icon(e,t,n,r){return this.add(e,t,n,r)}remove(e){let t=typeof e==`string`?e:this._nameOf(e)??``,n=this._state.pages[this._state.indexOfName(t)]?.content;return this._state.removePage(t)?(n&&(this.removeChild(n),this._sourceIcons.delete(n),n.visibility=`visible`),r(this._state),!0):!1}setPageVisible(e,t){let n=this._state.setPageVisible(e,t);return r(this._state),n}_nameOf(e){for(let t of this._state.pages)if(t.content===e)return t.name;return null}get pages(){return this._state.pages}get visibleChildIndex(){return this._state.visibleIndex}selectNthPage(e){return this._state.setVisibleIndex(e)}get visibleChildName(){return this._state.visibleName}set visibleChildName(e){this._state.setVisibleName(e)}get visibleChild(){return this._state.visiblePage?.content??null}};export{AdwViewStack,l as NOTIFY_VISIBLE_CHILD,u as NOTIFY_VISIBLE_CHILD_NAME};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{iconValueKind as n}from"./icon-theme.js";import{applyViewStackVisibility as r,createViewStackState as i,viewStackNotifyPayload as a}from"./view-stack-state.js";import{AdwViewStackPage as o}from"./view-stack-page.js";import{GridLayout as s,ItemSpec as c}from"@nativescript/core";const l=`notify::visible-child`,u=`notify::visible-child-name`;var AdwViewStack=class extends t(s){static GTypeName=`AdwViewStack`;static emittedSignals=[l,u];static builderSlots=[];_state=i();_sourceIcons=new Map;constructor(t){super(),this.className=`adw-view-stack`,this.addColumn(new c(1,`star`)),this.addRow(new c(1,`star`)),this._state.subscribe(e=>{r(this._state);let t={eventName:l,object:this,...a(e)};this.notify(t),this.notify({...t,eventName:u})}),e(this,t)}add(e,t,n,r){let i=this._state.addPage({name:t,title:n,icon:r,content:e});return this._rememberSourceIcon(e,r),this._placePage(e),i}_placePage(e){s.setColumn(e,0),s.setRow(e,0),this.addChild(e),r(this._state)}_addChildFromBuilder(e,t){if(!(t instanceof o)){this.add(t,``);return}let n=t.child;if(n===null){t._awaitChild(this);return}t._adoptBy(this),this._state.addPage({name:t.name,title:t.title,icon:t.iconName,content:n,visible:t.visible,badgeNumber:t.badgeNumber,needsAttention:t.needsAttention,useUnderline:t.useUnderline}),this._rememberSourceIcon(n,t.iconName),this._placePage(n)}_rememberSourceIcon(e,t){t&&n(t)===`source`&&this._sourceIcons.set(e,t)}pageIcons(){return this._state.pages.map(e=>(e.content?this._sourceIcons.get(e.content):void 0)??e.icon)}add_titled(e,t,n){return this.add(e,t,n)}add_titled_with_icon(e,t,n,r){return this.add(e,t,n,r)}remove(e){let t=typeof e==`string`?e:this._nameOf(e)??``,n=this._state.pages[this._state.indexOfName(t)]?.content;return this._state.removePage(t)?(n&&(this.removeChild(n),this._sourceIcons.delete(n),n.visibility=`visible`),r(this._state),!0):!1}setPageVisible(e,t){let n=this._state.setPageVisible(e,t);return r(this._state),n}_nameOf(e){for(let t of this._state.pages)if(t.content===e)return t.name;return null}get pages(){return this._state.pages}get visibleChildIndex(){return this._state.visibleIndex}selectNthPage(e){return this._state.setVisibleIndex(e)}get visibleChildName(){return this._state.visibleName}set visibleChildName(e){this._state.setVisibleName(e)}get visibleChild(){return this._state.visiblePage?.content??null}add_named(e,t){return this.add(e,t??``)}get_visible_child_name(){return this._state.visibleIndex<0?null:this._state.visibleName}set_visible_child_name(e){this._state.setVisibleName(e)}get_visible_child(){return this.visibleChild}set_visible_child(e){let t=this._state.pages.findIndex(t=>t.content===e);t!==-1&&this._state.setVisibleIndex(t)}};export{AdwViewStack,l as NOTIFY_VISIBLE_CHILD,u as NOTIFY_VISIBLE_CHILD_NAME};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{GtkWindow as t}from"./gtk-window.js";import{installActionMap as n}from"@gjsify/adwaita-core";var GtkApplicationWindow=class extends t{static GTypeName=`GtkApplicationWindow`;constructor(t){super(),e(this,t)}};n(GtkApplicationWindow.prototype);export{GtkApplicationWindow};
|
|
@@ -1 +1 @@
|
|
|
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{activateWidgetAction as r}from"./actions.js";import{applyNativeTooltip as i}from"./native-tooltip.js";import{withSignals as a}from"./signals.js";import{GtkImage as o}from"./gtk-image.js";import{
|
|
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{activateWidgetAction as r}from"./actions.js";import{applyNativeTooltip as i}from"./native-tooltip.js";import{withSignals as a}from"./signals.js";import{GtkImage as o}from"./gtk-image.js";import{attachRowPressFeedback as s}from"./row-press.js";import{classNameWith as c,normalizeStyleClasses as l,withCssClass as u,withoutCssClass as d}from"./style-classes.js";import{buttonSlotAfterWrite as f,buttonSlotDetaches as p}from"./button-slot.js";import{labelDisplayText as m}from"@gjsify/adwaita-core";import{GridLayout as h,ItemSpec as g,Label as _}from"@nativescript/core";const v=`clicked`,y=`image-button`,b=`adw-button-label`;var GtkButton=class extends a(h,{GTypeName:`GtkButton`,Signals:{clicked:{}}}){static GTypeName=`GtkButton`;static builderSlots=e([`child`],`child`);_styleClasses=[];_label=``;_iconName=``;_tooltipText=``;_useUnderline=!1;_slot=`empty`;_content=null;constructor(e){super(),this.className=c(`adw-button`,this._styleClasses),this.addRow(new g(1,`star`)),this.addColumn(new g(1,`star`)),s(this),this.addEventListener(`tap`,()=>{this.emit(v),this.actionName&&r(this,this.actionName)}),this.addEventListener(`loaded`,()=>{i(this,this.tooltipText),this._pinIconColor()}),t(this,e)}get label(){return this._label}set label(e){this._label=e??``,this._fill(`label`,this._label)}actionName=null;get iconName(){return this._iconName}set iconName(e){this._iconName=e??``,this._fill(`icon`,this._iconName)}get tooltipText(){return this._tooltipText}set tooltipText(e){let t=e??``;(this.accessibilityHint??``)===this._tooltipText&&(this.accessibilityHint=t),this._tooltipText=t,i(this,t)}get child(){return this._slot===`child`?this._content:null}set child(e){this._fill(`child`,e??null)}set_child(e){this.child=e}get_child(){return this.child}_addChildFromBuilder(e,t){this.child=t}get useUnderline(){return this._useUnderline}set useUnderline(e){this._useUnderline=n(e,this._useUnderline),this._slot===`label`&&this._fill(`label`,this._label)}get styleClasses(){return[...this._styleClasses]}set styleClasses(e){this._setClasses(l(e))}add_css_class(e){this._setClasses(u(this._styleClasses,e))}remove_css_class(e){this._setClasses(d(this._styleClasses,e))}has_css_class(e){return this._styleClasses.includes((e??``).trim())}get_css_classes(){return[...this._styleClasses]}set_css_classes(e){this._setClasses(l([...e].join(` `)))}_setClasses(e){this._styleClasses=[...e],this._restyle()}_restyle(){this.className=c(`adw-button`,[...this._styleClasses,...this._stateClasses()]),this._pinIconColor()}_stateClasses(){return this._slot===`icon`?[y]:[]}_fill(e,t){let n=f(e,t);p(this._slot,n)&&this._detach();let r=this._slot===`icon`;if(this._slot=n,r!==(n===`icon`)&&this._restyle(),n===`empty`){this._detach();return}if(n===`child`){let e=t;if(this._content===e)return;this._detach(),this._adopt(e);let n=e;`hostButton`in n&&(n.hostButton=this);return}if(n===`label`){let e=this._content instanceof _?this._content:this._adopt(new _);e.className=b,e.text=m(this._label,!1,this._useUnderline);return}let i=this._content instanceof o?this._content:this._adopt(new o);i.iconName=this._iconName,this._pinIconColor()}_pinIconColor(){this._content instanceof o&&(this._styleClasses.some(e=>e===`osd`||e===`suggested-action`)||this._inOsdContainer())&&(this._content.iconColor=`#ffffff`)}_inOsdContainer(){for(let e=this.parent;e;e=e.parent)if((e.className??``).split(/\s+/).includes(`osd`))return!0;return!1}_detach(){this._content&&this.removeChild(this._content),this._content=null}_adopt(e){return e.horizontalAlignment=`center`,e.verticalAlignment=`middle`,h.setColumn(e,0),h.setRow(e,0),this.addChild(e),this._content=e,e}};export{v as GTK_BUTTON_CLICKED,y as GTK_BUTTON_IMAGE_CLASS,b as GTK_BUTTON_LABEL_CLASS,GtkButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.js";import{applyConstructProps as t}from"./construct-props.js";import{xmlBoolean as n}from"./xml-values.js";import{GtkImage as r}from"./gtk-image.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{GtkImage as r}from"./gtk-image.js";import{attachRowPressFeedback as i}from"./row-press.js";import{classNameWith as a}from"./style-classes.js";import{AdwStyledLayoutBase as o}from"./styled-layout-base.js";import{resolveIdReference as s}from"./id-reference.js";import{checkActivationFlips as c,checkGroupNeighbours as l,isRadioCheck as u,labelDisplayText as d,setCheckGroup as f}from"@gjsify/adwaita-core";import{GridLayout as p,ItemSpec as m,Label as h}from"@nativescript/core";import{objectSelectSymbolic as g}from"@gjsify/adwaita-icons/actions";const _=`toggled`,v=`activate`,y=`notify::active`,b=`checked`,x=`inconsistent`;var S=class GtkCheckButton extends o{static GTypeName=`GtkCheckButton`;static emittedSignals=[_,v,y];static builderSlots=e([`child`],`child`);static builderReferences=[`group`];_indicator;_mark;_text;_active=!1;_inconsistent=!1;_label=null;_useUnderline=!1;_child=null;_groupId=null;_contentUnit=`auto`;constructor(e){super(),this.addColumn(new m(1,`auto`)),this.addColumn(new m(1,`auto`)),this.addRow(new m(1,`auto`));let n=new p;n.className=`adw-check-indicator`,n.addColumn(new m(1,`star`)),n.addRow(new m(1,`star`)),n.verticalAlignment=`middle`,p.setColumn(n,0),p.setRow(n,0);let a=new r;a.iconName=g,a.pixelSize=14,a.iconColor=`#ffffff`,a.horizontalAlignment=`center`,a.verticalAlignment=`middle`,a.visibility=`collapse`,n.addChild(a),this.addChild(n),this._indicator=n,this._mark=a;let o=new h;o.className=`adw-check-label`,o.verticalAlignment=`middle`,o.visibility=`collapse`,p.setColumn(o,1),p.setRow(o,0),this.addChild(o),this._text=o,this.addEventListener(`loaded`,()=>this._resolveGroupId()),i(this),this.addEventListener(`tap`,()=>{c(this,this._active)&&(this._inconsistent=!1,this.active=!this._active,this._restyle(),this.notify({eventName:v,object:this}))}),this._restyle(),t(this,e)}get active(){return this._active}set active(e){let t=n(e,this._active);if(t!==this._active){if(t)for(let e of l(this))e.active=!1;this._active=t,this._restyle(),this.notify({eventName:_,object:this}),this.notify({eventName:y,object:this})}}set group(e){if(typeof e==`string`){this._groupId=e,this.isLoaded&&this.set_group(s(this,`group`,e,GtkCheckButton));return}this._groupId=null,this.set_group(e)}set_group(e){f(this,e),this._restyle(),e?._restyle()}_resolveGroupId(){let e=this._groupId;e!==null&&(this._groupId=null,this.set_group(s(this,`group`,e,GtkCheckButton)))}get inconsistent(){return this._inconsistent}set inconsistent(e){let t=n(e,this._inconsistent);t!==this._inconsistent&&(this._inconsistent=t,this._restyle(),this.notify({eventName:`notify::inconsistent`,object:this}))}get label(){return this._label}set label(e){this._label=e??null,this._paintLabel()}get useUnderline(){return this._useUnderline}set useUnderline(e){this._useUnderline=!!n(e,this._useUnderline),this._paintLabel()}_paintLabel(){this._text.text=d(this._label??``,!1,this._useUnderline),this._syncContent()}get child(){return this._child}set child(e){let t=e??null;t!==this._child&&(this._child&&this.removeChild(this._child),this._child=t,t&&(p.setColumn(t,1),p.setRow(t,0),this.addChild(t)),this._syncContent())}set_child(e){this.child=e}get_child(){return this._child}get_active(){return this._active}set_active(e){this.active=e}_addChildFromBuilder(e,t){this.child=t}_syncContent(){let e=!!this._child||!!this._label;this._text.visibility=!this._child&&this._label?`visible`:`collapse`;let t=e?`star`:`auto`;t!==this._contentUnit&&(this._contentUnit=t,this.removeColumns(),this.addColumn(new m(1,`auto`)),this.addColumn(new m(1,t)))}get _ownClass(){return`adw-check-button`}_restyle(){let e=[];this._active&&e.push(b),this._inconsistent&&e.push(x),this.className=a(this._ownClass,[...this.styleClasses,...e]),this._indicator.className=a(`adw-check-indicator`,u(this)?[...e,`radio`]:e),this._mark.visibility=this._active||this._inconsistent?`visible`:`collapse`}};export{v as GTK_CHECK_BUTTON_ACTIVATE,b as GTK_CHECK_BUTTON_CHECKED_CLASS,x as GTK_CHECK_BUTTON_INCONSISTENT_CLASS,_ as GTK_CHECK_BUTTON_TOGGLED,S as GtkCheckButton,y as NOTIFY_CHECK_ACTIVE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e,resolveBuilderSlot as t}from"./builder-slots.js";import{applyConstructProps as n}from"./construct-props.js";import{xmlNumber as r}from"./xml-values.js";import{withSignals as i}from"./signals.js";import{GtkImage as a}from"./gtk-image.js";import{attachRowPressFeedback as o}from"./row-press.js";import{ComboState as s,normalizeComboOptions as c}from"@gjsify/adwaita-core";import{Label as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e,resolveBuilderSlot as t}from"./builder-slots.js";import{applyConstructProps as n}from"./construct-props.js";import{xmlNumber as r}from"./xml-values.js";import{withSignals as i}from"./signals.js";import{GtkImage as a}from"./gtk-image.js";import{attachRowPressFeedback as o}from"./row-press.js";import{ComboState as s,normalizeComboOptions as c,parseListModel as l}from"@gjsify/adwaita-core";import{Label as u,StackLayout as d,action as f}from"@nativescript/core";import{panDownSymbolic as p}from"@gjsify/adwaita-icons/ui";const m=`notify::selected`,h=`notify::selected-item`;var GtkDropDown=class extends i(d){static GTypeName=`GtkDropDown`;static emittedSignals=[m,h];static builderSlots=e([`model`],`model`);_label;_chevron;_state=new s;_chooserTitle=``;constructor(e){super(),this.orientation=`horizontal`,this.className=`adw-drop-down`;let t=new u;t.className=`adw-drop-down-label`,t.text=``;let r=new a;r.className=`adw-drop-down-chevron`,r.iconName=p,this.addChild(t),this.addChild(r),this._label=t,this._chevron=r,this._state.subscribe(e=>{if(this._label.text=e.label,e.interactive)for(let t of[m,h]){let n={eventName:t,object:this,selected:e.selected,value:e.value,label:e.label};this.notify(n)}}),this.addEventListener(`tap`,()=>{this._openChooser()}),o(this),n(this,e)}async _openChooser(){if(this._state.count===0)return;let e=this._state.model.map(e=>e.label),t=await f({title:this._chooserTitle||void 0,cancelButtonText:`Cancel`,actions:e});this._state.select(e.indexOf(t))}get model(){return this._state.model}set model(e){this._state.setModel(typeof e==`string`?l(e):c(e))}_addChildFromBuilder(e,n){if(t(e,[`model`],`child`)!==`model`)throw Error(`Gtk.DropDown takes no child widget; <${e}> is placed nowhere.`);this.model=n}get selected(){return this._state.selectedIndex}set selected(e){let t=r(e,this.selected);this._state.setSelectedIndex(t)}get_selected(){return this.selected}set_selected(e){this.selected=e}get selectedValue(){return this._state.selectedValue}set selectedValue(e){this._state.setSelectedValue(e)}get selectedItem(){return this._state.model[this._state.selectedIndex]??null}get chooserTitle(){return this._chooserTitle}set chooserTitle(e){this._chooserTitle=e??``}};export{GtkDropDown,m as NOTIFY_SELECTED,h as NOTIFY_SELECTED_ITEM};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{xmlBoolean as t}from"./xml-values.js";import{ACTIVATED as n}from"./adw-action-row.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{ACTIVATED as n}from"./adw-action-row.js";import{addMarkerClass as r,removeMarkerClass as i}from"./bottom-sheet-state.js";import{AdwStyledLayoutBase as a}from"./styled-layout-base.js";import{DEFAULT_LIST_SELECTION_MODE as o,selectionAfterModeChange as s,selectionAfterTap as c,selectionMode as l}from"./list-box-state.js";import{GridLayout as u,ItemSpec as d}from"@nativescript/core";const f=`row-activated`,p=`row-selected`,m=`adw-list-row-selected`,h=`adw-row-flush-top`;function markRow(e,t,n){let a=n?r(e.className,t):i(e.className,t);a!==(e.className??``)&&(e.className=a)}var GtkListBox=class extends a{static GTypeName=`GtkListBox`;_selectionMode=o;_activateOnSingleClick=!0;_showSeparators=!1;_acceptUnpairedRelease=!1;_selected=[];_listeners=new Map;constructor(t){super(),this.addColumn(new d(1,`star`)),e(this,t)}append(e){this.addChild(e)}prepend(e){this.insert(e,0)}insert(e,t){let n=this.getChildrenCount();if(t<0||t>=n){this.addChild(e);return}this.insertChild(e,t)}remove(e){this.removeChild(e)}remove_all(){for(let e of this._rowViews())this.removeChild(e)}get_row_at_index(e){return this._rowViews()[e]??null}addChild(e){super.addChild(e),this._adopt(e)}insertChild(e,t){let n=super.insertChild(e,t);return this._adopt(e),n}removeChild(e){this._release(e),super.removeChild(e),this._renumber()}_addChildFromBuilder(e,t){this.append(t)}get_selected_row(){return this._selected[0]??null}get_selected_rows(){return this._rowViews().filter(e=>this._selected.includes(e))}select_row(e){if(e===null){this.unselect_all();return}this._selectionMode===`none`||!this._rowViews().includes(e)||this._setSelected(this._selectionMode===`multiple`?[...this._selected,e]:[e])}unselect_row(e){this._setSelected(this._selected.filter(t=>t!==e))}select_all(){this._selectionMode===`multiple`&&this._setSelected(this._rowViews())}unselect_all(){this._setSelected([])}get selectionMode(){return this._selectionMode}set selectionMode(e){this._selectionMode=l(e),this._setSelected(s(this._selectionMode,this._selected))}get activateOnSingleClick(){return this._activateOnSingleClick}set activateOnSingleClick(e){this._activateOnSingleClick=t(e,this._activateOnSingleClick)}get showSeparators(){return this._showSeparators}set showSeparators(e){this._showSeparators=t(e,this._showSeparators)}get acceptUnpairedRelease(){return this._acceptUnpairedRelease}set acceptUnpairedRelease(e){this._acceptUnpairedRelease=t(e,this._acceptUnpairedRelease)}_rowViews(){let e=[];for(let t=0;t<this.getChildrenCount();t++)e.push(this.getChildAt(t));return e}_renumber(){let e=this._rowViews();this.removeRows();for(let[t,n]of e.entries())this.addRow(new d(1,`auto`)),u.setColumn(n,0),u.setRow(n,t),markRow(n,h,t===0)}_adopt(e){if(this._renumber(),this._listeners.has(e))return;let t={tap:()=>{this._tapped(e),`activatable`in e||this._activated(e)},activated:()=>this._activated(e)};this._listeners.set(e,t),e.addEventListener(`tap`,t.tap),e.addEventListener(n,t.activated)}_release(e){let t=this._listeners.get(e);t!==void 0&&(e.removeEventListener(`tap`,t.tap),e.removeEventListener(n,t.activated),this._listeners.delete(e)),markRow(e,h,!1),markRow(e,m,!1),this._selected.includes(e)&&this._setSelected(this._selected.filter(t=>t!==e))}_tapped(e){this._setSelected(c(this._selectionMode,this._selected,e))}_activated(e){let t={eventName:f,object:this,row:e};this.notify(t)}_setSelected(e){let t=this._selected;if(t.length===e.length&&t.every((t,n)=>t===e[n]))return;for(let n of t)e.includes(n)||markRow(n,m,!1);for(let t of e)markRow(t,m,!0);this._selected=[...e];let n={eventName:p,object:this,row:this._selected[0]??null};this.notify(n)}};export{GtkListBox,f as LIST_BOX_ROW_ACTIVATED,p as LIST_BOX_ROW_SELECTED,m as LIST_ROW_SELECTED_CLASS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{xmlBoolean as t}from"./xml-values.js";import{classNameWith as n,normalizeStyleClasses as r,withCssClass as i,withoutCssClass as a}from"./style-classes.js";import{AdwImageButton as o}from"./adw-image-button.js";import{assertPopupMenuAssignable as s,refuseMenuString as c}from"./popup-menu.js";import{showMenuPopup as l}from"./popup-menu-view.js";import{normalizeMenuModel as u}from"@gjsify/adwaita-core";const d=`menuItemActivated`;var GtkMenuButton=class extends o{static GTypeName=`GtkMenuButton`;_model=[];_actions=null;_menuTitle=``;_primary=!1;_baseClassName;_styleClasses=[];constructor(t){super(),this._baseClassName=`${this.className} adw-menu-button`.trim(),this.className=this._baseClassName,this.addEventListener(`tap`,()=>this._openMenu()),e(this,t)}get menuModel(){return this._model}set menuModel(e){c(e,`GtkMenuButton`);let t=u(e);s(t),this._model=t}get actions(){return this._actions}set actions(e){this._actions=e??null}get menuTitle(){return this._menuTitle}set menuTitle(e){this._menuTitle=e??``}get styleClasses(){return[...this._styleClasses]}set styleClasses(e){this._setClasses(r(e))}get primary(){return this._primary}set primary(e){this._primary=t(e,this._primary)}add_css_class(e){this._setClasses(i(this._styleClasses,e))}remove_css_class(e){this._setClasses(a(this._styleClasses,e))}has_css_class(e){return this._styleClasses.includes((e??``).trim())}get_css_classes(){return[...this._styleClasses]}set_css_classes(e){this._setClasses(r([...e].join(` `)))}_setClasses(e){this._styleClasses=e,this.className=n(this._baseClassName,e)}_openMenu(){this._model.length!==0&&l(this,{model:this._model,actions:this._actions,onActivated:(e,t)=>{let n={eventName:d,object:this,id:e.id??e.label,label:e.label,path:t,action:e.action};this.notify(n)}})}};export{GtkMenuButton,d as MENU_ITEM_ACTIVATED};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{xmlBoolean as t}from"./xml-values.js";import{classNameWith as n,normalizeStyleClasses as r,withCssClass as i,withoutCssClass as a}from"./style-classes.js";import{AdwImageButton as o}from"./adw-image-button.js";import{assertPopupMenuAssignable as s,refuseMenuString as c}from"./popup-menu.js";import{showMenuPopup as l}from"./popup-menu-view.js";import{normalizeMenuModel as u}from"@gjsify/adwaita-core";const d=`menuItemActivated`;var GtkMenuButton=class extends o{static GTypeName=`GtkMenuButton`;_model=[];_actions=null;_menuTitle=``;_primary=!1;_baseClassName;_styleClasses=[];constructor(t){super(),this._baseClassName=`${this.className} adw-menu-button`.trim(),this.className=this._baseClassName,this.addEventListener(`tap`,()=>this._openMenu()),e(this,t)}get menuModel(){return this._model}set menuModel(e){c(e,`GtkMenuButton`);let t=u(e);s(t),this._model=t}get menu_model(){return this.menuModel}set menu_model(e){this.menuModel=e}get_menu_model(){return this.menuModel}set_menu_model(e){this.menuModel=e}get actions(){return this._actions}set actions(e){this._actions=e??null}get menuTitle(){return this._menuTitle}set menuTitle(e){this._menuTitle=e??``}get styleClasses(){return[...this._styleClasses]}set styleClasses(e){this._setClasses(r(e))}get primary(){return this._primary}set primary(e){this._primary=t(e,this._primary)}add_css_class(e){this._setClasses(i(this._styleClasses,e))}remove_css_class(e){this._setClasses(a(this._styleClasses,e))}has_css_class(e){return this._styleClasses.includes((e??``).trim())}get_css_classes(){return[...this._styleClasses]}set_css_classes(e){this._setClasses(r([...e].join(` `)))}_setClasses(e){this._styleClasses=e,this.className=n(this._baseClassName,e)}_openMenu(){this._model.length!==0&&l(this,{model:this._model,actions:this._actions,onActivated:(e,t)=>{let n={eventName:d,object:this,id:e.id??e.label,label:e.label,path:t,action:e.action};this.notify(n)}})}};export{GtkMenuButton,d as MENU_ITEM_ACTIVATED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.js";import{applyConstructProps as t}from"./construct-props.js";import{xmlBoolean as n}from"./xml-values.js";import{AdwSingleChildBase as r}from"./single-child-base.js";import{DEFAULT_SCROLLBAR_POLICY as i,GTK_POLICY_TYPES as a,normalizePolicy as o,scrollOrientationFor as s}from"./scrolled-window-policy.js";import{GtkAdjustment as c}from"@gjsify/adwaita-core";import{ContentView as l,GridLayout as u,ScrollView as d}from"@nativescript/core";var GtkScrolledWindow=class extends r{static GTypeName=`GtkScrolledWindow`;static builderSlots=e([`child`],`child`);_scroll=new d;_viewport=new l;_hscrollbarPolicy=i;_vscrollbarPolicy=i;_hasFrame=!1;_hadjustment=null;_vadjustment=null;constructor(e){super(),u.setColumn(this._scroll,0),u.setRow(this._scroll,0),this._scroll.content=this._viewport,this.addChild(this._scroll),this._applyOrientation(),t(this,e)}get hscrollbarPolicy(){return this._hscrollbarPolicy}set hscrollbarPolicy(e){this._hscrollbarPolicy=o(e,`hscrollbar-policy`),this._applyOrientation()}get vscrollbarPolicy(){return this._vscrollbarPolicy}set vscrollbarPolicy(e){this._vscrollbarPolicy=o(e,`vscrollbar-policy`),this._applyOrientation()}get_policy(){return[a.indexOf(this._hscrollbarPolicy),a.indexOf(this._vscrollbarPolicy)]}set_policy(e,t){for(let[n,r]of[[e,`hscrollbar_policy`],[t,`vscrollbar_policy`]])if(!Number.isInteger(n)||a[n]===void 0)throw TypeError(`${n} is not a valid value for enum argument ${r}`);this.hscrollbarPolicy=a[e],this.vscrollbarPolicy=a[t]}get hadjustment(){return this._hadjustment??=new c}get vadjustment(){return this._vadjustment??=new c}get_hadjustment(){return this.hadjustment}get_vadjustment(){return this.vadjustment}set_hadjustment(e){this._hadjustment=e}set_vadjustment(e){this._vadjustment=e}get hasFrame(){return this._hasFrame}set hasFrame(e){this._hasFrame=n(e,this._hasFrame)}_adopt(e){this._viewport.content=e}_release(e){this._viewport.content===e&&(this._viewport.content=null)}_applyOrientation(){let e=s(this._hscrollbarPolicy,this._vscrollbarPolicy);this._scroll.orientation=e}};export{GtkScrolledWindow};
|
|
1
|
+
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{AdwSingleChildBase as r}from"./single-child-base.js";import{DEFAULT_SCROLLBAR_POLICY as i,GTK_POLICY_TYPES as a,normalizePolicy as o,scrollOrientationFor as s}from"./scrolled-window-policy.js";import{GtkAdjustment as c}from"@gjsify/adwaita-core";import{ContentView as l,GridLayout as u,ScrollView as d}from"@nativescript/core";var GtkScrolledWindow=class extends r{static GTypeName=`GtkScrolledWindow`;static builderSlots=e([`child`],`child`);_scroll=new d;_viewport=new l;_hscrollbarPolicy=i;_vscrollbarPolicy=i;_hasFrame=!1;_hadjustment=null;_vadjustment=null;_listening=!1;_syncing=!1;constructor(e){super(),u.setColumn(this._scroll,0),u.setRow(this._scroll,0),this._scroll.content=this._viewport,this.addChild(this._scroll),this._applyOrientation(),t(this,e)}get hscrollbarPolicy(){return this._hscrollbarPolicy}set hscrollbarPolicy(e){this._hscrollbarPolicy=o(e,`hscrollbar-policy`),this._applyOrientation()}get vscrollbarPolicy(){return this._vscrollbarPolicy}set vscrollbarPolicy(e){this._vscrollbarPolicy=o(e,`vscrollbar-policy`),this._applyOrientation()}get_policy(){return[a.indexOf(this._hscrollbarPolicy),a.indexOf(this._vscrollbarPolicy)]}set_policy(e,t){for(let[n,r]of[[e,`hscrollbar_policy`],[t,`vscrollbar_policy`]])if(!Number.isInteger(n)||a[n]===void 0)throw TypeError(`${n} is not a valid value for enum argument ${r}`);this.hscrollbarPolicy=a[e],this.vscrollbarPolicy=a[t]}get hadjustment(){return this._hadjustment??=this._track(`horizontal`,new c)}get vadjustment(){return this._vadjustment??=this._track(`vertical`,new c)}get_hadjustment(){return this.hadjustment}get_vadjustment(){return this.vadjustment}set_hadjustment(e){this._hadjustment=this._track(`horizontal`,e)}set_vadjustment(e){this._vadjustment=this._track(`vertical`,e)}_track(e,t){return this._listening||(this._listening=!0,this._scroll.addEventListener(`scroll`,this._syncAdjustments),this._scroll.addEventListener(`layoutChanged`,this._syncAdjustments),this._viewport.addEventListener(`layoutChanged`,this._syncAdjustments)),t.connect(`value-changed`,()=>{let n=e===`horizontal`?this._hadjustment:this._vadjustment;this._syncing||n!==t||(e===`horizontal`?this._scroll.scrollToHorizontalOffset(t.value,!1):this._scroll.scrollToVerticalOffset(t.value,!1))}),this._syncAxis(e,t),t}_syncAdjustments=()=>{this._hadjustment&&this._syncAxis(`horizontal`,this._hadjustment),this._vadjustment&&this._syncAxis(`vertical`,this._vadjustment)};_syncAxis(e,t){let n=e===`vertical`,r=this._scroll.getActualSize(),i=this._viewport.getActualSize(),a=n?r.height:r.width,o=Math.max(n?i.height:i.width,a),s=n?this._scroll.verticalOffset:this._scroll.horizontalOffset;this._syncing=!0;try{t.configure(s,0,o,a*.1,a*.9,a)}finally{this._syncing=!1}}get hasFrame(){return this._hasFrame}set hasFrame(e){this._hasFrame=n(e,this._hasFrame)}_adopt(e){this._viewport.content=e}_release(e){this._viewport.content===e&&(this._viewport.content=null)}_applyOrientation(){let e=s(this._hscrollbarPolicy,this._vscrollbarPolicy);this._scroll.orientation=e}};export{GtkScrolledWindow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{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{GTK_STACK_TRANSITIONS as i,transitionNick as a}from"./transition-type.js";import{StyleClassList as o}from"./style-classes.js";import{applyViewStackVisibility as s,createViewStackState as c,viewStackNotifyPayload as l}from"./view-stack-state.js";import{GtkStackPage as u}from"./stack-page.js";import{GridLayout as d,ItemSpec as f}from"@nativescript/core";const p=`notify::visible-child`,m=`notify::visible-child-name`;var GtkStack=class extends r(d){static GTypeName=`GtkStack`;static emittedSignals=[p,m];static builderSlots=[];_state=c();_classList=new o;_transitionType=`none`;_transitionDuration=200;_hhomogeneous=!0;_vhomogeneous=!0;_interpolateSize=!1;constructor(t){super(),this.addColumn(new f(1,`star`)),this.addRow(new f(1,`star`)),this._state.subscribe(e=>{s(this._state);let t=l(e);for(let e of[p,m]){let n={eventName:e,object:this,...t};this.notify(n)}}),e(this,t)}add_named(e,t){return this._add(e,t??``)}add_titled(e,t,n){return this._add(e,t??``,n)}add_child(e){return this._add(e,``)}remove(e){let t=this._state.pages.find(t=>t.content===e);return!t||!this._state.removePage(t.name)?!1:(this.removeChild(e),s(this._state),!0)}get_child_by_name(e){return this._state.pages[this._state.indexOfName(e)]?.content??null}setPageVisible(e,t){let n=this._state.setPageVisible(e,t);return s(this._state),n}_addChildFromBuilder(e,t){if(!(t instanceof u)){this._add(t,``);return}let n=t.child;if(n===null){t._awaitChild(this);return}t._adoptBy(this),this._state.addPage({name:t.name,title:t.title,icon:t.iconName,content:n,visible:t.visible,needsAttention:t.needsAttention,useUnderline:t.useUnderline}),this._place(n)}get visibleChildName(){return this._state.visibleName||null}set visibleChildName(e){this._state.setVisibleName(e)}get visibleChild(){return this._state.visiblePage?.content??null}set visibleChild(e){let t=this._state.pages.findIndex(t=>t.content===e);t!==-1&&this._state.setVisibleIndex(t)}get transitionType(){return this._transitionType}set transitionType(e){this._transitionType=a(e,i,`Gtk.StackTransitionType`)}get transitionDuration(){return this._transitionDuration}set transitionDuration(e){this._transitionDuration=Math.max(0,n(e,this._transitionDuration))}get hhomogeneous(){return this._hhomogeneous}set hhomogeneous(e){this._hhomogeneous=t(e,this._hhomogeneous)}get vhomogeneous(){return this._vhomogeneous}set vhomogeneous(e){this._vhomogeneous=t(e,this._vhomogeneous)}get interpolateSize(){return this._interpolateSize}set interpolateSize(e){this._interpolateSize=t(e,this._interpolateSize)}get styleClasses(){return this._classList.classes}set styleClasses(e){this._classList.replace(e),this._restyle()}add_css_class(e){this._classList.add(e),this._restyle()}remove_css_class(e){this._classList.remove(e),this._restyle()}has_css_class(e){return this._classList.has(e)}get_css_classes(){return this._classList.classes}set_css_classes(e){this._classList.replaceAll(e),this._restyle()}_restyle(){this.className=this._classList.className}_add(e,t,n){let r=this._state.addPage({name:t,title:n,content:e});return this._place(e),r}_place(e){d.setColumn(e,0),d.setRow(e,0),this.addChild(e),s(this._state)}};export{GtkStack,p as NOTIFY_STACK_VISIBLE_CHILD,m as NOTIFY_STACK_VISIBLE_CHILD_NAME};
|
|
1
|
+
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{GTK_STACK_TRANSITIONS as i,transitionNick as a}from"./transition-type.js";import{StyleClassList as o}from"./style-classes.js";import{applyViewStackVisibility as s,createViewStackState as c,viewStackNotifyPayload as l}from"./view-stack-state.js";import{GtkStackPage as u}from"./stack-page.js";import{GridLayout as d,ItemSpec as f}from"@nativescript/core";const p=`notify::visible-child`,m=`notify::visible-child-name`;var GtkStack=class extends r(d){static GTypeName=`GtkStack`;static emittedSignals=[p,m];static builderSlots=[];_state=c();_classList=new o;_transitionType=`none`;_transitionDuration=200;_hhomogeneous=!0;_vhomogeneous=!0;_interpolateSize=!1;constructor(t){super(),this.addColumn(new f(1,`star`)),this.addRow(new f(1,`star`)),this._state.subscribe(e=>{s(this._state);let t=l(e);for(let e of[p,m]){let n={eventName:e,object:this,...t};this.notify(n)}}),e(this,t)}add_named(e,t){return this._add(e,t??``)}add_titled(e,t,n){return this._add(e,t??``,n)}add_child(e){return this._add(e,``)}remove(e){let t=this._state.pages.find(t=>t.content===e);return!t||!this._state.removePage(t.name)?!1:(this.removeChild(e),s(this._state),!0)}get_child_by_name(e){return this._state.pages[this._state.indexOfName(e)]?.content??null}setPageVisible(e,t){let n=this._state.setPageVisible(e,t);return s(this._state),n}_addChildFromBuilder(e,t){if(!(t instanceof u)){this._add(t,``);return}let n=t.child;if(n===null){t._awaitChild(this);return}t._adoptBy(this),this._state.addPage({name:t.name,title:t.title,icon:t.iconName,content:n,visible:t.visible,needsAttention:t.needsAttention,useUnderline:t.useUnderline}),this._place(n)}get visibleChildName(){return this._state.visibleName||null}set visibleChildName(e){this._state.setVisibleName(e)}get visibleChild(){return this._state.visiblePage?.content??null}set visibleChild(e){let t=this._state.pages.findIndex(t=>t.content===e);t!==-1&&this._state.setVisibleIndex(t)}get_visible_child_name(){return this.visibleChildName}set_visible_child_name(e){this.visibleChildName=e}get_visible_child(){return this.visibleChild}set_visible_child(e){this.visibleChild=e}get transitionType(){return this._transitionType}set transitionType(e){this._transitionType=a(e,i,`Gtk.StackTransitionType`)}get transitionDuration(){return this._transitionDuration}set transitionDuration(e){this._transitionDuration=Math.max(0,n(e,this._transitionDuration))}get hhomogeneous(){return this._hhomogeneous}set hhomogeneous(e){this._hhomogeneous=t(e,this._hhomogeneous)}get vhomogeneous(){return this._vhomogeneous}set vhomogeneous(e){this._vhomogeneous=t(e,this._vhomogeneous)}get interpolateSize(){return this._interpolateSize}set interpolateSize(e){this._interpolateSize=t(e,this._interpolateSize)}get styleClasses(){return this._classList.classes}set styleClasses(e){this._classList.replace(e),this._restyle()}add_css_class(e){this._classList.add(e),this._restyle()}remove_css_class(e){this._classList.remove(e),this._restyle()}has_css_class(e){return this._classList.has(e)}get_css_classes(){return this._classList.classes}set_css_classes(e){this._classList.replaceAll(e),this._restyle()}_restyle(){this.className=this._classList.className}_add(e,t,n){let r=this._state.addPage({name:t,title:n,content:e});return this._place(e),r}_place(e){d.setColumn(e,0),d.setRow(e,0),this.addChild(e),s(this._state)}};export{GtkStack,p as NOTIFY_STACK_VISIBLE_CHILD,m as NOTIFY_STACK_VISIBLE_CHILD_NAME};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{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=[
|
|
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=[r,i];_active=!1;_groupNext=null;_groupPrev=null;constructor(t){super(),this.connect(`clicked`,e=>{e._active&&e._grouped||(e.active=!e._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};
|