@gjsify/adwaita-nativescript 0.63.0 → 0.63.1-next.236
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/namespace/gtk.js +1 -1
- package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
- package/lib/esm/widgets/adw-data-grid.js +1 -1
- package/lib/esm/widgets/adw-split-button.js +1 -1
- package/lib/esm/widgets/adw-toggle-group.js +1 -1
- package/lib/esm/widgets/adw-toggle.js +1 -1
- package/lib/esm/widgets/construct-props.js +1 -1
- package/lib/esm/widgets/gtk-box.js +1 -1
- package/lib/esm/widgets/gtk-enums.js +1 -1
- package/lib/esm/widgets/gtk-grid.js +1 -1
- package/lib/esm/widgets/gtk-list-box.js +1 -1
- package/lib/esm/widgets/gtk-window.js +1 -1
- package/lib/esm/widgets/index.js +1 -1
- package/lib/esm/widgets/shadowed-properties.js +1 -0
- package/lib/esm/widgets/signals.js +1 -1
- package/lib/esm/widgets/window-base.js +1 -1
- package/lib/esm/window-host.js +1 -1
- package/lib/esm/window-source.android.js +1 -1
- package/lib/esm/window-source.ios.js +1 -1
- package/lib/esm/window-source.js +1 -1
- package/lib/types/canvas2d/canvas2d-bridge.d.ts +4 -42
- package/lib/types/index.d.ts +1 -1
- package/lib/types/namespace/gtk.d.ts +1 -1
- package/lib/types/shadowed-properties.spec.d.ts +1 -0
- package/lib/types/testing/ns-core.d.mts +1 -1
- package/lib/types/widgets/adw-about-dialog.d.ts +8 -6
- package/lib/types/widgets/adw-action-row.d.ts +8 -6
- package/lib/types/widgets/adw-alert-dialog.d.ts +8 -6
- package/lib/types/widgets/adw-avatar.d.ts +8 -6
- package/lib/types/widgets/adw-banner.d.ts +8 -6
- package/lib/types/widgets/adw-bottom-sheet.d.ts +30 -16
- package/lib/types/widgets/adw-button-content.d.ts +8 -6
- package/lib/types/widgets/adw-carousel.d.ts +8 -6
- package/lib/types/widgets/adw-clamp.d.ts +8 -6
- package/lib/types/widgets/adw-data-grid.d.ts +26 -12
- package/lib/types/widgets/adw-header-bar.d.ts +8 -6
- package/lib/types/widgets/adw-image-button.d.ts +8 -6
- package/lib/types/widgets/adw-navigation-page.d.ts +8 -6
- package/lib/types/widgets/adw-navigation-view.d.ts +8 -6
- package/lib/types/widgets/adw-preferences-dialog.d.ts +8 -6
- package/lib/types/widgets/adw-preferences-group.d.ts +8 -6
- package/lib/types/widgets/adw-preferences-page.d.ts +8 -6
- package/lib/types/widgets/adw-shortcut-label.d.ts +8 -6
- package/lib/types/widgets/adw-sidebar.d.ts +8 -6
- package/lib/types/widgets/adw-slider-row.d.ts +8 -6
- package/lib/types/widgets/adw-spinner.d.ts +8 -6
- package/lib/types/widgets/adw-split-button.d.ts +30 -10
- package/lib/types/widgets/adw-status-page.d.ts +8 -6
- package/lib/types/widgets/adw-tab-view.d.ts +8 -6
- package/lib/types/widgets/adw-toast-overlay.d.ts +8 -6
- package/lib/types/widgets/adw-toggle-group.d.ts +8 -6
- package/lib/types/widgets/adw-toggle.d.ts +16 -8
- package/lib/types/widgets/adw-toolbar-view.d.ts +8 -6
- package/lib/types/widgets/adw-view-stack.d.ts +8 -6
- package/lib/types/widgets/adw-view-switcher-bar.d.ts +8 -6
- package/lib/types/widgets/adw-window-title.d.ts +8 -6
- package/lib/types/widgets/adw-wrap-box.d.ts +8 -6
- package/lib/types/widgets/carousel-indicator-base.d.ts +8 -6
- package/lib/types/widgets/construct-props.d.ts +9 -3
- package/lib/types/widgets/gtk-action-bar.d.ts +8 -6
- package/lib/types/widgets/gtk-box.d.ts +1 -1
- package/lib/types/widgets/gtk-button.d.ts +8 -6
- package/lib/types/widgets/gtk-drop-down.d.ts +8 -6
- package/lib/types/widgets/gtk-entry.d.ts +8 -6
- package/lib/types/widgets/gtk-enums.d.ts +8 -0
- package/lib/types/widgets/gtk-grid.d.ts +1 -1
- package/lib/types/widgets/gtk-image.d.ts +8 -6
- package/lib/types/widgets/gtk-label.d.ts +8 -6
- package/lib/types/widgets/gtk-list-box.d.ts +1 -1
- package/lib/types/widgets/gtk-popover-menu.d.ts +8 -6
- package/lib/types/widgets/gtk-stack.d.ts +8 -6
- package/lib/types/widgets/gtk-text-view.d.ts +8 -6
- package/lib/types/widgets/gtk-window.d.ts +12 -0
- package/lib/types/widgets/shadowed-properties.d.ts +99 -0
- package/lib/types/widgets/signals.d.ts +15 -6
- package/lib/types/widgets/split-view-base.d.ts +8 -6
- package/lib/types/widgets/stack-page.d.ts +8 -6
- package/lib/types/widgets/styled-layout-base.d.ts +8 -6
- package/lib/types/widgets/view-stack-page.d.ts +8 -6
- package/lib/types/widgets/view-switcher-base.d.ts +8 -6
- package/lib/types/widgets/widget-layout.d.ts +22 -19
- package/lib/types/widgets/window-base.d.ts +2 -0
- package/lib/types/window-host.d.ts +6 -0
- package/lib/types/window-source.android.d.ts +2 -0
- package/lib/types/window-source.d.ts +6 -0
- package/lib/types/window-source.ios.d.ts +2 -0
- package/package.json +14 -13
- package/src/testing/ns-core.mts +5 -3
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{registerTemplateClass as o,templateClassFor as s}from"./template-classes.js";import{adw_exports as c}from"../namespace/adw.js";import{gtk_exports as l}from"../namespace/gtk.js";import{createBreakpointDriver as u,menuAssignments as d,parseBreakpointCondition as f}from"@gjsify/adwaita-core";import{assertTreeConstructs as p}from"@gjsify/adwaita-core/conformance";import{propertyOf as m}from"@gjsify/adwaita-core/tags";import{View as h}from"@nativescript/core";const g=[{prefix:`adw`,library:`Adw`,namespace:c},{prefix:`gtk`,library:`Gtk`,namespace:l}];function registerBarrel(e,t,n){let r=g.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?g.push({prefix:e,library:t,namespace:n}):r.namespace=n}const _={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=_[e];if(t!==void 0)throw Error(`\`${e}\` is refused on this port: ${t}`);let r=[...g].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 (${g.map(e=>e.prefix).join(`, `)}).`)}function elementOf(e){return e.extern===!0?{xmlName:`app:${e.tag}`,ctor:s(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 h))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 h||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 h))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){p(`adwaita-nativescript`,e,n);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.`);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:o,flags:s}=e,c=`<${r.xmlName}> \`${i}: bind ${a}.${o}\``,l=t.template,u=a===`template`&&l!==void 0?l.instance:t.ids.get(a);if(u===void 0)throw Error(`${c} names no object: nothing in this tree has the id '${a}'.`);if(s.length>0&&l===void 0)throw Error(`${c} carries ${s.join(`, `)}: adwaita-nativescript binds the plain form only until each flag is verified against GObject.`);let d=m(o),f=m(i),p=u.constructor.emittedSignals??[],h=`notify::${o}`;if(!(d in u)||!p.includes(h))throw Error(`${c}: ${u.constructor.name} does not emit '${h}', so the target would follow the source once and never again. It emits: ${p.join(`, `)||`none`}.`);if(!(f in n))throw Error(`${c}: the target has no property '${f}'.`);if(l!==void 0){bindThroughEngine(l,{...e,from:u,where:c,notification:h});return}let follow=()=>{n[f]=u[d]};follow(),u.connect(h,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`?m(e):e;return new Proxy(e,{get(e,t){let n=Reflect.get(e,key(t));return typeof n==`function`?n.bind(e):n},set:(e,t,n)=>Reflect.set(e,key(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=n.constructor.emittedSignals??[];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 h))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 o=u(n.map(t=>{if(f(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(!(m(t.property)in n))throw Error(`${i}: the target declares no '${m(t.property)}'.`);return{object:n,property:t.property,value:{authored:translated(a,t.value,t.translatable)}}})}}),{read:(e,t)=>({original:e[m(t)]}),write(e,t,n){let r=n;e[m(t)]=`authored`in r?String(r.authored):r.original}});i(t,e=>o.evaluate(e))}function buildNode(e,t,n){let r=elementOf(e),i=n??new r.ctor,a=i instanceof h?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=t.ctor.emittedSignals??[],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 v={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 h))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=v[n];if(i===void 0)throw Error(`layout \`${n}\` on \`${e.tag}\` reaches nothing: a grid child takes ${Object.keys(v).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){return Error(`<${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.`)}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 d(e,r.menus)){let r=m(i);if(!(r in n))throw unknownProperty(t,e.tag,i,r,i);n[r]=a}for(let[i,o]of Object.entries(e.props??{})){if(i===`menu-model`)continue;let s=m(i);if(!(s in n))throw unknownProperty(t,e.tag,i,s,o);if(a.includes(s)){r.pending.push({view:n,element:t,prop:s,id:String(o)});continue}n[s]=String(translated(r.translate,o,e.translatable?.[i]))}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(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}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.`);let i={};for(let[a,o]of d(e,r.menus)){let r=m(a);if(!(r in n))throw unknownProperty(t,e.tag,a,r,a);i[r]=o}for(let[a,o]of Object.entries(e.props??{})){if(a===`menu-model`)continue;let s=m(a);if(!(s in n))throw unknownProperty(t,e.tag,a,s,o);i[s]=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,o 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{registerTemplateClass as o,templateClassFor as s}from"./template-classes.js";import{gtkPropertyRefusal as c,hasGtkProperty as l,readGtkProperty as u,writeGtkProperty as d}from"../widgets/shadowed-properties.js";import{adw_exports as f}from"../namespace/adw.js";import{gtk_exports as p}from"../namespace/gtk.js";import{createBreakpointDriver as m,menuAssignments as h,parseBreakpointCondition as g}from"@gjsify/adwaita-core";import{assertTreeConstructs as _}from"@gjsify/adwaita-core/conformance";import{propertyOf as v}from"@gjsify/adwaita-core/tags";import{View as y}from"@nativescript/core";const b=[{prefix:`adw`,library:`Adw`,namespace:f},{prefix:`gtk`,library:`Gtk`,namespace:p}];function registerBarrel(e,t,n){let r=b.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?b.push({prefix:e,library:t,namespace:n}):r.namespace=n}const x={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=x[e];if(t!==void 0)throw Error(`\`${e}\` is refused on this port: ${t}`);let r=[...b].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 (${b.map(e=>e.prefix).join(`, `)}).`)}function elementOf(e){return e.extern===!0?{xmlName:`app:${e.tag}`,ctor:s(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 y))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 y||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 y))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){_(`adwaita-nativescript`,e,n);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.`);d(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:o,flags:s}=e,f=`<${r.xmlName}> \`${i}: bind ${a}.${o}\``,p=t.template,m=a===`template`&&p!==void 0?p.instance:t.ids.get(a);if(m===void 0)throw Error(`${f} names no object: nothing in this tree has the id '${a}'.`);if(s.length>0&&p===void 0)throw Error(`${f} carries ${s.join(`, `)}: adwaita-nativescript binds the plain form only until each flag is verified against GObject.`);let h=v(o),g=v(i),_=m.constructor.emittedSignals??[],y=`notify::${o}`;if(!l(m,h)||!_.includes(y))throw Error(`${f}: ${m.constructor.name} does not emit '${y}', so the target would follow the source once and never again. It emits: ${_.join(`, `)||`none`}.`);if(!l(n,g)){let e=c(n,g);throw Error(`${f}: the target has no property '${g}'.${e===null?``:` ${e}`}`)}if(p!==void 0){bindThroughEngine(p,{...e,from:m,where:f,notification:y});return}let follow=()=>d(n,g,u(m,h));follow(),m.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`?v(e):e;return new Proxy(e,{get(e,t){let n=typeof t==`string`&&l(e,key(t))?u(e,key(t)):Reflect.get(e,key(t));return typeof n==`function`?n.bind(e):n},set(e,t,n){return typeof t==`string`?(d(e,v(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=n.constructor.emittedSignals??[];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 y))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 o=m(n.map(t=>{if(g(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(!l(n,v(t.property))){let e=c(n,v(t.property));throw Error(`${i}: the target declares no '${v(t.property)}'.`+(e===null?``:` ${e}`))}return{object:n,property:t.property,value:{authored:translated(a,t.value,t.translatable)}}})}}),{read:(e,t)=>({original:u(e,v(t))}),write(e,t,n){let r=n;d(e,v(t),`authored`in r?String(r.authored):r.original)}});i(t,e=>o.evaluate(e))}function buildNode(e,t,n){let r=elementOf(e),i=n??new r.ctor,a=i instanceof y?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=t.ctor.emittedSignals??[],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 S={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 y))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=S[n];if(i===void 0)throw Error(`layout \`${n}\` on \`${e.tag}\` reaches nothing: a grid child takes ${Object.keys(S).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 o=c(a,r);return Error(o===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}\`: ${o}`)}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 h(e,r.menus)){let r=v(i);if(!l(n,r))throw unknownProperty(t,e.tag,i,r,i,n);d(n,r,a)}for(let[i,o]of Object.entries(e.props??{})){if(i===`menu-model`)continue;let s=v(i);if(!l(n,s))throw unknownProperty(t,e.tag,i,s,o,n);if(a.includes(s)){r.pending.push({view:n,element:t,prop:s,id:String(o)});continue}d(n,s,String(translated(r.translate,o,e.translatable?.[i])))}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(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}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.`);let i={};for(let[a,o]of h(e,r.menus)){let r=v(a);if(!l(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 s=v(a);if(!l(n,s))throw unknownProperty(t,e.tag,a,s,o,n);i[s]=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,o as registerTemplateClass};
|
package/lib/esm/namespace/gtk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{GtkApplication as t}from"../widgets/application.js";import{GtkWindow as n}from"../widgets/gtk-window.js";import{GtkImage as r}from"../widgets/gtk-image.js";import{
|
|
1
|
+
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{GtkApplication as t}from"../widgets/application.js";import{GtkWindow as n}from"../widgets/gtk-window.js";import{GtkImage as r}from"../widgets/gtk-image.js";import{ArrowType as i,License as a,PolicyType as o,TextDirection as s,TextExtendSelection as c,TextWindowType as l}from"../widgets/gtk-enums.js";import{GtkActionBar as u}from"../widgets/gtk-action-bar.js";import{GtkBox as d}from"../widgets/gtk-box.js";import{GtkButton as f}from"../widgets/gtk-button.js";import{GtkDropDown as p}from"../widgets/gtk-drop-down.js";import{GtkCheckButton as m}from"../widgets/gtk-check-button.js";import{GtkDrawingArea as h}from"../widgets/gtk-drawing-area.js";import{GtkEntry as g}from"../widgets/gtk-entry.js";import{GtkGrid as _}from"../widgets/gtk-grid.js";import{GtkFrame as v}from"../widgets/gtk-frame.js";import{GtkLabel as y}from"../widgets/gtk-label.js";import{GtkListBox as b}from"../widgets/gtk-list-box.js";import{GtkMenuButton as x}from"../widgets/gtk-menu-button.js";import{GtkPopoverMenu as S}from"../widgets/gtk-popover-menu.js";import{GtkOverlay as C}from"../widgets/gtk-overlay.js";import{GtkRevealer as w}from"../widgets/gtk-revealer.js";import{GtkScrolledWindow as T}from"../widgets/gtk-scrolled-window.js";import{GtkSeparator as E}from"../widgets/gtk-separator.js";import{GtkStackPage as D}from"../widgets/stack-page.js";import{GtkStack as O}from"../widgets/gtk-stack.js";import{GtkTextView as k}from"../widgets/gtk-text-view.js";import{GtkToggleButton as A}from"../widgets/gtk-toggle-button.js";import{CssProvider as j,EventControllerKey as M,IconTheme as N,Settings as P,StyleContext as F,show_uri as I}from"./gtk-platform.js";import{DialogError as L,GtkAdjustment as R,GtkFileDialog as z,GtkFileFilter as B,GtkStringList as V,STYLE_PROVIDER_PRIORITY_APPLICATION as H,STYLE_PROVIDER_PRIORITY_FALLBACK as U,STYLE_PROVIDER_PRIORITY_SETTINGS as W,STYLE_PROVIDER_PRIORITY_THEME as G,STYLE_PROVIDER_PRIORITY_USER as K}from"@gjsify/adwaita-core";var q=e({ActionBar:()=>u,Adjustment:()=>R,Application:()=>t,ArrowType:()=>i,Box:()=>d,Button:()=>f,CheckButton:()=>m,CssProvider:()=>j,DialogError:()=>L,DrawingArea:()=>h,DropDown:()=>p,Entry:()=>g,EventControllerKey:()=>M,FileDialog:()=>z,FileFilter:()=>B,Frame:()=>v,Grid:()=>_,IconTheme:()=>N,Image:()=>r,Label:()=>y,License:()=>a,ListBox:()=>b,MenuButton:()=>x,Overlay:()=>C,PolicyType:()=>o,PopoverMenu:()=>S,Revealer:()=>w,STYLE_PROVIDER_PRIORITY_APPLICATION:()=>H,STYLE_PROVIDER_PRIORITY_FALLBACK:()=>U,STYLE_PROVIDER_PRIORITY_SETTINGS:()=>W,STYLE_PROVIDER_PRIORITY_THEME:()=>G,STYLE_PROVIDER_PRIORITY_USER:()=>K,ScrolledWindow:()=>T,Separator:()=>E,Settings:()=>P,Stack:()=>O,StackPage:()=>D,StringList:()=>V,StyleContext:()=>F,TextDirection:()=>s,TextExtendSelection:()=>c,TextView:()=>k,TextWindowType:()=>l,ToggleButton:()=>A,Window:()=>n,show_uri:()=>I});export{u as ActionBar,R as Adjustment,t as Application,i as ArrowType,d as Box,f as Button,m as CheckButton,j as CssProvider,L as DialogError,h as DrawingArea,p as DropDown,g as Entry,M as EventControllerKey,z as FileDialog,B as FileFilter,v as Frame,_ as Grid,N as IconTheme,r as Image,y as Label,a as License,b as ListBox,x as MenuButton,C as Overlay,o as PolicyType,S as PopoverMenu,w as Revealer,H as STYLE_PROVIDER_PRIORITY_APPLICATION,U as STYLE_PROVIDER_PRIORITY_FALLBACK,W as STYLE_PROVIDER_PRIORITY_SETTINGS,G as STYLE_PROVIDER_PRIORITY_THEME,K as STYLE_PROVIDER_PRIORITY_USER,T as ScrolledWindow,E as Separator,P as Settings,O as Stack,D as StackPage,V as StringList,F as StyleContext,s as TextDirection,c as TextExtendSelection,k as TextView,l as TextWindowType,A as ToggleButton,n as Window,q as gtk_exports,I as show_uri};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e,resolveBuilderSlot as t}from"./builder-slots.js";import{xmlBoolean as n}from"./xml-values.js";import{applyConstructProps as r}from"./construct-props.js";import{withSignals as i}from"./signals.js";import{BOTTOM_BAR_CLASS as a,CLOSE_ATTEMPT as o,DIMMING_CLASS as s,NOTIFY_OPEN as c,SHEET_CLOSE as l,addMarkerClass as u,applyBottomSheetChrome as d,createBottomSheetPresentation as f,removeMarkerClass as p,requestBottomSheetClose as m}from"./bottom-sheet-state.js";import{bottomSheetInsetPadding as h}from"./bottom-sheet-insets.js";import{NestedDragTracker as g,dragOffset as _,dragProgress as v,releaseVelocity as y,settle as b,sheetHeight as x,sheetTravel as S}from"./bottom-sheet-drag.js";import{attachRowPressFeedback as C}from"./row-press.js";import{GridLayout as w,ItemSpec as T,Label as E,ScrollView as D,StackLayout as O}from"@nativescript/core";const k=new WeakMap;function bottomSheetPanel(e){let t=
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e,resolveBuilderSlot as t}from"./builder-slots.js";import{xmlBoolean as n}from"./xml-values.js";import{applyConstructProps as r}from"./construct-props.js";import{withSignals as i}from"./signals.js";import{BOTTOM_BAR_CLASS as a,CLOSE_ATTEMPT as o,DIMMING_CLASS as s,NOTIFY_OPEN as c,SHEET_CLOSE as l,addMarkerClass as u,applyBottomSheetChrome as d,createBottomSheetPresentation as f,removeMarkerClass as p,requestBottomSheetClose as m}from"./bottom-sheet-state.js";import{bottomSheetInsetPadding as h}from"./bottom-sheet-insets.js";import{NestedDragTracker as g,dragOffset as _,dragProgress as v,releaseVelocity as y,settle as b,sheetHeight as x,sheetTravel as S}from"./bottom-sheet-drag.js";import{attachRowPressFeedback as C}from"./row-press.js";import{GridLayout as w,ItemSpec as T,Label as E,ScrollView as D,StackLayout as O}from"@nativescript/core";const k=`notify::modal`,A=new WeakMap;function bottomSheetPanel(e){let t=A.get(e);if(!t)throw Error(`bottomSheetPanel: not an AdwBottomSheet`);return t}const j=`adw-bottom-sheet-content`,M=`adw-bottom-sheet-sheet`,N=[`sheet`,`bottomBar`,`bottom-bar`,`content`];var AdwBottomSheet=class extends i(w){static GTypeName=`AdwBottomSheet`;static emittedSignals=[c,k];static builderSlots=e(N,`content`);_content=null;_dimming;_sheetPanel;_sheetPage;_drag=null;_nested=new g;_scrolls=new Set;_bottomInset=0;_barHeight=0;_bottomBarBin;_sheetChild=null;_bottomBar=null;_state=f();constructor(e){super(),this.className=`adw-bottom-sheet`,this.addColumn(new T(1,`star`)),this.addRow(new T(1,`star`));let t=new w;t.className=s,w.setColumn(t,0),w.setRow(t,0),t.addEventListener(`tap`,()=>this.requestClose(`dimming`)),this.addChild(t),this._dimming=t;let n=new O;n.orientation=`vertical`,n.className=`adw-bottom-sheet-panel`,n.verticalAlignment=`bottom`,w.setColumn(n,0),w.setRow(n,0);let i=new O;i.orientation=`vertical`,i.className=a,i.addEventListener(`tap`,()=>this.requestOpen(`bottom-bar`)),C(i),n.addChild(i);let o=new w;o.className=`adw-bottom-sheet-page`,o.addRow(new T(1,`star`)),n.addChild(o);let l=new E;l.className=`adw-bottom-sheet-handle`,l.horizontalAlignment=`center`,l.isUserInteractionEnabled=!1,l.verticalAlignment=`top`,w.setRow(l,0),o.addChild(l);let u=new O;u.className=`adw-bottom-sheet-grip`,u.verticalAlignment=`top`,u.height=48,u.addEventListener(`tap`,()=>{}),w.setRow(u,0),o.addChild(u),n.addEventListener(`pan`,e=>this._onPan(e)),t.addEventListener(`pan`,e=>this._onPan(e)),this.addChild(n),this._sheetPanel=n,A.set(this,n),this._sheetPage=o,this._bottomBarBin=i,this._paintChrome(),this._applyInsetPadding(),this.addEventListener(`layoutChanged`,()=>{this._syncHeight(),!this._state.open&&!this._drag&&(this._barHeight=this._sheetPanel.getActualSize().height)}),this._state.subscribe(e=>{this._paintChrome(),this._syncHeight();let t={eventName:c,object:this,open:e};this.notify(t)}),r(this,e)}applyBottomInset(e){this._bottomInset=e,this._applyInsetPadding()}_applyInsetPadding(){let e=h(this._bottomInset,{sheetScrolls:this._scrolls.size>0});this._bottomBarBin.paddingBottom=e.bar,this._sheetPage.paddingBottom=e.page;for(let t of this._scrolls){let n=t.content;n&&(n.paddingBottom=e.scrollEnd)}}_paintChrome(){d({dimming:this._dimming,panel:this._sheetPanel,page:this._sheetPage,bottomBar:this._bottomBarBin},this._state.chrome)}_syncHeight(){let e=this._sheetPanel;if(this._drag)return;if(!this._state.open){e.height!==`auto`&&(e.height=`auto`);return}let t=x(this.getActualSize().height);t>0&&e.height!==t&&(e.height=t)}_watchScrolling(e){if(e instanceof D){if(this._scrolls.has(e))return;this._scrolls.add(e),e.addEventListener(`touch`,t=>this._onNestedTouch(e,t)),this._applyInsetPadding();return}let t=e;t.content&&this._watchScrolling(t.content);let n=t.getChildrenCount?.()??0;for(let e=0;e<n;e++)this._watchScrolling(t.getChildAt(e))}_onNestedTouch(e,t){if(!this._state.open&&!this._nested.dragging)return;let n=t.getY()+(this._sheetPanel.translateY||0),r;if(t.action===`down`){if(this._drag)return;this._nested.down(n);return}r=t.action===`move`?this._nested.move(n,e.verticalOffset):this._nested.up(t.action===`cancel`),r.kind===`begin`?this._beginDrag():r.kind===`move`?this._moveDrag(r.dy):r.kind===`end`&&this._endDrag(r.dy,!1)}_onPan(e){this._nested.ignorePan(e.state)||(e.state===1?this._beginDrag():e.state===2?this._moveDrag(e.deltaY):this._endDrag(e.deltaY,e.state===0))}_beginDrag(){if(this._drag)return;let e=this._state.open;if(!e&&!this._bottomBar)return;let t=x(this.getActualSize().height);if(t<=0)return;let n=S(t,this._barHeight),r=this._sheetPanel;this._drag={start:e?`open`:`closed`,height:t,travel:n,samples:[],offset:e?0:n},r.height=t,!e&&(this._dimming.visibility=`visible`,this._dimming.opacity=0,this._bottomBarBin.visibility=`collapse`,this._sheetPage.visibility=`visible`,r.visibility=`visible`,r.translateY=n)}_moveDrag(e){let t=this._drag;t&&(t.samples.push({dy:e,time:Date.now()}),t.offset=_(t.start,e,t.travel),this._sheetPanel.translateY=t.offset,(t.start===`closed`||this._state.modal)&&(this._dimming.opacity=v(t.offset,t.travel)))}_endDrag(e,t){let n=this._drag;if(!n)return;n.samples.push({dy:e,time:Date.now()}),n.offset=_(n.start,e,n.travel);let r=t?n.start:b(n.offset,n.travel,y(n.samples)),i=r===`open`?0:n.travel,done=()=>{this._drag=null,this._sheetPanel.translateY=0,this._dimming.opacity=1,r!==n.start&&(r===`open`?this.requestOpen(`swipe`):this.requestClose(`swipe`)),this._paintChrome(),this._syncHeight()};this._sheetPanel.animate({translate:{x:0,y:i},duration:180,curve:`easeOut`}).then(done,done)}set_content(e){this._content!==e&&(this._content&&(this._content.className=p(this._content.className,j),this.removeChild(this._content)),this._content=e,e&&(e.className=u(e.className,j),w.setColumn(e,0),w.setRow(e,0),this.insertChild(e,0)))}set_sheet(e){this._sheetChild!==e&&(this._sheetChild&&(this._sheetChild.className=p(this._sheetChild.className,M),this._sheetPage.removeChild(this._sheetChild),this._scrolls.clear()),this._sheetChild=e,e&&(e.className=u(e.className,M),w.setRow(e,0),this._sheetPage.insertChild(e,0),this._watchScrolling(e),e.addEventListener(`loaded`,()=>this._watchScrolling(e))),this._applyInsetPadding())}set_bottom_bar(e){this._bottomBar!==e&&(this._bottomBar&&this._bottomBarBin.removeChild(this._bottomBar),this._bottomBar=e,e&&this._bottomBarBin.addChild(e),this._state.setHasBottomBar(e!==null),this._paintChrome())}_addChildFromBuilder(e,n){let r=t(e,N,`content`);r===`sheet`?this.set_sheet(n):r===`bottomBar`||r===`bottom-bar`?this.set_bottom_bar(n):this.set_content(n)}get content(){return this._content}set content(e){this.set_content(e)}get sheet(){return this._sheetChild}set sheet(e){this.set_sheet(e)}get bottomBar(){return this._bottomBar}set bottomBar(e){this.set_bottom_bar(e)}get open(){return this._state.open}set open(e){this._state.setOpen(n(e,!1))}get_modal(){return this._state.modal}set_modal(e){this._state.setModal(n(e,this.get_modal()))&&(this._paintChrome(),this.notify({eventName:k,object:this,value:this.get_modal()}))}get canClose(){return this._state.canClose}set canClose(e){let t=n(e,this.canClose);this._state.setCanClose(t)}get canOpen(){return this._state.canOpen}set canOpen(e){this._state.setCanOpen(n(e,this.canOpen))&&this._paintChrome()}get revealBottomBar(){return this._state.revealBottomBar}set revealBottomBar(e){this._state.setRevealBottomBar(n(e,this.revealBottomBar))&&this._paintChrome()}requestClose(e){let{outcome:t,eventName:n}=m(this._state,e);return n&&this.notify({eventName:n,object:this}),t}requestOpen(e){return this._state.requestOpen(e)}};export{AdwBottomSheet,o as CLOSE_ATTEMPT,k as NOTIFY_MODAL,c as NOTIFY_OPEN,l as SHEET_CLOSE,bottomSheetPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{attachRowPressFeedback as r}from"./row-press.js";import{DATA_GRID_HEADER_CELL_CLASS as i,DATA_GRID_HEADER_ROW_CLASS as a,DATA_GRID_SECTION_CELL_CLASS as o,dataGridCellClass as s,dataGridItemSpec as c,dataGridRowClass as l,dataGridShapeKey as u,dataGridTracksKey as d}from"./data-grid-model.js";import{dataGridCellText as f,dataGridColumnClasses as p,dataGridRowInteractive as m,dataGridTracks as h,normalizeDataGridColumns as g,normalizeDataGridVariant as _}from"@gjsify/adwaita-core";import{GridLayout as v,ItemSpec as y,Label as b,StackLayout as x}from"@nativescript/core";const S=`row-activated`;var AdwDataGrid=class extends n(v){static GTypeName=`AdwDataGrid`;_columns=[];_dataRows=[];_interactive=!1;_header=null;_rowNodes=[];_trackKey=``;_shapeKey=``;constructor(e){super(),this.className=`adw-data-grid`,t(this,e)}
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{attachRowPressFeedback as r}from"./row-press.js";import{DATA_GRID_HEADER_CELL_CLASS as i,DATA_GRID_HEADER_ROW_CLASS as a,DATA_GRID_SECTION_CELL_CLASS as o,dataGridCellClass as s,dataGridItemSpec as c,dataGridRowClass as l,dataGridShapeKey as u,dataGridTracksKey as d}from"./data-grid-model.js";import{dataGridCellText as f,dataGridColumnClasses as p,dataGridRowInteractive as m,dataGridTracks as h,normalizeDataGridColumns as g,normalizeDataGridVariant as _}from"@gjsify/adwaita-core";import{GridLayout as v,ItemSpec as y,Label as b,StackLayout as x}from"@nativescript/core";const S=`row-activated`;var AdwDataGrid=class extends n(v){static GTypeName=`AdwDataGrid`;_columns=[];_dataRows=[];_interactive=!1;_header=null;_rowNodes=[];_trackKey=``;_shapeKey=``;constructor(e){super(),this.className=`adw-data-grid`,t(this,e)}get_columns(){return this._columns}set_columns(e){this._columns=g(e),this._render()}get_rows(){return this._dataRows}set_rows(e){this._dataRows=Array.isArray(e)?e.map(e=>({...e})):[],this._render()}get interactive(){return this._interactive}set interactive(t){let n=e(t,this.interactive);this._interactive=!!n,this._paint()}_render(){this._syncColumns(),this._syncNodes(),this._paint()}_syncColumns(){let e=h(this._columns),t=d(e);if(t!==this._trackKey){this._trackKey=t,this.removeColumns();for(let t of e){let e=c(t);this.addColumn(new y(e.value,e.type))}}}_syncNodes(){let e=this._columns.length,t=u(e,this._dataRows.length);if(t!==this._shapeKey){this._shapeKey=t;for(let e of[this._header,...this._rowNodes])if(e!==null){this.removeChild(e.background);for(let t of e.cells)this.removeChild(t)}this._header=null,this._rowNodes=[],this.removeRows(),e!==0&&(this.addRow(new y(1,`auto`)),this._header=this._buildRow(0,e,!1),this._rowNodes=this._dataRows.map((t,n)=>(this.addRow(new y(1,`auto`)),this._buildRow(n+1,e,!0))))}}_buildRow(e,t,n){let i=new x;v.setRow(i,e),v.setColumn(i,0),v.setColumnSpan(i,t),this.addChild(i),n&&(r(i),i.addEventListener(`tap`,()=>this._activate(e-1)));let a=[];for(let n=0;n<t;n++){let t=new b;t.textWrap=!1,v.setRow(t,e),v.setColumn(t,n),this.addChild(t),a.push(t)}return{background:i,cells:a}}_paint(){let e=this._header;e!==null&&(e.background.className=a,this._columns.forEach((t,n)=>{let r=e.cells[n];r!==void 0&&(r.className=`${p(t).join(` `)} ${i}`,r.text=t.label??t.key,this._showCell(r,1))}),this._dataRows.forEach((e,t)=>{let n=this._rowNodes[t];if(n===void 0)return;let r=_(e.variant),i=m(r,e.interactive,this._interactive);if(n.background.className=l(r,i),r===`section`){let t=this._columns[0]?.key??``;n.cells.forEach((n,r)=>{r===0?(n.className=o,n.text=f(e[t]),this._showCell(n,this._columns.length)):(n.text=``,n.visibility=`collapse`,v.setColumnSpan(n,1))});return}this._columns.forEach((t,i)=>{let a=n.cells[i];a!==void 0&&(a.className=s(p(t),r),a.text=f(e[t.key]),this._showCell(a,1))})}))}_showCell(e,t){e.visibility=`visible`,v.setColumnSpan(e,t)}_activate(e){let t=this._dataRows[e];if(t===void 0||!m(_(t.variant),t.interactive,this._interactive))return;let n={eventName:S,object:this,index:e,row:t};this.notify(n)}};export{AdwDataGrid,S as ROW_ACTIVATED};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{GtkImage as r}from"./gtk-image.js";import{attachRowPressFeedback as i}from"./row-press.js";import{assertPopupMenuAssignable as a,refuseMenuString as o}from"./popup-menu.js";import{showMenuPopup as s}from"./popup-menu-view.js";import{setActionIcon as c,splitButtonArrowSvg as l}from"./split-button.js";import{SPLIT_BUTTON_DISABLED_OPACITY as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{GtkImage as r}from"./gtk-image.js";import{attachRowPressFeedback as i}from"./row-press.js";import{assertPopupMenuAssignable as a,refuseMenuString as o}from"./popup-menu.js";import{showMenuPopup as s}from"./popup-menu-view.js";import{setActionIcon as c,splitButtonArrowSvg as l}from"./split-button.js";import{ArrowType as u}from"./gtk-enums.js";import{SPLIT_BUTTON_DISABLED_OPACITY as d,SplitButtonState as f}from"@gjsify/adwaita-core";import{GridLayout as p,ItemSpec as m,Label as h,StackLayout as g}from"@nativescript/core";const _=`clicked`,v=`notify::direction`,y=`menuTapped`;var AdwSplitButton=class extends n(p){static GTypeName=`AdwSplitButton`;static emittedSignals=[v];_actionPart;_actionLabel;_actionIcon;_dropdownPart;_chevron;_state=new f;_actions=null;_showingIcon=!1;_sensitive=!0;constructor(e){super(),this.className=`adw-split-button`,this.addColumn(new m(1,`auto`)),this.addColumn(new m(1,`auto`)),this.addRow(new m(1,`auto`));let n=new g;n.orientation=`horizontal`,n.className=`adw-split-button-action`,n.horizontalAlignment=`center`,p.setColumn(n,0);let a=new h;a.className=`adw-split-button-label`,a.verticalAlignment=`middle`,n.addChild(a);let o=new r;o.className=`${o.className} adw-split-button-action-icon`.trim(),o.verticalAlignment=`middle`,this.addChild(n),this._actionPart=n,this._actionLabel=a,this._actionIcon=o;let s=new p;s.className=`adw-split-button-dropdown`,s.addColumn(new m(1,`star`)),s.addRow(new m(1,`star`)),p.setColumn(s,1);let c=new r;c.className=`${c.className} adw-split-button-chevron`.trim(),c.iconName=l(this._state.direction),c.horizontalAlignment=`center`,c.verticalAlignment=`middle`,s.addChild(c),this.addChild(s),this._dropdownPart=s,this._chevron=c,n.addEventListener(`tap`,()=>{if(!this._sensitive)return;let e={eventName:_,object:this};this.notify(e)}),s.addEventListener(`tap`,()=>{this._openMenu()}),i(n),i(s),this._state.subscribe(()=>this._render()),this._render(),t(this,e)}_openMenu(){if(!(!this._sensitive||this._state.open||!this._state.dropdownEnabled)){this._state.toggleMenu();try{s(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}}}_render(){let{mode:e,label:t,iconName:n,direction:r,dropdownEnabled:i}=this._state,a=e===`icon`;a?this._actionIcon.iconName=n??``:this._actionLabel.text=t??``,a!==this._showingIcon&&(this._actionPart.removeChild(this._showingIcon?this._actionIcon:this._actionLabel),this._actionPart.addChild(a?this._actionIcon:this._actionLabel),this._showingIcon=a),this._chevron.iconName=l(r),this._dropdownPart.opacity=i?1:d,this.opacity=this._sensitive?1:d}get label(){return this._state.label??``}set label(e){this._state.setLabel(e??``)}get iconName(){return this._state.iconName??``}set iconName(e){c(this._state,e)}get menuModel(){return this._state.menuModel??[]}set menuModel(e){o(e,`AdwSplitButton`),this._state.setMenuModel(e),a(this._state.menuModel??[])}get actions(){return this._actions}set actions(e){this._actions=e??null}get_direction(){return u[this._state.direction.toUpperCase()]}set_direction(e){let t=e,n=typeof t==`number`?t:/^\d+$/.test(String(t))?Number(t):u[String(t).toUpperCase()],r=Object.keys(u).find(e=>u[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 dropdownTooltip(){return this._state.dropdownTooltip}set dropdownTooltip(e){this._state.setDropdownTooltip(e??``)}get useUnderline(){return this._state.useUnderline}set useUnderline(t){let n=e(t,this.useUnderline);this._state.setUseUnderline(!!n)}get sensitive(){return this._sensitive}set sensitive(t){let n=!!e(t,this._sensitive);n!==this._sensitive&&(this._sensitive=n,this._render())}get actionButton(){return this._actionPart}};export{AdwSplitButton,_ as CLICKED,y as MENU_TAPPED,v as NOTIFY_DIRECTION};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{GtkImage as r}from"./gtk-image.js";import{AdwToggle as i}from"./adw-toggle.js";import{ToggleGroupState as a,ToggleGroupState as o,keptToggles as s,toggleIndexOfName as c}from"@gjsify/adwaita-core";import{Label as l,StackLayout as u}from"@nativescript/core";const d=`notify::selected`;var AdwToggleGroup=class extends n(u){static GTypeName=`AdwToggleGroup`;_toggles=[];_pendingActive=null;_pendingActiveName=null;_segments=[];_state=new o;constructor(e){super(),this.orientation=`horizontal`,this.className=`adw-toggle-group`,this.horizontalAlignment=`center`,this._state.subscribe(e=>{this._applySelection();let t={eventName:d,object:this,selected:e.selected,value:e.value};this.notify(t)}),t(this,e)}get options(){return this._toggles.map(e=>e.label)}set options(e){this.setToggles((Array.isArray(e)?e:[]).map(e=>({label:e})))}setToggles(e){this._rebuild(e),this._applyPending(!1)}_rebuild(e){for(let e of this._segments)this.removeChild(e);this._segments.length=0,this._toggles=s(Array.isArray(e)?e:[]),this._toggles.forEach((e,t)=>{let n=new u;if(n.orientation=`horizontal`,n.className=`adw-toggle-button`,n.horizontalAlignment=`center`,e.icon){let t=new r;t.className=`${t.className} adw-toggle-icon`.trim(),t.verticalAlignment=`middle`,t.iconName=e.icon,n.addChild(t)}let i=new l;i.text=e.label,i.className=`adw-toggle-label`,i.verticalAlignment=`middle`,n.addChild(i),n.addEventListener(`tap`,()=>{this._state.setSelected(t)}),this.addChild(n),this._segments.push(n)}),this._state.setLabels(this._toggles.map(e=>e.label)),this._applySelection()}_addChildFromBuilder(e,t){if(!(t instanceof i))throw Error(`Adw.ToggleGroup takes only Adw.Toggle children, not \`${t.constructor.name}\`.`);let n=this._toggles.length;this._rebuild([...this._toggles,{label:t.label,icon:t.iconName??void 0,name:t.name}]),this._toggles.length===n&&console.warn(`[AdwToggleGroup] a toggle named '${t.name}' already exists; this one is not added`),this._applyPending(!0)}_applyPending(e){if(this._pendingActive!==null&&this._pendingActive<this._toggles.length){let e=this._pendingActive;this._pendingActive=null,this._state.setSelected(e)}if(this._pendingActiveName!==null){let t=c(this._toggles.map(e=>e.name),this._pendingActiveName);e||(this._pendingActiveName=null),t!==-1&&this._state.setSelected(t)}}_applySelection(){let e=this._state.selected;this._segments.forEach((t,n)=>{t.className=n===e?`adw-toggle-button active`:`adw-toggle-button`})}get active(){return this._state.selected}set active(t){let n=e(t,this.active);if(n>=this._toggles.length){this._pendingActive=n;return}this._state.setSelected(n)}get activeName(){return this._toggles[this.active]?.name??null}set activeName(e){this._pendingActiveName=e,this._applyPending(!0)}get selectedValue(){return this._state.selectedValue}};export{AdwToggleGroup,d as NOTIFY_SELECTED,a as ToggleGroupState};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlNumber as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{withSignals as n}from"./signals.js";import{GtkImage as r}from"./gtk-image.js";import{AdwToggle as i}from"./adw-toggle.js";import{ToggleGroupState as a,ToggleGroupState as o,keptToggles as s,toggleIndexOfName as c}from"@gjsify/adwaita-core";import{Label as l,StackLayout as u}from"@nativescript/core";const d=`notify::selected`;var AdwToggleGroup=class extends n(u){static GTypeName=`AdwToggleGroup`;_toggles=[];_pendingActive=null;_pendingActiveName=null;_segments=[];_state=new o;constructor(e){super(),this.orientation=`horizontal`,this.className=`adw-toggle-group`,this.horizontalAlignment=`center`,this._state.subscribe(e=>{this._applySelection();let t={eventName:d,object:this,selected:e.selected,value:e.value};this.notify(t)}),t(this,e)}get options(){return this._toggles.map(e=>e.label)}set options(e){this.setToggles((Array.isArray(e)?e:[]).map(e=>({label:e})))}setToggles(e){this._rebuild(e),this._applyPending(!1)}_rebuild(e){for(let e of this._segments)this.removeChild(e);this._segments.length=0,this._toggles=s(Array.isArray(e)?e:[]),this._toggles.forEach((e,t)=>{let n=new u;if(n.orientation=`horizontal`,n.className=`adw-toggle-button`,n.horizontalAlignment=`center`,e.icon){let t=new r;t.className=`${t.className} adw-toggle-icon`.trim(),t.verticalAlignment=`middle`,t.iconName=e.icon,n.addChild(t)}let i=new l;i.text=e.label,i.className=`adw-toggle-label`,i.verticalAlignment=`middle`,n.addChild(i),n.addEventListener(`tap`,()=>{this._state.setSelected(t)}),this.addChild(n),this._segments.push(n)}),this._state.setLabels(this._toggles.map(e=>e.label)),this._applySelection()}_addChildFromBuilder(e,t){if(!(t instanceof i))throw Error(`Adw.ToggleGroup takes only Adw.Toggle children, not \`${t.constructor.name}\`.`);let n=this._toggles.length;this._rebuild([...this._toggles,{label:t.label,icon:t.iconName??void 0,name:t.name===``?null:t.name}]),this._toggles.length===n&&console.warn(`[AdwToggleGroup] a toggle named '${t.name}' already exists; this one is not added`),this._applyPending(!0)}_applyPending(e){if(this._pendingActive!==null&&this._pendingActive<this._toggles.length){let e=this._pendingActive;this._pendingActive=null,this._state.setSelected(e)}if(this._pendingActiveName!==null){let t=c(this._toggles.map(e=>e.name),this._pendingActiveName);e||(this._pendingActiveName=null),t!==-1&&this._state.setSelected(t)}}_applySelection(){let e=this._state.selected;this._segments.forEach((t,n)=>{t.className=n===e?`adw-toggle-button active`:`adw-toggle-button`})}get active(){return this._state.selected}set active(t){let n=e(t,this.active);if(n>=this._toggles.length){this._pendingActive=n;return}this._state.setSelected(n)}get activeName(){return this._toggles[this.active]?.name??null}set activeName(e){this._pendingActiveName=e,this._applyPending(!0)}get selectedValue(){return this._state.selectedValue}};export{AdwToggleGroup,d as NOTIFY_SELECTED,a as ToggleGroupState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{Observable as n}from"@nativescript/core";var AdwToggle=class extends t(n){static GTypeName=`AdwToggle`;_name=null;_label=``;_iconName=null;constructor(t){super(),e(this,t)}get name(){return this._name}set name(e){this._name=e}get label(){return this._label}set label(e){this._label=e??``}get iconName(){return this._iconName}set iconName(e){this._iconName=e}};export{AdwToggle};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{applyConstructProps as e}from"./construct-props.js";import{withSignals as t}from"./signals.js";import{Observable as n}from"@nativescript/core";var AdwToggle=class extends t(n){static GTypeName=`AdwToggle`;_name=null;_label=``;_iconName=null;constructor(t){super(),e(this,t)}get name(){return this._name??``}set name(e){this._name=e}get label(){return this._label}set label(e){this._label=e??``}get iconName(){return this._iconName}set iconName(e){this._iconName=e}};export{AdwToggle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{GTK_ALIGN as
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{gtkPropertyDoor as e}from"./shadowed-properties.js";import{GTK_ALIGN as t,NS_HORIZONTAL_ALIGNMENT as n,NS_VERTICAL_ALIGNMENT as r,gtkAlignRefusal as i}from"./gtk-align.js";import{iconSizeNickOf as a}from"./gtk-icon-size.js";const o={horizontalAlignment:`horizontal`,verticalAlignment:`vertical`},s={iconSize:!0};function settableDoor(e,t){for(let n=e;n!==null;n=Object.getPrototypeOf(n)){let e=Object.getOwnPropertyDescriptor(n,t);if(e!==void 0)return e.set===void 0?e.get===void 0&&e.writable===!0?`data`:null:`accessor`}return null}function nsAlignment(e,a){let o=a===`horizontal`?n:r,s=null;if(typeof e==`number`){if(s=Object.keys(t).find(n=>t[n]===e)??null,s===null)throw TypeError(`${e} is not a Gtk.Align constant. The seven members are ${Object.keys(t).join(`, `)}, holding the values ${[...new Set(Object.values(t))].join(`, `)}.`)}else typeof e==`string`&&Object.hasOwn(t,e)&&(s=e);if(s===null)return e;let c=o[s];if(c!==void 0)return c;throw TypeError(`Gtk.Align '${s}' has no ${a} counterpart in NativeScript: ${i(s)} The ${a} alignments that do are ${Object.keys(o).join(`, `)}.`)}function applyConstructProps(t,n){if(n!=null)for(let[r,i]of Object.entries(n)){let n=e(t,r);if(n.kind===`refused`)throw TypeError(`${t.constructor.name}: ${n.why}`);if(n.kind===`verbs`){i!==void 0&&t[n.set](i);continue}if(settableDoor(t,r)===null)throw TypeError(`${t.constructor.name} has no settable '${r}'. A construct-props bag goes through the declared setters, so a key nothing declares is refused here rather than left as a dead own-property that renders nothing — the silent drop \`xml-values.ts\` exists for one door over.`);if(i===void 0)continue;let c=o[r];t[r]=c===void 0?Object.hasOwn(s,r)?a(i):i:nsAlignment(i,c)}}export{applyConstructProps,nsAlignment};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{applyConstructProps as n}from"./construct-props.js";import{NOTIFY_HEXPAND as r,NOTIFY_VEXPAND as i}from"./widget-layout.js";import{AdwStyledLayoutBase as a}from"./styled-layout-base.js";import{DEFAULT_BOX_SPACING as o,boxChildTrack as s,boxSpacingChanges as c,boxTrackPlan as l,normalizeBoxSpacing as u,resolveBoxChildOrder as d}from"./box-layout.js";import{normalizeBoxOrientation as f}from"@gjsify/adwaita-core";import{GridLayout as p,ItemSpec as m}from"@nativescript/core";var GtkBox=class extends a{static GTypeName=`GtkBox`;_spacing=o;_orientation=`horizontal`;_homogeneous=!1;_trackKey=``;_followers=new Map;constructor(e){super(),n(this,e)}append(e){this.addChild(e)}prepend(e){this.insertChild(e,0)}remove(e){this.removeChild(e)}addChild(e){super.addChild(e),this._follow(e),this._applyChildren()}insertChild(e,t){super.insertChild(e,t)
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{applyConstructProps as n}from"./construct-props.js";import{NOTIFY_HEXPAND as r,NOTIFY_VEXPAND as i}from"./widget-layout.js";import{AdwStyledLayoutBase as a}from"./styled-layout-base.js";import{DEFAULT_BOX_SPACING as o,boxChildTrack as s,boxSpacingChanges as c,boxTrackPlan as l,normalizeBoxSpacing as u,resolveBoxChildOrder as d}from"./box-layout.js";import{normalizeBoxOrientation as f}from"@gjsify/adwaita-core";import{GridLayout as p,ItemSpec as m}from"@nativescript/core";var GtkBox=class extends a{static GTypeName=`GtkBox`;_spacing=o;_orientation=`horizontal`;_homogeneous=!1;_trackKey=``;_followers=new Map;constructor(e){super(),n(this,e)}append(e){this.addChild(e)}prepend(e){this.insertChild(e,0)}remove(e){this.removeChild(e)}addChild(e){super.addChild(e),this._follow(e),this._applyChildren()}insertChild(e,t){let n=super.insertChild(e,t);return this._follow(e),this._applyChildren(),n}removeChild(e){this._unfollow(e),super.removeChild(e),this._applyChildren()}insert_child_after(e,t=null){return this._applyOrder(`insert-after`,e,t)}reorder_child_after(e,t=null){return this._applyOrder(`reorder-after`,e,t)}get spacing(){return this._spacing}set spacing(e){let n=t(e,this._spacing);c(this._spacing,n)&&(this._spacing=u(n),this._applyChildren(),this.notify({eventName:`notify::spacing`,object:this}))}get orientation(){return this._orientation}set orientation(e){let t=f(e===1?`vertical`:e);t!==this._orientation&&(this._orientation=t,this._applyChildren(),this.notify({eventName:`notify::orientation`,object:this}))}get homogeneous(){return this._homogeneous}set homogeneous(t){let n=e(t,this._homogeneous);n!==this._homogeneous&&(this._homogeneous=n,this._applyChildren())}_childViews(){let e=[];for(let t=0;t<this.getChildrenCount();t++)e.push(this.getChildAt(t));return e}_applyOrder(e,t,n){let r=this._childViews(),i=d({children:r,child:t,sibling:n,op:e});return i===null?!1:(r.includes(t)&&this.removeChild(t),this.insertChild(t,i.indexOf(t)),!0)}_follow(e){if(this._followers.has(e))return;let follower=()=>this._applyChildren();this._followers.set(e,follower),e.addEventListener(r,follower),e.addEventListener(i,follower)}_unfollow(e){let t=this._followers.get(e);t!==void 0&&(e.removeEventListener(r,t),e.removeEventListener(i,t),this._followers.delete(e))}_applyChildren(){let e=this._orientation===`vertical`,t=this._childViews(),n=l(t.map(t=>{let n=t;return(e?n.vexpand:n.hexpand)===!0}),this._spacing,this._homogeneous),r=`${e?`v`:`h`}${n.map(({unit:e,value:t})=>`${e}${t}`).join(`,`)}`;if(r!==this._trackKey){this._trackKey=r,this.removeColumns(),this.removeRows();let cross=()=>new m(1,`star`),along=e=>{for(let{unit:t,value:r}of n)e(new m(r,t))};e?(this.addColumn(cross()),along(e=>this.addRow(e))):(this.addRow(cross()),along(e=>this.addColumn(e)))}for(let[n,r]of t.entries())p.setColumn(r,e?0:s(n)),p.setRow(r,e?s(n):0)}};export{o as DEFAULT_BOX_SPACING,GtkBox};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{GTK_POLICY_TYPES as e}from"./scrolled-window-policy.js";import{GTK_LICENSE as t}from"@gjsify/adwaita-core";const n=Object.freeze(Object.fromEntries(e.map((e,t)=>[e.toUpperCase(),t]))),r=Object.freeze({NONE:0,LTR:1,RTL:2}),
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{GTK_POLICY_TYPES as e}from"./scrolled-window-policy.js";import{GTK_LICENSE as t}from"@gjsify/adwaita-core";const n=Object.freeze(Object.fromEntries(e.map((e,t)=>[e.toUpperCase(),t]))),r=Object.freeze({UP:0,DOWN:1,LEFT:2,RIGHT:3,NONE:4}),i=Object.freeze({NONE:0,LTR:1,RTL:2}),a=Object.freeze({WIDGET:1,TEXT:2,LEFT:3,RIGHT:4,TOP:5,BOTTOM:6}),o=t,s=Object.freeze({WORD:0,LINE:1});export{r as ArrowType,o as License,n as PolicyType,i as TextDirection,s as TextExtendSelection,a as TextWindowType};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{applyConstructProps as n}from"./construct-props.js";import{lengthValue as r}from"./ns-length.js";import{AdwStyledLayoutBase as i}from"./styled-layout-base.js";import{gridChildAt as a,gridGap as o,gridSpacing as s,gridTrackCounts as c}from"./grid-state.js";import{GridLayout as l,ItemSpec as u}from"@nativescript/core";const d=[`colChange`,`rowChange`,`colSpanChange`,`rowSpanChange`];var GtkGrid=class extends i{static GTypeName=`GtkGrid`;_rowSpacing=0;_columnSpacing=0;_rowHomogeneous=!1;_columnHomogeneous=!1;_columnKey=``;_rowKey=``;_gaps=new Map;_followers=new Map;constructor(e){super(),n(this,e)}attach(e,t,n,r=1,i=1){e.column=t,e.row=n,e.columnSpan=r,e.rowSpan=i,this.addChild(e)}remove(e){this.removeChild(e)}get_child_at(e,t){return a(this._placed(),e,t)}addChild(e){super.addChild(e),this._follow(e),this._relayout()}insertChild(e,t){super.insertChild(e,t)
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{applyConstructProps as n}from"./construct-props.js";import{lengthValue as r}from"./ns-length.js";import{AdwStyledLayoutBase as i}from"./styled-layout-base.js";import{gridChildAt as a,gridGap as o,gridSpacing as s,gridTrackCounts as c}from"./grid-state.js";import{GridLayout as l,ItemSpec as u}from"@nativescript/core";const d=[`colChange`,`rowChange`,`colSpanChange`,`rowSpanChange`];var GtkGrid=class extends i{static GTypeName=`GtkGrid`;_rowSpacing=0;_columnSpacing=0;_rowHomogeneous=!1;_columnHomogeneous=!1;_columnKey=``;_rowKey=``;_gaps=new Map;_followers=new Map;constructor(e){super(),n(this,e)}attach(e,t,n,r=1,i=1){e.column=t,e.row=n,e.columnSpan=r,e.rowSpan=i,this.addChild(e)}remove(e){this.removeChild(e)}get_child_at(e,t){return a(this._placed(),e,t)}addChild(e){super.addChild(e),this._follow(e),this._relayout()}insertChild(e,t){let n=super.insertChild(e,t);return this._follow(e),this._relayout(),n}removeChild(e){this._unfollow(e),super.removeChild(e),this._relayout()}get rowSpacing(){return this._rowSpacing}set rowSpacing(e){let n=s(t(e,NaN),e,this._rowSpacing,`rowSpacing`);n!==this._rowSpacing&&(this._rowSpacing=n,this._relayout())}get columnSpacing(){return this._columnSpacing}set columnSpacing(e){let n=s(t(e,NaN),e,this._columnSpacing,`columnSpacing`);n!==this._columnSpacing&&(this._columnSpacing=n,this._relayout())}get rowHomogeneous(){return this._rowHomogeneous}set rowHomogeneous(t){let n=e(t,this._rowHomogeneous);n!==this._rowHomogeneous&&(this._rowHomogeneous=n,this._relayout())}get columnHomogeneous(){return this._columnHomogeneous}set columnHomogeneous(t){let n=e(t,this._columnHomogeneous);n!==this._columnHomogeneous&&(this._columnHomogeneous=n,this._relayout())}_childViews(){let e=[];for(let t=0;t<this.getChildrenCount();t++)e.push(this.getChildAt(t));return e}_placementOf(e){return{column:l.getColumn(e),row:l.getRow(e),columnSpan:l.getColumnSpan(e),rowSpan:l.getRowSpan(e)}}_placed(){return this._childViews().map(e=>({child:e,placement:this._placementOf(e)}))}_follow(e){if(this._followers.has(e))return;let follower=()=>this._relayout();this._followers.set(e,follower);for(let t of d)e.addEventListener(t,follower)}_unfollow(e){let t=this._followers.get(e);if(t!==void 0){for(let n of d)e.removeEventListener(n,t);this._followers.delete(e),this._withGap(e,{left:0,top:0}),this._gaps.delete(e)}}_withGap(e,t){let n=this._gaps.get(e)??{left:0,top:0};n.left!==t.left&&(e.marginLeft=(r(e.marginLeft)??0)-n.left+t.left),n.top!==t.top&&(e.marginTop=(r(e.marginTop)??0)-n.top+t.top),this._gaps.set(e,t)}_relayout(){let e=this._placed(),{columns:t,rows:n}=c(e.map(({placement:e})=>e));this._syncTracks(t,n);for(let{child:t,placement:n}of e)this._withGap(t,o(n,this._columnSpacing,this._rowSpacing))}_syncTracks(e,t){let n=`${e}:${this._columnHomogeneous}`,r=`${t}:${this._rowHomogeneous}`;if(n!==this._columnKey){this.removeColumns();for(let t=0;t<e;t++)this.addColumn(new u(1,this._columnHomogeneous?`star`:`auto`));this._columnKey=n}if(r!==this._rowKey){this.removeRows();for(let e=0;e<t;e++)this.addRow(new u(1,this._rowHomogeneous?`star`:`auto`));this._rowKey=r}}};export{GtkGrid};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{ACTIVATED as n}from"./adw-action-row.js";import{AdwStyledLayoutBase as r}from"./styled-layout-base.js";import{addMarkerClass as i,removeMarkerClass as a}from"./bottom-sheet-state.js";import{DEFAULT_LIST_SELECTION_MODE as o,selectionAfterModeChange as s,selectionAfterTap as c,selectionMode as l}from"./list-box-state.js";import{GridLayout as u,ItemSpec as d}from"@nativescript/core";const f=`row-activated`,p=`row-selected`,m=`adw-list-row-selected`,h=`adw-row-flush-top`;function markRow(e,t,n){let r=n?i(e.className,t):a(e.className,t);r!==(e.className??``)&&(e.className=r)}var GtkListBox=class extends r{static GTypeName=`GtkListBox`;_selectionMode=o;_activateOnSingleClick=!0;_showSeparators=!1;_acceptUnpairedRelease=!1;_selected=[];_listeners=new Map;constructor(e){super(),this.addColumn(new d(1,`star`)),t(this,e)}append(e){this.addChild(e)}prepend(e){this.insert(e,0)}insert(e,t){let n=this.getChildrenCount();if(t<0||t>=n){this.addChild(e);return}this.insertChild(e,t)}remove(e){this.removeChild(e)}remove_all(){for(let e of this._rowViews())this.removeChild(e)}get_row_at_index(e){return this._rowViews()[e]??null}addChild(e){super.addChild(e),this._adopt(e)}insertChild(e,t){super.insertChild(e,t)
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e}from"./xml-values.js";import{applyConstructProps as t}from"./construct-props.js";import{ACTIVATED as n}from"./adw-action-row.js";import{AdwStyledLayoutBase as r}from"./styled-layout-base.js";import{addMarkerClass as i,removeMarkerClass as a}from"./bottom-sheet-state.js";import{DEFAULT_LIST_SELECTION_MODE as o,selectionAfterModeChange as s,selectionAfterTap as c,selectionMode as l}from"./list-box-state.js";import{GridLayout as u,ItemSpec as d}from"@nativescript/core";const f=`row-activated`,p=`row-selected`,m=`adw-list-row-selected`,h=`adw-row-flush-top`;function markRow(e,t,n){let r=n?i(e.className,t):a(e.className,t);r!==(e.className??``)&&(e.className=r)}var GtkListBox=class extends r{static GTypeName=`GtkListBox`;_selectionMode=o;_activateOnSingleClick=!0;_showSeparators=!1;_acceptUnpairedRelease=!1;_selected=[];_listeners=new Map;constructor(e){super(),this.addColumn(new d(1,`star`)),t(this,e)}append(e){this.addChild(e)}prepend(e){this.insert(e,0)}insert(e,t){let n=this.getChildrenCount();if(t<0||t>=n){this.addChild(e);return}this.insertChild(e,t)}remove(e){this.removeChild(e)}remove_all(){for(let e of this._rowViews())this.removeChild(e)}get_row_at_index(e){return this._rowViews()[e]??null}addChild(e){super.addChild(e),this._adopt(e)}insertChild(e,t){let n=super.insertChild(e,t);return this._adopt(e),n}removeChild(e){this._release(e),super.removeChild(e),this._renumber()}_addChildFromBuilder(e,t){this.append(t)}get_selected_row(){return this._selected[0]??null}get_selected_rows(){return this._rowViews().filter(e=>this._selected.includes(e))}select_row(e){if(e===null){this.unselect_all();return}this._selectionMode===`none`||!this._rowViews().includes(e)||this._setSelected(this._selectionMode===`multiple`?[...this._selected,e]:[e])}unselect_row(e){this._setSelected(this._selected.filter(t=>t!==e))}select_all(){this._selectionMode===`multiple`&&this._setSelected(this._rowViews())}unselect_all(){this._setSelected([])}get selectionMode(){return this._selectionMode}set selectionMode(e){this._selectionMode=l(e),this._setSelected(s(this._selectionMode,this._selected))}get activateOnSingleClick(){return this._activateOnSingleClick}set activateOnSingleClick(t){this._activateOnSingleClick=e(t,this._activateOnSingleClick)}get showSeparators(){return this._showSeparators}set showSeparators(t){this._showSeparators=e(t,this._showSeparators)}get acceptUnpairedRelease(){return this._acceptUnpairedRelease}set acceptUnpairedRelease(t){this._acceptUnpairedRelease=e(t,this._acceptUnpairedRelease)}_rowViews(){let e=[];for(let t=0;t<this.getChildrenCount();t++)e.push(this.getChildAt(t));return e}_renumber(){let e=this._rowViews();this.removeRows();for(let[t,n]of e.entries())this.addRow(new d(1,`auto`)),u.setColumn(n,0),u.setRow(n,t),markRow(n,h,t===0)}_adopt(e){if(this._renumber(),this._listeners.has(e))return;let t={tap:()=>{this._tapped(e),`activatable`in e||this._activated(e)},activated:()=>this._activated(e)};this._listeners.set(e,t),e.addEventListener(`tap`,t.tap),e.addEventListener(n,t.activated)}_release(e){let t=this._listeners.get(e);t!==void 0&&(e.removeEventListener(`tap`,t.tap),e.removeEventListener(n,t.activated),this._listeners.delete(e)),markRow(e,h,!1),markRow(e,m,!1),this._selected.includes(e)&&this._setSelected(this._selected.filter(t=>t!==e))}_tapped(e){this._setSelected(c(this._selectionMode,this._selected,e))}_activated(e){let t={eventName:f,object:this,row:e};this.notify(t)}_setSelected(e){let t=this._selected;if(t.length===e.length&&t.every((t,n)=>t===e[n]))return;for(let n of t)e.includes(n)||markRow(n,m,!1);for(let t of e)markRow(t,m,!0);this._selected=[...e];let n={eventName:p,object:this,row:this._selected[0]??null};this.notify(n)}};export{GtkListBox,f as LIST_BOX_ROW_ACTIVATED,p as LIST_BOX_ROW_SELECTED,m as LIST_ROW_SELECTED_CLASS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{applyConstructProps as n}from"./construct-props.js";import{windowHost as r}from"../window-host.js";import{AdwSingleChildBase as i}from"./single-child-base.js";import{surfaceSize as a}from"./window-state.js";import{CloseRequestState as o,HandledAccumulator as s,WindowMemberState as c}from"@gjsify/adwaita-core";const l=`notify::is-active`,u=`notify::maximized`,d=`notify::focus-widget`,f=`close-request`;var
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{xmlBoolean as e,xmlNumber as t}from"./xml-values.js";import{applyConstructProps as n}from"./construct-props.js";import{windowHost as r}from"../window-host.js";import{AdwSingleChildBase as i}from"./single-child-base.js";import{surfaceSize as a}from"./window-state.js";import{CloseRequestState as o,HandledAccumulator as s,WindowMemberState as c}from"@gjsify/adwaita-core";const l=`notify::is-active`,u=`notify::maximized`,d=`notify::focus-widget`,f=`close-request`;var p=class GtkWindow extends i{static GTypeName=`GtkWindow`;_title=``;_defaultWidth=0;_defaultHeight=0;_members=new c(e=>{let t=e===`is-active`?l:u;this.notify({eventName:t,object:this,value:e===`is-active`?this.isActive:this.maximized})},{maximized:!0});_closeRequest=new o;_unwatchForeground=null;_unwatchBack=null;constructor(e){super(),n(this,e)}onLoaded(){super.onLoaded();let e=r();this._unwatchForeground?.(),this._unwatchForeground=e.watchForeground(e=>this._members.reportActive(e)),this._members.reportActive(e.isForeground()),this._unwatchBack?.(),this._unwatchBack=this._isToplevel()?e.watchBack(()=>this._handleBack()):null}onUnloaded(){this._unwatchForeground?.(),this._unwatchForeground=null,this._unwatchBack?.(),this._unwatchBack=null,this._members.reportActive(!1),super.onUnloaded()}get isActive(){return this._members.active}is_active(){return this.isActive}get maximized(){return this._members.maximized}set maximized(t){e(t,!0)?this.maximize():this.unmaximize()}is_maximized(){return this.maximized}maximize(){}unmaximize(){throw Error(`GtkWindow.unmaximize is not supported on NativeScript: the window is the whole screen and the platform has no un-maximized state to go back to.`)}present(){}get focusWidget(){return this.get_focus()}get_focus(){let e=r();return findView(this,t=>e.isFocused(t))}set_focus(e){let t=r();if(e===null){let e=this.get_focus();e!==null&&t.clearFocus(e);return}if(findView(this,t=>t===e)===null)throw Error(`GtkWindow.set_focus: the widget is not a descendant of this window.`);t.requestFocus(e)}close(){let e=r();if(this.isLoaded&&!e.canFinish)throw Error(`GtkWindow.close is not supported on this platform: iOS has no public API to close the root window. Android finishes the foreground activity.`);this._requestClose()}_requestClose(){let e=r();this._closeRequest.close({realized:this.isLoaded,hideOnClose:!1,emit:()=>{let e=new s;return this.notify({eventName:f,object:this,accumulator:e}),e.stopped},hide:()=>{},destroy:()=>e.finish()})}_handleBack(){return this._consumeBack()||popInnermostNavigation(this)||this._requestClose(),!0}_consumeBack(){return!1}_isToplevel(){for(let e=this.parent;e;e=e.parent)if(e instanceof GtkWindow)return!1;return!0}connect(e,t){if(e===`notify::focus-widget`)throw Error(`GtkWindow notify::focus-widget is not supported on NativeScript: focus the user moves is not observable here. Read get_focus() when you need it.`);return super.connect(e,t)}get title(){return this._title}set title(e){this._title=e??``}get defaultWidth(){return this._defaultWidth}set defaultWidth(e){this._defaultWidth=a(t(e,NaN),e,this._defaultWidth,`defaultWidth`)}get defaultHeight(){return this._defaultHeight}set defaultHeight(e){this._defaultHeight=a(t(e,NaN),e,this._defaultHeight,`defaultHeight`)}};function findView(e,t){let n=null;return e.eachChildView(e=>t(e)?(n=e,!1):(n=findView(e,t),n===null)),n}const popsOnBack=e=>typeof e.popFromShortcut==`function`;function popInnermostNavigation(e){let t=!1;return e.eachChildView(e=>e.visibility===`visible`&&(popInnermostNavigation(e)||popsOnBack(e)&&e.isLoaded&&e.popFromShortcut()===`stop`)?(t=!0,!1):!0),t}export{f as CLOSE_REQUEST,p as GtkWindow,d as NOTIFY_FOCUS_WIDGET,l as NOTIFY_IS_ACTIVE,u as NOTIFY_MAXIMIZED};
|
package/lib/esm/widgets/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{AdwBreakpoint as ee,addBreakpoints as e,evaluateBreakpointCondition as te,observeViewSize as ne,observeWindowSize as re,parseBreakpointCondition as ie}from"./breakpoint.js";import{GTK_ALIGN as ae}from"./gtk-align.js";import{DEFAULT_ICON_PIXEL_SIZE as oe,GTK_ICON_SIZE_NICKS as se,GTK_ICON_SIZE_PIXELS as ce,PIXEL_SIZE_UNSET as le,isGtkIconSizeNick as ue}from"./gtk-icon-size.js";import{applyConstructProps as de,nsAlignment as fe}from"./construct-props.js";import{lengthValue as pe}from"./ns-length.js";import{SimpleAction as me,SimpleActionGroup as he,activateWidgetAction as ge,findActionGroup as _e,insertActionGroup as ve}from"./actions.js";import{NOTIFY_HEXPAND as ye,NOTIFY_VEXPAND as be,withGtkWidgetLayout as xe}from"./widget-layout.js";import{AdwAboutDialog as t,CLOSED as Se}from"./adw-about-dialog.js";import{ACTIVATED as Ce,AdwActionRow as n}from"./adw-action-row.js";import{AdwAlertDialog as we,AdwAlertResponses as Te,NOTIFY_RESPONSE as Ee}from"./adw-alert-dialog.js";import{DEFAULT_REVEALER_TRANSITION_DURATION as De,DEFAULT_STACK_TRANSITION_DURATION as Oe,GTK_REVEALER_TRANSITIONS as ke,GTK_STACK_TRANSITIONS as Ae,transitionNick as je}from"./transition-type.js";import{ADW_DIALOG_PRESENTATION_MODES as Me,DEFAULT_DIALOG_PRESENTATION_MODE as Ne,dialogPresentationMode as Pe,findDialogHost as Fe,surfaceSize as Ie}from"./window-state.js";import{GtkWindow as r}from"./gtk-window.js";import{ADW_WINDOW_CLASS as Le,AdwWindowBase as Re}from"./window-base.js";import{AdwApplicationWindow as i}from"./adw-application-window.js";import{avatarInitials as ze}from"./avatar-color.js";import{AVATAR_DEFAULT_ICON as Be}from"./avatar-view.js";import{adwaitaColorScheme as Ve,isThemeIconColor as He,onAdwaitaColorSchemeChanged as Ue,setAdwaitaColorScheme as We,themeIconColor as Ge,toggleAdwaitaColorScheme as Ke}from"./color-scheme.js";import{ADWAITA_ICON_GRID as qe,DEFAULT_ICON_COLOR as Je,DEFAULT_ICON_COLOR_DARK as Ye,extractIconPaths as Xe,extractPathData as Ze}from"./icon-path.js";import{ICON_FALLBACK_NAME as Qe,compiledIconNames as $e,iconValueKind as et,isIconAvailable as tt,registerIcon as nt,registerIcons as rt,registeredIconNames as it,resolveIconSource as at,unregisterIcon as ot}from"./icon-theme.js";import{renderSymbolicIcon as st}from"./icons.js";import{DEFAULT_GTK_IMAGE_SIZE as ct,GtkImage as a}from"./gtk-image.js";import{AdwAvatar as o,DEFAULT_AVATAR_SIZE as lt}from"./adw-avatar.js";import{DEFAULT_CLAMP_MAX_SIZE as ut,DEFAULT_SPINNER_SIZE as dt}from"./chrome.js";import{AdwBanner as s,BUTTON_CLICKED as ft}from"./adw-banner.js";import{AdwBin as c}from"./adw-bin.js";import{CLOSE_ATTEMPT as pt,NOTIFY_OPEN as mt,SHEET_CLOSE as ht}from"./bottom-sheet-state.js";import{SHEET_CONTENT_BOTTOM_GAP as gt,bottomSheetInsetPadding as _t}from"./bottom-sheet-insets.js";import{attachRowPressFeedback as vt}from"./row-press.js";import{AdwBottomSheet as l,bottomSheetPanel as yt}from"./adw-bottom-sheet.js";import{AdwButtonContent as u}from"./adw-button-content.js";import{AdwButtonRow as d}from"./adw-button-row.js";import{CarouselScrollSync as bt,DEFAULT_CAROUSEL_PAGE_WIDTH as xt,applyMarkerClasses as St,carouselDotClasses as Ct,carouselNotifyPayload as wt,carouselPositionAtOffset as Tt,carouselScrollOffset as Et,createCarouselState as Dt,indicatorMarkerClasses as Ot,normalizeCarouselPageWidth as kt}from"./carousel-state.js";import{AdwCarousel as f,NOTIFY_N_PAGES as At,NOTIFY_POSITION as jt,PAGE_CHANGED as Mt}from"./adw-carousel.js";import{AdwCarouselIndicatorDots as p}from"./adw-carousel-indicator-dots.js";import{AdwCarouselIndicatorLines as m}from"./adw-carousel-indicator-lines.js";import{AdwClamp as h}from"./adw-clamp.js";import{AdwComboRow as g,ComboState as Nt,NOTIFY_SELECTED as Pt}from"./adw-combo-row.js";import{ADW_DIALOG_CLASS as Ft,ADW_DIALOG_CLOSED as It,ADW_DIALOG_CLOSE_ATTEMPT as Lt,AdwDialog as _}from"./adw-dialog.js";import{AdwImageButton as v,DEFAULT_ICON_BUTTON_ICON_SIZE as Rt}from"./adw-image-button.js";import{AdwEntryRow as y,NOTIFY_TEXT as zt}from"./adw-entry-row.js";import{AdwExpanderRow as b,ExpanderState as Bt,NOTIFY_EXPANDED as Vt}from"./adw-expander-row.js";import{AdwWindowTitle as x}from"./adw-window-title.js";import{AdwHeaderBar as S}from"./adw-header-bar.js";import{AdwViewStackPage as Ht}from"./view-stack-page.js";import{AdwViewStack as C,NOTIFY_VISIBLE_CHILD as Ut}from"./adw-view-stack.js";import{AdwViewSwitcherBase as Wt,NOTIFY_SELECTED as Gt}from"./view-switcher-base.js";import{AdwInlineViewSwitcher as w}from"./adw-inline-view-switcher.js";import{NsNavigationSplitViewState as Kt,NsOverlaySplitViewState as qt,splitViewColumns as Jt}from"./split-view-state.js";import{AdwSplitViewBase as Yt,NOTIFY_SHOW_SIDEBAR as Xt}from"./split-view-base.js";import{AdwNavigationSplitView as T}from"./adw-navigation-split-view.js";import{AdwNavigationPage as E}from"./adw-navigation-page.js";import{NOTIFY_VISIBLE_PAGE as Zt}from"./navigation-stack.js";import{AdwNavigationView as D}from"./adw-navigation-view.js";import{AdwOverlaySplitView as O}from"./adw-overlay-split-view.js";import{AdwPasswordEntryRow as k}from"./adw-password-entry-row.js";import{AdwPreferencesDialog as A,CLOSED as Qt}from"./adw-preferences-dialog.js";import{AdwPreferencesGroup as j}from"./adw-preferences-group.js";import{AdwPreferencesPage as M}from"./adw-preferences-page.js";import{SHORTCUT_LABEL_CAP_TEXT_CLASS as $t,SHORTCUT_LABEL_CLASS as en,SHORTCUT_LABEL_DIMMED_CLASS as tn,SHORTCUT_LABEL_DISABLED_CLASS as nn,SHORTCUT_LABEL_KEYCAP_CLASS as rn,SHORTCUT_LABEL_KEYS_CLASS as an,SHORTCUT_LABEL_SIDE_CLASS as on,SHORTCUT_LABEL_SPACED_CLASS as sn,shortcutLabelDirection as cn,shortcutLabelPlatform as ln,shortcutLabelRenderPlan as un}from"./shortcut-label.js";import{AdwShortcutLabel as N}from"./adw-shortcut-label.js";import{AdwSidebarItem as dn,AdwSidebarSection as fn}from"../values/sidebar.js";import{AdwSidebar as P,NOTIFY_SELECTED as pn}from"./adw-sidebar.js";import{AdwSpinRow as F,NOTIFY_VALUE as mn,SpinState as hn}from"./adw-spin-row.js";import{AdwSpinner as I}from"./adw-spinner.js";import{GROUP_DIVIDER_API as gn,assertPopupMenuAssignable as _n,fillPopupMenu as vn,openPopupMenu as yn,refuseMenuString as bn}from"./popup-menu.js";import{showMenuPopup as xn}from"./popup-menu-view.js";import{AdwSplitButton as L,CLICKED as Sn,MENU_TAPPED as Cn}from"./adw-split-button.js";import{AdwStatusPage as R}from"./adw-status-page.js";import{AdwSwitchRow as z,NOTIFY_ACTIVE as wn}from"./adw-switch-row.js";import{AdwTabPage as Tn}from"../values/tab-page.js";import{applyTabViewVisibility as En,createTabViewState as Dn,tabBarVisibility as On,tabCloseVisibilities as kn,tabLabelText as An,tabPageVisibilities as jn,tabTooltipText as Mn,tabViewNotifyPayload as Nn}from"./tab-view-state.js";import{AdwTabView as B,CLOSE_PAGE as Pn,NOTIFY_SELECTED_PAGE as Fn,PAGES_CHANGED as In}from"./adw-tab-view.js";import{AdwToast as Ln,AdwToastOverlay as V,AdwToastQueue as Rn,DEFAULT_TOAST_TIMEOUT as zn,TOAST_BUTTON_CLICKED as Bn}from"./adw-toast-overlay.js";import{AdwToggle as Vn}from"./adw-toggle.js";import{AdwToggleGroup as H,NOTIFY_SELECTED as Hn,ToggleGroupState as Un}from"./adw-toggle-group.js";import{WINDOW_BACKGROUND as Wn,configureSystemBars as Gn,systemBarsConfig as Kn}from"./system-bars.js";import{AdwToolbarView as U}from"./adw-toolbar-view.js";import{AdwViewSwitcher as W}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as G}from"./adw-view-switcher-bar.js";import{AdwWindow as K}from"./adw-window.js";import{AdwWrapBox as q}from"./adw-wrap-box.js";import{DEFAULT_SCROLLBAR_POLICY as qn,GTK_POLICY_TYPES as Jn,normalizePolicy as Yn,policyScrolls as Xn,scrollOrientationFor as Zn}from"./scrolled-window-policy.js";import{GtkActionBar as J}from"./gtk-action-bar.js";import{DEFAULT_BOX_SPACING as Qn,boxChildTrack as $n,boxSpacingChanges as er,boxTrackPlan as tr,normalizeBoxSpacing as nr}from"./box-layout.js";import{GtkBox as Y}from"./gtk-box.js";import{buttonSlotAfterWrite as rr,buttonSlotDetaches as ir}from"./button-slot.js";import{GTK_BUTTON_CLICKED as ar,GTK_BUTTON_LABEL_CLASS as or,GtkButton as X}from"./gtk-button.js";import{GtkDropDown as Z,NOTIFY_SELECTED as sr}from"./gtk-drop-down.js";import{GTK_CHECK_BUTTON_ACTIVATE as cr,GTK_CHECK_BUTTON_CHECKED_CLASS as lr,GTK_CHECK_BUTTON_INCONSISTENT_CLASS as ur,GTK_CHECK_BUTTON_TOGGLED as dr,GtkCheckButton as Q,NOTIFY_CHECK_ACTIVE as fr}from"./gtk-check-button.js";import{DRAWING_AREA_REFUSAL as pr,GtkDrawingArea as $}from"./gtk-drawing-area.js";import{ACTIVATE as mr,GtkEntry as hr,NOTIFY_TEXT as gr}from"./gtk-entry.js";import{gridChildAt as _r,gridGap as vr,gridSpacing as yr,gridTrackCounts as br}from"./grid-state.js";import{GtkGrid as xr}from"./gtk-grid.js";import{GtkFrame as Sr}from"./gtk-frame.js";import{GtkLabel as Cr}from"./gtk-label.js";import{DEFAULT_LIST_SELECTION_MODE as wr,GTK_SELECTION_MODES as Tr,selectionAfterModeChange as Er,selectionAfterTap as Dr,selectionMode as Or}from"./list-box-state.js";import{GtkListBox as kr,LIST_BOX_ROW_ACTIVATED as Ar,LIST_BOX_ROW_SELECTED as jr,LIST_ROW_SELECTED_CLASS as Mr}from"./gtk-list-box.js";import{GtkMenuButton as Nr,MENU_ITEM_ACTIVATED as Pr}from"./gtk-menu-button.js";import{GtkPopoverMenu as Fr}from"./gtk-popover-menu.js";import{GtkOverlay as Ir}from"./gtk-overlay.js";import{revealerChildVisibility as Lr}from"./revealer-state.js";import{GtkRevealer as Rr,NOTIFY_REVEAL_CHILD as zr}from"./gtk-revealer.js";import{GtkScrolledWindow as Br}from"./gtk-scrolled-window.js";import{GtkSeparator as Vr}from"./gtk-separator.js";import{GtkStackPage as Hr}from"./stack-page.js";import{GtkStack as Ur,NOTIFY_STACK_VISIBLE_CHILD as Wr,NOTIFY_STACK_VISIBLE_CHILD_NAME as Gr}from"./gtk-stack.js";import{GTK_WRAP_MODES as Kr,GtkTextView as qr,NOTIFY_TEXT_VIEW_TEXT as Jr}from"./gtk-text-view.js";import{GTK_TOGGLE_BUTTON_CHECKED_CLASS as Yr,GTK_TOGGLE_BUTTON_TOGGLED as Xr,GtkToggleButton as Zr,NOTIFY_TOGGLE_ACTIVE as Qr}from"./gtk-toggle-button.js";import{AdwSliderRow as $r,NOTIFY_SLIDER_VALUE as ei}from"./adw-slider-row.js";import{DATA_GRID_HEADER_CELL_CLASS as ti,DATA_GRID_HEADER_ROW_CLASS as ni,DATA_GRID_SECTION_CELL_CLASS as ri,dataGridCellClass as ii,dataGridItemSpec as ai,dataGridRowClass as oi,dataGridShapeKey as si,dataGridTracksKey as ci,parseDataGridWidth as li}from"./data-grid-model.js";import{AdwDataGrid as ui,ROW_ACTIVATED as di}from"./adw-data-grid.js";import{ADWAITA_NS_ACCENT_RULES as fi,adwaitaNsAccentColor as pi,adwaitaNsAccentCss as mi}from"./accent-theme.js";import{applyAdwaitaNsAccent as hi,clearAdwaitaNsAccent as gi}from"./adw-accent.js";import{padForSystemInsets as _i,padSheetForSystemInsets as vi}from"./system-insets.js";import{labelDisplayText as yi,labelMarkupIsUnparseable as bi}from"@gjsify/adwaita-core";const xi={AdwPreferencesPage:M,AdwPreferencesGroup:j,AdwActionRow:n,AdwSwitchRow:z,AdwEntryRow:y,AdwPasswordEntryRow:k,GtkEntry:hr,AdwComboRow:g,GtkDropDown:Z,AdwSpinRow:F,AdwSliderRow:$r,AdwExpanderRow:b,GtkButton:X,GtkBox:Y,GtkGrid:xr,GtkListBox:kr,AdwWindow:K,AdwApplicationWindow:i,AdwDialog:_,GtkActionBar:J,AdwBin:c,GtkOverlay:Ir,GtkRevealer:Rr,GtkScrolledWindow:Br,GtkWindow:r,GtkStack:Ur,GtkToggleButton:Zr,GtkCheckButton:Q,GtkDrawingArea:$,GtkFrame:Sr,GtkSeparator:Vr,GtkTextView:qr,GtkLabel:Cr,AdwImageButton:v,GtkMenuButton:Nr,GtkImage:a,AdwBanner:s,AdwAvatar:o,AdwWindowTitle:x,AdwClamp:h,AdwHeaderBar:S,AdwToolbarView:U,AdwWrapBox:q,AdwDataGrid:ui,AdwSpinner:I,AdwStatusPage:R,AdwButtonRow:d,AdwButtonContent:u,AdwSplitButton:L,AdwToggleGroup:H,AdwShortcutLabel:N,AdwViewStack:C,AdwViewSwitcher:W,AdwViewSwitcherBar:G,AdwInlineViewSwitcher:w,AdwTabView:B,AdwCarousel:f,AdwCarouselIndicatorDots:p,AdwCarouselIndicatorLines:m,AdwNavigationPage:E,AdwNavigationView:D,AdwNavigationSplitView:T,AdwOverlaySplitView:O,AdwSidebar:P,AdwBottomSheet:l,AdwToastOverlay:V,AdwAboutDialog:t,AdwPreferencesDialog:A};let Si=!1;function registerAdwaitaElements(){if(!Si&&typeof registerElement==`function`){for(let[ee,e]of Object.entries(xi))registerElement(ee,()=>e);Si=!0}}export{Se as ABOUT_CLOSED,Ce as ACTIVATED,qe as ADWAITA_ICON_GRID,fi as ADWAITA_NS_ACCENT_RULES,Ft as ADW_DIALOG_CLASS,It as ADW_DIALOG_CLOSED,Lt as ADW_DIALOG_CLOSE_ATTEMPT,Me as ADW_DIALOG_PRESENTATION_MODES,Le as ADW_WINDOW_CLASS,Be as AVATAR_DEFAULT_ICON,t as AdwAboutDialog,n as AdwActionRow,we as AdwAlertDialog,Te as AdwAlertResponses,i as AdwApplicationWindow,o as AdwAvatar,s as AdwBanner,c as AdwBin,l as AdwBottomSheet,ee as AdwBreakpoint,u as AdwButtonContent,d as AdwButtonRow,f as AdwCarousel,p as AdwCarouselIndicatorDots,m as AdwCarouselIndicatorLines,h as AdwClamp,g as AdwComboRow,ui as AdwDataGrid,_ as AdwDialog,y as AdwEntryRow,b as AdwExpanderRow,S as AdwHeaderBar,v as AdwImageButton,w as AdwInlineViewSwitcher,E as AdwNavigationPage,T as AdwNavigationSplitView,D as AdwNavigationView,O as AdwOverlaySplitView,k as AdwPasswordEntryRow,A as AdwPreferencesDialog,j as AdwPreferencesGroup,M as AdwPreferencesPage,N as AdwShortcutLabel,P as AdwSidebar,dn as AdwSidebarItem,fn as AdwSidebarSection,$r as AdwSliderRow,F as AdwSpinRow,I as AdwSpinner,L as AdwSplitButton,Yt as AdwSplitViewBase,R as AdwStatusPage,z as AdwSwitchRow,Tn as AdwTabPage,B as AdwTabView,Ln as AdwToast,V as AdwToastOverlay,Rn as AdwToastQueue,Vn as AdwToggle,H as AdwToggleGroup,U as AdwToolbarView,C as AdwViewStack,Ht as AdwViewStackPage,W as AdwViewSwitcher,G as AdwViewSwitcherBar,Wt as AdwViewSwitcherBase,K as AdwWindow,Re as AdwWindowBase,x as AdwWindowTitle,q as AdwWrapBox,ft as BUTTON_CLICKED,Sn as CLICKED,pt as CLOSE_ATTEMPT,Pn as CLOSE_PAGE,bt as CarouselScrollSync,Nt as ComboState,ti as DATA_GRID_HEADER_CELL_CLASS,ni as DATA_GRID_HEADER_ROW_CLASS,ri as DATA_GRID_SECTION_CELL_CLASS,lt as DEFAULT_AVATAR_SIZE,Qn as DEFAULT_BOX_SPACING,xt as DEFAULT_CAROUSEL_PAGE_WIDTH,ut as DEFAULT_CLAMP_MAX_SIZE,Ne as DEFAULT_DIALOG_PRESENTATION_MODE,ct as DEFAULT_GTK_IMAGE_SIZE,Rt as DEFAULT_ICON_BUTTON_ICON_SIZE,Je as DEFAULT_ICON_COLOR,Ye as DEFAULT_ICON_COLOR_DARK,oe as DEFAULT_ICON_PIXEL_SIZE,wr as DEFAULT_LIST_SELECTION_MODE,De as DEFAULT_REVEALER_TRANSITION_DURATION,qn as DEFAULT_SCROLLBAR_POLICY,dt as DEFAULT_SPINNER_SIZE,Oe as DEFAULT_STACK_TRANSITION_DURATION,zn as DEFAULT_TOAST_TIMEOUT,pr as DRAWING_AREA_REFUSAL,mr as ENTRY_ACTIVATE,Bt as ExpanderState,gn as GROUP_DIVIDER_API,ae as GTK_ALIGN,ar as GTK_BUTTON_CLICKED,or as GTK_BUTTON_LABEL_CLASS,cr as GTK_CHECK_BUTTON_ACTIVATE,lr as GTK_CHECK_BUTTON_CHECKED_CLASS,ur as GTK_CHECK_BUTTON_INCONSISTENT_CLASS,dr as GTK_CHECK_BUTTON_TOGGLED,se as GTK_ICON_SIZE_NICKS,ce as GTK_ICON_SIZE_PIXELS,Jn as GTK_POLICY_TYPES,ke as GTK_REVEALER_TRANSITIONS,Tr as GTK_SELECTION_MODES,Ae as GTK_STACK_TRANSITIONS,Yr as GTK_TOGGLE_BUTTON_CHECKED_CLASS,Xr as GTK_TOGGLE_BUTTON_TOGGLED,Kr as GTK_WRAP_MODES,J as GtkActionBar,Y as GtkBox,X as GtkButton,Q as GtkCheckButton,$ as GtkDrawingArea,Z as GtkDropDown,hr as GtkEntry,Sr as GtkFrame,xr as GtkGrid,a as GtkImage,Cr as GtkLabel,kr as GtkListBox,Nr as GtkMenuButton,Ir as GtkOverlay,Fr as GtkPopoverMenu,Rr as GtkRevealer,Br as GtkScrolledWindow,Vr as GtkSeparator,Ur as GtkStack,Hr as GtkStackPage,qr as GtkTextView,Zr as GtkToggleButton,r as GtkWindow,Qe as ICON_FALLBACK_NAME,Ar as LIST_BOX_ROW_ACTIVATED,jr as LIST_BOX_ROW_SELECTED,Mr as LIST_ROW_SELECTED_CLASS,Pr as MENU_ITEM_ACTIVATED,Cn as MENU_TAPPED,wn as NOTIFY_ACTIVE,fr as NOTIFY_CHECK_ACTIVE,sr as NOTIFY_DROP_DOWN_SELECTED,gr as NOTIFY_ENTRY_TEXT,Vt as NOTIFY_EXPANDED,ye as NOTIFY_HEXPAND,At as NOTIFY_N_PAGES,mt as NOTIFY_OPEN,jt as NOTIFY_POSITION,Ee as NOTIFY_RESPONSE,zr as NOTIFY_REVEAL_CHILD,Pt as NOTIFY_SELECTED,Fn as NOTIFY_SELECTED_PAGE,Xt as NOTIFY_SHOW_SIDEBAR,pn as NOTIFY_SIDEBAR_SELECTED,ei as NOTIFY_SLIDER_VALUE,Wr as NOTIFY_STACK_VISIBLE_CHILD,Gr as NOTIFY_STACK_VISIBLE_CHILD_NAME,zt as NOTIFY_TEXT,Jr as NOTIFY_TEXT_VIEW_TEXT,Qr as NOTIFY_TOGGLE_ACTIVE,Hn as NOTIFY_TOGGLE_SELECTED,mn as NOTIFY_VALUE,be as NOTIFY_VEXPAND,Gt as NOTIFY_VIEW_SELECTED,Ut as NOTIFY_VISIBLE_CHILD,Zt as NOTIFY_VISIBLE_PAGE,Kt as NsNavigationSplitViewState,qt as NsOverlaySplitViewState,In as PAGES_CHANGED,Mt as PAGE_CHANGED,le as PIXEL_SIZE_UNSET,Qt as PREFERENCES_CLOSED,di as ROW_ACTIVATED,ht as SHEET_CLOSE,gt as SHEET_CONTENT_BOTTOM_GAP,$t as SHORTCUT_LABEL_CAP_TEXT_CLASS,en as SHORTCUT_LABEL_CLASS,tn as SHORTCUT_LABEL_DIMMED_CLASS,nn as SHORTCUT_LABEL_DISABLED_CLASS,rn as SHORTCUT_LABEL_KEYCAP_CLASS,an as SHORTCUT_LABEL_KEYS_CLASS,on as SHORTCUT_LABEL_SIDE_CLASS,sn as SHORTCUT_LABEL_SPACED_CLASS,me as SimpleAction,he as SimpleActionGroup,hn as SpinState,Bn as TOAST_BUTTON_CLICKED,Un as ToggleGroupState,Wn as WINDOW_BACKGROUND,ge as activateWidgetAction,e as addBreakpoints,Ve as adwaitaColorScheme,pi as adwaitaNsAccentColor,mi as adwaitaNsAccentCss,hi as applyAdwaitaNsAccent,de as applyConstructProps,St as applyMarkerClasses,En as applyTabViewVisibility,_n as assertPopupMenuAssignable,vt as attachRowPressFeedback,ze as avatarInitials,_t as bottomSheetInsetPadding,yt as bottomSheetPanel,$n as boxChildTrack,er as boxSpacingChanges,tr as boxTrackPlan,rr as buttonSlotAfterWrite,ir as buttonSlotDetaches,Ct as carouselDotClasses,wt as carouselNotifyPayload,Tt as carouselPositionAtOffset,Et as carouselScrollOffset,gi as clearAdwaitaNsAccent,$e as compiledIconNames,Gn as configureSystemBars,Dt as createCarouselState,Dn as createTabViewState,ii as dataGridCellClass,ai as dataGridItemSpec,oi as dataGridRowClass,si as dataGridShapeKey,ci as dataGridTracksKey,Pe as dialogPresentationMode,te as evaluateBreakpointCondition,Xe as extractIconPaths,Ze as extractPathData,vn as fillPopupMenu,_e as findActionGroup,Fe as findDialogHost,_r as gridChildAt,vr as gridGap,yr as gridSpacing,br as gridTrackCounts,et as iconValueKind,Ot as indicatorMarkerClasses,ve as insertActionGroup,ue as isGtkIconSizeNick,tt as isIconAvailable,He as isThemeIconColor,yi as labelDisplayText,bi as labelMarkupIsUnparseable,pe as lengthValue,nr as normalizeBoxSpacing,kt as normalizeCarouselPageWidth,Yn as normalizePolicy,fe as nsAlignment,ne as observeViewSize,re as observeWindowSize,Ue as onAdwaitaColorSchemeChanged,yn as openPopupMenu,_i as padForSystemInsets,vi as padSheetForSystemInsets,ie as parseBreakpointCondition,li as parseDataGridWidth,Xn as policyScrolls,bn as refuseMenuString,registerAdwaitaElements,nt as registerIcon,rt as registerIcons,it as registeredIconNames,st as renderSymbolicIcon,at as resolveIconSource,Lr as revealerChildVisibility,Zn as scrollOrientationFor,Er as selectionAfterModeChange,Dr as selectionAfterTap,Or as selectionMode,We as setAdwaitaColorScheme,cn as shortcutLabelDirection,ln as shortcutLabelPlatform,un as shortcutLabelRenderPlan,xn as showMenuPopup,Jt as splitViewColumns,Ie as surfaceSize,Kn as systemBarsConfig,On as tabBarVisibility,kn as tabCloseVisibilities,An as tabLabelText,jn as tabPageVisibilities,Mn as tabTooltipText,Nn as tabViewNotifyPayload,Ge as themeIconColor,Ke as toggleAdwaitaColorScheme,je as transitionNick,ot as unregisterIcon,xe as withGtkWidgetLayout};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{AdwBreakpoint as ee,addBreakpoints as e,evaluateBreakpointCondition as te,observeViewSize as ne,observeWindowSize as re,parseBreakpointCondition as ie}from"./breakpoint.js";import{GTK_ALIGN as ae}from"./gtk-align.js";import{DEFAULT_ICON_PIXEL_SIZE as oe,GTK_ICON_SIZE_NICKS as se,GTK_ICON_SIZE_PIXELS as ce,PIXEL_SIZE_UNSET as le,isGtkIconSizeNick as ue}from"./gtk-icon-size.js";import{applyConstructProps as de,nsAlignment as fe}from"./construct-props.js";import{lengthValue as pe}from"./ns-length.js";import{SimpleAction as me,SimpleActionGroup as he,activateWidgetAction as ge,findActionGroup as _e,insertActionGroup as ve}from"./actions.js";import{NOTIFY_HEXPAND as ye,NOTIFY_VEXPAND as be,withGtkWidgetLayout as xe}from"./widget-layout.js";import{AdwAboutDialog as t,CLOSED as Se}from"./adw-about-dialog.js";import{ACTIVATED as Ce,AdwActionRow as n}from"./adw-action-row.js";import{AdwAlertDialog as we,AdwAlertResponses as Te,NOTIFY_RESPONSE as Ee}from"./adw-alert-dialog.js";import{DEFAULT_REVEALER_TRANSITION_DURATION as De,DEFAULT_STACK_TRANSITION_DURATION as Oe,GTK_REVEALER_TRANSITIONS as ke,GTK_STACK_TRANSITIONS as Ae,transitionNick as je}from"./transition-type.js";import{ADW_DIALOG_PRESENTATION_MODES as Me,DEFAULT_DIALOG_PRESENTATION_MODE as Ne,dialogPresentationMode as Pe,findDialogHost as Fe,surfaceSize as Ie}from"./window-state.js";import{GtkWindow as r}from"./gtk-window.js";import{ADW_WINDOW_CLASS as Le,AdwWindowBase as Re}from"./window-base.js";import{AdwApplicationWindow as i}from"./adw-application-window.js";import{avatarInitials as ze}from"./avatar-color.js";import{AVATAR_DEFAULT_ICON as Be}from"./avatar-view.js";import{adwaitaColorScheme as Ve,isThemeIconColor as He,onAdwaitaColorSchemeChanged as Ue,setAdwaitaColorScheme as We,themeIconColor as Ge,toggleAdwaitaColorScheme as Ke}from"./color-scheme.js";import{ADWAITA_ICON_GRID as qe,DEFAULT_ICON_COLOR as Je,DEFAULT_ICON_COLOR_DARK as Ye,extractIconPaths as Xe,extractPathData as Ze}from"./icon-path.js";import{ICON_FALLBACK_NAME as Qe,compiledIconNames as $e,iconValueKind as et,isIconAvailable as tt,registerIcon as nt,registerIcons as rt,registeredIconNames as it,resolveIconSource as at,unregisterIcon as ot}from"./icon-theme.js";import{renderSymbolicIcon as st}from"./icons.js";import{DEFAULT_GTK_IMAGE_SIZE as ct,GtkImage as a}from"./gtk-image.js";import{AdwAvatar as o,DEFAULT_AVATAR_SIZE as lt}from"./adw-avatar.js";import{DEFAULT_CLAMP_MAX_SIZE as ut,DEFAULT_SPINNER_SIZE as dt}from"./chrome.js";import{AdwBanner as s,BUTTON_CLICKED as ft}from"./adw-banner.js";import{AdwBin as c}from"./adw-bin.js";import{CLOSE_ATTEMPT as pt,NOTIFY_OPEN as mt,SHEET_CLOSE as ht}from"./bottom-sheet-state.js";import{SHEET_CONTENT_BOTTOM_GAP as gt,bottomSheetInsetPadding as _t}from"./bottom-sheet-insets.js";import{attachRowPressFeedback as vt}from"./row-press.js";import{AdwBottomSheet as l,bottomSheetPanel as yt}from"./adw-bottom-sheet.js";import{AdwButtonContent as u}from"./adw-button-content.js";import{AdwButtonRow as d}from"./adw-button-row.js";import{CarouselScrollSync as bt,DEFAULT_CAROUSEL_PAGE_WIDTH as xt,applyMarkerClasses as St,carouselDotClasses as Ct,carouselNotifyPayload as wt,carouselPositionAtOffset as Tt,carouselScrollOffset as Et,createCarouselState as Dt,indicatorMarkerClasses as Ot,normalizeCarouselPageWidth as kt}from"./carousel-state.js";import{AdwCarousel as f,NOTIFY_N_PAGES as At,NOTIFY_POSITION as jt,PAGE_CHANGED as Mt}from"./adw-carousel.js";import{AdwCarouselIndicatorDots as p}from"./adw-carousel-indicator-dots.js";import{AdwCarouselIndicatorLines as m}from"./adw-carousel-indicator-lines.js";import{AdwClamp as h}from"./adw-clamp.js";import{AdwComboRow as g,ComboState as Nt,NOTIFY_SELECTED as Pt}from"./adw-combo-row.js";import{ADW_DIALOG_CLASS as Ft,ADW_DIALOG_CLOSED as It,ADW_DIALOG_CLOSE_ATTEMPT as Lt,AdwDialog as _}from"./adw-dialog.js";import{AdwImageButton as v,DEFAULT_ICON_BUTTON_ICON_SIZE as Rt}from"./adw-image-button.js";import{AdwEntryRow as y,NOTIFY_TEXT as zt}from"./adw-entry-row.js";import{AdwExpanderRow as b,ExpanderState as Bt,NOTIFY_EXPANDED as Vt}from"./adw-expander-row.js";import{AdwWindowTitle as x}from"./adw-window-title.js";import{AdwHeaderBar as S}from"./adw-header-bar.js";import{AdwViewStackPage as Ht}from"./view-stack-page.js";import{AdwViewStack as C,NOTIFY_VISIBLE_CHILD as Ut}from"./adw-view-stack.js";import{AdwViewSwitcherBase as Wt,NOTIFY_SELECTED as Gt}from"./view-switcher-base.js";import{AdwInlineViewSwitcher as w}from"./adw-inline-view-switcher.js";import{NsNavigationSplitViewState as Kt,NsOverlaySplitViewState as qt,splitViewColumns as Jt}from"./split-view-state.js";import{AdwSplitViewBase as Yt,NOTIFY_SHOW_SIDEBAR as Xt}from"./split-view-base.js";import{AdwNavigationSplitView as T}from"./adw-navigation-split-view.js";import{AdwNavigationPage as E}from"./adw-navigation-page.js";import{NOTIFY_VISIBLE_PAGE as Zt}from"./navigation-stack.js";import{AdwNavigationView as D}from"./adw-navigation-view.js";import{AdwOverlaySplitView as O}from"./adw-overlay-split-view.js";import{AdwPasswordEntryRow as k}from"./adw-password-entry-row.js";import{AdwPreferencesDialog as A,CLOSED as Qt}from"./adw-preferences-dialog.js";import{AdwPreferencesGroup as j}from"./adw-preferences-group.js";import{AdwPreferencesPage as M}from"./adw-preferences-page.js";import{SHORTCUT_LABEL_CAP_TEXT_CLASS as $t,SHORTCUT_LABEL_CLASS as en,SHORTCUT_LABEL_DIMMED_CLASS as tn,SHORTCUT_LABEL_DISABLED_CLASS as nn,SHORTCUT_LABEL_KEYCAP_CLASS as rn,SHORTCUT_LABEL_KEYS_CLASS as an,SHORTCUT_LABEL_SIDE_CLASS as on,SHORTCUT_LABEL_SPACED_CLASS as sn,shortcutLabelDirection as cn,shortcutLabelPlatform as ln,shortcutLabelRenderPlan as un}from"./shortcut-label.js";import{AdwShortcutLabel as N}from"./adw-shortcut-label.js";import{AdwSidebarItem as dn,AdwSidebarSection as fn}from"../values/sidebar.js";import{AdwSidebar as P,NOTIFY_SELECTED as pn}from"./adw-sidebar.js";import{AdwSpinRow as F,NOTIFY_VALUE as mn,SpinState as hn}from"./adw-spin-row.js";import{AdwSpinner as I}from"./adw-spinner.js";import{GROUP_DIVIDER_API as gn,assertPopupMenuAssignable as _n,fillPopupMenu as vn,openPopupMenu as yn,refuseMenuString as bn}from"./popup-menu.js";import{showMenuPopup as xn}from"./popup-menu-view.js";import{DEFAULT_SCROLLBAR_POLICY as Sn,GTK_POLICY_TYPES as Cn,normalizePolicy as wn,policyScrolls as Tn,scrollOrientationFor as En}from"./scrolled-window-policy.js";import{AdwSplitButton as L,CLICKED as Dn,MENU_TAPPED as On}from"./adw-split-button.js";import{AdwStatusPage as R}from"./adw-status-page.js";import{AdwSwitchRow as z,NOTIFY_ACTIVE as kn}from"./adw-switch-row.js";import{AdwTabPage as An}from"../values/tab-page.js";import{applyTabViewVisibility as jn,createTabViewState as Mn,tabBarVisibility as Nn,tabCloseVisibilities as Pn,tabLabelText as Fn,tabPageVisibilities as In,tabTooltipText as Ln,tabViewNotifyPayload as Rn}from"./tab-view-state.js";import{AdwTabView as B,CLOSE_PAGE as zn,NOTIFY_SELECTED_PAGE as Bn,PAGES_CHANGED as Vn}from"./adw-tab-view.js";import{AdwToast as Hn,AdwToastOverlay as V,AdwToastQueue as Un,DEFAULT_TOAST_TIMEOUT as Wn,TOAST_BUTTON_CLICKED as Gn}from"./adw-toast-overlay.js";import{AdwToggle as Kn}from"./adw-toggle.js";import{AdwToggleGroup as H,NOTIFY_SELECTED as qn,ToggleGroupState as Jn}from"./adw-toggle-group.js";import{WINDOW_BACKGROUND as Yn,configureSystemBars as Xn,systemBarsConfig as Zn}from"./system-bars.js";import{AdwToolbarView as U}from"./adw-toolbar-view.js";import{AdwViewSwitcher as W}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as G}from"./adw-view-switcher-bar.js";import{AdwWindow as K}from"./adw-window.js";import{AdwWrapBox as q}from"./adw-wrap-box.js";import{GtkActionBar as J}from"./gtk-action-bar.js";import{DEFAULT_BOX_SPACING as Qn,boxChildTrack as $n,boxSpacingChanges as er,boxTrackPlan as tr,normalizeBoxSpacing as nr}from"./box-layout.js";import{GtkBox as Y}from"./gtk-box.js";import{buttonSlotAfterWrite as rr,buttonSlotDetaches as ir}from"./button-slot.js";import{GTK_BUTTON_CLICKED as ar,GTK_BUTTON_LABEL_CLASS as or,GtkButton as X}from"./gtk-button.js";import{GtkDropDown as Z,NOTIFY_SELECTED as sr}from"./gtk-drop-down.js";import{GTK_CHECK_BUTTON_ACTIVATE as cr,GTK_CHECK_BUTTON_CHECKED_CLASS as lr,GTK_CHECK_BUTTON_INCONSISTENT_CLASS as ur,GTK_CHECK_BUTTON_TOGGLED as dr,GtkCheckButton as Q,NOTIFY_CHECK_ACTIVE as fr}from"./gtk-check-button.js";import{DRAWING_AREA_REFUSAL as pr,GtkDrawingArea as $}from"./gtk-drawing-area.js";import{ACTIVATE as mr,GtkEntry as hr,NOTIFY_TEXT as gr}from"./gtk-entry.js";import{gridChildAt as _r,gridGap as vr,gridSpacing as yr,gridTrackCounts as br}from"./grid-state.js";import{GtkGrid as xr}from"./gtk-grid.js";import{GtkFrame as Sr}from"./gtk-frame.js";import{GtkLabel as Cr}from"./gtk-label.js";import{DEFAULT_LIST_SELECTION_MODE as wr,GTK_SELECTION_MODES as Tr,selectionAfterModeChange as Er,selectionAfterTap as Dr,selectionMode as Or}from"./list-box-state.js";import{GtkListBox as kr,LIST_BOX_ROW_ACTIVATED as Ar,LIST_BOX_ROW_SELECTED as jr,LIST_ROW_SELECTED_CLASS as Mr}from"./gtk-list-box.js";import{GtkMenuButton as Nr,MENU_ITEM_ACTIVATED as Pr}from"./gtk-menu-button.js";import{GtkPopoverMenu as Fr}from"./gtk-popover-menu.js";import{GtkOverlay as Ir}from"./gtk-overlay.js";import{revealerChildVisibility as Lr}from"./revealer-state.js";import{GtkRevealer as Rr,NOTIFY_REVEAL_CHILD as zr}from"./gtk-revealer.js";import{GtkScrolledWindow as Br}from"./gtk-scrolled-window.js";import{GtkSeparator as Vr}from"./gtk-separator.js";import{GtkStackPage as Hr}from"./stack-page.js";import{GtkStack as Ur,NOTIFY_STACK_VISIBLE_CHILD as Wr,NOTIFY_STACK_VISIBLE_CHILD_NAME as Gr}from"./gtk-stack.js";import{GTK_WRAP_MODES as Kr,GtkTextView as qr,NOTIFY_TEXT_VIEW_TEXT as Jr}from"./gtk-text-view.js";import{GTK_TOGGLE_BUTTON_CHECKED_CLASS as Yr,GTK_TOGGLE_BUTTON_TOGGLED as Xr,GtkToggleButton as Zr,NOTIFY_TOGGLE_ACTIVE as Qr}from"./gtk-toggle-button.js";import{AdwSliderRow as $r,NOTIFY_SLIDER_VALUE as ei}from"./adw-slider-row.js";import{DATA_GRID_HEADER_CELL_CLASS as ti,DATA_GRID_HEADER_ROW_CLASS as ni,DATA_GRID_SECTION_CELL_CLASS as ri,dataGridCellClass as ii,dataGridItemSpec as ai,dataGridRowClass as oi,dataGridShapeKey as si,dataGridTracksKey as ci,parseDataGridWidth as li}from"./data-grid-model.js";import{AdwDataGrid as ui,ROW_ACTIVATED as di}from"./adw-data-grid.js";import{ADWAITA_NS_ACCENT_RULES as fi,adwaitaNsAccentColor as pi,adwaitaNsAccentCss as mi}from"./accent-theme.js";import{applyAdwaitaNsAccent as hi,clearAdwaitaNsAccent as gi}from"./adw-accent.js";import{padForSystemInsets as _i,padSheetForSystemInsets as vi}from"./system-insets.js";import{labelDisplayText as yi,labelMarkupIsUnparseable as bi}from"@gjsify/adwaita-core";const xi={AdwPreferencesPage:M,AdwPreferencesGroup:j,AdwActionRow:n,AdwSwitchRow:z,AdwEntryRow:y,AdwPasswordEntryRow:k,GtkEntry:hr,AdwComboRow:g,GtkDropDown:Z,AdwSpinRow:F,AdwSliderRow:$r,AdwExpanderRow:b,GtkButton:X,GtkBox:Y,GtkGrid:xr,GtkListBox:kr,AdwWindow:K,AdwApplicationWindow:i,AdwDialog:_,GtkActionBar:J,AdwBin:c,GtkOverlay:Ir,GtkRevealer:Rr,GtkScrolledWindow:Br,GtkWindow:r,GtkStack:Ur,GtkToggleButton:Zr,GtkCheckButton:Q,GtkDrawingArea:$,GtkFrame:Sr,GtkSeparator:Vr,GtkTextView:qr,GtkLabel:Cr,AdwImageButton:v,GtkMenuButton:Nr,GtkImage:a,AdwBanner:s,AdwAvatar:o,AdwWindowTitle:x,AdwClamp:h,AdwHeaderBar:S,AdwToolbarView:U,AdwWrapBox:q,AdwDataGrid:ui,AdwSpinner:I,AdwStatusPage:R,AdwButtonRow:d,AdwButtonContent:u,AdwSplitButton:L,AdwToggleGroup:H,AdwShortcutLabel:N,AdwViewStack:C,AdwViewSwitcher:W,AdwViewSwitcherBar:G,AdwInlineViewSwitcher:w,AdwTabView:B,AdwCarousel:f,AdwCarouselIndicatorDots:p,AdwCarouselIndicatorLines:m,AdwNavigationPage:E,AdwNavigationView:D,AdwNavigationSplitView:T,AdwOverlaySplitView:O,AdwSidebar:P,AdwBottomSheet:l,AdwToastOverlay:V,AdwAboutDialog:t,AdwPreferencesDialog:A};let Si=!1;function registerAdwaitaElements(){if(!Si&&typeof registerElement==`function`){for(let[ee,e]of Object.entries(xi))registerElement(ee,()=>e);Si=!0}}export{Se as ABOUT_CLOSED,Ce as ACTIVATED,qe as ADWAITA_ICON_GRID,fi as ADWAITA_NS_ACCENT_RULES,Ft as ADW_DIALOG_CLASS,It as ADW_DIALOG_CLOSED,Lt as ADW_DIALOG_CLOSE_ATTEMPT,Me as ADW_DIALOG_PRESENTATION_MODES,Le as ADW_WINDOW_CLASS,Be as AVATAR_DEFAULT_ICON,t as AdwAboutDialog,n as AdwActionRow,we as AdwAlertDialog,Te as AdwAlertResponses,i as AdwApplicationWindow,o as AdwAvatar,s as AdwBanner,c as AdwBin,l as AdwBottomSheet,ee as AdwBreakpoint,u as AdwButtonContent,d as AdwButtonRow,f as AdwCarousel,p as AdwCarouselIndicatorDots,m as AdwCarouselIndicatorLines,h as AdwClamp,g as AdwComboRow,ui as AdwDataGrid,_ as AdwDialog,y as AdwEntryRow,b as AdwExpanderRow,S as AdwHeaderBar,v as AdwImageButton,w as AdwInlineViewSwitcher,E as AdwNavigationPage,T as AdwNavigationSplitView,D as AdwNavigationView,O as AdwOverlaySplitView,k as AdwPasswordEntryRow,A as AdwPreferencesDialog,j as AdwPreferencesGroup,M as AdwPreferencesPage,N as AdwShortcutLabel,P as AdwSidebar,dn as AdwSidebarItem,fn as AdwSidebarSection,$r as AdwSliderRow,F as AdwSpinRow,I as AdwSpinner,L as AdwSplitButton,Yt as AdwSplitViewBase,R as AdwStatusPage,z as AdwSwitchRow,An as AdwTabPage,B as AdwTabView,Hn as AdwToast,V as AdwToastOverlay,Un as AdwToastQueue,Kn as AdwToggle,H as AdwToggleGroup,U as AdwToolbarView,C as AdwViewStack,Ht as AdwViewStackPage,W as AdwViewSwitcher,G as AdwViewSwitcherBar,Wt as AdwViewSwitcherBase,K as AdwWindow,Re as AdwWindowBase,x as AdwWindowTitle,q as AdwWrapBox,ft as BUTTON_CLICKED,Dn as CLICKED,pt as CLOSE_ATTEMPT,zn as CLOSE_PAGE,bt as CarouselScrollSync,Nt as ComboState,ti as DATA_GRID_HEADER_CELL_CLASS,ni as DATA_GRID_HEADER_ROW_CLASS,ri as DATA_GRID_SECTION_CELL_CLASS,lt as DEFAULT_AVATAR_SIZE,Qn as DEFAULT_BOX_SPACING,xt as DEFAULT_CAROUSEL_PAGE_WIDTH,ut as DEFAULT_CLAMP_MAX_SIZE,Ne as DEFAULT_DIALOG_PRESENTATION_MODE,ct as DEFAULT_GTK_IMAGE_SIZE,Rt as DEFAULT_ICON_BUTTON_ICON_SIZE,Je as DEFAULT_ICON_COLOR,Ye as DEFAULT_ICON_COLOR_DARK,oe as DEFAULT_ICON_PIXEL_SIZE,wr as DEFAULT_LIST_SELECTION_MODE,De as DEFAULT_REVEALER_TRANSITION_DURATION,Sn as DEFAULT_SCROLLBAR_POLICY,dt as DEFAULT_SPINNER_SIZE,Oe as DEFAULT_STACK_TRANSITION_DURATION,Wn as DEFAULT_TOAST_TIMEOUT,pr as DRAWING_AREA_REFUSAL,mr as ENTRY_ACTIVATE,Bt as ExpanderState,gn as GROUP_DIVIDER_API,ae as GTK_ALIGN,ar as GTK_BUTTON_CLICKED,or as GTK_BUTTON_LABEL_CLASS,cr as GTK_CHECK_BUTTON_ACTIVATE,lr as GTK_CHECK_BUTTON_CHECKED_CLASS,ur as GTK_CHECK_BUTTON_INCONSISTENT_CLASS,dr as GTK_CHECK_BUTTON_TOGGLED,se as GTK_ICON_SIZE_NICKS,ce as GTK_ICON_SIZE_PIXELS,Cn as GTK_POLICY_TYPES,ke as GTK_REVEALER_TRANSITIONS,Tr as GTK_SELECTION_MODES,Ae as GTK_STACK_TRANSITIONS,Yr as GTK_TOGGLE_BUTTON_CHECKED_CLASS,Xr as GTK_TOGGLE_BUTTON_TOGGLED,Kr as GTK_WRAP_MODES,J as GtkActionBar,Y as GtkBox,X as GtkButton,Q as GtkCheckButton,$ as GtkDrawingArea,Z as GtkDropDown,hr as GtkEntry,Sr as GtkFrame,xr as GtkGrid,a as GtkImage,Cr as GtkLabel,kr as GtkListBox,Nr as GtkMenuButton,Ir as GtkOverlay,Fr as GtkPopoverMenu,Rr as GtkRevealer,Br as GtkScrolledWindow,Vr as GtkSeparator,Ur as GtkStack,Hr as GtkStackPage,qr as GtkTextView,Zr as GtkToggleButton,r as GtkWindow,Qe as ICON_FALLBACK_NAME,Ar as LIST_BOX_ROW_ACTIVATED,jr as LIST_BOX_ROW_SELECTED,Mr as LIST_ROW_SELECTED_CLASS,Pr as MENU_ITEM_ACTIVATED,On as MENU_TAPPED,kn as NOTIFY_ACTIVE,fr as NOTIFY_CHECK_ACTIVE,sr as NOTIFY_DROP_DOWN_SELECTED,gr as NOTIFY_ENTRY_TEXT,Vt as NOTIFY_EXPANDED,ye as NOTIFY_HEXPAND,At as NOTIFY_N_PAGES,mt as NOTIFY_OPEN,jt as NOTIFY_POSITION,Ee as NOTIFY_RESPONSE,zr as NOTIFY_REVEAL_CHILD,Pt as NOTIFY_SELECTED,Bn as NOTIFY_SELECTED_PAGE,Xt as NOTIFY_SHOW_SIDEBAR,pn as NOTIFY_SIDEBAR_SELECTED,ei as NOTIFY_SLIDER_VALUE,Wr as NOTIFY_STACK_VISIBLE_CHILD,Gr as NOTIFY_STACK_VISIBLE_CHILD_NAME,zt as NOTIFY_TEXT,Jr as NOTIFY_TEXT_VIEW_TEXT,Qr as NOTIFY_TOGGLE_ACTIVE,qn as NOTIFY_TOGGLE_SELECTED,mn as NOTIFY_VALUE,be as NOTIFY_VEXPAND,Gt as NOTIFY_VIEW_SELECTED,Ut as NOTIFY_VISIBLE_CHILD,Zt as NOTIFY_VISIBLE_PAGE,Kt as NsNavigationSplitViewState,qt as NsOverlaySplitViewState,Vn as PAGES_CHANGED,Mt as PAGE_CHANGED,le as PIXEL_SIZE_UNSET,Qt as PREFERENCES_CLOSED,di as ROW_ACTIVATED,ht as SHEET_CLOSE,gt as SHEET_CONTENT_BOTTOM_GAP,$t as SHORTCUT_LABEL_CAP_TEXT_CLASS,en as SHORTCUT_LABEL_CLASS,tn as SHORTCUT_LABEL_DIMMED_CLASS,nn as SHORTCUT_LABEL_DISABLED_CLASS,rn as SHORTCUT_LABEL_KEYCAP_CLASS,an as SHORTCUT_LABEL_KEYS_CLASS,on as SHORTCUT_LABEL_SIDE_CLASS,sn as SHORTCUT_LABEL_SPACED_CLASS,me as SimpleAction,he as SimpleActionGroup,hn as SpinState,Gn as TOAST_BUTTON_CLICKED,Jn as ToggleGroupState,Yn as WINDOW_BACKGROUND,ge as activateWidgetAction,e as addBreakpoints,Ve as adwaitaColorScheme,pi as adwaitaNsAccentColor,mi as adwaitaNsAccentCss,hi as applyAdwaitaNsAccent,de as applyConstructProps,St as applyMarkerClasses,jn as applyTabViewVisibility,_n as assertPopupMenuAssignable,vt as attachRowPressFeedback,ze as avatarInitials,_t as bottomSheetInsetPadding,yt as bottomSheetPanel,$n as boxChildTrack,er as boxSpacingChanges,tr as boxTrackPlan,rr as buttonSlotAfterWrite,ir as buttonSlotDetaches,Ct as carouselDotClasses,wt as carouselNotifyPayload,Tt as carouselPositionAtOffset,Et as carouselScrollOffset,gi as clearAdwaitaNsAccent,$e as compiledIconNames,Xn as configureSystemBars,Dt as createCarouselState,Mn as createTabViewState,ii as dataGridCellClass,ai as dataGridItemSpec,oi as dataGridRowClass,si as dataGridShapeKey,ci as dataGridTracksKey,Pe as dialogPresentationMode,te as evaluateBreakpointCondition,Xe as extractIconPaths,Ze as extractPathData,vn as fillPopupMenu,_e as findActionGroup,Fe as findDialogHost,_r as gridChildAt,vr as gridGap,yr as gridSpacing,br as gridTrackCounts,et as iconValueKind,Ot as indicatorMarkerClasses,ve as insertActionGroup,ue as isGtkIconSizeNick,tt as isIconAvailable,He as isThemeIconColor,yi as labelDisplayText,bi as labelMarkupIsUnparseable,pe as lengthValue,nr as normalizeBoxSpacing,kt as normalizeCarouselPageWidth,wn as normalizePolicy,fe as nsAlignment,ne as observeViewSize,re as observeWindowSize,Ue as onAdwaitaColorSchemeChanged,yn as openPopupMenu,_i as padForSystemInsets,vi as padSheetForSystemInsets,ie as parseBreakpointCondition,li as parseDataGridWidth,Tn as policyScrolls,bn as refuseMenuString,registerAdwaitaElements,nt as registerIcon,rt as registerIcons,it as registeredIconNames,st as renderSymbolicIcon,at as resolveIconSource,Lr as revealerChildVisibility,En as scrollOrientationFor,Er as selectionAfterModeChange,Dr as selectionAfterTap,Or as selectionMode,We as setAdwaitaColorScheme,cn as shortcutLabelDirection,ln as shortcutLabelPlatform,un as shortcutLabelRenderPlan,xn as showMenuPopup,Jt as splitViewColumns,Ie as surfaceSize,Zn as systemBarsConfig,Nn as tabBarVisibility,Pn as tabCloseVisibilities,Fn as tabLabelText,In as tabPageVisibilities,Ln as tabTooltipText,Rn as tabViewNotifyPayload,Ge as themeIconColor,Ke as toggleAdwaitaColorScheme,je as transitionNick,ot as unregisterIcon,xe as withGtkWidgetLayout};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const e={columns:{nativeScript:`GridLayoutBase.columns — the column track spec ('auto,*'), setter-only`,routed:[`AdwDataGrid`],refused:[]},cssClasses:{nativeScript:`ViewBase.cssClasses — the Set the view's own class list lives in`,routed:[],refused:[`GtkWidget`]},direction:{nativeScript:`ViewCommon.direction — the CSS layout direction ('ltr' | 'rtl') margins resolve by`,routed:[`AdwSplitButton`],refused:[`GtkMenuButton`]},modal:{nativeScript:`ViewCommon.modal — the view this one was shown modally from, getter-only`,routed:[`AdwBottomSheet`],refused:[`GtkWindow`]},rows:{nativeScript:`GridLayoutBase.rows — the row track spec ('auto,*'), setter-only`,routed:[`AdwDataGrid`],refused:[]},visibility:{nativeScript:`View.visibility — 'visible' | 'hidden' | 'collapse'`,routed:[],refused:[`GtkEntry`]}},t={marginBottom:{declarer:`GtkWidget`,why:`View.marginBottom is the same outer spacing; a GTK pixel count is a valid NativeScript length.`},marginTop:{declarer:`GtkWidget`,why:`View.marginTop is the same outer spacing; a GTK pixel count is a valid NativeScript length.`},opacity:{declarer:`GtkWidget`,why:`View.opacity is the same 0..1 alpha.`},orientation:{declarer:`GtkOrientable`,why:`StackLayout.orientation takes the same two nicks, 'horizontal' and 'vertical'.`}};function gtypeNames(e){let t=[];for(let n=Object.getPrototypeOf(e);n!==null;n=Object.getPrototypeOf(n)){let e=n.constructor;if(typeof e==`function`&&Object.hasOwn(e,`GTypeName`)){let n=e.GTypeName;typeof n==`string`&&t.push(n)}}return t}const snake=e=>e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`),camelProperty=e=>e.replace(/[-_]([a-z0-9])/g,(e,t)=>t.toUpperCase());function gtkPropertyDoor(t,n){if(!Object.hasOwn(e,n))return n in t?{kind:`accessor`}:{kind:`absent`};let r=e[n],i=gtypeNames(t),a=r.routed.find(e=>i.includes(e)),o=`get_${snake(n)}`,s=`set_${snake(n)}`,c=t;return a!==void 0&&typeof c[o]==`function`&&typeof c[s]==`function`?{kind:`verbs`,get:o,set:s}:{kind:`refused`,why:`'${n}' is ${r.nativeScript} on this platform, and ${i[0]??t.constructor.name} implements no GTK property of that name behind \`${s}()\` — writing it would reach NativeScript's member instead (scripts/check-gtk-host-member-clashes.mjs).`}}function hasGtkProperty(e,t){let n=gtkPropertyDoor(e,t);return n.kind===`accessor`||n.kind===`verbs`}function gtkPropertyRefusal(e,t){let n=gtkPropertyDoor(e,t);return n.kind===`refused`?n.why:null}function readGtkProperty(e,t){let n=gtkPropertyDoor(e,t);if(n.kind===`verbs`)return e[n.get]();if(n.kind===`refused`)throw TypeError(n.why);return e[t]}function writeGtkProperty(e,t,n){let r=gtkPropertyDoor(e,t);if(r.kind===`verbs`){e[r.set](n);return}if(r.kind===`refused`)throw TypeError(r.why);e[t]=n}export{e as SHADOWED_PROPERTIES,t as SHARED_PROPERTIES,camelProperty,gtkPropertyDoor,gtkPropertyRefusal,hasGtkProperty,readGtkProperty,writeGtkProperty};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{camelProperty as e,readGtkProperty as t,writeGtkProperty as n}from"./shadowed-properties.js";import{withGtkWidgetLayout as r}from"./widget-layout.js";const i=new WeakMap;let a=1;function withSignals(o){class WithSignals extends r(o){connect(e,t){let listener=e=>{let n=e.accumulator;if(n===void 0){t(this,e);return}n.stopped||n.collect(t(this,e))},n=a++,r=i.get(this);return r===void 0&&(r=new Map,i.set(this,r)),r.set(n,{eventName:e,listener}),this.addEventListener(e,listener),n}disconnect(e){let t=i.get(this)?.get(e);if(t===void 0)throw TypeError(`${this.constructor.name} has no handler with id ${e}. connect() hands out each id once and disconnect() takes it once; a second disconnect, or an id another widget returned, is refused here rather than left as a silent no-op.`);this.removeEventListener(t.eventName,t.listener),i.get(this)?.delete(e)}emit(e,...t){this.notify({eventName:e,object:this,args:t})}get_property(n){return t(this,e(n))}set_property(t,r){n(this,e(t),r)}}return WithSignals}export{withSignals};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.js";import{syncColorSchemeClasses as t}from"./color-scheme-classes.js";import{GtkWindow as n}from"./gtk-window.js";import{adwaitaColorScheme as r,onAdwaitaColorSchemeChanged as i}from"@gjsify/adwaita-core";import{Application as a,GridLayout as o}from"@nativescript/core";const s=`adw-window`;let c=!1;function wireColorSchemeSync(){c||(c=!0,i(()=>{let e=a.getRootView?.();e!==void 0&&t(e,r())}))}var AdwWindowBase=class extends n{static builderSlots=e([`content`],`content`);_dialogs=[];constructor(){super(),wireColorSchemeSync(),this._restyle()}get _ownClass(){return s}get content(){return this.child}set content(e){this.child=e}set_content(e){this.child=e}get_content(){return this.child}get dialogs(){return[...this._dialogs]}_hostDialog(e){let t=e;this._dialogs.includes(t)||(o.setColumn(t,0),o.setRow(t,0),this.addChild(t),this._dialogs.push(t))}_unhostDialog(e){let t=e,n=this._dialogs.indexOf(t);n!==-1&&(this._dialogs.splice(n,1),this.removeChild(t))}};export{s as ADW_WINDOW_CLASS,AdwWindowBase};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{builderSlotsOf as e}from"./builder-slots.js";import{syncColorSchemeClasses as t}from"./color-scheme-classes.js";import{GtkWindow as n}from"./gtk-window.js";import{adwaitaColorScheme as r,onAdwaitaColorSchemeChanged as i}from"@gjsify/adwaita-core";import{Application as a,GridLayout as o}from"@nativescript/core";const s=`adw-window`;let c=!1;function wireColorSchemeSync(){c||(c=!0,i(()=>{let e=a.getRootView?.();e!==void 0&&t(e,r())}))}var AdwWindowBase=class extends n{static builderSlots=e([`content`],`content`);_dialogs=[];constructor(){super(),wireColorSchemeSync(),this._restyle()}get _ownClass(){return s}get content(){return this.child}set content(e){this.child=e}set_content(e){this.child=e}get_content(){return this.child}get dialogs(){return[...this._dialogs]}_hostDialog(e){let t=e;this._dialogs.includes(t)||(o.setColumn(t,0),o.setRow(t,0),this.addChild(t),this._dialogs.push(t))}_consumeBack(){for(let e=this._dialogs.length-1;e>=0;e--){let t=this._dialogs[e];if(t.open===!0&&typeof t.close==`function`)return t.close(),!0}return!1}_unhostDialog(e){let t=e,n=this._dialogs.indexOf(t);n!==-1&&(this._dialogs.splice(n,1),this.removeChild(t))}};export{s as ADW_WINDOW_CLASS,AdwWindowBase};
|
package/lib/esm/window-host.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";import{blurView as e,finishWindow as t,focusView as n,isViewFocused as r}from"./window-source.js";import{Application as
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{blurView as e,finishWindow as t,focusView as n,isViewFocused as r,watchBackButton as i}from"./window-source.js";import{Application as a}from"@nativescript/core";let o=null;function useWindowHost(e){o=e}const s={canFinish:!1,isForeground:()=>!0,watchForeground(e){let resume=()=>e(!0),suspend=()=>e(!1);return a.on(`resume`,resume),a.on(`suspend`,suspend),()=>{a.off(`resume`,resume),a.off(`suspend`,suspend)}},watchBack(e){return i(t=>{e()&&(t.cancel=!0)})},finish:t,isFocused:r,requestFocus:n,clearFocus:e};function windowHost(){return o??s}export{s as nativeWindowHost,useWindowHost,windowHost};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";import{Application as e}from"@nativescript/core";const t=!0;function finishWindow(){let t=e.android?.foregroundActivity??e.android?.startActivity;if(!t?.finish)throw Error(`Android has no activity to finish for this window`);t.finish()}const peer=e=>e.nativeViewProtected;function isViewFocused(e){return peer(e)?.isFocused?.()===!0}function focusView(e){peer(e)?.requestFocus?.()}function blurView(e){peer(e)?.clearFocus?.()}export{blurView,t as canFinishWindow,finishWindow,focusView,isViewFocused};
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{Application as e}from"@nativescript/core";const t=!0,n=`activityBackPressed`;function watchBackButton(t){let r=e.android;return r?(r.on(n,t),()=>r.off(n,t)):()=>{}}function finishWindow(){let t=e.android?.foregroundActivity??e.android?.startActivity;if(!t?.finish)throw Error(`Android has no activity to finish for this window`);t.finish()}const peer=e=>e.nativeViewProtected;function isViewFocused(e){return peer(e)?.isFocused?.()===!0}function focusView(e){peer(e)?.requestFocus?.()}function blurView(e){peer(e)?.clearFocus?.()}export{blurView,t as canFinishWindow,finishWindow,focusView,isViewFocused,watchBackButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";const e=!1;function finishWindow(){throw Error(`iOS has no public API for an app to close its own window`)}const peer=e=>e.nativeViewProtected;function isViewFocused(e){return peer(e)?.isFirstResponder===!0}function focusView(e){peer(e)?.becomeFirstResponder?.()}function blurView(e){peer(e)?.resignFirstResponder?.()}export{blurView,e as canFinishWindow,finishWindow,focusView,isViewFocused};
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";const e=!1;function finishWindow(){throw Error(`iOS has no public API for an app to close its own window`)}const peer=e=>e.nativeViewProtected;function isViewFocused(e){return peer(e)?.isFirstResponder===!0}function focusView(e){peer(e)?.becomeFirstResponder?.()}function blurView(e){peer(e)?.resignFirstResponder?.()}function watchBackButton(e){return()=>{}}export{blurView,e as canFinishWindow,finishWindow,focusView,isViewFocused,watchBackButton};
|
package/lib/esm/window-source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";const e=!1;function finishWindow(){throw Error(`there is no platform window to close on this host`)}function isViewFocused(e){throw Error(`there is no platform focus to read on this host`)}function focusView(e){throw Error(`there is no platform focus to move on this host`)}function blurView(e){throw Error(`there is no platform focus to clear on this host`)}export{blurView,e as canFinishWindow,finishWindow,focusView,isViewFocused};
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";const e=!1;function finishWindow(){throw Error(`there is no platform window to close on this host`)}function isViewFocused(e){throw Error(`there is no platform focus to read on this host`)}function focusView(e){throw Error(`there is no platform focus to move on this host`)}function blurView(e){throw Error(`there is no platform focus to clear on this host`)}function watchBackButton(e){return()=>{}}export{blurView,e as canFinishWindow,finishWindow,focusView,isViewFocused,watchBackButton};
|
|
@@ -1,49 +1,11 @@
|
|
|
1
1
|
import { View as NsView } from '@nativescript/core';
|
|
2
2
|
import { NsCanvas, type NsCanvasRenderingContext2D } from './canvas-subset.js';
|
|
3
|
+
/** `FrameRequestCallback` without `lib.dom`: a NativeScript app has none. */
|
|
4
|
+
export type FrameCallback = (time: number) => void;
|
|
3
5
|
type ReadyCallback = (canvas: NsCanvas, ctx: NsCanvasRenderingContext2D) => void;
|
|
4
6
|
type ResizeCallback = (width: number, height: number) => void;
|
|
5
7
|
type SignalHandler = (self: Canvas2DBridge, width: number, height: number) => unknown;
|
|
6
|
-
declare const Canvas2DBridge_base: (abstract new (...args: any[]) =>
|
|
7
|
-
get halign(): string;
|
|
8
|
-
set halign(value: string | number);
|
|
9
|
-
get valign(): string;
|
|
10
|
-
set valign(value: string | number);
|
|
11
|
-
get hexpand(): boolean;
|
|
12
|
-
set hexpand(value: boolean | string);
|
|
13
|
-
get vexpand(): boolean;
|
|
14
|
-
set vexpand(value: boolean | string);
|
|
15
|
-
get marginStart(): number;
|
|
16
|
-
set marginStart(value: number | string);
|
|
17
|
-
get marginEnd(): number;
|
|
18
|
-
set marginEnd(value: number | string);
|
|
19
|
-
get visible(): boolean;
|
|
20
|
-
set visible(value: boolean | string);
|
|
21
|
-
get sensitive(): boolean;
|
|
22
|
-
set sensitive(value: boolean | string);
|
|
23
|
-
get name(): string;
|
|
24
|
-
set name(value: string | null);
|
|
25
|
-
set_direction(direction: number): void;
|
|
26
|
-
get_direction(): number;
|
|
27
|
-
get_first_child(): object | null;
|
|
28
|
-
get_last_child(): object | null;
|
|
29
|
-
get_next_sibling(): object | null;
|
|
30
|
-
get_prev_sibling(): object | null;
|
|
31
|
-
get_parent(): object | null;
|
|
32
|
-
insert_action_group(prefix: string, group: import("@gjsify/adwaita-core").ActionGroupLike | null): void;
|
|
33
|
-
get tooltipText(): string;
|
|
34
|
-
set tooltipText(value: string);
|
|
35
|
-
get widthRequest(): number;
|
|
36
|
-
set widthRequest(value: number | string);
|
|
37
|
-
get heightRequest(): number;
|
|
38
|
-
set heightRequest(value: number | string);
|
|
39
|
-
_emit(eventName: string): void;
|
|
40
|
-
addEventListener(eventName: string, callback: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown, once?: boolean): void;
|
|
41
|
-
removeEventListener(eventName: string, callback?: (data: import("@nativescript/core").EventData) => void, thisArg?: unknown): void;
|
|
42
|
-
notify<T extends import("@nativescript/core").EventData>(data: T): void;
|
|
43
|
-
notifyPropertyChange(name: string, value: unknown, oldValue?: unknown): void;
|
|
44
|
-
set(name: string, value: unknown): void;
|
|
45
|
-
get(name: string): unknown;
|
|
46
|
-
}) & typeof NsView;
|
|
8
|
+
declare const Canvas2DBridge_base: (abstract new (...args: any[]) => import("../index.js").GtkWidgetLayoutMembers) & typeof NsView;
|
|
47
9
|
export declare class Canvas2DBridge extends Canvas2DBridge_base {
|
|
48
10
|
static readonly GTypeName: string;
|
|
49
11
|
private readonly driver;
|
|
@@ -78,7 +40,7 @@ export declare class Canvas2DBridge extends Canvas2DBridge_base {
|
|
|
78
40
|
/** Runs `cb` on every allocation change, with the canvas dimensions already updated. */
|
|
79
41
|
onResize(cb: ResizeCallback): void;
|
|
80
42
|
/** NativeScript's own `requestAnimationFrame`, here so the call reads the same on every target. */
|
|
81
|
-
requestAnimationFrame(cb:
|
|
43
|
+
requestAnimationFrame(cb: FrameCallback): number;
|
|
82
44
|
/** A no-op: NativeScript already has `requestAnimationFrame` and `performance`. */
|
|
83
45
|
installGlobals(): void;
|
|
84
46
|
/** `gtk_widget_queue_draw`: show what was drawn since the last call. */
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { assertNativeScript, isNativeScript, isAndroid, isIOS } from '@gjsify/native-platform';
|
|
2
2
|
export { NOTIFY_ACTIVE, NOTIFY_TEXT, ENTRY_ACTIVATE, NOTIFY_ENTRY_TEXT, ComboState, NOTIFY_SELECTED, NOTIFY_DROP_DOWN_SELECTED, SpinState, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, ExpanderState, NOTIFY_EXPANDED, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, MENU_ITEM_ACTIVATED, DEFAULT_GTK_IMAGE_SIZE, DEFAULT_BOX_SPACING, GTK_BUTTON_CLICKED, GTK_BUTTON_LABEL_CLASS, buttonSlotAfterWrite, buttonSlotDetaches, boxChildTrack, boxTrackPlan, boxSpacingChanges, normalizeBoxSpacing, NOTIFY_REVEAL_CHILD, ADW_DIALOG_CLOSED, ADW_DIALOG_CLOSE_ATTEMPT, LIST_BOX_ROW_ACTIVATED, LIST_BOX_ROW_SELECTED, NOTIFY_HEXPAND, NOTIFY_VEXPAND, withGtkWidgetLayout, NOTIFY_STACK_VISIBLE_CHILD, NOTIFY_STACK_VISIBLE_CHILD_NAME, DRAWING_AREA_REFUSAL, GTK_CHECK_BUTTON_TOGGLED, GTK_CHECK_BUTTON_ACTIVATE, GTK_CHECK_BUTTON_CHECKED_CLASS, GTK_CHECK_BUTTON_INCONSISTENT_CLASS, NOTIFY_CHECK_ACTIVE, GTK_WRAP_MODES, NOTIFY_TEXT_VIEW_TEXT, GTK_TOGGLE_BUTTON_CHECKED_CLASS, GTK_TOGGLE_BUTTON_TOGGLED, NOTIFY_TOGGLE_ACTIVE, labelDisplayText, labelMarkupIsUnparseable, BUTTON_CLICKED, AVATAR_DEFAULT_ICON, DEFAULT_AVATAR_SIZE, avatarInitials, DEFAULT_CLAMP_MAX_SIZE, padForSystemInsets, padSheetForSystemInsets, bottomSheetPanel, AdwDataGrid, ROW_ACTIVATED, dataGridCellClass, dataGridItemSpec, dataGridRowClass, dataGridShapeKey, dataGridTracksKey, parseDataGridWidth, DATA_GRID_HEADER_CELL_CLASS, DATA_GRID_HEADER_ROW_CLASS, DATA_GRID_SECTION_CELL_CLASS, DEFAULT_SPINNER_SIZE, ACTIVATED, CLICKED, MENU_TAPPED, ToggleGroupState, NOTIFY_TOGGLE_SELECTED, applyAdwaitaNsAccent, clearAdwaitaNsAccent, ADWAITA_NS_ACCENT_RULES, adwaitaNsAccentColor, adwaitaNsAccentCss, SHORTCUT_LABEL_CAP_TEXT_CLASS, SHORTCUT_LABEL_CLASS, SHORTCUT_LABEL_DIMMED_CLASS, SHORTCUT_LABEL_DISABLED_CLASS, SHORTCUT_LABEL_KEYCAP_CLASS, SHORTCUT_LABEL_KEYS_CLASS, SHORTCUT_LABEL_SIDE_CLASS, SHORTCUT_LABEL_SPACED_CLASS, shortcutLabelDirection, shortcutLabelPlatform, shortcutLabelRenderPlan, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, DEFAULT_CAROUSEL_PAGE_WIDTH, NOTIFY_POSITION, NOTIFY_VISIBLE_PAGE, AdwSplitViewBase, NOTIFY_SHOW_SIDEBAR, NsNavigationSplitViewState, NsOverlaySplitViewState, splitViewColumns, NOTIFY_SIDEBAR_SELECTED, NOTIFY_OPEN, AdwToast, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, TOAST_BUTTON_CLICKED, AdwAlertResponses, NOTIFY_RESPONSE, ABOUT_CLOSED, PREFERENCES_CLOSED, applyConstructProps, nsAlignment, GTK_ALIGN, DEFAULT_ICON_PIXEL_SIZE, GTK_ICON_SIZE_NICKS, GTK_ICON_SIZE_PIXELS, type GtkIconSizeNick, isGtkIconSizeNick, PIXEL_SIZE_UNSET, activateWidgetAction, findActionGroup, insertActionGroup, attachRowPressFeedback, ICON_FALLBACK_NAME, compiledIconNames, iconValueKind, isIconAvailable, registerIcon, registerIcons, registeredIconNames, resolveIconSource, unregisterIcon, renderSymbolicIcon, extractIconPaths, extractPathData, ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, observeViewSize, observeWindowSize, parseBreakpointCondition, registerAdwaitaElements, } from './widgets/index.js';
|
|
3
3
|
export type { BoxOrientation, ButtonSlot, ButtonSlotWrite, NotifyActiveEventData, NotifyTextEventData, NotifyEntryTextEventData, AdwComboOption, ComboStateChange, ComboStateListener, NotifySelectedEventData, NotifyDropDownSelectedEventData, NotifyValueEventData, SpinStateChange, SpinStateListener, NotifySliderValueEventData, NotifyExpandedEventData, ExpanderStateListener, MenuItemActivatedEventData, MenuTappedEventData, RowActivatedEventData, DataGridItemSpec, NotifyToggleSelectedEventData, ToggleGroupStateChange, ToggleGroupStateListener, AccentRole, AccentRule, ShortcutLabelRenderPlan, ShortcutLabelViewSpec, AdwViewStackPageInfo, NotifyVisibleChildEventData, AdwViewPage, NotifyViewSelectedEventData, NotifyPositionEventData, NotifyVisiblePageEventData, NotifyShowSidebarEventData, NsShowSidebarNotification, NsSplitViewHost, NsSplitViewState, NotifySidebarSelectedEventData, NotifyOpenEventData, AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, NotifyResponseEventData, AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, OrderedConfirmResponses, ConstructProps, SystemInsetEdges, IconValueKind, SymbolicIconOptions, IconPath, AdwColorScheme, AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './widgets/index.js';
|
|
4
|
-
export type { GtkWidgetLayout } from './widgets/widget-layout.js';
|
|
4
|
+
export type { GtkWidgetLayout, GtkWidgetLayoutMembers } from './widgets/widget-layout.js';
|
|
5
5
|
export * as Adw from './namespace/adw.js';
|
|
6
6
|
export * as Gtk from './namespace/gtk.js';
|
|
7
7
|
export * as Gio from './namespace/gio.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { GtkAdjustment as Adjustment } from '@gjsify/adwaita-core';
|
|
2
2
|
export { GtkFileDialog as FileDialog, GtkFileFilter as FileFilter, DialogError } from '@gjsify/adwaita-core';
|
|
3
|
-
export { License, PolicyType, TextDirection, TextExtendSelection, TextWindowType } from '../widgets/gtk-enums.js';
|
|
3
|
+
export { ArrowType, License, PolicyType, TextDirection, TextExtendSelection, TextWindowType, } from '../widgets/gtk-enums.js';
|
|
4
4
|
export { GtkActionBar as ActionBar } from '../widgets/gtk-action-bar.js';
|
|
5
5
|
export { GtkBox as Box } from '../widgets/gtk-box.js';
|
|
6
6
|
export { GtkButton as Button } from '../widgets/gtk-button.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdwShadowedPropertiesNsTest: () => Promise<void>;
|
|
@@ -233,7 +233,7 @@ export declare class ItemSpec {
|
|
|
233
233
|
}
|
|
234
234
|
export declare class GridLayout extends LayoutBase {
|
|
235
235
|
protected _rows: ItemSpec[];
|
|
236
|
-
protected
|
|
236
|
+
protected _cols: ItemSpec[];
|
|
237
237
|
addColumn(itemSpec: ItemSpec): void;
|
|
238
238
|
addRow(itemSpec: ItemSpec): void;
|
|
239
239
|
removeRow(itemSpec: ItemSpec): void;
|