@gjsify/gtk-host 0.44.0 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -117,6 +117,48 @@ attachment point, `layout={{ column, row, columnSpan, rowSpan }}` a `coords` cel
117
117
  `layout={{ name, title }}` a `keyed` page. Both are read at placement time, so
118
118
  changing either RE-PLACES the child rather than doing nothing.
119
119
 
120
+ ## Lists — `@gjsify/gtk-host/list`
121
+
122
+ A `Gtk.ListView` is the one thing in GTK4 that cannot be an element: it installs no
123
+ child-adding method at all (measured against its prototype), and the carrier its
124
+ factory hands back is not a `Gtk.Widget`. What it needs instead is a model, a factory
125
+ and a key diff — none of which has a framework in it, and all of which every dialect
126
+ would otherwise own a copy of. `ListController` is that half, in a subpath rather than
127
+ a package: a `/core` subpath beats a new `-core` package unless a separate NAME buys a
128
+ package-level cycle or an independent external consumer, and neither is in play.
129
+
130
+ It imports Gtk, GObject and Gio and nothing else — no React, no Solid, no Vue; `Gio`
131
+ is not an oversight in that list but the module's centrepiece, since the model IS a
132
+ `Gio.ListStore`. The constraint that matters is the framework one, and
133
+ `scripts/check-adapter-import-direction.mjs` enforces it rather than this sentence. The
134
+ dialect supplies three callbacks:
135
+
136
+ | callback | called from | what it owes |
137
+ |---|---|---|
138
+ | `mountRow(item)` | `setup` | take the carrier, put a subtree root in it, return a handle |
139
+ | `showRow(handle, row, index)` | `bind`, `unbind` (with `null`), and a same-key content change | show that row, or empty it |
140
+ | `disposeRow(handle)` | `teardown` and `dispose()` | let go |
141
+
142
+ **Take the carrier ONCE, in `mountRow`.** GTK recycles a carrier across `bind`/`unbind`,
143
+ and `adopt` snapshots what a container already held without being able to tell the
144
+ host's own previous child from application chrome — so a dialect that adopts per bind
145
+ refuses with `occupied-slot`. `host.spec.ts` pins that
146
+ refusal. The route that reaches it FIRST is not GTK recycling a carrier, which needs
147
+ scrolling: it is `setRows` over unchanged keys, which shows every live row again through
148
+ the same handle with no GTK involvement, so a per-show `adopt` fails on the first content
149
+ change; `list/controller.ts` carries the three measurements the controller's shape
150
+ follows from (the `Gio.ListStore` carrier identity, why a data change SPLICES rather
151
+ than emitting `items-changed`, and why `dispose()` and not GTK's `teardown` is the
152
+ teardown authority).
153
+
154
+ `@gjsify/gtk-host/solid`'s `listRows` is the Solid half, and it is one reactive root
155
+ per ROW WIDGET rather than per bound row: a row sees an ACCESSOR, so a content change
156
+ behind an unchanged key writes one property and the widget survives — asserted by
157
+ identity in `list/list.spec.ts`. `@gjsify/react-native`'s `lists/controller.ts` is the
158
+ React half, and it defers every row render to a microtask, which is React's constraint
159
+ and not GTK's: the adapter's `render()` refuses a re-entrant flush by name, and GTK
160
+ binds rows from inside React's own commit.
161
+
120
162
  ## Lifetime
121
163
 
122
164
  `remove` detaches and is reversible, because frameworks move nodes. The wrapper
@@ -486,10 +528,14 @@ contain, and a reader who concludes `@gjsify/gtk-host/testing` exists.
486
528
 
487
529
  ## The widget table, and the type surfaces
488
530
 
489
- The table is **generated from the GIR** and committed. 164 concrete GtkWidget
490
- descendants (Gtk 102, Adw 62), each with its GType name, its kebab tag and a lazy
491
- `ctor`; 26 of them also carry a **curated** placement rule, and the generator may
492
- only ever ADD a tag, never contradict one. A tag with no curated rule gets
531
+ The table is **generated from the GIR** and committed, from TWO rules: every concrete
532
+ `GtkWidget` descendant, plus the concrete non-widgets that hold one — GTK4's list
533
+ carriers, which take no children of their own but whose `child` is where a row's
534
+ subtree goes (ADR 0028 § Amendment). Each row carries its GType name, its kebab tag and
535
+ a lazy `ctor`; some also carry a **curated** placement rule, and the generator may
536
+ only ever ADD a tag, never contradict one. `tableProvenance()` reports every live
537
+ figure — the counts are deliberately not stamped here, because the pair that used to
538
+ stand in this sentence was wrong in both halves. A tag with no curated rule gets
493
539
  `children: { kind: 'uncurated' }` — the widget can be created, given properties and
494
540
  given handlers, while inserting a child raises an error naming the tag that needs a
