@gjsify/example-gtk-adwaita-storybook 0.57.0 → 0.58.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/dist/gjs.js CHANGED
@@ -78,7 +78,7 @@ if(globalThis.__gjsifyBundleUrl??=import.meta.url,Symbol.dispose||(Symbol.dispos
78
78
  </method>${e.length>0?`\n${e.join(`
79
79
  `)}`:``}
80
80
  </interface>
81
- </node>`}function isWin32(){return e.DIR_SEPARATOR===92}function defaultListenAddress(){return isWin32()?`nonce-tcp:host=127.0.0.1`:`unix:tmpdir=${e.get_tmp_dir()}`}var DevtoolsPeerServerError=class extends Error{constructor(e,t,n,r){super(e),this.address=t,this.reason=n,this.name=`DevtoolsPeerServerError`,this.cause=r}};function isAddressInUse(t){return t instanceof e.Error&&t.matches(r.io_error_quark(),r.IOErrorEnum.ADDRESS_IN_USE)}function unixSocketPath(e){if(!e.startsWith(`unix:`))return null;for(let t of e.slice(5).split(`,`)){let e=t.indexOf(`=`);if(!(e<0||t.slice(0,e)!==`path`))try{return decodeURIComponent(t.slice(e+1))}catch{return null}}return null}function inspectExistingSocket(e){try{if((r.File.new_for_path(e).query_info(`unix::mode`,r.FileQueryInfoFlags.NONE,null).get_attribute_uint32(`unix::mode`)&61440)!=49152)return`not-a-socket`}catch{return`not-a-socket`}let t=new r.SocketClient;t.set_timeout(2);let n;try{n=t.connect(r.UnixSocketAddress.new(e),null)}catch{return`dead`}return n.close(null),`live`}function clearReclaimableSocket(t){let n=unixSocketPath(t);if(!n||!e.file_test(n,e.FileTest.EXISTS))return;let i=inspectExistingSocket(n);if(i===`live`)throw new DevtoolsPeerServerError(`cannot listen on ${t}: another process is already listening there. Stop it, or point ${q} (or options.address) at a different socket — GJSIFY_DEVTOOLS_INSTANCE=<label> lets two devtools-enabled apps run side by side.`,t,`address-in-use`);if(i===`not-a-socket`)throw new DevtoolsPeerServerError(`cannot listen on ${t}: ${n} already exists and is not a socket, so it will NOT be removed. Point ${q} (or options.address) at a free path.`,t,`occupied-by-other-file`);try{r.File.new_for_path(n).delete(null)}catch(e){throw new DevtoolsPeerServerError(`cannot listen on ${t}: ${n} is a socket nothing listens on, but removing it failed (${e}). Delete it by hand, or point ${q} at a free path.`,t,`address-in-use`,e)}v.log(`[gjsify-devtools] reclaimed the stale socket ${n}: nothing was listening on it (an abnormal exit — Ctrl-C, SIGKILL, a crash — leaves the inode behind).`)}function flagsForAddress(e){return e.startsWith(`tcp:`)||e.startsWith(`nonce-tcp:`)?r.DBusServerFlags.NONE:r.DBusServerFlags.AUTHENTICATION_REQUIRE_SAME_USER}function startDevtoolsPeerServer(e,t,n){let i=n&&n!==``?n:defaultListenAddress();clearReclaimableSocket(i);let o;try{o=r.DBusServer.new_sync(i,flagsForAddress(i),r.dbus_generate_guid(),null,null)}catch(e){let t=isAddressInUse(e);throw new DevtoolsPeerServerError(t?`cannot listen on ${i}: the address is already in use (${e}). Stop whatever holds it, or point ${q} (or options.address) at a different address.`:`cannot listen on ${i}: ${e}. Check the address form — \`unix:path=/tmp/app.sock\`, \`unix:tmpdir=/tmp\` or \`nonce-tcp:host=127.0.0.1\`.`,i,t?`address-in-use`:`listen-failed`,e)}let s=new Set;o.connect(`new-connection`,(n,r)=>(s.add(r),r.connect(`closed`,()=>{e.unexport(r),s.delete(r)}),e.export(r,t),!0)),o.start();let c=!1;return{address:o.get_client_address(),objectPath:t,get connectionCount(){return s.size},stop(){if(!c){c=!0,o.stop();for(let t of s)e.unexport(t),!t.is_closed()&&t.close(null,(e,t)=>{try{e.close_finish(t)}catch{}});s.clear()}}}}function writeDevtoolsAddressFile(t,n){try{if(e.mkdir_with_parents(e.path_get_dirname(t),448),!e.file_set_contents(t,`${n}\n`))return null}catch(e){return v.error(`[gjsify-devtools] could not publish the peer address to ${t}: ${e}`),null}try{r.File.new_for_path(t).set_attribute_uint32(`unix::mode`,384,r.FileQueryInfoFlags.NONE,null)}catch(e){v.error(`[gjsify-devtools] could not restrict ${t} to the current user: ${e}`)}return t}function removeDevtoolsAddressFile(e){try{r.File.new_for_path(e).delete(null)}catch{}}function captureWidget(e){let t=e.get_native()?.get_renderer();if(!t)return{png:null,blocker:`no-renderer`};let r=e.get_width(),o=e.get_height();if(r<=0||o<=0)return{png:null,blocker:`zero-size`};let s=n.WidgetPaintable.new(e),c=n.Snapshot.new();s.snapshot(c,r,o);let l=c.to_node();if(!l)return{png:null,blocker:`empty-snapshot`};let u=new i.Rect;u.init(0,0,r,o);let d=t.render_texture(l,u).save_to_png_bytes().get_data();return d?{png:new Uint8Array(d)}:{png:null,blocker:`empty-png`}}function captureWidgetPng(e){return captureWidget(e).png}function dumpGSettings(e){let t=r.SettingsSchemaSource.get_default()?.lookup(e,!0);if(!t)throw Error(formatDbusErrorMessage(`not-found`,`GSettings schema '${e}' is not installed`));let n=new r.Settings({settings_schema:t}),i={};for(let e of t.list_keys())i[e]=n.get_value(e).recursiveUnpack();return i}function parseWidgetPath(e){let t=e.split(`/`).filter(e=>e.length>0);if(t.length===0)return null;let n=t[0].match(/^toplevel:(\d+)$/);if(!n)return null;let r=[];for(let e of t.slice(1)){let t=e.match(/^child:(\d+)$/);if(!t)return null;r.push(Number(t[1]))}return{toplevel:Number(n[1]),children:r}}function buildWidgetPath(e,t){return[`toplevel:${e}`,...t.map(e=>`child:${e}`)].join(`/`)}function widgetType(e){return gtypeName(e)??`GtkWidget`}function gtypeName(e){let t=e;return typeof t?.$typeName==`string`&&t.$typeName.length>0?t.$typeName:t?.constructor?.$gtype?.name??null}function widgetIsA(e,t){let n=gtypeName(e);if(n===null||!t)return!1;if(n===t)return!0;let r=o.type_from_name(n),i=o.type_from_name(t);return!r||!i?!1:o.type_is_a(r,i)}function activateWidget(e){let t=e,n=typeof t.get_parent==`function`?t.get_parent():null,r=!!n&&widgetIsA(n,`GtkListBox`);if(!(r&&widgetIsA(e,`GtkListBoxRow`))&&typeof t.activate==`function`&&t.activate()===!0)return!0;if(r){let t=n,r=!1;return typeof t.select_row==`function`&&(t.select_row(e),r=!0),typeof t.emit==`function`&&(t.emit(`row-activated`,e),r=!0),r}return!1}function sendKeyToWidget(e,t,n){let r=e.observe_controllers(),i=!1;for(let e=0;e<r.get_n_items();e++){let o=r.get_item(e);widgetIsA(o,`GtkEventControllerKey`)&&(o.emit(`key-pressed`,t,0,n),i=!0)}return i}function nthChild(e,t){let n=e.get_first_child(),r=0;for(;n&&r<t;)n=n.get_next_sibling(),r++;return r===t?n:null}function listToplevels(){let e=n.Window.get_toplevels(),t=e.get_n_items(),r=[];for(let n=0;n<t;n++){let t=e.get_item(n);t&&r.push({path:`toplevel:${n}`,type:widgetType(t),title:t.get_title?.()??null,mapped:t.get_mapped(),focused:t.is_active??!1})}return r}function resolveWidgetPath(e){let t=parseWidgetPath(e);if(!t)return null;let r=n.Window.get_toplevels().get_item(t.toplevel);if(!r)return null;for(let e of t.children)if(r=nthChild(r,e),!r)return null;return r}function parseWidgetSelector(e){let t=e.indexOf(`:`),n=(t<0?e:e.slice(0,t)).trim(),r=(t<0?``:e.slice(t+1)).trim();return!n&&!r?null:{type:n,cssClass:r}}function findWidgetPath(e,t,n){let r={path:null};return walkForSelector(e,t,n,r)??r.path}function walkForSelector(e,t,n,r){if(!e.get_visible()||!e.get_mapped())return null;if(!t.cssClass||e.get_css_classes().includes(t.cssClass)){if(!t.type||widgetType(e)===t.type)return n;r.path===null&&widgetIsA(e,t.type)&&(r.path=n)}let i=e.get_first_child(),o=0;for(;i;){let e=walkForSelector(i,t,`${n}/child:${o}`,r);if(e)return e;i=i.get_next_sibling(),o++}return null}function geometryOf(e){if(!e.get_mapped())return;let t=e.get_allocation(),r=t.width+e.get_margin_start()+e.get_margin_end(),i=t.height+e.get_margin_top()+e.get_margin_bottom(),[o,s]=e.measure(n.Orientation.HORIZONTAL,-1),c=r>0?Math.max(r,o):-1,[l,u]=e.measure(n.Orientation.VERTICAL,c),d={width:r,height:i,widthRequest:[o,s],heightRequest:[l,u]};return(r<o||i<l)&&(d.short=!0),d}function dumpTree(e,t,n){let r={path:n,type:widgetType(e),name:e.get_name()||null,cssClasses:e.get_css_classes(),mapped:e.get_mapped(),visible:e.get_visible(),children:[]},i=geometryOf(e);if(i!==void 0&&(r.geometry=i),t<=0)return e.get_first_child()&&(r.truncated=!0),r;let o=e.get_first_child(),s=0;for(;o;)r.children.push(dumpTree(o,t-1,`${n}/child:${s}`)),o=o.get_next_sibling(),s++;return r}function jsonSafe(e){let t=typeof e;return e==null||t===`string`||t===`number`||t===`boolean`?e??null:`[${t}]`}function getWidgetProperty(e,t){let n=e,r=t.replace(/-/g,`_`),i=t.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase());for(let e of[t,r,i])if(e in n)return jsonSafe(n[e])}function childIndex(e,t){let n=e.get_first_child(),r=0;for(;n;){if(n===t)return r;n=n.get_next_sibling(),r++}return-1}function pathOfWidget(e){let t=[],r=e,i=r.get_parent();for(;i;){let e=childIndex(i,r);if(e<0)return null;t.unshift(e),r=i,i=r.get_parent()}let o=n.Window.get_toplevels(),s=o.get_n_items();for(let e=0;e<s;e++)if(o.get_item(e)===r)return buildWidgetPath(e,t);return null}function isActiveWindowScope(e){return!e||e===`window`||e===`active`}function frameDelay(t){return new Promise(n=>{e.timeout_add(e.PRIORITY_DEFAULT,t,()=>(n(),e.SOURCE_REMOVE))})}async function captureWidgetWhenRenderable(e,t=12,n=50){let r=null;for(let i=0;i<t;i++){let t=captureWidget(e);if(t.png)return{png:t.png,blocker:null};r=t.blocker,await frameDelay(n)}let i=captureWidget(e);return{png:i.png,blocker:i.png?null:i.blocker??r}}var DevtoolsService=class{constructor(e,t){this._app=e,this._options=t,this._exported=new Map,this._peer=null,this._addressFile=null,this._kinds=new Map,this._extensions=t.extend??[];for(let[e,t]of Object.entries(Et))this._kinds.set(e,t);for(let e of this._extensions){for(let[t,n]of Object.entries(e.methodKinds))this._kinds.set(t,n);for(let[t,n]of Object.entries(e.handlers)){let e=n;this[t]=(...n)=>(this._guard(t),e(...n))}}}export(e,t){if(this._exported.has(e))return;let n=buildDevtoolsIfaceXml(this._extensions.flatMap(e=>e.methodsXml??[])),i=r.DBusExportedObject.wrapJSObject(n,this);i.export(e,t),this._exported.set(e,i)}unexport(e){if(e){this._exported.get(e)?.unexport(),this._exported.delete(e);return}for(let e of this._exported.values())e.unexport();this._exported.clear(),this._peer?.stop(),this._peer=null,this._addressFile&&=(removeDevtoolsAddressFile(this._addressFile),null)}attachPeerServer(e,t){this._peer=e,this._addressFile=t??null}get peerAddress(){return this._peer?.address??null}get addressFile(){return this._addressFile}GetStatus(){let e=this._app.get_active_window(),t={appId:this._app.get_application_id()??`unknown`,instance:this._options.instance??`default`,activeWindow:e?{id:e.get_name()||`window`,title:e.get_title()??``,mapped:e.get_mapped()}:null,toplevelCount:n.Window.get_toplevels().get_n_items(),focusedWidget:null,paused:this._isPaused()};for(let e of this._extensions){let n=e.contributeStatus?.();n&&Object.assign(t,n)}return JSON.stringify(t)}async ScreenshotAsync(t,n){try{let r=typeof t?.[0]==`string`?t[0]:``,i=await this._captureScopePng(r);n.return_value(new e.Variant(`(ay)`,[i]))}catch(e){n.return_dbus_error(`org.gjsify.Devtools.Error.Screenshot`,e instanceof Error?e.message:String(e))}}async _captureScopePng(e){let t=this._resolveRootWidget(e);if(!t){if(isActiveWindowScope(e))return new Uint8Array;throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${e}'`))}let r=captureWidget(t.widget);if(r.png)return r.png;let i=t.widget.get_root();i instanceof n.Window&&i.present();let o=await captureWidgetWhenRenderable(t.widget);return o.png?o.png:(v.warn(`[devtools] Screenshot('${e}') has no image: ${o.blocker??`unknown`} after 12 tries. Empty bytes follow.`),new Uint8Array)}ListActions(){let e={app:describeActions(this._actionGroup(`app`)),win:describeActions(this._actionGroup(`win`))};return JSON.stringify(e)}ActivateAction(e,t,n){this._guard(`ActivateAction`);let r=this._scope(e);activateAction(this._requireGroup(r,t),t,this._parseValue(n))}ChangeActionState(e,t,n){this._guard(`ChangeActionState`);let r=this._scope(e);changeActionState(this._requireGroup(r,t),t,this._parseValue(n))}PresentWindow(){this._app.get_active_window()?.present()}ResizeWindow(e,t){this._guard(`ResizeWindow`);let n=this._app.get_active_window();if(!n)throw Error(formatDbusErrorMessage(`unavailable`,`no active window to resize`));let r=Math.max(1,Math.round(e)),i=Math.max(1,Math.round(t));return n.is_maximized()&&n.unmaximize(),n.is_fullscreen()&&n.unfullscreen(),n.set_default_size(r,i),[r,i]}ListToplevels(){return JSON.stringify(listToplevels())}DumpTree(e,t){let n=this._resolveRootWidget(e);if(!n)throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${e||`active window`}'`));return JSON.stringify(dumpTree(n.widget,t>0?t:40,n.path))}GetProperty(e,t){let n=this._resolveRootWidget(e);if(!n)throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${e}'`));let r=getWidgetProperty(n.widget,t);if(r===void 0)throw Error(formatDbusErrorMessage(`not-found`,`widget has no property '${t}'`));return JSON.stringify(r)}GetFocused(){let e=this._app.get_active_window(),t=e?e.get_focus():null;return JSON.stringify(t?{path:pathOfWidget(t),name:t.get_name()||null,type:widgetType(t)}:null)}ActivateWidget(e){this._guard(`ActivateWidget`);let t=this._resolveRootWidget(e);if(!t)throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${e}'`));return activateWidget(t.widget)}FindWidget(e){let t=parseWidgetSelector(e);if(!t)throw Error(formatDbusErrorMessage(`invalid-params`,`empty selector '${e}'`));let n=this._resolveRootWidget(``);return n?findWidgetPath(n.widget,t,n.path)??``:``}SendKey(e,t){this._guard(`SendKey`);let[r,i,o]=n.accelerator_parse(e);if(!r)throw Error(formatDbusErrorMessage(`invalid-params`,`cannot parse accelerator '${e}'`));let s;if(s=t?this._resolveRootWidget(t)?.widget??null:this._app.get_active_window()?.get_focus()??null,!s)throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${t||`focus`}'`));return sendKeyToWidget(s,i,o??0)}DumpGSettings(e){return JSON.stringify(dumpGSettings(e))}DumpCss(){return JSON.stringify(dumpCss())}SwapCss(e,t){return this._guard(`SwapCss`),swapCss(e,t)}_resolveRootWidget(e){if(isActiveWindowScope(e)){let e=this._app.get_active_window();return e?{widget:e,path:pathOfWidget(e)??`toplevel:0`}:null}let t=resolveWidgetPath(e);return t?{widget:t,path:e}:null}_isPaused(){return this._options.paused?.()??!1}_guard(e){let t=this._kinds.get(e);if(!t)throw Error(formatDbusErrorMessage(`internal`,`unclassified devtools method '${e}'`));if(t===`mutating`&&this._isPaused())throw Error(formatDbusErrorMessage(`paused`,`${e} rejected — external control is paused. Read-only methods keep working.`))}_scope(e){return e===`app`?`app`:`win`}_actionGroup(e){if(e===`app`)return this._app;if(this._options.winActionGroup)return this._options.winActionGroup;let t=this._app.get_active_window();return t instanceof n.ApplicationWindow?t:null}_requireGroup(e,t){let n=this._actionGroup(e);if(!n)throw Error(formatDbusErrorMessage(`unavailable`,`no '${e}' action group`));if(!n.has_action(t))throw Error(formatDbusErrorMessage(`not-found`,`unknown action ${e}.${t}`));return n}_parseValue(e){if(!e||e===`null`)return null;try{return JSON.parse(e)}catch{throw Error(formatDbusErrorMessage(`invalid-params`,`value_json is not valid JSON: ${e}`))}}};const Dt=`DBUS_SESSION_BUS_ADDRESS`,Ot=new Set;function envEnabled(){return isDevtoolsEnabledValue(e.getenv(`GJSIFY_DEVTOOLS`))}function envValue(t){let n=e.getenv(t);return n&&n!==``?n:null}function sessionBusUsable(){if(!envValue(Dt))return!1;try{return r.bus_get_sync(r.BusType.SESSION,null),!0}catch{return!1}}function chooseDevtoolsTransport(e){return e.requestedAddress?{kind:`peer`,address:e.requestedAddress,reason:`requested`}:e.hasAppConnection?{kind:`session-bus`}:e.sessionBusUsable?{kind:`unregistered`}:{kind:`peer`,address:null,reason:`no-session-bus`}}function describeMissingConnection(e,t){return e?t?`[gjsify-devtools] the session bus answers but this application is not registered on it yet — call installDevtools() from the GtkApplication "startup" handler (the bus connection and object path exist only after registration).`:`[gjsify-devtools] ${Dt} is set (${e}) but no bus answers there — using the bus-less peer transport instead. On macOS this is the usual state: Homebrew's dbus listens on launchd, so the advertised address only works while that socket is live.`:`[gjsify-devtools] this machine has no session bus (${Dt} is unset) — using the bus-less peer transport instead. Point the bridge at the address below, or set ${q} on both the app and \`gjsify debug\` to pin it yourself.`}function installDevtools(e,t={}){if(!(t.enabled??envEnabled()))return null;let n=t.instance??envValue(`GJSIFY_DEVTOOLS_INSTANCE`)??void 0,r=new DevtoolsService(e,{...t,instance:n});try{return exportDevtools(e,r,t,n)}catch(e){return r.unexport(),v.error(`[gjsify-devtools] devtools stayed OFF, the app is unaffected — ${describeInstallFailure(e)}`),null}}function describeInstallFailure(e){return e instanceof DevtoolsPeerServerError||e instanceof Error?e.message:String(e)}function exportDevtools(t,n,r,i){let o=t.get_is_registered(),s=o?t.get_dbus_connection():null,c=o?t.get_dbus_object_path():null,l=envValue(Dt),u=!!(s&&c),d=u||sessionBusUsable(),f=chooseDevtoolsTransport({requestedAddress:r.address??envValue(q),hasAppConnection:u,sessionBusUsable:d}),p=t.get_application_id()??`unknown`,m=`${c??appIdToObjectPath(p)}/devtools`;if((f.kind===`unregistered`||f.kind===`peer`&&f.reason===`no-session-bus`)&&v.error(describeMissingConnection(l,d)),f.kind===`session-bus`&&s)n.export(s,m),v.log(`[gjsify-devtools] exported ${Tt} at ${m} (dest ${p})`);else if(f.kind===`peer`){let r=startDevtoolsPeerServer(n,m,f.address??void 0),o=writeDevtoolsAddressFile(devtoolsAddressFilePath(e.get_user_runtime_dir(),p,i),r.address);n.attachPeerServer(r,o),v.log(`[gjsify-devtools] exported ${Tt} at ${m} (peer address ${r.address}${o?`, published to ${o}`:``})`),o&&t.connect(`shutdown`,()=>removeDevtoolsAddressFile(o))}return Ot.add(n),n}const kt=`&(?![a-zA-Z][a-zA-Z0-9]*;|#\\d+;|#x[0-9a-fA-F]+;)|<(?![a-zA-Z/!?])`;RegExp(kt),RegExp(kt,`g`);const At=[`AdwNavigationSplitView`,`GtkListBox`,`AdwOverlaySplitView`];function probeEnabled(){let t=e.getenv(`GJSIFY_STORYBOOK_PROBE`);if(t==null)return!1;let n=t.toLowerCase();return n!==``&&n!==`0`&&n!==`false`}const jt=5e3;function exitIfNotDrained(){if(typeof process>`u`||typeof process.exit!=`function`)return;let e=setTimeout(()=>{v.error(`STORYBOOK PROBE: host still alive ${jt}ms after quit(), exiting`),process.exit(process.exitCode??0)},jt);typeof e==`object`&&typeof e.unref==`function`&&e.unref()}function collectTypes(e,t){t.add(e.type);for(let n of e.children)collectTypes(n,t)}function installStorybookProbe(t,n,r={}){let i=r.requireChrome??At,o=r.out??e.getenv(`GJSIFY_STORYBOOK_PROBE_OUT`)??void 0,s=r.timeoutMs??8e3,c=r.storyWidget??e.getenv(`GJSIFY_STORYBOOK_PROBE_STORY_WIDGET`)??void 0,l=n.controller.listStories(),u=[...new Set(l.map(e=>e.category))],d=r.story??e.getenv(`GJSIFY_STORYBOOK_PROBE_STORY`)??l[0]?.title,f=d?n.openStoryByTitle(d):!1,p=n.activeStory,m=new Set;collectTypes(dumpTree(n,60,`toplevel:0`),m);let h=i.filter(e=>!m.has(e)),g=new Set;p&&collectTypes(dumpTree(p,60,`story`),g);let _=g.size,y=c?g.has(c):null,finish=n=>{let r=JSON.stringify(n);if(n.ok)v.log(`STORYBOOK PROBE: PASS ${r}`);else{v.error(`STORYBOOK PROBE: FAIL ${r}`);try{typeof process<`u`&&(process.exitCode=1)}catch{}}if(o)try{e.file_set_contents(o,JSON.stringify(n,null,2))}catch{}t.quit(),exitIfNotDrained()},ee=0;e.timeout_add(e.PRIORITY_DEFAULT,100,()=>{ee+=100;let t=captureWidgetPng(n),r=n.get_width()>0&&n.get_height()>0;if(!t&&!(ee>=s))return e.SOURCE_CONTINUE;let o=p?captureWidgetPng(p):null,m=l.length>=1&&u.length>=1&&h.length===0&&f&&p!=null&&_>1,v;return l.length<1?v=`no stories registered`:u.length<1?v=`no categories`:h.length>0?v=`chrome missing: ${h.join(`, `)}`:!f||p==null?v=`could not open story: ${d??`(none)`}`:_<=1&&(v=`opened story rendered an empty subtree`),m&&c&&!g.has(c)&&(m=!1,v=`story widget ${c} not found in the opened story subtree`),m&&r&&(!t||t.length===0)&&(m=!1,v=`window realized (${n.get_width()}x${n.get_height()}) but the GSK capture was empty`),finish({ok:m,reason:v,stories:l.length,categories:u,opened:f,activeStory:p?p.meta.title:null,requiredChrome:i,missingChrome:h,storySubtreeWidgets:_,storyWidgetPresent:y,windowRealized:r,windowPngBytes:t?t.length:0,storyPngBytes:o?o.length:0}),e.SOURCE_REMOVE})}const Mt={UNKNOWN:0,CUSTOM:1,GPL_2_0:2,GPL_3_0:3,LGPL_2_1:4,LGPL_3_0:5,BSD:6,MIT_X11:7,ARTISTIC:8,GPL_2_0_ONLY:9,GPL_3_0_ONLY:10,LGPL_2_1_ONLY:11,LGPL_3_0_ONLY:12,AGPL_3_0:13,AGPL_3_0_ONLY:14,BSD_3:15,APACHE_2_0:16,MPL_2_0:17,"0BSD":18};Mt.GPL_2_0_ONLY,Mt.GPL_3_0_ONLY,Mt.UNKNOWN;const Nt=[`blue`,`teal`,`green`,`yellow`,`orange`,`red`,`pink`,`purple`,`slate`],Pt={blue:`#3584e4`,teal:`#2190a4`,green:`#3a944a`,yellow:`#c88800`,orange:`#ed5b00`,red:`#e62d42`,pink:`#d56199`,purple:`#9141ac`,slate:`#6f8396`};function parseHex(e){let t=/^#([0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;let n=Number.parseInt(t[1],16);return[(n>>16&255)/255,(n>>8&255)/255,(n&255)/255]}function toHex(e,t,n){let channel=e=>Math.round(Math.min(1,Math.max(0,e))*255).toString(16).padStart(2,`0`);return`#${channel(e)}${channel(t)}${channel(n)}`}const toLinear=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4,fromLinear=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055;function linearToOklab(e,t,n){let r=Math.cbrt(.4122214708*e+.5363325363*t+.0514459929*n),i=Math.cbrt(.2119034982*e+.6806995451*t+.1073969566*n),o=Math.cbrt(.0883024619*e+.2817188376*t+.6299787005*n);return[.2104542553*r+.793617785*i-.0040720468*o,1.9779984951*r-2.428592205*i+.4505937099*o,.0259040371*r+.7827717662*i-.808675766*o]}function oklabToLinear(e,t,n){let r=(e+.3963377774*t+.2158037573*n)**3,i=(e-.1055613458*t-.0638541728*n)**3,o=(e-.0894841775*t-1.291485548*n)**3;return[4.0767416621*r-3.3077115913*i+.2309699292*o,-1.2684380046*r+2.6097574011*i-.3413193965*o,-.0041960863*r-.7034186147*i+1.707614701*o]}function adwaitaStandaloneColor(e,t){let n=parseHex(e);if(!n)return e;let[r,i,o]=linearToOklab(toLinear(n[0]),toLinear(n[1]),toLinear(n[2])),[s,c,l]=oklabToLinear(t?Math.max(r,.85):Math.min(r,.5),i,o);return toHex(fromLinear(s),fromLinear(c),fromLinear(l))}function adwaitaAccentBgColor(e){return Pt[e]}function adwaitaAccentColor(e,t){return adwaitaStandaloneColor(Pt[e],t)}var UnsupportedGObjectError=class extends Error{constructor(e,t){super(t),this.name=`UnsupportedGObjectError`,this.feature=e}};const Ft=new WeakSet;function makeType(e){let t=Object.freeze({name:e});return Ft.add(t),t}makeType(`gchararray`),makeType(`gboolean`),makeType(`gint`),makeType(`guint`),makeType(`gdouble`);const J={READABLE:1,WRITABLE:2,READWRITE:3,CONSTRUCT:4,CONSTRUCT_ONLY:8};var It=class ParamSpec{constructor(e,t,n,r,i,o,s,c){this.kind=e,this.name=t,this.nick=n,this.blurb=r,this.flags=i,this.defaultValue=o,this.minimum=s,this.maximum=c}static boolean(e,t,n,r,i){return new ParamSpec(`boolean`,e,t,n,r,i)}static string(e,t,n,r,i){return new ParamSpec(`string`,e,t,n,r,i)}static int(e,t,n,r,i,o,s){return new ParamSpec(`int`,e,t,n,r,s,i,o)}static uint(e,t,n,r,i,o,s){return new ParamSpec(`uint`,e,t,n,r,s,i,o)}static double(e,t,n,r,i,o,s){return new ParamSpec(`double`,e,t,n,r,s,i,o)}get_default_value(){return this.defaultValue}};const Y={GTypeName:Symbol(`GType name`),GTypeFlags:Symbol(`GType flags`),interfaces:Symbol(`GType interfaces`),properties:Symbol(`GObject properties`),signals:Symbol(`GObject signals`),requires:Symbol(`GObject interface requires`),template:Symbol(`GTK widget template`),cssName:Symbol(`GTK widget CSS name`),children:Symbol(`GTK widget template children`),internalChildren:Symbol(`GTK widget template internal children`)};Y.GTypeName,Y.template,Y.internalChildren,Y.properties,Y.signals,Y.cssName,Y.children,Y.interfaces,Y.requires,Y.GTypeFlags;const Lt=new WeakMap;function chainOf(e){let t=[];for(let n=e;typeof n==`function`;n=Object.getPrototypeOf(n)){let e=Lt.get(n);e&&t.push(e)}return t}function chainOfInstance(e){return chainOf(e.constructor)}function typeNameOf(e,t){return t[0]?.typeName??e.constructor.name}function aliasesOf(e){return[e,e.replace(/-/g,`_`),e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())]}function findProperty(e,t){for(let n of e)for(let e of n.properties)if(aliasesOf(e.name).includes(t))return e}function findSignal(e,t){for(let n of e)if(Object.prototype.hasOwnProperty.call(n.signals,t))return n.signals[t]}const Rt=new WeakMap;let zt=0;function stateOf$1(e){let t=Rt.get(e);return t||(t={values:new Map,handlers:new Map,connections:new Map},Rt.set(e,t)),t}__name(stateOf$1,`stateOf`);function parseSignal(e){let t=e.indexOf(`::`);return t===-1?{name:e}:{name:e.slice(0,t),detail:e.slice(t+2)}}function addHandler(e,t,n){let r=stateOf$1(e),i=++zt,o=r.handlers.get(t)??[];return o.push({id:i,handler:n}),r.handlers.set(t,o),r.connections.set(i,()=>{o.splice(o.findIndex(e=>e.id===i),1)}),i}function runHandlers(e,t,n){let r=stateOf$1(e);for(let{id:i,handler:o}of(r.handlers.get(t)??[]).slice())r.connections.has(i)&&o(e,...n)}function connectInstance(e,t,n){let r=chainOfInstance(e),i=typeNameOf(e,r),{name:o,detail:s}=parseSignal(t),foreign=()=>{let o=r[0]?.door;if(!o)throw Error(`No signal '${t}' on object '${i}'`);let s=++zt,c=o.listen(e,t,n);return stateOf$1(e).connections.set(s,c),s};if(o===`notify`){if(s===void 0)throw new UnsupportedGObjectError(`connect("notify")`,`connect('notify') without a property is outside the GObject subset; connect 'notify::<property>' on '${i}'.`);let t=findProperty(r,s);return t?addHandler(e,`notify::${t.name}`,n):foreign()}if(findSignal(r,o)){if(s!==void 0)throw Error(`Signal '${o}' on object '${i}' has no detail`);return addHandler(e,o,n)}return foreign()}function disconnectInstance(e,t){let n=stateOf$1(e),r=n.connections.get(t);if(!r)throw Error(`No handler with id ${t} is connected to ${String(e)}`);n.connections.delete(t),r()}function emitInstance(e,t,...n){let r=chainOfInstance(e),i=typeNameOf(e,r),o=findSignal(r,t);if(o){if(n.length!==o.length)throw Error(`Signal '${t}' on ${i} requires ${o.length} args got ${n.length}`);runHandlers(e,t,n);return}let s=r[0]?.door;if(!s)throw Error(`No signal '${t}' on object '${i}'`);s.dispatch(e,t,n)}function notifyInstance(e,t){let n=chainOfInstance(e),r=findProperty(n,t);if(r){runHandlers(e,`notify::${r.name}`,[r]);return}let i=n[0]?.door;if(!i)throw Error(`No property ${t} on ${typeNameOf(e,n)}`);i.dispatch(e,`notify::${t}`,[])}function generateAccessors(e,t){let{name:n,flags:r}=e,i=r&J.READABLE,o=r&J.WRITABLE,s=t??{configurable:!0,enumerable:!0};return i&&o?!s.get&&!s.set?(s.get=function(){let{values:t}=stateOf$1(this);return t.has(n)||t.set(n,e.get_default_value()),t.get(n)},s.set=function(e){let{values:t}=stateOf$1(this);e!==t.get(n)&&(t.set(n,e),this.notify(n))}):s.get?s.set||=function(){throw Error(`getter defined without setter for property ${n}`)}:s.get=function(){throw Error(`setter defined without getter for property ${n}`)}:i&&!s.get?s.get=function(){throw Error(`missing getter for read-only property ${n}`)}:o&&!s.set&&(s.set=function(){throw Error(`missing setter for write-only property ${n}`)}),s}function checkAccessors(e,t){let{name:n,flags:r}=t;if(r&J.CONSTRUCT_ONLY)return;let[,i,o]=aliasesOf(n),own=t=>Object.getOwnPropertyDescriptor(e,t),s=own(n),c=s,l=n.includes(`-`),u,d;l&&(u=own(i),d=own(o),s??=u,s??=d);let f=r&J.READABLE,p=r&J.WRITABLE;(!s||f&&!s.get||p&&!s.set)&&(s=generateAccessors(t,s)),c||Object.defineProperty(e,n,s),l&&(u||Object.defineProperty(e,i,s),d||Object.defineProperty(e,o,s))}function defineConstructOnly(e,t,n){let{values:r}=stateOf$1(e);r.set(t.name,n);for(let n of new Set(aliasesOf(t.name)))Object.defineProperty(e,n,{get:()=>r.get(t.name),enumerable:!0,configurable:!0})}function bindProperties(e,t,n,r,i=[]){let o=i.includes(`invert-boolean`),s=!1,transfer=(e,t,n,r)=>()=>{if(!s){s=!0;try{let i=e[t];n[r]=o?!i:i}finally{s=!1}}},c=transfer(e,t,n,r),l=[[e,e.connect(`notify::${t}`,c)]];if(i.includes(`bidirectional`)){let i=transfer(n,r,e,t);l.push([n,n.connect(`notify::${r}`,i)])}return i.includes(`sync-create`)&&c(),{unbind(){for(let[e,t]of l.splice(0))e.disconnect(t)}}}function createClosure(e,t,n,r){let i=r??e;if(n)throw new UnsupportedGObjectError(`swapped`,`Unsupported template signal flag "swapped"`);let o=e[t];if(o===void 0)throw Error(`A handler called ${t} was not defined on ${String(e)}`);return o.bind(i)}function scopeOf(e){return{instance:e,handler:(t,n)=>createClosure(e,t,n?.flags?.includes(`swapped`)??!1,n?.object),bind:bindProperties}}function constructRegistered(e,t={}){let n=chainOfInstance(e),r={},i=new Map;for(let[e,o]of Object.entries(t)){let t=findProperty(n,e);t?i.set(t,o):r[e]=o}let o=[];for(let t of[...n].reverse())t.template&&o.push([t,t.door.createFromTree(t.template,scopeOf(e),e)]);for(let t of n)for(let n of t.properties)n.flags&J.CONSTRUCT_ONLY&&defineConstructOnly(e,n,i.has(n)?i.get(n):n.get_default_value());for(let[t,n]of i)t.flags&J.CONSTRUCT_ONLY||(e[t.name]=n);for(let[t,n]of o){for(let r of t.internalChildren){let i=n.objects[r];if(i===void 0)throw Error(`Template of ${t.typeName} has no child object '${r}' for InternalChildren`);e[`_${r.replace(/-/g,`_`)}`]=i}t.door.attach(e,n)}return r}const Bt=Symbol(`GIR type`);function registerBaseClass(e,t,n,r=[]){let missing=e=>{throw Error(`No signal '${e}' on object '${t}'`)},i=makeType(t);Object.defineProperty(e,"$gtype",{get:()=>i,enumerable:!1,configurable:!1});for(let t of r)checkAccessors(e.prototype,t);Lt.set(e,{klass:e,typeName:t,gtype:i,properties:r,signals:n,internalChildren:[],door:{name:t,dispatch:(e,t)=>missing(t),listen:(e,t)=>missing(t),createFromTree:()=>missing(`template`),attach(){},register(){}}})}var GObjectObject=class{constructor(e){let t=constructRegistered(this,e),n=Object.keys(t)[0];if(n!==void 0)throw Error(`No property ${n} on ${typeNameOf(this,chainOfInstance(this))}`)}notify(e){notifyInstance(this,e)}connect(e,t){return connectInstance(this,e,t)}disconnect(e){disconnectInstance(this,e)}emit(e,...t){emitInstance(this,e,...t)}};function refuse$1(e,t){return new UnsupportedGObjectError(e,`${e} ${t}, which is outside the Gio subset (ADR 0098 § 1).`)}__name(refuse$1,`refuse`);var ActionRegistry=class{constructor(){this._actions=new Map}add(e){this._actions.set(e.name,e)}remove(e){this._actions.delete(e)}lookup_action(e){return this._actions.get(e)??null}has(e){return this._actions.has(e)}list(){return[...this._actions.keys()]}};const Vt=new WeakMap;function actionRegistryOf(e,t=!0){let n=Vt.get(e);return n===void 0&&t&&(n=new ActionRegistry,Vt.set(e,n)),n}function requireAction(e){let t=e;if(typeof t?.name!=`string`||typeof t.activate!=`function`)throw TypeError(`add_action: needs a Gio.Action (a Gio.SimpleAction)`);return t}const Ht={add_action(e){actionRegistryOf(this).add(requireAction(e))},lookup_action(e){return actionRegistryOf(this,!1)?.lookup_action(e)??null},remove_action(e){actionRegistryOf(this,!1)?.remove(e)}},Ut={has_action(e){return actionRegistryOf(this,!1)?.has(e)??!1},list_actions(){return actionRegistryOf(this,!1)?.list()??[]},activate_action(e,t=null){if(t!==null)throw refuse$1(`activate_action with a parameter`,`needs a GLib.Variant`);actionRegistryOf(this,!1)?.lookup_action(e)?.activate(null)},get_action_enabled(e){return actionRegistryOf(this,!1)?.lookup_action(e)?.enabled??!1}};function installActionMap(e,t=!1){let n=t?{...Ht,...Ut}:{...Ht};for(let[t,r]of Object.entries(n))Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0,enumerable:!1})}const Wt=new WeakMap;function linkWindow(e,t){t===null?Wt.delete(e):Wt.set(e,t)}const Gt={NONE:0,FLAGS_NONE:0,DEFAULT_FLAGS:0,IS_SERVICE:1,IS_LAUNCHER:2,HANDLES_OPEN:4,HANDLES_COMMAND_LINE:8,SEND_ENVIRONMENT:16,NON_UNIQUE:32,CAN_OVERRIDE_APP_ID:64,ALLOW_REPLACEMENT:128,REPLACE:256};function isValidApplicationId(e){if(typeof e!=`string`||e.length>255||e===``)return!1;let t=e.split(`.`);return t.length>=2&&t.every(e=>/^[A-Za-z_-][A-Za-z0-9_-]*$/.test(e))}function refuse(e,t){return new UnsupportedGObjectError(e,`${e} ${t}, which is outside the Gio subset (ADR 0098 § 1).`)}const Kt=`register.hold.release.mark_busy.unmark_busy.open.set_inactivity_timeout.send_notification.withdraw_notification.register_session.set_option_context_parameter_string.set_option_context_summary.set_option_context_description.add_main_option.add_main_option_entries.add_option_group.set_resource_base_path.get_resource_base_path.set_flags.get_is_remote.get_is_registered.get_dbus_connection.get_dbus_object_path.bind_busy_property.add_action_entries.set_default`.split(`.`),qt=[`is_remote`,`is_registered`,`is_busy`,`resource_base_path`,`inactivity_timeout`,`action_group`],Jt=[`open`,`command-line`,`handle-local-options`,`shutdown`,`name-lost`],Yt=[`set_accels_for_action`,`get_accels_for_action`,`list_action_descriptions`,`get_actions_for_accel`,`set_menubar`,`get_menubar`,`get_menu_by_id`,`set_app_menu`,`get_app_menu`,`get_menu_by_id`,`inhibit`,`uninhibit`],Xt=new WeakMap;let Zt=null;function rememberDefault(e){Zt??=e}function stateOf(e){let t=Xt.get(e);return t===void 0&&(t={id:null,windows:[],running:!1,resolve:()=>{}},Xt.set(e,t)),t}function hostOf(e){let t=e.constructor.host;if(t===void 0)throw Error(`Gio.Application: this class has no ApplicationHost; use the Gtk.Application of a port.`);return t}var GioApplicationBase=class extends GObjectObject{static{this[Bt]=`Gio.Application`}static id_is_valid(e){return isValidApplicationId(e)}static get_default(){return Zt}constructor(e){super(e),rememberDefault(this)}get application_id(){return stateOf(this).id}set application_id(e){let t=e??null;if(t!==null&&!isValidApplicationId(t))throw Error(`Gio.Application: '${String(t)}' is not a valid application id (g_application_id_is_valid)`);let n=stateOf(this);if(n.running)throw Error(`Gio.Application: the application id cannot change while it runs`);n.id!==t&&(n.id=t,this.notify(`application-id`))}get flags(){return 0}set flags(e){if(e!==void 0&&e!==Gt.NONE)throw refuse(`Gio.ApplicationFlags value ${String(e)}`,`is a flag other than the default`)}get_application_id(){return this.application_id}set_application_id(e){this.application_id=e}get_flags(){return 0}vfunc_startup(){}vfunc_activate(){}run(){throw refuse(`Gio.Application.run()`,`blocks, and a page cannot; use runAsync()`)}connect(e,t){let n=e.split(`::`)[0]??e;if(Jt.includes(n))throw refuse(`the '${n}' signal`,`is not emitted`);return super.connect(e,t)}async runAsync(e=[]){let t=stateOf(this);if(t.running)throw Error(`Gio.Application.runAsync(): the application is already running`);let n=hostOf(this);t.running=!0;let r=new Promise(e=>{t.resolve=e}),i,o=!1,body=()=>{try{if(this.vfunc_startup(),this.emit(`startup`),this.emit(`activate`),this.vfunc_activate(),t.running&&t.windows.length===0&&n.requiresWindow)throw Error(`Gio.Application.runAsync(): activate added no window on ${n.name}; a window must be added synchronously by activate (ADR 0098 § 3).`)}catch(e){i=e,o=!0}return t.windows[0]??null};try{await n.start(body)}catch(e){i=e,o=!0}if(o)throw t.running=!1,n.exit(),i;return t.windows.length===0&&this._finish(0),r}quit(){let e=stateOf(this);if(e.running){for(let t of e.windows.splice(0))linkWindow(t,null),hostOf(this).detach(t);this._finish(0)}}_finish(e){let t=stateOf(this);t.running&&(t.running=!1,t.resolve(e),hostOf(this).exit())}};registerBaseClass(GioApplicationBase,`GApplication`,{startup:[],activate:[]},[It.string(`application-id`,``,``,J.READWRITE|J.CONSTRUCT,null),It.uint(`flags`,``,``,J.READWRITE|J.CONSTRUCT,0,4294967295,0)]),installActionMap(GioApplicationBase.prototype,!0);function refuseMembers(e,t,n){for(let n of t)Object.defineProperty(e,n,{value:()=>{throw refuse(`${n}()`,`is not implemented`)},writable:!0,configurable:!0,enumerable:!1});for(let t of n)Object.defineProperty(e,t,{get(){throw refuse(`the '${t}' property`,`is not implemented`)},configurable:!0,enumerable:!1})}refuseMembers(GioApplicationBase.prototype,Kt,qt);function withGtkApplication(e){class GtkApplication extends e{get active_window(){return stateOf(this).windows[0]??null}get_active_window(){return this.active_window}get_windows(){return[...stateOf(this).windows]}add_window(e){let t=stateOf(this);t.windows.includes(e)||(t.windows.unshift(e),linkWindow(e,this))}remove_window(e){let t=stateOf(this),n=t.windows.indexOf(e);n!==-1&&(t.windows.splice(n,1),linkWindow(e,null),t.windows.length===0&&this._finish(0))}}return refuseMembers(GtkApplication.prototype,Yt,[]),GtkApplication}withGtkApplication(GioApplicationBase),Math.PI*.35,Math.PI*.015,Math.PI*.9;const Qt=Math.PI*.9,$t=Math.PI*.7,en=Math.PI*1.1,tn=Math.PI*1.35,nn=Qt+en+tn-$t;53*Math.PI*2/nn,en-$t/2,new Set(`ADC.AND.ASL.BCC.BCS.BEQ.BIT.BMI.BNE.BPL.BRK.BVC.BVS.CLC.CLD.CLI.CLV.CMP.CPX.CPY.DEC.DEX.DEY.EOR.INC.INX.INY.JMP.JSR.LDA.LDX.LDY.LSR.NOP.ORA.PHA.PHP.PLA.PLP.ROL.ROR.RTI.RTS.SBC.SEC.SED.SEI.STA.STX.STY.TAX.TAY.TSX.TXA.TXS.TYA`.split(`.`));const rn={system:`Follow system`,light:`Light`,dark:`Dark`},an={blue:`Blue`,teal:`Teal`,green:`Green`,yellow:`Yellow`,orange:`Orange`,red:`Red`,pink:`Pink`,purple:`Purple`,slate:`Slate`};var StorybookAppearance=class{constructor(){this._provider=null,this._applying=!1,this._styleManager=s.StyleManager.get_default(),this.settings=new StorybookSettings(()=>this._styleManager.get_dark()),this.settings.subscribe(e=>this._apply(e)),this._styleManager.connect(`notify::dark`,()=>this.settings.systemChanged()),this._apply(this.settings.state)}_apply(e){if(!this._applying){this._applying=!0;try{this._styleManager.set_color_scheme(e.colorScheme===`light`?s.ColorScheme.FORCE_LIGHT:e.colorScheme===`dark`?s.ColorScheme.FORCE_DARK:s.ColorScheme.DEFAULT),this._applyAccent(this.settings.resolvedAccent)}finally{this._applying=!1}}}_applyAccent(e){let r=t.Display.get_default();if(!r)return;if(!this._provider){if(!e)return;this._provider=new n.CssProvider,n.StyleContext.add_provider_for_display(r,this._provider,n.STYLE_PROVIDER_PRIORITY_APPLICATION)}if(!e){this._provider.load_from_string(``);return}let i=adwaitaAccentBgColor(e),o=adwaitaAccentColor(e,this.settings.resolvedDark);this._provider.load_from_string(`:root { --accent-bg-color: ${i}; --accent-color: ${o}; }`)}};function buildSwatch(e,t,r){let i=new n.CheckButton({tooltip_text:t,halign:n.Align.CENTER,valign:n.Align.CENTER,focus_on_click:!1});for(let t of e)i.add_css_class(t);return i.update_property([n.AccessibleProperty.LABEL],[t]),r&&i.set_group(r),i}function buildSwatchCard(e=!1){let t=new s.WrapBox({align:.5,child_spacing:8,line_spacing:8,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12}),n=new s.Bin({child:t,hexpand:!0});return n.add_css_class(`card`),e&&n.add_css_class(`storybook-card-attached`),{card:n,row:t}}function buildAppearanceDialog(e){let t=e.settings,r=new s.PreferencesPage,i=new s.PreferencesGroup({title:`Style`}),{card:o,row:c}=buildSwatchCard(),l=null,u=new Map;for(let e of St){let n=buildSwatch([`storybook-swatch`,`storybook-scheme-swatch`,`storybook-scheme-${e}`],rn[e],l);l??=n,n.set_active(t.colorScheme===e),n.connect(`toggled`,()=>{n.get_active()&&(t.colorScheme=e)}),u.set(e,n),c.append(n)}i.add(o),r.add(i);let d=new s.PreferencesGroup({title:`Accent colour`});d.add_css_class(`storybook-attached-group`);let f=new s.SwitchRow({title:`Use a custom accent colour`,subtitle:`Off follows the desktop, which owns the accent`,active:t.accentMode===`custom`});d.add(f);let{card:p,row:m}=buildSwatchCard(!0),h=null,g=new Map;for(let e of Nt){let r=buildSwatch([`storybook-swatch`],an[e],h);h??=r,r.set_active(t.accent===e);let i=new n.CssProvider;i.load_from_string(`checkbutton { background-color: ${adwaitaAccentBgColor(e)}; }`),r.get_style_context().add_provider(i,n.STYLE_PROVIDER_PRIORITY_APPLICATION),r.connect(`toggled`,()=>{r.get_active()&&(t.accent=e)}),g.set(e,r),m.append(r)}m.set_sensitive(t.accentMode===`custom`),f.connect(`notify::active`,()=>{t.accentMode=f.get_active()?`custom`:`system`}),d.add(p),r.add(d),t.subscribe(e=>{let t=u.get(e.colorScheme);t&&!t.get_active()&&t.set_active(!0);let n=g.get(e.accent);n&&!n.get_active()&&n.set_active(!0);let r=e.accentMode===`custom`;f.get_active()!==r&&f.set_active(r),m.set_sensitive(r)});let _=new s.PreferencesDialog({title:`Appearance`});return _.add(r),_}function adwControlWidgetFactory(){return{text(e,t){let n=new s.EntryRow({title:e});t&&n.set_tooltip_text(t);let r=null;return n.connect(`changed`,()=>r?.(n.get_text())),{node:n,get:()=>n.get_text(),set:e=>n.set_text(e),onChange:e=>{r=e}}},boolean(e,t){let n=new s.SwitchRow({title:e,subtitle:t??``}),r=null;return n.connect(`notify::active`,()=>r?.(n.get_active())),{node:n,get:()=>n.get_active(),set:e=>n.set_active(e),onChange:e=>{r=e}}},number(e){let t=s.SpinRow.new_with_range(e.min??0,e.max??100,e.step??1);t.set_title(e.label||e.name),e.description&&t.set_subtitle(e.description);let n=null;return t.connect(`changed`,()=>n?.(t.get_value())),{node:t,get:()=>t.get_value(),set:e=>t.set_value(e),onChange:e=>{n=e}}},range(e){return buildRangeWidget(e)},select(e){return buildSelectWidget(e)},color(e,t){return buildColorWidget(e,t)}}}function buildRangeWidget(e){let t=e.min??0,r=e.max??100,i=e.step??1,o=typeof e.min==`number`?e.min:0,s=Number.isInteger(i)&&Number.isInteger(o),c=new n.Adjustment({lower:t,upper:r,step_increment:i,value:o});c.step_increment=i;let l=new n.ListBoxRow({selectable:!1,activatable:!1});l.add_css_class(`story-range-row`);let u=new n.Box({orientation:n.Orientation.VERTICAL,spacing:6,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12}),d=new n.Box({orientation:n.Orientation.HORIZONTAL,spacing:12}),f=new n.Label({label:e.label||e.name,halign:n.Align.START,hexpand:!0,ellipsize:3});f.add_css_class(`heading`);let formatValue=e=>s?String(Math.round(e)):e.toFixed(2),p=new n.Label({label:formatValue(o),halign:n.Align.END});if(p.add_css_class(`numeric`),p.add_css_class(`dim-label`),d.append(f),d.append(p),u.append(d),e.description){let t=new n.Label({label:e.description,halign:n.Align.START,xalign:0,wrap:!0,max_width_chars:32});t.add_css_class(`caption`),t.add_css_class(`dim-label`),u.append(t)}let m=new n.Scale({orientation:n.Orientation.HORIZONTAL,adjustment:c,draw_value:!1,hexpand:!0}),h=null,g=!1;return m.connect(`value-changed`,()=>{if(g)return;let e=m.get_value();if(s){let t=Math.round(e);if(t!==e){m.set_value(t);return}e=t}p.set_label(formatValue(e)),h?.(e)}),u.append(m),l.set_child(u),{node:l,get:()=>m.get_value(),set:e=>{g=!0,m.set_value(e),g=!1,p.set_label(formatValue(e))},onChange:e=>{h=e}}}function buildSelectWidget(e){let t=e.options??[],r=n.StringList.new(t.map(e=>e.label)),i=new s.ComboRow({title:e.label||e.name,subtitle:e.description??``,model:r}),o=null;return i.connect(`notify::selected`,()=>o?.(i.get_selected())),{node:i,get:()=>i.get_selected(),set:e=>i.set_selected(e),onChange:e=>{o=e}}}function buildColorWidget(e,r){let i=new s.ActionRow({title:e,subtitle:r??``}),o=new n.ColorDialogButton({dialog:new n.ColorDialog({title:e}),valign:n.Align.CENTER});i.add_suffix(o),i.set_activatable_widget(o);let channel=e=>Math.round(Math.max(0,Math.min(1,e))*255).toString(16).padStart(2,`0`),rgbaToHex=e=>`#${channel(e.red)}${channel(e.green)}${channel(e.blue)}`,c=null,l=!1;return o.connect(`notify::rgba`,()=>{l||c?.(rgbaToHex(o.get_rgba()))}),{node:i,get:()=>rgbaToHex(o.get_rgba()),set:e=>{let n=new t.RGBA;n.parse(e)&&(l=!0,o.set_rgba(n),l=!1)},onChange:e=>{c=e}}}var on=class StorybookWindow extends s.ApplicationWindow{static{o.registerClass({GTypeName:`StorybookWindow`,Template:`<?xml version="1.0" encoding="UTF-8"?>
81
+ </node>`}function isWin32(){return e.DIR_SEPARATOR===92}function defaultListenAddress(){return isWin32()?`nonce-tcp:host=127.0.0.1`:`unix:tmpdir=${e.get_tmp_dir()}`}var DevtoolsPeerServerError=class extends Error{constructor(e,t,n,r){super(e),this.address=t,this.reason=n,this.name=`DevtoolsPeerServerError`,this.cause=r}};function isAddressInUse(t){return t instanceof e.Error&&t.matches(r.io_error_quark(),r.IOErrorEnum.ADDRESS_IN_USE)}function unixSocketPath(e){if(!e.startsWith(`unix:`))return null;for(let t of e.slice(5).split(`,`)){let e=t.indexOf(`=`);if(!(e<0||t.slice(0,e)!==`path`))try{return decodeURIComponent(t.slice(e+1))}catch{return null}}return null}function inspectExistingSocket(e){try{if((r.File.new_for_path(e).query_info(`unix::mode`,r.FileQueryInfoFlags.NONE,null).get_attribute_uint32(`unix::mode`)&61440)!=49152)return`not-a-socket`}catch{return`not-a-socket`}let t=new r.SocketClient;t.set_timeout(2);let n;try{n=t.connect(r.UnixSocketAddress.new(e),null)}catch{return`dead`}return n.close(null),`live`}function clearReclaimableSocket(t){let n=unixSocketPath(t);if(!n||!e.file_test(n,e.FileTest.EXISTS))return;let i=inspectExistingSocket(n);if(i===`live`)throw new DevtoolsPeerServerError(`cannot listen on ${t}: another process is already listening there. Stop it, or point ${q} (or options.address) at a different socket — GJSIFY_DEVTOOLS_INSTANCE=<label> lets two devtools-enabled apps run side by side.`,t,`address-in-use`);if(i===`not-a-socket`)throw new DevtoolsPeerServerError(`cannot listen on ${t}: ${n} already exists and is not a socket, so it will NOT be removed. Point ${q} (or options.address) at a free path.`,t,`occupied-by-other-file`);try{r.File.new_for_path(n).delete(null)}catch(e){throw new DevtoolsPeerServerError(`cannot listen on ${t}: ${n} is a socket nothing listens on, but removing it failed (${e}). Delete it by hand, or point ${q} at a free path.`,t,`address-in-use`,e)}v.log(`[gjsify-devtools] reclaimed the stale socket ${n}: nothing was listening on it (an abnormal exit — Ctrl-C, SIGKILL, a crash — leaves the inode behind).`)}function flagsForAddress(e){return e.startsWith(`tcp:`)||e.startsWith(`nonce-tcp:`)?r.DBusServerFlags.NONE:r.DBusServerFlags.AUTHENTICATION_REQUIRE_SAME_USER}function startDevtoolsPeerServer(e,t,n){let i=n&&n!==``?n:defaultListenAddress();clearReclaimableSocket(i);let o;try{o=r.DBusServer.new_sync(i,flagsForAddress(i),r.dbus_generate_guid(),null,null)}catch(e){let t=isAddressInUse(e);throw new DevtoolsPeerServerError(t?`cannot listen on ${i}: the address is already in use (${e}). Stop whatever holds it, or point ${q} (or options.address) at a different address.`:`cannot listen on ${i}: ${e}. Check the address form — \`unix:path=/tmp/app.sock\`, \`unix:tmpdir=/tmp\` or \`nonce-tcp:host=127.0.0.1\`.`,i,t?`address-in-use`:`listen-failed`,e)}let s=new Set;o.connect(`new-connection`,(n,r)=>(s.add(r),r.connect(`closed`,()=>{e.unexport(r),s.delete(r)}),e.export(r,t),!0)),o.start();let c=!1;return{address:o.get_client_address(),objectPath:t,get connectionCount(){return s.size},stop(){if(!c){c=!0,o.stop();for(let t of s)e.unexport(t),!t.is_closed()&&t.close(null,(e,t)=>{try{e.close_finish(t)}catch{}});s.clear()}}}}function writeDevtoolsAddressFile(t,n){try{if(e.mkdir_with_parents(e.path_get_dirname(t),448),!e.file_set_contents(t,`${n}\n`))return null}catch(e){return v.error(`[gjsify-devtools] could not publish the peer address to ${t}: ${e}`),null}try{r.File.new_for_path(t).set_attribute_uint32(`unix::mode`,384,r.FileQueryInfoFlags.NONE,null)}catch(e){v.error(`[gjsify-devtools] could not restrict ${t} to the current user: ${e}`)}return t}function removeDevtoolsAddressFile(e){try{r.File.new_for_path(e).delete(null)}catch{}}function captureWidget(e){let t=e.get_native()?.get_renderer();if(!t)return{png:null,blocker:`no-renderer`};let r=e.get_width(),o=e.get_height();if(r<=0||o<=0)return{png:null,blocker:`zero-size`};let s=n.WidgetPaintable.new(e),c=n.Snapshot.new();s.snapshot(c,r,o);let l=c.to_node();if(!l)return{png:null,blocker:`empty-snapshot`};let u=new i.Rect;u.init(0,0,r,o);let d=t.render_texture(l,u).save_to_png_bytes().get_data();return d?{png:new Uint8Array(d)}:{png:null,blocker:`empty-png`}}function captureWidgetPng(e){return captureWidget(e).png}function dumpGSettings(e){let t=r.SettingsSchemaSource.get_default()?.lookup(e,!0);if(!t)throw Error(formatDbusErrorMessage(`not-found`,`GSettings schema '${e}' is not installed`));let n=new r.Settings({settings_schema:t}),i={};for(let e of t.list_keys())i[e]=n.get_value(e).recursiveUnpack();return i}function parseWidgetPath(e){let t=e.split(`/`).filter(e=>e.length>0);if(t.length===0)return null;let n=t[0].match(/^toplevel:(\d+)$/);if(!n)return null;let r=[];for(let e of t.slice(1)){let t=e.match(/^child:(\d+)$/);if(!t)return null;r.push(Number(t[1]))}return{toplevel:Number(n[1]),children:r}}function buildWidgetPath(e,t){return[`toplevel:${e}`,...t.map(e=>`child:${e}`)].join(`/`)}function widgetType(e){return gtypeName(e)??`GtkWidget`}function gtypeName(e){let t=e;return typeof t?.$typeName==`string`&&t.$typeName.length>0?t.$typeName:t?.constructor?.$gtype?.name??null}function widgetIsA(e,t){let n=gtypeName(e);if(n===null||!t)return!1;if(n===t)return!0;let r=o.type_from_name(n),i=o.type_from_name(t);return!r||!i?!1:o.type_is_a(r,i)}function activateWidget(e){let t=e,n=typeof t.get_parent==`function`?t.get_parent():null,r=!!n&&widgetIsA(n,`GtkListBox`);if(!(r&&widgetIsA(e,`GtkListBoxRow`))&&typeof t.activate==`function`&&t.activate()===!0)return!0;if(r){let t=n,r=!1;return typeof t.select_row==`function`&&(t.select_row(e),r=!0),typeof t.emit==`function`&&(t.emit(`row-activated`,e),r=!0),r}return!1}function sendKeyToWidget(e,t,n){let r=e.observe_controllers(),i=!1;for(let e=0;e<r.get_n_items();e++){let o=r.get_item(e);widgetIsA(o,`GtkEventControllerKey`)&&(o.emit(`key-pressed`,t,0,n),i=!0)}return i}function nthChild(e,t){let n=e.get_first_child(),r=0;for(;n&&r<t;)n=n.get_next_sibling(),r++;return r===t?n:null}function listToplevels(){let e=n.Window.get_toplevels(),t=e.get_n_items(),r=[];for(let n=0;n<t;n++){let t=e.get_item(n);t&&r.push({path:`toplevel:${n}`,type:widgetType(t),title:t.get_title?.()??null,mapped:t.get_mapped(),focused:t.is_active??!1})}return r}function resolveWidgetPath(e){let t=parseWidgetPath(e);if(!t)return null;let r=n.Window.get_toplevels().get_item(t.toplevel);if(!r)return null;for(let e of t.children)if(r=nthChild(r,e),!r)return null;return r}function parseWidgetSelector(e){let t=e.indexOf(`:`),n=(t<0?e:e.slice(0,t)).trim(),r=(t<0?``:e.slice(t+1)).trim();return!n&&!r?null:{type:n,cssClass:r}}function findWidgetPath(e,t,n){let r={path:null};return walkForSelector(e,t,n,r)??r.path}function walkForSelector(e,t,n,r){if(!e.get_visible()||!e.get_mapped())return null;if(!t.cssClass||e.get_css_classes().includes(t.cssClass)){if(!t.type||widgetType(e)===t.type)return n;r.path===null&&widgetIsA(e,t.type)&&(r.path=n)}let i=e.get_first_child(),o=0;for(;i;){let e=walkForSelector(i,t,`${n}/child:${o}`,r);if(e)return e;i=i.get_next_sibling(),o++}return null}function geometryOf(e){if(!e.get_mapped())return;let t=e.get_allocation(),r=t.width+e.get_margin_start()+e.get_margin_end(),i=t.height+e.get_margin_top()+e.get_margin_bottom(),[o,s]=e.measure(n.Orientation.HORIZONTAL,-1),c=r>0?Math.max(r,o):-1,[l,u]=e.measure(n.Orientation.VERTICAL,c),d={width:r,height:i,widthRequest:[o,s],heightRequest:[l,u]};return(r<o||i<l)&&(d.short=!0),d}function dumpTree(e,t,n){let r={path:n,type:widgetType(e),name:e.get_name()||null,cssClasses:e.get_css_classes(),mapped:e.get_mapped(),visible:e.get_visible(),children:[]},i=geometryOf(e);if(i!==void 0&&(r.geometry=i),t<=0)return e.get_first_child()&&(r.truncated=!0),r;let o=e.get_first_child(),s=0;for(;o;)r.children.push(dumpTree(o,t-1,`${n}/child:${s}`)),o=o.get_next_sibling(),s++;return r}function jsonSafe(e){let t=typeof e;return e==null||t===`string`||t===`number`||t===`boolean`?e??null:`[${t}]`}function getWidgetProperty(e,t){let n=e,r=t.replace(/-/g,`_`),i=t.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase());for(let e of[t,r,i])if(e in n)return jsonSafe(n[e])}function childIndex(e,t){let n=e.get_first_child(),r=0;for(;n;){if(n===t)return r;n=n.get_next_sibling(),r++}return-1}function pathOfWidget(e){let t=[],r=e,i=r.get_parent();for(;i;){let e=childIndex(i,r);if(e<0)return null;t.unshift(e),r=i,i=r.get_parent()}let o=n.Window.get_toplevels(),s=o.get_n_items();for(let e=0;e<s;e++)if(o.get_item(e)===r)return buildWidgetPath(e,t);return null}function isActiveWindowScope(e){return!e||e===`window`||e===`active`}function frameDelay(t){return new Promise(n=>{e.timeout_add(e.PRIORITY_DEFAULT,t,()=>(n(),e.SOURCE_REMOVE))})}async function captureWidgetWhenRenderable(e,t=12,n=50){let r=null;for(let i=0;i<t;i++){let t=captureWidget(e);if(t.png)return{png:t.png,blocker:null};r=t.blocker,await frameDelay(n)}let i=captureWidget(e);return{png:i.png,blocker:i.png?null:i.blocker??r}}var DevtoolsService=class{constructor(e,t){this._app=e,this._options=t,this._exported=new Map,this._peer=null,this._addressFile=null,this._kinds=new Map,this._extensions=t.extend??[];for(let[e,t]of Object.entries(Et))this._kinds.set(e,t);for(let e of this._extensions){for(let[t,n]of Object.entries(e.methodKinds))this._kinds.set(t,n);for(let[t,n]of Object.entries(e.handlers)){let e=n;this[t]=(...n)=>(this._guard(t),e(...n))}}}export(e,t){if(this._exported.has(e))return;let n=buildDevtoolsIfaceXml(this._extensions.flatMap(e=>e.methodsXml??[])),i=r.DBusExportedObject.wrapJSObject(n,this);i.export(e,t),this._exported.set(e,i)}unexport(e){if(e){this._exported.get(e)?.unexport(),this._exported.delete(e);return}for(let e of this._exported.values())e.unexport();this._exported.clear(),this._peer?.stop(),this._peer=null,this._addressFile&&=(removeDevtoolsAddressFile(this._addressFile),null)}attachPeerServer(e,t){this._peer=e,this._addressFile=t??null}get peerAddress(){return this._peer?.address??null}get addressFile(){return this._addressFile}GetStatus(){let e=this._app.get_active_window(),t={appId:this._app.get_application_id()??`unknown`,instance:this._options.instance??`default`,activeWindow:e?{id:e.get_name()||`window`,title:e.get_title()??``,mapped:e.get_mapped()}:null,toplevelCount:n.Window.get_toplevels().get_n_items(),focusedWidget:null,paused:this._isPaused()};for(let e of this._extensions){let n=e.contributeStatus?.();n&&Object.assign(t,n)}return JSON.stringify(t)}async ScreenshotAsync(t,n){try{let r=typeof t?.[0]==`string`?t[0]:``,i=await this._captureScopePng(r);n.return_value(new e.Variant(`(ay)`,[i]))}catch(e){n.return_dbus_error(`org.gjsify.Devtools.Error.Screenshot`,e instanceof Error?e.message:String(e))}}async _captureScopePng(e){let t=this._resolveRootWidget(e);if(!t){if(isActiveWindowScope(e))return new Uint8Array;throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${e}'`))}let r=captureWidget(t.widget);if(r.png)return r.png;let i=t.widget.get_root();i instanceof n.Window&&i.present();let o=await captureWidgetWhenRenderable(t.widget);return o.png?o.png:(v.warn(`[devtools] Screenshot('${e}') has no image: ${o.blocker??`unknown`} after 12 tries. Empty bytes follow.`),new Uint8Array)}ListActions(){let e={app:describeActions(this._actionGroup(`app`)),win:describeActions(this._actionGroup(`win`))};return JSON.stringify(e)}ActivateAction(e,t,n){this._guard(`ActivateAction`);let r=this._scope(e);activateAction(this._requireGroup(r,t),t,this._parseValue(n))}ChangeActionState(e,t,n){this._guard(`ChangeActionState`);let r=this._scope(e);changeActionState(this._requireGroup(r,t),t,this._parseValue(n))}PresentWindow(){this._app.get_active_window()?.present()}ResizeWindow(e,t){this._guard(`ResizeWindow`);let n=this._app.get_active_window();if(!n)throw Error(formatDbusErrorMessage(`unavailable`,`no active window to resize`));let r=Math.max(1,Math.round(e)),i=Math.max(1,Math.round(t));return n.is_maximized()&&n.unmaximize(),n.is_fullscreen()&&n.unfullscreen(),n.set_default_size(r,i),[r,i]}ListToplevels(){return JSON.stringify(listToplevels())}DumpTree(e,t){let n=this._resolveRootWidget(e);if(!n)throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${e||`active window`}'`));return JSON.stringify(dumpTree(n.widget,t>0?t:40,n.path))}GetProperty(e,t){let n=this._resolveRootWidget(e);if(!n)throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${e}'`));let r=getWidgetProperty(n.widget,t);if(r===void 0)throw Error(formatDbusErrorMessage(`not-found`,`widget has no property '${t}'`));return JSON.stringify(r)}GetFocused(){let e=this._app.get_active_window(),t=e?e.get_focus():null;return JSON.stringify(t?{path:pathOfWidget(t),name:t.get_name()||null,type:widgetType(t)}:null)}ActivateWidget(e){this._guard(`ActivateWidget`);let t=this._resolveRootWidget(e);if(!t)throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${e}'`));return activateWidget(t.widget)}FindWidget(e){let t=parseWidgetSelector(e);if(!t)throw Error(formatDbusErrorMessage(`invalid-params`,`empty selector '${e}'`));let n=this._resolveRootWidget(``);return n?findWidgetPath(n.widget,t,n.path)??``:``}SendKey(e,t){this._guard(`SendKey`);let[r,i,o]=n.accelerator_parse(e);if(!r)throw Error(formatDbusErrorMessage(`invalid-params`,`cannot parse accelerator '${e}'`));let s;if(s=t?this._resolveRootWidget(t)?.widget??null:this._app.get_active_window()?.get_focus()??null,!s)throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${t||`focus`}'`));return sendKeyToWidget(s,i,o??0)}DumpGSettings(e){return JSON.stringify(dumpGSettings(e))}DumpCss(){return JSON.stringify(dumpCss())}SwapCss(e,t){return this._guard(`SwapCss`),swapCss(e,t)}_resolveRootWidget(e){if(isActiveWindowScope(e)){let e=this._app.get_active_window();return e?{widget:e,path:pathOfWidget(e)??`toplevel:0`}:null}let t=resolveWidgetPath(e);return t?{widget:t,path:e}:null}_isPaused(){return this._options.paused?.()??!1}_guard(e){let t=this._kinds.get(e);if(!t)throw Error(formatDbusErrorMessage(`internal`,`unclassified devtools method '${e}'`));if(t===`mutating`&&this._isPaused())throw Error(formatDbusErrorMessage(`paused`,`${e} rejected — external control is paused. Read-only methods keep working.`))}_scope(e){return e===`app`?`app`:`win`}_actionGroup(e){if(e===`app`)return this._app;if(this._options.winActionGroup)return this._options.winActionGroup;let t=this._app.get_active_window();return t instanceof n.ApplicationWindow?t:null}_requireGroup(e,t){let n=this._actionGroup(e);if(!n)throw Error(formatDbusErrorMessage(`unavailable`,`no '${e}' action group`));if(!n.has_action(t))throw Error(formatDbusErrorMessage(`not-found`,`unknown action ${e}.${t}`));return n}_parseValue(e){if(!e||e===`null`)return null;try{return JSON.parse(e)}catch{throw Error(formatDbusErrorMessage(`invalid-params`,`value_json is not valid JSON: ${e}`))}}};const Dt=`DBUS_SESSION_BUS_ADDRESS`,Ot=new Set;function envEnabled(){return isDevtoolsEnabledValue(e.getenv(`GJSIFY_DEVTOOLS`))}function envValue(t){let n=e.getenv(t);return n&&n!==``?n:null}function sessionBusUsable(){if(!envValue(Dt))return!1;try{return r.bus_get_sync(r.BusType.SESSION,null),!0}catch{return!1}}function chooseDevtoolsTransport(e){return e.requestedAddress?{kind:`peer`,address:e.requestedAddress,reason:`requested`}:e.hasAppConnection?{kind:`session-bus`}:e.sessionBusUsable?{kind:`unregistered`}:{kind:`peer`,address:null,reason:`no-session-bus`}}function describeMissingConnection(e,t){return e?t?`[gjsify-devtools] the session bus answers but this application is not registered on it yet — call installDevtools() from the GtkApplication "startup" handler (the bus connection and object path exist only after registration).`:`[gjsify-devtools] ${Dt} is set (${e}) but no bus answers there — using the bus-less peer transport instead. On macOS this is the usual state: Homebrew's dbus listens on launchd, so the advertised address only works while that socket is live.`:`[gjsify-devtools] this machine has no session bus (${Dt} is unset) — using the bus-less peer transport instead. Point the bridge at the address below, or set ${q} on both the app and \`gjsify debug\` to pin it yourself.`}function installDevtools(e,t={}){if(!(t.enabled??envEnabled()))return null;let n=t.instance??envValue(`GJSIFY_DEVTOOLS_INSTANCE`)??void 0,r=new DevtoolsService(e,{...t,instance:n});try{return exportDevtools(e,r,t,n)}catch(e){return r.unexport(),v.error(`[gjsify-devtools] devtools stayed OFF, the app is unaffected — ${describeInstallFailure(e)}`),null}}function describeInstallFailure(e){return e instanceof DevtoolsPeerServerError||e instanceof Error?e.message:String(e)}function exportDevtools(t,n,r,i){let o=t.get_is_registered(),s=o?t.get_dbus_connection():null,c=o?t.get_dbus_object_path():null,l=envValue(Dt),u=!!(s&&c),d=u||sessionBusUsable(),f=chooseDevtoolsTransport({requestedAddress:r.address??envValue(q),hasAppConnection:u,sessionBusUsable:d}),p=t.get_application_id()??`unknown`,m=`${c??appIdToObjectPath(p)}/devtools`;if((f.kind===`unregistered`||f.kind===`peer`&&f.reason===`no-session-bus`)&&v.error(describeMissingConnection(l,d)),f.kind===`session-bus`&&s)n.export(s,m),v.log(`[gjsify-devtools] exported ${Tt} at ${m} (dest ${p})`);else if(f.kind===`peer`){let r=startDevtoolsPeerServer(n,m,f.address??void 0),o=writeDevtoolsAddressFile(devtoolsAddressFilePath(e.get_user_runtime_dir(),p,i),r.address);n.attachPeerServer(r,o),v.log(`[gjsify-devtools] exported ${Tt} at ${m} (peer address ${r.address}${o?`, published to ${o}`:``})`),o&&t.connect(`shutdown`,()=>removeDevtoolsAddressFile(o))}return Ot.add(n),n}const kt=`&(?![a-zA-Z][a-zA-Z0-9]*;|#\\d+;|#x[0-9a-fA-F]+;)|<(?![a-zA-Z/!?])`;RegExp(kt),RegExp(kt,`g`);const At=[`AdwNavigationSplitView`,`GtkListBox`,`AdwOverlaySplitView`];function probeEnabled(){let t=e.getenv(`GJSIFY_STORYBOOK_PROBE`);if(t==null)return!1;let n=t.toLowerCase();return n!==``&&n!==`0`&&n!==`false`}const jt=5e3;function exitIfNotDrained(){if(typeof process>`u`||typeof process.exit!=`function`)return;let e=setTimeout(()=>{v.error(`STORYBOOK PROBE: host still alive ${jt}ms after quit(), exiting`),process.exit(process.exitCode??0)},jt);typeof e==`object`&&typeof e.unref==`function`&&e.unref()}function collectTypes(e,t){t.add(e.type);for(let n of e.children)collectTypes(n,t)}function installStorybookProbe(t,n,r={}){let i=r.requireChrome??At,o=r.out??e.getenv(`GJSIFY_STORYBOOK_PROBE_OUT`)??void 0,s=r.timeoutMs??8e3,c=r.storyWidget??e.getenv(`GJSIFY_STORYBOOK_PROBE_STORY_WIDGET`)??void 0,l=n.controller.listStories(),u=[...new Set(l.map(e=>e.category))],d=r.story??e.getenv(`GJSIFY_STORYBOOK_PROBE_STORY`)??l[0]?.title,f=d?n.openStoryByTitle(d):!1,p=n.activeStory,m=new Set;collectTypes(dumpTree(n,60,`toplevel:0`),m);let h=i.filter(e=>!m.has(e)),g=new Set;p&&collectTypes(dumpTree(p,60,`story`),g);let _=g.size,y=c?g.has(c):null,finish=n=>{let r=JSON.stringify(n);if(n.ok)v.log(`STORYBOOK PROBE: PASS ${r}`);else{v.error(`STORYBOOK PROBE: FAIL ${r}`);try{typeof process<`u`&&(process.exitCode=1)}catch{}}if(o)try{e.file_set_contents(o,JSON.stringify(n,null,2))}catch{}t.quit(),exitIfNotDrained()},ee=0;e.timeout_add(e.PRIORITY_DEFAULT,100,()=>{ee+=100;let t=captureWidgetPng(n),r=n.get_width()>0&&n.get_height()>0;if(!t&&!(ee>=s))return e.SOURCE_CONTINUE;let o=p?captureWidgetPng(p):null,m=l.length>=1&&u.length>=1&&h.length===0&&f&&p!=null&&_>1,v;return l.length<1?v=`no stories registered`:u.length<1?v=`no categories`:h.length>0?v=`chrome missing: ${h.join(`, `)}`:!f||p==null?v=`could not open story: ${d??`(none)`}`:_<=1&&(v=`opened story rendered an empty subtree`),m&&c&&!g.has(c)&&(m=!1,v=`story widget ${c} not found in the opened story subtree`),m&&r&&(!t||t.length===0)&&(m=!1,v=`window realized (${n.get_width()}x${n.get_height()}) but the GSK capture was empty`),finish({ok:m,reason:v,stories:l.length,categories:u,opened:f,activeStory:p?p.meta.title:null,requiredChrome:i,missingChrome:h,storySubtreeWidgets:_,storyWidgetPresent:y,windowRealized:r,windowPngBytes:t?t.length:0,storyPngBytes:o?o.length:0}),e.SOURCE_REMOVE})}const Mt={UNKNOWN:0,CUSTOM:1,GPL_2_0:2,GPL_3_0:3,LGPL_2_1:4,LGPL_3_0:5,BSD:6,MIT_X11:7,ARTISTIC:8,GPL_2_0_ONLY:9,GPL_3_0_ONLY:10,LGPL_2_1_ONLY:11,LGPL_3_0_ONLY:12,AGPL_3_0:13,AGPL_3_0_ONLY:14,BSD_3:15,APACHE_2_0:16,MPL_2_0:17,"0BSD":18};Mt.GPL_2_0_ONLY,Mt.GPL_3_0_ONLY,Mt.UNKNOWN;const Nt=[`blue`,`teal`,`green`,`yellow`,`orange`,`red`,`pink`,`purple`,`slate`],Pt={blue:`#3584e4`,teal:`#2190a4`,green:`#3a944a`,yellow:`#c88800`,orange:`#ed5b00`,red:`#e62d42`,pink:`#d56199`,purple:`#9141ac`,slate:`#6f8396`};function parseHex(e){let t=/^#([0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;let n=Number.parseInt(t[1],16);return[(n>>16&255)/255,(n>>8&255)/255,(n&255)/255]}function toHex(e,t,n){let channel=e=>Math.round(Math.min(1,Math.max(0,e))*255).toString(16).padStart(2,`0`);return`#${channel(e)}${channel(t)}${channel(n)}`}const toLinear=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4,fromLinear=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055;function linearToOklab(e,t,n){let r=Math.cbrt(.4122214708*e+.5363325363*t+.0514459929*n),i=Math.cbrt(.2119034982*e+.6806995451*t+.1073969566*n),o=Math.cbrt(.0883024619*e+.2817188376*t+.6299787005*n);return[.2104542553*r+.793617785*i-.0040720468*o,1.9779984951*r-2.428592205*i+.4505937099*o,.0259040371*r+.7827717662*i-.808675766*o]}function oklabToLinear(e,t,n){let r=(e+.3963377774*t+.2158037573*n)**3,i=(e-.1055613458*t-.0638541728*n)**3,o=(e-.0894841775*t-1.291485548*n)**3;return[4.0767416621*r-3.3077115913*i+.2309699292*o,-1.2684380046*r+2.6097574011*i-.3413193965*o,-.0041960863*r-.7034186147*i+1.707614701*o]}function adwaitaStandaloneColor(e,t){let n=parseHex(e);if(!n)return e;let[r,i,o]=linearToOklab(toLinear(n[0]),toLinear(n[1]),toLinear(n[2])),[s,c,l]=oklabToLinear(t?Math.max(r,.85):Math.min(r,.5),i,o);return toHex(fromLinear(s),fromLinear(c),fromLinear(l))}function adwaitaAccentBgColor(e){return Pt[e]}function adwaitaAccentColor(e,t){return adwaitaStandaloneColor(Pt[e],t)}var UnsupportedGObjectError=class extends Error{constructor(e,t){super(t),this.name=`UnsupportedGObjectError`,this.feature=e}};const Ft=new WeakSet;function makeType(e){let t=Object.freeze({name:e});return Ft.add(t),t}makeType(`gchararray`),makeType(`gboolean`),makeType(`gint`),makeType(`guint`),makeType(`gdouble`);const J={READABLE:1,WRITABLE:2,READWRITE:3,CONSTRUCT:4,CONSTRUCT_ONLY:8};var It=class ParamSpec{constructor(e,t,n,r,i,o,s,c){this.kind=e,this.name=t,this.nick=n,this.blurb=r,this.flags=i,this.defaultValue=o,this.minimum=s,this.maximum=c}static boolean(e,t,n,r,i){return new ParamSpec(`boolean`,e,t,n,r,i)}static string(e,t,n,r,i){return new ParamSpec(`string`,e,t,n,r,i)}static int(e,t,n,r,i,o,s){return new ParamSpec(`int`,e,t,n,r,s,i,o)}static uint(e,t,n,r,i,o,s){return new ParamSpec(`uint`,e,t,n,r,s,i,o)}static double(e,t,n,r,i,o,s){return new ParamSpec(`double`,e,t,n,r,s,i,o)}get_default_value(){return this.defaultValue}};const Y={GTypeName:Symbol(`GType name`),GTypeFlags:Symbol(`GType flags`),interfaces:Symbol(`GType interfaces`),properties:Symbol(`GObject properties`),signals:Symbol(`GObject signals`),requires:Symbol(`GObject interface requires`),template:Symbol(`GTK widget template`),cssName:Symbol(`GTK widget CSS name`),children:Symbol(`GTK widget template children`),internalChildren:Symbol(`GTK widget template internal children`)};Y.GTypeName,Y.template,Y.internalChildren,Y.properties,Y.signals,Y.cssName,Y.children,Y.interfaces,Y.requires,Y.GTypeFlags;const Lt=new WeakMap;function chainOf(e){let t=[];for(let n=e;typeof n==`function`;n=Object.getPrototypeOf(n)){let e=Lt.get(n);e&&t.push(e)}return t}function chainOfInstance(e){return chainOf(e.constructor)}function typeNameOf(e,t){return t[0]?.typeName??e.constructor.name}function aliasesOf(e){return[e,e.replace(/-/g,`_`),e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())]}function findProperty(e,t){for(let n of e)for(let e of n.properties)if(aliasesOf(e.name).includes(t))return e}function findSignal(e,t){for(let n of e)if(Object.prototype.hasOwnProperty.call(n.signals,t))return n.signals[t]}const Rt=new WeakMap;let zt=0;function stateOf$1(e){let t=Rt.get(e);return t||(t={values:new Map,handlers:new Map,connections:new Map,emissions:[]},Rt.set(e,t)),t}__name(stateOf$1,`stateOf`);function parseSignal(e){let t=e.indexOf(`::`);return t===-1?{name:e}:{name:e.slice(0,t),detail:e.slice(t+2)}}function addHandler(e,t,n){let r=stateOf$1(e),i=++zt,o=r.handlers.get(t)??[];return o.push({id:i,handler:n}),r.handlers.set(t,o),r.connections.set(i,()=>{o.splice(o.findIndex(e=>e.id===i),1)}),i}function runHandlers(e,t,n){let r=stateOf$1(e),i={key:t,stopped:!1};r.emissions.push(i);try{for(let{id:o,handler:s}of(r.handlers.get(t)??[]).slice()){if(i.stopped)break;r.connections.has(o)&&s(e,...n)}}finally{r.emissions.pop()}}function connectInstance(e,t,n){let r=chainOfInstance(e),i=typeNameOf(e,r),{name:o,detail:s}=parseSignal(t),foreign=()=>{let o=r[0]?.door;if(!o)throw Error(`No signal '${t}' on object '${i}'`);let s=++zt,c=o.listen(e,t,n);return stateOf$1(e).connections.set(s,c),s};if(o===`notify`){if(s===void 0)throw new UnsupportedGObjectError(`connect("notify")`,`connect('notify') without a property is outside the GObject subset; connect 'notify::<property>' on '${i}'.`);let t=findProperty(r,s);return t?addHandler(e,`notify::${t.name}`,n):foreign()}if(findSignal(r,o)){if(s!==void 0)throw Error(`Signal '${o}' on object '${i}' has no detail`);return addHandler(e,o,n)}return foreign()}function disconnectInstance(e,t){let n=stateOf$1(e),r=n.connections.get(t);if(!r)throw Error(`No handler with id ${t} is connected to ${String(e)}`);n.connections.delete(t),r()}function emitInstance(e,t,...n){let r=chainOfInstance(e),i=typeNameOf(e,r),o=findSignal(r,t);if(o){if(n.length!==o.length)throw Error(`Signal '${t}' on ${i} requires ${o.length} args got ${n.length}`);runHandlers(e,t,n);return}let s=r[0]?.door;if(!s)throw Error(`No signal '${t}' on object '${i}'`);s.dispatch(e,t,n)}function notifyInstance(e,t){let n=chainOfInstance(e),r=findProperty(n,t);if(r){runHandlers(e,`notify::${r.name}`,[r]);return}let i=n[0]?.door;if(!i)throw Error(`No property ${t} on ${typeNameOf(e,n)}`);i.dispatch(e,`notify::${t}`,[])}function generateAccessors(e,t){let{name:n,flags:r}=e,i=r&J.READABLE,o=r&J.WRITABLE,s=t??{configurable:!0,enumerable:!0};return i&&o?!s.get&&!s.set?(s.get=function(){let{values:t}=stateOf$1(this);return t.has(n)||t.set(n,e.get_default_value()),t.get(n)},s.set=function(e){let{values:t}=stateOf$1(this);e!==t.get(n)&&(t.set(n,e),this.notify(n))}):s.get?s.set||=function(){throw Error(`getter defined without setter for property ${n}`)}:s.get=function(){throw Error(`setter defined without getter for property ${n}`)}:i&&!s.get?s.get=function(){throw Error(`missing getter for read-only property ${n}`)}:o&&!s.set&&(s.set=function(){throw Error(`missing setter for write-only property ${n}`)}),s}function checkAccessors(e,t){let{name:n,flags:r}=t;if(r&J.CONSTRUCT_ONLY)return;let[,i,o]=aliasesOf(n),own=t=>Object.getOwnPropertyDescriptor(e,t),s=own(n),c=s,l=n.includes(`-`),u,d;l&&(u=own(i),d=own(o),s??=u,s??=d);let f=r&J.READABLE,p=r&J.WRITABLE;(!s||f&&!s.get||p&&!s.set)&&(s=generateAccessors(t,s)),c||Object.defineProperty(e,n,s),l&&(u||Object.defineProperty(e,i,s),d||Object.defineProperty(e,o,s))}function defineConstructOnly(e,t,n){let{values:r}=stateOf$1(e);r.set(t.name,n);for(let n of new Set(aliasesOf(t.name)))Object.defineProperty(e,n,{get:()=>r.get(t.name),enumerable:!0,configurable:!0})}function bindProperties(e,t,n,r,i=[]){let o=i.includes(`invert-boolean`),s=!1,transfer=(e,t,n,r)=>()=>{if(!s){s=!0;try{let i=e[t];n[r]=o?!i:i}finally{s=!1}}},c=transfer(e,t,n,r),l=[[e,e.connect(`notify::${t}`,c)]];if(i.includes(`bidirectional`)){let i=transfer(n,r,e,t);l.push([n,n.connect(`notify::${r}`,i)])}return i.includes(`sync-create`)&&c(),{unbind(){for(let[e,t]of l.splice(0))e.disconnect(t)}}}function createClosure(e,t,n,r){let i=r??e;if(n)throw new UnsupportedGObjectError(`swapped`,`Unsupported template signal flag "swapped"`);let o=e[t];if(o===void 0)throw Error(`A handler called ${t} was not defined on ${String(e)}`);return o.bind(i)}function scopeOf(e){return{instance:e,handler:(t,n)=>createClosure(e,t,n?.flags?.includes(`swapped`)??!1,n?.object),bind:bindProperties}}function constructRegistered(e,t={}){let n=chainOfInstance(e),r={},i=new Map;for(let[e,o]of Object.entries(t)){let t=findProperty(n,e);t?i.set(t,o):r[e]=o}let o=[];for(let t of[...n].reverse())t.template&&o.push([t,t.door.createFromTree(t.template,scopeOf(e),e)]);for(let t of n)for(let n of t.properties)n.flags&J.CONSTRUCT_ONLY&&defineConstructOnly(e,n,i.has(n)?i.get(n):n.get_default_value());for(let[t,n]of i)t.flags&J.CONSTRUCT_ONLY||(e[t.name]=n);for(let[t,n]of o){for(let r of t.internalChildren){let i=n.objects[r];if(i===void 0)throw Error(`Template of ${t.typeName} has no child object '${r}' for InternalChildren`);e[`_${r.replace(/-/g,`_`)}`]=i}t.door.attach(e,n)}return r}const Bt=Symbol(`GIR type`);function registerBaseClass(e,t,n,r=[]){let missing=e=>{throw Error(`No signal '${e}' on object '${t}'`)},i=makeType(t);Object.defineProperty(e,"$gtype",{get:()=>i,enumerable:!1,configurable:!1});for(let t of r)checkAccessors(e.prototype,t);Lt.set(e,{klass:e,typeName:t,gtype:i,properties:r,signals:n,internalChildren:[],door:{name:t,dispatch:(e,t)=>missing(t),listen:(e,t)=>missing(t),createFromTree:()=>missing(`template`),attach(){},register(){}}})}var GObjectObject=class{constructor(e){let t=constructRegistered(this,e),n=Object.keys(t)[0];if(n!==void 0)throw Error(`No property ${n} on ${typeNameOf(this,chainOfInstance(this))}`)}notify(e){notifyInstance(this,e)}connect(e,t){return connectInstance(this,e,t)}disconnect(e){disconnectInstance(this,e)}emit(e,...t){emitInstance(this,e,...t)}};function refuse$1(e,t){return new UnsupportedGObjectError(e,`${e} ${t}, which is outside the Gio subset (ADR 0098 § 1).`)}__name(refuse$1,`refuse`);var ActionRegistry=class{constructor(){this._actions=new Map}add(e){this._actions.set(e.name,e)}remove(e){this._actions.delete(e)}lookup_action(e){return this._actions.get(e)??null}has(e){return this._actions.has(e)}list(){return[...this._actions.keys()]}};const Vt=new WeakMap;function actionRegistryOf(e,t=!0){let n=Vt.get(e);return n===void 0&&t&&(n=new ActionRegistry,Vt.set(e,n)),n}function requireAction(e){let t=e;if(typeof t?.name!=`string`||typeof t.activate!=`function`)throw TypeError(`add_action: needs a Gio.Action (a Gio.SimpleAction)`);return t}const Ht={add_action(e){actionRegistryOf(this).add(requireAction(e))},lookup_action(e){return actionRegistryOf(this,!1)?.lookup_action(e)??null},remove_action(e){actionRegistryOf(this,!1)?.remove(e)}},Ut={has_action(e){return actionRegistryOf(this,!1)?.has(e)??!1},list_actions(){return actionRegistryOf(this,!1)?.list()??[]},activate_action(e,t=null){if(t!==null)throw refuse$1(`activate_action with a parameter`,`needs a GLib.Variant`);actionRegistryOf(this,!1)?.lookup_action(e)?.activate(null)},get_action_enabled(e){return actionRegistryOf(this,!1)?.lookup_action(e)?.enabled??!1}};function installActionMap(e,t=!1){let n=t?{...Ht,...Ut}:{...Ht};for(let[t,r]of Object.entries(n))Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0,enumerable:!1})}const Wt=new WeakMap;function linkWindow(e,t){t===null?Wt.delete(e):Wt.set(e,t)}const Gt={NONE:0,FLAGS_NONE:0,DEFAULT_FLAGS:0,IS_SERVICE:1,IS_LAUNCHER:2,HANDLES_OPEN:4,HANDLES_COMMAND_LINE:8,SEND_ENVIRONMENT:16,NON_UNIQUE:32,CAN_OVERRIDE_APP_ID:64,ALLOW_REPLACEMENT:128,REPLACE:256};function isValidApplicationId(e){if(typeof e!=`string`||e.length>255||e===``)return!1;let t=e.split(`.`);return t.length>=2&&t.every(e=>/^[A-Za-z_-][A-Za-z0-9_-]*$/.test(e))}function refuse(e,t){return new UnsupportedGObjectError(e,`${e} ${t}, which is outside the Gio subset (ADR 0098 § 1).`)}const Kt=`register.hold.release.mark_busy.unmark_busy.open.set_inactivity_timeout.send_notification.withdraw_notification.register_session.set_option_context_parameter_string.set_option_context_summary.set_option_context_description.add_main_option.add_main_option_entries.add_option_group.set_resource_base_path.get_resource_base_path.set_flags.get_is_remote.get_is_registered.get_dbus_connection.get_dbus_object_path.bind_busy_property.add_action_entries.set_default`.split(`.`),qt=[`is_remote`,`is_registered`,`is_busy`,`resource_base_path`,`inactivity_timeout`,`action_group`],Jt=[`open`,`command-line`,`handle-local-options`,`shutdown`,`name-lost`],Yt=[`set_accels_for_action`,`get_accels_for_action`,`list_action_descriptions`,`get_actions_for_accel`,`set_menubar`,`get_menubar`,`get_menu_by_id`,`set_app_menu`,`get_app_menu`,`get_menu_by_id`,`inhibit`,`uninhibit`],Xt=new WeakMap;let Zt=null;function rememberDefault(e){Zt??=e}function stateOf(e){let t=Xt.get(e);return t===void 0&&(t={id:null,windows:[],running:!1,resolve:()=>{}},Xt.set(e,t)),t}function hostOf(e){let t=e.constructor.host;if(t===void 0)throw Error(`Gio.Application: this class has no ApplicationHost; use the Gtk.Application of a port.`);return t}var GioApplicationBase=class extends GObjectObject{static{this[Bt]=`Gio.Application`}static id_is_valid(e){return isValidApplicationId(e)}static get_default(){return Zt}constructor(e){super(e),rememberDefault(this)}get application_id(){return stateOf(this).id}set application_id(e){let t=e??null;if(t!==null&&!isValidApplicationId(t))throw Error(`Gio.Application: '${String(t)}' is not a valid application id (g_application_id_is_valid)`);let n=stateOf(this);if(n.running)throw Error(`Gio.Application: the application id cannot change while it runs`);n.id!==t&&(n.id=t,this.notify(`application-id`))}get flags(){return 0}set flags(e){if(e!==void 0&&e!==Gt.NONE)throw refuse(`Gio.ApplicationFlags value ${String(e)}`,`is a flag other than the default`)}get_application_id(){return this.application_id}set_application_id(e){this.application_id=e}get_flags(){return 0}vfunc_startup(){}vfunc_activate(){}run(){throw refuse(`Gio.Application.run()`,`blocks, and a page cannot; use runAsync()`)}connect(e,t){let n=e.split(`::`)[0]??e;if(Jt.includes(n))throw refuse(`the '${n}' signal`,`is not emitted`);return super.connect(e,t)}async runAsync(e=[]){let t=stateOf(this);if(t.running)throw Error(`Gio.Application.runAsync(): the application is already running`);let n=hostOf(this);t.running=!0;let r=new Promise(e=>{t.resolve=e}),i,o=!1,body=()=>{try{if(this.vfunc_startup(),this.emit(`startup`),this.emit(`activate`),this.vfunc_activate(),t.running&&t.windows.length===0&&n.requiresWindow)throw Error(`Gio.Application.runAsync(): activate added no window on ${n.name}; a window must be added synchronously by activate (ADR 0098 § 3).`)}catch(e){i=e,o=!0}return t.windows[0]??null};try{await n.start(body)}catch(e){i=e,o=!0}if(o)throw t.running=!1,n.exit(),i;return t.windows.length===0&&this._finish(0),r}quit(){let e=stateOf(this);if(e.running){for(let t of e.windows.splice(0))linkWindow(t,null),hostOf(this).detach(t);this._finish(0)}}_finish(e){let t=stateOf(this);t.running&&(t.running=!1,t.resolve(e),hostOf(this).exit())}};registerBaseClass(GioApplicationBase,`GApplication`,{startup:[],activate:[]},[It.string(`application-id`,``,``,J.READWRITE|J.CONSTRUCT,null),It.uint(`flags`,``,``,J.READWRITE|J.CONSTRUCT,0,4294967295,0)]),installActionMap(GioApplicationBase.prototype,!0);function refuseMembers(e,t,n){for(let n of t)Object.defineProperty(e,n,{value:()=>{throw refuse(`${n}()`,`is not implemented`)},writable:!0,configurable:!0,enumerable:!1});for(let t of n)Object.defineProperty(e,t,{get(){throw refuse(`the '${t}' property`,`is not implemented`)},configurable:!0,enumerable:!1})}refuseMembers(GioApplicationBase.prototype,Kt,qt);function withGtkApplication(e){class GtkApplication extends e{get active_window(){return stateOf(this).windows[0]??null}get_active_window(){return this.active_window}get_windows(){return[...stateOf(this).windows]}add_window(e){let t=stateOf(this);t.windows.includes(e)||(t.windows.unshift(e),linkWindow(e,this))}remove_window(e){let t=stateOf(this),n=t.windows.indexOf(e);n!==-1&&(t.windows.splice(n,1),linkWindow(e,null),t.windows.length===0&&this._finish(0))}}return refuseMembers(GtkApplication.prototype,Yt,[]),GtkApplication}withGtkApplication(GioApplicationBase),Math.PI*.35,Math.PI*.015,Math.PI*.9;const Qt=Math.PI*.9,$t=Math.PI*.7,en=Math.PI*1.1,tn=Math.PI*1.35,nn=Qt+en+tn-$t;53*Math.PI*2/nn,en-$t/2,new Set(`ADC.AND.ASL.BCC.BCS.BEQ.BIT.BMI.BNE.BPL.BRK.BVC.BVS.CLC.CLD.CLI.CLV.CMP.CPX.CPY.DEC.DEX.DEY.EOR.INC.INX.INY.JMP.JSR.LDA.LDX.LDY.LSR.NOP.ORA.PHA.PHP.PLA.PLP.ROL.ROR.RTI.RTS.SBC.SEC.SED.SEI.STA.STX.STY.TAX.TAY.TSX.TXA.TXS.TYA`.split(`.`));const rn=new WeakMap,an=new WeakMap;function sourceOf(e){let t=e.constructor.source;if(t===void 0)throw Error(`Adw.StyleManager: this class has no StyleSource; use the Adw.StyleManager of a port.`);return t}var StyleManagerBase=class extends GObjectObject{static{this[Bt]=`Adw.StyleManager`}static get_default(){let e=an.get(this);if(e===void 0){e=new this,an.set(this,e);let t=sourceOf(e);rn.set(e,t.dark()),t.subscribe(()=>{let n=t.dark();rn.get(e)!==n&&(rn.set(e,n),e.notify(`dark`))})}return e}get dark(){return sourceOf(this).dark()}get_dark(){return this.dark}};registerBaseClass(StyleManagerBase,`AdwStyleManager`,{},[It.boolean(`dark`,``,``,J.READABLE,!1)]);const on={system:`Follow system`,light:`Light`,dark:`Dark`},sn={blue:`Blue`,teal:`Teal`,green:`Green`,yellow:`Yellow`,orange:`Orange`,red:`Red`,pink:`Pink`,purple:`Purple`,slate:`Slate`};var StorybookAppearance=class{constructor(){this._provider=null,this._applying=!1,this._styleManager=s.StyleManager.get_default(),this.settings=new StorybookSettings(()=>this._styleManager.get_dark()),this.settings.subscribe(e=>this._apply(e)),this._styleManager.connect(`notify::dark`,()=>this.settings.systemChanged()),this._apply(this.settings.state)}_apply(e){if(!this._applying){this._applying=!0;try{this._styleManager.set_color_scheme(e.colorScheme===`light`?s.ColorScheme.FORCE_LIGHT:e.colorScheme===`dark`?s.ColorScheme.FORCE_DARK:s.ColorScheme.DEFAULT),this._applyAccent(this.settings.resolvedAccent)}finally{this._applying=!1}}}_applyAccent(e){let r=t.Display.get_default();if(!r)return;if(!this._provider){if(!e)return;this._provider=new n.CssProvider,n.StyleContext.add_provider_for_display(r,this._provider,n.STYLE_PROVIDER_PRIORITY_APPLICATION)}if(!e){this._provider.load_from_string(``);return}let i=adwaitaAccentBgColor(e),o=adwaitaAccentColor(e,this.settings.resolvedDark);this._provider.load_from_string(`:root { --accent-bg-color: ${i}; --accent-color: ${o}; }`)}};function buildSwatch(e,t,r){let i=new n.CheckButton({tooltip_text:t,halign:n.Align.CENTER,valign:n.Align.CENTER,focus_on_click:!1});for(let t of e)i.add_css_class(t);return i.update_property([n.AccessibleProperty.LABEL],[t]),r&&i.set_group(r),i}function buildSwatchCard(e=!1){let t=new s.WrapBox({align:.5,child_spacing:8,line_spacing:8,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12}),n=new s.Bin({child:t,hexpand:!0});return n.add_css_class(`card`),e&&n.add_css_class(`storybook-card-attached`),{card:n,row:t}}function buildAppearanceDialog(e){let t=e.settings,r=new s.PreferencesPage,i=new s.PreferencesGroup({title:`Style`}),{card:o,row:c}=buildSwatchCard(),l=null,u=new Map;for(let e of St){let n=buildSwatch([`storybook-swatch`,`storybook-scheme-swatch`,`storybook-scheme-${e}`],on[e],l);l??=n,n.set_active(t.colorScheme===e),n.connect(`toggled`,()=>{n.get_active()&&(t.colorScheme=e)}),u.set(e,n),c.append(n)}i.add(o),r.add(i);let d=new s.PreferencesGroup({title:`Accent colour`});d.add_css_class(`storybook-attached-group`);let f=new s.SwitchRow({title:`Use a custom accent colour`,subtitle:`Off follows the desktop, which owns the accent`,active:t.accentMode===`custom`});d.add(f);let{card:p,row:m}=buildSwatchCard(!0),h=null,g=new Map;for(let e of Nt){let r=buildSwatch([`storybook-swatch`],sn[e],h);h??=r,r.set_active(t.accent===e);let i=new n.CssProvider;i.load_from_string(`checkbutton { background-color: ${adwaitaAccentBgColor(e)}; }`),r.get_style_context().add_provider(i,n.STYLE_PROVIDER_PRIORITY_APPLICATION),r.connect(`toggled`,()=>{r.get_active()&&(t.accent=e)}),g.set(e,r),m.append(r)}m.set_sensitive(t.accentMode===`custom`),f.connect(`notify::active`,()=>{t.accentMode=f.get_active()?`custom`:`system`}),d.add(p),r.add(d),t.subscribe(e=>{let t=u.get(e.colorScheme);t&&!t.get_active()&&t.set_active(!0);let n=g.get(e.accent);n&&!n.get_active()&&n.set_active(!0);let r=e.accentMode===`custom`;f.get_active()!==r&&f.set_active(r),m.set_sensitive(r)});let _=new s.PreferencesDialog({title:`Appearance`});return _.add(r),_}function adwControlWidgetFactory(){return{text(e,t){let n=new s.EntryRow({title:e});t&&n.set_tooltip_text(t);let r=null;return n.connect(`changed`,()=>r?.(n.get_text())),{node:n,get:()=>n.get_text(),set:e=>n.set_text(e),onChange:e=>{r=e}}},boolean(e,t){let n=new s.SwitchRow({title:e,subtitle:t??``}),r=null;return n.connect(`notify::active`,()=>r?.(n.get_active())),{node:n,get:()=>n.get_active(),set:e=>n.set_active(e),onChange:e=>{r=e}}},number(e){let t=s.SpinRow.new_with_range(e.min??0,e.max??100,e.step??1);t.set_title(e.label||e.name),e.description&&t.set_subtitle(e.description);let n=null;return t.connect(`changed`,()=>n?.(t.get_value())),{node:t,get:()=>t.get_value(),set:e=>t.set_value(e),onChange:e=>{n=e}}},range(e){return buildRangeWidget(e)},select(e){return buildSelectWidget(e)},color(e,t){return buildColorWidget(e,t)}}}function buildRangeWidget(e){let t=e.min??0,r=e.max??100,i=e.step??1,o=typeof e.min==`number`?e.min:0,s=Number.isInteger(i)&&Number.isInteger(o),c=new n.Adjustment({lower:t,upper:r,step_increment:i,value:o});c.step_increment=i;let l=new n.ListBoxRow({selectable:!1,activatable:!1});l.add_css_class(`story-range-row`);let u=new n.Box({orientation:n.Orientation.VERTICAL,spacing:6,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12}),d=new n.Box({orientation:n.Orientation.HORIZONTAL,spacing:12}),f=new n.Label({label:e.label||e.name,halign:n.Align.START,hexpand:!0,ellipsize:3});f.add_css_class(`heading`);let formatValue=e=>s?String(Math.round(e)):e.toFixed(2),p=new n.Label({label:formatValue(o),halign:n.Align.END});if(p.add_css_class(`numeric`),p.add_css_class(`dim-label`),d.append(f),d.append(p),u.append(d),e.description){let t=new n.Label({label:e.description,halign:n.Align.START,xalign:0,wrap:!0,max_width_chars:32});t.add_css_class(`caption`),t.add_css_class(`dim-label`),u.append(t)}let m=new n.Scale({orientation:n.Orientation.HORIZONTAL,adjustment:c,draw_value:!1,hexpand:!0}),h=null,g=!1;return m.connect(`value-changed`,()=>{if(g)return;let e=m.get_value();if(s){let t=Math.round(e);if(t!==e){m.set_value(t);return}e=t}p.set_label(formatValue(e)),h?.(e)}),u.append(m),l.set_child(u),{node:l,get:()=>m.get_value(),set:e=>{g=!0,m.set_value(e),g=!1,p.set_label(formatValue(e))},onChange:e=>{h=e}}}function buildSelectWidget(e){let t=e.options??[],r=n.StringList.new(t.map(e=>e.label)),i=new s.ComboRow({title:e.label||e.name,subtitle:e.description??``,model:r}),o=null;return i.connect(`notify::selected`,()=>o?.(i.get_selected())),{node:i,get:()=>i.get_selected(),set:e=>i.set_selected(e),onChange:e=>{o=e}}}function buildColorWidget(e,r){let i=new s.ActionRow({title:e,subtitle:r??``}),o=new n.ColorDialogButton({dialog:new n.ColorDialog({title:e}),valign:n.Align.CENTER});i.add_suffix(o),i.set_activatable_widget(o);let channel=e=>Math.round(Math.max(0,Math.min(1,e))*255).toString(16).padStart(2,`0`),rgbaToHex=e=>`#${channel(e.red)}${channel(e.green)}${channel(e.blue)}`,c=null,l=!1;return o.connect(`notify::rgba`,()=>{l||c?.(rgbaToHex(o.get_rgba()))}),{node:i,get:()=>rgbaToHex(o.get_rgba()),set:e=>{let n=new t.RGBA;n.parse(e)&&(l=!0,o.set_rgba(n),l=!1)},onChange:e=>{c=e}}}var cn=class StorybookWindow extends s.ApplicationWindow{static{o.registerClass({GTypeName:`StorybookWindow`,Template:`<?xml version="1.0" encoding="UTF-8"?>
82
82
  <!--
83
83
  DO NOT EDIT!
84
84
  This file was @generated by blueprint-compiler. Instead, edit the
@@ -218,7 +218,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
218
218
  </child>
219
219
  </template>
220
220
  </interface>
221
- `,InternalChildren:[`sidebar_list`,`content_area`,`control_panel`,`preview_title`,`show_controls_button`,`controls_split_view`,`main_split_view`]},StorybookWindow)}constructor(e){super(e),this._appearance=new StorybookAppearance,this._controlRows=[],this._rowByTitle=new Map,this._onSelect=null,this._suppressSelect=!1,this._controller=new StorybookController(this,e=>this._buildControls(e))}_onRowSelected(e,t){if(this._suppressSelect||!t)return;let n=t;n.storyWidget&&this._onSelect?.(n.storyWidget)}get controller(){return this._controller}_buildControls(e){let t=e.meta.controls;if(!Array.isArray(t))return[];let n=adwControlWidgetFactory(),r=[];for(let i of t){if(!i?.name||!i?.type){v.warn(`Invalid control configuration:`,i);continue}let t=bindControl(e,i,n);t&&r.push(t)}return r}_onAppearanceClicked(){buildAppearanceDialog(this._appearance).present(this)}_onToggleControls(e){this._controls_split_view.set_show_sidebar(e.get_active())}populateSidebar(e){this._controller.mount(e,!0)}renderSidebar(e,t){this._onSelect=t,this._suppressSelect=!0,this._clearSidebar(),this._rowByTitle.clear();for(let t of e){this._addCategoryToSidebar(t.category);for(let{instance:e,name:n}of t.stories)this._addStoryToSidebar(e,n)}this._suppressSelect=!1}markSelected(e){let t=this._rowByTitle.get(e);t&&this._sidebar_list.get_selected_row()!==t&&(this._suppressSelect=!0,this._sidebar_list.select_row(t),this._suppressSelect=!1)}setPreviewTitle(e){this._preview_title.set_title(e)}showPreview(e){this._content_area.set_child(e),this._main_split_view.get_collapsed()&&this._main_split_view.set_show_content(!0)}renderControls(e){this._clearControlPanel();for(let t of e){let e=t.view;e instanceof s.PreferencesRow&&e.set_use_markup(!1),this._control_panel.add(e),this._controlRows.push(e)}this._show_controls_button.set_active(!0)}_clearSidebar(){let e=this._sidebar_list.get_first_child();for(;e;){let t=e.get_next_sibling();e.unparent(),e=t}}_addCategoryToSidebar(e){let t=new n.ListBoxRow({selectable:!1}),r=new n.Label({label:e,halign:n.Align.START,margin_top:10,margin_bottom:4,margin_start:12,margin_end:12});r.add_css_class(`heading`),r.add_css_class(`dim-label`),t.set_child(r),this._sidebar_list.append(t)}_addStoryToSidebar(e,t){let r=new n.ListBoxRow,i=new n.Label({label:t||`Unnamed Story`,halign:n.Align.START,margin_start:20,margin_top:6,margin_bottom:6});r.set_child(i),this._sidebar_list.append(r),r.storyWidget=e,this._rowByTitle.set(e.meta.title,r)}_clearControlPanel(){for(let e of this._controlRows)this._control_panel.remove(e);this._controlRows=[]}get activeStory(){return this._controller.activeStory}openStoryByTitle(e){return this._controller.openStoryByTitle(e)}setActiveArg(e,t){return this._controller.setActiveArg(e,t)}};o.type_ensure(on.$gtype);var sn=class StorybookApplication extends s.Application{static{o.registerClass({GTypeName:`StorybookApplication`},StorybookApplication)}constructor(e){super({application_id:e.applicationId,flags:r.ApplicationFlags.DEFAULT_FLAGS}),this._window=null,this._options=e,this.connect(`startup`,()=>this._initStyles()),this.connect(`activate`,()=>this._onActivate())}_initStyles(){let e=new n.CssProvider;e.load_from_string(`
221
+ `,InternalChildren:[`sidebar_list`,`content_area`,`control_panel`,`preview_title`,`show_controls_button`,`controls_split_view`,`main_split_view`]},StorybookWindow)}constructor(e){super(e),this._appearance=new StorybookAppearance,this._controlRows=[],this._rowByTitle=new Map,this._onSelect=null,this._suppressSelect=!1,this._controller=new StorybookController(this,e=>this._buildControls(e))}_onRowSelected(e,t){if(this._suppressSelect||!t)return;let n=t;n.storyWidget&&this._onSelect?.(n.storyWidget)}get controller(){return this._controller}_buildControls(e){let t=e.meta.controls;if(!Array.isArray(t))return[];let n=adwControlWidgetFactory(),r=[];for(let i of t){if(!i?.name||!i?.type){v.warn(`Invalid control configuration:`,i);continue}let t=bindControl(e,i,n);t&&r.push(t)}return r}_onAppearanceClicked(){buildAppearanceDialog(this._appearance).present(this)}_onToggleControls(e){this._controls_split_view.set_show_sidebar(e.get_active())}populateSidebar(e){this._controller.mount(e,!0)}renderSidebar(e,t){this._onSelect=t,this._suppressSelect=!0,this._clearSidebar(),this._rowByTitle.clear();for(let t of e){this._addCategoryToSidebar(t.category);for(let{instance:e,name:n}of t.stories)this._addStoryToSidebar(e,n)}this._suppressSelect=!1}markSelected(e){let t=this._rowByTitle.get(e);t&&this._sidebar_list.get_selected_row()!==t&&(this._suppressSelect=!0,this._sidebar_list.select_row(t),this._suppressSelect=!1)}setPreviewTitle(e){this._preview_title.set_title(e)}showPreview(e){this._content_area.set_child(e),this._main_split_view.get_collapsed()&&this._main_split_view.set_show_content(!0)}renderControls(e){this._clearControlPanel();for(let t of e){let e=t.view;e instanceof s.PreferencesRow&&e.set_use_markup(!1),this._control_panel.add(e),this._controlRows.push(e)}this._show_controls_button.set_active(!0)}_clearSidebar(){let e=this._sidebar_list.get_first_child();for(;e;){let t=e.get_next_sibling();e.unparent(),e=t}}_addCategoryToSidebar(e){let t=new n.ListBoxRow({selectable:!1}),r=new n.Label({label:e,halign:n.Align.START,margin_top:10,margin_bottom:4,margin_start:12,margin_end:12});r.add_css_class(`heading`),r.add_css_class(`dim-label`),t.set_child(r),this._sidebar_list.append(t)}_addStoryToSidebar(e,t){let r=new n.ListBoxRow,i=new n.Label({label:t||`Unnamed Story`,halign:n.Align.START,margin_start:20,margin_top:6,margin_bottom:6});r.set_child(i),this._sidebar_list.append(r),r.storyWidget=e,this._rowByTitle.set(e.meta.title,r)}_clearControlPanel(){for(let e of this._controlRows)this._control_panel.remove(e);this._controlRows=[]}get activeStory(){return this._controller.activeStory}openStoryByTitle(e){return this._controller.openStoryByTitle(e)}setActiveArg(e,t){return this._controller.setActiveArg(e,t)}};o.type_ensure(cn.$gtype);var ln=class StorybookApplication extends s.Application{static{o.registerClass({GTypeName:`StorybookApplication`},StorybookApplication)}constructor(e){super({application_id:e.applicationId,flags:r.ApplicationFlags.DEFAULT_FLAGS}),this._window=null,this._options=e,this.connect(`startup`,()=>this._initStyles()),this.connect(`activate`,()=>this._onActivate())}_initStyles(){let e=new n.CssProvider;e.load_from_string(`
222
222
  /* Appearance dialog — round swatches with a selection ring, the shape GNOME's own
223
223
  appearance switcher uses. Adapted from Learn6502's theme-mode-selector.css and
224
224
  accent-color-selector.css (JumpLink/easy6502, MIT).
@@ -338,10 +338,10 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
338
338
  .story-stage {
339
339
  padding: 18px;
340
340
  }
341
- \n${this._options.css??``}`);let r=t.Display.get_default();if(!r){v.error(`No display found`);return}n.StyleContext.add_provider_for_display(r,e,n.STYLE_PROVIDER_PRIORITY_APPLICATION)}_onActivate(){if(!this._window){this._window=new on({application:this}),this._options.title&&this._window.set_title(this._options.title);try{this._window.populateSidebar(this._options.stories)}catch(e){v.error(`Failed to create story instances:`,e)}installDevtools(this,{enabled:this._options.devtools||void 0,extend:[storybookDevtoolsExtension(this._window)]}),probeEnabled()&&installStorybookProbe(this,this._window,this._options.probe)}this._window.present()}};o.type_ensure(sn.$gtype);function collectStoryModules(e){return collectStoryModules$1(e)}function buildGtkChrome(t){let r=new s.PreferencesPage,i=new s.PreferencesGroup,o=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,margin_top:12,margin_bottom:12,spacing:12,hexpand:!0});return o.add_css_class(`story-stage`),i.add(o),r.add(i),t.set_child(r),{root:t,hasStage:!0,setStageContent(e){let t=o.get_first_child();for(;t;)t.unparent(),t=o.get_first_child();o.append(e)},setChromeText(t,n){i.set_title(e.markup_escape_text(t,-1)),i.set_description(e.markup_escape_text(n,-1))}}}var StoryCore=class extends StoryViewBase{constructor(e,t,n){super(),this._widget=e,this.initBase(t,n)}createChrome(e){return buildGtkChrome(this._widget)}initialize(){this._widget.initialize()}updateArgs(e){this._widget.updateArgs(e)}teardown(){this._widget.teardown()}emitArgs(e){super.emitArgs(e),this._widget.notify(`args`)}},X=class StoryWidget extends s.Bin{static{o.registerClass({GTypeName:`StoryWidget`,Properties:{meta:o.ParamSpec.object(`meta`,`Meta`,`Story metadata`,o.ParamFlags.READWRITE,o.Object),story:o.ParamSpec.string(`story`,`Story Name`,`Story name`,o.ParamFlags.READWRITE,``),args:o.ParamSpec.object(`args`,`Args`,`Story arguments`,o.ParamFlags.READWRITE,o.Object)}},StoryWidget)}constructor(e,t={}){super(t),this._core=new StoryCore(this,e.meta,e.story)}static fromMeta(e,t){return{meta:e,story:t,args:argsFromControls(e.controls)}}get meta(){return this._core.meta}get story(){return this._core.story}get args(){return this._core.args}set args(e){this._core.args=e}onArgsChanged(e){return this._core.onArgsChanged(e)}setArg(e,t){this._core.setArg(e,t)}initialize(){}updateArgs(e){}teardown(){}addContent(e){this._core.addContent(e)}};o.type_ensure(X.$gtype);const cn={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`};function decodeXmlEntities(e){return e.includes(`&`)?e.replace(/&(#[Xx][0-9A-Fa-f]+|#[0-9]+|[A-Za-z][A-Za-z0-9]*);/g,(e,t)=>{if(t.charAt(0)!==`#`)return cn[t]??e;let n=t.charAt(1)===`x`||t.charAt(1)===`X`,r=Number.parseInt(n?t.slice(2):t.slice(1),n?16:10);return!Number.isFinite(r)||r<1||r>1114111||r>=55296&&r<=57343?e:String.fromCodePoint(r)}):e}function findTagEnd(e,t){let n=``;for(let r=t+1;r<e.length;r++){let t=e.charAt(r);if(n)t===n&&(n=``);else if(t===`"`||t===`'`)n=t;else if(t===`>`)return r}return-1}const ln=/([^\s=/<>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;function parseAttributes(e){let t={};ln.lastIndex=0;let n=ln.exec(e);for(;n!==null;)n[1]in t||(t[n[1]]=decodeXmlEntities(n[2]??n[3]??``)),n=ln.exec(e);return t}function scanXml(e){let t=[],pushText=e=>{t.push({kind:`text`,text:decodeXmlEntities(e)})},n=0;for(;n<e.length;){let r=e.indexOf(`<`,n);if(r<0){pushText(e.slice(n));break}if(r>n&&pushText(e.slice(n,r)),e.startsWith(`<!--`,r)){let t=e.indexOf(`-->`,r+4);n=t<0?e.length:t+3;continue}if(e.startsWith(`<![CDATA[`,r)){let i=e.indexOf(`]]>`,r+9);t.push({kind:`text`,text:e.slice(r+9,i<0?e.length:i)}),n=i<0?e.length:i+3;continue}if(e.startsWith(`<?`,r)){let t=e.indexOf(`?>`,r+2);n=t<0?e.length:t+2;continue}if(e.startsWith(`<!`,r)){let t=e.indexOf(`>`,r+2);n=t<0?e.length:t+1;continue}let i=findTagEnd(e,r);if(i<0){pushText(e.slice(r));break}let o=e.slice(r+1,i);if(n=i+1,o.charAt(0)===`/`){let e=o.slice(1).trim();e!==``&&t.push({kind:`close`,name:e});continue}let s=o,c=!1;s.endsWith(`/`)&&(c=!0,s=s.slice(0,-1));let l=/^([^\s/<>]+)/.exec(s);if(l===null)continue;let u=l[1];t.push({kind:`open`,name:u,attributes:parseAttributes(s.slice(u.length)),selfClosing:c})}return t}const un={applicationId:null,applicationName:null,developerName:null,version:null,website:null,supportUrl:null,issueUrl:null,license:null,releaseNotes:null};function localeScore(e,t){let n=0;for(let r=0;;r++){let i=r<e.length?e.charAt(r):`\0`,o=r<t.length?t.charAt(r):`\0`;if((i===`-`||i===`\0`)&&(o===`-`||o===`\0`)&&n++,i===`\0`||o===`\0`)break;if(i!==o)return 0}return n}function appdataLocale(e,t={}){let n,r=e[0];r!==void 0&&!r.includes(`_`)&&t.LANG!==void 0&&t.LANG.includes(`_`)&&(n=t.LANG),n=n??r??`C`,n.endsWith(`.UTF-8`)&&(n=n.slice(0,-6));let i=``,o=n.indexOf(`@`);if(o>=0){let e=n.slice(o);e.startsWith(`@cyrillic`)?i=`-Cyrl`:e.startsWith(`@devanagari`)?i=`-Deva`:e.startsWith(`@latin`)?i=`-Latn`:e.startsWith(`@shaw`)?i=`-Shaw`:e.startsWith(`@euro`)||(i=`-euro`),n=n.slice(0,o)}return n.replace(/_/g,`-`)+i}function childElements(e,t,n){let r=[],i=t;for(;i<n;){let t=e[i];if(t.kind!==`open`){i+=1;continue}let o=t;if(o.selfClosing){r.push({name:o.name,attributes:o.attributes,start:i+1,end:i+1}),i+=1;continue}let s=1,c=i+1;for(;c<n&&s>0;){let t=e[c];t.kind===`open`?t.selfClosing||(s+=1):t.kind===`close`&&--s,c+=1}let l=s===0?c-1:n;r.push({name:o.name,attributes:o.attributes,start:i+1,end:l}),i=s===0?c:n}return r}function elementText(e,t){let n=0,r=``;for(let i=t.start;i<t.end;i++){let t=e[i];t.kind===`open`?t.selfClosing||(n+=1):t.kind===`close`?--n:n===0&&(r+=t.text)}return r.trim()}const lang=e=>e.attributes[`xml:lang`]??`C`;function considerTranslatable(e,t,n,r){(e.value===null&&lang(t)===`C`||r>e.score)&&(e.score=r,e.value=n)}function escapeMarkup(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/'/g,`&#39;`).replace(/"/g,`&quot;`)}function inlineMarkup(e,t){let n=``,r=!0,i=0,o=0;for(let s=t.start;s<t.end;s++){let t=e[s];if(t.kind===`open`){let e=t,r=!e.selfClosing;if(r&&(o+=1),i>0)continue;e.name===`em`||e.name===`code`?n+=`<${e.name}>`:r&&(i=o)}else if(t.kind===`close`)i>0&&o===i?i=0:i===0&&(t.name===`em`||t.name===`code`)&&(n+=`</${t.name}>`),--o;else if(i===0){let e=``;for(let n of t.text){if(n===`
342
- `||n===` `||n===` `){if(r)continue;e+=` `,r=!0;continue}e+=n,r=!1}n+=escapeMarkup(e)}}return n}function parseDescription(e,t,n){let r=new Map,bucketFor=(e,t)=>{if(localeScore(n,e)===0&&e!==`C`)return null;let i=r.get(e);return i===void 0&&(i=[],r.set(e,i),t!==void 0&&i.push(`<${t}>\n`)),i};for(let n of childElements(e,t.start,t.end))if(n.name===`p`)bucketFor(lang(n))?.push(`<p>${inlineMarkup(e,n)}</p>\n`);else if(n.name===`ul`||n.name===`ol`){for(let e of r.values())e.push(`<${n.name}>\n`);for(let t of childElements(e,n.start,n.end))t.name===`li`&&bucketFor(lang(t),n.name)?.push(`<li>${inlineMarkup(e,t)}</li>\n`);for(let e of r.values())e.push(`</${n.name}>\n`)}let i=r.get(`C`),o=0;for(let[e,t]of r){let r=localeScore(n,e);r>o&&(o=r,i=t)}return i===void 0?null:i.join(``)}function parseAppdata(e,t={}){let n=t.locale??`C`,r=scanXml(e),i=childElements(r,0,r.length).find(e=>e.name===`component`||e.name===`application`);if(i===void 0)return{...un};let o={...un},s={value:null,score:0},c={value:null,score:0},l=[],u=null;for(let e of childElements(r,i.start,i.end))switch(e.name){case`id`:o.applicationId===null&&(o.applicationId=elementText(r,e));break;case`name`:considerTranslatable(s,e,elementText(r,e),localeScore(n,lang(e)));break;case`developer`:for(let t of childElements(r,e.start,e.end)){if(t.name!==`name`)continue;let e=localeScore(n,lang(t))+1024;e>c.score&&(lang(t)===`C`||e>1024)&&(c.score=e,c.value=elementText(r,t))}break;case`developer_name`:considerTranslatable(c,e,elementText(r,e),localeScore(n,lang(e)));break;case`url`:{let t=elementText(r,e);e.attributes.type===`homepage`?o.website=t:e.attributes.type===`bugtracker`?o.issueUrl=t:e.attributes.type===`help`&&(o.supportUrl=t);break}case`launchable`:e.attributes.type===`desktop-id`&&l.push(elementText(r,e));break;case`project_license`:o.license===null&&(o.license=elementText(r,e));break;case`releases`:u===null&&(u=e);break;default:break}if(o.applicationName=s.value,o.developerName=c.value,u!==null){let e=childElements(r,u.start,u.end).filter(e=>e.name===`release`);o.version=e[0]?.attributes.version??null;let i=t.releaseNotesVersion;if(i!==void 0&&i!==``){let t=e.find(e=>e.attributes.version===i),s=t&&childElements(r,t.start,t.end).find(e=>e.name===`description`);s&&(o.releaseNotes=parseDescription(r,s,n))}}o.applicationId!==null&&o.applicationId.endsWith(`.desktop`)&&(l.includes(`${o.applicationId}.desktop`)||(o.applicationId=o.applicationId.slice(0,-8)));for(let e of Object.keys(o))o[e]===``&&(o[e]=null);return o}const dn={"GPL-2.0-or-later":n.License.GPL_2_0,"GPL-3.0-or-later":n.License.GPL_3_0,"LGPL-2.1-or-later":n.License.LGPL_2_1,"LGPL-3.0-or-later":n.License.LGPL_3_0,"BSD-2-Clause":n.License.BSD,MIT:n.License.MIT_X11,"Artistic-2.0":n.License.ARTISTIC,"GPL-2.0-only":n.License.GPL_2_0_ONLY,"GPL-3.0-only":n.License.GPL_3_0_ONLY,"LGPL-2.1-only":n.License.LGPL_2_1_ONLY,"LGPL-3.0-only":n.License.LGPL_3_0_ONLY,"AGPL-3.0-or-later":n.License.AGPL_3_0,"AGPL-3.0-only":n.License.AGPL_3_0_ONLY,"BSD-3-Clause":n.License.BSD_3,"Apache-2.0":n.License.APACHE_2_0,"MPL-2.0":n.License.MPL_2_0,"0BSD":n.License[`0BSD`],"GPL-2.0":n.License.GPL_2_0_ONLY,"GPL-3.0":n.License.GPL_3_0_ONLY};function licenseTypeFor(e){return dn[e]??n.License.CUSTOM}function hasAppdataConstructor(e=s){try{return typeof e?.AboutDialog?.new_from_appdata==`function`}catch{return!1}}function applyAppdataFields(e,t,n){return t.applicationId!==null&&(e.applicationIcon=t.applicationId),t.applicationName!==null&&(e.applicationName=t.applicationName),t.developerName!==null&&(e.developerName=t.developerName),t.website!==null&&(e.website=t.website),t.supportUrl!==null&&(e.supportUrl=t.supportUrl),t.issueUrl!==null&&(e.issueUrl=t.issueUrl),t.license!==null&&(e.licenseType=licenseTypeFor(t.license)),n!==void 0&&n!==``&&(e.releaseNotesVersion=n),t.releaseNotes!==null&&(e.releaseNotes=t.releaseNotes),t.version!==null&&(e.version=t.version),e}function buildAboutDialogFromAppdata(t,n={}){let r=parseAppdata(t,{locale:n.locale??appdataLocale(e.get_language_names(),{LANG:e.getenv(`LANG`)??void 0}),releaseNotesVersion:n.releaseNotesVersion});return applyAppdataFields(new s.AboutDialog,r,n.releaseNotesVersion)}function resourceExists(e){try{return r.resources_get_info(e,r.ResourceLookupFlags.NONE),!0}catch{return!1}}function readResource(e){try{let t=r.resources_lookup_data(e,r.ResourceLookupFlags.NONE);return new TextDecoder().decode(t.toArray())}catch{return null}}function readFile(t){try{let[n,r]=e.file_get_contents(t);return n?new TextDecoder().decode(r):null}catch{return null}}let fn=!1;function createAboutDialog(e={}){let{appdataResource:t,appdataPath:n,releaseNotesVersion:r}=e,i=t!==void 0&&resourceExists(t),o;if(!e.forceParsedAppdata&&i&&hasAppdataConstructor())o=s.AboutDialog.new_from_appdata(t,r??``);else{let c=(i?readResource(t):null)??(n===void 0?null:readFile(n));c===null?(v.error(`@gjsify/adwaita-app: no AppStream metainfo found for the About dialog; looked at resource ${t??`(none given)`} and file ${n??`(none given)`}`),o=new s.AboutDialog):(!fn&&!e.forceParsedAppdata&&i&&(fn=!0,v.log(`@gjsify/adwaita-app: Adw.AboutDialog.new_from_appdata is not in this GTK runtime (expected on Windows — gjsify/gjsify#1662); building the About dialog from the AppStream metainfo directly.`)),o=buildAboutDialogFromAppdata(c,{releaseNotesVersion:r}))}return e.applicationIcon!==void 0&&(o.applicationIcon=e.applicationIcon),e.version!==void 0&&(o.version=e.version),o}`application-x-executable.audio-volume-high.audio-volume-low.audio-volume-medium.audio-volume-muted.avatar-default.camera-photo.contact-new.dialog-error.dialog-warning.document-edit.document-open.document-save.edit-clear.edit-copy.edit-find.emblem-system.emoji-activities.emoji-body.emoji-flags.emoji-food.emoji-nature.emoji-objects.emoji-people.emoji-recent.emoji-symbols.emoji-travel.face-smile.folder.folder-documents.folder-download.folder-music.go-down.go-home.go-next.go-previous.go-up.image-missing.list-add.list-remove.mail-reply-sender.mail-send.mail-unread.media-eject.media-playback-pause.media-playback-start.media-playlist-repeat.network-wireless.open-menu.pan-down.pan-end.pan-end-rtl.preferences-system.printer.send-to.sidebar-show.starred.system-search.user-trash.value-decrease.value-increase.view-conceal.view-grid.view-list.view-more.view-paged.view-refresh.view-reveal.window-close.window-maximize.window-minimize.window-restore`.split(`.`);let Z=null;function registerBundledIconResource(){if(Z)return Z;let t=e.base64_decode(`R1ZhcmlhbnQAAAAAAAAAABgAAACkCQAAAAAAKFcAAAAAAAAAAQAAAAQAAAAFAAAABQAAAAUAAAAGAAAABgAAAAYAAAAIAAAACAAAAAkAAAALAAAACwAAAA0AAAANAAAADwAAAA8AAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGgAAABwAAAAeAAAAHwAAACIAAAAiAAAAIwAAACUAAAAlAAAAJQAAACYAAAAmAAAAJgAAACkAAAAqAAAALAAAACwAAAAtAAA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5bWJvbGljLnN2ZwAAAAAAAGADAAABAAAAeNptU12PozAMfN9fYeU9wUmcr1Xpw94vOe32SiW6rVpuqe7Xrx2goLtDIDkjz3g8wO7+dYTucDp2Q6tsvD4UfJ0O49vl0SoEBBv5VjCePoZuaXic+897q7phuL42zTiOZvTmcjs2DhEbFlT7F+Brd/05dPDRqjOQCWDhHTQaF1K2jqW5DtYmWwANlhRDFChhQm8ZcsWVWKAH7ZgsT6X7gtEFeBYrZA06Tz6Ja0OWGGT2Sv6XuzJWZCbiTNV/cf/nYDNYbybrDZ9ptgTPey+Vl4qoON5fP7ddA1ixP3CGxFGFanASWwdyTTGnMNfC9RIoirs5Mh9KXRInDYaieCRJmfsnKGPmNoaoRCw0LeBd1aNZKMdkM7fEOIVkMJdMxLFJHjl6l109dPzGIxHvWcNLUVauL8YRq9fls9jKC89KdmEzlaOax9pUYs7VgHik+uXIfqlmONkVQcmoSocamg7LxkmErIn1wEF5NiIBBik93J9HD9PZS/sCaUH0hjHdMoJ/EQW/Tn3fqvfft9vhc/hx6S831exfdvIn7L8BCyq1FQAodXVheSk=`);return Z=r.Resource.new_from_data(new e.Bytes(t)),r.resources_register(Z),Z}function addBundledIconsToTheme(e){registerBundledIconResource(),e.add_resource_path(`/eu/jumplink/gjsify/adwaita-app/icons`)}function installBundledIconTheme(e={}){let r=e.prefer??`fallback`;if(r===`host`)return!1;let i=e.display===void 0?t.Display.get_default():e.display;return i?(addBundledIconsToTheme(n.IconTheme.get_for_display(i)),r===`bundled`&&n.Settings.get_for_display(i).set_property(`gtk-icon-theme-name`,`gjsify-adwaita-bundled`),!0):!1}var pn=class AdwaitaApp extends s.Application{static{o.registerClass({GTypeName:`GjsifyAdwaitaApp`},AdwaitaApp)}constructor(e){super({application_id:e.applicationId,flags:e.flags??r.ApplicationFlags.DEFAULT_FLAGS}),this._window=null,this._options=e,this._initActions(),this.connect(`startup`,()=>this._onStartup()),this.connect(`activate`,()=>this._onActivate())}_initActions(){if(this._options.quitAction!==!1){let e=new r.SimpleAction({name:`quit`});e.connect(`activate`,()=>this.quit()),this.add_action(e),this.set_accels_for_action(`app.quit`,[`<primary>q`])}if(this._options.about||this._options.aboutAppdata){let e=new r.SimpleAction({name:`about`});e.connect(`activate`,()=>this._showAbout()),this.add_action(e)}}_onStartup(){this._installBundledIcons(),this._options.css&&this._loadCss(this._options.css),this._installDevtools(),this._options.onStartup?.(this)}_installBundledIcons(){let e=this._options.bundledIcons;e!==!1&&installBundledIconTheme(typeof e==`object`?e:{})}_loadCss(e){let r=t.Display.get_default();if(!r){v.error(`@gjsify/adwaita-app: no default display; CSS not applied`);return}let i=new n.CssProvider;i.load_from_string(e),n.StyleContext.add_provider_for_display(r,i,n.STYLE_PROVIDER_PRIORITY_APPLICATION)}_installDevtools(){let e=this._options.devtools;if(e===!1)return;let t=typeof e==`object`?e:{enabled:e||void 0};installDevtools(this,t)}_onActivate(){this._window||=this._options.createWindow(this),this._window.present()}_showAbout(){let e=this._options.aboutAppdata;if(e){createAboutDialog(e).present(this.get_active_window());return}let t=this._options.about;if(!t)return;let n=new s.AboutDialog({application_name:t.applicationName,application_icon:t.applicationIcon??this._options.applicationId});t.version&&(n.version=t.version),t.developerName&&(n.developer_name=t.developerName),t.website&&(n.website=t.website),t.issueUrl&&(n.issue_url=t.issueUrl),t.license&&(n.license=t.license),t.comments&&(n.comments=t.comments),t.copyright&&(n.copyright=t.copyright),t.developers?.length&&n.set_developers(t.developers),n.present(this.get_active_window())}};async function runApplication(e,t){let n=!1;try{e.register(null),n=e.get_is_remote()}catch{n=!1}let r=await e.runAsync(t);return n&&v.error(`${e.applicationId??`This application`} is already running — brought the existing instance to the front instead of opening a second window.`),r}o.type_ensure(pn.$gtype);var mn=class LoadingStack extends n.Stack{static{o.registerClass({GTypeName:`GjsifyLoadingStack`},LoadingStack)}constructor(e={}){super(e);let t=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,hexpand:!0,vexpand:!0});t.append(new s.Spinner),this.add_named(t,`loading`),this._content=new s.Bin({hexpand:!0,vexpand:!0}),this.add_named(this._content,`content`),this._error=new s.StatusPage({iconName:`dialog-error-symbolic`,title:`Something went wrong`}),this.add_named(this._error,`error`),this.set_visible_child_name(`loading`)}setContent(e){this._content.set_child(e)}setError(e,t){this._error.set_title(e),this._error.set_description(t??``)}showLoading(){this.set_visible_child_name(`loading`)}showContent(){this.set_visible_child_name(`content`)}showError(){this.set_visible_child_name(`error`)}};o.type_ensure(mn.$gtype);async function runStorybook(e){return runApplication(new sn(e),[c.programInvocationName,...c.programArgs])}const hn={title:`Buttons/Button Content`,description:`Adw.ButtonContent — pairs a symbolic icon with a label inside a Gtk.Button.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`Download`},{name:`iconName`,label:`Icon`,type:K.SELECT,options:[{label:`Download`,value:`folder-download-symbolic`},{label:`Add`,value:`list-add-symbolic`},{label:`Send`,value:`mail-send-symbolic`},{label:`Star`,value:`starred-symbolic`}],defaultValue:`folder-download-symbolic`},{name:`canShrink`,label:`Can shrink`,type:K.BOOLEAN,defaultValue:!1}]};var gn=__exportAll({ButtonContentStories:()=>vn,ButtonContentStory:()=>_n}),_n=class ButtonContentStory extends X{_content=null;_button=null;static{o.registerClass({GTypeName:`AdwStorybookButtonContent`},ButtonContentStory)}constructor(){super(X.fromMeta(ButtonContentStory.getMetadata(),`Default`))}static getMetadata(){return{...hn,component:s.ButtonContent.$gtype}}initialize(){this._content=new s.ButtonContent({label:this.args.label,iconName:this.args.iconName,canShrink:this.args.canShrink}),this._button=new n.Button({child:this._content}),this._button.add_css_class(`suggested-action`),this._button.add_css_class(`pill`),this.addContent(this._button)}updateArgs(e){this._content&&(this._content.label=this.args.label,this._content.iconName=this.args.iconName,this._content.canShrink=this.args.canShrink)}};o.type_ensure(_n.$gtype);const vn={stories:[_n]},yn={title:`Buttons/Button Styles`,description:`Buttons with Adwaita style classes: .pill, .circular, .suggested-action, .destructive-action, .flat.`,controls:[{name:`label`,label:`Demo label`,type:K.TEXT,defaultValue:`Click me`},{name:`style`,label:`Demo style`,type:K.SELECT,options:[{label:`Pill`,value:`pill`},{label:`Circular (icon)`,value:`circular`},{label:`Suggested`,value:`suggested-action`},{label:`Destructive`,value:`destructive-action`},{label:`Flat`,value:`flat`}],defaultValue:`suggested-action`}]};var bn=__exportAll({ButtonStylesStories:()=>Cn,ButtonStylesStory:()=>Sn});const xn=[`pill`,`circular`,`suggested-action`,`destructive-action`,`flat`];var Sn=class ButtonStylesStory extends X{_demo=null;static{o.registerClass({GTypeName:`AdwStorybookButtonStyles`},ButtonStylesStory)}constructor(){super(X.fromMeta(ButtonStylesStory.getMetadata(),`Default`))}static getMetadata(){return{...yn,component:n.Button.$gtype}}initialize(){let e=new s.WrapBox({childSpacing:12,lineSpacing:12,halign:n.Align.CENTER}),t=new n.Button({label:`Pill`});t.add_css_class(`pill`),e.append(t);let r=new n.Button({iconName:`list-add-symbolic`});r.add_css_class(`circular`),e.append(r);let i=new n.Button({label:`Suggested`});i.add_css_class(`suggested-action`),e.append(i);let o=new n.Button({label:`Delete`});o.add_css_class(`destructive-action`),e.append(o);let c=new n.Button({label:`Flat`});c.add_css_class(`flat`),e.append(c),this._demo=new n.Button({label:this.args.label}),this._applyStyle(this.args.style),e.append(this._demo),this.addContent(e)}_applyStyle(e){if(this._demo){for(let e of xn)this._demo.remove_css_class(e);this._demo.add_css_class(e)}}updateArgs(e){this._demo&&(this._demo.label=this.args.label,this._applyStyle(this.args.style))}};o.type_ensure(Sn.$gtype);const Cn={stories:[Sn]},wn={title:`Buttons/Color Dialog Button`,description:`Gtk.ColorDialogButton — a button that shows a colour and opens a chooser for it. It is insensitive until a dialog is set, and the swatch announces the channel percentages.`,controls:[{name:`rgba`,label:`Colour`,type:K.TEXT,defaultValue:`#3584e4`},{name:`title`,label:`Dialog title`,type:K.TEXT,defaultValue:`Choose a colour`}]};var Tn=__exportAll({ColorDialogButtonStories:()=>Dn,ColorDialogButtonStory:()=>En}),En=class ColorDialogButtonStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookColorDialogButton`},ColorDialogButtonStory)}constructor(){super(X.fromMeta(ColorDialogButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...wn,component:n.ColorDialogButton.$gtype}}initialize(){this._button=new n.ColorDialogButton({halign:n.Align.CENTER}),this._button.dialog=new n.ColorDialog,this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){if(!this._button)return;let e=new t.RGBA;e.parse(this.args.rgba)&&(this._button.rgba=e),this._button.dialog.title=this.args.title||``}};o.type_ensure(En.$gtype);const Dn={stories:[En]},On={title:`Buttons/Font Dialog Button`,description:`Gtk.FontDialogButton — a button that shows a font and opens a chooser for it. At level family the label is the family alone; from font up it is family plus size, and the size box appears.`,controls:[{name:`fontDesc`,label:`Font`,type:K.TEXT,defaultValue:`Sans Bold 12`},{name:`level`,label:`Level`,type:K.SELECT,options:[{label:`Family`,value:`family`},{label:`Face`,value:`face`},{label:`Font`,value:`font`},{label:`Features`,value:`features`}],defaultValue:`font`},{name:`useFont`,label:`Draw in the font`,type:K.BOOLEAN,defaultValue:!0},{name:`useSize`,label:`Draw in the size`,type:K.BOOLEAN,defaultValue:!0}]};var kn=__exportAll({FontDialogButtonStories:()=>jn,FontDialogButtonStory:()=>An}),An=class FontDialogButtonStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookFontDialogButton`},FontDialogButtonStory)}constructor(){super(X.fromMeta(FontDialogButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...On,component:n.FontDialogButton.$gtype}}initialize(){this._button=new n.FontDialogButton({halign:n.Align.CENTER}),this._button.dialog=new n.FontDialog,this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){if(!this._button)return;this._button.level=this.args.level;let e=l.FontDescription.from_string(this.args.fontDesc);e!==null&&(this._button.fontDesc=e),this._button.useFont=this.args.useFont,this._button.useSize=this.args.useSize}};o.type_ensure(An.$gtype);const jn={stories:[An]},Mn={title:`Buttons/Link Button`,description:`Gtk.LinkButton — a button that follows a URI. It is a Gtk.Button with a uri and a visited state: clicking launches the URI and marks the link visited, and pointing it somewhere new un-visits it.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`GNOME`},{name:`uri`,label:`URI`,type:K.TEXT,defaultValue:`https://gnome.org`},{name:`visited`,label:`Visited`,type:K.BOOLEAN,defaultValue:!1}]};var Nn=__exportAll({LinkButtonStories:()=>Fn,LinkButtonStory:()=>Pn}),Pn=class LinkButtonStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookLinkButton`},LinkButtonStory)}constructor(){super(X.fromMeta(LinkButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Mn,component:n.LinkButton.$gtype}}initialize(){this._button=new n.LinkButton({halign:n.Align.CENTER}),this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){if(!this._button)return;let e=this.args.label;this._button.label=e,this._button.uri=this.args.uri,this._button.visited=this.args.visited}};o.type_ensure(Pn.$gtype);const Fn={stories:[Pn]},In=[`Save as…`,`Export`,`Print`],Ln={title:`Buttons/Menu Button`,description:`Gtk.MenuButton — a button whose only action is to open a menu. Where a Split Button has a primary action beside its arrow, this one has none: every choice lives in the popover.`,controls:[{name:`iconName`,label:`Icon`,type:K.SELECT,options:[{label:`Hamburger`,value:`open-menu-symbolic`},{label:`More`,value:`view-more-symbolic`},{label:`Open`,value:`document-open-symbolic`}],defaultValue:`open-menu-symbolic`},{name:`menuTitle`,label:`Menu title`,type:K.TEXT,defaultValue:`Document`}]};var Rn=__exportAll({MenuButtonStories:()=>Bn,MenuButtonStory:()=>zn}),zn=class MenuButtonStory extends X{_widget=null;static{o.registerClass({GTypeName:`AdwStorybookMenuButton`},MenuButtonStory)}constructor(){super(X.fromMeta(MenuButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Ln,component:n.MenuButton.$gtype}}initialize(){this._widget=new n.MenuButton({halign:n.Align.CENTER}),this._apply(),this.addContent(this._widget)}updateArgs(e){this._apply()}_buildMenu(e){let t=new r.Menu;for(let e of In)t.append(e,`app.${e.toLowerCase().replace(/[^a-z]+/g,`-`)}`);let n=new r.Menu;return n.append_section(e.length>0?e:null,t),n}_apply(){this._widget&&(this._widget.iconName=this.args.iconName,this._widget.menuModel=this._buildMenu(this.args.menuTitle))}};o.type_ensure(zn.$gtype);const Bn={stories:[zn]},Vn=[`audio-volume-muted-symbolic`,`audio-volume-low-symbolic`,`audio-volume-high-symbolic`],Hn={title:`Buttons/Scale Button`,description:`Gtk.ScaleButton — a button whose press opens a scale. The icon follows the value: no list draws image-missing, one name is used throughout, two split the range, three put the first at the bottom and the second at the top and share the interior, five spread it.`,controls:[{name:`value`,label:`Value`,type:K.NUMBER,defaultValue:70},{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Vertical`,value:`vertical`},{label:`Horizontal`,value:`horizontal`}],defaultValue:`vertical`},{name:`hasFrame`,label:`Has frame`,type:K.BOOLEAN,defaultValue:!1}]};var Un=__exportAll({ScaleButtonStories:()=>Gn,ScaleButtonStory:()=>Wn}),Wn=class ScaleButtonStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookScaleButton`},ScaleButtonStory)}constructor(){super(X.fromMeta(ScaleButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Hn,component:n.ScaleButton.$gtype}}initialize(){this._button=new n.ScaleButton({halign:n.Align.CENTER}),this._button.icons=Vn,this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){this._button&&(this._button.orientation=this.args.orientation===`horizontal`?n.Orientation.HORIZONTAL:n.Orientation.VERTICAL,this._button.hasFrame=this.args.hasFrame,this._button.value=this.args.value)}};o.type_ensure(Wn.$gtype);const Gn={stories:[Wn]},Kn={title:`Buttons/Split Button`,description:`Adw.SplitButton — a primary action button paired with a dropdown menu of related actions.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`Save`},{name:`iconName`,label:`Icon`,type:K.SELECT,options:[{label:`None`,value:``},{label:`Save`,value:`document-save-symbolic`},{label:`Send`,value:`mail-send-symbolic`},{label:`Add`,value:`list-add-symbolic`}],defaultValue:`document-save-symbolic`}]},qn={title:`Buttons/Split Button Flat`,description:`Adw.SplitButton with the .flat style class, as used inside header bars and toolbars.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`Reply`},{name:`iconName`,label:`Icon`,type:K.SELECT,options:[{label:`None`,value:``},{label:`Reply`,value:`mail-reply-sender-symbolic`},{label:`Edit`,value:`document-edit-symbolic`},{label:`Open`,value:`document-open-symbolic`}],defaultValue:`mail-reply-sender-symbolic`}]};var Jn=__exportAll({SplitButtonFlatStory:()=>Xn,SplitButtonStories:()=>Zn,SplitButtonStory:()=>Yn});function buildMenu(){let e=new r.Menu;return e.append(`Save as…`,`app.save-as`),e.append(`Export`,`app.export`),e.append(`Print`,`app.print`),e}var Yn=class SplitButtonStory extends X{_widget=null;static{o.registerClass({GTypeName:`AdwStorybookSplitButton`},SplitButtonStory)}constructor(){super(X.fromMeta(SplitButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Kn,component:s.SplitButton.$gtype}}initialize(){this._widget=new s.SplitButton({label:this.args.label,menuModel:buildMenu()});let e=this.args.iconName;e&&(this._widget.iconName=e),this.addContent(this._widget)}updateArgs(e){if(!this._widget)return;let t=this.args.iconName;t?this._widget.iconName=t:this._widget.label=this.args.label}};o.type_ensure(Yn.$gtype);var Xn=class SplitButtonFlatStory extends X{_widget=null;static{o.registerClass({GTypeName:`AdwStorybookSplitButtonFlat`},SplitButtonFlatStory)}constructor(){super(X.fromMeta(SplitButtonFlatStory.getMetadata(),`Default`))}static getMetadata(){return{...qn,component:s.SplitButton.$gtype}}initialize(){this._widget=new s.SplitButton({label:this.args.label,menuModel:buildMenu()}),this._widget.add_css_class(`flat`);let e=this.args.iconName;e&&(this._widget.iconName=e),this.addContent(this._widget)}updateArgs(e){if(!this._widget)return;let t=this.args.iconName;t?this._widget.iconName=t:this._widget.label=this.args.label}};o.type_ensure(Xn.$gtype);const Zn={stories:[Yn,Xn]},Qn={title:`Buttons/Toggle Button`,description:`Gtk.ToggleButton — a button that stays pressed. It is a Gtk.Button with one more property, active, so every button style class applies; Adw.ToggleGroup is the linked, single-choice form of it.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`Mute`},{name:`active`,label:`Active`,type:K.BOOLEAN,defaultValue:!1},{name:`flat`,label:`Flat`,type:K.BOOLEAN,defaultValue:!1}]};var $n=__exportAll({ToggleButtonStories:()=>tr,ToggleButtonStory:()=>er}),er=class ToggleButtonStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookToggleButton`},ToggleButtonStory)}constructor(){super(X.fromMeta(ToggleButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Qn,component:n.ToggleButton.$gtype}}initialize(){this._button=new n.ToggleButton({halign:n.Align.CENTER}),this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){this._button&&(this._button.label=this.args.label,this._button.active=this.args.active,this.args.flat?this._button.add_css_class(`flat`):this._button.remove_css_class(`flat`))}};o.type_ensure(er.$gtype);const tr={stories:[er]},nr={title:`Buttons/Toggle Group`,description:`Adw.ToggleGroup — a linked group of Adw.Toggle buttons where exactly one is active.`,controls:[{name:`active`,label:`Active toggle`,type:K.SELECT,options:[{label:`List`,value:0},{label:`Grid`,value:1},{label:`Columns`,value:2}],defaultValue:0},{name:`style`,label:`Style`,type:K.SELECT,options:[{label:`Default`,value:`default`},{label:`Flat`,value:`flat`},{label:`Round`,value:`round`}],defaultValue:`default`}]};var rr=__exportAll({ToggleGroupStories:()=>or,ToggleGroupStory:()=>ar});const ir=[`flat`,`round`];var ar=class ToggleGroupStory extends X{_toggleGroup=null;static{o.registerClass({GTypeName:`AdwStorybookToggleGroup`},ToggleGroupStory)}constructor(){super(X.fromMeta(ToggleGroupStory.getMetadata(),`Default`))}static getMetadata(){return{...nr,component:s.ToggleGroup.$gtype}}initialize(){this._toggleGroup=new s.ToggleGroup,this._toggleGroup.add(new s.Toggle({label:`List`,iconName:`view-list-symbolic`})),this._toggleGroup.add(new s.Toggle({label:`Grid`,iconName:`view-grid-symbolic`})),this._toggleGroup.add(new s.Toggle({label:`Columns`,iconName:`view-columns-symbolic`})),this._toggleGroup.active=this.args.active,this._applyStyle(this.args.style),this.addContent(this._toggleGroup)}_applyStyle(e){if(this._toggleGroup){for(let e of ir)this._toggleGroup.remove_css_class(e);e!=="default"&&this._toggleGroup.add_css_class(e)}}updateArgs(e){this._toggleGroup&&(this._toggleGroup.active=this.args.active,this._applyStyle(this.args.style))}};o.type_ensure(ar.$gtype);const or={stories:[ar]},sr={title:`Controls/Check Button`,description:`Gtk.CheckButton — a label beside an indicator, with a third "in between" state for a selection that is only partly made. The browser element spells the two states checked and indeterminate, the words the Adwaita stylesheet selects on; the grouped, single-choice form is Adw.Radio.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`Enable networking`},{name:`checked`,label:`Checked`,type:K.BOOLEAN,defaultValue:!0},{name:`indeterminate`,label:`Indeterminate`,type:K.BOOLEAN,defaultValue:!1},{name:`disabled`,label:`Disabled`,type:K.BOOLEAN,defaultValue:!1}]};var cr=__exportAll({CheckButtonStories:()=>ur,CheckButtonStory:()=>lr}),lr=class CheckButtonStory extends X{_box=null;_button=null;static{o.registerClass({GTypeName:`AdwStorybookCheckButton`},CheckButtonStory)}constructor(){super(X.fromMeta(CheckButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...sr,component:n.CheckButton.$gtype}}initialize(){this._button=new n.CheckButton,this._box=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,halign:n.Align.CENTER}),this._box.append(this._button),this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){this._button&&(this._button.label=this.args.label,this._button.active=this.args.checked,this._button.inconsistent=this.args.indeterminate,this._button.sensitive=!this.args.disabled)}};o.type_ensure(lr.$gtype);const ur={stories:[lr]},dr=[`Automatic`,`Always`,`Never`,`When busy`],fr={title:`Controls/Drop Down`,description:`Gtk.DropDown — pick one value from a list. The button shows the selection; the list opens in a popover. Adw.ComboRow is the same choice presented as a boxed-list row.`,controls:[{name:`selected`,label:`Selected`,type:K.SELECT,options:dr.map((e,t)=>({label:e,value:t})),defaultValue:0},{name:`enableSearch`,label:`Search field`,type:K.BOOLEAN,defaultValue:!1}]};var pr=__exportAll({DropDownStories:()=>hr,DropDownStory:()=>mr}),mr=class DropDownStory extends X{_dropDown=null;static{o.registerClass({GTypeName:`AdwStorybookDropDown`},DropDownStory)}constructor(){super(X.fromMeta(DropDownStory.getMetadata(),`Default`))}static getMetadata(){return{...fr,component:n.DropDown.$gtype}}initialize(){this._dropDown=n.DropDown.new_from_strings([...dr]),this._dropDown.expression=n.PropertyExpression.new(n.StringObject.$gtype,null,`string`),this._dropDown.halign=n.Align.CENTER,this._apply(),this.addContent(this._dropDown)}updateArgs(e){this._apply()}_apply(){this._dropDown&&(this._dropDown.selected=this.args.selected,this._dropDown.enableSearch=this.args.enableSearch)}};o.type_ensure(mr.$gtype);const hr={stories:[mr]},gr={title:`Controls/Entry`,description:`Gtk.Entry — a single-line text field. Libadwaita ships no AdwEntry; the Adwaita look is the GTK entry styled by the stylesheet, which is why the row variants (Entry Row, Password Entry Row) are the widgets with an Adw prefix.`,controls:[{name:`text`,label:`Text`,type:K.TEXT,defaultValue:``},{name:`placeholder`,label:`Placeholder`,type:K.TEXT,defaultValue:`Search files…`},{name:`editable`,label:`Editable`,type:K.BOOLEAN,defaultValue:!0}]};var _r=__exportAll({EntryStories:()=>yr,EntryStory:()=>vr}),vr=class EntryStory extends X{_entry=null;static{o.registerClass({GTypeName:`AdwStorybookEntry`},EntryStory)}constructor(){super(X.fromMeta(EntryStory.getMetadata(),`Default`))}static getMetadata(){return{...gr,component:n.Entry.$gtype}}initialize(){this._entry=new n.Entry({widthRequest:280,halign:n.Align.CENTER}),this._apply(),this.addContent(this._entry)}updateArgs(e){this._apply()}_apply(){this._entry&&(this._entry.text=this.args.text,this._entry.placeholderText=this.args.placeholder,this._entry.editable=this.args.editable)}};o.type_ensure(vr.$gtype);const yr={stories:[vr]},br={title:`Controls/Spinner (GTK)`,description:`Gtk.Spinner — GTK's own busy indicator: a faint ring with a quarter arc turning around it, sized by its allocation. Adw.Spinner is the libadwaita replacement and looks different; under reduced motion GTK swaps this one for a static hourglass, which Adw.Spinner deliberately does not do.`,controls:[{name:`size`,label:`Size (px)`,type:K.RANGE,min:16,max:64,step:4,defaultValue:32},{name:`spinning`,label:`Spinning`,type:K.BOOLEAN,defaultValue:!0},{name:`disabled`,label:`Disabled`,type:K.BOOLEAN,defaultValue:!1}]};var xr=__exportAll({GtkSpinnerStories:()=>Cr,GtkSpinnerStory:()=>Sr}),Sr=class GtkSpinnerStory extends X{_spinner=null;static{o.registerClass({GTypeName:`AdwStorybookGtkSpinner`},GtkSpinnerStory)}constructor(){super(X.fromMeta(GtkSpinnerStory.getMetadata(),`Default`))}static getMetadata(){return{...br,component:n.Spinner.$gtype}}initialize(){this._spinner=new n.Spinner({halign:n.Align.CENTER,valign:n.Align.CENTER}),this._apply(),this.addContent(this._spinner)}updateArgs(e){this._apply()}_apply(){if(!this._spinner)return;let e=this.args.size;this._spinner.widthRequest=e,this._spinner.heightRequest=e,this.args.spinning?this._spinner.start():this._spinner.stop(),this._spinner.sensitive=!this.args.disabled}};o.type_ensure(Sr.$gtype);const Cr={stories:[Sr]},wr={title:`Controls/Level Bar`,description:"Gtk.LevelBar — how full something is, over an interval that need not be 0…1: a password strength meter, a battery. `mode` decides one filled level or one block per unit, and the block takes a class from the nearest OFFSET (low, high, full by default), which is how libadwaita colours it and how an application adds a colour of its own.",controls:[{name:`value`,label:`Value`,type:K.RANGE,min:0,max:1,step:.05,defaultValue:.8},{name:`maxValue`,label:`Max value`,type:K.RANGE,min:1,max:5,step:1,defaultValue:5},{name:`mode`,label:`Mode`,type:K.SELECT,options:[{label:`Continuous`,value:`continuous`},{label:`Discrete`,value:`discrete`}],defaultValue:`continuous`},{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`inverted`,label:`Inverted`,type:K.BOOLEAN,defaultValue:!1}]};var Tr=__exportAll({LevelBarStories:()=>Dr,LevelBarStory:()=>Er}),Er=class LevelBarStory extends X{_box=null;_bar=null;static{o.registerClass({GTypeName:`AdwStorybookLevelBar`},LevelBarStory)}constructor(){super(X.fromMeta(LevelBarStory.getMetadata(),`Default`))}static getMetadata(){return{...wr,component:n.LevelBar.$gtype}}initialize(){this._bar=new n.LevelBar,this._box=new n.Box({halign:n.Align.CENTER,valign:n.Align.CENTER}),this._box.append(this._bar),this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){if(!this._bar)return;let e=this.args.orientation===`vertical`;this._bar.orientation=e?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL,this._bar.widthRequest=e?0:200,this._bar.heightRequest=e?120:0,this._bar.max_value=this.args.maxValue,this._bar.mode=this.args.mode===`discrete`?n.LevelBarMode.DISCRETE:n.LevelBarMode.CONTINUOUS,this._bar.value=this.args.value,this._bar.inverted=this.args.inverted}};o.type_ensure(Er.$gtype);const Dr={stories:[Er]},Or={title:`Controls/Password Entry`,description:`Gtk.PasswordEntry — a field for a secret: masked, no copy, a Caps Lock warning while it has focus, and show-peek-icon for a button that reveals it for one look. Adw.PasswordEntryRow is the boxed-list row built on it. Press the peek button, or Caps Lock on the keyboard, to see both states.`,controls:[{name:`showPeekIcon`,label:`Show peek icon`,type:K.BOOLEAN,defaultValue:!0},{name:`placeholderText`,label:`Placeholder`,type:K.TEXT,defaultValue:`Password`},{name:`disabled`,label:`Disabled`,type:K.BOOLEAN,defaultValue:!1}]};var kr=__exportAll({PasswordEntryStories:()=>jr,PasswordEntryStory:()=>Ar}),Ar=class PasswordEntryStory extends X{_entry=null;static{o.registerClass({GTypeName:`AdwStorybookPasswordEntry`},PasswordEntryStory)}constructor(){super(X.fromMeta(PasswordEntryStory.getMetadata(),`Default`))}static getMetadata(){return{...Or,component:n.PasswordEntry.$gtype}}initialize(){this._entry=new n.PasswordEntry({showPeekIcon:!0,widthRequest:240,halign:n.Align.CENTER}),this._apply(),this.addContent(this._entry)}updateArgs(e){this._apply()}_apply(){this._entry&&(this._entry.show_peek_icon=this.args.showPeekIcon,this._entry.placeholder_text=this.args.placeholderText,this._entry.sensitive=!this.args.disabled)}};o.type_ensure(Ar.$gtype);const jr={stories:[Ar]},Mr={title:`Controls/Progress Bar`,description:"Gtk.ProgressBar — how much of a long operation is done. `fraction` is 0…1, `pulsing` is the indeterminate mode where the app knows it is busy but not how far along it is, and `osd` is libadwaita's hairline variant for under a header bar. Adw.Spinner is the size-less sibling.",controls:[{name:`fraction`,label:`Fraction`,type:K.RANGE,min:0,max:1,step:.05,defaultValue:.4},{name:`pulsing`,label:`Pulsing (indeterminate)`,type:K.BOOLEAN,defaultValue:!1},{name:`showText`,label:`Show text`,type:K.BOOLEAN,defaultValue:!0},{name:`inverted`,label:`Inverted`,type:K.BOOLEAN,defaultValue:!1},{name:`osd`,label:`OSD (hairline)`,type:K.BOOLEAN,defaultValue:!1}]};var Nr=__exportAll({ProgressBarStories:()=>Fr,ProgressBarStory:()=>Pr}),Pr=class ProgressBarStory extends X{_box=null;_bar=null;static{o.registerClass({GTypeName:`AdwStorybookProgressBar`},ProgressBarStory)}constructor(){super(X.fromMeta(ProgressBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Mr,component:n.ProgressBar.$gtype}}initialize(){this._bar=new n.ProgressBar,this._box=new n.Box({spacing:12,halign:n.Align.CENTER}),this._box.append(this._bar),this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){this._bar&&(this.args.pulsing?this._bar.pulse():this._bar.set_fraction(this.args.fraction),this._bar.show_text=this.args.showText,this._bar.inverted=this.args.inverted,this.args.osd?this._bar.add_css_class(`osd`):this._bar.remove_css_class(`osd`))}};o.type_ensure(Pr.$gtype);const Fr={stories:[Pr]},Ir={title:`Controls/Scale`,description:`Gtk.Scale — a slider. Gtk.Scale extends Gtk.Range, which is abstract: the range itself has no tag, its adjustment, value, inverted and fill level are this widget’s properties. draw-value shows the number beside the knob at the value-pos you name, and the .value style class dims it.`,controls:[{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`valuePos`,label:`Value position`,type:K.SELECT,options:[{label:`Top`,value:`top`},{label:`Bottom`,value:`bottom`},{label:`Left`,value:`left`},{label:`Right`,value:`right`}],defaultValue:`top`},{name:`drawValue`,label:`Draw value`,type:K.BOOLEAN,defaultValue:!0},{name:`digits`,label:`Digits`,type:K.NUMBER,defaultValue:0},{name:`inverted`,label:`Inverted`,type:K.BOOLEAN,defaultValue:!1},{name:`hasOrigin`,label:`Has origin`,type:K.BOOLEAN,defaultValue:!0},{name:`value`,label:`Value`,type:K.NUMBER,defaultValue:40}]};var Lr=__exportAll({ScaleStories:()=>zr,ScaleStory:()=>Rr}),Rr=class ScaleStory extends X{_scale=null;_adjustment=null;static{o.registerClass({GTypeName:`AdwStorybookScale`},ScaleStory)}constructor(){super(X.fromMeta(ScaleStory.getMetadata(),`Default`))}static getMetadata(){return{...Ir,component:n.Scale.$gtype}}initialize(){this._adjustment=new n.Adjustment({value:40,lower:0,upper:100,stepIncrement:1,pageIncrement:10}),this._scale=new n.Scale({adjustment:this._adjustment,digits:0,drawValue:!0,widthRequest:260,valign:n.Align.CENTER}),this._apply(),this.addContent(this._scale)}updateArgs(e){this._apply()}_apply(){if(!this._scale||!this._adjustment)return;this._scale.orientation=this.args.orientation===`vertical`?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL;let e={top:n.PositionType.TOP,bottom:n.PositionType.BOTTOM,left:n.PositionType.LEFT,right:n.PositionType.RIGHT};this._scale.value_pos=e[this.args.valuePos]??n.PositionType.TOP,this._scale.draw_value=this.args.drawValue,this._scale.digits=this.args.digits,this._scale.inverted=this.args.inverted,this._scale.has_origin=this.args.hasOrigin,this._adjustment.set_value(this.args.value)}};o.type_ensure(Rr.$gtype);const zr={stories:[Rr]},Br={title:`Controls/Search Entry`,description:`Gtk.SearchEntry — a field for typing a query. A search glyph leads while it is empty and a clear button follows once it is not, and search-changed waits out search-delay so a filter is not driven by every keystroke. Escape is stop-search, Ctrl+G is next-match.`,controls:[{name:`searchDelay`,label:`Search delay (ms)`,type:K.NUMBER,defaultValue:150},{name:`placeholderText`,label:`Placeholder`,type:K.TEXT,defaultValue:`Search…`},{name:`disabled`,label:`Disabled`,type:K.BOOLEAN,defaultValue:!1}]};var Vr=__exportAll({SearchEntryStories:()=>Ur,SearchEntryStory:()=>Hr}),Hr=class SearchEntryStory extends X{_entry=null;_label=null;_handler=0;static{o.registerClass({GTypeName:`AdwStorybookSearchEntry`},SearchEntryStory)}constructor(){super(X.fromMeta(SearchEntryStory.getMetadata(),`Default`))}static getMetadata(){return{...Br,component:n.SearchEntry.$gtype}}initialize(){this._entry=new n.SearchEntry({widthRequest:260,halign:n.Align.CENTER}),this._label=new n.Label({label:`search-changed has not fired yet`}),this._handler=this._entry.connect(`search-changed`,()=>{this._label&&(this._label.label=`search-changed: "${this._entry?.text??``}"`)}),this._apply();let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12});e.append(this._entry),e.append(this._label),this.addContent(e)}updateArgs(e){this._apply()}_apply(){this._entry&&(this._entry.search_delay=this.args.searchDelay,this._entry.placeholder_text=this.args.placeholderText,this._entry.sensitive=!this.args.disabled)}};o.type_ensure(Hr.$gtype);const Ur={stories:[Hr]},Wr={title:`Controls/Spin Button`,description:`Gtk.SpinButton — a number field with an arrow either side of it. The range is a Gtk.Adjustment, the typed value is clamped into it (or left alone, under update-policy if-valid), and numeric refuses anything that is not a number. Adw.SpinRow is the boxed-list row that wraps this same widget.`,controls:[{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`digits`,label:`Digits`,type:K.NUMBER,defaultValue:0},{name:`numeric`,label:`Numeric`,type:K.BOOLEAN,defaultValue:!1},{name:`snapToTicks`,label:`Snap to ticks`,type:K.BOOLEAN,defaultValue:!1},{name:`wrap`,label:`Wrap`,type:K.BOOLEAN,defaultValue:!1},{name:`updatePolicy`,label:`Update policy`,type:K.SELECT,options:[{label:`Always`,value:`always`},{label:`If valid`,value:`if-valid`}],defaultValue:`always`},{name:`value`,label:`Value`,type:K.NUMBER,defaultValue:5}]};var Gr=__exportAll({SpinButtonStories:()=>qr,SpinButtonStory:()=>Kr}),Kr=class SpinButtonStory extends X{_spin=null;_adjustment=null;static{o.registerClass({GTypeName:`AdwStorybookSpinButton`},SpinButtonStory)}constructor(){super(X.fromMeta(SpinButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Wr,component:n.SpinButton.$gtype}}initialize(){this._adjustment=new n.Adjustment({value:5,lower:0,upper:10,stepIncrement:1,pageIncrement:2}),this._spin=new n.SpinButton({adjustment:this._adjustment,digits:0,halign:n.Align.CENTER}),this._apply(),this.addContent(this._spin)}updateArgs(e){this._apply()}_apply(){!this._spin||!this._adjustment||(this._spin.orientation=this.args.orientation===`vertical`?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL,this._spin.digits=this.args.digits,this._spin.numeric=this.args.numeric,this._spin.snap_to_ticks=this.args.snapToTicks,this._spin.wrap=this.args.wrap,this._spin.update_policy=this.args.updatePolicy===`if-valid`?n.SpinButtonUpdatePolicy.IF_VALID:n.SpinButtonUpdatePolicy.ALWAYS,this._adjustment.set_value(this.args.value))}};o.type_ensure(Kr.$gtype);const qr={stories:[Kr]},Jr={title:`Controls/Switch`,description:`Gtk.Switch — a light switch with two states that are NOT the same thing: active is where the user put it, state is what the switched thing currently is, which is how a change that takes a while looks like a pending one. Adw.SwitchRow is the same control with a title beside it.`,controls:[{name:`active`,label:`Active`,type:K.BOOLEAN,defaultValue:!0},{name:`state`,label:`State (the backend)`,type:K.BOOLEAN,defaultValue:!0},{name:`disabled`,label:`Disabled`,type:K.BOOLEAN,defaultValue:!1}]};var Yr=__exportAll({SwitchStories:()=>Zr,SwitchStory:()=>Xr}),Xr=class SwitchStory extends X{_switch=null;static{o.registerClass({GTypeName:`AdwStorybookSwitch`},SwitchStory)}constructor(){super(X.fromMeta(SwitchStory.getMetadata(),`Default`))}static getMetadata(){return{...Jr,component:n.Switch.$gtype}}initialize(){this._switch=new n.Switch({halign:n.Align.CENTER}),this._apply(),this.addContent(this._switch)}updateArgs(e){this._apply()}_apply(){this._switch&&(this._switch.active=this.args.active,this._switch.state=this.args.state,this._switch.sensitive=!this.args.disabled)}};o.type_ensure(Xr.$gtype);const Zr={stories:[Xr]},Qr={title:`Drawing/Drag Icon`,description:"Gtk.DragIcon — the widget that follows the pointer while a drag is in flight, and is destroyed with the drag. No application builds one: `get_for_drag` returns the icon a drag is using, and the drag source sets its child. What it takes as that child is the interesting part, because `create_widget_for_value` answers for six kinds of value and a drag source that offers a string gets a label and one that offers a colour gets a swatch. A drag icon takes no input at all, which is the C's own note: 'drag icons do not allow user input'.",controls:[{name:`value`,label:`Value being dragged`,type:K.SELECT,options:[{label:`A string (a Gtk.Label)`,value:`string`},{label:`A GdkRGBA (a colour swatch)`,value:`rgba`},{label:`A content provider only (no icon)`,value:`none`}],defaultValue:`string`},{name:`actions`,label:`Drag actions`,type:K.SELECT,options:[{label:`Copy`,value:`copy`},{label:`Move`,value:`move`}],defaultValue:`copy`}]};var $r=__exportAll({DragIconStories:()=>ti,DragIconStory:()=>ei}),ei=class DragIconStory extends X{_row=null;_source=null;_hint=null;static{o.registerClass({GTypeName:`AdwStorybookDragIcon`},DragIconStory)}constructor(){super(X.fromMeta(DragIconStory.getMetadata(),`Default`))}static getMetadata(){return{...Qr,component:n.DragIcon.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,halign:n.Align.CENTER,valign:n.Align.CENTER});this._hint=new n.Label({label:`Drag the row and watch the pointer`}),this._hint.add_css_class(`dim-label`),this._row=new n.Box({orientation:n.Orientation.HORIZONTAL,spacing:12,cssClasses:[`card`]}),this._row.append(this._buildLabel()),this._source=n.DragSource.new(),this._source.actions=this.args.actions===`move`?t.DragAction.MOVE:t.DragAction.COPY,this._source.connect(`prepare`,()=>this._contentProvider()),this._source.connect(`drag-begin`,(e,t)=>this._setIcon(t)),this._row.add_controller(this._source),this._apply(),e.append(this._hint),e.append(this._row),this.addContent(e)}updateArgs(e){this._source!==null&&(this._source.actions=this.args.actions===`move`?t.DragAction.MOVE:t.DragAction.COPY,this._apply())}_value(){switch(this.args.value){case`rgba`:return{red:.25,green:.55,blue:.95,alpha:1};case`none`:return null;default:return`Report.odt`}}_contentProvider(){let e=this._value();return e===null?null:t.ContentProvider.new_for_value(e)}_setIcon(e){let t=this._value(),r=n.DragIcon.get_for_drag(e),i=t===null?null:n.DragIcon.create_widget_for_value(t);r.set_child(i)}_buildLabel(){return new n.Label({label:`Report.odt`,cssClasses:[`heading`]})}_apply(){this._hint!==null&&(this._hint.label=this.args.value===`none`?`Drag the row — no icon, because the value has no widget to show`:`Drag the row and watch the pointer`)}};o.type_ensure(ei.$gtype);const ti={stories:[ei]},ni={title:`Drawing/Drawing Area`,description:"Gtk.DrawingArea — a blank widget that owns a size and a callback and nothing else: whatever you see is what `set_draw_func` painted. `content-width` and `content-height` are the MINIMUM and natural size at once, so a parent can hand the area more room but never less; at 0 the area has no intrinsic size at all and fills whatever it is given.",controls:[{name:`contentWidth`,label:`Content width`,type:K.RANGE,min:0,max:320,step:16,defaultValue:160},{name:`contentHeight`,label:`Content height`,type:K.RANGE,min:0,max:320,step:16,defaultValue:120},{name:`shape`,label:`Shape`,type:K.SELECT,options:[{label:`Circle`,value:`circle`},{label:`Grid`,value:`grid`},{label:`Crosshair`,value:`crosshair`}],defaultValue:`circle`}]};var ri=__exportAll({DrawingAreaStories:()=>ai,DrawingAreaStory:()=>ii}),ii=class DrawingAreaStory extends X{_box=null;_area=null;static{o.registerClass({GTypeName:`AdwStorybookDrawingArea`},DrawingAreaStory)}constructor(){super(X.fromMeta(DrawingAreaStory.getMetadata(),`Default`))}static getMetadata(){return{...ni,component:n.DrawingArea.$gtype}}initialize(){this._area=new n.DrawingArea,this._area.set_draw_func((e,t,n,r)=>{let i=e.get_color();switch(t.setSourceRGBA(i.red,i.green,i.blue,i.alpha),t.rectangle(0,0,n,r),t.fill(),t.setSourceRGBA(1-i.red,1-i.green,1-i.blue,i.alpha),this.args.shape){case`grid`:for(let e=0;e<n;e+=16)t.rectangle(e,0,8,r),t.fill();break;case`crosshair`:t.rectangle(n/2-1,0,2,r),t.rectangle(0,r/2-1,n,2),t.fill();break;default:t.arc(n/2,r/2,Math.min(n,r)/2,0,2*Math.PI),t.fill();break}}),this._box=new n.Box({halign:n.Align.CENTER,valign:n.Align.CENTER}),this._box.append(this._area),this._apply(),this.addContent(this._box)}updateArgs(e){this._area?.queue_draw(),this._apply()}_apply(){this._area&&(this._area.content_width=this.args.contentWidth,this._area.content_height=this.args.contentHeight)}};o.type_ensure(ii.$gtype);const ai={stories:[ii]},oi={title:`Drawing/GL Area`,description:"Gtk.GLArea — a widget whose contents are drawn on a GPU. GTK emits `::resize` before the first `::render` and the render flag is cleared AFTER the signal, so a handler may queue another frame with `queue_render()`. Here the replica is a `<canvas>` with a real WebGL context: the browser has no desktop GL, so `api` always reports the ES flavour it was given.",controls:[{name:`autoRender`,label:`Auto render`,type:K.BOOLEAN,defaultValue:!0},{name:`hasDepthBuffer`,label:`Depth buffer`,type:K.BOOLEAN,defaultValue:!1},{name:`allowedApis`,label:`Allowed APIs`,type:K.SELECT,options:[{label:`GL and GLES (default)`,value:`gl gles`},{label:`GLES only`,value:`gles`},{label:`GL only`,value:`gl`}],defaultValue:`gl gles`},{name:`spinning`,label:`Spin the triangle`,type:K.BOOLEAN,defaultValue:!0}]};var si=__exportAll({GLAreaStories:()=>li,GLAreaStory:()=>ci}),ci=class GLAreaStory extends X{_area=null;_readout=null;_box=null;_tick=0;_renders=0;_viewport=`—`;static{o.registerClass({GTypeName:`AdwStorybookGLArea`},GLAreaStory)}constructor(){super(X.fromMeta(GLAreaStory.getMetadata(),`Default`))}static getMetadata(){return{...oi,component:n.GLArea.$gtype}}initialize(){this._area=new n.GLArea({widthRequest:240,heightRequest:160}),this._readout=new n.Label({label:`—`}),this._readout.add_css_class(`dimmed`),this._area.connect(`resize`,(e,t,n)=>{this._viewport=`${t} × ${n}`,this._refresh()}),this._area.connect(`render`,()=>{this._renders+=1,this._refresh()}),this._box=new n.Box({orientation:n.Orientation.VERTICAL,spacing:6}),this._box.append(this._area),this._box.append(this._readout),this._apply(),this.addContent(this._box)}updateArgs(e){this._stop(),this._apply(),this._start()}_apply(){this._area&&(this._area.allowed_apis=this.args.allowedApis===`gles`?t.GLAPI.GLES:t.GLAPI.GL|t.GLAPI.GLES,this._area.auto_render=this.args.autoRender,this._area.has_depth_buffer=this.args.hasDepthBuffer)}_start(){!this._area||!this.args.spinning||(this._tick=e.timeout_add(e.PRIORITY_DEFAULT,33,()=>(this._area?.queue_render(),e.SOURCE_CONTINUE)))}_stop(){this._tick!==0&&(e.source_remove(this._tick),this._tick=0)}_refresh(){this._readout&&(this._readout.label=`viewport ${this._viewport} device px · ${this._renders} renders`)}};o.type_ensure(ci.$gtype);const li={stories:[ci]},ui={title:`Drawing/Graphics Offload`,description:"Gtk.GraphicsOffload — a wrapper that asks the compositor to take its ONE child as it is, which is worth doing for content that changes every frame. `enabled` says whether it is attempted, and `black-background` paints the letterbox bars. The passthrough itself is the platform's: no browser API hands a surface to a compositor, so the replica carries the enum, the black rectangle and the bin layout, and says plainly which part is missing.",controls:[{name:`enabled`,label:`Enabled`,type:K.SELECT,options:[{label:`Enabled (default)`,value:`enabled`},{label:`Disabled`,value:`disabled`}],defaultValue:`enabled`},{name:`blackBackground`,label:`Black background`,type:K.BOOLEAN,defaultValue:!1},{name:`child`,label:`Child`,type:K.SELECT,options:[{label:`Label`,value:`label`},{label:`Image`,value:`image`},{label:`Row of labels`,value:`box`}],defaultValue:`image`}]};var di=__exportAll({GraphicsOffloadStories:()=>pi,GraphicsOffloadStory:()=>fi}),fi=class GraphicsOffloadStory extends X{_offload=null;_box=null;static{o.registerClass({GTypeName:`AdwStorybookGraphicsOffload`},GraphicsOffloadStory)}constructor(){super(X.fromMeta(GraphicsOffloadStory.getMetadata(),`Default`))}static getMetadata(){return{...ui,component:n.GraphicsOffload.$gtype}}initialize(){this._offload=new n.GraphicsOffload({widthRequest:280,heightRequest:96}),this._offload.enabled=+(this.args.enabled===`disabled`),this._offload.black_background=this.args.blackBackground,this._box=new n.Box({halign:n.Align.CENTER,valign:n.Align.CENTER}),this._box.append(this._offload),this._applyChild(),this.addContent(this._box)}updateArgs(e){this._offload&&(this._offload.enabled=+(this.args.enabled===`disabled`),this._offload.black_background=this.args.blackBackground,this._applyChild())}_applyChild(){if(!this._offload)return;let e;switch(this.args.child){case`label`:e=new n.Label({label:`The child of an offloaded layer`});break;case`box`:{let t=new n.Box({orientation:n.Orientation.HORIZONTAL,spacing:12});for(let e of[`One`,`Two`,`Three`])t.append(new n.Label({label:e}));e=new n.CenterBox,e.set_center_widget(t);break}default:e=new n.Image({iconName:`camera-photo-symbolic`,pixelSize:48});break}this._offload.child=e}};o.type_ensure(fi.$gtype);const pi={stories:[fi]},mi={title:`Feedback/About Dialog`,description:`Adw.AboutDialog — the standard Adwaita about window with application name, version, credits and license.`,controls:[{name:`applicationName`,label:`Application name`,type:K.TEXT,defaultValue:`Adwaita Storybook`},{name:`version`,label:`Version`,type:K.TEXT,defaultValue:`0.11.0`}]};var hi=__exportAll({AboutDialogStories:()=>_i,AboutDialogStory:()=>gi}),gi=class AboutDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookAboutDialog`},AboutDialogStory)}constructor(){super(X.fromMeta(AboutDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...mi,component:s.AboutDialog.$gtype}}initialize(){this._button=new n.Button({label:`Show dialog`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){new s.AboutDialog({applicationName:this.args.applicationName,applicationIcon:`application-x-executable-symbolic`,developerName:`A GJSify Project`,version:this.args.version,comments:`A live catalogue of native GTK and Adwaita widgets, rendered under GJS.`,website:`https://github.com/gjsify/gjsify`,issueUrl:`https://github.com/gjsify/gjsify/issues`,licenseType:n.License.MIT_X11,developers:[`Ada Lovelace`,`Grace Hopper`],designers:[`Margaret Hamilton`],copyright:`© 2026 The GJSify Project`}).present(this)}updateArgs(e){}};o.type_ensure(gi.$gtype);const _i={stories:[gi]},vi={title:`Feedback/Alert Dialog`,description:`Adw.AlertDialog — a modal dialog with a heading, body text and responses, including a destructive action.`,controls:[{name:`heading`,label:`Heading`,type:K.TEXT,defaultValue:`Delete Project?`},{name:`body`,label:`Body`,type:K.TEXT,defaultValue:`This will permanently remove the project and all of its files. This action cannot be undone.`}]};var yi=__exportAll({AlertDialogStories:()=>xi,AlertDialogStory:()=>bi}),bi=class AlertDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookAlertDialog`},AlertDialogStory)}constructor(){super(X.fromMeta(AlertDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...vi,component:s.AlertDialog.$gtype}}initialize(){this._button=new n.Button({label:`Show dialog`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=new s.AlertDialog({heading:this.args.heading,body:this.args.body});e.add_response(`cancel`,`Cancel`),e.add_response(`delete`,`Delete`),e.set_response_appearance(`delete`,s.ResponseAppearance.DESTRUCTIVE),e.set_default_response(`cancel`),e.set_close_response(`cancel`),e.present(this)}updateArgs(e){}};o.type_ensure(bi.$gtype);const xi={stories:[bi]},Si={title:`Feedback/Dialog`,description:`Adw.Dialog — the generic dialog: arbitrary content over a scrim, anchored as a floating card on a wide window and as a bottom sheet on a narrow one.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Preferences`},{name:`presentation`,label:`Presentation`,type:K.SELECT,options:[{label:`Auto`,value:`auto`},{label:`Floating`,value:`floating`},{label:`Bottom sheet`,value:`bottom-sheet`}],defaultValue:`auto`}]};var Ci=__exportAll({DialogStories:()=>Ei,DialogStory:()=>Ti});const wi={auto:s.DialogPresentationMode.AUTO,floating:s.DialogPresentationMode.FLOATING,"bottom-sheet":s.DialogPresentationMode.BOTTOM_SHEET};var Ti=class DialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookDialog`},DialogStory)}constructor(){super(X.fromMeta(DialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Si,component:s.Dialog.$gtype}}initialize(){this._button=new n.Button({label:`Show dialog`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=new s.PreferencesGroup({title:`Appearance`});e.add(new s.SwitchRow({title:`Dark style`,subtitle:`Use a dark colour scheme`,active:!0}));let t=new s.PreferencesPage({title:`General`});t.add(e),new s.Dialog({title:this.args.title,child:t,presentation_mode:wi[this.args.presentation]}).present(this)}updateArgs(e){}};o.type_ensure(Ti.$gtype);const Ei={stories:[Ti]},Di={title:`Feedback/Emoji Chooser`,description:`Gtk.EmojiChooser — the popover a text widget opens to insert an emoji: a search entry over nine named sections, a toolbar that follows the scroll position, and an emoji-picked signal.`,controls:[{name:`search`,label:`Search`,type:K.TEXT,defaultValue:`smile`}]};var Oi=__exportAll({EmojiChooserStories:()=>Ai,EmojiChooserStory:()=>ki}),ki=class EmojiChooserStory extends X{_button=null;_entry=null;_chooser=null;static{o.registerClass({GTypeName:`AdwStorybookEmojiChooser`},EmojiChooserStory)}constructor(){super(X.fromMeta(EmojiChooserStory.getMetadata(),`Default`))}static getMetadata(){return{...Di,component:n.EmojiChooser.$gtype}}initialize(){this._entry=new n.Entry({placeholderText:`Type a message…`,halign:n.Align.CENTER}),this._entry.add_css_class(`card`),this._entry.hexpand=!0,this._chooser=n.EmojiChooser.new(),this._chooser.connect(`emoji-picked`,(e,t)=>{this._entry!==null&&this._entry.set_text(this._entry.get_text()+t)}),this._button=new n.Button({iconName:`face-smile-symbolic`,tooltipText:`Insert an emoji`,valign:n.Align.CENTER}),this._button.add_css_class(`flat`),this._button.add_css_class(`circular`),this._chooser.set_parent(this._button);let e=new n.Box({orientation:n.Orientation.HORIZONTAL,spacing:6});e.append(this._button),e.append(this._entry);let t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,halign:n.Align.CENTER,valign:n.Align.CENTER});t.append(e),this.addContent(t),this._applySearch(this.args.search)}_searchEntry(){let e=this._chooser?.get_first_child()??null;for(;e!==null;){if(e instanceof n.SearchEntry)return e;e=e.get_first_child()}return null}_applySearch(e){this._searchEntry()?.set_text(e)}updateArgs(e){typeof e.search==`string`&&this._applySearch(e.search)}};o.type_ensure(ki.$gtype);const Ai={stories:[ki]},ji={title:`Feedback/GTK About Dialog`,description:`Gtk.AboutDialog — GTK's own about window: a dialog-size logo over the program name, with the Credits, License and System pages behind a stack switcher. NOT Adw.AboutDialog, which is a navigation view of preference rows.`,controls:[{name:`programName`,label:`Program name`,type:K.TEXT,defaultValue:`Calculator`},{name:`version`,label:`Version`,type:K.TEXT,defaultValue:`48.1`},{name:`licenseType`,label:`License type`,type:K.SELECT,options:[{label:`Unknown`,value:`unknown`},{label:`Custom`,value:`custom`},{label:`GPL 3.0`,value:`gpl-3-0`},{label:`MIT`,value:`mit-x11`},{label:`BSD 3-Clause`,value:`bsd-3`},{label:`Apache 2.0`,value:`apache-2-0`},{label:`0BSD`,value:`0bsd`}],defaultValue:`gpl-3-0`},{name:`withCredits`,label:`With credits`,type:K.BOOLEAN,defaultValue:!0}]};var Mi=__exportAll({GtkAboutDialogStories:()=>Fi,GtkAboutDialogStory:()=>Pi});const Ni={unknown:n.License.UNKNOWN,custom:n.License.CUSTOM,"gpl-3-0":n.License.GPL_3_0,"mit-x11":n.License.MIT_X11,"bsd-3":n.License.BSD_3,"apache-2-0":n.License.APACHE_2_0,"0bsd":n.License[`0BSD`]};var Pi=class GtkAboutDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookGtkAboutDialog`},GtkAboutDialogStory)}constructor(){super(X.fromMeta(GtkAboutDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...ji,component:n.AboutDialog.$gtype}}initialize(){this._button=new n.Button({label:`Show dialog`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=new n.AboutDialog({programName:this.args.programName,version:this.args.version,logoIconName:`application-x-executable-symbolic`,comments:`An arithmetic calculator for the GNOME desktop.`,website:`https://gitlab.gnome.org/World/gnome-calculator`,websiteLabel:`GNOME Calculator`,copyright:`© 2026 The GNOME Project`,systemInformation:`GTK 4.24.0
341
+ \n${this._options.css??``}`);let r=t.Display.get_default();if(!r){v.error(`No display found`);return}n.StyleContext.add_provider_for_display(r,e,n.STYLE_PROVIDER_PRIORITY_APPLICATION)}_onActivate(){if(!this._window){this._window=new cn({application:this}),this._options.title&&this._window.set_title(this._options.title);try{this._window.populateSidebar(this._options.stories)}catch(e){v.error(`Failed to create story instances:`,e)}installDevtools(this,{enabled:this._options.devtools||void 0,extend:[storybookDevtoolsExtension(this._window)]}),probeEnabled()&&installStorybookProbe(this,this._window,this._options.probe)}this._window.present()}};o.type_ensure(ln.$gtype);function collectStoryModules(e){return collectStoryModules$1(e)}function buildGtkChrome(t){let r=new s.PreferencesPage,i=new s.PreferencesGroup,o=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,margin_top:12,margin_bottom:12,spacing:12,hexpand:!0});return o.add_css_class(`story-stage`),i.add(o),r.add(i),t.set_child(r),{root:t,hasStage:!0,setStageContent(e){let t=o.get_first_child();for(;t;)t.unparent(),t=o.get_first_child();o.append(e)},setChromeText(t,n){i.set_title(e.markup_escape_text(t,-1)),i.set_description(e.markup_escape_text(n,-1))}}}var StoryCore=class extends StoryViewBase{constructor(e,t,n){super(),this._widget=e,this.initBase(t,n)}createChrome(e){return buildGtkChrome(this._widget)}initialize(){this._widget.initialize()}updateArgs(e){this._widget.updateArgs(e)}teardown(){this._widget.teardown()}emitArgs(e){super.emitArgs(e),this._widget.notify(`args`)}},X=class StoryWidget extends s.Bin{static{o.registerClass({GTypeName:`StoryWidget`,Properties:{meta:o.ParamSpec.object(`meta`,`Meta`,`Story metadata`,o.ParamFlags.READWRITE,o.Object),story:o.ParamSpec.string(`story`,`Story Name`,`Story name`,o.ParamFlags.READWRITE,``),args:o.ParamSpec.object(`args`,`Args`,`Story arguments`,o.ParamFlags.READWRITE,o.Object)}},StoryWidget)}constructor(e,t={}){super(t),this._core=new StoryCore(this,e.meta,e.story)}static fromMeta(e,t){return{meta:e,story:t,args:argsFromControls(e.controls)}}get meta(){return this._core.meta}get story(){return this._core.story}get args(){return this._core.args}set args(e){this._core.args=e}onArgsChanged(e){return this._core.onArgsChanged(e)}setArg(e,t){this._core.setArg(e,t)}initialize(){}updateArgs(e){}teardown(){}addContent(e){this._core.addContent(e)}};o.type_ensure(X.$gtype);const un={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`};function decodeXmlEntities(e){return e.includes(`&`)?e.replace(/&(#[Xx][0-9A-Fa-f]+|#[0-9]+|[A-Za-z][A-Za-z0-9]*);/g,(e,t)=>{if(t.charAt(0)!==`#`)return un[t]??e;let n=t.charAt(1)===`x`||t.charAt(1)===`X`,r=Number.parseInt(n?t.slice(2):t.slice(1),n?16:10);return!Number.isFinite(r)||r<1||r>1114111||r>=55296&&r<=57343?e:String.fromCodePoint(r)}):e}function findTagEnd(e,t){let n=``;for(let r=t+1;r<e.length;r++){let t=e.charAt(r);if(n)t===n&&(n=``);else if(t===`"`||t===`'`)n=t;else if(t===`>`)return r}return-1}const dn=/([^\s=/<>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;function parseAttributes(e){let t={};dn.lastIndex=0;let n=dn.exec(e);for(;n!==null;)n[1]in t||(t[n[1]]=decodeXmlEntities(n[2]??n[3]??``)),n=dn.exec(e);return t}function scanXml(e){let t=[],pushText=e=>{t.push({kind:`text`,text:decodeXmlEntities(e)})},n=0;for(;n<e.length;){let r=e.indexOf(`<`,n);if(r<0){pushText(e.slice(n));break}if(r>n&&pushText(e.slice(n,r)),e.startsWith(`<!--`,r)){let t=e.indexOf(`-->`,r+4);n=t<0?e.length:t+3;continue}if(e.startsWith(`<![CDATA[`,r)){let i=e.indexOf(`]]>`,r+9);t.push({kind:`text`,text:e.slice(r+9,i<0?e.length:i)}),n=i<0?e.length:i+3;continue}if(e.startsWith(`<?`,r)){let t=e.indexOf(`?>`,r+2);n=t<0?e.length:t+2;continue}if(e.startsWith(`<!`,r)){let t=e.indexOf(`>`,r+2);n=t<0?e.length:t+1;continue}let i=findTagEnd(e,r);if(i<0){pushText(e.slice(r));break}let o=e.slice(r+1,i);if(n=i+1,o.charAt(0)===`/`){let e=o.slice(1).trim();e!==``&&t.push({kind:`close`,name:e});continue}let s=o,c=!1;s.endsWith(`/`)&&(c=!0,s=s.slice(0,-1));let l=/^([^\s/<>]+)/.exec(s);if(l===null)continue;let u=l[1];t.push({kind:`open`,name:u,attributes:parseAttributes(s.slice(u.length)),selfClosing:c})}return t}const fn={applicationId:null,applicationName:null,developerName:null,version:null,website:null,supportUrl:null,issueUrl:null,license:null,releaseNotes:null};function localeScore(e,t){let n=0;for(let r=0;;r++){let i=r<e.length?e.charAt(r):`\0`,o=r<t.length?t.charAt(r):`\0`;if((i===`-`||i===`\0`)&&(o===`-`||o===`\0`)&&n++,i===`\0`||o===`\0`)break;if(i!==o)return 0}return n}function appdataLocale(e,t={}){let n,r=e[0];r!==void 0&&!r.includes(`_`)&&t.LANG!==void 0&&t.LANG.includes(`_`)&&(n=t.LANG),n=n??r??`C`,n.endsWith(`.UTF-8`)&&(n=n.slice(0,-6));let i=``,o=n.indexOf(`@`);if(o>=0){let e=n.slice(o);e.startsWith(`@cyrillic`)?i=`-Cyrl`:e.startsWith(`@devanagari`)?i=`-Deva`:e.startsWith(`@latin`)?i=`-Latn`:e.startsWith(`@shaw`)?i=`-Shaw`:e.startsWith(`@euro`)||(i=`-euro`),n=n.slice(0,o)}return n.replace(/_/g,`-`)+i}function childElements(e,t,n){let r=[],i=t;for(;i<n;){let t=e[i];if(t.kind!==`open`){i+=1;continue}let o=t;if(o.selfClosing){r.push({name:o.name,attributes:o.attributes,start:i+1,end:i+1}),i+=1;continue}let s=1,c=i+1;for(;c<n&&s>0;){let t=e[c];t.kind===`open`?t.selfClosing||(s+=1):t.kind===`close`&&--s,c+=1}let l=s===0?c-1:n;r.push({name:o.name,attributes:o.attributes,start:i+1,end:l}),i=s===0?c:n}return r}function elementText(e,t){let n=0,r=``;for(let i=t.start;i<t.end;i++){let t=e[i];t.kind===`open`?t.selfClosing||(n+=1):t.kind===`close`?--n:n===0&&(r+=t.text)}return r.trim()}const lang=e=>e.attributes[`xml:lang`]??`C`;function considerTranslatable(e,t,n,r){(e.value===null&&lang(t)===`C`||r>e.score)&&(e.score=r,e.value=n)}function escapeMarkup(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/'/g,`&#39;`).replace(/"/g,`&quot;`)}function inlineMarkup(e,t){let n=``,r=!0,i=0,o=0;for(let s=t.start;s<t.end;s++){let t=e[s];if(t.kind===`open`){let e=t,r=!e.selfClosing;if(r&&(o+=1),i>0)continue;e.name===`em`||e.name===`code`?n+=`<${e.name}>`:r&&(i=o)}else if(t.kind===`close`)i>0&&o===i?i=0:i===0&&(t.name===`em`||t.name===`code`)&&(n+=`</${t.name}>`),--o;else if(i===0){let e=``;for(let n of t.text){if(n===`
342
+ `||n===` `||n===` `){if(r)continue;e+=` `,r=!0;continue}e+=n,r=!1}n+=escapeMarkup(e)}}return n}function parseDescription(e,t,n){let r=new Map,bucketFor=(e,t)=>{if(localeScore(n,e)===0&&e!==`C`)return null;let i=r.get(e);return i===void 0&&(i=[],r.set(e,i),t!==void 0&&i.push(`<${t}>\n`)),i};for(let n of childElements(e,t.start,t.end))if(n.name===`p`)bucketFor(lang(n))?.push(`<p>${inlineMarkup(e,n)}</p>\n`);else if(n.name===`ul`||n.name===`ol`){for(let e of r.values())e.push(`<${n.name}>\n`);for(let t of childElements(e,n.start,n.end))t.name===`li`&&bucketFor(lang(t),n.name)?.push(`<li>${inlineMarkup(e,t)}</li>\n`);for(let e of r.values())e.push(`</${n.name}>\n`)}let i=r.get(`C`),o=0;for(let[e,t]of r){let r=localeScore(n,e);r>o&&(o=r,i=t)}return i===void 0?null:i.join(``)}function parseAppdata(e,t={}){let n=t.locale??`C`,r=scanXml(e),i=childElements(r,0,r.length).find(e=>e.name===`component`||e.name===`application`);if(i===void 0)return{...fn};let o={...fn},s={value:null,score:0},c={value:null,score:0},l=[],u=null;for(let e of childElements(r,i.start,i.end))switch(e.name){case`id`:o.applicationId===null&&(o.applicationId=elementText(r,e));break;case`name`:considerTranslatable(s,e,elementText(r,e),localeScore(n,lang(e)));break;case`developer`:for(let t of childElements(r,e.start,e.end)){if(t.name!==`name`)continue;let e=localeScore(n,lang(t))+1024;e>c.score&&(lang(t)===`C`||e>1024)&&(c.score=e,c.value=elementText(r,t))}break;case`developer_name`:considerTranslatable(c,e,elementText(r,e),localeScore(n,lang(e)));break;case`url`:{let t=elementText(r,e);e.attributes.type===`homepage`?o.website=t:e.attributes.type===`bugtracker`?o.issueUrl=t:e.attributes.type===`help`&&(o.supportUrl=t);break}case`launchable`:e.attributes.type===`desktop-id`&&l.push(elementText(r,e));break;case`project_license`:o.license===null&&(o.license=elementText(r,e));break;case`releases`:u===null&&(u=e);break;default:break}if(o.applicationName=s.value,o.developerName=c.value,u!==null){let e=childElements(r,u.start,u.end).filter(e=>e.name===`release`);o.version=e[0]?.attributes.version??null;let i=t.releaseNotesVersion;if(i!==void 0&&i!==``){let t=e.find(e=>e.attributes.version===i),s=t&&childElements(r,t.start,t.end).find(e=>e.name===`description`);s&&(o.releaseNotes=parseDescription(r,s,n))}}o.applicationId!==null&&o.applicationId.endsWith(`.desktop`)&&(l.includes(`${o.applicationId}.desktop`)||(o.applicationId=o.applicationId.slice(0,-8)));for(let e of Object.keys(o))o[e]===``&&(o[e]=null);return o}const pn={"GPL-2.0-or-later":n.License.GPL_2_0,"GPL-3.0-or-later":n.License.GPL_3_0,"LGPL-2.1-or-later":n.License.LGPL_2_1,"LGPL-3.0-or-later":n.License.LGPL_3_0,"BSD-2-Clause":n.License.BSD,MIT:n.License.MIT_X11,"Artistic-2.0":n.License.ARTISTIC,"GPL-2.0-only":n.License.GPL_2_0_ONLY,"GPL-3.0-only":n.License.GPL_3_0_ONLY,"LGPL-2.1-only":n.License.LGPL_2_1_ONLY,"LGPL-3.0-only":n.License.LGPL_3_0_ONLY,"AGPL-3.0-or-later":n.License.AGPL_3_0,"AGPL-3.0-only":n.License.AGPL_3_0_ONLY,"BSD-3-Clause":n.License.BSD_3,"Apache-2.0":n.License.APACHE_2_0,"MPL-2.0":n.License.MPL_2_0,"0BSD":n.License[`0BSD`],"GPL-2.0":n.License.GPL_2_0_ONLY,"GPL-3.0":n.License.GPL_3_0_ONLY};function licenseTypeFor(e){return pn[e]??n.License.CUSTOM}function hasAppdataConstructor(e=s){try{return typeof e?.AboutDialog?.new_from_appdata==`function`}catch{return!1}}function applyAppdataFields(e,t,n){return t.applicationId!==null&&(e.applicationIcon=t.applicationId),t.applicationName!==null&&(e.applicationName=t.applicationName),t.developerName!==null&&(e.developerName=t.developerName),t.website!==null&&(e.website=t.website),t.supportUrl!==null&&(e.supportUrl=t.supportUrl),t.issueUrl!==null&&(e.issueUrl=t.issueUrl),t.license!==null&&(e.licenseType=licenseTypeFor(t.license)),n!==void 0&&n!==``&&(e.releaseNotesVersion=n),t.releaseNotes!==null&&(e.releaseNotes=t.releaseNotes),t.version!==null&&(e.version=t.version),e}function buildAboutDialogFromAppdata(t,n={}){let r=parseAppdata(t,{locale:n.locale??appdataLocale(e.get_language_names(),{LANG:e.getenv(`LANG`)??void 0}),releaseNotesVersion:n.releaseNotesVersion});return applyAppdataFields(new s.AboutDialog,r,n.releaseNotesVersion)}function resourceExists(e){try{return r.resources_get_info(e,r.ResourceLookupFlags.NONE),!0}catch{return!1}}function readResource(e){try{let t=r.resources_lookup_data(e,r.ResourceLookupFlags.NONE);return new TextDecoder().decode(t.toArray())}catch{return null}}function readFile(t){try{let[n,r]=e.file_get_contents(t);return n?new TextDecoder().decode(r):null}catch{return null}}let mn=!1;function createAboutDialog(e={}){let{appdataResource:t,appdataPath:n,releaseNotesVersion:r}=e,i=t!==void 0&&resourceExists(t),o;if(!e.forceParsedAppdata&&i&&hasAppdataConstructor())o=s.AboutDialog.new_from_appdata(t,r??``);else{let c=(i?readResource(t):null)??(n===void 0?null:readFile(n));c===null?(v.error(`@gjsify/adwaita-app: no AppStream metainfo found for the About dialog; looked at resource ${t??`(none given)`} and file ${n??`(none given)`}`),o=new s.AboutDialog):(!mn&&!e.forceParsedAppdata&&i&&(mn=!0,v.log(`@gjsify/adwaita-app: Adw.AboutDialog.new_from_appdata is not in this GTK runtime (expected on Windows — gjsify/gjsify#1662); building the About dialog from the AppStream metainfo directly.`)),o=buildAboutDialogFromAppdata(c,{releaseNotesVersion:r}))}return e.applicationIcon!==void 0&&(o.applicationIcon=e.applicationIcon),e.version!==void 0&&(o.version=e.version),o}`application-x-executable.audio-volume-high.audio-volume-low.audio-volume-medium.audio-volume-muted.avatar-default.camera-photo.contact-new.dialog-error.dialog-warning.document-edit.document-open.document-save.edit-clear.edit-copy.edit-find.emblem-system.emoji-activities.emoji-body.emoji-flags.emoji-food.emoji-nature.emoji-objects.emoji-people.emoji-recent.emoji-symbols.emoji-travel.face-smile.folder.folder-documents.folder-download.folder-music.go-down.go-home.go-next.go-previous.go-up.image-missing.list-add.list-remove.mail-reply-sender.mail-send.mail-unread.media-eject.media-playback-pause.media-playback-start.media-playlist-repeat.network-wireless.open-menu.pan-down.pan-end.pan-end-rtl.preferences-system.printer.send-to.sidebar-show.starred.system-search.user-trash.value-decrease.value-increase.view-conceal.view-grid.view-list.view-more.view-paged.view-refresh.view-reveal.window-close.window-maximize.window-minimize.window-restore`.split(`.`);let Z=null;function registerBundledIconResource(){if(Z)return Z;let t=e.base64_decode(`R1ZhcmlhbnQAAAAAAAAAABgAAACkCQAAAAAAKFcAAAAAAAAAAQAAAAQAAAAFAAAABQAAAAUAAAAGAAAABgAAAAYAAAAIAAAACAAAAAkAAAALAAAACwAAAA0AAAANAAAADwAAAA8AAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGgAAABwAAAAeAAAAHwAAACIAAAAiAAAAIwAAACUAAAAlAAAAJQAAACYAAAAmAAAAJgAAACkAAAAqAAAALAAAACwAAAAtAAAALQAAAC0AAAAuAAAALgAAAC4AAAAvAAAAMQAAADQAAAA1AAAANwAAADkAAAA8AAAAPQAAAD8AAAA/AAAAQQAAAEIAAABDAAAARAAAAEQAAABEAAAARAAAAEUAAABFAAAARgAAAEYAAABGAAAARgAAAEYAAABGAAAARgAAAEcAAABLAAAASwAAAEsAAABLAAAASwAAAE4AAABRAAAAVAAAAFQAAABVAAAAVQAAAFYAAADiMb0uOgAAAKQJAAAUAHYAuAkAAMgKAAAWuDRtOgAAAMgKAAAhAHYA8AoAACcMAAAK8uYjOgAAACcMAAAYAHYAQAwAAF8NAADhERO1BgAAAF8NAAAHAEwAaA0AAHwNAADpf58XOgAAAHwNAAAYAHYAmA0AAMgOAAALfUj0OgAAAMgOAAAVAHYA4A4AAM4PAAC6P2D1KgAAAM4PAAAJAEwA2A8AAPgPAADEQFkHOgAAAPgPAAAZAHYAGBAAADkSAADW7AkKPg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moSocamg7LxkmErIn1wEF5NiIBBik93J9HD9PZS/sCaUH0hjHdMoJ/EQW/Tn3fqvfft9vhc/hx6S831exfdvIn7L8BCyq1FQAodXVheSk=`);return Z=r.Resource.new_from_data(new e.Bytes(t)),r.resources_register(Z),Z}function addBundledIconsToTheme(e){registerBundledIconResource(),e.add_resource_path(`/eu/jumplink/gjsify/adwaita-app/icons`)}function installBundledIconTheme(e={}){let r=e.prefer??`fallback`;if(r===`host`)return!1;let i=e.display===void 0?t.Display.get_default():e.display;return i?(addBundledIconsToTheme(n.IconTheme.get_for_display(i)),r===`bundled`&&n.Settings.get_for_display(i).set_property(`gtk-icon-theme-name`,`gjsify-adwaita-bundled`),!0):!1}var hn=class AdwaitaApp extends s.Application{static{o.registerClass({GTypeName:`GjsifyAdwaitaApp`},AdwaitaApp)}constructor(e){super({application_id:e.applicationId,flags:e.flags??r.ApplicationFlags.DEFAULT_FLAGS}),this._window=null,this._options=e,this._initActions(),this.connect(`startup`,()=>this._onStartup()),this.connect(`activate`,()=>this._onActivate())}_initActions(){if(this._options.quitAction!==!1){let e=new r.SimpleAction({name:`quit`});e.connect(`activate`,()=>this.quit()),this.add_action(e),this.set_accels_for_action(`app.quit`,[`<primary>q`])}if(this._options.about||this._options.aboutAppdata){let e=new r.SimpleAction({name:`about`});e.connect(`activate`,()=>this._showAbout()),this.add_action(e)}}_onStartup(){this._installBundledIcons(),this._options.css&&this._loadCss(this._options.css),this._installDevtools(),this._options.onStartup?.(this)}_installBundledIcons(){let e=this._options.bundledIcons;e!==!1&&installBundledIconTheme(typeof e==`object`?e:{})}_loadCss(e){let r=t.Display.get_default();if(!r){v.error(`@gjsify/adwaita-app: no default display; CSS not applied`);return}let i=new n.CssProvider;i.load_from_string(e),n.StyleContext.add_provider_for_display(r,i,n.STYLE_PROVIDER_PRIORITY_APPLICATION)}_installDevtools(){let e=this._options.devtools;if(e===!1)return;let t=typeof e==`object`?e:{enabled:e||void 0};installDevtools(this,t)}_onActivate(){this._window||=this._options.createWindow(this),this._window.present()}_showAbout(){let e=this._options.aboutAppdata;if(e){createAboutDialog(e).present(this.get_active_window());return}let t=this._options.about;if(!t)return;let n=new s.AboutDialog({application_name:t.applicationName,application_icon:t.applicationIcon??this._options.applicationId});t.version&&(n.version=t.version),t.developerName&&(n.developer_name=t.developerName),t.website&&(n.website=t.website),t.issueUrl&&(n.issue_url=t.issueUrl),t.license&&(n.license=t.license),t.comments&&(n.comments=t.comments),t.copyright&&(n.copyright=t.copyright),t.developers?.length&&n.set_developers(t.developers),n.present(this.get_active_window())}};async function runApplication(e,t){let n=!1;try{e.register(null),n=e.get_is_remote()}catch{n=!1}let r=await e.runAsync(t);return n&&v.error(`${e.applicationId??`This application`} is already running — brought the existing instance to the front instead of opening a second window.`),r}o.type_ensure(hn.$gtype);var gn=class LoadingStack extends n.Stack{static{o.registerClass({GTypeName:`GjsifyLoadingStack`},LoadingStack)}constructor(e={}){super(e);let t=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,hexpand:!0,vexpand:!0});t.append(new s.Spinner),this.add_named(t,`loading`),this._content=new s.Bin({hexpand:!0,vexpand:!0}),this.add_named(this._content,`content`),this._error=new s.StatusPage({iconName:`dialog-error-symbolic`,title:`Something went wrong`}),this.add_named(this._error,`error`),this.set_visible_child_name(`loading`)}setContent(e){this._content.set_child(e)}setError(e,t){this._error.set_title(e),this._error.set_description(t??``)}showLoading(){this.set_visible_child_name(`loading`)}showContent(){this.set_visible_child_name(`content`)}showError(){this.set_visible_child_name(`error`)}};o.type_ensure(gn.$gtype);async function runStorybook(e){return runApplication(new ln(e),[c.programInvocationName,...c.programArgs])}const _n={title:`Buttons/Button Content`,description:`Adw.ButtonContent — pairs a symbolic icon with a label inside a Gtk.Button.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`Download`},{name:`iconName`,label:`Icon`,type:K.SELECT,options:[{label:`Download`,value:`folder-download-symbolic`},{label:`Add`,value:`list-add-symbolic`},{label:`Send`,value:`mail-send-symbolic`},{label:`Star`,value:`starred-symbolic`}],defaultValue:`folder-download-symbolic`},{name:`canShrink`,label:`Can shrink`,type:K.BOOLEAN,defaultValue:!1}]};var vn=__exportAll({ButtonContentStories:()=>bn,ButtonContentStory:()=>yn}),yn=class ButtonContentStory extends X{_content=null;_button=null;static{o.registerClass({GTypeName:`AdwStorybookButtonContent`},ButtonContentStory)}constructor(){super(X.fromMeta(ButtonContentStory.getMetadata(),`Default`))}static getMetadata(){return{..._n,component:s.ButtonContent.$gtype}}initialize(){this._content=new s.ButtonContent({label:this.args.label,iconName:this.args.iconName,canShrink:this.args.canShrink}),this._button=new n.Button({child:this._content}),this._button.add_css_class(`suggested-action`),this._button.add_css_class(`pill`),this.addContent(this._button)}updateArgs(e){this._content&&(this._content.label=this.args.label,this._content.iconName=this.args.iconName,this._content.canShrink=this.args.canShrink)}};o.type_ensure(yn.$gtype);const bn={stories:[yn]},xn={title:`Buttons/Button Styles`,description:`Buttons with Adwaita style classes: .pill, .circular, .suggested-action, .destructive-action, .flat.`,controls:[{name:`label`,label:`Demo label`,type:K.TEXT,defaultValue:`Click me`},{name:`style`,label:`Demo style`,type:K.SELECT,options:[{label:`Pill`,value:`pill`},{label:`Circular (icon)`,value:`circular`},{label:`Suggested`,value:`suggested-action`},{label:`Destructive`,value:`destructive-action`},{label:`Flat`,value:`flat`}],defaultValue:`suggested-action`}]};var Sn=__exportAll({ButtonStylesStories:()=>Tn,ButtonStylesStory:()=>wn});const Cn=[`pill`,`circular`,`suggested-action`,`destructive-action`,`flat`];var wn=class ButtonStylesStory extends X{_demo=null;static{o.registerClass({GTypeName:`AdwStorybookButtonStyles`},ButtonStylesStory)}constructor(){super(X.fromMeta(ButtonStylesStory.getMetadata(),`Default`))}static getMetadata(){return{...xn,component:n.Button.$gtype}}initialize(){let e=new s.WrapBox({childSpacing:12,lineSpacing:12,halign:n.Align.CENTER}),t=new n.Button({label:`Pill`});t.add_css_class(`pill`),e.append(t);let r=new n.Button({iconName:`list-add-symbolic`});r.add_css_class(`circular`),e.append(r);let i=new n.Button({label:`Suggested`});i.add_css_class(`suggested-action`),e.append(i);let o=new n.Button({label:`Delete`});o.add_css_class(`destructive-action`),e.append(o);let c=new n.Button({label:`Flat`});c.add_css_class(`flat`),e.append(c),this._demo=new n.Button({label:this.args.label}),this._applyStyle(this.args.style),e.append(this._demo),this.addContent(e)}_applyStyle(e){if(this._demo){for(let e of Cn)this._demo.remove_css_class(e);this._demo.add_css_class(e)}}updateArgs(e){this._demo&&(this._demo.label=this.args.label,this._applyStyle(this.args.style))}};o.type_ensure(wn.$gtype);const Tn={stories:[wn]},En={title:`Buttons/Color Dialog Button`,description:`Gtk.ColorDialogButton — a button that shows a colour and opens a chooser for it. It is insensitive until a dialog is set, and the swatch announces the channel percentages.`,controls:[{name:`rgba`,label:`Colour`,type:K.TEXT,defaultValue:`#3584e4`},{name:`title`,label:`Dialog title`,type:K.TEXT,defaultValue:`Choose a colour`}]};var Dn=__exportAll({ColorDialogButtonStories:()=>kn,ColorDialogButtonStory:()=>On}),On=class ColorDialogButtonStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookColorDialogButton`},ColorDialogButtonStory)}constructor(){super(X.fromMeta(ColorDialogButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...En,component:n.ColorDialogButton.$gtype}}initialize(){this._button=new n.ColorDialogButton({halign:n.Align.CENTER}),this._button.dialog=new n.ColorDialog,this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){if(!this._button)return;let e=new t.RGBA;e.parse(this.args.rgba)&&(this._button.rgba=e),this._button.dialog.title=this.args.title||``}};o.type_ensure(On.$gtype);const kn={stories:[On]},An={title:`Buttons/Font Dialog Button`,description:`Gtk.FontDialogButton — a button that shows a font and opens a chooser for it. At level family the label is the family alone; from font up it is family plus size, and the size box appears.`,controls:[{name:`fontDesc`,label:`Font`,type:K.TEXT,defaultValue:`Sans Bold 12`},{name:`level`,label:`Level`,type:K.SELECT,options:[{label:`Family`,value:`family`},{label:`Face`,value:`face`},{label:`Font`,value:`font`},{label:`Features`,value:`features`}],defaultValue:`font`},{name:`useFont`,label:`Draw in the font`,type:K.BOOLEAN,defaultValue:!0},{name:`useSize`,label:`Draw in the size`,type:K.BOOLEAN,defaultValue:!0}]};var jn=__exportAll({FontDialogButtonStories:()=>Nn,FontDialogButtonStory:()=>Mn}),Mn=class FontDialogButtonStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookFontDialogButton`},FontDialogButtonStory)}constructor(){super(X.fromMeta(FontDialogButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...An,component:n.FontDialogButton.$gtype}}initialize(){this._button=new n.FontDialogButton({halign:n.Align.CENTER}),this._button.dialog=new n.FontDialog,this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){if(!this._button)return;this._button.level=this.args.level;let e=l.FontDescription.from_string(this.args.fontDesc);e!==null&&(this._button.fontDesc=e),this._button.useFont=this.args.useFont,this._button.useSize=this.args.useSize}};o.type_ensure(Mn.$gtype);const Nn={stories:[Mn]},Pn={title:`Buttons/Link Button`,description:`Gtk.LinkButton — a button that follows a URI. It is a Gtk.Button with a uri and a visited state: clicking launches the URI and marks the link visited, and pointing it somewhere new un-visits it.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`GNOME`},{name:`uri`,label:`URI`,type:K.TEXT,defaultValue:`https://gnome.org`},{name:`visited`,label:`Visited`,type:K.BOOLEAN,defaultValue:!1}]};var Fn=__exportAll({LinkButtonStories:()=>Ln,LinkButtonStory:()=>In}),In=class LinkButtonStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookLinkButton`},LinkButtonStory)}constructor(){super(X.fromMeta(LinkButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Pn,component:n.LinkButton.$gtype}}initialize(){this._button=new n.LinkButton({halign:n.Align.CENTER}),this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){if(!this._button)return;let e=this.args.label;this._button.label=e,this._button.uri=this.args.uri,this._button.visited=this.args.visited}};o.type_ensure(In.$gtype);const Ln={stories:[In]},Rn=[`Save as…`,`Export`,`Print`],zn={title:`Buttons/Menu Button`,description:`Gtk.MenuButton — a button whose only action is to open a menu. Where a Split Button has a primary action beside its arrow, this one has none: every choice lives in the popover.`,controls:[{name:`iconName`,label:`Icon`,type:K.SELECT,options:[{label:`Hamburger`,value:`open-menu-symbolic`},{label:`More`,value:`view-more-symbolic`},{label:`Open`,value:`document-open-symbolic`}],defaultValue:`open-menu-symbolic`},{name:`menuTitle`,label:`Menu title`,type:K.TEXT,defaultValue:`Document`}]};var Bn=__exportAll({MenuButtonStories:()=>Hn,MenuButtonStory:()=>Vn}),Vn=class MenuButtonStory extends X{_widget=null;static{o.registerClass({GTypeName:`AdwStorybookMenuButton`},MenuButtonStory)}constructor(){super(X.fromMeta(MenuButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...zn,component:n.MenuButton.$gtype}}initialize(){this._widget=new n.MenuButton({halign:n.Align.CENTER}),this._apply(),this.addContent(this._widget)}updateArgs(e){this._apply()}_buildMenu(e){let t=new r.Menu;for(let e of Rn)t.append(e,`app.${e.toLowerCase().replace(/[^a-z]+/g,`-`)}`);let n=new r.Menu;return n.append_section(e.length>0?e:null,t),n}_apply(){this._widget&&(this._widget.iconName=this.args.iconName,this._widget.menuModel=this._buildMenu(this.args.menuTitle))}};o.type_ensure(Vn.$gtype);const Hn={stories:[Vn]},Un=[`audio-volume-muted-symbolic`,`audio-volume-low-symbolic`,`audio-volume-high-symbolic`],Wn={title:`Buttons/Scale Button`,description:`Gtk.ScaleButton — a button whose press opens a scale. The icon follows the value: no list draws image-missing, one name is used throughout, two split the range, three put the first at the bottom and the second at the top and share the interior, five spread it.`,controls:[{name:`value`,label:`Value`,type:K.NUMBER,defaultValue:70},{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Vertical`,value:`vertical`},{label:`Horizontal`,value:`horizontal`}],defaultValue:`vertical`},{name:`hasFrame`,label:`Has frame`,type:K.BOOLEAN,defaultValue:!1}]};var Gn=__exportAll({ScaleButtonStories:()=>qn,ScaleButtonStory:()=>Kn}),Kn=class ScaleButtonStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookScaleButton`},ScaleButtonStory)}constructor(){super(X.fromMeta(ScaleButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Wn,component:n.ScaleButton.$gtype}}initialize(){this._button=new n.ScaleButton({halign:n.Align.CENTER}),this._button.icons=Un,this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){this._button&&(this._button.orientation=this.args.orientation===`horizontal`?n.Orientation.HORIZONTAL:n.Orientation.VERTICAL,this._button.hasFrame=this.args.hasFrame,this._button.value=this.args.value)}};o.type_ensure(Kn.$gtype);const qn={stories:[Kn]},Jn={title:`Buttons/Split Button`,description:`Adw.SplitButton — a primary action button paired with a dropdown menu of related actions.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`Save`},{name:`iconName`,label:`Icon`,type:K.SELECT,options:[{label:`None`,value:``},{label:`Save`,value:`document-save-symbolic`},{label:`Send`,value:`mail-send-symbolic`},{label:`Add`,value:`list-add-symbolic`}],defaultValue:`document-save-symbolic`}]},Yn={title:`Buttons/Split Button Flat`,description:`Adw.SplitButton with the .flat style class, as used inside header bars and toolbars.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`Reply`},{name:`iconName`,label:`Icon`,type:K.SELECT,options:[{label:`None`,value:``},{label:`Reply`,value:`mail-reply-sender-symbolic`},{label:`Edit`,value:`document-edit-symbolic`},{label:`Open`,value:`document-open-symbolic`}],defaultValue:`mail-reply-sender-symbolic`}]};var Xn=__exportAll({SplitButtonFlatStory:()=>Qn,SplitButtonStories:()=>$n,SplitButtonStory:()=>Zn});function buildMenu(){let e=new r.Menu;return e.append(`Save as…`,`app.save-as`),e.append(`Export`,`app.export`),e.append(`Print`,`app.print`),e}var Zn=class SplitButtonStory extends X{_widget=null;static{o.registerClass({GTypeName:`AdwStorybookSplitButton`},SplitButtonStory)}constructor(){super(X.fromMeta(SplitButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Jn,component:s.SplitButton.$gtype}}initialize(){this._widget=new s.SplitButton({label:this.args.label,menuModel:buildMenu()});let e=this.args.iconName;e&&(this._widget.iconName=e),this.addContent(this._widget)}updateArgs(e){if(!this._widget)return;let t=this.args.iconName;t?this._widget.iconName=t:this._widget.label=this.args.label}};o.type_ensure(Zn.$gtype);var Qn=class SplitButtonFlatStory extends X{_widget=null;static{o.registerClass({GTypeName:`AdwStorybookSplitButtonFlat`},SplitButtonFlatStory)}constructor(){super(X.fromMeta(SplitButtonFlatStory.getMetadata(),`Default`))}static getMetadata(){return{...Yn,component:s.SplitButton.$gtype}}initialize(){this._widget=new s.SplitButton({label:this.args.label,menuModel:buildMenu()}),this._widget.add_css_class(`flat`);let e=this.args.iconName;e&&(this._widget.iconName=e),this.addContent(this._widget)}updateArgs(e){if(!this._widget)return;let t=this.args.iconName;t?this._widget.iconName=t:this._widget.label=this.args.label}};o.type_ensure(Qn.$gtype);const $n={stories:[Zn,Qn]},er={title:`Buttons/Toggle Button`,description:`Gtk.ToggleButton — a button that stays pressed. It is a Gtk.Button with one more property, active, so every button style class applies; Adw.ToggleGroup is the linked, single-choice form of it.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`Mute`},{name:`active`,label:`Active`,type:K.BOOLEAN,defaultValue:!1},{name:`flat`,label:`Flat`,type:K.BOOLEAN,defaultValue:!1}]};var tr=__exportAll({ToggleButtonStories:()=>rr,ToggleButtonStory:()=>nr}),nr=class ToggleButtonStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookToggleButton`},ToggleButtonStory)}constructor(){super(X.fromMeta(ToggleButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...er,component:n.ToggleButton.$gtype}}initialize(){this._button=new n.ToggleButton({halign:n.Align.CENTER}),this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){this._button&&(this._button.label=this.args.label,this._button.active=this.args.active,this.args.flat?this._button.add_css_class(`flat`):this._button.remove_css_class(`flat`))}};o.type_ensure(nr.$gtype);const rr={stories:[nr]},ir={title:`Buttons/Toggle Group`,description:`Adw.ToggleGroup — a linked group of Adw.Toggle buttons where exactly one is active.`,controls:[{name:`active`,label:`Active toggle`,type:K.SELECT,options:[{label:`List`,value:0},{label:`Grid`,value:1},{label:`Columns`,value:2}],defaultValue:0},{name:`style`,label:`Style`,type:K.SELECT,options:[{label:`Default`,value:`default`},{label:`Flat`,value:`flat`},{label:`Round`,value:`round`}],defaultValue:`default`}]};var ar=__exportAll({ToggleGroupStories:()=>cr,ToggleGroupStory:()=>sr});const or=[`flat`,`round`];var sr=class ToggleGroupStory extends X{_toggleGroup=null;static{o.registerClass({GTypeName:`AdwStorybookToggleGroup`},ToggleGroupStory)}constructor(){super(X.fromMeta(ToggleGroupStory.getMetadata(),`Default`))}static getMetadata(){return{...ir,component:s.ToggleGroup.$gtype}}initialize(){this._toggleGroup=new s.ToggleGroup,this._toggleGroup.add(new s.Toggle({label:`List`,iconName:`view-list-symbolic`})),this._toggleGroup.add(new s.Toggle({label:`Grid`,iconName:`view-grid-symbolic`})),this._toggleGroup.add(new s.Toggle({label:`Columns`,iconName:`view-columns-symbolic`})),this._toggleGroup.active=this.args.active,this._applyStyle(this.args.style),this.addContent(this._toggleGroup)}_applyStyle(e){if(this._toggleGroup){for(let e of or)this._toggleGroup.remove_css_class(e);e!=="default"&&this._toggleGroup.add_css_class(e)}}updateArgs(e){this._toggleGroup&&(this._toggleGroup.active=this.args.active,this._applyStyle(this.args.style))}};o.type_ensure(sr.$gtype);const cr={stories:[sr]},lr={title:`Controls/Check Button`,description:`Gtk.CheckButton — a label beside an indicator, with a third "in between" state for a selection that is only partly made. The browser element spells the two states checked and indeterminate, the words the Adwaita stylesheet selects on; the grouped, single-choice form is Adw.Radio.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`Enable networking`},{name:`checked`,label:`Checked`,type:K.BOOLEAN,defaultValue:!0},{name:`indeterminate`,label:`Indeterminate`,type:K.BOOLEAN,defaultValue:!1},{name:`disabled`,label:`Disabled`,type:K.BOOLEAN,defaultValue:!1}]};var ur=__exportAll({CheckButtonStories:()=>fr,CheckButtonStory:()=>dr}),dr=class CheckButtonStory extends X{_box=null;_button=null;static{o.registerClass({GTypeName:`AdwStorybookCheckButton`},CheckButtonStory)}constructor(){super(X.fromMeta(CheckButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...lr,component:n.CheckButton.$gtype}}initialize(){this._button=new n.CheckButton,this._box=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,halign:n.Align.CENTER}),this._box.append(this._button),this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){this._button&&(this._button.label=this.args.label,this._button.active=this.args.checked,this._button.inconsistent=this.args.indeterminate,this._button.sensitive=!this.args.disabled)}};o.type_ensure(dr.$gtype);const fr={stories:[dr]},pr=[`Automatic`,`Always`,`Never`,`When busy`],mr={title:`Controls/Drop Down`,description:`Gtk.DropDown — pick one value from a list. The button shows the selection; the list opens in a popover. Adw.ComboRow is the same choice presented as a boxed-list row.`,controls:[{name:`selected`,label:`Selected`,type:K.SELECT,options:pr.map((e,t)=>({label:e,value:t})),defaultValue:0},{name:`enableSearch`,label:`Search field`,type:K.BOOLEAN,defaultValue:!1}]};var hr=__exportAll({DropDownStories:()=>_r,DropDownStory:()=>gr}),gr=class DropDownStory extends X{_dropDown=null;static{o.registerClass({GTypeName:`AdwStorybookDropDown`},DropDownStory)}constructor(){super(X.fromMeta(DropDownStory.getMetadata(),`Default`))}static getMetadata(){return{...mr,component:n.DropDown.$gtype}}initialize(){this._dropDown=n.DropDown.new_from_strings([...pr]),this._dropDown.expression=n.PropertyExpression.new(n.StringObject.$gtype,null,`string`),this._dropDown.halign=n.Align.CENTER,this._apply(),this.addContent(this._dropDown)}updateArgs(e){this._apply()}_apply(){this._dropDown&&(this._dropDown.selected=this.args.selected,this._dropDown.enableSearch=this.args.enableSearch)}};o.type_ensure(gr.$gtype);const _r={stories:[gr]},vr={title:`Controls/Entry`,description:`Gtk.Entry — a single-line text field. Libadwaita ships no AdwEntry; the Adwaita look is the GTK entry styled by the stylesheet, which is why the row variants (Entry Row, Password Entry Row) are the widgets with an Adw prefix.`,controls:[{name:`text`,label:`Text`,type:K.TEXT,defaultValue:``},{name:`placeholder`,label:`Placeholder`,type:K.TEXT,defaultValue:`Search files…`},{name:`editable`,label:`Editable`,type:K.BOOLEAN,defaultValue:!0}]};var yr=__exportAll({EntryStories:()=>xr,EntryStory:()=>br}),br=class EntryStory extends X{_entry=null;static{o.registerClass({GTypeName:`AdwStorybookEntry`},EntryStory)}constructor(){super(X.fromMeta(EntryStory.getMetadata(),`Default`))}static getMetadata(){return{...vr,component:n.Entry.$gtype}}initialize(){this._entry=new n.Entry({widthRequest:280,halign:n.Align.CENTER}),this._apply(),this.addContent(this._entry)}updateArgs(e){this._apply()}_apply(){this._entry&&(this._entry.text=this.args.text,this._entry.placeholderText=this.args.placeholder,this._entry.editable=this.args.editable)}};o.type_ensure(br.$gtype);const xr={stories:[br]},Sr={title:`Controls/Spinner (GTK)`,description:`Gtk.Spinner — GTK's own busy indicator: a faint ring with a quarter arc turning around it, sized by its allocation. Adw.Spinner is the libadwaita replacement and looks different; under reduced motion GTK swaps this one for a static hourglass, which Adw.Spinner deliberately does not do.`,controls:[{name:`size`,label:`Size (px)`,type:K.RANGE,min:16,max:64,step:4,defaultValue:32},{name:`spinning`,label:`Spinning`,type:K.BOOLEAN,defaultValue:!0},{name:`disabled`,label:`Disabled`,type:K.BOOLEAN,defaultValue:!1}]};var Cr=__exportAll({GtkSpinnerStories:()=>Tr,GtkSpinnerStory:()=>wr}),wr=class GtkSpinnerStory extends X{_spinner=null;static{o.registerClass({GTypeName:`AdwStorybookGtkSpinner`},GtkSpinnerStory)}constructor(){super(X.fromMeta(GtkSpinnerStory.getMetadata(),`Default`))}static getMetadata(){return{...Sr,component:n.Spinner.$gtype}}initialize(){this._spinner=new n.Spinner({halign:n.Align.CENTER,valign:n.Align.CENTER}),this._apply(),this.addContent(this._spinner)}updateArgs(e){this._apply()}_apply(){if(!this._spinner)return;let e=this.args.size;this._spinner.widthRequest=e,this._spinner.heightRequest=e,this.args.spinning?this._spinner.start():this._spinner.stop(),this._spinner.sensitive=!this.args.disabled}};o.type_ensure(wr.$gtype);const Tr={stories:[wr]},Er={title:`Controls/Level Bar`,description:"Gtk.LevelBar — how full something is, over an interval that need not be 0…1: a password strength meter, a battery. `mode` decides one filled level or one block per unit, and the block takes a class from the nearest OFFSET (low, high, full by default), which is how libadwaita colours it and how an application adds a colour of its own.",controls:[{name:`value`,label:`Value`,type:K.RANGE,min:0,max:1,step:.05,defaultValue:.8},{name:`maxValue`,label:`Max value`,type:K.RANGE,min:1,max:5,step:1,defaultValue:5},{name:`mode`,label:`Mode`,type:K.SELECT,options:[{label:`Continuous`,value:`continuous`},{label:`Discrete`,value:`discrete`}],defaultValue:`continuous`},{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`inverted`,label:`Inverted`,type:K.BOOLEAN,defaultValue:!1}]};var Dr=__exportAll({LevelBarStories:()=>kr,LevelBarStory:()=>Or}),Or=class LevelBarStory extends X{_box=null;_bar=null;static{o.registerClass({GTypeName:`AdwStorybookLevelBar`},LevelBarStory)}constructor(){super(X.fromMeta(LevelBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Er,component:n.LevelBar.$gtype}}initialize(){this._bar=new n.LevelBar,this._box=new n.Box({halign:n.Align.CENTER,valign:n.Align.CENTER}),this._box.append(this._bar),this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){if(!this._bar)return;let e=this.args.orientation===`vertical`;this._bar.orientation=e?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL,this._bar.widthRequest=e?0:200,this._bar.heightRequest=e?120:0,this._bar.max_value=this.args.maxValue,this._bar.mode=this.args.mode===`discrete`?n.LevelBarMode.DISCRETE:n.LevelBarMode.CONTINUOUS,this._bar.value=this.args.value,this._bar.inverted=this.args.inverted}};o.type_ensure(Or.$gtype);const kr={stories:[Or]},Ar={title:`Controls/Password Entry`,description:`Gtk.PasswordEntry — a field for a secret: masked, no copy, a Caps Lock warning while it has focus, and show-peek-icon for a button that reveals it for one look. Adw.PasswordEntryRow is the boxed-list row built on it. Press the peek button, or Caps Lock on the keyboard, to see both states.`,controls:[{name:`showPeekIcon`,label:`Show peek icon`,type:K.BOOLEAN,defaultValue:!0},{name:`placeholderText`,label:`Placeholder`,type:K.TEXT,defaultValue:`Password`},{name:`disabled`,label:`Disabled`,type:K.BOOLEAN,defaultValue:!1}]};var jr=__exportAll({PasswordEntryStories:()=>Nr,PasswordEntryStory:()=>Mr}),Mr=class PasswordEntryStory extends X{_entry=null;static{o.registerClass({GTypeName:`AdwStorybookPasswordEntry`},PasswordEntryStory)}constructor(){super(X.fromMeta(PasswordEntryStory.getMetadata(),`Default`))}static getMetadata(){return{...Ar,component:n.PasswordEntry.$gtype}}initialize(){this._entry=new n.PasswordEntry({showPeekIcon:!0,widthRequest:240,halign:n.Align.CENTER}),this._apply(),this.addContent(this._entry)}updateArgs(e){this._apply()}_apply(){this._entry&&(this._entry.show_peek_icon=this.args.showPeekIcon,this._entry.placeholder_text=this.args.placeholderText,this._entry.sensitive=!this.args.disabled)}};o.type_ensure(Mr.$gtype);const Nr={stories:[Mr]},Pr={title:`Controls/Progress Bar`,description:"Gtk.ProgressBar — how much of a long operation is done. `fraction` is 0…1, `pulsing` is the indeterminate mode where the app knows it is busy but not how far along it is, and `osd` is libadwaita's hairline variant for under a header bar. Adw.Spinner is the size-less sibling.",controls:[{name:`fraction`,label:`Fraction`,type:K.RANGE,min:0,max:1,step:.05,defaultValue:.4},{name:`pulsing`,label:`Pulsing (indeterminate)`,type:K.BOOLEAN,defaultValue:!1},{name:`showText`,label:`Show text`,type:K.BOOLEAN,defaultValue:!0},{name:`inverted`,label:`Inverted`,type:K.BOOLEAN,defaultValue:!1},{name:`osd`,label:`OSD (hairline)`,type:K.BOOLEAN,defaultValue:!1}]};var Fr=__exportAll({ProgressBarStories:()=>Lr,ProgressBarStory:()=>Ir}),Ir=class ProgressBarStory extends X{_box=null;_bar=null;static{o.registerClass({GTypeName:`AdwStorybookProgressBar`},ProgressBarStory)}constructor(){super(X.fromMeta(ProgressBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Pr,component:n.ProgressBar.$gtype}}initialize(){this._bar=new n.ProgressBar,this._box=new n.Box({spacing:12,halign:n.Align.CENTER}),this._box.append(this._bar),this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){this._bar&&(this.args.pulsing?this._bar.pulse():this._bar.set_fraction(this.args.fraction),this._bar.show_text=this.args.showText,this._bar.inverted=this.args.inverted,this.args.osd?this._bar.add_css_class(`osd`):this._bar.remove_css_class(`osd`))}};o.type_ensure(Ir.$gtype);const Lr={stories:[Ir]},Rr={title:`Controls/Scale`,description:`Gtk.Scale — a slider. Gtk.Scale extends Gtk.Range, which is abstract: the range itself has no tag, its adjustment, value, inverted and fill level are this widget’s properties. draw-value shows the number beside the knob at the value-pos you name, and the .value style class dims it.`,controls:[{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`valuePos`,label:`Value position`,type:K.SELECT,options:[{label:`Top`,value:`top`},{label:`Bottom`,value:`bottom`},{label:`Left`,value:`left`},{label:`Right`,value:`right`}],defaultValue:`top`},{name:`drawValue`,label:`Draw value`,type:K.BOOLEAN,defaultValue:!0},{name:`digits`,label:`Digits`,type:K.NUMBER,defaultValue:0},{name:`inverted`,label:`Inverted`,type:K.BOOLEAN,defaultValue:!1},{name:`hasOrigin`,label:`Has origin`,type:K.BOOLEAN,defaultValue:!0},{name:`value`,label:`Value`,type:K.NUMBER,defaultValue:40}]};var zr=__exportAll({ScaleStories:()=>Vr,ScaleStory:()=>Br}),Br=class ScaleStory extends X{_scale=null;_adjustment=null;static{o.registerClass({GTypeName:`AdwStorybookScale`},ScaleStory)}constructor(){super(X.fromMeta(ScaleStory.getMetadata(),`Default`))}static getMetadata(){return{...Rr,component:n.Scale.$gtype}}initialize(){this._adjustment=new n.Adjustment({value:40,lower:0,upper:100,stepIncrement:1,pageIncrement:10}),this._scale=new n.Scale({adjustment:this._adjustment,digits:0,drawValue:!0,widthRequest:260,valign:n.Align.CENTER}),this._apply(),this.addContent(this._scale)}updateArgs(e){this._apply()}_apply(){if(!this._scale||!this._adjustment)return;this._scale.orientation=this.args.orientation===`vertical`?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL;let e={top:n.PositionType.TOP,bottom:n.PositionType.BOTTOM,left:n.PositionType.LEFT,right:n.PositionType.RIGHT};this._scale.value_pos=e[this.args.valuePos]??n.PositionType.TOP,this._scale.draw_value=this.args.drawValue,this._scale.digits=this.args.digits,this._scale.inverted=this.args.inverted,this._scale.has_origin=this.args.hasOrigin,this._adjustment.set_value(this.args.value)}};o.type_ensure(Br.$gtype);const Vr={stories:[Br]},Hr={title:`Controls/Search Entry`,description:`Gtk.SearchEntry — a field for typing a query. A search glyph leads while it is empty and a clear button follows once it is not, and search-changed waits out search-delay so a filter is not driven by every keystroke. Escape is stop-search, Ctrl+G is next-match.`,controls:[{name:`searchDelay`,label:`Search delay (ms)`,type:K.NUMBER,defaultValue:150},{name:`placeholderText`,label:`Placeholder`,type:K.TEXT,defaultValue:`Search…`},{name:`disabled`,label:`Disabled`,type:K.BOOLEAN,defaultValue:!1}]};var Ur=__exportAll({SearchEntryStories:()=>Gr,SearchEntryStory:()=>Wr}),Wr=class SearchEntryStory extends X{_entry=null;_label=null;_handler=0;static{o.registerClass({GTypeName:`AdwStorybookSearchEntry`},SearchEntryStory)}constructor(){super(X.fromMeta(SearchEntryStory.getMetadata(),`Default`))}static getMetadata(){return{...Hr,component:n.SearchEntry.$gtype}}initialize(){this._entry=new n.SearchEntry({widthRequest:260,halign:n.Align.CENTER}),this._label=new n.Label({label:`search-changed has not fired yet`}),this._handler=this._entry.connect(`search-changed`,()=>{this._label&&(this._label.label=`search-changed: "${this._entry?.text??``}"`)}),this._apply();let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12});e.append(this._entry),e.append(this._label),this.addContent(e)}updateArgs(e){this._apply()}_apply(){this._entry&&(this._entry.search_delay=this.args.searchDelay,this._entry.placeholder_text=this.args.placeholderText,this._entry.sensitive=!this.args.disabled)}};o.type_ensure(Wr.$gtype);const Gr={stories:[Wr]},Kr={title:`Controls/Spin Button`,description:`Gtk.SpinButton — a number field with an arrow either side of it. The range is a Gtk.Adjustment, the typed value is clamped into it (or left alone, under update-policy if-valid), and numeric refuses anything that is not a number. Adw.SpinRow is the boxed-list row that wraps this same widget.`,controls:[{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`digits`,label:`Digits`,type:K.NUMBER,defaultValue:0},{name:`numeric`,label:`Numeric`,type:K.BOOLEAN,defaultValue:!1},{name:`snapToTicks`,label:`Snap to ticks`,type:K.BOOLEAN,defaultValue:!1},{name:`wrap`,label:`Wrap`,type:K.BOOLEAN,defaultValue:!1},{name:`updatePolicy`,label:`Update policy`,type:K.SELECT,options:[{label:`Always`,value:`always`},{label:`If valid`,value:`if-valid`}],defaultValue:`always`},{name:`value`,label:`Value`,type:K.NUMBER,defaultValue:5}]};var qr=__exportAll({SpinButtonStories:()=>Yr,SpinButtonStory:()=>Jr}),Jr=class SpinButtonStory extends X{_spin=null;_adjustment=null;static{o.registerClass({GTypeName:`AdwStorybookSpinButton`},SpinButtonStory)}constructor(){super(X.fromMeta(SpinButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Kr,component:n.SpinButton.$gtype}}initialize(){this._adjustment=new n.Adjustment({value:5,lower:0,upper:10,stepIncrement:1,pageIncrement:2}),this._spin=new n.SpinButton({adjustment:this._adjustment,digits:0,halign:n.Align.CENTER}),this._apply(),this.addContent(this._spin)}updateArgs(e){this._apply()}_apply(){!this._spin||!this._adjustment||(this._spin.orientation=this.args.orientation===`vertical`?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL,this._spin.digits=this.args.digits,this._spin.numeric=this.args.numeric,this._spin.snap_to_ticks=this.args.snapToTicks,this._spin.wrap=this.args.wrap,this._spin.update_policy=this.args.updatePolicy===`if-valid`?n.SpinButtonUpdatePolicy.IF_VALID:n.SpinButtonUpdatePolicy.ALWAYS,this._adjustment.set_value(this.args.value))}};o.type_ensure(Jr.$gtype);const Yr={stories:[Jr]},Xr={title:`Controls/Switch`,description:`Gtk.Switch — a light switch with two states that are NOT the same thing: active is where the user put it, state is what the switched thing currently is, which is how a change that takes a while looks like a pending one. Adw.SwitchRow is the same control with a title beside it.`,controls:[{name:`active`,label:`Active`,type:K.BOOLEAN,defaultValue:!0},{name:`state`,label:`State (the backend)`,type:K.BOOLEAN,defaultValue:!0},{name:`disabled`,label:`Disabled`,type:K.BOOLEAN,defaultValue:!1}]};var Zr=__exportAll({SwitchStories:()=>$r,SwitchStory:()=>Qr}),Qr=class SwitchStory extends X{_switch=null;static{o.registerClass({GTypeName:`AdwStorybookSwitch`},SwitchStory)}constructor(){super(X.fromMeta(SwitchStory.getMetadata(),`Default`))}static getMetadata(){return{...Xr,component:n.Switch.$gtype}}initialize(){this._switch=new n.Switch({halign:n.Align.CENTER}),this._apply(),this.addContent(this._switch)}updateArgs(e){this._apply()}_apply(){this._switch&&(this._switch.active=this.args.active,this._switch.state=this.args.state,this._switch.sensitive=!this.args.disabled)}};o.type_ensure(Qr.$gtype);const $r={stories:[Qr]},ei={title:`Drawing/Drag Icon`,description:"Gtk.DragIcon — the widget that follows the pointer while a drag is in flight, and is destroyed with the drag. No application builds one: `get_for_drag` returns the icon a drag is using, and the drag source sets its child. What it takes as that child is the interesting part, because `create_widget_for_value` answers for six kinds of value and a drag source that offers a string gets a label and one that offers a colour gets a swatch. A drag icon takes no input at all, which is the C's own note: 'drag icons do not allow user input'.",controls:[{name:`value`,label:`Value being dragged`,type:K.SELECT,options:[{label:`A string (a Gtk.Label)`,value:`string`},{label:`A GdkRGBA (a colour swatch)`,value:`rgba`},{label:`A content provider only (no icon)`,value:`none`}],defaultValue:`string`},{name:`actions`,label:`Drag actions`,type:K.SELECT,options:[{label:`Copy`,value:`copy`},{label:`Move`,value:`move`}],defaultValue:`copy`}]};var ti=__exportAll({DragIconStories:()=>ri,DragIconStory:()=>ni}),ni=class DragIconStory extends X{_row=null;_source=null;_hint=null;static{o.registerClass({GTypeName:`AdwStorybookDragIcon`},DragIconStory)}constructor(){super(X.fromMeta(DragIconStory.getMetadata(),`Default`))}static getMetadata(){return{...ei,component:n.DragIcon.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,halign:n.Align.CENTER,valign:n.Align.CENTER});this._hint=new n.Label({label:`Drag the row and watch the pointer`}),this._hint.add_css_class(`dim-label`),this._row=new n.Box({orientation:n.Orientation.HORIZONTAL,spacing:12,cssClasses:[`card`]}),this._row.append(this._buildLabel()),this._source=n.DragSource.new(),this._source.actions=this.args.actions===`move`?t.DragAction.MOVE:t.DragAction.COPY,this._source.connect(`prepare`,()=>this._contentProvider()),this._source.connect(`drag-begin`,(e,t)=>this._setIcon(t)),this._row.add_controller(this._source),this._apply(),e.append(this._hint),e.append(this._row),this.addContent(e)}updateArgs(e){this._source!==null&&(this._source.actions=this.args.actions===`move`?t.DragAction.MOVE:t.DragAction.COPY,this._apply())}_value(){switch(this.args.value){case`rgba`:return{red:.25,green:.55,blue:.95,alpha:1};case`none`:return null;default:return`Report.odt`}}_contentProvider(){let e=this._value();return e===null?null:t.ContentProvider.new_for_value(e)}_setIcon(e){let t=this._value(),r=n.DragIcon.get_for_drag(e),i=t===null?null:n.DragIcon.create_widget_for_value(t);r.set_child(i)}_buildLabel(){return new n.Label({label:`Report.odt`,cssClasses:[`heading`]})}_apply(){this._hint!==null&&(this._hint.label=this.args.value===`none`?`Drag the row — no icon, because the value has no widget to show`:`Drag the row and watch the pointer`)}};o.type_ensure(ni.$gtype);const ri={stories:[ni]},ii={title:`Drawing/Drawing Area`,description:"Gtk.DrawingArea — a blank widget that owns a size and a callback and nothing else: whatever you see is what `set_draw_func` painted. `content-width` and `content-height` are the MINIMUM and natural size at once, so a parent can hand the area more room but never less; at 0 the area has no intrinsic size at all and fills whatever it is given.",controls:[{name:`contentWidth`,label:`Content width`,type:K.RANGE,min:0,max:320,step:16,defaultValue:160},{name:`contentHeight`,label:`Content height`,type:K.RANGE,min:0,max:320,step:16,defaultValue:120},{name:`shape`,label:`Shape`,type:K.SELECT,options:[{label:`Circle`,value:`circle`},{label:`Grid`,value:`grid`},{label:`Crosshair`,value:`crosshair`}],defaultValue:`circle`}]};var ai=__exportAll({DrawingAreaStories:()=>si,DrawingAreaStory:()=>oi}),oi=class DrawingAreaStory extends X{_box=null;_area=null;static{o.registerClass({GTypeName:`AdwStorybookDrawingArea`},DrawingAreaStory)}constructor(){super(X.fromMeta(DrawingAreaStory.getMetadata(),`Default`))}static getMetadata(){return{...ii,component:n.DrawingArea.$gtype}}initialize(){this._area=new n.DrawingArea,this._area.set_draw_func((e,t,n,r)=>{let i=e.get_color();switch(t.setSourceRGBA(i.red,i.green,i.blue,i.alpha),t.rectangle(0,0,n,r),t.fill(),t.setSourceRGBA(1-i.red,1-i.green,1-i.blue,i.alpha),this.args.shape){case`grid`:for(let e=0;e<n;e+=16)t.rectangle(e,0,8,r),t.fill();break;case`crosshair`:t.rectangle(n/2-1,0,2,r),t.rectangle(0,r/2-1,n,2),t.fill();break;default:t.arc(n/2,r/2,Math.min(n,r)/2,0,2*Math.PI),t.fill();break}}),this._box=new n.Box({halign:n.Align.CENTER,valign:n.Align.CENTER}),this._box.append(this._area),this._apply(),this.addContent(this._box)}updateArgs(e){this._area?.queue_draw(),this._apply()}_apply(){this._area&&(this._area.content_width=this.args.contentWidth,this._area.content_height=this.args.contentHeight)}};o.type_ensure(oi.$gtype);const si={stories:[oi]},ci={title:`Drawing/GL Area`,description:"Gtk.GLArea — a widget whose contents are drawn on a GPU. GTK emits `::resize` before the first `::render` and the render flag is cleared AFTER the signal, so a handler may queue another frame with `queue_render()`. Here the replica is a `<canvas>` with a real WebGL context: the browser has no desktop GL, so `api` always reports the ES flavour it was given.",controls:[{name:`autoRender`,label:`Auto render`,type:K.BOOLEAN,defaultValue:!0},{name:`hasDepthBuffer`,label:`Depth buffer`,type:K.BOOLEAN,defaultValue:!1},{name:`allowedApis`,label:`Allowed APIs`,type:K.SELECT,options:[{label:`GL and GLES (default)`,value:`gl gles`},{label:`GLES only`,value:`gles`},{label:`GL only`,value:`gl`}],defaultValue:`gl gles`},{name:`spinning`,label:`Spin the triangle`,type:K.BOOLEAN,defaultValue:!0}]};var li=__exportAll({GLAreaStories:()=>di,GLAreaStory:()=>ui}),ui=class GLAreaStory extends X{_area=null;_readout=null;_box=null;_tick=0;_renders=0;_viewport=`—`;static{o.registerClass({GTypeName:`AdwStorybookGLArea`},GLAreaStory)}constructor(){super(X.fromMeta(GLAreaStory.getMetadata(),`Default`))}static getMetadata(){return{...ci,component:n.GLArea.$gtype}}initialize(){this._area=new n.GLArea({widthRequest:240,heightRequest:160}),this._readout=new n.Label({label:`—`}),this._readout.add_css_class(`dimmed`),this._area.connect(`resize`,(e,t,n)=>{this._viewport=`${t} × ${n}`,this._refresh()}),this._area.connect(`render`,()=>{this._renders+=1,this._refresh()}),this._box=new n.Box({orientation:n.Orientation.VERTICAL,spacing:6}),this._box.append(this._area),this._box.append(this._readout),this._apply(),this.addContent(this._box)}updateArgs(e){this._stop(),this._apply(),this._start()}_apply(){this._area&&(this._area.allowed_apis=this.args.allowedApis===`gles`?t.GLAPI.GLES:t.GLAPI.GL|t.GLAPI.GLES,this._area.auto_render=this.args.autoRender,this._area.has_depth_buffer=this.args.hasDepthBuffer)}_start(){!this._area||!this.args.spinning||(this._tick=e.timeout_add(e.PRIORITY_DEFAULT,33,()=>(this._area?.queue_render(),e.SOURCE_CONTINUE)))}_stop(){this._tick!==0&&(e.source_remove(this._tick),this._tick=0)}_refresh(){this._readout&&(this._readout.label=`viewport ${this._viewport} device px · ${this._renders} renders`)}};o.type_ensure(ui.$gtype);const di={stories:[ui]},fi={title:`Drawing/Graphics Offload`,description:"Gtk.GraphicsOffload — a wrapper that asks the compositor to take its ONE child as it is, which is worth doing for content that changes every frame. `enabled` says whether it is attempted, and `black-background` paints the letterbox bars. The passthrough itself is the platform's: no browser API hands a surface to a compositor, so the replica carries the enum, the black rectangle and the bin layout, and says plainly which part is missing.",controls:[{name:`enabled`,label:`Enabled`,type:K.SELECT,options:[{label:`Enabled (default)`,value:`enabled`},{label:`Disabled`,value:`disabled`}],defaultValue:`enabled`},{name:`blackBackground`,label:`Black background`,type:K.BOOLEAN,defaultValue:!1},{name:`child`,label:`Child`,type:K.SELECT,options:[{label:`Label`,value:`label`},{label:`Image`,value:`image`},{label:`Row of labels`,value:`box`}],defaultValue:`image`}]};var pi=__exportAll({GraphicsOffloadStories:()=>hi,GraphicsOffloadStory:()=>mi}),mi=class GraphicsOffloadStory extends X{_offload=null;_box=null;static{o.registerClass({GTypeName:`AdwStorybookGraphicsOffload`},GraphicsOffloadStory)}constructor(){super(X.fromMeta(GraphicsOffloadStory.getMetadata(),`Default`))}static getMetadata(){return{...fi,component:n.GraphicsOffload.$gtype}}initialize(){this._offload=new n.GraphicsOffload({widthRequest:280,heightRequest:96}),this._offload.enabled=+(this.args.enabled===`disabled`),this._offload.black_background=this.args.blackBackground,this._box=new n.Box({halign:n.Align.CENTER,valign:n.Align.CENTER}),this._box.append(this._offload),this._applyChild(),this.addContent(this._box)}updateArgs(e){this._offload&&(this._offload.enabled=+(this.args.enabled===`disabled`),this._offload.black_background=this.args.blackBackground,this._applyChild())}_applyChild(){if(!this._offload)return;let e;switch(this.args.child){case`label`:e=new n.Label({label:`The child of an offloaded layer`});break;case`box`:{let t=new n.Box({orientation:n.Orientation.HORIZONTAL,spacing:12});for(let e of[`One`,`Two`,`Three`])t.append(new n.Label({label:e}));e=new n.CenterBox,e.set_center_widget(t);break}default:e=new n.Image({iconName:`camera-photo-symbolic`,pixelSize:48});break}this._offload.child=e}};o.type_ensure(mi.$gtype);const hi={stories:[mi]},gi={title:`Feedback/About Dialog`,description:`Adw.AboutDialog — the standard Adwaita about window with application name, version, credits and license.`,controls:[{name:`applicationName`,label:`Application name`,type:K.TEXT,defaultValue:`Adwaita Storybook`},{name:`version`,label:`Version`,type:K.TEXT,defaultValue:`0.11.0`}]};var _i=__exportAll({AboutDialogStories:()=>yi,AboutDialogStory:()=>vi}),vi=class AboutDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookAboutDialog`},AboutDialogStory)}constructor(){super(X.fromMeta(AboutDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...gi,component:s.AboutDialog.$gtype}}initialize(){this._button=new n.Button({label:`Show dialog`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){new s.AboutDialog({applicationName:this.args.applicationName,applicationIcon:`application-x-executable-symbolic`,developerName:`A GJSify Project`,version:this.args.version,comments:`A live catalogue of native GTK and Adwaita widgets, rendered under GJS.`,website:`https://github.com/gjsify/gjsify`,issueUrl:`https://github.com/gjsify/gjsify/issues`,licenseType:n.License.MIT_X11,developers:[`Ada Lovelace`,`Grace Hopper`],designers:[`Margaret Hamilton`],copyright:`© 2026 The GJSify Project`}).present(this)}updateArgs(e){}};o.type_ensure(vi.$gtype);const yi={stories:[vi]},bi={title:`Feedback/Alert Dialog`,description:`Adw.AlertDialog — a modal dialog with a heading, body text and responses, including a destructive action.`,controls:[{name:`heading`,label:`Heading`,type:K.TEXT,defaultValue:`Delete Project?`},{name:`body`,label:`Body`,type:K.TEXT,defaultValue:`This will permanently remove the project and all of its files. This action cannot be undone.`}]};var xi=__exportAll({AlertDialogStories:()=>Ci,AlertDialogStory:()=>Si}),Si=class AlertDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookAlertDialog`},AlertDialogStory)}constructor(){super(X.fromMeta(AlertDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...bi,component:s.AlertDialog.$gtype}}initialize(){this._button=new n.Button({label:`Show dialog`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=new s.AlertDialog({heading:this.args.heading,body:this.args.body});e.add_response(`cancel`,`Cancel`),e.add_response(`delete`,`Delete`),e.set_response_appearance(`delete`,s.ResponseAppearance.DESTRUCTIVE),e.set_default_response(`cancel`),e.set_close_response(`cancel`),e.present(this)}updateArgs(e){}};o.type_ensure(Si.$gtype);const Ci={stories:[Si]},wi={title:`Feedback/Dialog`,description:`Adw.Dialog — the generic dialog: arbitrary content over a scrim, anchored as a floating card on a wide window and as a bottom sheet on a narrow one.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Preferences`},{name:`presentation`,label:`Presentation`,type:K.SELECT,options:[{label:`Auto`,value:`auto`},{label:`Floating`,value:`floating`},{label:`Bottom sheet`,value:`bottom-sheet`}],defaultValue:`auto`}]};var Ti=__exportAll({DialogStories:()=>Oi,DialogStory:()=>Di});const Ei={auto:s.DialogPresentationMode.AUTO,floating:s.DialogPresentationMode.FLOATING,"bottom-sheet":s.DialogPresentationMode.BOTTOM_SHEET};var Di=class DialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookDialog`},DialogStory)}constructor(){super(X.fromMeta(DialogStory.getMetadata(),`Default`))}static getMetadata(){return{...wi,component:s.Dialog.$gtype}}initialize(){this._button=new n.Button({label:`Show dialog`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=new s.PreferencesGroup({title:`Appearance`});e.add(new s.SwitchRow({title:`Dark style`,subtitle:`Use a dark colour scheme`,active:!0}));let t=new s.PreferencesPage({title:`General`});t.add(e),new s.Dialog({title:this.args.title,child:t,presentation_mode:Ei[this.args.presentation]}).present(this)}updateArgs(e){}};o.type_ensure(Di.$gtype);const Oi={stories:[Di]},ki={title:`Feedback/Emoji Chooser`,description:`Gtk.EmojiChooser — the popover a text widget opens to insert an emoji: a search entry over nine named sections, a toolbar that follows the scroll position, and an emoji-picked signal.`,controls:[{name:`search`,label:`Search`,type:K.TEXT,defaultValue:`smile`}]};var Ai=__exportAll({EmojiChooserStories:()=>Mi,EmojiChooserStory:()=>ji}),ji=class EmojiChooserStory extends X{_button=null;_entry=null;_chooser=null;static{o.registerClass({GTypeName:`AdwStorybookEmojiChooser`},EmojiChooserStory)}constructor(){super(X.fromMeta(EmojiChooserStory.getMetadata(),`Default`))}static getMetadata(){return{...ki,component:n.EmojiChooser.$gtype}}initialize(){this._entry=new n.Entry({placeholderText:`Type a message…`,halign:n.Align.CENTER}),this._entry.add_css_class(`card`),this._entry.hexpand=!0,this._chooser=n.EmojiChooser.new(),this._chooser.connect(`emoji-picked`,(e,t)=>{this._entry!==null&&this._entry.set_text(this._entry.get_text()+t)}),this._button=new n.Button({iconName:`face-smile-symbolic`,tooltipText:`Insert an emoji`,valign:n.Align.CENTER}),this._button.add_css_class(`flat`),this._button.add_css_class(`circular`),this._chooser.set_parent(this._button);let e=new n.Box({orientation:n.Orientation.HORIZONTAL,spacing:6});e.append(this._button),e.append(this._entry);let t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,halign:n.Align.CENTER,valign:n.Align.CENTER});t.append(e),this.addContent(t),this._applySearch(this.args.search)}_searchEntry(){let e=this._chooser?.get_first_child()??null;for(;e!==null;){if(e instanceof n.SearchEntry)return e;e=e.get_first_child()}return null}_applySearch(e){this._searchEntry()?.set_text(e)}updateArgs(e){typeof e.search==`string`&&this._applySearch(e.search)}};o.type_ensure(ji.$gtype);const Mi={stories:[ji]},Ni={title:`Feedback/GTK About Dialog`,description:`Gtk.AboutDialog — GTK's own about window: a dialog-size logo over the program name, with the Credits, License and System pages behind a stack switcher. NOT Adw.AboutDialog, which is a navigation view of preference rows.`,controls:[{name:`programName`,label:`Program name`,type:K.TEXT,defaultValue:`Calculator`},{name:`version`,label:`Version`,type:K.TEXT,defaultValue:`48.1`},{name:`licenseType`,label:`License type`,type:K.SELECT,options:[{label:`Unknown`,value:`unknown`},{label:`Custom`,value:`custom`},{label:`GPL 3.0`,value:`gpl-3-0`},{label:`MIT`,value:`mit-x11`},{label:`BSD 3-Clause`,value:`bsd-3`},{label:`Apache 2.0`,value:`apache-2-0`},{label:`0BSD`,value:`0bsd`}],defaultValue:`gpl-3-0`},{name:`withCredits`,label:`With credits`,type:K.BOOLEAN,defaultValue:!0}]};var Pi=__exportAll({GtkAboutDialogStories:()=>Li,GtkAboutDialogStory:()=>Ii});const Fi={unknown:n.License.UNKNOWN,custom:n.License.CUSTOM,"gpl-3-0":n.License.GPL_3_0,"mit-x11":n.License.MIT_X11,"bsd-3":n.License.BSD_3,"apache-2-0":n.License.APACHE_2_0,"0bsd":n.License[`0BSD`]};var Ii=class GtkAboutDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookGtkAboutDialog`},GtkAboutDialogStory)}constructor(){super(X.fromMeta(GtkAboutDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Ni,component:n.AboutDialog.$gtype}}initialize(){this._button=new n.Button({label:`Show dialog`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=new n.AboutDialog({programName:this.args.programName,version:this.args.version,logoIconName:`application-x-executable-symbolic`,comments:`An arithmetic calculator for the GNOME desktop.`,website:`https://gitlab.gnome.org/World/gnome-calculator`,websiteLabel:`GNOME Calculator`,copyright:`© 2026 The GNOME Project`,systemInformation:`GTK 4.24.0
343
343
  glibc 2.42
344
- Built with meson 1.6`}),t=Ni[this.args.licenseType]??n.License.UNKNOWN;t===n.License.CUSTOM&&e.set_license(`Permission is hereby granted, free of charge, to any person obtaining a copy…`),e.set_license_type(t),this.args.withCredits&&(e.set_authors([`Ada Lovelace <ada@example.org>`,`Grace Hopper`]),e.set_documenters([`Barbara Liskov`]),e.set_artists([`Margaret Hamilton`]),e.set_translator_credits(`Alan Turing
345
- Katherine Johnson`),e.add_credit_section(`Reviewed by`,[`Tony Hoare <tony@example.org>`])),e.present()}updateArgs(e){}};o.type_ensure(Pi.$gtype);const Fi={stories:[Pi]},Ii={title:`Feedback/Page Setup Dialog`,description:`Gtk.PageSetupUnixDialog — the page setup dialog Unix platforms have instead of a native one: a printer and a paper size, the chosen sheet's size and margins, and four orientation buttons.`,controls:[{name:`paperSize`,label:`Paper size`,type:K.SELECT,options:[{label:`US Letter`,value:`na_letter`},{label:`US Legal`,value:`na_legal`},{label:`A4`,value:`iso_a4`},{label:`A5`,value:`iso_a5`},{label:`B5`,value:`iso_b5`},{label:`A3`,value:`iso_a3`}],defaultValue:`iso_a4`},{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Portrait`,value:`portrait`},{label:`Landscape`,value:`landscape`},{label:`Reverse portrait`,value:`reverse-portrait`},{label:`Reverse landscape`,value:`reverse-landscape`}],defaultValue:`landscape`}]};var Li=__exportAll({PageSetupUnixDialogStories:()=>Vi,PageSetupUnixDialogStory:()=>zi});const Ri={portrait:n.PageOrientation.PORTRAIT,landscape:n.PageOrientation.LANDSCAPE,"reverse-portrait":n.PageOrientation.REVERSE_PORTRAIT,"reverse-landscape":n.PageOrientation.REVERSE_LANDSCAPE};var zi=class PageSetupUnixDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookPageSetupUnixDialog`},PageSetupUnixDialogStory)}constructor(){super(X.fromMeta(PageSetupUnixDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Ii,component:n.PageSetupUnixDialog.$gtype}}initialize(){this._button=new n.Button({label:`Page Setup…`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=n.PageSetupUnixDialog.new(`Page Setup`,null),t=new n.PageSetup;t.set_paper_size_and_default_margins(n.PaperSize.new(this.args.paperSize)),t.set_orientation(Ri[this.args.orientation]??n.PageOrientation.PORTRAIT),e.set_page_setup(t),e.present()}updateArgs(e){}};const Bi=`PageSetupUnixDialog`in n;Bi&&o.type_ensure(zi.$gtype);const Vi={stories:[zi].filter(()=>Bi)},Hi={title:`Feedback/Preferences Dialog`,description:`Adw.PreferencesDialog — a preferences window with a page, a group and a handful of boxed-list rows.`,controls:[{name:`pageTitle`,label:`Page title`,type:K.TEXT,defaultValue:`General`},{name:`groupTitle`,label:`Group title`,type:K.TEXT,defaultValue:`Appearance`}]};var Ui=__exportAll({PreferencesDialogStories:()=>Gi,PreferencesDialogStory:()=>Wi}),Wi=class PreferencesDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookPreferencesDialog`},PreferencesDialogStory)}constructor(){super(X.fromMeta(PreferencesDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Hi,component:s.PreferencesDialog.$gtype}}initialize(){this._button=new n.Button({label:`Show dialog`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=new s.PreferencesDialog,t=new s.PreferencesPage({title:this.args.pageTitle,iconName:`preferences-system-symbolic`}),r=new s.PreferencesGroup({title:this.args.groupTitle,description:`Control how the application looks and behaves.`});r.add(new s.SwitchRow({title:`Dark style`,subtitle:`Use a dark colour scheme`,active:!0})),r.add(new s.ComboRow({title:`Accent colour`,model:new n.StringList({strings:[`Blue`,`Teal`,`Green`,`Orange`,`Purple`]}),selected:0})),r.add(new s.SpinRow({title:`Font size`,adjustment:new n.Adjustment({lower:8,upper:24,value:12,stepIncrement:1,pageIncrement:4})})),t.add(r),e.add(t),e.present(this)}updateArgs(e){}};o.type_ensure(Wi.$gtype);const Gi={stories:[Wi]},Ki={title:`Feedback/Print Dialog`,description:`Gtk.PrintUnixDialog — the Unix print dialog: seven notebook pages over a printer list, a Range and a Copies group on General, the sheet preview on Page Setup, and the Preview / Cancel / Print action area.`,controls:[{name:`capabilities`,label:`Capabilities`,type:K.TEXT,defaultValue:`copies|collate|reverse|scale|preview|page-set`},{name:`range`,label:`Range`,type:K.SELECT,options:[{label:`All Pages`,value:`all`},{label:`Current Page`,value:`current`},{label:`Selection`,value:`selection`},{label:`Pages`,value:`pages`}],defaultValue:`all`},{name:`copies`,label:`Copies`,type:K.NUMBER,defaultValue:2}]};var qi=__exportAll({PrintUnixDialogStories:()=>Xi,PrintUnixDialogStory:()=>Ji});const capabilities=()=>({collate:n.PrintCapabilities.COLLATE,copies:n.PrintCapabilities.COPIES,"generate-pdf":n.PrintCapabilities.GENERATE_PDF,"generate-ps":n.PrintCapabilities.GENERATE_PS,"number-up":n.PrintCapabilities.NUMBER_UP,"number-up-layout":n.PrintCapabilities.NUMBER_UP_LAYOUT,"page-set":n.PrintCapabilities.PAGE_SET,preview:n.PrintCapabilities.PREVIEW,reverse:n.PrintCapabilities.REVERSE,scale:n.PrintCapabilities.SCALE});var Ji=class PrintUnixDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookPrintUnixDialog`},PrintUnixDialogStory)}constructor(){super(X.fromMeta(PrintUnixDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Ki,component:n.PrintUnixDialog.$gtype}}initialize(){this._button=new n.Button({label:`Print…`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=n.PrintUnixDialog.new(`Print`,null),t=capabilities(),r=String(this.args.capabilities).split(`|`).map(e=>t[e.trim()]??0).reduce((e,t)=>e|t,0);e.set_manual_capabilities(r),e.set_current_page(2),e.set_support_selection(!0),e.set_has_selection(!0);let i=new n.PrintSettings;i.set_n_copies(Number(this.args.copies)),i.set_collate(this.args.range===`all`),i.set_print_pages(this.args.range===`current`?n.PrintPages.CURRENT:n.PrintPages.ALL),e.set_settings(i),e.present()}updateArgs(e){}};const Yi=`PrintUnixDialog`in n;Yi&&o.type_ensure(Ji.$gtype);const Xi={stories:[Ji].filter(()=>Yi)},Zi={title:`Feedback/Shortcuts Dialog`,description:`Adw.ShortcutsDialog — the window that lists an application’s keyboard shortcuts, one titled section at a time.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Keyboard Shortcuts`}]};var Qi=__exportAll({ShortcutsDialogStories:()=>ea,ShortcutsDialogStory:()=>$i}),$i=class ShortcutsDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookShortcutsDialog`},ShortcutsDialogStory)}constructor(){super(X.fromMeta(ShortcutsDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Zi,component:s.ShortcutsDialog.$gtype}}initialize(){this._button=new n.Button({label:`Show dialog`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=new s.ShortcutsSection({title:`General`});e.add(new s.ShortcutsItem({title:`Open Menu`,accelerator:`F10`})),e.add(new s.ShortcutsItem({title:`Preferences`,action_name:`app.preferences`})),e.add(new s.ShortcutsItem({title:`Quit`,accelerator:`<Control>q`}));let t=new s.ShortcutsSection;t.add(new s.ShortcutsItem({title:`Move Tab Left`,accelerator:`<Shift><Control>Page_Up`,direction:n.TextDirection.LTR})),t.add(new s.ShortcutsItem({title:`Move Tab Left`,accelerator:`<Shift><Control>Page_Up`,direction:n.TextDirection.RTL}));let r=new s.ShortcutsDialog({title:this.args.title});r.add(e),r.add(t),r.present(this)}updateArgs(e){}};o.type_ensure($i.$gtype);const ea={stories:[$i]},ta={title:`Feedback/Toast`,description:`Adw.Toast — a transient notification, with an optional action button, shown over an Adw.ToastOverlay.`,controls:[{name:`title`,label:`Toast text`,type:K.TEXT,defaultValue:`File moved to Trash`},{name:`timeout`,label:`Timeout (s)`,type:K.NUMBER,min:0,max:10,step:1,defaultValue:3},{name:`hasButton`,label:`Action button`,type:K.BOOLEAN,defaultValue:!0},{name:`buttonLabel`,label:`Button label`,type:K.TEXT,defaultValue:`Undo`}]};var na=__exportAll({ToastStories:()=>ia,ToastStory:()=>ra}),ra=class ToastStory extends X{_overlay=null;static{o.registerClass({GTypeName:`AdwStorybookToast`},ToastStory)}constructor(){super(X.fromMeta(ToastStory.getMetadata(),`Default`))}static getMetadata(){return{...ta,component:s.Toast.$gtype}}initialize(){let e=new n.Button({label:`Show toast`,halign:n.Align.CENTER,valign:n.Align.CENTER});e.add_css_class(`pill`),e.add_css_class(`suggested-action`),e.connect(`clicked`,()=>this._showToast()),this._overlay=new s.ToastOverlay({child:e,widthRequest:360,heightRequest:220}),this.addContent(this._overlay)}_showToast(){if(!this._overlay)return;let e=new s.Toast({title:this.args.title,timeout:this.args.timeout});this.args.hasButton&&(e.buttonLabel=this.args.buttonLabel),this._overlay.add_toast(e)}updateArgs(e){}};o.type_ensure(ra.$gtype);const ia={stories:[ra]},aa={title:`Layout/Application Window`,description:`Adw.ApplicationWindow — an Adw.Window that belongs to a GtkApplication, plus that application’s menubar.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Text Editor`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`notes.md`},{name:`showMenubar`,label:`Show menubar`,type:K.BOOLEAN,defaultValue:!0}]};var oa=__exportAll({ApplicationWindowStories:()=>ca,ApplicationWindowStory:()=>sa}),sa=class ApplicationWindowStory extends X{_window=null;_title=null;_toolbarView=null;_menubar=null;static{o.registerClass({GTypeName:`AdwStorybookApplicationWindow`},ApplicationWindowStory)}constructor(){super(X.fromMeta(ApplicationWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...aa,component:s.ApplicationWindow.$gtype}}initialize(){this._title=new s.WindowTitle({title:this.args.title,subtitle:this.args.subtitle});let e=new s.HeaderBar({titleWidget:this._title,widthRequest:460}),t=new n.Button({iconName:`go-previous-symbolic`});t.add_css_class(`flat`),e.pack_start(t),this._toolbarView=new s.ToolbarView,this._toolbarView.add_top_bar(e),this._toolbarView.content=new s.StatusPage({title:`Your Library`,description:`Content sits between the toolbars and scrolls independently of them.`});let i=new r.Menu,o=new r.Menu;o.append(`New Window`,`app.new-window`),o.append(`Quit`,`app.quit`),i.append_section(null,o);let c=new r.Menu;c.append(`Keyboard Shortcuts`,`app.shortcuts`),c.append(`About`,`app.about`),i.append_section(null,c),this._menubar=new n.PopoverMenuBar({menu_model:i}),this.args.showMenubar&&this._toolbarView.add_top_bar(this._menubar),this._window=new s.ApplicationWindow({content:this._toolbarView,show_menubar:this.args.showMenubar}),this._window.set_default_size(460,260),this.addContent(this._window)}updateArgs(e){if(!this._title||!this._window||!this._toolbarView||!this._menubar)return;this._title.title=this.args.title,this._title.subtitle=this.args.subtitle,this._window.show_menubar=this.args.showMenubar;let t=this.args.showMenubar;t&&this._menubar.get_parent()===null&&this._toolbarView.add_top_bar(this._menubar),!t&&this._menubar.get_parent()!==null&&this._toolbarView.remove(this._menubar)}};o.type_ensure(sa.$gtype);const ca={stories:[sa]},la={title:`Layout/Aspect Frame`,description:`Gtk.AspectFrame — one child, given a width/height ratio and a place in the space left over. obey-child is TRUE by default and takes the ratio from the child itself, so the story starts with it FALSE or the ratio control would be inert.`,controls:[{name:`ratio`,label:`Ratio`,type:K.RANGE,min:.5,max:3,step:.25,defaultValue:2},{name:`xalign`,label:`Xalign`,type:K.RANGE,min:0,max:1,step:.5,defaultValue:.5},{name:`yalign`,label:`Yalign`,type:K.RANGE,min:0,max:1,step:.5,defaultValue:.5},{name:`obeyChild`,label:`Obey child`,type:K.BOOLEAN,defaultValue:!1}]};var ua=__exportAll({AspectFrameStories:()=>fa,AspectFrameStory:()=>da}),da=class AspectFrameStory extends X{_frame=null;static{o.registerClass({GTypeName:`AdwStorybookAspectFrame`},AspectFrameStory)}constructor(){super(X.fromMeta(AspectFrameStory.getMetadata(),`Default`))}static getMetadata(){return{...la,component:n.AspectFrame.$gtype}}initialize(){this._frame=new n.AspectFrame({hexpand:!0,valign:n.Align.CENTER,width_request:320,height_request:180});let e=new n.Label({label:`The frame gives this child the ratio above, and puts it where xalign and yalign say.`});e.set_margin_top(12),e.set_margin_bottom(12),e.set_margin_start(12),e.set_margin_end(12),e.set_vexpand(!0),this._frame.set_child(e),this._apply(),this.addContent(this._frame)}updateArgs(e){this._apply()}_apply(){this._frame&&(this._frame.ratio=this.args.ratio,this._frame.xalign=this.args.xalign,this._frame.yalign=this.args.yalign,this._frame.obeyChild=this.args.obeyChild)}};o.type_ensure(da.$gtype);const fa={stories:[da]},pa={title:`Layout/Bin`,description:`Adw.Bin — a widget with exactly one child. It draws nothing of its own and gives the child its whole allocation; setting a new child replaces the old one.`,controls:[{name:`label`,label:`Child label`,type:K.TEXT,defaultValue:`The one child of this bin.`},{name:`swap`,label:`Replace the child`,type:K.BOOLEAN,defaultValue:!1}]};var ma=__exportAll({BinStories:()=>ga,BinStory:()=>ha}),ha=class BinStory extends X{_bin=null;static{o.registerClass({GTypeName:`AdwStorybookBin`},BinStory)}constructor(){super(X.fromMeta(BinStory.getMetadata(),`Default`))}static getMetadata(){return{...pa,component:s.Bin.$gtype}}initialize(){this._bin=new s.Bin({widthRequest:320}),this._apply(),this.addContent(this._bin)}updateArgs(e){this._apply()}_apply(){if(!this._bin)return;let e=this.args.swap,t=new n.Label({label:e?`The first child was replaced, not stacked.`:this.args.label,wrap:!0,marginTop:18,marginBottom:18,marginStart:18,marginEnd:18}),r=new n.Box;r.add_css_class(`card`),r.append(t),this._bin.child=r}};o.type_ensure(ha.$gtype);const ga={stories:[ha]},_a={title:`Layout/Breakpoint Bin`,description:`Adw.BreakpointBin gives breakpoints a home without a window: its one child rearranges itself at a size threshold, and the bin applies the LAST breakpoint whose condition holds. Resize the stage to see it.`,controls:[{name:`condition`,label:`Condition`,type:K.SELECT,options:[{label:`max-width: 480px`,value:`max-width: 480px`},{label:`max-width: 320px`,value:`max-width: 320px`},{label:`max-height: 200px`,value:`max-height: 200px`}],defaultValue:`max-width: 480px`},{name:`narrowLabel`,label:`Narrow label`,type:K.TEXT,defaultValue:`Narrow`},{name:`wideLabel`,label:`Wide label`,type:K.TEXT,defaultValue:`Wide`}]};var va=__exportAll({BreakpointBinStories:()=>ba,BreakpointBinStory:()=>ya}),ya=class BreakpointBinStory extends X{_bin=null;_label=null;_breakpoint=null;static{o.registerClass({GTypeName:`AdwStorybookBreakpointBin`},BreakpointBinStory)}constructor(){super(X.fromMeta(BreakpointBinStory.getMetadata(),`Default`))}static getMetadata(){return{..._a,component:s.BreakpointBin.$gtype}}initialize(){this._label=new n.Label({label:this.args.wideLabel,ellipsize:3}),this._label.add_css_class(`title-1`),this._bin=new s.BreakpointBin,this._bin.set_size_request(150,60),this._bin.set_child(this._label),this._apply(),this.addContent(this._bin)}updateArgs(e){this._apply()}_apply(){if(!this._bin||!this._label)return;let e=s.BreakpointCondition.parse(this.args.condition);e!==null&&(this._breakpoint!==null&&this._bin.remove_breakpoint(this._breakpoint),this._breakpoint=s.Breakpoint.new(e),this._breakpoint.add_setter(this._label,`label`,this.args.narrowLabel),this._bin.add_breakpoint(this._breakpoint),this._label.label=this.args.wideLabel)}};o.type_ensure(ya.$gtype);const ba={stories:[ya]},xa={title:`Layout/Center Box`,description:`Gtk.CenterBox — three widgets, pinned to the start, the centre and the end, with the space between them going to whichever child can grow. shrink-center-last decides who gives up space first.`,controls:[{name:`shrinkCenterLast`,label:`Shrink center last`,type:K.BOOLEAN,defaultValue:!0},{name:`baselinePosition`,label:`Baseline position`,type:K.SELECT,options:[{label:`Top`,value:`top`},{label:`Center`,value:`center`},{label:`Bottom`,value:`bottom`}],defaultValue:`center`}]};var Sa=__exportAll({CenterBoxStories:()=>Ta,CenterBoxStory:()=>wa});const Ca={top:n.BaselinePosition.TOP,center:n.BaselinePosition.CENTER,bottom:n.BaselinePosition.BOTTOM};var wa=class CenterBoxStory extends X{_box=null;static{o.registerClass({GTypeName:`AdwStorybookCenterBox`},CenterBoxStory)}constructor(){super(X.fromMeta(CenterBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...xa,component:n.CenterBox.$gtype}}initialize(){this._box=new n.CenterBox({margin_top:12,margin_bottom:12,margin_start:12,margin_end:12}),this._box.set_start_widget(new n.Label({label:`Start`,hexpand:!1})),this._box.set_center_widget(new n.Label({label:`Centre`,hexpand:!0})),this._box.set_end_widget(new n.Label({label:`End`,hexpand:!1})),this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){this._box&&(this._box.shrinkCenterLast=this.args.shrinkCenterLast,this._box.baselinePosition=Ca[this.args.baselinePosition])}};o.type_ensure(wa.$gtype);const Ta={stories:[wa]},Ea={title:`Layout/Clamp Scrollable`,description:`Adw.ClampScrollable — a clamp whose child scrolls. The scrollbar stays at the edge of the window while the content is held at a maximum width.`,controls:[{name:`maximumSize`,label:`Maximum size`,type:K.RANGE,min:200,max:600,step:10,defaultValue:400},{name:`tighteningThreshold`,label:`Tightening threshold`,type:K.RANGE,min:100,max:600,step:10,defaultValue:300}]};var Da=__exportAll({ClampScrollableStories:()=>Aa,ClampScrollableStory:()=>ka});const Oa=Array.from({length:24},(e,t)=>`Line ${t+1}: held at the clamp's width while it scrolls.`);var ka=class ClampScrollableStory extends X{_clamp=null;static{o.registerClass({GTypeName:`AdwStorybookClampScrollable`},ClampScrollableStory)}constructor(){super(X.fromMeta(ClampScrollableStory.getMetadata(),`Default`))}static getMetadata(){return{...Ea,component:s.ClampScrollable.$gtype}}initialize(){let e=new n.TextView({editable:!1,cursorVisible:!1,topMargin:12,bottomMargin:12});e.buffer.set_text(Oa.join(`
346
- `),-1),this._clamp=new s.ClampScrollable({maximumSize:this.args.maximumSize,tighteningThreshold:this.args.tighteningThreshold,child:e});let t=new n.ScrolledWindow({child:this._clamp,widthRequest:640,heightRequest:240});this.addContent(t)}updateArgs(e){this._clamp&&(this._clamp.maximumSize=this.args.maximumSize,this._clamp.tighteningThreshold=this.args.tighteningThreshold)}};o.type_ensure(ka.$gtype);const Aa={stories:[ka]},ja={title:`Layout/Clamp`,description:`Adw.Clamp limits its child to a maximum width and centres it, tightening the layout as space shrinks.`,controls:[{name:`maximumSize`,label:`Maximum size`,type:K.RANGE,min:200,max:600,step:10,defaultValue:400},{name:`tighteningThreshold`,label:`Tightening threshold`,type:K.RANGE,min:100,max:600,step:10,defaultValue:300}]};var Ma=__exportAll({ClampStories:()=>Pa,ClampStory:()=>Na}),Na=class ClampStory extends X{_clamp=null;static{o.registerClass({GTypeName:`AdwStorybookClamp`},ClampStory)}constructor(){super(X.fromMeta(ClampStory.getMetadata(),`Default`))}static getMetadata(){return{...ja,component:s.Clamp.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.HORIZONTAL,widthRequest:520});e.add_css_class(`card`);let t=new n.Label({label:`This content is clamped — it stops growing past the maximum size and stays centred.`,wrap:!0,xalign:0,hexpand:!0,marginTop:18,marginBottom:18,marginStart:18,marginEnd:18});e.append(t),this._clamp=new s.Clamp({maximumSize:this.args.maximumSize,tighteningThreshold:this.args.tighteningThreshold,child:e}),this.addContent(this._clamp)}updateArgs(e){this._clamp&&(this._clamp.maximumSize=this.args.maximumSize,this._clamp.tighteningThreshold=this.args.tighteningThreshold)}};o.type_ensure(Na.$gtype);const Pa={stories:[Na]},Fa={title:`Layout/Expander`,description:"Gtk.Expander — a title the user clicks to reveal the child below it. The arrow is its own CSS node and `:checked` is set on THAT node, not on the widget, which is what libadwaita's _expanders.scss keys the glyph swap on. `use-underline` marks a mnemonic with `_`, and Alt+that character activates the expander.",controls:[{name:`expanded`,label:`Expanded`,type:K.BOOLEAN,defaultValue:!1},{name:`useUnderline`,label:`Label marks a mnemonic`,type:K.BOOLEAN,defaultValue:!1},{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`_More options`},{name:`resizeToplevel`,label:`Resize the toplevel`,type:K.BOOLEAN,defaultValue:!1}]};var Ia=__exportAll({ExpanderStories:()=>Ra,ExpanderStory:()=>La}),La=class ExpanderStory extends X{_expander=null;static{o.registerClass({GTypeName:`AdwStorybookExpander`},ExpanderStory)}constructor(){super(X.fromMeta(ExpanderStory.getMetadata(),`Default`))}static getMetadata(){return{...Fa,component:n.Expander.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:6,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12});for(let t of[`Notifications`,`Sound`,`Network`])e.append(new n.Label({label:t}));this._expander=new n.Expander,this._expander.set_child(e),this._apply(),this.addContent(this._expander)}updateArgs(e){this._apply()}_apply(){this._expander&&(this._expander.use_underline=this.args.useUnderline,this._expander.label=String(this.args.label),this._expander.resize_toplevel=this.args.resizeToplevel,this._expander.expanded=this.args.expanded)}};o.type_ensure(La.$gtype);const Ra={stories:[La]},za={title:`Layout/Fixed`,description:`Gtk.Fixed — children at pixel positions, which is the whole of its API: it declares no property of its own. The two offsets are the arguments of gtk_fixed_put().`,controls:[{name:`offsetX`,label:`Offset x`,type:K.RANGE,min:0,max:80,step:4,defaultValue:24},{name:`offsetY`,label:`Offset y`,type:K.RANGE,min:0,max:80,step:4,defaultValue:16}]};var Ba=__exportAll({FixedStories:()=>Ha,FixedStory:()=>Va}),Va=class FixedStory extends X{_fixed=null;_first=null;_second=null;static{o.registerClass({GTypeName:`AdwStorybookFixed`},FixedStory)}constructor(){super(X.fromMeta(FixedStory.getMetadata(),`Default`))}static getMetadata(){return{...za,component:n.Fixed.$gtype}}initialize(){this._fixed=new n.Fixed,this._first=new n.Label({label:`at (x, y)`}),this._second=new n.Label({label:`at (x + 96, y + 40)`}),this._fixed.put(this._first,0,0),this._fixed.put(this._second,0,0),this._apply(),this.addContent(this._fixed)}updateArgs(e){this._apply()}_apply(){if(!this._fixed||!this._first||!this._second)return;let e=this.args.offsetX,t=this.args.offsetY;this._fixed.move(this._first,e,t),this._fixed.move(this._second,e+96,t+40)}};o.type_ensure(Va.$gtype);const Ha={stories:[Va]},Ua={title:`Layout/Frame`,description:`Gtk.Frame — a 1px border with a label embedded in its top edge. GTK draws the label as its own widget above the child, and label-xalign says where across the frame it sits.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`Details`},{name:`labelXalign`,label:`Label xalign`,type:K.RANGE,defaultValue:0,min:0,max:1,step:.5}]};var Wa=__exportAll({FrameStories:()=>Ka,FrameStory:()=>Ga}),Ga=class FrameStory extends X{_frame=null;static{o.registerClass({GTypeName:`AdwStorybookFrame`},FrameStory)}constructor(){super(X.fromMeta(FrameStory.getMetadata(),`Default`))}static getMetadata(){return{...Ua,component:n.Frame.$gtype}}initialize(){this._frame=new n.Frame({halign:n.Align.CENTER});let e=new n.Label({label:`A framed region: the label sits in the top edge of the border.`});e.set_margin_top(12),e.set_margin_bottom(12),e.set_margin_start(12),e.set_margin_end(12),this._frame.set_child(e),this._apply(),this.addContent(this._frame)}updateArgs(e){this._apply()}_apply(){this._frame&&(this._frame.label=this.args.label,this._frame.set_label_align(this.args.labelXalign))}};o.type_ensure(Ga.$gtype);const Ka={stories:[Ga]},qa={title:`Layout/Grid`,description:`Gtk.Grid — a table of cells sized by what is in them, filled row by row. The two spacings are the gap between lines, the two homogeneous flags make every line the same, and a vertical grid attaches down the rows instead of across the columns.`,controls:[{name:`columnSpacing`,label:`Column spacing`,type:K.RANGE,min:0,max:36,step:2,defaultValue:12},{name:`rowSpacing`,label:`Row spacing`,type:K.RANGE,min:0,max:36,step:2,defaultValue:12},{name:`columnHomogeneous`,label:`Column homogeneous`,type:K.BOOLEAN,defaultValue:!1},{name:`rowHomogeneous`,label:`Row homogeneous`,type:K.BOOLEAN,defaultValue:!1},{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`}]};var Ja=__exportAll({GridStories:()=>Xa,GridStory:()=>Ya}),Ya=class GridStory extends X{_grid=null;_cells=[];_orientation=null;static{o.registerClass({GTypeName:`AdwStorybookGrid`},GridStory)}constructor(){super(X.fromMeta(GridStory.getMetadata(),`Default`))}static getMetadata(){return{...qa,component:n.Grid.$gtype}}initialize(){this._grid=new n.Grid({hexpand:!0,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12});for(let e of[`Name`,`Value`,`Unit`,`editable`]){let t=new n.Label({label:e,hexpand:!0});t.set_margin_top(6),t.set_margin_bottom(6),t.set_margin_start(6),t.set_margin_end(6),this._cells.push(t)}this._attach(),this._apply(),this.addContent(this._grid)}updateArgs(e){this._apply()}_attach(){if(this._grid)for(let e of this._cells)this._grid.attach(e,-1,-1,1,1)}_apply(){if(!this._grid)return;let e=this.args.orientation===`vertical`?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL;if(this._grid.columnSpacing=this.args.columnSpacing,this._grid.rowSpacing=this.args.rowSpacing,this._grid.columnHomogeneous=this.args.columnHomogeneous,this._grid.rowHomogeneous=this.args.rowHomogeneous,this._orientation!==null&&this._orientation!==e){for(let e of this._cells)this._grid.remove(e);this._attach()}this._grid.orientation=e,this._orientation=e}};o.type_ensure(Ya.$gtype);const Xa={stories:[Ya]},Za={title:`Layout/Header Bar`,description:`Adw.HeaderBar hosts a custom title widget with start and end controls — the standard top chrome of an Adwaita window.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Text Editor`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`notes.md`},{name:`showTitle`,label:`Show title`,type:K.BOOLEAN,defaultValue:!0}]};var Qa=__exportAll({HeaderBarStories:()=>eo,HeaderBarStory:()=>$a}),$a=class HeaderBarStory extends X{_headerBar=null;_title=null;static{o.registerClass({GTypeName:`AdwStorybookHeaderBar`},HeaderBarStory)}constructor(){super(X.fromMeta(HeaderBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Za,component:s.HeaderBar.$gtype}}initialize(){this._title=new s.WindowTitle({title:this.args.title,subtitle:this.args.subtitle}),this._headerBar=new s.HeaderBar({titleWidget:this._title,showTitle:this.args.showTitle,widthRequest:460});let e=new n.Button({iconName:`go-previous-symbolic`});e.add_css_class(`flat`),this._headerBar.pack_start(e);let t=new r.Menu;t.append(`New Window`,`app.new-window`),t.append(`Preferences`,`app.preferences`),t.append(`About`,`app.about`);let i=new n.MenuButton({iconName:`open-menu-symbolic`,menuModel:t});i.add_css_class(`flat`),this._headerBar.pack_end(i),this.addContent(this._headerBar)}updateArgs(e){!this._headerBar||!this._title||(this._title.title=this.args.title,this._title.subtitle=this.args.subtitle,this._headerBar.showTitle=this.args.showTitle)}};o.type_ensure($a.$gtype);const eo={stories:[$a]},to={title:`Layout/Layout Slot`,description:`Adw.LayoutSlot is the named hole a layout of an Adw.MultiLayoutView leaves for a child: it takes the child whose id matches, and its visible property follows that child's. On its own it is a bin, which is what this story shows.`,controls:[{name:`label`,label:`Child title`,type:K.TEXT,defaultValue:`Inbox`},{name:`visible`,label:`Child visible`,type:K.BOOLEAN,defaultValue:!0}]};var no=__exportAll({LayoutSlotStories:()=>io,LayoutSlotStory:()=>ro}),ro=class LayoutSlotStory extends X{_view=null;_slot=null;_child=null;static{o.registerClass({GTypeName:`AdwStorybookLayoutSlot`},LayoutSlotStory)}constructor(){super(X.fromMeta(LayoutSlotStory.getMetadata(),`Default`))}static getMetadata(){return{...to,component:s.LayoutSlot.$gtype}}initialize(){this._slot=s.LayoutSlot.new(`primary`),this._child=new s.NavigationPage({title:this.args.label,tag:`primary`,child:new n.Label({label:`The child the view inserted here.`})}),this._view=new s.MultiLayoutView;let e=s.Layout.new(this._slot);e.name=`only`,this._view.add_layout(e),this._view.set_child(`primary`,this._child),this._apply(),this.addContent(this._view)}updateArgs(e){this._apply()}_apply(){this._child&&(this._child.title=this.args.label,this._child.visible=this.args.visible)}};o.type_ensure(ro.$gtype);const io={stories:[ro]},ao={title:`Layout/Multi Layout View`,description:`Adw.MultiLayoutView holds one set of children and several arrangements of them: each child has an id, each layout has slots with ids, and switching layouts re-inserts every child into the slot of the SAME id.`,controls:[{name:`layoutName`,label:`Layout`,type:K.SELECT,options:[{label:`wide (split)`,value:`wide`},{label:`narrow (stacked)`,value:`narrow`}],defaultValue:`wide`},{name:`showDetails`,label:`Show the details pane`,type:K.BOOLEAN,defaultValue:!0}]};var oo=__exportAll({MultiLayoutViewStories:()=>uo,MultiLayoutViewStory:()=>lo});const so=`primary`,co=`secondary`;function page(e){let t=new n.ListBox({selectionMode:n.SelectionMode.NONE});for(let[n,r]of e)t.append(new s.ActionRow({title:n,subtitle:r}));return t}function slotPage(e){return new s.NavigationPage({title:e,child:s.LayoutSlot.new(e),tag:e})}function arrangement(e){let t=new s.NavigationSplitView({collapsed:e,minSidebarWidth:160});return t.sidebar=slotPage(co),t.content=slotPage(so),t.set_size_request(420,220),t}var lo=class MultiLayoutViewStory extends X{_view=null;_details=null;static{o.registerClass({GTypeName:`AdwStorybookMultiLayoutView`},MultiLayoutViewStory)}constructor(){super(X.fromMeta(MultiLayoutViewStory.getMetadata(),`Default`))}static getMetadata(){return{...ao,component:s.MultiLayoutView.$gtype}}initialize(){this._details=page([[`From`,`Adwaita List`],[`Subject`,`Resizing the window`]]),this._view=new s.MultiLayoutView;let e=s.Layout.new(arrangement(!1));e.name=`wide`,this._view.add_layout(e);let t=s.Layout.new(arrangement(!0));t.name=`narrow`,this._view.add_layout(t),this._view.set_child(so,page([[`General`,`12 unread`],[`Starred`,`3 threads`]])),this._view.set_child(co,this._details),this._apply(),this.addContent(this._view)}updateArgs(e){this._apply()}_apply(){!this._view||!this._details||(this._details.visible=this.args.showDetails,this._view.layout_name=this.args.layoutName)}};o.type_ensure(lo.$gtype);const uo={stories:[lo]},fo={title:`Layout/Overlay`,description:`Gtk.Overlay — widgets stacked on top of one main child. The main child sizes the overlay; every other child is placed by its own halign/valign, which is what gtk_overlay_get_child_position reads and nothing else. Libadwaita ships no Adw.Overlay and gives the node no rule of its own — the .left/.right/.top/.bottom classes it puts on an edge-aligned child are the whole published contract.`,controls:[{name:`halign`,label:`Overlay halign`,type:K.SELECT,options:[{label:`Fill (the default)`,value:`fill`},{label:`Start`,value:`start`},{label:`Center`,value:`center`},{label:`End`,value:`end`}],defaultValue:`end`},{name:`valign`,label:`Overlay valign`,type:K.SELECT,options:[{label:`Fill (the default)`,value:`fill`},{label:`Start`,value:`start`},{label:`Center`,value:`center`},{label:`End`,value:`end`}],defaultValue:`end`},{name:`showLabel`,label:`Label the overlay`,type:K.BOOLEAN,defaultValue:!0}]};var po=__exportAll({OverlayStories:()=>go,OverlayStory:()=>ho});const mo={start:n.Align.START,center:n.Align.CENTER,end:n.Align.END};var ho=class OverlayStory extends X{_overlay=null;_main=null;_badge=null;static{o.registerClass({GTypeName:`AdwStorybookOverlay`},OverlayStory)}constructor(){super(X.fromMeta(OverlayStory.getMetadata(),`Default`))}static getMetadata(){return{...fo,component:n.Overlay.$gtype}}initialize(){this._main=new n.Frame({width_request:260,height_request:160,margin_top:12,margin_bottom:12});let e=new n.Label({label:`Main child — its size is the overlay`});e.add_css_class(`dim-label`),this._main.set_child(e),this._badge=new n.Box({valign:n.Align.END,halign:n.Align.END}),this._badge.set_css_classes([`osd`,`flat`]),this._badge.append(new n.Label({label:`2`})),this._overlay=new n.Overlay,this._overlay.set_child(this._main),this._overlay.add_overlay(this._badge),this._apply(),this.addContent(this._overlay)}updateArgs(e){this._apply()}_apply(){if(!this._badge)return;let e=mo[String(this.args.halign)],t=mo[String(this.args.valign)];e===void 0?this._badge.halign=n.Align.FILL:this._badge.halign=e,t===void 0?this._badge.valign=n.Align.FILL:this._badge.valign=t,this._badge.visible=this.args.showLabel}};o.type_ensure(ho.$gtype);const go={stories:[ho]},_o={title:`Layout/Paned`,description:"Gtk.Paned — two children either side of a divider the user drags. With both children resizable and no position set, GTK divides the paned in PROPORTION TO THE TWO SIZE REQUESTS rather than in half, and it draws the divider as the `separator` node a GtkPanedHandle carries. Libadwaita styles that node in _paned.scss: 1px, 5px when `wide-handle`, with the rule as an inset shadow rather than a fill.",controls:[{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`wideHandle`,label:`Wide handle`,type:K.BOOLEAN,defaultValue:!1},{name:`resizeStartChild`,label:`Resize the first child`,type:K.BOOLEAN,defaultValue:!0},{name:`resizeEndChild`,label:`Resize the second child`,type:K.BOOLEAN,defaultValue:!0},{name:`shrinkStartChild`,label:`The first child may shrink`,type:K.BOOLEAN,defaultValue:!0},{name:`position`,label:`Position (0 = derive)`,type:K.NUMBER,min:-1,max:400,step:1,defaultValue:-1}]};var vo=__exportAll({PanedStories:()=>bo,PanedStory:()=>yo});function pane(e,t){let r=new n.Box({orientation:n.Orientation.VERTICAL,spacing:4,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12});r.append(new n.Label({label:e}));let i=new n.Label({label:`${t}px of size request`});return i.add_css_class(`dim-label`),r.append(i),r}var yo=class PanedStory extends X{_paned=null;static{o.registerClass({GTypeName:`AdwStorybookPaned`},PanedStory)}constructor(){super(X.fromMeta(PanedStory.getMetadata(),`Default`))}static getMetadata(){return{..._o,component:n.Paned.$gtype}}initialize(){this._paned=new n.Paned({orientation:n.Orientation.HORIZONTAL}),this._paned.set_start_child(pane(`First child`,100)),this._paned.set_end_child(pane(`Second child`,300)),this._paned.set_size_request(400,140),this._apply(),this.addContent(this._paned)}updateArgs(e){this._apply()}_apply(){this._paned&&(this._paned.orientation=this.args.orientation===`vertical`?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL,this._paned.wide_handle=this.args.wideHandle,this._paned.resize_start_child=this.args.resizeStartChild,this._paned.resize_end_child=this.args.resizeEndChild,this._paned.shrink_start_child=this.args.shrinkStartChild,this._paned.position=Number(this.args.position))}};o.type_ensure(yo.$gtype);const bo={stories:[yo]},xo=[{label:`Cut`},{label:`Copy`},{label:`Paste`},{label:`Delete`,accel:`<Shift>Delete`}],So={title:`Layout/Popover Bin`,description:'Gtk.PopoverBin — GTK 4.22’s one-child container with a popover, for the place where "any part of this window can offer a menu" is the answer. `menu-model` builds the popover for you, and `handle-input` is what turns a right click or a long press into a popup — a plain click still reaches the child.',controls:[{name:`handleInput`,label:`Right click / long press opens`,type:K.BOOLEAN,defaultValue:!0}]};var Co=__exportAll({PopoverBinStories:()=>To,PopoverBinStory:()=>wo}),wo=class PopoverBinStory extends X{_bin=null;_list=null;static{o.registerClass({GTypeName:`AdwStorybookPopoverBin`},PopoverBinStory)}constructor(){super(X.fromMeta(PopoverBinStory.getMetadata(),`Default`))}static getMetadata(){return{...So,component:n.PopoverBin.$gtype}}initialize(){this._list=new n.ListBox({selectionMode:n.SelectionMode.SINGLE});for(let e of[`Documents`,`Downloads`,`Pictures`])this._list.append(new n.ListBoxRow({child:new n.Label({label:e})}));this._bin=new n.PopoverBin({child:this._list}),this._apply(),this.addContent(this._bin)}updateArgs(e){this._apply()}_buildMenu(){let e=new r.Menu;for(let t of xo)e.append(t.label,`app.${t.label.toLowerCase().replace(/[^a-z0-9]+/g,`-`)}`);return e}_apply(){this._bin&&(this._bin.menuModel=this._buildMenu(),this._bin.handleInput=this.args.handleInput)}};o.type_ensure(wo.$gtype);const To={stories:[wo]},Eo=[{label:`New Window`,accel:`<Control>N`},{section:[{label:`Cut`},{label:`Copy`},{label:`Paste`}],label:`Edit`},{label:`Open With`,submenu:[{label:`Text Editor`},{label:`Web Browser`},{label:`Terminal`}]}],Do={title:`Layout/Popover Menu`,description:"Gtk.PopoverMenu — a Gtk.Popover whose contents are a menu model instead of a child widget. A submenu swaps the page of the ONE surface rather than opening a second popup beside it, which is why the open page is a named one (`visible-submenu`).",controls:[{name:`menuTitle`,label:`Heading`,type:K.TEXT,defaultValue:`Document`},{name:`position`,label:`Position`,type:K.SELECT,options:[{label:`Bottom`,value:`bottom`},{label:`Top`,value:`top`},{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`bottom`},{name:`align`,label:`Align`,type:K.SELECT,options:[{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`start`},{name:`autohide`,label:`Dismiss on outside click`,type:K.BOOLEAN,defaultValue:!0}]};var Oo=__exportAll({PopoverMenuStories:()=>Ao,PopoverMenuStory:()=>ko});const actionOf=e=>`app.${e.toLowerCase().replace(/[^a-z0-9]+/g,`-`)}`;var ko=class PopoverMenuStory extends X{_anchor=null;_popover=null;static{o.registerClass({GTypeName:`AdwStorybookPopoverMenu`},PopoverMenuStory)}constructor(){super(X.fromMeta(PopoverMenuStory.getMetadata(),`Default`))}static getMetadata(){return{...Do,component:n.PopoverMenu.$gtype}}initialize(){this._anchor=new n.Button({label:`Open menu`,halign:n.Align.CENTER}),this._apply(),this.addContent(this._anchor)}updateArgs(e){this._apply()}_buildMenu(e){let t=new r.Menu,n=[];for(let e of Eo){if(`submenu`in e){let n=new r.Menu;for(let t of e.submenu)n.append(t.label,actionOf(t.label));t.append_submenu(e.label,n);continue}if(`section`in e){let n=new r.Menu;for(let t of e.section)n.append(t.label,actionOf(t.label));t.append_section(`Edit`,n);continue}n.push(e.label)}if(e.length>0){let i=new r.Menu;for(let e of n)i.append(e,actionOf(e));t.append_section(e,i)}else for(let e of n)t.append(e,actionOf(e));return t}_apply(){if(!this._anchor)return;let e=this._popover;this._popover=n.PopoverMenu.new_from_model(this._buildMenu(this.args.menuTitle)),this._popover.set_parent(this._anchor),e?.unparent();let t={bottom:n.PositionType.BOTTOM,top:n.PositionType.TOP,start:n.PositionType.LEFT,end:n.PositionType.RIGHT};this._popover.position=t[this.args.position]??n.PositionType.BOTTOM,this._anchor&&(this._anchor.halign=this.args.align===`end`?n.Align.END:n.Align.START),this._popover.autohide=this.args.autohide}};o.type_ensure(ko.$gtype);const Ao={stories:[ko]},jo={title:`Layout/Popover`,description:"Gtk.Popover — the bubble-like surface. No model and no menu: it holds whatever widget you put in it, and everything here is about WHERE it appears and WHEN it goes away. `autohide` off is entry completion: the list follows the typing and the caret never leaves.",controls:[{name:`position`,label:`Position`,type:K.SELECT,options:[{label:`Bottom`,value:`bottom`},{label:`Top`,value:`top`},{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`bottom`},{name:`align`,label:`Align`,type:K.SELECT,options:[{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`start`},{name:`autohide`,label:`Dismiss on outside click`,type:K.BOOLEAN,defaultValue:!0}]};var Mo=__exportAll({PopoverStories:()=>Po,PopoverStory:()=>No}),No=class PopoverStory extends X{_anchor=null;_popover=null;static{o.registerClass({GTypeName:`AdwStorybookPopover`},PopoverStory)}constructor(){super(X.fromMeta(PopoverStory.getMetadata(),`Default`))}static getMetadata(){return{...jo,component:n.Popover.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:6});e.append(new n.Label({label:`Anything you like`})),e.append(new n.Label({label:`in here`})),this._anchor=new n.Button({label:`Show popover`,halign:n.Align.CENTER}),this._popover=new n.Popover({child:e}),this._popover.set_parent(this._anchor),this._apply(),this.addContent(this._anchor)}updateArgs(e){this._apply()}_apply(){if(!this._popover)return;let e={bottom:n.PositionType.BOTTOM,top:n.PositionType.TOP,start:n.PositionType.LEFT,end:n.PositionType.RIGHT};this._popover.position=e[this.args.position]??n.PositionType.BOTTOM,this._anchor&&(this._anchor.halign=this.args.align===`end`?n.Align.END:n.Align.START),this._popover.autohide=this.args.autohide}};o.type_ensure(No.$gtype);const Po={stories:[No]},Fo={title:`Layout/Revealer`,description:`Gtk.Revealer — shows and hides its child with an animation. The transition is one of fourteen nicks and it is not only an opacity change: a slide scales the box along one axis while allocating the child at its UNSCALED size, and a swing folds it in with sin (π · pos / 2). Libadwaita styles no revealer node of its own, so everything here is GTK behaviour the browser element ports.`,controls:[{name:`transitionType`,label:`Transition`,type:K.SELECT,options:[{label:`Slide down (the default)`,value:`slide-down`},{label:`Slide up`,value:`slide-up`},{label:`Slide left`,value:`slide-left`},{label:`Slide right`,value:`slide-right`},{label:`Crossfade`,value:`crossfade`},{label:`Fade + slide down`,value:`fade-slide-down`},{label:`Swing down (fold)`,value:`swing-down`},{label:`Swing right (fold)`,value:`swing-right`},{label:`None`,value:`none`}],defaultValue:`slide-down`},{name:`transitionDuration`,label:`Duration (ms)`,type:K.RANGE,min:0,max:800,step:50,defaultValue:250},{name:`revealChild`,label:`Reveal`,type:K.BOOLEAN,defaultValue:!0}]};var Io=__exportAll({RevealerStories:()=>zo,RevealerStory:()=>Ro});const Lo={none:n.RevealerTransitionType.NONE,crossfade:n.RevealerTransitionType.CROSSFADE,"slide-right":n.RevealerTransitionType.SLIDE_RIGHT,"slide-left":n.RevealerTransitionType.SLIDE_LEFT,"slide-up":n.RevealerTransitionType.SLIDE_UP,"slide-down":n.RevealerTransitionType.SLIDE_DOWN,"swing-right":n.RevealerTransitionType.SWING_RIGHT,"swing-left":n.RevealerTransitionType.SWING_LEFT,"swing-up":n.RevealerTransitionType.SWING_UP,"swing-down":n.RevealerTransitionType.SWING_DOWN,"fade-slide-right":n.RevealerTransitionType.FADE_SLIDE_RIGHT,"fade-slide-left":n.RevealerTransitionType.FADE_SLIDE_LEFT,"fade-slide-up":n.RevealerTransitionType.FADE_SLIDE_UP,"fade-slide-down":n.RevealerTransitionType.FADE_SLIDE_DOWN};var Ro=class RevealerStory extends X{_revealer=null;static{o.registerClass({GTypeName:`AdwStorybookRevealer`},RevealerStory)}constructor(){super(X.fromMeta(RevealerStory.getMetadata(),`Default`))}static getMetadata(){return{...Fo,component:n.Revealer.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:6,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12});e.append(new n.Label({label:`The revealed child`}));let t=new n.Label({label:`Drag the controls to change the transition`});t.add_css_class(`dim-label`),e.append(t),this._revealer=new n.Revealer,this._revealer.set_child(e),this._apply(),this.addContent(this._revealer)}updateArgs(e){this._apply()}_apply(){this._revealer&&(this._revealer.transition_type=Lo[String(this.args.transitionType)],this._revealer.transition_duration=Number(this.args.transitionDuration),this._revealer.reveal_child=this.args.revealChild)}};o.type_ensure(Ro.$gtype);const zo={stories:[Ro]},Bo={title:`Layout/Scrollbar`,description:`Gtk.Scrollbar — a trough and a slider, positioned by a GtkAdjustment. The slider is page_size over the whole range long and sits at the position over the SCROLLABLE range, which is why the two numbers it is made of do not share a denominator.`,controls:[{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`vertical`},{name:`upper`,label:`Adjustment upper`,type:K.NUMBER,defaultValue:400},{name:`pageSize`,label:`Adjustment page size`,type:K.NUMBER,defaultValue:120},{name:`value`,label:`Adjustment value`,type:K.NUMBER,defaultValue:80}]};var Vo=__exportAll({ScrollbarStories:()=>Uo,ScrollbarStory:()=>Ho}),Ho=class ScrollbarStory extends X{_scrollbar=null;static{o.registerClass({GTypeName:`AdwStorybookScrollbar`},ScrollbarStory)}constructor(){super(X.fromMeta(ScrollbarStory.getMetadata(),`Default`))}static getMetadata(){return{...Bo,component:n.Scrollbar.$gtype}}initialize(){this._scrollbar=new n.Scrollbar({adjustment:new n.Adjustment({step_increment:10,page_increment:80})}),this._apply(),this.addContent(this._scrollbar)}updateArgs(e){this._apply()}_apply(){let e=this._scrollbar;if(!e)return;e.orientation=this.args.orientation===`horizontal`?n.Orientation.HORIZONTAL:n.Orientation.VERTICAL;let t=e.get_adjustment();t&&t.configure(Number(this.args.value),0,Number(this.args.upper),t.step_increment,t.page_increment,Number(this.args.pageSize))}};o.type_ensure(Ho.$gtype);const Uo={stories:[Ho]},Wo={title:`Layout/ScrolledWindow`,description:`Gtk.ScrolledWindow — one child, two adjustments, and a scrollbar per edge that can actually scroll. The policies decide whether a bar appears, window-placement which edge it takes, and overlay-scrolling turns the bars into the auto-hiding indicators GNOME draws over the content.`,controls:[{name:`hPolicy`,label:`Horizontal policy`,type:K.SELECT,options:[{label:`Automatic`,value:`automatic`},{label:`Always`,value:`always`},{label:`Never`,value:`never`}],defaultValue:`automatic`},{name:`vPolicy`,label:`Vertical policy`,type:K.SELECT,options:[{label:`Automatic`,value:`automatic`},{label:`Always`,value:`always`},{label:`Never`,value:`never`}],defaultValue:`automatic`},{name:`placement`,label:`Window placement`,type:K.SELECT,options:[{label:`Top left`,value:`top-left`},{label:`Top right`,value:`top-right`},{label:`Bottom left`,value:`bottom-left`},{label:`Bottom right`,value:`bottom-right`}],defaultValue:`top-left`},{name:`frame`,label:`Frame`,type:K.BOOLEAN,defaultValue:!1},{name:`overlayScrolling`,label:`Overlay scrolling`,type:K.BOOLEAN,defaultValue:!0}]};var Go=__exportAll({ScrolledWindowStories:()=>Yo,ScrolledWindowStory:()=>Jo});const Ko={automatic:n.PolicyType.AUTOMATIC,always:n.PolicyType.ALWAYS,never:n.PolicyType.NEVER},qo={"top-left":n.CornerType.TOP_LEFT,"top-right":n.CornerType.TOP_RIGHT,"bottom-left":n.CornerType.BOTTOM_LEFT,"bottom-right":n.CornerType.BOTTOM_RIGHT};var Jo=class ScrolledWindowStory extends X{_window=null;static{o.registerClass({GTypeName:`AdwStorybookScrolledWindow`},ScrolledWindowStory)}constructor(){super(X.fromMeta(ScrolledWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...Wo,component:n.ScrolledWindow.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:8});for(let t=1;t<=16;t++)e.append(new n.Label({label:`Row ${t}`}));this._window=new n.ScrolledWindow({child:e,min_content_height:240,halign:n.Align.CENTER}),this._apply(),this.addContent(this._window)}updateArgs(e){this._apply()}_apply(){let e=this._window;e&&(e.set_policy(Ko[this.args.hPolicy]??n.PolicyType.AUTOMATIC,Ko[this.args.vPolicy]??n.PolicyType.AUTOMATIC),e.set_placement(qo[this.args.placement]??n.CornerType.TOP_LEFT),e.has_frame=this.args.frame,e.set_overlay_scrolling(this.args.overlayScrolling))}};o.type_ensure(Jo.$gtype);const Yo={stories:[Jo]},Xo={title:`Layout/Separator`,description:`Gtk.Separator — a one-pixel rule between two groups of widgets. Libadwaita ships no Adw.Separator; it only styles the GTK one, and the .spacer style class turns the rule into an empty 12px gap.`,controls:[{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`spacer`,label:`Spacer (draws nothing)`,type:K.BOOLEAN,defaultValue:!1}]};var Zo=__exportAll({SeparatorStories:()=>$o,SeparatorStory:()=>Qo}),Qo=class SeparatorStory extends X{_box=null;_separator=null;static{o.registerClass({GTypeName:`AdwStorybookSeparator`},SeparatorStory)}constructor(){super(X.fromMeta(SeparatorStory.getMetadata(),`Default`))}static getMetadata(){return{...Xo,component:n.Separator.$gtype}}initialize(){this._separator=new n.Separator,this._box=new n.Box({spacing:12,halign:n.Align.CENTER}),this._box.append(new n.Label({label:`Above`})),this._box.append(this._separator),this._box.append(new n.Label({label:`Below`})),this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){if(!this._box||!this._separator)return;let e=this.args.orientation===`vertical`;this._separator.orientation=e?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL,this._box.orientation=e?n.Orientation.HORIZONTAL:n.Orientation.VERTICAL,this.args.spacer?this._separator.add_css_class(`spacer`):this._separator.remove_css_class(`spacer`)}};o.type_ensure(Qo.$gtype);const $o={stories:[Qo]},es={title:`Layout/Toolbar View`,description:`Adw.ToolbarView pins a top header bar and a bottom toolbar around its content, each independently revealable.`,controls:[{name:`revealTopBars`,label:`Reveal top bars`,type:K.BOOLEAN,defaultValue:!0},{name:`revealBottomBars`,label:`Reveal bottom bars`,type:K.BOOLEAN,defaultValue:!0}]};var ts=__exportAll({ToolbarViewStories:()=>rs,ToolbarViewStory:()=>ns}),ns=class ToolbarViewStory extends X{_view=null;static{o.registerClass({GTypeName:`AdwStorybookToolbarView`},ToolbarViewStory)}constructor(){super(X.fromMeta(ToolbarViewStory.getMetadata(),`Default`))}static getMetadata(){return{...es,component:s.ToolbarView.$gtype}}initialize(){this._view=new s.ToolbarView({widthRequest:460,heightRequest:320,revealTopBars:this.args.revealTopBars,revealBottomBars:this.args.revealBottomBars});let e=new s.HeaderBar({titleWidget:new s.WindowTitle({title:`Documents`,subtitle:`12 items`})});this._view.add_top_bar(e);let t=new s.StatusPage({iconName:`folder-documents-symbolic`,title:`Your library`,description:`Content sits between the toolbars and scrolls independently of them.`});this._view.content=t;let r=new n.ActionBar,i=new n.Button({iconName:`list-add-symbolic`});i.add_css_class(`flat`);let o=new n.Button({iconName:`list-remove-symbolic`});o.add_css_class(`flat`),r.pack_start(i),r.pack_start(o),r.set_center_widget(new n.Label({label:`Selection: none`}));let c=new n.Button({iconName:`send-to-symbolic`});c.add_css_class(`flat`),r.pack_end(c),this._view.add_bottom_bar(r),this.addContent(this._view)}updateArgs(e){this._view&&(this._view.revealTopBars=this.args.revealTopBars,this._view.revealBottomBars=this.args.revealBottomBars)}};o.type_ensure(ns.$gtype);const rs={stories:[ns]},is={title:`Layout/Viewport`,description:`Gtk.Viewport — scrollability for a widget that has none of its own. It has one property, scroll-to-focus: whether a widget that takes the focus is scrolled into view. It is also what a Gtk.ScrolledWindow puts its child in.`,controls:[{name:`scrollToFocus`,label:`Scroll to focus`,type:K.BOOLEAN,defaultValue:!0}]};var as=__exportAll({ViewportStories:()=>ss,ViewportStory:()=>os}),os=class ViewportStory extends X{_viewport=null;static{o.registerClass({GTypeName:`AdwStorybookViewport`},ViewportStory)}constructor(){super(X.fromMeta(ViewportStory.getMetadata(),`Default`))}static getMetadata(){return{...is,component:n.Viewport.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:8});for(let t=1;t<=16;t++)e.append(new n.Label({label:`Row ${t}`}));e.append(new n.Button({label:`Focus me`,halign:n.Align.START})),this._viewport=new n.Viewport({child:e,halign:n.Align.CENTER}),this._apply(),this.addContent(this._viewport)}updateArgs(e){this._apply()}_apply(){this._viewport&&this._viewport.set_scroll_to_focus(this.args.scrollToFocus)}};o.type_ensure(os.$gtype);const ss={stories:[os]},cs={title:`Layout/Window`,description:`Adw.Window — a freeform window with no titlebar area. Use Adw.ToolbarView with Adw.HeaderBar for the top chrome.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Text Editor`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`notes.md`}]};var ls=__exportAll({WindowStories:()=>ds,WindowStory:()=>us}),us=class WindowStory extends X{_window=null;_title=null;static{o.registerClass({GTypeName:`AdwStorybookWindow`},WindowStory)}constructor(){super(X.fromMeta(WindowStory.getMetadata(),`Default`))}static getMetadata(){return{...cs,component:s.Window.$gtype}}initialize(){this._title=new s.WindowTitle({title:this.args.title,subtitle:this.args.subtitle});let e=new s.HeaderBar({titleWidget:this._title,widthRequest:460}),t=new n.Button({iconName:`go-previous-symbolic`});t.add_css_class(`flat`),e.pack_start(t);let r=new n.MenuButton({iconName:`open-menu-symbolic`});r.add_css_class(`flat`),e.pack_end(r);let i=new s.ToolbarView;i.add_top_bar(e),i.content=new s.StatusPage({title:`Your Library`,description:`Content sits between the toolbars and scrolls independently of them.`}),this._window=new s.Window({content:i}),this.addContent(this._window)}updateArgs(e){this._title&&(this._title.title=this.args.title,this._title.subtitle=this.args.subtitle)}};o.type_ensure(us.$gtype);const ds={stories:[us]},fs={title:`Layout/Wrap Box`,description:`Adw.WrapBox flows its children horizontally and wraps them onto new lines when they run out of room.`,controls:[{name:`childSpacing`,label:`Child spacing`,type:K.RANGE,min:0,max:36,step:1,defaultValue:8},{name:`lineSpacing`,label:`Line spacing`,type:K.RANGE,min:0,max:36,step:1,defaultValue:8}]};var ps=__exportAll({WrapBoxStories:()=>hs,WrapBoxStory:()=>ms}),ms=class WrapBoxStory extends X{_wrap=null;static{o.registerClass({GTypeName:`AdwStorybookWrapBox`},WrapBoxStory)}constructor(){super(X.fromMeta(WrapBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...fs,component:s.WrapBox.$gtype}}initialize(){this._wrap=new s.WrapBox({childSpacing:this.args.childSpacing,lineSpacing:this.args.lineSpacing,widthRequest:460});for(let e of[`Design`,`Adwaita`,`GNOME`,`GTK`,`TypeScript`,`Storybook`,`Wrapping`,`Layout`]){let t=new n.Button({label:e});t.add_css_class(`pill`),this._wrap.append(t)}this.addContent(this._wrap)}updateArgs(e){this._wrap&&(this._wrap.childSpacing=this.args.childSpacing,this._wrap.lineSpacing=this.args.lineSpacing)}};o.type_ensure(ms.$gtype);const hs={stories:[ms]},gs={title:`Media/Image`,description:`Gtk.Image — a symbolic icon, drawn as a CSS-masked box in the surrounding text colour. It takes a NAME, not a file: a name the icon theme cannot resolve draws the missing-image glyph, which is exactly what GTK draws for it. That is why <gtk-picture> is a separate widget — an icon sized by the theme and an image fitted to a box are two different jobs.`,controls:[{name:`iconName`,label:`Icon name`,type:K.TEXT,defaultValue:`avatar-default-symbolic`},{name:`size`,label:`Size (px)`,type:K.RANGE,min:16,max:96,step:8,defaultValue:48},{name:`disabled`,label:`Disabled`,type:K.BOOLEAN,defaultValue:!1}]};var _s=__exportAll({ImageStories:()=>ys,ImageStory:()=>vs}),vs=class ImageStory extends X{_image=null;static{o.registerClass({GTypeName:`AdwStorybookImage`},ImageStory)}constructor(){super(X.fromMeta(ImageStory.getMetadata(),`Default`))}static getMetadata(){return{...gs,component:n.Image.$gtype}}initialize(){this._image=new n.Image({halign:n.Align.CENTER,valign:n.Align.CENTER}),this._apply(),this.addContent(this._image)}updateArgs(e){this._apply()}_apply(){this._image&&(this._image.icon_size=this.args.size,this._image.icon_name=this.args.iconName,this._image.sensitive=!this.args.disabled)}};o.type_ensure(vs.$gtype);const ys={stories:[vs]},bs={title:`Media/Inscription`,description:`Gtk.Inscription — text laid out to a size in CHARACTERS and LINES rather than to a size in pixels. It is the widget for text whose extent should be the same everywhere, so it never measures its own content: min-chars/nat-chars and min-lines/nat-lines ARE its size request.`,controls:[{name:`text`,label:`Text`,type:K.TEXT,defaultValue:`Inscription`},{name:`minChars`,label:`Min chars`,type:K.RANGE,min:0,max:40,step:1,defaultValue:3},{name:`natChars`,label:`Nat chars`,type:K.RANGE,min:0,max:40,step:1,defaultValue:0},{name:`minLines`,label:`Min lines`,type:K.RANGE,min:0,max:6,step:1,defaultValue:1},{name:`natLines`,label:`Nat lines`,type:K.RANGE,min:0,max:6,step:1,defaultValue:0},{name:`wrapMode`,label:`Wrap mode`,type:K.SELECT,options:[{label:`Word`,value:`word`},{label:`Char`,value:`char`},{label:`Word-char (default)`,value:`word-char`}],defaultValue:`word-char`},{name:`textOverflow`,label:`Text overflow`,type:K.SELECT,options:[{label:`Clip (default)`,value:`clip`},{label:`Ellipsize start`,value:`ellipsize-start`},{label:`Ellipsize middle`,value:`ellipsize-middle`},{label:`Ellipsize end`,value:`ellipsize-end`}],defaultValue:`clip`},{name:`xalign`,label:`X align`,type:K.RANGE,min:0,max:1,step:.05,defaultValue:0},{name:`yalign`,label:`Y align`,type:K.RANGE,min:0,max:1,step:.05,defaultValue:.5}]};var xs=__exportAll({InscriptionStories:()=>Cs,InscriptionStory:()=>Ss}),Ss=class InscriptionStory extends X{_inscription=null;_frame=null;static{o.registerClass({GTypeName:`AdwStorybookInscription`},InscriptionStory)}constructor(){super(X.fromMeta(InscriptionStory.getMetadata(),`Default`))}static getMetadata(){return{...bs,component:n.Inscription.$gtype}}initialize(){this._inscription=new n.Inscription,this._frame=new n.Frame({child:this._inscription,halign:n.Align.CENTER}),this._apply(),this.addContent(this._frame)}updateArgs(e){this._apply()}_apply(){!this._inscription||!this._frame||(this._inscription.min_chars=this.args.minChars,this._inscription.nat_chars=this.args.natChars,this._inscription.min_lines=this.args.minLines,this._inscription.nat_lines=this.args.natLines,this._inscription.text=this.args.text,this._inscription.wrap_mode=this.args.wrapMode,this._inscription.text_overflow=this.args.textOverflow,this._inscription.xalign=this.args.xalign,this._inscription.yalign=this.args.yalign,this._frame.width_request=320,this._frame.height_request=160)}};o.type_ensure(Ss.$gtype);const Cs={stories:[Ss]},ws={title:`Media/Media Controls`,description:"Gtk.MediaControls — the transport bar: play, position, duration, volume. It owns no playback at all (its one property is an object, `media-stream`), and the bar is INSENSITIVE until a stream is attached. Note which label shows what: the position label shows the elapsed time and the one beside it shows what REMAINS, negatively.",controls:[{name:`sensitive`,label:`Sensitive`,type:K.BOOLEAN,defaultValue:!0}]};var Ts=__exportAll({MediaControlsStories:()=>Ds,MediaControlsStory:()=>Es}),Es=class MediaControlsStory extends X{_controls=null;static{o.registerClass({GTypeName:`AdwStorybookMediaControls`},MediaControlsStory)}constructor(){super(X.fromMeta(MediaControlsStory.getMetadata(),`Default`))}static getMetadata(){return{...ws,component:n.MediaControls.$gtype}}initialize(){this._controls=new n.MediaControls,this._controls.add_css_class(`osd`),this._controls.add_css_class(`bottom`),this._apply(),this.addContent(this._controls)}updateArgs(e){this._apply()}_apply(){this._controls&&(this._controls.sensitive=this.args.sensitive)}};o.type_ensure(Es.$gtype);const Ds={stories:[Es]},Os={title:`Media/Picture`,description:"Gtk.Picture — an image fitted to the box it is given, not sized by itself. `content-fit` picks one of the four fit modes (contain, cover, fill, scale-down), `can-shrink` decides whether it may be smaller than its content, and `alternative-text` is what a screen reader hears.",controls:[{name:`contentFit`,label:`Content fit`,type:K.SELECT,options:[{label:`Contain`,value:`contain`},{label:`Cover`,value:`cover`},{label:`Fill`,value:`fill`},{label:`Scale down`,value:`scale-down`}],defaultValue:`contain`},{name:`canShrink`,label:`Can shrink`,type:K.BOOLEAN,defaultValue:!0},{name:`alternativeText`,label:`Alternative text`,type:K.TEXT,defaultValue:`A tangerine`},{name:`isolateContents`,label:`Isolate contents`,type:K.BOOLEAN,defaultValue:!0},{name:`keepAspectRatio`,label:`Keep aspect ratio (deprecated)`,type:K.BOOLEAN,defaultValue:!0},{name:`width`,label:`Width (px)`,type:K.RANGE,min:64,max:320,step:16,defaultValue:240}]};var ks=__exportAll({PictureStories:()=>js,PictureStory:()=>As});function makePaintable(){let n=320*4,r=new Uint8Array(n*180);for(let e=0;e<180;e++){let t=e<180/2?48:144;for(let i=0;i<320;i++){let o=e*n+i*4;r[o]=t,r[o+1]=i<320/2?64:192,r[o+2]=160,r[o+3]=255}}return t.MemoryTexture.new(320,180,t.MemoryFormat.R8G8B8A8,e.Bytes.new(r),n)}var As=class PictureStory extends X{_picture=null;static{o.registerClass({GTypeName:`AdwStorybookPicture`},PictureStory)}constructor(){super(X.fromMeta(PictureStory.getMetadata(),`Default`))}static getMetadata(){return{...Os,component:n.Picture.$gtype}}initialize(){this._picture=new n.Picture({paintable:makePaintable(),halign:n.Align.CENTER,valign:n.Align.CENTER}),this._apply(),this.addContent(this._picture)}updateArgs(e){this._apply()}_apply(){if(!this._picture)return;let e=this.args.width;this._picture.set_size_request(e,Math.round(e*2/3)),this.args.keepAspectRatio&&(this._picture.keep_aspect_ratio=!0),this._picture.content_fit=this.args.contentFit,this._picture.can_shrink=this.args.canShrink,this._picture.alternative_text=this.args.alternativeText,this._picture.isolate_contents=this.args.isolateContents}};o.type_ensure(As.$gtype);const js={stories:[As]},Ms={title:`Media/Video`,description:`Gtk.Video — a play surface with an overlay icon and a controls bar that hides itself three seconds after you stop moving the pointer. The overlay icon is a four-way choice — no stream, error, ended, or ready — and it is only VISIBLE while the video is stopped; there is no pause glyph over the frames.`,controls:[{name:`autoplay`,label:`Autoplay`,type:K.BOOLEAN,defaultValue:!1},{name:`loop`,label:`Loop`,type:K.BOOLEAN,defaultValue:!0},{name:`graphicsOffload`,label:`Graphics offload`,type:K.BOOLEAN,defaultValue:!1},{name:`width`,label:`Width (px)`,type:K.RANGE,min:160,max:480,step:40,defaultValue:320}]};var Ns=__exportAll({VideoStories:()=>Fs,VideoStory:()=>Ps}),Ps=class VideoStory extends X{_video=null;static{o.registerClass({GTypeName:`AdwStorybookVideo`},VideoStory)}constructor(){super(X.fromMeta(VideoStory.getMetadata(),`Default`))}static getMetadata(){return{...Ms,component:n.Video.$gtype}}initialize(){this._video=new n.Video({halign:n.Align.CENTER,valign:n.Align.CENTER}),this._apply(),this.addContent(this._video)}updateArgs(e){this._apply()}_apply(){if(!this._video)return;let e=this.args.width;this._video.set_size_request(e,Math.round(e*9/16)),this._video.autoplay=this.args.autoplay,this._video.loop=this.args.loop,this._video.graphics_offload=this.args.graphicsOffload?n.GraphicsOffloadEnabled.ENABLED:n.GraphicsOffloadEnabled.DISABLED}};o.type_ensure(Ps.$gtype);const Fs={stories:[Ps]},Is={title:`Navigation/Bottom Sheet`,description:`Adw.BottomSheet — a sheet that slides up over the content. Toggle "Open" to reveal it.`,controls:[{name:`open`,label:`Open`,type:K.BOOLEAN,defaultValue:!0},{name:`modal`,label:`Modal`,type:K.BOOLEAN,defaultValue:!0},{name:`canClose`,label:`Can close`,type:K.BOOLEAN,defaultValue:!0}]};var Ls=__exportAll({BottomSheetStories:()=>zs,BottomSheetStory:()=>Rs}),Rs=class BottomSheetStory extends X{_sheet=null;static{o.registerClass({GTypeName:`AdwStorybookBottomSheet`},BottomSheetStory)}constructor(){super(X.fromMeta(BottomSheetStory.getMetadata(),`Default`))}static getMetadata(){return{...Is,component:s.BottomSheet.$gtype}}buildContent(){let e=new n.Button({label:`Toggle sheet`,halign:n.Align.CENTER,valign:n.Align.CENTER,vexpand:!0});return e.add_css_class(`pill`),e.add_css_class(`suggested-action`),e.connect(`clicked`,()=>{this._sheet&&(this._sheet.open=!this._sheet.open)}),e}buildSheet(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,marginTop:18,marginBottom:24,marginStart:18,marginEnd:18});e.append(new n.Label({label:`Share track`,halign:n.Align.START,cssClasses:[`title-2`]}));let t=new s.PreferencesGroup;for(let[e,r]of[[`Copy link`,`edit-copy-symbolic`],[`Send to a friend`,`mail-send-symbolic`],[`Add to playlist`,`list-add-symbolic`]]){let i=new s.ActionRow({title:e});i.add_prefix(new n.Image({iconName:r})),i.activatable=!0,t.add(i)}return e.append(t),e}initialize(){this._sheet=new s.BottomSheet({content:this.buildContent(),sheet:this.buildSheet(),open:this.args.open,modal:this.args.modal,canClose:this.args.canClose,widthRequest:480,heightRequest:340}),this.addContent(this._sheet)}updateArgs(e){this._sheet&&(this._sheet.open=this.args.open,this._sheet.modal=this.args.modal,this._sheet.canClose=this.args.canClose)}};o.type_ensure(Rs.$gtype);const zs={stories:[Rs]},Bs={title:`Navigation/Navigation Split View`,description:`Adw.NavigationSplitView — a resizable sidebar beside a content pane. When collapsed it folds into a navigation stack.`,controls:[{name:`showContent`,label:`Show content`,type:K.BOOLEAN,defaultValue:!0},{name:`collapsed`,label:`Collapsed`,type:K.BOOLEAN,defaultValue:!1}]};var Vs=__exportAll({NavigationSplitViewStories:()=>Us,NavigationSplitViewStory:()=>Hs}),Hs=class NavigationSplitViewStory extends X{_view=null;static{o.registerClass({GTypeName:`AdwStorybookNavigationSplitView`},NavigationSplitViewStory)}constructor(){super(X.fromMeta(NavigationSplitViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Bs,component:s.NavigationSplitView.$gtype}}buildSidebar(){let e=new s.PreferencesGroup;for(let[t,r,i]of[[`All Mail`,`128 messages`,`mail-unread-symbolic`],[`Starred`,`6 messages`,`starred-symbolic`],[`Drafts`,`2 messages`,`document-edit-symbolic`],[`Archive`,`512 messages`,`folder-symbolic`]]){let o=new s.ActionRow({title:t,subtitle:r});o.add_prefix(new n.Image({iconName:i})),o.activatable=!0,e.add(o)}let t=new s.ToolbarView;return t.add_top_bar(new s.HeaderBar),t.content=e,new s.NavigationPage({title:`Mailboxes`,child:t})}buildContent(){let e=new s.StatusPage({iconName:`mail-unread-symbolic`,title:`All Mail`,description:`Select a conversation from the list to read it here.`,vexpand:!0}),t=new s.ToolbarView;return t.add_top_bar(new s.HeaderBar),t.content=e,new s.NavigationPage({title:`All Mail`,child:t})}initialize(){this._view=new s.NavigationSplitView({sidebar:this.buildSidebar(),content:this.buildContent(),showContent:this.args.showContent,collapsed:this.args.collapsed,widthRequest:480,heightRequest:340}),this.addContent(this._view)}updateArgs(e){this._view&&(this._view.showContent=this.args.showContent,this._view.collapsed=this.args.collapsed)}};o.type_ensure(Hs.$gtype);const Us={stories:[Hs]},Ws={title:`Navigation/Navigation View`,description:`Adw.NavigationView — a navigation stack. The root page pushes a detail page, which gets an automatic back button.`,controls:[{name:`rootTitle`,label:`Root title`,type:K.TEXT,defaultValue:`Contacts`},{name:`detailTitle`,label:`Detail title`,type:K.TEXT,defaultValue:`Ada Lovelace`},{name:`animateTransitions`,label:`Animate transitions`,type:K.BOOLEAN,defaultValue:!0}]};var Gs=__exportAll({NavigationViewStories:()=>qs,NavigationViewStory:()=>Ks}),Ks=class NavigationViewStory extends X{_view=null;static{o.registerClass({GTypeName:`AdwStorybookNavigationView`},NavigationViewStory)}constructor(){super(X.fromMeta(NavigationViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Ws,component:s.NavigationView.$gtype}}buildPage(e,t){let n=new s.ToolbarView;return n.add_top_bar(new s.HeaderBar),n.content=t,new s.NavigationPage({title:e,child:n})}initialize(){this._view=new s.NavigationView({animateTransitions:this.args.animateTransitions,widthRequest:480,heightRequest:340});let e=this.buildPage(this.args.detailTitle,new s.StatusPage({iconName:`avatar-default-symbolic`,title:this.args.detailTitle,description:`Mathematician and writer, the first computer programmer.`,vexpand:!0})),t=new n.Button({label:`Open contact`,halign:n.Align.CENTER,valign:n.Align.CENTER,vexpand:!0});t.add_css_class(`pill`),t.add_css_class(`suggested-action`),t.connect(`clicked`,()=>{this._view?.push(e)});let r=this.buildPage(this.args.rootTitle,t);this._view.add(r),this._view.add(e),this.addContent(this._view)}updateArgs(e){this._view&&(this._view.animateTransitions=this.args.animateTransitions)}};o.type_ensure(Ks.$gtype);const qs={stories:[Ks]},Js={title:`Navigation/Overlay Split View`,description:`Adw.OverlaySplitView — a sidebar shown beside the content, or overlaid on top of it when collapsed.`,controls:[{name:`showSidebar`,label:`Show sidebar`,type:K.BOOLEAN,defaultValue:!0},{name:`collapsed`,label:`Collapsed`,type:K.BOOLEAN,defaultValue:!1}]};var Ys=__exportAll({OverlaySplitViewStories:()=>Zs,OverlaySplitViewStory:()=>Xs}),Xs=class OverlaySplitViewStory extends X{_view=null;static{o.registerClass({GTypeName:`AdwStorybookOverlaySplitView`},OverlaySplitViewStory)}constructor(){super(X.fromMeta(OverlaySplitViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Js,component:s.OverlaySplitView.$gtype}}buildSidebar(){let e=new s.PreferencesGroup;for(let[t,r]of[[`Home`,`go-home-symbolic`],[`Discover`,`system-search-symbolic`],[`Library`,`folder-music-symbolic`],[`Settings`,`emblem-system-symbolic`]]){let i=new s.ActionRow({title:t});i.add_prefix(new n.Image({iconName:r})),i.activatable=!0,e.add(i)}let t=new s.ToolbarView;return t.add_top_bar(new s.HeaderBar({showTitle:!1})),t.content=e,t.add_css_class(`sidebar`),t}buildContent(){let e=new s.StatusPage({iconName:`folder-music-symbolic`,title:`Your Library`,description:`Toggle the sidebar to browse sections. Collapse it to overlay the content.`,vexpand:!0}),t=new s.ToolbarView;return t.add_top_bar(new s.HeaderBar),t.content=e,t}initialize(){this._view=new s.OverlaySplitView({sidebar:this.buildSidebar(),content:this.buildContent(),showSidebar:this.args.showSidebar,collapsed:this.args.collapsed,widthRequest:480,heightRequest:340}),this.addContent(this._view)}updateArgs(e){this._view&&(this._view.showSidebar=this.args.showSidebar,this._view.collapsed=this.args.collapsed)}};o.type_ensure(Xs.$gtype);const Zs={stories:[Xs]},Qs=[{label:`File`,submenu:[{label:`New Window`,accel:`<Control>N`},{label:`New Tab`,accel:`<Control><Shift>N`},{label:`Open…`,accel:`<Control>O`}]},{label:`Edit`,submenu:[{label:`Undo`,accel:`<Control>Z`},{label:`Redo`,accel:`<Control>Y`}]},{label:`View`,submenu:[{label:`Zoom In`,accel:`<Control>plus`},{label:`Zoom Out`}]},{label:`Help`,submenu:[{label:`Keyboard Shortcuts`},{label:`About`}]}],$s={title:`Navigation/Popover Menu Bar`,description:`Gtk.PopoverMenuBar — a horizontal bar of items that pop up menus when clicked. Clicking an item OPENS its menu; hovering only SELECTS, and the item lights up (.active) exactly while its menu is up. Left and Right walk the bar and wrap.`,controls:[{name:`position`,label:`Menu position`,type:K.SELECT,options:[{label:`Below`,value:`bottom`},{label:`Above`,value:`top`}],defaultValue:`bottom`},{name:`showLast`,label:`Include Help`,type:K.BOOLEAN,defaultValue:!0}]};var ec=__exportAll({PopoverMenuBarStories:()=>nc,PopoverMenuBarStory:()=>tc}),tc=class PopoverMenuBarStory extends X{_bar=null;static{o.registerClass({GTypeName:`AdwStorybookPopoverMenuBar`},PopoverMenuBarStory)}constructor(){super(X.fromMeta(PopoverMenuBarStory.getMetadata(),`Default`))}static getMetadata(){return{...$s,component:n.PopoverMenuBar.$gtype}}initialize(){this._bar=n.PopoverMenuBar.new_from_model(this._buildMenu()),this._bar.halign=n.Align.START,this._apply(),this.addContent(this._bar)}updateArgs(e){this._apply()}_buildMenu(){let e=new r.Menu,t=this.args.showLast===!1?Qs.slice(0,3):Qs;for(let n of t){let t=new r.Menu;for(let e of n.submenu)t.append(e.label,`app.${e.label.toLowerCase().replace(/[^a-z0-9]+/g,`-`)}`);e.append_submenu(n.label,t)}return e}_apply(){if(!this._bar)return;let e=this.args.position===`top`;for(let t=this._bar.get_first_child();t!==null;t=t.get_next_sibling())t.get_first_child()?.set_position(e?n.PositionType.TOP:n.PositionType.BOTTOM)}};o.type_ensure(tc.$gtype);const nc={stories:[tc]},rc={title:`Navigation/Sidebar`,description:`Adw.Sidebar — a selectable list of Adw.SidebarItem grouped into sections. Selecting an item updates the content.`,controls:[{name:`mode`,label:`Mode`,type:K.SELECT,options:[{label:`Sidebar`,value:`sidebar`},{label:`Page`,value:`page`}],defaultValue:`sidebar`},{name:`selected`,label:`Selected index`,type:K.NUMBER,min:0,max:3,step:1,defaultValue:0}]};var ic=__exportAll({SidebarStories:()=>oc,SidebarStory:()=>ac}),ac=class SidebarStory extends X{_sidebar=null;_status=null;static{o.registerClass({GTypeName:`AdwStorybookSidebar`},SidebarStory)}constructor(){super(X.fromMeta(SidebarStory.getMetadata(),`Default`))}static getMetadata(){return{...rc,component:s.Sidebar.$gtype}}items=[{title:`Inbox`,subtitle:`3 unread`,icon:`mail-unread-symbolic`},{title:`Starred`,subtitle:`Favourites`,icon:`starred-symbolic`},{title:`Sent`,subtitle:`Outgoing mail`,icon:`mail-send-symbolic`},{title:`Archive`,subtitle:`Older mail`,icon:`folder-symbolic`}];modeFromArg(e){return e===`page`?s.SidebarMode.PAGE:s.SidebarMode.SIDEBAR}syncContent(){if(!this._sidebar||!this._status)return;let e=this.items[this._sidebar.selected]??this.items[0];this._status.title=e.title,this._status.iconName=e.icon,this._status.description=e.subtitle}initialize(){let e=new s.SidebarSection({title:`Mailboxes`});for(let t of this.items)e.append(new s.SidebarItem({title:t.title,subtitle:t.subtitle,iconName:t.icon}));this._sidebar=new s.Sidebar({mode:this.modeFromArg(this.args.mode),selected:this.args.selected,widthRequest:220}),this._sidebar.append(e),this._sidebar.connect(`notify::selected`,()=>this.syncContent()),this._status=new s.StatusPage({hexpand:!0,vexpand:!0});let t=new n.Box({orientation:n.Orientation.HORIZONTAL,widthRequest:480,heightRequest:340});t.append(this._sidebar),t.append(new n.Separator({orientation:n.Orientation.VERTICAL})),t.append(this._status),this.syncContent(),this.addContent(t)}updateArgs(e){this._sidebar&&(this._sidebar.mode=this.modeFromArg(this.args.mode),this._sidebar.selected=this.args.selected,this.syncContent())}};o.type_ensure(ac.$gtype);const oc={stories:[ac]},sc=[{title:`Sync`,kind:`switch`,active:!0},{title:`Export`,kind:`action`}],cc=[`Blue`,`Teal`,`Green`,`Orange`],lc={appearance:`Appearance`,account:`Account`,shortcuts:`Shortcuts`,actions:`Actions`},Q={bannerTitle:`You have unsaved changes`,bannerButton:`Save`,darkMode:`Dark mode`,darkModeSubtitle:`Use the dark Adwaita palette`,notifications:`Notifications`,notificationsSubtitle:`Show toasts for events`,accentColor:`Accent color`,name:`Name`,nameValue:`Ada Lovelace`,email:`Email`,emailValue:`ada@example.com`,devices:`Devices`,advanced:`Advanced`,advancedSubtitle:`More options`,save:`Save changes`,delete:`Delete account`},$={value:3,lower:1,upper:10,step:1},uc=[{title:`Copy`,accelerator:`<Control>C`},{title:`Select all`,accelerator:`<Shift><Control>a`},{title:`Switch tab`,accelerator:`<Alt>1...9`}],dc={title:`Overview/Widgets`,description:`Many widgets at once, the way an app composes them: a banner, preference groups of rows, an expander, buttons and shortcut labels. Use it to judge spacing, alignment and the theme as a whole rather than one widget in isolation.`,controls:[{name:`revealed`,label:`Show banner`,type:K.BOOLEAN,description:`Adw.Banner:revealed — animates in and out`,defaultValue:!0}]};var fc=__exportAll({OverviewWidgetsStories:()=>mc,OverviewWidgetsStory:()=>pc}),pc=class OverviewWidgetsStory extends X{_banner=null;static{o.registerClass({GTypeName:`AdwStorybookOverviewWidgets`},OverviewWidgetsStory)}constructor(){super(X.fromMeta(OverviewWidgetsStory.getMetadata(),`Default`))}static getMetadata(){return dc}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,hexpand:!0});this._banner=new s.Banner({title:Q.bannerTitle,button_label:Q.bannerButton,revealed:this.args.revealed}),e.append(this._banner);let t=new s.PreferencesPage({hexpand:!0}),r=new s.PreferencesGroup({title:lc.appearance});r.add(new s.SwitchRow({title:Q.darkMode,subtitle:Q.darkModeSubtitle,active:!1})),r.add(new s.SwitchRow({title:Q.notifications,subtitle:Q.notificationsSubtitle,active:!0})),r.add(new s.ComboRow({title:Q.accentColor,model:n.StringList.new([...cc]),selected:0})),t.add(r);let i=new s.PreferencesGroup({title:lc.account}),o=new s.EntryRow({title:Q.name});o.set_text(Q.nameValue),i.add(o);let c=new s.EntryRow({title:Q.email});c.set_text(Q.emailValue),i.add(c);let l=new s.SpinRow({title:Q.devices,adjustment:new n.Adjustment({value:$.value,lower:$.lower,upper:$.upper,step_increment:$.step,page_increment:$.step})});l.set_value($.value),i.add(l);let u=new s.ExpanderRow({title:Q.advanced,subtitle:Q.advancedSubtitle,expanded:!0});for(let e of sc)u.add_row(e.kind===`switch`?new s.SwitchRow({title:e.title,active:e.active??!1}):new s.ActionRow({title:e.title}));i.add(u),t.add(i);let d=new s.PreferencesGroup({title:lc.shortcuts});for(let e of uc){let t=new s.ActionRow({title:e.title});t.add_suffix(new s.ShortcutLabel({accelerator:e.accelerator,valign:n.Align.CENTER})),d.add(t)}t.add(d);let f=new s.PreferencesGroup({title:lc.actions}),p=new n.Box({orientation:n.Orientation.HORIZONTAL,spacing:12,homogeneous:!0,margin_top:6,margin_bottom:6}),m=new n.Button({label:Q.save});m.add_css_class(`suggested-action`),p.append(m);let h=new n.Button({label:Q.delete});h.add_css_class(`destructive-action`),p.append(h),f.add(p),t.add(f),e.append(t),this.addContent(e)}updateArgs(e){this._banner?.set_revealed(this.args.revealed)}};o.type_ensure(pc.$gtype);const mc={stories:[pc]},hc={title:`Presentation/Avatar`,description:`A circular avatar that derives initials (and a colour) from a name, or shows a symbolic icon.`,controls:[{name:`text`,label:`Name`,type:K.TEXT,defaultValue:`Ada Lovelace`},{name:`size`,label:`Size`,type:K.RANGE,min:24,max:160,step:8,defaultValue:96},{name:`showInitials`,label:`Show initials`,type:K.BOOLEAN,defaultValue:!0},{name:`iconName`,label:`Fallback icon`,type:K.SELECT,options:[{label:`Person`,value:`avatar-default-symbolic`},{label:`Contact`,value:`contact-new-symbolic`},{label:`Camera`,value:`camera-photo-symbolic`}],defaultValue:`avatar-default-symbolic`}]};var gc=__exportAll({AvatarStories:()=>vc,AvatarStory:()=>_c}),_c=class AvatarStory extends X{_avatar=null;static{o.registerClass({GTypeName:`AdwStorybookAvatar`},AvatarStory)}constructor(){super(X.fromMeta(AvatarStory.getMetadata(),`Default`))}static getMetadata(){return{...hc,component:s.Avatar.$gtype}}initialize(){this._avatar=new s.Avatar({size:this.args.size,text:this.args.text,showInitials:this.args.showInitials,iconName:this.args.iconName}),this.addContent(this._avatar)}updateArgs(e){this._avatar&&(this._avatar.size=this.args.size,this._avatar.text=this.args.text,this._avatar.showInitials=this.args.showInitials,this._avatar.iconName=this.args.iconName)}};o.type_ensure(_c.$gtype);const vc={stories:[_c]},yc={title:`Presentation/Banner`,description:`Adw.Banner — a full-width strip carrying a status message and an optional action button.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Metered connection — updates paused`},{name:`buttonLabel`,label:`Button label`,type:K.TEXT,defaultValue:`Resume`},{name:`revealed`,label:`Revealed`,type:K.BOOLEAN,defaultValue:!0},{name:`useMarkup`,label:`Use markup`,type:K.BOOLEAN,defaultValue:!1}]};var bc=__exportAll({BannerStories:()=>Sc,BannerStory:()=>xc}),xc=class BannerStory extends X{_banner=null;static{o.registerClass({GTypeName:`AdwStorybookBanner`},BannerStory)}constructor(){super(X.fromMeta(BannerStory.getMetadata(),`Default`))}static getMetadata(){return{...yc,component:s.Banner.$gtype}}initialize(){this._banner=new s.Banner({title:this.args.title,buttonLabel:this.args.buttonLabel,revealed:this.args.revealed,useMarkup:this.args.useMarkup});let e=new n.Box({orientation:n.Orientation.VERTICAL,widthRequest:460});e.append(this._banner),this.addContent(e)}updateArgs(e){this._banner&&(this._banner.title=this.args.title,this._banner.buttonLabel=this.args.buttonLabel,this._banner.revealed=this.args.revealed,this._banner.useMarkup=this.args.useMarkup)}};o.type_ensure(xc.$gtype);const Sc={stories:[xc]},Cc=[14,25],wc={title:`Presentation/Calendar`,description:`Gtk.Calendar — a six-by-seven month grid with four navigation arrows. The arrows clamp the way g_date_time_add_months does, so paging from the 31st lands on the 28th, and a marked day is a day NUMBER of the shown month, so it survives a month that has no such day.`,controls:[{name:`showHeading`,label:`Heading`,type:K.BOOLEAN,defaultValue:!0},{name:`showDayNames`,label:`Day names`,type:K.BOOLEAN,defaultValue:!0},{name:`showWeekNumbers`,label:`Week numbers`,type:K.BOOLEAN,defaultValue:!0}]};var Tc=__exportAll({CalendarStories:()=>Dc,CalendarStory:()=>Ec}),Ec=class CalendarStory extends X{_calendar=null;_marked=!1;static{o.registerClass({GTypeName:`AdwStorybookCalendar`},CalendarStory)}constructor(){super(X.fromMeta(CalendarStory.getMetadata(),`Default`))}static getMetadata(){return{...wc,component:n.Calendar.$gtype}}initialize(){this._calendar=new n.Calendar({hexpand:!1}),this._calendar.date=parseIso(`2026-10-02`),this._apply(),this.addContent(this._calendar)}updateArgs(e){this._apply()}_apply(){if(this._calendar){this._calendar.show_heading=this.args.showHeading,this._calendar.show_day_names=this.args.showDayNames,this._calendar.show_week_numbers=this.args.showWeekNumbers,this._marked&&this._calendar.clear_marks();for(let e of Cc)this._calendar.mark_day(e);this._marked=!0}}};function parseIso(t){let[n,r,i]=t.split(`-`).map(Number);return e.DateTime.new_local(n,r,i,0,0,0)}o.type_ensure(Ec.$gtype);const Dc={stories:[Ec]},Oc=[{value:`de`,label:`German`},{value:`fr`,label:`French`},{value:`nl`,label:`Dutch`},{value:`pt`,label:`Portuguese`}],kc={title:`Presentation/Column View`,description:`Gtk.ColumnView — a list view with a header and one cell per column. Clicking a sortable header sets the sort and inverts it on the next click; the view itself reorders nothing.`,controls:[{name:`showRowSeparators`,label:`Row separators`,type:K.BOOLEAN,defaultValue:!0},{name:`showColumnSeparators`,label:`Column separators`,type:K.BOOLEAN,defaultValue:!1},{name:`reorderable`,label:`Drag columns to reorder`,type:K.BOOLEAN,defaultValue:!1}]};var Ac=__exportAll({ColumnViewStories:()=>Mc,ColumnViewStory:()=>jc}),jc=class ColumnViewStory extends X{_view=null;static{o.registerClass({GTypeName:`AdwStorybookColumnView`},ColumnViewStory)}constructor(){super(X.fromMeta(ColumnViewStory.getMetadata(),`Default`))}static getMetadata(){return{...kc,component:n.ColumnView.$gtype}}initialize(){let e=n.StringList.new(Oc.map(e=>e.label));this._view=new n.ColumnView({model:n.SingleSelection.new(e),vexpand:!0}),this._view.append_column(this._column(`Name`,e=>e.label)),this._view.append_column(this._column(`Code`,e=>e.value));let t=new n.ScrolledWindow({child:this._view,heightRequest:200,hexpand:!0});this._apply(),this.addContent(t)}updateArgs(e){this._apply()}_apply(){this._view&&(this._view.showRowSeparators=this.args.showRowSeparators,this._view.showColumnSeparators=this.args.showColumnSeparators,this._view.reorderable=this.args.reorderable)}_column(e,t){let r=new n.SignalListItemFactory;return r.connect(`setup`,(e,t)=>{t.child=new n.Label({xalign:0})}),r.connect(`bind`,(e,n)=>{let r=n,i=r.child,o=r.item.string,s=Oc.find(e=>e.label===o);i.label=s===void 0?o:t(s)}),new n.ColumnViewColumn({title:e,factory:r,expand:!0})}};o.type_ensure(jc.$gtype);const Mc={stories:[jc]},Nc=[`Red`,`Orange`,`Yellow`,`Green`,`Blue`,`Purple`,`Teal`,`Grey`],Pc={title:`Presentation/Flow Box`,description:`Gtk.FlowBox — the same selectable rows a list box holds, reflowed into as many per line as the width fits. HORIZONTAL is the default here, unlike every GtkOrientable list base; the arrows move by visual position, so the cross-line key lands in the same column of the next line.`,controls:[{name:`selectionMode`,label:`Selection`,type:K.SELECT,options:[{label:`Single`,value:`single`},{label:`Multiple`,value:`multiple`},{label:`Browse`,value:`browse`},{label:`None`,value:`none`}],defaultValue:`multiple`},{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`maxChildrenPerLine`,label:`Max children per line`,type:K.NUMBER,defaultValue:3},{name:`homogeneous`,label:`Homogeneous`,type:K.BOOLEAN,defaultValue:!1},{name:`rowSpacing`,label:`Row spacing`,type:K.NUMBER,defaultValue:6}]};var Fc=__exportAll({FlowBoxStories:()=>Lc,FlowBoxStory:()=>Ic}),Ic=class FlowBoxStory extends X{_box=null;static{o.registerClass({GTypeName:`AdwStorybookFlowBox`},FlowBoxStory)}constructor(){super(X.fromMeta(FlowBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...Pc,component:n.FlowBox.$gtype}}initialize(){this._box=new n.FlowBox({hexpand:!0,vexpand:!0});for(let e of Nc)this._box.append(new n.FlowBoxChild({child:new n.Label({label:e})}));this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){this._box&&(this._box.selection_mode=this._selectionMode(),this._box.orientation=this.args.orientation===`vertical`?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL,this._box.max_children_per_line=Math.max(1,Math.trunc(this.args.maxChildrenPerLine)),this._box.homogeneous=this.args.homogeneous,this._box.row_spacing=Math.max(0,Math.trunc(this.args.rowSpacing)))}_selectionMode(){switch(this.args.selectionMode){case`single`:return n.SelectionMode.SINGLE;case`browse`:return n.SelectionMode.BROWSE;case`none`:return n.SelectionMode.NONE;default:return n.SelectionMode.MULTIPLE}}};o.type_ensure(Ic.$gtype);const Lc={stories:[Ic]},Rc=[`Documents`,`Downloads`,`Music`,`Pictures`,`Videos`],zc=[{label:`Single`,value:`single`},{label:`Multiple`,value:`multiple`},{label:`None`,value:`none`}],Bc={title:`Presentation/List View`,description:`Gtk.ListView — one row per item of a list model, each built by a factory. The model is the portable list (ADR 0046); which Gtk.SelectionModel would have wrapped it is the selection mode.`,controls:[{name:`selectionMode`,label:`Selection`,type:K.SELECT,options:zc,defaultValue:`single`},{name:`showSeparators`,label:`Separators`,type:K.BOOLEAN,defaultValue:!0},{name:`singleClickActivate`,label:`Activate on single click`,type:K.BOOLEAN,defaultValue:!1}]},Vc=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`],Hc={title:`Presentation/Grid View`,description:`Gtk.GridView — the same model and factory as a list view, reflowed into as many equal columns as the width fits, between min-columns and max-columns.`,controls:[{name:`maxColumns`,label:`Max columns`,type:K.NUMBER,defaultValue:4},{name:`minColumns`,label:`Min columns`,type:K.NUMBER,defaultValue:1},{name:`selectionMode`,label:`Selection`,type:K.SELECT,options:zc,defaultValue:`single`}]};var Uc=__exportAll({GridViewStories:()=>Gc,GridViewStory:()=>Wc}),Wc=class GridViewStory extends X{_view=null;_model=null;static{o.registerClass({GTypeName:`AdwStorybookGridView`},GridViewStory)}constructor(){super(X.fromMeta(GridViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Hc,component:n.GridView.$gtype}}initialize(){this._model=n.StringList.new([...Vc]);let e=new n.SignalListItemFactory;e.connect(`setup`,(e,t)=>{t.child=new n.Label({xalign:.5})}),e.connect(`bind`,(e,t)=>{let n=t,r=n.child;r.label=n.item.string}),this._view=new n.GridView({factory:e,vexpand:!0});let t=new n.ScrolledWindow({child:this._view,heightRequest:200,hexpand:!0});this._apply(),this.addContent(t)}updateArgs(e){this._apply()}_apply(){!this._view||!this._model||(this._view.model=this.args.selectionMode===`multiple`?n.MultiSelection.new(this._model):this.args.selectionMode===`none`?n.NoSelection.new(this._model):n.SingleSelection.new(this._model),this._view.minColumns=Math.max(1,this.args.minColumns),this._view.maxColumns=Math.max(this._view.minColumns,this.args.maxColumns))}};o.type_ensure(Wc.$gtype);const Gc={stories:[Wc]},Kc=[`Documents`,`Downloads`,`Music`,`Pictures`,`Videos`],qc={title:`Presentation/List Box`,description:`Gtk.ListBox — one row per child you append, with GTK’s four selection modes. Ctrl toggles and Shift extends from the anchor the last Shift-click left behind; activate-on-single-click defaults to TRUE here, unlike Gtk.ListView’s single-click-activate.`,controls:[{name:`selectionMode`,label:`Selection`,type:K.SELECT,options:[{label:`Single`,value:`single`},{label:`Multiple`,value:`multiple`},{label:`Browse`,value:`browse`},{label:`None`,value:`none`}],defaultValue:`single`},{name:`showSeparators`,label:`Separators`,type:K.BOOLEAN,defaultValue:!0},{name:`activateOnSingleClick`,label:`Activate on single click`,type:K.BOOLEAN,defaultValue:!0},{name:`tabBehavior`,label:`Tab behaviour`,type:K.SELECT,options:[{label:`All`,value:`all`},{label:`Item`,value:`item`},{label:`Cell`,value:`cell`}],defaultValue:`all`}]};var Jc=__exportAll({ListBoxStories:()=>Xc,ListBoxStory:()=>Yc}),Yc=class ListBoxStory extends X{_box=null;static{o.registerClass({GTypeName:`AdwStorybookListBox`},ListBoxStory)}constructor(){super(X.fromMeta(ListBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...qc,component:n.ListBox.$gtype}}initialize(){this._box=new n.ListBox({hexpand:!0});for(let e of Kc)this._box.append(new n.ListBoxRow({child:new n.Label({label:e,xalign:0})}));this._apply();let e=new n.ScrolledWindow({child:this._box,heightRequest:200});this.addContent(e)}updateArgs(e){this._apply()}_apply(){this._box&&(this._box.selection_mode=this._selectionMode(),this._box.show_separators=this.args.showSeparators,this._box.activate_on_single_click=this.args.activateOnSingleClick,this._box.tab_behavior=this.args.tabBehavior)}_selectionMode(){switch(this.args.selectionMode){case`multiple`:return n.SelectionMode.MULTIPLE;case`browse`:return n.SelectionMode.BROWSE;case`none`:return n.SelectionMode.NONE;default:return n.SelectionMode.SINGLE}}};o.type_ensure(Yc.$gtype);const Xc={stories:[Yc]};var Zc=__exportAll({ListViewStories:()=>$c,ListViewStory:()=>Qc}),Qc=class ListViewStory extends X{_view=null;_model=null;static{o.registerClass({GTypeName:`AdwStorybookListView`},ListViewStory)}constructor(){super(X.fromMeta(ListViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Bc,component:n.ListView.$gtype}}initialize(){this._model=n.StringList.new([...Rc]);let e=new n.SignalListItemFactory;e.connect(`setup`,(e,t)=>{t.child=new n.Label({xalign:0})}),e.connect(`bind`,(e,t)=>{let n=t,r=n.child;r.label=n.item.string}),this._view=new n.ListView({factory:e,vexpand:!0});let t=new n.ScrolledWindow({child:this._view,heightRequest:200,hexpand:!0});this._apply(),this.addContent(t)}updateArgs(e){this._apply()}_apply(){!this._view||!this._model||(this._view.model=this._selectionModel(this._model),this._view.showSeparators=this.args.showSeparators,this._view.singleClickActivate=this.args.singleClickActivate)}_selectionModel(e){switch(this.args.selectionMode){case`multiple`:return n.MultiSelection.new(e);case`none`:return n.NoSelection.new(e);default:return n.SingleSelection.new(e)}}};o.type_ensure(Qc.$gtype);const $c={stories:[Qc]},el=[{label:`Single`,accelerator:`<Control>C`},{label:`Modifier order`,accelerator:`<Shift><Control>a`},{label:`Alternatives`,accelerator:`<Shift>A Home`},{label:`Range`,accelerator:`<Alt>1...9`},{label:`In sequence`,accelerator:`<Control>C+<Control>X`},{label:`Together`,accelerator:`Control_L&Control_R`},{label:`Nested`,accelerator:`<Alt>1...9 <Alt>0`},{label:`Unset`,accelerator:``}],tl={title:`Presentation/Shortcut Label`,description:`Adw.ShortcutLabel — an accelerator drawn as keycaps. The four grammar levels: alternatives (space), a range (...), pressed in sequence (+), and pressed together (&).`,controls:[{name:`accelerator`,label:`Accelerator`,type:K.SELECT,options:[{label:`Ctrl+C`,value:`<Control>C`},{label:`Modifier order (Shift+Ctrl+A)`,value:`<Shift><Control>a`},{label:`Alternatives (Shift+A / Home)`,value:`<Shift>A Home`},{label:`Range (Alt+1…9)`,value:`<Alt>1...9`},{label:`In sequence (Ctrl+C → Ctrl+X)`,value:`<Control>C+<Control>X`},{label:`Together (Ctrl L + Ctrl R)`,value:`Control_L&Control_R`},{label:`Nested (Alt+1…9 / Alt+0)`,value:`<Alt>1...9 <Alt>0`},{label:`Glyph key (Ctrl+Space)`,value:`<Control>space`},{label:`Arrow key (Left)`,value:`Left`},{label:`Unset — shows the placeholder`,value:``}],defaultValue:`<Control>C`},{name:`disabledText`,label:`Placeholder`,type:K.TEXT,defaultValue:`Disabled`}]},nl={title:`Presentation/Shortcut Label (All Levels)`,description:`Every Adw.ShortcutLabel grammar level at once: alternatives (space), a range (...), pressed in sequence (+), pressed together (&) — plus GTK's fixed keycap order and the disabled placeholder.`,controls:[{name:`disabledText`,label:`Placeholder`,type:K.TEXT,defaultValue:`Disabled`}]};var rl=__exportAll({ShortcutLabelLevelsStory:()=>al,ShortcutLabelStories:()=>ol,ShortcutLabelStory:()=>il}),il=class ShortcutLabelStory extends X{_widget=null;static{o.registerClass({GTypeName:`AdwStorybookShortcutLabel`},ShortcutLabelStory)}constructor(){super(X.fromMeta(ShortcutLabelStory.getMetadata(),`Default`))}static getMetadata(){return{...tl,component:s.ShortcutLabel.$gtype}}initialize(){this._widget=new s.ShortcutLabel({accelerator:this.args.accelerator,disabledText:this.args.disabledText,halign:n.Align.CENTER,valign:n.Align.CENTER}),this.addContent(this._widget)}updateArgs(e){this._widget&&(this._widget.disabledText=this.args.disabledText,this._widget.accelerator=this.args.accelerator)}};o.type_ensure(il.$gtype);var al=class ShortcutLabelLevelsStory extends X{_widgets=[];static{o.registerClass({GTypeName:`AdwStorybookShortcutLabelLevels`},ShortcutLabelLevelsStory)}constructor(){super(X.fromMeta(ShortcutLabelLevelsStory.getMetadata(),`Default`))}static getMetadata(){return{...nl,component:s.ShortcutLabel.$gtype}}initialize(){let e=new n.Grid({row_spacing:12,column_spacing:24});for(let[t,r]of el.entries()){let i=new n.Label({label:r.label,halign:n.Align.START});i.add_css_class(`dimmed`),e.attach(i,0,t,1,1);let o=new s.ShortcutLabel({accelerator:r.accelerator,disabledText:this.args.disabledText,halign:n.Align.END,hexpand:!0});e.attach(o,1,t,1,1),this._widgets.push(o)}this.addContent(e)}updateArgs(e){for(let e of this._widgets)e.disabledText=this.args.disabledText}};o.type_ensure(al.$gtype);const ol={stories:[il,al]},sl={title:`Presentation/Spinner`,description:`Adw.Spinner — a lightweight loading indicator that spins continuously while visible.`,controls:[{name:`size`,label:`Size`,type:K.RANGE,min:16,max:64,step:4,defaultValue:48}]};var cl=__exportAll({SpinnerStories:()=>ul,SpinnerStory:()=>ll}),ll=class SpinnerStory extends X{_spinner=null;static{o.registerClass({GTypeName:`AdwStorybookSpinner`},SpinnerStory)}constructor(){super(X.fromMeta(SpinnerStory.getMetadata(),`Default`))}static getMetadata(){return{...sl,component:s.Spinner.$gtype}}initialize(){let e=this.args.size;this._spinner=new s.Spinner({widthRequest:e,heightRequest:e,halign:n.Align.CENTER,valign:n.Align.CENTER}),this.addContent(this._spinner)}updateArgs(e){if(!this._spinner)return;let t=this.args.size;this._spinner.widthRequest=t,this._spinner.heightRequest=t}};o.type_ensure(ll.$gtype);const ul={stories:[ll]},dl={title:`Presentation/Status Page`,description:`Adw.StatusPage — a full-page empty state with an icon, title, description and optional action.`,controls:[{name:`iconName`,label:`Icon`,type:K.SELECT,options:[{label:`Folder`,value:`folder-symbolic`},{label:`Mail`,value:`mail-unread-symbolic`},{label:`Search`,value:`system-search-symbolic`},{label:`Star`,value:`starred-symbolic`}],defaultValue:`folder-symbolic`},{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`No Documents`},{name:`description`,label:`Description`,type:K.TEXT,defaultValue:`Documents you create or open will appear here.`}]};var fl=__exportAll({StatusPageStories:()=>ml,StatusPageStory:()=>pl}),pl=class StatusPageStory extends X{_statusPage=null;static{o.registerClass({GTypeName:`AdwStorybookStatusPage`},StatusPageStory)}constructor(){super(X.fromMeta(StatusPageStory.getMetadata(),`Default`))}static getMetadata(){return{...dl,component:s.StatusPage.$gtype}}initialize(){let e=new n.Button({label:`New Document`,halign:n.Align.CENTER,cssClasses:[`pill`,`suggested-action`]});this._statusPage=new s.StatusPage({iconName:this.args.iconName,title:this.args.title,description:this.args.description,child:e,widthRequest:460,heightRequest:320}),this.addContent(this._statusPage)}updateArgs(e){this._statusPage&&(this._statusPage.iconName=this.args.iconName,this._statusPage.title=this.args.title,this._statusPage.description=this.args.description)}};o.type_ensure(pl.$gtype);const ml={stories:[pl]},hl={Pictures:[`Holiday`,`Screenshots`],Music:[`Albums`],Notes:[]},gl={title:`Presentation/Tree Expander`,description:`Gtk.TreeExpander — the indent and the disclosure arrow a tree row wears in front of its contents. A leaf takes one indent in place of the arrow, so its text lines up with its siblings.`,controls:[{name:`expanded`,label:`Expanded`,type:K.BOOLEAN,defaultValue:!0},{name:`hideExpander`,label:`Hide the arrow`,type:K.BOOLEAN,defaultValue:!1},{name:`indentForIcon`,label:`Indent leaves by an arrow`,type:K.BOOLEAN,defaultValue:!0}]};var _l=__exportAll({TreeExpanderStories:()=>yl,TreeExpanderStory:()=>vl}),vl=class TreeExpanderStory extends X{_view=null;_tree=null;_expanders=new Set;static{o.registerClass({GTypeName:`AdwStorybookTreeExpander`},TreeExpanderStory)}constructor(){super(X.fromMeta(TreeExpanderStory.getMetadata(),`Default`))}static getMetadata(){return{...gl,component:n.TreeExpander.$gtype}}initialize(){let e=n.StringList.new(Object.keys(hl));this._tree=n.TreeListModel.new(e,!1,!1,e=>{let t=hl[e.string]??[];return t.length===0?null:n.StringList.new([...t])});let t=new n.SignalListItemFactory;t.connect(`setup`,(e,t)=>{let r=t;r.focusable=!1;let i=new n.TreeExpander;i.child=new n.Label({xalign:0}),r.child=i,this._expanders.add(i)}),t.connect(`teardown`,(e,t)=>{let n=t.child;n!==null&&this._expanders.delete(n)}),t.connect(`bind`,(e,t)=>{let n=t,r=n.child,i=n.item;r.listRow=i,r.child.label=i.item.string,this._applyTo(r)}),this._view=new n.ListView({model:n.SingleSelection.new(this._tree),factory:t,vexpand:!0});let r=new n.ScrolledWindow({child:this._view,heightRequest:200,hexpand:!0});this.addContent(r),this._apply()}updateArgs(e){this._apply()}_apply(){if(this._tree!==null){for(let e=0;e<this._tree.get_n_items();e++){let t=this._tree.get_row(e);t!==null&&t.depth===0&&(t.expanded=this.args.expanded)}for(let e of this._expanders)this._applyTo(e)}}_applyTo(e){e.hideExpander=this.args.hideExpander,e.indentForIcon=this.args.indentForIcon}};o.type_ensure(vl.$gtype);const yl={stories:[vl]},bl={title:`Presentation/WindowHandle`,description:`Gtk.WindowHandle — the titlebar strip. Dragging it moves the window; a double click, a middle click and a right click raise the window actions the compositor (or, here, the titlebar settings) names.`,controls:[{name:`action`,label:`Double-click action`,type:K.SELECT,options:[{label:`Toggle maximize`,value:`toggle-maximize`},{label:`Minimize`,value:`minimize`},{label:`Menu`,value:`menu`},{label:`None`,value:`none`}],defaultValue:`toggle-maximize`}]};var xl=__exportAll({WindowHandleStories:()=>Cl,WindowHandleStory:()=>Sl}),Sl=class WindowHandleStory extends X{_handle=null;static{o.registerClass({GTypeName:`AdwStorybookWindowHandle`},WindowHandleStory)}constructor(){super(X.fromMeta(WindowHandleStory.getMetadata(),`Default`))}static getMetadata(){return{...bl,component:n.WindowHandle.$gtype}}initialize(){let e=new s.HeaderBar;e.set_title_widget(new s.WindowTitle({title:`Notes`})),this._handle=new n.WindowHandle({child:e,halign:n.Align.CENTER}),this._apply(),this.addContent(this._handle)}updateArgs(e){this._apply()}_apply(){this.args.action}};o.type_ensure(Sl.$gtype);const Cl={stories:[Sl]},wl={title:`Presentation/Window Title`,description:`Adw.WindowTitle — a compact title/subtitle widget intended for a window or header bar.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Inbox`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`3 unread messages`}]};var Tl=__exportAll({WindowTitleStories:()=>Dl,WindowTitleStory:()=>El}),El=class WindowTitleStory extends X{_windowTitle=null;static{o.registerClass({GTypeName:`AdwStorybookWindowTitle`},WindowTitleStory)}constructor(){super(X.fromMeta(WindowTitleStory.getMetadata(),`Default`))}static getMetadata(){return{...wl,component:s.WindowTitle.$gtype}}initialize(){this._windowTitle=new s.WindowTitle({title:this.args.title,subtitle:this.args.subtitle}),this.addContent(this._windowTitle)}updateArgs(e){this._windowTitle&&(this._windowTitle.title=this.args.title,this._windowTitle.subtitle=this.args.subtitle)}};o.type_ensure(El.$gtype);const Dl={stories:[El]},Ol={title:`Boxed Lists/Action Row`,description:`Adw.ActionRow — a preferences row with a title/subtitle, a prefix icon and a suffix button, shown inside a boxed list.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Wi-Fi`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`Connected to Highgarden 5GHz`},{name:`iconName`,label:`Prefix icon`,type:K.SELECT,options:[{label:`Network`,value:`network-wireless-symbolic`},{label:`Folder`,value:`folder-symbolic`},{label:`Starred`,value:`starred-symbolic`}],defaultValue:`network-wireless-symbolic`},{name:`activatable`,label:`Activatable`,type:K.BOOLEAN,defaultValue:!0}]};var kl=__exportAll({ActionRowStories:()=>jl,ActionRowStory:()=>Al}),Al=class ActionRowStory extends X{_row=null;_icon=null;_button=null;static{o.registerClass({GTypeName:`AdwStorybookActionRow`},ActionRowStory)}constructor(){super(X.fromMeta(ActionRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Ol,component:s.ActionRow.$gtype}}initialize(){this._row=new s.ActionRow({title:this.args.title,subtitle:this.args.subtitle}),this._icon=new n.Image({iconName:this.args.iconName}),this._row.add_prefix(this._icon),this._button=new n.Button({iconName:`go-next-symbolic`,valign:n.Align.CENTER}),this._button.add_css_class(`flat`),this._row.add_suffix(this._button),this._row.activatableWidget=this._button,this._row.activatable=this.args.activatable;let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){!this._row||!this._icon||(this._row.title=this.args.title,this._row.subtitle=this.args.subtitle,this._icon.iconName=this.args.iconName,this._row.activatable=this.args.activatable)}};o.type_ensure(Al.$gtype);const jl={stories:[Al]},Ml={title:`Boxed Lists/Button Row`,description:`Adw.ButtonRow — a full-width row that acts as a button, with an optional icon and style class.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Add account`},{name:`startIconName`,label:`Start icon`,type:K.SELECT,options:[{label:`Add`,value:`list-add-symbolic`},{label:`Trash`,value:`user-trash-symbolic`},{label:`None`,value:``}],defaultValue:`list-add-symbolic`},{name:`style`,label:`Style`,type:K.SELECT,options:[{label:`None`,value:`none`},{label:`Suggested`,value:`suggested-action`},{label:`Destructive`,value:`destructive-action`}],defaultValue:`suggested-action`}]};var Nl=__exportAll({ButtonRowStories:()=>Il,ButtonRowStory:()=>Fl});const Pl=[`suggested-action`,`destructive-action`];var Fl=class ButtonRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookButtonRow`},ButtonRowStory)}constructor(){super(X.fromMeta(ButtonRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Ml,component:s.ButtonRow.$gtype}}initialize(){this._row=new s.ButtonRow({title:this.args.title,startIconName:this.args.startIconName}),this._applyStyle(this.args.style);let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}_applyStyle(e){if(this._row){for(let e of Pl)this._row.remove_css_class(e);e!==`none`&&this._row.add_css_class(e)}}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.startIconName=this.args.startIconName,this._applyStyle(this.args.style))}};o.type_ensure(Fl.$gtype);const Il={stories:[Fl]},Ll=[`Blue`,`Teal`,`Green`,`Orange`,`Purple`],Rl={title:`Boxed Lists/Combo Row`,description:`Adw.ComboRow — a preferences row with an inline drop-down backed by a Gtk.StringList.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Accent colour`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`Used to highlight selected items`},{name:`selected`,label:`Selected`,type:K.NUMBER,min:0,max:4,step:1,defaultValue:1}]};var zl=__exportAll({ComboRowStories:()=>Vl,ComboRowStory:()=>Bl}),Bl=class ComboRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookComboRow`},ComboRowStory)}constructor(){super(X.fromMeta(ComboRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Rl,component:s.ComboRow.$gtype}}initialize(){this._row=new s.ComboRow({title:this.args.title,subtitle:this.args.subtitle,model:new n.StringList({strings:[...Ll]}),selected:this.args.selected});let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.subtitle=this.args.subtitle,this._row.selected=this.args.selected)}};o.type_ensure(Bl.$gtype);const Vl={stories:[Bl]},Hl={title:`Boxed Lists/Entry Row`,description:`Adw.EntryRow — a preferences row whose title doubles as placeholder text for an inline entry.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Display name`},{name:`text`,label:`Text`,type:K.TEXT,defaultValue:`Ada Lovelace`},{name:`showApplyButton`,label:`Show apply button`,type:K.BOOLEAN,defaultValue:!0}]};var Ul=__exportAll({EntryRowStories:()=>Gl,EntryRowStory:()=>Wl}),Wl=class EntryRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookEntryRow`},EntryRowStory)}constructor(){super(X.fromMeta(EntryRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Hl,component:s.EntryRow.$gtype}}initialize(){this._row=new s.EntryRow({title:this.args.title,text:this.args.text,showApplyButton:this.args.showApplyButton});let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.text=this.args.text,this._row.showApplyButton=this.args.showApplyButton)}};o.type_ensure(Wl.$gtype);const Gl={stories:[Wl]},Kl={title:`Boxed Lists/Expander Row`,description:`Adw.ExpanderRow — a preferences row that discloses nested rows and can carry an enable switch.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Proxy settings`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`Route traffic through a custom proxy`},{name:`expanded`,label:`Expanded`,type:K.BOOLEAN,defaultValue:!0},{name:`showEnableSwitch`,label:`Show enable switch`,type:K.BOOLEAN,defaultValue:!1}]};var ql=__exportAll({ExpanderRowStories:()=>Yl,ExpanderRowStory:()=>Jl}),Jl=class ExpanderRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookExpanderRow`},ExpanderRowStory)}constructor(){super(X.fromMeta(ExpanderRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Kl,component:s.ExpanderRow.$gtype}}initialize(){this._row=new s.ExpanderRow({title:this.args.title,subtitle:this.args.subtitle,expanded:this.args.expanded,showEnableSwitch:this.args.showEnableSwitch}),this._row.add_row(new s.EntryRow({title:`Host`,text:`proxy.example.com`})),this._row.add_row(new s.SwitchRow({title:`Use authentication`,active:!1}));let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.subtitle=this.args.subtitle,this._row.expanded=this.args.expanded,this._row.showEnableSwitch=this.args.showEnableSwitch)}};o.type_ensure(Jl.$gtype);const Yl={stories:[Jl]},Xl={title:`Boxed Lists/Password Entry Row`,description:`Adw.PasswordEntryRow — an entry row that masks its contents and shows a peek toggle.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Password`},{name:`text`,label:`Text`,type:K.TEXT,defaultValue:`correct-horse-battery`}]};var Zl=__exportAll({PasswordEntryRowStories:()=>$l,PasswordEntryRowStory:()=>Ql}),Ql=class PasswordEntryRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookPasswordEntryRow`},PasswordEntryRowStory)}constructor(){super(X.fromMeta(PasswordEntryRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Xl,component:s.PasswordEntryRow.$gtype}}initialize(){this._row=new s.PasswordEntryRow({title:this.args.title,text:this.args.text});let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.text=this.args.text)}};o.type_ensure(Ql.$gtype);const $l={stories:[Ql]},eu={title:`Boxed Lists/Preferences Group`,description:`Adw.PreferencesGroup — the boxed-list container that gathers a title, description, header-suffix widget and rows.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Account`},{name:`description`,label:`Description`,type:K.TEXT,defaultValue:`Manage how this device signs in and syncs.`}]};var tu=__exportAll({PreferencesGroupStories:()=>ru,PreferencesGroupStory:()=>nu}),nu=class PreferencesGroupStory extends X{_prefsGroup=null;static{o.registerClass({GTypeName:`AdwStorybookPreferencesGroup`},PreferencesGroupStory)}constructor(){super(X.fromMeta(PreferencesGroupStory.getMetadata(),`Default`))}static getMetadata(){return{...eu,component:s.PreferencesGroup.$gtype}}initialize(){let e=new n.Button({label:`Sign out`,valign:n.Align.CENTER});e.add_css_class(`flat`),this._prefsGroup=new s.PreferencesGroup({title:this.args.title,description:this.args.description,headerSuffix:e});let t=new s.EntryRow({title:`Display name`,text:`Grace Hopper`});this._prefsGroup.add(t);let r=new s.SwitchRow({title:`Sync over Wi-Fi only`,subtitle:`Avoid using mobile data for backups`,active:!0});this._prefsGroup.add(r);let i=new s.ComboRow({title:`Region`,model:new n.StringList({strings:[`Europe`,`Americas`,`Asia`,`Oceania`]}),selected:0});this._prefsGroup.add(i);let o=new s.Clamp({maximumSize:400,child:this._prefsGroup});this.addContent(o)}updateArgs(e){this._prefsGroup&&(this._prefsGroup.title=this.args.title,this._prefsGroup.description=this.args.description)}};o.type_ensure(nu.$gtype);const ru={stories:[nu]},iu={title:`Boxed Lists/Preferences Row`,description:`Adw.PreferencesRow — the base of every boxed-list row: a list row with a title that the preferences dialog searches. The title can carry Pango markup and be made selectable.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`A <b>plain</b> preferences row`},{name:`useMarkup`,label:`Use markup`,type:K.BOOLEAN,defaultValue:!0},{name:`titleSelectable`,label:`Title selectable`,type:K.BOOLEAN,defaultValue:!1}]};var au=__exportAll({PreferencesRowStories:()=>su,PreferencesRowStory:()=>ou}),ou=class PreferencesRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookPreferencesRow`},PreferencesRowStory)}constructor(){super(X.fromMeta(PreferencesRowStory.getMetadata(),`Default`))}static getMetadata(){return{...iu,component:s.PreferencesRow.$gtype}}initialize(){this._row=new s.PreferencesRow,this._apply();let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._apply()}_apply(){this._row&&(this._row.title=this.args.title,this._row.useMarkup=this.args.useMarkup,this._row.titleSelectable=this.args.titleSelectable)}};o.type_ensure(ou.$gtype);const su={stories:[ou]},cu={title:`Boxed Lists/Spin Row`,description:`Adw.SpinRow — a preferences row with an inline spin button over a numeric adjustment.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Font size`},{name:`value`,label:`Value`,type:K.NUMBER,min:0,max:100,step:1,defaultValue:16},{name:`digits`,label:`Digits`,type:K.NUMBER,min:0,max:4,step:1,defaultValue:0}]};var lu=__exportAll({SpinRowStories:()=>du,SpinRowStory:()=>uu}),uu=class SpinRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookSpinRow`},SpinRowStory)}constructor(){super(X.fromMeta(SpinRowStory.getMetadata(),`Default`))}static getMetadata(){return{...cu,component:s.SpinRow.$gtype}}initialize(){this._row=new s.SpinRow({title:this.args.title,adjustment:new n.Adjustment({lower:0,upper:100,value:this.args.value,stepIncrement:1,pageIncrement:10}),digits:this.args.digits});let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.value=this.args.value,this._row.digits=this.args.digits)}};o.type_ensure(uu.$gtype);const du={stories:[uu]},fu={title:`Boxed Lists/Switch Row`,description:`Adw.SwitchRow — a preferences row with a trailing switch, shown inside a boxed list.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Automatic updates`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`Download and install updates without asking`},{name:`active`,label:`Active`,type:K.BOOLEAN,defaultValue:!0}]};var pu=__exportAll({SwitchRowStories:()=>hu,SwitchRowStory:()=>mu}),mu=class SwitchRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookSwitchRow`},SwitchRowStory)}constructor(){super(X.fromMeta(SwitchRowStory.getMetadata(),`Default`))}static getMetadata(){return{...fu,component:s.SwitchRow.$gtype}}initialize(){this._row=new s.SwitchRow({title:this.args.title,subtitle:this.args.subtitle,active:this.args.active});let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.subtitle=this.args.subtitle,this._row.active=this.args.active)}};o.type_ensure(mu.$gtype);const hu={stories:[mu]},gu={title:`Text/Editable Label`,description:`Gtk.EditableLabel — a label you click and edit in place. Enter starts editing, Enter commits, Escape discards, and editable=false leaves it a label; the draft lives in the entry, not in the label.`,controls:[{name:`text`,label:`Text`,type:K.TEXT,defaultValue:`Ada Lovelace`},{name:`editable`,label:`Editable`,type:K.BOOLEAN,defaultValue:!0},{name:`editing`,label:`Editing`,type:K.BOOLEAN,defaultValue:!1}]};var _u=__exportAll({EditableLabelStories:()=>yu,EditableLabelStory:()=>vu}),vu=class EditableLabelStory extends X{_label=null;static{o.registerClass({GTypeName:`AdwStorybookEditableLabel`},EditableLabelStory)}constructor(){super(X.fromMeta(EditableLabelStory.getMetadata(),`Default`))}static getMetadata(){return{...gu,component:n.EditableLabel.$gtype}}initialize(){this._label=new n.EditableLabel({halign:n.Align.CENTER}),this._apply(),this.addContent(this._label)}updateArgs(e){this._apply()}_apply(){this._label&&(this._label.editing||(this._label.text=this.args.text),this._label.editable=this.args.editable,this._label.editing=this.args.editing)}};o.type_ensure(vu.$gtype);const yu={stories:[vu]},bu={title:`Text/Search Bar`,description:`Gtk.SearchBar — the strip that reveals a search entry when search starts. The property IS the revealer's reveal-child, so one boolean decides both whether the strip is shown and whether the search is on; hiding it clears the entry.`,controls:[{name:`searchModeEnabled`,label:`Search mode`,type:K.BOOLEAN,defaultValue:!1},{name:`showCloseButton`,label:`Close button`,type:K.BOOLEAN,defaultValue:!0}]};var xu=__exportAll({SearchBarStories:()=>Cu,SearchBarStory:()=>Su}),Su=class SearchBarStory extends X{_bar=null;_entry=null;static{o.registerClass({GTypeName:`AdwStorybookSearchBar`},SearchBarStory)}constructor(){super(X.fromMeta(SearchBarStory.getMetadata(),`Default`))}static getMetadata(){return{...bu,component:n.SearchBar.$gtype}}initialize(){this._entry=new n.SearchEntry({hexpand:!0}),this._bar=new n.SearchBar({child:this._entry}),this._apply(),this.addContent(this._bar)}updateArgs(e){this._apply()}_apply(){this._bar&&(this._bar.search_mode_enabled=this.args.searchModeEnabled,this._bar.show_close_button=this.args.showCloseButton)}};o.type_ensure(Su.$gtype);const Cu={stories:[Su]},wu={title:`Text/Text View`,description:`Gtk.TextView — the multi-line editor. Its text lives in a Gtk.TextBuffer rather than in a property, wrap-mode and justification are Pango's, and accepts-tab defaults to TRUE, which is the opposite of a browser's.`,controls:[{name:`text`,label:`Text`,type:K.TEXT,defaultValue:`A text view holds as many lines as it is given.
347
- Tab inserts a tab character.`},{name:`wrapMode`,label:`Wrap mode`,type:K.SELECT,options:[{label:`None`,value:`none`},{label:`Char`,value:`char`},{label:`Word`,value:`word`},{label:`Word or char`,value:`word-char`}],defaultValue:`none`},{name:`justification`,label:`Justification`,type:K.SELECT,options:[{label:`Left`,value:`left`},{label:`Right`,value:`right`},{label:`Center`,value:`center`},{label:`Fill`,value:`fill`}],defaultValue:`left`},{name:`monospace`,label:`Monospace`,type:K.BOOLEAN,defaultValue:!1},{name:`acceptsTab`,label:`Tab inserts a tab`,type:K.BOOLEAN,defaultValue:!0},{name:`cursorVisible`,label:`Show cursor`,type:K.BOOLEAN,defaultValue:!0},{name:`topMargin`,label:`Top margin`,type:K.NUMBER,defaultValue:6}]};var Tu=__exportAll({TextViewStories:()=>Du,TextViewStory:()=>Eu}),Eu=class TextViewStory extends X{_buffer=null;_view=null;static{o.registerClass({GTypeName:`AdwStorybookTextView`},TextViewStory)}constructor(){super(X.fromMeta(TextViewStory.getMetadata(),`Default`))}static getMetadata(){return{...wu,component:n.TextView.$gtype}}initialize(){this._buffer=new n.TextBuffer,this._view=new n.TextView({buffer:this._buffer,hexpand:!0,vexpand:!1,top_margin:6});let e=new n.ScrolledWindow({hscrollbar_policy:n.PolicyType.AUTOMATIC,vscrollbar_policy:n.PolicyType.AUTOMATIC,hexpand:!0,vexpand:!1,child:this._view});e.set_size_request(320,-1),this._apply(),this.addContent(e)}updateArgs(e){this._apply()}_apply(){if(!this._buffer||!this._view)return;let e=this.args.text;this._buffer.text!==e&&(this._buffer.text=e),this._view.wrap_mode=this.args.wrapMode??`none`,this._view.justification=this.args.justification??`left`,this._view.monospace=this.args.monospace,this._view.accepts_tab=this.args.acceptsTab,this._view.cursor_visible=this.args.cursorVisible,this._view.top_margin=Number(this.args.topMargin??0)}};o.type_ensure(Eu.$gtype);const Du={stories:[Eu]},Ou={title:`Text/Text`,description:`Gtk.Text — the single-line text widget every Gtk.Entry is built on. Standalone it is a field with a placeholder and a length limit; visibility=false masks it, propagate-text-width grows it with its text.`,controls:[{name:`text`,label:`Text`,type:K.TEXT,defaultValue:`Ada Lovelace`},{name:`placeholderText`,label:`Placeholder`,type:K.TEXT,defaultValue:``},{name:`editable`,label:`Editable`,type:K.BOOLEAN,defaultValue:!0},{name:`visibility`,label:`Visible`,type:K.BOOLEAN,defaultValue:!0},{name:`maxLength`,label:`Max length (0 = none)`,type:K.NUMBER,defaultValue:0},{name:`propagateTextWidth`,label:`Grow with text`,type:K.BOOLEAN,defaultValue:!1}]};var ku=__exportAll({TextStories:()=>ju,TextStory:()=>Au}),Au=class TextStory extends X{_text=null;static{o.registerClass({GTypeName:`AdwStorybookText`},TextStory)}constructor(){super(X.fromMeta(TextStory.getMetadata(),`Default`))}static getMetadata(){return{...Ou,component:n.Text.$gtype}}initialize(){this._text=new n.Text({halign:n.Align.CENTER}),this._apply(),this.addContent(this._text)}updateArgs(e){this._apply()}_apply(){this._text&&(this._text.text=this.args.text,this._text.placeholder_text=this.args.placeholderText,this._text.editable=this.args.editable,this._text.visibility=this.args.visibility,this._text.max_length=Number(this.args.maxLength??0),this._text.propagate_text_width=this.args.propagateTextWidth)}};o.type_ensure(Au.$gtype);const ju={stories:[Au]},Mu=[{name:`allowScrollWheel`,label:`Allow scroll wheel`,type:K.BOOLEAN,defaultValue:!0},{name:`allowLongSwipes`,label:`Allow long swipes`,type:K.BOOLEAN,defaultValue:!1}],Nu={title:`View Switching/Carousel (Dots)`,description:`Adw.Carousel — a horizontally swipeable pager with three pages, paired with Adw.CarouselIndicatorDots.`,controls:Mu},Pu={title:`View Switching/Carousel (Lines)`,description:`Adw.Carousel — the same swipeable pager paired with Adw.CarouselIndicatorLines instead of dots.`,controls:Mu};var Fu=__exportAll({CarouselDotsStory:()=>Lu,CarouselLinesStory:()=>Ru,CarouselStories:()=>zu});const Iu=[{title:`Welcome`,css:`accent`},{title:`Discover`,css:`success`},{title:`Get started`,css:`warning`}];function buildPage(e,t){let r=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,widthRequest:440,heightRequest:260});r.add_css_class(`card`),r.add_css_class(t);let i=new n.Label({label:e,vexpand:!0,valign:n.Align.CENTER});return i.add_css_class(`title-1`),r.append(i),r}var Lu=class CarouselDotsStory extends X{_carousel=null;static{o.registerClass({GTypeName:`AdwStorybookCarouselDots`},CarouselDotsStory)}constructor(){super(X.fromMeta(CarouselDotsStory.getMetadata(),`Default`))}static getMetadata(){return{...Nu,component:s.Carousel.$gtype}}initialize(){this._carousel=new s.Carousel({allowScrollWheel:this.args.allowScrollWheel,allowLongSwipes:this.args.allowLongSwipes,vexpand:!0});for(let e of Iu)this._carousel.append(buildPage(e.title,e.css));let e=new s.CarouselIndicatorDots({carousel:this._carousel}),t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:340});t.append(this._carousel),t.append(e),this.addContent(t)}updateArgs(e){this._carousel&&(this._carousel.allowScrollWheel=this.args.allowScrollWheel,this._carousel.allowLongSwipes=this.args.allowLongSwipes)}};o.type_ensure(Lu.$gtype);var Ru=class CarouselLinesStory extends X{_carousel=null;static{o.registerClass({GTypeName:`AdwStorybookCarouselLines`},CarouselLinesStory)}constructor(){super(X.fromMeta(CarouselLinesStory.getMetadata(),`Default`))}static getMetadata(){return{...Pu,component:s.Carousel.$gtype}}initialize(){this._carousel=new s.Carousel({allowScrollWheel:this.args.allowScrollWheel,allowLongSwipes:this.args.allowLongSwipes,vexpand:!0});for(let e of Iu)this._carousel.append(buildPage(e.title,e.css));let e=new s.CarouselIndicatorLines({carousel:this._carousel}),t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:340});t.append(this._carousel),t.append(e),this.addContent(t)}updateArgs(e){this._carousel&&(this._carousel.allowScrollWheel=this.args.allowScrollWheel,this._carousel.allowLongSwipes=this.args.allowLongSwipes)}};o.type_ensure(Ru.$gtype);const zu={stories:[Lu,Ru]},Bu={title:`View Switching/Inline View Switcher`,description:`Adw.InlineViewSwitcher — a compact inline switcher that can show labels, icons, or both for an Adw.ViewStack.`,controls:[{name:`displayMode`,label:`Display mode`,type:K.SELECT,options:[{label:`Labels`,value:`labels`},{label:`Icons`,value:`icons`},{label:`Both`,value:`both`}],defaultValue:`both`}]};var Vu=__exportAll({InlineViewSwitcherStories:()=>Uu,InlineViewSwitcherStory:()=>Hu}),Hu=class InlineViewSwitcherStory extends X{_switcher=null;static{o.registerClass({GTypeName:`AdwStorybookInlineViewSwitcher`},InlineViewSwitcherStory)}constructor(){super(X.fromMeta(InlineViewSwitcherStory.getMetadata(),`Default`))}static getMetadata(){return{...Bu,component:s.InlineViewSwitcher.$gtype}}buildPage(e,t,n){return new s.StatusPage({iconName:t,title:e,description:n,vexpand:!0})}initialize(){let e=new s.ViewStack({vexpand:!0});e.add_titled_with_icon(this.buildPage(`Overview`,`view-grid-symbolic`,`A quick summary of your project.`),`overview`,`Overview`,`view-grid-symbolic`),e.add_titled_with_icon(this.buildPage(`Activity`,`document-edit-symbolic`,`Recent edits and changes.`),`activity`,`Activity`,`document-edit-symbolic`),e.add_titled_with_icon(this.buildPage(`Settings`,`emblem-system-symbolic`,`Configure how things behave.`),`settings`,`Settings`,`emblem-system-symbolic`),this._switcher=new s.InlineViewSwitcher({stack:e,displayMode:this.modeFromArg(this.args.displayMode),halign:n.Align.CENTER});let t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:340});t.append(this._switcher),t.append(e),this.addContent(t)}modeFromArg(e){return e===`labels`?s.InlineViewSwitcherDisplayMode.LABELS:e===`icons`?s.InlineViewSwitcherDisplayMode.ICONS:s.InlineViewSwitcherDisplayMode.BOTH}updateArgs(e){this._switcher&&(this._switcher.displayMode=this.modeFromArg(this.args.displayMode))}};o.type_ensure(Hu.$gtype);const Uu={stories:[Hu]},Wu=[{name:`overview`,label:`Overview`,body:`A notebook brings its own tab strip.`},{name:`activity`,label:`Activity`,body:`tab-pos says which edge the strip is on.`},{name:`notes`,label:``,body:`No tab-label: the tab reads "Page 3".`}],Gu={title:`View Switching/Notebook`,description:'Gtk.Notebook — the older page container, a stack that brings its own tab bar. `tab-pos` picks the edge (top, bottom, left, right), `show-tabs` takes the strip away, `show-border` is the bevel around the pages — a CSS class in C — and `page` is the current page by INDEX rather than by name. A GtkNotebookPage is a GObject rather than a widget, so its tab-label and friends live on the page itself, and a page without one gets the number "Page N" as its tab text. `enable-popup` puts the pages in a right-click menu.',controls:[{name:`tabPos`,label:`Tab position`,type:K.SELECT,options:[{label:`Top`,value:`top`},{label:`Bottom`,value:`bottom`},{label:`Left`,value:`left`},{label:`Right`,value:`right`}],defaultValue:`top`},{name:`showTabs`,label:`Show tabs`,type:K.BOOLEAN,defaultValue:!0},{name:`showBorder`,label:`Show border`,type:K.BOOLEAN,defaultValue:!0},{name:`enablePopup`,label:`Enable popup (right-click)`,type:K.BOOLEAN,defaultValue:!1}]};var Ku=__exportAll({NotebookStories:()=>Yu,NotebookStory:()=>Ju});const qu={top:n.PositionType.TOP,bottom:n.PositionType.BOTTOM,left:n.PositionType.LEFT,right:n.PositionType.RIGHT};var Ju=class NotebookStory extends X{_notebook=null;static{o.registerClass({GTypeName:`AdwStorybookNotebook`},NotebookStory)}constructor(){super(X.fromMeta(NotebookStory.getMetadata(),`Default`))}static getMetadata(){return{...Gu,component:n.Notebook.$gtype}}initialize(){this._notebook=new n.Notebook({vexpand:!0,widthRequest:480,heightRequest:320});for(let e of Wu){let t=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,spacing:6});t.append(new n.Label({label:e.label||e.name,cssClasses:[`title-4`]})),t.append(new n.Label({label:e.body,cssClasses:[`title-2`]}));let r=e.label?new n.Label({label:e.label}):null,i=new n.Label({label:e.label||e.name});this._notebook.append_page_menu(t,r,i)}this._apply(),this.addContent(this._notebook)}updateArgs(e){this._apply()}_apply(){this._notebook&&(this._notebook.tab_pos=qu[this.args.tabPos]??n.PositionType.TOP,this._notebook.show_tabs=this.args.showTabs,this._notebook.enable_popup=this.args.enablePopup,this._notebook.show_border=this.args.showBorder)}};o.type_ensure(Ju.$gtype);const Yu={stories:[Ju]},Xu=[{name:`inbox`,title:`Inbox`,icon:`mail-unread-symbolic`,attn:!1,body:`Three unread conversations.`},{name:`starred`,title:`Starred`,icon:`starred-symbolic`,attn:!1,body:`Messages marked important.`},{name:`drafts`,title:`Drafts`,icon:`document-edit-symbolic`,attn:!0,body:`One draft needs attention.`},{name:`settings`,title:``,icon:`preferences-system-symbolic`,attn:!1,body:`No row: a title is the row.`}],Zu={title:`View Switching/Stack Sidebar`,description:"Gtk.StackSidebar — a vertical list of a Gtk.Stack's pages, the sidebar counterpart of the stack switcher. A row is made of the page's TITLE alone: `update_row` never reads `icon-name`, so the page with only an icon at the end of this story gets no row at all, where the switcher would show an icon button for it. `needs-attention` puts a dot in front of the label.",controls:[{name:`transitionType`,label:`Transition type`,type:K.SELECT,options:[{label:`None`,value:`none`},{label:`Crossfade`,value:`crossfade`},{label:`Slide left / right`,value:`slide-left-right`}],defaultValue:`slide-left-right`}]};var Qu=__exportAll({StackSidebarStories:()=>td,StackSidebarStory:()=>ed});const $u={none:n.StackTransitionType.NONE,crossfade:n.StackTransitionType.CROSSFADE,"slide-left-right":n.StackTransitionType.SLIDE_LEFT_RIGHT};var ed=class StackSidebarStory extends X{_stack=null;static{o.registerClass({GTypeName:`AdwStorybookStackSidebar`},StackSidebarStory)}constructor(){super(X.fromMeta(StackSidebarStory.getMetadata(),`Default`))}static getMetadata(){return{...Zu,component:n.StackSidebar.$gtype}}initialize(){this._stack=new n.Stack({vexpand:!0,transitionDuration:200});for(let e of Xu){let t=new n.Label({label:e.body});t.add_css_class(`title-2`);let r=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,spacing:6});r.append(new n.Label({label:e.title||e.name,cssClasses:[`title-4`]})),r.append(t);let i=this._stack.add_titled(r,e.name,e.title);i.icon_name=e.icon,i.needs_attention=e.attn,i.use_underline=!0}let e=new n.StackSidebar({stack:this._stack}),t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:0});t.append(e);let r=new n.Paned({orientation:n.Orientation.HORIZONTAL,widthRequest:480,heightRequest:320});r.set_start_child(t),r.set_end_child(this._stack),r.set_position(180),this._apply(),this.addContent(r)}updateArgs(e){this._apply()}_apply(){this._stack&&(this._stack.transition_type=$u[this.args.transitionType]??n.StackTransitionType.NONE)}};o.type_ensure(ed.$gtype);const td={stories:[ed]},nd=[{name:`inbox`,title:`Inbox`,icon:`mail-unread-symbolic`,attn:!1,body:`Three unread conversations.`},{name:`starred`,title:`Starred`,icon:`starred-symbolic`,attn:!1,body:`Messages marked important.`},{name:`archive`,title:`Archive`,icon:``,attn:!1,body:`Older conversations kept for reference.`},{name:`drafts`,title:``,icon:`document-edit-symbolic`,attn:!0,body:`One draft needs your attention.`}],rd={title:`View Switching/Stack Switcher`,description:"Gtk.StackSwitcher — a linked row of toggle buttons, one per page of a Gtk.Stack. A page with a title and no icon gets a label button; one with an icon and no title gets an icon button and puts the title on the switcher as a tooltip; a page with NEITHER is left out of the row entirely. `orientation` turns the row vertical, and `needs-attention` on a page puts a dot on its button.",controls:[{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`transitionType`,label:`Transition type`,type:K.SELECT,options:[{label:`None`,value:`none`},{label:`Crossfade`,value:`crossfade`},{label:`Slide left / right`,value:`slide-left-right`}],defaultValue:`slide-left-right`}]};var id=__exportAll({StackSwitcherStories:()=>sd,StackSwitcherStory:()=>od});const ad={none:n.StackTransitionType.NONE,crossfade:n.StackTransitionType.CROSSFADE,"slide-left-right":n.StackTransitionType.SLIDE_LEFT_RIGHT};var od=class StackSwitcherStory extends X{_stack=null;_switcher=null;static{o.registerClass({GTypeName:`AdwStorybookStackSwitcher`},StackSwitcherStory)}constructor(){super(X.fromMeta(StackSwitcherStory.getMetadata(),`Default`))}static getMetadata(){return{...rd,component:n.StackSwitcher.$gtype}}initialize(){this._stack=new n.Stack({vexpand:!0,transitionDuration:200});for(let e of nd){let t=new n.Label({label:e.body});t.add_css_class(`title-2`);let r=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,spacing:6});if(r.append(new n.Label({label:e.title||e.name,cssClasses:[`title-4`]})),r.append(t),e.icon){let t=this._stack.add_titled(r,e.name,e.title);t.icon_name=e.icon,t.needs_attention=e.attn,t.use_underline=!0}else{let t=this._stack.add_titled(r,e.name,e.title);t.needs_attention=e.attn,t.use_underline=!0}}this._switcher=new n.StackSwitcher({stack:this._stack,halign:n.Align.CENTER});let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:320});e.append(this._switcher),e.append(this._stack),this._apply(),this.addContent(e)}updateArgs(e){this._apply()}_apply(){!this._stack||!this._switcher||(this._stack.transition_type=ad[this.args.transitionType]??n.StackTransitionType.NONE,this._switcher.orientation=this.args.orientation===`vertical`?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL)}};o.type_ensure(od.$gtype);const sd={stories:[od]},cd=[{name:`overview`,title:`Overview`,attn:!1,body:`Three pages, one visible at a time.`},{name:`activity`,title:`Activity`,attn:!1,body:`Switching is animated by transition-type.`},{name:`settings`,title:`Settings`,attn:!0,body:`This page wants your attention.`}],ld={title:`View Switching/Stack`,description:"Gtk.Stack — one visible child out of many, with the animated change between them. `transition-type` picks the animation and `transition-duration` its length; `hhomogeneous` and `vhomogeneous` say whether every page is allocated the same size. A Gtk.StackPage is a GObject rather than a widget, so its title, icon and needs-attention live on the page itself.",controls:[{name:`transitionType`,label:`Transition type`,type:K.SELECT,options:[{label:`None`,value:`none`},{label:`Crossfade`,value:`crossfade`},{label:`Slide left / right`,value:`slide-left-right`},{label:`Slide up / down`,value:`slide-up-down`},{label:`Over left / right`,value:`over-left-right`},{label:`Rotate left / right`,value:`rotate-left-right`}],defaultValue:`slide-left-right`},{name:`transitionDuration`,label:`Duration (ms)`,type:K.RANGE,min:0,max:600,step:50,defaultValue:200},{name:`interpolateSize`,label:`Interpolate size`,type:K.BOOLEAN,defaultValue:!1},{name:`hhomogeneous`,label:`HHomogeneous`,type:K.BOOLEAN,defaultValue:!0},{name:`vhomogeneous`,label:`VHomogeneous`,type:K.BOOLEAN,defaultValue:!0}]};var ud=__exportAll({StackStories:()=>pd,StackStory:()=>fd});const dd={none:n.StackTransitionType.NONE,crossfade:n.StackTransitionType.CROSSFADE,"slide-left-right":n.StackTransitionType.SLIDE_LEFT_RIGHT,"slide-up-down":n.StackTransitionType.SLIDE_UP_DOWN,"over-left-right":n.StackTransitionType.OVER_LEFT_RIGHT,"rotate-left-right":n.StackTransitionType.ROTATE_LEFT_RIGHT};var fd=class StackStory extends X{_stack=null;_switcher=null;static{o.registerClass({GTypeName:`AdwStorybookStack`},StackStory)}constructor(){super(X.fromMeta(StackStory.getMetadata(),`Default`))}static getMetadata(){return{...ld,component:n.Stack.$gtype}}initialize(){this._stack=new n.Stack({vexpand:!0,transitionDuration:200});for(let e of cd){let t=new n.Label({label:e.body,vexpand:!0});t.add_css_class(`title-2`);let r=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,spacing:6});r.append(new n.Label({label:e.title,cssClasses:[`title-4`]})),r.append(t);let i=this._stack.add_titled(r,e.name,e.title);i.needs_attention=e.attn,i.use_underline=!0}this._switcher=new n.StackSwitcher({stack:this._stack,halign:n.Align.CENTER});let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:320});e.append(this._switcher),e.append(this._stack),this._apply(),this.addContent(e)}updateArgs(e){this._apply()}_apply(){this._stack&&(this._stack.transition_type=dd[this.args.transitionType]??n.StackTransitionType.NONE,this._stack.transition_duration=this.args.transitionDuration,this._stack.interpolate_size=this.args.interpolateSize,this._stack.hhomogeneous=this.args.hhomogeneous,this._stack.vhomogeneous=this.args.vhomogeneous)}};o.type_ensure(fd.$gtype);const pd={stories:[fd]},md={title:`View Switching/Tab Bar`,description:"Adw.TabBar — the tab bar as a widget of its own, bound to an Adw.TabView through its `view`: one chip per page, an action widget on either side, and a strip that can autohide or expand its chips.",controls:[{name:`autohide`,label:`Autohide`,type:K.BOOLEAN,defaultValue:!1},{name:`expandTabs`,label:`Expand tabs`,type:K.BOOLEAN,defaultValue:!1},{name:`inverted`,label:`Inverted`,type:K.BOOLEAN,defaultValue:!1},{name:`startAction`,label:`Start action`,type:K.BOOLEAN,defaultValue:!0},{name:`endAction`,label:`End action`,type:K.BOOLEAN,defaultValue:!0}]};var hd=__exportAll({TabBarStories:()=>vd,TabBarStory:()=>_d});const gd=[{title:`Overview`,body:`A summary of everything at a glance.`},{title:`Details`,body:`The specifics, broken down line by line.`},{title:`History`,body:`A log of every change made so far.`}];var _d=class TabBarStory extends X{_bar=null;_startAction=null;_endAction=null;static{o.registerClass({GTypeName:`AdwStorybookTabBar`},TabBarStory)}constructor(){super(X.fromMeta(TabBarStory.getMetadata(),`Default`))}static getMetadata(){return{...md,component:s.TabBar.$gtype}}initialize(){let e=new s.TabView({vexpand:!0});for(let t of gd){let n=e.append(new s.StatusPage({iconName:`view-paged-symbolic`,title:t.title,description:t.body}));n.title=t.title}this._startAction=new n.Button({iconName:`list-add-symbolic`,tooltipText:`New page`,cssClasses:[`flat`]}),this._endAction=new n.Button({iconName:`view-more-symbolic`,tooltipText:`Menu`,cssClasses:[`flat`]});let t=new s.TabBar({view:e});this._bar=t;let r=new n.Box({orientation:n.Orientation.VERTICAL,widthRequest:480,heightRequest:320});r.append(t),r.append(e),this.addContent(r),this._apply()}updateArgs(e){this._apply()}_apply(){let e=this._bar;e!==null&&(e.autohide=this.args.autohide,e.expandTabs=this.args.expandTabs,e.inverted=this.args.inverted,e.startActionWidget=this.args.startAction?this._startAction:null,e.endActionWidget=this.args.endAction?this._endAction:null)}};o.type_ensure(_d.$gtype);const vd={stories:[_d]},yd={title:`View Switching/Tab Button`,description:`Adw.TabButton — a button that shows how many pages an Adw.TabView holds, and a dot when a page you are not looking at needs attention. From ten pages the number shrinks; at a hundred it becomes a glyph.`,controls:[{name:`pages`,label:`Pages`,type:K.RANGE,min:0,max:100,step:1,defaultValue:3},{name:`needsAttention`,label:`Last page needs attention`,type:K.BOOLEAN,defaultValue:!1}]};var bd=__exportAll({TabButtonStories:()=>Sd,TabButtonStory:()=>xd}),xd=class TabButtonStory extends X{_view=null;static{o.registerClass({GTypeName:`AdwStorybookTabButton`},TabButtonStory)}constructor(){super(X.fromMeta(TabButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...yd,component:s.TabButton.$gtype}}initialize(){this._view=new s.TabView;let e=new s.TabButton({view:this._view,halign:n.Align.CENTER});this._apply(),this.addContent(e)}updateArgs(e){this._apply()}_apply(){let e=this._view;if(!e)return;let t=this.args.pages;for(;e.nPages<t;)e.append(new n.Box).title=`Page ${e.nPages}`;for(;e.nPages>t;)e.close_page(e.get_nth_page(e.nPages-1));for(let t=0;t<e.nPages;t++)e.get_nth_page(t).needsAttention=this.args.needsAttention&&t===e.nPages-1}};o.type_ensure(xd.$gtype);const Sd={stories:[xd]},Cd={title:`View Switching/Tab Overview`,description:`Adw.TabOverview — a grid of tab thumbnails over an Adw.TabView; open it to see every page at once, search them and close or unpin them.`,controls:[{name:`open`,label:`Open`,type:K.BOOLEAN,defaultValue:!0},{name:`enableSearch`,label:`Enable search`,type:K.BOOLEAN,defaultValue:!0},{name:`enableNewTab`,label:`Enable new tab`,type:K.BOOLEAN,defaultValue:!1},{name:`inverted`,label:`Inverted`,type:K.BOOLEAN,defaultValue:!1}]};var wd=__exportAll({TabOverviewStories:()=>Dd,TabOverviewStory:()=>Ed});const Td=[{title:`Overview`,body:`A summary of everything at a glance.`},{title:`Details`,body:`The specifics, broken down line by line.`},{title:`History`,body:`A log of every change made so far.`}];var Ed=class TabOverviewStory extends X{_overview=null;static{o.registerClass({GTypeName:`AdwStorybookTabOverview`},TabOverviewStory)}constructor(){super(X.fromMeta(TabOverviewStory.getMetadata(),`Default`))}static getMetadata(){return{...Cd,component:s.TabOverview.$gtype}}initialize(){let e=new s.TabView({vexpand:!0});for(let[t,n]of Td.entries()){let r=new s.StatusPage({iconName:`view-paged-symbolic`,title:n.title,description:n.body,vexpand:!0}),i=e.append(r);i.title=n.title,t===0&&e.set_page_pinned(i,!0)}let t=new s.TabOverview({view:e,child:e,widthRequest:480,heightRequest:340});this._overview=t,t.connect(`create-tab`,()=>{let t=e.append(new s.StatusPage({iconName:`view-paged-symbolic`,title:`New Page`,vexpand:!0}));return t.title=`New Page`,t}),this.addContent(t),this._apply()}updateArgs(e){this._apply()}_apply(){let e=this._overview;e&&(e.enableSearch=this.args.enableSearch,e.enableNewTab=this.args.enableNewTab,e.inverted=this.args.inverted,e.open=this.args.open)}};o.type_ensure(Ed.$gtype);const Dd={stories:[Ed]},Od={title:`View Switching/Tab View`,description:`Adw.TabView with an Adw.TabBar header — three tabbed pages; the tab bar can auto-hide when only one tab remains.`,controls:[{name:`autohide`,label:`Autohide tab bar`,type:K.BOOLEAN,defaultValue:!1}]};var kd=__exportAll({TabViewStories:()=>Md,TabViewStory:()=>jd});const Ad=[{title:`Overview`,body:`A summary of everything at a glance.`},{title:`Details`,body:`The specifics, broken down line by line.`},{title:`History`,body:`A log of every change made so far.`}];var jd=class TabViewStory extends X{_tabBar=null;static{o.registerClass({GTypeName:`AdwStorybookTabView`},TabViewStory)}constructor(){super(X.fromMeta(TabViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Od,component:s.TabView.$gtype}}buildPageBody(e,t){return new s.StatusPage({iconName:`view-paged-symbolic`,title:e,description:t,vexpand:!0})}initialize(){let e=new s.TabView({vexpand:!0});for(let t of Ad){let n=e.append(this.buildPageBody(t.title,t.body));n.title=t.title}this._tabBar=new s.TabBar({view:e,autohide:this.args.autohide});let t=new n.Box({orientation:n.Orientation.VERTICAL,widthRequest:480,heightRequest:340});t.append(this._tabBar),t.append(e),this.addContent(t)}updateArgs(e){this._tabBar&&(this._tabBar.autohide=this.args.autohide)}};o.type_ensure(jd.$gtype);const Md={stories:[jd]},Nd=[{name:`inbox`,title:`Inbox`,icon:`mail-unread-symbolic`},{name:`starred`,title:`Starred`,icon:`starred-symbolic`},{name:`archive`,title:`Archive`,icon:`folder-symbolic`}],Pd={title:`View Switching/View Switcher Bar`,description:"Adw.ViewSwitcherBar — the narrow-window switcher, pinned to the bottom of a toolbar view. `reveal` is a REQUEST, not a state: a stack with fewer than two pages stays collapsed however loudly it is asked.",controls:[{name:`reveal`,label:`Reveal`,type:K.BOOLEAN,defaultValue:!0}]};var Fd=__exportAll({ViewSwitcherBarStories:()=>Ld,ViewSwitcherBarStory:()=>Id}),Id=class ViewSwitcherBarStory extends X{_bar=null;static{o.registerClass({GTypeName:`AdwStorybookViewSwitcherBar`},ViewSwitcherBarStory)}constructor(){super(X.fromMeta(ViewSwitcherBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Pd,component:s.ViewSwitcherBar.$gtype}}initialize(){let e=new s.ViewStack({vexpand:!0});for(let t of Nd){let n=new s.StatusPage({iconName:t.icon,title:t.title,description:`The ${t.title.toLowerCase()} page.`,vexpand:!0});e.add_titled_with_icon(n,t.name,t.title,t.icon)}this._bar=new s.ViewSwitcherBar({stack:e}),this._apply();let t=new s.ToolbarView({content:e,widthRequest:360,heightRequest:360});t.add_bottom_bar(this._bar),this.addContent(t)}updateArgs(e){this._apply()}_apply(){this._bar&&(this._bar.reveal=this.args.reveal)}};o.type_ensure(Id.$gtype);const Ld={stories:[Id]},Rd=[{name:`inbox`,title:`Inbox`,icon:`mail-unread-symbolic`,sectionTitle:`Mail`,badgeNumber:3},{name:`starred`,title:`Starred`,icon:`starred-symbolic`},{name:`drafts`,title:`Drafts`,icon:`document-edit-symbolic`},{name:`sent`,title:`Sent`,icon:`mail-send-symbolic`,sectionTitle:`Older`,needsAttention:!0},{name:`archive`,title:`Archive`,icon:`folder-symbolic`},{name:`trash`,title:`Trash`,icon:`user-trash-symbolic`}],zd={title:`View Switching/View Switcher Sidebar`,description:"Adw.ViewSwitcherSidebar — an Adw.Sidebar driven by an Adw.ViewStack, which is the one Adw switcher whose rows can be grouped into sections and carry an unread dot or a badge. `page` collapses it into a page of boxed lists.",controls:[{name:`mode`,label:`Page mode`,type:K.BOOLEAN,defaultValue:!1}]};var Bd=__exportAll({ViewSwitcherSidebarStories:()=>Hd,ViewSwitcherSidebarStory:()=>Vd}),Vd=class ViewSwitcherSidebarStory extends X{_switcher=null;static{o.registerClass({GTypeName:`AdwStorybookViewSwitcherSidebar`},ViewSwitcherSidebarStory)}constructor(){super(X.fromMeta(ViewSwitcherSidebarStory.getMetadata(),`Default`))}static getMetadata(){return{...zd,component:s.ViewSwitcherSidebar.$gtype}}initialize(){let e=new s.ViewStack({vexpand:!0});for(let t of Rd){let n=new s.StatusPage({iconName:t.icon,title:t.title,vexpand:!0});e.add_titled(n,t.name,t.title)}let t=e.get_pages();for(let e=0;e<t.get_n_items();e++){let n=t.get_item(e),r=Rd.find(e=>e.name===n.name);r?.sectionTitle&&(n.startsSection=!0,n.sectionTitle=r.sectionTitle,r.badgeNumber&&(n.badgeNumber=r.badgeNumber),r.needsAttention&&(n.needsAttention=!0))}let r=new s.ViewSwitcherSidebar({stack:e});this._switcher=r;let i=new n.Box({orientation:n.Orientation.HORIZONTAL,widthRequest:480,heightRequest:340});i.append(r),i.append(e),this.addContent(i),this._apply()}updateArgs(e){this._apply()}_apply(){this._switcher&&(this._switcher.mode=this.args.mode?s.SidebarMode.PAGE:s.SidebarMode.SIDEBAR)}};o.type_ensure(Vd.$gtype);const Hd={stories:[Vd]},Ud={title:`View Switching/View Switcher`,description:`Adw.ViewSwitcher — a segmented switcher whose buttons select pages in a paired Adw.ViewStack.`,controls:[{name:`policy`,label:`Policy`,type:K.SELECT,options:[{label:`Wide`,value:`wide`},{label:`Narrow`,value:`narrow`}],defaultValue:`wide`}]};var Wd=__exportAll({ViewSwitcherStories:()=>Kd,ViewSwitcherStory:()=>Gd}),Gd=class ViewSwitcherStory extends X{_switcher=null;static{o.registerClass({GTypeName:`AdwStorybookViewSwitcher`},ViewSwitcherStory)}constructor(){super(X.fromMeta(ViewSwitcherStory.getMetadata(),`Default`))}static getMetadata(){return{...Ud,component:s.ViewSwitcher.$gtype}}buildPage(e,t,n){return new s.StatusPage({iconName:t,title:e,description:n,vexpand:!0})}initialize(){let e=new s.ViewStack({vexpand:!0});e.add_titled_with_icon(this.buildPage(`Inbox`,`mail-unread-symbolic`,`You have three unread conversations.`),`inbox`,`Inbox`,`mail-unread-symbolic`),e.add_titled_with_icon(this.buildPage(`Starred`,`starred-symbolic`,`Messages you have marked as important.`),`starred`,`Starred`,`starred-symbolic`),e.add_titled_with_icon(this.buildPage(`Archive`,`folder-symbolic`,`Older conversations kept for reference.`),`archive`,`Archive`,`folder-symbolic`),this._switcher=new s.ViewSwitcher({stack:e,policy:this.policyFromArg(this.args.policy),halign:n.Align.CENTER});let t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:340});t.append(this._switcher),t.append(e),this.addContent(t)}policyFromArg(e){return e===`narrow`?s.ViewSwitcherPolicy.NARROW:s.ViewSwitcherPolicy.WIDE}updateArgs(e){this._switcher&&(this._switcher.policy=this.policyFromArg(this.args.policy))}};o.type_ensure(Gd.$gtype);const Kd={stories:[Gd]},qd={title:`Windows/Action Bar`,description:"Gtk.ActionBar — GTK's bottom bar, and the one libadwaita styles but does not own (`actionbar > revealer > box`). `start` appends and `end` PREPENDS, so the first end child sits nearest the edge; `center` is a real placement with no property behind it, because GtkBuilder refuses `center-widget`; and `revealed` slides the whole bar away.",controls:[{name:`revealed`,label:`Revealed`,type:K.BOOLEAN,defaultValue:!0},{name:`center`,label:`Centre`,type:K.SELECT,options:[{label:`A label`,value:`label`},{label:`Nothing`,value:`none`}],defaultValue:`label`}]};var Jd=__exportAll({ActionBarStories:()=>Xd,ActionBarStory:()=>Yd}),Yd=class ActionBarStory extends X{_bar=null;_centre=null;static{o.registerClass({GTypeName:`AdwStorybookActionBar`},ActionBarStory)}constructor(){super(X.fromMeta(ActionBarStory.getMetadata(),`Default`))}static getMetadata(){return{...qd,component:n.ActionBar.$gtype}}initialize(){this._bar=new n.ActionBar;let e=new n.Button({icon_name:`document-save-symbolic`});e.add_css_class(`flat`),this._bar.pack_end(e);let t=new n.Button({icon_name:`document-open-symbolic`});t.add_css_class(`flat`),this._bar.pack_end(t);let r=new n.Button({icon_name:`document-print-symbolic`});r.add_css_class(`flat`),this._bar.pack_start(r),this._centre=new n.Label({label:`notes.md`});let i=new n.Box({orientation:n.Orientation.VERTICAL,spacing:8});i.append(new n.Label({label:`The bar below is Gtk.ActionBar.`,css_classes:[`dimmed`]})),i.append(this._bar),this.addContent(i),this._apply()}updateArgs(e){this._apply()}_apply(){this._bar&&(this._bar.revealed=this.args.revealed,this._bar.set_center_widget(this.args.center===`label`?this._centre:null))}};o.type_ensure(Yd.$gtype);const Xd={stories:[Yd]},Zd={title:`Windows/Application Window`,description:"Gtk.ApplicationWindow — a Gtk.Window that also handles an application menubar. The bar shows only when `show-menubar` is set AND the application HAS one: GTK builds it from the GtkApplication's menu model, and reads the item count before deciding (gtkapplicationwindow.c:400-402). Everything else about the window is the base class.",controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Editor`},{name:`showMenubar`,label:`Show menubar`,type:K.BOOLEAN,defaultValue:!0},{name:`hasMenubar`,label:`The application has one`,type:K.BOOLEAN,defaultValue:!0},{name:`deletable`,label:`Deletable`,type:K.BOOLEAN,defaultValue:!0}]};var Qd=__exportAll({GtkApplicationWindowStories:()=>ef,GtkApplicationWindowStory:()=>$d});function menubarModel(){let e=new r.Menu,t=new r.Menu;t.append(`_New`,`win.new`),t.append(`_Open…`,`win.open`);let n=new r.Menu;return n.append(`_Copy`,`win.copy`),n.append(`_Paste`,`win.paste`),e.append_section(null,t),e.append_section(null,n),e}var $d=class GtkApplicationWindowStory extends X{_window=null;_application=null;_menubar=null;static{o.registerClass({GTypeName:`AdwStorybookGtkApplicationWindow`},GtkApplicationWindowStory)}constructor(){super(X.fromMeta(GtkApplicationWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...Zd,component:n.ApplicationWindow.$gtype}}initialize(){this._application=new n.Application({application_id:`eu.jumplink.AdwStorybookGtkApplicationWindow`}),this._menubar=menubarModel(),this._application.set_menubar(this._menubar),this._window=new n.ApplicationWindow({application:this._application,default_width:460,default_height:260}),this._window.set_titlebar(new n.HeaderBar);let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,margin_top:12,margin_start:12});e.append(new n.Label({label:`The bar above is built from the application menu.`,css_classes:[`dimmed`]})),this._window.set_child(e),this.addContent(this._window),this._apply()}updateArgs(e){this._apply()}_apply(){!this._window||!this._application||(this._window.title=this.args.title,this._window.deletable=this.args.deletable,this._application.set_menubar(this.args.hasMenubar?this._menubar:null),this._window.show_menubar=this.args.showMenubar)}};o.type_ensure($d.$gtype);const ef={stories:[$d]},tf={title:`Windows/Header Bar`,description:"Gtk.HeaderBar — the titlebar widget: children packed at the start and at the end, the window title in the middle, and the window-frame buttons GTK would otherwise ask the window manager for. `end` PREPENDS, so the first end child sits nearest the edge; a `title` child takes the middle away from the derived title label; and `show-title-buttons` CREATES and REMOVES the two control groups rather than hiding them.",controls:[{name:`titleWidget`,label:`Title widget`,type:K.SELECT,options:[{label:`The window title`,value:`none`},{label:`A custom centre widget`,value:`custom`}],defaultValue:`none`},{name:`showTitleButtons`,label:`Title buttons`,type:K.BOOLEAN,defaultValue:!0},{name:`decorationLayout`,label:`Decoration layout`,type:K.SELECT,options:[{label:`GNOME (menu:minimize,maximize,close)`,value:`menu:minimize,maximize,close`},{label:`Close only`,value:`:close`},{label:`macOS (icon:minimize,maximize)`,value:`icon:minimize,maximize`}],defaultValue:`menu:minimize,maximize,close`}]};var nf=__exportAll({GtkHeaderBarStories:()=>af,GtkHeaderBarStory:()=>rf}),rf=class GtkHeaderBarStory extends X{_bar=null;_titleLabel=null;static{o.registerClass({GTypeName:`AdwStorybookGtkHeaderBar`},GtkHeaderBarStory)}constructor(){super(X.fromMeta(GtkHeaderBarStory.getMetadata(),`Default`))}static getMetadata(){return{...tf,component:n.HeaderBar.$gtype}}initialize(){this._bar=new n.HeaderBar;let e=new n.Button({icon_name:`open-menu-symbolic`});e.add_css_class(`flat`),this._bar.pack_end(e);let t=new n.Button({icon_name:`system-search-symbolic`});t.add_css_class(`flat`),this._bar.pack_end(t);let r=new n.Button({label:`‹`});r.add_css_class(`flat`),this._bar.pack_start(r),this._titleLabel=new n.Label({label:`Mailboxes`,css_classes:[`title`]}),this.addContent(this._bar),this._apply()}updateArgs(e){this._apply()}_apply(){this._bar&&(this._bar.decoration_layout=this.args.decorationLayout,this._bar.show_title_buttons=this.args.showTitleButtons,this.args.titleWidget===`custom`?this._bar.title_widget=this._titleLabel:this._bar.title_widget=null)}};o.type_ensure(rf.$gtype);const af={stories:[rf]},of={title:`Windows/Window`,description:"Gtk.Window — a toplevel with a `titlebar` and a `child`, and the properties that decide what its frame shows: `decorated`, `deletable`, `resizable`, `maximized` and `hide-on-close`. The BROWSER replica of this one is an IN-PAGE FRAME, not a toplevel: a browser document has no window to map. The story therefore cancels `close-request`, which is what an application does when it wants to keep the window.",controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Documents`},{name:`decorated`,label:`Decorated`,type:K.BOOLEAN,defaultValue:!0},{name:`deletable`,label:`Deletable`,type:K.BOOLEAN,defaultValue:!0},{name:`resizable`,label:`Resizable`,type:K.BOOLEAN,defaultValue:!0},{name:`maximized`,label:`Maximized`,type:K.BOOLEAN,defaultValue:!1},{name:`modal`,label:`Modal`,type:K.BOOLEAN,defaultValue:!1},{name:`hideOnClose`,label:`Hide on close`,type:K.BOOLEAN,defaultValue:!0}]};var sf=__exportAll({GtkWindowStories:()=>lf,GtkWindowStory:()=>cf}),cf=class GtkWindowStory extends X{_window=null;static{o.registerClass({GTypeName:`AdwStorybookGtkWindow`},GtkWindowStory)}constructor(){super(X.fromMeta(GtkWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...of,component:n.Window.$gtype}}initialize(){this._window=new n.Window({default_width:460,default_height:280});let e=new n.HeaderBar;this._window.set_titlebar(e);let t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,margin_top:12,margin_start:12});t.append(new n.Label({label:`The frame above is a Gtk.HeaderBar.`,css_classes:[`dimmed`]})),this._window.set_child(t),this.addContent(this._window),this._apply()}updateArgs(e){this._apply()}_apply(){this._window&&(this._window.title=this.args.title,this._window.decorated=this.args.decorated,this._window.deletable=this.args.deletable,this._window.resizable=this.args.resizable,this._window.maximized=this.args.maximized,this._window.modal=this.args.modal,this._window.hide_on_close=this.args.hideOnClose)}};o.type_ensure(cf.$gtype);const lf={stories:[cf]},uf={title:`Windows/Window Controls`,description:"Gtk.WindowControls — one SIDE of the window frame controls, and the decision table behind them. The decoration layout is split on the first colon; each token of the selected half builds one button or none, because `icon` and `minimize` want a SOVEREIGN window, `maximize` wants a resizable one and `close` wants a deletable one. `empty` is the property that says none of them did.",controls:[{name:`side`,label:`Side`,type:K.SELECT,options:[{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`start`},{name:`decorationLayout`,label:`Decoration layout`,type:K.SELECT,options:[{label:`GNOME (menu:minimize,maximize,close)`,value:`menu:minimize,maximize,close`},{label:`Windows (icon:minimize,maximize,close)`,value:`icon:minimize,maximize,close`},{label:`Close only`,value:`:close`},{label:`macOS (icon:minimize,maximize)`,value:`icon:minimize,maximize`}],defaultValue:`menu:minimize,maximize,close`},{name:`resizable`,label:`Resizable window`,type:K.BOOLEAN,defaultValue:!0},{name:`maximized`,label:`Maximized window`,type:K.BOOLEAN,defaultValue:!1},{name:`modal`,label:`Modal window`,type:K.BOOLEAN,defaultValue:!1}]};var df=__exportAll({WindowControlsStories:()=>pf,WindowControlsStory:()=>ff}),ff=class WindowControlsStory extends X{_window=null;_controls=null;static{o.registerClass({GTypeName:`AdwStorybookWindowControls`},WindowControlsStory)}constructor(){super(X.fromMeta(WindowControlsStory.getMetadata(),`Default`))}static getMetadata(){return{...uf,component:n.WindowControls.$gtype}}initialize(){this._window=new n.Window({title:`Documents`,default_width:420,default_height:220});let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:8});e.append(new n.Label({label:`The bar draws nothing outside a window.`,css_classes:[`dimmed`]})),this._window.set_child(e),this._controls=new n.WindowControls,this._window.set_titlebar(this._controls),this.addContent(this._window),this._apply()}updateArgs(e){this._apply()}_apply(){if(!this._window||!this._controls)return;let e=this.args.side===`end`?n.PackType.END:n.PackType.START;this._controls.side=e,this._controls.decoration_layout=this.args.decorationLayout,this._window.resizable=this.args.resizable,this._window.maximized=this.args.maximized,this._window.modal=this.args.modal}};o.type_ensure(ff.$gtype);const pf={stories:[ff]};await runStorybook({applicationId:`org.gjsify.AdwaitaStorybook`,title:`Adwaita Storybook`,stories:collectStoryModules([gn,bn,Tn,kn,Nn,Rn,Un,Jn,$n,rr,cr,pr,_r,xr,Tr,kr,Nr,Lr,Vr,Gr,Yr,$r,ri,si,di,hi,yi,Ci,Oi,Mi,Li,Ui,qi,Qi,na,oa,ua,ma,va,Sa,Da,Ma,Ia,Ba,Wa,Ja,Qa,no,oo,po,vo,Co,Oo,Mo,Io,Vo,Go,Zo,ts,as,ls,ps,_s,xs,Ts,ks,Ns,Ls,Vs,Gs,Ys,ec,ic,fc,gc,bc,Tc,Ac,Fc,Uc,Jc,Zc,rl,cl,fl,_l,xl,Tl,kl,Nl,zl,Ul,ql,Zl,tu,au,lu,pu,_u,xu,Tu,ku,Fu,Vu,Ku,Qu,id,ud,hd,bd,wd,kd,Fd,Bd,Wd,Jd,Qd,nf,sf,df])});const mf=globalThis.process,hf=Number(mf?.exitCode);Number.isInteger(hf)&&hf!==0&&mf.exit(hf);
344
+ Built with meson 1.6`}),t=Fi[this.args.licenseType]??n.License.UNKNOWN;t===n.License.CUSTOM&&e.set_license(`Permission is hereby granted, free of charge, to any person obtaining a copy…`),e.set_license_type(t),this.args.withCredits&&(e.set_authors([`Ada Lovelace <ada@example.org>`,`Grace Hopper`]),e.set_documenters([`Barbara Liskov`]),e.set_artists([`Margaret Hamilton`]),e.set_translator_credits(`Alan Turing
345
+ Katherine Johnson`),e.add_credit_section(`Reviewed by`,[`Tony Hoare <tony@example.org>`])),e.present()}updateArgs(e){}};o.type_ensure(Ii.$gtype);const Li={stories:[Ii]},Ri={title:`Feedback/Page Setup Dialog`,description:`Gtk.PageSetupUnixDialog — the page setup dialog Unix platforms have instead of a native one: a printer and a paper size, the chosen sheet's size and margins, and four orientation buttons.`,controls:[{name:`paperSize`,label:`Paper size`,type:K.SELECT,options:[{label:`US Letter`,value:`na_letter`},{label:`US Legal`,value:`na_legal`},{label:`A4`,value:`iso_a4`},{label:`A5`,value:`iso_a5`},{label:`B5`,value:`iso_b5`},{label:`A3`,value:`iso_a3`}],defaultValue:`iso_a4`},{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Portrait`,value:`portrait`},{label:`Landscape`,value:`landscape`},{label:`Reverse portrait`,value:`reverse-portrait`},{label:`Reverse landscape`,value:`reverse-landscape`}],defaultValue:`landscape`}]};var zi=__exportAll({PageSetupUnixDialogStories:()=>Ui,PageSetupUnixDialogStory:()=>Vi});const Bi={portrait:n.PageOrientation.PORTRAIT,landscape:n.PageOrientation.LANDSCAPE,"reverse-portrait":n.PageOrientation.REVERSE_PORTRAIT,"reverse-landscape":n.PageOrientation.REVERSE_LANDSCAPE};var Vi=class PageSetupUnixDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookPageSetupUnixDialog`},PageSetupUnixDialogStory)}constructor(){super(X.fromMeta(PageSetupUnixDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Ri,component:n.PageSetupUnixDialog.$gtype}}initialize(){this._button=new n.Button({label:`Page Setup…`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=n.PageSetupUnixDialog.new(`Page Setup`,null),t=new n.PageSetup;t.set_paper_size_and_default_margins(n.PaperSize.new(this.args.paperSize)),t.set_orientation(Bi[this.args.orientation]??n.PageOrientation.PORTRAIT),e.set_page_setup(t),e.present()}updateArgs(e){}};const Hi=`PageSetupUnixDialog`in n;Hi&&o.type_ensure(Vi.$gtype);const Ui={stories:[Vi].filter(()=>Hi)},Wi={title:`Feedback/Preferences Dialog`,description:`Adw.PreferencesDialog — a preferences window with a page, a group and a handful of boxed-list rows.`,controls:[{name:`pageTitle`,label:`Page title`,type:K.TEXT,defaultValue:`General`},{name:`groupTitle`,label:`Group title`,type:K.TEXT,defaultValue:`Appearance`}]};var Gi=__exportAll({PreferencesDialogStories:()=>qi,PreferencesDialogStory:()=>Ki}),Ki=class PreferencesDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookPreferencesDialog`},PreferencesDialogStory)}constructor(){super(X.fromMeta(PreferencesDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Wi,component:s.PreferencesDialog.$gtype}}initialize(){this._button=new n.Button({label:`Show dialog`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=new s.PreferencesDialog,t=new s.PreferencesPage({title:this.args.pageTitle,iconName:`preferences-system-symbolic`}),r=new s.PreferencesGroup({title:this.args.groupTitle,description:`Control how the application looks and behaves.`});r.add(new s.SwitchRow({title:`Dark style`,subtitle:`Use a dark colour scheme`,active:!0})),r.add(new s.ComboRow({title:`Accent colour`,model:new n.StringList({strings:[`Blue`,`Teal`,`Green`,`Orange`,`Purple`]}),selected:0})),r.add(new s.SpinRow({title:`Font size`,adjustment:new n.Adjustment({lower:8,upper:24,value:12,stepIncrement:1,pageIncrement:4})})),t.add(r),e.add(t),e.present(this)}updateArgs(e){}};o.type_ensure(Ki.$gtype);const qi={stories:[Ki]},Ji={title:`Feedback/Print Dialog`,description:`Gtk.PrintUnixDialog — the Unix print dialog: seven notebook pages over a printer list, a Range and a Copies group on General, the sheet preview on Page Setup, and the Preview / Cancel / Print action area.`,controls:[{name:`capabilities`,label:`Capabilities`,type:K.TEXT,defaultValue:`copies|collate|reverse|scale|preview|page-set`},{name:`range`,label:`Range`,type:K.SELECT,options:[{label:`All Pages`,value:`all`},{label:`Current Page`,value:`current`},{label:`Selection`,value:`selection`},{label:`Pages`,value:`pages`}],defaultValue:`all`},{name:`copies`,label:`Copies`,type:K.NUMBER,defaultValue:2}]};var Yi=__exportAll({PrintUnixDialogStories:()=>Qi,PrintUnixDialogStory:()=>Xi});const capabilities=()=>({collate:n.PrintCapabilities.COLLATE,copies:n.PrintCapabilities.COPIES,"generate-pdf":n.PrintCapabilities.GENERATE_PDF,"generate-ps":n.PrintCapabilities.GENERATE_PS,"number-up":n.PrintCapabilities.NUMBER_UP,"number-up-layout":n.PrintCapabilities.NUMBER_UP_LAYOUT,"page-set":n.PrintCapabilities.PAGE_SET,preview:n.PrintCapabilities.PREVIEW,reverse:n.PrintCapabilities.REVERSE,scale:n.PrintCapabilities.SCALE});var Xi=class PrintUnixDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookPrintUnixDialog`},PrintUnixDialogStory)}constructor(){super(X.fromMeta(PrintUnixDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Ji,component:n.PrintUnixDialog.$gtype}}initialize(){this._button=new n.Button({label:`Print…`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=n.PrintUnixDialog.new(`Print`,null),t=capabilities(),r=String(this.args.capabilities).split(`|`).map(e=>t[e.trim()]??0).reduce((e,t)=>e|t,0);e.set_manual_capabilities(r),e.set_current_page(2),e.set_support_selection(!0),e.set_has_selection(!0);let i=new n.PrintSettings;i.set_n_copies(Number(this.args.copies)),i.set_collate(this.args.range===`all`),i.set_print_pages(this.args.range===`current`?n.PrintPages.CURRENT:n.PrintPages.ALL),e.set_settings(i),e.present()}updateArgs(e){}};const Zi=`PrintUnixDialog`in n;Zi&&o.type_ensure(Xi.$gtype);const Qi={stories:[Xi].filter(()=>Zi)},$i={title:`Feedback/Shortcuts Dialog`,description:`Adw.ShortcutsDialog — the window that lists an application’s keyboard shortcuts, one titled section at a time.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Keyboard Shortcuts`}]};var ea=__exportAll({ShortcutsDialogStories:()=>na,ShortcutsDialogStory:()=>ta}),ta=class ShortcutsDialogStory extends X{_button=null;static{o.registerClass({GTypeName:`AdwStorybookShortcutsDialog`},ShortcutsDialogStory)}constructor(){super(X.fromMeta(ShortcutsDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...$i,component:s.ShortcutsDialog.$gtype}}initialize(){this._button=new n.Button({label:`Show dialog`,halign:n.Align.CENTER,valign:n.Align.CENTER}),this._button.add_css_class(`pill`),this._button.add_css_class(`suggested-action`),this._button.connect(`clicked`,()=>this._present()),this.addContent(this._button)}_present(){let e=new s.ShortcutsSection({title:`General`});e.add(new s.ShortcutsItem({title:`Open Menu`,accelerator:`F10`})),e.add(new s.ShortcutsItem({title:`Preferences`,action_name:`app.preferences`})),e.add(new s.ShortcutsItem({title:`Quit`,accelerator:`<Control>q`}));let t=new s.ShortcutsSection;t.add(new s.ShortcutsItem({title:`Move Tab Left`,accelerator:`<Shift><Control>Page_Up`,direction:n.TextDirection.LTR})),t.add(new s.ShortcutsItem({title:`Move Tab Left`,accelerator:`<Shift><Control>Page_Up`,direction:n.TextDirection.RTL}));let r=new s.ShortcutsDialog({title:this.args.title});r.add(e),r.add(t),r.present(this)}updateArgs(e){}};o.type_ensure(ta.$gtype);const na={stories:[ta]},ra={title:`Feedback/Toast`,description:`Adw.Toast — a transient notification, with an optional action button, shown over an Adw.ToastOverlay.`,controls:[{name:`title`,label:`Toast text`,type:K.TEXT,defaultValue:`File moved to Trash`},{name:`timeout`,label:`Timeout (s)`,type:K.NUMBER,min:0,max:10,step:1,defaultValue:3},{name:`hasButton`,label:`Action button`,type:K.BOOLEAN,defaultValue:!0},{name:`buttonLabel`,label:`Button label`,type:K.TEXT,defaultValue:`Undo`}]};var ia=__exportAll({ToastStories:()=>oa,ToastStory:()=>aa}),aa=class ToastStory extends X{_overlay=null;static{o.registerClass({GTypeName:`AdwStorybookToast`},ToastStory)}constructor(){super(X.fromMeta(ToastStory.getMetadata(),`Default`))}static getMetadata(){return{...ra,component:s.Toast.$gtype}}initialize(){let e=new n.Button({label:`Show toast`,halign:n.Align.CENTER,valign:n.Align.CENTER});e.add_css_class(`pill`),e.add_css_class(`suggested-action`),e.connect(`clicked`,()=>this._showToast()),this._overlay=new s.ToastOverlay({child:e,widthRequest:360,heightRequest:220}),this.addContent(this._overlay)}_showToast(){if(!this._overlay)return;let e=new s.Toast({title:this.args.title,timeout:this.args.timeout});this.args.hasButton&&(e.buttonLabel=this.args.buttonLabel),this._overlay.add_toast(e)}updateArgs(e){}};o.type_ensure(aa.$gtype);const oa={stories:[aa]},sa={title:`Layout/Application Window`,description:`Adw.ApplicationWindow — an Adw.Window that belongs to a GtkApplication, plus that application’s menubar.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Text Editor`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`notes.md`},{name:`showMenubar`,label:`Show menubar`,type:K.BOOLEAN,defaultValue:!0}]};var ca=__exportAll({ApplicationWindowStories:()=>ua,ApplicationWindowStory:()=>la}),la=class ApplicationWindowStory extends X{_window=null;_title=null;_toolbarView=null;_menubar=null;static{o.registerClass({GTypeName:`AdwStorybookApplicationWindow`},ApplicationWindowStory)}constructor(){super(X.fromMeta(ApplicationWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...sa,component:s.ApplicationWindow.$gtype}}initialize(){this._title=new s.WindowTitle({title:this.args.title,subtitle:this.args.subtitle});let e=new s.HeaderBar({titleWidget:this._title,widthRequest:460}),t=new n.Button({iconName:`go-previous-symbolic`});t.add_css_class(`flat`),e.pack_start(t),this._toolbarView=new s.ToolbarView,this._toolbarView.add_top_bar(e),this._toolbarView.content=new s.StatusPage({title:`Your Library`,description:`Content sits between the toolbars and scrolls independently of them.`});let i=new r.Menu,o=new r.Menu;o.append(`New Window`,`app.new-window`),o.append(`Quit`,`app.quit`),i.append_section(null,o);let c=new r.Menu;c.append(`Keyboard Shortcuts`,`app.shortcuts`),c.append(`About`,`app.about`),i.append_section(null,c),this._menubar=new n.PopoverMenuBar({menu_model:i}),this.args.showMenubar&&this._toolbarView.add_top_bar(this._menubar),this._window=new s.ApplicationWindow({content:this._toolbarView,show_menubar:this.args.showMenubar}),this._window.set_default_size(460,260),this.addContent(this._window)}updateArgs(e){if(!this._title||!this._window||!this._toolbarView||!this._menubar)return;this._title.title=this.args.title,this._title.subtitle=this.args.subtitle,this._window.show_menubar=this.args.showMenubar;let t=this.args.showMenubar;t&&this._menubar.get_parent()===null&&this._toolbarView.add_top_bar(this._menubar),!t&&this._menubar.get_parent()!==null&&this._toolbarView.remove(this._menubar)}};o.type_ensure(la.$gtype);const ua={stories:[la]},da={title:`Layout/Aspect Frame`,description:`Gtk.AspectFrame — one child, given a width/height ratio and a place in the space left over. obey-child is TRUE by default and takes the ratio from the child itself, so the story starts with it FALSE or the ratio control would be inert.`,controls:[{name:`ratio`,label:`Ratio`,type:K.RANGE,min:.5,max:3,step:.25,defaultValue:2},{name:`xalign`,label:`Xalign`,type:K.RANGE,min:0,max:1,step:.5,defaultValue:.5},{name:`yalign`,label:`Yalign`,type:K.RANGE,min:0,max:1,step:.5,defaultValue:.5},{name:`obeyChild`,label:`Obey child`,type:K.BOOLEAN,defaultValue:!1}]};var fa=__exportAll({AspectFrameStories:()=>ma,AspectFrameStory:()=>pa}),pa=class AspectFrameStory extends X{_frame=null;static{o.registerClass({GTypeName:`AdwStorybookAspectFrame`},AspectFrameStory)}constructor(){super(X.fromMeta(AspectFrameStory.getMetadata(),`Default`))}static getMetadata(){return{...da,component:n.AspectFrame.$gtype}}initialize(){this._frame=new n.AspectFrame({hexpand:!0,valign:n.Align.CENTER,width_request:320,height_request:180});let e=new n.Label({label:`The frame gives this child the ratio above, and puts it where xalign and yalign say.`});e.set_margin_top(12),e.set_margin_bottom(12),e.set_margin_start(12),e.set_margin_end(12),e.set_vexpand(!0),this._frame.set_child(e),this._apply(),this.addContent(this._frame)}updateArgs(e){this._apply()}_apply(){this._frame&&(this._frame.ratio=this.args.ratio,this._frame.xalign=this.args.xalign,this._frame.yalign=this.args.yalign,this._frame.obeyChild=this.args.obeyChild)}};o.type_ensure(pa.$gtype);const ma={stories:[pa]},ha={title:`Layout/Bin`,description:`Adw.Bin — a widget with exactly one child. It draws nothing of its own and gives the child its whole allocation; setting a new child replaces the old one.`,controls:[{name:`label`,label:`Child label`,type:K.TEXT,defaultValue:`The one child of this bin.`},{name:`swap`,label:`Replace the child`,type:K.BOOLEAN,defaultValue:!1}]};var ga=__exportAll({BinStories:()=>va,BinStory:()=>_a}),_a=class BinStory extends X{_bin=null;static{o.registerClass({GTypeName:`AdwStorybookBin`},BinStory)}constructor(){super(X.fromMeta(BinStory.getMetadata(),`Default`))}static getMetadata(){return{...ha,component:s.Bin.$gtype}}initialize(){this._bin=new s.Bin({widthRequest:320}),this._apply(),this.addContent(this._bin)}updateArgs(e){this._apply()}_apply(){if(!this._bin)return;let e=this.args.swap,t=new n.Label({label:e?`The first child was replaced, not stacked.`:this.args.label,wrap:!0,marginTop:18,marginBottom:18,marginStart:18,marginEnd:18}),r=new n.Box;r.add_css_class(`card`),r.append(t),this._bin.child=r}};o.type_ensure(_a.$gtype);const va={stories:[_a]},ya={title:`Layout/Breakpoint Bin`,description:`Adw.BreakpointBin gives breakpoints a home without a window: its one child rearranges itself at a size threshold, and the bin applies the LAST breakpoint whose condition holds. Resize the stage to see it.`,controls:[{name:`condition`,label:`Condition`,type:K.SELECT,options:[{label:`max-width: 480px`,value:`max-width: 480px`},{label:`max-width: 320px`,value:`max-width: 320px`},{label:`max-height: 200px`,value:`max-height: 200px`}],defaultValue:`max-width: 480px`},{name:`narrowLabel`,label:`Narrow label`,type:K.TEXT,defaultValue:`Narrow`},{name:`wideLabel`,label:`Wide label`,type:K.TEXT,defaultValue:`Wide`}]};var ba=__exportAll({BreakpointBinStories:()=>Sa,BreakpointBinStory:()=>xa}),xa=class BreakpointBinStory extends X{_bin=null;_label=null;_breakpoint=null;static{o.registerClass({GTypeName:`AdwStorybookBreakpointBin`},BreakpointBinStory)}constructor(){super(X.fromMeta(BreakpointBinStory.getMetadata(),`Default`))}static getMetadata(){return{...ya,component:s.BreakpointBin.$gtype}}initialize(){this._label=new n.Label({label:this.args.wideLabel,ellipsize:3}),this._label.add_css_class(`title-1`),this._bin=new s.BreakpointBin,this._bin.set_size_request(150,60),this._bin.set_child(this._label),this._apply(),this.addContent(this._bin)}updateArgs(e){this._apply()}_apply(){if(!this._bin||!this._label)return;let e=s.BreakpointCondition.parse(this.args.condition);e!==null&&(this._breakpoint!==null&&this._bin.remove_breakpoint(this._breakpoint),this._breakpoint=s.Breakpoint.new(e),this._breakpoint.add_setter(this._label,`label`,this.args.narrowLabel),this._bin.add_breakpoint(this._breakpoint),this._label.label=this.args.wideLabel)}};o.type_ensure(xa.$gtype);const Sa={stories:[xa]},Ca={title:`Layout/Center Box`,description:`Gtk.CenterBox — three widgets, pinned to the start, the centre and the end, with the space between them going to whichever child can grow. shrink-center-last decides who gives up space first.`,controls:[{name:`shrinkCenterLast`,label:`Shrink center last`,type:K.BOOLEAN,defaultValue:!0},{name:`baselinePosition`,label:`Baseline position`,type:K.SELECT,options:[{label:`Top`,value:`top`},{label:`Center`,value:`center`},{label:`Bottom`,value:`bottom`}],defaultValue:`center`}]};var wa=__exportAll({CenterBoxStories:()=>Da,CenterBoxStory:()=>Ea});const Ta={top:n.BaselinePosition.TOP,center:n.BaselinePosition.CENTER,bottom:n.BaselinePosition.BOTTOM};var Ea=class CenterBoxStory extends X{_box=null;static{o.registerClass({GTypeName:`AdwStorybookCenterBox`},CenterBoxStory)}constructor(){super(X.fromMeta(CenterBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...Ca,component:n.CenterBox.$gtype}}initialize(){this._box=new n.CenterBox({margin_top:12,margin_bottom:12,margin_start:12,margin_end:12}),this._box.set_start_widget(new n.Label({label:`Start`,hexpand:!1})),this._box.set_center_widget(new n.Label({label:`Centre`,hexpand:!0})),this._box.set_end_widget(new n.Label({label:`End`,hexpand:!1})),this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){this._box&&(this._box.shrinkCenterLast=this.args.shrinkCenterLast,this._box.baselinePosition=Ta[this.args.baselinePosition])}};o.type_ensure(Ea.$gtype);const Da={stories:[Ea]},Oa={title:`Layout/Clamp Scrollable`,description:`Adw.ClampScrollable — a clamp whose child scrolls. The scrollbar stays at the edge of the window while the content is held at a maximum width.`,controls:[{name:`maximumSize`,label:`Maximum size`,type:K.RANGE,min:200,max:600,step:10,defaultValue:400},{name:`tighteningThreshold`,label:`Tightening threshold`,type:K.RANGE,min:100,max:600,step:10,defaultValue:300}]};var ka=__exportAll({ClampScrollableStories:()=>Ma,ClampScrollableStory:()=>ja});const Aa=Array.from({length:24},(e,t)=>`Line ${t+1}: held at the clamp's width while it scrolls.`);var ja=class ClampScrollableStory extends X{_clamp=null;static{o.registerClass({GTypeName:`AdwStorybookClampScrollable`},ClampScrollableStory)}constructor(){super(X.fromMeta(ClampScrollableStory.getMetadata(),`Default`))}static getMetadata(){return{...Oa,component:s.ClampScrollable.$gtype}}initialize(){let e=new n.TextView({editable:!1,cursorVisible:!1,topMargin:12,bottomMargin:12});e.buffer.set_text(Aa.join(`
346
+ `),-1),this._clamp=new s.ClampScrollable({maximumSize:this.args.maximumSize,tighteningThreshold:this.args.tighteningThreshold,child:e});let t=new n.ScrolledWindow({child:this._clamp,widthRequest:640,heightRequest:240});this.addContent(t)}updateArgs(e){this._clamp&&(this._clamp.maximumSize=this.args.maximumSize,this._clamp.tighteningThreshold=this.args.tighteningThreshold)}};o.type_ensure(ja.$gtype);const Ma={stories:[ja]},Na={title:`Layout/Clamp`,description:`Adw.Clamp limits its child to a maximum width and centres it, tightening the layout as space shrinks.`,controls:[{name:`maximumSize`,label:`Maximum size`,type:K.RANGE,min:200,max:600,step:10,defaultValue:400},{name:`tighteningThreshold`,label:`Tightening threshold`,type:K.RANGE,min:100,max:600,step:10,defaultValue:300}]};var Pa=__exportAll({ClampStories:()=>Ia,ClampStory:()=>Fa}),Fa=class ClampStory extends X{_clamp=null;static{o.registerClass({GTypeName:`AdwStorybookClamp`},ClampStory)}constructor(){super(X.fromMeta(ClampStory.getMetadata(),`Default`))}static getMetadata(){return{...Na,component:s.Clamp.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.HORIZONTAL,widthRequest:520});e.add_css_class(`card`);let t=new n.Label({label:`This content is clamped — it stops growing past the maximum size and stays centred.`,wrap:!0,xalign:0,hexpand:!0,marginTop:18,marginBottom:18,marginStart:18,marginEnd:18});e.append(t),this._clamp=new s.Clamp({maximumSize:this.args.maximumSize,tighteningThreshold:this.args.tighteningThreshold,child:e}),this.addContent(this._clamp)}updateArgs(e){this._clamp&&(this._clamp.maximumSize=this.args.maximumSize,this._clamp.tighteningThreshold=this.args.tighteningThreshold)}};o.type_ensure(Fa.$gtype);const Ia={stories:[Fa]},La={title:`Layout/Expander`,description:"Gtk.Expander — a title the user clicks to reveal the child below it. The arrow is its own CSS node and `:checked` is set on THAT node, not on the widget, which is what libadwaita's _expanders.scss keys the glyph swap on. `use-underline` marks a mnemonic with `_`, and Alt+that character activates the expander.",controls:[{name:`expanded`,label:`Expanded`,type:K.BOOLEAN,defaultValue:!1},{name:`useUnderline`,label:`Label marks a mnemonic`,type:K.BOOLEAN,defaultValue:!1},{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`_More options`},{name:`resizeToplevel`,label:`Resize the toplevel`,type:K.BOOLEAN,defaultValue:!1}]};var Ra=__exportAll({ExpanderStories:()=>Ba,ExpanderStory:()=>za}),za=class ExpanderStory extends X{_expander=null;static{o.registerClass({GTypeName:`AdwStorybookExpander`},ExpanderStory)}constructor(){super(X.fromMeta(ExpanderStory.getMetadata(),`Default`))}static getMetadata(){return{...La,component:n.Expander.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:6,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12});for(let t of[`Notifications`,`Sound`,`Network`])e.append(new n.Label({label:t}));this._expander=new n.Expander,this._expander.set_child(e),this._apply(),this.addContent(this._expander)}updateArgs(e){this._apply()}_apply(){this._expander&&(this._expander.use_underline=this.args.useUnderline,this._expander.label=String(this.args.label),this._expander.resize_toplevel=this.args.resizeToplevel,this._expander.expanded=this.args.expanded)}};o.type_ensure(za.$gtype);const Ba={stories:[za]},Va={title:`Layout/Fixed`,description:`Gtk.Fixed — children at pixel positions, which is the whole of its API: it declares no property of its own. The two offsets are the arguments of gtk_fixed_put().`,controls:[{name:`offsetX`,label:`Offset x`,type:K.RANGE,min:0,max:80,step:4,defaultValue:24},{name:`offsetY`,label:`Offset y`,type:K.RANGE,min:0,max:80,step:4,defaultValue:16}]};var Ha=__exportAll({FixedStories:()=>Wa,FixedStory:()=>Ua}),Ua=class FixedStory extends X{_fixed=null;_first=null;_second=null;static{o.registerClass({GTypeName:`AdwStorybookFixed`},FixedStory)}constructor(){super(X.fromMeta(FixedStory.getMetadata(),`Default`))}static getMetadata(){return{...Va,component:n.Fixed.$gtype}}initialize(){this._fixed=new n.Fixed,this._first=new n.Label({label:`at (x, y)`}),this._second=new n.Label({label:`at (x + 96, y + 40)`}),this._fixed.put(this._first,0,0),this._fixed.put(this._second,0,0),this._apply(),this.addContent(this._fixed)}updateArgs(e){this._apply()}_apply(){if(!this._fixed||!this._first||!this._second)return;let e=this.args.offsetX,t=this.args.offsetY;this._fixed.move(this._first,e,t),this._fixed.move(this._second,e+96,t+40)}};o.type_ensure(Ua.$gtype);const Wa={stories:[Ua]},Ga={title:`Layout/Frame`,description:`Gtk.Frame — a 1px border with a label embedded in its top edge. GTK draws the label as its own widget above the child, and label-xalign says where across the frame it sits.`,controls:[{name:`label`,label:`Label`,type:K.TEXT,defaultValue:`Details`},{name:`labelXalign`,label:`Label xalign`,type:K.RANGE,defaultValue:0,min:0,max:1,step:.5}]};var Ka=__exportAll({FrameStories:()=>Ja,FrameStory:()=>qa}),qa=class FrameStory extends X{_frame=null;static{o.registerClass({GTypeName:`AdwStorybookFrame`},FrameStory)}constructor(){super(X.fromMeta(FrameStory.getMetadata(),`Default`))}static getMetadata(){return{...Ga,component:n.Frame.$gtype}}initialize(){this._frame=new n.Frame({halign:n.Align.CENTER});let e=new n.Label({label:`A framed region: the label sits in the top edge of the border.`});e.set_margin_top(12),e.set_margin_bottom(12),e.set_margin_start(12),e.set_margin_end(12),this._frame.set_child(e),this._apply(),this.addContent(this._frame)}updateArgs(e){this._apply()}_apply(){this._frame&&(this._frame.label=this.args.label,this._frame.set_label_align(this.args.labelXalign))}};o.type_ensure(qa.$gtype);const Ja={stories:[qa]},Ya={title:`Layout/Grid`,description:`Gtk.Grid — a table of cells sized by what is in them, filled row by row. The two spacings are the gap between lines, the two homogeneous flags make every line the same, and a vertical grid attaches down the rows instead of across the columns.`,controls:[{name:`columnSpacing`,label:`Column spacing`,type:K.RANGE,min:0,max:36,step:2,defaultValue:12},{name:`rowSpacing`,label:`Row spacing`,type:K.RANGE,min:0,max:36,step:2,defaultValue:12},{name:`columnHomogeneous`,label:`Column homogeneous`,type:K.BOOLEAN,defaultValue:!1},{name:`rowHomogeneous`,label:`Row homogeneous`,type:K.BOOLEAN,defaultValue:!1},{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`}]};var Xa=__exportAll({GridStories:()=>Qa,GridStory:()=>Za}),Za=class GridStory extends X{_grid=null;_cells=[];_orientation=null;static{o.registerClass({GTypeName:`AdwStorybookGrid`},GridStory)}constructor(){super(X.fromMeta(GridStory.getMetadata(),`Default`))}static getMetadata(){return{...Ya,component:n.Grid.$gtype}}initialize(){this._grid=new n.Grid({hexpand:!0,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12});for(let e of[`Name`,`Value`,`Unit`,`editable`]){let t=new n.Label({label:e,hexpand:!0});t.set_margin_top(6),t.set_margin_bottom(6),t.set_margin_start(6),t.set_margin_end(6),this._cells.push(t)}this._attach(),this._apply(),this.addContent(this._grid)}updateArgs(e){this._apply()}_attach(){if(this._grid)for(let e of this._cells)this._grid.attach(e,-1,-1,1,1)}_apply(){if(!this._grid)return;let e=this.args.orientation===`vertical`?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL;if(this._grid.columnSpacing=this.args.columnSpacing,this._grid.rowSpacing=this.args.rowSpacing,this._grid.columnHomogeneous=this.args.columnHomogeneous,this._grid.rowHomogeneous=this.args.rowHomogeneous,this._orientation!==null&&this._orientation!==e){for(let e of this._cells)this._grid.remove(e);this._attach()}this._grid.orientation=e,this._orientation=e}};o.type_ensure(Za.$gtype);const Qa={stories:[Za]},$a={title:`Layout/Header Bar`,description:`Adw.HeaderBar hosts a custom title widget with start and end controls — the standard top chrome of an Adwaita window.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Text Editor`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`notes.md`},{name:`showTitle`,label:`Show title`,type:K.BOOLEAN,defaultValue:!0}]};var eo=__exportAll({HeaderBarStories:()=>no,HeaderBarStory:()=>to}),to=class HeaderBarStory extends X{_headerBar=null;_title=null;static{o.registerClass({GTypeName:`AdwStorybookHeaderBar`},HeaderBarStory)}constructor(){super(X.fromMeta(HeaderBarStory.getMetadata(),`Default`))}static getMetadata(){return{...$a,component:s.HeaderBar.$gtype}}initialize(){this._title=new s.WindowTitle({title:this.args.title,subtitle:this.args.subtitle}),this._headerBar=new s.HeaderBar({titleWidget:this._title,showTitle:this.args.showTitle,widthRequest:460});let e=new n.Button({iconName:`go-previous-symbolic`});e.add_css_class(`flat`),this._headerBar.pack_start(e);let t=new r.Menu;t.append(`New Window`,`app.new-window`),t.append(`Preferences`,`app.preferences`),t.append(`About`,`app.about`);let i=new n.MenuButton({iconName:`open-menu-symbolic`,menuModel:t});i.add_css_class(`flat`),this._headerBar.pack_end(i),this.addContent(this._headerBar)}updateArgs(e){!this._headerBar||!this._title||(this._title.title=this.args.title,this._title.subtitle=this.args.subtitle,this._headerBar.showTitle=this.args.showTitle)}};o.type_ensure(to.$gtype);const no={stories:[to]},ro={title:`Layout/Layout Slot`,description:`Adw.LayoutSlot is the named hole a layout of an Adw.MultiLayoutView leaves for a child: it takes the child whose id matches, and its visible property follows that child's. On its own it is a bin, which is what this story shows.`,controls:[{name:`label`,label:`Child title`,type:K.TEXT,defaultValue:`Inbox`},{name:`visible`,label:`Child visible`,type:K.BOOLEAN,defaultValue:!0}]};var io=__exportAll({LayoutSlotStories:()=>oo,LayoutSlotStory:()=>ao}),ao=class LayoutSlotStory extends X{_view=null;_slot=null;_child=null;static{o.registerClass({GTypeName:`AdwStorybookLayoutSlot`},LayoutSlotStory)}constructor(){super(X.fromMeta(LayoutSlotStory.getMetadata(),`Default`))}static getMetadata(){return{...ro,component:s.LayoutSlot.$gtype}}initialize(){this._slot=s.LayoutSlot.new(`primary`),this._child=new s.NavigationPage({title:this.args.label,tag:`primary`,child:new n.Label({label:`The child the view inserted here.`})}),this._view=new s.MultiLayoutView;let e=s.Layout.new(this._slot);e.name=`only`,this._view.add_layout(e),this._view.set_child(`primary`,this._child),this._apply(),this.addContent(this._view)}updateArgs(e){this._apply()}_apply(){this._child&&(this._child.title=this.args.label,this._child.visible=this.args.visible)}};o.type_ensure(ao.$gtype);const oo={stories:[ao]},so={title:`Layout/Multi Layout View`,description:`Adw.MultiLayoutView holds one set of children and several arrangements of them: each child has an id, each layout has slots with ids, and switching layouts re-inserts every child into the slot of the SAME id.`,controls:[{name:`layoutName`,label:`Layout`,type:K.SELECT,options:[{label:`wide (split)`,value:`wide`},{label:`narrow (stacked)`,value:`narrow`}],defaultValue:`wide`},{name:`showDetails`,label:`Show the details pane`,type:K.BOOLEAN,defaultValue:!0}]};var co=__exportAll({MultiLayoutViewStories:()=>po,MultiLayoutViewStory:()=>fo});const lo=`primary`,uo=`secondary`;function page(e){let t=new n.ListBox({selectionMode:n.SelectionMode.NONE});for(let[n,r]of e)t.append(new s.ActionRow({title:n,subtitle:r}));return t}function slotPage(e){return new s.NavigationPage({title:e,child:s.LayoutSlot.new(e),tag:e})}function arrangement(e){let t=new s.NavigationSplitView({collapsed:e,minSidebarWidth:160});return t.sidebar=slotPage(uo),t.content=slotPage(lo),t.set_size_request(420,220),t}var fo=class MultiLayoutViewStory extends X{_view=null;_details=null;static{o.registerClass({GTypeName:`AdwStorybookMultiLayoutView`},MultiLayoutViewStory)}constructor(){super(X.fromMeta(MultiLayoutViewStory.getMetadata(),`Default`))}static getMetadata(){return{...so,component:s.MultiLayoutView.$gtype}}initialize(){this._details=page([[`From`,`Adwaita List`],[`Subject`,`Resizing the window`]]),this._view=new s.MultiLayoutView;let e=s.Layout.new(arrangement(!1));e.name=`wide`,this._view.add_layout(e);let t=s.Layout.new(arrangement(!0));t.name=`narrow`,this._view.add_layout(t),this._view.set_child(lo,page([[`General`,`12 unread`],[`Starred`,`3 threads`]])),this._view.set_child(uo,this._details),this._apply(),this.addContent(this._view)}updateArgs(e){this._apply()}_apply(){!this._view||!this._details||(this._details.visible=this.args.showDetails,this._view.layout_name=this.args.layoutName)}};o.type_ensure(fo.$gtype);const po={stories:[fo]},mo={title:`Layout/Overlay`,description:`Gtk.Overlay — widgets stacked on top of one main child. The main child sizes the overlay; every other child is placed by its own halign/valign, which is what gtk_overlay_get_child_position reads and nothing else. Libadwaita ships no Adw.Overlay and gives the node no rule of its own — the .left/.right/.top/.bottom classes it puts on an edge-aligned child are the whole published contract.`,controls:[{name:`halign`,label:`Overlay halign`,type:K.SELECT,options:[{label:`Fill (the default)`,value:`fill`},{label:`Start`,value:`start`},{label:`Center`,value:`center`},{label:`End`,value:`end`}],defaultValue:`end`},{name:`valign`,label:`Overlay valign`,type:K.SELECT,options:[{label:`Fill (the default)`,value:`fill`},{label:`Start`,value:`start`},{label:`Center`,value:`center`},{label:`End`,value:`end`}],defaultValue:`end`},{name:`showLabel`,label:`Label the overlay`,type:K.BOOLEAN,defaultValue:!0}]};var ho=__exportAll({OverlayStories:()=>vo,OverlayStory:()=>_o});const go={start:n.Align.START,center:n.Align.CENTER,end:n.Align.END};var _o=class OverlayStory extends X{_overlay=null;_main=null;_badge=null;static{o.registerClass({GTypeName:`AdwStorybookOverlay`},OverlayStory)}constructor(){super(X.fromMeta(OverlayStory.getMetadata(),`Default`))}static getMetadata(){return{...mo,component:n.Overlay.$gtype}}initialize(){this._main=new n.Frame({width_request:260,height_request:160,margin_top:12,margin_bottom:12});let e=new n.Label({label:`Main child — its size is the overlay`});e.add_css_class(`dim-label`),this._main.set_child(e),this._badge=new n.Box({valign:n.Align.END,halign:n.Align.END}),this._badge.set_css_classes([`osd`,`flat`]),this._badge.append(new n.Label({label:`2`})),this._overlay=new n.Overlay,this._overlay.set_child(this._main),this._overlay.add_overlay(this._badge),this._apply(),this.addContent(this._overlay)}updateArgs(e){this._apply()}_apply(){if(!this._badge)return;let e=go[String(this.args.halign)],t=go[String(this.args.valign)];e===void 0?this._badge.halign=n.Align.FILL:this._badge.halign=e,t===void 0?this._badge.valign=n.Align.FILL:this._badge.valign=t,this._badge.visible=this.args.showLabel}};o.type_ensure(_o.$gtype);const vo={stories:[_o]},yo={title:`Layout/Paned`,description:"Gtk.Paned — two children either side of a divider the user drags. With both children resizable and no position set, GTK divides the paned in PROPORTION TO THE TWO SIZE REQUESTS rather than in half, and it draws the divider as the `separator` node a GtkPanedHandle carries. Libadwaita styles that node in _paned.scss: 1px, 5px when `wide-handle`, with the rule as an inset shadow rather than a fill.",controls:[{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`wideHandle`,label:`Wide handle`,type:K.BOOLEAN,defaultValue:!1},{name:`resizeStartChild`,label:`Resize the first child`,type:K.BOOLEAN,defaultValue:!0},{name:`resizeEndChild`,label:`Resize the second child`,type:K.BOOLEAN,defaultValue:!0},{name:`shrinkStartChild`,label:`The first child may shrink`,type:K.BOOLEAN,defaultValue:!0},{name:`position`,label:`Position (0 = derive)`,type:K.NUMBER,min:-1,max:400,step:1,defaultValue:-1}]};var bo=__exportAll({PanedStories:()=>So,PanedStory:()=>xo});function pane(e,t){let r=new n.Box({orientation:n.Orientation.VERTICAL,spacing:4,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12});r.append(new n.Label({label:e}));let i=new n.Label({label:`${t}px of size request`});return i.add_css_class(`dim-label`),r.append(i),r}var xo=class PanedStory extends X{_paned=null;static{o.registerClass({GTypeName:`AdwStorybookPaned`},PanedStory)}constructor(){super(X.fromMeta(PanedStory.getMetadata(),`Default`))}static getMetadata(){return{...yo,component:n.Paned.$gtype}}initialize(){this._paned=new n.Paned({orientation:n.Orientation.HORIZONTAL}),this._paned.set_start_child(pane(`First child`,100)),this._paned.set_end_child(pane(`Second child`,300)),this._paned.set_size_request(400,140),this._apply(),this.addContent(this._paned)}updateArgs(e){this._apply()}_apply(){this._paned&&(this._paned.orientation=this.args.orientation===`vertical`?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL,this._paned.wide_handle=this.args.wideHandle,this._paned.resize_start_child=this.args.resizeStartChild,this._paned.resize_end_child=this.args.resizeEndChild,this._paned.shrink_start_child=this.args.shrinkStartChild,this._paned.position=Number(this.args.position))}};o.type_ensure(xo.$gtype);const So={stories:[xo]},Co=[{label:`Cut`},{label:`Copy`},{label:`Paste`},{label:`Delete`,accel:`<Shift>Delete`}],wo={title:`Layout/Popover Bin`,description:'Gtk.PopoverBin — GTK 4.22’s one-child container with a popover, for the place where "any part of this window can offer a menu" is the answer. `menu-model` builds the popover for you, and `handle-input` is what turns a right click or a long press into a popup — a plain click still reaches the child.',controls:[{name:`handleInput`,label:`Right click / long press opens`,type:K.BOOLEAN,defaultValue:!0}]};var To=__exportAll({PopoverBinStories:()=>Do,PopoverBinStory:()=>Eo}),Eo=class PopoverBinStory extends X{_bin=null;_list=null;static{o.registerClass({GTypeName:`AdwStorybookPopoverBin`},PopoverBinStory)}constructor(){super(X.fromMeta(PopoverBinStory.getMetadata(),`Default`))}static getMetadata(){return{...wo,component:n.PopoverBin.$gtype}}initialize(){this._list=new n.ListBox({selectionMode:n.SelectionMode.SINGLE});for(let e of[`Documents`,`Downloads`,`Pictures`])this._list.append(new n.ListBoxRow({child:new n.Label({label:e})}));this._bin=new n.PopoverBin({child:this._list}),this._apply(),this.addContent(this._bin)}updateArgs(e){this._apply()}_buildMenu(){let e=new r.Menu;for(let t of Co)e.append(t.label,`app.${t.label.toLowerCase().replace(/[^a-z0-9]+/g,`-`)}`);return e}_apply(){this._bin&&(this._bin.menuModel=this._buildMenu(),this._bin.handleInput=this.args.handleInput)}};o.type_ensure(Eo.$gtype);const Do={stories:[Eo]},Oo=[{label:`New Window`,accel:`<Control>N`},{section:[{label:`Cut`},{label:`Copy`},{label:`Paste`}],label:`Edit`},{label:`Open With`,submenu:[{label:`Text Editor`},{label:`Web Browser`},{label:`Terminal`}]}],ko={title:`Layout/Popover Menu`,description:"Gtk.PopoverMenu — a Gtk.Popover whose contents are a menu model instead of a child widget. A submenu swaps the page of the ONE surface rather than opening a second popup beside it, which is why the open page is a named one (`visible-submenu`).",controls:[{name:`menuTitle`,label:`Heading`,type:K.TEXT,defaultValue:`Document`},{name:`position`,label:`Position`,type:K.SELECT,options:[{label:`Bottom`,value:`bottom`},{label:`Top`,value:`top`},{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`bottom`},{name:`align`,label:`Align`,type:K.SELECT,options:[{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`start`},{name:`autohide`,label:`Dismiss on outside click`,type:K.BOOLEAN,defaultValue:!0}]};var Ao=__exportAll({PopoverMenuStories:()=>Mo,PopoverMenuStory:()=>jo});const actionOf=e=>`app.${e.toLowerCase().replace(/[^a-z0-9]+/g,`-`)}`;var jo=class PopoverMenuStory extends X{_anchor=null;_popover=null;static{o.registerClass({GTypeName:`AdwStorybookPopoverMenu`},PopoverMenuStory)}constructor(){super(X.fromMeta(PopoverMenuStory.getMetadata(),`Default`))}static getMetadata(){return{...ko,component:n.PopoverMenu.$gtype}}initialize(){this._anchor=new n.Button({label:`Open menu`,halign:n.Align.CENTER}),this._apply(),this.addContent(this._anchor)}updateArgs(e){this._apply()}_buildMenu(e){let t=new r.Menu,n=[];for(let e of Oo){if(`submenu`in e){let n=new r.Menu;for(let t of e.submenu)n.append(t.label,actionOf(t.label));t.append_submenu(e.label,n);continue}if(`section`in e){let n=new r.Menu;for(let t of e.section)n.append(t.label,actionOf(t.label));t.append_section(`Edit`,n);continue}n.push(e.label)}if(e.length>0){let i=new r.Menu;for(let e of n)i.append(e,actionOf(e));t.append_section(e,i)}else for(let e of n)t.append(e,actionOf(e));return t}_apply(){if(!this._anchor)return;let e=this._popover;this._popover=n.PopoverMenu.new_from_model(this._buildMenu(this.args.menuTitle)),this._popover.set_parent(this._anchor),e?.unparent();let t={bottom:n.PositionType.BOTTOM,top:n.PositionType.TOP,start:n.PositionType.LEFT,end:n.PositionType.RIGHT};this._popover.position=t[this.args.position]??n.PositionType.BOTTOM,this._anchor&&(this._anchor.halign=this.args.align===`end`?n.Align.END:n.Align.START),this._popover.autohide=this.args.autohide}};o.type_ensure(jo.$gtype);const Mo={stories:[jo]},No={title:`Layout/Popover`,description:"Gtk.Popover — the bubble-like surface. No model and no menu: it holds whatever widget you put in it, and everything here is about WHERE it appears and WHEN it goes away. `autohide` off is entry completion: the list follows the typing and the caret never leaves.",controls:[{name:`position`,label:`Position`,type:K.SELECT,options:[{label:`Bottom`,value:`bottom`},{label:`Top`,value:`top`},{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`bottom`},{name:`align`,label:`Align`,type:K.SELECT,options:[{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`start`},{name:`autohide`,label:`Dismiss on outside click`,type:K.BOOLEAN,defaultValue:!0}]};var Po=__exportAll({PopoverStories:()=>Io,PopoverStory:()=>Fo}),Fo=class PopoverStory extends X{_anchor=null;_popover=null;static{o.registerClass({GTypeName:`AdwStorybookPopover`},PopoverStory)}constructor(){super(X.fromMeta(PopoverStory.getMetadata(),`Default`))}static getMetadata(){return{...No,component:n.Popover.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:6});e.append(new n.Label({label:`Anything you like`})),e.append(new n.Label({label:`in here`})),this._anchor=new n.Button({label:`Show popover`,halign:n.Align.CENTER}),this._popover=new n.Popover({child:e}),this._popover.set_parent(this._anchor),this._apply(),this.addContent(this._anchor)}updateArgs(e){this._apply()}_apply(){if(!this._popover)return;let e={bottom:n.PositionType.BOTTOM,top:n.PositionType.TOP,start:n.PositionType.LEFT,end:n.PositionType.RIGHT};this._popover.position=e[this.args.position]??n.PositionType.BOTTOM,this._anchor&&(this._anchor.halign=this.args.align===`end`?n.Align.END:n.Align.START),this._popover.autohide=this.args.autohide}};o.type_ensure(Fo.$gtype);const Io={stories:[Fo]},Lo={title:`Layout/Revealer`,description:`Gtk.Revealer — shows and hides its child with an animation. The transition is one of fourteen nicks and it is not only an opacity change: a slide scales the box along one axis while allocating the child at its UNSCALED size, and a swing folds it in with sin (π · pos / 2). Libadwaita styles no revealer node of its own, so everything here is GTK behaviour the browser element ports.`,controls:[{name:`transitionType`,label:`Transition`,type:K.SELECT,options:[{label:`Slide down (the default)`,value:`slide-down`},{label:`Slide up`,value:`slide-up`},{label:`Slide left`,value:`slide-left`},{label:`Slide right`,value:`slide-right`},{label:`Crossfade`,value:`crossfade`},{label:`Fade + slide down`,value:`fade-slide-down`},{label:`Swing down (fold)`,value:`swing-down`},{label:`Swing right (fold)`,value:`swing-right`},{label:`None`,value:`none`}],defaultValue:`slide-down`},{name:`transitionDuration`,label:`Duration (ms)`,type:K.RANGE,min:0,max:800,step:50,defaultValue:250},{name:`revealChild`,label:`Reveal`,type:K.BOOLEAN,defaultValue:!0}]};var Ro=__exportAll({RevealerStories:()=>Vo,RevealerStory:()=>Bo});const zo={none:n.RevealerTransitionType.NONE,crossfade:n.RevealerTransitionType.CROSSFADE,"slide-right":n.RevealerTransitionType.SLIDE_RIGHT,"slide-left":n.RevealerTransitionType.SLIDE_LEFT,"slide-up":n.RevealerTransitionType.SLIDE_UP,"slide-down":n.RevealerTransitionType.SLIDE_DOWN,"swing-right":n.RevealerTransitionType.SWING_RIGHT,"swing-left":n.RevealerTransitionType.SWING_LEFT,"swing-up":n.RevealerTransitionType.SWING_UP,"swing-down":n.RevealerTransitionType.SWING_DOWN,"fade-slide-right":n.RevealerTransitionType.FADE_SLIDE_RIGHT,"fade-slide-left":n.RevealerTransitionType.FADE_SLIDE_LEFT,"fade-slide-up":n.RevealerTransitionType.FADE_SLIDE_UP,"fade-slide-down":n.RevealerTransitionType.FADE_SLIDE_DOWN};var Bo=class RevealerStory extends X{_revealer=null;static{o.registerClass({GTypeName:`AdwStorybookRevealer`},RevealerStory)}constructor(){super(X.fromMeta(RevealerStory.getMetadata(),`Default`))}static getMetadata(){return{...Lo,component:n.Revealer.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:6,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12});e.append(new n.Label({label:`The revealed child`}));let t=new n.Label({label:`Drag the controls to change the transition`});t.add_css_class(`dim-label`),e.append(t),this._revealer=new n.Revealer,this._revealer.set_child(e),this._apply(),this.addContent(this._revealer)}updateArgs(e){this._apply()}_apply(){this._revealer&&(this._revealer.transition_type=zo[String(this.args.transitionType)],this._revealer.transition_duration=Number(this.args.transitionDuration),this._revealer.reveal_child=this.args.revealChild)}};o.type_ensure(Bo.$gtype);const Vo={stories:[Bo]},Ho={title:`Layout/Scrollbar`,description:`Gtk.Scrollbar — a trough and a slider, positioned by a GtkAdjustment. The slider is page_size over the whole range long and sits at the position over the SCROLLABLE range, which is why the two numbers it is made of do not share a denominator.`,controls:[{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`vertical`},{name:`upper`,label:`Adjustment upper`,type:K.NUMBER,defaultValue:400},{name:`pageSize`,label:`Adjustment page size`,type:K.NUMBER,defaultValue:120},{name:`value`,label:`Adjustment value`,type:K.NUMBER,defaultValue:80}]};var Uo=__exportAll({ScrollbarStories:()=>Go,ScrollbarStory:()=>Wo}),Wo=class ScrollbarStory extends X{_scrollbar=null;static{o.registerClass({GTypeName:`AdwStorybookScrollbar`},ScrollbarStory)}constructor(){super(X.fromMeta(ScrollbarStory.getMetadata(),`Default`))}static getMetadata(){return{...Ho,component:n.Scrollbar.$gtype}}initialize(){this._scrollbar=new n.Scrollbar({adjustment:new n.Adjustment({step_increment:10,page_increment:80})}),this._apply(),this.addContent(this._scrollbar)}updateArgs(e){this._apply()}_apply(){let e=this._scrollbar;if(!e)return;e.orientation=this.args.orientation===`horizontal`?n.Orientation.HORIZONTAL:n.Orientation.VERTICAL;let t=e.get_adjustment();t&&t.configure(Number(this.args.value),0,Number(this.args.upper),t.step_increment,t.page_increment,Number(this.args.pageSize))}};o.type_ensure(Wo.$gtype);const Go={stories:[Wo]},Ko={title:`Layout/ScrolledWindow`,description:`Gtk.ScrolledWindow — one child, two adjustments, and a scrollbar per edge that can actually scroll. The policies decide whether a bar appears, window-placement which edge it takes, and overlay-scrolling turns the bars into the auto-hiding indicators GNOME draws over the content.`,controls:[{name:`hPolicy`,label:`Horizontal policy`,type:K.SELECT,options:[{label:`Automatic`,value:`automatic`},{label:`Always`,value:`always`},{label:`Never`,value:`never`}],defaultValue:`automatic`},{name:`vPolicy`,label:`Vertical policy`,type:K.SELECT,options:[{label:`Automatic`,value:`automatic`},{label:`Always`,value:`always`},{label:`Never`,value:`never`}],defaultValue:`automatic`},{name:`placement`,label:`Window placement`,type:K.SELECT,options:[{label:`Top left`,value:`top-left`},{label:`Top right`,value:`top-right`},{label:`Bottom left`,value:`bottom-left`},{label:`Bottom right`,value:`bottom-right`}],defaultValue:`top-left`},{name:`frame`,label:`Frame`,type:K.BOOLEAN,defaultValue:!1},{name:`overlayScrolling`,label:`Overlay scrolling`,type:K.BOOLEAN,defaultValue:!0}]};var qo=__exportAll({ScrolledWindowStories:()=>Zo,ScrolledWindowStory:()=>Xo});const Jo={automatic:n.PolicyType.AUTOMATIC,always:n.PolicyType.ALWAYS,never:n.PolicyType.NEVER},Yo={"top-left":n.CornerType.TOP_LEFT,"top-right":n.CornerType.TOP_RIGHT,"bottom-left":n.CornerType.BOTTOM_LEFT,"bottom-right":n.CornerType.BOTTOM_RIGHT};var Xo=class ScrolledWindowStory extends X{_window=null;static{o.registerClass({GTypeName:`AdwStorybookScrolledWindow`},ScrolledWindowStory)}constructor(){super(X.fromMeta(ScrolledWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...Ko,component:n.ScrolledWindow.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:8});for(let t=1;t<=16;t++)e.append(new n.Label({label:`Row ${t}`}));this._window=new n.ScrolledWindow({child:e,min_content_height:240,halign:n.Align.CENTER}),this._apply(),this.addContent(this._window)}updateArgs(e){this._apply()}_apply(){let e=this._window;e&&(e.set_policy(Jo[this.args.hPolicy]??n.PolicyType.AUTOMATIC,Jo[this.args.vPolicy]??n.PolicyType.AUTOMATIC),e.set_placement(Yo[this.args.placement]??n.CornerType.TOP_LEFT),e.has_frame=this.args.frame,e.set_overlay_scrolling(this.args.overlayScrolling))}};o.type_ensure(Xo.$gtype);const Zo={stories:[Xo]},Qo={title:`Layout/Separator`,description:`Gtk.Separator — a one-pixel rule between two groups of widgets. Libadwaita ships no Adw.Separator; it only styles the GTK one, and the .spacer style class turns the rule into an empty 12px gap.`,controls:[{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`spacer`,label:`Spacer (draws nothing)`,type:K.BOOLEAN,defaultValue:!1}]};var $o=__exportAll({SeparatorStories:()=>ts,SeparatorStory:()=>es}),es=class SeparatorStory extends X{_box=null;_separator=null;static{o.registerClass({GTypeName:`AdwStorybookSeparator`},SeparatorStory)}constructor(){super(X.fromMeta(SeparatorStory.getMetadata(),`Default`))}static getMetadata(){return{...Qo,component:n.Separator.$gtype}}initialize(){this._separator=new n.Separator,this._box=new n.Box({spacing:12,halign:n.Align.CENTER}),this._box.append(new n.Label({label:`Above`})),this._box.append(this._separator),this._box.append(new n.Label({label:`Below`})),this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){if(!this._box||!this._separator)return;let e=this.args.orientation===`vertical`;this._separator.orientation=e?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL,this._box.orientation=e?n.Orientation.HORIZONTAL:n.Orientation.VERTICAL,this.args.spacer?this._separator.add_css_class(`spacer`):this._separator.remove_css_class(`spacer`)}};o.type_ensure(es.$gtype);const ts={stories:[es]},ns={title:`Layout/Toolbar View`,description:`Adw.ToolbarView pins a top header bar and a bottom toolbar around its content, each independently revealable.`,controls:[{name:`revealTopBars`,label:`Reveal top bars`,type:K.BOOLEAN,defaultValue:!0},{name:`revealBottomBars`,label:`Reveal bottom bars`,type:K.BOOLEAN,defaultValue:!0}]};var rs=__exportAll({ToolbarViewStories:()=>as,ToolbarViewStory:()=>is}),is=class ToolbarViewStory extends X{_view=null;static{o.registerClass({GTypeName:`AdwStorybookToolbarView`},ToolbarViewStory)}constructor(){super(X.fromMeta(ToolbarViewStory.getMetadata(),`Default`))}static getMetadata(){return{...ns,component:s.ToolbarView.$gtype}}initialize(){this._view=new s.ToolbarView({widthRequest:460,heightRequest:320,revealTopBars:this.args.revealTopBars,revealBottomBars:this.args.revealBottomBars});let e=new s.HeaderBar({titleWidget:new s.WindowTitle({title:`Documents`,subtitle:`12 items`})});this._view.add_top_bar(e);let t=new s.StatusPage({iconName:`folder-documents-symbolic`,title:`Your library`,description:`Content sits between the toolbars and scrolls independently of them.`});this._view.content=t;let r=new n.ActionBar,i=new n.Button({iconName:`list-add-symbolic`});i.add_css_class(`flat`);let o=new n.Button({iconName:`list-remove-symbolic`});o.add_css_class(`flat`),r.pack_start(i),r.pack_start(o),r.set_center_widget(new n.Label({label:`Selection: none`}));let c=new n.Button({iconName:`send-to-symbolic`});c.add_css_class(`flat`),r.pack_end(c),this._view.add_bottom_bar(r),this.addContent(this._view)}updateArgs(e){this._view&&(this._view.revealTopBars=this.args.revealTopBars,this._view.revealBottomBars=this.args.revealBottomBars)}};o.type_ensure(is.$gtype);const as={stories:[is]},os={title:`Layout/Viewport`,description:`Gtk.Viewport — scrollability for a widget that has none of its own. It has one property, scroll-to-focus: whether a widget that takes the focus is scrolled into view. It is also what a Gtk.ScrolledWindow puts its child in.`,controls:[{name:`scrollToFocus`,label:`Scroll to focus`,type:K.BOOLEAN,defaultValue:!0}]};var ss=__exportAll({ViewportStories:()=>ls,ViewportStory:()=>cs}),cs=class ViewportStory extends X{_viewport=null;static{o.registerClass({GTypeName:`AdwStorybookViewport`},ViewportStory)}constructor(){super(X.fromMeta(ViewportStory.getMetadata(),`Default`))}static getMetadata(){return{...os,component:n.Viewport.$gtype}}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:8});for(let t=1;t<=16;t++)e.append(new n.Label({label:`Row ${t}`}));e.append(new n.Button({label:`Focus me`,halign:n.Align.START})),this._viewport=new n.Viewport({child:e,halign:n.Align.CENTER}),this._apply(),this.addContent(this._viewport)}updateArgs(e){this._apply()}_apply(){this._viewport&&this._viewport.set_scroll_to_focus(this.args.scrollToFocus)}};o.type_ensure(cs.$gtype);const ls={stories:[cs]},us={title:`Layout/Window`,description:`Adw.Window — a freeform window with no titlebar area. Use Adw.ToolbarView with Adw.HeaderBar for the top chrome.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Text Editor`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`notes.md`}]};var ds=__exportAll({WindowStories:()=>ps,WindowStory:()=>fs}),fs=class WindowStory extends X{_window=null;_title=null;static{o.registerClass({GTypeName:`AdwStorybookWindow`},WindowStory)}constructor(){super(X.fromMeta(WindowStory.getMetadata(),`Default`))}static getMetadata(){return{...us,component:s.Window.$gtype}}initialize(){this._title=new s.WindowTitle({title:this.args.title,subtitle:this.args.subtitle});let e=new s.HeaderBar({titleWidget:this._title,widthRequest:460}),t=new n.Button({iconName:`go-previous-symbolic`});t.add_css_class(`flat`),e.pack_start(t);let r=new n.MenuButton({iconName:`open-menu-symbolic`});r.add_css_class(`flat`),e.pack_end(r);let i=new s.ToolbarView;i.add_top_bar(e),i.content=new s.StatusPage({title:`Your Library`,description:`Content sits between the toolbars and scrolls independently of them.`}),this._window=new s.Window({content:i}),this.addContent(this._window)}updateArgs(e){this._title&&(this._title.title=this.args.title,this._title.subtitle=this.args.subtitle)}};o.type_ensure(fs.$gtype);const ps={stories:[fs]},ms={title:`Layout/Wrap Box`,description:`Adw.WrapBox flows its children horizontally and wraps them onto new lines when they run out of room.`,controls:[{name:`childSpacing`,label:`Child spacing`,type:K.RANGE,min:0,max:36,step:1,defaultValue:8},{name:`lineSpacing`,label:`Line spacing`,type:K.RANGE,min:0,max:36,step:1,defaultValue:8}]};var hs=__exportAll({WrapBoxStories:()=>_s,WrapBoxStory:()=>gs}),gs=class WrapBoxStory extends X{_wrap=null;static{o.registerClass({GTypeName:`AdwStorybookWrapBox`},WrapBoxStory)}constructor(){super(X.fromMeta(WrapBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...ms,component:s.WrapBox.$gtype}}initialize(){this._wrap=new s.WrapBox({childSpacing:this.args.childSpacing,lineSpacing:this.args.lineSpacing,widthRequest:460});for(let e of[`Design`,`Adwaita`,`GNOME`,`GTK`,`TypeScript`,`Storybook`,`Wrapping`,`Layout`]){let t=new n.Button({label:e});t.add_css_class(`pill`),this._wrap.append(t)}this.addContent(this._wrap)}updateArgs(e){this._wrap&&(this._wrap.childSpacing=this.args.childSpacing,this._wrap.lineSpacing=this.args.lineSpacing)}};o.type_ensure(gs.$gtype);const _s={stories:[gs]},vs={title:`Media/Image`,description:`Gtk.Image — a symbolic icon, drawn as a CSS-masked box in the surrounding text colour. It takes a NAME, not a file: a name the icon theme cannot resolve draws the missing-image glyph, which is exactly what GTK draws for it. That is why <gtk-picture> is a separate widget — an icon sized by the theme and an image fitted to a box are two different jobs.`,controls:[{name:`iconName`,label:`Icon name`,type:K.TEXT,defaultValue:`avatar-default-symbolic`},{name:`size`,label:`Size (px)`,type:K.RANGE,min:16,max:96,step:8,defaultValue:48},{name:`disabled`,label:`Disabled`,type:K.BOOLEAN,defaultValue:!1}]};var ys=__exportAll({ImageStories:()=>xs,ImageStory:()=>bs}),bs=class ImageStory extends X{_image=null;static{o.registerClass({GTypeName:`AdwStorybookImage`},ImageStory)}constructor(){super(X.fromMeta(ImageStory.getMetadata(),`Default`))}static getMetadata(){return{...vs,component:n.Image.$gtype}}initialize(){this._image=new n.Image({halign:n.Align.CENTER,valign:n.Align.CENTER}),this._apply(),this.addContent(this._image)}updateArgs(e){this._apply()}_apply(){this._image&&(this._image.icon_size=this.args.size,this._image.icon_name=this.args.iconName,this._image.sensitive=!this.args.disabled)}};o.type_ensure(bs.$gtype);const xs={stories:[bs]},Ss={title:`Media/Inscription`,description:`Gtk.Inscription — text laid out to a size in CHARACTERS and LINES rather than to a size in pixels. It is the widget for text whose extent should be the same everywhere, so it never measures its own content: min-chars/nat-chars and min-lines/nat-lines ARE its size request.`,controls:[{name:`text`,label:`Text`,type:K.TEXT,defaultValue:`Inscription`},{name:`minChars`,label:`Min chars`,type:K.RANGE,min:0,max:40,step:1,defaultValue:3},{name:`natChars`,label:`Nat chars`,type:K.RANGE,min:0,max:40,step:1,defaultValue:0},{name:`minLines`,label:`Min lines`,type:K.RANGE,min:0,max:6,step:1,defaultValue:1},{name:`natLines`,label:`Nat lines`,type:K.RANGE,min:0,max:6,step:1,defaultValue:0},{name:`wrapMode`,label:`Wrap mode`,type:K.SELECT,options:[{label:`Word`,value:`word`},{label:`Char`,value:`char`},{label:`Word-char (default)`,value:`word-char`}],defaultValue:`word-char`},{name:`textOverflow`,label:`Text overflow`,type:K.SELECT,options:[{label:`Clip (default)`,value:`clip`},{label:`Ellipsize start`,value:`ellipsize-start`},{label:`Ellipsize middle`,value:`ellipsize-middle`},{label:`Ellipsize end`,value:`ellipsize-end`}],defaultValue:`clip`},{name:`xalign`,label:`X align`,type:K.RANGE,min:0,max:1,step:.05,defaultValue:0},{name:`yalign`,label:`Y align`,type:K.RANGE,min:0,max:1,step:.05,defaultValue:.5}]};var Cs=__exportAll({InscriptionStories:()=>Ts,InscriptionStory:()=>ws}),ws=class InscriptionStory extends X{_inscription=null;_frame=null;static{o.registerClass({GTypeName:`AdwStorybookInscription`},InscriptionStory)}constructor(){super(X.fromMeta(InscriptionStory.getMetadata(),`Default`))}static getMetadata(){return{...Ss,component:n.Inscription.$gtype}}initialize(){this._inscription=new n.Inscription,this._frame=new n.Frame({child:this._inscription,halign:n.Align.CENTER}),this._apply(),this.addContent(this._frame)}updateArgs(e){this._apply()}_apply(){!this._inscription||!this._frame||(this._inscription.min_chars=this.args.minChars,this._inscription.nat_chars=this.args.natChars,this._inscription.min_lines=this.args.minLines,this._inscription.nat_lines=this.args.natLines,this._inscription.text=this.args.text,this._inscription.wrap_mode=this.args.wrapMode,this._inscription.text_overflow=this.args.textOverflow,this._inscription.xalign=this.args.xalign,this._inscription.yalign=this.args.yalign,this._frame.width_request=320,this._frame.height_request=160)}};o.type_ensure(ws.$gtype);const Ts={stories:[ws]},Es={title:`Media/Media Controls`,description:"Gtk.MediaControls — the transport bar: play, position, duration, volume. It owns no playback at all (its one property is an object, `media-stream`), and the bar is INSENSITIVE until a stream is attached. Note which label shows what: the position label shows the elapsed time and the one beside it shows what REMAINS, negatively.",controls:[{name:`sensitive`,label:`Sensitive`,type:K.BOOLEAN,defaultValue:!0}]};var Ds=__exportAll({MediaControlsStories:()=>ks,MediaControlsStory:()=>Os}),Os=class MediaControlsStory extends X{_controls=null;static{o.registerClass({GTypeName:`AdwStorybookMediaControls`},MediaControlsStory)}constructor(){super(X.fromMeta(MediaControlsStory.getMetadata(),`Default`))}static getMetadata(){return{...Es,component:n.MediaControls.$gtype}}initialize(){this._controls=new n.MediaControls,this._controls.add_css_class(`osd`),this._controls.add_css_class(`bottom`),this._apply(),this.addContent(this._controls)}updateArgs(e){this._apply()}_apply(){this._controls&&(this._controls.sensitive=this.args.sensitive)}};o.type_ensure(Os.$gtype);const ks={stories:[Os]},As={title:`Media/Picture`,description:"Gtk.Picture — an image fitted to the box it is given, not sized by itself. `content-fit` picks one of the four fit modes (contain, cover, fill, scale-down), `can-shrink` decides whether it may be smaller than its content, and `alternative-text` is what a screen reader hears.",controls:[{name:`contentFit`,label:`Content fit`,type:K.SELECT,options:[{label:`Contain`,value:`contain`},{label:`Cover`,value:`cover`},{label:`Fill`,value:`fill`},{label:`Scale down`,value:`scale-down`}],defaultValue:`contain`},{name:`canShrink`,label:`Can shrink`,type:K.BOOLEAN,defaultValue:!0},{name:`alternativeText`,label:`Alternative text`,type:K.TEXT,defaultValue:`A tangerine`},{name:`isolateContents`,label:`Isolate contents`,type:K.BOOLEAN,defaultValue:!0},{name:`keepAspectRatio`,label:`Keep aspect ratio (deprecated)`,type:K.BOOLEAN,defaultValue:!0},{name:`width`,label:`Width (px)`,type:K.RANGE,min:64,max:320,step:16,defaultValue:240}]};var js=__exportAll({PictureStories:()=>Ns,PictureStory:()=>Ms});function makePaintable(){let n=320*4,r=new Uint8Array(n*180);for(let e=0;e<180;e++){let t=e<180/2?48:144;for(let i=0;i<320;i++){let o=e*n+i*4;r[o]=t,r[o+1]=i<320/2?64:192,r[o+2]=160,r[o+3]=255}}return t.MemoryTexture.new(320,180,t.MemoryFormat.R8G8B8A8,e.Bytes.new(r),n)}var Ms=class PictureStory extends X{_picture=null;static{o.registerClass({GTypeName:`AdwStorybookPicture`},PictureStory)}constructor(){super(X.fromMeta(PictureStory.getMetadata(),`Default`))}static getMetadata(){return{...As,component:n.Picture.$gtype}}initialize(){this._picture=new n.Picture({paintable:makePaintable(),halign:n.Align.CENTER,valign:n.Align.CENTER}),this._apply(),this.addContent(this._picture)}updateArgs(e){this._apply()}_apply(){if(!this._picture)return;let e=this.args.width;this._picture.set_size_request(e,Math.round(e*2/3)),this.args.keepAspectRatio&&(this._picture.keep_aspect_ratio=!0),this._picture.content_fit=this.args.contentFit,this._picture.can_shrink=this.args.canShrink,this._picture.alternative_text=this.args.alternativeText,this._picture.isolate_contents=this.args.isolateContents}};o.type_ensure(Ms.$gtype);const Ns={stories:[Ms]},Ps={title:`Media/Video`,description:`Gtk.Video — a play surface with an overlay icon and a controls bar that hides itself three seconds after you stop moving the pointer. The overlay icon is a four-way choice — no stream, error, ended, or ready — and it is only VISIBLE while the video is stopped; there is no pause glyph over the frames.`,controls:[{name:`autoplay`,label:`Autoplay`,type:K.BOOLEAN,defaultValue:!1},{name:`loop`,label:`Loop`,type:K.BOOLEAN,defaultValue:!0},{name:`graphicsOffload`,label:`Graphics offload`,type:K.BOOLEAN,defaultValue:!1},{name:`width`,label:`Width (px)`,type:K.RANGE,min:160,max:480,step:40,defaultValue:320}]};var Fs=__exportAll({VideoStories:()=>Ls,VideoStory:()=>Is}),Is=class VideoStory extends X{_video=null;static{o.registerClass({GTypeName:`AdwStorybookVideo`},VideoStory)}constructor(){super(X.fromMeta(VideoStory.getMetadata(),`Default`))}static getMetadata(){return{...Ps,component:n.Video.$gtype}}initialize(){this._video=new n.Video({halign:n.Align.CENTER,valign:n.Align.CENTER}),this._apply(),this.addContent(this._video)}updateArgs(e){this._apply()}_apply(){if(!this._video)return;let e=this.args.width;this._video.set_size_request(e,Math.round(e*9/16)),this._video.autoplay=this.args.autoplay,this._video.loop=this.args.loop,this._video.graphics_offload=this.args.graphicsOffload?n.GraphicsOffloadEnabled.ENABLED:n.GraphicsOffloadEnabled.DISABLED}};o.type_ensure(Is.$gtype);const Ls={stories:[Is]},Rs={title:`Navigation/Bottom Sheet`,description:`Adw.BottomSheet — a sheet that slides up over the content. Toggle "Open" to reveal it.`,controls:[{name:`open`,label:`Open`,type:K.BOOLEAN,defaultValue:!0},{name:`modal`,label:`Modal`,type:K.BOOLEAN,defaultValue:!0},{name:`canClose`,label:`Can close`,type:K.BOOLEAN,defaultValue:!0}]};var zs=__exportAll({BottomSheetStories:()=>Vs,BottomSheetStory:()=>Bs}),Bs=class BottomSheetStory extends X{_sheet=null;static{o.registerClass({GTypeName:`AdwStorybookBottomSheet`},BottomSheetStory)}constructor(){super(X.fromMeta(BottomSheetStory.getMetadata(),`Default`))}static getMetadata(){return{...Rs,component:s.BottomSheet.$gtype}}buildContent(){let e=new n.Button({label:`Toggle sheet`,halign:n.Align.CENTER,valign:n.Align.CENTER,vexpand:!0});return e.add_css_class(`pill`),e.add_css_class(`suggested-action`),e.connect(`clicked`,()=>{this._sheet&&(this._sheet.open=!this._sheet.open)}),e}buildSheet(){let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,marginTop:18,marginBottom:24,marginStart:18,marginEnd:18});e.append(new n.Label({label:`Share track`,halign:n.Align.START,cssClasses:[`title-2`]}));let t=new s.PreferencesGroup;for(let[e,r]of[[`Copy link`,`edit-copy-symbolic`],[`Send to a friend`,`mail-send-symbolic`],[`Add to playlist`,`list-add-symbolic`]]){let i=new s.ActionRow({title:e});i.add_prefix(new n.Image({iconName:r})),i.activatable=!0,t.add(i)}return e.append(t),e}initialize(){this._sheet=new s.BottomSheet({content:this.buildContent(),sheet:this.buildSheet(),open:this.args.open,modal:this.args.modal,canClose:this.args.canClose,widthRequest:480,heightRequest:340}),this.addContent(this._sheet)}updateArgs(e){this._sheet&&(this._sheet.open=this.args.open,this._sheet.modal=this.args.modal,this._sheet.canClose=this.args.canClose)}};o.type_ensure(Bs.$gtype);const Vs={stories:[Bs]},Hs={title:`Navigation/Navigation Split View`,description:`Adw.NavigationSplitView — a resizable sidebar beside a content pane. When collapsed it folds into a navigation stack.`,controls:[{name:`showContent`,label:`Show content`,type:K.BOOLEAN,defaultValue:!0},{name:`collapsed`,label:`Collapsed`,type:K.BOOLEAN,defaultValue:!1}]};var Us=__exportAll({NavigationSplitViewStories:()=>Gs,NavigationSplitViewStory:()=>Ws}),Ws=class NavigationSplitViewStory extends X{_view=null;static{o.registerClass({GTypeName:`AdwStorybookNavigationSplitView`},NavigationSplitViewStory)}constructor(){super(X.fromMeta(NavigationSplitViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Hs,component:s.NavigationSplitView.$gtype}}buildSidebar(){let e=new s.PreferencesGroup;for(let[t,r,i]of[[`All Mail`,`128 messages`,`mail-unread-symbolic`],[`Starred`,`6 messages`,`starred-symbolic`],[`Drafts`,`2 messages`,`document-edit-symbolic`],[`Archive`,`512 messages`,`folder-symbolic`]]){let o=new s.ActionRow({title:t,subtitle:r});o.add_prefix(new n.Image({iconName:i})),o.activatable=!0,e.add(o)}let t=new s.ToolbarView;return t.add_top_bar(new s.HeaderBar),t.content=e,new s.NavigationPage({title:`Mailboxes`,child:t})}buildContent(){let e=new s.StatusPage({iconName:`mail-unread-symbolic`,title:`All Mail`,description:`Select a conversation from the list to read it here.`,vexpand:!0}),t=new s.ToolbarView;return t.add_top_bar(new s.HeaderBar),t.content=e,new s.NavigationPage({title:`All Mail`,child:t})}initialize(){this._view=new s.NavigationSplitView({sidebar:this.buildSidebar(),content:this.buildContent(),showContent:this.args.showContent,collapsed:this.args.collapsed,widthRequest:480,heightRequest:340}),this.addContent(this._view)}updateArgs(e){this._view&&(this._view.showContent=this.args.showContent,this._view.collapsed=this.args.collapsed)}};o.type_ensure(Ws.$gtype);const Gs={stories:[Ws]},Ks={title:`Navigation/Navigation View`,description:`Adw.NavigationView — a navigation stack. The root page pushes a detail page, which gets an automatic back button.`,controls:[{name:`rootTitle`,label:`Root title`,type:K.TEXT,defaultValue:`Contacts`},{name:`detailTitle`,label:`Detail title`,type:K.TEXT,defaultValue:`Ada Lovelace`},{name:`animateTransitions`,label:`Animate transitions`,type:K.BOOLEAN,defaultValue:!0}]};var qs=__exportAll({NavigationViewStories:()=>Ys,NavigationViewStory:()=>Js}),Js=class NavigationViewStory extends X{_view=null;static{o.registerClass({GTypeName:`AdwStorybookNavigationView`},NavigationViewStory)}constructor(){super(X.fromMeta(NavigationViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Ks,component:s.NavigationView.$gtype}}buildPage(e,t){let n=new s.ToolbarView;return n.add_top_bar(new s.HeaderBar),n.content=t,new s.NavigationPage({title:e,child:n})}initialize(){this._view=new s.NavigationView({animateTransitions:this.args.animateTransitions,widthRequest:480,heightRequest:340});let e=this.buildPage(this.args.detailTitle,new s.StatusPage({iconName:`avatar-default-symbolic`,title:this.args.detailTitle,description:`Mathematician and writer, the first computer programmer.`,vexpand:!0})),t=new n.Button({label:`Open contact`,halign:n.Align.CENTER,valign:n.Align.CENTER,vexpand:!0});t.add_css_class(`pill`),t.add_css_class(`suggested-action`),t.connect(`clicked`,()=>{this._view?.push(e)});let r=this.buildPage(this.args.rootTitle,t);this._view.add(r),this._view.add(e),this.addContent(this._view)}updateArgs(e){this._view&&(this._view.animateTransitions=this.args.animateTransitions)}};o.type_ensure(Js.$gtype);const Ys={stories:[Js]},Xs={title:`Navigation/Overlay Split View`,description:`Adw.OverlaySplitView — a sidebar shown beside the content, or overlaid on top of it when collapsed.`,controls:[{name:`showSidebar`,label:`Show sidebar`,type:K.BOOLEAN,defaultValue:!0},{name:`collapsed`,label:`Collapsed`,type:K.BOOLEAN,defaultValue:!1}]};var Zs=__exportAll({OverlaySplitViewStories:()=>$s,OverlaySplitViewStory:()=>Qs}),Qs=class OverlaySplitViewStory extends X{_view=null;static{o.registerClass({GTypeName:`AdwStorybookOverlaySplitView`},OverlaySplitViewStory)}constructor(){super(X.fromMeta(OverlaySplitViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Xs,component:s.OverlaySplitView.$gtype}}buildSidebar(){let e=new s.PreferencesGroup;for(let[t,r]of[[`Home`,`go-home-symbolic`],[`Discover`,`system-search-symbolic`],[`Library`,`folder-music-symbolic`],[`Settings`,`emblem-system-symbolic`]]){let i=new s.ActionRow({title:t});i.add_prefix(new n.Image({iconName:r})),i.activatable=!0,e.add(i)}let t=new s.ToolbarView;return t.add_top_bar(new s.HeaderBar({showTitle:!1})),t.content=e,t.add_css_class(`sidebar`),t}buildContent(){let e=new s.StatusPage({iconName:`folder-music-symbolic`,title:`Your Library`,description:`Toggle the sidebar to browse sections. Collapse it to overlay the content.`,vexpand:!0}),t=new s.ToolbarView;return t.add_top_bar(new s.HeaderBar),t.content=e,t}initialize(){this._view=new s.OverlaySplitView({sidebar:this.buildSidebar(),content:this.buildContent(),showSidebar:this.args.showSidebar,collapsed:this.args.collapsed,widthRequest:480,heightRequest:340}),this.addContent(this._view)}updateArgs(e){this._view&&(this._view.showSidebar=this.args.showSidebar,this._view.collapsed=this.args.collapsed)}};o.type_ensure(Qs.$gtype);const $s={stories:[Qs]},ec=[{label:`File`,submenu:[{label:`New Window`,accel:`<Control>N`},{label:`New Tab`,accel:`<Control><Shift>N`},{label:`Open…`,accel:`<Control>O`}]},{label:`Edit`,submenu:[{label:`Undo`,accel:`<Control>Z`},{label:`Redo`,accel:`<Control>Y`}]},{label:`View`,submenu:[{label:`Zoom In`,accel:`<Control>plus`},{label:`Zoom Out`}]},{label:`Help`,submenu:[{label:`Keyboard Shortcuts`},{label:`About`}]}],tc={title:`Navigation/Popover Menu Bar`,description:`Gtk.PopoverMenuBar — a horizontal bar of items that pop up menus when clicked. Clicking an item OPENS its menu; hovering only SELECTS, and the item lights up (.active) exactly while its menu is up. Left and Right walk the bar and wrap.`,controls:[{name:`position`,label:`Menu position`,type:K.SELECT,options:[{label:`Below`,value:`bottom`},{label:`Above`,value:`top`}],defaultValue:`bottom`},{name:`showLast`,label:`Include Help`,type:K.BOOLEAN,defaultValue:!0}]};var nc=__exportAll({PopoverMenuBarStories:()=>ic,PopoverMenuBarStory:()=>rc}),rc=class PopoverMenuBarStory extends X{_bar=null;static{o.registerClass({GTypeName:`AdwStorybookPopoverMenuBar`},PopoverMenuBarStory)}constructor(){super(X.fromMeta(PopoverMenuBarStory.getMetadata(),`Default`))}static getMetadata(){return{...tc,component:n.PopoverMenuBar.$gtype}}initialize(){this._bar=n.PopoverMenuBar.new_from_model(this._buildMenu()),this._bar.halign=n.Align.START,this._apply(),this.addContent(this._bar)}updateArgs(e){this._apply()}_buildMenu(){let e=new r.Menu,t=this.args.showLast===!1?ec.slice(0,3):ec;for(let n of t){let t=new r.Menu;for(let e of n.submenu)t.append(e.label,`app.${e.label.toLowerCase().replace(/[^a-z0-9]+/g,`-`)}`);e.append_submenu(n.label,t)}return e}_apply(){if(!this._bar)return;let e=this.args.position===`top`;for(let t=this._bar.get_first_child();t!==null;t=t.get_next_sibling())t.get_first_child()?.set_position(e?n.PositionType.TOP:n.PositionType.BOTTOM)}};o.type_ensure(rc.$gtype);const ic={stories:[rc]},ac={title:`Navigation/Sidebar`,description:`Adw.Sidebar — a selectable list of Adw.SidebarItem grouped into sections. Selecting an item updates the content.`,controls:[{name:`mode`,label:`Mode`,type:K.SELECT,options:[{label:`Sidebar`,value:`sidebar`},{label:`Page`,value:`page`}],defaultValue:`sidebar`},{name:`selected`,label:`Selected index`,type:K.NUMBER,min:0,max:3,step:1,defaultValue:0}]};var oc=__exportAll({SidebarStories:()=>cc,SidebarStory:()=>sc}),sc=class SidebarStory extends X{_sidebar=null;_status=null;static{o.registerClass({GTypeName:`AdwStorybookSidebar`},SidebarStory)}constructor(){super(X.fromMeta(SidebarStory.getMetadata(),`Default`))}static getMetadata(){return{...ac,component:s.Sidebar.$gtype}}items=[{title:`Inbox`,subtitle:`3 unread`,icon:`mail-unread-symbolic`},{title:`Starred`,subtitle:`Favourites`,icon:`starred-symbolic`},{title:`Sent`,subtitle:`Outgoing mail`,icon:`mail-send-symbolic`},{title:`Archive`,subtitle:`Older mail`,icon:`folder-symbolic`}];modeFromArg(e){return e===`page`?s.SidebarMode.PAGE:s.SidebarMode.SIDEBAR}syncContent(){if(!this._sidebar||!this._status)return;let e=this.items[this._sidebar.selected]??this.items[0];this._status.title=e.title,this._status.iconName=e.icon,this._status.description=e.subtitle}initialize(){let e=new s.SidebarSection({title:`Mailboxes`});for(let t of this.items)e.append(new s.SidebarItem({title:t.title,subtitle:t.subtitle,iconName:t.icon}));this._sidebar=new s.Sidebar({mode:this.modeFromArg(this.args.mode),selected:this.args.selected,widthRequest:220}),this._sidebar.append(e),this._sidebar.connect(`notify::selected`,()=>this.syncContent()),this._status=new s.StatusPage({hexpand:!0,vexpand:!0});let t=new n.Box({orientation:n.Orientation.HORIZONTAL,widthRequest:480,heightRequest:340});t.append(this._sidebar),t.append(new n.Separator({orientation:n.Orientation.VERTICAL})),t.append(this._status),this.syncContent(),this.addContent(t)}updateArgs(e){this._sidebar&&(this._sidebar.mode=this.modeFromArg(this.args.mode),this._sidebar.selected=this.args.selected,this.syncContent())}};o.type_ensure(sc.$gtype);const cc={stories:[sc]},lc=[{title:`Sync`,kind:`switch`,active:!0},{title:`Export`,kind:`action`}],uc=[`Blue`,`Teal`,`Green`,`Orange`],dc={appearance:`Appearance`,account:`Account`,shortcuts:`Shortcuts`,actions:`Actions`},Q={bannerTitle:`You have unsaved changes`,bannerButton:`Save`,darkMode:`Dark mode`,darkModeSubtitle:`Use the dark Adwaita palette`,notifications:`Notifications`,notificationsSubtitle:`Show toasts for events`,accentColor:`Accent color`,name:`Name`,nameValue:`Ada Lovelace`,email:`Email`,emailValue:`ada@example.com`,devices:`Devices`,advanced:`Advanced`,advancedSubtitle:`More options`,save:`Save changes`,delete:`Delete account`},$={value:3,lower:1,upper:10,step:1},fc=[{title:`Copy`,accelerator:`<Control>C`},{title:`Select all`,accelerator:`<Shift><Control>a`},{title:`Switch tab`,accelerator:`<Alt>1...9`}],pc={title:`Overview/Widgets`,description:`Many widgets at once, the way an app composes them: a banner, preference groups of rows, an expander, buttons and shortcut labels. Use it to judge spacing, alignment and the theme as a whole rather than one widget in isolation.`,controls:[{name:`revealed`,label:`Show banner`,type:K.BOOLEAN,description:`Adw.Banner:revealed — animates in and out`,defaultValue:!0}]};var mc=__exportAll({OverviewWidgetsStories:()=>gc,OverviewWidgetsStory:()=>hc}),hc=class OverviewWidgetsStory extends X{_banner=null;static{o.registerClass({GTypeName:`AdwStorybookOverviewWidgets`},OverviewWidgetsStory)}constructor(){super(X.fromMeta(OverviewWidgetsStory.getMetadata(),`Default`))}static getMetadata(){return pc}initialize(){let e=new n.Box({orientation:n.Orientation.VERTICAL,hexpand:!0});this._banner=new s.Banner({title:Q.bannerTitle,button_label:Q.bannerButton,revealed:this.args.revealed}),e.append(this._banner);let t=new s.PreferencesPage({hexpand:!0}),r=new s.PreferencesGroup({title:dc.appearance});r.add(new s.SwitchRow({title:Q.darkMode,subtitle:Q.darkModeSubtitle,active:!1})),r.add(new s.SwitchRow({title:Q.notifications,subtitle:Q.notificationsSubtitle,active:!0})),r.add(new s.ComboRow({title:Q.accentColor,model:n.StringList.new([...uc]),selected:0})),t.add(r);let i=new s.PreferencesGroup({title:dc.account}),o=new s.EntryRow({title:Q.name});o.set_text(Q.nameValue),i.add(o);let c=new s.EntryRow({title:Q.email});c.set_text(Q.emailValue),i.add(c);let l=new s.SpinRow({title:Q.devices,adjustment:new n.Adjustment({value:$.value,lower:$.lower,upper:$.upper,step_increment:$.step,page_increment:$.step})});l.set_value($.value),i.add(l);let u=new s.ExpanderRow({title:Q.advanced,subtitle:Q.advancedSubtitle,expanded:!0});for(let e of lc)u.add_row(e.kind===`switch`?new s.SwitchRow({title:e.title,active:e.active??!1}):new s.ActionRow({title:e.title}));i.add(u),t.add(i);let d=new s.PreferencesGroup({title:dc.shortcuts});for(let e of fc){let t=new s.ActionRow({title:e.title});t.add_suffix(new s.ShortcutLabel({accelerator:e.accelerator,valign:n.Align.CENTER})),d.add(t)}t.add(d);let f=new s.PreferencesGroup({title:dc.actions}),p=new n.Box({orientation:n.Orientation.HORIZONTAL,spacing:12,homogeneous:!0,margin_top:6,margin_bottom:6}),m=new n.Button({label:Q.save});m.add_css_class(`suggested-action`),p.append(m);let h=new n.Button({label:Q.delete});h.add_css_class(`destructive-action`),p.append(h),f.add(p),t.add(f),e.append(t),this.addContent(e)}updateArgs(e){this._banner?.set_revealed(this.args.revealed)}};o.type_ensure(hc.$gtype);const gc={stories:[hc]},_c={title:`Presentation/Avatar`,description:`A circular avatar that derives initials (and a colour) from a name, or shows a symbolic icon.`,controls:[{name:`text`,label:`Name`,type:K.TEXT,defaultValue:`Ada Lovelace`},{name:`size`,label:`Size`,type:K.RANGE,min:24,max:160,step:8,defaultValue:96},{name:`showInitials`,label:`Show initials`,type:K.BOOLEAN,defaultValue:!0},{name:`iconName`,label:`Fallback icon`,type:K.SELECT,options:[{label:`Person`,value:`avatar-default-symbolic`},{label:`Contact`,value:`contact-new-symbolic`},{label:`Camera`,value:`camera-photo-symbolic`}],defaultValue:`avatar-default-symbolic`}]};var vc=__exportAll({AvatarStories:()=>bc,AvatarStory:()=>yc}),yc=class AvatarStory extends X{_avatar=null;static{o.registerClass({GTypeName:`AdwStorybookAvatar`},AvatarStory)}constructor(){super(X.fromMeta(AvatarStory.getMetadata(),`Default`))}static getMetadata(){return{..._c,component:s.Avatar.$gtype}}initialize(){this._avatar=new s.Avatar({size:this.args.size,text:this.args.text,showInitials:this.args.showInitials,iconName:this.args.iconName}),this.addContent(this._avatar)}updateArgs(e){this._avatar&&(this._avatar.size=this.args.size,this._avatar.text=this.args.text,this._avatar.showInitials=this.args.showInitials,this._avatar.iconName=this.args.iconName)}};o.type_ensure(yc.$gtype);const bc={stories:[yc]},xc={title:`Presentation/Banner`,description:`Adw.Banner — a full-width strip carrying a status message and an optional action button.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Metered connection — updates paused`},{name:`buttonLabel`,label:`Button label`,type:K.TEXT,defaultValue:`Resume`},{name:`revealed`,label:`Revealed`,type:K.BOOLEAN,defaultValue:!0},{name:`useMarkup`,label:`Use markup`,type:K.BOOLEAN,defaultValue:!1}]};var Sc=__exportAll({BannerStories:()=>wc,BannerStory:()=>Cc}),Cc=class BannerStory extends X{_banner=null;static{o.registerClass({GTypeName:`AdwStorybookBanner`},BannerStory)}constructor(){super(X.fromMeta(BannerStory.getMetadata(),`Default`))}static getMetadata(){return{...xc,component:s.Banner.$gtype}}initialize(){this._banner=new s.Banner({title:this.args.title,buttonLabel:this.args.buttonLabel,revealed:this.args.revealed,useMarkup:this.args.useMarkup});let e=new n.Box({orientation:n.Orientation.VERTICAL,widthRequest:460});e.append(this._banner),this.addContent(e)}updateArgs(e){this._banner&&(this._banner.title=this.args.title,this._banner.buttonLabel=this.args.buttonLabel,this._banner.revealed=this.args.revealed,this._banner.useMarkup=this.args.useMarkup)}};o.type_ensure(Cc.$gtype);const wc={stories:[Cc]},Tc=[14,25],Ec={title:`Presentation/Calendar`,description:`Gtk.Calendar — a six-by-seven month grid with four navigation arrows. The arrows clamp the way g_date_time_add_months does, so paging from the 31st lands on the 28th, and a marked day is a day NUMBER of the shown month, so it survives a month that has no such day.`,controls:[{name:`showHeading`,label:`Heading`,type:K.BOOLEAN,defaultValue:!0},{name:`showDayNames`,label:`Day names`,type:K.BOOLEAN,defaultValue:!0},{name:`showWeekNumbers`,label:`Week numbers`,type:K.BOOLEAN,defaultValue:!0}]};var Dc=__exportAll({CalendarStories:()=>kc,CalendarStory:()=>Oc}),Oc=class CalendarStory extends X{_calendar=null;_marked=!1;static{o.registerClass({GTypeName:`AdwStorybookCalendar`},CalendarStory)}constructor(){super(X.fromMeta(CalendarStory.getMetadata(),`Default`))}static getMetadata(){return{...Ec,component:n.Calendar.$gtype}}initialize(){this._calendar=new n.Calendar({hexpand:!1}),this._calendar.date=parseIso(`2026-10-02`),this._apply(),this.addContent(this._calendar)}updateArgs(e){this._apply()}_apply(){if(this._calendar){this._calendar.show_heading=this.args.showHeading,this._calendar.show_day_names=this.args.showDayNames,this._calendar.show_week_numbers=this.args.showWeekNumbers,this._marked&&this._calendar.clear_marks();for(let e of Tc)this._calendar.mark_day(e);this._marked=!0}}};function parseIso(t){let[n,r,i]=t.split(`-`).map(Number);return e.DateTime.new_local(n,r,i,0,0,0)}o.type_ensure(Oc.$gtype);const kc={stories:[Oc]},Ac=[{value:`de`,label:`German`},{value:`fr`,label:`French`},{value:`nl`,label:`Dutch`},{value:`pt`,label:`Portuguese`}],jc={title:`Presentation/Column View`,description:`Gtk.ColumnView — a list view with a header and one cell per column. Clicking a sortable header sets the sort and inverts it on the next click; the view itself reorders nothing.`,controls:[{name:`showRowSeparators`,label:`Row separators`,type:K.BOOLEAN,defaultValue:!0},{name:`showColumnSeparators`,label:`Column separators`,type:K.BOOLEAN,defaultValue:!1},{name:`reorderable`,label:`Drag columns to reorder`,type:K.BOOLEAN,defaultValue:!1}]};var Mc=__exportAll({ColumnViewStories:()=>Pc,ColumnViewStory:()=>Nc}),Nc=class ColumnViewStory extends X{_view=null;static{o.registerClass({GTypeName:`AdwStorybookColumnView`},ColumnViewStory)}constructor(){super(X.fromMeta(ColumnViewStory.getMetadata(),`Default`))}static getMetadata(){return{...jc,component:n.ColumnView.$gtype}}initialize(){let e=n.StringList.new(Ac.map(e=>e.label));this._view=new n.ColumnView({model:n.SingleSelection.new(e),vexpand:!0}),this._view.append_column(this._column(`Name`,e=>e.label)),this._view.append_column(this._column(`Code`,e=>e.value));let t=new n.ScrolledWindow({child:this._view,heightRequest:200,hexpand:!0});this._apply(),this.addContent(t)}updateArgs(e){this._apply()}_apply(){this._view&&(this._view.showRowSeparators=this.args.showRowSeparators,this._view.showColumnSeparators=this.args.showColumnSeparators,this._view.reorderable=this.args.reorderable)}_column(e,t){let r=new n.SignalListItemFactory;return r.connect(`setup`,(e,t)=>{t.child=new n.Label({xalign:0})}),r.connect(`bind`,(e,n)=>{let r=n,i=r.child,o=r.item.string,s=Ac.find(e=>e.label===o);i.label=s===void 0?o:t(s)}),new n.ColumnViewColumn({title:e,factory:r,expand:!0})}};o.type_ensure(Nc.$gtype);const Pc={stories:[Nc]},Fc=[`Red`,`Orange`,`Yellow`,`Green`,`Blue`,`Purple`,`Teal`,`Grey`],Ic={title:`Presentation/Flow Box`,description:`Gtk.FlowBox — the same selectable rows a list box holds, reflowed into as many per line as the width fits. HORIZONTAL is the default here, unlike every GtkOrientable list base; the arrows move by visual position, so the cross-line key lands in the same column of the next line.`,controls:[{name:`selectionMode`,label:`Selection`,type:K.SELECT,options:[{label:`Single`,value:`single`},{label:`Multiple`,value:`multiple`},{label:`Browse`,value:`browse`},{label:`None`,value:`none`}],defaultValue:`multiple`},{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`maxChildrenPerLine`,label:`Max children per line`,type:K.NUMBER,defaultValue:3},{name:`homogeneous`,label:`Homogeneous`,type:K.BOOLEAN,defaultValue:!1},{name:`rowSpacing`,label:`Row spacing`,type:K.NUMBER,defaultValue:6}]};var Lc=__exportAll({FlowBoxStories:()=>zc,FlowBoxStory:()=>Rc}),Rc=class FlowBoxStory extends X{_box=null;static{o.registerClass({GTypeName:`AdwStorybookFlowBox`},FlowBoxStory)}constructor(){super(X.fromMeta(FlowBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...Ic,component:n.FlowBox.$gtype}}initialize(){this._box=new n.FlowBox({hexpand:!0,vexpand:!0});for(let e of Fc)this._box.append(new n.FlowBoxChild({child:new n.Label({label:e})}));this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){this._box&&(this._box.selection_mode=this._selectionMode(),this._box.orientation=this.args.orientation===`vertical`?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL,this._box.max_children_per_line=Math.max(1,Math.trunc(this.args.maxChildrenPerLine)),this._box.homogeneous=this.args.homogeneous,this._box.row_spacing=Math.max(0,Math.trunc(this.args.rowSpacing)))}_selectionMode(){switch(this.args.selectionMode){case`single`:return n.SelectionMode.SINGLE;case`browse`:return n.SelectionMode.BROWSE;case`none`:return n.SelectionMode.NONE;default:return n.SelectionMode.MULTIPLE}}};o.type_ensure(Rc.$gtype);const zc={stories:[Rc]},Bc=[`Documents`,`Downloads`,`Music`,`Pictures`,`Videos`],Vc=[{label:`Single`,value:`single`},{label:`Multiple`,value:`multiple`},{label:`None`,value:`none`}],Hc={title:`Presentation/List View`,description:`Gtk.ListView — one row per item of a list model, each built by a factory. The model is the portable list (ADR 0046); which Gtk.SelectionModel would have wrapped it is the selection mode.`,controls:[{name:`selectionMode`,label:`Selection`,type:K.SELECT,options:Vc,defaultValue:`single`},{name:`showSeparators`,label:`Separators`,type:K.BOOLEAN,defaultValue:!0},{name:`singleClickActivate`,label:`Activate on single click`,type:K.BOOLEAN,defaultValue:!1}]},Uc=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`],Wc={title:`Presentation/Grid View`,description:`Gtk.GridView — the same model and factory as a list view, reflowed into as many equal columns as the width fits, between min-columns and max-columns.`,controls:[{name:`maxColumns`,label:`Max columns`,type:K.NUMBER,defaultValue:4},{name:`minColumns`,label:`Min columns`,type:K.NUMBER,defaultValue:1},{name:`selectionMode`,label:`Selection`,type:K.SELECT,options:Vc,defaultValue:`single`}]};var Gc=__exportAll({GridViewStories:()=>qc,GridViewStory:()=>Kc}),Kc=class GridViewStory extends X{_view=null;_model=null;static{o.registerClass({GTypeName:`AdwStorybookGridView`},GridViewStory)}constructor(){super(X.fromMeta(GridViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Wc,component:n.GridView.$gtype}}initialize(){this._model=n.StringList.new([...Uc]);let e=new n.SignalListItemFactory;e.connect(`setup`,(e,t)=>{t.child=new n.Label({xalign:.5})}),e.connect(`bind`,(e,t)=>{let n=t,r=n.child;r.label=n.item.string}),this._view=new n.GridView({factory:e,vexpand:!0});let t=new n.ScrolledWindow({child:this._view,heightRequest:200,hexpand:!0});this._apply(),this.addContent(t)}updateArgs(e){this._apply()}_apply(){!this._view||!this._model||(this._view.model=this.args.selectionMode===`multiple`?n.MultiSelection.new(this._model):this.args.selectionMode===`none`?n.NoSelection.new(this._model):n.SingleSelection.new(this._model),this._view.minColumns=Math.max(1,this.args.minColumns),this._view.maxColumns=Math.max(this._view.minColumns,this.args.maxColumns))}};o.type_ensure(Kc.$gtype);const qc={stories:[Kc]},Jc=[`Documents`,`Downloads`,`Music`,`Pictures`,`Videos`],Yc={title:`Presentation/List Box`,description:`Gtk.ListBox — one row per child you append, with GTK’s four selection modes. Ctrl toggles and Shift extends from the anchor the last Shift-click left behind; activate-on-single-click defaults to TRUE here, unlike Gtk.ListView’s single-click-activate.`,controls:[{name:`selectionMode`,label:`Selection`,type:K.SELECT,options:[{label:`Single`,value:`single`},{label:`Multiple`,value:`multiple`},{label:`Browse`,value:`browse`},{label:`None`,value:`none`}],defaultValue:`single`},{name:`showSeparators`,label:`Separators`,type:K.BOOLEAN,defaultValue:!0},{name:`activateOnSingleClick`,label:`Activate on single click`,type:K.BOOLEAN,defaultValue:!0},{name:`tabBehavior`,label:`Tab behaviour`,type:K.SELECT,options:[{label:`All`,value:`all`},{label:`Item`,value:`item`},{label:`Cell`,value:`cell`}],defaultValue:`all`}]};var Xc=__exportAll({ListBoxStories:()=>Qc,ListBoxStory:()=>Zc}),Zc=class ListBoxStory extends X{_box=null;static{o.registerClass({GTypeName:`AdwStorybookListBox`},ListBoxStory)}constructor(){super(X.fromMeta(ListBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...Yc,component:n.ListBox.$gtype}}initialize(){this._box=new n.ListBox({hexpand:!0});for(let e of Jc)this._box.append(new n.ListBoxRow({child:new n.Label({label:e,xalign:0})}));this._apply();let e=new n.ScrolledWindow({child:this._box,heightRequest:200});this.addContent(e)}updateArgs(e){this._apply()}_apply(){this._box&&(this._box.selection_mode=this._selectionMode(),this._box.show_separators=this.args.showSeparators,this._box.activate_on_single_click=this.args.activateOnSingleClick,this._box.tab_behavior=this.args.tabBehavior)}_selectionMode(){switch(this.args.selectionMode){case`multiple`:return n.SelectionMode.MULTIPLE;case`browse`:return n.SelectionMode.BROWSE;case`none`:return n.SelectionMode.NONE;default:return n.SelectionMode.SINGLE}}};o.type_ensure(Zc.$gtype);const Qc={stories:[Zc]};var $c=__exportAll({ListViewStories:()=>tl,ListViewStory:()=>el}),el=class ListViewStory extends X{_view=null;_model=null;static{o.registerClass({GTypeName:`AdwStorybookListView`},ListViewStory)}constructor(){super(X.fromMeta(ListViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Hc,component:n.ListView.$gtype}}initialize(){this._model=n.StringList.new([...Bc]);let e=new n.SignalListItemFactory;e.connect(`setup`,(e,t)=>{t.child=new n.Label({xalign:0})}),e.connect(`bind`,(e,t)=>{let n=t,r=n.child;r.label=n.item.string}),this._view=new n.ListView({factory:e,vexpand:!0});let t=new n.ScrolledWindow({child:this._view,heightRequest:200,hexpand:!0});this._apply(),this.addContent(t)}updateArgs(e){this._apply()}_apply(){!this._view||!this._model||(this._view.model=this._selectionModel(this._model),this._view.showSeparators=this.args.showSeparators,this._view.singleClickActivate=this.args.singleClickActivate)}_selectionModel(e){switch(this.args.selectionMode){case`multiple`:return n.MultiSelection.new(e);case`none`:return n.NoSelection.new(e);default:return n.SingleSelection.new(e)}}};o.type_ensure(el.$gtype);const tl={stories:[el]},nl=[{label:`Single`,accelerator:`<Control>C`},{label:`Modifier order`,accelerator:`<Shift><Control>a`},{label:`Alternatives`,accelerator:`<Shift>A Home`},{label:`Range`,accelerator:`<Alt>1...9`},{label:`In sequence`,accelerator:`<Control>C+<Control>X`},{label:`Together`,accelerator:`Control_L&Control_R`},{label:`Nested`,accelerator:`<Alt>1...9 <Alt>0`},{label:`Unset`,accelerator:``}],rl={title:`Presentation/Shortcut Label`,description:`Adw.ShortcutLabel — an accelerator drawn as keycaps. The four grammar levels: alternatives (space), a range (...), pressed in sequence (+), and pressed together (&).`,controls:[{name:`accelerator`,label:`Accelerator`,type:K.SELECT,options:[{label:`Ctrl+C`,value:`<Control>C`},{label:`Modifier order (Shift+Ctrl+A)`,value:`<Shift><Control>a`},{label:`Alternatives (Shift+A / Home)`,value:`<Shift>A Home`},{label:`Range (Alt+1…9)`,value:`<Alt>1...9`},{label:`In sequence (Ctrl+C → Ctrl+X)`,value:`<Control>C+<Control>X`},{label:`Together (Ctrl L + Ctrl R)`,value:`Control_L&Control_R`},{label:`Nested (Alt+1…9 / Alt+0)`,value:`<Alt>1...9 <Alt>0`},{label:`Glyph key (Ctrl+Space)`,value:`<Control>space`},{label:`Arrow key (Left)`,value:`Left`},{label:`Unset — shows the placeholder`,value:``}],defaultValue:`<Control>C`},{name:`disabledText`,label:`Placeholder`,type:K.TEXT,defaultValue:`Disabled`}]},il={title:`Presentation/Shortcut Label (All Levels)`,description:`Every Adw.ShortcutLabel grammar level at once: alternatives (space), a range (...), pressed in sequence (+), pressed together (&) — plus GTK's fixed keycap order and the disabled placeholder.`,controls:[{name:`disabledText`,label:`Placeholder`,type:K.TEXT,defaultValue:`Disabled`}]};var al=__exportAll({ShortcutLabelLevelsStory:()=>sl,ShortcutLabelStories:()=>cl,ShortcutLabelStory:()=>ol}),ol=class ShortcutLabelStory extends X{_widget=null;static{o.registerClass({GTypeName:`AdwStorybookShortcutLabel`},ShortcutLabelStory)}constructor(){super(X.fromMeta(ShortcutLabelStory.getMetadata(),`Default`))}static getMetadata(){return{...rl,component:s.ShortcutLabel.$gtype}}initialize(){this._widget=new s.ShortcutLabel({accelerator:this.args.accelerator,disabledText:this.args.disabledText,halign:n.Align.CENTER,valign:n.Align.CENTER}),this.addContent(this._widget)}updateArgs(e){this._widget&&(this._widget.disabledText=this.args.disabledText,this._widget.accelerator=this.args.accelerator)}};o.type_ensure(ol.$gtype);var sl=class ShortcutLabelLevelsStory extends X{_widgets=[];static{o.registerClass({GTypeName:`AdwStorybookShortcutLabelLevels`},ShortcutLabelLevelsStory)}constructor(){super(X.fromMeta(ShortcutLabelLevelsStory.getMetadata(),`Default`))}static getMetadata(){return{...il,component:s.ShortcutLabel.$gtype}}initialize(){let e=new n.Grid({row_spacing:12,column_spacing:24});for(let[t,r]of nl.entries()){let i=new n.Label({label:r.label,halign:n.Align.START});i.add_css_class(`dimmed`),e.attach(i,0,t,1,1);let o=new s.ShortcutLabel({accelerator:r.accelerator,disabledText:this.args.disabledText,halign:n.Align.END,hexpand:!0});e.attach(o,1,t,1,1),this._widgets.push(o)}this.addContent(e)}updateArgs(e){for(let e of this._widgets)e.disabledText=this.args.disabledText}};o.type_ensure(sl.$gtype);const cl={stories:[ol,sl]},ll={title:`Presentation/Spinner`,description:`Adw.Spinner — a lightweight loading indicator that spins continuously while visible.`,controls:[{name:`size`,label:`Size`,type:K.RANGE,min:16,max:64,step:4,defaultValue:48}]};var ul=__exportAll({SpinnerStories:()=>fl,SpinnerStory:()=>dl}),dl=class SpinnerStory extends X{_spinner=null;static{o.registerClass({GTypeName:`AdwStorybookSpinner`},SpinnerStory)}constructor(){super(X.fromMeta(SpinnerStory.getMetadata(),`Default`))}static getMetadata(){return{...ll,component:s.Spinner.$gtype}}initialize(){let e=this.args.size;this._spinner=new s.Spinner({widthRequest:e,heightRequest:e,halign:n.Align.CENTER,valign:n.Align.CENTER}),this.addContent(this._spinner)}updateArgs(e){if(!this._spinner)return;let t=this.args.size;this._spinner.widthRequest=t,this._spinner.heightRequest=t}};o.type_ensure(dl.$gtype);const fl={stories:[dl]},pl={title:`Presentation/Status Page`,description:`Adw.StatusPage — a full-page empty state with an icon, title, description and optional action.`,controls:[{name:`iconName`,label:`Icon`,type:K.SELECT,options:[{label:`Folder`,value:`folder-symbolic`},{label:`Mail`,value:`mail-unread-symbolic`},{label:`Search`,value:`system-search-symbolic`},{label:`Star`,value:`starred-symbolic`}],defaultValue:`folder-symbolic`},{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`No Documents`},{name:`description`,label:`Description`,type:K.TEXT,defaultValue:`Documents you create or open will appear here.`}]};var ml=__exportAll({StatusPageStories:()=>gl,StatusPageStory:()=>hl}),hl=class StatusPageStory extends X{_statusPage=null;static{o.registerClass({GTypeName:`AdwStorybookStatusPage`},StatusPageStory)}constructor(){super(X.fromMeta(StatusPageStory.getMetadata(),`Default`))}static getMetadata(){return{...pl,component:s.StatusPage.$gtype}}initialize(){let e=new n.Button({label:`New Document`,halign:n.Align.CENTER,cssClasses:[`pill`,`suggested-action`]});this._statusPage=new s.StatusPage({iconName:this.args.iconName,title:this.args.title,description:this.args.description,child:e,widthRequest:460,heightRequest:320}),this.addContent(this._statusPage)}updateArgs(e){this._statusPage&&(this._statusPage.iconName=this.args.iconName,this._statusPage.title=this.args.title,this._statusPage.description=this.args.description)}};o.type_ensure(hl.$gtype);const gl={stories:[hl]},_l={Pictures:[`Holiday`,`Screenshots`],Music:[`Albums`],Notes:[]},vl={title:`Presentation/Tree Expander`,description:`Gtk.TreeExpander — the indent and the disclosure arrow a tree row wears in front of its contents. A leaf takes one indent in place of the arrow, so its text lines up with its siblings.`,controls:[{name:`expanded`,label:`Expanded`,type:K.BOOLEAN,defaultValue:!0},{name:`hideExpander`,label:`Hide the arrow`,type:K.BOOLEAN,defaultValue:!1},{name:`indentForIcon`,label:`Indent leaves by an arrow`,type:K.BOOLEAN,defaultValue:!0}]};var yl=__exportAll({TreeExpanderStories:()=>xl,TreeExpanderStory:()=>bl}),bl=class TreeExpanderStory extends X{_view=null;_tree=null;_expanders=new Set;static{o.registerClass({GTypeName:`AdwStorybookTreeExpander`},TreeExpanderStory)}constructor(){super(X.fromMeta(TreeExpanderStory.getMetadata(),`Default`))}static getMetadata(){return{...vl,component:n.TreeExpander.$gtype}}initialize(){let e=n.StringList.new(Object.keys(_l));this._tree=n.TreeListModel.new(e,!1,!1,e=>{let t=_l[e.string]??[];return t.length===0?null:n.StringList.new([...t])});let t=new n.SignalListItemFactory;t.connect(`setup`,(e,t)=>{let r=t;r.focusable=!1;let i=new n.TreeExpander;i.child=new n.Label({xalign:0}),r.child=i,this._expanders.add(i)}),t.connect(`teardown`,(e,t)=>{let n=t.child;n!==null&&this._expanders.delete(n)}),t.connect(`bind`,(e,t)=>{let n=t,r=n.child,i=n.item;r.listRow=i,r.child.label=i.item.string,this._applyTo(r)}),this._view=new n.ListView({model:n.SingleSelection.new(this._tree),factory:t,vexpand:!0});let r=new n.ScrolledWindow({child:this._view,heightRequest:200,hexpand:!0});this.addContent(r),this._apply()}updateArgs(e){this._apply()}_apply(){if(this._tree!==null){for(let e=0;e<this._tree.get_n_items();e++){let t=this._tree.get_row(e);t!==null&&t.depth===0&&(t.expanded=this.args.expanded)}for(let e of this._expanders)this._applyTo(e)}}_applyTo(e){e.hideExpander=this.args.hideExpander,e.indentForIcon=this.args.indentForIcon}};o.type_ensure(bl.$gtype);const xl={stories:[bl]},Sl={title:`Presentation/WindowHandle`,description:`Gtk.WindowHandle — the titlebar strip. Dragging it moves the window; a double click, a middle click and a right click raise the window actions the compositor (or, here, the titlebar settings) names.`,controls:[{name:`action`,label:`Double-click action`,type:K.SELECT,options:[{label:`Toggle maximize`,value:`toggle-maximize`},{label:`Minimize`,value:`minimize`},{label:`Menu`,value:`menu`},{label:`None`,value:`none`}],defaultValue:`toggle-maximize`}]};var Cl=__exportAll({WindowHandleStories:()=>Tl,WindowHandleStory:()=>wl}),wl=class WindowHandleStory extends X{_handle=null;static{o.registerClass({GTypeName:`AdwStorybookWindowHandle`},WindowHandleStory)}constructor(){super(X.fromMeta(WindowHandleStory.getMetadata(),`Default`))}static getMetadata(){return{...Sl,component:n.WindowHandle.$gtype}}initialize(){let e=new s.HeaderBar;e.set_title_widget(new s.WindowTitle({title:`Notes`})),this._handle=new n.WindowHandle({child:e,halign:n.Align.CENTER}),this._apply(),this.addContent(this._handle)}updateArgs(e){this._apply()}_apply(){this.args.action}};o.type_ensure(wl.$gtype);const Tl={stories:[wl]},El={title:`Presentation/Window Title`,description:`Adw.WindowTitle — a compact title/subtitle widget intended for a window or header bar.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Inbox`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`3 unread messages`}]};var Dl=__exportAll({WindowTitleStories:()=>kl,WindowTitleStory:()=>Ol}),Ol=class WindowTitleStory extends X{_windowTitle=null;static{o.registerClass({GTypeName:`AdwStorybookWindowTitle`},WindowTitleStory)}constructor(){super(X.fromMeta(WindowTitleStory.getMetadata(),`Default`))}static getMetadata(){return{...El,component:s.WindowTitle.$gtype}}initialize(){this._windowTitle=new s.WindowTitle({title:this.args.title,subtitle:this.args.subtitle}),this.addContent(this._windowTitle)}updateArgs(e){this._windowTitle&&(this._windowTitle.title=this.args.title,this._windowTitle.subtitle=this.args.subtitle)}};o.type_ensure(Ol.$gtype);const kl={stories:[Ol]},Al={title:`Boxed Lists/Action Row`,description:`Adw.ActionRow — a preferences row with a title/subtitle, a prefix icon and a suffix button, shown inside a boxed list.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Wi-Fi`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`Connected to Highgarden 5GHz`},{name:`iconName`,label:`Prefix icon`,type:K.SELECT,options:[{label:`Network`,value:`network-wireless-symbolic`},{label:`Folder`,value:`folder-symbolic`},{label:`Starred`,value:`starred-symbolic`}],defaultValue:`network-wireless-symbolic`},{name:`activatable`,label:`Activatable`,type:K.BOOLEAN,defaultValue:!0}]};var jl=__exportAll({ActionRowStories:()=>Nl,ActionRowStory:()=>Ml}),Ml=class ActionRowStory extends X{_row=null;_icon=null;_button=null;static{o.registerClass({GTypeName:`AdwStorybookActionRow`},ActionRowStory)}constructor(){super(X.fromMeta(ActionRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Al,component:s.ActionRow.$gtype}}initialize(){this._row=new s.ActionRow({title:this.args.title,subtitle:this.args.subtitle}),this._icon=new n.Image({iconName:this.args.iconName}),this._row.add_prefix(this._icon),this._button=new n.Button({iconName:`go-next-symbolic`,valign:n.Align.CENTER}),this._button.add_css_class(`flat`),this._row.add_suffix(this._button),this._row.activatableWidget=this._button,this._row.activatable=this.args.activatable;let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){!this._row||!this._icon||(this._row.title=this.args.title,this._row.subtitle=this.args.subtitle,this._icon.iconName=this.args.iconName,this._row.activatable=this.args.activatable)}};o.type_ensure(Ml.$gtype);const Nl={stories:[Ml]},Pl={title:`Boxed Lists/Button Row`,description:`Adw.ButtonRow — a full-width row that acts as a button, with an optional icon and style class.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Add account`},{name:`startIconName`,label:`Start icon`,type:K.SELECT,options:[{label:`Add`,value:`list-add-symbolic`},{label:`Trash`,value:`user-trash-symbolic`},{label:`None`,value:``}],defaultValue:`list-add-symbolic`},{name:`style`,label:`Style`,type:K.SELECT,options:[{label:`None`,value:`none`},{label:`Suggested`,value:`suggested-action`},{label:`Destructive`,value:`destructive-action`}],defaultValue:`suggested-action`}]};var Fl=__exportAll({ButtonRowStories:()=>Rl,ButtonRowStory:()=>Ll});const Il=[`suggested-action`,`destructive-action`];var Ll=class ButtonRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookButtonRow`},ButtonRowStory)}constructor(){super(X.fromMeta(ButtonRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Pl,component:s.ButtonRow.$gtype}}initialize(){this._row=new s.ButtonRow({title:this.args.title,startIconName:this.args.startIconName}),this._applyStyle(this.args.style);let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}_applyStyle(e){if(this._row){for(let e of Il)this._row.remove_css_class(e);e!==`none`&&this._row.add_css_class(e)}}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.startIconName=this.args.startIconName,this._applyStyle(this.args.style))}};o.type_ensure(Ll.$gtype);const Rl={stories:[Ll]},zl=[`Blue`,`Teal`,`Green`,`Orange`,`Purple`],Bl={title:`Boxed Lists/Combo Row`,description:`Adw.ComboRow — a preferences row with an inline drop-down backed by a Gtk.StringList.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Accent colour`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`Used to highlight selected items`},{name:`selected`,label:`Selected`,type:K.NUMBER,min:0,max:4,step:1,defaultValue:1}]};var Vl=__exportAll({ComboRowStories:()=>Ul,ComboRowStory:()=>Hl}),Hl=class ComboRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookComboRow`},ComboRowStory)}constructor(){super(X.fromMeta(ComboRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Bl,component:s.ComboRow.$gtype}}initialize(){this._row=new s.ComboRow({title:this.args.title,subtitle:this.args.subtitle,model:new n.StringList({strings:[...zl]}),selected:this.args.selected});let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.subtitle=this.args.subtitle,this._row.selected=this.args.selected)}};o.type_ensure(Hl.$gtype);const Ul={stories:[Hl]},Wl={title:`Boxed Lists/Entry Row`,description:`Adw.EntryRow — a preferences row whose title doubles as placeholder text for an inline entry.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Display name`},{name:`text`,label:`Text`,type:K.TEXT,defaultValue:`Ada Lovelace`},{name:`showApplyButton`,label:`Show apply button`,type:K.BOOLEAN,defaultValue:!0}]};var Gl=__exportAll({EntryRowStories:()=>ql,EntryRowStory:()=>Kl}),Kl=class EntryRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookEntryRow`},EntryRowStory)}constructor(){super(X.fromMeta(EntryRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Wl,component:s.EntryRow.$gtype}}initialize(){this._row=new s.EntryRow({title:this.args.title,text:this.args.text,showApplyButton:this.args.showApplyButton});let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.text=this.args.text,this._row.showApplyButton=this.args.showApplyButton)}};o.type_ensure(Kl.$gtype);const ql={stories:[Kl]},Jl={title:`Boxed Lists/Expander Row`,description:`Adw.ExpanderRow — a preferences row that discloses nested rows and can carry an enable switch.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Proxy settings`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`Route traffic through a custom proxy`},{name:`expanded`,label:`Expanded`,type:K.BOOLEAN,defaultValue:!0},{name:`showEnableSwitch`,label:`Show enable switch`,type:K.BOOLEAN,defaultValue:!1}]};var Yl=__exportAll({ExpanderRowStories:()=>Zl,ExpanderRowStory:()=>Xl}),Xl=class ExpanderRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookExpanderRow`},ExpanderRowStory)}constructor(){super(X.fromMeta(ExpanderRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Jl,component:s.ExpanderRow.$gtype}}initialize(){this._row=new s.ExpanderRow({title:this.args.title,subtitle:this.args.subtitle,expanded:this.args.expanded,showEnableSwitch:this.args.showEnableSwitch}),this._row.add_row(new s.EntryRow({title:`Host`,text:`proxy.example.com`})),this._row.add_row(new s.SwitchRow({title:`Use authentication`,active:!1}));let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.subtitle=this.args.subtitle,this._row.expanded=this.args.expanded,this._row.showEnableSwitch=this.args.showEnableSwitch)}};o.type_ensure(Xl.$gtype);const Zl={stories:[Xl]},Ql={title:`Boxed Lists/Password Entry Row`,description:`Adw.PasswordEntryRow — an entry row that masks its contents and shows a peek toggle.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Password`},{name:`text`,label:`Text`,type:K.TEXT,defaultValue:`correct-horse-battery`}]};var $l=__exportAll({PasswordEntryRowStories:()=>tu,PasswordEntryRowStory:()=>eu}),eu=class PasswordEntryRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookPasswordEntryRow`},PasswordEntryRowStory)}constructor(){super(X.fromMeta(PasswordEntryRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Ql,component:s.PasswordEntryRow.$gtype}}initialize(){this._row=new s.PasswordEntryRow({title:this.args.title,text:this.args.text});let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.text=this.args.text)}};o.type_ensure(eu.$gtype);const tu={stories:[eu]},nu={title:`Boxed Lists/Preferences Group`,description:`Adw.PreferencesGroup — the boxed-list container that gathers a title, description, header-suffix widget and rows.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Account`},{name:`description`,label:`Description`,type:K.TEXT,defaultValue:`Manage how this device signs in and syncs.`}]};var ru=__exportAll({PreferencesGroupStories:()=>au,PreferencesGroupStory:()=>iu}),iu=class PreferencesGroupStory extends X{_prefsGroup=null;static{o.registerClass({GTypeName:`AdwStorybookPreferencesGroup`},PreferencesGroupStory)}constructor(){super(X.fromMeta(PreferencesGroupStory.getMetadata(),`Default`))}static getMetadata(){return{...nu,component:s.PreferencesGroup.$gtype}}initialize(){let e=new n.Button({label:`Sign out`,valign:n.Align.CENTER});e.add_css_class(`flat`),this._prefsGroup=new s.PreferencesGroup({title:this.args.title,description:this.args.description,headerSuffix:e});let t=new s.EntryRow({title:`Display name`,text:`Grace Hopper`});this._prefsGroup.add(t);let r=new s.SwitchRow({title:`Sync over Wi-Fi only`,subtitle:`Avoid using mobile data for backups`,active:!0});this._prefsGroup.add(r);let i=new s.ComboRow({title:`Region`,model:new n.StringList({strings:[`Europe`,`Americas`,`Asia`,`Oceania`]}),selected:0});this._prefsGroup.add(i);let o=new s.Clamp({maximumSize:400,child:this._prefsGroup});this.addContent(o)}updateArgs(e){this._prefsGroup&&(this._prefsGroup.title=this.args.title,this._prefsGroup.description=this.args.description)}};o.type_ensure(iu.$gtype);const au={stories:[iu]},ou={title:`Boxed Lists/Preferences Row`,description:`Adw.PreferencesRow — the base of every boxed-list row: a list row with a title that the preferences dialog searches. The title can carry Pango markup and be made selectable.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`A <b>plain</b> preferences row`},{name:`useMarkup`,label:`Use markup`,type:K.BOOLEAN,defaultValue:!0},{name:`titleSelectable`,label:`Title selectable`,type:K.BOOLEAN,defaultValue:!1}]};var su=__exportAll({PreferencesRowStories:()=>lu,PreferencesRowStory:()=>cu}),cu=class PreferencesRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookPreferencesRow`},PreferencesRowStory)}constructor(){super(X.fromMeta(PreferencesRowStory.getMetadata(),`Default`))}static getMetadata(){return{...ou,component:s.PreferencesRow.$gtype}}initialize(){this._row=new s.PreferencesRow,this._apply();let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._apply()}_apply(){this._row&&(this._row.title=this.args.title,this._row.useMarkup=this.args.useMarkup,this._row.titleSelectable=this.args.titleSelectable)}};o.type_ensure(cu.$gtype);const lu={stories:[cu]},uu={title:`Boxed Lists/Spin Row`,description:`Adw.SpinRow — a preferences row with an inline spin button over a numeric adjustment.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Font size`},{name:`value`,label:`Value`,type:K.NUMBER,min:0,max:100,step:1,defaultValue:16},{name:`digits`,label:`Digits`,type:K.NUMBER,min:0,max:4,step:1,defaultValue:0}]};var du=__exportAll({SpinRowStories:()=>pu,SpinRowStory:()=>fu}),fu=class SpinRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookSpinRow`},SpinRowStory)}constructor(){super(X.fromMeta(SpinRowStory.getMetadata(),`Default`))}static getMetadata(){return{...uu,component:s.SpinRow.$gtype}}initialize(){this._row=new s.SpinRow({title:this.args.title,adjustment:new n.Adjustment({lower:0,upper:100,value:this.args.value,stepIncrement:1,pageIncrement:10}),digits:this.args.digits});let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.value=this.args.value,this._row.digits=this.args.digits)}};o.type_ensure(fu.$gtype);const pu={stories:[fu]},mu={title:`Boxed Lists/Switch Row`,description:`Adw.SwitchRow — a preferences row with a trailing switch, shown inside a boxed list.`,controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Automatic updates`},{name:`subtitle`,label:`Subtitle`,type:K.TEXT,defaultValue:`Download and install updates without asking`},{name:`active`,label:`Active`,type:K.BOOLEAN,defaultValue:!0}]};var hu=__exportAll({SwitchRowStories:()=>_u,SwitchRowStory:()=>gu}),gu=class SwitchRowStory extends X{_row=null;static{o.registerClass({GTypeName:`AdwStorybookSwitchRow`},SwitchRowStory)}constructor(){super(X.fromMeta(SwitchRowStory.getMetadata(),`Default`))}static getMetadata(){return{...mu,component:s.SwitchRow.$gtype}}initialize(){this._row=new s.SwitchRow({title:this.args.title,subtitle:this.args.subtitle,active:this.args.active});let e=new s.PreferencesGroup;e.add(this._row);let t=new s.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.subtitle=this.args.subtitle,this._row.active=this.args.active)}};o.type_ensure(gu.$gtype);const _u={stories:[gu]},vu={title:`Text/Editable Label`,description:`Gtk.EditableLabel — a label you click and edit in place. Enter starts editing, Enter commits, Escape discards, and editable=false leaves it a label; the draft lives in the entry, not in the label.`,controls:[{name:`text`,label:`Text`,type:K.TEXT,defaultValue:`Ada Lovelace`},{name:`editable`,label:`Editable`,type:K.BOOLEAN,defaultValue:!0},{name:`editing`,label:`Editing`,type:K.BOOLEAN,defaultValue:!1}]};var yu=__exportAll({EditableLabelStories:()=>xu,EditableLabelStory:()=>bu}),bu=class EditableLabelStory extends X{_label=null;static{o.registerClass({GTypeName:`AdwStorybookEditableLabel`},EditableLabelStory)}constructor(){super(X.fromMeta(EditableLabelStory.getMetadata(),`Default`))}static getMetadata(){return{...vu,component:n.EditableLabel.$gtype}}initialize(){this._label=new n.EditableLabel({halign:n.Align.CENTER}),this._apply(),this.addContent(this._label)}updateArgs(e){this._apply()}_apply(){this._label&&(this._label.editing||(this._label.text=this.args.text),this._label.editable=this.args.editable,this._label.editing=this.args.editing)}};o.type_ensure(bu.$gtype);const xu={stories:[bu]},Su={title:`Text/Search Bar`,description:`Gtk.SearchBar — the strip that reveals a search entry when search starts. The property IS the revealer's reveal-child, so one boolean decides both whether the strip is shown and whether the search is on; hiding it clears the entry.`,controls:[{name:`searchModeEnabled`,label:`Search mode`,type:K.BOOLEAN,defaultValue:!1},{name:`showCloseButton`,label:`Close button`,type:K.BOOLEAN,defaultValue:!0}]};var Cu=__exportAll({SearchBarStories:()=>Tu,SearchBarStory:()=>wu}),wu=class SearchBarStory extends X{_bar=null;_entry=null;static{o.registerClass({GTypeName:`AdwStorybookSearchBar`},SearchBarStory)}constructor(){super(X.fromMeta(SearchBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Su,component:n.SearchBar.$gtype}}initialize(){this._entry=new n.SearchEntry({hexpand:!0}),this._bar=new n.SearchBar({child:this._entry}),this._apply(),this.addContent(this._bar)}updateArgs(e){this._apply()}_apply(){this._bar&&(this._bar.search_mode_enabled=this.args.searchModeEnabled,this._bar.show_close_button=this.args.showCloseButton)}};o.type_ensure(wu.$gtype);const Tu={stories:[wu]},Eu={title:`Text/Text View`,description:`Gtk.TextView — the multi-line editor. Its text lives in a Gtk.TextBuffer rather than in a property, wrap-mode and justification are Pango's, and accepts-tab defaults to TRUE, which is the opposite of a browser's.`,controls:[{name:`text`,label:`Text`,type:K.TEXT,defaultValue:`A text view holds as many lines as it is given.
347
+ Tab inserts a tab character.`},{name:`wrapMode`,label:`Wrap mode`,type:K.SELECT,options:[{label:`None`,value:`none`},{label:`Char`,value:`char`},{label:`Word`,value:`word`},{label:`Word or char`,value:`word-char`}],defaultValue:`none`},{name:`justification`,label:`Justification`,type:K.SELECT,options:[{label:`Left`,value:`left`},{label:`Right`,value:`right`},{label:`Center`,value:`center`},{label:`Fill`,value:`fill`}],defaultValue:`left`},{name:`monospace`,label:`Monospace`,type:K.BOOLEAN,defaultValue:!1},{name:`acceptsTab`,label:`Tab inserts a tab`,type:K.BOOLEAN,defaultValue:!0},{name:`cursorVisible`,label:`Show cursor`,type:K.BOOLEAN,defaultValue:!0},{name:`topMargin`,label:`Top margin`,type:K.NUMBER,defaultValue:6}]};var Du=__exportAll({TextViewStories:()=>ku,TextViewStory:()=>Ou}),Ou=class TextViewStory extends X{_buffer=null;_view=null;static{o.registerClass({GTypeName:`AdwStorybookTextView`},TextViewStory)}constructor(){super(X.fromMeta(TextViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Eu,component:n.TextView.$gtype}}initialize(){this._buffer=new n.TextBuffer,this._view=new n.TextView({buffer:this._buffer,hexpand:!0,vexpand:!1,top_margin:6});let e=new n.ScrolledWindow({hscrollbar_policy:n.PolicyType.AUTOMATIC,vscrollbar_policy:n.PolicyType.AUTOMATIC,hexpand:!0,vexpand:!1,child:this._view});e.set_size_request(320,-1),this._apply(),this.addContent(e)}updateArgs(e){this._apply()}_apply(){if(!this._buffer||!this._view)return;let e=this.args.text;this._buffer.text!==e&&(this._buffer.text=e),this._view.wrap_mode=this.args.wrapMode??`none`,this._view.justification=this.args.justification??`left`,this._view.monospace=this.args.monospace,this._view.accepts_tab=this.args.acceptsTab,this._view.cursor_visible=this.args.cursorVisible,this._view.top_margin=Number(this.args.topMargin??0)}};o.type_ensure(Ou.$gtype);const ku={stories:[Ou]},Au={title:`Text/Text`,description:`Gtk.Text — the single-line text widget every Gtk.Entry is built on. Standalone it is a field with a placeholder and a length limit; visibility=false masks it, propagate-text-width grows it with its text.`,controls:[{name:`text`,label:`Text`,type:K.TEXT,defaultValue:`Ada Lovelace`},{name:`placeholderText`,label:`Placeholder`,type:K.TEXT,defaultValue:``},{name:`editable`,label:`Editable`,type:K.BOOLEAN,defaultValue:!0},{name:`visibility`,label:`Visible`,type:K.BOOLEAN,defaultValue:!0},{name:`maxLength`,label:`Max length (0 = none)`,type:K.NUMBER,defaultValue:0},{name:`propagateTextWidth`,label:`Grow with text`,type:K.BOOLEAN,defaultValue:!1}]};var ju=__exportAll({TextStories:()=>Nu,TextStory:()=>Mu}),Mu=class TextStory extends X{_text=null;static{o.registerClass({GTypeName:`AdwStorybookText`},TextStory)}constructor(){super(X.fromMeta(TextStory.getMetadata(),`Default`))}static getMetadata(){return{...Au,component:n.Text.$gtype}}initialize(){this._text=new n.Text({halign:n.Align.CENTER}),this._apply(),this.addContent(this._text)}updateArgs(e){this._apply()}_apply(){this._text&&(this._text.text=this.args.text,this._text.placeholder_text=this.args.placeholderText,this._text.editable=this.args.editable,this._text.visibility=this.args.visibility,this._text.max_length=Number(this.args.maxLength??0),this._text.propagate_text_width=this.args.propagateTextWidth)}};o.type_ensure(Mu.$gtype);const Nu={stories:[Mu]},Pu=[{name:`allowScrollWheel`,label:`Allow scroll wheel`,type:K.BOOLEAN,defaultValue:!0},{name:`allowLongSwipes`,label:`Allow long swipes`,type:K.BOOLEAN,defaultValue:!1}],Fu={title:`View Switching/Carousel (Dots)`,description:`Adw.Carousel — a horizontally swipeable pager with three pages, paired with Adw.CarouselIndicatorDots.`,controls:Pu},Iu={title:`View Switching/Carousel (Lines)`,description:`Adw.Carousel — the same swipeable pager paired with Adw.CarouselIndicatorLines instead of dots.`,controls:Pu};var Lu=__exportAll({CarouselDotsStory:()=>zu,CarouselLinesStory:()=>Bu,CarouselStories:()=>Vu});const Ru=[{title:`Welcome`,css:`accent`},{title:`Discover`,css:`success`},{title:`Get started`,css:`warning`}];function buildPage(e,t){let r=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,widthRequest:440,heightRequest:260});r.add_css_class(`card`),r.add_css_class(t);let i=new n.Label({label:e,vexpand:!0,valign:n.Align.CENTER});return i.add_css_class(`title-1`),r.append(i),r}var zu=class CarouselDotsStory extends X{_carousel=null;static{o.registerClass({GTypeName:`AdwStorybookCarouselDots`},CarouselDotsStory)}constructor(){super(X.fromMeta(CarouselDotsStory.getMetadata(),`Default`))}static getMetadata(){return{...Fu,component:s.Carousel.$gtype}}initialize(){this._carousel=new s.Carousel({allowScrollWheel:this.args.allowScrollWheel,allowLongSwipes:this.args.allowLongSwipes,vexpand:!0});for(let e of Ru)this._carousel.append(buildPage(e.title,e.css));let e=new s.CarouselIndicatorDots({carousel:this._carousel}),t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:340});t.append(this._carousel),t.append(e),this.addContent(t)}updateArgs(e){this._carousel&&(this._carousel.allowScrollWheel=this.args.allowScrollWheel,this._carousel.allowLongSwipes=this.args.allowLongSwipes)}};o.type_ensure(zu.$gtype);var Bu=class CarouselLinesStory extends X{_carousel=null;static{o.registerClass({GTypeName:`AdwStorybookCarouselLines`},CarouselLinesStory)}constructor(){super(X.fromMeta(CarouselLinesStory.getMetadata(),`Default`))}static getMetadata(){return{...Iu,component:s.Carousel.$gtype}}initialize(){this._carousel=new s.Carousel({allowScrollWheel:this.args.allowScrollWheel,allowLongSwipes:this.args.allowLongSwipes,vexpand:!0});for(let e of Ru)this._carousel.append(buildPage(e.title,e.css));let e=new s.CarouselIndicatorLines({carousel:this._carousel}),t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:340});t.append(this._carousel),t.append(e),this.addContent(t)}updateArgs(e){this._carousel&&(this._carousel.allowScrollWheel=this.args.allowScrollWheel,this._carousel.allowLongSwipes=this.args.allowLongSwipes)}};o.type_ensure(Bu.$gtype);const Vu={stories:[zu,Bu]},Hu={title:`View Switching/Inline View Switcher`,description:`Adw.InlineViewSwitcher — a compact inline switcher that can show labels, icons, or both for an Adw.ViewStack.`,controls:[{name:`displayMode`,label:`Display mode`,type:K.SELECT,options:[{label:`Labels`,value:`labels`},{label:`Icons`,value:`icons`},{label:`Both`,value:`both`}],defaultValue:`both`}]};var Uu=__exportAll({InlineViewSwitcherStories:()=>Gu,InlineViewSwitcherStory:()=>Wu}),Wu=class InlineViewSwitcherStory extends X{_switcher=null;static{o.registerClass({GTypeName:`AdwStorybookInlineViewSwitcher`},InlineViewSwitcherStory)}constructor(){super(X.fromMeta(InlineViewSwitcherStory.getMetadata(),`Default`))}static getMetadata(){return{...Hu,component:s.InlineViewSwitcher.$gtype}}buildPage(e,t,n){return new s.StatusPage({iconName:t,title:e,description:n,vexpand:!0})}initialize(){let e=new s.ViewStack({vexpand:!0});e.add_titled_with_icon(this.buildPage(`Overview`,`view-grid-symbolic`,`A quick summary of your project.`),`overview`,`Overview`,`view-grid-symbolic`),e.add_titled_with_icon(this.buildPage(`Activity`,`document-edit-symbolic`,`Recent edits and changes.`),`activity`,`Activity`,`document-edit-symbolic`),e.add_titled_with_icon(this.buildPage(`Settings`,`emblem-system-symbolic`,`Configure how things behave.`),`settings`,`Settings`,`emblem-system-symbolic`),this._switcher=new s.InlineViewSwitcher({stack:e,displayMode:this.modeFromArg(this.args.displayMode),halign:n.Align.CENTER});let t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:340});t.append(this._switcher),t.append(e),this.addContent(t)}modeFromArg(e){return e===`labels`?s.InlineViewSwitcherDisplayMode.LABELS:e===`icons`?s.InlineViewSwitcherDisplayMode.ICONS:s.InlineViewSwitcherDisplayMode.BOTH}updateArgs(e){this._switcher&&(this._switcher.displayMode=this.modeFromArg(this.args.displayMode))}};o.type_ensure(Wu.$gtype);const Gu={stories:[Wu]},Ku=[{name:`overview`,label:`Overview`,body:`A notebook brings its own tab strip.`},{name:`activity`,label:`Activity`,body:`tab-pos says which edge the strip is on.`},{name:`notes`,label:``,body:`No tab-label: the tab reads "Page 3".`}],qu={title:`View Switching/Notebook`,description:'Gtk.Notebook — the older page container, a stack that brings its own tab bar. `tab-pos` picks the edge (top, bottom, left, right), `show-tabs` takes the strip away, `show-border` is the bevel around the pages — a CSS class in C — and `page` is the current page by INDEX rather than by name. A GtkNotebookPage is a GObject rather than a widget, so its tab-label and friends live on the page itself, and a page without one gets the number "Page N" as its tab text. `enable-popup` puts the pages in a right-click menu.',controls:[{name:`tabPos`,label:`Tab position`,type:K.SELECT,options:[{label:`Top`,value:`top`},{label:`Bottom`,value:`bottom`},{label:`Left`,value:`left`},{label:`Right`,value:`right`}],defaultValue:`top`},{name:`showTabs`,label:`Show tabs`,type:K.BOOLEAN,defaultValue:!0},{name:`showBorder`,label:`Show border`,type:K.BOOLEAN,defaultValue:!0},{name:`enablePopup`,label:`Enable popup (right-click)`,type:K.BOOLEAN,defaultValue:!1}]};var Ju=__exportAll({NotebookStories:()=>Zu,NotebookStory:()=>Xu});const Yu={top:n.PositionType.TOP,bottom:n.PositionType.BOTTOM,left:n.PositionType.LEFT,right:n.PositionType.RIGHT};var Xu=class NotebookStory extends X{_notebook=null;static{o.registerClass({GTypeName:`AdwStorybookNotebook`},NotebookStory)}constructor(){super(X.fromMeta(NotebookStory.getMetadata(),`Default`))}static getMetadata(){return{...qu,component:n.Notebook.$gtype}}initialize(){this._notebook=new n.Notebook({vexpand:!0,widthRequest:480,heightRequest:320});for(let e of Ku){let t=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,spacing:6});t.append(new n.Label({label:e.label||e.name,cssClasses:[`title-4`]})),t.append(new n.Label({label:e.body,cssClasses:[`title-2`]}));let r=e.label?new n.Label({label:e.label}):null,i=new n.Label({label:e.label||e.name});this._notebook.append_page_menu(t,r,i)}this._apply(),this.addContent(this._notebook)}updateArgs(e){this._apply()}_apply(){this._notebook&&(this._notebook.tab_pos=Yu[this.args.tabPos]??n.PositionType.TOP,this._notebook.show_tabs=this.args.showTabs,this._notebook.enable_popup=this.args.enablePopup,this._notebook.show_border=this.args.showBorder)}};o.type_ensure(Xu.$gtype);const Zu={stories:[Xu]},Qu=[{name:`inbox`,title:`Inbox`,icon:`mail-unread-symbolic`,attn:!1,body:`Three unread conversations.`},{name:`starred`,title:`Starred`,icon:`starred-symbolic`,attn:!1,body:`Messages marked important.`},{name:`drafts`,title:`Drafts`,icon:`document-edit-symbolic`,attn:!0,body:`One draft needs attention.`},{name:`settings`,title:``,icon:`preferences-system-symbolic`,attn:!1,body:`No row: a title is the row.`}],$u={title:`View Switching/Stack Sidebar`,description:"Gtk.StackSidebar — a vertical list of a Gtk.Stack's pages, the sidebar counterpart of the stack switcher. A row is made of the page's TITLE alone: `update_row` never reads `icon-name`, so the page with only an icon at the end of this story gets no row at all, where the switcher would show an icon button for it. `needs-attention` puts a dot in front of the label.",controls:[{name:`transitionType`,label:`Transition type`,type:K.SELECT,options:[{label:`None`,value:`none`},{label:`Crossfade`,value:`crossfade`},{label:`Slide left / right`,value:`slide-left-right`}],defaultValue:`slide-left-right`}]};var ed=__exportAll({StackSidebarStories:()=>rd,StackSidebarStory:()=>nd});const td={none:n.StackTransitionType.NONE,crossfade:n.StackTransitionType.CROSSFADE,"slide-left-right":n.StackTransitionType.SLIDE_LEFT_RIGHT};var nd=class StackSidebarStory extends X{_stack=null;static{o.registerClass({GTypeName:`AdwStorybookStackSidebar`},StackSidebarStory)}constructor(){super(X.fromMeta(StackSidebarStory.getMetadata(),`Default`))}static getMetadata(){return{...$u,component:n.StackSidebar.$gtype}}initialize(){this._stack=new n.Stack({vexpand:!0,transitionDuration:200});for(let e of Qu){let t=new n.Label({label:e.body});t.add_css_class(`title-2`);let r=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,spacing:6});r.append(new n.Label({label:e.title||e.name,cssClasses:[`title-4`]})),r.append(t);let i=this._stack.add_titled(r,e.name,e.title);i.icon_name=e.icon,i.needs_attention=e.attn,i.use_underline=!0}let e=new n.StackSidebar({stack:this._stack}),t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:0});t.append(e);let r=new n.Paned({orientation:n.Orientation.HORIZONTAL,widthRequest:480,heightRequest:320});r.set_start_child(t),r.set_end_child(this._stack),r.set_position(180),this._apply(),this.addContent(r)}updateArgs(e){this._apply()}_apply(){this._stack&&(this._stack.transition_type=td[this.args.transitionType]??n.StackTransitionType.NONE)}};o.type_ensure(nd.$gtype);const rd={stories:[nd]},id=[{name:`inbox`,title:`Inbox`,icon:`mail-unread-symbolic`,attn:!1,body:`Three unread conversations.`},{name:`starred`,title:`Starred`,icon:`starred-symbolic`,attn:!1,body:`Messages marked important.`},{name:`archive`,title:`Archive`,icon:``,attn:!1,body:`Older conversations kept for reference.`},{name:`drafts`,title:``,icon:`document-edit-symbolic`,attn:!0,body:`One draft needs your attention.`}],ad={title:`View Switching/Stack Switcher`,description:"Gtk.StackSwitcher — a linked row of toggle buttons, one per page of a Gtk.Stack. A page with a title and no icon gets a label button; one with an icon and no title gets an icon button and puts the title on the switcher as a tooltip; a page with NEITHER is left out of the row entirely. `orientation` turns the row vertical, and `needs-attention` on a page puts a dot on its button.",controls:[{name:`orientation`,label:`Orientation`,type:K.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`transitionType`,label:`Transition type`,type:K.SELECT,options:[{label:`None`,value:`none`},{label:`Crossfade`,value:`crossfade`},{label:`Slide left / right`,value:`slide-left-right`}],defaultValue:`slide-left-right`}]};var od=__exportAll({StackSwitcherStories:()=>ld,StackSwitcherStory:()=>cd});const sd={none:n.StackTransitionType.NONE,crossfade:n.StackTransitionType.CROSSFADE,"slide-left-right":n.StackTransitionType.SLIDE_LEFT_RIGHT};var cd=class StackSwitcherStory extends X{_stack=null;_switcher=null;static{o.registerClass({GTypeName:`AdwStorybookStackSwitcher`},StackSwitcherStory)}constructor(){super(X.fromMeta(StackSwitcherStory.getMetadata(),`Default`))}static getMetadata(){return{...ad,component:n.StackSwitcher.$gtype}}initialize(){this._stack=new n.Stack({vexpand:!0,transitionDuration:200});for(let e of id){let t=new n.Label({label:e.body});t.add_css_class(`title-2`);let r=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,spacing:6});if(r.append(new n.Label({label:e.title||e.name,cssClasses:[`title-4`]})),r.append(t),e.icon){let t=this._stack.add_titled(r,e.name,e.title);t.icon_name=e.icon,t.needs_attention=e.attn,t.use_underline=!0}else{let t=this._stack.add_titled(r,e.name,e.title);t.needs_attention=e.attn,t.use_underline=!0}}this._switcher=new n.StackSwitcher({stack:this._stack,halign:n.Align.CENTER});let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:320});e.append(this._switcher),e.append(this._stack),this._apply(),this.addContent(e)}updateArgs(e){this._apply()}_apply(){!this._stack||!this._switcher||(this._stack.transition_type=sd[this.args.transitionType]??n.StackTransitionType.NONE,this._switcher.orientation=this.args.orientation===`vertical`?n.Orientation.VERTICAL:n.Orientation.HORIZONTAL)}};o.type_ensure(cd.$gtype);const ld={stories:[cd]},ud=[{name:`overview`,title:`Overview`,attn:!1,body:`Three pages, one visible at a time.`},{name:`activity`,title:`Activity`,attn:!1,body:`Switching is animated by transition-type.`},{name:`settings`,title:`Settings`,attn:!0,body:`This page wants your attention.`}],dd={title:`View Switching/Stack`,description:"Gtk.Stack — one visible child out of many, with the animated change between them. `transition-type` picks the animation and `transition-duration` its length; `hhomogeneous` and `vhomogeneous` say whether every page is allocated the same size. A Gtk.StackPage is a GObject rather than a widget, so its title, icon and needs-attention live on the page itself.",controls:[{name:`transitionType`,label:`Transition type`,type:K.SELECT,options:[{label:`None`,value:`none`},{label:`Crossfade`,value:`crossfade`},{label:`Slide left / right`,value:`slide-left-right`},{label:`Slide up / down`,value:`slide-up-down`},{label:`Over left / right`,value:`over-left-right`},{label:`Rotate left / right`,value:`rotate-left-right`}],defaultValue:`slide-left-right`},{name:`transitionDuration`,label:`Duration (ms)`,type:K.RANGE,min:0,max:600,step:50,defaultValue:200},{name:`interpolateSize`,label:`Interpolate size`,type:K.BOOLEAN,defaultValue:!1},{name:`hhomogeneous`,label:`HHomogeneous`,type:K.BOOLEAN,defaultValue:!0},{name:`vhomogeneous`,label:`VHomogeneous`,type:K.BOOLEAN,defaultValue:!0}]};var fd=__exportAll({StackStories:()=>hd,StackStory:()=>md});const pd={none:n.StackTransitionType.NONE,crossfade:n.StackTransitionType.CROSSFADE,"slide-left-right":n.StackTransitionType.SLIDE_LEFT_RIGHT,"slide-up-down":n.StackTransitionType.SLIDE_UP_DOWN,"over-left-right":n.StackTransitionType.OVER_LEFT_RIGHT,"rotate-left-right":n.StackTransitionType.ROTATE_LEFT_RIGHT};var md=class StackStory extends X{_stack=null;_switcher=null;static{o.registerClass({GTypeName:`AdwStorybookStack`},StackStory)}constructor(){super(X.fromMeta(StackStory.getMetadata(),`Default`))}static getMetadata(){return{...dd,component:n.Stack.$gtype}}initialize(){this._stack=new n.Stack({vexpand:!0,transitionDuration:200});for(let e of ud){let t=new n.Label({label:e.body,vexpand:!0});t.add_css_class(`title-2`);let r=new n.Box({orientation:n.Orientation.VERTICAL,halign:n.Align.CENTER,valign:n.Align.CENTER,spacing:6});r.append(new n.Label({label:e.title,cssClasses:[`title-4`]})),r.append(t);let i=this._stack.add_titled(r,e.name,e.title);i.needs_attention=e.attn,i.use_underline=!0}this._switcher=new n.StackSwitcher({stack:this._stack,halign:n.Align.CENTER});let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:320});e.append(this._switcher),e.append(this._stack),this._apply(),this.addContent(e)}updateArgs(e){this._apply()}_apply(){this._stack&&(this._stack.transition_type=pd[this.args.transitionType]??n.StackTransitionType.NONE,this._stack.transition_duration=this.args.transitionDuration,this._stack.interpolate_size=this.args.interpolateSize,this._stack.hhomogeneous=this.args.hhomogeneous,this._stack.vhomogeneous=this.args.vhomogeneous)}};o.type_ensure(md.$gtype);const hd={stories:[md]},gd={title:`View Switching/Tab Bar`,description:"Adw.TabBar — the tab bar as a widget of its own, bound to an Adw.TabView through its `view`: one chip per page, an action widget on either side, and a strip that can autohide or expand its chips.",controls:[{name:`autohide`,label:`Autohide`,type:K.BOOLEAN,defaultValue:!1},{name:`expandTabs`,label:`Expand tabs`,type:K.BOOLEAN,defaultValue:!1},{name:`inverted`,label:`Inverted`,type:K.BOOLEAN,defaultValue:!1},{name:`startAction`,label:`Start action`,type:K.BOOLEAN,defaultValue:!0},{name:`endAction`,label:`End action`,type:K.BOOLEAN,defaultValue:!0}]};var _d=__exportAll({TabBarStories:()=>bd,TabBarStory:()=>yd});const vd=[{title:`Overview`,body:`A summary of everything at a glance.`},{title:`Details`,body:`The specifics, broken down line by line.`},{title:`History`,body:`A log of every change made so far.`}];var yd=class TabBarStory extends X{_bar=null;_startAction=null;_endAction=null;static{o.registerClass({GTypeName:`AdwStorybookTabBar`},TabBarStory)}constructor(){super(X.fromMeta(TabBarStory.getMetadata(),`Default`))}static getMetadata(){return{...gd,component:s.TabBar.$gtype}}initialize(){let e=new s.TabView({vexpand:!0});for(let t of vd){let n=e.append(new s.StatusPage({iconName:`view-paged-symbolic`,title:t.title,description:t.body}));n.title=t.title}this._startAction=new n.Button({iconName:`list-add-symbolic`,tooltipText:`New page`,cssClasses:[`flat`]}),this._endAction=new n.Button({iconName:`view-more-symbolic`,tooltipText:`Menu`,cssClasses:[`flat`]});let t=new s.TabBar({view:e});this._bar=t;let r=new n.Box({orientation:n.Orientation.VERTICAL,widthRequest:480,heightRequest:320});r.append(t),r.append(e),this.addContent(r),this._apply()}updateArgs(e){this._apply()}_apply(){let e=this._bar;e!==null&&(e.autohide=this.args.autohide,e.expandTabs=this.args.expandTabs,e.inverted=this.args.inverted,e.startActionWidget=this.args.startAction?this._startAction:null,e.endActionWidget=this.args.endAction?this._endAction:null)}};o.type_ensure(yd.$gtype);const bd={stories:[yd]},xd={title:`View Switching/Tab Button`,description:`Adw.TabButton — a button that shows how many pages an Adw.TabView holds, and a dot when a page you are not looking at needs attention. From ten pages the number shrinks; at a hundred it becomes a glyph.`,controls:[{name:`pages`,label:`Pages`,type:K.RANGE,min:0,max:100,step:1,defaultValue:3},{name:`needsAttention`,label:`Last page needs attention`,type:K.BOOLEAN,defaultValue:!1}]};var Sd=__exportAll({TabButtonStories:()=>wd,TabButtonStory:()=>Cd}),Cd=class TabButtonStory extends X{_view=null;static{o.registerClass({GTypeName:`AdwStorybookTabButton`},TabButtonStory)}constructor(){super(X.fromMeta(TabButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...xd,component:s.TabButton.$gtype}}initialize(){this._view=new s.TabView;let e=new s.TabButton({view:this._view,halign:n.Align.CENTER});this._apply(),this.addContent(e)}updateArgs(e){this._apply()}_apply(){let e=this._view;if(!e)return;let t=this.args.pages;for(;e.nPages<t;)e.append(new n.Box).title=`Page ${e.nPages}`;for(;e.nPages>t;)e.close_page(e.get_nth_page(e.nPages-1));for(let t=0;t<e.nPages;t++)e.get_nth_page(t).needsAttention=this.args.needsAttention&&t===e.nPages-1}};o.type_ensure(Cd.$gtype);const wd={stories:[Cd]},Td={title:`View Switching/Tab Overview`,description:`Adw.TabOverview — a grid of tab thumbnails over an Adw.TabView; open it to see every page at once, search them and close or unpin them.`,controls:[{name:`open`,label:`Open`,type:K.BOOLEAN,defaultValue:!0},{name:`enableSearch`,label:`Enable search`,type:K.BOOLEAN,defaultValue:!0},{name:`enableNewTab`,label:`Enable new tab`,type:K.BOOLEAN,defaultValue:!1},{name:`inverted`,label:`Inverted`,type:K.BOOLEAN,defaultValue:!1}]};var Ed=__exportAll({TabOverviewStories:()=>kd,TabOverviewStory:()=>Od});const Dd=[{title:`Overview`,body:`A summary of everything at a glance.`},{title:`Details`,body:`The specifics, broken down line by line.`},{title:`History`,body:`A log of every change made so far.`}];var Od=class TabOverviewStory extends X{_overview=null;static{o.registerClass({GTypeName:`AdwStorybookTabOverview`},TabOverviewStory)}constructor(){super(X.fromMeta(TabOverviewStory.getMetadata(),`Default`))}static getMetadata(){return{...Td,component:s.TabOverview.$gtype}}initialize(){let e=new s.TabView({vexpand:!0});for(let[t,n]of Dd.entries()){let r=new s.StatusPage({iconName:`view-paged-symbolic`,title:n.title,description:n.body,vexpand:!0}),i=e.append(r);i.title=n.title,t===0&&e.set_page_pinned(i,!0)}let t=new s.TabOverview({view:e,child:e,widthRequest:480,heightRequest:340});this._overview=t,t.connect(`create-tab`,()=>{let t=e.append(new s.StatusPage({iconName:`view-paged-symbolic`,title:`New Page`,vexpand:!0}));return t.title=`New Page`,t}),this.addContent(t),this._apply()}updateArgs(e){this._apply()}_apply(){let e=this._overview;e&&(e.enableSearch=this.args.enableSearch,e.enableNewTab=this.args.enableNewTab,e.inverted=this.args.inverted,e.open=this.args.open)}};o.type_ensure(Od.$gtype);const kd={stories:[Od]},Ad={title:`View Switching/Tab View`,description:`Adw.TabView with an Adw.TabBar header — three tabbed pages; the tab bar can auto-hide when only one tab remains.`,controls:[{name:`autohide`,label:`Autohide tab bar`,type:K.BOOLEAN,defaultValue:!1}]};var jd=__exportAll({TabViewStories:()=>Pd,TabViewStory:()=>Nd});const Md=[{title:`Overview`,body:`A summary of everything at a glance.`},{title:`Details`,body:`The specifics, broken down line by line.`},{title:`History`,body:`A log of every change made so far.`}];var Nd=class TabViewStory extends X{_tabBar=null;static{o.registerClass({GTypeName:`AdwStorybookTabView`},TabViewStory)}constructor(){super(X.fromMeta(TabViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Ad,component:s.TabView.$gtype}}buildPageBody(e,t){return new s.StatusPage({iconName:`view-paged-symbolic`,title:e,description:t,vexpand:!0})}initialize(){let e=new s.TabView({vexpand:!0});for(let t of Md){let n=e.append(this.buildPageBody(t.title,t.body));n.title=t.title}this._tabBar=new s.TabBar({view:e,autohide:this.args.autohide});let t=new n.Box({orientation:n.Orientation.VERTICAL,widthRequest:480,heightRequest:340});t.append(this._tabBar),t.append(e),this.addContent(t)}updateArgs(e){this._tabBar&&(this._tabBar.autohide=this.args.autohide)}};o.type_ensure(Nd.$gtype);const Pd={stories:[Nd]},Fd=[{name:`inbox`,title:`Inbox`,icon:`mail-unread-symbolic`},{name:`starred`,title:`Starred`,icon:`starred-symbolic`},{name:`archive`,title:`Archive`,icon:`folder-symbolic`}],Id={title:`View Switching/View Switcher Bar`,description:"Adw.ViewSwitcherBar — the narrow-window switcher, pinned to the bottom of a toolbar view. `reveal` is a REQUEST, not a state: a stack with fewer than two pages stays collapsed however loudly it is asked.",controls:[{name:`reveal`,label:`Reveal`,type:K.BOOLEAN,defaultValue:!0}]};var Ld=__exportAll({ViewSwitcherBarStories:()=>zd,ViewSwitcherBarStory:()=>Rd}),Rd=class ViewSwitcherBarStory extends X{_bar=null;static{o.registerClass({GTypeName:`AdwStorybookViewSwitcherBar`},ViewSwitcherBarStory)}constructor(){super(X.fromMeta(ViewSwitcherBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Id,component:s.ViewSwitcherBar.$gtype}}initialize(){let e=new s.ViewStack({vexpand:!0});for(let t of Fd){let n=new s.StatusPage({iconName:t.icon,title:t.title,description:`The ${t.title.toLowerCase()} page.`,vexpand:!0});e.add_titled_with_icon(n,t.name,t.title,t.icon)}this._bar=new s.ViewSwitcherBar({stack:e}),this._apply();let t=new s.ToolbarView({content:e,widthRequest:360,heightRequest:360});t.add_bottom_bar(this._bar),this.addContent(t)}updateArgs(e){this._apply()}_apply(){this._bar&&(this._bar.reveal=this.args.reveal)}};o.type_ensure(Rd.$gtype);const zd={stories:[Rd]},Bd=[{name:`inbox`,title:`Inbox`,icon:`mail-unread-symbolic`,sectionTitle:`Mail`,badgeNumber:3},{name:`starred`,title:`Starred`,icon:`starred-symbolic`},{name:`drafts`,title:`Drafts`,icon:`document-edit-symbolic`},{name:`sent`,title:`Sent`,icon:`mail-send-symbolic`,sectionTitle:`Older`,needsAttention:!0},{name:`archive`,title:`Archive`,icon:`folder-symbolic`},{name:`trash`,title:`Trash`,icon:`user-trash-symbolic`}],Vd={title:`View Switching/View Switcher Sidebar`,description:"Adw.ViewSwitcherSidebar — an Adw.Sidebar driven by an Adw.ViewStack, which is the one Adw switcher whose rows can be grouped into sections and carry an unread dot or a badge. `page` collapses it into a page of boxed lists.",controls:[{name:`mode`,label:`Page mode`,type:K.BOOLEAN,defaultValue:!1}]};var Hd=__exportAll({ViewSwitcherSidebarStories:()=>Wd,ViewSwitcherSidebarStory:()=>Ud}),Ud=class ViewSwitcherSidebarStory extends X{_switcher=null;static{o.registerClass({GTypeName:`AdwStorybookViewSwitcherSidebar`},ViewSwitcherSidebarStory)}constructor(){super(X.fromMeta(ViewSwitcherSidebarStory.getMetadata(),`Default`))}static getMetadata(){return{...Vd,component:s.ViewSwitcherSidebar.$gtype}}initialize(){let e=new s.ViewStack({vexpand:!0});for(let t of Bd){let n=new s.StatusPage({iconName:t.icon,title:t.title,vexpand:!0});e.add_titled(n,t.name,t.title)}let t=e.get_pages();for(let e=0;e<t.get_n_items();e++){let n=t.get_item(e),r=Bd.find(e=>e.name===n.name);r?.sectionTitle&&(n.startsSection=!0,n.sectionTitle=r.sectionTitle,r.badgeNumber&&(n.badgeNumber=r.badgeNumber),r.needsAttention&&(n.needsAttention=!0))}let r=new s.ViewSwitcherSidebar({stack:e});this._switcher=r;let i=new n.Box({orientation:n.Orientation.HORIZONTAL,widthRequest:480,heightRequest:340});i.append(r),i.append(e),this.addContent(i),this._apply()}updateArgs(e){this._apply()}_apply(){this._switcher&&(this._switcher.mode=this.args.mode?s.SidebarMode.PAGE:s.SidebarMode.SIDEBAR)}};o.type_ensure(Ud.$gtype);const Wd={stories:[Ud]},Gd={title:`View Switching/View Switcher`,description:`Adw.ViewSwitcher — a segmented switcher whose buttons select pages in a paired Adw.ViewStack.`,controls:[{name:`policy`,label:`Policy`,type:K.SELECT,options:[{label:`Wide`,value:`wide`},{label:`Narrow`,value:`narrow`}],defaultValue:`wide`}]};var Kd=__exportAll({ViewSwitcherStories:()=>Jd,ViewSwitcherStory:()=>qd}),qd=class ViewSwitcherStory extends X{_switcher=null;static{o.registerClass({GTypeName:`AdwStorybookViewSwitcher`},ViewSwitcherStory)}constructor(){super(X.fromMeta(ViewSwitcherStory.getMetadata(),`Default`))}static getMetadata(){return{...Gd,component:s.ViewSwitcher.$gtype}}buildPage(e,t,n){return new s.StatusPage({iconName:t,title:e,description:n,vexpand:!0})}initialize(){let e=new s.ViewStack({vexpand:!0});e.add_titled_with_icon(this.buildPage(`Inbox`,`mail-unread-symbolic`,`You have three unread conversations.`),`inbox`,`Inbox`,`mail-unread-symbolic`),e.add_titled_with_icon(this.buildPage(`Starred`,`starred-symbolic`,`Messages you have marked as important.`),`starred`,`Starred`,`starred-symbolic`),e.add_titled_with_icon(this.buildPage(`Archive`,`folder-symbolic`,`Older conversations kept for reference.`),`archive`,`Archive`,`folder-symbolic`),this._switcher=new s.ViewSwitcher({stack:e,policy:this.policyFromArg(this.args.policy),halign:n.Align.CENTER});let t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:340});t.append(this._switcher),t.append(e),this.addContent(t)}policyFromArg(e){return e===`narrow`?s.ViewSwitcherPolicy.NARROW:s.ViewSwitcherPolicy.WIDE}updateArgs(e){this._switcher&&(this._switcher.policy=this.policyFromArg(this.args.policy))}};o.type_ensure(qd.$gtype);const Jd={stories:[qd]},Yd={title:`Windows/Action Bar`,description:"Gtk.ActionBar — GTK's bottom bar, and the one libadwaita styles but does not own (`actionbar > revealer > box`). `start` appends and `end` PREPENDS, so the first end child sits nearest the edge; `center` is a real placement with no property behind it, because GtkBuilder refuses `center-widget`; and `revealed` slides the whole bar away.",controls:[{name:`revealed`,label:`Revealed`,type:K.BOOLEAN,defaultValue:!0},{name:`center`,label:`Centre`,type:K.SELECT,options:[{label:`A label`,value:`label`},{label:`Nothing`,value:`none`}],defaultValue:`label`}]};var Xd=__exportAll({ActionBarStories:()=>Qd,ActionBarStory:()=>Zd}),Zd=class ActionBarStory extends X{_bar=null;_centre=null;static{o.registerClass({GTypeName:`AdwStorybookActionBar`},ActionBarStory)}constructor(){super(X.fromMeta(ActionBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Yd,component:n.ActionBar.$gtype}}initialize(){this._bar=new n.ActionBar;let e=new n.Button({icon_name:`document-save-symbolic`});e.add_css_class(`flat`),this._bar.pack_end(e);let t=new n.Button({icon_name:`document-open-symbolic`});t.add_css_class(`flat`),this._bar.pack_end(t);let r=new n.Button({icon_name:`document-print-symbolic`});r.add_css_class(`flat`),this._bar.pack_start(r),this._centre=new n.Label({label:`notes.md`});let i=new n.Box({orientation:n.Orientation.VERTICAL,spacing:8});i.append(new n.Label({label:`The bar below is Gtk.ActionBar.`,css_classes:[`dimmed`]})),i.append(this._bar),this.addContent(i),this._apply()}updateArgs(e){this._apply()}_apply(){this._bar&&(this._bar.revealed=this.args.revealed,this._bar.set_center_widget(this.args.center===`label`?this._centre:null))}};o.type_ensure(Zd.$gtype);const Qd={stories:[Zd]},$d={title:`Windows/Application Window`,description:"Gtk.ApplicationWindow — a Gtk.Window that also handles an application menubar. The bar shows only when `show-menubar` is set AND the application HAS one: GTK builds it from the GtkApplication's menu model, and reads the item count before deciding (gtkapplicationwindow.c:400-402). Everything else about the window is the base class.",controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Editor`},{name:`showMenubar`,label:`Show menubar`,type:K.BOOLEAN,defaultValue:!0},{name:`hasMenubar`,label:`The application has one`,type:K.BOOLEAN,defaultValue:!0},{name:`deletable`,label:`Deletable`,type:K.BOOLEAN,defaultValue:!0}]};var ef=__exportAll({GtkApplicationWindowStories:()=>nf,GtkApplicationWindowStory:()=>tf});function menubarModel(){let e=new r.Menu,t=new r.Menu;t.append(`_New`,`win.new`),t.append(`_Open…`,`win.open`);let n=new r.Menu;return n.append(`_Copy`,`win.copy`),n.append(`_Paste`,`win.paste`),e.append_section(null,t),e.append_section(null,n),e}var tf=class GtkApplicationWindowStory extends X{_window=null;_application=null;_menubar=null;static{o.registerClass({GTypeName:`AdwStorybookGtkApplicationWindow`},GtkApplicationWindowStory)}constructor(){super(X.fromMeta(GtkApplicationWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...$d,component:n.ApplicationWindow.$gtype}}initialize(){this._application=new n.Application({application_id:`eu.jumplink.AdwStorybookGtkApplicationWindow`}),this._menubar=menubarModel(),this._application.set_menubar(this._menubar),this._window=new n.ApplicationWindow({application:this._application,default_width:460,default_height:260}),this._window.set_titlebar(new n.HeaderBar);let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,margin_top:12,margin_start:12});e.append(new n.Label({label:`The bar above is built from the application menu.`,css_classes:[`dimmed`]})),this._window.set_child(e),this.addContent(this._window),this._apply()}updateArgs(e){this._apply()}_apply(){!this._window||!this._application||(this._window.title=this.args.title,this._window.deletable=this.args.deletable,this._application.set_menubar(this.args.hasMenubar?this._menubar:null),this._window.show_menubar=this.args.showMenubar)}};o.type_ensure(tf.$gtype);const nf={stories:[tf]},rf={title:`Windows/Header Bar`,description:"Gtk.HeaderBar — the titlebar widget: children packed at the start and at the end, the window title in the middle, and the window-frame buttons GTK would otherwise ask the window manager for. `end` PREPENDS, so the first end child sits nearest the edge; a `title` child takes the middle away from the derived title label; and `show-title-buttons` CREATES and REMOVES the two control groups rather than hiding them.",controls:[{name:`titleWidget`,label:`Title widget`,type:K.SELECT,options:[{label:`The window title`,value:`none`},{label:`A custom centre widget`,value:`custom`}],defaultValue:`none`},{name:`showTitleButtons`,label:`Title buttons`,type:K.BOOLEAN,defaultValue:!0},{name:`decorationLayout`,label:`Decoration layout`,type:K.SELECT,options:[{label:`GNOME (menu:minimize,maximize,close)`,value:`menu:minimize,maximize,close`},{label:`Close only`,value:`:close`},{label:`macOS (icon:minimize,maximize)`,value:`icon:minimize,maximize`}],defaultValue:`menu:minimize,maximize,close`}]};var af=__exportAll({GtkHeaderBarStories:()=>sf,GtkHeaderBarStory:()=>of}),of=class GtkHeaderBarStory extends X{_bar=null;_titleLabel=null;static{o.registerClass({GTypeName:`AdwStorybookGtkHeaderBar`},GtkHeaderBarStory)}constructor(){super(X.fromMeta(GtkHeaderBarStory.getMetadata(),`Default`))}static getMetadata(){return{...rf,component:n.HeaderBar.$gtype}}initialize(){this._bar=new n.HeaderBar;let e=new n.Button({icon_name:`open-menu-symbolic`});e.add_css_class(`flat`),this._bar.pack_end(e);let t=new n.Button({icon_name:`system-search-symbolic`});t.add_css_class(`flat`),this._bar.pack_end(t);let r=new n.Button({label:`‹`});r.add_css_class(`flat`),this._bar.pack_start(r),this._titleLabel=new n.Label({label:`Mailboxes`,css_classes:[`title`]}),this.addContent(this._bar),this._apply()}updateArgs(e){this._apply()}_apply(){this._bar&&(this._bar.decoration_layout=this.args.decorationLayout,this._bar.show_title_buttons=this.args.showTitleButtons,this.args.titleWidget===`custom`?this._bar.title_widget=this._titleLabel:this._bar.title_widget=null)}};o.type_ensure(of.$gtype);const sf={stories:[of]},cf={title:`Windows/Window`,description:"Gtk.Window — a toplevel with a `titlebar` and a `child`, and the properties that decide what its frame shows: `decorated`, `deletable`, `resizable`, `maximized` and `hide-on-close`. The BROWSER replica of this one is an IN-PAGE FRAME, not a toplevel: a browser document has no window to map. The story therefore cancels `close-request`, which is what an application does when it wants to keep the window.",controls:[{name:`title`,label:`Title`,type:K.TEXT,defaultValue:`Documents`},{name:`decorated`,label:`Decorated`,type:K.BOOLEAN,defaultValue:!0},{name:`deletable`,label:`Deletable`,type:K.BOOLEAN,defaultValue:!0},{name:`resizable`,label:`Resizable`,type:K.BOOLEAN,defaultValue:!0},{name:`maximized`,label:`Maximized`,type:K.BOOLEAN,defaultValue:!1},{name:`modal`,label:`Modal`,type:K.BOOLEAN,defaultValue:!1},{name:`hideOnClose`,label:`Hide on close`,type:K.BOOLEAN,defaultValue:!0}]};var lf=__exportAll({GtkWindowStories:()=>df,GtkWindowStory:()=>uf}),uf=class GtkWindowStory extends X{_window=null;static{o.registerClass({GTypeName:`AdwStorybookGtkWindow`},GtkWindowStory)}constructor(){super(X.fromMeta(GtkWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...cf,component:n.Window.$gtype}}initialize(){this._window=new n.Window({default_width:460,default_height:280});let e=new n.HeaderBar;this._window.set_titlebar(e);let t=new n.Box({orientation:n.Orientation.VERTICAL,spacing:12,margin_top:12,margin_start:12});t.append(new n.Label({label:`The frame above is a Gtk.HeaderBar.`,css_classes:[`dimmed`]})),this._window.set_child(t),this.addContent(this._window),this._apply()}updateArgs(e){this._apply()}_apply(){this._window&&(this._window.title=this.args.title,this._window.decorated=this.args.decorated,this._window.deletable=this.args.deletable,this._window.resizable=this.args.resizable,this._window.maximized=this.args.maximized,this._window.modal=this.args.modal,this._window.hide_on_close=this.args.hideOnClose)}};o.type_ensure(uf.$gtype);const df={stories:[uf]},ff={title:`Windows/Window Controls`,description:"Gtk.WindowControls — one SIDE of the window frame controls, and the decision table behind them. The decoration layout is split on the first colon; each token of the selected half builds one button or none, because `icon` and `minimize` want a SOVEREIGN window, `maximize` wants a resizable one and `close` wants a deletable one. `empty` is the property that says none of them did.",controls:[{name:`side`,label:`Side`,type:K.SELECT,options:[{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`start`},{name:`decorationLayout`,label:`Decoration layout`,type:K.SELECT,options:[{label:`GNOME (menu:minimize,maximize,close)`,value:`menu:minimize,maximize,close`},{label:`Windows (icon:minimize,maximize,close)`,value:`icon:minimize,maximize,close`},{label:`Close only`,value:`:close`},{label:`macOS (icon:minimize,maximize)`,value:`icon:minimize,maximize`}],defaultValue:`menu:minimize,maximize,close`},{name:`resizable`,label:`Resizable window`,type:K.BOOLEAN,defaultValue:!0},{name:`maximized`,label:`Maximized window`,type:K.BOOLEAN,defaultValue:!1},{name:`modal`,label:`Modal window`,type:K.BOOLEAN,defaultValue:!1}]};var pf=__exportAll({WindowControlsStories:()=>hf,WindowControlsStory:()=>mf}),mf=class WindowControlsStory extends X{_window=null;_controls=null;static{o.registerClass({GTypeName:`AdwStorybookWindowControls`},WindowControlsStory)}constructor(){super(X.fromMeta(WindowControlsStory.getMetadata(),`Default`))}static getMetadata(){return{...ff,component:n.WindowControls.$gtype}}initialize(){this._window=new n.Window({title:`Documents`,default_width:420,default_height:220});let e=new n.Box({orientation:n.Orientation.VERTICAL,spacing:8});e.append(new n.Label({label:`The bar draws nothing outside a window.`,css_classes:[`dimmed`]})),this._window.set_child(e),this._controls=new n.WindowControls,this._window.set_titlebar(this._controls),this.addContent(this._window),this._apply()}updateArgs(e){this._apply()}_apply(){if(!this._window||!this._controls)return;let e=this.args.side===`end`?n.PackType.END:n.PackType.START;this._controls.side=e,this._controls.decoration_layout=this.args.decorationLayout,this._window.resizable=this.args.resizable,this._window.maximized=this.args.maximized,this._window.modal=this.args.modal}};o.type_ensure(mf.$gtype);const hf={stories:[mf]};await runStorybook({applicationId:`org.gjsify.AdwaitaStorybook`,title:`Adwaita Storybook`,stories:collectStoryModules([vn,Sn,Dn,jn,Fn,Bn,Gn,Xn,tr,ar,ur,hr,yr,Cr,Dr,jr,Fr,zr,Ur,qr,Zr,ti,ai,li,pi,_i,xi,Ti,Ai,Pi,zi,Gi,Yi,ea,ia,ca,fa,ga,ba,wa,ka,Pa,Ra,Ha,Ka,Xa,eo,io,co,ho,bo,To,Ao,Po,Ro,Uo,qo,$o,rs,ss,ds,hs,ys,Cs,Ds,js,Fs,zs,Us,qs,Zs,nc,oc,mc,vc,Sc,Dc,Mc,Lc,Gc,Xc,$c,al,ul,ml,yl,Cl,Dl,jl,Fl,Vl,Gl,Yl,$l,ru,su,du,hu,yu,Cu,Du,ju,Lu,Uu,Ju,ed,od,fd,_d,Sd,Ed,jd,Ld,Hd,Kd,Xd,ef,af,lf,pf])});const gf=globalThis.process,_f=Number(gf?.exitCode);Number.isInteger(_f)&&_f!==0&&gf.exit(_f);