@gjsify/example-gtk-adwaita-storybook 0.64.5 → 0.64.7

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.node.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{createRequire as e}from"node:module";import"@gjsify/node-gi/globals";import t from"@gjsify/node-gi/system";import"@gjsify/node-gi/gettext";var n=Object.defineProperty,__name=(e,t)=>n(e,`name`,{value:t,configurable:!0}),__exportAll=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r};const r=[`Overview`,`Presentation`,`Boxed Lists`,`Controls`,`Buttons`,`Text`,`Drawing`,`Media`,`Layout`,`Windows`,`View Switching`,`Navigation`,`Feedback`];function orderCategories(e){let t=new Map(r.map((e,t)=>[e,t])),n=[...e].filter(e=>t.has(e));n.sort((e,n)=>t.get(e)-t.get(n));let i=e.filter(e=>!t.has(e));return[...n,...i]}var StoryRegistry=class{constructor(){this.modules=[]}registerStory(e){if(!e||!Array.isArray(e.stories)){console.warn(`Invalid story module provided to registerStory`);return}this.modules.push(e)}registerStories(e){if(!Array.isArray(e)){console.warn(`Invalid story modules array provided to registerStories`);return}let t=e.filter(e=>e&&Array.isArray(e.stories));this.modules.push(...t)}getStories(){return[...this.modules]}createStoryInstances(){for(let e of this.modules)this.instantiateStoriesForModule(e);return[...this.modules]}instantiateStoriesForModule(e){e.instances=[];let t=e.decorators??[];for(let n of e.stories)try{let r=new n,build=()=>{typeof r.initialize==`function`&&r.initialize()};t.reduceRight((e,t)=>()=>t(e,r),build)(),e.instances.push(r)}catch(e){console.error(`Failed to instantiate story: ${n.name||`Unknown`}`,e)}}},StorybookController=class{constructor(e,t){this._registry=new StoryRegistry,this._activeStory=null,this._unsubArgs=null,this._view=e,this._buildControls=t}mount(e,t=!0){this._registry.registerStories(e);let n=this._registry.createStoryInstances(),r=this._groupByCategory(n);if(this._view.renderSidebar(r,e=>this.select(e)),t){let e=r[0]?.stories[0]?.instance??null;e&&this.select(e)}}select(e){this._view.setPreviewTitle(`${e.meta.title} — ${e.story}`),this._view.showPreview(e),this._view.markSelected(e.meta.title),this._wireControls(e),this._activeStory=e}_wireControls(e){this._unsubArgs&&=(this._unsubArgs(),null);let t=this._buildControls(e),n=t.map(e=>e.refresh);this._view.renderControls(t),this._unsubArgs=e.onArgsChanged(e=>{for(let t of n)t(e)})}_groupByCategory(e){let t=new Map;for(let n of e)for(let e of n.instances??[]){let n=e.meta.title.split(`/`),r=n[0],i=n.length>1?n[1]:e.meta.title;t.has(r)||t.set(r,[]),t.get(r).push({instance:e,name:i||`Unnamed`})}return orderCategories([...t.keys()]).map(e=>({category:e,stories:t.get(e)}))}get activeStory(){return this._activeStory}listStories(){return this._registry.getStories().flatMap(e=>(e.instances??[]).map(e=>({title:e.meta.title,story:e.story,category:e.meta.title.split(`/`)[0],controls:e.meta.controls??[]})))}openStoryByTitle(e){let t=this._findByTitle(e);return t?(this.select(t),!0):!1}getCurrentStory(){let e=this._activeStory;return e?{title:e.meta.title,story:e.story,args:e.args}:null}setActiveArg(e,t){let n=this._activeStory;return n?(n.setArg(e,t),!0):!1}_findByTitle(e){for(let t of this._registry.getStories())for(let n of t.instances??[])if(n.meta.title===e)return n;return null}};let i=function(e){return e.TEXT=`text`,e.NUMBER=`number`,e.BOOLEAN=`boolean`,e.SELECT=`select`,e.RANGE=`range`,e.COLOR=`color`,e}({});function isStoryModule(e){return typeof e==`object`&&!!e&&Array.isArray(e.stories)}function argsFromControls(e=[]){let t={};for(let n of e)t[n.name]=defaultFor(n);return t}function defaultFor(e){if(e.defaultValue!==void 0)return e.defaultValue;switch(e.type){case`text`:return``;case`color`:return`#000000`;case`boolean`:return!1;case`number`:case`range`:return e.min??0;case`select`:return e.options[0]?.value??null;default:return null}}function controlLabel(e){return e.label||e.name}function bindControl(e,t,n){let r=t.name,a=t.description;switch(t.type){case i.TEXT:{let i=n.text(controlLabel(t),a),o=e.args[r];return i.set(typeof o==`string`?o:``),i.onChange(t=>e.setArg(r,t)),{view:i.node,refresh:e=>{let t=typeof e[r]==`string`?e[r]:``;i.get()!==t&&i.set(t)}}}case i.COLOR:{let i=n.color(controlLabel(t),a),o=e.args[r];return i.set(typeof o==`string`?o:`#000000`),i.onChange(t=>e.setArg(r,t)),{view:i.node,refresh:e=>{let t=typeof e[r]==`string`?e[r]:`#000000`;i.get()!==t&&i.set(t)}}}case i.BOOLEAN:{let i=n.boolean(controlLabel(t),a);return i.set(!!e.args[r]),i.onChange(t=>e.setArg(r,t)),{view:i.node,refresh:e=>{let t=!!e[r];i.get()!==t&&i.set(t)}}}case i.NUMBER:{let i=n.number(t),a=e.args[r];return i.set(typeof a==`number`?a:t.min??0),i.onChange(t=>e.setArg(r,t)),{view:i.node,refresh:e=>{let t=typeof e[r]==`number`?e[r]:0;i.get()!==t&&i.set(t)}}}case i.RANGE:{let i=n.range(t),a=e.args[r],o=typeof a==`number`?a:t.min??0;return i.set(o),i.onChange(t=>e.setArg(r,t)),{view:i.node,refresh:e=>{let t=typeof e[r]==`number`?e[r]:o;i.get()!==t&&i.set(t)}}}case i.SELECT:{let i=t.options;if(!i?.length)return console.warn(`SELECT control "${r}" has no options`),null;let a=n.select(t),o=e.args[r],s=Math.max(0,i.findIndex(e=>e.value===o));return a.set(s),a.onChange(t=>{t>=0&&t<i.length&&e.setArg(r,i[t].value)}),{view:a.node,refresh:e=>{let t=e[r],n=i.findIndex(e=>e.value===t);n>=0&&a.get()!==n&&a.set(n)}}}default:return console.warn(`Unsupported control type: ${t.type}`),null}}function buildStorybookDevtoolsExtension(e){let currentStory=()=>e.getCurrentStory();return{methods:[{name:`ListStories`,kind:`read-only`,handler:(()=>JSON.stringify(e.listStories(),null,2))},{name:`GetCurrentStory`,kind:`read-only`,handler:(()=>JSON.stringify(currentStory(),null,2))},{name:`OpenStory`,kind:`mutating`,handler:(t=>e.openStoryByTitle(t))},{name:`SetStoryArg`,kind:`mutating`,handler:((t,n)=>e.setActiveArg(t,n?JSON.parse(n):null))},{name:`GetStoryArgs`,kind:`read-only`,handler:(()=>JSON.stringify(currentStory()?.args??{},null,2))}],contributeStatus:()=>{let t=currentStory(),n=e.listStories();return{storybook:{currentStory:t?{title:t.title,story:t.story}:null,storyCount:n.length}}}}}function collectStoryModules$1(e){let t=[];for(let n of e)if(!(!n||typeof n!=`object`))for(let e of Object.values(n))isStoryModule(e)&&t.push(e);return t}__name(collectStoryModules$1,`collectStoryModules`);var StoryViewBase=class{constructor(){this._listeners=new Set}initBase(e,t,n){this._meta=e,this._story=t,this._args=argsFromControls(e.controls),this._chrome=this.createChrome(e,n),this.refreshChromeText()}get meta(){return this._meta}get story(){return this._story}get args(){return this._args}get root(){return this._chrome.root}set args(e){this._args!==e&&(this._args=e,this.updateArgs(e),this.emitArgs(e))}emitArgs(e){for(let t of this._listeners)t(e)}onArgsChanged(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}setArg(e,t){this.args={...this._args,[e]:t}}initialize(){}updateArgs(e){}teardown(){}addContent(e){this._chrome.hasStage&&this._chrome.setStageContent(e)}refreshChromeText(){let e=this._story?`${this._meta.title} — ${this._story}`:this._meta.title;this._chrome.setChromeText(e,this._meta.description??``)}};const a=[`system`,`light`,`dark`];var StorybookSettings=class{constructor(e=()=>!1){this._colorScheme=`system`,this._accentMode=`system`,this._accent=`blue`,this._listeners=new Set,this._systemDark=e}get colorScheme(){return this._colorScheme}set colorScheme(e){!a.includes(e)||e===this._colorScheme||(this._colorScheme=e,this._notify())}get accentMode(){return this._accentMode}set accentMode(e){e!==this._accentMode&&(this._accentMode=e,this._notify())}get accent(){return this._accent}set accent(e){e!==this._accent&&(this._accent=e,this._notify())}get resolvedAccent(){return this._accentMode===`custom`?this._accent:null}get resolvedDark(){return this._colorScheme===`dark`?!0:this._colorScheme===`light`?!1:this._systemDark()}get state(){return{colorScheme:this._colorScheme,accentMode:this._accentMode,accent:this._accent}}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}systemChanged(){this._colorScheme===`system`&&this._notify()}_notify(){let e=this.state;for(let t of[...this._listeners])try{t(e)}catch{}}};const o={ListStories:`<method name="ListStories"><arg type="s" direction="out" name="stories_json"/></method>`,GetCurrentStory:`<method name="GetCurrentStory"><arg type="s" direction="out" name="story_json"/></method>`,OpenStory:`<method name="OpenStory"><arg type="s" direction="in" name="title"/><arg type="b" direction="out" name="opened"/></method>`,SetStoryArg:`<method name="SetStoryArg"><arg type="s" direction="in" name="name"/><arg type="s" direction="in" name="value_json"/><arg type="b" direction="out" name="applied"/></method>`,GetStoryArgs:`<method name="GetStoryArgs"><arg type="s" direction="out" name="args_json"/></method>`};function storybookDevtoolsExtension(e){let t=buildStorybookDevtoolsExtension(e.controller),n=[],r={},i={};for(let e of t.methods){let t=o[e.name];t&&n.push(t),r[e.name]=e.handler,i[e.name]=e.kind}return{methodsXml:n,handlers:r,methodKinds:i,contributeStatus:t.contributeStatus}}const s=e(import.meta.url);let c;function load$7(){return c===void 0&&(c=s(`@gjsify/node-gi/gi`).requireGi(`GLib`,`2.0`)),c}__name(load$7,`load`);var l=new Proxy(Object.create(null),{get(e,t){return load$7()[t]},has(e,t){return t in load$7()}});function variantKindFor(e,t){switch(e){case`s`:case`b`:case`i`:case`u`:case`d`:return e}if(typeof t==`string`)return`s`;if(typeof t==`boolean`)return`b`;if(typeof t==`number`)return Number.isInteger(t)?`i`:`d`;throw Error(`Cannot build a GLib.Variant from ${typeof t}`)}function buildVariant(e,t){switch(variantKindFor(e?.dup_string()??null,t)){case`s`:return l.Variant.new_string(String(t));case`b`:return l.Variant.new_boolean(!!t);case`i`:return l.Variant.new_int32(Number(t));case`u`:return l.Variant.new_uint32(Number(t));case`d`:return l.Variant.new_double(Number(t))}}function describeActions(e){return e?e.list_actions().sort((e,t)=>e.localeCompare(t)).map(t=>({name:t,enabled:e.get_action_enabled(t),parameterType:e.get_action_parameter_type(t)?.dup_string()??null,stateType:e.get_action_state_type(t)?.dup_string()??null})):[]}function activateAction(e,t,n){let r=e.get_action_parameter_type(t),i=n==null?null:buildVariant(r,n);e.activate_action(t,i)}function changeActionState(e,t,n){e.change_action_state(t,buildVariant(e.get_action_state_type(t),n))}const u=e(import.meta.url);let d;function load$6(){return d===void 0&&(d=u(`@gjsify/node-gi/gi`).requireGi(`Gdk`,`4.0`)),d}__name(load$6,`load`);var f=new Proxy(Object.create(null),{get(e,t){return load$6()[t]},has(e,t){return t in load$6()}});const p=e(import.meta.url);let m;function load$5(){return m===void 0&&(m=p(`@gjsify/node-gi/gi`).requireGi(`Gtk`,`4.0`)),m}__name(load$5,`load`);var h=new Proxy(Object.create(null),{get(e,t){return load$5()[t]},has(e,t){return t in load$5()}});const g=new Map;function swapCss(e,t){let n=f.Display.get_default();if(!n)return!1;let r=g.get(e);return r||(r=new h.CssProvider,h.StyleContext.add_provider_for_display(n,r,h.STYLE_PROVIDER_PRIORITY_USER+1),g.set(e,r)),r.load_from_string(t),!0}function dumpCss(){return{providers:[...g.keys()]}}const _=`org.gjsify.Devtools`;function formatDbusErrorMessage(e,t){return`${e}: ${t}`}const v={GetStatus:`read-only`,Screenshot:`read-only`,ScreenshotScaled:`read-only`,ListActions:`read-only`,ActivateAction:`mutating`,ChangeActionState:`mutating`,PresentWindow:`read-only`,ResizeWindow:`mutating`,ListToplevels:`read-only`,DumpTree:`read-only`,GetProperty:`read-only`,GetFocused:`read-only`,FindWidget:`read-only`,SendKey:`mutating`,ActivateWidget:`mutating`,DumpGSettings:`read-only`,DumpCss:`read-only`,SwapCss:`mutating`};function sanitizeInstanceId(e){let t=e.toLowerCase().replace(/[^a-z0-9]/g,``);return/^[a-z]/.test(t)?t:`i${t||`0`}`}function appIdToObjectPath(e){return`/${e.replace(/\./g,`/`).replace(/-/g,`_`)}`}function resolveBusAddress(e,t){let n=appIdToObjectPath(e),r=t&&t!=="default"?sanitizeInstanceId(t):`default`;return r==="default"?{busName:e,objectPath:`${n}/devtools`,instance:`default`}:{busName:`${e}.${r}`,objectPath:`${n}/${r}/devtools`,instance:r}}const y=`GJSIFY_DEVTOOLS_ADDRESS`;function isDevtoolsEnabledValue(e){if(e==null)return!1;let t=e.toLowerCase();return t!==``&&t!==`0`&&t!==`false`}function devtoolsAddressFilePath(e,t,n){let{busName:r}=resolveBusAddress(t,n);return`${e}/gjsify-devtools/${r}.address`}function buildDevtoolsIfaceXml(e=[]){return`<node>
1
+ import{createRequire as e}from"node:module";import"@gjsify/node-gi/globals";import t from"@gjsify/node-gi/system";import"@gjsify/node-gi/gettext";var n=Object.defineProperty,__name=(e,t)=>n(e,`name`,{value:t,configurable:!0}),__exportAll=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r};const r=[`Overview`,`Presentation`,`Boxed Lists`,`Controls`,`Buttons`,`Text`,`Drawing`,`Media`,`Layout`,`Windows`,`View Switching`,`Navigation`,`Feedback`];function orderCategories(e){let t=new Map(r.map((e,t)=>[e,t])),n=[...e].filter(e=>t.has(e));n.sort((e,n)=>t.get(e)-t.get(n));let i=e.filter(e=>!t.has(e));return[...n,...i]}var StoryRegistry=class{constructor(){this.modules=[]}registerStory(e){if(!e||!Array.isArray(e.stories)){console.warn(`Invalid story module provided to registerStory`);return}this.modules.push(e)}registerStories(e){if(!Array.isArray(e)){console.warn(`Invalid story modules array provided to registerStories`);return}let t=e.filter(e=>e&&Array.isArray(e.stories));this.modules.push(...t)}getStories(){return[...this.modules]}createStoryInstances(){for(let e of this.modules)this.instantiateStoriesForModule(e);return[...this.modules]}instantiateStoriesForModule(e){e.instances=[];let t=e.decorators??[];for(let n of e.stories)try{let r=new n,build=()=>{typeof r.initialize==`function`&&r.initialize()};t.reduceRight((e,t)=>()=>t(e,r),build)(),e.instances.push(r)}catch(e){console.error(`Failed to instantiate story: ${n.name||`Unknown`}`,e)}}},StorybookController=class{constructor(e,t){this._registry=new StoryRegistry,this._activeStory=null,this._unsubArgs=null,this._view=e,this._buildControls=t}mount(e,t=!0){this._registry.registerStories(e);let n=this._registry.createStoryInstances(),r=this._groupByCategory(n);if(this._view.renderSidebar(r,e=>this.select(e)),t){let e=r[0]?.stories[0]?.instance??null;e&&this.select(e)}}select(e){this._view.setPreviewTitle(`${e.meta.title} — ${e.story}`),this._view.showPreview(e),this._view.markSelected(e.meta.title),this._wireControls(e),this._activeStory=e}_wireControls(e){this._unsubArgs&&=(this._unsubArgs(),null);let t=this._buildControls(e),n=t.map(e=>e.refresh);this._view.renderControls(t),this._unsubArgs=e.onArgsChanged(e=>{for(let t of n)t(e)})}_groupByCategory(e){let t=new Map;for(let n of e)for(let e of n.instances??[]){let n=e.meta.title.split(`/`),r=n[0],i=n.length>1?n[1]:e.meta.title;t.has(r)||t.set(r,[]),t.get(r).push({instance:e,name:i||`Unnamed`})}return orderCategories([...t.keys()]).map(e=>({category:e,stories:t.get(e)}))}get activeStory(){return this._activeStory}listStories(){return this._registry.getStories().flatMap(e=>(e.instances??[]).map(e=>({title:e.meta.title,story:e.story,category:e.meta.title.split(`/`)[0],controls:e.meta.controls??[]})))}openStoryByTitle(e){let t=this._findByTitle(e);return t?(this.select(t),!0):!1}getCurrentStory(){let e=this._activeStory;return e?{title:e.meta.title,story:e.story,args:e.args}:null}setActiveArg(e,t){let n=this._activeStory;return n?(n.setArg(e,t),!0):!1}_findByTitle(e){for(let t of this._registry.getStories())for(let n of t.instances??[])if(n.meta.title===e)return n;return null}};let i=function(e){return e.TEXT=`text`,e.NUMBER=`number`,e.BOOLEAN=`boolean`,e.SELECT=`select`,e.RANGE=`range`,e.COLOR=`color`,e}({});function isStoryModule(e){return typeof e==`object`&&!!e&&Array.isArray(e.stories)}function argsFromControls(e=[]){let t={};for(let n of e)t[n.name]=defaultFor(n);return t}function defaultFor(e){if(e.defaultValue!==void 0)return e.defaultValue;switch(e.type){case`text`:return``;case`color`:return`#000000`;case`boolean`:return!1;case`number`:case`range`:return e.min??0;case`select`:return e.options[0]?.value??null;default:return null}}function controlLabel(e){return e.label||e.name}function bindControl(e,t,n){let r=t.name,a=t.description;switch(t.type){case i.TEXT:{let i=n.text(controlLabel(t),a),o=e.args[r];return i.set(typeof o==`string`?o:``),i.onChange(t=>e.setArg(r,t)),{view:i.node,refresh:e=>{let t=typeof e[r]==`string`?e[r]:``;i.get()!==t&&i.set(t)}}}case i.COLOR:{let i=n.color(controlLabel(t),a),o=e.args[r];return i.set(typeof o==`string`?o:`#000000`),i.onChange(t=>e.setArg(r,t)),{view:i.node,refresh:e=>{let t=typeof e[r]==`string`?e[r]:`#000000`;i.get()!==t&&i.set(t)}}}case i.BOOLEAN:{let i=n.boolean(controlLabel(t),a);return i.set(!!e.args[r]),i.onChange(t=>e.setArg(r,t)),{view:i.node,refresh:e=>{let t=!!e[r];i.get()!==t&&i.set(t)}}}case i.NUMBER:{let i=n.number(t),a=e.args[r];return i.set(typeof a==`number`?a:t.min??0),i.onChange(t=>e.setArg(r,t)),{view:i.node,refresh:e=>{let t=typeof e[r]==`number`?e[r]:0;i.get()!==t&&i.set(t)}}}case i.RANGE:{let i=n.range(t),a=e.args[r],o=typeof a==`number`?a:t.min??0;return i.set(o),i.onChange(t=>e.setArg(r,t)),{view:i.node,refresh:e=>{let t=typeof e[r]==`number`?e[r]:o;i.get()!==t&&i.set(t)}}}case i.SELECT:{let i=t.options;if(!i?.length)return console.warn(`SELECT control "${r}" has no options`),null;let a=n.select(t),o=e.args[r],s=Math.max(0,i.findIndex(e=>e.value===o));return a.set(s),a.onChange(t=>{t>=0&&t<i.length&&e.setArg(r,i[t].value)}),{view:a.node,refresh:e=>{let t=e[r],n=i.findIndex(e=>e.value===t);n>=0&&a.get()!==n&&a.set(n)}}}default:return console.warn(`Unsupported control type: ${t.type}`),null}}function buildStorybookDevtoolsExtension(e){let currentStory=()=>e.getCurrentStory();return{methods:[{name:`ListStories`,kind:`read-only`,handler:(()=>JSON.stringify(e.listStories(),null,2))},{name:`GetCurrentStory`,kind:`read-only`,handler:(()=>JSON.stringify(currentStory(),null,2))},{name:`OpenStory`,kind:`mutating`,handler:(t=>e.openStoryByTitle(t))},{name:`SetStoryArg`,kind:`mutating`,handler:((t,n)=>e.setActiveArg(t,n?JSON.parse(n):null))},{name:`GetStoryArgs`,kind:`read-only`,handler:(()=>JSON.stringify(currentStory()?.args??{},null,2))}],contributeStatus:()=>{let t=currentStory(),n=e.listStories();return{storybook:{currentStory:t?{title:t.title,story:t.story}:null,storyCount:n.length}}}}}function collectStoryModules$1(e){let t=[];for(let n of e)if(!(!n||typeof n!=`object`))for(let e of Object.values(n))isStoryModule(e)&&t.push(e);return t}__name(collectStoryModules$1,`collectStoryModules`);var StoryViewBase=class{constructor(){this._listeners=new Set}initBase(e,t,n){this._meta=e,this._story=t,this._args=argsFromControls(e.controls),this._chrome=this.createChrome(e,n),this.refreshChromeText()}get meta(){return this._meta}get story(){return this._story}get args(){return this._args}get root(){return this._chrome.root}set args(e){this._args!==e&&(this._args=e,this.updateArgs(e),this.emitArgs(e))}emitArgs(e){for(let t of this._listeners)t(e)}onArgsChanged(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}setArg(e,t){this.args={...this._args,[e]:t}}initialize(){}updateArgs(e){}teardown(){}addContent(e){this._chrome.hasStage&&this._chrome.setStageContent(e)}refreshChromeText(){let e=this._story?`${this._meta.title} — ${this._story}`:this._meta.title;this._chrome.setChromeText(e,this._meta.description??``)}};const a=[`system`,`light`,`dark`];var StorybookSettings=class{constructor(e=()=>!1){this._colorScheme=`system`,this._accentMode=`system`,this._accent=`blue`,this._listeners=new Set,this._systemDark=e}get colorScheme(){return this._colorScheme}set colorScheme(e){!a.includes(e)||e===this._colorScheme||(this._colorScheme=e,this._notify())}get accentMode(){return this._accentMode}set accentMode(e){e!==this._accentMode&&(this._accentMode=e,this._notify())}get accent(){return this._accent}set accent(e){e!==this._accent&&(this._accent=e,this._notify())}get resolvedAccent(){return this._accentMode===`custom`?this._accent:null}get resolvedDark(){return this._colorScheme===`dark`?!0:this._colorScheme===`light`?!1:this._systemDark()}get state(){return{colorScheme:this._colorScheme,accentMode:this._accentMode,accent:this._accent}}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}systemChanged(){this._colorScheme===`system`&&this._notify()}_notify(){let e=this.state;for(let t of[...this._listeners])try{t(e)}catch{}}};const o={ListStories:`<method name="ListStories"><arg type="s" direction="out" name="stories_json"/></method>`,GetCurrentStory:`<method name="GetCurrentStory"><arg type="s" direction="out" name="story_json"/></method>`,OpenStory:`<method name="OpenStory"><arg type="s" direction="in" name="title"/><arg type="b" direction="out" name="opened"/></method>`,SetStoryArg:`<method name="SetStoryArg"><arg type="s" direction="in" name="name"/><arg type="s" direction="in" name="value_json"/><arg type="b" direction="out" name="applied"/></method>`,GetStoryArgs:`<method name="GetStoryArgs"><arg type="s" direction="out" name="args_json"/></method>`};function storybookDevtoolsExtension(e){let t=buildStorybookDevtoolsExtension(e.controller),n=[],r={},i={};for(let e of t.methods){let t=o[e.name];t&&n.push(t),r[e.name]=e.handler,i[e.name]=e.kind}return{methodsXml:n,handlers:r,methodKinds:i,contributeStatus:t.contributeStatus}}const s=e(import.meta.url);let c;function load$7(){return c===void 0&&(c=s(`@gjsify/node-gi/gi`).requireGi(`GLib`,`2.0`)),c}__name(load$7,`load`);var l=new Proxy(Object.create(null),{get(e,t){return load$7()[t]},has(e,t){return t in load$7()}});function variantKindFor(e,t){switch(e){case`s`:case`b`:case`i`:case`u`:case`d`:return e}if(typeof t==`string`)return`s`;if(typeof t==`boolean`)return`b`;if(typeof t==`number`)return Number.isInteger(t)?`i`:`d`;throw Error(`Cannot build a GLib.Variant from ${typeof t}`)}function buildVariant(e,t){switch(variantKindFor(e?.dup_string()??null,t)){case`s`:return l.Variant.new_string(String(t));case`b`:return l.Variant.new_boolean(!!t);case`i`:return l.Variant.new_int32(Number(t));case`u`:return l.Variant.new_uint32(Number(t));case`d`:return l.Variant.new_double(Number(t))}}function describeActions(e){return e?e.list_actions().sort((e,t)=>e.localeCompare(t)).map(t=>({name:t,enabled:e.get_action_enabled(t),parameterType:e.get_action_parameter_type(t)?.dup_string()??null,stateType:e.get_action_state_type(t)?.dup_string()??null})):[]}function activateAction(e,t,n){let r=e.get_action_parameter_type(t),i=n==null?null:buildVariant(r,n);e.activate_action(t,i)}function changeActionState(e,t,n){e.change_action_state(t,buildVariant(e.get_action_state_type(t),n))}const u=e(import.meta.url);let d;function load$6(){return d===void 0&&(d=u(`@gjsify/node-gi/gi`).requireGi(`Gdk`,`4.0`)),d}__name(load$6,`load`);var f=new Proxy(Object.create(null),{get(e,t){return load$6()[t]},has(e,t){return t in load$6()}});const p=e(import.meta.url);let m;function load$5(){return m===void 0&&(m=p(`@gjsify/node-gi/gi`).requireGi(`Gtk`,`4.0`)),m}__name(load$5,`load`);var h=new Proxy(Object.create(null),{get(e,t){return load$5()[t]},has(e,t){return t in load$5()}});const g=new Map;function swapCss(e,t){let n=f.Display.get_default();if(!n)return!1;let r=g.get(e);return r||(r=new h.CssProvider,h.StyleContext.add_provider_for_display(n,r,h.STYLE_PROVIDER_PRIORITY_USER+1),g.set(e,r)),r.load_from_string(t),!0}function dumpCss(){return{providers:[...g.keys()]}}const _=`org.gjsify.Devtools`;function formatDbusErrorMessage(e,t){return`${e}: ${t}`}const ee={GetStatus:`read-only`,Screenshot:`read-only`,ScreenshotScaled:`read-only`,ListActions:`read-only`,ActivateAction:`mutating`,ChangeActionState:`mutating`,PresentWindow:`read-only`,ResizeWindow:`mutating`,ListToplevels:`read-only`,DumpTree:`read-only`,GetProperty:`read-only`,GetFocused:`read-only`,FindWidget:`read-only`,SendKey:`mutating`,ActivateWidget:`mutating`,DumpGSettings:`read-only`,DumpCss:`read-only`,SwapCss:`mutating`};function sanitizeInstanceId(e){let t=e.toLowerCase().replace(/[^a-z0-9]/g,``);return/^[a-z]/.test(t)?t:`i${t||`0`}`}function appIdToObjectPath(e){return`/${e.replace(/\./g,`/`).replace(/-/g,`_`)}`}function resolveBusAddress(e,t){let n=appIdToObjectPath(e),r=t&&t!=="default"?sanitizeInstanceId(t):`default`;return r==="default"?{busName:e,objectPath:`${n}/devtools`,instance:`default`}:{busName:`${e}.${r}`,objectPath:`${n}/${r}/devtools`,instance:r}}const v=`GJSIFY_DEVTOOLS_ADDRESS`;function isDevtoolsEnabledValue(e){if(e==null)return!1;let t=e.toLowerCase();return t!==``&&t!==`0`&&t!==`false`}function devtoolsAddressFilePath(e,t,n){let{busName:r}=resolveBusAddress(t,n);return`${e}/gjsify-devtools/${r}.address`}function buildDevtoolsIfaceXml(e=[]){return`<node>
2
2
  <interface name="${_}">
3
3
  <method name="GetStatus">
4
4
  <arg type="s" direction="out" name="status_json"/>
@@ -75,7 +75,7 @@ import{createRequire as e}from"node:module";import"@gjsify/node-gi/globals";impo
75
75
  </method>${e.length>0?`\n${e.join(`
76
76
  `)}`:``}
77
77
  </interface>
78
- </node>`}const ee=e(import.meta.url);let b;function load$4(){return b===void 0&&(b=ee(`@gjsify/node-gi/gi`).requireGi(`Gio`,`2.0`)),b}__name(load$4,`load`);var x=new Proxy(Object.create(null),{get(e,t){return load$4()[t]},has(e,t){return t in load$4()}});function isWin32(){return l.DIR_SEPARATOR===92}function defaultListenAddress(){return isWin32()?`nonce-tcp:host=127.0.0.1`:`unix:tmpdir=${l.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(e){return e instanceof l.Error&&e.matches(x.io_error_quark(),x.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((x.File.new_for_path(e).query_info(`unix::mode`,x.FileQueryInfoFlags.NONE,null).get_attribute_uint32(`unix::mode`)&61440)!=49152)return`not-a-socket`}catch{return`not-a-socket`}let t=new x.SocketClient;t.set_timeout(2);let n;try{n=t.connect(x.UnixSocketAddress.new(e),null)}catch{return`dead`}return n.close(null),`live`}function clearReclaimableSocket(e){let t=unixSocketPath(e);if(!t||!l.file_test(t,l.FileTest.EXISTS))return;let n=inspectExistingSocket(t);if(n===`live`)throw new DevtoolsPeerServerError(`cannot listen on ${e}: another process is already listening there. Stop it, or point ${y} (or options.address) at a different socket — GJSIFY_DEVTOOLS_INSTANCE=<label> lets two devtools-enabled apps run side by side.`,e,`address-in-use`);if(n===`not-a-socket`)throw new DevtoolsPeerServerError(`cannot listen on ${e}: ${t} already exists and is not a socket, so it will NOT be removed. Point ${y} (or options.address) at a free path.`,e,`occupied-by-other-file`);try{x.File.new_for_path(t).delete(null)}catch(n){throw new DevtoolsPeerServerError(`cannot listen on ${e}: ${t} is a socket nothing listens on, but removing it failed (${n}). Delete it by hand, or point ${y} at a free path.`,e,`address-in-use`,n)}console.log(`[gjsify-devtools] reclaimed the stale socket ${t}: 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:`)?x.DBusServerFlags.NONE:x.DBusServerFlags.AUTHENTICATION_REQUIRE_SAME_USER}function startDevtoolsPeerServer(e,t,n){let r=n&&n!==``?n:defaultListenAddress();clearReclaimableSocket(r);let i;try{i=x.DBusServer.new_sync(r,flagsForAddress(r),x.dbus_generate_guid(),null,null)}catch(e){let t=isAddressInUse(e);throw new DevtoolsPeerServerError(t?`cannot listen on ${r}: the address is already in use (${e}). Stop whatever holds it, or point ${y} (or options.address) at a different address.`:`cannot listen on ${r}: ${e}. Check the address form — \`unix:path=/tmp/app.sock\`, \`unix:tmpdir=/tmp\` or \`nonce-tcp:host=127.0.0.1\`.`,r,t?`address-in-use`:`listen-failed`,e)}let a=new Set;i.connect(`new-connection`,(n,r)=>(a.add(r),r.connect(`closed`,()=>{e.unexport(r),a.delete(r)}),e.export(r,t),!0)),i.start();let o=!1;return{address:i.get_client_address(),objectPath:t,get connectionCount(){return a.size},stop(){if(!o){o=!0,i.stop();for(let t of a)e.unexport(t),!t.is_closed()&&t.close(null,(e,t)=>{try{e.close_finish(t)}catch{}});a.clear()}}}}function writeDevtoolsAddressFile(e,t){try{if(l.mkdir_with_parents(l.path_get_dirname(e),448),!l.file_set_contents(e,`${t}\n`))return null}catch(t){return console.error(`[gjsify-devtools] could not publish the peer address to ${e}: ${t}`),null}try{x.File.new_for_path(e).set_attribute_uint32(`unix::mode`,384,x.FileQueryInfoFlags.NONE,null)}catch(t){console.error(`[gjsify-devtools] could not restrict ${e} to the current user: ${t}`)}return e}function removeDevtoolsAddressFile(e){try{x.File.new_for_path(e).delete(null)}catch{}}const te=e(import.meta.url);let S;function load$3(){return S===void 0&&(S=te(`@gjsify/node-gi/gi`).requireGi(`Graphene`,`1.0`)),S}__name(load$3,`load`);var ne=new Proxy(Object.create(null),{get(e,t){return load$3()[t]},has(e,t){return t in load$3()}});function defaultCaptureScale(e){let t=e.get_scale_factor?.();return typeof t==`number`&&t>0?t:1}function captureWidget(e,t={}){let n=e.get_native()?.get_renderer();if(!n)return{png:null,blocker:`no-renderer`};let r=e.get_width(),i=e.get_height();if(r<=0||i<=0)return{png:null,blocker:`zero-size`};let a=t.scale&&t.scale>0?t.scale:defaultCaptureScale(e),o=h.WidgetPaintable.new(e),s=h.Snapshot.new();a!==1&&s.scale(a,a),o.snapshot(s,r,i);let c=s.to_node();if(!c)return{png:null,blocker:`empty-snapshot`};let l=new ne.Rect;l.init(0,0,r*a,i*a);let u=n.render_texture(c,l).save_to_png_bytes().get_data();return u?{png:new Uint8Array(u)}:{png:null,blocker:`empty-png`}}function captureWidgetPng(e,t={}){return captureWidget(e,t).png}function dumpGSettings(e){let t=x.SettingsSchemaSource.get_default()?.lookup(e,!0);if(!t)throw Error(formatDbusErrorMessage(`not-found`,`GSettings schema '${e}' is not installed`));let n=new x.Settings({settings_schema:t}),r={};for(let e of t.list_keys())r[e]=n.get_value(e).recursiveUnpack();return r}const re=e(import.meta.url);let C;function load$2(){return C===void 0&&(C=re(`@gjsify/node-gi/gi`).requireGi(`GObject`,`2.0`)),C}__name(load$2,`load`);var w=new Proxy(Object.create(null),{get(e,t){return load$2()[t]},has(e,t){return t in load$2()}});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=w.type_from_name(n),i=w.type_from_name(t);return!r||!i?!1:w.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 a=r.get_item(e);widgetIsA(a,`GtkEventControllerKey`)&&(a.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=h.Window.get_toplevels(),t=e.get_n_items(),n=[];for(let r=0;r<t;r++){let t=e.get_item(r);t&&n.push({path:`toplevel:${r}`,type:widgetType(t),title:t.get_title?.()??null,mapped:t.get_mapped(),focused:t.is_active??!1})}return n}function resolveWidgetPath(e){let t=parseWidgetPath(e);if(!t)return null;let n=h.Window.get_toplevels().get_item(t.toplevel);if(!n)return null;for(let e of t.children)if(n=nthChild(n,e),!n)return null;return n}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(),a=0;for(;i;){let e=walkForSelector(i,t,`${n}/child:${a}`,r);if(e)return e;i=i.get_next_sibling(),a++}return null}function geometryOf(e){if(!e.get_mapped())return;let t=e.get_allocation(),n=t.width+e.get_margin_start()+e.get_margin_end(),r=t.height+e.get_margin_top()+e.get_margin_bottom(),[i,a]=e.measure(h.Orientation.HORIZONTAL,-1),o=n>0?Math.max(n,i):-1,[s,c]=e.measure(h.Orientation.VERTICAL,o),l={width:n,height:r,widthRequest:[i,a],heightRequest:[s,c]};return(n<i||r<s)&&(l.short=!0),l}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 a=e.get_first_child(),o=0;for(;a;)r.children.push(dumpTree(a,t-1,`${n}/child:${o}`)),a=a.get_next_sibling(),o++;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=[],n=e,r=n.get_parent();for(;r;){let e=childIndex(r,n);if(e<0)return null;t.unshift(e),n=r,r=n.get_parent()}let i=h.Window.get_toplevels(),a=i.get_n_items();for(let e=0;e<a;e++)if(i.get_item(e)===n)return buildWidgetPath(e,t);return null}function isActiveWindowScope(e){return!e||e===`window`||e===`active`}function frameDelay(e){return new Promise(t=>{l.timeout_add(l.PRIORITY_DEFAULT,e,()=>(t(),l.SOURCE_REMOVE))})}async function captureWidgetWhenRenderable(e,t={},n=12,r=50){let i=null;for(let a=0;a<n;a++){let n=captureWidget(e,t);if(n.png)return{png:n.png,blocker:null};i=n.blocker,await frameDelay(r)}let a=captureWidget(e,t);return{png:a.png,blocker:a.png?null:a.blocker??i}}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(v))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??[])),r=x.DBusExportedObject.wrapJSObject(n,this);r.export(e,t),this._exported.set(e,r)}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:h.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(e,t){try{let n=typeof e?.[0]==`string`?e[0]:``,r=await this._captureScopePng(n);t.return_value(new l.Variant(`(ay)`,[r]))}catch(e){t.return_dbus_error(`org.gjsify.Devtools.Error.Screenshot`,e instanceof Error?e.message:String(e))}}async ScreenshotScaledAsync(e,t){try{let n=typeof e?.[0]==`string`?e[0]:``,r=typeof e?.[1]==`number`?e[1]:0,i=await this._captureScopePng(n,r>0?{scale:r}:{});t.return_value(new l.Variant(`(ay)`,[i]))}catch(e){t.return_dbus_error(`org.gjsify.Devtools.Error.Screenshot`,e instanceof Error?e.message:String(e))}}async _captureScopePng(e,t={}){let n=this._resolveRootWidget(e);if(!n){if(isActiveWindowScope(e))return new Uint8Array;throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${e}'`))}let r=captureWidget(n.widget,t);if(r.png)return r.png;let i=n.widget.get_root();i instanceof h.Window&&i.present();let a=await captureWidgetWhenRenderable(n.widget,t);return a.png?a.png:(console.warn(`[devtools] Screenshot('${e}') has no image: ${a.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[n,r,i]=h.accelerator_parse(e);if(!n)throw Error(formatDbusErrorMessage(`invalid-params`,`cannot parse accelerator '${e}'`));let a;if(a=t?this._resolveRootWidget(t)?.widget??null:this._app.get_active_window()?.get_focus()??null,!a)throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${t||`focus`}'`));return sendKeyToWidget(a,r,i??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 h.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 T=`DBUS_SESSION_BUS_ADDRESS`,ie=new Set;function envEnabled(){return isDevtoolsEnabledValue(l.getenv(`GJSIFY_DEVTOOLS`))}function envValue(e){let t=l.getenv(e);return t&&t!==``?t:null}function sessionBusUsable(){if(!envValue(T))return!1;try{return x.bus_get_sync(x.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] ${T} 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 (${T} is unset) — using the bus-less peer transport instead. Point the bridge at the address below, or set ${y} 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(),console.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(e,t,n,r){let i=e.get_is_registered(),a=i?e.get_dbus_connection():null,o=i?e.get_dbus_object_path():null,s=envValue(T),c=!!(a&&o),u=c||sessionBusUsable(),d=chooseDevtoolsTransport({requestedAddress:n.address??envValue(y),hasAppConnection:c,sessionBusUsable:u}),f=e.get_application_id()??`unknown`,p=`${o??appIdToObjectPath(f)}/devtools`;if((d.kind===`unregistered`||d.kind===`peer`&&d.reason===`no-session-bus`)&&console.error(describeMissingConnection(s,u)),d.kind===`session-bus`&&a)t.export(a,p),console.log(`[gjsify-devtools] exported ${_} at ${p} (dest ${f})`);else if(d.kind===`peer`){let n=startDevtoolsPeerServer(t,p,d.address??void 0),i=writeDevtoolsAddressFile(devtoolsAddressFilePath(l.get_user_runtime_dir(),f,r),n.address);t.attachPeerServer(n,i),console.log(`[gjsify-devtools] exported ${_} at ${p} (peer address ${n.address}${i?`, published to ${i}`:``})`),i&&e.connect(`shutdown`,()=>removeDevtoolsAddressFile(i))}return ie.add(t),t}const ae=`&(?![a-zA-Z][a-zA-Z0-9]*;|#\\d+;|#x[0-9a-fA-F]+;)|<(?![a-zA-Z/!?])`;RegExp(ae),RegExp(ae,`g`);const oe=[`AdwNavigationSplitView`,`GtkListBox`,`AdwOverlaySplitView`];function probeEnabled(){let e=l.getenv(`GJSIFY_STORYBOOK_PROBE`);if(e==null)return!1;let t=e.toLowerCase();return t!==``&&t!==`0`&&t!==`false`}const se=5e3;function exitIfNotDrained(){if(typeof process>`u`||typeof process.exit!=`function`)return;let e=setTimeout(()=>{console.error(`STORYBOOK PROBE: host still alive ${se}ms after quit(), exiting`),process.exit(process.exitCode??0)},se);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(e,t,n={}){let r=n.requireChrome??oe,i=n.out??l.getenv(`GJSIFY_STORYBOOK_PROBE_OUT`)??void 0,a=n.timeoutMs??8e3,o=n.storyWidget??l.getenv(`GJSIFY_STORYBOOK_PROBE_STORY_WIDGET`)??void 0,s=t.controller.listStories(),c=[...new Set(s.map(e=>e.category))],u=n.story??l.getenv(`GJSIFY_STORYBOOK_PROBE_STORY`)??s[0]?.title,d=u?t.openStoryByTitle(u):!1,f=t.activeStory,p=new Set;collectTypes(dumpTree(t,60,`toplevel:0`),p);let m=r.filter(e=>!p.has(e)),h=new Set;f&&collectTypes(dumpTree(f,60,`story`),h);let g=h.size,_=o?h.has(o):null,finish=t=>{let n=JSON.stringify(t);if(t.ok)console.log(`STORYBOOK PROBE: PASS ${n}`);else{console.error(`STORYBOOK PROBE: FAIL ${n}`);try{typeof process<`u`&&(process.exitCode=1)}catch{}}if(i)try{l.file_set_contents(i,JSON.stringify(t,null,2))}catch{}e.quit(),exitIfNotDrained()},v=0;l.timeout_add(l.PRIORITY_DEFAULT,100,()=>{v+=100;let e=captureWidgetPng(t),n=t.get_width()>0&&t.get_height()>0;if(!e&&!(v>=a))return l.SOURCE_CONTINUE;let i=f?captureWidgetPng(f):null,p=s.length>=1&&c.length>=1&&m.length===0&&d&&f!=null&&g>1,y;return s.length<1?y=`no stories registered`:c.length<1?y=`no categories`:m.length>0?y=`chrome missing: ${m.join(`, `)}`:!d||f==null?y=`could not open story: ${u??`(none)`}`:g<=1&&(y=`opened story rendered an empty subtree`),p&&o&&!h.has(o)&&(p=!1,y=`story widget ${o} not found in the opened story subtree`),p&&n&&(!e||e.length===0)&&(p=!1,y=`window realized (${t.get_width()}x${t.get_height()}) but the GSK capture was empty`),finish({ok:p,reason:y,stories:s.length,categories:c,opened:d,activeStory:f?f.meta.title:null,requiredChrome:r,missingChrome:m,storySubtreeWidgets:g,storyWidgetPresent:_,windowRealized:n,windowPngBytes:e?e.length:0,storyPngBytes:i?i.length:0}),l.SOURCE_REMOVE})}const ce=e(import.meta.url);let E;function load$1(){return E===void 0&&(E=ce(`@gjsify/node-gi/gi`).requireGi(`Adw`,`1`)),E}__name(load$1,`load`);var D=new Proxy(Object.create(null),{get(e,t){return load$1()[t]},has(e,t){return t in load$1()}}),UnsupportedGObjectError=class extends Error{constructor(e,t){super(t),this.name=`UnsupportedGObjectError`,this.feature=e}};const le=new WeakSet;function makeType(e){let t=Object.freeze({name:e});return le.add(t),t}makeType(`gchararray`),makeType(`gboolean`),makeType(`gint`),makeType(`guint`),makeType(`gdouble`);const O={READABLE:1,WRITABLE:2,READWRITE:3,CONSTRUCT:4,CONSTRUCT_ONLY:8};var k=class ParamSpec{constructor(e,t,n,r,i,a,o,s){this.kind=e,this.name=t,this.nick=n,this.blurb=r,this.flags=i,this.defaultValue=a,this.minimum=o,this.maximum=s}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,a,o){return new ParamSpec(`int`,e,t,n,r,o,i,a)}static uint(e,t,n,r,i,a,o){return new ParamSpec(`uint`,e,t,n,r,o,i,a)}static double(e,t,n,r,i,a,o){return new ParamSpec(`double`,e,t,n,r,o,i,a)}get_default_value(){return this.defaultValue}};const A={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`)};A.GTypeName,A.template,A.internalChildren,A.properties,A.signals,A.cssName,A.children,A.interfaces,A.requires,A.GTypeFlags;const ue=new WeakMap;function chainOf(e){let t=[];for(let n=e;typeof n==`function`;n=Object.getPrototypeOf(n)){let e=ue.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]}function parseSignal(e){let t=e.indexOf(`::`);return t===-1?{name:e}:{name:e.slice(0,t),detail:e.slice(t+2)}}const de=new WeakMap;function stateOf$1(e){let t=de.get(e);return t||(t={values:new Map,handlers:new Map,connections:new Map,emissions:[]},de.set(e,t)),t}__name(stateOf$1,`stateOf`);function runHandlers(e,t,n){let r=stateOf$1(e),i={key:t,stopped:!1};r.emissions.push(i);try{for(let{id:a,handler:o}of(r.handlers.get(t)??[]).slice()){if(i.stopped)break;r.connections.has(a)&&o(e,...n)}}finally{r.emissions.pop()}}const fe={name:`pure-js`,supportsForeignParentClasses:!1,registerForeignClass(e,t){throw TypeError(`The pure-JS GObject engine cannot register '${t.GTypeName}' (${e.name??`anonymous`}) over a foreign parent class: there is no GType to register it as. Check supportsForeignParentClasses before calling — a caller that reaches this is one that would otherwise have fallen back silently, which is what ADR 0105 refuses.`)},register(){},getValue(e,t){let{values:n}=stateOf$1(e);return n.has(t.name)||n.set(t.name,t.get_default_value()),n.get(t.name)},setValue(e,t,n){let{values:r}=stateOf$1(e),i=n!==r.get(t.name);return r.set(t.name,n),i},addHandler(e,t,n,r){let i=stateOf$1(e),a=i.handlers.get(n)??[];a.push({id:t,handler:r}),i.handlers.set(n,a),i.connections.set(t,()=>{a.splice(a.findIndex(e=>e.id===t),1)})},removeHandler(e,t){let n=stateOf$1(e),r=n.connections.get(t);return r?(n.connections.delete(t),r(),!0):!1},emit(e,t,n){runHandlers(e,t,n)},notify(e,t){runHandlers(e,`notify::${t.name}`,[t])},stopEmission(e,t){let{emissions:n}=stateOf$1(e);for(let e=n.length-1;e>=0;e--){let r=n[e];if(r.key===t&&!r.stopped)return r.stopped=!0,!0}return!1},bind(e,t,n,r,i){return bindProperties(e,t,n,r,i)}},pe=new WeakMap;function engineOf(e){let t=pe.get(e);return t||(t=chainOfInstance(e)[0]?.engine??fe,pe.set(e,t)),t}let me=0;const j=new WeakMap;function connectInstance(e,t,n){let r=chainOfInstance(e),i=typeNameOf(e,r),{name:a,detail:o}=parseSignal(t),own=t=>{let r=++me;return engineOf(e).addHandler(e,r,t,n),r},foreign=()=>{let a=r[0]?.door;if(!a)throw Error(`No signal '${t}' on object '${i}'`);let o=++me,s=a.listen(e,t,n),c=j.get(e);return c||j.set(e,c=new Map),c.set(o,s),o};if(a===`notify`){if(o===void 0)throw new UnsupportedGObjectError(`connect("notify")`,`connect('notify') without a property is outside the GObject subset; connect 'notify::<property>' on '${i}'.`);let e=findProperty(r,o);return e?own(`notify::${e.name}`):foreign()}if(findSignal(r,a)){if(o!==void 0)throw Error(`Signal '${a}' on object '${i}' has no detail`);return own(a)}return foreign()}function disconnectInstance(e,t){let n=j.get(e)?.get(t);if(n){j.get(e).delete(t),n();return}if(!engineOf(e).removeHandler(e,t))throw Error(`No handler with id ${t} is connected to ${String(e)}`)}function emitInstance(e,t,...n){let r=chainOfInstance(e),i=typeNameOf(e,r),a=findSignal(r,t);if(a){if(n.length!==a.length)throw Error(`Signal '${t}' on ${i} requires ${a.length} args got ${n.length}`);engineOf(e).emit(e,t,n);return}let o=r[0]?.door;if(!o)throw Error(`No signal '${t}' on object '${i}'`);o.dispatch(e,t,n)}function notifyInstance(e,t){let n=chainOfInstance(e),r=findProperty(n,t);if(r){engineOf(e).notify(e,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&O.READABLE,a=r&O.WRITABLE,o=t??{configurable:!0,enumerable:!0};return i&&a?!o.get&&!o.set?(o.get=function(){return engineOf(this).getValue(this,e)},o.set=function(t){engineOf(this).setValue(this,e,t)&&this.notify(n)}):o.get?o.set||=function(){throw Error(`getter defined without setter for property ${n}`)}:o.get=function(){throw Error(`setter defined without getter for property ${n}`)}:i&&!o.get?o.get=function(){throw Error(`missing getter for read-only property ${n}`)}:a&&!o.set&&(o.set=function(){throw Error(`missing setter for write-only property ${n}`)}),o}function checkAccessors(e,t){let{name:n,flags:r}=t;if(r&O.CONSTRUCT_ONLY)return;let[,i,a]=aliasesOf(n),own=t=>Object.getOwnPropertyDescriptor(e,t),o=own(n),s=o,c=n.includes(`-`),l,u;c&&(l=own(i),u=own(a),o??=l,o??=u);let d=r&O.READABLE,f=r&O.WRITABLE;(!o||d&&!o.get||f&&!o.set)&&(o=generateAccessors(t,o)),s||Object.defineProperty(e,n,o),c&&(l||Object.defineProperty(e,i,o),u||Object.defineProperty(e,a,o))}function defineConstructOnly(e,t,n){let r=engineOf(e);r.setValue(e,t,n);for(let n of new Set(aliasesOf(t.name)))Object.defineProperty(e,n,{get:()=>r.getValue(e,t),enumerable:!0,configurable:!0})}function bindProperties(e,t,n,r,i=[]){let a=i.includes(`invert-boolean`),o=!1,transfer=(e,t,n,r)=>()=>{if(!o){o=!0;try{let i=e[t];n[r]=a?!i:i}finally{o=!1}}},s=transfer(e,t,n,r),c=[[e,e.connect(`notify::${t}`,s)]];if(i.includes(`bidirectional`)){let i=transfer(n,r,e,t);c.push([n,n.connect(`notify::${r}`,i)])}return i.includes(`sync-create`)&&s(),{unbind(){for(let[e,t]of c.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 a=e[t];if(a===void 0)throw Error(`A handler called ${t} was not defined on ${String(e)}`);return a.bind(i)}function scopeOf(e){let t=engineOf(e);return{instance:e,handler:(t,n)=>createClosure(e,t,n?.flags?.includes(`swapped`)??!1,n?.object),bind:(e,n,r,i,a)=>t.bind(e,n,r,i,a??[])}}function constructRegistered(e,t={}){let n=chainOfInstance(e),r={},i=new Map;for(let[e,a]of Object.entries(t)){let t=findProperty(n,e);t?i.set(t,a):r[e]=a}let a=[];for(let t of[...n].reverse())t.template&&a.push([t,t.door.createFromTree(t.template,scopeOf(e),e)]);for(let t of n)for(let n of t.properties)n.flags&O.CONSTRUCT_ONLY&&defineConstructOnly(e,n,i.has(n)?i.get(n):n.get_default_value());for(let t of[...n].reverse())for(let n of t.properties)n.flags&O.CONSTRUCT&&!(n.flags&O.CONSTRUCT_ONLY)&&(e[n.name]=i.has(n)?i.get(n):n.get_default_value());for(let[t,n]of i)t.flags&(O.CONSTRUCT|O.CONSTRUCT_ONLY)||(e[t.name]=n);for(let[t,n]of a){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 he=Symbol(`GIR type`);function registerBaseClass(e,t,n,r=[],i=fe){let missing=e=>{throw Error(`No signal '${e}' on object '${t}'`)},a=makeType(t);Object.defineProperty(e,"$gtype",{get:()=>a,enumerable:!1,configurable:!1});for(let t of r)checkAccessors(e.prototype,t);let o={klass:e,typeName:t,gtype:a,properties:r,signals:n,internalChildren:[],engine:i,door:{name:t,dispatch:(e,t)=>missing(t),listen:(e,t)=>missing(t),createFromTree:()=>missing(`template`),attach(){},register(){}}};ue.set(e,o),i.register(o)}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)}};const ge={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};ge.GPL_2_0_ONLY,ge.GPL_3_0_ONLY,ge.UNKNOWN;const M=Object.freeze({SHIFT:1,CONTROL:4,ALT:8,SUPER:1<<26,HYPER:1<<27,META:1<<28}),_e=M.SHIFT|M.CONTROL|M.ALT|M.SUPER|M.HYPER|M.META,ve={primary:M.CONTROL,control:M.CONTROL,ctrl:M.CONTROL,ctl:M.CONTROL,shift:M.SHIFT,shft:M.SHIFT,alt:M.ALT,mod1:M.ALT,meta:M.META,super:M.SUPER,hyper:M.HYPER},ye=[[M.SHIFT,`<Shift>`],[M.CONTROL,`<Control>`],[M.ALT,`<Alt>`],[M.META,`<Meta>`],[M.SUPER,`<Super>`],[M.HYPER,`<Hyper>`]],be=Object.freeze({space:32,exclam:33,quotedbl:34,numbersign:35,dollar:36,percent:37,ampersand:38,apostrophe:39,parenleft:40,parenright:41,asterisk:42,plus:43,comma:44,minus:45,period:46,slash:47,colon:58,semicolon:59,less:60,equal:61,greater:62,question:63,at:64,bracketleft:91,backslash:92,bracketright:93,asciicircum:94,underscore:95,grave:96,braceleft:123,bar:124,braceright:125,asciitilde:126,BackSpace:65288,Tab:65289,Return:65293,Escape:65307,Home:65360,Left:65361,Up:65362,Right:65363,Down:65364,Page_Up:65365,Page_Down:65366,End:65367,Insert:65379,KP_Enter:65421,KP_Multiply:65450,KP_Add:65451,KP_Subtract:65453,KP_Divide:65455,ISO_Left_Tab:65056,Delete:65535,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481}),xe=new Map(Object.entries(be).map(([e,t])=>[t,e]));function keyvalFromName(e){return/^[A-Za-z0-9]$/.test(e)?e.toLowerCase().charCodeAt(0):be[e]??null}function keyvalName(e){return e===0?``:e>=48&&e<=57||e>=97&&e<=122?String.fromCharCode(e):xe.get(e)??``}function parseAcceleratorKeyval(e){let t=0,n=e.trim();for(;n.startsWith(`<`);){let e=n.indexOf(`>`);if(e===-1)return null;let r=ve[n.slice(1,e).toLowerCase()];if(r===void 0)return null;t|=r,n=n.slice(e+1)}if(n===``)return{keyval:0,modifiers:t};let r=keyvalFromName(n);if(r===null)throw new UnsupportedGObjectError(`accelerator key '${n}'`,`The key name '${n}' is outside the keysym subset of the Gtk.Application accelerators (ADR 0098 § 1).`);return{keyval:r,modifiers:t}}function acceleratorName({keyval:e,modifiers:t}){let n=``;for(let[e,r]of ye)t&e&&(n+=r);return n+keyvalName(e)}function consumesShift(e){return e>=32&&e<=126&&!(e>=97&&e<=122)}function significant({keyval:e,modifiers:t}){let n=t&_e;return{keyval:e,modifiers:consumesShift(e)?n&~M.SHIFT:n}}function canonicalDetailedName(e){let t=e.indexOf(`::`);if(t<=0)return e;let n=e.slice(t+2).replace(/\\/g,`\\\\`).replace(/'/g,`\\'`);return`${e.slice(0,t)}('${n}')`}var AcceleratorMap=class{#e=new Map;setAccels(e,t){let n=canonicalDetailedName(e),r=[];for(let e of t){let t=parseAcceleratorKeyval(e);if(t===null){console.error(`Gtk-CRITICAL **: Unable to parse accelerator '${e}': ignored request to install accelerators`);return}r.push(t)}r.length===0?this.#e.delete(n):this.#e.set(n,{names:r.map(acceleratorName),parsed:r})}getAccels(e){return[...this.#e.get(canonicalDetailedName(e))?.names??[]]}listActions(){return[...this.#e.keys()]}actionsFor(e){let t=parseAcceleratorKeyval(e);return t===null?(console.error(`Gtk-CRITICAL **: Unable to parse accelerator '${e}'`),[]):this.#t(t)}matching(e,t){return this.#t({keyval:e,modifiers:t})}#t(e){let t=significant(e),n=[];for(let[e,{parsed:r}]of this.#e)r.some(e=>e.keyval===t.keyval&&significant(e).modifiers===t.modifiers)&&n.push(e);return n}};const Se=[`blue`,`teal`,`green`,`yellow`,`orange`,`red`,`pink`,`purple`,`slate`],Ce={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),a=Math.cbrt(.0883024619*e+.2817188376*t+.6299787005*n);return[.2104542553*r+.793617785*i-.0040720468*a,1.9779984951*r-2.428592205*i+.4505937099*a,.0259040371*r+.7827717662*i-.808675766*a]}function oklabToLinear(e,t,n){let r=(e+.3963377774*t+.2158037573*n)**3,i=(e-.1055613458*t-.0638541728*n)**3,a=(e-.0894841775*t-1.291485548*n)**3;return[4.0767416621*r-3.3077115913*i+.2309699292*a,-1.2684380046*r+2.6097574011*i-.3413193965*a,-.0041960863*r-.7034186147*i+1.707614701*a]}function adwaitaStandaloneColor(e,t){let n=parseHex(e);if(!n)return e;let[r,i,a]=linearToOklab(toLinear(n[0]),toLinear(n[1]),toLinear(n[2])),[o,s,c]=oklabToLinear(t?Math.max(r,.85):Math.min(r,.5),i,a);return toHex(fromLinear(o),fromLinear(s),fromLinear(c))}function adwaitaAccentBgColor(e){return Ce[e]}function adwaitaAccentColor(e,t){return adwaitaStandaloneColor(Ce[e],t)}function refuse$5(e,t){return new UnsupportedGObjectError(e,`${e} ${t}, which is outside the Gio subset (ADR 0098 § 1).`)}__name(refuse$5,`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 we=new WeakMap;function actionRegistryOf(e,t=!0){let n=we.get(e);return n===void 0&&t&&(n=new ActionRegistry,we.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 Te={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)}},Ee={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$5(`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?{...Te,...Ee}:{...Te};for(let[t,r]of Object.entries(n))Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0,enumerable:!1})}const De=new WeakMap;function linkWindow(e,t){t===null?De.delete(e):De.set(e,t)}function refuse$4(e){return new UnsupportedGObjectError(e,`${e} is outside the GLib.Bytes subset (ADR 0100 § 3).`)}__name(refuse$4,`refuse`);const Oe=[`slice`,`hash`,`compare`,`equal`,`unref_to_data`,`unref_to_array`,`get_region`,`toArray`];var N=class Bytes{#e;constructor(e){if(!(e instanceof Uint8Array))throw refuse$4(`new GLib.Bytes(${typeof e})`);this.#e=e.slice()}static new(e){return new Bytes(e)}static new_take(){throw refuse$4(`GLib.Bytes.new_take()`)}static new_static(){throw refuse$4(`GLib.Bytes.new_static()`)}get_size(){return this.#e.length}get_data(){return this.#e.slice()}static view(e){return e.#e}};for(let e of Oe)Object.defineProperty(N.prototype,e,{value:()=>{throw refuse$4(`GLib.Bytes.${e}()`)},writable:!0,configurable:!0,enumerable:!1});function refuse$3(e){return new UnsupportedGObjectError(e,`${e} is outside the GLib.Error subset (ADR 0100 § 5).`)}__name(refuse$3,`refuse`);const ke=new WeakMap,Ae=new Map;function errorDomain(e,t,n){let r=Object.freeze({...n}),i={quark:t,name:e};return ke.set(r,i),Ae.set(t,i),r}const P=errorDomain(`Gtk.DialogError`,1001,{FAILED:0,CANCELLED:1,DISMISSED:2}),F=errorDomain(`Gio.IOErrorEnum`,1002,{FAILED:0,NOT_FOUND:1,NOT_SUPPORTED:15,CLOSED:18,CANCELLED:19,PENDING:20}),je=errorDomain(`Gio.ResourceError`,1003,{NOT_FOUND:0,INTERNAL:1});function domainOf(e){let t=typeof e==`number`?Ae.get(e):typeof e==`object`&&e?ke.get(e):void 0;if(!t)throw refuse$3(`GLib.Error domain ${String(e)}`);return t}var GLibError=class{constructor(e,t,n){this.domain=domainOf(e).quark,this.code=t,this.message=String(n),this.stack=Error(this.message).stack??``}matches(e,t){return domainOf(e).quark===this.domain&&t===this.code}toString(){return`${domainOf(this.domain).name}: ${this.message}`}static new_literal(){throw refuse$3(`GLib.Error.new_literal()`)}copy(){throw refuse$3(`GLib.Error.copy()`)}};function asGLibError(e,t,n){return e instanceof GLibError?e:new GLibError(t,n,e instanceof Error?`${e.name}: ${e.message}`:String(e))}const Me=Object.freeze({NONE:0});new TextDecoder;function notFound(e){return new GLibError(je,je.NOT_FOUND,`The resource at “${e}” does not exist`)}function checkFlags(e){if(e===Me.NONE)return;let t=Number.isInteger(e)?`0x${(e>>>0).toString(16)}`:String(e);throw Error(`${t} is not a valid value for flags argument lookup_flags`)}const Ne=new WeakMap;function tableOf(e){let t=typeof e==`object`&&e?Ne.get(e):void 0;if(!t)throw TypeError(`expected a Gio.Resource`);return t}const Pe=Symbol.for(`@gjsify/adwaita-core/gio-resource-registry`);function claimResourceRegistry(e){if(Object.prototype.hasOwnProperty.call(e,Pe))throw Error(`A second copy of the Gio resource registry was loaded: @gjsify/adwaita-core must be in the bundle once (ADR 0116 § 3).`);Object.defineProperty(e,Pe,{value:!0})}claimResourceRegistry(globalThis);const Fe=[];function lookup(e){if(e===``)return null;for(let t of Fe){let n=tableOf(t).entry(e);if(n)return n}return null}function resources_get_info(e,t){checkFlags(t);let n=lookup(e);if(!n)throw notFound(e);return[!0,n.size,n.flags]}const I=Object.freeze({KEY_space:32,KEY_a:97,KEY_d:100,KEY_e:101,KEY_q:113,KEY_s:115,KEY_w:119,KEY_Return:65293,KEY_Escape:65307,KEY_Left:65361,KEY_Up:65362,KEY_Right:65363,KEY_Down:65364});I.KEY_space,I.KEY_Return,I.KEY_Escape,I.KEY_Left,I.KEY_Up,I.KEY_Right,I.KEY_Down;const Ie={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},Le={LOGOUT:1,SWITCH:2,SUSPEND:4,IDLE:8};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$2(e,t){return new UnsupportedGObjectError(e,`${e} ${t}, which is outside the Gio subset (ADR 0098 § 1).`)}__name(refuse$2,`refuse`);const Re=[`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_flags`,`get_is_remote`,`get_is_registered`,`get_dbus_connection`,`get_dbus_object_path`,`bind_busy_property`,`add_action_entries`,`set_default`],ze=[`is_remote`,`is_registered`,`is_busy`,`inactivity_timeout`,`action_group`],Be=[`open`,`command-line`,`handle-local-options`,`shutdown`,`name-lost`],Ve=[`set_menubar`,`get_menubar`,`get_menu_by_id`,`set_app_menu`,`get_app_menu`,`get_menu_by_id`],He=new WeakMap;let Ue=null,We=0;function rememberDefault(e){Ue??=e}function stateOf(e){let t=He.get(e);return t===void 0&&(t={id:null,resourceBasePath:void 0,windows:[],inhibitors:new Map,running:!1,resolve:()=>{}},He.set(e,t)),t}const Ge=new WeakMap;function acceleratorsOf(e){let t=Ge.get(e);return t===void 0&&(t=new AcceleratorMap,Ge.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[he]=`Gio.Application`}static id_is_valid(e){return isValidApplicationId(e)}static get_default(){return Ue}constructor(e){super(e),rememberDefault(this);let t=stateOf(this);t.resourceBasePath===void 0&&(t.resourceBasePath=t.id===null?null:`/${t.id.split(`.`).join(`/`)}`)}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!==Ie.NONE)throw refuse$2(`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}get resource_base_path(){return stateOf(this).resourceBasePath??null}set resource_base_path(e){let t=e??null;if(t!==null&&!t.startsWith(`/`))throw Error(`Gio.Application: resource base path '${t}' does not start with '/'`);let n=stateOf(this);n.resourceBasePath!==t&&(n.resourceBasePath=t,this.notify(`resource-base-path`))}get_resource_base_path(){return this.resource_base_path}set_resource_base_path(e){this.resource_base_path=e}vfunc_startup(){}vfunc_activate(){}run(){throw refuse$2(`Gio.Application.run()`,`blocks, and a page cannot; use runAsync()`)}connect(e,t){let n=e.split(`::`)[0]??e;if(Be.includes(n))throw refuse$2(`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,a=!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,a=!0}return t.windows[0]??null};try{await n.start(body)}catch(e){i=e,a=!0}if(a)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:[]},[k.string(`application-id`,``,``,O.READWRITE|O.CONSTRUCT,null),k.uint(`flags`,``,``,O.READWRITE|O.CONSTRUCT,0,4294967295,0),k.string(`resource-base-path`,``,``,O.READWRITE,null)]),installActionMap(GioApplicationBase.prototype,!0);function refuseMembers$1(e,t,n){for(let n of t)Object.defineProperty(e,n,{value:()=>{throw refuse$2(`${n}()`,`is not implemented`)},writable:!0,configurable:!0,enumerable:!1});for(let t of n)Object.defineProperty(e,t,{get(){throw refuse$2(`the '${t}' property`,`is not implemented`)},configurable:!0,enumerable:!1})}__name(refuseMembers$1,`refuseMembers`),refuseMembers$1(GioApplicationBase.prototype,Re,ze);function withGtkApplication(e){class GtkApplication extends e{vfunc_startup(){super.vfunc_startup(),loadResources(this)}get active_window(){return stateOf(this).windows[0]??null}get_active_window(){return this.active_window}set_accels_for_action(e,t){acceleratorsOf(this).setAccels(e,t)}get_accels_for_action(e){return acceleratorsOf(this).getAccels(e)}get_actions_for_accel(e){return acceleratorsOf(this).actionsFor(e)}list_action_descriptions(){return acceleratorsOf(this).listActions()}get_windows(){return[...stateOf(this).windows]}add_window(e){let t=stateOf(this);t.windows.includes(e)||(t.windows.unshift(e),linkWindow(e,this))}inhibit(e,t,n){let r=hostOf(this);if(r.guardUnload===void 0)return 0;let i=stateOf(this),a=guarded(i),o=++We;return i.inhibitors.set(o,t),guarded(i)!==a&&r.guardUnload(!a),o}uninhibit(e){let t=hostOf(this);if(t.guardUnload===void 0)return;let n=stateOf(this),r=guarded(n);n.inhibitors.delete(e)&&guarded(n)!==r&&t.guardUnload(!r)}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$1(GtkApplication.prototype,Ve,[]),GtkApplication}function guarded(e){for(let t of e.inhibitors.values())if(t&Le.LOGOUT)return!0;return!1}function hasResource(e){try{return resources_get_info(e,0)[0]}catch{return!1}}function loadResources(e){let t=e.resource_base_path;if(t===null)return;let n=t.endsWith(`/`)?``:`/`;hostOf(e).iconTheme?.().add_resource_path(`${t}${n}icons/`);for(let e of[`gtk/menus.ui`,`gtk/help-overlay.ui`]){let r=`${t}${n}${e}`;if(hasResource(r))throw new UnsupportedGObjectError(`Gtk.Application resource ${e}`,`Gtk.Application: GTK loads ${r} at startup, and this port does not yet (ADR 0116 § 5).`)}}withGtkApplication(GioApplicationBase);function refuse$1(e,t=`is outside the file-chooser subset`){return new UnsupportedGObjectError(e,`${e} ${t} (ADR 0100).`)}__name(refuse$1,`refuse`);function refuseMembers(e,t,n){for(let r of n)Object.defineProperty(e,r,{value:()=>{throw refuse$1(`${t}.${r}()`)},writable:!0,configurable:!0,enumerable:!1})}function dialogFailedError(e){return new GLibError(P,P.FAILED,e)}var L=class AsyncResult{#e;#t;#n;constructor(e,t,n){this.#e=e,this.#t=t,this.#n=n}get_source_object(){return this.#e}static take(e,t,n){if(!(e instanceof AsyncResult)||e.#e!==t||e.#t!==n)throw TypeError(`${n}_finish: the result is not one of ${n}`);if(!e.#n.ok)throw e.#n.error;return e.#n.value}};function requireArgs(e,t,n){if(n<t)throw TypeError(`method ${e}: At least ${t} arguments required, but only ${n} passed`)}function isCancelled(e){let t=e;return typeof t?.is_cancelled==`function`&&t.is_cancelled()===!0}function cancelledError(){return new GLibError(F,F.CANCELLED,`Operation was cancelled`)}function runAsync(e,t,n,r,i,a){(isCancelled(n)?Promise.reject(cancelledError()):Promise.resolve().then(i)).then(e=>({ok:!0,value:e}),e=>({ok:!1,error:a(e)})).then(n=>{typeof r==`function`&&r(e,new L(e,t,n))})}const ioError=e=>asGLibError(e,F,F.FAILED),dialogError=e=>asGLibError(e,P,P.FAILED),Ke=/[*?[\]]/,qe=new WeakMap;function filterState(e){let t=typeof e==`object`&&e?qe.get(e):void 0;if(!t)throw refuse$1(`a ${typeof e} where a Gtk.FileFilter is expected`,`is not a Gtk.FileFilter`);return t}var R=class FileFilter{constructor(e={}){qe.set(this,{name:null,patterns:[],suffixes:[],mimeTypes:[],acceptAll:!1});for(let[t,n]of Object.entries(e))if(t===`name`)this.set_name(n);else throw refuse$1(`the Gtk.FileFilter '${t}' property`)}static new(){return new FileFilter}get name(){return filterState(this).name}set name(e){this.set_name(e)}get_name(){return this.name}set_name(e){filterState(this).name=e==null?null:String(e)}add_pattern(e){let t=filterState(this);if(e===`*`){t.acceptAll=!0;return}let n=e.startsWith(`*.`)?e.slice(2):null;if(n===null||n===``||Ke.test(n))throw refuse$1(`Gtk.FileFilter.add_pattern('${e}')`,`is a glob other than '*' or '*.ext'`);t.patterns.push(n)}add_suffix(e){if(typeof e!=`string`||e===``||Ke.test(e))throw refuse$1(`Gtk.FileFilter.add_suffix('${String(e)}')`,`is not a plain suffix`);filterState(this).suffixes.push(e)}add_mime_type(e){let t=filterState(this);if(e===`*/*`){t.acceptAll=!0;return}if(typeof e!=`string`||!/^[\w.+-]+\/(\*|[\w.+-]+)$/.test(e))throw refuse$1(`Gtk.FileFilter.add_mime_type('${String(e)}')`,`is not a MIME type`);t.mimeTypes.push(e)}};refuseMembers(R.prototype,`Gtk.FileFilter`,[`add_pixbuf_formats`,`get_attributes`,`to_gvariant`,`match`,`get_strictness`,`changed`]),registerBaseClass(R,`GtkFileFilter`,{});function fileFilterSpec(e){let{name:t,patterns:n,suffixes:r,mimeTypes:i,acceptAll:a}=filterState(e);return{name:t,patterns:[...n],suffixes:[...r],mimeTypes:[...i],acceptAll:a}}var GioListStore=class{#e=[];#t;constructor(e={}){let t=e.item_type??e.itemType;if(t!==R.$gtype)throw refuse$1(`Gio.ListStore of ${String(t?.name??t)}`,`holds no Gtk.FileFilter`);this.#t=t}get item_type(){return this.#t}get n_items(){return this.#e.length}append(e){filterState(e),this.#e.push(e)}get_n_items(){return this.#e.length}get_item(e){return this.#e[e]??null}get_item_type(){return this.#t}};refuseMembers(GioListStore.prototype,`Gio.ListStore`,[`insert`,`insert_sorted`,`remove`,`remove_all`,`splice`,`sort`,`find`,`find_with_equal_func`,`items_changed`]);const Je=Object.freeze({NONE:0,PRIVATE:1,REPLACE_DESTINATION:2}),Ye=new WeakMap;function streamState(e){let t=Ye.get(e);if(!t)throw refuse$1(`Gio.OutputStream`,`is only made by Gio.File.replace_async`);return t}function streamOp(e,t,n){return async()=>{let r=streamState(e);if(r.closed)throw new GLibError(F,F.CLOSED,`Stream is already closed`);if(r.pending)throw new GLibError(F,F.PENDING,`Stream has outstanding operation`);r.pending=!0;try{let e=await n(r.writer);return t&&(r.closed=!0),e}finally{r.pending=!1}}}var OutputStream=class{constructor(e){Ye.set(this,{writer:e,closed:!1,pending:!1})}write_bytes_async(e,t,n,r){if(requireArgs(`Gio.OutputStream.write_bytes_async`,4,arguments.length),!(e instanceof N))throw refuse$1(`write_bytes_async of a non-GLib.Bytes`,`is not a GLib.Bytes`);let i=N.view(e),a=streamOp(this,!1,async e=>(await e.write(i),i.length));runAsync(this,`write_bytes`,n,r,a,ioError)}write_bytes_finish(e){return L.take(e,this,`write_bytes`)}close_async(e,t,n){requireArgs(`Gio.OutputStream.close_async`,3,arguments.length);let r=streamOp(this,!0,async e=>(await e.close(),!0));runAsync(this,`close`,t,n,r,ioError)}close_finish(e){return L.take(e,this,`close`)}is_closed(){return streamState(this).closed}},FileOutputStream=class extends OutputStream{};refuseMembers(OutputStream.prototype,`Gio.OutputStream`,[`write`,`write_all`,`write_bytes`,`write_async`,`write_all_async`,`writev`,`splice`,`splice_async`,`flush`,`flush_async`,`close`,`printf`]),refuseMembers(FileOutputStream.prototype,`Gio.FileOutputStream`,[`seek`,`truncate`,`query_info`,`get_etag`]);const Xe=new WeakMap;function handleOf(e){let t=Xe.get(e);if(!t)throw refuse$1(`Gio.File`,`is only made by Gtk.FileDialog`);return t}function checkReplaceArgs(e,t,n,r){if(t!=null)throw refuse$1(`${e} with an etag`);if(n!==!1)throw refuse$1(`${e} with make_backup`);if(r!==Je.NONE)throw refuse$1(`${e} with flags ${String(r)}`)}var GioFile=class{constructor(e){Xe.set(this,e)}static new_for_path(){throw refuse$1(`Gio.File.new_for_path()`,`names a path, and a page or an Android app has none`)}static new_for_uri(){throw refuse$1(`Gio.File.new_for_uri()`,`names a URI the platform cannot open`)}static new_for_commandline_arg(){throw refuse$1(`Gio.File.new_for_commandline_arg()`)}get_basename(){return handleOf(this).basename}get_path(){return handleOf(this),null}get_uri(){let{uri:e}=handleOf(this);if(e===void 0)throw refuse$1(`Gio.File.get_uri()`,`has no URI to give on this platform`);return e}load_contents_async(e,t){requireArgs(`Gio.File.load_contents_async`,2,arguments.length);let n=handleOf(this);runAsync(this,`load_contents`,e,t,()=>n.read(),ioError)}load_contents_finish(e){return[!0,L.take(e,this,`load_contents`),null]}replace_contents_async(e,t,n,r,i,a){requireArgs(`Gio.File.replace_contents_async`,6,arguments.length),checkReplaceArgs(`Gio.File.replace_contents_async`,t,n,r);let o=e instanceof N?N.view(e):e;if(!(o instanceof Uint8Array))throw refuse$1(`replace_contents_async of a non-Uint8Array`);let s=o.slice(),c=handleOf(this),work=async()=>{let e=await c.openWriter();await e.write(s),await e.close()};runAsync(this,`replace_contents`,i,a,work,ioError)}replace_contents_finish(e){return L.take(e,this,`replace_contents`),[!0,null]}replace_async(e,t,n,r,i,a){requireArgs(`Gio.File.replace_async`,6,arguments.length),checkReplaceArgs(`Gio.File.replace_async`,e,t,n);let o=handleOf(this),work=async()=>new FileOutputStream(await o.openWriter());runAsync(this,`replace`,i,a,work,ioError)}replace_finish(e){return L.take(e,this,`replace`)}};refuseMembers(GioFile.prototype,`Gio.File`,`read.read_async.load_contents.load_bytes.load_bytes_async.replace.replace_contents.create.create_async.append_to.append_to_async.query_info.query_info_async.query_exists.query_file_type.delete.delete_async.trash.move.move_async.copy.copy_async.get_parent.get_child.resolve_relative_path.enumerate_children.enumerate_children_async.make_directory.monitor.monitor_file.monitor_directory.equal.hash.dup`.split(`.`));const Ze=new Set([`title`,`modal`,`filters`,`initial_name`,`default_filter`]),Qe=[`initial_folder`,`initial_file`,`accept_label`],snake=e=>e.replace(/-/g,`_`).replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`);var z=class FileDialog{#e=null;#t=!0;#n=null;#r=null;#i=null;constructor(e={}){for(let[t,n]of Object.entries(e)){let e=snake(t);if(!Ze.has(e))throw refuse$1(`the Gtk.FileDialog '${e}' property`);this[e]=n}}static new(){return new FileDialog}get title(){return this.#e}set title(e){this.#e=e==null?null:String(e)}get_title(){return this.#e}set_title(e){this.title=e}get modal(){return this.#t}set modal(e){if(e!==!0)throw refuse$1(`Gtk.FileDialog modal: false`,`cannot open non-modally on this platform`);this.#t=!0}get_modal(){return this.#t}set_modal(e){this.modal=e}get filters(){return this.#n}set filters(e){if(e!==null&&!(e instanceof GioListStore))throw refuse$1(`Gtk.FileDialog filters of another type`);this.#n=e}get_filters(){return this.#n}set_filters(e){this.filters=e}get initial_name(){return this.#r}set initial_name(e){this.#r=e==null?null:String(e)}get initialName(){return this.initial_name}set initialName(e){this.initial_name=e}get_initial_name(){return this.#r}set_initial_name(e){this.initial_name=e}get default_filter(){return this.#i}set default_filter(e){e!==null&&filterState(e),this.#i=e}get defaultFilter(){return this.default_filter}set defaultFilter(e){this.default_filter=e}get_default_filter(){return this.#i}set_default_filter(e){this.default_filter=e}open(e,t,n){requireArgs(`Gtk.FileDialog.open`,3,arguments.length),this.#a(`open`,e,t,n)}open_finish(e){return L.take(e,this,`open`)}save(e,t,n){requireArgs(`Gtk.FileDialog.save`,3,arguments.length),this.#a(`save`,e,t,n)}save_finish(e){return L.take(e,this,`save`)}#a(e,t,n,r){this.#o(t);let work=async()=>{throw dialogFailedError(`No file chooser driver is registered on this platform`)};runAsync(this,e,n,r,work,dialogError)}#o(e){let t=[],n=this.#n;for(let e=0;n&&e<n.get_n_items();e++)t.push(fileFilterSpec(n.get_item(e)));return{title:this.#e,filters:t,defaultFilter:this.#i?fileFilterSpec(this.#i):null,initialName:this.#r,parent:e}}};refuseMembers(z.prototype,`Gtk.FileDialog`,[`open_multiple`,`open_multiple_finish`,`open_multiple_text_files`,`open_multiple_text_files_finish`,`open_text_file`,`open_text_file_finish`,`save_text_file`,`save_text_file_finish`,`select_folder`,`select_folder_finish`,`select_multiple_folders`,`select_multiple_folders_finish`,`set_initial_folder`,`get_initial_folder`,`set_initial_file`,`get_initial_file`,`set_accept_label`,`get_accept_label`]);for(let e of Qe)Object.defineProperty(z.prototype,e,{get(){throw refuse$1(`the Gtk.FileDialog '${e}' property`,`names a folder or label the platform does not take`)},set(){throw refuse$1(`the Gtk.FileDialog '${e}' property`,`names a folder or label the platform does not take`)},configurable:!0,enumerable:!1});registerBaseClass(z,`GtkFileDialog`,{});var ContentFormats=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}to_string(){return[...this.#e.map(e=>e.name),...this.#t].join(` `)}contain_gtype(e){return this.#e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,5rl,e,ha,1wh,f2,15t,3t7,4,6ju,f62t,6o,1e6n,1eke,1,1eke,1`.split(`.`);var RangeTable=class{#e;#t=null;#n=null;constructor(e){this.#e=e}#r(){let e=this.#e.join(``).split(`,`),t=e.length/2;this.#t=new Uint32Array(t),this.#n=new Uint32Array(t);let n=0;for(let r=0;r<t;r++){let t=n+parseInt(e[2*r],36),i=t+parseInt(e[2*r+1],36);this.#t[r]=t,this.#n[r]=i,n=i+1}}has(e){this.#t===null&&this.#r();let t=this.#t,n=this.#n,r=0,i=t.length-1;for(;r<=i;){let a=r+i>>1;if(e<t[a])i=a-1;else if(e>n[a])r=a+1;else return!0}return!1}};new RangeTable($e);const tt=new RangeTable(et);function unicharIsprint(e){let t=e.codePointAt(0);return t!==void 0&&!tt.has(t)}const nt=new Set([`b`,`i`,`u`,`d`,`s`]),rt=new Set([`b`,`y`,`n`,`q`,`i`,`u`,`x`,`t`,`h`,`d`,`s`,`o`,`g`]),it=4294967295;function refuse(e){return new UnsupportedGObjectError(e,`${e} is outside the GLib.Variant subset (ADR 0118 § 2).`)}function invalid(e){return TypeError(`Invalid GVariant signature ${e}`)}function readType(e,t,n,r=!1){let i=e[t],a=i!==void 0&&rt.has(i);if(!n&&r&&!a)throw invalid(`(a simple type was expected)`);if(a||i===`v`)return t+1;if(i===`a`)return readType(e,t+1,!1);if(i===`m`)return readType(e,t+1,n);if(i===`{`){let r=readType(e,readType(e,t+1,n,!0),n);if(e[r]!==`}`)throw invalid(n?`for type DICT_ENTRY (expected "}")`:`for type DICT_ENTRY (expected "}"`);return r+1}if(i===`(`){let r=t+1;for(;;){if(r>=e.length)throw invalid(`for type TUPLE (expected ")")`);if(e[r]===`)`)return r+1;r=readType(e,r,n)}}throw invalid(n?`(unexpected character ${i})`:`(${i} is not a valid type)`)}function typeOf(e){let t=typeof e==`string`?e:``;if(t===``)throw TypeError(`GVariant signature cannot be empty`);if(readType(t,0,!0)!==t.length)throw invalid(`(more than one single complete type)`);if(nt.has(t)||t.length===2&&t[0]===`a`&&nt.has(t[1]))return t;throw refuse(`new GLib.Variant('${t}')`)}function typeName(e){return e===null?`null`:typeof e==`object`?e.constructor?.name||`Object`:typeof e}function cutAtNul(e){let t=e.indexOf(`\0`);return t===-1?e:e.slice(0,t)}function toUint32(e){if(e==null||typeof e==`number`&&!Number.isFinite(e))return 0;let t=Number(e);if(Number.isNaN(t)||t<0||t>it)throw Error(`Argument value: value is out of range for uint32`);return Math.trunc(t)||0}function toBasic(e,t){switch(e){case`b`:return!!t;case`i`:return Number(t)|0;case`u`:return toUint32(t);case`d`:return Number(t);case`s`:if(typeof t==`string`)return cutAtNul(t);throw Error(t===null?`Argument string may not be null`:`Expected type string for argument 'string' but got type ${typeName(t)}`)}}function toArray(e,t){if(e===`s`){if(typeof t==`string`)throw Error(`Cannot convert string to array of 'utf8'`);if(typeof t!=`object`||!t||!(`length`in t))throw Error(`Expected type utf8 for Argument 'strv' but got type '${typeName(t)}'`)}else if(t==null)throw TypeError(`can't access property "length", value is ${t}`);let n=t,r=Number(n.length),i=[];for(let t=0;t<r;t++){let r=n[t];if(e===`s`&&typeof r!=`string`)throw Error(`Invalid element in string array`);i.push(toBasic(e,r))}return i}const B={"\x07":`\\a`,"\b":`\\b`," ":`\\t`,"\n":`\\n`,"\v":`\\v`,"\f":`\\f`,"\r":`\\r`};function hex(e,t){return e.toString(16).padStart(t,`0`)}function printString(e){let t=e.includes(`'`)?`"`:`'`,n=t;for(let r of e)if(r===t||r===`\\`)n+=`\\${r}`;else if(r in B)n+=B[r];else if(unicharIsprint(r))n+=r;else{let e=r.codePointAt(0);n+=e<65536?`\\u${hex(e,4)}`:`\\U${hex(e,8)}`}return n+t}function stripZeros(e){return e.includes(`.`)?e.replace(/\.?0+$/,``):e}function printDouble(e){if(Number.isNaN(e))return`nan`;if(!Number.isFinite(e))return e>0?`inf`:`-inf`;let t=e<0||Object.is(e,-0)?`-`:``,n=Math.abs(e),[r,i]=n.toExponential(16).split(`e`),a=Number(i),o=t+(a<-4||a>=17?`${stripZeros(r)}e${a<0?`-`:`+`}${String(Math.abs(a)).padStart(2,`0`)}`:stripZeros(n.toFixed(16-a)));return/^-?\d+$/.test(o)?`${o}.0`:o}function printBasic(e,t,n){switch(e){case`b`:return t?`true`:`false`;case`i`:return String(t);case`u`:return n?`uint32 ${t}`:String(t);case`d`:return printDouble(t);case`s`:return printString(t)}}var V=class Variant{#e;#t;constructor(e,t){let n=typeOf(e);this.#e=n,this.#t=n.length===1?toBasic(n,t):toArray(n[1],t)}static new(e,t){return new Variant(e,t)}static parseText(e,t){return parseVariant(e,t)}get_type_string(){return this.#e}unpack(){let e=this.#t;if(!Array.isArray(e))return e;let t=this.#e[1];return e.map(e=>new Variant(t,e))}deepUnpack(){let e=this.#t;return Array.isArray(e)?e.slice():e}recursiveUnpack(){return this.deepUnpack()}equal(e){if(!(e instanceof Variant))throw Error(`Expected an object of type GVariant for argument 'two' but got type ${typeName(e)}`);if(e.#e!==this.#e)return!1;let t=this.#t,n=e.#t;return!Array.isArray(t)||!Array.isArray(n)?Object.is(t,n):t.length===n.length&&t.every((e,t)=>Object.is(e,n[t]))}print(e){let t=!!e,n=this.#t;if(!Array.isArray(n))return printBasic(this.#e,n,t);if(n.length===0)return t?`@${this.#e} []`:`[]`;let r=this.#e[1];return`[${n.map((e,n)=>printBasic(r,e,t&&n===0)).join(`, `)}]`}toString(){return`[object variant of type "${this.#e}"]`}};Object.defineProperty(V.prototype,"deep_unpack",{value:V.prototype.deepUnpack,writable:!0,configurable:!0,enumerable:!1});const at=`get_boolean.get_byte.get_int16.get_uint16.get_int32.get_uint32.get_int64.get_uint64.get_handle.get_double.get_string.dup_string.get_strv.dup_strv.get_objv.get_bytestring.get_variant.get_maybe.get_type.is_of_type.is_container.classify.n_children.get_child_value.lookup_value.get_size.get_data.get_data_as_bytes.store.get_normal_form.is_normal_form.byteswap.hash.compare.check_format_string.is_floating.ref.ref_sink.take_ref.unref`.split(`.`),ot=`parse.new_boolean.new_byte.new_int16.new_uint16.new_int32.new_uint32.new_int64.new_uint64.new_handle.new_double.new_string.new_take_string.new_object_path.new_signature.new_variant.new_strv.new_objv.new_bytestring.new_bytestring_array.new_maybe.new_array.new_tuple.new_dict_entry.new_fixed_array.new_from_bytes.new_from_data.is_object_path.is_signature.parse_error_quark.parse_error_print_context`.split(`.`);for(let e of at)Object.defineProperty(V.prototype,e,{value:()=>{throw refuse(`GLib.Variant.prototype.${e}()`)},writable:!0,configurable:!0,enumerable:!1});for(let e of ot)Object.defineProperty(V,e,{value:()=>{throw refuse(`GLib.Variant.${e}()`)},writable:!0,configurable:!0,enumerable:!1});const st={boolean:`b`,int32:`i`,uint32:`u`,double:`d`,string:`s`},ct=/^([+-]?)(?:0[xX]([0-9a-fA-F]+)|(0[0-7]*)|([1-9][0-9]*))$/,lt=/^[+-]?(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,ut=/^([+-]?)(inf|nan)$/,dt=/[A-Za-z_][A-Za-z0-9_]*/y,ft=/[0-9A-Za-z_.+-]+/y;var TextReader=class{constructor(e,t){this.text=e,this.type=t,this.at=0}fail(e){return Error(`GLib.Variant: '${this.text}' is not a valid '${this.type}' value: ${e}`)}skipSpace(){for(;/\s/.test(this.text[this.at]??``);)this.at++}peek(){return this.skipSpace(),this.text[this.at]}match(e){e.lastIndex=this.at;let t=e.exec(this.text);return t?(this.at+=t[0].length,t[0]):null}};function readInteger(e,t,n){let r=ct.exec(t);if(!r)throw e.fail(`'${t}' is not an integer`);let[,i,a,o,s]=r,c=a===void 0?o===void 0?Number(s):parseInt(o,8):parseInt(a,16),l=i===`-`?-c:c,[u,d]=n===`i`?[-2147483648,2147483647]:[0,it];if(l<u||l>d)throw e.fail(`${t} is out of range for '${n}'`);return l||0}function readNumber(e,t){let n=e.match(ft);if(n===null)throw e.fail(`expected a number at ${e.at}`);if(t!==`d`)return readInteger(e,n,t);let r=/^([+-]?)0[xX]([0-9a-fA-F]+)$/.exec(n);if(r)return(r[1]===`-`?-1:1)*parseInt(r[2],16);let i=ut.exec(n);if(i)return i[2]===`nan`?NaN:i[1]===`-`?-1/0:1/0;if(!lt.test(n))throw e.fail(`'${n}' is not a number`);return Number(n)}function readString(e){let{text:t}=e,n=t[e.at];if(n!==`'`&&n!==`"`)throw e.fail(`expected a string at ${e.at}`);e.at++;let r=``;for(;;){let i=t[e.at];if(i===void 0)throw e.fail(`unterminated string`);if(e.at++,i===n)return r;if(i!==`\\`){r+=i;continue}let a=t[e.at++];if(a===void 0)throw e.fail(`unterminated string`);if(a===`u`||a===`U`){let n=a===`u`?4:8,i=t.slice(e.at,e.at+n),o=parseInt(i,16);if(!/^[0-9a-fA-F]+$/.test(i)||i.length!==n||o>1114111)throw e.fail(`invalid \\${a} escape`);e.at+=n,r+=String.fromCodePoint(o)}else{let e=Object.keys(B).find(e=>B[e]===`\\${a}`);r+=e??a}}}function readBasic(e,t){e.skipSpace();let n=e.at,r=e.match(dt);if(r!==null&&r in st){if(st[r]!==t)throw e.fail(`'${r}' is not a '${t}'`);e.skipSpace()}else e.at=n;if(t===`s`)return readString(e);if(t===`b`){let t=e.match(dt);if(t===`true`||t===`false`)return t===`true`;throw e.fail(`expected true or false at ${n}`)}return readNumber(e,t)}function parseVariant(e,t){let n=typeOf(e),r=new TextReader(t,n),i;if(n.length===1)i=readBasic(r,n);else{if(r.peek()===`@`){r.at++;let e=r.match(/[^\s[]+/y);if(e!==n)throw r.fail(`the annotation '@${e}' is not '@${n}'`)}if(r.peek()!==`[`)throw r.fail(`expected '[' at ${r.at}`);r.at++;let e=[];if(r.peek()===`]`)r.at++;else for(;;){e.push(readBasic(r,n[1]));let t=r.peek();if(r.at++,t===`]`)break;if(t!==`,`)throw r.fail(`expected ',' or ']' at ${r.at-1}`)}i=e}if(r.peek()!==void 0)throw r.fail(`unexpected '${r.text.slice(r.at)}'`);return new V(n,i)}const H={NONE:0,XPM:1,SVG:2,PNG:4,SYMBOLIC_PNG:16};H.XPM,H.SVG,H.PNG,H.SYMBOLIC_PNG;const U={NORMAL:0,HIGH:1},pt=new WeakMap;var Toast=class extends GObjectObject{static{this[he]=`Adw.Toast`}get_title(){return this.title}set_title(e){this.title=e}get_timeout(){return this.timeout}set_timeout(e){this.timeout=e}get_priority(){return this.priority}set_priority(e){this.priority=e}get_button_label(){return this.button_label}set_button_label(e){this.button_label=e}get_action_name(){return this.action_name}set_action_name(e){this.action_name=e}get_use_markup(){return this.use_markup}set_use_markup(e){this.use_markup=e}dismiss(){pt.has(this)&&this.emit(`dismissed`)}};registerBaseClass(Toast,`AdwToast`,{"button-clicked":[],dismissed:[]},[k.string(`title`,``,``,O.READWRITE,``),k.uint(`timeout`,``,``,O.READWRITE,0,4294967295,5),k.int(`priority`,``,``,O.READWRITE,U.NORMAL,U.HIGH,U.NORMAL),k.string(`button-label`,``,``,O.READWRITE,null),k.string(`action-name`,``,``,O.READWRITE,null),k.boolean(`use-markup`,``,``,O.READWRITE,!0)]),Math.PI*.35,Math.PI*.015,Math.PI*.9;const mt=Math.PI*.9,ht=Math.PI*.7,gt=Math.PI*1.1,_t=Math.PI*1.35,vt=mt+gt+_t-ht;53*Math.PI*2/vt,gt-ht/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 W={DEFAULT:0,FORCE_LIGHT:1,PREFER_LIGHT:2,PREFER_DARK:3,FORCE_DARK:4},G=new WeakMap,yt=new WeakMap,bt=new WeakMap;function refresh(e){if(!G.has(e))return;let t=sourceOf(e).dark();G.get(e)!==t&&(G.set(e,t),e.notify(`dark`))}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[he]=`Adw.StyleManager`}static get_default(){let e=yt.get(this);if(e===void 0){e=new this,yt.set(this,e);let t=sourceOf(e);G.set(e,t.dark()),t.subscribe(()=>refresh(e))}return e}get dark(){return sourceOf(this).dark()}get_dark(){return this.dark}get system_supports_color_schemes(){return sourceOf(this).supportsColorSchemes?.()??!1}get_system_supports_color_schemes(){return this.system_supports_color_schemes}get color_scheme(){return bt.get(this)??W.DEFAULT}set color_scheme(e){if(!Object.values(W).includes(e))throw Error(`Adw.StyleManager: ${e} is not an Adw.ColorScheme`);if(e===this.color_scheme)return;bt.set(this,e);let t=e===W.FORCE_DARK?!0:e===W.FORCE_LIGHT?!1:null;sourceOf(this).force?.(t),this.notify(`color-scheme`),refresh(this)}get_color_scheme(){return this.color_scheme}set_color_scheme(e){this.color_scheme=e}};registerBaseClass(StyleManagerBase,`AdwStyleManager`,{},[k.boolean(`dark`,``,``,O.READABLE,!1),k.boolean(`system-supports-color-schemes`,``,``,O.READABLE,!1),k.int(`color-scheme`,``,``,O.READWRITE,0,4,0)]);const xt={system:`Follow system`,light:`Light`,dark:`Dark`},St={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=D.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`?D.ColorScheme.FORCE_LIGHT:e.colorScheme===`dark`?D.ColorScheme.FORCE_DARK:D.ColorScheme.DEFAULT),this._applyAccent(this.settings.resolvedAccent)}finally{this._applying=!1}}}_applyAccent(e){let t=f.Display.get_default();if(!t)return;if(!this._provider){if(!e)return;this._provider=new h.CssProvider,h.StyleContext.add_provider_for_display(t,this._provider,h.STYLE_PROVIDER_PRIORITY_APPLICATION)}if(!e){this._provider.load_from_string(``);return}let n=adwaitaAccentBgColor(e),r=adwaitaAccentColor(e,this.settings.resolvedDark);this._provider.load_from_string(`:root { --accent-bg-color: ${n}; --accent-color: ${r}; }`)}};function buildSwatch(e,t,n){let r=new h.CheckButton({tooltip_text:t,halign:h.Align.CENTER,valign:h.Align.CENTER,focus_on_click:!1});for(let t of e)r.add_css_class(t);return r.update_property([h.AccessibleProperty.LABEL],[t]),n&&r.set_group(n),r}function buildSwatchCard(e=!1){let t=new D.WrapBox({align:.5,child_spacing:8,line_spacing:8,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12}),n=new D.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,n=new D.PreferencesPage,r=new D.PreferencesGroup({title:`Style`}),{card:i,row:o}=buildSwatchCard(),s=null,c=new Map;for(let e of a){let n=buildSwatch([`storybook-swatch`,`storybook-scheme-swatch`,`storybook-scheme-${e}`],xt[e],s);s??=n,n.set_active(t.colorScheme===e),n.connect(`toggled`,()=>{n.get_active()&&(t.colorScheme=e)}),c.set(e,n),o.append(n)}r.add(i),n.add(r);let l=new D.PreferencesGroup({title:`Accent colour`});l.add_css_class(`storybook-attached-group`);let u=new D.SwitchRow({title:`Use a custom accent colour`,subtitle:`Off follows the desktop, which owns the accent`,active:t.accentMode===`custom`});l.add(u);let{card:d,row:f}=buildSwatchCard(!0),p=null,m=new Map;for(let e of Se){let n=buildSwatch([`storybook-swatch`],St[e],p);p??=n,n.set_active(t.accent===e);let r=new h.CssProvider;r.load_from_string(`checkbutton { background-color: ${adwaitaAccentBgColor(e)}; }`),n.get_style_context().add_provider(r,h.STYLE_PROVIDER_PRIORITY_APPLICATION),n.connect(`toggled`,()=>{n.get_active()&&(t.accent=e)}),m.set(e,n),f.append(n)}f.set_sensitive(t.accentMode===`custom`),u.connect(`notify::active`,()=>{t.accentMode=u.get_active()?`custom`:`system`}),l.add(d),n.add(l),t.subscribe(e=>{let t=c.get(e.colorScheme);t&&!t.get_active()&&t.set_active(!0);let n=m.get(e.accent);n&&!n.get_active()&&n.set_active(!0);let r=e.accentMode===`custom`;u.get_active()!==r&&u.set_active(r),f.set_sensitive(r)});let g=new D.PreferencesDialog({title:`Appearance`});return g.add(n),g}function adwControlWidgetFactory(){return{text(e,t){let n=new D.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 D.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=D.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,n=e.max??100,r=e.step??1,i=typeof e.min==`number`?e.min:0,a=Number.isInteger(r)&&Number.isInteger(i),o=new h.Adjustment({lower:t,upper:n,step_increment:r,value:i});o.step_increment=r;let s=new h.ListBoxRow({selectable:!1,activatable:!1});s.add_css_class(`story-range-row`);let c=new h.Box({orientation:h.Orientation.VERTICAL,spacing:6,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12}),l=new h.Box({orientation:h.Orientation.HORIZONTAL,spacing:12}),u=new h.Label({label:e.label||e.name,halign:h.Align.START,hexpand:!0,ellipsize:3});u.add_css_class(`heading`);let formatValue=e=>a?String(Math.round(e)):e.toFixed(2),d=new h.Label({label:formatValue(i),halign:h.Align.END});if(d.add_css_class(`numeric`),d.add_css_class(`dim-label`),l.append(u),l.append(d),c.append(l),e.description){let t=new h.Label({label:e.description,halign:h.Align.START,xalign:0,wrap:!0,max_width_chars:32});t.add_css_class(`caption`),t.add_css_class(`dim-label`),c.append(t)}let f=new h.Scale({orientation:h.Orientation.HORIZONTAL,adjustment:o,draw_value:!1,hexpand:!0}),p=null,m=!1;return f.connect(`value-changed`,()=>{if(m)return;let e=f.get_value();if(a){let t=Math.round(e);if(t!==e){f.set_value(t);return}e=t}d.set_label(formatValue(e)),p?.(e)}),c.append(f),s.set_child(c),{node:s,get:()=>f.get_value(),set:e=>{m=!0,f.set_value(e),m=!1,d.set_label(formatValue(e))},onChange:e=>{p=e}}}function buildSelectWidget(e){let t=e.options??[],n=h.StringList.new(t.map(e=>e.label)),r=new D.ComboRow({title:e.label||e.name,subtitle:e.description??``,model:n}),i=null;return r.connect(`notify::selected`,()=>i?.(r.get_selected())),{node:r,get:()=>r.get_selected(),set:e=>r.set_selected(e),onChange:e=>{i=e}}}function buildColorWidget(e,t){let n=new D.ActionRow({title:e,subtitle:t??``}),r=new h.ColorDialogButton({dialog:new h.ColorDialog({title:e}),valign:h.Align.CENTER});n.add_suffix(r),n.set_activatable_widget(r);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)}`,i=null,a=!1;return r.connect(`notify::rgba`,()=>{a||i?.(rgbaToHex(r.get_rgba()))}),{node:n,get:()=>rgbaToHex(r.get_rgba()),set:e=>{let t=new f.RGBA;t.parse(e)&&(a=!0,r.set_rgba(t),a=!1)},onChange:e=>{i=e}}}var Ct=class StorybookWindow extends D.ApplicationWindow{static{w.registerClass({GTypeName:`StorybookWindow`,Template:`<?xml version="1.0" encoding="UTF-8"?>
78
+ </node>`}const te=e(import.meta.url);let y;function load$4(){return y===void 0&&(y=te(`@gjsify/node-gi/gi`).requireGi(`Gio`,`2.0`)),y}__name(load$4,`load`);var b=new Proxy(Object.create(null),{get(e,t){return load$4()[t]},has(e,t){return t in load$4()}});function isWin32(){return l.DIR_SEPARATOR===92}function defaultListenAddress(){return isWin32()?`nonce-tcp:host=127.0.0.1`:`unix:tmpdir=${l.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(e){return e instanceof l.Error&&e.matches(b.io_error_quark(),b.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((b.File.new_for_path(e).query_info(`unix::mode`,b.FileQueryInfoFlags.NONE,null).get_attribute_uint32(`unix::mode`)&61440)!=49152)return`not-a-socket`}catch{return`not-a-socket`}let t=new b.SocketClient;t.set_timeout(2);let n;try{n=t.connect(b.UnixSocketAddress.new(e),null)}catch{return`dead`}return n.close(null),`live`}function clearReclaimableSocket(e){let t=unixSocketPath(e);if(!t||!l.file_test(t,l.FileTest.EXISTS))return;let n=inspectExistingSocket(t);if(n===`live`)throw new DevtoolsPeerServerError(`cannot listen on ${e}: another process is already listening there. Stop it, or point ${v} (or options.address) at a different socket — GJSIFY_DEVTOOLS_INSTANCE=<label> lets two devtools-enabled apps run side by side.`,e,`address-in-use`);if(n===`not-a-socket`)throw new DevtoolsPeerServerError(`cannot listen on ${e}: ${t} already exists and is not a socket, so it will NOT be removed. Point ${v} (or options.address) at a free path.`,e,`occupied-by-other-file`);try{b.File.new_for_path(t).delete(null)}catch(n){throw new DevtoolsPeerServerError(`cannot listen on ${e}: ${t} is a socket nothing listens on, but removing it failed (${n}). Delete it by hand, or point ${v} at a free path.`,e,`address-in-use`,n)}console.log(`[gjsify-devtools] reclaimed the stale socket ${t}: 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:`)?b.DBusServerFlags.NONE:b.DBusServerFlags.AUTHENTICATION_REQUIRE_SAME_USER}function startDevtoolsPeerServer(e,t,n){let r=n&&n!==``?n:defaultListenAddress();clearReclaimableSocket(r);let i;try{i=b.DBusServer.new_sync(r,flagsForAddress(r),b.dbus_generate_guid(),null,null)}catch(e){let t=isAddressInUse(e);throw new DevtoolsPeerServerError(t?`cannot listen on ${r}: the address is already in use (${e}). Stop whatever holds it, or point ${v} (or options.address) at a different address.`:`cannot listen on ${r}: ${e}. Check the address form — \`unix:path=/tmp/app.sock\`, \`unix:tmpdir=/tmp\` or \`nonce-tcp:host=127.0.0.1\`.`,r,t?`address-in-use`:`listen-failed`,e)}let a=new Set;i.connect(`new-connection`,(n,r)=>(a.add(r),r.connect(`closed`,()=>{e.unexport(r),a.delete(r)}),e.export(r,t),!0)),i.start();let o=!1;return{address:i.get_client_address(),objectPath:t,get connectionCount(){return a.size},stop(){if(!o){o=!0,i.stop();for(let t of a)e.unexport(t),!t.is_closed()&&t.close(null,(e,t)=>{try{e.close_finish(t)}catch{}});a.clear()}}}}function writeDevtoolsAddressFile(e,t){try{if(l.mkdir_with_parents(l.path_get_dirname(e),448),!l.file_set_contents(e,`${t}\n`))return null}catch(t){return console.error(`[gjsify-devtools] could not publish the peer address to ${e}: ${t}`),null}try{b.File.new_for_path(e).set_attribute_uint32(`unix::mode`,384,b.FileQueryInfoFlags.NONE,null)}catch(t){console.error(`[gjsify-devtools] could not restrict ${e} to the current user: ${t}`)}return e}function removeDevtoolsAddressFile(e){try{b.File.new_for_path(e).delete(null)}catch{}}const ne=e(import.meta.url);let re;function load$3(){return re===void 0&&(re=ne(`@gjsify/node-gi/gi`).requireGi(`Graphene`,`1.0`)),re}__name(load$3,`load`);var ie=new Proxy(Object.create(null),{get(e,t){return load$3()[t]},has(e,t){return t in load$3()}});function defaultCaptureScale(e){let t=e.get_scale_factor?.();return typeof t==`number`&&t>0?t:1}function captureWidget(e,t={}){let n=e.get_native()?.get_renderer();if(!n)return{png:null,blocker:`no-renderer`};let r=e.get_width(),i=e.get_height();if(r<=0||i<=0)return{png:null,blocker:`zero-size`};let a=t.scale&&t.scale>0?t.scale:defaultCaptureScale(e),o=h.WidgetPaintable.new(e),s=h.Snapshot.new();a!==1&&s.scale(a,a),o.snapshot(s,r,i);let c=s.to_node();if(!c)return{png:null,blocker:`empty-snapshot`};let l=new ie.Rect;l.init(0,0,r*a,i*a);let u=n.render_texture(c,l).save_to_png_bytes().get_data();return u?{png:new Uint8Array(u)}:{png:null,blocker:`empty-png`}}function captureWidgetPng(e,t={}){return captureWidget(e,t).png}function dumpGSettings(e){let t=b.SettingsSchemaSource.get_default()?.lookup(e,!0);if(!t)throw Error(formatDbusErrorMessage(`not-found`,`GSettings schema '${e}' is not installed`));let n=new b.Settings({settings_schema:t}),r={};for(let e of t.list_keys())r[e]=n.get_value(e).recursiveUnpack();return r}const ae=e(import.meta.url);let x;function load$2(){return x===void 0&&(x=ae(`@gjsify/node-gi/gi`).requireGi(`GObject`,`2.0`)),x}__name(load$2,`load`);var S=new Proxy(Object.create(null),{get(e,t){return load$2()[t]},has(e,t){return t in load$2()}});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=S.type_from_name(n),i=S.type_from_name(t);return!r||!i?!1:S.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 a=r.get_item(e);widgetIsA(a,`GtkEventControllerKey`)&&(a.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=h.Window.get_toplevels(),t=e.get_n_items(),n=[];for(let r=0;r<t;r++){let t=e.get_item(r);t&&n.push({path:`toplevel:${r}`,type:widgetType(t),title:t.get_title?.()??null,mapped:t.get_mapped(),focused:t.is_active??!1})}return n}function resolveWidgetPath(e){let t=parseWidgetPath(e);if(!t)return null;let n=h.Window.get_toplevels().get_item(t.toplevel);if(!n)return null;for(let e of t.children)if(n=nthChild(n,e),!n)return null;return n}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(),a=0;for(;i;){let e=walkForSelector(i,t,`${n}/child:${a}`,r);if(e)return e;i=i.get_next_sibling(),a++}return null}function geometryOf(e){if(!e.get_mapped())return;let t=e.get_allocation(),n=t.width+e.get_margin_start()+e.get_margin_end(),r=t.height+e.get_margin_top()+e.get_margin_bottom(),[i,a]=e.measure(h.Orientation.HORIZONTAL,-1),o=n>0?Math.max(n,i):-1,[s,c]=e.measure(h.Orientation.VERTICAL,o),l={width:n,height:r,widthRequest:[i,a],heightRequest:[s,c]};return(n<i||r<s)&&(l.short=!0),l}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 a=e.get_first_child(),o=0;for(;a;)r.children.push(dumpTree(a,t-1,`${n}/child:${o}`)),a=a.get_next_sibling(),o++;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=[],n=e,r=n.get_parent();for(;r;){let e=childIndex(r,n);if(e<0)return null;t.unshift(e),n=r,r=n.get_parent()}let i=h.Window.get_toplevels(),a=i.get_n_items();for(let e=0;e<a;e++)if(i.get_item(e)===n)return buildWidgetPath(e,t);return null}function isActiveWindowScope(e){return!e||e===`window`||e===`active`}function frameDelay(e){return new Promise(t=>{l.timeout_add(l.PRIORITY_DEFAULT,e,()=>(t(),l.SOURCE_REMOVE))})}async function captureWidgetWhenRenderable(e,t={},n=12,r=50){let i=null;for(let a=0;a<n;a++){let n=captureWidget(e,t);if(n.png)return{png:n.png,blocker:null};i=n.blocker,await frameDelay(r)}let a=captureWidget(e,t);return{png:a.png,blocker:a.png?null:a.blocker??i}}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(ee))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??[])),r=b.DBusExportedObject.wrapJSObject(n,this);r.export(e,t),this._exported.set(e,r)}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:h.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(e,t){try{let n=typeof e?.[0]==`string`?e[0]:``,r=await this._captureScopePng(n);t.return_value(new l.Variant(`(ay)`,[r]))}catch(e){t.return_dbus_error(`org.gjsify.Devtools.Error.Screenshot`,e instanceof Error?e.message:String(e))}}async ScreenshotScaledAsync(e,t){try{let n=typeof e?.[0]==`string`?e[0]:``,r=typeof e?.[1]==`number`?e[1]:0,i=await this._captureScopePng(n,r>0?{scale:r}:{});t.return_value(new l.Variant(`(ay)`,[i]))}catch(e){t.return_dbus_error(`org.gjsify.Devtools.Error.Screenshot`,e instanceof Error?e.message:String(e))}}async _captureScopePng(e,t={}){let n=this._resolveRootWidget(e);if(!n){if(isActiveWindowScope(e))return new Uint8Array;throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${e}'`))}let r=captureWidget(n.widget,t);if(r.png)return r.png;let i=n.widget.get_root();i instanceof h.Window&&i.present();let a=await captureWidgetWhenRenderable(n.widget,t);return a.png?a.png:(console.warn(`[devtools] Screenshot('${e}') has no image: ${a.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[n,r,i]=h.accelerator_parse(e);if(!n)throw Error(formatDbusErrorMessage(`invalid-params`,`cannot parse accelerator '${e}'`));let a;if(a=t?this._resolveRootWidget(t)?.widget??null:this._app.get_active_window()?.get_focus()??null,!a)throw Error(formatDbusErrorMessage(`not-found`,`no widget at '${t||`focus`}'`));return sendKeyToWidget(a,r,i??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 h.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 C=`DBUS_SESSION_BUS_ADDRESS`,oe=new Set;function envEnabled(){return isDevtoolsEnabledValue(l.getenv(`GJSIFY_DEVTOOLS`))}function envValue(e){let t=l.getenv(e);return t&&t!==``?t:null}function sessionBusUsable(){if(!envValue(C))return!1;try{return b.bus_get_sync(b.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] ${C} 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 (${C} is unset) — using the bus-less peer transport instead. Point the bridge at the address below, or set ${v} 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(),console.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(e,t,n,r){let i=e.get_is_registered(),a=i?e.get_dbus_connection():null,o=i?e.get_dbus_object_path():null,s=envValue(C),c=!!(a&&o),u=c||sessionBusUsable(),d=chooseDevtoolsTransport({requestedAddress:n.address??envValue(v),hasAppConnection:c,sessionBusUsable:u}),f=e.get_application_id()??`unknown`,p=`${o??appIdToObjectPath(f)}/devtools`;if((d.kind===`unregistered`||d.kind===`peer`&&d.reason===`no-session-bus`)&&console.error(describeMissingConnection(s,u)),d.kind===`session-bus`&&a)t.export(a,p),console.log(`[gjsify-devtools] exported ${_} at ${p} (dest ${f})`);else if(d.kind===`peer`){let n=startDevtoolsPeerServer(t,p,d.address??void 0),i=writeDevtoolsAddressFile(devtoolsAddressFilePath(l.get_user_runtime_dir(),f,r),n.address);t.attachPeerServer(n,i),console.log(`[gjsify-devtools] exported ${_} at ${p} (peer address ${n.address}${i?`, published to ${i}`:``})`),i&&e.connect(`shutdown`,()=>removeDevtoolsAddressFile(i))}return oe.add(t),t}const se=`&(?![a-zA-Z][a-zA-Z0-9]*;|#\\d+;|#x[0-9a-fA-F]+;)|<(?![a-zA-Z/!?])`;RegExp(se),RegExp(se,`g`);const ce=[`AdwNavigationSplitView`,`GtkListBox`,`AdwOverlaySplitView`];function probeEnabled(){let e=l.getenv(`GJSIFY_STORYBOOK_PROBE`);if(e==null)return!1;let t=e.toLowerCase();return t!==``&&t!==`0`&&t!==`false`}const le=5e3;function exitIfNotDrained(){if(typeof process>`u`||typeof process.exit!=`function`)return;let e=setTimeout(()=>{console.error(`STORYBOOK PROBE: host still alive ${le}ms after quit(), exiting`),process.exit(process.exitCode??0)},le);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(e,t,n={}){let r=n.requireChrome??ce,i=n.out??l.getenv(`GJSIFY_STORYBOOK_PROBE_OUT`)??void 0,a=n.timeoutMs??8e3,o=n.storyWidget??l.getenv(`GJSIFY_STORYBOOK_PROBE_STORY_WIDGET`)??void 0,s=t.controller.listStories(),c=[...new Set(s.map(e=>e.category))],u=n.story??l.getenv(`GJSIFY_STORYBOOK_PROBE_STORY`)??s[0]?.title,d=u?t.openStoryByTitle(u):!1,f=t.activeStory,p=new Set;collectTypes(dumpTree(t,60,`toplevel:0`),p);let m=r.filter(e=>!p.has(e)),h=new Set;f&&collectTypes(dumpTree(f,60,`story`),h);let g=h.size,_=o?h.has(o):null,finish=t=>{let n=JSON.stringify(t);if(t.ok)console.log(`STORYBOOK PROBE: PASS ${n}`);else{console.error(`STORYBOOK PROBE: FAIL ${n}`);try{typeof process<`u`&&(process.exitCode=1)}catch{}}if(i)try{l.file_set_contents(i,JSON.stringify(t,null,2))}catch{}e.quit(),exitIfNotDrained()},ee=0;l.timeout_add(l.PRIORITY_DEFAULT,100,()=>{ee+=100;let e=captureWidgetPng(t),n=t.get_width()>0&&t.get_height()>0;if(!e&&!(ee>=a))return l.SOURCE_CONTINUE;let i=f?captureWidgetPng(f):null,p=s.length>=1&&c.length>=1&&m.length===0&&d&&f!=null&&g>1,v;return s.length<1?v=`no stories registered`:c.length<1?v=`no categories`:m.length>0?v=`chrome missing: ${m.join(`, `)}`:!d||f==null?v=`could not open story: ${u??`(none)`}`:g<=1&&(v=`opened story rendered an empty subtree`),p&&o&&!h.has(o)&&(p=!1,v=`story widget ${o} not found in the opened story subtree`),p&&n&&(!e||e.length===0)&&(p=!1,v=`window realized (${t.get_width()}x${t.get_height()}) but the GSK capture was empty`),finish({ok:p,reason:v,stories:s.length,categories:c,opened:d,activeStory:f?f.meta.title:null,requiredChrome:r,missingChrome:m,storySubtreeWidgets:g,storyWidgetPresent:_,windowRealized:n,windowPngBytes:e?e.length:0,storyPngBytes:i?i.length:0}),l.SOURCE_REMOVE})}const ue=e(import.meta.url);let de;function load$1(){return de===void 0&&(de=ue(`@gjsify/node-gi/gi`).requireGi(`Adw`,`1`)),de}__name(load$1,`load`);var w=new Proxy(Object.create(null),{get(e,t){return load$1()[t]},has(e,t){return t in load$1()}});const fe=[`blue`,`teal`,`green`,`yellow`,`orange`,`red`,`pink`,`purple`,`slate`],pe={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),a=Math.cbrt(.0883024619*e+.2817188376*t+.6299787005*n);return[.2104542553*r+.793617785*i-.0040720468*a,1.9779984951*r-2.428592205*i+.4505937099*a,.0259040371*r+.7827717662*i-.808675766*a]}function oklabToLinear(e,t,n){let r=(e+.3963377774*t+.2158037573*n)**3,i=(e-.1055613458*t-.0638541728*n)**3,a=(e-.0894841775*t-1.291485548*n)**3;return[4.0767416621*r-3.3077115913*i+.2309699292*a,-1.2684380046*r+2.6097574011*i-.3413193965*a,-.0041960863*r-.7034186147*i+1.707614701*a]}function adwaitaStandaloneColor(e,t){let n=parseHex(e);if(!n)return e;let[r,i,a]=linearToOklab(toLinear(n[0]),toLinear(n[1]),toLinear(n[2])),[o,s,c]=oklabToLinear(t?Math.max(r,.85):Math.min(r,.5),i,a);return toHex(fromLinear(o),fromLinear(s),fromLinear(c))}function adwaitaAccentBgColor(e){return pe[e]}function adwaitaAccentColor(e,t){return adwaitaStandaloneColor(pe[e],t)}const me={system:`Follow system`,light:`Light`,dark:`Dark`},he={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=w.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`?w.ColorScheme.FORCE_LIGHT:e.colorScheme===`dark`?w.ColorScheme.FORCE_DARK:w.ColorScheme.DEFAULT),this._applyAccent(this.settings.resolvedAccent)}finally{this._applying=!1}}}_applyAccent(e){let t=f.Display.get_default();if(!t)return;if(!this._provider){if(!e)return;this._provider=new h.CssProvider,h.StyleContext.add_provider_for_display(t,this._provider,h.STYLE_PROVIDER_PRIORITY_APPLICATION)}if(!e){this._provider.load_from_string(``);return}let n=adwaitaAccentBgColor(e),r=adwaitaAccentColor(e,this.settings.resolvedDark);this._provider.load_from_string(`:root { --accent-bg-color: ${n}; --accent-color: ${r}; }`)}};function buildSwatch(e,t,n){let r=new h.CheckButton({tooltip_text:t,halign:h.Align.CENTER,valign:h.Align.CENTER,focus_on_click:!1});for(let t of e)r.add_css_class(t);return r.update_property([h.AccessibleProperty.LABEL],[t]),n&&r.set_group(n),r}function buildSwatchCard(e=!1){let t=new w.WrapBox({align:.5,child_spacing:8,line_spacing:8,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12}),n=new w.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,n=new w.PreferencesPage,r=new w.PreferencesGroup({title:`Style`}),{card:i,row:o}=buildSwatchCard(),s=null,c=new Map;for(let e of a){let n=buildSwatch([`storybook-swatch`,`storybook-scheme-swatch`,`storybook-scheme-${e}`],me[e],s);s??=n,n.set_active(t.colorScheme===e),n.connect(`toggled`,()=>{n.get_active()&&(t.colorScheme=e)}),c.set(e,n),o.append(n)}r.add(i),n.add(r);let l=new w.PreferencesGroup({title:`Accent colour`});l.add_css_class(`storybook-attached-group`);let u=new w.SwitchRow({title:`Use a custom accent colour`,subtitle:`Off follows the desktop, which owns the accent`,active:t.accentMode===`custom`});l.add(u);let{card:d,row:f}=buildSwatchCard(!0),p=null,m=new Map;for(let e of fe){let n=buildSwatch([`storybook-swatch`],he[e],p);p??=n,n.set_active(t.accent===e);let r=new h.CssProvider;r.load_from_string(`checkbutton { background-color: ${adwaitaAccentBgColor(e)}; }`),n.get_style_context().add_provider(r,h.STYLE_PROVIDER_PRIORITY_APPLICATION),n.connect(`toggled`,()=>{n.get_active()&&(t.accent=e)}),m.set(e,n),f.append(n)}f.set_sensitive(t.accentMode===`custom`),u.connect(`notify::active`,()=>{t.accentMode=u.get_active()?`custom`:`system`}),l.add(d),n.add(l),t.subscribe(e=>{let t=c.get(e.colorScheme);t&&!t.get_active()&&t.set_active(!0);let n=m.get(e.accent);n&&!n.get_active()&&n.set_active(!0);let r=e.accentMode===`custom`;u.get_active()!==r&&u.set_active(r),f.set_sensitive(r)});let g=new w.PreferencesDialog({title:`Appearance`});return g.add(n),g}function adwControlWidgetFactory(){return{text(e,t){let n=new w.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 w.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=w.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,n=e.max??100,r=e.step??1,i=typeof e.min==`number`?e.min:0,a=Number.isInteger(r)&&Number.isInteger(i),o=new h.Adjustment({lower:t,upper:n,step_increment:r,value:i});o.step_increment=r;let s=new h.ListBoxRow({selectable:!1,activatable:!1});s.add_css_class(`story-range-row`);let c=new h.Box({orientation:h.Orientation.VERTICAL,spacing:6,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12}),l=new h.Box({orientation:h.Orientation.HORIZONTAL,spacing:12}),u=new h.Label({label:e.label||e.name,halign:h.Align.START,hexpand:!0,ellipsize:3});u.add_css_class(`heading`);let formatValue=e=>a?String(Math.round(e)):e.toFixed(2),d=new h.Label({label:formatValue(i),halign:h.Align.END});if(d.add_css_class(`numeric`),d.add_css_class(`dim-label`),l.append(u),l.append(d),c.append(l),e.description){let t=new h.Label({label:e.description,halign:h.Align.START,xalign:0,wrap:!0,max_width_chars:32});t.add_css_class(`caption`),t.add_css_class(`dim-label`),c.append(t)}let f=new h.Scale({orientation:h.Orientation.HORIZONTAL,adjustment:o,draw_value:!1,hexpand:!0}),p=null,m=!1;return f.connect(`value-changed`,()=>{if(m)return;let e=f.get_value();if(a){let t=Math.round(e);if(t!==e){f.set_value(t);return}e=t}d.set_label(formatValue(e)),p?.(e)}),c.append(f),s.set_child(c),{node:s,get:()=>f.get_value(),set:e=>{m=!0,f.set_value(e),m=!1,d.set_label(formatValue(e))},onChange:e=>{p=e}}}function buildSelectWidget(e){let t=e.options??[],n=h.StringList.new(t.map(e=>e.label)),r=new w.ComboRow({title:e.label||e.name,subtitle:e.description??``,model:n}),i=null;return r.connect(`notify::selected`,()=>i?.(r.get_selected())),{node:r,get:()=>r.get_selected(),set:e=>r.set_selected(e),onChange:e=>{i=e}}}function buildColorWidget(e,t){let n=new w.ActionRow({title:e,subtitle:t??``}),r=new h.ColorDialogButton({dialog:new h.ColorDialog({title:e}),valign:h.Align.CENTER});n.add_suffix(r),n.set_activatable_widget(r);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)}`,i=null,a=!1;return r.connect(`notify::rgba`,()=>{a||i?.(rgbaToHex(r.get_rgba()))}),{node:n,get:()=>rgbaToHex(r.get_rgba()),set:e=>{let t=new f.RGBA;t.parse(e)&&(a=!0,r.set_rgba(t),a=!1)},onChange:e=>{i=e}}}var ge=class StorybookWindow extends w.ApplicationWindow{static{S.registerClass({GTypeName:`StorybookWindow`,Template:`<?xml version="1.0" encoding="UTF-8"?>
79
79
  <!--
80
80
  DO NOT EDIT!
81
81
  This file was @generated by blueprint-compiler. Instead, edit the
@@ -215,7 +215,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
215
215
  </child>
216
216
  </template>
217
217
  </interface>
218
- `,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){console.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 D.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 h.ListBoxRow({selectable:!1}),n=new h.Label({label:e,halign:h.Align.START,margin_top:10,margin_bottom:4,margin_start:12,margin_end:12});n.add_css_class(`heading`),n.add_css_class(`dim-label`),t.set_child(n),this._sidebar_list.append(t)}_addStoryToSidebar(e,t){let n=new h.ListBoxRow,r=new h.Label({label:t||`Unnamed Story`,halign:h.Align.START,margin_start:20,margin_top:6,margin_bottom:6});n.set_child(r),this._sidebar_list.append(n),n.storyWidget=e,this._rowByTitle.set(e.meta.title,n)}_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)}};w.type_ensure(Ct.$gtype);var wt=class StorybookApplication extends D.Application{static{w.registerClass({GTypeName:`StorybookApplication`},StorybookApplication)}constructor(e){super({application_id:e.applicationId,flags:x.ApplicationFlags.DEFAULT_FLAGS}),this._window=null,this._options=e,this.connect(`startup`,()=>this._initStyles()),this.connect(`activate`,()=>this._onActivate())}_initStyles(){let e=new h.CssProvider;e.load_from_string(`
218
+ `,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){console.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 w.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 h.ListBoxRow({selectable:!1}),n=new h.Label({label:e,halign:h.Align.START,margin_top:10,margin_bottom:4,margin_start:12,margin_end:12});n.add_css_class(`heading`),n.add_css_class(`dim-label`),t.set_child(n),this._sidebar_list.append(t)}_addStoryToSidebar(e,t){let n=new h.ListBoxRow,r=new h.Label({label:t||`Unnamed Story`,halign:h.Align.START,margin_start:20,margin_top:6,margin_bottom:6});n.set_child(r),this._sidebar_list.append(n),n.storyWidget=e,this._rowByTitle.set(e.meta.title,n)}_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)}};S.type_ensure(ge.$gtype);var _e=class StorybookApplication extends w.Application{static{S.registerClass({GTypeName:`StorybookApplication`},StorybookApplication)}constructor(e){super({application_id:e.applicationId,flags:b.ApplicationFlags.DEFAULT_FLAGS}),this._window=null,this._options=e,this.connect(`startup`,()=>this._initStyles()),this.connect(`activate`,()=>this._onActivate())}_initStyles(){let e=new h.CssProvider;e.load_from_string(`
219
219
  /* Appearance dialog — round swatches with a selection ring, the shape GNOME's own
220
220
  appearance switcher uses. Adapted from Learn6502's theme-mode-selector.css and
221
221
  accent-color-selector.css (JumpLink/easy6502, MIT).
@@ -335,10 +335,10 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
335
335
  .story-stage {
336
336
  padding: 18px;
337
337
  }
338
- \n${this._options.css??``}`);let t=f.Display.get_default();if(!t){console.error(`No display found`);return}h.StyleContext.add_provider_for_display(t,e,h.STYLE_PROVIDER_PRIORITY_APPLICATION)}_onActivate(){if(!this._window){this._window=new Ct({application:this}),this._options.title&&this._window.set_title(this._options.title);try{this._window.populateSidebar(this._options.stories)}catch(e){console.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()}};w.type_ensure(wt.$gtype);function collectStoryModules(e){return collectStoryModules$1(e)}function buildGtkChrome(e){let t=new D.PreferencesPage,n=new D.PreferencesGroup,r=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,margin_top:12,margin_bottom:12,spacing:12,hexpand:!0});return r.add_css_class(`story-stage`),n.add(r),t.add(n),e.set_child(t),{root:e,hasStage:!0,setStageContent(e){let t=r.get_first_child();for(;t;)t.unparent(),t=r.get_first_child();r.append(e)},setChromeText(e,t){n.set_title(l.markup_escape_text(e,-1)),n.set_description(l.markup_escape_text(t,-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`)}},K=class StoryWidget extends D.Bin{static{w.registerClass({GTypeName:`StoryWidget`,Properties:{meta:w.ParamSpec.object(`meta`,`Meta`,`Story metadata`,w.ParamFlags.READWRITE,w.Object),story:w.ParamSpec.string(`story`,`Story Name`,`Story name`,w.ParamFlags.READWRITE,``),args:w.ParamSpec.object(`args`,`Args`,`Story arguments`,w.ParamFlags.READWRITE,w.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)}};w.type_ensure(K.$gtype);const Tt={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 Tt[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 q=/([^\s=/<>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;function parseAttributes(e){let t={};q.lastIndex=0;let n=q.exec(e);for(;n!==null;)n[1]in t||(t[n[1]]=decodeXmlEntities(n[2]??n[3]??``)),n=q.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 a=e.slice(r+1,i);if(n=i+1,a.charAt(0)===`/`){let e=a.slice(1).trim();e!==``&&t.push({kind:`close`,name:e});continue}let o=a,s=!1;o.endsWith(`/`)&&(s=!0,o=o.slice(0,-1));let c=/^([^\s/<>]+)/.exec(o);if(c===null)continue;let l=c[1];t.push({kind:`open`,name:l,attributes:parseAttributes(o.slice(l.length)),selfClosing:s})}return t}const Et={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`,a=r<t.length?t.charAt(r):`\0`;if((i===`-`||i===`\0`)&&(a===`-`||a===`\0`)&&n++,i===`\0`||a===`\0`)break;if(i!==a)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=``,a=n.indexOf(`@`);if(a>=0){let e=n.slice(a);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,a)}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 a=t;if(a.selfClosing){r.push({name:a.name,attributes:a.attributes,start:i+1,end:i+1}),i+=1;continue}let o=1,s=i+1;for(;s<n&&o>0;){let t=e[s];t.kind===`open`?t.selfClosing||(o+=1):t.kind===`close`&&--o,s+=1}let c=o===0?s-1:n;r.push({name:a.name,attributes:a.attributes,start:i+1,end:c}),i=o===0?s: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,a=0;for(let o=t.start;o<t.end;o++){let t=e[o];if(t.kind===`open`){let e=t,r=!e.selfClosing;if(r&&(a+=1),i>0)continue;e.name===`em`||e.name===`code`?n+=`<${e.name}>`:r&&(i=a)}else if(t.kind===`close`)i>0&&a===i?i=0:i===0&&(t.name===`em`||t.name===`code`)&&(n+=`</${t.name}>`),--a;else if(i===0){let e=``;for(let n of t.text){if(n===`
339
- `||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`),a=0;for(let[e,t]of r){let r=localeScore(n,e);r>a&&(a=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{...Et};let a={...Et},o={value:null,score:0},s={value:null,score:0},c=[],l=null;for(let e of childElements(r,i.start,i.end))switch(e.name){case`id`:a.applicationId===null&&(a.applicationId=elementText(r,e));break;case`name`:considerTranslatable(o,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>s.score&&(lang(t)===`C`||e>1024)&&(s.score=e,s.value=elementText(r,t))}break;case`developer_name`:considerTranslatable(s,e,elementText(r,e),localeScore(n,lang(e)));break;case`url`:{let t=elementText(r,e);e.attributes.type===`homepage`?a.website=t:e.attributes.type===`bugtracker`?a.issueUrl=t:e.attributes.type===`help`&&(a.supportUrl=t);break}case`launchable`:e.attributes.type===`desktop-id`&&c.push(elementText(r,e));break;case`project_license`:a.license===null&&(a.license=elementText(r,e));break;case`releases`:l===null&&(l=e);break;default:break}if(a.applicationName=o.value,a.developerName=s.value,l!==null){let e=childElements(r,l.start,l.end).filter(e=>e.name===`release`);a.version=e[0]?.attributes.version??null;let i=t.releaseNotesVersion;if(i!==void 0&&i!==``){let t=e.find(e=>e.attributes.version===i),o=t&&childElements(r,t.start,t.end).find(e=>e.name===`description`);o&&(a.releaseNotes=parseDescription(r,o,n))}}a.applicationId!==null&&a.applicationId.endsWith(`.desktop`)&&(c.includes(`${a.applicationId}.desktop`)||(a.applicationId=a.applicationId.slice(0,-8)));for(let e of Object.keys(a))a[e]===``&&(a[e]=null);return a}const Dt={"GPL-2.0-or-later":h.License.GPL_2_0,"GPL-3.0-or-later":h.License.GPL_3_0,"LGPL-2.1-or-later":h.License.LGPL_2_1,"LGPL-3.0-or-later":h.License.LGPL_3_0,"BSD-2-Clause":h.License.BSD,MIT:h.License.MIT_X11,"Artistic-2.0":h.License.ARTISTIC,"GPL-2.0-only":h.License.GPL_2_0_ONLY,"GPL-3.0-only":h.License.GPL_3_0_ONLY,"LGPL-2.1-only":h.License.LGPL_2_1_ONLY,"LGPL-3.0-only":h.License.LGPL_3_0_ONLY,"AGPL-3.0-or-later":h.License.AGPL_3_0,"AGPL-3.0-only":h.License.AGPL_3_0_ONLY,"BSD-3-Clause":h.License.BSD_3,"Apache-2.0":h.License.APACHE_2_0,"MPL-2.0":h.License.MPL_2_0,"0BSD":h.License[`0BSD`],"GPL-2.0":h.License.GPL_2_0_ONLY,"GPL-3.0":h.License.GPL_3_0_ONLY};function licenseTypeFor(e){return Dt[e]??h.License.CUSTOM}function hasAppdataConstructor(e=D){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(e,t={}){let n=parseAppdata(e,{locale:t.locale??appdataLocale(l.get_language_names(),{LANG:l.getenv(`LANG`)??void 0}),releaseNotesVersion:t.releaseNotesVersion});return applyAppdataFields(new D.AboutDialog,n,t.releaseNotesVersion)}function resourceExists(e){try{return x.resources_get_info(e,x.ResourceLookupFlags.NONE),!0}catch{return!1}}function readResource(e){try{let t=x.resources_lookup_data(e,x.ResourceLookupFlags.NONE);return new TextDecoder().decode(t.toArray())}catch{return null}}function readFile(e){try{let[t,n]=l.file_get_contents(e);return t?new TextDecoder().decode(n):null}catch{return null}}let Ot=!1;function createAboutDialog(e={}){let{appdataResource:t,appdataPath:n,releaseNotesVersion:r}=e,i=t!==void 0&&resourceExists(t),a;if(!e.forceParsedAppdata&&i&&hasAppdataConstructor())a=D.AboutDialog.new_from_appdata(t,r??``);else{let o=(i?readResource(t):null)??(n===void 0?null:readFile(n));o===null?(console.error(`@gjsify/adwaita-app: no AppStream metainfo found for the About dialog; looked at resource ${t??`(none given)`} and file ${n??`(none given)`}`),a=new D.AboutDialog):(!Ot&&!e.forceParsedAppdata&&i&&(Ot=!0,console.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.`)),a=buildAboutDialogFromAppdata(o,{releaseNotesVersion:r}))}return e.applicationIcon!==void 0&&(a.applicationIcon=e.applicationIcon),e.version!==void 0&&(a.version=e.version),a}function applyAboutLinks(e,t){for(let n of t??[])n.title&&n.url&&e.add_link(n.title,n.url)}`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 J=null;function registerBundledIconResource(){if(J)return J;let e=l.base64_decode(`R1ZhcmlhbnQAAAAAAAAAABgAAACkCQAAAAAAKFcAAAAAAAAAAQAAAAQAAAAFAAAABQAAAAUAAAAGAAAABgAAAAYAAAAIAAAACAAAAAkAAAALAAAACwAAAA0AAAANAAAADwAAAA8AAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGgAAABwAAAAeAAAAHwAAACIAAAAiAAAAIwAAACUAAAAlAAAAJQAAACYAAAAmAAAAJgAAACkAAAAqAAAALAAAACwAAAAtAAAALQAAAC0AAAAuAAAALgAAAC4AAAAvAAAAMQAAADQAAAA1AAAANwAAADkAAAA8AAAAPQAAAD8AAAA/AAAAQQAAAEIAAABDAAAARAAAAEQAAABEAAAARAAAAEUAAABFAAAARgAAAEYAAABGAAAARgAAAEYAAABGAAAARgAAAEcAAABLAAAASwAAAEsAAABLAAAASwAAAE4AAABRAAAAVAAAAFQAAABVAAAAVQAAAFYAAADiMb0uOgAAAKQJAAAUAHYAuAkAAMgKAAAWuDRtOgAAAMgKAAAhAHYA8AoAACcMAAAK8uYjOgAAACcMAAAYAHYAQAwAAF8NAADhERO1BgAAAF8NAAAHAEwAaA0AAHwNAADpf58XOgAAAHwNAAAYAHYAmA0AAMgOAAALfUj0OgAAAMgOAAAVAHYA4A4AAM4PAAC6P2D1KgAAAM4PAAAJAEwA2A8AAPgPAADEQFkHOgAAAPgPAAAZAHYAGBAAADkSAADW7AkKPgAAADkSAAAJAEwARBIAAEgSAAD+9zTNOgAAAEgSAAAZAHYAaBIAAHEUAAAwvzvfOgAAAHEUAAAbAHYAkBQAAEYVAACu2v4DOgAAAEYVAAAYAHYAYBUAAKQWAAC2R65pBgAAAK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ources_register(J),J}function addBundledIconsToTheme(e){registerBundledIconResource(),e.add_resource_path(`/eu/jumplink/gjsify/adwaita-app/icons`)}function installBundledIconTheme(e={}){let t=e.prefer??`fallback`;if(t===`host`)return!1;let n=e.display===void 0?f.Display.get_default():e.display;return n?(addBundledIconsToTheme(h.IconTheme.get_for_display(n)),t===`bundled`&&h.Settings.get_for_display(n).set_property(`gtk-icon-theme-name`,`gjsify-adwaita-bundled`),!0):!1}var kt=class AdwaitaApp extends D.Application{static{w.registerClass({GTypeName:`GjsifyAdwaitaApp`},AdwaitaApp)}constructor(e){super({application_id:e.applicationId,flags:e.flags??x.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 x.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 x.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 t=f.Display.get_default();if(!t){console.error(`@gjsify/adwaita-app: no default display; CSS not applied`);return}let n=new h.CssProvider;n.load_from_string(e),h.StyleContext.add_provider_for_display(t,n,h.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 D.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),applyAboutLinks(n,t.links),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&&console.error(`${e.applicationId??`This application`} is already running — brought the existing instance to the front instead of opening a second window.`),r}w.type_ensure(kt.$gtype);var At=class LoadingStack extends h.Stack{static{w.registerClass({GTypeName:`GjsifyLoadingStack`},LoadingStack)}constructor(e={}){super(e);let t=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,hexpand:!0,vexpand:!0});t.append(new D.Spinner),this.add_named(t,`loading`),this._content=new D.Bin({hexpand:!0,vexpand:!0}),this.add_named(this._content,`content`),this._error=new D.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`)}};w.type_ensure(At.$gtype);async function runStorybook(e){return runApplication(new wt(e),[t.programInvocationName,...t.programArgs])}const jt={title:`Buttons/Button Content`,description:`Adw.ButtonContent — pairs a symbolic icon with a label inside a Gtk.Button.`,controls:[{name:`label`,label:`Label`,type:i.TEXT,defaultValue:`Download`},{name:`iconName`,label:`Icon`,type:i.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:i.BOOLEAN,defaultValue:!1}]};var Mt=__exportAll({ButtonContentStories:()=>Pt,ButtonContentStory:()=>Nt}),Nt=class ButtonContentStory extends K{_content=null;_button=null;static{w.registerClass({GTypeName:`AdwStorybookButtonContent`},ButtonContentStory)}constructor(){super(K.fromMeta(ButtonContentStory.getMetadata(),`Default`))}static getMetadata(){return{...jt,component:D.ButtonContent.$gtype}}initialize(){this._content=new D.ButtonContent({label:this.args.label,iconName:this.args.iconName,canShrink:this.args.canShrink}),this._button=new h.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)}};w.type_ensure(Nt.$gtype);const Pt={stories:[Nt]},Ft={title:`Buttons/Button Styles`,description:`Buttons with Adwaita style classes: .pill, .circular, .suggested-action, .destructive-action, .flat.`,controls:[{name:`label`,label:`Demo label`,type:i.TEXT,defaultValue:`Click me`},{name:`style`,label:`Demo style`,type:i.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 It=__exportAll({ButtonStylesStories:()=>zt,ButtonStylesStory:()=>Rt});const Lt=[`pill`,`circular`,`suggested-action`,`destructive-action`,`flat`];var Rt=class ButtonStylesStory extends K{_demo=null;static{w.registerClass({GTypeName:`AdwStorybookButtonStyles`},ButtonStylesStory)}constructor(){super(K.fromMeta(ButtonStylesStory.getMetadata(),`Default`))}static getMetadata(){return{...Ft,component:h.Button.$gtype}}initialize(){let e=new D.WrapBox({childSpacing:12,lineSpacing:12,halign:h.Align.CENTER}),t=new h.Button({label:`Pill`});t.add_css_class(`pill`),e.append(t);let n=new h.Button({iconName:`list-add-symbolic`});n.add_css_class(`circular`),e.append(n);let r=new h.Button({label:`Suggested`});r.add_css_class(`suggested-action`),e.append(r);let i=new h.Button({label:`Delete`});i.add_css_class(`destructive-action`),e.append(i);let a=new h.Button({label:`Flat`});a.add_css_class(`flat`),e.append(a),this._demo=new h.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 Lt)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))}};w.type_ensure(Rt.$gtype);const zt={stories:[Rt]},Bt={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:i.TEXT,defaultValue:`#3584e4`},{name:`title`,label:`Dialog title`,type:i.TEXT,defaultValue:`Choose a colour`}]};var Vt=__exportAll({ColorDialogButtonStories:()=>Ut,ColorDialogButtonStory:()=>Ht}),Ht=class ColorDialogButtonStory extends K{_button=null;static{w.registerClass({GTypeName:`AdwStorybookColorDialogButton`},ColorDialogButtonStory)}constructor(){super(K.fromMeta(ColorDialogButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Bt,component:h.ColorDialogButton.$gtype}}initialize(){this._button=new h.ColorDialogButton({halign:h.Align.CENTER}),this._button.dialog=new h.ColorDialog,this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){if(!this._button)return;let e=new f.RGBA;e.parse(this.args.rgba)&&(this._button.rgba=e),this._button.dialog.title=this.args.title||``}};w.type_ensure(Ht.$gtype);const Ut={stories:[Ht]},Wt=e(import.meta.url);let Gt;function load(){return Gt===void 0&&(Gt=Wt("@gjsify/node-gi/gi").requireGi(`Pango`,`1.0`)),Gt}var Kt=new Proxy(Object.create(null),{get(e,t){return load()[t]},has(e,t){return t in load()}});const qt={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:i.TEXT,defaultValue:`Sans Bold 12`},{name:`level`,label:`Level`,type:i.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:i.BOOLEAN,defaultValue:!0},{name:`useSize`,label:`Draw in the size`,type:i.BOOLEAN,defaultValue:!0}]};var Jt=__exportAll({FontDialogButtonStories:()=>Xt,FontDialogButtonStory:()=>Yt}),Yt=class FontDialogButtonStory extends K{_button=null;static{w.registerClass({GTypeName:`AdwStorybookFontDialogButton`},FontDialogButtonStory)}constructor(){super(K.fromMeta(FontDialogButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...qt,component:h.FontDialogButton.$gtype}}initialize(){this._button=new h.FontDialogButton({halign:h.Align.CENTER}),this._button.dialog=new h.FontDialog,this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){if(!this._button)return;this._button.level=this.args.level;let e=Kt.FontDescription.from_string(this.args.fontDesc);e!==null&&(this._button.fontDesc=e),this._button.useFont=this.args.useFont,this._button.useSize=this.args.useSize}};w.type_ensure(Yt.$gtype);const Xt={stories:[Yt]},Zt={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:i.TEXT,defaultValue:`GNOME`},{name:`uri`,label:`URI`,type:i.TEXT,defaultValue:`https://gnome.org`},{name:`visited`,label:`Visited`,type:i.BOOLEAN,defaultValue:!1}]};var Qt=__exportAll({LinkButtonStories:()=>en,LinkButtonStory:()=>$t}),$t=class LinkButtonStory extends K{_button=null;static{w.registerClass({GTypeName:`AdwStorybookLinkButton`},LinkButtonStory)}constructor(){super(K.fromMeta(LinkButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Zt,component:h.LinkButton.$gtype}}initialize(){this._button=new h.LinkButton({halign:h.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}};w.type_ensure($t.$gtype);const en={stories:[$t]},tn=[`Save as…`,`Export`,`Print`],nn={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:i.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:i.TEXT,defaultValue:`Document`}]};var rn=__exportAll({MenuButtonStories:()=>on,MenuButtonStory:()=>an}),an=class MenuButtonStory extends K{_widget=null;static{w.registerClass({GTypeName:`AdwStorybookMenuButton`},MenuButtonStory)}constructor(){super(K.fromMeta(MenuButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...nn,component:h.MenuButton.$gtype}}initialize(){this._widget=new h.MenuButton({halign:h.Align.CENTER}),this._apply(),this.addContent(this._widget)}updateArgs(e){this._apply()}_buildMenu(e){let t=new x.Menu;for(let e of tn)t.append(e,`app.${e.toLowerCase().replace(/[^a-z]+/g,`-`)}`);let n=new x.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))}};w.type_ensure(an.$gtype);const on={stories:[an]},sn=[`audio-volume-muted-symbolic`,`audio-volume-low-symbolic`,`audio-volume-high-symbolic`],cn={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:i.NUMBER,defaultValue:70},{name:`orientation`,label:`Orientation`,type:i.SELECT,options:[{label:`Vertical`,value:`vertical`},{label:`Horizontal`,value:`horizontal`}],defaultValue:`vertical`},{name:`hasFrame`,label:`Has frame`,type:i.BOOLEAN,defaultValue:!1}]};var ln=__exportAll({ScaleButtonStories:()=>dn,ScaleButtonStory:()=>un}),un=class ScaleButtonStory extends K{_button=null;static{w.registerClass({GTypeName:`AdwStorybookScaleButton`},ScaleButtonStory)}constructor(){super(K.fromMeta(ScaleButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...cn,component:h.ScaleButton.$gtype}}initialize(){this._button=new h.ScaleButton({halign:h.Align.CENTER}),this._button.icons=sn,this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){this._button&&(this._button.orientation=this.args.orientation===`horizontal`?h.Orientation.HORIZONTAL:h.Orientation.VERTICAL,this._button.hasFrame=this.args.hasFrame,this._button.value=this.args.value)}};w.type_ensure(un.$gtype);const dn={stories:[un]},fn={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:i.TEXT,defaultValue:`Save`},{name:`iconName`,label:`Icon`,type:i.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`}]},pn={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:i.TEXT,defaultValue:`Reply`},{name:`iconName`,label:`Icon`,type:i.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 mn=__exportAll({SplitButtonFlatStory:()=>gn,SplitButtonStories:()=>_n,SplitButtonStory:()=>hn});function buildMenu(){let e=new x.Menu;return e.append(`Save as…`,`app.save-as`),e.append(`Export`,`app.export`),e.append(`Print`,`app.print`),e}var hn=class SplitButtonStory extends K{_widget=null;static{w.registerClass({GTypeName:`AdwStorybookSplitButton`},SplitButtonStory)}constructor(){super(K.fromMeta(SplitButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...fn,component:D.SplitButton.$gtype}}initialize(){this._widget=new D.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}};w.type_ensure(hn.$gtype);var gn=class SplitButtonFlatStory extends K{_widget=null;static{w.registerClass({GTypeName:`AdwStorybookSplitButtonFlat`},SplitButtonFlatStory)}constructor(){super(K.fromMeta(SplitButtonFlatStory.getMetadata(),`Default`))}static getMetadata(){return{...pn,component:D.SplitButton.$gtype}}initialize(){this._widget=new D.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}};w.type_ensure(gn.$gtype);const _n={stories:[hn,gn]},vn={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:i.TEXT,defaultValue:`Mute`},{name:`active`,label:`Active`,type:i.BOOLEAN,defaultValue:!1},{name:`flat`,label:`Flat`,type:i.BOOLEAN,defaultValue:!1}]};var yn=__exportAll({ToggleButtonStories:()=>xn,ToggleButtonStory:()=>bn}),bn=class ToggleButtonStory extends K{_button=null;static{w.registerClass({GTypeName:`AdwStorybookToggleButton`},ToggleButtonStory)}constructor(){super(K.fromMeta(ToggleButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...vn,component:h.ToggleButton.$gtype}}initialize(){this._button=new h.ToggleButton({halign:h.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`))}};w.type_ensure(bn.$gtype);const xn={stories:[bn]},Sn={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:i.SELECT,options:[{label:`List`,value:0},{label:`Grid`,value:1},{label:`Columns`,value:2}],defaultValue:0},{name:`style`,label:`Style`,type:i.SELECT,options:[{label:`Default`,value:`default`},{label:`Flat`,value:`flat`},{label:`Round`,value:`round`}],defaultValue:`default`}]};var Cn=__exportAll({ToggleGroupStories:()=>En,ToggleGroupStory:()=>Tn});const wn=[`flat`,`round`];var Tn=class ToggleGroupStory extends K{_toggleGroup=null;static{w.registerClass({GTypeName:`AdwStorybookToggleGroup`},ToggleGroupStory)}constructor(){super(K.fromMeta(ToggleGroupStory.getMetadata(),`Default`))}static getMetadata(){return{...Sn,component:D.ToggleGroup.$gtype}}initialize(){this._toggleGroup=new D.ToggleGroup,this._toggleGroup.add(new D.Toggle({label:`List`,iconName:`view-list-symbolic`})),this._toggleGroup.add(new D.Toggle({label:`Grid`,iconName:`view-grid-symbolic`})),this._toggleGroup.add(new D.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 wn)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))}};w.type_ensure(Tn.$gtype);const En={stories:[Tn]},Dn={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:i.TEXT,defaultValue:`Enable networking`},{name:`checked`,label:`Checked`,type:i.BOOLEAN,defaultValue:!0},{name:`indeterminate`,label:`Indeterminate`,type:i.BOOLEAN,defaultValue:!1},{name:`disabled`,label:`Disabled`,type:i.BOOLEAN,defaultValue:!1}]};var On=__exportAll({CheckButtonStories:()=>An,CheckButtonStory:()=>kn}),kn=class CheckButtonStory extends K{_box=null;_button=null;static{w.registerClass({GTypeName:`AdwStorybookCheckButton`},CheckButtonStory)}constructor(){super(K.fromMeta(CheckButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Dn,component:h.CheckButton.$gtype}}initialize(){this._button=new h.CheckButton,this._box=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,halign:h.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)}};w.type_ensure(kn.$gtype);const An={stories:[kn]},jn=[`Automatic`,`Always`,`Never`,`When busy`],Mn={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:i.SELECT,options:jn.map((e,t)=>({label:e,value:t})),defaultValue:0},{name:`enableSearch`,label:`Search field`,type:i.BOOLEAN,defaultValue:!1}]};var Nn=__exportAll({DropDownStories:()=>Fn,DropDownStory:()=>Pn}),Pn=class DropDownStory extends K{_dropDown=null;static{w.registerClass({GTypeName:`AdwStorybookDropDown`},DropDownStory)}constructor(){super(K.fromMeta(DropDownStory.getMetadata(),`Default`))}static getMetadata(){return{...Mn,component:h.DropDown.$gtype}}initialize(){this._dropDown=h.DropDown.new_from_strings([...jn]),this._dropDown.expression=h.PropertyExpression.new(h.StringObject.$gtype,null,`string`),this._dropDown.halign=h.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)}};w.type_ensure(Pn.$gtype);const Fn={stories:[Pn]},In={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:i.TEXT,defaultValue:``},{name:`placeholder`,label:`Placeholder`,type:i.TEXT,defaultValue:`Search files…`},{name:`editable`,label:`Editable`,type:i.BOOLEAN,defaultValue:!0}]};var Ln=__exportAll({EntryStories:()=>zn,EntryStory:()=>Rn}),Rn=class EntryStory extends K{_entry=null;static{w.registerClass({GTypeName:`AdwStorybookEntry`},EntryStory)}constructor(){super(K.fromMeta(EntryStory.getMetadata(),`Default`))}static getMetadata(){return{...In,component:h.Entry.$gtype}}initialize(){this._entry=new h.Entry({widthRequest:280,halign:h.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)}};w.type_ensure(Rn.$gtype);const zn={stories:[Rn]},Bn={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:i.RANGE,min:16,max:64,step:4,defaultValue:32},{name:`spinning`,label:`Spinning`,type:i.BOOLEAN,defaultValue:!0},{name:`disabled`,label:`Disabled`,type:i.BOOLEAN,defaultValue:!1}]};var Vn=__exportAll({GtkSpinnerStories:()=>Un,GtkSpinnerStory:()=>Hn}),Hn=class GtkSpinnerStory extends K{_spinner=null;static{w.registerClass({GTypeName:`AdwStorybookGtkSpinner`},GtkSpinnerStory)}constructor(){super(K.fromMeta(GtkSpinnerStory.getMetadata(),`Default`))}static getMetadata(){return{...Bn,component:h.Spinner.$gtype}}initialize(){this._spinner=new h.Spinner({halign:h.Align.CENTER,valign:h.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}};w.type_ensure(Hn.$gtype);const Un={stories:[Hn]},Wn={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:i.RANGE,min:0,max:1,step:.05,defaultValue:.8},{name:`maxValue`,label:`Max value`,type:i.RANGE,min:1,max:5,step:1,defaultValue:5},{name:`mode`,label:`Mode`,type:i.SELECT,options:[{label:`Continuous`,value:`continuous`},{label:`Discrete`,value:`discrete`}],defaultValue:`continuous`},{name:`orientation`,label:`Orientation`,type:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`inverted`,label:`Inverted`,type:i.BOOLEAN,defaultValue:!1}]};var Gn=__exportAll({LevelBarStories:()=>qn,LevelBarStory:()=>Kn}),Kn=class LevelBarStory extends K{_box=null;_bar=null;static{w.registerClass({GTypeName:`AdwStorybookLevelBar`},LevelBarStory)}constructor(){super(K.fromMeta(LevelBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Wn,component:h.LevelBar.$gtype}}initialize(){this._bar=new h.LevelBar,this._box=new h.Box({halign:h.Align.CENTER,valign:h.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?h.Orientation.VERTICAL:h.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`?h.LevelBarMode.DISCRETE:h.LevelBarMode.CONTINUOUS,this._bar.value=this.args.value,this._bar.inverted=this.args.inverted}};w.type_ensure(Kn.$gtype);const qn={stories:[Kn]},Jn={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:i.BOOLEAN,defaultValue:!0},{name:`placeholderText`,label:`Placeholder`,type:i.TEXT,defaultValue:`Password`},{name:`disabled`,label:`Disabled`,type:i.BOOLEAN,defaultValue:!1}]};var Yn=__exportAll({PasswordEntryStories:()=>Zn,PasswordEntryStory:()=>Xn}),Xn=class PasswordEntryStory extends K{_entry=null;static{w.registerClass({GTypeName:`AdwStorybookPasswordEntry`},PasswordEntryStory)}constructor(){super(K.fromMeta(PasswordEntryStory.getMetadata(),`Default`))}static getMetadata(){return{...Jn,component:h.PasswordEntry.$gtype}}initialize(){this._entry=new h.PasswordEntry({showPeekIcon:!0,widthRequest:240,halign:h.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)}};w.type_ensure(Xn.$gtype);const Zn={stories:[Xn]},Qn={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:i.RANGE,min:0,max:1,step:.05,defaultValue:.4},{name:`pulsing`,label:`Pulsing (indeterminate)`,type:i.BOOLEAN,defaultValue:!1},{name:`showText`,label:`Show text`,type:i.BOOLEAN,defaultValue:!0},{name:`inverted`,label:`Inverted`,type:i.BOOLEAN,defaultValue:!1},{name:`osd`,label:`OSD (hairline)`,type:i.BOOLEAN,defaultValue:!1}]};var $n=__exportAll({ProgressBarStories:()=>tr,ProgressBarStory:()=>er}),er=class ProgressBarStory extends K{_box=null;_bar=null;static{w.registerClass({GTypeName:`AdwStorybookProgressBar`},ProgressBarStory)}constructor(){super(K.fromMeta(ProgressBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Qn,component:h.ProgressBar.$gtype}}initialize(){this._bar=new h.ProgressBar,this._box=new h.Box({spacing:12,halign:h.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`))}};w.type_ensure(er.$gtype);const tr={stories:[er]},nr={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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`valuePos`,label:`Value position`,type:i.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:i.BOOLEAN,defaultValue:!0},{name:`digits`,label:`Digits`,type:i.NUMBER,defaultValue:0},{name:`inverted`,label:`Inverted`,type:i.BOOLEAN,defaultValue:!1},{name:`hasOrigin`,label:`Has origin`,type:i.BOOLEAN,defaultValue:!0},{name:`value`,label:`Value`,type:i.NUMBER,defaultValue:40}]};var rr=__exportAll({ScaleStories:()=>ar,ScaleStory:()=>ir}),ir=class ScaleStory extends K{_scale=null;_adjustment=null;static{w.registerClass({GTypeName:`AdwStorybookScale`},ScaleStory)}constructor(){super(K.fromMeta(ScaleStory.getMetadata(),`Default`))}static getMetadata(){return{...nr,component:h.Scale.$gtype}}initialize(){this._adjustment=new h.Adjustment({value:40,lower:0,upper:100,stepIncrement:1,pageIncrement:10}),this._scale=new h.Scale({adjustment:this._adjustment,digits:0,drawValue:!0,widthRequest:260,valign:h.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`?h.Orientation.VERTICAL:h.Orientation.HORIZONTAL;let e={top:h.PositionType.TOP,bottom:h.PositionType.BOTTOM,left:h.PositionType.LEFT,right:h.PositionType.RIGHT};this._scale.value_pos=e[this.args.valuePos]??h.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)}};w.type_ensure(ir.$gtype);const ar={stories:[ir]},or={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:i.NUMBER,defaultValue:150},{name:`placeholderText`,label:`Placeholder`,type:i.TEXT,defaultValue:`Search…`},{name:`disabled`,label:`Disabled`,type:i.BOOLEAN,defaultValue:!1}]};var sr=__exportAll({SearchEntryStories:()=>lr,SearchEntryStory:()=>cr}),cr=class SearchEntryStory extends K{_entry=null;_label=null;_handler=0;static{w.registerClass({GTypeName:`AdwStorybookSearchEntry`},SearchEntryStory)}constructor(){super(K.fromMeta(SearchEntryStory.getMetadata(),`Default`))}static getMetadata(){return{...or,component:h.SearchEntry.$gtype}}initialize(){this._entry=new h.SearchEntry({widthRequest:260,halign:h.Align.CENTER}),this._label=new h.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 h.Box({orientation:h.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)}};w.type_ensure(cr.$gtype);const lr={stories:[cr]},ur={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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`digits`,label:`Digits`,type:i.NUMBER,defaultValue:0},{name:`numeric`,label:`Numeric`,type:i.BOOLEAN,defaultValue:!1},{name:`snapToTicks`,label:`Snap to ticks`,type:i.BOOLEAN,defaultValue:!1},{name:`wrap`,label:`Wrap`,type:i.BOOLEAN,defaultValue:!1},{name:`updatePolicy`,label:`Update policy`,type:i.SELECT,options:[{label:`Always`,value:`always`},{label:`If valid`,value:`if-valid`}],defaultValue:`always`},{name:`value`,label:`Value`,type:i.NUMBER,defaultValue:5}]};var dr=__exportAll({SpinButtonStories:()=>pr,SpinButtonStory:()=>fr}),fr=class SpinButtonStory extends K{_spin=null;_adjustment=null;static{w.registerClass({GTypeName:`AdwStorybookSpinButton`},SpinButtonStory)}constructor(){super(K.fromMeta(SpinButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...ur,component:h.SpinButton.$gtype}}initialize(){this._adjustment=new h.Adjustment({value:5,lower:0,upper:10,stepIncrement:1,pageIncrement:2}),this._spin=new h.SpinButton({adjustment:this._adjustment,digits:0,halign:h.Align.CENTER}),this._apply(),this.addContent(this._spin)}updateArgs(e){this._apply()}_apply(){!this._spin||!this._adjustment||(this._spin.orientation=this.args.orientation===`vertical`?h.Orientation.VERTICAL:h.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`?h.SpinButtonUpdatePolicy.IF_VALID:h.SpinButtonUpdatePolicy.ALWAYS,this._adjustment.set_value(this.args.value))}};w.type_ensure(fr.$gtype);const pr={stories:[fr]},mr={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:i.BOOLEAN,defaultValue:!0},{name:`state`,label:`State (the backend)`,type:i.BOOLEAN,defaultValue:!0},{name:`disabled`,label:`Disabled`,type:i.BOOLEAN,defaultValue:!1}]};var hr=__exportAll({SwitchStories:()=>_r,SwitchStory:()=>gr}),gr=class SwitchStory extends K{_switch=null;static{w.registerClass({GTypeName:`AdwStorybookSwitch`},SwitchStory)}constructor(){super(K.fromMeta(SwitchStory.getMetadata(),`Default`))}static getMetadata(){return{...mr,component:h.Switch.$gtype}}initialize(){this._switch=new h.Switch({halign:h.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)}};w.type_ensure(gr.$gtype);const _r={stories:[gr]},vr={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:i.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:i.SELECT,options:[{label:`Copy`,value:`copy`},{label:`Move`,value:`move`}],defaultValue:`copy`}]};var yr=__exportAll({DragIconStories:()=>xr,DragIconStory:()=>br}),br=class DragIconStory extends K{_row=null;_source=null;_hint=null;static{w.registerClass({GTypeName:`AdwStorybookDragIcon`},DragIconStory)}constructor(){super(K.fromMeta(DragIconStory.getMetadata(),`Default`))}static getMetadata(){return{...vr,component:h.DragIcon.$gtype}}initialize(){let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,halign:h.Align.CENTER,valign:h.Align.CENTER});this._hint=new h.Label({label:`Drag the row and watch the pointer`}),this._hint.add_css_class(`dim-label`),this._row=new h.Box({orientation:h.Orientation.HORIZONTAL,spacing:12,cssClasses:[`card`]}),this._row.append(this._buildLabel()),this._source=h.DragSource.new(),this._source.actions=this.args.actions===`move`?f.DragAction.MOVE:f.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`?f.DragAction.MOVE:f.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:f.ContentProvider.new_for_value(e)}_setIcon(e){let t=this._value(),n=h.DragIcon.get_for_drag(e),r=t===null?null:h.DragIcon.create_widget_for_value(t);n.set_child(r)}_buildLabel(){return new h.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`)}};w.type_ensure(br.$gtype);const xr={stories:[br]},Sr={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:i.RANGE,min:0,max:320,step:16,defaultValue:160},{name:`contentHeight`,label:`Content height`,type:i.RANGE,min:0,max:320,step:16,defaultValue:120},{name:`shape`,label:`Shape`,type:i.SELECT,options:[{label:`Circle`,value:`circle`},{label:`Grid`,value:`grid`},{label:`Crosshair`,value:`crosshair`}],defaultValue:`circle`}]};var Cr=__exportAll({DrawingAreaStories:()=>Tr,DrawingAreaStory:()=>wr}),wr=class DrawingAreaStory extends K{_box=null;_area=null;static{w.registerClass({GTypeName:`AdwStorybookDrawingArea`},DrawingAreaStory)}constructor(){super(K.fromMeta(DrawingAreaStory.getMetadata(),`Default`))}static getMetadata(){return{...Sr,component:h.DrawingArea.$gtype}}initialize(){this._area=new h.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 h.Box({halign:h.Align.CENTER,valign:h.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)}};w.type_ensure(wr.$gtype);const Tr={stories:[wr]},Er={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:i.BOOLEAN,defaultValue:!0},{name:`hasDepthBuffer`,label:`Depth buffer`,type:i.BOOLEAN,defaultValue:!1},{name:`allowedApis`,label:`Allowed APIs`,type:i.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:i.BOOLEAN,defaultValue:!0}]};var Dr=__exportAll({GLAreaStories:()=>kr,GLAreaStory:()=>Or}),Or=class GLAreaStory extends K{_area=null;_readout=null;_box=null;_tick=0;_renders=0;_viewport=`—`;static{w.registerClass({GTypeName:`AdwStorybookGLArea`},GLAreaStory)}constructor(){super(K.fromMeta(GLAreaStory.getMetadata(),`Default`))}static getMetadata(){return{...Er,component:h.GLArea.$gtype}}initialize(){this._area=new h.GLArea({widthRequest:240,heightRequest:160}),this._readout=new h.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 h.Box({orientation:h.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`?f.GLAPI.GLES:f.GLAPI.GL|f.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=l.timeout_add(l.PRIORITY_DEFAULT,33,()=>(this._area?.queue_render(),l.SOURCE_CONTINUE)))}_stop(){this._tick!==0&&(l.source_remove(this._tick),this._tick=0)}_refresh(){this._readout&&(this._readout.label=`viewport ${this._viewport} device px · ${this._renders} renders`)}};w.type_ensure(Or.$gtype);const kr={stories:[Or]},Ar={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:i.SELECT,options:[{label:`Enabled (default)`,value:`enabled`},{label:`Disabled`,value:`disabled`}],defaultValue:`enabled`},{name:`blackBackground`,label:`Black background`,type:i.BOOLEAN,defaultValue:!1},{name:`child`,label:`Child`,type:i.SELECT,options:[{label:`Label`,value:`label`},{label:`Image`,value:`image`},{label:`Row of labels`,value:`box`}],defaultValue:`image`}]};var jr=__exportAll({GraphicsOffloadStories:()=>Nr,GraphicsOffloadStory:()=>Mr}),Mr=class GraphicsOffloadStory extends K{_offload=null;_box=null;static{w.registerClass({GTypeName:`AdwStorybookGraphicsOffload`},GraphicsOffloadStory)}constructor(){super(K.fromMeta(GraphicsOffloadStory.getMetadata(),`Default`))}static getMetadata(){return{...Ar,component:h.GraphicsOffload.$gtype}}initialize(){this._offload=new h.GraphicsOffload({widthRequest:280,heightRequest:96}),this._offload.enabled=+(this.args.enabled===`disabled`),this._offload.black_background=this.args.blackBackground,this._box=new h.Box({halign:h.Align.CENTER,valign:h.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 h.Label({label:`The child of an offloaded layer`});break;case`box`:{let t=new h.Box({orientation:h.Orientation.HORIZONTAL,spacing:12});for(let e of[`One`,`Two`,`Three`])t.append(new h.Label({label:e}));e=new h.CenterBox,e.set_center_widget(t);break}default:e=new h.Image({iconName:`camera-photo-symbolic`,pixelSize:48});break}this._offload.child=e}};w.type_ensure(Mr.$gtype);const Nr={stories:[Mr]},Pr={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:i.TEXT,defaultValue:`Adwaita Storybook`},{name:`version`,label:`Version`,type:i.TEXT,defaultValue:`0.11.0`}]};var Fr=__exportAll({AboutDialogStories:()=>Lr,AboutDialogStory:()=>Ir}),Ir=class AboutDialogStory extends K{_button=null;static{w.registerClass({GTypeName:`AdwStorybookAboutDialog`},AboutDialogStory)}constructor(){super(K.fromMeta(AboutDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Pr,component:D.AboutDialog.$gtype}}initialize(){this._button=new h.Button({label:`Show dialog`,halign:h.Align.CENTER,valign:h.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 D.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:h.License.MIT_X11,developers:[`Ada Lovelace`,`Grace Hopper`],designers:[`Margaret Hamilton`],copyright:`© 2026 The GJSify Project`}).present(this)}updateArgs(e){}};w.type_ensure(Ir.$gtype);const Lr={stories:[Ir]},Rr={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:i.TEXT,defaultValue:`Delete Project?`},{name:`body`,label:`Body`,type:i.TEXT,defaultValue:`This will permanently remove the project and all of its files. This action cannot be undone.`}]};var zr=__exportAll({AlertDialogStories:()=>Vr,AlertDialogStory:()=>Br}),Br=class AlertDialogStory extends K{_button=null;static{w.registerClass({GTypeName:`AdwStorybookAlertDialog`},AlertDialogStory)}constructor(){super(K.fromMeta(AlertDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Rr,component:D.AlertDialog.$gtype}}initialize(){this._button=new h.Button({label:`Show dialog`,halign:h.Align.CENTER,valign:h.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 D.AlertDialog({heading:this.args.heading,body:this.args.body});e.add_response(`cancel`,`Cancel`),e.add_response(`delete`,`Delete`),e.set_response_appearance(`delete`,D.ResponseAppearance.DESTRUCTIVE),e.set_default_response(`cancel`),e.set_close_response(`cancel`),e.present(this)}updateArgs(e){}};w.type_ensure(Br.$gtype);const Vr={stories:[Br]},Hr={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:i.TEXT,defaultValue:`Preferences`},{name:`presentation`,label:`Presentation`,type:i.SELECT,options:[{label:`Auto`,value:`auto`},{label:`Floating`,value:`floating`},{label:`Bottom sheet`,value:`bottom-sheet`}],defaultValue:`auto`}]};var Ur=__exportAll({DialogStories:()=>Kr,DialogStory:()=>Gr});const Wr={auto:D.DialogPresentationMode.AUTO,floating:D.DialogPresentationMode.FLOATING,"bottom-sheet":D.DialogPresentationMode.BOTTOM_SHEET};var Gr=class DialogStory extends K{_button=null;static{w.registerClass({GTypeName:`AdwStorybookDialog`},DialogStory)}constructor(){super(K.fromMeta(DialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Hr,component:D.Dialog.$gtype}}initialize(){this._button=new h.Button({label:`Show dialog`,halign:h.Align.CENTER,valign:h.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 D.PreferencesGroup({title:`Appearance`});e.add(new D.SwitchRow({title:`Dark style`,subtitle:`Use a dark colour scheme`,active:!0}));let t=new D.PreferencesPage({title:`General`});t.add(e),new D.Dialog({title:this.args.title,child:t,presentation_mode:Wr[this.args.presentation]}).present(this)}updateArgs(e){}};w.type_ensure(Gr.$gtype);const Kr={stories:[Gr]},qr={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:i.TEXT,defaultValue:`smile`}]};var Jr=__exportAll({EmojiChooserStories:()=>Xr,EmojiChooserStory:()=>Yr}),Yr=class EmojiChooserStory extends K{_button=null;_entry=null;_chooser=null;static{w.registerClass({GTypeName:`AdwStorybookEmojiChooser`},EmojiChooserStory)}constructor(){super(K.fromMeta(EmojiChooserStory.getMetadata(),`Default`))}static getMetadata(){return{...qr,component:h.EmojiChooser.$gtype}}initialize(){this._entry=new h.Entry({placeholderText:`Type a message…`,halign:h.Align.CENTER}),this._entry.add_css_class(`card`),this._entry.hexpand=!0,this._chooser=h.EmojiChooser.new(),this._chooser.connect(`emoji-picked`,(e,t)=>{this._entry!==null&&this._entry.set_text(this._entry.get_text()+t)}),this._button=new h.Button({iconName:`face-smile-symbolic`,tooltipText:`Insert an emoji`,valign:h.Align.CENTER}),this._button.add_css_class(`flat`),this._button.add_css_class(`circular`),this._chooser.set_parent(this._button);let e=new h.Box({orientation:h.Orientation.HORIZONTAL,spacing:6});e.append(this._button),e.append(this._entry);let t=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,halign:h.Align.CENTER,valign:h.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 h.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)}};w.type_ensure(Yr.$gtype);const Xr={stories:[Yr]},Zr={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:i.TEXT,defaultValue:`Calculator`},{name:`version`,label:`Version`,type:i.TEXT,defaultValue:`48.1`},{name:`licenseType`,label:`License type`,type:i.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:i.BOOLEAN,defaultValue:!0}]};var Qr=__exportAll({GtkAboutDialogStories:()=>ti,GtkAboutDialogStory:()=>ei});const $r={unknown:h.License.UNKNOWN,custom:h.License.CUSTOM,"gpl-3-0":h.License.GPL_3_0,"mit-x11":h.License.MIT_X11,"bsd-3":h.License.BSD_3,"apache-2-0":h.License.APACHE_2_0,"0bsd":h.License[`0BSD`]};var ei=class GtkAboutDialogStory extends K{_button=null;static{w.registerClass({GTypeName:`AdwStorybookGtkAboutDialog`},GtkAboutDialogStory)}constructor(){super(K.fromMeta(GtkAboutDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Zr,component:h.AboutDialog.$gtype}}initialize(){this._button=new h.Button({label:`Show dialog`,halign:h.Align.CENTER,valign:h.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 h.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
338
+ \n${this._options.css??``}`);let t=f.Display.get_default();if(!t){console.error(`No display found`);return}h.StyleContext.add_provider_for_display(t,e,h.STYLE_PROVIDER_PRIORITY_APPLICATION)}_onActivate(){if(!this._window){this._window=new ge({application:this}),this._options.title&&this._window.set_title(this._options.title);try{this._window.populateSidebar(this._options.stories)}catch(e){console.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()}};S.type_ensure(_e.$gtype);function collectStoryModules(e){return collectStoryModules$1(e)}function buildGtkChrome(e){let t=new w.PreferencesPage,n=new w.PreferencesGroup,r=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,margin_top:12,margin_bottom:12,spacing:12,hexpand:!0});return r.add_css_class(`story-stage`),n.add(r),t.add(n),e.set_child(t),{root:e,hasStage:!0,setStageContent(e){let t=r.get_first_child();for(;t;)t.unparent(),t=r.get_first_child();r.append(e)},setChromeText(e,t){n.set_title(l.markup_escape_text(e,-1)),n.set_description(l.markup_escape_text(t,-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`)}},T=class StoryWidget extends w.Bin{static{S.registerClass({GTypeName:`StoryWidget`,Properties:{meta:S.ParamSpec.object(`meta`,`Meta`,`Story metadata`,S.ParamFlags.READWRITE,S.Object),story:S.ParamSpec.string(`story`,`Story Name`,`Story name`,S.ParamFlags.READWRITE,``),args:S.ParamSpec.object(`args`,`Args`,`Story arguments`,S.ParamFlags.READWRITE,S.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)}};S.type_ensure(T.$gtype);function isWindowsPath(e){return/^[A-Za-z]:[\\/]/.test(e)||e.startsWith(`\\\\`)}function lastPathSeparatorIndex(e){let t=e.lastIndexOf(`/`);return isWindowsPath(e)?Math.max(t,e.lastIndexOf(`\\`)):t}const ve={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 ve[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 E=/([^\s=/<>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;function parseAttributes(e){let t={};E.lastIndex=0;let n=E.exec(e);for(;n!==null;)n[1]in t||(t[n[1]]=decodeXmlEntities(n[2]??n[3]??``)),n=E.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 a=e.slice(r+1,i);if(n=i+1,a.charAt(0)===`/`){let e=a.slice(1).trim();e!==``&&t.push({kind:`close`,name:e});continue}let o=a,s=!1;o.endsWith(`/`)&&(s=!0,o=o.slice(0,-1));let c=/^([^\s/<>]+)/.exec(o);if(c===null)continue;let l=c[1];t.push({kind:`open`,name:l,attributes:parseAttributes(o.slice(l.length)),selfClosing:s})}return t}const ye={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`,a=r<t.length?t.charAt(r):`\0`;if((i===`-`||i===`\0`)&&(a===`-`||a===`\0`)&&n++,i===`\0`||a===`\0`)break;if(i!==a)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=``,a=n.indexOf(`@`);if(a>=0){let e=n.slice(a);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,a)}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 a=t;if(a.selfClosing){r.push({name:a.name,attributes:a.attributes,start:i+1,end:i+1}),i+=1;continue}let o=1,s=i+1;for(;s<n&&o>0;){let t=e[s];t.kind===`open`?t.selfClosing||(o+=1):t.kind===`close`&&--o,s+=1}let c=o===0?s-1:n;r.push({name:a.name,attributes:a.attributes,start:i+1,end:c}),i=o===0?s: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,a=0;for(let o=t.start;o<t.end;o++){let t=e[o];if(t.kind===`open`){let e=t,r=!e.selfClosing;if(r&&(a+=1),i>0)continue;e.name===`em`||e.name===`code`?n+=`<${e.name}>`:r&&(i=a)}else if(t.kind===`close`)i>0&&a===i?i=0:i===0&&(t.name===`em`||t.name===`code`)&&(n+=`</${t.name}>`),--a;else if(i===0){let e=``;for(let n of t.text){if(n===`
339
+ `||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`),a=0;for(let[e,t]of r){let r=localeScore(n,e);r>a&&(a=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{...ye};let a={...ye},o={value:null,score:0},s={value:null,score:0},c=[],l=null;for(let e of childElements(r,i.start,i.end))switch(e.name){case`id`:a.applicationId===null&&(a.applicationId=elementText(r,e));break;case`name`:considerTranslatable(o,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>s.score&&(lang(t)===`C`||e>1024)&&(s.score=e,s.value=elementText(r,t))}break;case`developer_name`:considerTranslatable(s,e,elementText(r,e),localeScore(n,lang(e)));break;case`url`:{let t=elementText(r,e);e.attributes.type===`homepage`?a.website=t:e.attributes.type===`bugtracker`?a.issueUrl=t:e.attributes.type===`help`&&(a.supportUrl=t);break}case`launchable`:e.attributes.type===`desktop-id`&&c.push(elementText(r,e));break;case`project_license`:a.license===null&&(a.license=elementText(r,e));break;case`releases`:l===null&&(l=e);break;default:break}if(a.applicationName=o.value,a.developerName=s.value,l!==null){let e=childElements(r,l.start,l.end).filter(e=>e.name===`release`);a.version=e[0]?.attributes.version??null;let i=t.releaseNotesVersion;if(i!==void 0&&i!==``){let t=e.find(e=>e.attributes.version===i),o=t&&childElements(r,t.start,t.end).find(e=>e.name===`description`);o&&(a.releaseNotes=parseDescription(r,o,n))}}a.applicationId!==null&&a.applicationId.endsWith(`.desktop`)&&(c.includes(`${a.applicationId}.desktop`)||(a.applicationId=a.applicationId.slice(0,-8)));for(let e of Object.keys(a))a[e]===``&&(a[e]=null);return a}const be={"GPL-2.0-or-later":h.License.GPL_2_0,"GPL-3.0-or-later":h.License.GPL_3_0,"LGPL-2.1-or-later":h.License.LGPL_2_1,"LGPL-3.0-or-later":h.License.LGPL_3_0,"BSD-2-Clause":h.License.BSD,MIT:h.License.MIT_X11,"Artistic-2.0":h.License.ARTISTIC,"GPL-2.0-only":h.License.GPL_2_0_ONLY,"GPL-3.0-only":h.License.GPL_3_0_ONLY,"LGPL-2.1-only":h.License.LGPL_2_1_ONLY,"LGPL-3.0-only":h.License.LGPL_3_0_ONLY,"AGPL-3.0-or-later":h.License.AGPL_3_0,"AGPL-3.0-only":h.License.AGPL_3_0_ONLY,"BSD-3-Clause":h.License.BSD_3,"Apache-2.0":h.License.APACHE_2_0,"MPL-2.0":h.License.MPL_2_0,"0BSD":h.License[`0BSD`],"GPL-2.0":h.License.GPL_2_0_ONLY,"GPL-3.0":h.License.GPL_3_0_ONLY};function licenseTypeFor(e){return be[e]??h.License.CUSTOM}function hasAppdataConstructor(e=w){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(e,t={}){let n=parseAppdata(e,{locale:t.locale??appdataLocale(l.get_language_names(),{LANG:l.getenv(`LANG`)??void 0}),releaseNotesVersion:t.releaseNotesVersion});return applyAppdataFields(new w.AboutDialog,n,t.releaseNotesVersion)}function resourceExists(e){try{return b.resources_get_info(e,b.ResourceLookupFlags.NONE),!0}catch{return!1}}function readResource(e){try{let t=b.resources_lookup_data(e,b.ResourceLookupFlags.NONE);return new TextDecoder().decode(t.toArray())}catch{return null}}function readFile(e){try{let[t,n]=l.file_get_contents(e);return t?new TextDecoder().decode(n):null}catch{return null}}let xe=!1;function createAboutDialog(e={}){let{appdataResource:t,appdataPath:n,releaseNotesVersion:r}=e,i=t!==void 0&&resourceExists(t),a;if(!e.forceParsedAppdata&&i&&hasAppdataConstructor())a=w.AboutDialog.new_from_appdata(t,r??``);else{let o=(i?readResource(t):null)??(n===void 0?null:readFile(n));o===null?(console.error(`@gjsify/adwaita-app: no AppStream metainfo found for the About dialog; looked at resource ${t??`(none given)`} and file ${n??`(none given)`}`),a=new w.AboutDialog):(!xe&&!e.forceParsedAppdata&&i&&(xe=!0,console.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.`)),a=buildAboutDialogFromAppdata(o,{releaseNotesVersion:r}))}return e.applicationIcon!==void 0&&(a.applicationIcon=e.applicationIcon),e.version!==void 0&&(a.version=e.version),a}function applyAboutLinks(e,t){for(let n of t??[])n.title&&n.url&&e.add_link(n.title,n.url)}function resolveIconDir(e={}){let t=nonEmpty(e.iconDir)??nonEmpty(e.env?.GJSIFY_ICON_DIR);if(t!==void 0)return t;if(!(e.startDir===void 0||e.isDirectory===void 0))return searchUp(e.startDir,e.isDirectory)}function bundleDirFromUrl(e){if(e===void 0||!e.startsWith(`file://`))return;let t=decodeURIComponent(new URL(e).pathname),n=lastPathSeparatorIndex(t);if(!(n<0))return n===0?`/`:t.slice(0,n)}function searchUp(e,t){let n=e;for(let e=0;e<6;e++){let e=`${n===`/`?``:n}/data/icons`;if(t(e))return e;let r=lastPathSeparatorIndex(n);if(r<=0){if(n===`/`)break;n=`/`}else n=n.slice(0,r)}}function nonEmpty(e){if(e===void 0)return;let t=e.trim();return t===``?void 0:t}`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 D=null;function registerBundledIconResource(){if(D)return D;let e=l.base64_decode(`R1ZhcmlhbnQAAAAAAAAAABgAAACkCQAAAAAAKFcAAAAAAAAAAQAAAAQAAAAFAAAABQAAAAUAAAAGAAAABgAAAAYAAAAIAAAACAAAAAkAAAALAAAACwAAAA0AAAANAAAADwAAAA8AAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGgAAABwAAAAeAAAAHwAAACIAAAAiAAAAIwAAACUAAAAlAAAAJQAAACYAAAAmAAAAJgAAACkAAAAqAAAALAAAACwAAAAtAAAALQAAAC0AAAAuAAAALgAAAC4AAAAvAAAAMQAAADQAAAA1AAAANwAAADkAAAA8AAAAPQAAAD8AAAA/AAAAQQAAAEIAAABDAAAARAAAAEQAAABEAAAARAAAAEUAAABFAAAARgAAAEYAAABGAAAARgAAAEYAAABGAAAARgAAAEcAAABLAAAASwAAAEsAAABLAAAASwAAAE4AAABRAAAAVAAAAFQAAABVAAAAVQAAAFYAAADiMb0uOgAAAKQJAAAUAHYAuAkAAMgKAAAWuDRtOgAAAMgKAAAhAHYA8AoAACcMAAAK8uYjOgAAACcMAAAYAHYAQAwAAF8NAADhERO1BgAAAF8NAAAHAEwAaA0AAHwNAADpf58XOgAAAHwNAAAYAHYAmA0AAMgOAAALfUj0OgAAAMgOAAAVAH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7fEOIVkMJdMxLFJHjl6l109dPzGIxHvWcNLUVauL8YRq9fls9jKC89KdmEzlaOax9pUYs7VgHik+uXIfqlmONkVQcmoSocamg7LxkmErIn1wEF5NiIBBik93J9HD9PZS/sCaUH0hjHdMoJ/EQW/Tn3fqvfft9vhc/hx6S831exfdvIn7L8BCyq1FQAodXVheSk=`);return D=b.Resource.new_from_data(new l.Bytes(e)),b.resources_register(D),D}function addBundledIconsToTheme(e){registerBundledIconResource(),e.add_resource_path(`/eu/jumplink/gjsify/adwaita-app/icons`)}function installBundledIconTheme(e={}){let t=e.prefer??`fallback`;if(t===`host`)return!1;let n=e.display===void 0?f.Display.get_default():e.display;return n?(addBundledIconsToTheme(h.IconTheme.get_for_display(n)),t===`bundled`&&h.Settings.get_for_display(n).set_property(`gtk-icon-theme-name`,`gjsify-adwaita-bundled`),!0):!1}function addAppIconDir(e,t,n={}){if(e.has_icon(t))return!1;let r=resolveIconDir({iconDir:n.iconDir,env:{GJSIFY_ICON_DIR:l.getenv(`GJSIFY_ICON_DIR`)??void 0},startDir:n.startDir??bundleDirFromUrl(import.meta.url),isDirectory:e=>l.file_test(e,l.FileTest.IS_DIR)});return r===void 0?!1:(e.add_search_path(r),!0)}var Se=class AdwaitaApp extends w.Application{static{S.registerClass({GTypeName:`GjsifyAdwaitaApp`},AdwaitaApp)}constructor(e){super({application_id:e.applicationId,flags:e.flags??b.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 b.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 b.SimpleAction({name:`about`});e.connect(`activate`,()=>this._showAbout()),this.add_action(e)}}_onStartup(){this._installBundledIcons(),this._installAppIcon(),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:{})}_installAppIcon(){let e=f.Display.get_default();e&&addAppIconDir(h.IconTheme.get_for_display(e),this._options.about?.applicationIcon??this._options.applicationId,{iconDir:this._options.iconDir})}_loadCss(e){let t=f.Display.get_default();if(!t){console.error(`@gjsify/adwaita-app: no default display; CSS not applied`);return}let n=new h.CssProvider;n.load_from_string(e),h.StyleContext.add_provider_for_display(t,n,h.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 w.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),applyAboutLinks(n,t.links),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&&console.error(`${e.applicationId??`This application`} is already running — brought the existing instance to the front instead of opening a second window.`),r}S.type_ensure(Se.$gtype);var Ce=class LoadingStack extends h.Stack{static{S.registerClass({GTypeName:`GjsifyLoadingStack`},LoadingStack)}constructor(e={}){super(e);let t=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,hexpand:!0,vexpand:!0});t.append(new w.Spinner),this.add_named(t,`loading`),this._content=new w.Bin({hexpand:!0,vexpand:!0}),this.add_named(this._content,`content`),this._error=new w.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`)}};S.type_ensure(Ce.$gtype);async function runStorybook(e){return runApplication(new _e(e),[t.programInvocationName,...t.programArgs])}const we={title:`Buttons/Button Content`,description:`Adw.ButtonContent — pairs a symbolic icon with a label inside a Gtk.Button.`,controls:[{name:`label`,label:`Label`,type:i.TEXT,defaultValue:`Download`},{name:`iconName`,label:`Icon`,type:i.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:i.BOOLEAN,defaultValue:!1}]};var Te=__exportAll({ButtonContentStories:()=>Ee,ButtonContentStory:()=>O}),O=class ButtonContentStory extends T{_content=null;_button=null;static{S.registerClass({GTypeName:`AdwStorybookButtonContent`},ButtonContentStory)}constructor(){super(T.fromMeta(ButtonContentStory.getMetadata(),`Default`))}static getMetadata(){return{...we,component:w.ButtonContent.$gtype}}initialize(){this._content=new w.ButtonContent({label:this.args.label,iconName:this.args.iconName,canShrink:this.args.canShrink}),this._button=new h.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)}};S.type_ensure(O.$gtype);const Ee={stories:[O]},De={title:`Buttons/Button Styles`,description:`Buttons with Adwaita style classes: .pill, .circular, .suggested-action, .destructive-action, .flat.`,controls:[{name:`label`,label:`Demo label`,type:i.TEXT,defaultValue:`Click me`},{name:`style`,label:`Demo style`,type:i.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 Oe=__exportAll({ButtonStylesStories:()=>Ae,ButtonStylesStory:()=>k});const ke=[`pill`,`circular`,`suggested-action`,`destructive-action`,`flat`];var k=class ButtonStylesStory extends T{_demo=null;static{S.registerClass({GTypeName:`AdwStorybookButtonStyles`},ButtonStylesStory)}constructor(){super(T.fromMeta(ButtonStylesStory.getMetadata(),`Default`))}static getMetadata(){return{...De,component:h.Button.$gtype}}initialize(){let e=new w.WrapBox({childSpacing:12,lineSpacing:12,halign:h.Align.CENTER}),t=new h.Button({label:`Pill`});t.add_css_class(`pill`),e.append(t);let n=new h.Button({iconName:`list-add-symbolic`});n.add_css_class(`circular`),e.append(n);let r=new h.Button({label:`Suggested`});r.add_css_class(`suggested-action`),e.append(r);let i=new h.Button({label:`Delete`});i.add_css_class(`destructive-action`),e.append(i);let a=new h.Button({label:`Flat`});a.add_css_class(`flat`),e.append(a),this._demo=new h.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 ke)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))}};S.type_ensure(k.$gtype);const Ae={stories:[k]},je={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:i.TEXT,defaultValue:`#3584e4`},{name:`title`,label:`Dialog title`,type:i.TEXT,defaultValue:`Choose a colour`}]};var Me=__exportAll({ColorDialogButtonStories:()=>Ne,ColorDialogButtonStory:()=>A}),A=class ColorDialogButtonStory extends T{_button=null;static{S.registerClass({GTypeName:`AdwStorybookColorDialogButton`},ColorDialogButtonStory)}constructor(){super(T.fromMeta(ColorDialogButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...je,component:h.ColorDialogButton.$gtype}}initialize(){this._button=new h.ColorDialogButton({halign:h.Align.CENTER}),this._button.dialog=new h.ColorDialog,this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){if(!this._button)return;let e=new f.RGBA;e.parse(this.args.rgba)&&(this._button.rgba=e),this._button.dialog.title=this.args.title||``}};S.type_ensure(A.$gtype);const Ne={stories:[A]},Pe=e(import.meta.url);let j;function load(){return j===void 0&&(j=Pe("@gjsify/node-gi/gi").requireGi(`Pango`,`1.0`)),j}var Fe=new Proxy(Object.create(null),{get(e,t){return load()[t]},has(e,t){return t in load()}});const Ie={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:i.TEXT,defaultValue:`Sans Bold 12`},{name:`level`,label:`Level`,type:i.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:i.BOOLEAN,defaultValue:!0},{name:`useSize`,label:`Draw in the size`,type:i.BOOLEAN,defaultValue:!0}]};var Le=__exportAll({FontDialogButtonStories:()=>Re,FontDialogButtonStory:()=>M}),M=class FontDialogButtonStory extends T{_button=null;static{S.registerClass({GTypeName:`AdwStorybookFontDialogButton`},FontDialogButtonStory)}constructor(){super(T.fromMeta(FontDialogButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Ie,component:h.FontDialogButton.$gtype}}initialize(){this._button=new h.FontDialogButton({halign:h.Align.CENTER}),this._button.dialog=new h.FontDialog,this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){if(!this._button)return;this._button.level=this.args.level;let e=Fe.FontDescription.from_string(this.args.fontDesc);e!==null&&(this._button.fontDesc=e),this._button.useFont=this.args.useFont,this._button.useSize=this.args.useSize}};S.type_ensure(M.$gtype);const Re={stories:[M]},ze={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:i.TEXT,defaultValue:`GNOME`},{name:`uri`,label:`URI`,type:i.TEXT,defaultValue:`https://gnome.org`},{name:`visited`,label:`Visited`,type:i.BOOLEAN,defaultValue:!1}]};var Be=__exportAll({LinkButtonStories:()=>Ve,LinkButtonStory:()=>N}),N=class LinkButtonStory extends T{_button=null;static{S.registerClass({GTypeName:`AdwStorybookLinkButton`},LinkButtonStory)}constructor(){super(T.fromMeta(LinkButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...ze,component:h.LinkButton.$gtype}}initialize(){this._button=new h.LinkButton({halign:h.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}};S.type_ensure(N.$gtype);const Ve={stories:[N]},He=[`Save as…`,`Export`,`Print`],Ue={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:i.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:i.TEXT,defaultValue:`Document`}]};var We=__exportAll({MenuButtonStories:()=>Ge,MenuButtonStory:()=>P}),P=class MenuButtonStory extends T{_widget=null;static{S.registerClass({GTypeName:`AdwStorybookMenuButton`},MenuButtonStory)}constructor(){super(T.fromMeta(MenuButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Ue,component:h.MenuButton.$gtype}}initialize(){this._widget=new h.MenuButton({halign:h.Align.CENTER}),this._apply(),this.addContent(this._widget)}updateArgs(e){this._apply()}_buildMenu(e){let t=new b.Menu;for(let e of He)t.append(e,`app.${e.toLowerCase().replace(/[^a-z]+/g,`-`)}`);let n=new b.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))}};S.type_ensure(P.$gtype);const Ge={stories:[P]},Ke=[`audio-volume-muted-symbolic`,`audio-volume-low-symbolic`,`audio-volume-high-symbolic`],qe={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:i.NUMBER,defaultValue:70},{name:`orientation`,label:`Orientation`,type:i.SELECT,options:[{label:`Vertical`,value:`vertical`},{label:`Horizontal`,value:`horizontal`}],defaultValue:`vertical`},{name:`hasFrame`,label:`Has frame`,type:i.BOOLEAN,defaultValue:!1}]};var Je=__exportAll({ScaleButtonStories:()=>Ye,ScaleButtonStory:()=>F}),F=class ScaleButtonStory extends T{_button=null;static{S.registerClass({GTypeName:`AdwStorybookScaleButton`},ScaleButtonStory)}constructor(){super(T.fromMeta(ScaleButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...qe,component:h.ScaleButton.$gtype}}initialize(){this._button=new h.ScaleButton({halign:h.Align.CENTER}),this._button.icons=Ke,this._apply(),this.addContent(this._button)}updateArgs(e){this._apply()}_apply(){this._button&&(this._button.orientation=this.args.orientation===`horizontal`?h.Orientation.HORIZONTAL:h.Orientation.VERTICAL,this._button.hasFrame=this.args.hasFrame,this._button.value=this.args.value)}};S.type_ensure(F.$gtype);const Ye={stories:[F]},Xe={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:i.TEXT,defaultValue:`Save`},{name:`iconName`,label:`Icon`,type:i.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`}]},Ze={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:i.TEXT,defaultValue:`Reply`},{name:`iconName`,label:`Icon`,type:i.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 Qe=__exportAll({SplitButtonFlatStory:()=>L,SplitButtonStories:()=>$e,SplitButtonStory:()=>I});function buildMenu(){let e=new b.Menu;return e.append(`Save as…`,`app.save-as`),e.append(`Export`,`app.export`),e.append(`Print`,`app.print`),e}var I=class SplitButtonStory extends T{_widget=null;static{S.registerClass({GTypeName:`AdwStorybookSplitButton`},SplitButtonStory)}constructor(){super(T.fromMeta(SplitButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Xe,component:w.SplitButton.$gtype}}initialize(){this._widget=new w.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}};S.type_ensure(I.$gtype);var L=class SplitButtonFlatStory extends T{_widget=null;static{S.registerClass({GTypeName:`AdwStorybookSplitButtonFlat`},SplitButtonFlatStory)}constructor(){super(T.fromMeta(SplitButtonFlatStory.getMetadata(),`Default`))}static getMetadata(){return{...Ze,component:w.SplitButton.$gtype}}initialize(){this._widget=new w.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}};S.type_ensure(L.$gtype);const $e={stories:[I,L]},et={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:i.TEXT,defaultValue:`Mute`},{name:`active`,label:`Active`,type:i.BOOLEAN,defaultValue:!1},{name:`flat`,label:`Flat`,type:i.BOOLEAN,defaultValue:!1}]};var tt=__exportAll({ToggleButtonStories:()=>nt,ToggleButtonStory:()=>R}),R=class ToggleButtonStory extends T{_button=null;static{S.registerClass({GTypeName:`AdwStorybookToggleButton`},ToggleButtonStory)}constructor(){super(T.fromMeta(ToggleButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...et,component:h.ToggleButton.$gtype}}initialize(){this._button=new h.ToggleButton({halign:h.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`))}};S.type_ensure(R.$gtype);const nt={stories:[R]},rt={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:i.SELECT,options:[{label:`List`,value:0},{label:`Grid`,value:1},{label:`Columns`,value:2}],defaultValue:0},{name:`style`,label:`Style`,type:i.SELECT,options:[{label:`Default`,value:`default`},{label:`Flat`,value:`flat`},{label:`Round`,value:`round`}],defaultValue:`default`}]};var it=__exportAll({ToggleGroupStories:()=>ot,ToggleGroupStory:()=>z});const at=[`flat`,`round`];var z=class ToggleGroupStory extends T{_toggleGroup=null;static{S.registerClass({GTypeName:`AdwStorybookToggleGroup`},ToggleGroupStory)}constructor(){super(T.fromMeta(ToggleGroupStory.getMetadata(),`Default`))}static getMetadata(){return{...rt,component:w.ToggleGroup.$gtype}}initialize(){this._toggleGroup=new w.ToggleGroup,this._toggleGroup.add(new w.Toggle({label:`List`,iconName:`view-list-symbolic`})),this._toggleGroup.add(new w.Toggle({label:`Grid`,iconName:`view-grid-symbolic`})),this._toggleGroup.add(new w.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 at)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))}};S.type_ensure(z.$gtype);const ot={stories:[z]},st={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:i.TEXT,defaultValue:`Enable networking`},{name:`checked`,label:`Checked`,type:i.BOOLEAN,defaultValue:!0},{name:`indeterminate`,label:`Indeterminate`,type:i.BOOLEAN,defaultValue:!1},{name:`disabled`,label:`Disabled`,type:i.BOOLEAN,defaultValue:!1}]};var ct=__exportAll({CheckButtonStories:()=>lt,CheckButtonStory:()=>B}),B=class CheckButtonStory extends T{_box=null;_button=null;static{S.registerClass({GTypeName:`AdwStorybookCheckButton`},CheckButtonStory)}constructor(){super(T.fromMeta(CheckButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...st,component:h.CheckButton.$gtype}}initialize(){this._button=new h.CheckButton,this._box=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,halign:h.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)}};S.type_ensure(B.$gtype);const lt={stories:[B]},ut=[`Automatic`,`Always`,`Never`,`When busy`],dt={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:i.SELECT,options:ut.map((e,t)=>({label:e,value:t})),defaultValue:0},{name:`enableSearch`,label:`Search field`,type:i.BOOLEAN,defaultValue:!1}]};var ft=__exportAll({DropDownStories:()=>pt,DropDownStory:()=>V}),V=class DropDownStory extends T{_dropDown=null;static{S.registerClass({GTypeName:`AdwStorybookDropDown`},DropDownStory)}constructor(){super(T.fromMeta(DropDownStory.getMetadata(),`Default`))}static getMetadata(){return{...dt,component:h.DropDown.$gtype}}initialize(){this._dropDown=h.DropDown.new_from_strings([...ut]),this._dropDown.expression=h.PropertyExpression.new(h.StringObject.$gtype,null,`string`),this._dropDown.halign=h.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)}};S.type_ensure(V.$gtype);const pt={stories:[V]},mt={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:i.TEXT,defaultValue:``},{name:`placeholder`,label:`Placeholder`,type:i.TEXT,defaultValue:`Search files…`},{name:`editable`,label:`Editable`,type:i.BOOLEAN,defaultValue:!0}]};var ht=__exportAll({EntryStories:()=>gt,EntryStory:()=>H}),H=class EntryStory extends T{_entry=null;static{S.registerClass({GTypeName:`AdwStorybookEntry`},EntryStory)}constructor(){super(T.fromMeta(EntryStory.getMetadata(),`Default`))}static getMetadata(){return{...mt,component:h.Entry.$gtype}}initialize(){this._entry=new h.Entry({widthRequest:280,halign:h.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)}};S.type_ensure(H.$gtype);const gt={stories:[H]},_t={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:i.RANGE,min:16,max:64,step:4,defaultValue:32},{name:`spinning`,label:`Spinning`,type:i.BOOLEAN,defaultValue:!0},{name:`disabled`,label:`Disabled`,type:i.BOOLEAN,defaultValue:!1}]};var vt=__exportAll({GtkSpinnerStories:()=>yt,GtkSpinnerStory:()=>U}),U=class GtkSpinnerStory extends T{_spinner=null;static{S.registerClass({GTypeName:`AdwStorybookGtkSpinner`},GtkSpinnerStory)}constructor(){super(T.fromMeta(GtkSpinnerStory.getMetadata(),`Default`))}static getMetadata(){return{..._t,component:h.Spinner.$gtype}}initialize(){this._spinner=new h.Spinner({halign:h.Align.CENTER,valign:h.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}};S.type_ensure(U.$gtype);const yt={stories:[U]},bt={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:i.RANGE,min:0,max:1,step:.05,defaultValue:.8},{name:`maxValue`,label:`Max value`,type:i.RANGE,min:1,max:5,step:1,defaultValue:5},{name:`mode`,label:`Mode`,type:i.SELECT,options:[{label:`Continuous`,value:`continuous`},{label:`Discrete`,value:`discrete`}],defaultValue:`continuous`},{name:`orientation`,label:`Orientation`,type:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`inverted`,label:`Inverted`,type:i.BOOLEAN,defaultValue:!1}]};var xt=__exportAll({LevelBarStories:()=>St,LevelBarStory:()=>W}),W=class LevelBarStory extends T{_box=null;_bar=null;static{S.registerClass({GTypeName:`AdwStorybookLevelBar`},LevelBarStory)}constructor(){super(T.fromMeta(LevelBarStory.getMetadata(),`Default`))}static getMetadata(){return{...bt,component:h.LevelBar.$gtype}}initialize(){this._bar=new h.LevelBar,this._box=new h.Box({halign:h.Align.CENTER,valign:h.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?h.Orientation.VERTICAL:h.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`?h.LevelBarMode.DISCRETE:h.LevelBarMode.CONTINUOUS,this._bar.value=this.args.value,this._bar.inverted=this.args.inverted}};S.type_ensure(W.$gtype);const St={stories:[W]},Ct={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:i.BOOLEAN,defaultValue:!0},{name:`placeholderText`,label:`Placeholder`,type:i.TEXT,defaultValue:`Password`},{name:`disabled`,label:`Disabled`,type:i.BOOLEAN,defaultValue:!1}]};var wt=__exportAll({PasswordEntryStories:()=>Tt,PasswordEntryStory:()=>G}),G=class PasswordEntryStory extends T{_entry=null;static{S.registerClass({GTypeName:`AdwStorybookPasswordEntry`},PasswordEntryStory)}constructor(){super(T.fromMeta(PasswordEntryStory.getMetadata(),`Default`))}static getMetadata(){return{...Ct,component:h.PasswordEntry.$gtype}}initialize(){this._entry=new h.PasswordEntry({showPeekIcon:!0,widthRequest:240,halign:h.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)}};S.type_ensure(G.$gtype);const Tt={stories:[G]},Et={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:i.RANGE,min:0,max:1,step:.05,defaultValue:.4},{name:`pulsing`,label:`Pulsing (indeterminate)`,type:i.BOOLEAN,defaultValue:!1},{name:`showText`,label:`Show text`,type:i.BOOLEAN,defaultValue:!0},{name:`inverted`,label:`Inverted`,type:i.BOOLEAN,defaultValue:!1},{name:`osd`,label:`OSD (hairline)`,type:i.BOOLEAN,defaultValue:!1}]};var Dt=__exportAll({ProgressBarStories:()=>Ot,ProgressBarStory:()=>K}),K=class ProgressBarStory extends T{_box=null;_bar=null;static{S.registerClass({GTypeName:`AdwStorybookProgressBar`},ProgressBarStory)}constructor(){super(T.fromMeta(ProgressBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Et,component:h.ProgressBar.$gtype}}initialize(){this._bar=new h.ProgressBar,this._box=new h.Box({spacing:12,halign:h.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`))}};S.type_ensure(K.$gtype);const Ot={stories:[K]},kt={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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`valuePos`,label:`Value position`,type:i.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:i.BOOLEAN,defaultValue:!0},{name:`digits`,label:`Digits`,type:i.NUMBER,defaultValue:0},{name:`inverted`,label:`Inverted`,type:i.BOOLEAN,defaultValue:!1},{name:`hasOrigin`,label:`Has origin`,type:i.BOOLEAN,defaultValue:!0},{name:`value`,label:`Value`,type:i.NUMBER,defaultValue:40}]};var At=__exportAll({ScaleStories:()=>jt,ScaleStory:()=>q}),q=class ScaleStory extends T{_scale=null;_adjustment=null;static{S.registerClass({GTypeName:`AdwStorybookScale`},ScaleStory)}constructor(){super(T.fromMeta(ScaleStory.getMetadata(),`Default`))}static getMetadata(){return{...kt,component:h.Scale.$gtype}}initialize(){this._adjustment=new h.Adjustment({value:40,lower:0,upper:100,stepIncrement:1,pageIncrement:10}),this._scale=new h.Scale({adjustment:this._adjustment,digits:0,drawValue:!0,widthRequest:260,valign:h.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`?h.Orientation.VERTICAL:h.Orientation.HORIZONTAL;let e={top:h.PositionType.TOP,bottom:h.PositionType.BOTTOM,left:h.PositionType.LEFT,right:h.PositionType.RIGHT};this._scale.value_pos=e[this.args.valuePos]??h.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)}};S.type_ensure(q.$gtype);const jt={stories:[q]},Mt={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:i.NUMBER,defaultValue:150},{name:`placeholderText`,label:`Placeholder`,type:i.TEXT,defaultValue:`Search…`},{name:`disabled`,label:`Disabled`,type:i.BOOLEAN,defaultValue:!1}]};var Nt=__exportAll({SearchEntryStories:()=>Pt,SearchEntryStory:()=>J}),J=class SearchEntryStory extends T{_entry=null;_label=null;_handler=0;static{S.registerClass({GTypeName:`AdwStorybookSearchEntry`},SearchEntryStory)}constructor(){super(T.fromMeta(SearchEntryStory.getMetadata(),`Default`))}static getMetadata(){return{...Mt,component:h.SearchEntry.$gtype}}initialize(){this._entry=new h.SearchEntry({widthRequest:260,halign:h.Align.CENTER}),this._label=new h.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 h.Box({orientation:h.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)}};S.type_ensure(J.$gtype);const Pt={stories:[J]},Ft={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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`digits`,label:`Digits`,type:i.NUMBER,defaultValue:0},{name:`numeric`,label:`Numeric`,type:i.BOOLEAN,defaultValue:!1},{name:`snapToTicks`,label:`Snap to ticks`,type:i.BOOLEAN,defaultValue:!1},{name:`wrap`,label:`Wrap`,type:i.BOOLEAN,defaultValue:!1},{name:`updatePolicy`,label:`Update policy`,type:i.SELECT,options:[{label:`Always`,value:`always`},{label:`If valid`,value:`if-valid`}],defaultValue:`always`},{name:`value`,label:`Value`,type:i.NUMBER,defaultValue:5}]};var It=__exportAll({SpinButtonStories:()=>Rt,SpinButtonStory:()=>Lt}),Lt=class SpinButtonStory extends T{_spin=null;_adjustment=null;static{S.registerClass({GTypeName:`AdwStorybookSpinButton`},SpinButtonStory)}constructor(){super(T.fromMeta(SpinButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Ft,component:h.SpinButton.$gtype}}initialize(){this._adjustment=new h.Adjustment({value:5,lower:0,upper:10,stepIncrement:1,pageIncrement:2}),this._spin=new h.SpinButton({adjustment:this._adjustment,digits:0,halign:h.Align.CENTER}),this._apply(),this.addContent(this._spin)}updateArgs(e){this._apply()}_apply(){!this._spin||!this._adjustment||(this._spin.orientation=this.args.orientation===`vertical`?h.Orientation.VERTICAL:h.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`?h.SpinButtonUpdatePolicy.IF_VALID:h.SpinButtonUpdatePolicy.ALWAYS,this._adjustment.set_value(this.args.value))}};S.type_ensure(Lt.$gtype);const Rt={stories:[Lt]},zt={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:i.BOOLEAN,defaultValue:!0},{name:`state`,label:`State (the backend)`,type:i.BOOLEAN,defaultValue:!0},{name:`disabled`,label:`Disabled`,type:i.BOOLEAN,defaultValue:!1}]};var Bt=__exportAll({SwitchStories:()=>Ht,SwitchStory:()=>Vt}),Vt=class SwitchStory extends T{_switch=null;static{S.registerClass({GTypeName:`AdwStorybookSwitch`},SwitchStory)}constructor(){super(T.fromMeta(SwitchStory.getMetadata(),`Default`))}static getMetadata(){return{...zt,component:h.Switch.$gtype}}initialize(){this._switch=new h.Switch({halign:h.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)}};S.type_ensure(Vt.$gtype);const Ht={stories:[Vt]},Ut={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:i.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:i.SELECT,options:[{label:`Copy`,value:`copy`},{label:`Move`,value:`move`}],defaultValue:`copy`}]};var Wt=__exportAll({DragIconStories:()=>Kt,DragIconStory:()=>Gt}),Gt=class DragIconStory extends T{_row=null;_source=null;_hint=null;static{S.registerClass({GTypeName:`AdwStorybookDragIcon`},DragIconStory)}constructor(){super(T.fromMeta(DragIconStory.getMetadata(),`Default`))}static getMetadata(){return{...Ut,component:h.DragIcon.$gtype}}initialize(){let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,halign:h.Align.CENTER,valign:h.Align.CENTER});this._hint=new h.Label({label:`Drag the row and watch the pointer`}),this._hint.add_css_class(`dim-label`),this._row=new h.Box({orientation:h.Orientation.HORIZONTAL,spacing:12,cssClasses:[`card`]}),this._row.append(this._buildLabel()),this._source=h.DragSource.new(),this._source.actions=this.args.actions===`move`?f.DragAction.MOVE:f.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`?f.DragAction.MOVE:f.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:f.ContentProvider.new_for_value(e)}_setIcon(e){let t=this._value(),n=h.DragIcon.get_for_drag(e),r=t===null?null:h.DragIcon.create_widget_for_value(t);n.set_child(r)}_buildLabel(){return new h.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`)}};S.type_ensure(Gt.$gtype);const Kt={stories:[Gt]},qt={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:i.RANGE,min:0,max:320,step:16,defaultValue:160},{name:`contentHeight`,label:`Content height`,type:i.RANGE,min:0,max:320,step:16,defaultValue:120},{name:`shape`,label:`Shape`,type:i.SELECT,options:[{label:`Circle`,value:`circle`},{label:`Grid`,value:`grid`},{label:`Crosshair`,value:`crosshair`}],defaultValue:`circle`}]};var Jt=__exportAll({DrawingAreaStories:()=>Xt,DrawingAreaStory:()=>Yt}),Yt=class DrawingAreaStory extends T{_box=null;_area=null;static{S.registerClass({GTypeName:`AdwStorybookDrawingArea`},DrawingAreaStory)}constructor(){super(T.fromMeta(DrawingAreaStory.getMetadata(),`Default`))}static getMetadata(){return{...qt,component:h.DrawingArea.$gtype}}initialize(){this._area=new h.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 h.Box({halign:h.Align.CENTER,valign:h.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)}};S.type_ensure(Yt.$gtype);const Xt={stories:[Yt]},Zt={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:i.BOOLEAN,defaultValue:!0},{name:`hasDepthBuffer`,label:`Depth buffer`,type:i.BOOLEAN,defaultValue:!1},{name:`allowedApis`,label:`Allowed APIs`,type:i.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:i.BOOLEAN,defaultValue:!0}]};var Qt=__exportAll({GLAreaStories:()=>en,GLAreaStory:()=>$t}),$t=class GLAreaStory extends T{_area=null;_readout=null;_box=null;_tick=0;_renders=0;_viewport=`—`;static{S.registerClass({GTypeName:`AdwStorybookGLArea`},GLAreaStory)}constructor(){super(T.fromMeta(GLAreaStory.getMetadata(),`Default`))}static getMetadata(){return{...Zt,component:h.GLArea.$gtype}}initialize(){this._area=new h.GLArea({widthRequest:240,heightRequest:160}),this._readout=new h.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 h.Box({orientation:h.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`?f.GLAPI.GLES:f.GLAPI.GL|f.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=l.timeout_add(l.PRIORITY_DEFAULT,33,()=>(this._area?.queue_render(),l.SOURCE_CONTINUE)))}_stop(){this._tick!==0&&(l.source_remove(this._tick),this._tick=0)}_refresh(){this._readout&&(this._readout.label=`viewport ${this._viewport} device px · ${this._renders} renders`)}};S.type_ensure($t.$gtype);const en={stories:[$t]},tn={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:i.SELECT,options:[{label:`Enabled (default)`,value:`enabled`},{label:`Disabled`,value:`disabled`}],defaultValue:`enabled`},{name:`blackBackground`,label:`Black background`,type:i.BOOLEAN,defaultValue:!1},{name:`child`,label:`Child`,type:i.SELECT,options:[{label:`Label`,value:`label`},{label:`Image`,value:`image`},{label:`Row of labels`,value:`box`}],defaultValue:`image`}]};var nn=__exportAll({GraphicsOffloadStories:()=>an,GraphicsOffloadStory:()=>rn}),rn=class GraphicsOffloadStory extends T{_offload=null;_box=null;static{S.registerClass({GTypeName:`AdwStorybookGraphicsOffload`},GraphicsOffloadStory)}constructor(){super(T.fromMeta(GraphicsOffloadStory.getMetadata(),`Default`))}static getMetadata(){return{...tn,component:h.GraphicsOffload.$gtype}}initialize(){this._offload=new h.GraphicsOffload({widthRequest:280,heightRequest:96}),this._offload.enabled=+(this.args.enabled===`disabled`),this._offload.black_background=this.args.blackBackground,this._box=new h.Box({halign:h.Align.CENTER,valign:h.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 h.Label({label:`The child of an offloaded layer`});break;case`box`:{let t=new h.Box({orientation:h.Orientation.HORIZONTAL,spacing:12});for(let e of[`One`,`Two`,`Three`])t.append(new h.Label({label:e}));e=new h.CenterBox,e.set_center_widget(t);break}default:e=new h.Image({iconName:`camera-photo-symbolic`,pixelSize:48});break}this._offload.child=e}};S.type_ensure(rn.$gtype);const an={stories:[rn]},on={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:i.TEXT,defaultValue:`Adwaita Storybook`},{name:`version`,label:`Version`,type:i.TEXT,defaultValue:`0.11.0`}]};var sn=__exportAll({AboutDialogStories:()=>ln,AboutDialogStory:()=>cn}),cn=class AboutDialogStory extends T{_button=null;static{S.registerClass({GTypeName:`AdwStorybookAboutDialog`},AboutDialogStory)}constructor(){super(T.fromMeta(AboutDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...on,component:w.AboutDialog.$gtype}}initialize(){this._button=new h.Button({label:`Show dialog`,halign:h.Align.CENTER,valign:h.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 w.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:h.License.MIT_X11,developers:[`Ada Lovelace`,`Grace Hopper`],designers:[`Margaret Hamilton`],copyright:`© 2026 The GJSify Project`}).present(this)}updateArgs(e){}};S.type_ensure(cn.$gtype);const ln={stories:[cn]},un={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:i.TEXT,defaultValue:`Delete Project?`},{name:`body`,label:`Body`,type:i.TEXT,defaultValue:`This will permanently remove the project and all of its files. This action cannot be undone.`}]};var dn=__exportAll({AlertDialogStories:()=>pn,AlertDialogStory:()=>fn}),fn=class AlertDialogStory extends T{_button=null;static{S.registerClass({GTypeName:`AdwStorybookAlertDialog`},AlertDialogStory)}constructor(){super(T.fromMeta(AlertDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...un,component:w.AlertDialog.$gtype}}initialize(){this._button=new h.Button({label:`Show dialog`,halign:h.Align.CENTER,valign:h.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 w.AlertDialog({heading:this.args.heading,body:this.args.body});e.add_response(`cancel`,`Cancel`),e.add_response(`delete`,`Delete`),e.set_response_appearance(`delete`,w.ResponseAppearance.DESTRUCTIVE),e.set_default_response(`cancel`),e.set_close_response(`cancel`),e.present(this)}updateArgs(e){}};S.type_ensure(fn.$gtype);const pn={stories:[fn]},mn={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:i.TEXT,defaultValue:`Preferences`},{name:`presentation`,label:`Presentation`,type:i.SELECT,options:[{label:`Auto`,value:`auto`},{label:`Floating`,value:`floating`},{label:`Bottom sheet`,value:`bottom-sheet`}],defaultValue:`auto`}]};var hn=__exportAll({DialogStories:()=>vn,DialogStory:()=>_n});const gn={auto:w.DialogPresentationMode.AUTO,floating:w.DialogPresentationMode.FLOATING,"bottom-sheet":w.DialogPresentationMode.BOTTOM_SHEET};var _n=class DialogStory extends T{_button=null;static{S.registerClass({GTypeName:`AdwStorybookDialog`},DialogStory)}constructor(){super(T.fromMeta(DialogStory.getMetadata(),`Default`))}static getMetadata(){return{...mn,component:w.Dialog.$gtype}}initialize(){this._button=new h.Button({label:`Show dialog`,halign:h.Align.CENTER,valign:h.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 w.PreferencesGroup({title:`Appearance`});e.add(new w.SwitchRow({title:`Dark style`,subtitle:`Use a dark colour scheme`,active:!0}));let t=new w.PreferencesPage({title:`General`});t.add(e),new w.Dialog({title:this.args.title,child:t,presentation_mode:gn[this.args.presentation]}).present(this)}updateArgs(e){}};S.type_ensure(_n.$gtype);const vn={stories:[_n]},yn={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:i.TEXT,defaultValue:`smile`}]};var bn=__exportAll({EmojiChooserStories:()=>Sn,EmojiChooserStory:()=>xn}),xn=class EmojiChooserStory extends T{_button=null;_entry=null;_chooser=null;static{S.registerClass({GTypeName:`AdwStorybookEmojiChooser`},EmojiChooserStory)}constructor(){super(T.fromMeta(EmojiChooserStory.getMetadata(),`Default`))}static getMetadata(){return{...yn,component:h.EmojiChooser.$gtype}}initialize(){this._entry=new h.Entry({placeholderText:`Type a message…`,halign:h.Align.CENTER}),this._entry.add_css_class(`card`),this._entry.hexpand=!0,this._chooser=h.EmojiChooser.new(),this._chooser.connect(`emoji-picked`,(e,t)=>{this._entry!==null&&this._entry.set_text(this._entry.get_text()+t)}),this._button=new h.Button({iconName:`face-smile-symbolic`,tooltipText:`Insert an emoji`,valign:h.Align.CENTER}),this._button.add_css_class(`flat`),this._button.add_css_class(`circular`),this._chooser.set_parent(this._button);let e=new h.Box({orientation:h.Orientation.HORIZONTAL,spacing:6});e.append(this._button),e.append(this._entry);let t=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,halign:h.Align.CENTER,valign:h.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 h.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)}};S.type_ensure(xn.$gtype);const Sn={stories:[xn]},Cn={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:i.TEXT,defaultValue:`Calculator`},{name:`version`,label:`Version`,type:i.TEXT,defaultValue:`48.1`},{name:`licenseType`,label:`License type`,type:i.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:i.BOOLEAN,defaultValue:!0}]};var wn=__exportAll({GtkAboutDialogStories:()=>Dn,GtkAboutDialogStory:()=>En});const Tn={unknown:h.License.UNKNOWN,custom:h.License.CUSTOM,"gpl-3-0":h.License.GPL_3_0,"mit-x11":h.License.MIT_X11,"bsd-3":h.License.BSD_3,"apache-2-0":h.License.APACHE_2_0,"0bsd":h.License[`0BSD`]};var En=class GtkAboutDialogStory extends T{_button=null;static{S.registerClass({GTypeName:`AdwStorybookGtkAboutDialog`},GtkAboutDialogStory)}constructor(){super(T.fromMeta(GtkAboutDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Cn,component:h.AboutDialog.$gtype}}initialize(){this._button=new h.Button({label:`Show dialog`,halign:h.Align.CENTER,valign:h.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 h.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
340
340
  glibc 2.42
341
- Built with meson 1.6`}),t=$r[this.args.licenseType]??h.License.UNKNOWN;t===h.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
342
- Katherine Johnson`),e.add_credit_section(`Reviewed by`,[`Tony Hoare <tony@example.org>`])),e.present()}updateArgs(e){}};w.type_ensure(ei.$gtype);const ti={stories:[ei]},ni={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:i.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:i.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 ri=__exportAll({PageSetupUnixDialogStories:()=>si,PageSetupUnixDialogStory:()=>ai});const ii={portrait:h.PageOrientation.PORTRAIT,landscape:h.PageOrientation.LANDSCAPE,"reverse-portrait":h.PageOrientation.REVERSE_PORTRAIT,"reverse-landscape":h.PageOrientation.REVERSE_LANDSCAPE};var ai=class PageSetupUnixDialogStory extends K{_button=null;static{w.registerClass({GTypeName:`AdwStorybookPageSetupUnixDialog`},PageSetupUnixDialogStory)}constructor(){super(K.fromMeta(PageSetupUnixDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...ni,component:h.PageSetupUnixDialog.$gtype}}initialize(){this._button=new h.Button({label:`Page Setup…`,halign:h.Align.CENTER,valign:h.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=h.PageSetupUnixDialog.new(`Page Setup`,null),t=new h.PageSetup;t.set_paper_size_and_default_margins(h.PaperSize.new(this.args.paperSize)),t.set_orientation(ii[this.args.orientation]??h.PageOrientation.PORTRAIT),e.set_page_setup(t),e.present()}updateArgs(e){}};const oi=`PageSetupUnixDialog`in h;oi&&w.type_ensure(ai.$gtype);const si={stories:[ai].filter(()=>oi)},ci={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:i.TEXT,defaultValue:`General`},{name:`groupTitle`,label:`Group title`,type:i.TEXT,defaultValue:`Appearance`}]};var li=__exportAll({PreferencesDialogStories:()=>di,PreferencesDialogStory:()=>ui}),ui=class PreferencesDialogStory extends K{_button=null;static{w.registerClass({GTypeName:`AdwStorybookPreferencesDialog`},PreferencesDialogStory)}constructor(){super(K.fromMeta(PreferencesDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...ci,component:D.PreferencesDialog.$gtype}}initialize(){this._button=new h.Button({label:`Show dialog`,halign:h.Align.CENTER,valign:h.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 D.PreferencesDialog,t=new D.PreferencesPage({title:this.args.pageTitle,iconName:`preferences-system-symbolic`}),n=new D.PreferencesGroup({title:this.args.groupTitle,description:`Control how the application looks and behaves.`});n.add(new D.SwitchRow({title:`Dark style`,subtitle:`Use a dark colour scheme`,active:!0})),n.add(new D.ComboRow({title:`Accent colour`,model:new h.StringList({strings:[`Blue`,`Teal`,`Green`,`Orange`,`Purple`]}),selected:0})),n.add(new D.SpinRow({title:`Font size`,adjustment:new h.Adjustment({lower:8,upper:24,value:12,stepIncrement:1,pageIncrement:4})})),t.add(n),e.add(t),e.present(this)}updateArgs(e){}};w.type_ensure(ui.$gtype);const di={stories:[ui]},fi={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:i.TEXT,defaultValue:`copies|collate|reverse|scale|preview|page-set`},{name:`range`,label:`Range`,type:i.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:i.NUMBER,defaultValue:2}]};var pi=__exportAll({PrintUnixDialogStories:()=>gi,PrintUnixDialogStory:()=>mi});const capabilities=()=>({collate:h.PrintCapabilities.COLLATE,copies:h.PrintCapabilities.COPIES,"generate-pdf":h.PrintCapabilities.GENERATE_PDF,"generate-ps":h.PrintCapabilities.GENERATE_PS,"number-up":h.PrintCapabilities.NUMBER_UP,"number-up-layout":h.PrintCapabilities.NUMBER_UP_LAYOUT,"page-set":h.PrintCapabilities.PAGE_SET,preview:h.PrintCapabilities.PREVIEW,reverse:h.PrintCapabilities.REVERSE,scale:h.PrintCapabilities.SCALE});var mi=class PrintUnixDialogStory extends K{_button=null;static{w.registerClass({GTypeName:`AdwStorybookPrintUnixDialog`},PrintUnixDialogStory)}constructor(){super(K.fromMeta(PrintUnixDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...fi,component:h.PrintUnixDialog.$gtype}}initialize(){this._button=new h.Button({label:`Print…`,halign:h.Align.CENTER,valign:h.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=h.PrintUnixDialog.new(`Print`,null),t=capabilities(),n=String(this.args.capabilities).split(`|`).map(e=>t[e.trim()]??0).reduce((e,t)=>e|t,0);e.set_manual_capabilities(n),e.set_current_page(2),e.set_support_selection(!0),e.set_has_selection(!0);let r=new h.PrintSettings;r.set_n_copies(Number(this.args.copies)),r.set_collate(this.args.range===`all`),r.set_print_pages(this.args.range===`current`?h.PrintPages.CURRENT:h.PrintPages.ALL),e.set_settings(r),e.present()}updateArgs(e){}};const hi=`PrintUnixDialog`in h;hi&&w.type_ensure(mi.$gtype);const gi={stories:[mi].filter(()=>hi)},_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:i.TEXT,defaultValue:`Keyboard Shortcuts`}]};var vi=__exportAll({ShortcutsDialogStories:()=>bi,ShortcutsDialogStory:()=>yi}),yi=class ShortcutsDialogStory extends K{_button=null;static{w.registerClass({GTypeName:`AdwStorybookShortcutsDialog`},ShortcutsDialogStory)}constructor(){super(K.fromMeta(ShortcutsDialogStory.getMetadata(),`Default`))}static getMetadata(){return{..._i,component:D.ShortcutsDialog.$gtype}}initialize(){this._button=new h.Button({label:`Show dialog`,halign:h.Align.CENTER,valign:h.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 D.ShortcutsSection({title:`General`});e.add(new D.ShortcutsItem({title:`Open Menu`,accelerator:`F10`})),e.add(new D.ShortcutsItem({title:`Preferences`,action_name:`app.preferences`})),e.add(new D.ShortcutsItem({title:`Quit`,accelerator:`<Control>q`}));let t=new D.ShortcutsSection;t.add(new D.ShortcutsItem({title:`Move Tab Left`,accelerator:`<Shift><Control>Page_Up`,direction:h.TextDirection.LTR})),t.add(new D.ShortcutsItem({title:`Move Tab Left`,accelerator:`<Shift><Control>Page_Up`,direction:h.TextDirection.RTL}));let n=new D.ShortcutsDialog({title:this.args.title});n.add(e),n.add(t),n.present(this)}updateArgs(e){}};w.type_ensure(yi.$gtype);const bi={stories:[yi]},xi={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:i.TEXT,defaultValue:`File moved to Trash`},{name:`timeout`,label:`Timeout (s)`,type:i.NUMBER,min:0,max:10,step:1,defaultValue:3},{name:`hasButton`,label:`Action button`,type:i.BOOLEAN,defaultValue:!0},{name:`buttonLabel`,label:`Button label`,type:i.TEXT,defaultValue:`Undo`}]};var Si=__exportAll({ToastStories:()=>wi,ToastStory:()=>Ci}),Ci=class ToastStory extends K{_overlay=null;static{w.registerClass({GTypeName:`AdwStorybookToast`},ToastStory)}constructor(){super(K.fromMeta(ToastStory.getMetadata(),`Default`))}static getMetadata(){return{...xi,component:D.Toast.$gtype}}initialize(){let e=new h.Button({label:`Show toast`,halign:h.Align.CENTER,valign:h.Align.CENTER});e.add_css_class(`pill`),e.add_css_class(`suggested-action`),e.connect(`clicked`,()=>this._showToast()),this._overlay=new D.ToastOverlay({child:e,widthRequest:360,heightRequest:220}),this.addContent(this._overlay)}_showToast(){if(!this._overlay)return;let e=new D.Toast({title:this.args.title,timeout:this.args.timeout});this.args.hasButton&&(e.buttonLabel=this.args.buttonLabel),this._overlay.add_toast(e)}updateArgs(e){}};w.type_ensure(Ci.$gtype);const wi={stories:[Ci]},Ti={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:i.TEXT,defaultValue:`Text Editor`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`notes.md`},{name:`showMenubar`,label:`Show menubar`,type:i.BOOLEAN,defaultValue:!0}]};var Ei=__exportAll({ApplicationWindowStories:()=>Oi,ApplicationWindowStory:()=>Di}),Di=class ApplicationWindowStory extends K{_window=null;_title=null;_toolbarView=null;_menubar=null;static{w.registerClass({GTypeName:`AdwStorybookApplicationWindow`},ApplicationWindowStory)}constructor(){super(K.fromMeta(ApplicationWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...Ti,component:D.ApplicationWindow.$gtype}}initialize(){this._title=new D.WindowTitle({title:this.args.title,subtitle:this.args.subtitle});let e=new D.HeaderBar({titleWidget:this._title,widthRequest:460}),t=new h.Button({iconName:`go-previous-symbolic`});t.add_css_class(`flat`),e.pack_start(t),this._toolbarView=new D.ToolbarView,this._toolbarView.add_top_bar(e),this._toolbarView.content=new D.StatusPage({title:`Your Library`,description:`Content sits between the toolbars and scrolls independently of them.`});let n=new x.Menu,r=new x.Menu;r.append(`New Window`,`app.new-window`),r.append(`Quit`,`app.quit`),n.append_section(null,r);let i=new x.Menu;i.append(`Keyboard Shortcuts`,`app.shortcuts`),i.append(`About`,`app.about`),n.append_section(null,i),this._menubar=new h.PopoverMenuBar({menu_model:n}),this.args.showMenubar&&this._toolbarView.add_top_bar(this._menubar),this._window=new D.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)}};w.type_ensure(Di.$gtype);const Oi={stories:[Di]},ki={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:i.RANGE,min:.5,max:3,step:.25,defaultValue:2},{name:`xalign`,label:`Xalign`,type:i.RANGE,min:0,max:1,step:.5,defaultValue:.5},{name:`yalign`,label:`Yalign`,type:i.RANGE,min:0,max:1,step:.5,defaultValue:.5},{name:`obeyChild`,label:`Obey child`,type:i.BOOLEAN,defaultValue:!1}]};var Ai=__exportAll({AspectFrameStories:()=>Mi,AspectFrameStory:()=>ji}),ji=class AspectFrameStory extends K{_frame=null;static{w.registerClass({GTypeName:`AdwStorybookAspectFrame`},AspectFrameStory)}constructor(){super(K.fromMeta(AspectFrameStory.getMetadata(),`Default`))}static getMetadata(){return{...ki,component:h.AspectFrame.$gtype}}initialize(){this._frame=new h.AspectFrame({hexpand:!0,valign:h.Align.CENTER,width_request:320,height_request:180});let e=new h.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)}};w.type_ensure(ji.$gtype);const Mi={stories:[ji]},Ni={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:i.TEXT,defaultValue:`The one child of this bin.`},{name:`swap`,label:`Replace the child`,type:i.BOOLEAN,defaultValue:!1}]};var Pi=__exportAll({BinStories:()=>Ii,BinStory:()=>Fi}),Fi=class BinStory extends K{_bin=null;static{w.registerClass({GTypeName:`AdwStorybookBin`},BinStory)}constructor(){super(K.fromMeta(BinStory.getMetadata(),`Default`))}static getMetadata(){return{...Ni,component:D.Bin.$gtype}}initialize(){this._bin=new D.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 h.Label({label:e?`The first child was replaced, not stacked.`:this.args.label,wrap:!0,marginTop:18,marginBottom:18,marginStart:18,marginEnd:18}),n=new h.Box;n.add_css_class(`card`),n.append(t),this._bin.child=n}};w.type_ensure(Fi.$gtype);const Ii={stories:[Fi]},Li={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:i.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:i.TEXT,defaultValue:`Narrow`},{name:`wideLabel`,label:`Wide label`,type:i.TEXT,defaultValue:`Wide`}]};var Ri=__exportAll({BreakpointBinStories:()=>Bi,BreakpointBinStory:()=>zi}),zi=class BreakpointBinStory extends K{_bin=null;_label=null;_breakpoint=null;static{w.registerClass({GTypeName:`AdwStorybookBreakpointBin`},BreakpointBinStory)}constructor(){super(K.fromMeta(BreakpointBinStory.getMetadata(),`Default`))}static getMetadata(){return{...Li,component:D.BreakpointBin.$gtype}}initialize(){this._label=new h.Label({label:this.args.wideLabel,ellipsize:3}),this._label.add_css_class(`title-1`),this._bin=new D.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=D.BreakpointCondition.parse(this.args.condition);e!==null&&(this._breakpoint!==null&&this._bin.remove_breakpoint(this._breakpoint),this._breakpoint=D.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)}};w.type_ensure(zi.$gtype);const Bi={stories:[zi]},Vi={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:i.BOOLEAN,defaultValue:!0},{name:`baselinePosition`,label:`Baseline position`,type:i.SELECT,options:[{label:`Top`,value:`top`},{label:`Center`,value:`center`},{label:`Bottom`,value:`bottom`}],defaultValue:`center`}]};var Hi=__exportAll({CenterBoxStories:()=>Gi,CenterBoxStory:()=>Wi});const Ui={top:h.BaselinePosition.TOP,center:h.BaselinePosition.CENTER,bottom:h.BaselinePosition.BOTTOM};var Wi=class CenterBoxStory extends K{_box=null;static{w.registerClass({GTypeName:`AdwStorybookCenterBox`},CenterBoxStory)}constructor(){super(K.fromMeta(CenterBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...Vi,component:h.CenterBox.$gtype}}initialize(){this._box=new h.CenterBox({margin_top:12,margin_bottom:12,margin_start:12,margin_end:12}),this._box.set_start_widget(new h.Label({label:`Start`,hexpand:!1})),this._box.set_center_widget(new h.Label({label:`Centre`,hexpand:!0})),this._box.set_end_widget(new h.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=Ui[this.args.baselinePosition])}};w.type_ensure(Wi.$gtype);const Gi={stories:[Wi]},Ki={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:i.RANGE,min:200,max:600,step:10,defaultValue:400},{name:`tighteningThreshold`,label:`Tightening threshold`,type:i.RANGE,min:100,max:600,step:10,defaultValue:300}]};var qi=__exportAll({ClampScrollableStories:()=>Xi,ClampScrollableStory:()=>Yi});const Ji=Array.from({length:24},(e,t)=>`Line ${t+1}: held at the clamp's width while it scrolls.`);var Yi=class ClampScrollableStory extends K{_clamp=null;static{w.registerClass({GTypeName:`AdwStorybookClampScrollable`},ClampScrollableStory)}constructor(){super(K.fromMeta(ClampScrollableStory.getMetadata(),`Default`))}static getMetadata(){return{...Ki,component:D.ClampScrollable.$gtype}}initialize(){let e=new h.TextView({editable:!1,cursorVisible:!1,topMargin:12,bottomMargin:12});e.buffer.set_text(Ji.join(`
343
- `),-1),this._clamp=new D.ClampScrollable({maximumSize:this.args.maximumSize,tighteningThreshold:this.args.tighteningThreshold,child:e});let t=new h.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)}};w.type_ensure(Yi.$gtype);const Xi={stories:[Yi]},Zi={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:i.RANGE,min:200,max:600,step:10,defaultValue:400},{name:`tighteningThreshold`,label:`Tightening threshold`,type:i.RANGE,min:100,max:600,step:10,defaultValue:300}]};var Qi=__exportAll({ClampStories:()=>ea,ClampStory:()=>$i}),$i=class ClampStory extends K{_clamp=null;static{w.registerClass({GTypeName:`AdwStorybookClamp`},ClampStory)}constructor(){super(K.fromMeta(ClampStory.getMetadata(),`Default`))}static getMetadata(){return{...Zi,component:D.Clamp.$gtype}}initialize(){let e=new h.Box({orientation:h.Orientation.HORIZONTAL,widthRequest:520});e.add_css_class(`card`);let t=new h.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 D.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)}};w.type_ensure($i.$gtype);const ea={stories:[$i]},ta={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:i.BOOLEAN,defaultValue:!1},{name:`useUnderline`,label:`Label marks a mnemonic`,type:i.BOOLEAN,defaultValue:!1},{name:`label`,label:`Label`,type:i.TEXT,defaultValue:`_More options`},{name:`resizeToplevel`,label:`Resize the toplevel`,type:i.BOOLEAN,defaultValue:!1}]};var na=__exportAll({ExpanderStories:()=>ia,ExpanderStory:()=>ra}),ra=class ExpanderStory extends K{_expander=null;static{w.registerClass({GTypeName:`AdwStorybookExpander`},ExpanderStory)}constructor(){super(K.fromMeta(ExpanderStory.getMetadata(),`Default`))}static getMetadata(){return{...ta,component:h.Expander.$gtype}}initialize(){let e=new h.Box({orientation:h.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 h.Label({label:t}));this._expander=new h.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)}};w.type_ensure(ra.$gtype);const ia={stories:[ra]},aa={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:i.RANGE,min:0,max:80,step:4,defaultValue:24},{name:`offsetY`,label:`Offset y`,type:i.RANGE,min:0,max:80,step:4,defaultValue:16}]};var oa=__exportAll({FixedStories:()=>ca,FixedStory:()=>sa}),sa=class FixedStory extends K{_fixed=null;_first=null;_second=null;static{w.registerClass({GTypeName:`AdwStorybookFixed`},FixedStory)}constructor(){super(K.fromMeta(FixedStory.getMetadata(),`Default`))}static getMetadata(){return{...aa,component:h.Fixed.$gtype}}initialize(){this._fixed=new h.Fixed,this._first=new h.Label({label:`at (x, y)`}),this._second=new h.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)}};w.type_ensure(sa.$gtype);const ca={stories:[sa]},la={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:i.TEXT,defaultValue:`Details`},{name:`labelXalign`,label:`Label xalign`,type:i.RANGE,defaultValue:0,min:0,max:1,step:.5}]};var ua=__exportAll({FrameStories:()=>fa,FrameStory:()=>da}),da=class FrameStory extends K{_frame=null;static{w.registerClass({GTypeName:`AdwStorybookFrame`},FrameStory)}constructor(){super(K.fromMeta(FrameStory.getMetadata(),`Default`))}static getMetadata(){return{...la,component:h.Frame.$gtype}}initialize(){this._frame=new h.Frame({halign:h.Align.CENTER});let e=new h.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))}};w.type_ensure(da.$gtype);const fa={stories:[da]},pa={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:i.RANGE,min:0,max:36,step:2,defaultValue:12},{name:`rowSpacing`,label:`Row spacing`,type:i.RANGE,min:0,max:36,step:2,defaultValue:12},{name:`columnHomogeneous`,label:`Column homogeneous`,type:i.BOOLEAN,defaultValue:!1},{name:`rowHomogeneous`,label:`Row homogeneous`,type:i.BOOLEAN,defaultValue:!1},{name:`orientation`,label:`Orientation`,type:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`}]};var ma=__exportAll({GridStories:()=>ga,GridStory:()=>ha}),ha=class GridStory extends K{_grid=null;_cells=[];_orientation=null;static{w.registerClass({GTypeName:`AdwStorybookGrid`},GridStory)}constructor(){super(K.fromMeta(GridStory.getMetadata(),`Default`))}static getMetadata(){return{...pa,component:h.Grid.$gtype}}initialize(){this._grid=new h.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 h.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`?h.Orientation.VERTICAL:h.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}};w.type_ensure(ha.$gtype);const ga={stories:[ha]},_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:i.TEXT,defaultValue:`Text Editor`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`notes.md`},{name:`showTitle`,label:`Show title`,type:i.BOOLEAN,defaultValue:!0}]};var va=__exportAll({HeaderBarStories:()=>ba,HeaderBarStory:()=>ya}),ya=class HeaderBarStory extends K{_headerBar=null;_title=null;static{w.registerClass({GTypeName:`AdwStorybookHeaderBar`},HeaderBarStory)}constructor(){super(K.fromMeta(HeaderBarStory.getMetadata(),`Default`))}static getMetadata(){return{..._a,component:D.HeaderBar.$gtype}}initialize(){this._title=new D.WindowTitle({title:this.args.title,subtitle:this.args.subtitle}),this._headerBar=new D.HeaderBar({titleWidget:this._title,showTitle:this.args.showTitle,widthRequest:460});let e=new h.Button({iconName:`go-previous-symbolic`});e.add_css_class(`flat`),this._headerBar.pack_start(e);let t=new x.Menu;t.append(`New Window`,`app.new-window`),t.append(`Preferences`,`app.preferences`),t.append(`About`,`app.about`);let n=new h.MenuButton({iconName:`open-menu-symbolic`,menuModel:t});n.add_css_class(`flat`),this._headerBar.pack_end(n),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)}};w.type_ensure(ya.$gtype);const ba={stories:[ya]},xa={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:i.TEXT,defaultValue:`Inbox`},{name:`visible`,label:`Child visible`,type:i.BOOLEAN,defaultValue:!0}]};var Sa=__exportAll({LayoutSlotStories:()=>wa,LayoutSlotStory:()=>Ca}),Ca=class LayoutSlotStory extends K{_view=null;_slot=null;_child=null;static{w.registerClass({GTypeName:`AdwStorybookLayoutSlot`},LayoutSlotStory)}constructor(){super(K.fromMeta(LayoutSlotStory.getMetadata(),`Default`))}static getMetadata(){return{...xa,component:D.LayoutSlot.$gtype}}initialize(){this._slot=D.LayoutSlot.new(`primary`),this._child=new D.NavigationPage({title:this.args.label,tag:`primary`,child:new h.Label({label:`The child the view inserted here.`})}),this._view=new D.MultiLayoutView;let e=D.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)}};w.type_ensure(Ca.$gtype);const wa={stories:[Ca]},Ta={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:i.SELECT,options:[{label:`wide (split)`,value:`wide`},{label:`narrow (stacked)`,value:`narrow`}],defaultValue:`wide`},{name:`showDetails`,label:`Show the details pane`,type:i.BOOLEAN,defaultValue:!0}]};var Ea=__exportAll({MultiLayoutViewStories:()=>Aa,MultiLayoutViewStory:()=>ka});const Da=`primary`,Oa=`secondary`;function page(e){let t=new h.ListBox({selectionMode:h.SelectionMode.NONE});for(let[n,r]of e)t.append(new D.ActionRow({title:n,subtitle:r}));return t}function slotPage(e){return new D.NavigationPage({title:e,child:D.LayoutSlot.new(e),tag:e})}function arrangement(e){let t=new D.NavigationSplitView({collapsed:e,minSidebarWidth:160});return t.sidebar=slotPage(Oa),t.content=slotPage(Da),t.set_size_request(420,220),t}var ka=class MultiLayoutViewStory extends K{_view=null;_details=null;static{w.registerClass({GTypeName:`AdwStorybookMultiLayoutView`},MultiLayoutViewStory)}constructor(){super(K.fromMeta(MultiLayoutViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Ta,component:D.MultiLayoutView.$gtype}}initialize(){this._details=page([[`From`,`Adwaita List`],[`Subject`,`Resizing the window`]]),this._view=new D.MultiLayoutView;let e=D.Layout.new(arrangement(!1));e.name=`wide`,this._view.add_layout(e);let t=D.Layout.new(arrangement(!0));t.name=`narrow`,this._view.add_layout(t),this._view.set_child(Da,page([[`General`,`12 unread`],[`Starred`,`3 threads`]])),this._view.set_child(Oa,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)}};w.type_ensure(ka.$gtype);const Aa={stories:[ka]},ja={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:i.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:i.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:i.BOOLEAN,defaultValue:!0}]};var Ma=__exportAll({OverlayStories:()=>Fa,OverlayStory:()=>Pa});const Na={start:h.Align.START,center:h.Align.CENTER,end:h.Align.END};var Pa=class OverlayStory extends K{_overlay=null;_main=null;_badge=null;static{w.registerClass({GTypeName:`AdwStorybookOverlay`},OverlayStory)}constructor(){super(K.fromMeta(OverlayStory.getMetadata(),`Default`))}static getMetadata(){return{...ja,component:h.Overlay.$gtype}}initialize(){this._main=new h.Frame({width_request:260,height_request:160,margin_top:12,margin_bottom:12});let e=new h.Label({label:`Main child — its size is the overlay`});e.add_css_class(`dim-label`),this._main.set_child(e),this._badge=new h.Box({valign:h.Align.END,halign:h.Align.END}),this._badge.set_css_classes([`osd`,`flat`]),this._badge.append(new h.Label({label:`2`})),this._overlay=new h.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=Na[String(this.args.halign)],t=Na[String(this.args.valign)];e===void 0?this._badge.halign=h.Align.FILL:this._badge.halign=e,t===void 0?this._badge.valign=h.Align.FILL:this._badge.valign=t,this._badge.visible=this.args.showLabel}};w.type_ensure(Pa.$gtype);const Fa={stories:[Pa]},Ia={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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`wideHandle`,label:`Wide handle`,type:i.BOOLEAN,defaultValue:!1},{name:`resizeStartChild`,label:`Resize the first child`,type:i.BOOLEAN,defaultValue:!0},{name:`resizeEndChild`,label:`Resize the second child`,type:i.BOOLEAN,defaultValue:!0},{name:`shrinkStartChild`,label:`The first child may shrink`,type:i.BOOLEAN,defaultValue:!0},{name:`position`,label:`Position (0 = derive)`,type:i.NUMBER,min:-1,max:400,step:1,defaultValue:-1}]};var La=__exportAll({PanedStories:()=>za,PanedStory:()=>Ra});function pane(e,t){let n=new h.Box({orientation:h.Orientation.VERTICAL,spacing:4,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12});n.append(new h.Label({label:e}));let r=new h.Label({label:`${t}px of size request`});return r.add_css_class(`dim-label`),n.append(r),n}var Ra=class PanedStory extends K{_paned=null;static{w.registerClass({GTypeName:`AdwStorybookPaned`},PanedStory)}constructor(){super(K.fromMeta(PanedStory.getMetadata(),`Default`))}static getMetadata(){return{...Ia,component:h.Paned.$gtype}}initialize(){this._paned=new h.Paned({orientation:h.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`?h.Orientation.VERTICAL:h.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))}};w.type_ensure(Ra.$gtype);const za={stories:[Ra]},Ba=[{label:`Cut`},{label:`Copy`},{label:`Paste`},{label:`Delete`,accel:`<Shift>Delete`}],Va={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:i.BOOLEAN,defaultValue:!0}]};var Ha=__exportAll({PopoverBinStories:()=>Wa,PopoverBinStory:()=>Ua}),Ua=class PopoverBinStory extends K{_bin=null;_list=null;static{w.registerClass({GTypeName:`AdwStorybookPopoverBin`},PopoverBinStory)}constructor(){super(K.fromMeta(PopoverBinStory.getMetadata(),`Default`))}static getMetadata(){return{...Va,component:h.PopoverBin.$gtype}}initialize(){this._list=new h.ListBox({selectionMode:h.SelectionMode.SINGLE});for(let e of[`Documents`,`Downloads`,`Pictures`])this._list.append(new h.ListBoxRow({child:new h.Label({label:e})}));this._bin=new h.PopoverBin({child:this._list}),this._apply(),this.addContent(this._bin)}updateArgs(e){this._apply()}_buildMenu(){let e=new x.Menu;for(let t of Ba)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)}};w.type_ensure(Ua.$gtype);const Wa={stories:[Ua]},Ga=[{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`}]}],Ka={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:i.TEXT,defaultValue:`Document`},{name:`position`,label:`Position`,type:i.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:i.SELECT,options:[{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`start`},{name:`autohide`,label:`Dismiss on outside click`,type:i.BOOLEAN,defaultValue:!0}]};var qa=__exportAll({PopoverMenuStories:()=>Ya,PopoverMenuStory:()=>Ja});const actionOf=e=>`app.${e.toLowerCase().replace(/[^a-z0-9]+/g,`-`)}`;var Ja=class PopoverMenuStory extends K{_anchor=null;_popover=null;static{w.registerClass({GTypeName:`AdwStorybookPopoverMenu`},PopoverMenuStory)}constructor(){super(K.fromMeta(PopoverMenuStory.getMetadata(),`Default`))}static getMetadata(){return{...Ka,component:h.PopoverMenu.$gtype}}initialize(){this._anchor=new h.Button({label:`Open menu`,halign:h.Align.CENTER}),this._apply(),this.addContent(this._anchor)}updateArgs(e){this._apply()}_buildMenu(e){let t=new x.Menu,n=[];for(let e of Ga){if(`submenu`in e){let n=new x.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 x.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 r=new x.Menu;for(let e of n)r.append(e,actionOf(e));t.append_section(e,r)}else for(let e of n)t.append(e,actionOf(e));return t}_apply(){if(!this._anchor)return;let e=this._popover;this._popover=h.PopoverMenu.new_from_model(this._buildMenu(this.args.menuTitle)),this._popover.set_parent(this._anchor),e?.unparent();let t={bottom:h.PositionType.BOTTOM,top:h.PositionType.TOP,start:h.PositionType.LEFT,end:h.PositionType.RIGHT};this._popover.position=t[this.args.position]??h.PositionType.BOTTOM,this._anchor&&(this._anchor.halign=this.args.align===`end`?h.Align.END:h.Align.START),this._popover.autohide=this.args.autohide}};w.type_ensure(Ja.$gtype);const Ya={stories:[Ja]},Xa={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:i.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:i.SELECT,options:[{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`start`},{name:`autohide`,label:`Dismiss on outside click`,type:i.BOOLEAN,defaultValue:!0}]};var Za=__exportAll({PopoverStories:()=>$a,PopoverStory:()=>Qa}),Qa=class PopoverStory extends K{_anchor=null;_popover=null;static{w.registerClass({GTypeName:`AdwStorybookPopover`},PopoverStory)}constructor(){super(K.fromMeta(PopoverStory.getMetadata(),`Default`))}static getMetadata(){return{...Xa,component:h.Popover.$gtype}}initialize(){let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:6});e.append(new h.Label({label:`Anything you like`})),e.append(new h.Label({label:`in here`})),this._anchor=new h.Button({label:`Show popover`,halign:h.Align.CENTER}),this._popover=new h.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:h.PositionType.BOTTOM,top:h.PositionType.TOP,start:h.PositionType.LEFT,end:h.PositionType.RIGHT};this._popover.position=e[this.args.position]??h.PositionType.BOTTOM,this._anchor&&(this._anchor.halign=this.args.align===`end`?h.Align.END:h.Align.START),this._popover.autohide=this.args.autohide}};w.type_ensure(Qa.$gtype);const $a={stories:[Qa]},eo={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:i.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:i.RANGE,min:0,max:800,step:50,defaultValue:250},{name:`revealChild`,label:`Reveal`,type:i.BOOLEAN,defaultValue:!0}]};var to=__exportAll({RevealerStories:()=>io,RevealerStory:()=>ro});const no={none:h.RevealerTransitionType.NONE,crossfade:h.RevealerTransitionType.CROSSFADE,"slide-right":h.RevealerTransitionType.SLIDE_RIGHT,"slide-left":h.RevealerTransitionType.SLIDE_LEFT,"slide-up":h.RevealerTransitionType.SLIDE_UP,"slide-down":h.RevealerTransitionType.SLIDE_DOWN,"swing-right":h.RevealerTransitionType.SWING_RIGHT,"swing-left":h.RevealerTransitionType.SWING_LEFT,"swing-up":h.RevealerTransitionType.SWING_UP,"swing-down":h.RevealerTransitionType.SWING_DOWN,"fade-slide-right":h.RevealerTransitionType.FADE_SLIDE_RIGHT,"fade-slide-left":h.RevealerTransitionType.FADE_SLIDE_LEFT,"fade-slide-up":h.RevealerTransitionType.FADE_SLIDE_UP,"fade-slide-down":h.RevealerTransitionType.FADE_SLIDE_DOWN};var ro=class RevealerStory extends K{_revealer=null;static{w.registerClass({GTypeName:`AdwStorybookRevealer`},RevealerStory)}constructor(){super(K.fromMeta(RevealerStory.getMetadata(),`Default`))}static getMetadata(){return{...eo,component:h.Revealer.$gtype}}initialize(){let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:6,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12});e.append(new h.Label({label:`The revealed child`}));let t=new h.Label({label:`Drag the controls to change the transition`});t.add_css_class(`dim-label`),e.append(t),this._revealer=new h.Revealer,this._revealer.set_child(e),this._apply(),this.addContent(this._revealer)}updateArgs(e){this._apply()}_apply(){this._revealer&&(this._revealer.transition_type=no[String(this.args.transitionType)],this._revealer.transition_duration=Number(this.args.transitionDuration),this._revealer.reveal_child=this.args.revealChild)}};w.type_ensure(ro.$gtype);const io={stories:[ro]},ao={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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`vertical`},{name:`upper`,label:`Adjustment upper`,type:i.NUMBER,defaultValue:400},{name:`pageSize`,label:`Adjustment page size`,type:i.NUMBER,defaultValue:120},{name:`value`,label:`Adjustment value`,type:i.NUMBER,defaultValue:80}]};var oo=__exportAll({ScrollbarStories:()=>co,ScrollbarStory:()=>so}),so=class ScrollbarStory extends K{_scrollbar=null;static{w.registerClass({GTypeName:`AdwStorybookScrollbar`},ScrollbarStory)}constructor(){super(K.fromMeta(ScrollbarStory.getMetadata(),`Default`))}static getMetadata(){return{...ao,component:h.Scrollbar.$gtype}}initialize(){this._scrollbar=new h.Scrollbar({adjustment:new h.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`?h.Orientation.HORIZONTAL:h.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))}};w.type_ensure(so.$gtype);const co={stories:[so]},lo={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:i.SELECT,options:[{label:`Automatic`,value:`automatic`},{label:`Always`,value:`always`},{label:`Never`,value:`never`}],defaultValue:`automatic`},{name:`vPolicy`,label:`Vertical policy`,type:i.SELECT,options:[{label:`Automatic`,value:`automatic`},{label:`Always`,value:`always`},{label:`Never`,value:`never`}],defaultValue:`automatic`},{name:`placement`,label:`Window placement`,type:i.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:i.BOOLEAN,defaultValue:!1},{name:`overlayScrolling`,label:`Overlay scrolling`,type:i.BOOLEAN,defaultValue:!0}]};var uo=__exportAll({ScrolledWindowStories:()=>ho,ScrolledWindowStory:()=>mo});const fo={automatic:h.PolicyType.AUTOMATIC,always:h.PolicyType.ALWAYS,never:h.PolicyType.NEVER},po={"top-left":h.CornerType.TOP_LEFT,"top-right":h.CornerType.TOP_RIGHT,"bottom-left":h.CornerType.BOTTOM_LEFT,"bottom-right":h.CornerType.BOTTOM_RIGHT};var mo=class ScrolledWindowStory extends K{_window=null;static{w.registerClass({GTypeName:`AdwStorybookScrolledWindow`},ScrolledWindowStory)}constructor(){super(K.fromMeta(ScrolledWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...lo,component:h.ScrolledWindow.$gtype}}initialize(){let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:8});for(let t=1;t<=16;t++)e.append(new h.Label({label:`Row ${t}`}));this._window=new h.ScrolledWindow({child:e,min_content_height:240,halign:h.Align.CENTER}),this._apply(),this.addContent(this._window)}updateArgs(e){this._apply()}_apply(){let e=this._window;e&&(e.set_policy(fo[this.args.hPolicy]??h.PolicyType.AUTOMATIC,fo[this.args.vPolicy]??h.PolicyType.AUTOMATIC),e.set_placement(po[this.args.placement]??h.CornerType.TOP_LEFT),e.has_frame=this.args.frame,e.set_overlay_scrolling(this.args.overlayScrolling))}};w.type_ensure(mo.$gtype);const ho={stories:[mo]},go={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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`spacer`,label:`Spacer (draws nothing)`,type:i.BOOLEAN,defaultValue:!1}]};var _o=__exportAll({SeparatorStories:()=>yo,SeparatorStory:()=>vo}),vo=class SeparatorStory extends K{_box=null;_separator=null;static{w.registerClass({GTypeName:`AdwStorybookSeparator`},SeparatorStory)}constructor(){super(K.fromMeta(SeparatorStory.getMetadata(),`Default`))}static getMetadata(){return{...go,component:h.Separator.$gtype}}initialize(){this._separator=new h.Separator,this._box=new h.Box({spacing:12,halign:h.Align.CENTER}),this._box.append(new h.Label({label:`Above`})),this._box.append(this._separator),this._box.append(new h.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?h.Orientation.VERTICAL:h.Orientation.HORIZONTAL,this._box.orientation=e?h.Orientation.HORIZONTAL:h.Orientation.VERTICAL,this.args.spacer?this._separator.add_css_class(`spacer`):this._separator.remove_css_class(`spacer`)}};w.type_ensure(vo.$gtype);const yo={stories:[vo]},bo={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:i.BOOLEAN,defaultValue:!0},{name:`revealBottomBars`,label:`Reveal bottom bars`,type:i.BOOLEAN,defaultValue:!0}]};var xo=__exportAll({ToolbarViewStories:()=>Co,ToolbarViewStory:()=>So}),So=class ToolbarViewStory extends K{_view=null;static{w.registerClass({GTypeName:`AdwStorybookToolbarView`},ToolbarViewStory)}constructor(){super(K.fromMeta(ToolbarViewStory.getMetadata(),`Default`))}static getMetadata(){return{...bo,component:D.ToolbarView.$gtype}}initialize(){this._view=new D.ToolbarView({widthRequest:460,heightRequest:320,revealTopBars:this.args.revealTopBars,revealBottomBars:this.args.revealBottomBars});let e=new D.HeaderBar({titleWidget:new D.WindowTitle({title:`Documents`,subtitle:`12 items`})});this._view.add_top_bar(e);let t=new D.StatusPage({iconName:`folder-documents-symbolic`,title:`Your library`,description:`Content sits between the toolbars and scrolls independently of them.`});this._view.content=t;let n=new h.ActionBar,r=new h.Button({iconName:`list-add-symbolic`});r.add_css_class(`flat`);let i=new h.Button({iconName:`list-remove-symbolic`});i.add_css_class(`flat`),n.pack_start(r),n.pack_start(i),n.set_center_widget(new h.Label({label:`Selection: none`}));let a=new h.Button({iconName:`send-to-symbolic`});a.add_css_class(`flat`),n.pack_end(a),this._view.add_bottom_bar(n),this.addContent(this._view)}updateArgs(e){this._view&&(this._view.revealTopBars=this.args.revealTopBars,this._view.revealBottomBars=this.args.revealBottomBars)}};w.type_ensure(So.$gtype);const Co={stories:[So]},wo={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:i.BOOLEAN,defaultValue:!0}]};var To=__exportAll({ViewportStories:()=>Do,ViewportStory:()=>Eo}),Eo=class ViewportStory extends K{_viewport=null;static{w.registerClass({GTypeName:`AdwStorybookViewport`},ViewportStory)}constructor(){super(K.fromMeta(ViewportStory.getMetadata(),`Default`))}static getMetadata(){return{...wo,component:h.Viewport.$gtype}}initialize(){let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:8});for(let t=1;t<=16;t++)e.append(new h.Label({label:`Row ${t}`}));e.append(new h.Button({label:`Focus me`,halign:h.Align.START})),this._viewport=new h.Viewport({child:e,halign:h.Align.CENTER}),this._apply(),this.addContent(this._viewport)}updateArgs(e){this._apply()}_apply(){this._viewport&&this._viewport.set_scroll_to_focus(this.args.scrollToFocus)}};w.type_ensure(Eo.$gtype);const Do={stories:[Eo]},Oo={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:i.TEXT,defaultValue:`Text Editor`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`notes.md`}]};var ko=__exportAll({WindowStories:()=>jo,WindowStory:()=>Ao}),Ao=class WindowStory extends K{_window=null;_title=null;static{w.registerClass({GTypeName:`AdwStorybookWindow`},WindowStory)}constructor(){super(K.fromMeta(WindowStory.getMetadata(),`Default`))}static getMetadata(){return{...Oo,component:D.Window.$gtype}}initialize(){this._title=new D.WindowTitle({title:this.args.title,subtitle:this.args.subtitle});let e=new D.HeaderBar({titleWidget:this._title,widthRequest:460}),t=new h.Button({iconName:`go-previous-symbolic`});t.add_css_class(`flat`),e.pack_start(t);let n=new h.MenuButton({iconName:`open-menu-symbolic`});n.add_css_class(`flat`),e.pack_end(n);let r=new D.ToolbarView;r.add_top_bar(e),r.content=new D.StatusPage({title:`Your Library`,description:`Content sits between the toolbars and scrolls independently of them.`}),this._window=new D.Window({content:r}),this.addContent(this._window)}updateArgs(e){this._title&&(this._title.title=this.args.title,this._title.subtitle=this.args.subtitle)}};w.type_ensure(Ao.$gtype);const jo={stories:[Ao]},Mo={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:i.RANGE,min:0,max:36,step:1,defaultValue:8},{name:`lineSpacing`,label:`Line spacing`,type:i.RANGE,min:0,max:36,step:1,defaultValue:8}]};var No=__exportAll({WrapBoxStories:()=>Fo,WrapBoxStory:()=>Po}),Po=class WrapBoxStory extends K{_wrap=null;static{w.registerClass({GTypeName:`AdwStorybookWrapBox`},WrapBoxStory)}constructor(){super(K.fromMeta(WrapBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...Mo,component:D.WrapBox.$gtype}}initialize(){this._wrap=new D.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 h.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)}};w.type_ensure(Po.$gtype);const Fo={stories:[Po]},Io={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:i.TEXT,defaultValue:`avatar-default-symbolic`},{name:`size`,label:`Size (px)`,type:i.RANGE,min:16,max:96,step:8,defaultValue:48},{name:`disabled`,label:`Disabled`,type:i.BOOLEAN,defaultValue:!1}]};var Lo=__exportAll({ImageStories:()=>zo,ImageStory:()=>Ro}),Ro=class ImageStory extends K{_image=null;static{w.registerClass({GTypeName:`AdwStorybookImage`},ImageStory)}constructor(){super(K.fromMeta(ImageStory.getMetadata(),`Default`))}static getMetadata(){return{...Io,component:h.Image.$gtype}}initialize(){this._image=new h.Image({halign:h.Align.CENTER,valign:h.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)}};w.type_ensure(Ro.$gtype);const zo={stories:[Ro]},Bo={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:i.TEXT,defaultValue:`Inscription`},{name:`minChars`,label:`Min chars`,type:i.RANGE,min:0,max:40,step:1,defaultValue:3},{name:`natChars`,label:`Nat chars`,type:i.RANGE,min:0,max:40,step:1,defaultValue:0},{name:`minLines`,label:`Min lines`,type:i.RANGE,min:0,max:6,step:1,defaultValue:1},{name:`natLines`,label:`Nat lines`,type:i.RANGE,min:0,max:6,step:1,defaultValue:0},{name:`wrapMode`,label:`Wrap mode`,type:i.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:i.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:i.RANGE,min:0,max:1,step:.05,defaultValue:0},{name:`yalign`,label:`Y align`,type:i.RANGE,min:0,max:1,step:.05,defaultValue:.5}]};var Vo=__exportAll({InscriptionStories:()=>Uo,InscriptionStory:()=>Ho}),Ho=class InscriptionStory extends K{_inscription=null;_frame=null;static{w.registerClass({GTypeName:`AdwStorybookInscription`},InscriptionStory)}constructor(){super(K.fromMeta(InscriptionStory.getMetadata(),`Default`))}static getMetadata(){return{...Bo,component:h.Inscription.$gtype}}initialize(){this._inscription=new h.Inscription,this._frame=new h.Frame({child:this._inscription,halign:h.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)}};w.type_ensure(Ho.$gtype);const Uo={stories:[Ho]},Wo={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:i.BOOLEAN,defaultValue:!0}]};var Go=__exportAll({MediaControlsStories:()=>qo,MediaControlsStory:()=>Ko}),Ko=class MediaControlsStory extends K{_controls=null;static{w.registerClass({GTypeName:`AdwStorybookMediaControls`},MediaControlsStory)}constructor(){super(K.fromMeta(MediaControlsStory.getMetadata(),`Default`))}static getMetadata(){return{...Wo,component:h.MediaControls.$gtype}}initialize(){this._controls=new h.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)}};w.type_ensure(Ko.$gtype);const qo={stories:[Ko]},Jo={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:i.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:i.BOOLEAN,defaultValue:!0},{name:`alternativeText`,label:`Alternative text`,type:i.TEXT,defaultValue:`A tangerine`},{name:`isolateContents`,label:`Isolate contents`,type:i.BOOLEAN,defaultValue:!0},{name:`keepAspectRatio`,label:`Keep aspect ratio (deprecated)`,type:i.BOOLEAN,defaultValue:!0},{name:`width`,label:`Width (px)`,type:i.RANGE,min:64,max:320,step:16,defaultValue:240}]};var Yo=__exportAll({PictureStories:()=>Zo,PictureStory:()=>Xo});function makePaintable(){let e=320*4,t=new Uint8Array(e*180);for(let n=0;n<180;n++){let r=n<180/2?48:144;for(let i=0;i<320;i++){let a=n*e+i*4;t[a]=r,t[a+1]=i<320/2?64:192,t[a+2]=160,t[a+3]=255}}return f.MemoryTexture.new(320,180,f.MemoryFormat.R8G8B8A8,l.Bytes.new(t),e)}var Xo=class PictureStory extends K{_picture=null;static{w.registerClass({GTypeName:`AdwStorybookPicture`},PictureStory)}constructor(){super(K.fromMeta(PictureStory.getMetadata(),`Default`))}static getMetadata(){return{...Jo,component:h.Picture.$gtype}}initialize(){this._picture=new h.Picture({paintable:makePaintable(),halign:h.Align.CENTER,valign:h.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}};w.type_ensure(Xo.$gtype);const Zo={stories:[Xo]},Qo={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:i.BOOLEAN,defaultValue:!1},{name:`loop`,label:`Loop`,type:i.BOOLEAN,defaultValue:!0},{name:`graphicsOffload`,label:`Graphics offload`,type:i.BOOLEAN,defaultValue:!1},{name:`width`,label:`Width (px)`,type:i.RANGE,min:160,max:480,step:40,defaultValue:320}]};var $o=__exportAll({VideoStories:()=>ts,VideoStory:()=>es}),es=class VideoStory extends K{_video=null;static{w.registerClass({GTypeName:`AdwStorybookVideo`},VideoStory)}constructor(){super(K.fromMeta(VideoStory.getMetadata(),`Default`))}static getMetadata(){return{...Qo,component:h.Video.$gtype}}initialize(){this._video=new h.Video({halign:h.Align.CENTER,valign:h.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?h.GraphicsOffloadEnabled.ENABLED:h.GraphicsOffloadEnabled.DISABLED}};w.type_ensure(es.$gtype);const ts={stories:[es]},ns={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:i.BOOLEAN,defaultValue:!0},{name:`modal`,label:`Modal`,type:i.BOOLEAN,defaultValue:!0},{name:`canClose`,label:`Can close`,type:i.BOOLEAN,defaultValue:!0}]};var rs=__exportAll({BottomSheetStories:()=>as,BottomSheetStory:()=>is}),is=class BottomSheetStory extends K{_sheet=null;static{w.registerClass({GTypeName:`AdwStorybookBottomSheet`},BottomSheetStory)}constructor(){super(K.fromMeta(BottomSheetStory.getMetadata(),`Default`))}static getMetadata(){return{...ns,component:D.BottomSheet.$gtype}}buildContent(){let e=new h.Button({label:`Toggle sheet`,halign:h.Align.CENTER,valign:h.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 h.Box({orientation:h.Orientation.VERTICAL,spacing:12,marginTop:18,marginBottom:24,marginStart:18,marginEnd:18});e.append(new h.Label({label:`Share track`,halign:h.Align.START,cssClasses:[`title-2`]}));let t=new D.PreferencesGroup;for(let[e,n]of[[`Copy link`,`edit-copy-symbolic`],[`Send to a friend`,`mail-send-symbolic`],[`Add to playlist`,`list-add-symbolic`]]){let r=new D.ActionRow({title:e});r.add_prefix(new h.Image({iconName:n})),r.activatable=!0,t.add(r)}return e.append(t),e}initialize(){this._sheet=new D.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)}};w.type_ensure(is.$gtype);const as={stories:[is]},os={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:i.BOOLEAN,defaultValue:!0},{name:`collapsed`,label:`Collapsed`,type:i.BOOLEAN,defaultValue:!1}]};var ss=__exportAll({NavigationSplitViewStories:()=>ls,NavigationSplitViewStory:()=>cs}),cs=class NavigationSplitViewStory extends K{_view=null;static{w.registerClass({GTypeName:`AdwStorybookNavigationSplitView`},NavigationSplitViewStory)}constructor(){super(K.fromMeta(NavigationSplitViewStory.getMetadata(),`Default`))}static getMetadata(){return{...os,component:D.NavigationSplitView.$gtype}}buildSidebar(){let e=new D.PreferencesGroup;for(let[t,n,r]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 i=new D.ActionRow({title:t,subtitle:n});i.add_prefix(new h.Image({iconName:r})),i.activatable=!0,e.add(i)}let t=new D.ToolbarView;return t.add_top_bar(new D.HeaderBar),t.content=e,new D.NavigationPage({title:`Mailboxes`,child:t})}buildContent(){let e=new D.StatusPage({iconName:`mail-unread-symbolic`,title:`All Mail`,description:`Select a conversation from the list to read it here.`,vexpand:!0}),t=new D.ToolbarView;return t.add_top_bar(new D.HeaderBar),t.content=e,new D.NavigationPage({title:`All Mail`,child:t})}initialize(){this._view=new D.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)}};w.type_ensure(cs.$gtype);const ls={stories:[cs]},us={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:i.TEXT,defaultValue:`Contacts`},{name:`detailTitle`,label:`Detail title`,type:i.TEXT,defaultValue:`Ada Lovelace`},{name:`animateTransitions`,label:`Animate transitions`,type:i.BOOLEAN,defaultValue:!0}]};var ds=__exportAll({NavigationViewStories:()=>ps,NavigationViewStory:()=>fs}),fs=class NavigationViewStory extends K{_view=null;static{w.registerClass({GTypeName:`AdwStorybookNavigationView`},NavigationViewStory)}constructor(){super(K.fromMeta(NavigationViewStory.getMetadata(),`Default`))}static getMetadata(){return{...us,component:D.NavigationView.$gtype}}buildPage(e,t){let n=new D.ToolbarView;return n.add_top_bar(new D.HeaderBar),n.content=t,new D.NavigationPage({title:e,child:n})}initialize(){this._view=new D.NavigationView({animateTransitions:this.args.animateTransitions,widthRequest:480,heightRequest:340});let e=this.buildPage(this.args.detailTitle,new D.StatusPage({iconName:`avatar-default-symbolic`,title:this.args.detailTitle,description:`Mathematician and writer, the first computer programmer.`,vexpand:!0})),t=new h.Button({label:`Open contact`,halign:h.Align.CENTER,valign:h.Align.CENTER,vexpand:!0});t.add_css_class(`pill`),t.add_css_class(`suggested-action`),t.connect(`clicked`,()=>{this._view?.push(e)});let n=this.buildPage(this.args.rootTitle,t);this._view.add(n),this._view.add(e),this.addContent(this._view)}updateArgs(e){this._view&&(this._view.animateTransitions=this.args.animateTransitions)}};w.type_ensure(fs.$gtype);const ps={stories:[fs]},ms={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:i.BOOLEAN,defaultValue:!0},{name:`collapsed`,label:`Collapsed`,type:i.BOOLEAN,defaultValue:!1}]};var hs=__exportAll({OverlaySplitViewStories:()=>_s,OverlaySplitViewStory:()=>gs}),gs=class OverlaySplitViewStory extends K{_view=null;static{w.registerClass({GTypeName:`AdwStorybookOverlaySplitView`},OverlaySplitViewStory)}constructor(){super(K.fromMeta(OverlaySplitViewStory.getMetadata(),`Default`))}static getMetadata(){return{...ms,component:D.OverlaySplitView.$gtype}}buildSidebar(){let e=new D.PreferencesGroup;for(let[t,n]of[[`Home`,`go-home-symbolic`],[`Discover`,`system-search-symbolic`],[`Library`,`folder-music-symbolic`],[`Settings`,`emblem-system-symbolic`]]){let r=new D.ActionRow({title:t});r.add_prefix(new h.Image({iconName:n})),r.activatable=!0,e.add(r)}let t=new D.ToolbarView;return t.add_top_bar(new D.HeaderBar({showTitle:!1})),t.content=e,t.add_css_class(`sidebar`),t}buildContent(){let e=new D.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 D.ToolbarView;return t.add_top_bar(new D.HeaderBar),t.content=e,t}initialize(){this._view=new D.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)}};w.type_ensure(gs.$gtype);const _s={stories:[gs]},vs=[{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`}]}],ys={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:i.SELECT,options:[{label:`Below`,value:`bottom`},{label:`Above`,value:`top`}],defaultValue:`bottom`},{name:`showLast`,label:`Include Help`,type:i.BOOLEAN,defaultValue:!0}]};var bs=__exportAll({PopoverMenuBarStories:()=>Ss,PopoverMenuBarStory:()=>xs}),xs=class PopoverMenuBarStory extends K{_bar=null;static{w.registerClass({GTypeName:`AdwStorybookPopoverMenuBar`},PopoverMenuBarStory)}constructor(){super(K.fromMeta(PopoverMenuBarStory.getMetadata(),`Default`))}static getMetadata(){return{...ys,component:h.PopoverMenuBar.$gtype}}initialize(){this._bar=h.PopoverMenuBar.new_from_model(this._buildMenu()),this._bar.halign=h.Align.START,this._apply(),this.addContent(this._bar)}updateArgs(e){this._apply()}_buildMenu(){let e=new x.Menu,t=this.args.showLast===!1?vs.slice(0,3):vs;for(let n of t){let t=new x.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?h.PositionType.TOP:h.PositionType.BOTTOM)}};w.type_ensure(xs.$gtype);const Ss={stories:[xs]},Cs={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:i.SELECT,options:[{label:`Sidebar`,value:`sidebar`},{label:`Page`,value:`page`}],defaultValue:`sidebar`},{name:`selected`,label:`Selected index`,type:i.NUMBER,min:0,max:3,step:1,defaultValue:0}]};var ws=__exportAll({SidebarStories:()=>Es,SidebarStory:()=>Ts}),Ts=class SidebarStory extends K{_sidebar=null;_status=null;static{w.registerClass({GTypeName:`AdwStorybookSidebar`},SidebarStory)}constructor(){super(K.fromMeta(SidebarStory.getMetadata(),`Default`))}static getMetadata(){return{...Cs,component:D.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`?D.SidebarMode.PAGE:D.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 D.SidebarSection({title:`Mailboxes`});for(let t of this.items)e.append(new D.SidebarItem({title:t.title,subtitle:t.subtitle,iconName:t.icon}));this._sidebar=new D.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 D.StatusPage({hexpand:!0,vexpand:!0});let t=new h.Box({orientation:h.Orientation.HORIZONTAL,widthRequest:480,heightRequest:340});t.append(this._sidebar),t.append(new h.Separator({orientation:h.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())}};w.type_ensure(Ts.$gtype);const Es={stories:[Ts]},Ds=[{title:`Sync`,kind:`switch`,active:!0},{title:`Export`,kind:`action`}],Os=[`Blue`,`Teal`,`Green`,`Orange`],Y={appearance:`Appearance`,account:`Account`,shortcuts:`Shortcuts`,actions:`Actions`},X={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`},Z={value:3,lower:1,upper:10,step:1},ks=[{title:`Copy`,accelerator:`<Control>C`},{title:`Select all`,accelerator:`<Shift><Control>a`},{title:`Switch tab`,accelerator:`<Alt>1...9`}],As={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:i.BOOLEAN,description:`Adw.Banner:revealed — animates in and out`,defaultValue:!0}]};var js=__exportAll({OverviewWidgetsStories:()=>Ns,OverviewWidgetsStory:()=>Ms}),Ms=class OverviewWidgetsStory extends K{_banner=null;static{w.registerClass({GTypeName:`AdwStorybookOverviewWidgets`},OverviewWidgetsStory)}constructor(){super(K.fromMeta(OverviewWidgetsStory.getMetadata(),`Default`))}static getMetadata(){return As}initialize(){let e=new h.Box({orientation:h.Orientation.VERTICAL,hexpand:!0});this._banner=new D.Banner({title:X.bannerTitle,button_label:X.bannerButton,revealed:this.args.revealed}),e.append(this._banner);let t=new D.PreferencesPage({hexpand:!0}),n=new D.PreferencesGroup({title:Y.appearance});n.add(new D.SwitchRow({title:X.darkMode,subtitle:X.darkModeSubtitle,active:!1})),n.add(new D.SwitchRow({title:X.notifications,subtitle:X.notificationsSubtitle,active:!0})),n.add(new D.ComboRow({title:X.accentColor,model:h.StringList.new([...Os]),selected:0})),t.add(n);let r=new D.PreferencesGroup({title:Y.account}),i=new D.EntryRow({title:X.name});i.set_text(X.nameValue),r.add(i);let a=new D.EntryRow({title:X.email});a.set_text(X.emailValue),r.add(a);let o=new D.SpinRow({title:X.devices,adjustment:new h.Adjustment({value:Z.value,lower:Z.lower,upper:Z.upper,step_increment:Z.step,page_increment:Z.step})});o.set_value(Z.value),r.add(o);let s=new D.ExpanderRow({title:X.advanced,subtitle:X.advancedSubtitle,expanded:!0});for(let e of Ds)s.add_row(e.kind===`switch`?new D.SwitchRow({title:e.title,active:e.active??!1}):new D.ActionRow({title:e.title}));r.add(s),t.add(r);let c=new D.PreferencesGroup({title:Y.shortcuts});for(let e of ks){let t=new D.ActionRow({title:e.title});t.add_suffix(new D.ShortcutLabel({accelerator:e.accelerator,valign:h.Align.CENTER})),c.add(t)}t.add(c);let l=new D.PreferencesGroup({title:Y.actions}),u=new h.Box({orientation:h.Orientation.HORIZONTAL,spacing:12,homogeneous:!0,margin_top:6,margin_bottom:6}),d=new h.Button({label:X.save});d.add_css_class(`suggested-action`),u.append(d);let f=new h.Button({label:X.delete});f.add_css_class(`destructive-action`),u.append(f),l.add(u),t.add(l),e.append(t),this.addContent(e)}updateArgs(e){this._banner?.set_revealed(this.args.revealed)}};w.type_ensure(Ms.$gtype);const Ns={stories:[Ms]},Ps={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:i.TEXT,defaultValue:`Ada Lovelace`},{name:`size`,label:`Size`,type:i.RANGE,min:24,max:160,step:8,defaultValue:96},{name:`showInitials`,label:`Show initials`,type:i.BOOLEAN,defaultValue:!0},{name:`iconName`,label:`Fallback icon`,type:i.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 Fs=__exportAll({AvatarStories:()=>Ls,AvatarStory:()=>Is}),Is=class AvatarStory extends K{_avatar=null;static{w.registerClass({GTypeName:`AdwStorybookAvatar`},AvatarStory)}constructor(){super(K.fromMeta(AvatarStory.getMetadata(),`Default`))}static getMetadata(){return{...Ps,component:D.Avatar.$gtype}}initialize(){this._avatar=new D.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)}};w.type_ensure(Is.$gtype);const Ls={stories:[Is]},Rs={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:i.TEXT,defaultValue:`Metered connection — updates paused`},{name:`buttonLabel`,label:`Button label`,type:i.TEXT,defaultValue:`Resume`},{name:`revealed`,label:`Revealed`,type:i.BOOLEAN,defaultValue:!0},{name:`useMarkup`,label:`Use markup`,type:i.BOOLEAN,defaultValue:!1}]};var zs=__exportAll({BannerStories:()=>Vs,BannerStory:()=>Bs}),Bs=class BannerStory extends K{_banner=null;static{w.registerClass({GTypeName:`AdwStorybookBanner`},BannerStory)}constructor(){super(K.fromMeta(BannerStory.getMetadata(),`Default`))}static getMetadata(){return{...Rs,component:D.Banner.$gtype}}initialize(){this._banner=new D.Banner({title:this.args.title,buttonLabel:this.args.buttonLabel,revealed:this.args.revealed,useMarkup:this.args.useMarkup});let e=new h.Box({orientation:h.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)}};w.type_ensure(Bs.$gtype);const Vs={stories:[Bs]},Hs=[14,25],Us={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:i.BOOLEAN,defaultValue:!0},{name:`showDayNames`,label:`Day names`,type:i.BOOLEAN,defaultValue:!0},{name:`showWeekNumbers`,label:`Week numbers`,type:i.BOOLEAN,defaultValue:!0}]};var Ws=__exportAll({CalendarStories:()=>Ks,CalendarStory:()=>Gs}),Gs=class CalendarStory extends K{_calendar=null;_marked=!1;static{w.registerClass({GTypeName:`AdwStorybookCalendar`},CalendarStory)}constructor(){super(K.fromMeta(CalendarStory.getMetadata(),`Default`))}static getMetadata(){return{...Us,component:h.Calendar.$gtype}}initialize(){this._calendar=new h.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 Hs)this._calendar.mark_day(e);this._marked=!0}}};function parseIso(e){let[t,n,r]=e.split(`-`).map(Number);return l.DateTime.new_local(t,n,r,0,0,0)}w.type_ensure(Gs.$gtype);const Ks={stories:[Gs]},qs=[{value:`de`,label:`German`},{value:`fr`,label:`French`},{value:`nl`,label:`Dutch`},{value:`pt`,label:`Portuguese`}],Js={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:i.BOOLEAN,defaultValue:!0},{name:`showColumnSeparators`,label:`Column separators`,type:i.BOOLEAN,defaultValue:!1},{name:`reorderable`,label:`Drag columns to reorder`,type:i.BOOLEAN,defaultValue:!1}]};var Ys=__exportAll({ColumnViewStories:()=>Zs,ColumnViewStory:()=>Xs}),Xs=class ColumnViewStory extends K{_view=null;static{w.registerClass({GTypeName:`AdwStorybookColumnView`},ColumnViewStory)}constructor(){super(K.fromMeta(ColumnViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Js,component:h.ColumnView.$gtype}}initialize(){let e=h.StringList.new(qs.map(e=>e.label));this._view=new h.ColumnView({model:h.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 h.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 n=new h.SignalListItemFactory;return n.connect(`setup`,(e,t)=>{t.child=new h.Label({xalign:0})}),n.connect(`bind`,(e,n)=>{let r=n,i=r.child,a=r.item.string,o=qs.find(e=>e.label===a);i.label=o===void 0?a:t(o)}),new h.ColumnViewColumn({title:e,factory:n,expand:!0})}};w.type_ensure(Xs.$gtype);const Zs={stories:[Xs]},Qs=[`Red`,`Orange`,`Yellow`,`Green`,`Blue`,`Purple`,`Teal`,`Grey`],$s={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:i.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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`maxChildrenPerLine`,label:`Max children per line`,type:i.NUMBER,defaultValue:3},{name:`homogeneous`,label:`Homogeneous`,type:i.BOOLEAN,defaultValue:!1},{name:`rowSpacing`,label:`Row spacing`,type:i.NUMBER,defaultValue:6}]};var ec=__exportAll({FlowBoxStories:()=>nc,FlowBoxStory:()=>tc}),tc=class FlowBoxStory extends K{_box=null;static{w.registerClass({GTypeName:`AdwStorybookFlowBox`},FlowBoxStory)}constructor(){super(K.fromMeta(FlowBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...$s,component:h.FlowBox.$gtype}}initialize(){this._box=new h.FlowBox({hexpand:!0,vexpand:!0});for(let e of Qs)this._box.append(new h.FlowBoxChild({child:new h.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`?h.Orientation.VERTICAL:h.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 h.SelectionMode.SINGLE;case`browse`:return h.SelectionMode.BROWSE;case`none`:return h.SelectionMode.NONE;default:return h.SelectionMode.MULTIPLE}}};w.type_ensure(tc.$gtype);const nc={stories:[tc]},rc=[`Documents`,`Downloads`,`Music`,`Pictures`,`Videos`],ic=[{label:`Single`,value:`single`},{label:`Multiple`,value:`multiple`},{label:`None`,value:`none`}],ac={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:i.SELECT,options:ic,defaultValue:`single`},{name:`showSeparators`,label:`Separators`,type:i.BOOLEAN,defaultValue:!0},{name:`singleClickActivate`,label:`Activate on single click`,type:i.BOOLEAN,defaultValue:!1}]},oc=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`],sc={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:i.NUMBER,defaultValue:4},{name:`minColumns`,label:`Min columns`,type:i.NUMBER,defaultValue:1},{name:`selectionMode`,label:`Selection`,type:i.SELECT,options:ic,defaultValue:`single`}]};var cc=__exportAll({GridViewStories:()=>uc,GridViewStory:()=>lc}),lc=class GridViewStory extends K{_view=null;_model=null;static{w.registerClass({GTypeName:`AdwStorybookGridView`},GridViewStory)}constructor(){super(K.fromMeta(GridViewStory.getMetadata(),`Default`))}static getMetadata(){return{...sc,component:h.GridView.$gtype}}initialize(){this._model=h.StringList.new([...oc]);let e=new h.SignalListItemFactory;e.connect(`setup`,(e,t)=>{t.child=new h.Label({xalign:.5})}),e.connect(`bind`,(e,t)=>{let n=t,r=n.child;r.label=n.item.string}),this._view=new h.GridView({factory:e,vexpand:!0});let t=new h.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`?h.MultiSelection.new(this._model):this.args.selectionMode===`none`?h.NoSelection.new(this._model):h.SingleSelection.new(this._model),this._view.minColumns=Math.max(1,this.args.minColumns),this._view.maxColumns=Math.max(this._view.minColumns,this.args.maxColumns))}};w.type_ensure(lc.$gtype);const uc={stories:[lc]},dc=[`Documents`,`Downloads`,`Music`,`Pictures`,`Videos`],fc={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:i.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:i.BOOLEAN,defaultValue:!0},{name:`activateOnSingleClick`,label:`Activate on single click`,type:i.BOOLEAN,defaultValue:!0},{name:`tabBehavior`,label:`Tab behaviour`,type:i.SELECT,options:[{label:`All`,value:`all`},{label:`Item`,value:`item`},{label:`Cell`,value:`cell`}],defaultValue:`all`}]};var pc=__exportAll({ListBoxStories:()=>hc,ListBoxStory:()=>mc}),mc=class ListBoxStory extends K{_box=null;static{w.registerClass({GTypeName:`AdwStorybookListBox`},ListBoxStory)}constructor(){super(K.fromMeta(ListBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...fc,component:h.ListBox.$gtype}}initialize(){this._box=new h.ListBox({hexpand:!0});for(let e of dc)this._box.append(new h.ListBoxRow({child:new h.Label({label:e,xalign:0})}));this._apply();let e=new h.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 h.SelectionMode.MULTIPLE;case`browse`:return h.SelectionMode.BROWSE;case`none`:return h.SelectionMode.NONE;default:return h.SelectionMode.SINGLE}}};w.type_ensure(mc.$gtype);const hc={stories:[mc]};var gc=__exportAll({ListViewStories:()=>vc,ListViewStory:()=>_c}),_c=class ListViewStory extends K{_view=null;_model=null;static{w.registerClass({GTypeName:`AdwStorybookListView`},ListViewStory)}constructor(){super(K.fromMeta(ListViewStory.getMetadata(),`Default`))}static getMetadata(){return{...ac,component:h.ListView.$gtype}}initialize(){this._model=h.StringList.new([...rc]);let e=new h.SignalListItemFactory;e.connect(`setup`,(e,t)=>{t.child=new h.Label({xalign:0})}),e.connect(`bind`,(e,t)=>{let n=t,r=n.child;r.label=n.item.string}),this._view=new h.ListView({factory:e,vexpand:!0});let t=new h.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 h.MultiSelection.new(e);case`none`:return h.NoSelection.new(e);default:return h.SingleSelection.new(e)}}};w.type_ensure(_c.$gtype);const vc={stories:[_c]},yc=[{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:``}],bc={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:i.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:i.TEXT,defaultValue:`Disabled`}]},xc={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:i.TEXT,defaultValue:`Disabled`}]};var Sc=__exportAll({ShortcutLabelLevelsStory:()=>wc,ShortcutLabelStories:()=>Tc,ShortcutLabelStory:()=>Cc}),Cc=class ShortcutLabelStory extends K{_widget=null;static{w.registerClass({GTypeName:`AdwStorybookShortcutLabel`},ShortcutLabelStory)}constructor(){super(K.fromMeta(ShortcutLabelStory.getMetadata(),`Default`))}static getMetadata(){return{...bc,component:D.ShortcutLabel.$gtype}}initialize(){this._widget=new D.ShortcutLabel({accelerator:this.args.accelerator,disabledText:this.args.disabledText,halign:h.Align.CENTER,valign:h.Align.CENTER}),this.addContent(this._widget)}updateArgs(e){this._widget&&(this._widget.disabledText=this.args.disabledText,this._widget.accelerator=this.args.accelerator)}};w.type_ensure(Cc.$gtype);var wc=class ShortcutLabelLevelsStory extends K{_widgets=[];static{w.registerClass({GTypeName:`AdwStorybookShortcutLabelLevels`},ShortcutLabelLevelsStory)}constructor(){super(K.fromMeta(ShortcutLabelLevelsStory.getMetadata(),`Default`))}static getMetadata(){return{...xc,component:D.ShortcutLabel.$gtype}}initialize(){let e=new h.Grid({row_spacing:12,column_spacing:24});for(let[t,n]of yc.entries()){let r=new h.Label({label:n.label,halign:h.Align.START});r.add_css_class(`dimmed`),e.attach(r,0,t,1,1);let i=new D.ShortcutLabel({accelerator:n.accelerator,disabledText:this.args.disabledText,halign:h.Align.END,hexpand:!0});e.attach(i,1,t,1,1),this._widgets.push(i)}this.addContent(e)}updateArgs(e){for(let e of this._widgets)e.disabledText=this.args.disabledText}};w.type_ensure(wc.$gtype);const Tc={stories:[Cc,wc]},Ec={title:`Presentation/Spinner`,description:`Adw.Spinner — a lightweight loading indicator that spins continuously while visible.`,controls:[{name:`size`,label:`Size`,type:i.RANGE,min:16,max:64,step:4,defaultValue:48}]};var Dc=__exportAll({SpinnerStories:()=>kc,SpinnerStory:()=>Oc}),Oc=class SpinnerStory extends K{_spinner=null;static{w.registerClass({GTypeName:`AdwStorybookSpinner`},SpinnerStory)}constructor(){super(K.fromMeta(SpinnerStory.getMetadata(),`Default`))}static getMetadata(){return{...Ec,component:D.Spinner.$gtype}}initialize(){let e=this.args.size;this._spinner=new D.Spinner({widthRequest:e,heightRequest:e,halign:h.Align.CENTER,valign:h.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}};w.type_ensure(Oc.$gtype);const kc={stories:[Oc]},Ac={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:i.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:i.TEXT,defaultValue:`No Documents`},{name:`description`,label:`Description`,type:i.TEXT,defaultValue:`Documents you create or open will appear here.`}]};var jc=__exportAll({StatusPageStories:()=>Nc,StatusPageStory:()=>Mc}),Mc=class StatusPageStory extends K{_statusPage=null;static{w.registerClass({GTypeName:`AdwStorybookStatusPage`},StatusPageStory)}constructor(){super(K.fromMeta(StatusPageStory.getMetadata(),`Default`))}static getMetadata(){return{...Ac,component:D.StatusPage.$gtype}}initialize(){let e=new h.Button({label:`New Document`,halign:h.Align.CENTER,cssClasses:[`pill`,`suggested-action`]});this._statusPage=new D.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)}};w.type_ensure(Mc.$gtype);const Nc={stories:[Mc]},Pc={Pictures:[`Holiday`,`Screenshots`],Music:[`Albums`],Notes:[]},Fc={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:i.BOOLEAN,defaultValue:!0},{name:`hideExpander`,label:`Hide the arrow`,type:i.BOOLEAN,defaultValue:!1},{name:`indentForIcon`,label:`Indent leaves by an arrow`,type:i.BOOLEAN,defaultValue:!0}]};var Ic=__exportAll({TreeExpanderStories:()=>Rc,TreeExpanderStory:()=>Lc}),Lc=class TreeExpanderStory extends K{_view=null;_tree=null;_expanders=new Set;static{w.registerClass({GTypeName:`AdwStorybookTreeExpander`},TreeExpanderStory)}constructor(){super(K.fromMeta(TreeExpanderStory.getMetadata(),`Default`))}static getMetadata(){return{...Fc,component:h.TreeExpander.$gtype}}initialize(){let e=h.StringList.new(Object.keys(Pc));this._tree=h.TreeListModel.new(e,!1,!1,e=>{let t=Pc[e.string]??[];return t.length===0?null:h.StringList.new([...t])});let t=new h.SignalListItemFactory;t.connect(`setup`,(e,t)=>{let n=t;n.focusable=!1;let r=new h.TreeExpander;r.child=new h.Label({xalign:0}),n.child=r,this._expanders.add(r)}),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 h.ListView({model:h.SingleSelection.new(this._tree),factory:t,vexpand:!0});let n=new h.ScrolledWindow({child:this._view,heightRequest:200,hexpand:!0});this.addContent(n),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}};w.type_ensure(Lc.$gtype);const Rc={stories:[Lc]},zc={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:i.SELECT,options:[{label:`Toggle maximize`,value:`toggle-maximize`},{label:`Minimize`,value:`minimize`},{label:`Menu`,value:`menu`},{label:`None`,value:`none`}],defaultValue:`toggle-maximize`}]};var Bc=__exportAll({WindowHandleStories:()=>Hc,WindowHandleStory:()=>Vc}),Vc=class WindowHandleStory extends K{_handle=null;static{w.registerClass({GTypeName:`AdwStorybookWindowHandle`},WindowHandleStory)}constructor(){super(K.fromMeta(WindowHandleStory.getMetadata(),`Default`))}static getMetadata(){return{...zc,component:h.WindowHandle.$gtype}}initialize(){let e=new D.HeaderBar;e.set_title_widget(new D.WindowTitle({title:`Notes`})),this._handle=new h.WindowHandle({child:e,halign:h.Align.CENTER}),this._apply(),this.addContent(this._handle)}updateArgs(e){this._apply()}_apply(){this.args.action}};w.type_ensure(Vc.$gtype);const Hc={stories:[Vc]},Uc={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:i.TEXT,defaultValue:`Inbox`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`3 unread messages`}]};var Wc=__exportAll({WindowTitleStories:()=>Kc,WindowTitleStory:()=>Gc}),Gc=class WindowTitleStory extends K{_windowTitle=null;static{w.registerClass({GTypeName:`AdwStorybookWindowTitle`},WindowTitleStory)}constructor(){super(K.fromMeta(WindowTitleStory.getMetadata(),`Default`))}static getMetadata(){return{...Uc,component:D.WindowTitle.$gtype}}initialize(){this._windowTitle=new D.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)}};w.type_ensure(Gc.$gtype);const Kc={stories:[Gc]},qc={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:i.TEXT,defaultValue:`Wi-Fi`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`Connected to Highgarden 5GHz`},{name:`iconName`,label:`Prefix icon`,type:i.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:i.BOOLEAN,defaultValue:!0}]};var Jc=__exportAll({ActionRowStories:()=>Xc,ActionRowStory:()=>Yc}),Yc=class ActionRowStory extends K{_row=null;_icon=null;_button=null;static{w.registerClass({GTypeName:`AdwStorybookActionRow`},ActionRowStory)}constructor(){super(K.fromMeta(ActionRowStory.getMetadata(),`Default`))}static getMetadata(){return{...qc,component:D.ActionRow.$gtype}}initialize(){this._row=new D.ActionRow({title:this.args.title,subtitle:this.args.subtitle}),this._icon=new h.Image({iconName:this.args.iconName}),this._row.add_prefix(this._icon),this._button=new h.Button({iconName:`go-next-symbolic`,valign:h.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 D.PreferencesGroup;e.add(this._row);let t=new D.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)}};w.type_ensure(Yc.$gtype);const Xc={stories:[Yc]},Zc={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:i.TEXT,defaultValue:`Add account`},{name:`startIconName`,label:`Start icon`,type:i.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:i.SELECT,options:[{label:`None`,value:`none`},{label:`Suggested`,value:`suggested-action`},{label:`Destructive`,value:`destructive-action`}],defaultValue:`suggested-action`}]};var Qc=__exportAll({ButtonRowStories:()=>tl,ButtonRowStory:()=>el});const $c=[`suggested-action`,`destructive-action`];var el=class ButtonRowStory extends K{_row=null;static{w.registerClass({GTypeName:`AdwStorybookButtonRow`},ButtonRowStory)}constructor(){super(K.fromMeta(ButtonRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Zc,component:D.ButtonRow.$gtype}}initialize(){this._row=new D.ButtonRow({title:this.args.title,startIconName:this.args.startIconName}),this._applyStyle(this.args.style);let e=new D.PreferencesGroup;e.add(this._row);let t=new D.Clamp({maximumSize:400,child:e});this.addContent(t)}_applyStyle(e){if(this._row){for(let e of $c)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))}};w.type_ensure(el.$gtype);const tl={stories:[el]},nl=[`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:i.TEXT,defaultValue:`Accent colour`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`Used to highlight selected items`},{name:`selected`,label:`Selected`,type:i.NUMBER,min:0,max:4,step:1,defaultValue:1}]};var il=__exportAll({ComboRowStories:()=>ol,ComboRowStory:()=>al}),al=class ComboRowStory extends K{_row=null;static{w.registerClass({GTypeName:`AdwStorybookComboRow`},ComboRowStory)}constructor(){super(K.fromMeta(ComboRowStory.getMetadata(),`Default`))}static getMetadata(){return{...rl,component:D.ComboRow.$gtype}}initialize(){this._row=new D.ComboRow({title:this.args.title,subtitle:this.args.subtitle,model:new h.StringList({strings:[...nl]}),selected:this.args.selected});let e=new D.PreferencesGroup;e.add(this._row);let t=new D.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)}};w.type_ensure(al.$gtype);const ol={stories:[al]},sl={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:i.TEXT,defaultValue:`Display name`},{name:`text`,label:`Text`,type:i.TEXT,defaultValue:`Ada Lovelace`},{name:`showApplyButton`,label:`Show apply button`,type:i.BOOLEAN,defaultValue:!0}]};var cl=__exportAll({EntryRowStories:()=>ul,EntryRowStory:()=>ll}),ll=class EntryRowStory extends K{_row=null;static{w.registerClass({GTypeName:`AdwStorybookEntryRow`},EntryRowStory)}constructor(){super(K.fromMeta(EntryRowStory.getMetadata(),`Default`))}static getMetadata(){return{...sl,component:D.EntryRow.$gtype}}initialize(){this._row=new D.EntryRow({title:this.args.title,text:this.args.text,showApplyButton:this.args.showApplyButton});let e=new D.PreferencesGroup;e.add(this._row);let t=new D.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)}};w.type_ensure(ll.$gtype);const ul={stories:[ll]},dl={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:i.TEXT,defaultValue:`Proxy settings`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`Route traffic through a custom proxy`},{name:`expanded`,label:`Expanded`,type:i.BOOLEAN,defaultValue:!0},{name:`showEnableSwitch`,label:`Show enable switch`,type:i.BOOLEAN,defaultValue:!1}]};var fl=__exportAll({ExpanderRowStories:()=>ml,ExpanderRowStory:()=>pl}),pl=class ExpanderRowStory extends K{_row=null;static{w.registerClass({GTypeName:`AdwStorybookExpanderRow`},ExpanderRowStory)}constructor(){super(K.fromMeta(ExpanderRowStory.getMetadata(),`Default`))}static getMetadata(){return{...dl,component:D.ExpanderRow.$gtype}}initialize(){this._row=new D.ExpanderRow({title:this.args.title,subtitle:this.args.subtitle,expanded:this.args.expanded,showEnableSwitch:this.args.showEnableSwitch}),this._row.add_row(new D.EntryRow({title:`Host`,text:`proxy.example.com`})),this._row.add_row(new D.SwitchRow({title:`Use authentication`,active:!1}));let e=new D.PreferencesGroup;e.add(this._row);let t=new D.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)}};w.type_ensure(pl.$gtype);const ml={stories:[pl]},hl={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:i.TEXT,defaultValue:`Password`},{name:`text`,label:`Text`,type:i.TEXT,defaultValue:`correct-horse-battery`}]};var gl=__exportAll({PasswordEntryRowStories:()=>vl,PasswordEntryRowStory:()=>_l}),_l=class PasswordEntryRowStory extends K{_row=null;static{w.registerClass({GTypeName:`AdwStorybookPasswordEntryRow`},PasswordEntryRowStory)}constructor(){super(K.fromMeta(PasswordEntryRowStory.getMetadata(),`Default`))}static getMetadata(){return{...hl,component:D.PasswordEntryRow.$gtype}}initialize(){this._row=new D.PasswordEntryRow({title:this.args.title,text:this.args.text});let e=new D.PreferencesGroup;e.add(this._row);let t=new D.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.text=this.args.text)}};w.type_ensure(_l.$gtype);const vl={stories:[_l]},yl={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:i.TEXT,defaultValue:`Account`},{name:`description`,label:`Description`,type:i.TEXT,defaultValue:`Manage how this device signs in and syncs.`}]};var bl=__exportAll({PreferencesGroupStories:()=>Sl,PreferencesGroupStory:()=>xl}),xl=class PreferencesGroupStory extends K{_prefsGroup=null;static{w.registerClass({GTypeName:`AdwStorybookPreferencesGroup`},PreferencesGroupStory)}constructor(){super(K.fromMeta(PreferencesGroupStory.getMetadata(),`Default`))}static getMetadata(){return{...yl,component:D.PreferencesGroup.$gtype}}initialize(){let e=new h.Button({label:`Sign out`,valign:h.Align.CENTER});e.add_css_class(`flat`),this._prefsGroup=new D.PreferencesGroup({title:this.args.title,description:this.args.description,headerSuffix:e});let t=new D.EntryRow({title:`Display name`,text:`Grace Hopper`});this._prefsGroup.add(t);let n=new D.SwitchRow({title:`Sync over Wi-Fi only`,subtitle:`Avoid using mobile data for backups`,active:!0});this._prefsGroup.add(n);let r=new D.ComboRow({title:`Region`,model:new h.StringList({strings:[`Europe`,`Americas`,`Asia`,`Oceania`]}),selected:0});this._prefsGroup.add(r);let i=new D.Clamp({maximumSize:400,child:this._prefsGroup});this.addContent(i)}updateArgs(e){this._prefsGroup&&(this._prefsGroup.title=this.args.title,this._prefsGroup.description=this.args.description)}};w.type_ensure(xl.$gtype);const Sl={stories:[xl]},Cl={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:i.TEXT,defaultValue:`A <b>plain</b> preferences row`},{name:`useMarkup`,label:`Use markup`,type:i.BOOLEAN,defaultValue:!0},{name:`titleSelectable`,label:`Title selectable`,type:i.BOOLEAN,defaultValue:!1}]};var wl=__exportAll({PreferencesRowStories:()=>El,PreferencesRowStory:()=>Tl}),Tl=class PreferencesRowStory extends K{_row=null;static{w.registerClass({GTypeName:`AdwStorybookPreferencesRow`},PreferencesRowStory)}constructor(){super(K.fromMeta(PreferencesRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Cl,component:D.PreferencesRow.$gtype}}initialize(){this._row=new D.PreferencesRow,this._apply();let e=new D.PreferencesGroup;e.add(this._row);let t=new D.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)}};w.type_ensure(Tl.$gtype);const El={stories:[Tl]},Dl={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:i.TEXT,defaultValue:`Font size`},{name:`value`,label:`Value`,type:i.NUMBER,min:0,max:100,step:1,defaultValue:16},{name:`digits`,label:`Digits`,type:i.NUMBER,min:0,max:4,step:1,defaultValue:0}]};var Ol=__exportAll({SpinRowStories:()=>Al,SpinRowStory:()=>kl}),kl=class SpinRowStory extends K{_row=null;static{w.registerClass({GTypeName:`AdwStorybookSpinRow`},SpinRowStory)}constructor(){super(K.fromMeta(SpinRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Dl,component:D.SpinRow.$gtype}}initialize(){this._row=new D.SpinRow({title:this.args.title,adjustment:new h.Adjustment({lower:0,upper:100,value:this.args.value,stepIncrement:1,pageIncrement:10}),digits:this.args.digits});let e=new D.PreferencesGroup;e.add(this._row);let t=new D.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)}};w.type_ensure(kl.$gtype);const Al={stories:[kl]},jl={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:i.TEXT,defaultValue:`Automatic updates`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`Download and install updates without asking`},{name:`active`,label:`Active`,type:i.BOOLEAN,defaultValue:!0}]};var Ml=__exportAll({SwitchRowStories:()=>Pl,SwitchRowStory:()=>Nl}),Nl=class SwitchRowStory extends K{_row=null;static{w.registerClass({GTypeName:`AdwStorybookSwitchRow`},SwitchRowStory)}constructor(){super(K.fromMeta(SwitchRowStory.getMetadata(),`Default`))}static getMetadata(){return{...jl,component:D.SwitchRow.$gtype}}initialize(){this._row=new D.SwitchRow({title:this.args.title,subtitle:this.args.subtitle,active:this.args.active});let e=new D.PreferencesGroup;e.add(this._row);let t=new D.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)}};w.type_ensure(Nl.$gtype);const Pl={stories:[Nl]},Fl={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:i.TEXT,defaultValue:`Ada Lovelace`},{name:`editable`,label:`Editable`,type:i.BOOLEAN,defaultValue:!0},{name:`editing`,label:`Editing`,type:i.BOOLEAN,defaultValue:!1}]};var Il=__exportAll({EditableLabelStories:()=>Rl,EditableLabelStory:()=>Ll}),Ll=class EditableLabelStory extends K{_label=null;static{w.registerClass({GTypeName:`AdwStorybookEditableLabel`},EditableLabelStory)}constructor(){super(K.fromMeta(EditableLabelStory.getMetadata(),`Default`))}static getMetadata(){return{...Fl,component:h.EditableLabel.$gtype}}initialize(){this._label=new h.EditableLabel({halign:h.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)}};w.type_ensure(Ll.$gtype);const Rl={stories:[Ll]},zl={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:i.BOOLEAN,defaultValue:!1},{name:`showCloseButton`,label:`Close button`,type:i.BOOLEAN,defaultValue:!0}]};var Bl=__exportAll({SearchBarStories:()=>Hl,SearchBarStory:()=>Vl}),Vl=class SearchBarStory extends K{_bar=null;_entry=null;static{w.registerClass({GTypeName:`AdwStorybookSearchBar`},SearchBarStory)}constructor(){super(K.fromMeta(SearchBarStory.getMetadata(),`Default`))}static getMetadata(){return{...zl,component:h.SearchBar.$gtype}}initialize(){this._entry=new h.SearchEntry({hexpand:!0}),this._bar=new h.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)}};w.type_ensure(Vl.$gtype);const Hl={stories:[Vl]},Ul={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:i.TEXT,defaultValue:`A text view holds as many lines as it is given.
344
- Tab inserts a tab character.`},{name:`wrapMode`,label:`Wrap mode`,type:i.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:i.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:i.BOOLEAN,defaultValue:!1},{name:`acceptsTab`,label:`Tab inserts a tab`,type:i.BOOLEAN,defaultValue:!0},{name:`cursorVisible`,label:`Show cursor`,type:i.BOOLEAN,defaultValue:!0},{name:`topMargin`,label:`Top margin`,type:i.NUMBER,defaultValue:6}]};var Wl=__exportAll({TextViewStories:()=>Kl,TextViewStory:()=>Gl}),Gl=class TextViewStory extends K{_buffer=null;_view=null;static{w.registerClass({GTypeName:`AdwStorybookTextView`},TextViewStory)}constructor(){super(K.fromMeta(TextViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Ul,component:h.TextView.$gtype}}initialize(){this._buffer=new h.TextBuffer,this._view=new h.TextView({buffer:this._buffer,hexpand:!0,vexpand:!1,top_margin:6});let e=new h.ScrolledWindow({hscrollbar_policy:h.PolicyType.AUTOMATIC,vscrollbar_policy:h.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)}};w.type_ensure(Gl.$gtype);const Kl={stories:[Gl]},ql={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:i.TEXT,defaultValue:`Ada Lovelace`},{name:`placeholderText`,label:`Placeholder`,type:i.TEXT,defaultValue:``},{name:`editable`,label:`Editable`,type:i.BOOLEAN,defaultValue:!0},{name:`visibility`,label:`Visible`,type:i.BOOLEAN,defaultValue:!0},{name:`maxLength`,label:`Max length (0 = none)`,type:i.NUMBER,defaultValue:0},{name:`propagateTextWidth`,label:`Grow with text`,type:i.BOOLEAN,defaultValue:!1}]};var Jl=__exportAll({TextStories:()=>Xl,TextStory:()=>Yl}),Yl=class TextStory extends K{_text=null;static{w.registerClass({GTypeName:`AdwStorybookText`},TextStory)}constructor(){super(K.fromMeta(TextStory.getMetadata(),`Default`))}static getMetadata(){return{...ql,component:h.Text.$gtype}}initialize(){this._text=new h.Text({halign:h.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)}};w.type_ensure(Yl.$gtype);const Xl={stories:[Yl]},Zl=[{name:`allowScrollWheel`,label:`Allow scroll wheel`,type:i.BOOLEAN,defaultValue:!0},{name:`allowLongSwipes`,label:`Allow long swipes`,type:i.BOOLEAN,defaultValue:!1}],Ql={title:`View Switching/Carousel (Dots)`,description:`Adw.Carousel — a horizontally swipeable pager with three pages, paired with Adw.CarouselIndicatorDots.`,controls:Zl},$l={title:`View Switching/Carousel (Lines)`,description:`Adw.Carousel — the same swipeable pager paired with Adw.CarouselIndicatorLines instead of dots.`,controls:Zl};var eu=__exportAll({CarouselDotsStory:()=>nu,CarouselLinesStory:()=>ru,CarouselStories:()=>iu});const tu=[{title:`Welcome`,css:`accent`},{title:`Discover`,css:`success`},{title:`Get started`,css:`warning`}];function buildPage(e,t){let n=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,widthRequest:440,heightRequest:260});n.add_css_class(`card`),n.add_css_class(t);let r=new h.Label({label:e,vexpand:!0,valign:h.Align.CENTER});return r.add_css_class(`title-1`),n.append(r),n}var nu=class CarouselDotsStory extends K{_carousel=null;static{w.registerClass({GTypeName:`AdwStorybookCarouselDots`},CarouselDotsStory)}constructor(){super(K.fromMeta(CarouselDotsStory.getMetadata(),`Default`))}static getMetadata(){return{...Ql,component:D.Carousel.$gtype}}initialize(){this._carousel=new D.Carousel({allowScrollWheel:this.args.allowScrollWheel,allowLongSwipes:this.args.allowLongSwipes,vexpand:!0});for(let e of tu)this._carousel.append(buildPage(e.title,e.css));let e=new D.CarouselIndicatorDots({carousel:this._carousel}),t=new h.Box({orientation:h.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)}};w.type_ensure(nu.$gtype);var ru=class CarouselLinesStory extends K{_carousel=null;static{w.registerClass({GTypeName:`AdwStorybookCarouselLines`},CarouselLinesStory)}constructor(){super(K.fromMeta(CarouselLinesStory.getMetadata(),`Default`))}static getMetadata(){return{...$l,component:D.Carousel.$gtype}}initialize(){this._carousel=new D.Carousel({allowScrollWheel:this.args.allowScrollWheel,allowLongSwipes:this.args.allowLongSwipes,vexpand:!0});for(let e of tu)this._carousel.append(buildPage(e.title,e.css));let e=new D.CarouselIndicatorLines({carousel:this._carousel}),t=new h.Box({orientation:h.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)}};w.type_ensure(ru.$gtype);const iu={stories:[nu,ru]},au={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:i.SELECT,options:[{label:`Labels`,value:`labels`},{label:`Icons`,value:`icons`},{label:`Both`,value:`both`}],defaultValue:`both`}]};var ou=__exportAll({InlineViewSwitcherStories:()=>su,InlineViewSwitcherStory:()=>Q}),Q=class InlineViewSwitcherStory extends K{_switcher=null;static{w.registerClass({GTypeName:`AdwStorybookInlineViewSwitcher`},InlineViewSwitcherStory)}constructor(){super(K.fromMeta(InlineViewSwitcherStory.getMetadata(),`Default`))}static getMetadata(){return{...au,component:D.InlineViewSwitcher.$gtype}}buildPage(e,t,n){return new D.StatusPage({iconName:t,title:e,description:n,vexpand:!0})}initialize(){let e=new D.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 D.InlineViewSwitcher({stack:e,displayMode:this.modeFromArg(this.args.displayMode),halign:h.Align.CENTER});let t=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:340});t.append(this._switcher),t.append(e),this.addContent(t)}modeFromArg(e){return e===`labels`?D.InlineViewSwitcherDisplayMode.LABELS:e===`icons`?D.InlineViewSwitcherDisplayMode.ICONS:D.InlineViewSwitcherDisplayMode.BOTH}updateArgs(e){this._switcher&&(this._switcher.displayMode=this.modeFromArg(this.args.displayMode))}};w.type_ensure(Q.$gtype);const su={stories:[Q]},cu=[{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".`}],lu={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:i.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:i.BOOLEAN,defaultValue:!0},{name:`showBorder`,label:`Show border`,type:i.BOOLEAN,defaultValue:!0},{name:`enablePopup`,label:`Enable popup (right-click)`,type:i.BOOLEAN,defaultValue:!1}]};var uu=__exportAll({NotebookStories:()=>pu,NotebookStory:()=>fu});const du={top:h.PositionType.TOP,bottom:h.PositionType.BOTTOM,left:h.PositionType.LEFT,right:h.PositionType.RIGHT};var fu=class NotebookStory extends K{_notebook=null;static{w.registerClass({GTypeName:`AdwStorybookNotebook`},NotebookStory)}constructor(){super(K.fromMeta(NotebookStory.getMetadata(),`Default`))}static getMetadata(){return{...lu,component:h.Notebook.$gtype}}initialize(){this._notebook=new h.Notebook({vexpand:!0,widthRequest:480,heightRequest:320});for(let e of cu){let t=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,spacing:6});t.append(new h.Label({label:e.label||e.name,cssClasses:[`title-4`]})),t.append(new h.Label({label:e.body,cssClasses:[`title-2`]}));let n=e.label?new h.Label({label:e.label}):null,r=new h.Label({label:e.label||e.name});this._notebook.append_page_menu(t,n,r)}this._apply(),this.addContent(this._notebook)}updateArgs(e){this._apply()}_apply(){this._notebook&&(this._notebook.tab_pos=du[this.args.tabPos]??h.PositionType.TOP,this._notebook.show_tabs=this.args.showTabs,this._notebook.enable_popup=this.args.enablePopup,this._notebook.show_border=this.args.showBorder)}};w.type_ensure(fu.$gtype);const pu={stories:[fu]},mu=[{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.`}],hu={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:i.SELECT,options:[{label:`None`,value:`none`},{label:`Crossfade`,value:`crossfade`},{label:`Slide left / right`,value:`slide-left-right`}],defaultValue:`slide-left-right`}]};var gu=__exportAll({StackSidebarStories:()=>yu,StackSidebarStory:()=>vu});const _u={none:h.StackTransitionType.NONE,crossfade:h.StackTransitionType.CROSSFADE,"slide-left-right":h.StackTransitionType.SLIDE_LEFT_RIGHT};var vu=class StackSidebarStory extends K{_stack=null;static{w.registerClass({GTypeName:`AdwStorybookStackSidebar`},StackSidebarStory)}constructor(){super(K.fromMeta(StackSidebarStory.getMetadata(),`Default`))}static getMetadata(){return{...hu,component:h.StackSidebar.$gtype}}initialize(){this._stack=new h.Stack({vexpand:!0,transitionDuration:200});for(let e of mu){let t=new h.Label({label:e.body});t.add_css_class(`title-2`);let n=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,spacing:6});n.append(new h.Label({label:e.title||e.name,cssClasses:[`title-4`]})),n.append(t);let r=this._stack.add_titled(n,e.name,e.title);r.icon_name=e.icon,r.needs_attention=e.attn,r.use_underline=!0}let e=new h.StackSidebar({stack:this._stack}),t=new h.Box({orientation:h.Orientation.VERTICAL,spacing:0});t.append(e);let n=new h.Paned({orientation:h.Orientation.HORIZONTAL,widthRequest:480,heightRequest:320});n.set_start_child(t),n.set_end_child(this._stack),n.set_position(180),this._apply(),this.addContent(n)}updateArgs(e){this._apply()}_apply(){this._stack&&(this._stack.transition_type=_u[this.args.transitionType]??h.StackTransitionType.NONE)}};w.type_ensure(vu.$gtype);const yu={stories:[vu]},bu=[{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.`}],xu={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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`transitionType`,label:`Transition type`,type:i.SELECT,options:[{label:`None`,value:`none`},{label:`Crossfade`,value:`crossfade`},{label:`Slide left / right`,value:`slide-left-right`}],defaultValue:`slide-left-right`}]};var Su=__exportAll({StackSwitcherStories:()=>Tu,StackSwitcherStory:()=>wu});const Cu={none:h.StackTransitionType.NONE,crossfade:h.StackTransitionType.CROSSFADE,"slide-left-right":h.StackTransitionType.SLIDE_LEFT_RIGHT};var wu=class StackSwitcherStory extends K{_stack=null;_switcher=null;static{w.registerClass({GTypeName:`AdwStorybookStackSwitcher`},StackSwitcherStory)}constructor(){super(K.fromMeta(StackSwitcherStory.getMetadata(),`Default`))}static getMetadata(){return{...xu,component:h.StackSwitcher.$gtype}}initialize(){this._stack=new h.Stack({vexpand:!0,transitionDuration:200});for(let e of bu){let t=new h.Label({label:e.body});t.add_css_class(`title-2`);let n=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,spacing:6});if(n.append(new h.Label({label:e.title||e.name,cssClasses:[`title-4`]})),n.append(t),e.icon){let t=this._stack.add_titled(n,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(n,e.name,e.title);t.needs_attention=e.attn,t.use_underline=!0}}this._switcher=new h.StackSwitcher({stack:this._stack,halign:h.Align.CENTER});let e=new h.Box({orientation:h.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=Cu[this.args.transitionType]??h.StackTransitionType.NONE,this._switcher.orientation=this.args.orientation===`vertical`?h.Orientation.VERTICAL:h.Orientation.HORIZONTAL)}};w.type_ensure(wu.$gtype);const Tu={stories:[wu]},Eu=[{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.`}],Du={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:i.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:i.RANGE,min:0,max:600,step:50,defaultValue:200},{name:`interpolateSize`,label:`Interpolate size`,type:i.BOOLEAN,defaultValue:!1},{name:`hhomogeneous`,label:`HHomogeneous`,type:i.BOOLEAN,defaultValue:!0},{name:`vhomogeneous`,label:`VHomogeneous`,type:i.BOOLEAN,defaultValue:!0}]};var Ou=__exportAll({StackStories:()=>ju,StackStory:()=>Au});const ku={none:h.StackTransitionType.NONE,crossfade:h.StackTransitionType.CROSSFADE,"slide-left-right":h.StackTransitionType.SLIDE_LEFT_RIGHT,"slide-up-down":h.StackTransitionType.SLIDE_UP_DOWN,"over-left-right":h.StackTransitionType.OVER_LEFT_RIGHT,"rotate-left-right":h.StackTransitionType.ROTATE_LEFT_RIGHT};var Au=class StackStory extends K{_stack=null;_switcher=null;static{w.registerClass({GTypeName:`AdwStorybookStack`},StackStory)}constructor(){super(K.fromMeta(StackStory.getMetadata(),`Default`))}static getMetadata(){return{...Du,component:h.Stack.$gtype}}initialize(){this._stack=new h.Stack({vexpand:!0,transitionDuration:200});for(let e of Eu){let t=new h.Label({label:e.body,vexpand:!0});t.add_css_class(`title-2`);let n=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,spacing:6});n.append(new h.Label({label:e.title,cssClasses:[`title-4`]})),n.append(t);let r=this._stack.add_titled(n,e.name,e.title);r.needs_attention=e.attn,r.use_underline=!0}this._switcher=new h.StackSwitcher({stack:this._stack,halign:h.Align.CENTER});let e=new h.Box({orientation:h.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=ku[this.args.transitionType]??h.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)}};w.type_ensure(Au.$gtype);const ju={stories:[Au]},Mu={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:i.BOOLEAN,defaultValue:!1},{name:`expandTabs`,label:`Expand tabs`,type:i.BOOLEAN,defaultValue:!1},{name:`inverted`,label:`Inverted`,type:i.BOOLEAN,defaultValue:!1},{name:`startAction`,label:`Start action`,type:i.BOOLEAN,defaultValue:!0},{name:`endAction`,label:`End action`,type:i.BOOLEAN,defaultValue:!0}]};var Nu=__exportAll({TabBarStories:()=>Iu,TabBarStory:()=>Fu});const Pu=[{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 Fu=class TabBarStory extends K{_bar=null;_startAction=null;_endAction=null;static{w.registerClass({GTypeName:`AdwStorybookTabBar`},TabBarStory)}constructor(){super(K.fromMeta(TabBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Mu,component:D.TabBar.$gtype}}initialize(){let e=new D.TabView({vexpand:!0});for(let t of Pu){let n=e.append(new D.StatusPage({iconName:`view-paged-symbolic`,title:t.title,description:t.body}));n.title=t.title}this._startAction=new h.Button({iconName:`list-add-symbolic`,tooltipText:`New page`,cssClasses:[`flat`]}),this._endAction=new h.Button({iconName:`view-more-symbolic`,tooltipText:`Menu`,cssClasses:[`flat`]});let t=new D.TabBar({view:e});this._bar=t;let n=new h.Box({orientation:h.Orientation.VERTICAL,widthRequest:480,heightRequest:320});n.append(t),n.append(e),this.addContent(n),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)}};w.type_ensure(Fu.$gtype);const Iu={stories:[Fu]},Lu={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:i.RANGE,min:0,max:100,step:1,defaultValue:3},{name:`needsAttention`,label:`Last page needs attention`,type:i.BOOLEAN,defaultValue:!1}]};var Ru=__exportAll({TabButtonStories:()=>Bu,TabButtonStory:()=>zu}),zu=class TabButtonStory extends K{_view=null;static{w.registerClass({GTypeName:`AdwStorybookTabButton`},TabButtonStory)}constructor(){super(K.fromMeta(TabButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...Lu,component:D.TabButton.$gtype}}initialize(){this._view=new D.TabView;let e=new D.TabButton({view:this._view,halign:h.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 h.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}};w.type_ensure(zu.$gtype);const Bu={stories:[zu]},Vu={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:i.BOOLEAN,defaultValue:!0},{name:`enableSearch`,label:`Enable search`,type:i.BOOLEAN,defaultValue:!0},{name:`enableNewTab`,label:`Enable new tab`,type:i.BOOLEAN,defaultValue:!1},{name:`inverted`,label:`Inverted`,type:i.BOOLEAN,defaultValue:!1}]};var Hu=__exportAll({TabOverviewStories:()=>Gu,TabOverviewStory:()=>Wu});const Uu=[{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 Wu=class TabOverviewStory extends K{_overview=null;static{w.registerClass({GTypeName:`AdwStorybookTabOverview`},TabOverviewStory)}constructor(){super(K.fromMeta(TabOverviewStory.getMetadata(),`Default`))}static getMetadata(){return{...Vu,component:D.TabOverview.$gtype}}initialize(){let e=new D.TabView({vexpand:!0});for(let[t,n]of Uu.entries()){let r=new D.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 D.TabOverview({view:e,child:e,widthRequest:480,heightRequest:340});this._overview=t,t.connect(`create-tab`,()=>{let t=e.append(new D.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)}};w.type_ensure(Wu.$gtype);const Gu={stories:[Wu]},Ku={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:i.BOOLEAN,defaultValue:!1}]};var qu=__exportAll({TabViewStories:()=>Xu,TabViewStory:()=>Yu});const Ju=[{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 Yu=class TabViewStory extends K{_tabBar=null;static{w.registerClass({GTypeName:`AdwStorybookTabView`},TabViewStory)}constructor(){super(K.fromMeta(TabViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Ku,component:D.TabView.$gtype}}buildPageBody(e,t){return new D.StatusPage({iconName:`view-paged-symbolic`,title:e,description:t,vexpand:!0})}initialize(){let e=new D.TabView({vexpand:!0});for(let t of Ju){let n=e.append(this.buildPageBody(t.title,t.body));n.title=t.title}this._tabBar=new D.TabBar({view:e,autohide:this.args.autohide});let t=new h.Box({orientation:h.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)}};w.type_ensure(Yu.$gtype);const Xu={stories:[Yu]},Zu=[{name:`inbox`,title:`Inbox`,icon:`mail-unread-symbolic`},{name:`starred`,title:`Starred`,icon:`starred-symbolic`},{name:`archive`,title:`Archive`,icon:`folder-symbolic`}],Qu={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:i.BOOLEAN,defaultValue:!0}]};var $u=__exportAll({ViewSwitcherBarStories:()=>td,ViewSwitcherBarStory:()=>ed}),ed=class ViewSwitcherBarStory extends K{_bar=null;static{w.registerClass({GTypeName:`AdwStorybookViewSwitcherBar`},ViewSwitcherBarStory)}constructor(){super(K.fromMeta(ViewSwitcherBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Qu,component:D.ViewSwitcherBar.$gtype}}initialize(){let e=new D.ViewStack({vexpand:!0});for(let t of Zu){let n=new D.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 D.ViewSwitcherBar({stack:e}),this._apply();let t=new D.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)}};w.type_ensure(ed.$gtype);const td={stories:[ed]},nd=[{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`}],rd={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:i.BOOLEAN,defaultValue:!1}]};var id=__exportAll({ViewSwitcherSidebarStories:()=>od,ViewSwitcherSidebarStory:()=>ad}),ad=class ViewSwitcherSidebarStory extends K{_switcher=null;static{w.registerClass({GTypeName:`AdwStorybookViewSwitcherSidebar`},ViewSwitcherSidebarStory)}constructor(){super(K.fromMeta(ViewSwitcherSidebarStory.getMetadata(),`Default`))}static getMetadata(){return{...rd,component:D.ViewSwitcherSidebar.$gtype}}initialize(){let e=new D.ViewStack({vexpand:!0});for(let t of nd){let n=new D.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=nd.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 n=new D.ViewSwitcherSidebar({stack:e});this._switcher=n;let r=new h.Box({orientation:h.Orientation.HORIZONTAL,widthRequest:480,heightRequest:340});r.append(n),r.append(e),this.addContent(r),this._apply()}updateArgs(e){this._apply()}_apply(){this._switcher&&(this._switcher.mode=this.args.mode?D.SidebarMode.PAGE:D.SidebarMode.SIDEBAR)}};w.type_ensure(ad.$gtype);const od={stories:[ad]},sd={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:i.SELECT,options:[{label:`Wide`,value:`wide`},{label:`Narrow`,value:`narrow`}],defaultValue:`wide`}]};var cd=__exportAll({ViewSwitcherStories:()=>ud,ViewSwitcherStory:()=>ld}),ld=class ViewSwitcherStory extends K{_switcher=null;static{w.registerClass({GTypeName:`AdwStorybookViewSwitcher`},ViewSwitcherStory)}constructor(){super(K.fromMeta(ViewSwitcherStory.getMetadata(),`Default`))}static getMetadata(){return{...sd,component:D.ViewSwitcher.$gtype}}buildPage(e,t,n){return new D.StatusPage({iconName:t,title:e,description:n,vexpand:!0})}initialize(){let e=new D.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 D.ViewSwitcher({stack:e,policy:this.policyFromArg(this.args.policy),halign:h.Align.CENTER});let t=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:340});t.append(this._switcher),t.append(e),this.addContent(t)}policyFromArg(e){return e===`narrow`?D.ViewSwitcherPolicy.NARROW:D.ViewSwitcherPolicy.WIDE}updateArgs(e){this._switcher&&(this._switcher.policy=this.policyFromArg(this.args.policy))}};w.type_ensure(ld.$gtype);const ud={stories:[ld]},dd={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:i.BOOLEAN,defaultValue:!0},{name:`center`,label:`Centre`,type:i.SELECT,options:[{label:`A label`,value:`label`},{label:`Nothing`,value:`none`}],defaultValue:`label`}]};var fd=__exportAll({ActionBarStories:()=>md,ActionBarStory:()=>pd}),pd=class ActionBarStory extends K{_bar=null;_centre=null;static{w.registerClass({GTypeName:`AdwStorybookActionBar`},ActionBarStory)}constructor(){super(K.fromMeta(ActionBarStory.getMetadata(),`Default`))}static getMetadata(){return{...dd,component:h.ActionBar.$gtype}}initialize(){this._bar=new h.ActionBar;let e=new h.Button({icon_name:`document-save-symbolic`});e.add_css_class(`flat`),this._bar.pack_end(e);let t=new h.Button({icon_name:`document-open-symbolic`});t.add_css_class(`flat`),this._bar.pack_end(t);let n=new h.Button({icon_name:`document-print-symbolic`});n.add_css_class(`flat`),this._bar.pack_start(n),this._centre=new h.Label({label:`notes.md`});let r=new h.Box({orientation:h.Orientation.VERTICAL,spacing:8});r.append(new h.Label({label:`The bar below is Gtk.ActionBar.`,css_classes:[`dimmed`]})),r.append(this._bar),this.addContent(r),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))}};w.type_ensure(pd.$gtype);const md={stories:[pd]},hd={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:i.TEXT,defaultValue:`Editor`},{name:`showMenubar`,label:`Show menubar`,type:i.BOOLEAN,defaultValue:!0},{name:`hasMenubar`,label:`The application has one`,type:i.BOOLEAN,defaultValue:!0},{name:`deletable`,label:`Deletable`,type:i.BOOLEAN,defaultValue:!0}]};var gd=__exportAll({GtkApplicationWindowStories:()=>vd,GtkApplicationWindowStory:()=>_d});function menubarModel(){let e=new x.Menu,t=new x.Menu;t.append(`_New`,`win.new`),t.append(`_Open…`,`win.open`);let n=new x.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 K{_window=null;_application=null;_menubar=null;static{w.registerClass({GTypeName:`AdwStorybookGtkApplicationWindow`},GtkApplicationWindowStory)}constructor(){super(K.fromMeta(GtkApplicationWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...hd,component:h.ApplicationWindow.$gtype}}initialize(){this._application=new h.Application({application_id:`eu.jumplink.AdwStorybookGtkApplicationWindow`}),this._menubar=menubarModel(),this._application.set_menubar(this._menubar),this._window=new h.ApplicationWindow({application:this._application,default_width:460,default_height:260}),this._window.set_titlebar(new h.HeaderBar);let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,margin_top:12,margin_start:12});e.append(new h.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)}};w.type_ensure(_d.$gtype);const vd={stories:[_d]},yd={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:i.SELECT,options:[{label:`The window title`,value:`none`},{label:`A custom centre widget`,value:`custom`}],defaultValue:`none`},{name:`showTitleButtons`,label:`Title buttons`,type:i.BOOLEAN,defaultValue:!0},{name:`decorationLayout`,label:`Decoration layout`,type:i.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 bd=__exportAll({GtkHeaderBarStories:()=>Sd,GtkHeaderBarStory:()=>xd}),xd=class GtkHeaderBarStory extends K{_bar=null;_titleLabel=null;static{w.registerClass({GTypeName:`AdwStorybookGtkHeaderBar`},GtkHeaderBarStory)}constructor(){super(K.fromMeta(GtkHeaderBarStory.getMetadata(),`Default`))}static getMetadata(){return{...yd,component:h.HeaderBar.$gtype}}initialize(){this._bar=new h.HeaderBar;let e=new h.Button({icon_name:`open-menu-symbolic`});e.add_css_class(`flat`),this._bar.pack_end(e);let t=new h.Button({icon_name:`system-search-symbolic`});t.add_css_class(`flat`),this._bar.pack_end(t);let n=new h.Button({label:`‹`});n.add_css_class(`flat`),this._bar.pack_start(n),this._titleLabel=new h.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)}};w.type_ensure(xd.$gtype);const Sd={stories:[xd]},Cd={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:i.TEXT,defaultValue:`Documents`},{name:`decorated`,label:`Decorated`,type:i.BOOLEAN,defaultValue:!0},{name:`deletable`,label:`Deletable`,type:i.BOOLEAN,defaultValue:!0},{name:`resizable`,label:`Resizable`,type:i.BOOLEAN,defaultValue:!0},{name:`maximized`,label:`Maximized`,type:i.BOOLEAN,defaultValue:!1},{name:`modal`,label:`Modal`,type:i.BOOLEAN,defaultValue:!1},{name:`hideOnClose`,label:`Hide on close`,type:i.BOOLEAN,defaultValue:!0}]};var wd=__exportAll({GtkWindowStories:()=>Ed,GtkWindowStory:()=>Td}),Td=class GtkWindowStory extends K{_window=null;static{w.registerClass({GTypeName:`AdwStorybookGtkWindow`},GtkWindowStory)}constructor(){super(K.fromMeta(GtkWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...Cd,component:h.Window.$gtype}}initialize(){this._window=new h.Window({default_width:460,default_height:280});let e=new h.HeaderBar;this._window.set_titlebar(e);let t=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,margin_top:12,margin_start:12});t.append(new h.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)}};w.type_ensure(Td.$gtype);const Ed={stories:[Td]},Dd={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:i.SELECT,options:[{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`start`},{name:`decorationLayout`,label:`Decoration layout`,type:i.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:i.BOOLEAN,defaultValue:!0},{name:`maximized`,label:`Maximized window`,type:i.BOOLEAN,defaultValue:!1},{name:`modal`,label:`Modal window`,type:i.BOOLEAN,defaultValue:!1}]};var Od=__exportAll({WindowControlsStories:()=>kd,WindowControlsStory:()=>$}),$=class WindowControlsStory extends K{_window=null;_controls=null;static{w.registerClass({GTypeName:`AdwStorybookWindowControls`},WindowControlsStory)}constructor(){super(K.fromMeta(WindowControlsStory.getMetadata(),`Default`))}static getMetadata(){return{...Dd,component:h.WindowControls.$gtype}}initialize(){this._window=new h.Window({title:`Documents`,default_width:420,default_height:220});let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:8});e.append(new h.Label({label:`The bar draws nothing outside a window.`,css_classes:[`dimmed`]})),this._window.set_child(e),this._controls=new h.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`?h.PackType.END:h.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}};w.type_ensure($.$gtype);const kd={stories:[$]};await runStorybook({applicationId:`org.gjsify.AdwaitaStorybook`,title:`Adwaita Storybook`,stories:collectStoryModules([Mt,It,Vt,Jt,Qt,rn,ln,mn,yn,Cn,On,Nn,Ln,Vn,Gn,Yn,$n,rr,sr,dr,hr,yr,Cr,Dr,jr,Fr,zr,Ur,Jr,Qr,ri,li,pi,vi,Si,Ei,Ai,Pi,Ri,Hi,qi,Qi,na,oa,ua,ma,va,Sa,Ea,Ma,La,Ha,qa,Za,to,oo,uo,_o,xo,To,ko,No,Lo,Vo,Go,Yo,$o,rs,ss,ds,hs,bs,ws,js,Fs,zs,Ws,Ys,ec,cc,pc,gc,Sc,Dc,jc,Ic,Bc,Wc,Jc,Qc,il,cl,fl,gl,bl,wl,Ol,Ml,Il,Bl,Wl,Jl,eu,ou,uu,gu,Su,Ou,Nu,Ru,Hu,qu,$u,id,cd,fd,gd,bd,wd,Od])});export{};
341
+ Built with meson 1.6`}),t=Tn[this.args.licenseType]??h.License.UNKNOWN;t===h.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
342
+ Katherine Johnson`),e.add_credit_section(`Reviewed by`,[`Tony Hoare <tony@example.org>`])),e.present()}updateArgs(e){}};S.type_ensure(En.$gtype);const Dn={stories:[En]},On={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:i.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:i.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 kn=__exportAll({PageSetupUnixDialogStories:()=>Nn,PageSetupUnixDialogStory:()=>jn});const An={portrait:h.PageOrientation.PORTRAIT,landscape:h.PageOrientation.LANDSCAPE,"reverse-portrait":h.PageOrientation.REVERSE_PORTRAIT,"reverse-landscape":h.PageOrientation.REVERSE_LANDSCAPE};var jn=class PageSetupUnixDialogStory extends T{_button=null;static{S.registerClass({GTypeName:`AdwStorybookPageSetupUnixDialog`},PageSetupUnixDialogStory)}constructor(){super(T.fromMeta(PageSetupUnixDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...On,component:h.PageSetupUnixDialog.$gtype}}initialize(){this._button=new h.Button({label:`Page Setup…`,halign:h.Align.CENTER,valign:h.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=h.PageSetupUnixDialog.new(`Page Setup`,null),t=new h.PageSetup;t.set_paper_size_and_default_margins(h.PaperSize.new(this.args.paperSize)),t.set_orientation(An[this.args.orientation]??h.PageOrientation.PORTRAIT),e.set_page_setup(t),e.present()}updateArgs(e){}};const Mn=`PageSetupUnixDialog`in h;Mn&&S.type_ensure(jn.$gtype);const Nn={stories:[jn].filter(()=>Mn)},Pn={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:i.TEXT,defaultValue:`General`},{name:`groupTitle`,label:`Group title`,type:i.TEXT,defaultValue:`Appearance`}]};var Fn=__exportAll({PreferencesDialogStories:()=>Ln,PreferencesDialogStory:()=>In}),In=class PreferencesDialogStory extends T{_button=null;static{S.registerClass({GTypeName:`AdwStorybookPreferencesDialog`},PreferencesDialogStory)}constructor(){super(T.fromMeta(PreferencesDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Pn,component:w.PreferencesDialog.$gtype}}initialize(){this._button=new h.Button({label:`Show dialog`,halign:h.Align.CENTER,valign:h.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 w.PreferencesDialog,t=new w.PreferencesPage({title:this.args.pageTitle,iconName:`preferences-system-symbolic`}),n=new w.PreferencesGroup({title:this.args.groupTitle,description:`Control how the application looks and behaves.`});n.add(new w.SwitchRow({title:`Dark style`,subtitle:`Use a dark colour scheme`,active:!0})),n.add(new w.ComboRow({title:`Accent colour`,model:new h.StringList({strings:[`Blue`,`Teal`,`Green`,`Orange`,`Purple`]}),selected:0})),n.add(new w.SpinRow({title:`Font size`,adjustment:new h.Adjustment({lower:8,upper:24,value:12,stepIncrement:1,pageIncrement:4})})),t.add(n),e.add(t),e.present(this)}updateArgs(e){}};S.type_ensure(In.$gtype);const Ln={stories:[In]},Rn={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:i.TEXT,defaultValue:`copies|collate|reverse|scale|preview|page-set`},{name:`range`,label:`Range`,type:i.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:i.NUMBER,defaultValue:2}]};var zn=__exportAll({PrintUnixDialogStories:()=>Hn,PrintUnixDialogStory:()=>Bn});const capabilities=()=>({collate:h.PrintCapabilities.COLLATE,copies:h.PrintCapabilities.COPIES,"generate-pdf":h.PrintCapabilities.GENERATE_PDF,"generate-ps":h.PrintCapabilities.GENERATE_PS,"number-up":h.PrintCapabilities.NUMBER_UP,"number-up-layout":h.PrintCapabilities.NUMBER_UP_LAYOUT,"page-set":h.PrintCapabilities.PAGE_SET,preview:h.PrintCapabilities.PREVIEW,reverse:h.PrintCapabilities.REVERSE,scale:h.PrintCapabilities.SCALE});var Bn=class PrintUnixDialogStory extends T{_button=null;static{S.registerClass({GTypeName:`AdwStorybookPrintUnixDialog`},PrintUnixDialogStory)}constructor(){super(T.fromMeta(PrintUnixDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Rn,component:h.PrintUnixDialog.$gtype}}initialize(){this._button=new h.Button({label:`Print…`,halign:h.Align.CENTER,valign:h.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=h.PrintUnixDialog.new(`Print`,null),t=capabilities(),n=String(this.args.capabilities).split(`|`).map(e=>t[e.trim()]??0).reduce((e,t)=>e|t,0);e.set_manual_capabilities(n),e.set_current_page(2),e.set_support_selection(!0),e.set_has_selection(!0);let r=new h.PrintSettings;r.set_n_copies(Number(this.args.copies)),r.set_collate(this.args.range===`all`),r.set_print_pages(this.args.range===`current`?h.PrintPages.CURRENT:h.PrintPages.ALL),e.set_settings(r),e.present()}updateArgs(e){}};const Vn=`PrintUnixDialog`in h;Vn&&S.type_ensure(Bn.$gtype);const Hn={stories:[Bn].filter(()=>Vn)},Un={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:i.TEXT,defaultValue:`Keyboard Shortcuts`}]};var Wn=__exportAll({ShortcutsDialogStories:()=>Kn,ShortcutsDialogStory:()=>Gn}),Gn=class ShortcutsDialogStory extends T{_button=null;static{S.registerClass({GTypeName:`AdwStorybookShortcutsDialog`},ShortcutsDialogStory)}constructor(){super(T.fromMeta(ShortcutsDialogStory.getMetadata(),`Default`))}static getMetadata(){return{...Un,component:w.ShortcutsDialog.$gtype}}initialize(){this._button=new h.Button({label:`Show dialog`,halign:h.Align.CENTER,valign:h.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 w.ShortcutsSection({title:`General`});e.add(new w.ShortcutsItem({title:`Open Menu`,accelerator:`F10`})),e.add(new w.ShortcutsItem({title:`Preferences`,action_name:`app.preferences`})),e.add(new w.ShortcutsItem({title:`Quit`,accelerator:`<Control>q`}));let t=new w.ShortcutsSection;t.add(new w.ShortcutsItem({title:`Move Tab Left`,accelerator:`<Shift><Control>Page_Up`,direction:h.TextDirection.LTR})),t.add(new w.ShortcutsItem({title:`Move Tab Left`,accelerator:`<Shift><Control>Page_Up`,direction:h.TextDirection.RTL}));let n=new w.ShortcutsDialog({title:this.args.title});n.add(e),n.add(t),n.present(this)}updateArgs(e){}};S.type_ensure(Gn.$gtype);const Kn={stories:[Gn]},qn={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:i.TEXT,defaultValue:`File moved to Trash`},{name:`timeout`,label:`Timeout (s)`,type:i.NUMBER,min:0,max:10,step:1,defaultValue:3},{name:`hasButton`,label:`Action button`,type:i.BOOLEAN,defaultValue:!0},{name:`buttonLabel`,label:`Button label`,type:i.TEXT,defaultValue:`Undo`}]};var Jn=__exportAll({ToastStories:()=>Xn,ToastStory:()=>Yn}),Yn=class ToastStory extends T{_overlay=null;static{S.registerClass({GTypeName:`AdwStorybookToast`},ToastStory)}constructor(){super(T.fromMeta(ToastStory.getMetadata(),`Default`))}static getMetadata(){return{...qn,component:w.Toast.$gtype}}initialize(){let e=new h.Button({label:`Show toast`,halign:h.Align.CENTER,valign:h.Align.CENTER});e.add_css_class(`pill`),e.add_css_class(`suggested-action`),e.connect(`clicked`,()=>this._showToast()),this._overlay=new w.ToastOverlay({child:e,widthRequest:360,heightRequest:220}),this.addContent(this._overlay)}_showToast(){if(!this._overlay)return;let e=new w.Toast({title:this.args.title,timeout:this.args.timeout});this.args.hasButton&&(e.buttonLabel=this.args.buttonLabel),this._overlay.add_toast(e)}updateArgs(e){}};S.type_ensure(Yn.$gtype);const Xn={stories:[Yn]},Zn={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:i.TEXT,defaultValue:`Text Editor`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`notes.md`},{name:`showMenubar`,label:`Show menubar`,type:i.BOOLEAN,defaultValue:!0}]};var Qn=__exportAll({ApplicationWindowStories:()=>er,ApplicationWindowStory:()=>$n}),$n=class ApplicationWindowStory extends T{_window=null;_title=null;_toolbarView=null;_menubar=null;static{S.registerClass({GTypeName:`AdwStorybookApplicationWindow`},ApplicationWindowStory)}constructor(){super(T.fromMeta(ApplicationWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...Zn,component:w.ApplicationWindow.$gtype}}initialize(){this._title=new w.WindowTitle({title:this.args.title,subtitle:this.args.subtitle});let e=new w.HeaderBar({titleWidget:this._title,widthRequest:460}),t=new h.Button({iconName:`go-previous-symbolic`});t.add_css_class(`flat`),e.pack_start(t),this._toolbarView=new w.ToolbarView,this._toolbarView.add_top_bar(e),this._toolbarView.content=new w.StatusPage({title:`Your Library`,description:`Content sits between the toolbars and scrolls independently of them.`});let n=new b.Menu,r=new b.Menu;r.append(`New Window`,`app.new-window`),r.append(`Quit`,`app.quit`),n.append_section(null,r);let i=new b.Menu;i.append(`Keyboard Shortcuts`,`app.shortcuts`),i.append(`About`,`app.about`),n.append_section(null,i),this._menubar=new h.PopoverMenuBar({menu_model:n}),this.args.showMenubar&&this._toolbarView.add_top_bar(this._menubar),this._window=new w.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)}};S.type_ensure($n.$gtype);const er={stories:[$n]},tr={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:i.RANGE,min:.5,max:3,step:.25,defaultValue:2},{name:`xalign`,label:`Xalign`,type:i.RANGE,min:0,max:1,step:.5,defaultValue:.5},{name:`yalign`,label:`Yalign`,type:i.RANGE,min:0,max:1,step:.5,defaultValue:.5},{name:`obeyChild`,label:`Obey child`,type:i.BOOLEAN,defaultValue:!1}]};var nr=__exportAll({AspectFrameStories:()=>ir,AspectFrameStory:()=>rr}),rr=class AspectFrameStory extends T{_frame=null;static{S.registerClass({GTypeName:`AdwStorybookAspectFrame`},AspectFrameStory)}constructor(){super(T.fromMeta(AspectFrameStory.getMetadata(),`Default`))}static getMetadata(){return{...tr,component:h.AspectFrame.$gtype}}initialize(){this._frame=new h.AspectFrame({hexpand:!0,valign:h.Align.CENTER,width_request:320,height_request:180});let e=new h.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)}};S.type_ensure(rr.$gtype);const ir={stories:[rr]},ar={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:i.TEXT,defaultValue:`The one child of this bin.`},{name:`swap`,label:`Replace the child`,type:i.BOOLEAN,defaultValue:!1}]};var or=__exportAll({BinStories:()=>cr,BinStory:()=>sr}),sr=class BinStory extends T{_bin=null;static{S.registerClass({GTypeName:`AdwStorybookBin`},BinStory)}constructor(){super(T.fromMeta(BinStory.getMetadata(),`Default`))}static getMetadata(){return{...ar,component:w.Bin.$gtype}}initialize(){this._bin=new w.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 h.Label({label:e?`The first child was replaced, not stacked.`:this.args.label,wrap:!0,marginTop:18,marginBottom:18,marginStart:18,marginEnd:18}),n=new h.Box;n.add_css_class(`card`),n.append(t),this._bin.child=n}};S.type_ensure(sr.$gtype);const cr={stories:[sr]},lr={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:i.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:i.TEXT,defaultValue:`Narrow`},{name:`wideLabel`,label:`Wide label`,type:i.TEXT,defaultValue:`Wide`}]};var ur=__exportAll({BreakpointBinStories:()=>fr,BreakpointBinStory:()=>dr}),dr=class BreakpointBinStory extends T{_bin=null;_label=null;_breakpoint=null;static{S.registerClass({GTypeName:`AdwStorybookBreakpointBin`},BreakpointBinStory)}constructor(){super(T.fromMeta(BreakpointBinStory.getMetadata(),`Default`))}static getMetadata(){return{...lr,component:w.BreakpointBin.$gtype}}initialize(){this._label=new h.Label({label:this.args.wideLabel,ellipsize:3}),this._label.add_css_class(`title-1`),this._bin=new w.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=w.BreakpointCondition.parse(this.args.condition);e!==null&&(this._breakpoint!==null&&this._bin.remove_breakpoint(this._breakpoint),this._breakpoint=w.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)}};S.type_ensure(dr.$gtype);const fr={stories:[dr]},pr={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:i.BOOLEAN,defaultValue:!0},{name:`baselinePosition`,label:`Baseline position`,type:i.SELECT,options:[{label:`Top`,value:`top`},{label:`Center`,value:`center`},{label:`Bottom`,value:`bottom`}],defaultValue:`center`}]};var mr=__exportAll({CenterBoxStories:()=>_r,CenterBoxStory:()=>gr});const hr={top:h.BaselinePosition.TOP,center:h.BaselinePosition.CENTER,bottom:h.BaselinePosition.BOTTOM};var gr=class CenterBoxStory extends T{_box=null;static{S.registerClass({GTypeName:`AdwStorybookCenterBox`},CenterBoxStory)}constructor(){super(T.fromMeta(CenterBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...pr,component:h.CenterBox.$gtype}}initialize(){this._box=new h.CenterBox({margin_top:12,margin_bottom:12,margin_start:12,margin_end:12}),this._box.set_start_widget(new h.Label({label:`Start`,hexpand:!1})),this._box.set_center_widget(new h.Label({label:`Centre`,hexpand:!0})),this._box.set_end_widget(new h.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=hr[this.args.baselinePosition])}};S.type_ensure(gr.$gtype);const _r={stories:[gr]},vr={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:i.RANGE,min:200,max:600,step:10,defaultValue:400},{name:`tighteningThreshold`,label:`Tightening threshold`,type:i.RANGE,min:100,max:600,step:10,defaultValue:300}]};var yr=__exportAll({ClampScrollableStories:()=>Sr,ClampScrollableStory:()=>xr});const br=Array.from({length:24},(e,t)=>`Line ${t+1}: held at the clamp's width while it scrolls.`);var xr=class ClampScrollableStory extends T{_clamp=null;static{S.registerClass({GTypeName:`AdwStorybookClampScrollable`},ClampScrollableStory)}constructor(){super(T.fromMeta(ClampScrollableStory.getMetadata(),`Default`))}static getMetadata(){return{...vr,component:w.ClampScrollable.$gtype}}initialize(){let e=new h.TextView({editable:!1,cursorVisible:!1,topMargin:12,bottomMargin:12});e.buffer.set_text(br.join(`
343
+ `),-1),this._clamp=new w.ClampScrollable({maximumSize:this.args.maximumSize,tighteningThreshold:this.args.tighteningThreshold,child:e});let t=new h.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)}};S.type_ensure(xr.$gtype);const Sr={stories:[xr]},Cr={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:i.RANGE,min:200,max:600,step:10,defaultValue:400},{name:`tighteningThreshold`,label:`Tightening threshold`,type:i.RANGE,min:100,max:600,step:10,defaultValue:300}]};var wr=__exportAll({ClampStories:()=>Er,ClampStory:()=>Tr}),Tr=class ClampStory extends T{_clamp=null;static{S.registerClass({GTypeName:`AdwStorybookClamp`},ClampStory)}constructor(){super(T.fromMeta(ClampStory.getMetadata(),`Default`))}static getMetadata(){return{...Cr,component:w.Clamp.$gtype}}initialize(){let e=new h.Box({orientation:h.Orientation.HORIZONTAL,widthRequest:520});e.add_css_class(`card`);let t=new h.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 w.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)}};S.type_ensure(Tr.$gtype);const Er={stories:[Tr]},Dr={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:i.BOOLEAN,defaultValue:!1},{name:`useUnderline`,label:`Label marks a mnemonic`,type:i.BOOLEAN,defaultValue:!1},{name:`label`,label:`Label`,type:i.TEXT,defaultValue:`_More options`},{name:`resizeToplevel`,label:`Resize the toplevel`,type:i.BOOLEAN,defaultValue:!1}]};var Or=__exportAll({ExpanderStories:()=>Ar,ExpanderStory:()=>kr}),kr=class ExpanderStory extends T{_expander=null;static{S.registerClass({GTypeName:`AdwStorybookExpander`},ExpanderStory)}constructor(){super(T.fromMeta(ExpanderStory.getMetadata(),`Default`))}static getMetadata(){return{...Dr,component:h.Expander.$gtype}}initialize(){let e=new h.Box({orientation:h.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 h.Label({label:t}));this._expander=new h.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)}};S.type_ensure(kr.$gtype);const Ar={stories:[kr]},jr={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:i.RANGE,min:0,max:80,step:4,defaultValue:24},{name:`offsetY`,label:`Offset y`,type:i.RANGE,min:0,max:80,step:4,defaultValue:16}]};var Mr=__exportAll({FixedStories:()=>Pr,FixedStory:()=>Nr}),Nr=class FixedStory extends T{_fixed=null;_first=null;_second=null;static{S.registerClass({GTypeName:`AdwStorybookFixed`},FixedStory)}constructor(){super(T.fromMeta(FixedStory.getMetadata(),`Default`))}static getMetadata(){return{...jr,component:h.Fixed.$gtype}}initialize(){this._fixed=new h.Fixed,this._first=new h.Label({label:`at (x, y)`}),this._second=new h.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)}};S.type_ensure(Nr.$gtype);const Pr={stories:[Nr]},Fr={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:i.TEXT,defaultValue:`Details`},{name:`labelXalign`,label:`Label xalign`,type:i.RANGE,defaultValue:0,min:0,max:1,step:.5}]};var Ir=__exportAll({FrameStories:()=>Rr,FrameStory:()=>Lr}),Lr=class FrameStory extends T{_frame=null;static{S.registerClass({GTypeName:`AdwStorybookFrame`},FrameStory)}constructor(){super(T.fromMeta(FrameStory.getMetadata(),`Default`))}static getMetadata(){return{...Fr,component:h.Frame.$gtype}}initialize(){this._frame=new h.Frame({halign:h.Align.CENTER});let e=new h.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))}};S.type_ensure(Lr.$gtype);const Rr={stories:[Lr]},zr={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:i.RANGE,min:0,max:36,step:2,defaultValue:12},{name:`rowSpacing`,label:`Row spacing`,type:i.RANGE,min:0,max:36,step:2,defaultValue:12},{name:`columnHomogeneous`,label:`Column homogeneous`,type:i.BOOLEAN,defaultValue:!1},{name:`rowHomogeneous`,label:`Row homogeneous`,type:i.BOOLEAN,defaultValue:!1},{name:`orientation`,label:`Orientation`,type:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`}]};var Br=__exportAll({GridStories:()=>Hr,GridStory:()=>Vr}),Vr=class GridStory extends T{_grid=null;_cells=[];_orientation=null;static{S.registerClass({GTypeName:`AdwStorybookGrid`},GridStory)}constructor(){super(T.fromMeta(GridStory.getMetadata(),`Default`))}static getMetadata(){return{...zr,component:h.Grid.$gtype}}initialize(){this._grid=new h.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 h.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`?h.Orientation.VERTICAL:h.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}};S.type_ensure(Vr.$gtype);const Hr={stories:[Vr]},Ur={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:i.TEXT,defaultValue:`Text Editor`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`notes.md`},{name:`showTitle`,label:`Show title`,type:i.BOOLEAN,defaultValue:!0}]};var Wr=__exportAll({HeaderBarStories:()=>Kr,HeaderBarStory:()=>Gr}),Gr=class HeaderBarStory extends T{_headerBar=null;_title=null;static{S.registerClass({GTypeName:`AdwStorybookHeaderBar`},HeaderBarStory)}constructor(){super(T.fromMeta(HeaderBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Ur,component:w.HeaderBar.$gtype}}initialize(){this._title=new w.WindowTitle({title:this.args.title,subtitle:this.args.subtitle}),this._headerBar=new w.HeaderBar({titleWidget:this._title,showTitle:this.args.showTitle,widthRequest:460});let e=new h.Button({iconName:`go-previous-symbolic`});e.add_css_class(`flat`),this._headerBar.pack_start(e);let t=new b.Menu;t.append(`New Window`,`app.new-window`),t.append(`Preferences`,`app.preferences`),t.append(`About`,`app.about`);let n=new h.MenuButton({iconName:`open-menu-symbolic`,menuModel:t});n.add_css_class(`flat`),this._headerBar.pack_end(n),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)}};S.type_ensure(Gr.$gtype);const Kr={stories:[Gr]},qr={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:i.TEXT,defaultValue:`Inbox`},{name:`visible`,label:`Child visible`,type:i.BOOLEAN,defaultValue:!0}]};var Jr=__exportAll({LayoutSlotStories:()=>Xr,LayoutSlotStory:()=>Yr}),Yr=class LayoutSlotStory extends T{_view=null;_slot=null;_child=null;static{S.registerClass({GTypeName:`AdwStorybookLayoutSlot`},LayoutSlotStory)}constructor(){super(T.fromMeta(LayoutSlotStory.getMetadata(),`Default`))}static getMetadata(){return{...qr,component:w.LayoutSlot.$gtype}}initialize(){this._slot=w.LayoutSlot.new(`primary`),this._child=new w.NavigationPage({title:this.args.label,tag:`primary`,child:new h.Label({label:`The child the view inserted here.`})}),this._view=new w.MultiLayoutView;let e=w.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)}};S.type_ensure(Yr.$gtype);const Xr={stories:[Yr]},Zr={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:i.SELECT,options:[{label:`wide (split)`,value:`wide`},{label:`narrow (stacked)`,value:`narrow`}],defaultValue:`wide`},{name:`showDetails`,label:`Show the details pane`,type:i.BOOLEAN,defaultValue:!0}]};var Qr=__exportAll({MultiLayoutViewStories:()=>ni,MultiLayoutViewStory:()=>ti});const $r=`primary`,ei=`secondary`;function page(e){let t=new h.ListBox({selectionMode:h.SelectionMode.NONE});for(let[n,r]of e)t.append(new w.ActionRow({title:n,subtitle:r}));return t}function slotPage(e){return new w.NavigationPage({title:e,child:w.LayoutSlot.new(e),tag:e})}function arrangement(e){let t=new w.NavigationSplitView({collapsed:e,minSidebarWidth:160});return t.sidebar=slotPage(ei),t.content=slotPage($r),t.set_size_request(420,220),t}var ti=class MultiLayoutViewStory extends T{_view=null;_details=null;static{S.registerClass({GTypeName:`AdwStorybookMultiLayoutView`},MultiLayoutViewStory)}constructor(){super(T.fromMeta(MultiLayoutViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Zr,component:w.MultiLayoutView.$gtype}}initialize(){this._details=page([[`From`,`Adwaita List`],[`Subject`,`Resizing the window`]]),this._view=new w.MultiLayoutView;let e=w.Layout.new(arrangement(!1));e.name=`wide`,this._view.add_layout(e);let t=w.Layout.new(arrangement(!0));t.name=`narrow`,this._view.add_layout(t),this._view.set_child($r,page([[`General`,`12 unread`],[`Starred`,`3 threads`]])),this._view.set_child(ei,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)}};S.type_ensure(ti.$gtype);const ni={stories:[ti]},ri={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:i.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:i.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:i.BOOLEAN,defaultValue:!0}]};var ii=__exportAll({OverlayStories:()=>si,OverlayStory:()=>oi});const ai={start:h.Align.START,center:h.Align.CENTER,end:h.Align.END};var oi=class OverlayStory extends T{_overlay=null;_main=null;_badge=null;static{S.registerClass({GTypeName:`AdwStorybookOverlay`},OverlayStory)}constructor(){super(T.fromMeta(OverlayStory.getMetadata(),`Default`))}static getMetadata(){return{...ri,component:h.Overlay.$gtype}}initialize(){this._main=new h.Frame({width_request:260,height_request:160,margin_top:12,margin_bottom:12});let e=new h.Label({label:`Main child — its size is the overlay`});e.add_css_class(`dim-label`),this._main.set_child(e),this._badge=new h.Box({valign:h.Align.END,halign:h.Align.END}),this._badge.set_css_classes([`osd`,`flat`]),this._badge.append(new h.Label({label:`2`})),this._overlay=new h.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=ai[String(this.args.halign)],t=ai[String(this.args.valign)];e===void 0?this._badge.halign=h.Align.FILL:this._badge.halign=e,t===void 0?this._badge.valign=h.Align.FILL:this._badge.valign=t,this._badge.visible=this.args.showLabel}};S.type_ensure(oi.$gtype);const si={stories:[oi]},ci={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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`wideHandle`,label:`Wide handle`,type:i.BOOLEAN,defaultValue:!1},{name:`resizeStartChild`,label:`Resize the first child`,type:i.BOOLEAN,defaultValue:!0},{name:`resizeEndChild`,label:`Resize the second child`,type:i.BOOLEAN,defaultValue:!0},{name:`shrinkStartChild`,label:`The first child may shrink`,type:i.BOOLEAN,defaultValue:!0},{name:`position`,label:`Position (0 = derive)`,type:i.NUMBER,min:-1,max:400,step:1,defaultValue:-1}]};var li=__exportAll({PanedStories:()=>di,PanedStory:()=>ui});function pane(e,t){let n=new h.Box({orientation:h.Orientation.VERTICAL,spacing:4,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12});n.append(new h.Label({label:e}));let r=new h.Label({label:`${t}px of size request`});return r.add_css_class(`dim-label`),n.append(r),n}var ui=class PanedStory extends T{_paned=null;static{S.registerClass({GTypeName:`AdwStorybookPaned`},PanedStory)}constructor(){super(T.fromMeta(PanedStory.getMetadata(),`Default`))}static getMetadata(){return{...ci,component:h.Paned.$gtype}}initialize(){this._paned=new h.Paned({orientation:h.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`?h.Orientation.VERTICAL:h.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))}};S.type_ensure(ui.$gtype);const di={stories:[ui]},fi=[{label:`Cut`},{label:`Copy`},{label:`Paste`},{label:`Delete`,accel:`<Shift>Delete`}],pi={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:i.BOOLEAN,defaultValue:!0}]};var mi=__exportAll({PopoverBinStories:()=>gi,PopoverBinStory:()=>hi}),hi=class PopoverBinStory extends T{_bin=null;_list=null;static{S.registerClass({GTypeName:`AdwStorybookPopoverBin`},PopoverBinStory)}constructor(){super(T.fromMeta(PopoverBinStory.getMetadata(),`Default`))}static getMetadata(){return{...pi,component:h.PopoverBin.$gtype}}initialize(){this._list=new h.ListBox({selectionMode:h.SelectionMode.SINGLE});for(let e of[`Documents`,`Downloads`,`Pictures`])this._list.append(new h.ListBoxRow({child:new h.Label({label:e})}));this._bin=new h.PopoverBin({child:this._list}),this._apply(),this.addContent(this._bin)}updateArgs(e){this._apply()}_buildMenu(){let e=new b.Menu;for(let t of fi)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)}};S.type_ensure(hi.$gtype);const gi={stories:[hi]},_i=[{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`}]}],vi={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:i.TEXT,defaultValue:`Document`},{name:`position`,label:`Position`,type:i.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:i.SELECT,options:[{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`start`},{name:`autohide`,label:`Dismiss on outside click`,type:i.BOOLEAN,defaultValue:!0}]};var yi=__exportAll({PopoverMenuStories:()=>xi,PopoverMenuStory:()=>bi});const actionOf=e=>`app.${e.toLowerCase().replace(/[^a-z0-9]+/g,`-`)}`;var bi=class PopoverMenuStory extends T{_anchor=null;_popover=null;static{S.registerClass({GTypeName:`AdwStorybookPopoverMenu`},PopoverMenuStory)}constructor(){super(T.fromMeta(PopoverMenuStory.getMetadata(),`Default`))}static getMetadata(){return{...vi,component:h.PopoverMenu.$gtype}}initialize(){this._anchor=new h.Button({label:`Open menu`,halign:h.Align.CENTER}),this._apply(),this.addContent(this._anchor)}updateArgs(e){this._apply()}_buildMenu(e){let t=new b.Menu,n=[];for(let e of _i){if(`submenu`in e){let n=new b.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 b.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 r=new b.Menu;for(let e of n)r.append(e,actionOf(e));t.append_section(e,r)}else for(let e of n)t.append(e,actionOf(e));return t}_apply(){if(!this._anchor)return;let e=this._popover;this._popover=h.PopoverMenu.new_from_model(this._buildMenu(this.args.menuTitle)),this._popover.set_parent(this._anchor),e?.unparent();let t={bottom:h.PositionType.BOTTOM,top:h.PositionType.TOP,start:h.PositionType.LEFT,end:h.PositionType.RIGHT};this._popover.position=t[this.args.position]??h.PositionType.BOTTOM,this._anchor&&(this._anchor.halign=this.args.align===`end`?h.Align.END:h.Align.START),this._popover.autohide=this.args.autohide}};S.type_ensure(bi.$gtype);const xi={stories:[bi]},Si={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:i.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:i.SELECT,options:[{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`start`},{name:`autohide`,label:`Dismiss on outside click`,type:i.BOOLEAN,defaultValue:!0}]};var Ci=__exportAll({PopoverStories:()=>Ti,PopoverStory:()=>wi}),wi=class PopoverStory extends T{_anchor=null;_popover=null;static{S.registerClass({GTypeName:`AdwStorybookPopover`},PopoverStory)}constructor(){super(T.fromMeta(PopoverStory.getMetadata(),`Default`))}static getMetadata(){return{...Si,component:h.Popover.$gtype}}initialize(){let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:6});e.append(new h.Label({label:`Anything you like`})),e.append(new h.Label({label:`in here`})),this._anchor=new h.Button({label:`Show popover`,halign:h.Align.CENTER}),this._popover=new h.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:h.PositionType.BOTTOM,top:h.PositionType.TOP,start:h.PositionType.LEFT,end:h.PositionType.RIGHT};this._popover.position=e[this.args.position]??h.PositionType.BOTTOM,this._anchor&&(this._anchor.halign=this.args.align===`end`?h.Align.END:h.Align.START),this._popover.autohide=this.args.autohide}};S.type_ensure(wi.$gtype);const Ti={stories:[wi]},Ei={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:i.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:i.RANGE,min:0,max:800,step:50,defaultValue:250},{name:`revealChild`,label:`Reveal`,type:i.BOOLEAN,defaultValue:!0}]};var Di=__exportAll({RevealerStories:()=>Ai,RevealerStory:()=>ki});const Oi={none:h.RevealerTransitionType.NONE,crossfade:h.RevealerTransitionType.CROSSFADE,"slide-right":h.RevealerTransitionType.SLIDE_RIGHT,"slide-left":h.RevealerTransitionType.SLIDE_LEFT,"slide-up":h.RevealerTransitionType.SLIDE_UP,"slide-down":h.RevealerTransitionType.SLIDE_DOWN,"swing-right":h.RevealerTransitionType.SWING_RIGHT,"swing-left":h.RevealerTransitionType.SWING_LEFT,"swing-up":h.RevealerTransitionType.SWING_UP,"swing-down":h.RevealerTransitionType.SWING_DOWN,"fade-slide-right":h.RevealerTransitionType.FADE_SLIDE_RIGHT,"fade-slide-left":h.RevealerTransitionType.FADE_SLIDE_LEFT,"fade-slide-up":h.RevealerTransitionType.FADE_SLIDE_UP,"fade-slide-down":h.RevealerTransitionType.FADE_SLIDE_DOWN};var ki=class RevealerStory extends T{_revealer=null;static{S.registerClass({GTypeName:`AdwStorybookRevealer`},RevealerStory)}constructor(){super(T.fromMeta(RevealerStory.getMetadata(),`Default`))}static getMetadata(){return{...Ei,component:h.Revealer.$gtype}}initialize(){let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:6,margin_top:12,margin_bottom:12,margin_start:12,margin_end:12});e.append(new h.Label({label:`The revealed child`}));let t=new h.Label({label:`Drag the controls to change the transition`});t.add_css_class(`dim-label`),e.append(t),this._revealer=new h.Revealer,this._revealer.set_child(e),this._apply(),this.addContent(this._revealer)}updateArgs(e){this._apply()}_apply(){this._revealer&&(this._revealer.transition_type=Oi[String(this.args.transitionType)],this._revealer.transition_duration=Number(this.args.transitionDuration),this._revealer.reveal_child=this.args.revealChild)}};S.type_ensure(ki.$gtype);const Ai={stories:[ki]},ji={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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`vertical`},{name:`upper`,label:`Adjustment upper`,type:i.NUMBER,defaultValue:400},{name:`pageSize`,label:`Adjustment page size`,type:i.NUMBER,defaultValue:120},{name:`value`,label:`Adjustment value`,type:i.NUMBER,defaultValue:80}]};var Mi=__exportAll({ScrollbarStories:()=>Pi,ScrollbarStory:()=>Ni}),Ni=class ScrollbarStory extends T{_scrollbar=null;static{S.registerClass({GTypeName:`AdwStorybookScrollbar`},ScrollbarStory)}constructor(){super(T.fromMeta(ScrollbarStory.getMetadata(),`Default`))}static getMetadata(){return{...ji,component:h.Scrollbar.$gtype}}initialize(){this._scrollbar=new h.Scrollbar({adjustment:new h.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`?h.Orientation.HORIZONTAL:h.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))}};S.type_ensure(Ni.$gtype);const Pi={stories:[Ni]},Fi={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:i.SELECT,options:[{label:`Automatic`,value:`automatic`},{label:`Always`,value:`always`},{label:`Never`,value:`never`}],defaultValue:`automatic`},{name:`vPolicy`,label:`Vertical policy`,type:i.SELECT,options:[{label:`Automatic`,value:`automatic`},{label:`Always`,value:`always`},{label:`Never`,value:`never`}],defaultValue:`automatic`},{name:`placement`,label:`Window placement`,type:i.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:i.BOOLEAN,defaultValue:!1},{name:`overlayScrolling`,label:`Overlay scrolling`,type:i.BOOLEAN,defaultValue:!0}]};var Ii=__exportAll({ScrolledWindowStories:()=>Bi,ScrolledWindowStory:()=>zi});const Li={automatic:h.PolicyType.AUTOMATIC,always:h.PolicyType.ALWAYS,never:h.PolicyType.NEVER},Ri={"top-left":h.CornerType.TOP_LEFT,"top-right":h.CornerType.TOP_RIGHT,"bottom-left":h.CornerType.BOTTOM_LEFT,"bottom-right":h.CornerType.BOTTOM_RIGHT};var zi=class ScrolledWindowStory extends T{_window=null;static{S.registerClass({GTypeName:`AdwStorybookScrolledWindow`},ScrolledWindowStory)}constructor(){super(T.fromMeta(ScrolledWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...Fi,component:h.ScrolledWindow.$gtype}}initialize(){let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:8});for(let t=1;t<=16;t++)e.append(new h.Label({label:`Row ${t}`}));this._window=new h.ScrolledWindow({child:e,min_content_height:240,halign:h.Align.CENTER}),this._apply(),this.addContent(this._window)}updateArgs(e){this._apply()}_apply(){let e=this._window;e&&(e.set_policy(Li[this.args.hPolicy]??h.PolicyType.AUTOMATIC,Li[this.args.vPolicy]??h.PolicyType.AUTOMATIC),e.set_placement(Ri[this.args.placement]??h.CornerType.TOP_LEFT),e.has_frame=this.args.frame,e.set_overlay_scrolling(this.args.overlayScrolling))}};S.type_ensure(zi.$gtype);const Bi={stories:[zi]},Vi={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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`spacer`,label:`Spacer (draws nothing)`,type:i.BOOLEAN,defaultValue:!1}]};var Hi=__exportAll({SeparatorStories:()=>Wi,SeparatorStory:()=>Ui}),Ui=class SeparatorStory extends T{_box=null;_separator=null;static{S.registerClass({GTypeName:`AdwStorybookSeparator`},SeparatorStory)}constructor(){super(T.fromMeta(SeparatorStory.getMetadata(),`Default`))}static getMetadata(){return{...Vi,component:h.Separator.$gtype}}initialize(){this._separator=new h.Separator,this._box=new h.Box({spacing:12,halign:h.Align.CENTER}),this._box.append(new h.Label({label:`Above`})),this._box.append(this._separator),this._box.append(new h.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?h.Orientation.VERTICAL:h.Orientation.HORIZONTAL,this._box.orientation=e?h.Orientation.HORIZONTAL:h.Orientation.VERTICAL,this.args.spacer?this._separator.add_css_class(`spacer`):this._separator.remove_css_class(`spacer`)}};S.type_ensure(Ui.$gtype);const Wi={stories:[Ui]},Gi={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:i.BOOLEAN,defaultValue:!0},{name:`revealBottomBars`,label:`Reveal bottom bars`,type:i.BOOLEAN,defaultValue:!0}]};var Ki=__exportAll({ToolbarViewStories:()=>Ji,ToolbarViewStory:()=>qi}),qi=class ToolbarViewStory extends T{_view=null;static{S.registerClass({GTypeName:`AdwStorybookToolbarView`},ToolbarViewStory)}constructor(){super(T.fromMeta(ToolbarViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Gi,component:w.ToolbarView.$gtype}}initialize(){this._view=new w.ToolbarView({widthRequest:460,heightRequest:320,revealTopBars:this.args.revealTopBars,revealBottomBars:this.args.revealBottomBars});let e=new w.HeaderBar({titleWidget:new w.WindowTitle({title:`Documents`,subtitle:`12 items`})});this._view.add_top_bar(e);let t=new w.StatusPage({iconName:`folder-documents-symbolic`,title:`Your library`,description:`Content sits between the toolbars and scrolls independently of them.`});this._view.content=t;let n=new h.ActionBar,r=new h.Button({iconName:`list-add-symbolic`});r.add_css_class(`flat`);let i=new h.Button({iconName:`list-remove-symbolic`});i.add_css_class(`flat`),n.pack_start(r),n.pack_start(i),n.set_center_widget(new h.Label({label:`Selection: none`}));let a=new h.Button({iconName:`send-to-symbolic`});a.add_css_class(`flat`),n.pack_end(a),this._view.add_bottom_bar(n),this.addContent(this._view)}updateArgs(e){this._view&&(this._view.revealTopBars=this.args.revealTopBars,this._view.revealBottomBars=this.args.revealBottomBars)}};S.type_ensure(qi.$gtype);const Ji={stories:[qi]},Yi={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:i.BOOLEAN,defaultValue:!0}]};var Xi=__exportAll({ViewportStories:()=>Qi,ViewportStory:()=>Zi}),Zi=class ViewportStory extends T{_viewport=null;static{S.registerClass({GTypeName:`AdwStorybookViewport`},ViewportStory)}constructor(){super(T.fromMeta(ViewportStory.getMetadata(),`Default`))}static getMetadata(){return{...Yi,component:h.Viewport.$gtype}}initialize(){let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:8});for(let t=1;t<=16;t++)e.append(new h.Label({label:`Row ${t}`}));e.append(new h.Button({label:`Focus me`,halign:h.Align.START})),this._viewport=new h.Viewport({child:e,halign:h.Align.CENTER}),this._apply(),this.addContent(this._viewport)}updateArgs(e){this._apply()}_apply(){this._viewport&&this._viewport.set_scroll_to_focus(this.args.scrollToFocus)}};S.type_ensure(Zi.$gtype);const Qi={stories:[Zi]},$i={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:i.TEXT,defaultValue:`Text Editor`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`notes.md`}]};var ea=__exportAll({WindowStories:()=>na,WindowStory:()=>ta}),ta=class WindowStory extends T{_window=null;_title=null;static{S.registerClass({GTypeName:`AdwStorybookWindow`},WindowStory)}constructor(){super(T.fromMeta(WindowStory.getMetadata(),`Default`))}static getMetadata(){return{...$i,component:w.Window.$gtype}}initialize(){this._title=new w.WindowTitle({title:this.args.title,subtitle:this.args.subtitle});let e=new w.HeaderBar({titleWidget:this._title,widthRequest:460}),t=new h.Button({iconName:`go-previous-symbolic`});t.add_css_class(`flat`),e.pack_start(t);let n=new h.MenuButton({iconName:`open-menu-symbolic`});n.add_css_class(`flat`),e.pack_end(n);let r=new w.ToolbarView;r.add_top_bar(e),r.content=new w.StatusPage({title:`Your Library`,description:`Content sits between the toolbars and scrolls independently of them.`}),this._window=new w.Window({content:r}),this.addContent(this._window)}updateArgs(e){this._title&&(this._title.title=this.args.title,this._title.subtitle=this.args.subtitle)}};S.type_ensure(ta.$gtype);const na={stories:[ta]},ra={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:i.RANGE,min:0,max:36,step:1,defaultValue:8},{name:`lineSpacing`,label:`Line spacing`,type:i.RANGE,min:0,max:36,step:1,defaultValue:8}]};var ia=__exportAll({WrapBoxStories:()=>oa,WrapBoxStory:()=>aa}),aa=class WrapBoxStory extends T{_wrap=null;static{S.registerClass({GTypeName:`AdwStorybookWrapBox`},WrapBoxStory)}constructor(){super(T.fromMeta(WrapBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...ra,component:w.WrapBox.$gtype}}initialize(){this._wrap=new w.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 h.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)}};S.type_ensure(aa.$gtype);const oa={stories:[aa]},sa={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:i.TEXT,defaultValue:`avatar-default-symbolic`},{name:`size`,label:`Size (px)`,type:i.RANGE,min:16,max:96,step:8,defaultValue:48},{name:`disabled`,label:`Disabled`,type:i.BOOLEAN,defaultValue:!1}]};var ca=__exportAll({ImageStories:()=>ua,ImageStory:()=>la}),la=class ImageStory extends T{_image=null;static{S.registerClass({GTypeName:`AdwStorybookImage`},ImageStory)}constructor(){super(T.fromMeta(ImageStory.getMetadata(),`Default`))}static getMetadata(){return{...sa,component:h.Image.$gtype}}initialize(){this._image=new h.Image({halign:h.Align.CENTER,valign:h.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)}};S.type_ensure(la.$gtype);const ua={stories:[la]},da={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:i.TEXT,defaultValue:`Inscription`},{name:`minChars`,label:`Min chars`,type:i.RANGE,min:0,max:40,step:1,defaultValue:3},{name:`natChars`,label:`Nat chars`,type:i.RANGE,min:0,max:40,step:1,defaultValue:0},{name:`minLines`,label:`Min lines`,type:i.RANGE,min:0,max:6,step:1,defaultValue:1},{name:`natLines`,label:`Nat lines`,type:i.RANGE,min:0,max:6,step:1,defaultValue:0},{name:`wrapMode`,label:`Wrap mode`,type:i.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:i.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:i.RANGE,min:0,max:1,step:.05,defaultValue:0},{name:`yalign`,label:`Y align`,type:i.RANGE,min:0,max:1,step:.05,defaultValue:.5}]};var fa=__exportAll({InscriptionStories:()=>ma,InscriptionStory:()=>pa}),pa=class InscriptionStory extends T{_inscription=null;_frame=null;static{S.registerClass({GTypeName:`AdwStorybookInscription`},InscriptionStory)}constructor(){super(T.fromMeta(InscriptionStory.getMetadata(),`Default`))}static getMetadata(){return{...da,component:h.Inscription.$gtype}}initialize(){this._inscription=new h.Inscription,this._frame=new h.Frame({child:this._inscription,halign:h.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)}};S.type_ensure(pa.$gtype);const ma={stories:[pa]},ha={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:i.BOOLEAN,defaultValue:!0}]};var ga=__exportAll({MediaControlsStories:()=>va,MediaControlsStory:()=>_a}),_a=class MediaControlsStory extends T{_controls=null;static{S.registerClass({GTypeName:`AdwStorybookMediaControls`},MediaControlsStory)}constructor(){super(T.fromMeta(MediaControlsStory.getMetadata(),`Default`))}static getMetadata(){return{...ha,component:h.MediaControls.$gtype}}initialize(){this._controls=new h.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)}};S.type_ensure(_a.$gtype);const va={stories:[_a]},ya={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:i.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:i.BOOLEAN,defaultValue:!0},{name:`alternativeText`,label:`Alternative text`,type:i.TEXT,defaultValue:`A tangerine`},{name:`isolateContents`,label:`Isolate contents`,type:i.BOOLEAN,defaultValue:!0},{name:`keepAspectRatio`,label:`Keep aspect ratio (deprecated)`,type:i.BOOLEAN,defaultValue:!0},{name:`width`,label:`Width (px)`,type:i.RANGE,min:64,max:320,step:16,defaultValue:240}]};var ba=__exportAll({PictureStories:()=>Sa,PictureStory:()=>xa});function makePaintable(){let e=320*4,t=new Uint8Array(e*180);for(let n=0;n<180;n++){let r=n<180/2?48:144;for(let i=0;i<320;i++){let a=n*e+i*4;t[a]=r,t[a+1]=i<320/2?64:192,t[a+2]=160,t[a+3]=255}}return f.MemoryTexture.new(320,180,f.MemoryFormat.R8G8B8A8,l.Bytes.new(t),e)}var xa=class PictureStory extends T{_picture=null;static{S.registerClass({GTypeName:`AdwStorybookPicture`},PictureStory)}constructor(){super(T.fromMeta(PictureStory.getMetadata(),`Default`))}static getMetadata(){return{...ya,component:h.Picture.$gtype}}initialize(){this._picture=new h.Picture({paintable:makePaintable(),halign:h.Align.CENTER,valign:h.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}};S.type_ensure(xa.$gtype);const Sa={stories:[xa]},Ca={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:i.BOOLEAN,defaultValue:!1},{name:`loop`,label:`Loop`,type:i.BOOLEAN,defaultValue:!0},{name:`graphicsOffload`,label:`Graphics offload`,type:i.BOOLEAN,defaultValue:!1},{name:`width`,label:`Width (px)`,type:i.RANGE,min:160,max:480,step:40,defaultValue:320}]};var wa=__exportAll({VideoStories:()=>Ea,VideoStory:()=>Ta}),Ta=class VideoStory extends T{_video=null;static{S.registerClass({GTypeName:`AdwStorybookVideo`},VideoStory)}constructor(){super(T.fromMeta(VideoStory.getMetadata(),`Default`))}static getMetadata(){return{...Ca,component:h.Video.$gtype}}initialize(){this._video=new h.Video({halign:h.Align.CENTER,valign:h.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?h.GraphicsOffloadEnabled.ENABLED:h.GraphicsOffloadEnabled.DISABLED}};S.type_ensure(Ta.$gtype);const Ea={stories:[Ta]},Da={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:i.BOOLEAN,defaultValue:!0},{name:`modal`,label:`Modal`,type:i.BOOLEAN,defaultValue:!0},{name:`canClose`,label:`Can close`,type:i.BOOLEAN,defaultValue:!0}]};var Oa=__exportAll({BottomSheetStories:()=>Aa,BottomSheetStory:()=>ka}),ka=class BottomSheetStory extends T{_sheet=null;static{S.registerClass({GTypeName:`AdwStorybookBottomSheet`},BottomSheetStory)}constructor(){super(T.fromMeta(BottomSheetStory.getMetadata(),`Default`))}static getMetadata(){return{...Da,component:w.BottomSheet.$gtype}}buildContent(){let e=new h.Button({label:`Toggle sheet`,halign:h.Align.CENTER,valign:h.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 h.Box({orientation:h.Orientation.VERTICAL,spacing:12,marginTop:18,marginBottom:24,marginStart:18,marginEnd:18});e.append(new h.Label({label:`Share track`,halign:h.Align.START,cssClasses:[`title-2`]}));let t=new w.PreferencesGroup;for(let[e,n]of[[`Copy link`,`edit-copy-symbolic`],[`Send to a friend`,`mail-send-symbolic`],[`Add to playlist`,`list-add-symbolic`]]){let r=new w.ActionRow({title:e});r.add_prefix(new h.Image({iconName:n})),r.activatable=!0,t.add(r)}return e.append(t),e}initialize(){this._sheet=new w.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)}};S.type_ensure(ka.$gtype);const Aa={stories:[ka]},ja={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:i.BOOLEAN,defaultValue:!0},{name:`collapsed`,label:`Collapsed`,type:i.BOOLEAN,defaultValue:!1}]};var Ma=__exportAll({NavigationSplitViewStories:()=>Pa,NavigationSplitViewStory:()=>Na}),Na=class NavigationSplitViewStory extends T{_view=null;static{S.registerClass({GTypeName:`AdwStorybookNavigationSplitView`},NavigationSplitViewStory)}constructor(){super(T.fromMeta(NavigationSplitViewStory.getMetadata(),`Default`))}static getMetadata(){return{...ja,component:w.NavigationSplitView.$gtype}}buildSidebar(){let e=new w.PreferencesGroup;for(let[t,n,r]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 i=new w.ActionRow({title:t,subtitle:n});i.add_prefix(new h.Image({iconName:r})),i.activatable=!0,e.add(i)}let t=new w.ToolbarView;return t.add_top_bar(new w.HeaderBar),t.content=e,new w.NavigationPage({title:`Mailboxes`,child:t})}buildContent(){let e=new w.StatusPage({iconName:`mail-unread-symbolic`,title:`All Mail`,description:`Select a conversation from the list to read it here.`,vexpand:!0}),t=new w.ToolbarView;return t.add_top_bar(new w.HeaderBar),t.content=e,new w.NavigationPage({title:`All Mail`,child:t})}initialize(){this._view=new w.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)}};S.type_ensure(Na.$gtype);const Pa={stories:[Na]},Fa={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:i.TEXT,defaultValue:`Contacts`},{name:`detailTitle`,label:`Detail title`,type:i.TEXT,defaultValue:`Ada Lovelace`},{name:`animateTransitions`,label:`Animate transitions`,type:i.BOOLEAN,defaultValue:!0}]};var Ia=__exportAll({NavigationViewStories:()=>Ra,NavigationViewStory:()=>La}),La=class NavigationViewStory extends T{_view=null;static{S.registerClass({GTypeName:`AdwStorybookNavigationView`},NavigationViewStory)}constructor(){super(T.fromMeta(NavigationViewStory.getMetadata(),`Default`))}static getMetadata(){return{...Fa,component:w.NavigationView.$gtype}}buildPage(e,t){let n=new w.ToolbarView;return n.add_top_bar(new w.HeaderBar),n.content=t,new w.NavigationPage({title:e,child:n})}initialize(){this._view=new w.NavigationView({animateTransitions:this.args.animateTransitions,widthRequest:480,heightRequest:340});let e=this.buildPage(this.args.detailTitle,new w.StatusPage({iconName:`avatar-default-symbolic`,title:this.args.detailTitle,description:`Mathematician and writer, the first computer programmer.`,vexpand:!0})),t=new h.Button({label:`Open contact`,halign:h.Align.CENTER,valign:h.Align.CENTER,vexpand:!0});t.add_css_class(`pill`),t.add_css_class(`suggested-action`),t.connect(`clicked`,()=>{this._view?.push(e)});let n=this.buildPage(this.args.rootTitle,t);this._view.add(n),this._view.add(e),this.addContent(this._view)}updateArgs(e){this._view&&(this._view.animateTransitions=this.args.animateTransitions)}};S.type_ensure(La.$gtype);const Ra={stories:[La]},za={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:i.BOOLEAN,defaultValue:!0},{name:`collapsed`,label:`Collapsed`,type:i.BOOLEAN,defaultValue:!1}]};var Ba=__exportAll({OverlaySplitViewStories:()=>Ha,OverlaySplitViewStory:()=>Va}),Va=class OverlaySplitViewStory extends T{_view=null;static{S.registerClass({GTypeName:`AdwStorybookOverlaySplitView`},OverlaySplitViewStory)}constructor(){super(T.fromMeta(OverlaySplitViewStory.getMetadata(),`Default`))}static getMetadata(){return{...za,component:w.OverlaySplitView.$gtype}}buildSidebar(){let e=new w.PreferencesGroup;for(let[t,n]of[[`Home`,`go-home-symbolic`],[`Discover`,`system-search-symbolic`],[`Library`,`folder-music-symbolic`],[`Settings`,`emblem-system-symbolic`]]){let r=new w.ActionRow({title:t});r.add_prefix(new h.Image({iconName:n})),r.activatable=!0,e.add(r)}let t=new w.ToolbarView;return t.add_top_bar(new w.HeaderBar({showTitle:!1})),t.content=e,t.add_css_class(`sidebar`),t}buildContent(){let e=new w.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 w.ToolbarView;return t.add_top_bar(new w.HeaderBar),t.content=e,t}initialize(){this._view=new w.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)}};S.type_ensure(Va.$gtype);const Ha={stories:[Va]},Ua=[{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`}]}],Wa={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:i.SELECT,options:[{label:`Below`,value:`bottom`},{label:`Above`,value:`top`}],defaultValue:`bottom`},{name:`showLast`,label:`Include Help`,type:i.BOOLEAN,defaultValue:!0}]};var Ga=__exportAll({PopoverMenuBarStories:()=>qa,PopoverMenuBarStory:()=>Ka}),Ka=class PopoverMenuBarStory extends T{_bar=null;static{S.registerClass({GTypeName:`AdwStorybookPopoverMenuBar`},PopoverMenuBarStory)}constructor(){super(T.fromMeta(PopoverMenuBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Wa,component:h.PopoverMenuBar.$gtype}}initialize(){this._bar=h.PopoverMenuBar.new_from_model(this._buildMenu()),this._bar.halign=h.Align.START,this._apply(),this.addContent(this._bar)}updateArgs(e){this._apply()}_buildMenu(){let e=new b.Menu,t=this.args.showLast===!1?Ua.slice(0,3):Ua;for(let n of t){let t=new b.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?h.PositionType.TOP:h.PositionType.BOTTOM)}};S.type_ensure(Ka.$gtype);const qa={stories:[Ka]},Ja={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:i.SELECT,options:[{label:`Sidebar`,value:`sidebar`},{label:`Page`,value:`page`}],defaultValue:`sidebar`},{name:`selected`,label:`Selected index`,type:i.NUMBER,min:0,max:3,step:1,defaultValue:0}]};var Ya=__exportAll({SidebarStories:()=>Za,SidebarStory:()=>Xa}),Xa=class SidebarStory extends T{_sidebar=null;_status=null;static{S.registerClass({GTypeName:`AdwStorybookSidebar`},SidebarStory)}constructor(){super(T.fromMeta(SidebarStory.getMetadata(),`Default`))}static getMetadata(){return{...Ja,component:w.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`?w.SidebarMode.PAGE:w.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 w.SidebarSection({title:`Mailboxes`});for(let t of this.items)e.append(new w.SidebarItem({title:t.title,subtitle:t.subtitle,iconName:t.icon}));this._sidebar=new w.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 w.StatusPage({hexpand:!0,vexpand:!0});let t=new h.Box({orientation:h.Orientation.HORIZONTAL,widthRequest:480,heightRequest:340});t.append(this._sidebar),t.append(new h.Separator({orientation:h.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())}};S.type_ensure(Xa.$gtype);const Za={stories:[Xa]},Qa=[{title:`Sync`,kind:`switch`,active:!0},{title:`Export`,kind:`action`}],$a=[`Blue`,`Teal`,`Green`,`Orange`],Y={appearance:`Appearance`,account:`Account`,shortcuts:`Shortcuts`,actions:`Actions`},X={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`},Z={value:3,lower:1,upper:10,step:1},eo=[{title:`Copy`,accelerator:`<Control>C`},{title:`Select all`,accelerator:`<Shift><Control>a`},{title:`Switch tab`,accelerator:`<Alt>1...9`}],to={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:i.BOOLEAN,description:`Adw.Banner:revealed — animates in and out`,defaultValue:!0}]};var no=__exportAll({OverviewWidgetsStories:()=>io,OverviewWidgetsStory:()=>ro}),ro=class OverviewWidgetsStory extends T{_banner=null;static{S.registerClass({GTypeName:`AdwStorybookOverviewWidgets`},OverviewWidgetsStory)}constructor(){super(T.fromMeta(OverviewWidgetsStory.getMetadata(),`Default`))}static getMetadata(){return to}initialize(){let e=new h.Box({orientation:h.Orientation.VERTICAL,hexpand:!0});this._banner=new w.Banner({title:X.bannerTitle,button_label:X.bannerButton,revealed:this.args.revealed}),e.append(this._banner);let t=new w.PreferencesPage({hexpand:!0}),n=new w.PreferencesGroup({title:Y.appearance});n.add(new w.SwitchRow({title:X.darkMode,subtitle:X.darkModeSubtitle,active:!1})),n.add(new w.SwitchRow({title:X.notifications,subtitle:X.notificationsSubtitle,active:!0})),n.add(new w.ComboRow({title:X.accentColor,model:h.StringList.new([...$a]),selected:0})),t.add(n);let r=new w.PreferencesGroup({title:Y.account}),i=new w.EntryRow({title:X.name});i.set_text(X.nameValue),r.add(i);let a=new w.EntryRow({title:X.email});a.set_text(X.emailValue),r.add(a);let o=new w.SpinRow({title:X.devices,adjustment:new h.Adjustment({value:Z.value,lower:Z.lower,upper:Z.upper,step_increment:Z.step,page_increment:Z.step})});o.set_value(Z.value),r.add(o);let s=new w.ExpanderRow({title:X.advanced,subtitle:X.advancedSubtitle,expanded:!0});for(let e of Qa)s.add_row(e.kind===`switch`?new w.SwitchRow({title:e.title,active:e.active??!1}):new w.ActionRow({title:e.title}));r.add(s),t.add(r);let c=new w.PreferencesGroup({title:Y.shortcuts});for(let e of eo){let t=new w.ActionRow({title:e.title});t.add_suffix(new w.ShortcutLabel({accelerator:e.accelerator,valign:h.Align.CENTER})),c.add(t)}t.add(c);let l=new w.PreferencesGroup({title:Y.actions}),u=new h.Box({orientation:h.Orientation.HORIZONTAL,spacing:12,homogeneous:!0,margin_top:6,margin_bottom:6}),d=new h.Button({label:X.save});d.add_css_class(`suggested-action`),u.append(d);let f=new h.Button({label:X.delete});f.add_css_class(`destructive-action`),u.append(f),l.add(u),t.add(l),e.append(t),this.addContent(e)}updateArgs(e){this._banner?.set_revealed(this.args.revealed)}};S.type_ensure(ro.$gtype);const io={stories:[ro]},ao={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:i.TEXT,defaultValue:`Ada Lovelace`},{name:`size`,label:`Size`,type:i.RANGE,min:24,max:160,step:8,defaultValue:96},{name:`showInitials`,label:`Show initials`,type:i.BOOLEAN,defaultValue:!0},{name:`iconName`,label:`Fallback icon`,type:i.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 oo=__exportAll({AvatarStories:()=>co,AvatarStory:()=>so}),so=class AvatarStory extends T{_avatar=null;static{S.registerClass({GTypeName:`AdwStorybookAvatar`},AvatarStory)}constructor(){super(T.fromMeta(AvatarStory.getMetadata(),`Default`))}static getMetadata(){return{...ao,component:w.Avatar.$gtype}}initialize(){this._avatar=new w.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)}};S.type_ensure(so.$gtype);const co={stories:[so]},lo={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:i.TEXT,defaultValue:`Metered connection — updates paused`},{name:`buttonLabel`,label:`Button label`,type:i.TEXT,defaultValue:`Resume`},{name:`revealed`,label:`Revealed`,type:i.BOOLEAN,defaultValue:!0},{name:`useMarkup`,label:`Use markup`,type:i.BOOLEAN,defaultValue:!1}]};var uo=__exportAll({BannerStories:()=>po,BannerStory:()=>fo}),fo=class BannerStory extends T{_banner=null;static{S.registerClass({GTypeName:`AdwStorybookBanner`},BannerStory)}constructor(){super(T.fromMeta(BannerStory.getMetadata(),`Default`))}static getMetadata(){return{...lo,component:w.Banner.$gtype}}initialize(){this._banner=new w.Banner({title:this.args.title,buttonLabel:this.args.buttonLabel,revealed:this.args.revealed,useMarkup:this.args.useMarkup});let e=new h.Box({orientation:h.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)}};S.type_ensure(fo.$gtype);const po={stories:[fo]},mo=[14,25],ho={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:i.BOOLEAN,defaultValue:!0},{name:`showDayNames`,label:`Day names`,type:i.BOOLEAN,defaultValue:!0},{name:`showWeekNumbers`,label:`Week numbers`,type:i.BOOLEAN,defaultValue:!0}]};var go=__exportAll({CalendarStories:()=>vo,CalendarStory:()=>_o}),_o=class CalendarStory extends T{_calendar=null;_marked=!1;static{S.registerClass({GTypeName:`AdwStorybookCalendar`},CalendarStory)}constructor(){super(T.fromMeta(CalendarStory.getMetadata(),`Default`))}static getMetadata(){return{...ho,component:h.Calendar.$gtype}}initialize(){this._calendar=new h.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 mo)this._calendar.mark_day(e);this._marked=!0}}};function parseIso(e){let[t,n,r]=e.split(`-`).map(Number);return l.DateTime.new_local(t,n,r,0,0,0)}S.type_ensure(_o.$gtype);const vo={stories:[_o]},yo=[{value:`de`,label:`German`},{value:`fr`,label:`French`},{value:`nl`,label:`Dutch`},{value:`pt`,label:`Portuguese`}],bo={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:i.BOOLEAN,defaultValue:!0},{name:`showColumnSeparators`,label:`Column separators`,type:i.BOOLEAN,defaultValue:!1},{name:`reorderable`,label:`Drag columns to reorder`,type:i.BOOLEAN,defaultValue:!1}]};var xo=__exportAll({ColumnViewStories:()=>Co,ColumnViewStory:()=>So}),So=class ColumnViewStory extends T{_view=null;static{S.registerClass({GTypeName:`AdwStorybookColumnView`},ColumnViewStory)}constructor(){super(T.fromMeta(ColumnViewStory.getMetadata(),`Default`))}static getMetadata(){return{...bo,component:h.ColumnView.$gtype}}initialize(){let e=h.StringList.new(yo.map(e=>e.label));this._view=new h.ColumnView({model:h.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 h.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 n=new h.SignalListItemFactory;return n.connect(`setup`,(e,t)=>{t.child=new h.Label({xalign:0})}),n.connect(`bind`,(e,n)=>{let r=n,i=r.child,a=r.item.string,o=yo.find(e=>e.label===a);i.label=o===void 0?a:t(o)}),new h.ColumnViewColumn({title:e,factory:n,expand:!0})}};S.type_ensure(So.$gtype);const Co={stories:[So]},wo=[`Red`,`Orange`,`Yellow`,`Green`,`Blue`,`Purple`,`Teal`,`Grey`],To={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:i.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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`maxChildrenPerLine`,label:`Max children per line`,type:i.NUMBER,defaultValue:3},{name:`homogeneous`,label:`Homogeneous`,type:i.BOOLEAN,defaultValue:!1},{name:`rowSpacing`,label:`Row spacing`,type:i.NUMBER,defaultValue:6}]};var Eo=__exportAll({FlowBoxStories:()=>Oo,FlowBoxStory:()=>Do}),Do=class FlowBoxStory extends T{_box=null;static{S.registerClass({GTypeName:`AdwStorybookFlowBox`},FlowBoxStory)}constructor(){super(T.fromMeta(FlowBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...To,component:h.FlowBox.$gtype}}initialize(){this._box=new h.FlowBox({hexpand:!0,vexpand:!0});for(let e of wo)this._box.append(new h.FlowBoxChild({child:new h.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`?h.Orientation.VERTICAL:h.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 h.SelectionMode.SINGLE;case`browse`:return h.SelectionMode.BROWSE;case`none`:return h.SelectionMode.NONE;default:return h.SelectionMode.MULTIPLE}}};S.type_ensure(Do.$gtype);const Oo={stories:[Do]},ko=[`Documents`,`Downloads`,`Music`,`Pictures`,`Videos`],Ao=[{label:`Single`,value:`single`},{label:`Multiple`,value:`multiple`},{label:`None`,value:`none`}],jo={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:i.SELECT,options:Ao,defaultValue:`single`},{name:`showSeparators`,label:`Separators`,type:i.BOOLEAN,defaultValue:!0},{name:`singleClickActivate`,label:`Activate on single click`,type:i.BOOLEAN,defaultValue:!1}]},Mo=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`],No={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:i.NUMBER,defaultValue:4},{name:`minColumns`,label:`Min columns`,type:i.NUMBER,defaultValue:1},{name:`selectionMode`,label:`Selection`,type:i.SELECT,options:Ao,defaultValue:`single`}]};var Po=__exportAll({GridViewStories:()=>Io,GridViewStory:()=>Fo}),Fo=class GridViewStory extends T{_view=null;_model=null;static{S.registerClass({GTypeName:`AdwStorybookGridView`},GridViewStory)}constructor(){super(T.fromMeta(GridViewStory.getMetadata(),`Default`))}static getMetadata(){return{...No,component:h.GridView.$gtype}}initialize(){this._model=h.StringList.new([...Mo]);let e=new h.SignalListItemFactory;e.connect(`setup`,(e,t)=>{t.child=new h.Label({xalign:.5})}),e.connect(`bind`,(e,t)=>{let n=t,r=n.child;r.label=n.item.string}),this._view=new h.GridView({factory:e,vexpand:!0});let t=new h.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`?h.MultiSelection.new(this._model):this.args.selectionMode===`none`?h.NoSelection.new(this._model):h.SingleSelection.new(this._model),this._view.minColumns=Math.max(1,this.args.minColumns),this._view.maxColumns=Math.max(this._view.minColumns,this.args.maxColumns))}};S.type_ensure(Fo.$gtype);const Io={stories:[Fo]},Lo=[`Documents`,`Downloads`,`Music`,`Pictures`,`Videos`],Ro={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:i.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:i.BOOLEAN,defaultValue:!0},{name:`activateOnSingleClick`,label:`Activate on single click`,type:i.BOOLEAN,defaultValue:!0},{name:`tabBehavior`,label:`Tab behaviour`,type:i.SELECT,options:[{label:`All`,value:`all`},{label:`Item`,value:`item`},{label:`Cell`,value:`cell`}],defaultValue:`all`}]};var zo=__exportAll({ListBoxStories:()=>Vo,ListBoxStory:()=>Bo}),Bo=class ListBoxStory extends T{_box=null;static{S.registerClass({GTypeName:`AdwStorybookListBox`},ListBoxStory)}constructor(){super(T.fromMeta(ListBoxStory.getMetadata(),`Default`))}static getMetadata(){return{...Ro,component:h.ListBox.$gtype}}initialize(){this._box=new h.ListBox({hexpand:!0});for(let e of Lo)this._box.append(new h.ListBoxRow({child:new h.Label({label:e,xalign:0})}));this._apply();let e=new h.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 h.SelectionMode.MULTIPLE;case`browse`:return h.SelectionMode.BROWSE;case`none`:return h.SelectionMode.NONE;default:return h.SelectionMode.SINGLE}}};S.type_ensure(Bo.$gtype);const Vo={stories:[Bo]};var Ho=__exportAll({ListViewStories:()=>Wo,ListViewStory:()=>Uo}),Uo=class ListViewStory extends T{_view=null;_model=null;static{S.registerClass({GTypeName:`AdwStorybookListView`},ListViewStory)}constructor(){super(T.fromMeta(ListViewStory.getMetadata(),`Default`))}static getMetadata(){return{...jo,component:h.ListView.$gtype}}initialize(){this._model=h.StringList.new([...ko]);let e=new h.SignalListItemFactory;e.connect(`setup`,(e,t)=>{t.child=new h.Label({xalign:0})}),e.connect(`bind`,(e,t)=>{let n=t,r=n.child;r.label=n.item.string}),this._view=new h.ListView({factory:e,vexpand:!0});let t=new h.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 h.MultiSelection.new(e);case`none`:return h.NoSelection.new(e);default:return h.SingleSelection.new(e)}}};S.type_ensure(Uo.$gtype);const Wo={stories:[Uo]},Go=[{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:``}],Ko={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:i.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:i.TEXT,defaultValue:`Disabled`}]},qo={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:i.TEXT,defaultValue:`Disabled`}]};var Jo=__exportAll({ShortcutLabelLevelsStory:()=>Xo,ShortcutLabelStories:()=>Zo,ShortcutLabelStory:()=>Yo}),Yo=class ShortcutLabelStory extends T{_widget=null;static{S.registerClass({GTypeName:`AdwStorybookShortcutLabel`},ShortcutLabelStory)}constructor(){super(T.fromMeta(ShortcutLabelStory.getMetadata(),`Default`))}static getMetadata(){return{...Ko,component:w.ShortcutLabel.$gtype}}initialize(){this._widget=new w.ShortcutLabel({accelerator:this.args.accelerator,disabledText:this.args.disabledText,halign:h.Align.CENTER,valign:h.Align.CENTER}),this.addContent(this._widget)}updateArgs(e){this._widget&&(this._widget.disabledText=this.args.disabledText,this._widget.accelerator=this.args.accelerator)}};S.type_ensure(Yo.$gtype);var Xo=class ShortcutLabelLevelsStory extends T{_widgets=[];static{S.registerClass({GTypeName:`AdwStorybookShortcutLabelLevels`},ShortcutLabelLevelsStory)}constructor(){super(T.fromMeta(ShortcutLabelLevelsStory.getMetadata(),`Default`))}static getMetadata(){return{...qo,component:w.ShortcutLabel.$gtype}}initialize(){let e=new h.Grid({row_spacing:12,column_spacing:24});for(let[t,n]of Go.entries()){let r=new h.Label({label:n.label,halign:h.Align.START});r.add_css_class(`dimmed`),e.attach(r,0,t,1,1);let i=new w.ShortcutLabel({accelerator:n.accelerator,disabledText:this.args.disabledText,halign:h.Align.END,hexpand:!0});e.attach(i,1,t,1,1),this._widgets.push(i)}this.addContent(e)}updateArgs(e){for(let e of this._widgets)e.disabledText=this.args.disabledText}};S.type_ensure(Xo.$gtype);const Zo={stories:[Yo,Xo]},Qo={title:`Presentation/Spinner`,description:`Adw.Spinner — a lightweight loading indicator that spins continuously while visible.`,controls:[{name:`size`,label:`Size`,type:i.RANGE,min:16,max:64,step:4,defaultValue:48}]};var $o=__exportAll({SpinnerStories:()=>ts,SpinnerStory:()=>es}),es=class SpinnerStory extends T{_spinner=null;static{S.registerClass({GTypeName:`AdwStorybookSpinner`},SpinnerStory)}constructor(){super(T.fromMeta(SpinnerStory.getMetadata(),`Default`))}static getMetadata(){return{...Qo,component:w.Spinner.$gtype}}initialize(){let e=this.args.size;this._spinner=new w.Spinner({widthRequest:e,heightRequest:e,halign:h.Align.CENTER,valign:h.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}};S.type_ensure(es.$gtype);const ts={stories:[es]},ns={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:i.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:i.TEXT,defaultValue:`No Documents`},{name:`description`,label:`Description`,type:i.TEXT,defaultValue:`Documents you create or open will appear here.`}]};var rs=__exportAll({StatusPageStories:()=>as,StatusPageStory:()=>is}),is=class StatusPageStory extends T{_statusPage=null;static{S.registerClass({GTypeName:`AdwStorybookStatusPage`},StatusPageStory)}constructor(){super(T.fromMeta(StatusPageStory.getMetadata(),`Default`))}static getMetadata(){return{...ns,component:w.StatusPage.$gtype}}initialize(){let e=new h.Button({label:`New Document`,halign:h.Align.CENTER,cssClasses:[`pill`,`suggested-action`]});this._statusPage=new w.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)}};S.type_ensure(is.$gtype);const as={stories:[is]},os={Pictures:[`Holiday`,`Screenshots`],Music:[`Albums`],Notes:[]},ss={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:i.BOOLEAN,defaultValue:!0},{name:`hideExpander`,label:`Hide the arrow`,type:i.BOOLEAN,defaultValue:!1},{name:`indentForIcon`,label:`Indent leaves by an arrow`,type:i.BOOLEAN,defaultValue:!0}]};var cs=__exportAll({TreeExpanderStories:()=>us,TreeExpanderStory:()=>ls}),ls=class TreeExpanderStory extends T{_view=null;_tree=null;_expanders=new Set;static{S.registerClass({GTypeName:`AdwStorybookTreeExpander`},TreeExpanderStory)}constructor(){super(T.fromMeta(TreeExpanderStory.getMetadata(),`Default`))}static getMetadata(){return{...ss,component:h.TreeExpander.$gtype}}initialize(){let e=h.StringList.new(Object.keys(os));this._tree=h.TreeListModel.new(e,!1,!1,e=>{let t=os[e.string]??[];return t.length===0?null:h.StringList.new([...t])});let t=new h.SignalListItemFactory;t.connect(`setup`,(e,t)=>{let n=t;n.focusable=!1;let r=new h.TreeExpander;r.child=new h.Label({xalign:0}),n.child=r,this._expanders.add(r)}),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 h.ListView({model:h.SingleSelection.new(this._tree),factory:t,vexpand:!0});let n=new h.ScrolledWindow({child:this._view,heightRequest:200,hexpand:!0});this.addContent(n),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}};S.type_ensure(ls.$gtype);const us={stories:[ls]},ds={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:i.SELECT,options:[{label:`Toggle maximize`,value:`toggle-maximize`},{label:`Minimize`,value:`minimize`},{label:`Menu`,value:`menu`},{label:`None`,value:`none`}],defaultValue:`toggle-maximize`}]};var fs=__exportAll({WindowHandleStories:()=>ms,WindowHandleStory:()=>ps}),ps=class WindowHandleStory extends T{_handle=null;static{S.registerClass({GTypeName:`AdwStorybookWindowHandle`},WindowHandleStory)}constructor(){super(T.fromMeta(WindowHandleStory.getMetadata(),`Default`))}static getMetadata(){return{...ds,component:h.WindowHandle.$gtype}}initialize(){let e=new w.HeaderBar;e.set_title_widget(new w.WindowTitle({title:`Notes`})),this._handle=new h.WindowHandle({child:e,halign:h.Align.CENTER}),this._apply(),this.addContent(this._handle)}updateArgs(e){this._apply()}_apply(){this.args.action}};S.type_ensure(ps.$gtype);const ms={stories:[ps]},hs={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:i.TEXT,defaultValue:`Inbox`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`3 unread messages`}]};var gs=__exportAll({WindowTitleStories:()=>vs,WindowTitleStory:()=>_s}),_s=class WindowTitleStory extends T{_windowTitle=null;static{S.registerClass({GTypeName:`AdwStorybookWindowTitle`},WindowTitleStory)}constructor(){super(T.fromMeta(WindowTitleStory.getMetadata(),`Default`))}static getMetadata(){return{...hs,component:w.WindowTitle.$gtype}}initialize(){this._windowTitle=new w.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)}};S.type_ensure(_s.$gtype);const vs={stories:[_s]},ys={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:i.TEXT,defaultValue:`Wi-Fi`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`Connected to Highgarden 5GHz`},{name:`iconName`,label:`Prefix icon`,type:i.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:i.BOOLEAN,defaultValue:!0}]};var bs=__exportAll({ActionRowStories:()=>Ss,ActionRowStory:()=>xs}),xs=class ActionRowStory extends T{_row=null;_icon=null;_button=null;static{S.registerClass({GTypeName:`AdwStorybookActionRow`},ActionRowStory)}constructor(){super(T.fromMeta(ActionRowStory.getMetadata(),`Default`))}static getMetadata(){return{...ys,component:w.ActionRow.$gtype}}initialize(){this._row=new w.ActionRow({title:this.args.title,subtitle:this.args.subtitle}),this._icon=new h.Image({iconName:this.args.iconName}),this._row.add_prefix(this._icon),this._button=new h.Button({iconName:`go-next-symbolic`,valign:h.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 w.PreferencesGroup;e.add(this._row);let t=new w.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)}};S.type_ensure(xs.$gtype);const Ss={stories:[xs]},Cs={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:i.TEXT,defaultValue:`Add account`},{name:`startIconName`,label:`Start icon`,type:i.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:i.SELECT,options:[{label:`None`,value:`none`},{label:`Suggested`,value:`suggested-action`},{label:`Destructive`,value:`destructive-action`}],defaultValue:`suggested-action`}]};var ws=__exportAll({ButtonRowStories:()=>Ds,ButtonRowStory:()=>Es});const Ts=[`suggested-action`,`destructive-action`];var Es=class ButtonRowStory extends T{_row=null;static{S.registerClass({GTypeName:`AdwStorybookButtonRow`},ButtonRowStory)}constructor(){super(T.fromMeta(ButtonRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Cs,component:w.ButtonRow.$gtype}}initialize(){this._row=new w.ButtonRow({title:this.args.title,startIconName:this.args.startIconName}),this._applyStyle(this.args.style);let e=new w.PreferencesGroup;e.add(this._row);let t=new w.Clamp({maximumSize:400,child:e});this.addContent(t)}_applyStyle(e){if(this._row){for(let e of Ts)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))}};S.type_ensure(Es.$gtype);const Ds={stories:[Es]},Os=[`Blue`,`Teal`,`Green`,`Orange`,`Purple`],ks={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:i.TEXT,defaultValue:`Accent colour`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`Used to highlight selected items`},{name:`selected`,label:`Selected`,type:i.NUMBER,min:0,max:4,step:1,defaultValue:1}]};var As=__exportAll({ComboRowStories:()=>Ms,ComboRowStory:()=>js}),js=class ComboRowStory extends T{_row=null;static{S.registerClass({GTypeName:`AdwStorybookComboRow`},ComboRowStory)}constructor(){super(T.fromMeta(ComboRowStory.getMetadata(),`Default`))}static getMetadata(){return{...ks,component:w.ComboRow.$gtype}}initialize(){this._row=new w.ComboRow({title:this.args.title,subtitle:this.args.subtitle,model:new h.StringList({strings:[...Os]}),selected:this.args.selected});let e=new w.PreferencesGroup;e.add(this._row);let t=new w.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)}};S.type_ensure(js.$gtype);const Ms={stories:[js]},Ns={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:i.TEXT,defaultValue:`Display name`},{name:`text`,label:`Text`,type:i.TEXT,defaultValue:`Ada Lovelace`},{name:`showApplyButton`,label:`Show apply button`,type:i.BOOLEAN,defaultValue:!0}]};var Ps=__exportAll({EntryRowStories:()=>Is,EntryRowStory:()=>Fs}),Fs=class EntryRowStory extends T{_row=null;static{S.registerClass({GTypeName:`AdwStorybookEntryRow`},EntryRowStory)}constructor(){super(T.fromMeta(EntryRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Ns,component:w.EntryRow.$gtype}}initialize(){this._row=new w.EntryRow({title:this.args.title,text:this.args.text,showApplyButton:this.args.showApplyButton});let e=new w.PreferencesGroup;e.add(this._row);let t=new w.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)}};S.type_ensure(Fs.$gtype);const Is={stories:[Fs]},Ls={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:i.TEXT,defaultValue:`Proxy settings`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`Route traffic through a custom proxy`},{name:`expanded`,label:`Expanded`,type:i.BOOLEAN,defaultValue:!0},{name:`showEnableSwitch`,label:`Show enable switch`,type:i.BOOLEAN,defaultValue:!1}]};var Rs=__exportAll({ExpanderRowStories:()=>Bs,ExpanderRowStory:()=>zs}),zs=class ExpanderRowStory extends T{_row=null;static{S.registerClass({GTypeName:`AdwStorybookExpanderRow`},ExpanderRowStory)}constructor(){super(T.fromMeta(ExpanderRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Ls,component:w.ExpanderRow.$gtype}}initialize(){this._row=new w.ExpanderRow({title:this.args.title,subtitle:this.args.subtitle,expanded:this.args.expanded,showEnableSwitch:this.args.showEnableSwitch}),this._row.add_row(new w.EntryRow({title:`Host`,text:`proxy.example.com`})),this._row.add_row(new w.SwitchRow({title:`Use authentication`,active:!1}));let e=new w.PreferencesGroup;e.add(this._row);let t=new w.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)}};S.type_ensure(zs.$gtype);const Bs={stories:[zs]},Vs={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:i.TEXT,defaultValue:`Password`},{name:`text`,label:`Text`,type:i.TEXT,defaultValue:`correct-horse-battery`}]};var Hs=__exportAll({PasswordEntryRowStories:()=>Ws,PasswordEntryRowStory:()=>Us}),Us=class PasswordEntryRowStory extends T{_row=null;static{S.registerClass({GTypeName:`AdwStorybookPasswordEntryRow`},PasswordEntryRowStory)}constructor(){super(T.fromMeta(PasswordEntryRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Vs,component:w.PasswordEntryRow.$gtype}}initialize(){this._row=new w.PasswordEntryRow({title:this.args.title,text:this.args.text});let e=new w.PreferencesGroup;e.add(this._row);let t=new w.Clamp({maximumSize:400,child:e});this.addContent(t)}updateArgs(e){this._row&&(this._row.title=this.args.title,this._row.text=this.args.text)}};S.type_ensure(Us.$gtype);const Ws={stories:[Us]},Gs={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:i.TEXT,defaultValue:`Account`},{name:`description`,label:`Description`,type:i.TEXT,defaultValue:`Manage how this device signs in and syncs.`}]};var Ks=__exportAll({PreferencesGroupStories:()=>Js,PreferencesGroupStory:()=>qs}),qs=class PreferencesGroupStory extends T{_prefsGroup=null;static{S.registerClass({GTypeName:`AdwStorybookPreferencesGroup`},PreferencesGroupStory)}constructor(){super(T.fromMeta(PreferencesGroupStory.getMetadata(),`Default`))}static getMetadata(){return{...Gs,component:w.PreferencesGroup.$gtype}}initialize(){let e=new h.Button({label:`Sign out`,valign:h.Align.CENTER});e.add_css_class(`flat`),this._prefsGroup=new w.PreferencesGroup({title:this.args.title,description:this.args.description,headerSuffix:e});let t=new w.EntryRow({title:`Display name`,text:`Grace Hopper`});this._prefsGroup.add(t);let n=new w.SwitchRow({title:`Sync over Wi-Fi only`,subtitle:`Avoid using mobile data for backups`,active:!0});this._prefsGroup.add(n);let r=new w.ComboRow({title:`Region`,model:new h.StringList({strings:[`Europe`,`Americas`,`Asia`,`Oceania`]}),selected:0});this._prefsGroup.add(r);let i=new w.Clamp({maximumSize:400,child:this._prefsGroup});this.addContent(i)}updateArgs(e){this._prefsGroup&&(this._prefsGroup.title=this.args.title,this._prefsGroup.description=this.args.description)}};S.type_ensure(qs.$gtype);const Js={stories:[qs]},Ys={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:i.TEXT,defaultValue:`A <b>plain</b> preferences row`},{name:`useMarkup`,label:`Use markup`,type:i.BOOLEAN,defaultValue:!0},{name:`titleSelectable`,label:`Title selectable`,type:i.BOOLEAN,defaultValue:!1}]};var Xs=__exportAll({PreferencesRowStories:()=>Qs,PreferencesRowStory:()=>Zs}),Zs=class PreferencesRowStory extends T{_row=null;static{S.registerClass({GTypeName:`AdwStorybookPreferencesRow`},PreferencesRowStory)}constructor(){super(T.fromMeta(PreferencesRowStory.getMetadata(),`Default`))}static getMetadata(){return{...Ys,component:w.PreferencesRow.$gtype}}initialize(){this._row=new w.PreferencesRow,this._apply();let e=new w.PreferencesGroup;e.add(this._row);let t=new w.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)}};S.type_ensure(Zs.$gtype);const Qs={stories:[Zs]},$s={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:i.TEXT,defaultValue:`Font size`},{name:`value`,label:`Value`,type:i.NUMBER,min:0,max:100,step:1,defaultValue:16},{name:`digits`,label:`Digits`,type:i.NUMBER,min:0,max:4,step:1,defaultValue:0}]};var ec=__exportAll({SpinRowStories:()=>nc,SpinRowStory:()=>tc}),tc=class SpinRowStory extends T{_row=null;static{S.registerClass({GTypeName:`AdwStorybookSpinRow`},SpinRowStory)}constructor(){super(T.fromMeta(SpinRowStory.getMetadata(),`Default`))}static getMetadata(){return{...$s,component:w.SpinRow.$gtype}}initialize(){this._row=new w.SpinRow({title:this.args.title,adjustment:new h.Adjustment({lower:0,upper:100,value:this.args.value,stepIncrement:1,pageIncrement:10}),digits:this.args.digits});let e=new w.PreferencesGroup;e.add(this._row);let t=new w.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)}};S.type_ensure(tc.$gtype);const nc={stories:[tc]},rc={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:i.TEXT,defaultValue:`Automatic updates`},{name:`subtitle`,label:`Subtitle`,type:i.TEXT,defaultValue:`Download and install updates without asking`},{name:`active`,label:`Active`,type:i.BOOLEAN,defaultValue:!0}]};var ic=__exportAll({SwitchRowStories:()=>oc,SwitchRowStory:()=>ac}),ac=class SwitchRowStory extends T{_row=null;static{S.registerClass({GTypeName:`AdwStorybookSwitchRow`},SwitchRowStory)}constructor(){super(T.fromMeta(SwitchRowStory.getMetadata(),`Default`))}static getMetadata(){return{...rc,component:w.SwitchRow.$gtype}}initialize(){this._row=new w.SwitchRow({title:this.args.title,subtitle:this.args.subtitle,active:this.args.active});let e=new w.PreferencesGroup;e.add(this._row);let t=new w.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)}};S.type_ensure(ac.$gtype);const oc={stories:[ac]},sc={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:i.TEXT,defaultValue:`Ada Lovelace`},{name:`editable`,label:`Editable`,type:i.BOOLEAN,defaultValue:!0},{name:`editing`,label:`Editing`,type:i.BOOLEAN,defaultValue:!1}]};var cc=__exportAll({EditableLabelStories:()=>uc,EditableLabelStory:()=>lc}),lc=class EditableLabelStory extends T{_label=null;static{S.registerClass({GTypeName:`AdwStorybookEditableLabel`},EditableLabelStory)}constructor(){super(T.fromMeta(EditableLabelStory.getMetadata(),`Default`))}static getMetadata(){return{...sc,component:h.EditableLabel.$gtype}}initialize(){this._label=new h.EditableLabel({halign:h.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)}};S.type_ensure(lc.$gtype);const uc={stories:[lc]},dc={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:i.BOOLEAN,defaultValue:!1},{name:`showCloseButton`,label:`Close button`,type:i.BOOLEAN,defaultValue:!0}]};var fc=__exportAll({SearchBarStories:()=>mc,SearchBarStory:()=>pc}),pc=class SearchBarStory extends T{_bar=null;_entry=null;static{S.registerClass({GTypeName:`AdwStorybookSearchBar`},SearchBarStory)}constructor(){super(T.fromMeta(SearchBarStory.getMetadata(),`Default`))}static getMetadata(){return{...dc,component:h.SearchBar.$gtype}}initialize(){this._entry=new h.SearchEntry({hexpand:!0}),this._bar=new h.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)}};S.type_ensure(pc.$gtype);const mc={stories:[pc]},hc={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:i.TEXT,defaultValue:`A text view holds as many lines as it is given.
344
+ Tab inserts a tab character.`},{name:`wrapMode`,label:`Wrap mode`,type:i.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:i.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:i.BOOLEAN,defaultValue:!1},{name:`acceptsTab`,label:`Tab inserts a tab`,type:i.BOOLEAN,defaultValue:!0},{name:`cursorVisible`,label:`Show cursor`,type:i.BOOLEAN,defaultValue:!0},{name:`topMargin`,label:`Top margin`,type:i.NUMBER,defaultValue:6}]};var gc=__exportAll({TextViewStories:()=>vc,TextViewStory:()=>_c}),_c=class TextViewStory extends T{_buffer=null;_view=null;static{S.registerClass({GTypeName:`AdwStorybookTextView`},TextViewStory)}constructor(){super(T.fromMeta(TextViewStory.getMetadata(),`Default`))}static getMetadata(){return{...hc,component:h.TextView.$gtype}}initialize(){this._buffer=new h.TextBuffer,this._view=new h.TextView({buffer:this._buffer,hexpand:!0,vexpand:!1,top_margin:6});let e=new h.ScrolledWindow({hscrollbar_policy:h.PolicyType.AUTOMATIC,vscrollbar_policy:h.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)}};S.type_ensure(_c.$gtype);const vc={stories:[_c]},yc={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:i.TEXT,defaultValue:`Ada Lovelace`},{name:`placeholderText`,label:`Placeholder`,type:i.TEXT,defaultValue:``},{name:`editable`,label:`Editable`,type:i.BOOLEAN,defaultValue:!0},{name:`visibility`,label:`Visible`,type:i.BOOLEAN,defaultValue:!0},{name:`maxLength`,label:`Max length (0 = none)`,type:i.NUMBER,defaultValue:0},{name:`propagateTextWidth`,label:`Grow with text`,type:i.BOOLEAN,defaultValue:!1}]};var bc=__exportAll({TextStories:()=>Sc,TextStory:()=>xc}),xc=class TextStory extends T{_text=null;static{S.registerClass({GTypeName:`AdwStorybookText`},TextStory)}constructor(){super(T.fromMeta(TextStory.getMetadata(),`Default`))}static getMetadata(){return{...yc,component:h.Text.$gtype}}initialize(){this._text=new h.Text({halign:h.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)}};S.type_ensure(xc.$gtype);const Sc={stories:[xc]},Cc=[{name:`allowScrollWheel`,label:`Allow scroll wheel`,type:i.BOOLEAN,defaultValue:!0},{name:`allowLongSwipes`,label:`Allow long swipes`,type:i.BOOLEAN,defaultValue:!1}],wc={title:`View Switching/Carousel (Dots)`,description:`Adw.Carousel — a horizontally swipeable pager with three pages, paired with Adw.CarouselIndicatorDots.`,controls:Cc},Tc={title:`View Switching/Carousel (Lines)`,description:`Adw.Carousel — the same swipeable pager paired with Adw.CarouselIndicatorLines instead of dots.`,controls:Cc};var Ec=__exportAll({CarouselDotsStory:()=>Oc,CarouselLinesStory:()=>kc,CarouselStories:()=>Ac});const Dc=[{title:`Welcome`,css:`accent`},{title:`Discover`,css:`success`},{title:`Get started`,css:`warning`}];function buildPage(e,t){let n=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,widthRequest:440,heightRequest:260});n.add_css_class(`card`),n.add_css_class(t);let r=new h.Label({label:e,vexpand:!0,valign:h.Align.CENTER});return r.add_css_class(`title-1`),n.append(r),n}var Oc=class CarouselDotsStory extends T{_carousel=null;static{S.registerClass({GTypeName:`AdwStorybookCarouselDots`},CarouselDotsStory)}constructor(){super(T.fromMeta(CarouselDotsStory.getMetadata(),`Default`))}static getMetadata(){return{...wc,component:w.Carousel.$gtype}}initialize(){this._carousel=new w.Carousel({allowScrollWheel:this.args.allowScrollWheel,allowLongSwipes:this.args.allowLongSwipes,vexpand:!0});for(let e of Dc)this._carousel.append(buildPage(e.title,e.css));let e=new w.CarouselIndicatorDots({carousel:this._carousel}),t=new h.Box({orientation:h.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)}};S.type_ensure(Oc.$gtype);var kc=class CarouselLinesStory extends T{_carousel=null;static{S.registerClass({GTypeName:`AdwStorybookCarouselLines`},CarouselLinesStory)}constructor(){super(T.fromMeta(CarouselLinesStory.getMetadata(),`Default`))}static getMetadata(){return{...Tc,component:w.Carousel.$gtype}}initialize(){this._carousel=new w.Carousel({allowScrollWheel:this.args.allowScrollWheel,allowLongSwipes:this.args.allowLongSwipes,vexpand:!0});for(let e of Dc)this._carousel.append(buildPage(e.title,e.css));let e=new w.CarouselIndicatorLines({carousel:this._carousel}),t=new h.Box({orientation:h.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)}};S.type_ensure(kc.$gtype);const Ac={stories:[Oc,kc]},jc={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:i.SELECT,options:[{label:`Labels`,value:`labels`},{label:`Icons`,value:`icons`},{label:`Both`,value:`both`}],defaultValue:`both`}]};var Mc=__exportAll({InlineViewSwitcherStories:()=>Pc,InlineViewSwitcherStory:()=>Nc}),Nc=class InlineViewSwitcherStory extends T{_switcher=null;static{S.registerClass({GTypeName:`AdwStorybookInlineViewSwitcher`},InlineViewSwitcherStory)}constructor(){super(T.fromMeta(InlineViewSwitcherStory.getMetadata(),`Default`))}static getMetadata(){return{...jc,component:w.InlineViewSwitcher.$gtype}}buildPage(e,t,n){return new w.StatusPage({iconName:t,title:e,description:n,vexpand:!0})}initialize(){let e=new w.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 w.InlineViewSwitcher({stack:e,displayMode:this.modeFromArg(this.args.displayMode),halign:h.Align.CENTER});let t=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:340});t.append(this._switcher),t.append(e),this.addContent(t)}modeFromArg(e){return e===`labels`?w.InlineViewSwitcherDisplayMode.LABELS:e===`icons`?w.InlineViewSwitcherDisplayMode.ICONS:w.InlineViewSwitcherDisplayMode.BOTH}updateArgs(e){this._switcher&&(this._switcher.displayMode=this.modeFromArg(this.args.displayMode))}};S.type_ensure(Nc.$gtype);const Pc={stories:[Nc]},Fc=[{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".`}],Ic={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:i.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:i.BOOLEAN,defaultValue:!0},{name:`showBorder`,label:`Show border`,type:i.BOOLEAN,defaultValue:!0},{name:`enablePopup`,label:`Enable popup (right-click)`,type:i.BOOLEAN,defaultValue:!1}]};var Lc=__exportAll({NotebookStories:()=>Bc,NotebookStory:()=>zc});const Rc={top:h.PositionType.TOP,bottom:h.PositionType.BOTTOM,left:h.PositionType.LEFT,right:h.PositionType.RIGHT};var zc=class NotebookStory extends T{_notebook=null;static{S.registerClass({GTypeName:`AdwStorybookNotebook`},NotebookStory)}constructor(){super(T.fromMeta(NotebookStory.getMetadata(),`Default`))}static getMetadata(){return{...Ic,component:h.Notebook.$gtype}}initialize(){this._notebook=new h.Notebook({vexpand:!0,widthRequest:480,heightRequest:320});for(let e of Fc){let t=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,spacing:6});t.append(new h.Label({label:e.label||e.name,cssClasses:[`title-4`]})),t.append(new h.Label({label:e.body,cssClasses:[`title-2`]}));let n=e.label?new h.Label({label:e.label}):null,r=new h.Label({label:e.label||e.name});this._notebook.append_page_menu(t,n,r)}this._apply(),this.addContent(this._notebook)}updateArgs(e){this._apply()}_apply(){this._notebook&&(this._notebook.tab_pos=Rc[this.args.tabPos]??h.PositionType.TOP,this._notebook.show_tabs=this.args.showTabs,this._notebook.enable_popup=this.args.enablePopup,this._notebook.show_border=this.args.showBorder)}};S.type_ensure(zc.$gtype);const Bc={stories:[zc]},Vc=[{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.`}],Hc={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:i.SELECT,options:[{label:`None`,value:`none`},{label:`Crossfade`,value:`crossfade`},{label:`Slide left / right`,value:`slide-left-right`}],defaultValue:`slide-left-right`}]};var Uc=__exportAll({StackSidebarStories:()=>Gc,StackSidebarStory:()=>Q});const Wc={none:h.StackTransitionType.NONE,crossfade:h.StackTransitionType.CROSSFADE,"slide-left-right":h.StackTransitionType.SLIDE_LEFT_RIGHT};var Q=class StackSidebarStory extends T{_stack=null;static{S.registerClass({GTypeName:`AdwStorybookStackSidebar`},StackSidebarStory)}constructor(){super(T.fromMeta(StackSidebarStory.getMetadata(),`Default`))}static getMetadata(){return{...Hc,component:h.StackSidebar.$gtype}}initialize(){this._stack=new h.Stack({vexpand:!0,transitionDuration:200});for(let e of Vc){let t=new h.Label({label:e.body});t.add_css_class(`title-2`);let n=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,spacing:6});n.append(new h.Label({label:e.title||e.name,cssClasses:[`title-4`]})),n.append(t);let r=this._stack.add_titled(n,e.name,e.title);r.icon_name=e.icon,r.needs_attention=e.attn,r.use_underline=!0}let e=new h.StackSidebar({stack:this._stack}),t=new h.Box({orientation:h.Orientation.VERTICAL,spacing:0});t.append(e);let n=new h.Paned({orientation:h.Orientation.HORIZONTAL,widthRequest:480,heightRequest:320});n.set_start_child(t),n.set_end_child(this._stack),n.set_position(180),this._apply(),this.addContent(n)}updateArgs(e){this._apply()}_apply(){this._stack&&(this._stack.transition_type=Wc[this.args.transitionType]??h.StackTransitionType.NONE)}};S.type_ensure(Q.$gtype);const Gc={stories:[Q]},Kc=[{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.`}],qc={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:i.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`transitionType`,label:`Transition type`,type:i.SELECT,options:[{label:`None`,value:`none`},{label:`Crossfade`,value:`crossfade`},{label:`Slide left / right`,value:`slide-left-right`}],defaultValue:`slide-left-right`}]};var Jc=__exportAll({StackSwitcherStories:()=>Zc,StackSwitcherStory:()=>Xc});const Yc={none:h.StackTransitionType.NONE,crossfade:h.StackTransitionType.CROSSFADE,"slide-left-right":h.StackTransitionType.SLIDE_LEFT_RIGHT};var Xc=class StackSwitcherStory extends T{_stack=null;_switcher=null;static{S.registerClass({GTypeName:`AdwStorybookStackSwitcher`},StackSwitcherStory)}constructor(){super(T.fromMeta(StackSwitcherStory.getMetadata(),`Default`))}static getMetadata(){return{...qc,component:h.StackSwitcher.$gtype}}initialize(){this._stack=new h.Stack({vexpand:!0,transitionDuration:200});for(let e of Kc){let t=new h.Label({label:e.body});t.add_css_class(`title-2`);let n=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,spacing:6});if(n.append(new h.Label({label:e.title||e.name,cssClasses:[`title-4`]})),n.append(t),e.icon){let t=this._stack.add_titled(n,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(n,e.name,e.title);t.needs_attention=e.attn,t.use_underline=!0}}this._switcher=new h.StackSwitcher({stack:this._stack,halign:h.Align.CENTER});let e=new h.Box({orientation:h.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=Yc[this.args.transitionType]??h.StackTransitionType.NONE,this._switcher.orientation=this.args.orientation===`vertical`?h.Orientation.VERTICAL:h.Orientation.HORIZONTAL)}};S.type_ensure(Xc.$gtype);const Zc={stories:[Xc]},Qc=[{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.`}],$c={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:i.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:i.RANGE,min:0,max:600,step:50,defaultValue:200},{name:`interpolateSize`,label:`Interpolate size`,type:i.BOOLEAN,defaultValue:!1},{name:`hhomogeneous`,label:`HHomogeneous`,type:i.BOOLEAN,defaultValue:!0},{name:`vhomogeneous`,label:`VHomogeneous`,type:i.BOOLEAN,defaultValue:!0}]};var el=__exportAll({StackStories:()=>rl,StackStory:()=>nl});const tl={none:h.StackTransitionType.NONE,crossfade:h.StackTransitionType.CROSSFADE,"slide-left-right":h.StackTransitionType.SLIDE_LEFT_RIGHT,"slide-up-down":h.StackTransitionType.SLIDE_UP_DOWN,"over-left-right":h.StackTransitionType.OVER_LEFT_RIGHT,"rotate-left-right":h.StackTransitionType.ROTATE_LEFT_RIGHT};var nl=class StackStory extends T{_stack=null;_switcher=null;static{S.registerClass({GTypeName:`AdwStorybookStack`},StackStory)}constructor(){super(T.fromMeta(StackStory.getMetadata(),`Default`))}static getMetadata(){return{...$c,component:h.Stack.$gtype}}initialize(){this._stack=new h.Stack({vexpand:!0,transitionDuration:200});for(let e of Qc){let t=new h.Label({label:e.body,vexpand:!0});t.add_css_class(`title-2`);let n=new h.Box({orientation:h.Orientation.VERTICAL,halign:h.Align.CENTER,valign:h.Align.CENTER,spacing:6});n.append(new h.Label({label:e.title,cssClasses:[`title-4`]})),n.append(t);let r=this._stack.add_titled(n,e.name,e.title);r.needs_attention=e.attn,r.use_underline=!0}this._switcher=new h.StackSwitcher({stack:this._stack,halign:h.Align.CENTER});let e=new h.Box({orientation:h.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=tl[this.args.transitionType]??h.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)}};S.type_ensure(nl.$gtype);const rl={stories:[nl]},il={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:i.BOOLEAN,defaultValue:!1},{name:`expandTabs`,label:`Expand tabs`,type:i.BOOLEAN,defaultValue:!1},{name:`inverted`,label:`Inverted`,type:i.BOOLEAN,defaultValue:!1},{name:`startAction`,label:`Start action`,type:i.BOOLEAN,defaultValue:!0},{name:`endAction`,label:`End action`,type:i.BOOLEAN,defaultValue:!0}]};var al=__exportAll({TabBarStories:()=>cl,TabBarStory:()=>sl});const ol=[{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 sl=class TabBarStory extends T{_bar=null;_startAction=null;_endAction=null;static{S.registerClass({GTypeName:`AdwStorybookTabBar`},TabBarStory)}constructor(){super(T.fromMeta(TabBarStory.getMetadata(),`Default`))}static getMetadata(){return{...il,component:w.TabBar.$gtype}}initialize(){let e=new w.TabView({vexpand:!0});for(let t of ol){let n=e.append(new w.StatusPage({iconName:`view-paged-symbolic`,title:t.title,description:t.body}));n.title=t.title}this._startAction=new h.Button({iconName:`list-add-symbolic`,tooltipText:`New page`,cssClasses:[`flat`]}),this._endAction=new h.Button({iconName:`view-more-symbolic`,tooltipText:`Menu`,cssClasses:[`flat`]});let t=new w.TabBar({view:e});this._bar=t;let n=new h.Box({orientation:h.Orientation.VERTICAL,widthRequest:480,heightRequest:320});n.append(t),n.append(e),this.addContent(n),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)}};S.type_ensure(sl.$gtype);const cl={stories:[sl]},ll={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:i.RANGE,min:0,max:100,step:1,defaultValue:3},{name:`needsAttention`,label:`Last page needs attention`,type:i.BOOLEAN,defaultValue:!1}]};var ul=__exportAll({TabButtonStories:()=>fl,TabButtonStory:()=>dl}),dl=class TabButtonStory extends T{_view=null;static{S.registerClass({GTypeName:`AdwStorybookTabButton`},TabButtonStory)}constructor(){super(T.fromMeta(TabButtonStory.getMetadata(),`Default`))}static getMetadata(){return{...ll,component:w.TabButton.$gtype}}initialize(){this._view=new w.TabView;let e=new w.TabButton({view:this._view,halign:h.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 h.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}};S.type_ensure(dl.$gtype);const fl={stories:[dl]},pl={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:i.BOOLEAN,defaultValue:!0},{name:`enableSearch`,label:`Enable search`,type:i.BOOLEAN,defaultValue:!0},{name:`enableNewTab`,label:`Enable new tab`,type:i.BOOLEAN,defaultValue:!1},{name:`inverted`,label:`Inverted`,type:i.BOOLEAN,defaultValue:!1}]};var ml=__exportAll({TabOverviewStories:()=>_l,TabOverviewStory:()=>gl});const hl=[{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 gl=class TabOverviewStory extends T{_overview=null;static{S.registerClass({GTypeName:`AdwStorybookTabOverview`},TabOverviewStory)}constructor(){super(T.fromMeta(TabOverviewStory.getMetadata(),`Default`))}static getMetadata(){return{...pl,component:w.TabOverview.$gtype}}initialize(){let e=new w.TabView({vexpand:!0});for(let[t,n]of hl.entries()){let r=new w.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 w.TabOverview({view:e,child:e,widthRequest:480,heightRequest:340});this._overview=t,t.connect(`create-tab`,()=>{let t=e.append(new w.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)}};S.type_ensure(gl.$gtype);const _l={stories:[gl]},vl={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:i.BOOLEAN,defaultValue:!1}]};var yl=__exportAll({TabViewStories:()=>Sl,TabViewStory:()=>xl});const bl=[{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 xl=class TabViewStory extends T{_tabBar=null;static{S.registerClass({GTypeName:`AdwStorybookTabView`},TabViewStory)}constructor(){super(T.fromMeta(TabViewStory.getMetadata(),`Default`))}static getMetadata(){return{...vl,component:w.TabView.$gtype}}buildPageBody(e,t){return new w.StatusPage({iconName:`view-paged-symbolic`,title:e,description:t,vexpand:!0})}initialize(){let e=new w.TabView({vexpand:!0});for(let t of bl){let n=e.append(this.buildPageBody(t.title,t.body));n.title=t.title}this._tabBar=new w.TabBar({view:e,autohide:this.args.autohide});let t=new h.Box({orientation:h.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)}};S.type_ensure(xl.$gtype);const Sl={stories:[xl]},Cl=[{name:`inbox`,title:`Inbox`,icon:`mail-unread-symbolic`},{name:`starred`,title:`Starred`,icon:`starred-symbolic`},{name:`archive`,title:`Archive`,icon:`folder-symbolic`}],wl={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:i.BOOLEAN,defaultValue:!0}]};var Tl=__exportAll({ViewSwitcherBarStories:()=>Dl,ViewSwitcherBarStory:()=>El}),El=class ViewSwitcherBarStory extends T{_bar=null;static{S.registerClass({GTypeName:`AdwStorybookViewSwitcherBar`},ViewSwitcherBarStory)}constructor(){super(T.fromMeta(ViewSwitcherBarStory.getMetadata(),`Default`))}static getMetadata(){return{...wl,component:w.ViewSwitcherBar.$gtype}}initialize(){let e=new w.ViewStack({vexpand:!0});for(let t of Cl){let n=new w.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 w.ViewSwitcherBar({stack:e}),this._apply();let t=new w.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)}};S.type_ensure(El.$gtype);const Dl={stories:[El]},Ol=[{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`}],kl={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:i.BOOLEAN,defaultValue:!1}]};var Al=__exportAll({ViewSwitcherSidebarStories:()=>Ml,ViewSwitcherSidebarStory:()=>jl}),jl=class ViewSwitcherSidebarStory extends T{_switcher=null;static{S.registerClass({GTypeName:`AdwStorybookViewSwitcherSidebar`},ViewSwitcherSidebarStory)}constructor(){super(T.fromMeta(ViewSwitcherSidebarStory.getMetadata(),`Default`))}static getMetadata(){return{...kl,component:w.ViewSwitcherSidebar.$gtype}}initialize(){let e=new w.ViewStack({vexpand:!0});for(let t of Ol){let n=new w.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=Ol.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 n=new w.ViewSwitcherSidebar({stack:e});this._switcher=n;let r=new h.Box({orientation:h.Orientation.HORIZONTAL,widthRequest:480,heightRequest:340});r.append(n),r.append(e),this.addContent(r),this._apply()}updateArgs(e){this._apply()}_apply(){this._switcher&&(this._switcher.mode=this.args.mode?w.SidebarMode.PAGE:w.SidebarMode.SIDEBAR)}};S.type_ensure(jl.$gtype);const Ml={stories:[jl]},Nl={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:i.SELECT,options:[{label:`Wide`,value:`wide`},{label:`Narrow`,value:`narrow`}],defaultValue:`wide`}]};var Pl=__exportAll({ViewSwitcherStories:()=>Il,ViewSwitcherStory:()=>Fl}),Fl=class ViewSwitcherStory extends T{_switcher=null;static{S.registerClass({GTypeName:`AdwStorybookViewSwitcher`},ViewSwitcherStory)}constructor(){super(T.fromMeta(ViewSwitcherStory.getMetadata(),`Default`))}static getMetadata(){return{...Nl,component:w.ViewSwitcher.$gtype}}buildPage(e,t,n){return new w.StatusPage({iconName:t,title:e,description:n,vexpand:!0})}initialize(){let e=new w.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 w.ViewSwitcher({stack:e,policy:this.policyFromArg(this.args.policy),halign:h.Align.CENTER});let t=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,widthRequest:480,heightRequest:340});t.append(this._switcher),t.append(e),this.addContent(t)}policyFromArg(e){return e===`narrow`?w.ViewSwitcherPolicy.NARROW:w.ViewSwitcherPolicy.WIDE}updateArgs(e){this._switcher&&(this._switcher.policy=this.policyFromArg(this.args.policy))}};S.type_ensure(Fl.$gtype);const Il={stories:[Fl]},Ll={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:i.BOOLEAN,defaultValue:!0},{name:`center`,label:`Centre`,type:i.SELECT,options:[{label:`A label`,value:`label`},{label:`Nothing`,value:`none`}],defaultValue:`label`}]};var Rl=__exportAll({ActionBarStories:()=>Bl,ActionBarStory:()=>zl}),zl=class ActionBarStory extends T{_bar=null;_centre=null;static{S.registerClass({GTypeName:`AdwStorybookActionBar`},ActionBarStory)}constructor(){super(T.fromMeta(ActionBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Ll,component:h.ActionBar.$gtype}}initialize(){this._bar=new h.ActionBar;let e=new h.Button({icon_name:`document-save-symbolic`});e.add_css_class(`flat`),this._bar.pack_end(e);let t=new h.Button({icon_name:`document-open-symbolic`});t.add_css_class(`flat`),this._bar.pack_end(t);let n=new h.Button({icon_name:`document-print-symbolic`});n.add_css_class(`flat`),this._bar.pack_start(n),this._centre=new h.Label({label:`notes.md`});let r=new h.Box({orientation:h.Orientation.VERTICAL,spacing:8});r.append(new h.Label({label:`The bar below is Gtk.ActionBar.`,css_classes:[`dimmed`]})),r.append(this._bar),this.addContent(r),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))}};S.type_ensure(zl.$gtype);const Bl={stories:[zl]},Vl={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:i.TEXT,defaultValue:`Editor`},{name:`showMenubar`,label:`Show menubar`,type:i.BOOLEAN,defaultValue:!0},{name:`hasMenubar`,label:`The application has one`,type:i.BOOLEAN,defaultValue:!0},{name:`deletable`,label:`Deletable`,type:i.BOOLEAN,defaultValue:!0}]};var Hl=__exportAll({GtkApplicationWindowStories:()=>Wl,GtkApplicationWindowStory:()=>Ul});function menubarModel(){let e=new b.Menu,t=new b.Menu;t.append(`_New`,`win.new`),t.append(`_Open…`,`win.open`);let n=new b.Menu;return n.append(`_Copy`,`win.copy`),n.append(`_Paste`,`win.paste`),e.append_section(null,t),e.append_section(null,n),e}var Ul=class GtkApplicationWindowStory extends T{_window=null;_application=null;_menubar=null;static{S.registerClass({GTypeName:`AdwStorybookGtkApplicationWindow`},GtkApplicationWindowStory)}constructor(){super(T.fromMeta(GtkApplicationWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...Vl,component:h.ApplicationWindow.$gtype}}initialize(){this._application=new h.Application({application_id:`eu.jumplink.AdwStorybookGtkApplicationWindow`}),this._menubar=menubarModel(),this._application.set_menubar(this._menubar),this._window=new h.ApplicationWindow({application:this._application,default_width:460,default_height:260}),this._window.set_titlebar(new h.HeaderBar);let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,margin_top:12,margin_start:12});e.append(new h.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)}};S.type_ensure(Ul.$gtype);const Wl={stories:[Ul]},Gl={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:i.SELECT,options:[{label:`The window title`,value:`none`},{label:`A custom centre widget`,value:`custom`}],defaultValue:`none`},{name:`showTitleButtons`,label:`Title buttons`,type:i.BOOLEAN,defaultValue:!0},{name:`decorationLayout`,label:`Decoration layout`,type:i.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 Kl=__exportAll({GtkHeaderBarStories:()=>Jl,GtkHeaderBarStory:()=>ql}),ql=class GtkHeaderBarStory extends T{_bar=null;_titleLabel=null;static{S.registerClass({GTypeName:`AdwStorybookGtkHeaderBar`},GtkHeaderBarStory)}constructor(){super(T.fromMeta(GtkHeaderBarStory.getMetadata(),`Default`))}static getMetadata(){return{...Gl,component:h.HeaderBar.$gtype}}initialize(){this._bar=new h.HeaderBar;let e=new h.Button({icon_name:`open-menu-symbolic`});e.add_css_class(`flat`),this._bar.pack_end(e);let t=new h.Button({icon_name:`system-search-symbolic`});t.add_css_class(`flat`),this._bar.pack_end(t);let n=new h.Button({label:`‹`});n.add_css_class(`flat`),this._bar.pack_start(n),this._titleLabel=new h.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)}};S.type_ensure(ql.$gtype);const Jl={stories:[ql]},Yl={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:i.TEXT,defaultValue:`Documents`},{name:`decorated`,label:`Decorated`,type:i.BOOLEAN,defaultValue:!0},{name:`deletable`,label:`Deletable`,type:i.BOOLEAN,defaultValue:!0},{name:`resizable`,label:`Resizable`,type:i.BOOLEAN,defaultValue:!0},{name:`maximized`,label:`Maximized`,type:i.BOOLEAN,defaultValue:!1},{name:`modal`,label:`Modal`,type:i.BOOLEAN,defaultValue:!1},{name:`hideOnClose`,label:`Hide on close`,type:i.BOOLEAN,defaultValue:!0}]};var Xl=__exportAll({GtkWindowStories:()=>Ql,GtkWindowStory:()=>Zl}),Zl=class GtkWindowStory extends T{_window=null;static{S.registerClass({GTypeName:`AdwStorybookGtkWindow`},GtkWindowStory)}constructor(){super(T.fromMeta(GtkWindowStory.getMetadata(),`Default`))}static getMetadata(){return{...Yl,component:h.Window.$gtype}}initialize(){this._window=new h.Window({default_width:460,default_height:280});let e=new h.HeaderBar;this._window.set_titlebar(e);let t=new h.Box({orientation:h.Orientation.VERTICAL,spacing:12,margin_top:12,margin_start:12});t.append(new h.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)}};S.type_ensure(Zl.$gtype);const Ql={stories:[Zl]},$l={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:i.SELECT,options:[{label:`Start`,value:`start`},{label:`End`,value:`end`}],defaultValue:`start`},{name:`decorationLayout`,label:`Decoration layout`,type:i.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:i.BOOLEAN,defaultValue:!0},{name:`maximized`,label:`Maximized window`,type:i.BOOLEAN,defaultValue:!1},{name:`modal`,label:`Modal window`,type:i.BOOLEAN,defaultValue:!1}]};var eu=__exportAll({WindowControlsStories:()=>tu,WindowControlsStory:()=>$}),$=class WindowControlsStory extends T{_window=null;_controls=null;static{S.registerClass({GTypeName:`AdwStorybookWindowControls`},WindowControlsStory)}constructor(){super(T.fromMeta(WindowControlsStory.getMetadata(),`Default`))}static getMetadata(){return{...$l,component:h.WindowControls.$gtype}}initialize(){this._window=new h.Window({title:`Documents`,default_width:420,default_height:220});let e=new h.Box({orientation:h.Orientation.VERTICAL,spacing:8});e.append(new h.Label({label:`The bar draws nothing outside a window.`,css_classes:[`dimmed`]})),this._window.set_child(e),this._controls=new h.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`?h.PackType.END:h.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}};S.type_ensure($.$gtype);const tu={stories:[$]};await runStorybook({applicationId:`org.gjsify.AdwaitaStorybook`,title:`Adwaita Storybook`,stories:collectStoryModules([Te,Oe,Me,Le,Be,We,Je,Qe,tt,it,ct,ft,ht,vt,xt,wt,Dt,At,Nt,It,Bt,Wt,Jt,Qt,nn,sn,dn,hn,bn,wn,kn,Fn,zn,Wn,Jn,Qn,nr,or,ur,mr,yr,wr,Or,Mr,Ir,Br,Wr,Jr,Qr,ii,li,mi,yi,Ci,Di,Mi,Ii,Hi,Ki,Xi,ea,ia,ca,fa,ga,ba,wa,Oa,Ma,Ia,Ba,Ga,Ya,no,oo,uo,go,xo,Eo,Po,zo,Ho,Jo,$o,rs,cs,fs,gs,bs,ws,As,Ps,Rs,Hs,Ks,Xs,ec,ic,cc,fc,gc,bc,Ec,Mc,Lc,Uc,Jc,el,al,ul,ml,yl,Tl,Al,Pl,Rl,Hl,Kl,Xl,eu])});export{};