495
541
  policy. Guessing is not on offer: `add`, `append` and `set_child` all exist
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{adopt as e,createElement as t,createText as n,describeValue as r,destroyChildren as i,disconnectHandlers as a,firstChild as o,insert as s,isText as c,nextSibling as l,parentNode as u,remove as d,setProp as f,setText as p,widgetOf as m}from"../host.js";import{For as h,Index as g,Show as _,onCleanup as v,splitProps as y,untrack as b}from"solid-js";import{createRenderer as x}from"solid-js/universal";const S=new Set([`element`,`text`,`anchor`]);function assertHostNode(e){let t=e?.kind;if(!(typeof t==`string`&&S.has(t)))throw Error(`@gjsify/gtk-host/solid: insertNode got ${r(e)}, which is not a node of this renderer. Almost always this is a component from solid-js/web — the DOM renderer — reaching a universal one: its <Dynamic>, <Portal> and template() build DOM elements with document.createElement and spread onto them with the DOM's own spread, so nothing arrives through these host ops and the subtree renders NOTHING, silently. Import Dynamic, For, Index and Show from @gjsify/gtk-host/solid instead; solid-js's own control flow (For/Index/Show) is renderer-agnostic, everything under solid-js/web is not.`)}const{render:C,effect:w,memo:T,createComponent:E,createElement:D,createTextNode:O,insertNode:k,insert:A,spread:j,setProp:M,mergeProps:N,use:P}=x({createElement:e=>{let n=t(e);return v(()=>a(n)),n},createTextNode:e=>n(e),replaceText:(e,t)=>{p(e,t)},isTextNode:e=>c(e),setProperty:(e,t,n,r)=>{f(e,t,n,r)},insertNode:(e,t,n)=>{assertHostNode(t),s(t,e,n??null)},removeNode:(e,t)=>{d(t)},getParentNode:e=>u(e)??void 0,getFirstChild:e=>e.kind===`element`?o(e)??void 0:void 0,getNextSibling:e=>l(e)??void 0});function mount(t,n){let r=e(n),a=C(t,r);return()=>{a(),i(r)}}const F=h,I=g,L=_;function Dynamic(e){let[,t]=y(e,[`component`]);return T(()=>{let n=e.component;if(typeof n==`function`)return b(()=>n(t));if(typeof n==`string`){let e=D(n);return j(e,t,!1),e}throw Error(`@gjsify/gtk-host/solid: <Dynamic component={…}> needs a registered tag name or a component function, and got ${r(n)}. Solid's own DOM version returns undefined here and renders nothing at all — a lookup that missed is indistinguishable from an empty branch. Use <Show when={…}> to render nothing on purpose.`)},!1)}export{Dynamic,F as For,I as Index,L as Show,E as createComponent,D as createElement,O as createTextNode,w as effect,A as insert,k as insertNode,T as memo,N as mergeProps,mount,C as render,M as setProp,j as spread,P as use,m as widgetOf};
1
+ import"../_virtual/_rolldown/runtime.js";import{adopt as e,createElement as t,createText as n,describeValue as r,destroyChildren as i,disconnectHandlers as a,firstChild as o,insert as s,isText as c,nextSibling as l,parentNode as u,remove as d,setProp as f,setText as p,widgetOf as m}from"../host.js";import{For as h,Index as g,Show as _,batch as v,createMemo as y,createRoot as b,createSignal as x,onCleanup as S,splitProps as C,untrack as w}from"solid-js";import{createRenderer as T}from"solid-js/universal";const E=new Set([`element`,`text`,`anchor`]);function assertHostNode(e){let t=e?.kind;if(!(typeof t==`string`&&E.has(t)))throw Error(`@gjsify/gtk-host/solid: insertNode got ${r(e)}, which is not a node of this renderer. Almost always this is a component from solid-js/web — the DOM renderer — reaching a universal one: its <Dynamic>, <Portal> and template() build DOM elements with document.createElement and spread onto them with the DOM's own spread, so nothing arrives through these host ops and the subtree renders NOTHING, silently. Import Dynamic, For, Index and Show from @gjsify/gtk-host/solid instead; solid-js's own control flow (For/Index/Show) is renderer-agnostic, everything under solid-js/web is not.`)}const{render:D,effect:O,memo:k,createComponent:A,createElement:j,createTextNode:M,insertNode:N,insert:P,spread:F,setProp:I,mergeProps:L,use:R}=T({createElement:e=>{let n=t(e);return S(()=>a(n)),n},createTextNode:e=>n(e),replaceText:(e,t)=>{p(e,t)},isTextNode:e=>c(e),setProperty:(e,t,n,r)=>{f(e,t,n,r)},insertNode:(e,t,n)=>{assertHostNode(t),s(t,e,n??null)},removeNode:(e,t)=>{d(t)},getParentNode:e=>u(e)??void 0,getFirstChild:e=>e.kind===`element`?o(e)??void 0:void 0,getNextSibling:e=>l(e)??void 0});function mount(t,n){let r=e(n),a=D(t,r);return()=>{a(),i(r)}}function listRows(t){return{mountRow(n){let r=e(n);return b(e=>{let[n,a]=x(null),[o,s]=x(0),c=y(()=>n()!==null);return P(r,()=>c()?t(n,o):null),{show(e,t){v(()=>{s(t),a(()=>e)})},dispose(){e(),i(r)}}})},showRow(e,t,n){e.show(t,n)},disposeRow(e){e.dispose()}}}const z=h,B=g,V=_;function Dynamic(e){let[,t]=C(e,[`component`]);return k(()=>{let n=e.component;if(typeof n==`function`)return w(()=>n(t));if(typeof n==`string`){let e=j(n);return F(e,t,!1),e}throw Error(`@gjsify/gtk-host/solid: <Dynamic component={…}> needs a registered tag name or a component function, and got ${r(n)}. Solid's own DOM version returns undefined here and renders nothing at all — a lookup that missed is indistinguishable from an empty branch. Use <Show when={…}> to render nothing on purpose.`)},!1)}export{Dynamic,z as For,B as Index,V as Show,A as createComponent,j as createElement,M as createTextNode,O as effect,P as insert,N as insertNode,listRows,k as memo,L as mergeProps,mount,D as render,I as setProp,F as spread,R as use,m as widgetOf};
@@ -1,2 +1,2 @@
1
- import"../_virtual/_rolldown/runtime.js";import{addressOf as e,unhandledPolicy as t}from"../policies.js";import{describeLogRecord as n,installDiagnosticsGate as r,isEnvironmentDiagnostic as i}from"./diagnostics.js";import{BUILTIN_DESCRIPTORS as a}from"../descriptors/index.js";import o from"gi://GObject";function methodsOf(e){switch(e.kind){case`none`:case`uncurated`:return[];case`single`:return[e.set];case`ordered`:return e.after?[e.append,e.after,e.remove]:[e.append,e.remove];case`indexed`:return[e.insert,e.remove];case`slotted`:return[...Object.values(e.slots),e.remove];case`keyed`:return[e.add,e.remove];case`coords`:return[e.attach,e.remove];default:return t(e)}}function descriptorProblems(e=a){let t=[];for(let n of e){let e;try{e=n.ctor()}catch(e){t.push({gtype:n.gtype,problem:`ctor() threw: ${e.message}`});continue}let r=o.type_name(e.$gtype);r!==n.gtype&&t.push({gtype:n.gtype,problem:`ctor() is ${r}, not ${n.gtype}`});for(let i of methodsOf(n.children))typeof e.prototype[i]!=`function`&&t.push({gtype:n.gtype,problem:`declares children.${i}(), which ${r} does not have`});if(n.textSink){let i=e.list_properties().find(e=>e.get_name()===n.textSink);i?(i.flags&o.ParamFlags.WRITABLE)===0?t.push({gtype:n.gtype,problem:`declares a READ-ONLY textSink "${n.textSink}"`}):o.type_is_a(i.value_type,o.TYPE_STRING)||t.push({gtype:n.gtype,problem:`declares textSink "${n.textSink}", which is ${o.type_name(i.value_type)}, not a string`}):t.push({gtype:n.gtype,problem:`declares textSink "${n.textSink}", which ${r} does not have`})}t.push(...policyProblems(n,e,r))}return t}function policyProblems(e,t,n){let r=[],i=t.prototype,a=e.children,requireGetter=(t,a)=>{let o=t.replace(/^set_/,`get_`);typeof i[o]!=`function`&&r.push({gtype:e.gtype,problem:`${a} uses ${t}() but ${n} has no ${o}(), so removal cannot check whether this child is still the one in place`})};if(a.kind===`single`&&requireGetter(a.set,`children.set`),a.kind===`slotted`){for(let[e,t]of Object.entries(a.slots))t.startsWith(`set_`)&&requireGetter(t,`slot "${e}"`);a.defaultSlot in a.slots||r.push({gtype:e.gtype,problem:`defaultSlot "${a.defaultSlot}" is not one of ${Object.keys(a.slots).join(`, `)}`})}if(a.kind===`ordered`&&a.reorder===`native`&&!a.after&&r.push({gtype:e.gtype,problem:`claims reorder: 'native' with no "after" method — reorderMode() would tell an adapter the wrong thing`}),a.kind===`keyed`){let t=i[a.add],o=a.titled?3:1;typeof t==`function`&&t.length!==o&&r.push({gtype:e.gtype,problem:`titled: ${a.titled} implies ${a.add}() takes ${o} argument(s), but ${n}'s takes ${t.length}`})}return r}function gtkChildren(e){let t=[],n=e;if(typeof n.get_first_child!=`function`)return t;for(let e=n.get_first_child();e;e=e.get_next_sibling())t.push(e);return t}const gtkChildTypes=e=>gtkChildren(e).map(e=>o.type_name(e.constructor.$gtype));function addressesOf(t){let n=[];for(let r=t.first;r;r=r.next)r.kind===`element`&&r.widget&&n.push(e(r));return n}function findDescendant(e,t){let n=[e];for(;n.length>0;){let r=n.shift();if(r!==e&&t(r))return r;n.push(...gtkChildren(r))}return null}function descendants(e){let t=[e];for(let n of gtkChildren(e))t.push(...descendants(n));return t}function dumpTree(e,t=0){let n=o.type_name(e.constructor.$gtype),r=[`${` `.repeat(t)}${n}`];for(let n of gtkChildren(e))r.push(dumpTree(n,t+1));return r.join(`
2
- `)}export{addressesOf,descendants,n as describeLogRecord,descriptorProblems,dumpTree,findDescendant,gtkChildTypes,gtkChildren,r as installDiagnosticsGate,i as isEnvironmentDiagnostic,methodsOf};
1
+ import"../_virtual/_rolldown/runtime.js";import{adderSlots as e,addressOf as t,unhandledPolicy as n}from"../policies.js";import{describeLogRecord as r,installDiagnosticsGate as i,isEnvironmentDiagnostic as a}from"./diagnostics.js";import{BUILTIN_DESCRIPTORS as o}from"../descriptors/index.js";import s from"gi://GObject";function methodsOf(e){switch(e.kind){case`none`:case`uncurated`:return[];case`single`:return[e.set];case`ordered`:return e.after?[e.append,e.after,e.remove]:[e.append,e.remove];case`indexed`:return[e.insert,e.remove];case`slotted`:return e.remove?[...Object.values(e.slots),e.remove]:Object.values(e.slots);case`keyed`:return[e.add,e.remove];case`coords`:return[e.attach,e.remove];default:return n(e)}}function descriptorProblems(e=o){let t=[];for(let n of e){let e;try{e=n.ctor()}catch(e){t.push({gtype:n.gtype,problem:`ctor() threw: ${e.message}`});continue}let r=s.type_name(e.$gtype);r!==n.gtype&&t.push({gtype:n.gtype,problem:`ctor() is ${r}, not ${n.gtype}`});for(let i of methodsOf(n.children))typeof e.prototype[i]!=`function`&&t.push({gtype:n.gtype,problem:`declares children.${i}(), which ${r} does not have`});if(n.textSink){let i=e.list_properties().find(e=>e.get_name()===n.textSink);i?(i.flags&s.ParamFlags.WRITABLE)===0?t.push({gtype:n.gtype,problem:`declares a READ-ONLY textSink "${n.textSink}"`}):s.type_is_a(i.value_type,s.TYPE_STRING)||t.push({gtype:n.gtype,problem:`declares textSink "${n.textSink}", which is ${s.type_name(i.value_type)}, not a string`}):t.push({gtype:n.gtype,problem:`declares textSink "${n.textSink}", which ${r} does not have`})}t.push(...policyProblems(n,e,r))}return t}function policyProblems(t,n,r){let i=[],a=n.prototype,o=t.children,requireGetter=(e,n)=>{let o=e.replace(/^set_/,`get_`);typeof a[o]!=`function`&&i.push({gtype:t.gtype,problem:`${n} uses ${e}() but ${r} has no ${o}(), so removal cannot check whether this child is still the one in place`})};if(o.kind===`single`&&requireGetter(o.set,`children.set`),o.kind===`slotted`){for(let[e,t]of Object.entries(o.slots))t.startsWith(`set_`)&&requireGetter(t,`slot "${e}"`);o.defaultSlot in o.slots||i.push({gtype:t.gtype,problem:`defaultSlot "${o.defaultSlot}" is not one of ${Object.keys(o.slots).join(`, `)}`});let n=e(o);n.length>0&&!o.remove&&i.push({gtype:t.gtype,problem:`slot(s) ${n.map(e=>`"${e}"`).join(`, `)} are adder-backed, so removal needs a "remove" method and this policy names none`})}if(o.kind===`ordered`&&o.reorder===`native`&&!o.after&&i.push({gtype:t.gtype,problem:`claims reorder: 'native' with no "after" method — reorderMode() would tell an adapter the wrong thing`}),o.kind===`keyed`){let e=a[o.add],n=o.titled?3:1;typeof e==`function`&&e.length!==n&&i.push({gtype:t.gtype,problem:`titled: ${o.titled} implies ${o.add}() takes ${n} argument(s), but ${r}'s takes ${e.length}`})}return i}function gtkChildren(e){let t=[],n=e;if(typeof n.get_first_child!=`function`)return t;for(let e=n.get_first_child();e;e=e.get_next_sibling())t.push(e);return t}const gtkChildTypes=e=>gtkChildren(e).map(e=>s.type_name(e.constructor.$gtype));function addressesOf(e){let n=[];for(let r=e.first;r;r=r.next)r.kind===`element`&&r.widget&&n.push(t(r));return n}function findDescendant(e,t){let n=[e];for(;n.length>0;){let r=n.shift();if(r!==e&&t(r))return r;n.push(...gtkChildren(r))}return null}function descendants(e){let t=[e];for(let n of gtkChildren(e))t.push(...descendants(n));return t}function dumpTree(e,t=0){let n=s.type_name(e.constructor.$gtype),r=[`${` `.repeat(t)}${n}`];for(let n of gtkChildren(e))r.push(dumpTree(n,t+1));return r.join(`
2
+ `)}export{addressesOf,descendants,r as describeLogRecord,descriptorProblems,dumpTree,findDescendant,gtkChildTypes,gtkChildren,i as installDiagnosticsGate,a as isEnvironmentDiagnostic,methodsOf};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import e from"gi://Adw?version=1";const t=[{gtype:`AdwApplicationWindow`,ctor:()=>e.ApplicationWindow,children:{kind:`single`,set:`set_content`}},{gtype:`AdwWindow`,ctor:()=>e.Window,children:{kind:`single`,set:`set_content`}},{gtype:`AdwBin`,ctor:()=>e.Bin,children:{kind:`single`,set:`set_child`}},{gtype:`AdwToolbarView`,ctor:()=>e.ToolbarView,children:{kind:`slotted`,slots:{top:`add_top_bar`,bottom:`add_bottom_bar`,content:`set_content`},defaultSlot:`content`,remove:`remove`}},{gtype:`AdwHeaderBar`,ctor:()=>e.HeaderBar,children:{kind:`slotted`,slots:{start:`pack_start`,end:`pack_end`,title:`set_title_widget`},defaultSlot:`start`,remove:`remove`}},{gtype:`AdwPreferencesGroup`,ctor:()=>e.PreferencesGroup,children:{kind:`ordered`,append:`add`,remove:`remove`,reorder:`remove-all`}},{gtype:`AdwPreferencesPage`,ctor:()=>e.PreferencesPage,children:{kind:`indexed`,insert:`insert`,remove:`remove`,wrap:null}},{gtype:`AdwActionRow`,ctor:()=>e.ActionRow,children:{kind:`slotted`,slots:{prefix:`add_prefix`,suffix:`add_suffix`},defaultSlot:`suffix`,remove:`remove`}},{gtype:`AdwStatusPage`,ctor:()=>e.StatusPage,children:{kind:`single`,set:`set_child`}},{gtype:`AdwNavigationView`,ctor:()=>e.NavigationView,children:{kind:`keyed`,add:`add`,remove:`remove`,nameFrom:`tag`,titled:!1}},{gtype:`AdwNavigationPage`,ctor:()=>e.NavigationPage,children:{kind:`single`,set:`set_child`}},{gtype:`AdwViewStack`,ctor:()=>e.ViewStack,children:{kind:`keyed`,add:`add_titled`,remove:`remove`,nameFrom:`name`,titled:!0}}];export{t as ADW_DESCRIPTORS};
1
+ import"../_virtual/_rolldown/runtime.js";import e from"gi://Adw?version=1";const t=[{gtype:`AdwToggle`,ctor:()=>e.Toggle,children:{kind:`single`,set:`set_child`}},{gtype:`AdwApplicationWindow`,ctor:()=>e.ApplicationWindow,children:{kind:`single`,set:`set_content`}},{gtype:`AdwWindow`,ctor:()=>e.Window,children:{kind:`single`,set:`set_content`}},{gtype:`AdwBin`,ctor:()=>e.Bin,children:{kind:`single`,set:`set_child`}},{gtype:`AdwToolbarView`,ctor:()=>e.ToolbarView,children:{kind:`slotted`,slots:{top:`add_top_bar`,bottom:`add_bottom_bar`,content:`set_content`},defaultSlot:`content`,remove:`remove`}},{gtype:`AdwHeaderBar`,ctor:()=>e.HeaderBar,children:{kind:`slotted`,slots:{start:`pack_start`,end:`pack_end`,title:`set_title_widget`},defaultSlot:`start`,remove:`remove`}},{gtype:`AdwPreferencesGroup`,ctor:()=>e.PreferencesGroup,children:{kind:`ordered`,append:`add`,remove:`remove`,reorder:`remove-all`}},{gtype:`AdwPreferencesPage`,ctor:()=>e.PreferencesPage,children:{kind:`indexed`,insert:`insert`,remove:`remove`,wrap:null}},{gtype:`AdwActionRow`,ctor:()=>e.ActionRow,children:{kind:`slotted`,slots:{prefix:`add_prefix`,suffix:`add_suffix`},defaultSlot:`suffix`,remove:`remove`}},{gtype:`AdwStatusPage`,ctor:()=>e.StatusPage,children:{kind:`single`,set:`set_child`}},{gtype:`AdwNavigationView`,ctor:()=>e.NavigationView,children:{kind:`keyed`,add:`add`,remove:`remove`,nameFrom:`tag`,titled:!1}},{gtype:`AdwNavigationPage`,ctor:()=>e.NavigationPage,children:{kind:`single`,set:`set_child`}},{gtype:`AdwViewStack`,ctor:()=>e.ViewStack,children:{kind:`keyed`,add:`add_titled`,remove:`remove`,nameFrom:`name`,titled:!0}},{gtype:`AdwClamp`,ctor:()=>e.Clamp,children:{kind:`single`,set:`set_child`}},{gtype:`AdwClampScrollable`,ctor:()=>e.ClampScrollable,children:{kind:`single`,set:`set_child`}},{gtype:`AdwBreakpointBin`,ctor:()=>e.BreakpointBin,children:{kind:`single`,set:`set_child`}},{gtype:`AdwNavigationSplitView`,ctor:()=>e.NavigationSplitView,children:{kind:`slotted`,slots:{sidebar:`set_sidebar`,content:`set_content`},defaultSlot:`content`}},{gtype:`AdwOverlaySplitView`,ctor:()=>e.OverlaySplitView,children:{kind:`slotted`,slots:{sidebar:`set_sidebar`,content:`set_content`},defaultSlot:`content`}}];export{t as ADW_DESCRIPTORS};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import e from"gi://Gtk?version=4.0";const t=[{gtype:`GtkBox`,ctor:()=>e.Box,children:{kind:`ordered`,append:`append`,after:`insert_child_after`,remove:`remove`,reorder:`native`}},{gtype:`GtkWindow`,ctor:()=>e.Window,children:{kind:`single`,set:`set_child`}},{gtype:`GtkApplicationWindow`,ctor:()=>e.ApplicationWindow,children:{kind:`single`,set:`set_child`}},{gtype:`GtkScrolledWindow`,ctor:()=>e.ScrolledWindow,children:{kind:`single`,set:`set_child`}},{gtype:`GtkFrame`,ctor:()=>e.Frame,children:{kind:`single`,set:`set_child`}},{gtype:`GtkOverlay`,ctor:()=>e.Overlay,children:{kind:`slotted`,slots:{child:`set_child`,overlay:`add_overlay`},defaultSlot:`child`,remove:`remove_overlay`}},{gtype:`GtkLabel`,ctor:()=>e.Label,children:{kind:`none`},textSink:`label`},{gtype:`GtkButton`,ctor:()=>e.Button,children:{kind:`single`,set:`set_child`},textSink:`label`},{gtype:`GtkToggleButton`,ctor:()=>e.ToggleButton,children:{kind:`single`,set:`set_child`},textSink:`label`},{gtype:`GtkImage`,ctor:()=>e.Image,children:{kind:`none`}},{gtype:`GtkSwitch`,ctor:()=>e.Switch,children:{kind:`none`}},{gtype:`GtkEntry`,ctor:()=>e.Entry,children:{kind:`none`},textSink:`text`},{gtype:`GtkListBox`,ctor:()=>e.ListBox,children:{kind:`indexed`,insert:`insert`,remove:`remove`,wrap:`list-box-row`}},{gtype:`GtkFlowBox`,ctor:()=>e.FlowBox,children:{kind:`indexed`,insert:`insert`,remove:`remove`,wrap:`flow-box-child`}},{gtype:`GtkListBoxRow`,ctor:()=>e.ListBoxRow,children:{kind:`single`,set:`set_child`}},{gtype:`GtkStack`,ctor:()=>e.Stack,children:{kind:`keyed`,add:`add_titled`,remove:`remove`,nameFrom:`name`,titled:!0}},{gtype:`GtkGrid`,ctor:()=>e.Grid,children:{kind:`coords`,attach:`attach`,remove:`remove`}},{gtype:`GtkHeaderBar`,ctor:()=>e.HeaderBar,children:{kind:`slotted`,slots:{start:`pack_start`,end:`pack_end`,title:`set_title_widget`},defaultSlot:`start`,remove:`remove`}}];export{t as GTK_DESCRIPTORS};
1
+ import"../_virtual/_rolldown/runtime.js";import e from"gi://Gtk?version=4.0";const t=[{gtype:`GtkBox`,ctor:()=>e.Box,children:{kind:`ordered`,append:`append`,after:`insert_child_after`,remove:`remove`,reorder:`native`}},{gtype:`GtkWindow`,ctor:()=>e.Window,children:{kind:`single`,set:`set_child`}},{gtype:`GtkApplicationWindow`,ctor:()=>e.ApplicationWindow,children:{kind:`single`,set:`set_child`}},{gtype:`GtkScrolledWindow`,ctor:()=>e.ScrolledWindow,children:{kind:`single`,set:`set_child`}},{gtype:`GtkFrame`,ctor:()=>e.Frame,children:{kind:`single`,set:`set_child`}},{gtype:`GtkOverlay`,ctor:()=>e.Overlay,children:{kind:`slotted`,slots:{child:`set_child`,overlay:`add_overlay`},defaultSlot:`child`,remove:`remove_overlay`}},{gtype:`GtkLabel`,ctor:()=>e.Label,children:{kind:`none`},textSink:`label`},{gtype:`GtkButton`,ctor:()=>e.Button,children:{kind:`single`,set:`set_child`},textSink:`label`},{gtype:`GtkToggleButton`,ctor:()=>e.ToggleButton,children:{kind:`single`,set:`set_child`},textSink:`label`},{gtype:`GtkImage`,ctor:()=>e.Image,children:{kind:`none`}},{gtype:`GtkSwitch`,ctor:()=>e.Switch,children:{kind:`none`}},{gtype:`GtkEntry`,ctor:()=>e.Entry,children:{kind:`none`},textSink:`text`},{gtype:`GtkListBox`,ctor:()=>e.ListBox,children:{kind:`indexed`,insert:`insert`,remove:`remove`,wrap:`list-box-row`}},{gtype:`GtkFlowBox`,ctor:()=>e.FlowBox,children:{kind:`indexed`,insert:`insert`,remove:`remove`,wrap:`flow-box-child`}},{gtype:`GtkListBoxRow`,ctor:()=>e.ListBoxRow,children:{kind:`single`,set:`set_child`}},{gtype:`GtkListItem`,ctor:()=>e.ListItem,children:{kind:`single`,set:`set_child`}},{gtype:`GtkListHeader`,ctor:()=>e.ListHeader,children:{kind:`single`,set:`set_child`}},{gtype:`GtkColumnViewCell`,ctor:()=>e.ColumnViewCell,children:{kind:`single`,set:`set_child`}},{gtype:`GtkStack`,ctor:()=>e.Stack,children:{kind:`keyed`,add:`add_titled`,remove:`remove`,nameFrom:`name`,titled:!0}},{gtype:`GtkGrid`,ctor:()=>e.Grid,children:{kind:`coords`,attach:`attach`,remove:`remove`}},{gtype:`GtkHeaderBar`,ctor:()=>e.HeaderBar,children:{kind:`slotted`,slots:{start:`pack_start`,end:`pack_end`,title:`set_title_widget`},defaultSlot:`start`,remove:`remove`}}];export{t as GTK_DESCRIPTORS};
package/lib/esm/errors.js CHANGED
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";var GtkHostError=class extends Error{constructor(e,t){super(t),this.code=e,this.name=`GtkHostError`}};const e={unknownTag:e=>new GtkHostError(`unknown-tag`,`No descriptor registered for <${e}>. Register one with registerWidget({ gtype: '${e}', … }). Being a real GType in the installed typelib is not enough on its own.`),missingConstructProp:(e,t)=>new GtkHostError(`missing-construct-prop`,`<${e}> cannot be constructed without ${t}. In the installed library this is not an exception but a g_error(): the process ABORTS (SIGABRT, exit 134, core dump) with no catch and no diagnostic, so the host refuses here while a refusal is still reportable. Author ${t} on the element.`),unknownProp:(e,t)=>new GtkHostError(`unknown-prop`,`<${e}> has no property "${t}". Check the spelling against the installed GTK (camelCase and kebab-case both resolve), or bind it as a signal with on${t[0]?.toUpperCase()}${t.slice(1)}.`),readOnlyProp:(e,t)=>new GtkHostError(`read-only-prop`,`<${e}>.${t} is read-only in the installed GTK. Writing it is a silent no-op in GObject, so this host refuses it instead of dropping the value.`),badEnum:(e,t,n,r)=>new GtkHostError(`bad-enum`,`<${e}>.${t} expects ${r}, and "${n}" is not one of its values. Note that GObject accepts the wrong string SILENTLY — the property would have kept its old value.`),unknownSignal:(e,t,n)=>new GtkHostError(`unknown-signal`,`<${e}> emits no signal "${n}" (bound as ${t}). Check the spelling against the installed GTK, or use the escape hatch on:<raw-signal-name> if the name is irregular.`),signalTaken:(e,t,n,r)=>new GtkHostError(`signal-taken`,`<${e}> already binds "${r}" through ${n}, so ${t} would silently replace it — GObject has one handler per connect, and this host keeps one per signal name. Use one spelling, or combine the two callbacks yourself.`),eventModifier:(e,t)=>new GtkHostError(`event-modifier`,`${e} carries the DOM listener modifier ".${t}", which has no GObject meaning: a signal is emitted on one object and does not propagate through a tree, so there is no capture phase and nothing to be passive about. Drop the modifier (${e.slice(0,e.length-t.length)}); for GTK4's own propagation phases set "propagation-phase" on a Gtk.EventController instead.`),badString:(e,t,n)=>new GtkHostError(`bad-string`,`<${e}>.${t} is a string property and got a ${n}. Numbers and booleans are stringified; anything else has no unambiguous spelling, and GObject would have thrown from inside the next rebuild.`),badBoolean:(e,t,n)=>new GtkHostError(`bad-boolean`,`<${e}>.${t} is a boolean and got the string "${n}". JS truthiness would make "false" mean TRUE — the exact silent-wrong-value this host exists to refuse. Pass a real boolean.`),badFlags:(e,t,n,r)=>new GtkHostError(`bad-flags`,`<${e}>.${t} expects the flags type ${r}, and a string ("${n}") cannot be resolved to one. Pass the numeric value (bitwise-or the members). GObject would have dropped the string silently.`),unresolvableEnum:e=>new GtkHostError(`unresolvable-enum`,`Cannot resolve the enum type ${e} to a GI namespace. Pass the numeric value instead, or extend ENUM_NAMESPACES in props.ts.`),textNotAccepted:(e,t)=>new GtkHostError(`text-not-accepted`,`<${e}> has no text sink, so the text ${JSON.stringify(t.slice(0,32))} has nowhere to go. Wrap it in a widget that takes text (<GtkLabel>), or set the property directly.`),unclaimedChild:(e,t)=>new GtkHostError(`unclaimed-child`,`<${e}> declares children: { kind: 'none' }, so it cannot adopt <${t}>. Fix one of three things: give the parent a child policy, wrap the child in a container, or set the child on a property (e.g. a "child" or "content" property).`),unknownSlot:(e,t,n)=>new GtkHostError(`unknown-slot`,`<${e}> has no slot "${t}". Known slots: ${n.join(`, `)}.`),rejectedChild:(e,t,n)=>new GtkHostError(`rejected-child`,`<${e}> refused <${t}>: ${n}. The container accepts only certain child types (e.g. AdwPreferencesPage takes AdwPreferencesGroup); the descriptor cannot know that, GTK does.`),uncuratedPlacement:(e,t)=>new GtkHostError(`uncurated-placement`,`<${e}> comes from the GENERATED table, which knows the tag but not how the widget adopts a child, so it cannot take <${t}>. Guessing is the one thing that is not available here: \`add\`, \`append\` and \`set_child\` all exist somewhere in GTK and calling the wrong one is a warning at exit 0. Add a curated policy for ${e} in descriptors/, or mount into a container that has one.`),siblingCycle:e=>new GtkHostError(`sibling-cycle`,`The child list of <${e}> does not terminate. A renderer linked a node to itself or into a loop; the host refuses to walk it rather than spin. This is a host or adapter bug, not an application one — please report it with the reordering that produced it.`),notAWidget:e=>new GtkHostError(`not-a-widget`,`<${e}> is not a Gtk.Widget, so it cannot be placed as a child. Non-widget GObjects (controllers, filters, models) attach to a property, not to a parent.`),occupiedSlot:(e,t,n)=>new GtkHostError(`occupied-slot`,`<${e}> already holds a child the application put there, and ${n}() takes only ONE — placing <${t}> would unparent it. GTK does that silently: no throw, no warning, exit 0, and the application's own widget is simply gone. Mount into a container of your own inside <${e}>, or clear the existing child first (${n}(null)) if replacing it is the intent.`),notAnElement:e=>new GtkHostError(`not-an-element`,`Only an element node owns a widget, and this node is a ${e}. A text node's content lives in its PARENT's text sink and an anchor owns nothing at all — neither has a widget to hand back. Ask the parent element instead.`),destroyedNode:e=>new GtkHostError(`destroyed-node`,`<${e}> was destroyed, so its widget is gone. Asking again would MATERIALISE a fresh, propertyless, unparented widget — \`destroy\` clears props and layout precisely so a destroyed element cannot look re-materialisable — and a caller holding that widget would be looking at nothing on screen.`),notAHostParent:e=>new GtkHostError(`not-a-host-parent`,`insert() needs a host element as the parent and got ${e}. A raw widget cannot be one: the shadow tree lives in the host's own fields, so writing them onto a GObject wrapper renders nothing and reports nothing — Vue's <Teleport to="someWidget"> hands the widget through verbatim and landed exactly here. Wrap it with adopt(widget) first, which is what mountRoot() does.`)};export{GtkHostError,e as err};
1
+ import"./_virtual/_rolldown/runtime.js";var GtkHostError=class extends Error{constructor(e,t){super(t),this.code=e,this.name=`GtkHostError`}};const e={unknownTag:e=>new GtkHostError(`unknown-tag`,`No descriptor registered for <${e}>. Register one with registerWidget({ gtype: '${e}', … }). Being a real GType in the installed typelib is not enough on its own.`),missingConstructProp:(e,t)=>new GtkHostError(`missing-construct-prop`,`<${e}> cannot be constructed without ${t}. In the installed library this is not an exception but a g_error(): the process ABORTS (SIGABRT, exit 134, core dump) with no catch and no diagnostic, so the host refuses here while a refusal is still reportable. Author ${t} on the element.`),unknownProp:(e,t)=>new GtkHostError(`unknown-prop`,`<${e}> has no property "${t}". Check the spelling against the installed GTK (camelCase and kebab-case both resolve), or bind it as a signal with on${t[0]?.toUpperCase()}${t.slice(1)}.`),readOnlyProp:(e,t)=>new GtkHostError(`read-only-prop`,`<${e}>.${t} is read-only in the installed GTK. Writing it is a silent no-op in GObject, so this host refuses it instead of dropping the value.`),badEnum:(e,t,n,r)=>new GtkHostError(`bad-enum`,`<${e}>.${t} expects ${r}, and "${n}" is not one of its values. Note that GObject accepts the wrong string SILENTLY — the property would have kept its old value.`),unknownSignal:(e,t,n)=>new GtkHostError(`unknown-signal`,`<${e}> emits no signal "${n}" (bound as ${t}). Check the spelling against the installed GTK, or use the escape hatch on:<raw-signal-name> if the name is irregular.`),signalTaken:(e,t,n,r)=>new GtkHostError(`signal-taken`,`<${e}> already binds "${r}" through ${n}, so ${t} would silently replace it — GObject has one handler per connect, and this host keeps one per signal name. Use one spelling, or combine the two callbacks yourself.`),eventModifier:(e,t)=>new GtkHostError(`event-modifier`,`${e} carries the DOM listener modifier ".${t}", which has no GObject meaning: a signal is emitted on one object and does not propagate through a tree, so there is no capture phase and nothing to be passive about. Drop the modifier (${e.slice(0,e.length-t.length)}); for GTK4's own propagation phases set "propagation-phase" on a Gtk.EventController instead.`),badString:(e,t,n)=>new GtkHostError(`bad-string`,`<${e}>.${t} is a string property and got a ${n}. Numbers and booleans are stringified; anything else has no unambiguous spelling, and GObject would have thrown from inside the next rebuild.`),badBoolean:(e,t,n)=>new GtkHostError(`bad-boolean`,`<${e}>.${t} is a boolean and got the string "${n}". JS truthiness would make "false" mean TRUE — the exact silent-wrong-value this host exists to refuse. Pass a real boolean.`),badFlags:(e,t,n,r)=>new GtkHostError(`bad-flags`,`<${e}>.${t} expects the flags type ${r}, and a string ("${n}") cannot be resolved to one. Pass the numeric value (bitwise-or the members). GObject would have dropped the string silently.`),unresolvableEnum:e=>new GtkHostError(`unresolvable-enum`,`Cannot resolve the enum type ${e} to a GI namespace. Pass the numeric value instead, or extend ENUM_NAMESPACES in props.ts.`),textNotAccepted:(e,t)=>new GtkHostError(`text-not-accepted`,`<${e}> has no text sink, so the text ${JSON.stringify(t.slice(0,32))} has nowhere to go. Wrap it in a widget that takes text (<GtkLabel>), or set the property directly.`),unclaimedChild:(e,t)=>new GtkHostError(`unclaimed-child`,`<${e}> declares children: { kind: 'none' }, so it cannot adopt <${t}>. Fix one of three things: give the parent a child policy, wrap the child in a container, or set the child on a property (e.g. a "child" or "content" property).`),unknownSlot:(e,t,n)=>new GtkHostError(`unknown-slot`,`<${e}> has no slot "${t}". Known slots: ${n.join(`, `)}.`),slotNeedsRemove:(e,t,n)=>new GtkHostError(`slot-needs-remove`,`<${e}> puts children into slot "${t}" with ${n}() and its policy names no "remove" method, so this child cannot be taken out again. A set_-prefixed slot is emptied by writing null back through the setter and needs nothing; an adder-backed one needs children.remove. Add it to the descriptor.`),rejectedChild:(e,t,n)=>new GtkHostError(`rejected-child`,`<${e}> refused <${t}>: ${n}. The container accepts only certain child types (e.g. AdwPreferencesPage takes AdwPreferencesGroup); the descriptor cannot know that, GTK does.`),uncuratedPlacement:(e,t)=>new GtkHostError(`uncurated-placement`,`<${e}> comes from the GENERATED table, which knows the tag but not how the widget adopts a child, so it cannot take <${t}>. Guessing is the one thing that is not available here: \`add\`, \`append\` and \`set_child\` all exist somewhere in GTK and calling the wrong one is a warning at exit 0. Add a curated policy for ${e} in descriptors/, or mount into a container that has one.`),siblingCycle:e=>new GtkHostError(`sibling-cycle`,`The child list of <${e}> does not terminate. A renderer linked a node to itself or into a loop; the host refuses to walk it rather than spin. This is a host or adapter bug, not an application one — please report it with the reordering that produced it.`),notAWidget:e=>new GtkHostError(`not-a-widget`,`<${e}> is not a Gtk.Widget, so it cannot be placed as a child. Non-widget GObjects (controllers, filters, models) attach to a property, not to a parent.`),occupiedSlot:(e,t,n)=>new GtkHostError(`occupied-slot`,`<${e}> already holds a child the application put there, and ${n}() takes only ONE — placing <${t}> would unparent it. GTK does that silently: no throw, no warning, exit 0, and the application's own widget is simply gone. Mount into a container of your own inside <${e}>, or clear the existing child first (${n}(null)) if replacing it is the intent.`),notAnElement:e=>new GtkHostError(`not-an-element`,`Only an element node owns a widget, and this node is a ${e}. A text node's content lives in its PARENT's text sink and an anchor owns nothing at all — neither has a widget to hand back. Ask the parent element instead.`),destroyedNode:e=>new GtkHostError(`destroyed-node`,`<${e}> was destroyed, so its widget is gone. Asking again would MATERIALISE a fresh, propertyless, unparented widget — \`destroy\` clears props and layout precisely so a destroyed element cannot look re-materialisable — and a caller holding that widget would be looking at nothing on screen.`),notAHostParent:e=>new GtkHostError(`not-a-host-parent`,`insert() needs a host element as the parent and got ${e}. A raw widget cannot be one: the shadow tree lives in the host's own fields, so writing them onto a GObject wrapper renders nothing and reports nothing — Vue's <Teleport to="someWidget"> hands the widget through verbatim and landed exactly here. Wrap it with adopt(widget) first, which is what mountRoot() does.`)};export{GtkHostError,e as err};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import e from"gi://Gtk?version=4.0";import t from"gi://Adw?version=1";const n=`Gtk-4.0 Adw-1`,r=[{gtype:`AdwAboutDialog`,tag:`adw-about-dialog`,ctor:()=>t.AboutDialog},{gtype:`AdwAboutWindow`,tag:`adw-about-window`,ctor:()=>t.AboutWindow},{gtype:`AdwActionRow`,tag:`adw-action-row`,ctor:()=>t.ActionRow},{gtype:`AdwAlertDialog`,tag:`adw-alert-dialog`,ctor:()=>t.AlertDialog},{gtype:`AdwApplicationWindow`,tag:`adw-application-window`,ctor:()=>t.ApplicationWindow},{gtype:`AdwAvatar`,tag:`adw-avatar`,ctor:()=>t.Avatar},{gtype:`AdwBanner`,tag:`adw-banner`,ctor:()=>t.Banner},{gtype:`AdwBin`,tag:`adw-bin`,ctor:()=>t.Bin},{gtype:`AdwBottomSheet`,tag:`adw-bottom-sheet`,ctor:()=>t.BottomSheet},{gtype:`AdwBreakpointBin`,tag:`adw-breakpoint-bin`,ctor:()=>t.BreakpointBin},{gtype:`AdwButtonContent`,tag:`adw-button-content`,ctor:()=>t.ButtonContent},{gtype:`AdwButtonRow`,tag:`adw-button-row`,ctor:()=>t.ButtonRow},{gtype:`AdwCarousel`,tag:`adw-carousel`,ctor:()=>t.Carousel},{gtype:`AdwCarouselIndicatorDots`,tag:`adw-carousel-indicator-dots`,ctor:()=>t.CarouselIndicatorDots},{gtype:`AdwCarouselIndicatorLines`,tag:`adw-carousel-indicator-lines`,ctor:()=>t.CarouselIndicatorLines},{gtype:`AdwClamp`,tag:`adw-clamp`,ctor:()=>t.Clamp},{gtype:`AdwClampScrollable`,tag:`adw-clamp-scrollable`,ctor:()=>t.ClampScrollable},{gtype:`AdwComboRow`,tag:`adw-combo-row`,ctor:()=>t.ComboRow},{gtype:`AdwDialog`,tag:`adw-dialog`,ctor:()=>t.Dialog},{gtype:`AdwEntryRow`,tag:`adw-entry-row`,ctor:()=>t.EntryRow},{gtype:`AdwExpanderRow`,tag:`adw-expander-row`,ctor:()=>t.ExpanderRow},{gtype:`AdwFlap`,tag:`adw-flap`,ctor:()=>t.Flap},{gtype:`AdwHeaderBar`,tag:`adw-header-bar`,ctor:()=>t.HeaderBar},{gtype:`AdwInlineViewSwitcher`,tag:`adw-inline-view-switcher`,ctor:()=>t.InlineViewSwitcher},{gtype:`AdwLayoutSlot`,tag:`adw-layout-slot`,ctor:()=>t.LayoutSlot},{gtype:`AdwLeaflet`,tag:`adw-leaflet`,ctor:()=>t.Leaflet},{gtype:`AdwMessageDialog`,tag:`adw-message-dialog`,ctor:()=>t.MessageDialog},{gtype:`AdwMultiLayoutView`,tag:`adw-multi-layout-view`,ctor:()=>t.MultiLayoutView},{gtype:`AdwNavigationPage`,tag:`adw-navigation-page`,ctor:()=>t.NavigationPage},{gtype:`AdwNavigationSplitView`,tag:`adw-navigation-split-view`,ctor:()=>t.NavigationSplitView},{gtype:`AdwNavigationView`,tag:`adw-navigation-view`,ctor:()=>t.NavigationView},{gtype:`AdwOverlaySplitView`,tag:`adw-overlay-split-view`,ctor:()=>t.OverlaySplitView},{gtype:`AdwPasswordEntryRow`,tag:`adw-password-entry-row`,ctor:()=>t.PasswordEntryRow},{gtype:`AdwPreferencesDialog`,tag:`adw-preferences-dialog`,ctor:()=>t.PreferencesDialog},{gtype:`AdwPreferencesGroup`,tag:`adw-preferences-group`,ctor:()=>t.PreferencesGroup},{gtype:`AdwPreferencesPage`,tag:`adw-preferences-page`,ctor:()=>t.PreferencesPage},{gtype:`AdwPreferencesRow`,tag:`adw-preferences-row`,ctor:()=>t.PreferencesRow},{gtype:`AdwPreferencesWindow`,tag:`adw-preferences-window`,ctor:()=>t.PreferencesWindow},{gtype:`AdwShortcutLabel`,tag:`adw-shortcut-label`,ctor:()=>t.ShortcutLabel},{gtype:`AdwShortcutsDialog`,tag:`adw-shortcuts-dialog`,ctor:()=>t.ShortcutsDialog},{gtype:`AdwSidebar`,tag:`adw-sidebar`,ctor:()=>t.Sidebar},{gtype:`AdwSpinRow`,tag:`adw-spin-row`,ctor:()=>t.SpinRow},{gtype:`AdwSpinner`,tag:`adw-spinner`,ctor:()=>t.Spinner},{gtype:`AdwSplitButton`,tag:`adw-split-button`,ctor:()=>t.SplitButton},{gtype:`AdwSqueezer`,tag:`adw-squeezer`,ctor:()=>t.Squeezer},{gtype:`AdwStatusPage`,tag:`adw-status-page`,ctor:()=>t.StatusPage},{gtype:`AdwSwitchRow`,tag:`adw-switch-row`,ctor:()=>t.SwitchRow},{gtype:`AdwTabBar`,tag:`adw-tab-bar`,ctor:()=>t.TabBar},{gtype:`AdwTabButton`,tag:`adw-tab-button`,ctor:()=>t.TabButton},{gtype:`AdwTabOverview`,tag:`adw-tab-overview`,ctor:()=>t.TabOverview},{gtype:`AdwTabView`,tag:`adw-tab-view`,ctor:()=>t.TabView},{gtype:`AdwToastOverlay`,tag:`adw-toast-overlay`,ctor:()=>t.ToastOverlay},{gtype:`AdwToggleGroup`,tag:`adw-toggle-group`,ctor:()=>t.ToggleGroup},{gtype:`AdwToolbarView`,tag:`adw-toolbar-view`,ctor:()=>t.ToolbarView},{gtype:`AdwViewStack`,tag:`adw-view-stack`,ctor:()=>t.ViewStack},{gtype:`AdwViewSwitcher`,tag:`adw-view-switcher`,ctor:()=>t.ViewSwitcher},{gtype:`AdwViewSwitcherBar`,tag:`adw-view-switcher-bar`,ctor:()=>t.ViewSwitcherBar},{gtype:`AdwViewSwitcherSidebar`,tag:`adw-view-switcher-sidebar`,ctor:()=>t.ViewSwitcherSidebar},{gtype:`AdwViewSwitcherTitle`,tag:`adw-view-switcher-title`,ctor:()=>t.ViewSwitcherTitle},{gtype:`AdwWindow`,tag:`adw-window`,ctor:()=>t.Window},{gtype:`AdwWindowTitle`,tag:`adw-window-title`,ctor:()=>t.WindowTitle},{gtype:`AdwWrapBox`,tag:`adw-wrap-box`,ctor:()=>t.WrapBox},{gtype:`GtkAboutDialog`,tag:`gtk-about-dialog`,ctor:()=>e.AboutDialog},{gtype:`GtkActionBar`,tag:`gtk-action-bar`,ctor:()=>e.ActionBar},{gtype:`GtkAppChooserButton`,tag:`gtk-app-chooser-button`,ctor:()=>e.AppChooserButton},{gtype:`GtkAppChooserDialog`,tag:`gtk-app-chooser-dialog`,ctor:()=>e.AppChooserDialog},{gtype:`GtkAppChooserWidget`,tag:`gtk-app-chooser-widget`,ctor:()=>e.AppChooserWidget},{gtype:`GtkApplicationWindow`,tag:`gtk-application-window`,ctor:()=>e.ApplicationWindow},{gtype:`GtkAspectFrame`,tag:`gtk-aspect-frame`,ctor:()=>e.AspectFrame},{gtype:`GtkAssistant`,tag:`gtk-assistant`,ctor:()=>e.Assistant},{gtype:`GtkBox`,tag:`gtk-box`,ctor:()=>e.Box},{gtype:`GtkButton`,tag:`gtk-button`,ctor:()=>e.Button},{gtype:`GtkCalendar`,tag:`gtk-calendar`,ctor:()=>e.Calendar},{gtype:`GtkCellView`,tag:`gtk-cell-view`,ctor:()=>e.CellView},{gtype:`GtkCenterBox`,tag:`gtk-center-box`,ctor:()=>e.CenterBox},{gtype:`GtkCheckButton`,tag:`gtk-check-button`,ctor:()=>e.CheckButton},{gtype:`GtkColorButton`,tag:`gtk-color-button`,ctor:()=>e.ColorButton},{gtype:`GtkColorChooserDialog`,tag:`gtk-color-chooser-dialog`,ctor:()=>e.ColorChooserDialog},{gtype:`GtkColorChooserWidget`,tag:`gtk-color-chooser-widget`,ctor:()=>e.ColorChooserWidget},{gtype:`GtkColorDialogButton`,tag:`gtk-color-dialog-button`,ctor:()=>e.ColorDialogButton},{gtype:`GtkColumnView`,tag:`gtk-column-view`,ctor:()=>e.ColumnView},{gtype:`GtkComboBox`,tag:`gtk-combo-box`,ctor:()=>e.ComboBox},{gtype:`GtkComboBoxText`,tag:`gtk-combo-box-text`,ctor:()=>e.ComboBoxText},{gtype:`GtkDialog`,tag:`gtk-dialog`,ctor:()=>e.Dialog},{gtype:`GtkDragIcon`,tag:`gtk-drag-icon`,ctor:()=>e.DragIcon},{gtype:`GtkDrawingArea`,tag:`gtk-drawing-area`,ctor:()=>e.DrawingArea},{gtype:`GtkDropDown`,tag:`gtk-drop-down`,ctor:()=>e.DropDown},{gtype:`GtkEditableLabel`,tag:`gtk-editable-label`,ctor:()=>e.EditableLabel},{gtype:`GtkEmojiChooser`,tag:`gtk-emoji-chooser`,ctor:()=>e.EmojiChooser},{gtype:`GtkEntry`,tag:`gtk-entry`,ctor:()=>e.Entry},{gtype:`GtkExpander`,tag:`gtk-expander`,ctor:()=>e.Expander},{gtype:`GtkFileChooserDialog`,tag:`gtk-file-chooser-dialog`,ctor:()=>e.FileChooserDialog},{gtype:`GtkFileChooserWidget`,tag:`gtk-file-chooser-widget`,ctor:()=>e.FileChooserWidget},{gtype:`GtkFixed`,tag:`gtk-fixed`,ctor:()=>e.Fixed},{gtype:`GtkFlowBox`,tag:`gtk-flow-box`,ctor:()=>e.FlowBox},{gtype:`GtkFlowBoxChild`,tag:`gtk-flow-box-child`,ctor:()=>e.FlowBoxChild},{gtype:`GtkFontButton`,tag:`gtk-font-button`,ctor:()=>e.FontButton},{gtype:`GtkFontChooserDialog`,tag:`gtk-font-chooser-dialog`,ctor:()=>e.FontChooserDialog},{gtype:`GtkFontChooserWidget`,tag:`gtk-font-chooser-widget`,ctor:()=>e.FontChooserWidget},{gtype:`GtkFontDialogButton`,tag:`gtk-font-dialog-button`,ctor:()=>e.FontDialogButton},{gtype:`GtkFrame`,tag:`gtk-frame`,ctor:()=>e.Frame},{gtype:`GtkGLArea`,tag:`gtk-gl-area`,ctor:()=>e.GLArea},{gtype:`GtkGraphicsOffload`,tag:`gtk-graphics-offload`,ctor:()=>e.GraphicsOffload},{gtype:`GtkGrid`,tag:`gtk-grid`,ctor:()=>e.Grid},{gtype:`GtkGridView`,tag:`gtk-grid-view`,ctor:()=>e.GridView},{gtype:`GtkHeaderBar`,tag:`gtk-header-bar`,ctor:()=>e.HeaderBar},{gtype:`GtkIconView`,tag:`gtk-icon-view`,ctor:()=>e.IconView},{gtype:`GtkImage`,tag:`gtk-image`,ctor:()=>e.Image},{gtype:`GtkInfoBar`,tag:`gtk-info-bar`,ctor:()=>e.InfoBar},{gtype:`GtkInscription`,tag:`gtk-inscription`,ctor:()=>e.Inscription},{gtype:`GtkLabel`,tag:`gtk-label`,ctor:()=>e.Label},{gtype:`GtkLevelBar`,tag:`gtk-level-bar`,ctor:()=>e.LevelBar},{gtype:`GtkLinkButton`,tag:`gtk-link-button`,ctor:()=>e.LinkButton},{gtype:`GtkListBox`,tag:`gtk-list-box`,ctor:()=>e.ListBox},{gtype:`GtkListBoxRow`,tag:`gtk-list-box-row`,ctor:()=>e.ListBoxRow},{gtype:`GtkListView`,tag:`gtk-list-view`,ctor:()=>e.ListView},{gtype:`GtkLockButton`,tag:`gtk-lock-button`,ctor:()=>e.LockButton},{gtype:`GtkMediaControls`,tag:`gtk-media-controls`,ctor:()=>e.MediaControls},{gtype:`GtkMenuButton`,tag:`gtk-menu-button`,ctor:()=>e.MenuButton},{gtype:`GtkMessageDialog`,tag:`gtk-message-dialog`,ctor:()=>e.MessageDialog},{gtype:`GtkNotebook`,tag:`gtk-notebook`,ctor:()=>e.Notebook},{gtype:`GtkOverlay`,tag:`gtk-overlay`,ctor:()=>e.Overlay},{gtype:`GtkPageSetupUnixDialog`,tag:`gtk-page-setup-unix-dialog`,ctor:()=>e.PageSetupUnixDialog},{gtype:`GtkPaned`,tag:`gtk-paned`,ctor:()=>e.Paned},{gtype:`GtkPasswordEntry`,tag:`gtk-password-entry`,ctor:()=>e.PasswordEntry},{gtype:`GtkPicture`,tag:`gtk-picture`,ctor:()=>e.Picture},{gtype:`GtkPopover`,tag:`gtk-popover`,ctor:()=>e.Popover},{gtype:`GtkPopoverBin`,tag:`gtk-popover-bin`,ctor:()=>e.PopoverBin},{gtype:`GtkPopoverMenu`,tag:`gtk-popover-menu`,ctor:()=>e.PopoverMenu},{gtype:`GtkPopoverMenuBar`,tag:`gtk-popover-menu-bar`,ctor:()=>e.PopoverMenuBar},{gtype:`GtkPrintUnixDialog`,tag:`gtk-print-unix-dialog`,ctor:()=>e.PrintUnixDialog},{gtype:`GtkProgressBar`,tag:`gtk-progress-bar`,ctor:()=>e.ProgressBar},{gtype:`GtkRange`,tag:`gtk-range`,ctor:()=>e.Range},{gtype:`GtkRevealer`,tag:`gtk-revealer`,ctor:()=>e.Revealer},{gtype:`GtkScale`,tag:`gtk-scale`,ctor:()=>e.Scale},{gtype:`GtkScaleButton`,tag:`gtk-scale-button`,ctor:()=>e.ScaleButton},{gtype:`GtkScrollbar`,tag:`gtk-scrollbar`,ctor:()=>e.Scrollbar},{gtype:`GtkScrolledWindow`,tag:`gtk-scrolled-window`,ctor:()=>e.ScrolledWindow},{gtype:`GtkSearchBar`,tag:`gtk-search-bar`,ctor:()=>e.SearchBar},{gtype:`GtkSearchEntry`,tag:`gtk-search-entry`,ctor:()=>e.SearchEntry},{gtype:`GtkSeparator`,tag:`gtk-separator`,ctor:()=>e.Separator},{gtype:`GtkShortcutLabel`,tag:`gtk-shortcut-label`,ctor:()=>e.ShortcutLabel},{gtype:`GtkShortcutsGroup`,tag:`gtk-shortcuts-group`,ctor:()=>e.ShortcutsGroup},{gtype:`GtkShortcutsSection`,tag:`gtk-shortcuts-section`,ctor:()=>e.ShortcutsSection},{gtype:`GtkShortcutsShortcut`,tag:`gtk-shortcuts-shortcut`,ctor:()=>e.ShortcutsShortcut},{gtype:`GtkShortcutsWindow`,tag:`gtk-shortcuts-window`,ctor:()=>e.ShortcutsWindow},{gtype:`GtkSpinButton`,tag:`gtk-spin-button`,ctor:()=>e.SpinButton},{gtype:`GtkSpinner`,tag:`gtk-spinner`,ctor:()=>e.Spinner},{gtype:`GtkStack`,tag:`gtk-stack`,ctor:()=>e.Stack},{gtype:`GtkStackSidebar`,tag:`gtk-stack-sidebar`,ctor:()=>e.StackSidebar},{gtype:`GtkStackSwitcher`,tag:`gtk-stack-switcher`,ctor:()=>e.StackSwitcher},{gtype:`GtkStatusbar`,tag:`gtk-statusbar`,ctor:()=>e.Statusbar},{gtype:`GtkSwitch`,tag:`gtk-switch`,ctor:()=>e.Switch},{gtype:`GtkText`,tag:`gtk-text`,ctor:()=>e.Text},{gtype:`GtkTextView`,tag:`gtk-text-view`,ctor:()=>e.TextView},{gtype:`GtkToggleButton`,tag:`gtk-toggle-button`,ctor:()=>e.ToggleButton},{gtype:`GtkTreeExpander`,tag:`gtk-tree-expander`,ctor:()=>e.TreeExpander},{gtype:`GtkTreeView`,tag:`gtk-tree-view`,ctor:()=>e.TreeView},{gtype:`GtkVideo`,tag:`gtk-video`,ctor:()=>e.Video},{gtype:`GtkViewport`,tag:`gtk-viewport`,ctor:()=>e.Viewport},{gtype:`GtkVolumeButton`,tag:`gtk-volume-button`,ctor:()=>e.VolumeButton},{gtype:`GtkWindow`,tag:`gtk-window`,ctor:()=>e.Window},{gtype:`GtkWindowControls`,tag:`gtk-window-controls`,ctor:()=>e.WindowControls},{gtype:`GtkWindowHandle`,tag:`gtk-window-handle`,ctor:()=>e.WindowHandle}];export{n as GENERATED_PROVENANCE,r as GENERATED_WIDGETS};
1
+ import"../_virtual/_rolldown/runtime.js";import e from"gi://Gtk?version=4.0";import t from"gi://Adw?version=1";const n=`Gtk-4.0 Adw-1`,r=[{gtype:`AdwAboutDialog`,tag:`adw-about-dialog`,ctor:()=>t.AboutDialog},{gtype:`AdwAboutWindow`,tag:`adw-about-window`,ctor:()=>t.AboutWindow},{gtype:`AdwActionRow`,tag:`adw-action-row`,ctor:()=>t.ActionRow},{gtype:`AdwAlertDialog`,tag:`adw-alert-dialog`,ctor:()=>t.AlertDialog},{gtype:`AdwApplicationWindow`,tag:`adw-application-window`,ctor:()=>t.ApplicationWindow},{gtype:`AdwAvatar`,tag:`adw-avatar`,ctor:()=>t.Avatar},{gtype:`AdwBanner`,tag:`adw-banner`,ctor:()=>t.Banner},{gtype:`AdwBin`,tag:`adw-bin`,ctor:()=>t.Bin},{gtype:`AdwBottomSheet`,tag:`adw-bottom-sheet`,ctor:()=>t.BottomSheet},{gtype:`AdwBreakpointBin`,tag:`adw-breakpoint-bin`,ctor:()=>t.BreakpointBin},{gtype:`AdwButtonContent`,tag:`adw-button-content`,ctor:()=>t.ButtonContent},{gtype:`AdwButtonRow`,tag:`adw-button-row`,ctor:()=>t.ButtonRow},{gtype:`AdwCarousel`,tag:`adw-carousel`,ctor:()=>t.Carousel},{gtype:`AdwCarouselIndicatorDots`,tag:`adw-carousel-indicator-dots`,ctor:()=>t.CarouselIndicatorDots},{gtype:`AdwCarouselIndicatorLines`,tag:`adw-carousel-indicator-lines`,ctor:()=>t.CarouselIndicatorLines},{gtype:`AdwClamp`,tag:`adw-clamp`,ctor:()=>t.Clamp},{gtype:`AdwClampScrollable`,tag:`adw-clamp-scrollable`,ctor:()=>t.ClampScrollable},{gtype:`AdwComboRow`,tag:`adw-combo-row`,ctor:()=>t.ComboRow},{gtype:`AdwDialog`,tag:`adw-dialog`,ctor:()=>t.Dialog},{gtype:`AdwEntryRow`,tag:`adw-entry-row`,ctor:()=>t.EntryRow},{gtype:`AdwExpanderRow`,tag:`adw-expander-row`,ctor:()=>t.ExpanderRow},{gtype:`AdwFlap`,tag:`adw-flap`,ctor:()=>t.Flap},{gtype:`AdwHeaderBar`,tag:`adw-header-bar`,ctor:()=>t.HeaderBar},{gtype:`AdwInlineViewSwitcher`,tag:`adw-inline-view-switcher`,ctor:()=>t.InlineViewSwitcher},{gtype:`AdwLayoutSlot`,tag:`adw-layout-slot`,ctor:()=>t.LayoutSlot},{gtype:`AdwLeaflet`,tag:`adw-leaflet`,ctor:()=>t.Leaflet},{gtype:`AdwMessageDialog`,tag:`adw-message-dialog`,ctor:()=>t.MessageDialog},{gtype:`AdwMultiLayoutView`,tag:`adw-multi-layout-view`,ctor:()=>t.MultiLayoutView},{gtype:`AdwNavigationPage`,tag:`adw-navigation-page`,ctor:()=>t.NavigationPage},{gtype:`AdwNavigationSplitView`,tag:`adw-navigation-split-view`,ctor:()=>t.NavigationSplitView},{gtype:`AdwNavigationView`,tag:`adw-navigation-view`,ctor:()=>t.NavigationView},{gtype:`AdwOverlaySplitView`,tag:`adw-overlay-split-view`,ctor:()=>t.OverlaySplitView},{gtype:`AdwPasswordEntryRow`,tag:`adw-password-entry-row`,ctor:()=>t.PasswordEntryRow},{gtype:`AdwPreferencesDialog`,tag:`adw-preferences-dialog`,ctor:()=>t.PreferencesDialog},{gtype:`AdwPreferencesGroup`,tag:`adw-preferences-group`,ctor:()=>t.PreferencesGroup},{gtype:`AdwPreferencesPage`,tag:`adw-preferences-page`,ctor:()=>t.PreferencesPage},{gtype:`AdwPreferencesRow`,tag:`adw-preferences-row`,ctor:()=>t.PreferencesRow},{gtype:`AdwPreferencesWindow`,tag:`adw-preferences-window`,ctor:()=>t.PreferencesWindow},{gtype:`AdwShortcutLabel`,tag:`adw-shortcut-label`,ctor:()=>t.ShortcutLabel},{gtype:`AdwShortcutsDialog`,tag:`adw-shortcuts-dialog`,ctor:()=>t.ShortcutsDialog},{gtype:`AdwSidebar`,tag:`adw-sidebar`,ctor:()=>t.Sidebar},{gtype:`AdwSpinRow`,tag:`adw-spin-row`,ctor:()=>t.SpinRow},{gtype:`AdwSpinner`,tag:`adw-spinner`,ctor:()=>t.Spinner},{gtype:`AdwSplitButton`,tag:`adw-split-button`,ctor:()=>t.SplitButton},{gtype:`AdwSqueezer`,tag:`adw-squeezer`,ctor:()=>t.Squeezer},{gtype:`AdwStatusPage`,tag:`adw-status-page`,ctor:()=>t.StatusPage},{gtype:`AdwSwitchRow`,tag:`adw-switch-row`,ctor:()=>t.SwitchRow},{gtype:`AdwTabBar`,tag:`adw-tab-bar`,ctor:()=>t.TabBar},{gtype:`AdwTabButton`,tag:`adw-tab-button`,ctor:()=>t.TabButton},{gtype:`AdwTabOverview`,tag:`adw-tab-overview`,ctor:()=>t.TabOverview},{gtype:`AdwTabView`,tag:`adw-tab-view`,ctor:()=>t.TabView},{gtype:`AdwToastOverlay`,tag:`adw-toast-overlay`,ctor:()=>t.ToastOverlay},{gtype:`AdwToggle`,tag:`adw-toggle`,ctor:()=>t.Toggle},{gtype:`AdwToggleGroup`,tag:`adw-toggle-group`,ctor:()=>t.ToggleGroup},{gtype:`AdwToolbarView`,tag:`adw-toolbar-view`,ctor:()=>t.ToolbarView},{gtype:`AdwViewStack`,tag:`adw-view-stack`,ctor:()=>t.ViewStack},{gtype:`AdwViewSwitcher`,tag:`adw-view-switcher`,ctor:()=>t.ViewSwitcher},{gtype:`AdwViewSwitcherBar`,tag:`adw-view-switcher-bar`,ctor:()=>t.ViewSwitcherBar},{gtype:`AdwViewSwitcherSidebar`,tag:`adw-view-switcher-sidebar`,ctor:()=>t.ViewSwitcherSidebar},{gtype:`AdwViewSwitcherTitle`,tag:`adw-view-switcher-title`,ctor:()=>t.ViewSwitcherTitle},{gtype:`AdwWindow`,tag:`adw-window`,ctor:()=>t.Window},{gtype:`AdwWindowTitle`,tag:`adw-window-title`,ctor:()=>t.WindowTitle},{gtype:`AdwWrapBox`,tag:`adw-wrap-box`,ctor:()=>t.WrapBox},{gtype:`GtkAboutDialog`,tag:`gtk-about-dialog`,ctor:()=>e.AboutDialog},{gtype:`GtkActionBar`,tag:`gtk-action-bar`,ctor:()=>e.ActionBar},{gtype:`GtkAppChooserButton`,tag:`gtk-app-chooser-button`,ctor:()=>e.AppChooserButton},{gtype:`GtkAppChooserDialog`,tag:`gtk-app-chooser-dialog`,ctor:()=>e.AppChooserDialog},{gtype:`GtkAppChooserWidget`,tag:`gtk-app-chooser-widget`,ctor:()=>e.AppChooserWidget},{gtype:`GtkApplicationWindow`,tag:`gtk-application-window`,ctor:()=>e.ApplicationWindow},{gtype:`GtkAspectFrame`,tag:`gtk-aspect-frame`,ctor:()=>e.AspectFrame},{gtype:`GtkAssistant`,tag:`gtk-assistant`,ctor:()=>e.Assistant},{gtype:`GtkBox`,tag:`gtk-box`,ctor:()=>e.Box},{gtype:`GtkButton`,tag:`gtk-button`,ctor:()=>e.Button},{gtype:`GtkCalendar`,tag:`gtk-calendar`,ctor:()=>e.Calendar},{gtype:`GtkCellView`,tag:`gtk-cell-view`,ctor:()=>e.CellView},{gtype:`GtkCenterBox`,tag:`gtk-center-box`,ctor:()=>e.CenterBox},{gtype:`GtkCheckButton`,tag:`gtk-check-button`,ctor:()=>e.CheckButton},{gtype:`GtkColorButton`,tag:`gtk-color-button`,ctor:()=>e.ColorButton},{gtype:`GtkColorChooserDialog`,tag:`gtk-color-chooser-dialog`,ctor:()=>e.ColorChooserDialog},{gtype:`GtkColorChooserWidget`,tag:`gtk-color-chooser-widget`,ctor:()=>e.ColorChooserWidget},{gtype:`GtkColorDialogButton`,tag:`gtk-color-dialog-button`,ctor:()=>e.ColorDialogButton},{gtype:`GtkColumnView`,tag:`gtk-column-view`,ctor:()=>e.ColumnView},{gtype:`GtkColumnViewCell`,tag:`gtk-column-view-cell`,ctor:()=>e.ColumnViewCell},{gtype:`GtkComboBox`,tag:`gtk-combo-box`,ctor:()=>e.ComboBox},{gtype:`GtkComboBoxText`,tag:`gtk-combo-box-text`,ctor:()=>e.ComboBoxText},{gtype:`GtkDialog`,tag:`gtk-dialog`,ctor:()=>e.Dialog},{gtype:`GtkDragIcon`,tag:`gtk-drag-icon`,ctor:()=>e.DragIcon},{gtype:`GtkDrawingArea`,tag:`gtk-drawing-area`,ctor:()=>e.DrawingArea},{gtype:`GtkDropDown`,tag:`gtk-drop-down`,ctor:()=>e.DropDown},{gtype:`GtkEditableLabel`,tag:`gtk-editable-label`,ctor:()=>e.EditableLabel},{gtype:`GtkEmojiChooser`,tag:`gtk-emoji-chooser`,ctor:()=>e.EmojiChooser},{gtype:`GtkEntry`,tag:`gtk-entry`,ctor:()=>e.Entry},{gtype:`GtkExpander`,tag:`gtk-expander`,ctor:()=>e.Expander},{gtype:`GtkFileChooserDialog`,tag:`gtk-file-chooser-dialog`,ctor:()=>e.FileChooserDialog},{gtype:`GtkFileChooserWidget`,tag:`gtk-file-chooser-widget`,ctor:()=>e.FileChooserWidget},{gtype:`GtkFixed`,tag:`gtk-fixed`,ctor:()=>e.Fixed},{gtype:`GtkFlowBox`,tag:`gtk-flow-box`,ctor:()=>e.FlowBox},{gtype:`GtkFlowBoxChild`,tag:`gtk-flow-box-child`,ctor:()=>e.FlowBoxChild},{gtype:`GtkFontButton`,tag:`gtk-font-button`,ctor:()=>e.FontButton},{gtype:`GtkFontChooserDialog`,tag:`gtk-font-chooser-dialog`,ctor:()=>e.FontChooserDialog},{gtype:`GtkFontChooserWidget`,tag:`gtk-font-chooser-widget`,ctor:()=>e.FontChooserWidget},{gtype:`GtkFontDialogButton`,tag:`gtk-font-dialog-button`,ctor:()=>e.FontDialogButton},{gtype:`GtkFrame`,tag:`gtk-frame`,ctor:()=>e.Frame},{gtype:`GtkGLArea`,tag:`gtk-gl-area`,ctor:()=>e.GLArea},{gtype:`GtkGraphicsOffload`,tag:`gtk-graphics-offload`,ctor:()=>e.GraphicsOffload},{gtype:`GtkGrid`,tag:`gtk-grid`,ctor:()=>e.Grid},{gtype:`GtkGridView`,tag:`gtk-grid-view`,ctor:()=>e.GridView},{gtype:`GtkHeaderBar`,tag:`gtk-header-bar`,ctor:()=>e.HeaderBar},{gtype:`GtkIconView`,tag:`gtk-icon-view`,ctor:()=>e.IconView},{gtype:`GtkImage`,tag:`gtk-image`,ctor:()=>e.Image},{gtype:`GtkInfoBar`,tag:`gtk-info-bar`,ctor:()=>e.InfoBar},{gtype:`GtkInscription`,tag:`gtk-inscription`,ctor:()=>e.Inscription},{gtype:`GtkLabel`,tag:`gtk-label`,ctor:()=>e.Label},{gtype:`GtkLevelBar`,tag:`gtk-level-bar`,ctor:()=>e.LevelBar},{gtype:`GtkLinkButton`,tag:`gtk-link-button`,ctor:()=>e.LinkButton},{gtype:`GtkListBox`,tag:`gtk-list-box`,ctor:()=>e.ListBox},{gtype:`GtkListBoxRow`,tag:`gtk-list-box-row`,ctor:()=>e.ListBoxRow},{gtype:`GtkListHeader`,tag:`gtk-list-header`,ctor:()=>e.ListHeader},{gtype:`GtkListItem`,tag:`gtk-list-item`,ctor:()=>e.ListItem},{gtype:`GtkListView`,tag:`gtk-list-view`,ctor:()=>e.ListView},{gtype:`GtkLockButton`,tag:`gtk-lock-button`,ctor:()=>e.LockButton},{gtype:`GtkMediaControls`,tag:`gtk-media-controls`,ctor:()=>e.MediaControls},{gtype:`GtkMenuButton`,tag:`gtk-menu-button`,ctor:()=>e.MenuButton},{gtype:`GtkMessageDialog`,tag:`gtk-message-dialog`,ctor:()=>e.MessageDialog},{gtype:`GtkNotebook`,tag:`gtk-notebook`,ctor:()=>e.Notebook},{gtype:`GtkOverlay`,tag:`gtk-overlay`,ctor:()=>e.Overlay},{gtype:`GtkPageSetupUnixDialog`,tag:`gtk-page-setup-unix-dialog`,ctor:()=>e.PageSetupUnixDialog},{gtype:`GtkPaned`,tag:`gtk-paned`,ctor:()=>e.Paned},{gtype:`GtkPasswordEntry`,tag:`gtk-password-entry`,ctor:()=>e.PasswordEntry},{gtype:`GtkPicture`,tag:`gtk-picture`,ctor:()=>e.Picture},{gtype:`GtkPopover`,tag:`gtk-popover`,ctor:()=>e.Popover},{gtype:`GtkPopoverBin`,tag:`gtk-popover-bin`,ctor:()=>e.PopoverBin},{gtype:`GtkPopoverMenu`,tag:`gtk-popover-menu`,ctor:()=>e.PopoverMenu},{gtype:`GtkPopoverMenuBar`,tag:`gtk-popover-menu-bar`,ctor:()=>e.PopoverMenuBar},{gtype:`GtkPrintUnixDialog`,tag:`gtk-print-unix-dialog`,ctor:()=>e.PrintUnixDialog},{gtype:`GtkProgressBar`,tag:`gtk-progress-bar`,ctor:()=>e.ProgressBar},{gtype:`GtkRange`,tag:`gtk-range`,ctor:()=>e.Range},{gtype:`GtkRevealer`,tag:`gtk-revealer`,ctor:()=>e.Revealer},{gtype:`GtkScale`,tag:`gtk-scale`,ctor:()=>e.Scale},{gtype:`GtkScaleButton`,tag:`gtk-scale-button`,ctor:()=>e.ScaleButton},{gtype:`GtkScrollbar`,tag:`gtk-scrollbar`,ctor:()=>e.Scrollbar},{gtype:`GtkScrolledWindow`,tag:`gtk-scrolled-window`,ctor:()=>e.ScrolledWindow},{gtype:`GtkSearchBar`,tag:`gtk-search-bar`,ctor:()=>e.SearchBar},{gtype:`GtkSearchEntry`,tag:`gtk-search-entry`,ctor:()=>e.SearchEntry},{gtype:`GtkSeparator`,tag:`gtk-separator`,ctor:()=>e.Separator},{gtype:`GtkShortcutLabel`,tag:`gtk-shortcut-label`,ctor:()=>e.ShortcutLabel},{gtype:`GtkShortcutsGroup`,tag:`gtk-shortcuts-group`,ctor:()=>e.ShortcutsGroup},{gtype:`GtkShortcutsSection`,tag:`gtk-shortcuts-section`,ctor:()=>e.ShortcutsSection},{gtype:`GtkShortcutsShortcut`,tag:`gtk-shortcuts-shortcut`,ctor:()=>e.ShortcutsShortcut},{gtype:`GtkShortcutsWindow`,tag:`gtk-shortcuts-window`,ctor:()=>e.ShortcutsWindow},{gtype:`GtkSpinButton`,tag:`gtk-spin-button`,ctor:()=>e.SpinButton},{gtype:`GtkSpinner`,tag:`gtk-spinner`,ctor:()=>e.Spinner},{gtype:`GtkStack`,tag:`gtk-stack`,ctor:()=>e.Stack},{gtype:`GtkStackSidebar`,tag:`gtk-stack-sidebar`,ctor:()=>e.StackSidebar},{gtype:`GtkStackSwitcher`,tag:`gtk-stack-switcher`,ctor:()=>e.StackSwitcher},{gtype:`GtkStatusbar`,tag:`gtk-statusbar`,ctor:()=>e.Statusbar},{gtype:`GtkSwitch`,tag:`gtk-switch`,ctor:()=>e.Switch},{gtype:`GtkText`,tag:`gtk-text`,ctor:()=>e.Text},{gtype:`GtkTextView`,tag:`gtk-text-view`,ctor:()=>e.TextView},{gtype:`GtkToggleButton`,tag:`gtk-toggle-button`,ctor:()=>e.ToggleButton},{gtype:`GtkTreeExpander`,tag:`gtk-tree-expander`,ctor:()=>e.TreeExpander},{gtype:`GtkTreeView`,tag:`gtk-tree-view`,ctor:()=>e.TreeView},{gtype:`GtkVideo`,tag:`gtk-video`,ctor:()=>e.Video},{gtype:`GtkViewport`,tag:`gtk-viewport`,ctor:()=>e.Viewport},{gtype:`GtkVolumeButton`,tag:`gtk-volume-button`,ctor:()=>e.VolumeButton},{gtype:`GtkWindow`,tag:`gtk-window`,ctor:()=>e.Window},{gtype:`GtkWindowControls`,tag:`gtk-window-controls`,ctor:()=>e.WindowControls},{gtype:`GtkWindowHandle`,tag:`gtk-window-handle`,ctor:()=>e.WindowHandle}];export{n as GENERATED_PROVENANCE,r as GENERATED_WIDGETS};
package/lib/esm/host.js CHANGED
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";import{err as e}from"./errors.js";import{addressOf as t,insertChild as n,makeDetachedContainer as r,makeWrapper as i,removeChild as a,setterSlotOf as o,setterSlots as s,slotOccupant as c}from"./policies.js";import{beginHostWrite as l,clearHandlers as u,endHostWrite as d,isEventProp as f,setHandler as p,toSignalName as m}from"./signals.js";import{coerce as h,paramSpecs as g,removedValue as _,requireSpec as v,toPropertyName as y}from"./props.js";import{lookupWidget as b,nearestRegistered as x}from"./registry.js";import S from"gi://GObject";function createElement(e,t){let n={kind:`element`,descriptor:b(e),widget:null,wrapper:null,slot:null,parent:null,prev:null,next:null,first:null,last:null,handlers:new Map,listeners:new Map,props:{},layout:null,textFromChildren:!1,attached:!1,destroyed:!1,foreign:[]};if(t)for(let[e,r]of Object.entries(t))setProp(n,e,r);return n}const createText=e=>({kind:`text`,data:e,parent:null,prev:null,next:null}),createAnchor=(e=``)=>({kind:`anchor`,data:e,parent:null,prev:null,next:null}),isText=e=>e.kind===`text`;function materialize(t){if(t.widget)return t.widget;for(let n of t.descriptor.requiresProps??[])if(!(n in t.props))throw e.missingConstructProp(t.descriptor.gtype,n);let n=t.descriptor.ctor(),r=g(n,t.descriptor.gtype),i={};for(let[e,n]of Object.entries(t.props))i[e]=h(v(r,t.descriptor.gtype,e),n,t.descriptor.gtype);l();try{t.widget=new n(i)}finally{d()}try{replayInto(t)}catch(e){u(t);for(let e of childSnapshot(t))e.kind===`element`&&e.attached&&(a(t,e),e.attached=!1);throw t.widget=null,t.wrapper=null,e}return t.widget}function replayInto(e){for(let[t,n]of e.listeners)p(e,t,n);for(let t of siblingsFrom(e.first,e))t.kind===`element`&&attach(e,t);e.textFromChildren&&flushText(e)}function setProp(e,t,n,r){if(f(t))return setEventHandler(e,t,n);if(t===`slot`)return setSlot(e,n);if(t===`layout`){let t=n,r=e.parent;if(!r||!e.widget){e.layout=t;return}let i=e.layout;replaceAt(e,r,()=>{e.layout=t},()=>{e.layout=i});return}let i=y(t),a=v(g(e.descriptor.ctor(),e.descriptor.gtype),e.descriptor.gtype,i),o=n==null,s=o?_(e.descriptor,a):h(a,n,e.descriptor.gtype),c=i in e.props?e.props[i]:void 0;if(o?delete e.props[i]:e.props[i]=n,e.widget){if((a.flags&S.ParamFlags.CONSTRUCT_ONLY)!==0)return rebuild(e,i,c);l();try{writeProperty(e.widget,i,s)}finally{d()}}}function writeProperty(e,t,n){if(!Array.isArray(n)){e.set_property(t,n);return}let r=t.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase());e[r]=n}function setEventHandler(e,t,n){e.widget?p(e,t,n):n&&assertSignalExists(e,t),n?e.listeners.set(t,n):e.listeners.delete(t)}function assertSignalExists(t,n){let r=m(n,t.descriptor.eventAliases).split(`::`)[0],i=t.descriptor.ctor().$gtype;if(S.signal_lookup(r,i)===0)throw e.unknownSignal(t.descriptor.gtype,n,r)}function setSlot(e,t){if(e.slot===t)return;let n=e.parent;if(!n||!e.widget){e.slot=t;return}let r=e.slot;replaceAt(e,n,()=>{e.slot=t},()=>{e.slot=r})}function replaceAt(e,t,n,r){a(t,e),e.attached=!1,n();try{attach(t,e)}catch(n){r();try{attach(t,e)}catch{}throw n}}function rebuild(e,t,n){let r=e.parent;if(e.widget){u(e);for(let t of childSnapshot(e))t.kind===`element`&&(a(e,t),t.attached=!1);r&&a(r,e)}e.widget=null,e.wrapper=null,e.attached=!1;try{materialize(e)}catch(i){t!==void 0&&(n===void 0?delete e.props[t]:e.props[t]=n);try{materialize(e),r&&attach(r,e)}catch{}throw i}r&&attach(r,e)}function setText(e,t){e.data=t,e.kind===`text`&&e.parent&&flushText(e.parent)}function setElementText(e,t){writeTextSink(e,t),e.textFromChildren=!1,destroyChildren(e)}function flushText(e){let t=``,n=!1;for(let r of childNodes(e))r.kind===`text`&&(t+=r.data,n=!0);if(t===``&&!e.textFromChildren)return;let r=e.descriptor.textSink;if(t===``&&r&&holdsElementInSetterSlot(e)){e.textFromChildren=!1,delete e.props[r];return}writeTextSink(e,t),e.textFromChildren=n}function*setterSlotChildren(e){for(let t of siblingsFrom(e.first,e))t.kind===`element`&&t.attached&&o(e,t)&&(yield t)}const holdsElementInSetterSlot=e=>!setterSlotChildren(e).next().done;function writeTextSink(t,n){let r=t.descriptor.textSink;if(!r)throw e.textNotAccepted(t.descriptor.gtype,n);materialize(t);let i=t.descriptor.children,a=i.kind===`single`?i.set:null;if(a&&!holdsOursInSlot(t,null)&&appOccupant(t.widget,t.descriptor,a))throw e.occupiedSlot(t.descriptor.gtype,`text`,a);let o=v(g(t.descriptor.ctor(),t.descriptor.gtype),t.descriptor.gtype,r);l();try{t.widget.set_property(r,h(o,n,t.descriptor.gtype))}finally{d()}t.props[r]=n;for(let e of setterSlotChildren(t))e.attached=!1}function*childNodes(e){yield*siblingsFrom(e.first,e)}function childSnapshot(e){let t=[];for(let n of siblingsFrom(e.first,e))t.push(n);return t}function*siblingsFrom(t,n){let r=0;for(let i=t;i;i=i.next){if(++r>1e5)throw e.siblingCycle(n.descriptor.gtype);yield i}}function link(e,t,n){t.parent=e,n?(t.prev=n.prev,t.next=n,n.prev?n.prev.next=t:e.first=t,n.prev=t):(t.prev=e.last,t.next=null,e.last?e.last.next=t:e.first=t,e.last=t)}function unlink(e){let t=e.parent;t&&(e.prev?e.prev.next=e.next:t.first=e.next,e.next?e.next.prev=e.prev:t.last=e.prev,e.prev=null,e.next=null,e.parent=null)}function attach(e,r){if(!e.widget)return;materialize(r),ensureWrapper(e,r),refuseOccupiedSlot(e,r);let i=e.foreign.length>0?e.foreign.filter(t=>t.get_parent()===e.widget):e.foreign,a=i.length>0?i[i.length-1]:null,o=i.length;for(let n of siblingsFrom(e.first,e)){if(n===r)break;n.kind!==`element`||!n.attached||(a=t(n),o+=1)}let s=[];for(let t of siblingsFrom(r.next,e))t.kind===`element`&&t.attached&&s.push(t);n({parent:e,child:r,prevWidget:a,index:o,following:s}),r.attached=!0}function refuseOccupiedSlot(t,n){let r=o(t,n);if(r&&!holdsOursInSlot(t,n.slot)&&appOccupant(t.widget,t.descriptor,r))throw e.occupiedSlot(t.descriptor.gtype,n.descriptor.gtype,r)}function holdsOursInSlot(e,t){for(let n of siblingsFrom(e.first,e))if(n.kind===`element`&&n.attached&&n.slot===t)return!0;return!1}function ensureWrapper(e,t){if(t.wrapper)return;let n=i(e.descriptor.children,t.widget);n&&(t.wrapper=n)}function insert(e,t,n=null){assertHostParent(t);let r=e.parent,i=e.next,a=n===e?i:n;e.parent&&remove(e),link(t,e,a);try{e.kind===`element`?attach(t,e):e.kind===`text`&&flushText(t)}catch(t){throw unlink(e),r&&restore(e,r,i),t}}function assertHostParent(t){if(!isHostElement(t))throw e.notAHostParent(describeValue(t))}function isHostElement(e){let t=e;return!!t&&t.kind===`element`&&typeof t.descriptor==`object`}function describeValue(e){if(e==null)return String(e);if(typeof e!=`object`)return`a ${typeof e}`;let t=e.tagName;if(typeof t==`string`)return`a DOM element <${t.toLowerCase()}>`;let n=e.constructor?.$gtype,r=n?S.type_name(n)??`an unnamed GType`:null;if(r!==null&&r!==`JSObject`)return r;let i=e.constructor?.name;return i&&i!==`Object`?`a ${i}`:`a plain object`}function restore(e,t,n){try{link(t,e,n),e.kind===`element`?attach(t,e):e.kind===`text`&&flushText(t)}catch{unlink(e)}}function restoreTextSink(e){let t=e.descriptor.textSink;if(!t||e.destroyed||!e.widget)return;let n=e.descriptor.children;if(n.kind!==`single`||holdsOursInSlot(e,null)||c(e.widget,n.set))return;let r=t.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),i=e.props[t]??e.props[r];if(typeof i!=`string`||i===``)return;let a=v(g(e.descriptor.ctor(),e.descriptor.gtype),e.descriptor.gtype,t);l();try{e.widget.set_property(t,h(a,i,e.descriptor.gtype))}finally{d()}}function remove(e){let t=e.parent;t&&e.kind===`element`&&(a(t,e),e.attached=!1,e.wrapper&&=(e.wrapper.set_child(null),null),restoreTextSink(t)),unlink(e),t&&e.kind===`text`&&flushText(t)}function destroyChildren(e){for(let t of childSnapshot(e))destroy(t)}function disconnectHandlers(e){u(e),e.listeners.clear()}function destroy(e){if(e.kind===`element`&&(destroyChildren(e),u(e),e.listeners.clear()),remove(e),e.kind===`element`){let t=e.widget;t&&typeof t.destroy==`function`&&typeof t.get_parent==`function`&&t.get_parent()===null&&t.destroy(),e.widget=null,e.wrapper=null,e.props={},e.layout=null,e.textFromChildren=!1,e.destroyed=!0}}function mountRoot(e,t){materialize(e),insert(e,adopt(t))}function widgetOf(t){if(t.kind!==`element`)throw e.notAnElement(t.kind);if(t.destroyed)throw e.destroyedNode(t.descriptor.gtype);return materialize(t)}const createDetachedContainer=()=>adopt(r());function adopt(t){let n=t.constructor.$gtype,r=x(n);if(!r)throw e.unknownTag(gtypeNameOf(t));return{kind:`element`,descriptor:r,widget:t,wrapper:null,slot:null,parent:null,prev:null,next:null,first:null,last:null,handlers:new Map,listeners:new Map,props:{},layout:null,textFromChildren:!1,attached:!0,destroyed:!1,foreign:adoptedChildren(t,r)}}function adoptedChildren(e,t){let n=s(t.children);if(n.length===0)return directChildren(e);let r=[];for(let i of n){let n=appOccupant(e,t,i);n&&r.push(n)}return r}function appOccupant(e,t,n){let r=c(e,n);if(!r)return null;let i=t.textSink;if(!i)return r;let a=e[i.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())];return typeof a==`string`&&a!==``?null:r}function directChildren(e){let t=[],n=e;if(typeof n.get_first_child!=`function`)return t;for(let e=n.get_first_child();e;e=e.get_next_sibling())t.push(e);return t}const gtypeNameOf=e=>S.type_name(e.constructor.$gtype),parentNode=e=>e.parent,firstChild=e=>e.first,nextSibling=e=>e.next,prevSibling=e=>e.prev;export{adopt,createAnchor,createDetachedContainer,createElement,createText,describeValue,destroy,destroyChildren,disconnectHandlers,firstChild,insert,isHostElement,isText,materialize,mountRoot,nextSibling,parentNode,prevSibling,remove,setElementText,setEventHandler,setProp,setSlot,setText,widgetOf};
1
+ import"./_virtual/_rolldown/runtime.js";import{GtkHostError as e,err as t}from"./errors.js";import{addressOf as n,insertChild as r,makeDetachedContainer as i,makeWrapper as a,removeChild as o,setterSlotOf as s,setterSlots as c,slotOccupant as l}from"./policies.js";import{beginHostWrite as u,clearHandlers as d,endHostWrite as f,isEventProp as p,setHandler as m,toSignalName as h}from"./signals.js";import{coerce as g,paramSpecs as _,removedValue as v,requireSpec as y,toPropertyName as b}from"./props.js";import{lookupWidget as x,nearestRegistered as S}from"./registry.js";import C from"gi://GObject";function createElement(e,t){let n={kind:`element`,descriptor:x(e),widget:null,wrapper:null,slot:null,parent:null,prev:null,next:null,first:null,last:null,handlers:new Map,listeners:new Map,props:{},layout:null,textFromChildren:!1,attached:!1,destroyed:!1,foreign:[]};if(t)for(let[e,r]of Object.entries(t))setProp(n,e,r);return n}const createText=e=>({kind:`text`,data:e,parent:null,prev:null,next:null}),createAnchor=(e=``)=>({kind:`anchor`,data:e,parent:null,prev:null,next:null}),isText=e=>e.kind===`text`;function materialize(e){if(e.widget)return e.widget;for(let n of e.descriptor.requiresProps??[])if(!(n in e.props))throw t.missingConstructProp(e.descriptor.gtype,n);let n=e.descriptor.ctor(),r=_(n,e.descriptor.gtype),i={};for(let[t,n]of Object.entries(e.props))i[t]=g(y(r,e.descriptor.gtype,t),n,e.descriptor.gtype);u(null);try{e.widget=new n(i)}finally{f()}try{replayInto(e)}catch(t){d(e);for(let t of childSnapshot(e))t.kind===`element`&&t.attached&&(o(e,t),t.attached=!1);throw e.widget=null,e.wrapper=null,t}return e.widget}function replayInto(e){for(let[t,n]of e.listeners)m(e,t,n);for(let t of siblingsFrom(e.first,e))t.kind===`element`&&attach(e,t);e.textFromChildren&&flushText(e)}function setProp(e,t,n,r){if(p(t))return setEventHandler(e,t,n);if(t===`slot`)return setSlot(e,n);if(t===`layout`){let t=n,r=e.parent;if(!r||!e.widget){e.layout=t;return}let i=e.layout;replaceAt(e,r,()=>{e.layout=t},()=>{e.layout=i});return}let i=b(t),a=y(_(e.descriptor.ctor(),e.descriptor.gtype),e.descriptor.gtype,i),o=n==null,s=o?v(e.descriptor,a):g(a,n,e.descriptor.gtype),c=i in e.props?e.props[i]:void 0;if(o?delete e.props[i]:e.props[i]=n,e.widget){if((a.flags&C.ParamFlags.CONSTRUCT_ONLY)!==0)return rebuild(e,i,c);u(e.widget);try{writeProperty(e.widget,i,s)}finally{f()}}}function writeProperty(e,t,n){if(!Array.isArray(n)){e.set_property(t,n);return}let r=t.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase());e[r]=n}function setEventHandler(e,t,n){e.widget?m(e,t,n):n&&assertSignalExists(e,t),n?e.listeners.set(t,n):e.listeners.delete(t)}function assertSignalExists(e,n){let r=h(n,e.descriptor.eventAliases).split(`::`)[0],i=e.descriptor.ctor().$gtype;if(C.signal_lookup(r,i)===0)throw t.unknownSignal(e.descriptor.gtype,n,r)}function setSlot(e,t){if(e.slot===t)return;let n=e.parent;if(!n||!e.widget){e.slot=t;return}let r=e.slot;replaceAt(e,n,()=>{e.slot=t},()=>{e.slot=r})}function replaceAt(e,t,n,r){o(t,e),e.attached=!1,n();try{attach(t,e)}catch(n){r();try{attach(t,e)}catch{}throw n}}function rebuild(e,t,n){let r=e.parent;if(e.widget){d(e);for(let t of childSnapshot(e))t.kind===`element`&&(o(e,t),t.attached=!1);r&&o(r,e)}e.widget=null,e.wrapper=null,e.attached=!1;try{materialize(e)}catch(i){t!==void 0&&(n===void 0?delete e.props[t]:e.props[t]=n);try{materialize(e),r&&attach(r,e)}catch{}throw i}r&&attach(r,e)}function setText(e,t){e.data=t,e.kind===`text`&&e.parent&&flushText(e.parent)}function setElementText(e,t){writeTextSink(e,t),e.textFromChildren=!1,destroyChildren(e)}function flushText(e){let t=``,n=!1;for(let r of childNodes(e))r.kind===`text`&&(t+=r.data,n=!0);if(t===``&&!e.textFromChildren)return;let r=e.descriptor.textSink;if(t===``&&r&&holdsElementInSetterSlot(e)){e.textFromChildren=!1,delete e.props[r];return}writeTextSink(e,t),e.textFromChildren=n}function*setterSlotChildren(e){for(let t of siblingsFrom(e.first,e))t.kind===`element`&&t.attached&&s(e,t)&&(yield t)}const holdsElementInSetterSlot=e=>!setterSlotChildren(e).next().done;function writeTextSink(e,n){let r=e.descriptor.textSink;if(!r)throw t.textNotAccepted(e.descriptor.gtype,n);materialize(e);let i=e.descriptor.children,a=i.kind===`single`?i.set:null;if(a&&!holdsOursInSlot(e,null)&&appOccupant(e.widget,e.descriptor,a))throw t.occupiedSlot(e.descriptor.gtype,`text`,a);let o=y(_(e.descriptor.ctor(),e.descriptor.gtype),e.descriptor.gtype,r);u(e.widget);try{e.widget.set_property(r,g(o,n,e.descriptor.gtype))}finally{f()}e.props[r]=n;for(let t of setterSlotChildren(e))t.attached=!1}function*childNodes(e){yield*siblingsFrom(e.first,e)}function childSnapshot(e){let t=[];for(let n of siblingsFrom(e.first,e))t.push(n);return t}function*siblingsFrom(e,n){let r=0;for(let i=e;i;i=i.next){if(++r>1e5)throw t.siblingCycle(n.descriptor.gtype);yield i}}function link(e,t,n){t.parent=e,n?(t.prev=n.prev,t.next=n,n.prev?n.prev.next=t:e.first=t,n.prev=t):(t.prev=e.last,t.next=null,e.last?e.last.next=t:e.first=t,e.last=t)}function unlink(e){let t=e.parent;t&&(e.prev?e.prev.next=e.next:t.first=e.next,e.next?e.next.prev=e.prev:t.last=e.prev,e.prev=null,e.next=null,e.parent=null)}function attach(e,t){if(!e.widget)return;materialize(t),ensureWrapper(e,t),refuseOccupiedSlot(e,t);let i=e.foreign.length>0?e.foreign.filter(t=>t.get_parent()===e.widget):e.foreign,a=i.length>0?i[i.length-1]:null,o=i.length;for(let r of siblingsFrom(e.first,e)){if(r===t)break;r.kind!==`element`||!r.attached||(a=n(r),o+=1)}let s=[];for(let n of siblingsFrom(t.next,e))n.kind===`element`&&n.attached&&s.push(n);r({parent:e,child:t,prevWidget:a,index:o,following:s}),t.attached=!0}function refuseOccupiedSlot(e,n){let r=s(e,n);if(r&&!holdsOursInSlot(e,n.slot)&&appOccupant(e.widget,e.descriptor,r))throw t.occupiedSlot(e.descriptor.gtype,n.descriptor.gtype,r)}function holdsOursInSlot(e,t){for(let n of siblingsFrom(e.first,e))if(n.kind===`element`&&n.attached&&n.slot===t)return!0;return!1}function ensureWrapper(n,r){if(r.wrapper)return;let i;try{i=a(n.descriptor.children,r.widget)}catch(i){throw i instanceof e?i:t.rejectedChild(n.descriptor.gtype,r.descriptor.gtype,i.message)}i&&(r.wrapper=i)}function insert(e,t,n=null){assertHostParent(t);let r=e.parent,i=e.next,a=n===e?i:n;e.parent&&remove(e),link(t,e,a);try{e.kind===`element`?attach(t,e):e.kind===`text`&&flushText(t)}catch(t){throw unlink(e),r&&restore(e,r,i),t}}function assertHostParent(e){if(!isHostElement(e))throw t.notAHostParent(describeValue(e))}function isHostElement(e){let t=e;return!!t&&t.kind===`element`&&typeof t.descriptor==`object`}function describeValue(e){if(e==null)return String(e);if(typeof e!=`object`)return`a ${typeof e}`;let t=e.tagName;if(typeof t==`string`)return`a DOM element <${t.toLowerCase()}>`;let n=e.constructor?.$gtype,r=n?C.type_name(n)??`an unnamed GType`:null;if(r!==null&&r!==`JSObject`)return r;let i=e.constructor?.name;return i&&i!==`Object`?`a ${i}`:`a plain object`}function restore(e,t,n){try{link(t,e,n),e.kind===`element`?attach(t,e):e.kind===`text`&&flushText(t)}catch{unlink(e)}}function restoreTextSink(e){let t=e.descriptor.textSink;if(!t||e.destroyed||!e.widget)return;let n=e.descriptor.children;if(n.kind!==`single`||holdsOursInSlot(e,null)||l(e.widget,n.set))return;let r=t.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),i=e.props[t]??e.props[r];if(typeof i!=`string`||i===``)return;let a=y(_(e.descriptor.ctor(),e.descriptor.gtype),e.descriptor.gtype,t);u(e.widget);try{e.widget.set_property(t,g(a,i,e.descriptor.gtype))}finally{f()}}function remove(e){let t=e.parent;t&&e.kind===`element`&&(o(t,e),e.attached=!1,e.wrapper&&=(e.wrapper.set_child(null),null),restoreTextSink(t)),unlink(e),t&&e.kind===`text`&&flushText(t)}function destroyChildren(e){for(let t of childSnapshot(e))destroy(t)}function disconnectHandlers(e){d(e),e.listeners.clear()}function destroy(e){if(e.kind===`element`&&(destroyChildren(e),d(e),e.listeners.clear()),remove(e),e.kind===`element`){let t=e.widget;t&&typeof t.destroy==`function`&&typeof t.get_parent==`function`&&t.get_parent()===null&&t.destroy(),e.widget=null,e.wrapper=null,e.props={},e.layout=null,e.textFromChildren=!1,e.destroyed=!0}}function mountRoot(e,t){materialize(e),insert(e,adopt(t))}function widgetOf(e){if(e.kind!==`element`)throw t.notAnElement(e.kind);if(e.destroyed)throw t.destroyedNode(e.descriptor.gtype);return materialize(e)}const createDetachedContainer=()=>adopt(i());function adopt(e){let n=e.constructor.$gtype,r=S(n);if(!r)throw t.unknownTag(gtypeNameOf(e));return{kind:`element`,descriptor:r,widget:e,wrapper:null,slot:null,parent:null,prev:null,next:null,first:null,last:null,handlers:new Map,listeners:new Map,props:{},layout:null,textFromChildren:!1,attached:!0,destroyed:!1,foreign:adoptedChildren(e,r)}}function adoptedChildren(e,t){let n=c(t.children);if(n.length===0)return directChildren(e);let r=[];for(let i of n){let n=appOccupant(e,t,i);n&&r.push(n)}return r}function appOccupant(e,t,n){let r=l(e,n);if(!r)return null;let i=t.textSink;if(!i)return r;let a=e[i.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())];return typeof a==`string`&&a!==``?null:r}function directChildren(e){let t=[],n=e;if(typeof n.get_first_child!=`function`)return t;for(let e=n.get_first_child();e;e=e.get_next_sibling())t.push(e);return t}const gtypeNameOf=e=>C.type_name(e.constructor.$gtype),parentNode=e=>e.parent,firstChild=e=>e.first,nextSibling=e=>e.next,prevSibling=e=>e.prev;export{adopt,createAnchor,createDetachedContainer,createElement,createText,describeValue,destroy,destroyChildren,disconnectHandlers,firstChild,insert,isHostElement,isText,materialize,mountRoot,nextSibling,parentNode,prevSibling,remove,setElementText,setEventHandler,setProp,setSlot,setText,widgetOf};
package/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{GtkHostError as e}from"./errors.js";import{addressOf as t,reorderMode as n}from"./policies.js";import{isEventProp as r,toSignalName as i}from"./signals.js";import{constructOnlyNames as a,isConstructOnly as o,isWritable as s,lookupEnumNick as c,paramSpecs as l,toPropertyName as u}from"./props.js";import{assertInjective as d,tagOf as f}from"./tags.js";import{clearRegistry as p,hasWidget as m,lookupWidget as h,nearestRegistered as g,registerWidget as _,registerWidgets as v,registeredTags as y}from"./registry.js";import{adopt as b,createAnchor as x,createDetachedContainer as S,createElement as C,createText as w,destroy as T,destroyChildren as E,disconnectHandlers as D,firstChild as O,insert as k,isHostElement as A,isText as j,materialize as M,mountRoot as N,nextSibling as P,parentNode as F,prevSibling as I,remove as L,setElementText as R,setEventHandler as z,setProp as B,setSlot as V,setText as H,widgetOf as U}from"./host.js";import{GENERATED_PROVENANCE as W,GENERATED_WIDGETS as G}from"./generated/widgets.js";import{ADW_DESCRIPTORS as K}from"./descriptors/adw.js";import{GTK_DESCRIPTORS as q}from"./descriptors/gtk.js";import{BUILTIN_DESCRIPTORS as J,CURATED_DESCRIPTORS as Y,mergeGenerated as X,registerBuiltinWidgets as Z,tableProvenance as Q}from"./descriptors/index.js";import"./types.js";import{probeEnabled as $,runHostProbe as ee,runHostProbeApp as te}from"./probe.js";export{K as ADW_DESCRIPTORS,J as BUILTIN_DESCRIPTORS,Y as CURATED_DESCRIPTORS,W as GENERATED_PROVENANCE,G as GENERATED_WIDGETS,q as GTK_DESCRIPTORS,e as GtkHostError,t as addressOf,b as adopt,d as assertInjective,p as clearRegistry,a as constructOnlyNames,x as createAnchor,S as createDetachedContainer,C as createElement,w as createText,T as destroy,E as destroyChildren,D as disconnectHandlers,O as firstChild,m as hasWidget,k as insert,o as isConstructOnly,r as isEventProp,A as isHostElement,j as isText,s as isWritable,c as lookupEnumNick,h as lookupWidget,M as materialize,X as mergeGenerated,N as mountRoot,g as nearestRegistered,P as nextSibling,l as paramSpecs,F as parentNode,I as prevSibling,$ as probeEnabled,Z as registerBuiltinWidgets,_ as registerWidget,v as registerWidgets,y as registeredTags,L as remove,n as reorderMode,ee as runHostProbe,te as runHostProbeApp,R as setElementText,z as setEventHandler,B as setProp,V as setSlot,H as setText,Q as tableProvenance,f as tagOf,u as toPropertyName,i as toSignalName,U as widgetOf};
1
+ import{GtkHostError as e}from"./errors.js";import{addressOf as t,reorderMode as n}from"./policies.js";import{isEventProp as r,toSignalName as i}from"./signals.js";import{constructOnlyNames as a,isConstructOnly as o,isWritable as s,lookupEnumNick as c,paramSpecs as l,toPropertyName as u}from"./props.js";import{assertInjective as d,tagOf as f}from"./tags.js";import{clearRegistry as p,hasWidget as m,lookupWidget as h,nearestRegistered as g,registerWidget as _,registerWidgets as v,registeredTags as y}from"./registry.js";import{adopt as b,createAnchor as x,createDetachedContainer as S,createElement as C,createText as w,destroy as T,destroyChildren as E,disconnectHandlers as D,firstChild as O,insert as k,isHostElement as A,isText as j,materialize as M,mountRoot as N,nextSibling as P,parentNode as F,prevSibling as I,remove as L,setElementText as R,setEventHandler as z,setProp as B,setSlot as V,setText as H,widgetOf as U}from"./host.js";import{GENERATED_PROVENANCE as W,GENERATED_WIDGETS as G}from"./generated/widgets.js";import{ADW_DESCRIPTORS as K}from"./descriptors/adw.js";import{GTK_DESCRIPTORS as q}from"./descriptors/gtk.js";import{BUILTIN_DESCRIPTORS as J,CURATED_DESCRIPTORS as Y,mergeGenerated as X,registerBuiltinWidgets as Z,tableProvenance as Q}from"./descriptors/index.js";import"./types.js";import{blankReason as $,checkRendered as ee,probeEnabled as te,runHostProbe as ne,runHostProbeApp as re,shotEvidence as ie}from"./probe.js";export{K as ADW_DESCRIPTORS,J as BUILTIN_DESCRIPTORS,Y as CURATED_DESCRIPTORS,W as GENERATED_PROVENANCE,G as GENERATED_WIDGETS,q as GTK_DESCRIPTORS,e as GtkHostError,t as addressOf,b as adopt,d as assertInjective,$ as blankReason,ee as checkRendered,p as clearRegistry,a as constructOnlyNames,x as createAnchor,S as createDetachedContainer,C as createElement,w as createText,T as destroy,E as destroyChildren,D as disconnectHandlers,O as firstChild,m as hasWidget,k as insert,o as isConstructOnly,r as isEventProp,A as isHostElement,j as isText,s as isWritable,c as lookupEnumNick,h as lookupWidget,M as materialize,X as mergeGenerated,N as mountRoot,g as nearestRegistered,P as nextSibling,l as paramSpecs,F as parentNode,I as prevSibling,te as probeEnabled,Z as registerBuiltinWidgets,_ as registerWidget,v as registerWidgets,y as registeredTags,L as remove,n as reorderMode,ne as runHostProbe,re as runHostProbeApp,R as setElementText,z as setEventHandler,B as setProp,V as setSlot,H as setText,ie as shotEvidence,Q as tableProvenance,f as tagOf,u as toPropertyName,i as toSignalName,U as widgetOf};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import e from"gi://GObject";import t from"gi://Gtk?version=4.0";import n from"gi://Gio";const r=e.registerClass({GTypeName:`GjsifyGtkHostListRow`},class ListRowCarrier extends e.Object{constructor(...e){super(...e),this.row=null}});var ListController=class{#e=n.ListStore.new(r.$gtype);#t=new t.SignalListItemFactory;#n=[];#r=new Map;#i;#a=null;#o=[];#s=!1;constructor(e){this.#i=e,this.#n.push(this.#t.connect(`setup`,(e,t)=>this.#c(t)),this.#t.connect(`bind`,(e,t)=>this.#l(t)),this.#t.connect(`unbind`,(e,t)=>this.#u(t)),this.#t.connect(`teardown`,(e,t)=>this.#d(t)))}attach(e){this.#a=e,e.set_factory(this.#t),e.set_model(t.NoSelection.new(this.#e))}setRows(e){if(this.#s)return;let t=e.map(e=>e.key),n=t.length===this.#o.length&&t.every((e,t)=>e===this.#o[t]);if(this.#o=t,n){for(let t=0;t<e.length;t++){let n=this.#e.get_item(t);n!==null&&(n.row=e[t])}for(let e of this.#r.keys())this.#l(e);return}let i=e.map(e=>{let t=new r;return t.row=e,t});this.#e.splice(0,this.#e.get_n_items(),i)}get liveRows(){return this.#r.size}dispose(){if(this.#s)return;this.#s=!0;for(let e of this.#n)this.#t.disconnect(e);this.#n.length=0,this.#a!==null&&(this.#a.set_factory(null),this.#a.set_model(null),this.#a=null),this.#e.remove_all();let e=[...this.#r.values()];this.#r.clear();for(let t of e)this.#i.disposeRow(t)}#c(e){this.#r.set(e,this.#i.mountRow(e))}#l(e){let t=this.#r.get(e);if(t===void 0)return;let n=e.get_item();this.#i.showRow(t,n?.row??null,e.get_position())}#u(e){let t=this.#r.get(e);t!==void 0&&this.#i.showRow(t,null,e.get_position())}#d(e){let t=this.#r.get(e);t!==void 0&&(this.#r.delete(e),this.#i.disposeRow(t))}};export{ListController};
@@ -0,0 +1 @@
1
+ import{ListController as e}from"./controller.js";import{onScrollNearEnd as t}from"./scroll.js";export{e as ListController,t as onScrollNearEnd};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";function onScrollNearEnd(e,t,n,r){let i=t===`horizontal`?e.get_hadjustment():e.get_vadjustment(),a=!0,check=()=>{let e=i.get_page_size(),t=i.get_upper();if(t<=e){a=!0;return}let o=t-e-i.get_value();if(o>n*e){a=!0;return}a&&(a=!1,r(o))},o=[i.connect(`notify::value`,check),i.connect(`notify::upper`,check),i.connect(`notify::page-size`,check)];return check(),()=>{for(let e of o)i.disconnect(e)}}export{onScrollNearEnd};
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";import{GtkHostError as e,err as t}from"./errors.js";import n from"gi://Gtk?version=4.0";function addressOf(e){let n=e.wrapper??e.widget;if(!n)throw t.notAWidget(e.descriptor.gtype);return n}function makeWrapper(e,t){if(e.kind!==`indexed`||!e.wrap)return null;if(e.wrap===`list-box-row`){if(t instanceof n.ListBoxRow)return null;let e=new n.ListBoxRow;return e.set_child(t),e}if(t instanceof n.FlowBoxChild)return null;let r=new n.FlowBoxChild;return r.set_child(t),r}const makeDetachedContainer=()=>new n.Box;function unhandledPolicy(e){throw Error(`unhandled child policy: ${JSON.stringify(e)}`)}function setterSlotOf(e,t){let n=e.descriptor.children;if(n.kind===`single`)return n.set;if(n.kind!==`slotted`)return null;let r=n.slots[t.slot??n.defaultSlot];return r?.startsWith(`set_`)===!0?r:null}function setterSlots(e){return e.kind===`single`?[e.set]:e.kind===`slotted`?Object.values(e.slots).filter(e=>e.startsWith(`set_`)):[]}function slotOccupant(e,t){let n=e,r=t.replace(/^set_/,`get_`);if(typeof n[r]==`function`)return n[r]()??null}function insertChild(n){try{placeChild(n)}catch(r){throw r instanceof e?r:t.rejectedChild(n.parent.descriptor.gtype,n.child.descriptor.gtype,r.message)}}function placeChild(e){let{parent:n,child:r}=e,i=n.descriptor.children,a=n.widget,o=addressOf(r);switch(i.kind){case`none`:throw t.unclaimedChild(n.descriptor.gtype,r.descriptor.gtype);case`uncurated`:throw t.uncuratedPlacement(n.descriptor.gtype,r.descriptor.gtype);case`single`:a[i.set](o);return;case`indexed`:a[i.insert](o,e.index);return;case`coords`:appendChild(n,r,a);return;case`ordered`:if(i.after){a[i.after](o,e.prevWidget??null);return}case`slotted`:case`keyed`:appendChild(n,r,a),rotateTail(n,r,e.following,a);return;default:return unhandledPolicy(i)}}function appendChild(e,n,r){let i=e.descriptor.children,a=addressOf(n);switch(i.kind){case`uncurated`:throw t.uncuratedPlacement(e.descriptor.gtype,n.descriptor.gtype);case`ordered`:r[i.append](a);return;case`slotted`:{let o=n.slot??i.defaultSlot,s=i.slots[o];if(!s)throw t.unknownSlot(e.descriptor.gtype,o,Object.keys(i.slots));r[s](a);return}case`keyed`:{let e=n.layout?.[i.nameFrom]??n.slot,t=n.layout?.title;i.titled?r[i.add](a,e??null,t??e??``):r[i.add](a);return}case`coords`:{let e=n.layout??{};r[i.attach](a,e.column??0,e.row??0,e.columnSpan??1,e.rowSpan??1);return}default:throw t.unclaimedChild(e.descriptor.gtype,n.descriptor.gtype)}}function rotateTail(e,t,n,r){let i=e.descriptor.children,a=n;if(i.kind===`slotted`){if(setterSlotOf(e,t))return;let slotOf=e=>e.slot??i.defaultSlot,r=slotOf(t);a=n.filter(e=>slotOf(e)===r)}for(let t of a)detachChild(e,t,r);for(let t of a)appendChild(e,t,r)}function detachChild(e,t,n){let r=e.descriptor.children,i=t.wrapper??t.widget;if(i)switch(r.kind){case`none`:case`uncurated`:return;case`single`:clearIfCurrent(n,r.set,i);return;case`slotted`:{let a=setterSlotOf(e,t);if(a){clearIfCurrent(n,a,i);return}n[r.remove](i);return}case`ordered`:case`indexed`:case`keyed`:case`coords`:n[r.remove](i);return;default:return unhandledPolicy(r)}}function clearIfCurrent(e,t,n){let r=slotOccupant(e,t);(r===void 0||r===n)&&e[t](null)}function removeChild(e,t){let n=e.widget;n&&t.attached&&detachChild(e,t,n)}function reorderMode(e){switch(e.kind){case`uncurated`:return`n/a`;case`ordered`:return e.reorder;case`indexed`:return`native`;case`slotted`:case`keyed`:return`remove-all`;case`coords`:case`single`:case`none`:return`n/a`;default:return unhandledPolicy(e)}}export{addressOf,insertChild,makeDetachedContainer,makeWrapper,removeChild,reorderMode,setterSlotOf,setterSlots,slotOccupant,unhandledPolicy};
1
+ import"./_virtual/_rolldown/runtime.js";import{GtkHostError as e,err as t}from"./errors.js";import n from"gi://Gtk?version=4.0";function addressOf(e){let n=e.wrapper??e.widget;if(!n)throw t.notAWidget(e.descriptor.gtype);return n}function makeWrapper(e,t){if(e.kind!==`indexed`||!e.wrap)return null;if(e.wrap===`list-box-row`){if(t instanceof n.ListBoxRow)return null;let e=new n.ListBoxRow;return e.set_child(t),e}if(t instanceof n.FlowBoxChild)return null;let r=new n.FlowBoxChild;return r.set_child(t),r}const makeDetachedContainer=()=>new n.Box;function unhandledPolicy(e){throw Error(`unhandled child policy: ${JSON.stringify(e)}`)}function setterSlotOf(e,t){let n=e.descriptor.children;if(n.kind===`single`)return n.set;if(n.kind!==`slotted`)return null;let r=n.slots[t.slot??n.defaultSlot];return r?.startsWith(`set_`)===!0?r:null}function adderSlots(e){return e.kind===`slotted`?Object.entries(e.slots).filter(([,e])=>!e.startsWith(`set_`)).map(([e])=>e):[]}function setterSlots(e){return e.kind===`single`?[e.set]:e.kind===`slotted`?Object.values(e.slots).filter(e=>e.startsWith(`set_`)):[]}function slotOccupant(e,t){let n=e,r=t.replace(/^set_/,`get_`);if(typeof n[r]==`function`)return n[r]()??null}function insertChild(n){try{placeChild(n)}catch(r){throw r instanceof e?r:t.rejectedChild(n.parent.descriptor.gtype,n.child.descriptor.gtype,r.message)}}function placeChild(e){let{parent:n,child:r}=e,i=n.descriptor.children,a=n.widget,o=addressOf(r);switch(i.kind){case`none`:throw t.unclaimedChild(n.descriptor.gtype,r.descriptor.gtype);case`uncurated`:throw t.uncuratedPlacement(n.descriptor.gtype,r.descriptor.gtype);case`single`:a[i.set](o);return;case`indexed`:a[i.insert](o,e.index);return;case`coords`:appendChild(n,r,a);return;case`ordered`:if(i.after){a[i.after](o,e.prevWidget??null);return}case`slotted`:case`keyed`:appendChild(n,r,a),rotateTail(n,r,e.following,a);return;default:return unhandledPolicy(i)}}function appendChild(e,n,r){let i=e.descriptor.children,a=addressOf(n);switch(i.kind){case`uncurated`:throw t.uncuratedPlacement(e.descriptor.gtype,n.descriptor.gtype);case`ordered`:r[i.append](a);return;case`slotted`:{let o=n.slot??i.defaultSlot,s=i.slots[o];if(!s)throw t.unknownSlot(e.descriptor.gtype,o,Object.keys(i.slots));r[s](a);return}case`keyed`:{let e=n.layout?.[i.nameFrom]??n.slot,t=n.layout?.title;i.titled?r[i.add](a,e??null,t??e??``):r[i.add](a);return}case`coords`:{let e=n.layout??{};r[i.attach](a,e.column??0,e.row??0,e.columnSpan??1,e.rowSpan??1);return}default:throw t.unclaimedChild(e.descriptor.gtype,n.descriptor.gtype)}}function rotateTail(e,t,n,r){let i=e.descriptor.children,a=n;if(i.kind===`slotted`){if(setterSlotOf(e,t))return;let slotOf=e=>e.slot??i.defaultSlot,r=slotOf(t);a=n.filter(e=>slotOf(e)===r)}for(let t of a)detachChild(e,t,r);for(let t of a)appendChild(e,t,r)}function detachChild(e,n,r){let i=e.descriptor.children,a=n.wrapper??n.widget;if(a)switch(i.kind){case`none`:case`uncurated`:return;case`single`:clearIfCurrent(r,i.set,a);return;case`slotted`:{let o=setterSlotOf(e,n);if(o){clearIfCurrent(r,o,a);return}let s=n.slot??i.defaultSlot;if(!i.remove)throw t.slotNeedsRemove(e.descriptor.gtype,s,i.slots[s]??`?`);r[i.remove](a);return}case`ordered`:case`indexed`:case`keyed`:case`coords`:r[i.remove](a);return;default:return unhandledPolicy(i)}}function clearIfCurrent(e,t,n){let r=slotOccupant(e,t);(r===void 0||r===n)&&e[t](null)}function removeChild(e,t){let n=e.widget;n&&t.attached&&detachChild(e,t,n)}function reorderMode(e){switch(e.kind){case`uncurated`:return`n/a`;case`ordered`:return e.reorder;case`indexed`:return`native`;case`slotted`:return adderSlots(e).length>0?`remove-all`:`n/a`;case`keyed`:return`remove-all`;case`coords`:case`single`:case`none`:return`n/a`;default:return unhandledPolicy(e)}}export{adderSlots,addressOf,insertChild,makeDetachedContainer,makeWrapper,removeChild,reorderMode,setterSlotOf,setterSlots,slotOccupant,unhandledPolicy};
package/lib/esm/probe.js CHANGED
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";import{installDiagnosticsGate as e}from"./conformance/diagnostics.js";import t from"gi://Gtk?version=4.0";import n from"gi://Adw?version=1";import r from"gi://GLib";import i from"system";function probeEnabled(){let e=r.getenv(`GJSIFY_HOST_PROBE`);if(e===null)return!1;let t=e.toLowerCase();return t!==``&&t!==`0`&&t!==`false`}const a=`<gtk-host probe: recorder self-check>`;function recorderIsHonest(e,t){let n=t.length;e(a,!1);let r=t.length===n+1&&t[n]===a;t.length=n,e(a,!0);let i=t.length===n;return t.length=n,r&&i?null:r?`the probe recorder records a PASSING check as a failure, so every assertion below is a false alarm`:`the probe recorder did not record a failed check, so every assertion below is unverifiable`}async function runHostProbe(t){let n=t.label??`PROBE`,r=e();r.reset();let i=[],check=(e,t)=>{t||i.push(e)},a=recorderIsHonest(check,i);a!==null&&i.push(a);let o={};try{let e=t.build(null);o=await t.assert(e,check),t.teardown?.(e)}catch(e){i.push(`threw: ${e.message}`)}let s=r.seen.length;check(`no GTK diagnostics (saw ${s})`,s===0);let c=JSON.stringify({...i.length>0?{failures:i}:{},diagnostics:s,...o});return print(`${n}: ${i.length>0?`FAIL`:`PASS`} ${c}`),+(i.length>0)}async function runHostProbeApp(e){if(probeEnabled())return t.init(),i.exit(await runHostProbe(e));let r=new n.Application({application_id:e.applicationId});r.connect(`activate`,()=>{r.hold(),(async()=>{try{let t=await runHostProbe(e);if(t!==0)return i.exit(t);e.present(e.build(r))}catch(t){return printerr(`JS ERROR: ${e.applicationId} probe threw: ${String(t)}`),i.exit(1)}finally{r.release()}})()}),await r.runAsync([])}export{probeEnabled,runHostProbe,runHostProbeApp};
1
+ import"./_virtual/_rolldown/runtime.js";import{installDiagnosticsGate as e}from"./conformance/diagnostics.js";import{descendants as t}from"./conformance/index.js";import n from"gi://Gtk?version=4.0";import r from"gi://Adw?version=1";import i from"gi://GLib";import a from"system";function probeEnabled(){let e=i.getenv(`GJSIFY_HOST_PROBE`);if(e===null)return!1;let t=e.toLowerCase();return t!==``&&t!==`0`&&t!==`false`}const o=`<gtk-host probe: recorder self-check>`;function recorderIsHonest(e,t){let n=t.length;e(o,!1);let r=t.length===n+1&&t[n]===o;t.length=n,e(o,!0);let i=t.length===n;return t.length=n,r&&i?null:r?`the probe recorder records a PASSING check as a failure, so every assertion below is a false alarm`:`the probe recorder did not record a failed check, so every assertion below is unverifiable`}async function runHostProbe(t){let n=t.label??`PROBE`,r=e();r.reset();let i=[],check=(e,t)=>{t||i.push(e)},a=recorderIsHonest(check,i);a!==null&&i.push(a);let o={};try{let e=t.build(null);o=await t.assert(e,check),t.teardown?.(e)}catch(e){i.push(`threw: ${e.message}`)}let s=r.seen.length;check(`no GTK diagnostics (saw ${s})`,s===0);let c=JSON.stringify({...i.length>0?{failures:i}:{},diagnostics:s,...o});return print(`${n}: ${i.length>0?`FAIL`:`PASS`} ${c}`),+(i.length>0)}async function runHostProbeApp(e){if(probeEnabled())return n.init(),a.exit(await runHostProbe(e));let t=new r.Application({application_id:e.applicationId});t.connect(`activate`,()=>{t.hold(),(async()=>{try{let n=await runHostProbe(e);if(n!==0)return a.exit(n);e.present(e.build(t))}catch(t){return printerr(`JS ERROR: ${e.applicationId} probe threw: ${String(t)}`),a.exit(1)}finally{t.release()}})()}),await t.runAsync([])}function shotEvidence(e,n){let r=n(e);return{widgets:t(e).length-1,width:e.get_width(),height:e.get_height(),bytes:r?r.length:0}}function blankReason(e){return e.widgets===0?`nothing was rendered into the container: it has no children at all, which is what a refused render, an unmounted root and a component returning null all look like from GTK`:e.width<=0||e.height<=0?`the container is allocated ${e.width}×${e.height}: its ${e.widgets} widget(s) exist and occupy nothing`:e.bytes===0?`the capture produced no PNG: the widget has no renderer yet, so it was measured before it was ever on screen`:null}function checkRendered(e,t,n){let r=blankReason(n);e(r===null?t:`${t} — ${r}`,r===null)}export{blankReason,checkRendered,probeEnabled,runHostProbe,runHostProbeApp,shotEvidence};
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";import{err as e}from"./errors.js";const t=/(?:Once|Passive|Capture)$/;function parseEventProp(n,r){if(r?.[n])return{signal:r[n],once:!1};if(n.startsWith(`on:`))return{signal:n.slice(3),once:!1};let i=n.slice(2),a=!1;for(let r=t.exec(i);r;r=t.exec(i)){let t=r[0];if(t!==`Once`)throw e.eventModifier(n,t.toLowerCase());a=!0,i=i.slice(0,i.length-t.length)}return i===`Notify`?{signal:`notify`,once:a}:i.startsWith(`Notify`)?{signal:`notify::${kebab(i.slice(6))}`,once:a}:{signal:kebab(i),once:a}}const toSignalName=(e,t)=>parseEventProp(e,t).signal,kebab=e=>e.replace(/^./,e=>e.toLowerCase()).replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function isEventProp(e){return e.startsWith(`on:`)||e.length>2&&e.startsWith(`on`)&&e[2]===e[2].toUpperCase()&&e[2]!==e[2].toLowerCase()}let n=0;const beginHostWrite=()=>{n+=1},endHostWrite=()=>{--n},inHostWrite=()=>n>0;function setHandler(t,n,r){let{signal:i,once:a}=parseEventProp(n,t.descriptor.eventAliases),o=t.handlers.get(i),s=t.widget;if(o&&o.prop!==n&&r)throw e.signalTaken(t.descriptor.gtype,n,o.prop,i);if(o&&(s.disconnect(o.id),t.handlers.delete(i)),!r)return;let c=i.startsWith(`notify::`),l=s.connect(i,(...e)=>{if(!(c&&inHostWrite()))return a&&t.handlers.get(i)?.id===l&&(s.disconnect(l),t.handlers.delete(i)),r(...e.slice(1))});t.handlers.set(i,{id:l,prop:n})}function clearHandlers(e){if(!e.widget){e.handlers.clear();return}let t=e.widget;for(let{id:n}of e.handlers.values())t.disconnect(n);e.handlers.clear()}export{beginHostWrite,clearHandlers,endHostWrite,inHostWrite,isEventProp,parseEventProp,setHandler,toSignalName};
1
+ import"./_virtual/_rolldown/runtime.js";import{err as e}from"./errors.js";const t=/(?:Once|Passive|Capture)$/;function parseEventProp(n,r){if(r?.[n])return{signal:r[n],once:!1};if(n.startsWith(`on:`))return{signal:n.slice(3),once:!1};let i=n.slice(2),a=!1;for(let r=t.exec(i);r;r=t.exec(i)){let t=r[0];if(t!==`Once`)throw e.eventModifier(n,t.toLowerCase());a=!0,i=i.slice(0,i.length-t.length)}return i===`Notify`?{signal:`notify`,once:a}:i.startsWith(`Notify`)?{signal:`notify::${kebab(i.slice(6))}`,once:a}:{signal:kebab(i),once:a}}const toSignalName=(e,t)=>parseEventProp(e,t).signal,kebab=e=>e.replace(/^./,e=>e.toLowerCase()).replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function isEventProp(e){return e.startsWith(`on:`)||e.length>2&&e.startsWith(`on`)&&e[2]===e[2].toUpperCase()&&e[2]!==e[2].toLowerCase()}const n=[],beginHostWrite=(e=null)=>{n.push(e)},endHostWrite=()=>{n.pop()},inHostWrite=()=>n.length>0,isHostWriteTarget=e=>n.includes(e);function setHandler(t,n,r){let{signal:i,once:a}=parseEventProp(n,t.descriptor.eventAliases),o=t.handlers.get(i),s=t.widget;if(o&&o.prop!==n&&r)throw e.signalTaken(t.descriptor.gtype,n,o.prop,i);if(o&&(s.disconnect(o.id),t.handlers.delete(i)),!r)return;let c=i===`notify`||i.startsWith(`notify::`),l=s.connect(i,(...e)=>{if(!(inHostWrite()&&(c||isHostWriteTarget(s))))return a&&t.handlers.get(i)?.id===l&&(s.disconnect(l),t.handlers.delete(i)),r(...e.slice(1))});t.handlers.set(i,{id:l,prop:n})}function clearHandlers(e){if(!e.widget){e.handlers.clear();return}let t=e.widget;for(let{id:n}of e.handlers.values())t.disconnect(n);e.handlers.clear()}export{beginHostWrite,clearHandlers,endHostWrite,inHostWrite,isEventProp,isHostWriteTarget,parseEventProp,setHandler,toSignalName};
@@ -1,5 +1,6 @@
1
1
  import type Gtk from '@girs/gtk-4.0';
2
2
  import { widgetOf } from '../host.js';
3
+ import type { ListRowKey, ListRowSink } from '../list/index.js';
3
4
  import type { HostNode } from '../types.js';
4
5
  export declare const render: (code: () => HostNode, node: HostNode) => () => void, effect: <T>(fn: (prev?: T) => T, init?: T) => void, memo: <T>(fn: () => T, equal: boolean) => () => T, createComponent: <T>(Comp: (props: T) => HostNode, props: T) => HostNode, createElement: (tag: string) => HostNode, createTextNode: (value: string) => HostNode, insertNode: (parent: HostNode, node: HostNode, anchor?: HostNode) => void, insert: <T>(parent: any, accessor: T | (() => T), marker?: any | null, initial?: any) => HostNode, spread: <T>(node: any, accessor: (() => T) | T, skipChildren?: boolean) => void, setProp: <T>(node: HostNode, name: string, value: T, prev?: T) => T, mergeProps: (...sources: unknown[]) => unknown, use: <A, T>(fn: (element: HostNode, arg: A) => T, element: HostNode, arg: A) => T;
5
6
  /**
@@ -14,6 +15,40 @@ export declare const render: (code: () => HostNode, node: HostNode) => () => voi
14
15
  * disconnects the signal handlers.
15
16
  */
16
17
  export declare function mount(code: () => HostNode, container: Gtk.Widget): () => void;
18
+ /**
19
+ * What `listRows` keeps for one ROW WIDGET: a way to show a row in it, and a way to
20
+ * let go. Opaque to the controller, which stores it and hands it back.
21
+ */
22
+ export interface ListRowHandle<Row extends ListRowKey> {
23
+ show(row: Row | null, index: number): void;
24
+ dispose(): void;
25
+ }
26
+ /**
27
+ * Solid's half of a `Gtk.ListView`, for `ListController` in `@gjsify/gtk-host/list`.
28
+ *
29
+ * The controller owns the model, the factory and the key diff — none of which has a
30
+ * framework in it. This supplies the three callbacks it cannot have: what to put in a
31
+ * row widget, what to show there, and how to let go.
32
+ *
33
+ * ONE REACTIVE ROOT PER ROW WIDGET, created in `mountRow` and never again, for two
34
+ * reasons that are not the same kind of thing. The carrier is taken ONCE because taking
35
+ * it per bind is REFUSED: `adopt` snapshots what a container already held and cannot
36
+ * tell our own previous child from application chrome, and the same carrier comes back
37
+ * on the next show, so the second one reads our own row as someone else's and raises
38
+ * `occupied-slot` (measured against this seam; `host.spec.ts` pins the same refusal
39
+ * from the host's side). The row's signals live INSIDE the root rather than beside it
40
+ * for a documented reason rather than a measured one — Solid never disposes a
41
+ * computation created with no owner, which for a per-row memo would be one leak per
42
+ * row.
43
+ *
44
+ * What the row sees is an ACCESSOR, not a value, and that is the capability this seam
45
+ * buys over re-rendering: when `setRows` finds unchanged keys over changed content, the
46
+ * controller shows every live row again, this writes one signal, and Solid updates the
47
+ * properties that actually changed — the widgets stay. Only the transition between
48
+ * "holds a row" and "holds nothing" rebuilds the subtree, which is what `present`
49
+ * isolates.
50
+ */
51
+ export declare function listRows<Row extends ListRowKey>(renderRow: (row: () => Row, index: () => number) => HostNode): ListRowSink<Row, ListRowHandle<Row>>;
17
52
  /** `<For each={items}>` — keyed by item identity, so a reorder MOVES nodes. */
18
53
  export declare const For: <T>(props: {
19
54
  each: readonly T[] | undefined | null | false;
@@ -31,7 +31,7 @@ export declare function isEnvironmentDiagnostic(message: string): boolean;
31
31
  * arrive without one. The first version answered `String(raw ?? '')`, so such a
32
32
  * record was counted and then described as nothing: a CI run failed with
33
33
  * `GTK reported 1 diagnostic(s) that would have passed at exit 0:` followed by a
34
- * BLANK LIST, over a test that had just constructed 164 widgets. A gate that can
34
+ * BLANK LIST, over a test that had just constructed the whole table. A gate that can
35
35
  * count a failure but not name it sends the reader back to guessing, which is the
36
36
  * state this whole module exists to end.
37
37
  *
@@ -20,8 +20,8 @@ export declare const CURATED_DESCRIPTORS: readonly WidgetDescriptor[];
20
20
  * that merely LISTS such a tag hands a renderer a way to kill the process, and
21
21
  * `descriptorProblems()` cannot see it because it never instantiates anything.
22
22
  *
23
- * MEASURED bare-constructing all 164 generated rows on gjs 1.88.1 / GTK 4.22.4 /
24
- * libadwaita 1.9.3, resuming past each abort: **163 construct, one does not**, and not a
23
+ * MEASURED bare-constructing every generated row on gjs 1.88.1 / GTK 4.22.4 /
24
+ * libadwaita 1.9.3, resuming past each abort: **all but one construct**, and not a
25
25
  * single row throws. So this map is one entry rather than a policy — and
26
26
  * `constructsEveryDescriptor` in `generated.spec.ts` is what keeps it one entry.
27
27
  *
@@ -43,6 +43,16 @@ export declare const err: {
43
43
  textNotAccepted: (tag: string, text: string) => GtkHostError;
44
44
  unclaimedChild: (parentTag: string, childTag: string) => GtkHostError;
45
45
  unknownSlot: (parentTag: string, slot: string, known: string[]) => GtkHostError;
46
+ /**
47
+ * An adder-backed slot with nothing that takes the child back out.
48
+ *
49
+ * `descriptorProblems()` rejects this shape up front, so a BUILT-IN descriptor can
50
+ * never reach here — but `registerWidget` takes descriptors from applications, which
51
+ * run no such check. Without this the unmount would be
52
+ * `TypeError: host[undefined] is not a function`, blaming the host for a claim the
53
+ * descriptor made.
54
+ */
55
+ slotNeedsRemove: (parentTag: string, slot: string, adder: string) => GtkHostError;
46
56
  rejectedChild: (parentTag: string, childTag: string, reason: string) => GtkHostError;
47
57
  uncuratedPlacement: (parentTag: string, childTag: string) => GtkHostError;
48
58
  siblingCycle: (parentTag: string) => GtkHostError;
@@ -1586,6 +1586,35 @@ export interface AdwToggleGroupProps extends GtkWidgetProps, GtkAccessibleProps,
1586
1586
  onNotifyCanShrink?: NotifyHandler;
1587
1587
  onNotifyHomogeneous?: NotifyHandler;
1588
1588
  }
1589
+ /** A toggle within [class@ToggleGroup]. */
1590
+ export interface AdwToggleProps extends GObjectProps {
1591
+ /** The toggle child. */
1592
+ child?: Gtk.Widget | null;
1593
+ /** The description of the toggle. */
1594
+ description?: string;
1595
+ /** Whether this toggle is enabled. */
1596
+ enabled?: boolean;
1597
+ /** The toggle icon name. */
1598
+ iconName?: string;
1599
+ 'icon-name'?: string;
1600
+ /** The toggle label. */
1601
+ label?: string;
1602
+ /** The toggle name. */
1603
+ name?: string;
1604
+ /** The tooltip of the toggle. */
1605
+ tooltip?: string;
1606
+ /** Whether an embedded underline in the label indicates a mnemonic. */
1607
+ useUnderline?: boolean;
1608
+ 'use-underline'?: boolean;
1609
+ onNotifyChild?: NotifyHandler;
1610
+ onNotifyDescription?: NotifyHandler;
1611
+ onNotifyEnabled?: NotifyHandler;
1612
+ onNotifyIconName?: NotifyHandler;
1613
+ onNotifyLabel?: NotifyHandler;
1614
+ onNotifyName?: NotifyHandler;
1615
+ onNotifyTooltip?: NotifyHandler;
1616
+ onNotifyUseUnderline?: NotifyHandler;
1617
+ }
1589
1618
  /** A widget containing a page, as well as top and/or bottom bars. */
1590
1619
  export interface AdwToolbarViewProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps {
1591
1620
  /** Appearance of the bottom bars. */
@@ -2267,6 +2296,15 @@ export interface GtkColorDialogButtonProps extends GtkWidgetProps, GtkAccessible
2267
2296
  onNotifyDialog?: NotifyHandler;
2268
2297
  onNotifyRgba?: NotifyHandler;
2269
2298
  }
2299
+ /** Represents items in a cell in [class@Gtk.ColumnView]. */
2300
+ export interface GtkColumnViewCellProps extends GtkListItemProps {
2301
+ /** Widget used for display. */
2302
+ child?: Gtk.Widget | null;
2303
+ /** If the item can be focused with the keyboard. */
2304
+ focusable?: boolean;
2305
+ onNotifyChild?: NotifyHandler;
2306
+ onNotifyFocusable?: NotifyHandler;
2307
+ }
2270
2308
  /** Presents a large dynamic list of items using multiple columns with headers. */
2271
2309
  export interface GtkColumnViewProps extends GtkWidgetProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps, GtkScrollableProps {
2272
2310
  /** Allow rubberband selection. */
@@ -3369,6 +3407,35 @@ export interface GtkListBoxRowProps extends GtkWidgetProps, GtkAccessibleProps,
3369
3407
  onNotifyChild?: NotifyHandler;
3370
3408
  onNotifySelectable?: NotifyHandler;
3371
3409
  }
3410
+ /** Used by list widgets to represent the headers they display. */
3411
+ export interface GtkListHeaderProps extends GObjectProps {
3412
+ /** Widget used for display. */
3413
+ child?: Gtk.Widget | null;
3414
+ onNotifyChild?: NotifyHandler;
3415
+ }
3416
+ /** Used by list widgets to represent items in a [iface@Gio.ListModel]. */
3417
+ export interface GtkListItemProps extends GObjectProps {
3418
+ /** The accessible description to set on the listitem. */
3419
+ accessibleDescription?: string;
3420
+ 'accessible-description'?: string;
3421
+ /** The accessible label to set on the listitem. */
3422
+ accessibleLabel?: string;
3423
+ 'accessible-label'?: string;
3424
+ /** If the item can be activated by the user. */
3425
+ activatable?: boolean;
3426
+ /** Widget used for display. */
3427
+ child?: Gtk.Widget | null;
3428
+ /** If the item can be focused with the keyboard. */
3429
+ focusable?: boolean;
3430
+ /** If the item can be selected by the user. */
3431
+ selectable?: boolean;
3432
+ onNotifyAccessibleDescription?: NotifyHandler;
3433
+ onNotifyAccessibleLabel?: NotifyHandler;
3434
+ onNotifyActivatable?: NotifyHandler;
3435
+ onNotifyChild?: NotifyHandler;
3436
+ onNotifyFocusable?: NotifyHandler;
3437
+ onNotifySelectable?: NotifyHandler;
3438
+ }
3372
3439
  /** Presents a large dynamic list of items. */
3373
3440
  export interface GtkListViewProps extends GtkListBaseProps, GtkAccessibleProps, GtkBuildableProps, GtkConstraintTargetProps, GtkOrientableProps, GtkScrollableProps {
3374
3441
  /** Allow rubberband selection. */
@@ -5037,6 +5104,7 @@ export interface WidgetPropsByTag {
5037
5104
  'adw-tab-overview': AdwTabOverviewProps;
5038
5105
  'adw-tab-view': AdwTabViewProps;
5039
5106
  'adw-toast-overlay': AdwToastOverlayProps;
5107
+ 'adw-toggle': AdwToggleProps;
5040
5108
  'adw-toggle-group': AdwToggleGroupProps;
5041
5109
  'adw-toolbar-view': AdwToolbarViewProps;
5042
5110
  'adw-view-stack': AdwViewStackProps;
@@ -5066,6 +5134,7 @@ export interface WidgetPropsByTag {
5066
5134
  'gtk-color-chooser-widget': GtkColorChooserWidgetProps;
5067
5135
  'gtk-color-dialog-button': GtkColorDialogButtonProps;
5068
5136
  'gtk-column-view': GtkColumnViewProps;
5137
+ 'gtk-column-view-cell': GtkColumnViewCellProps;
5069
5138
  'gtk-combo-box': GtkComboBoxProps;
5070
5139
  'gtk-combo-box-text': GtkComboBoxTextProps;
5071
5140
  'gtk-dialog': GtkDialogProps;
@@ -5100,6 +5169,8 @@ export interface WidgetPropsByTag {
5100
5169
  'gtk-link-button': GtkLinkButtonProps;
5101
5170
  'gtk-list-box': GtkListBoxProps;
5102
5171
  'gtk-list-box-row': GtkListBoxRowProps;
5172
+ 'gtk-list-header': GtkListHeaderProps;
5173
+ 'gtk-list-item': GtkListItemProps;
5103
5174
  'gtk-list-view': GtkListViewProps;
5104
5175
  'gtk-lock-button': GtkLockButtonProps;
5105
5176
  'gtk-media-controls': GtkMediaControlsProps;
@@ -5204,6 +5275,7 @@ export interface WidgetPropsByGType {
5204
5275
  AdwTabOverview: AdwTabOverviewProps;
5205
5276
  AdwTabView: AdwTabViewProps;
5206
5277
  AdwToastOverlay: AdwToastOverlayProps;
5278
+ AdwToggle: AdwToggleProps;
5207
5279
  AdwToggleGroup: AdwToggleGroupProps;
5208
5280
  AdwToolbarView: AdwToolbarViewProps;
5209
5281
  AdwViewStack: AdwViewStackProps;
@@ -5233,6 +5305,7 @@ export interface WidgetPropsByGType {
5233
5305
  GtkColorChooserWidget: GtkColorChooserWidgetProps;
5234
5306
  GtkColorDialogButton: GtkColorDialogButtonProps;
5235
5307
  GtkColumnView: GtkColumnViewProps;
5308
+ GtkColumnViewCell: GtkColumnViewCellProps;
5236
5309
  GtkComboBox: GtkComboBoxProps;
5237
5310
  GtkComboBoxText: GtkComboBoxTextProps;
5238
5311
  GtkDialog: GtkDialogProps;
@@ -5267,6 +5340,8 @@ export interface WidgetPropsByGType {
5267
5340
  GtkLinkButton: GtkLinkButtonProps;
5268
5341
  GtkListBox: GtkListBoxProps;
5269
5342
  GtkListBoxRow: GtkListBoxRowProps;
5343
+ GtkListHeader: GtkListHeaderProps;
5344
+ GtkListItem: GtkListItemProps;
5270
5345
  GtkListView: GtkListViewProps;
5271
5346
  GtkLockButton: GtkLockButtonProps;
5272
5347
  GtkMediaControls: GtkMediaControlsProps;
@@ -5320,7 +5395,7 @@ export interface WidgetPropsByGType {
5320
5395
  /**
5321
5396
  * Kebab keys for the widgets Volar's camelize cannot reach from their GType name.
5322
5397
  *
5323
- * 1 of 164. Generated, not curated: any future GType with two adjacent
5398
+ * 1 of 168. Generated, not curated: any future GType with two adjacent
5324
5399
  * capitals lands here by itself instead of becoming a bug report.
5325
5400
  */
5326
5401
  export interface WidgetPropsVueAliases {
@@ -5388,6 +5463,7 @@ export interface WidgetClassByTag {
5388
5463
  'adw-tab-overview': Adw.TabOverview;
5389
5464
  'adw-tab-view': Adw.TabView;
5390
5465
  'adw-toast-overlay': Adw.ToastOverlay;
5466
+ 'adw-toggle': Adw.Toggle;
5391
5467
  'adw-toggle-group': Adw.ToggleGroup;
5392
5468
  'adw-toolbar-view': Adw.ToolbarView;
5393
5469
  'adw-view-stack': Adw.ViewStack;
@@ -5417,6 +5493,7 @@ export interface WidgetClassByTag {
5417
5493
  'gtk-color-chooser-widget': Gtk.ColorChooserWidget;
5418
5494
  'gtk-color-dialog-button': Gtk.ColorDialogButton;
5419
5495
  'gtk-column-view': Gtk.ColumnView;
5496
+ 'gtk-column-view-cell': Gtk.ColumnViewCell;
5420
5497
  'gtk-combo-box': Gtk.ComboBox;
5421
5498
  'gtk-combo-box-text': Gtk.ComboBoxText;
5422
5499
  'gtk-dialog': Gtk.Dialog;
@@ -5451,6 +5528,8 @@ export interface WidgetClassByTag {
5451
5528
  'gtk-link-button': Gtk.LinkButton;
5452
5529
  'gtk-list-box': Gtk.ListBox;
5453
5530
  'gtk-list-box-row': Gtk.ListBoxRow;
5531
+ 'gtk-list-header': Gtk.ListHeader;
5532
+ 'gtk-list-item': Gtk.ListItem;
5454
5533
  'gtk-list-view': Gtk.ListView;
5455
5534
  'gtk-lock-button': Gtk.LockButton;
5456
5535
  'gtk-media-controls': Gtk.MediaControls;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Emit the TYPE surfaces: one interface per GIR declaration, two tag maps.
2
+ * Emit the TYPE surfaces: one interface per GIR declaration, four tag maps.
3
3
  *
4
4
  * WHAT THE DIALECTS FORCED, all of it measured rather than assumed (ADR 0028 § 7,
5
5
  * and the numbers live there):
@@ -162,3 +162,29 @@ export declare function declarations(cls: GirClass, index: Map<string, GirClass>
162
162
  * where an off-by-one is invisible.
163
163
  */
164
164
  export declare function concreteWidgets(namespaces: readonly GirNamespace[], root?: string): GirClass[];
165
+ /**
166
+ * The placement carriers: concrete classes that are NOT widgets and yet hold one.
167
+ *
168
+ * GTK4's list widgets do not take children. A `Gtk.ListView` installs no `append`,
169
+ * `add`, `insert`, `prepend`, `remove` or `set_child` at all — measured against its
170
+ * prototype — because what it takes is a factory, and the factory hands back a
171
+ * carrier whose `child` is where a row's subtree goes. Those carriers are plain
172
+ * `GObject.Object` descendants: `GObject.type_is_a(Gtk.ListItem, Gtk.Widget)` is
173
+ * FALSE, measured on gjs 1.88.1 / GTK 4.22.4.
174
+ *
175
+ * So "every concrete descendant of GtkWidget" is one class short of the set a
176
+ * renderer must be able to name, and this is the other half. It is a RULE and not a
177
+ * list on purpose: a hand-written list is the kind of curated data ADR 0028 § 2
178
+ * reserves for what the GIR cannot express, and the GIR expresses this perfectly
179
+ * well — a carrier is a concrete non-widget that declares both halves of a
180
+ * one-child slot.
181
+ *
182
+ * Measured across Gtk-4.0 + Adw-1, the rule selects exactly four:
183
+ * `GtkListItem`, `GtkListHeader`, `GtkColumnViewCell` and `AdwToggle`. The fourth is
184
+ * the argument for the rule — it was not on the hand-written list that preceded it,
185
+ * has the identical shape, and would have been an arbitrary gap.
186
+ *
187
+ * What this does NOT do is give them a policy. A generated row is always
188
+ * `uncurated`; which method adopts the child stays curated, exactly as for widgets.
189
+ */
190
+ export declare function placementCarriers(namespaces: readonly GirNamespace[]): GirClass[];
@@ -107,7 +107,7 @@ export declare function destroy(node: HostNode): void;
107
107
  * `GObject.registerClass` subclass inherits its ancestor's policy. Guessing a
108
108
  * method name here would be the generic `add` that GTK4 deliberately removed.
109
109
  */
110
- export declare function mountRoot(el: HostElement, container: Gtk.Widget): void;
110
+ export declare function mountRoot(el: HostElement, container: GObject.Object): void;
111
111
  /**
112
112
  * The materialised widget of a host node — for a `ref`, or for a test.
113
113
  *
@@ -149,7 +149,7 @@ export declare const createDetachedContainer: () => HostElement;
149
149
  * through `nearestRegistered`, so an application's own `GObject.registerClass`
150
150
  * subclass inherits its ancestor's placement rules instead of failing.
151
151
  */
152
- export declare function adopt(container: Gtk.Widget): HostElement;
152
+ export declare function adopt(container: GObject.Object): HostElement;
153
153
  export declare const parentNode: (node: HostNode) => HostElement | null;
154
154
  export declare const firstChild: (el: HostElement) => HostNode | null;
155
155
  export declare const nextSibling: (node: HostNode) => HostNode | null;
@@ -5,7 +5,7 @@ export { addressOf, reorderMode } from './policies.js';
5
5
  export { toSignalName, isEventProp } from './signals.js';
6
6
  export { constructOnlyNames, isConstructOnly, isWritable, lookupEnumNick, paramSpecs, toPropertyName, } from './props.js';
7
7
  export { assertInjective, tagOf } from './tags.js';
8
- export { probeEnabled, runHostProbe, runHostProbeApp, type HostProbe, type HostProbeApp, type ProbeCheck, } from './probe.js';
8
+ export { blankReason, checkRendered, probeEnabled, runHostProbe, runHostProbeApp, shotEvidence, type CaptureWidget, type HostProbe, type HostProbeApp, type ProbeCheck, type ShotEvidence, } from './probe.js';
9
9
  export type { ElementChild, ElementChildren, JsxAttributes, RawSignalAttributes, SlotAttribute, VueAttributes, WithOnce, } from './attrs.js';
10
10
  export { clearRegistry, hasWidget, lookupWidget, nearestRegistered, registerWidget, registerWidgets, registeredTags, } from './registry.js';
11
11
  export { ADW_DESCRIPTORS, BUILTIN_DESCRIPTORS, CURATED_DESCRIPTORS, GENERATED_PROVENANCE, GENERATED_WIDGETS, GTK_DESCRIPTORS, mergeGenerated, registerBuiltinWidgets, tableProvenance, } from './descriptors/index.js';
@@ -0,0 +1,112 @@
1
+ import Gtk from 'gi://Gtk?version=4.0';
2
+ /**
3
+ * A row's identity, and the only thing this layer reads off a row.
4
+ *
5
+ * `key` decides whether the model has to be rebuilt at all. Everything else a dialect
6
+ * wants to carry — a render function, a component, a plain record — rides along in the
7
+ * type parameter and is handed straight back to `showRow`.
8
+ */
9
+ export interface ListRowKey {
10
+ readonly key: string;
11
+ }
12
+ /**
13
+ * The dialect's half of a list — three callbacks, one per factory phase that needs one.
14
+ *
15
+ * `Handle` is whatever the dialect needs to keep per ROW WIDGET: a React root, a Solid
16
+ * disposer plus a setter, a Vue app instance. The controller stores it, hands it back,
17
+ * and never looks inside it.
18
+ */
19
+ export interface ListRowSink<Row extends ListRowKey, Handle> {
20
+ /**
21
+ * GTK made a row widget's carrier; put something in it and keep what you need.
22
+ *
23
+ * Called from `setup`, ONCE per row widget, and that is not a convenience: `adopt`'s
24
+ * `foreign` snapshot cannot tell the host's own previous child from application
25
+ * chrome, so taking the carrier a SECOND time reads our own row as someone else's
26
+ * and refuses with `occupied-slot`. `host.spec.ts` pins that refusal.
27
+ *
28
+ * TWO routes reach it, and the nearer one is not the obvious one. GTK reusing a
29
+ * carrier across `bind`/`unbind` is the route people expect, and it needs scrolling
30
+ * or recycling to happen at all. The route that fires FIRST is `setRows` over
31
+ * unchanged keys: it shows every live row again through the same handle, with no
32
+ * GTK involvement, so a dialect that adopts per show meets the refusal on its first
33
+ * content change — measured, and it is what `list.spec.ts`'s in-place vector
34
+ * exercises. Adopt here, keep the element in the handle.
35
+ */
36
+ mountRow(item: Gtk.ListItem): Handle;
37
+ /**
38
+ * Show `row` in the widget behind `handle`, or empty it when `row` is `null`.
39
+ *
40
+ * Called from `bind`, from `unbind` with `null`, and again for every live row when
41
+ * `setRows` sees unchanged keys over changed content — which GTK does not re-bind
42
+ * for us (the splice measurement in the header says why).
43
+ */
44
+ showRow(handle: Handle, row: Row | null, index: number): void;
45
+ /** GTK is done with this row widget, or the controller is. Let go of everything. */
46
+ disposeRow(handle: Handle): void;
47
+ }
48
+ /**
49
+ * WHERE A SINK'S OWN THROW GOES, because there are TWO paths and they differ.
50
+ *
51
+ * `setRows` over unchanged keys calls `showRow` DIRECTLY — no GTK in between — so a
52
+ * throw there propagates out of `setRows` to whoever called it, and a dialect can catch
53
+ * it. Every other call (`setup`, `bind`, `unbind`, `teardown`) runs inside a GObject
54
+ * signal callback, where GJS does not let an exception cross the C frame: it is swallowed
55
+ * and logged as `Gjs-CRITICAL … JS ERROR`, the emission continues, and the controller
56
+ * carries on with a row that never rendered. A diagnostics gate sees that; nothing else
57
+ * does.
58
+ *
59
+ * The asymmetry is not fixable from here — it is GJS's signal boundary — so it is
60
+ * DECLARED instead, and it decides where a sink should put its own error handling. It
61
+ * bites unevenly: React Native's sink only fills a Map on this path and cannot really
62
+ * throw, while Solid's `show()` runs the row's reactive updates synchronously inside
63
+ * `batch()`, so an error in application code lands here.
64
+ *
65
+ * Note what is NOT the answer: `@gjsify/react-native`'s `onRowError` is React's own root
66
+ * error channel, not this seam's. A sink that needs one owns it, because only the
67
+ * dialect knows what a row's error means — a controller-level hook would have to decide
68
+ * whether to keep binding, and neither answer is right for every renderer.
69
+ */
70
+ /**
71
+ * A `Gtk.ListView`'s model, factory and per-row handles.
72
+ *
73
+ * Constructed by a dialect with its `ListRowSink`, attached to a view someone else
74
+ * created, disposed from that someone's own cleanup. Nothing here is reactive:
75
+ * `setRows` is called with the current rows and works out whether GTK has to hear
76
+ * about it.
77
+ */
78
+ export declare class ListController<Row extends ListRowKey, Handle> {
79
+ #private;
80
+ constructor(sink: ListRowSink<Row, Handle>);
81
+ /**
82
+ * Give the view its model and factory.
83
+ *
84
+ * `Gtk.NoSelection` and not the store directly: `Gtk.ListView:model` is a
85
+ * `Gtk.SelectionModel`, and a plain `Gio.ListModel` is not one. `NoSelection` is the
86
+ * wrapper that says "no selection", and it is what this controller installs because
87
+ * a `Gtk.SingleSelection` would give rows a selected state nothing here would ever
88
+ * clear. Selection is a dialect-level feature nobody has asked for yet; adding it
89
+ * means widening `attach`, not reaching around it.
90
+ */
91
+ attach(view: Gtk.ListView): void;
92
+ /**
93
+ * The rows GTK should be showing.
94
+ *
95
+ * The model is only touched when the KEYS changed. When they did not, every row's
96
+ * subtree is shown again instead — a row whose key is the same but whose data
97
+ * changed has to repaint, and the splice measurement says GTK will not re-bind it
98
+ * for us. That is strictly cheaper than a splice, which tears down every row.
99
+ */
100
+ setRows(rows: readonly Row[]): void;
101
+ /** How many rows GTK is currently holding a widget for. A spec seam and a leak detector. */
102
+ get liveRows(): number;
103
+ /**
104
+ * Release every row, disconnect every handler, and let go of the view.
105
+ *
106
+ * Called from the owner's cleanup, which runs while JS callbacks still work —
107
+ * unlike GTK's own `teardown`, which fires during GC sweeping when the view is
108
+ * collected and is BLOCKED there (measured, see the header). Idempotent, because an
109
+ * owner's cleanup and an explicit dispose both reach it.
110
+ */
111
+ dispose(): void;
112
+ }
@@ -0,0 +1,2 @@
1
+ export { ListController, type ListRowKey, type ListRowSink } from './controller.js';
2
+ export { onScrollNearEnd } from './scroll.js';
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,26 @@
1
+ import type Gtk from '@girs/gtk-4.0';
2
+ /**
3
+ * Call `listener` when the scroller gets within `threshold` page-lengths of the end.
4
+ *
5
+ * `Gtk.Adjustment`, because that is where GTK keeps a scroll position: the scrolled
6
+ * window has no scroll signal of its own, and `notify::value` on the adjustment behind
7
+ * `hadjustment`/`vadjustment` is the only place the position is observable. MEASURED: a
8
+ * `Gtk.ScrolledWindow` hands out its adjustments with no window anywhere, and
9
+ * `set_value` on one raised `notify::value` — so this is drivable, and asserted, in a
10
+ * spec that presents nothing.
11
+ *
12
+ * `upper` and `page-size` are subscribed too, and not for completeness: `upper` grows
13
+ * when rows are added, which is the event that ARMS the next call — a list that grew has
14
+ * a new end.
15
+ *
16
+ * A list with nothing to scroll (`upper <= page-size`) never fires. That is the state
17
+ * every list is in before it has been allocated, and firing there would call the
18
+ * listener on mount for every list in the application.
19
+ *
20
+ * ONCE PER ARRIVAL, and this is the one policy here that came from a framework: it is
21
+ * React Native's `onEndReached` semantics. It is the core's behaviour anyway because
22
+ * every "load more" caller wants it — firing on every frame while the user rests at the
23
+ * bottom would issue a page request per frame. A dialect that wants the raw stream has
24
+ * the adjustment and can subscribe to it directly; this function is the debounced edge.
25
+ */
26
+ export declare function onScrollNearEnd(scroller: Gtk.ScrolledWindow, axis: 'horizontal' | 'vertical', threshold: number, listener: (distanceFromEnd: number) => void): () => void;
@@ -52,6 +52,17 @@ export declare const makeDetachedContainer: () => Gtk.Widget;
52
52
  */
53
53
  export declare function unhandledPolicy(policy: never): never;
54
54
  export declare function setterSlotOf(parent: HostElement, child: HostElement): string | null;
55
+ /**
56
+ * The slots this policy fills with an ADDER, by slot name.
57
+ *
58
+ * `set_`-prefixed or not is the whole distinction, and TWO decisions turn on it,
59
+ * which is why the predicate is here once rather than spelled out at each. A
60
+ * setter-backed slot is emptied by writing `null` back through itself, so
61
+ * `policyProblems()` lets such a policy name no `remove`; and it holds one child,
62
+ * so `rotateTail` returns before touching it — a policy with no adder slot at all
63
+ * has no order to pay for, which is what `reorderMode()` reports.
64
+ */
65
+ export declare function adderSlots(policy: ChildPolicy): string[];
55
66
  /** Every one-child slot this policy has, by setter name — `single` has exactly one. */
56
67
  export declare function setterSlots(policy: ChildPolicy): string[];
57
68
  /**
@@ -1,4 +1,5 @@
1
1
  import Adw from 'gi://Adw?version=1';
2
+ import Gtk from 'gi://Gtk?version=4.0';
2
3
  /** Record one assertion. A `false` is a finding; nothing else is. */
3
4
  export type ProbeCheck = (what: string, ok: boolean) => void;
4
5
  /** What a showcase gives the harness. */
@@ -85,3 +86,51 @@ export declare function runHostProbe<T>(probe: HostProbe<T>): Promise<number>;
85
86
  * and hangs a view load on its spinner (the class `@gjsify/adwaita-app` documents).
86
87
  */
87
88
  export declare function runHostProbeApp<T>(probe: HostProbeApp<T>): Promise<void>;
89
+ /**
90
+ * Rasterise one widget. `@gjsify/devtools`' `captureWidgetPng` has this shape;
91
+ * `null` means the widget has no renderer or no size yet, never "the image is empty".
92
+ */
93
+ export type CaptureWidget = (widget: Gtk.Widget) => Uint8Array | null;
94
+ /** What a picture of a subtree is worth, in numbers a `check` can read. */
95
+ export interface ShotEvidence {
96
+ /**
97
+ * STRICT descendants of the container in the REAL GTK tree.
98
+ *
99
+ * The decisive number, and the cheapest. `0` is not "a small tree": it is a
100
+ * container nothing was rendered into, which is what a refused render, an
101
+ * unmounted root and a component that returned `null` all look like from here.
102
+ */
103
+ widgets: number;
104
+ width: number;
105
+ height: number;
106
+ /** PNG byte count, `0` when `capture` produced none. */
107
+ bytes: number;
108
+ }
109
+ /**
110
+ * Count what a shot of `container` would be a picture OF.
111
+ *
112
+ * Reads the real GTK tree (`get_first_child`/`get_next_sibling`) rather than any
113
+ * host bookkeeping — the shadow tree would agree with itself here, which is the
114
+ * whole reason `conformance/` exists.
115
+ */
116
+ export declare function shotEvidence(container: Gtk.Widget, capture: CaptureWidget): ShotEvidence;
117
+ /**
118
+ * Why a shot of this evidence would be blank — or `null` when it would not.
119
+ *
120
+ * Ordered by what a reader can act on. "Nothing was rendered" and "the renderer had
121
+ * no surface yet" are different bugs with the same photograph, and a message that
122
+ * cannot tell them apart sends the reader back to guessing — the state
123
+ * `describeLogRecord` exists to end one layer down.
124
+ *
125
+ * A NON-EMPTY PNG IS NOT PROOF, which is why byte count is the LAST question rather
126
+ * than the only one: a window with a refused tree still rasterises to several KB of
127
+ * perfectly valid background.
128
+ */
129
+ export declare function blankReason(evidence: ShotEvidence): string | null;
130
+ /**
131
+ * Record "this actually rendered" as a probe check, named.
132
+ *
133
+ * Takes the evidence rather than the widget so a caller that already shot it does
134
+ * not rasterise twice, and so the reason lands in the failure list verbatim.
135
+ */
136
+ export declare function checkRendered(check: ProbeCheck, what: string, evidence: ShotEvidence): void;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -18,9 +18,11 @@ export declare function parseEventProp(prop: string, aliases?: Readonly<Record<s
18
18
  export declare const toSignalName: (prop: string, aliases?: Readonly<Record<string, string>>) => string;
19
19
  /** An event prop is `on:` + a raw signal name, or `on` + an uppercase letter. */
20
20
  export declare function isEventProp(prop: string): boolean;
21
- export declare const beginHostWrite: () => void;
21
+ export declare const beginHostWrite: (target?: object | null) => void;
22
22
  export declare const endHostWrite: () => void;
23
23
  export declare const inHostWrite: () => boolean;
24
+ /** Is this object one whose property the host is writing at this instant? */
25
+ export declare const isHostWriteTarget: (o: object) => boolean;
24
26
  export declare function setHandler(el: HostElement, prop: string, next: ((...args: unknown[]) => unknown) | null): void;
25
27
  /** Disconnect every handler on a node. The only place a handler dies. */
26
28
  export declare function clearHandlers(el: HostElement): void;
@@ -117,12 +117,29 @@ export type ChildPolicy = {
117
117
  remove: string;
118
118
  wrap: 'list-box-row' | 'flow-box-child' | null;
119
119
  }
120
- /** `Adw.HeaderBar`, `Adw.ToolbarView`, `Adw.ActionRow`: named attachment points. */
120
+ /**
121
+ * `Adw.HeaderBar`, `Adw.ToolbarView`, `Adw.ActionRow`: named attachment points.
122
+ *
123
+ * `remove` is OPTIONAL because a slot can be backed two ways and only one of them
124
+ * needs it. A `set_`-prefixed slot is emptied by writing `null` back through the
125
+ * same setter (`detachChild` already does exactly that, via `setterSlotOf`), so a
126
+ * policy whose slots are ALL setters never reaches a remove method — and
127
+ * `Adw.NavigationSplitView` / `Adw.OverlaySplitView` have none to name: measured on
128
+ * libadwaita 1.9.3, their only `remove*` methods are `GtkWidget`'s
129
+ * (`remove_controller`, `remove_css_class`, …). Declaring `remove: 'remove'` there
130
+ * would be a claim `descriptorProblems()` correctly rejects.
131
+ *
132
+ * An ADDER-backed slot (`add_top_bar`, `pack_start`) is the opposite: nothing takes
133
+ * a child back out of it but a remove method, so `remove` is REQUIRED the moment one
134
+ * slot does not start with `set_`. That rule is machine-checked in `policyProblems()`
135
+ * rather than left to this comment — optional in the type and unchecked would turn
136
+ * `Adw.ToolbarView` losing its `remove` into a `TypeError` deep inside an unmount.
137
+ */
121
138
  | {
122
139
  kind: 'slotted';
123
140
  slots: Record<string, string>;
124
141
  defaultSlot: string;
125
- remove: string;
142
+ remove?: string;
126
143
  }
127
144
  /**
128
145
  * `Gtk.Stack`, `Adw.NavigationView`: children addressed by name/tag.
@@ -150,14 +167,14 @@ export type ChildPolicy = {
150
167
  * Generated, not curated: the tag exists, its placement rule does not.
151
168
  *
152
169
  * The generated table adds every concrete GtkWidget descendant the GIR
153
- * describes — 164 of them — while the curated table measures placement for a
170
+ * describes, plus the placement carriers, while the curated table measures placement for a
154
171
  * fraction. Guessing an adder for the rest would be the worst of the three
155
172
  * options: `add` and `append` and `set_child` all exist somewhere in GTK, and
156
173
  * calling the wrong one is a warning at exit 0.
157
174
  *
158
175
  * So the honest state is spelled out. Such a widget can be CREATED and given
159
176
  * properties and handlers; inserting a child raises a named error that says
160
- * which tag needs a curated policy. A leaf widget — most of the 164 — needs
177
+ * which tag needs a curated policy. A leaf widget — most of the table — needs
161
178
  * nothing more.
162
179
  */
163
180
  | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/gtk-host",
3
- "version": "0.44.0",
3
+ "version": "0.45.0",
4
4
  "description": "Framework-agnostic GTK4/Adwaita host: the element model UI-framework renderers bind to",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -14,6 +14,10 @@
14
14
  "types": "./lib/types/style/index.d.ts",
15
15
  "default": "./lib/esm/style/index.js"
16
16
  },
17
+ "./list": {
18
+ "types": "./lib/types/list/index.d.ts",
19
+ "default": "./lib/esm/list/index.js"
20
+ },
17
21
  "./vue": {
18
22
  "types": "./lib/types/adapters/vue.d.ts",
19
23
  "default": "./lib/esm/adapters/vue.js"
@@ -112,13 +116,13 @@
112
116
  }
113
117
  },
114
118
  "devDependencies": {
115
- "@gjsify/cli": "^0.44.0",
119
+ "@gjsify/cli": "^0.45.0",
116
120
  "@vue/runtime-core": "^3.5.0",
117
121
  "solid-js": "^1.9.0",
118
- "@gjsify/unit": "^0.44.0",
122
+ "@gjsify/unit": "^0.45.0",
119
123
  "@types/node": "^25.9.2",
120
124
  "typescript": "^6.0.3",
121
- "@gjsify/domparser": "^0.44.0",
125
+ "@gjsify/domparser": "^0.45.0",
122
126
  "@gjsify/node-gi": "file:../../node-gi/node-gi",
123
127
  "vue": "^3.5.41",
124
128
  "vue-tsc": "^3.3.11",
@@ -134,7 +138,10 @@
134
138
  "browser": "none",
135
139
  "nativescript": "none"
136
140
  },
137
- "tier": 3
141
+ "tier": 3,
142
+ "widgetVocabulary": {
143
+ "role": "reference"
144
+ }
138
145
  },
139
146
  "license": "MIT",
140
147
  "repository": {