@gjsify/example-gtk-adwaita-storybook 0.64.52 → 0.64.53
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/browser-main.js +75 -25
- package/package.json +5 -5
package/dist/browser-main.js
CHANGED
|
@@ -913,6 +913,7 @@ adw-about-dialog, adw-action-row, adw-alert-dialog, adw-alert-response, adw-appl
|
|
|
913
913
|
word-spacing: normal;
|
|
914
914
|
text-align: start;
|
|
915
915
|
text-indent: 0;
|
|
916
|
+
-webkit-tap-highlight-color: transparent;
|
|
916
917
|
text-transform: none;
|
|
917
918
|
text-shadow: none;
|
|
918
919
|
}
|
|
@@ -2305,6 +2306,7 @@ adw-application-window {
|
|
|
2305
2306
|
border-radius: var(--window-radius);
|
|
2306
2307
|
box-shadow: 0 0 14px 5px rgba(0, 0, 0, 0.15), 0 0 5px 2px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
|
|
2307
2308
|
overflow: hidden;
|
|
2309
|
+
contain: layout paint;
|
|
2308
2310
|
outline: 1px solid rgba(255, 255, 255, 0.07);
|
|
2309
2311
|
outline-offset: -1px;
|
|
2310
2312
|
width: 100%;
|
|
@@ -9936,7 +9938,7 @@ gtk-page-setup-unix-dialog .adw-page-setup-apply {
|
|
|
9936
9938
|
gtk-print-unix-dialog .adw-print-root {
|
|
9937
9939
|
display: flex;
|
|
9938
9940
|
flex-direction: column;
|
|
9939
|
-
min-width: 480px;
|
|
9941
|
+
min-width: min(480px, 100%);
|
|
9940
9942
|
}
|
|
9941
9943
|
gtk-print-unix-dialog .adw-print-switcher {
|
|
9942
9944
|
display: flex;
|
|
@@ -10578,13 +10580,19 @@ adw-preferences-dialog .adw-preferences-dialog-pages > adw-preferences-page[hidd
|
|
|
10578
10580
|
display: none;
|
|
10579
10581
|
}
|
|
10580
10582
|
|
|
10581
|
-
adw-dialog
|
|
10583
|
+
adw-dialog,
|
|
10584
|
+
gtk-print-unix-dialog,
|
|
10585
|
+
gtk-page-setup-unix-dialog {
|
|
10582
10586
|
display: none;
|
|
10583
10587
|
}
|
|
10584
|
-
adw-dialog.open
|
|
10588
|
+
adw-dialog.open,
|
|
10589
|
+
gtk-print-unix-dialog.open,
|
|
10590
|
+
gtk-page-setup-unix-dialog.open {
|
|
10585
10591
|
display: block;
|
|
10586
10592
|
}
|
|
10587
|
-
adw-dialog .adw-dialog-scrim
|
|
10593
|
+
adw-dialog .adw-dialog-scrim,
|
|
10594
|
+
gtk-print-unix-dialog .adw-dialog-scrim,
|
|
10595
|
+
gtk-page-setup-unix-dialog .adw-dialog-scrim {
|
|
10588
10596
|
position: fixed;
|
|
10589
10597
|
inset: 0;
|
|
10590
10598
|
z-index: 1050;
|
|
@@ -10595,7 +10603,9 @@ adw-dialog .adw-dialog-scrim {
|
|
|
10595
10603
|
background-color: var(--dialog-scrim-color, rgba(0, 0, 6, 0.32));
|
|
10596
10604
|
animation: adw-dialog-fade-in 0.2s cubic-bezier(0, 0, 0.2, 1);
|
|
10597
10605
|
}
|
|
10598
|
-
adw-dialog .adw-dialog-box
|
|
10606
|
+
adw-dialog .adw-dialog-box,
|
|
10607
|
+
gtk-print-unix-dialog .adw-dialog-box,
|
|
10608
|
+
gtk-page-setup-unix-dialog .adw-dialog-box {
|
|
10599
10609
|
box-sizing: border-box;
|
|
10600
10610
|
display: flex;
|
|
10601
10611
|
flex-direction: column;
|
|
@@ -10611,26 +10621,36 @@ adw-dialog .adw-dialog-box {
|
|
|
10611
10621
|
font-family: var(--font-family);
|
|
10612
10622
|
animation: adw-dialog-pop-in 0.2s cubic-bezier(0, 0, 0.2, 1);
|
|
10613
10623
|
}
|
|
10614
|
-
adw-dialog .adw-dialog-box:focus
|
|
10624
|
+
adw-dialog .adw-dialog-box:focus,
|
|
10625
|
+
gtk-print-unix-dialog .adw-dialog-box:focus,
|
|
10626
|
+
gtk-page-setup-unix-dialog .adw-dialog-box:focus {
|
|
10615
10627
|
outline: 1px solid var(--separator-color);
|
|
10616
10628
|
}
|
|
10617
|
-
adw-dialog .adw-dialog-header
|
|
10629
|
+
adw-dialog .adw-dialog-header,
|
|
10630
|
+
gtk-print-unix-dialog .adw-dialog-header,
|
|
10631
|
+
gtk-page-setup-unix-dialog .adw-dialog-header {
|
|
10618
10632
|
display: flex;
|
|
10619
10633
|
align-items: center;
|
|
10620
10634
|
min-height: 47px;
|
|
10621
10635
|
padding: 0 6px;
|
|
10622
10636
|
flex-shrink: 0;
|
|
10623
10637
|
}
|
|
10624
|
-
adw-dialog .adw-dialog-header-side
|
|
10638
|
+
adw-dialog .adw-dialog-header-side,
|
|
10639
|
+
gtk-print-unix-dialog .adw-dialog-header-side,
|
|
10640
|
+
gtk-page-setup-unix-dialog .adw-dialog-header-side {
|
|
10625
10641
|
display: flex;
|
|
10626
10642
|
align-items: center;
|
|
10627
10643
|
flex: 1 1 0;
|
|
10628
10644
|
min-width: 0;
|
|
10629
10645
|
}
|
|
10630
|
-
adw-dialog .adw-dialog-header-side--end
|
|
10646
|
+
adw-dialog .adw-dialog-header-side--end,
|
|
10647
|
+
gtk-print-unix-dialog .adw-dialog-header-side--end,
|
|
10648
|
+
gtk-page-setup-unix-dialog .adw-dialog-header-side--end {
|
|
10631
10649
|
justify-content: flex-end;
|
|
10632
10650
|
}
|
|
10633
|
-
adw-dialog .adw-dialog-title
|
|
10651
|
+
adw-dialog .adw-dialog-title,
|
|
10652
|
+
gtk-print-unix-dialog .adw-dialog-title,
|
|
10653
|
+
gtk-page-setup-unix-dialog .adw-dialog-title {
|
|
10634
10654
|
flex: 0 0 auto;
|
|
10635
10655
|
font-weight: bold;
|
|
10636
10656
|
font-size: var(--font-size-base);
|
|
@@ -10639,7 +10659,9 @@ adw-dialog .adw-dialog-title {
|
|
|
10639
10659
|
text-overflow: ellipsis;
|
|
10640
10660
|
padding: 0 6px;
|
|
10641
10661
|
}
|
|
10642
|
-
adw-dialog .adw-dialog-close
|
|
10662
|
+
adw-dialog .adw-dialog-close,
|
|
10663
|
+
gtk-print-unix-dialog .adw-dialog-close,
|
|
10664
|
+
gtk-page-setup-unix-dialog .adw-dialog-close {
|
|
10643
10665
|
appearance: none;
|
|
10644
10666
|
border: none;
|
|
10645
10667
|
margin: 0;
|
|
@@ -10654,7 +10676,11 @@ adw-dialog .adw-dialog-close {
|
|
|
10654
10676
|
flex: none;
|
|
10655
10677
|
transition: background-color 0.1s ease;
|
|
10656
10678
|
}
|
|
10657
|
-
adw-dialog .adw-dialog-close::before, adw-dialog .adw-dialog-close::after
|
|
10679
|
+
adw-dialog .adw-dialog-close::before, adw-dialog .adw-dialog-close::after,
|
|
10680
|
+
gtk-print-unix-dialog .adw-dialog-close::before,
|
|
10681
|
+
gtk-print-unix-dialog .adw-dialog-close::after,
|
|
10682
|
+
gtk-page-setup-unix-dialog .adw-dialog-close::before,
|
|
10683
|
+
gtk-page-setup-unix-dialog .adw-dialog-close::after {
|
|
10658
10684
|
content: "";
|
|
10659
10685
|
position: absolute;
|
|
10660
10686
|
top: 50%;
|
|
@@ -10664,41 +10690,61 @@ adw-dialog .adw-dialog-close::before, adw-dialog .adw-dialog-close::after {
|
|
|
10664
10690
|
background-color: currentColor;
|
|
10665
10691
|
border-radius: 1px;
|
|
10666
10692
|
}
|
|
10667
|
-
adw-dialog .adw-dialog-close::before
|
|
10693
|
+
adw-dialog .adw-dialog-close::before,
|
|
10694
|
+
gtk-print-unix-dialog .adw-dialog-close::before,
|
|
10695
|
+
gtk-page-setup-unix-dialog .adw-dialog-close::before {
|
|
10668
10696
|
transform: translate(-50%, -50%) rotate(45deg);
|
|
10669
10697
|
}
|
|
10670
|
-
adw-dialog .adw-dialog-close::after
|
|
10698
|
+
adw-dialog .adw-dialog-close::after,
|
|
10699
|
+
gtk-print-unix-dialog .adw-dialog-close::after,
|
|
10700
|
+
gtk-page-setup-unix-dialog .adw-dialog-close::after {
|
|
10671
10701
|
transform: translate(-50%, -50%) rotate(-45deg);
|
|
10672
10702
|
}
|
|
10673
|
-
adw-dialog .adw-dialog-close:hover
|
|
10703
|
+
adw-dialog .adw-dialog-close:hover,
|
|
10704
|
+
gtk-print-unix-dialog .adw-dialog-close:hover,
|
|
10705
|
+
gtk-page-setup-unix-dialog .adw-dialog-close:hover {
|
|
10674
10706
|
background-color: var(--button-hover-color);
|
|
10675
10707
|
}
|
|
10676
|
-
adw-dialog .adw-dialog-close:active
|
|
10708
|
+
adw-dialog .adw-dialog-close:active,
|
|
10709
|
+
gtk-print-unix-dialog .adw-dialog-close:active,
|
|
10710
|
+
gtk-page-setup-unix-dialog .adw-dialog-close:active {
|
|
10677
10711
|
background-color: var(--button-active-color);
|
|
10678
10712
|
}
|
|
10679
|
-
adw-dialog .adw-dialog-close:focus-visible
|
|
10713
|
+
adw-dialog .adw-dialog-close:focus-visible,
|
|
10714
|
+
gtk-print-unix-dialog .adw-dialog-close:focus-visible,
|
|
10715
|
+
gtk-page-setup-unix-dialog .adw-dialog-close:focus-visible {
|
|
10680
10716
|
outline: 2px solid var(--accent-color);
|
|
10681
10717
|
outline-offset: 1px;
|
|
10682
10718
|
}
|
|
10683
|
-
adw-dialog .adw-dialog-close.locked
|
|
10719
|
+
adw-dialog .adw-dialog-close.locked,
|
|
10720
|
+
gtk-print-unix-dialog .adw-dialog-close.locked,
|
|
10721
|
+
gtk-page-setup-unix-dialog .adw-dialog-close.locked {
|
|
10684
10722
|
opacity: var(--dim-opacity);
|
|
10685
10723
|
cursor: default;
|
|
10686
10724
|
}
|
|
10687
|
-
adw-dialog .adw-dialog-content
|
|
10725
|
+
adw-dialog .adw-dialog-content,
|
|
10726
|
+
gtk-print-unix-dialog .adw-dialog-content,
|
|
10727
|
+
gtk-page-setup-unix-dialog .adw-dialog-content {
|
|
10688
10728
|
flex: 1 1 auto;
|
|
10689
10729
|
min-height: 0;
|
|
10690
10730
|
overflow-y: auto;
|
|
10691
10731
|
padding: var(--spacing-m) var(--spacing-l) var(--spacing-l);
|
|
10692
10732
|
}
|
|
10693
|
-
adw-dialog .adw-dialog-header[hidden] + .adw-dialog-content
|
|
10733
|
+
adw-dialog .adw-dialog-header[hidden] + .adw-dialog-content,
|
|
10734
|
+
gtk-print-unix-dialog .adw-dialog-header[hidden] + .adw-dialog-content,
|
|
10735
|
+
gtk-page-setup-unix-dialog .adw-dialog-header[hidden] + .adw-dialog-content {
|
|
10694
10736
|
padding-top: var(--spacing-l);
|
|
10695
10737
|
}
|
|
10696
|
-
adw-dialog[data-presentation=bottom-sheet] .adw-dialog-scrim
|
|
10738
|
+
adw-dialog[data-presentation=bottom-sheet] .adw-dialog-scrim,
|
|
10739
|
+
gtk-print-unix-dialog[data-presentation=bottom-sheet] .adw-dialog-scrim,
|
|
10740
|
+
gtk-page-setup-unix-dialog[data-presentation=bottom-sheet] .adw-dialog-scrim {
|
|
10697
10741
|
align-items: flex-end;
|
|
10698
10742
|
justify-content: stretch;
|
|
10699
10743
|
padding: 0;
|
|
10700
10744
|
}
|
|
10701
|
-
adw-dialog[data-presentation=bottom-sheet] .adw-dialog-box
|
|
10745
|
+
adw-dialog[data-presentation=bottom-sheet] .adw-dialog-box,
|
|
10746
|
+
gtk-print-unix-dialog[data-presentation=bottom-sheet] .adw-dialog-box,
|
|
10747
|
+
gtk-page-setup-unix-dialog[data-presentation=bottom-sheet] .adw-dialog-box {
|
|
10702
10748
|
width: 100%;
|
|
10703
10749
|
max-width: none;
|
|
10704
10750
|
border-top-left-radius: var(--window-radius);
|
|
@@ -10709,12 +10755,16 @@ adw-dialog[data-presentation=bottom-sheet] .adw-dialog-box {
|
|
|
10709
10755
|
}
|
|
10710
10756
|
|
|
10711
10757
|
@media (max-width: 550px) {
|
|
10712
|
-
adw-dialog[data-presentation=auto] .adw-dialog-scrim
|
|
10758
|
+
adw-dialog[data-presentation=auto] .adw-dialog-scrim,
|
|
10759
|
+
gtk-print-unix-dialog[data-presentation=auto] .adw-dialog-scrim,
|
|
10760
|
+
gtk-page-setup-unix-dialog[data-presentation=auto] .adw-dialog-scrim {
|
|
10713
10761
|
align-items: flex-end;
|
|
10714
10762
|
justify-content: stretch;
|
|
10715
10763
|
padding: 0;
|
|
10716
10764
|
}
|
|
10717
|
-
adw-dialog[data-presentation=auto] .adw-dialog-box
|
|
10765
|
+
adw-dialog[data-presentation=auto] .adw-dialog-box,
|
|
10766
|
+
gtk-print-unix-dialog[data-presentation=auto] .adw-dialog-box,
|
|
10767
|
+
gtk-page-setup-unix-dialog[data-presentation=auto] .adw-dialog-box {
|
|
10718
10768
|
width: 100%;
|
|
10719
10769
|
max-width: none;
|
|
10720
10770
|
border-top-left-radius: var(--window-radius);
|
|
@@ -11204,7 +11254,7 @@ gtk-box[orientation=vertical] > [vexpand=false] {
|
|
|
11204
11254
|
background: none;
|
|
11205
11255
|
cursor: pointer;
|
|
11206
11256
|
}
|
|
11207
|
-
`,document.head.appendChild(e),As=!0}function h(e,t={},n=[]){let r=document.createElement(e);for(let[e,n]of Object.entries(t))r.setAttribute(e,n);for(let e of n)r.append(e);return r}var StorybookWebApp=class{_controller=new StorybookController(this,e=>this._buildControls(e));_options;_container;_appearance;_listEl;_previewEl;_previewTitle;_controlsGroup;_navSplit;_controlsSplit;_backBtn;_rowByTitle=new Map;constructor(e,t){this._container=e,this._options=t,this._appearance=new StorybookWebAppearance(e)}mount(){injectStorybookStyles(),this._buildUI(),this._observeBreakpoint(),this._exposeGlobal(),this._controller.mount(this._options.stories,this._options.openFirst!==!1)}_observeBreakpoint(){let apply=()=>this._applyBreakpoint();typeof ResizeObserver<`u`?new ResizeObserver(apply).observe(this._navSplit):globalThis.addEventListener?.(`resize`,apply),apply()}_applyBreakpoint(){let e=this._navSplit.clientWidth;if(e===0)return;let t=e<620,n=e<1e3,r=this._navSplit,i=this._controlsSplit;r.collapsed!==t&&(r.collapsed=t),i.collapsed!==n&&(i.collapsed=n),this._navSplit.removeAttribute(`show-content`),this._backBtn.hidden=!0,i.showSidebar=!n}get activeStory(){return this._controller.activeStory}listStories(){return this._controller.listStories()}openStoryByTitle(e){return this._controller.openStoryByTitle(e)}getCurrentStory(){return this._controller.getCurrentStory()}setActiveArg(e,t){return this._controller.setActiveArg(e,t)}renderSidebar(e,t){this._listEl.replaceChildren(),this._rowByTitle.clear();for(let{category:n,stories:r}of e){this._listEl.append(h(`div`,{class:`sb-category`},[n]));for(let{instance:e,name:n}of r){let r=h(`div`,{class:`sb-story-row`,role:`button`,tabindex:`0`},[n]);r.addEventListener(`click`,()=>t(e)),r.addEventListener(`keydown`,n=>{(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),t(e))}),this._listEl.append(r),this._rowByTitle.set(e.meta.title,r)}}}markSelected(e){for(let[t,n]of this._rowByTitle)n.classList.toggle(`selected`,t===e)}setPreviewTitle(e){this._previewTitle.setAttribute(`title`,e)}showPreview(e){this._previewEl.replaceChildren(e.element),this._navSplit.collapsed&&this._navSplit.setAttribute(`show-content`,``)}renderControls(e){let t=this._controlsGroup.querySelector(`.adw-preferences-group-listbox`);if(t){t.replaceChildren();for(let n of e)t.append(n.view)}}_buildControls(e){let t=[],n=e.meta.controls;if(Array.isArray(n))for(let r of n){if(!r?.name||!r?.type){console.warn(`Invalid control configuration:`,r);continue}let n=createControlRow(e,r);n&&t.push(n)}return t}_buildUI(){this._listEl=h(`div`,{class:`sb-sidebar-list navigation-sidebar`});let e=h(`div`,{class:`sb-sidebar-scroll`},[this._listEl]),t=h(`div`,{slot:`sidebar`,class:`sb-sidebar-pane`},[h(`adw-toolbar-view`,{},[h(`adw-header-bar`,{slot:`top`},[h(`adw-window-title`,{slot:`center`,title:this._options.title??`Stories`})]),e])]);this._previewEl=h(`div`,{class:`sb-preview-scroll`}),this._controlsGroup=h(`adw-preferences-group`,{title:`Controls`});let n=h(`div`,{slot:`sidebar`,class:`sb-controls-scroll`},[h(`div`,{class:`sb-controls-page`},[this._controlsGroup])]),r=h(`adw-overlay-split-view`,{"sidebar-position":`end`,"show-sidebar":``,"min-sidebar-width":`280`,"max-sidebar-width":`360`},[h(`div`,{slot:`content`,class:`sb-preview-pane`},[this._previewEl]),n]);this._controlsSplit=r,this._backBtn=h(`button`,{class:`adw-header-btn sb-back-btn`,slot:`start`,title:`Back to stories`,"aria-label":`Back to stories`}),this._backBtn.append(h(`span`,{class:`adw-icon adw-icon--go-previous`})),this._backBtn.hidden=!0,this._backBtn.addEventListener(`click`,()=>this._navSplit.removeAttribute(`show-content`)),this._previewTitle=h(`adw-window-title`,{slot:`center`,title:`Preview`});let i=h(`button`,{class:`adw-header-btn sb-toggle-controls`,title:`Toggle Controls`,"aria-label":`Toggle Controls`});i.append(h(`span`,{class:`adw-icon adw-icon--sidebar-show`})),i.setAttribute(`slot`,`end`),i.addEventListener(`click`,()=>{r.showSidebar=!r.showSidebar});let a=h(`button`,{class:`adw-header-btn sb-appearance-btn`,slot:`end`,title:`Appearance`,"aria-label":`Appearance`});a.append(h(`span`,{class:`adw-icon adw-icon--preferences-system`}));let o=buildAppearanceDialog(this._appearance);a.addEventListener(`click`,()=>{o.isConnected||this._container.append(o),o.toggleAttribute(`open`,!0)});let s=h(`div`,{slot:`content`,class:`sb-content-pane`},[h(`adw-toolbar-view`,{},[h(`adw-header-bar`,{slot:`top`},[this._backBtn,this._previewTitle,a,i]),r])]);this._navSplit=h(`adw-navigation-split-view`,{"min-sidebar-width":`220`,"max-sidebar-width":`320`},[t,s]);let c=h(`adw-window`,{class:`sb-window`},[this._navSplit]);this._container.replaceChildren(c),c.style.width=`100%`,c.style.height=`100%`,c.style.minWidth=`0`,c.style.minHeight=`0`}_exposeGlobal(){globalThis.__storybook={listStories:()=>this.listStories(),openStory:e=>this.openStoryByTitle(e),getCurrentStory:()=>this.getCurrentStory(),setArg:(e,t)=>this.setActiveArg(e,t),getArgs:()=>this.activeStory?.args??null}}};function mountStorybook(e,t){let n=new StorybookWebApp(e,t);return n.mount(),n}const js=[{title:`Sync`,kind:`switch`,active:!0},{title:`Export`,kind:`action`}],Ms=[`Blue`,`Teal`,`Green`,`Orange`],Ns={appearance:`Appearance`,account:`Account`,shortcuts:`Shortcuts`,actions:`Actions`},$={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`},Ps={value:3,lower:1,upper:10,step:1},Fs=[{title:`Copy`,accelerator:`<Control>C`},{title:`Select all`,accelerator:`<Shift><Control>a`},{title:`Switch tab`,accelerator:`<Alt>1...9`}],Is={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:t.BOOLEAN,description:`Adw.Banner:revealed — animates in and out`,defaultValue:!0}]};function el(e,t={}){let n=document.createElement(e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}const Ls={stories:[class OverviewWidgetsWebStory extends StoryElement{_banner=null;constructor(){super(OverviewWidgetsWebStory.getMetadata(),`Default`)}static getMetadata(){return Is}initialize(){let e=document.createElement(`div`);e.style.display=`flex`,e.style.flexDirection=`column`,e.style.width=`100%`,this._banner=el(`adw-banner`,{title:$.bannerTitle,"button-label":$.bannerButton}),this._syncBanner(),e.append(this._banner);let t=el(`adw-preferences-page`),n=el(`adw-preferences-group`,{title:Ns.appearance});n.append(el(`adw-switch-row`,{title:$.darkMode,subtitle:$.darkModeSubtitle}),el(`adw-switch-row`,{title:$.notifications,subtitle:$.notificationsSubtitle,active:``}),el(`adw-combo-row`,{title:$.accentColor,model:JSON.stringify([...Ms]),selected:`0`})),t.append(n);let r=el(`adw-preferences-group`,{title:Ns.account});r.append(el(`adw-entry-row`,{title:$.name,text:$.nameValue}),el(`adw-entry-row`,{title:$.email,text:$.emailValue}),el(`adw-spin-row`,{title:$.devices,min:String(Ps.lower),max:String(Ps.upper),step:String(Ps.step),value:String(Ps.value)}));let i=el(`adw-expander-row`,{title:$.advanced,subtitle:$.advancedSubtitle});i.toggleAttribute(`expanded`,!0);for(let e of js)i.append(e.kind===`switch`?el(`adw-switch-row`,e.active?{title:e.title,active:``}:{title:e.title}):el(`adw-action-row`,{title:e.title}));r.append(i),t.append(r);let a=el(`adw-preferences-group`,{title:Ns.shortcuts});for(let e of Fs){let t=el(`adw-action-row`,{title:e.title}),n=el(`adw-shortcut-label`,{accelerator:e.accelerator,slot:`suffix`});t.append(n),a.append(t)}t.append(a);let o=el(`adw-preferences-group`,{title:Ns.actions}),s=document.createElement(`div`);s.style.display=`flex`,s.style.gap=`12px`,s.style.margin=`6px 0`;let c=document.createElement(`button`);c.className=`adw-button suggested-action`,c.textContent=$.save;let l=document.createElement(`button`);l.className=`adw-button destructive-action`,l.textContent=$.delete,s.append(c,l),o.append(s),t.append(o),e.append(t),this.addContent(e)}updateArgs(e){this._syncBanner()}_syncBanner(){this._banner?.toggleAttribute(`revealed`,this.args.revealed)}}]},Rs={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:t.TEXT,defaultValue:`Ada Lovelace`},{name:`size`,label:`Size`,type:t.RANGE,min:24,max:160,step:8,defaultValue:96},{name:`showInitials`,label:`Show initials`,type:t.BOOLEAN,defaultValue:!0},{name:`iconName`,label:`Fallback icon`,type:t.SELECT,options:[{label:`Person`,value:`avatar-default-symbolic`},{label:`Contact`,value:`contact-new-symbolic`},{label:`Camera`,value:`camera-photo-symbolic`}],defaultValue:`avatar-default-symbolic`}]},zs={stories:[class AvatarWebStory extends StoryElement{_avatar=null;constructor(){super(AvatarWebStory.getMetadata(),`Default`)}static getMetadata(){return Rs}initialize(){this._avatar=document.createElement(`adw-avatar`),this._sync(),this.addContent(this._avatar)}updateArgs(e){this._sync()}_sync(){this._avatar&&(this._avatar.setAttribute(`text`,this.args.text),this._avatar.setAttribute(`size`,String(this.args.size)),this._avatar.toggleAttribute(`show-initials`,this.args.showInitials),this._avatar.setAttribute(`icon`,this.args.iconName.replace(/-symbolic$/,``)))}}]},Bs={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:t.TEXT,defaultValue:`Metered connection — updates paused`},{name:`buttonLabel`,label:`Button label`,type:t.TEXT,defaultValue:`Resume`},{name:`revealed`,label:`Revealed`,type:t.BOOLEAN,defaultValue:!0},{name:`useMarkup`,label:`Use markup`,type:t.BOOLEAN,defaultValue:!1}]},Vs={stories:[class BannerWebStory extends StoryElement{_banner=null;constructor(){super(BannerWebStory.getMetadata(),`Default`)}static getMetadata(){return Bs}initialize(){this._banner=document.createElement(`adw-banner`),this._sync();let e=document.createElement(`div`);e.style.cssText=`width:460px;max-width:100%;`,e.append(this._banner),this.addContent(e)}updateArgs(e){this._sync()}_sync(){this._banner&&(this._banner.setAttribute(`title`,this.args.title),this._banner.setAttribute(`button-label`,this.args.buttonLabel),this._banner.toggleAttribute(`revealed`,this.args.revealed),this._banner.toggleAttribute(`use-markup`,this.args.useMarkup))}}]},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:t.BOOLEAN,defaultValue:!0},{name:`showDayNames`,label:`Day names`,type:t.BOOLEAN,defaultValue:!0},{name:`showWeekNumbers`,label:`Week numbers`,type:t.BOOLEAN,defaultValue:!0}]},Ws={stories:[class CalendarWebStory extends StoryElement{_calendar=null;_marked=!1;constructor(){super(CalendarWebStory.getMetadata(),`Default`)}static getMetadata(){return Us}initialize(){this._calendar=document.createElement(`gtk-calendar`),this._calendar.setAttribute(`date`,`2026-10-02`),this._apply(),this.addContent(this._calendar)}updateArgs(e){this._apply()}_apply(){if(!this._calendar)return;this._calendar.setAttribute(`show-heading`,String(this.args.showHeading)),this._calendar.setAttribute(`show-day-names`,String(this.args.showDayNames)),this._calendar.toggleAttribute(`show-week-numbers`,this.args.showWeekNumbers);let e=this._calendar;this._marked&&e.clearMarks();for(let t of Hs)e.markDay(t);this._marked=!0}}]},Gs=[{value:`de`,label:`German`},{value:`fr`,label:`French`},{value:`nl`,label:`Dutch`},{value:`pt`,label:`Portuguese`}],Ks={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:t.BOOLEAN,defaultValue:!0},{name:`showColumnSeparators`,label:`Column separators`,type:t.BOOLEAN,defaultValue:!1},{name:`reorderable`,label:`Drag columns to reorder`,type:t.BOOLEAN,defaultValue:!1}]},qs={stories:[class ColumnViewWebStory extends StoryElement{_view=null;constructor(){super(ColumnViewWebStory.getMetadata(),`Default`)}static getMetadata(){return Ks}initialize(){this._view=document.createElement(`gtk-column-view`),this._view.setAttribute(`model`,JSON.stringify(Gs)),this._view.setAttribute(`columns`,JSON.stringify([{key:`label`,id:`name`,title:`Name`,expand:!0,sortable:!0},{key:`value`,id:`code`,title:`Code`}])),this._apply(),this.addContent(this._view)}updateArgs(e){this._apply()}_apply(){this._view&&(this._view.toggleAttribute(`show-row-separators`,this.args.showRowSeparators),this._view.toggleAttribute(`show-column-separators`,this.args.showColumnSeparators),this._view.toggleAttribute(`reorderable`,this.args.reorderable))}}]},Js=[`Red`,`Orange`,`Yellow`,`Green`,`Blue`,`Purple`,`Teal`,`Grey`],Ys={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:t.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:t.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`maxChildrenPerLine`,label:`Max children per line`,type:t.NUMBER,defaultValue:3},{name:`homogeneous`,label:`Homogeneous`,type:t.BOOLEAN,defaultValue:!1},{name:`rowSpacing`,label:`Row spacing`,type:t.NUMBER,defaultValue:6}]},Xs={stories:[class FlowBoxWebStory extends StoryElement{_box=null;constructor(){super(FlowBoxWebStory.getMetadata(),`Default`)}static getMetadata(){return Ys}initialize(){this._box=document.createElement(`gtk-flow-box`),this._box.style.width=`100%`;for(let e of Js){let t=document.createElement(`gtk-flow-box-child`),n=document.createElement(`gtk-label`);n.setAttribute(`label`,e),t.appendChild(n),this._box.appendChild(t)}this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){this._box&&(this._box.setAttribute(`selection-mode`,this.args.selectionMode),this._box.setAttribute(`orientation`,this.args.orientation),this._box.setAttribute(`max-children-per-line`,String(Math.max(1,Math.trunc(this.args.maxChildrenPerLine)))),this._box.toggleAttribute(`homogeneous`,this.args.homogeneous),this._box.setAttribute(`row-spacing`,String(Math.max(0,Math.trunc(this.args.rowSpacing)))))}}]},Zs=[`Documents`,`Downloads`,`Music`,`Pictures`,`Videos`],Qs=[{label:`Single`,value:`single`},{label:`Multiple`,value:`multiple`},{label:`None`,value:`none`}],$s={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:t.SELECT,options:Qs,defaultValue:`single`},{name:`showSeparators`,label:`Separators`,type:t.BOOLEAN,defaultValue:!0},{name:`singleClickActivate`,label:`Activate on single click`,type:t.BOOLEAN,defaultValue:!1}]},ec=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`],tc={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:t.NUMBER,defaultValue:4},{name:`minColumns`,label:`Min columns`,type:t.NUMBER,defaultValue:1},{name:`selectionMode`,label:`Selection`,type:t.SELECT,options:Qs,defaultValue:`single`}]},nc={stories:[class GridViewWebStory extends StoryElement{_view=null;constructor(){super(GridViewWebStory.getMetadata(),`Default`)}static getMetadata(){return tc}initialize(){this._view=document.createElement(`gtk-grid-view`),this._view.setAttribute(`model`,JSON.stringify(ec)),this._apply(),this.addContent(this._view)}updateArgs(e){this._apply()}_apply(){if(!this._view)return;let e=Math.max(1,this.args.minColumns);this._view.setAttribute(`min-columns`,String(e)),this._view.setAttribute(`max-columns`,String(Math.max(e,this.args.maxColumns))),this._view.setAttribute(`selection-mode`,this.args.selectionMode)}}]},rc=[`Documents`,`Downloads`,`Music`,`Pictures`,`Videos`],ic={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:t.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:t.BOOLEAN,defaultValue:!0},{name:`activateOnSingleClick`,label:`Activate on single click`,type:t.BOOLEAN,defaultValue:!0},{name:`tabBehavior`,label:`Tab behaviour`,type:t.SELECT,options:[{label:`All`,value:`all`},{label:`Item`,value:`item`},{label:`Cell`,value:`cell`}],defaultValue:`all`}]},ac={stories:[class ListBoxWebStory extends StoryElement{_box=null;constructor(){super(ListBoxWebStory.getMetadata(),`Default`)}static getMetadata(){return ic}initialize(){this._box=document.createElement(`gtk-list-box`),this._box.style.width=`100%`;for(let e of rc){let t=document.createElement(`gtk-list-box-row`),n=document.createElement(`gtk-label`);n.setAttribute(`label`,e),t.appendChild(n),this._box.appendChild(t)}this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){this._box&&(this._box.setAttribute(`selection-mode`,this.args.selectionMode),this._box.toggleAttribute(`show-separators`,this.args.showSeparators),this._box.setAttribute(`activate-on-single-click`,String(this.args.activateOnSingleClick)),this._box.setAttribute(`tab-behavior`,this.args.tabBehavior))}}]},oc={stories:[class ListViewWebStory extends StoryElement{_view=null;constructor(){super(ListViewWebStory.getMetadata(),`Default`)}static getMetadata(){return $s}initialize(){this._view=document.createElement(`gtk-list-view`),this._view.setAttribute(`model`,JSON.stringify(Zs)),this._apply(),this.addContent(this._view)}updateArgs(e){this._apply()}_apply(){this._view&&(this._view.setAttribute(`selection-mode`,this.args.selectionMode),this._view.toggleAttribute(`show-separators`,this.args.showSeparators),this._view.toggleAttribute(`single-click-activate`,this.args.singleClickActivate))}}]},sc=[{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:``}],cc={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:t.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:t.TEXT,defaultValue:`Disabled`}]},lc={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:t.TEXT,defaultValue:`Disabled`}]},uc={stories:[class ShortcutLabelWebStory extends StoryElement{_widget=null;constructor(){super(ShortcutLabelWebStory.getMetadata(),`Default`)}static getMetadata(){return cc}initialize(){this._widget=document.createElement(`adw-shortcut-label`),this._sync(),this.addContent(this._widget)}updateArgs(e){this._sync()}_sync(){this._widget&&(this._widget.setAttribute(`disabled-text`,this.args.disabledText),this._widget.setAttribute(`accelerator`,this.args.accelerator))}},class ShortcutLabelLevelsWebStory extends StoryElement{_widgets=[];constructor(){super(ShortcutLabelLevelsWebStory.getMetadata(),`Default`)}static getMetadata(){return lc}initialize(){let e=document.createElement(`div`);e.style.display=`grid`,e.style.gridTemplateColumns=`auto auto`,e.style.rowGap=`12px`,e.style.columnGap=`24px`,e.style.alignItems=`center`;for(let t of sc){let n=document.createElement(`span`);n.className=`dimmed`,n.textContent=t.label,e.append(n);let r=document.createElement(`adw-shortcut-label`);r.style.justifySelf=`end`,r.setAttribute(`disabled-text`,this.args.disabledText),r.setAttribute(`accelerator`,t.accelerator),e.append(r),this._widgets.push(r)}this.addContent(e)}updateArgs(e){for(let e of this._widgets)e.setAttribute(`disabled-text`,this.args.disabledText)}}]},dc={title:`Presentation/Spinner`,description:`Adw.Spinner — a lightweight loading indicator that spins continuously while visible.`,controls:[{name:`size`,label:`Size`,type:t.RANGE,min:16,max:64,step:4,defaultValue:48}]},fc={stories:[class SpinnerWebStory extends StoryElement{_spinner=null;constructor(){super(SpinnerWebStory.getMetadata(),`Default`)}static getMetadata(){return dc}initialize(){this._spinner=document.createElement(`adw-spinner`),this._spinner.setAttribute(`size`,String(this.args.size)),this.addContent(this._spinner)}updateArgs(e){this._spinner&&this._spinner.setAttribute(`size`,String(this.args.size))}}]},pc={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:t.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:t.TEXT,defaultValue:`No Documents`},{name:`description`,label:`Description`,type:t.TEXT,defaultValue:`Documents you create or open will appear here.`}]},mc={stories:[class StatusPageWebStory extends StoryElement{_page=null;constructor(){super(StatusPageWebStory.getMetadata(),`Default`)}static getMetadata(){return pc}initialize(){this._page=document.createElement(`adw-status-page`);let e=document.createElement(`gtk-button`);e.setAttribute(`label`,`New Document`),e.setAttribute(`pill`,``),e.setAttribute(`suggested`,``),this._page.appendChild(e),this._sync(),this.addContent(this._page)}updateArgs(e){this._sync()}_sync(){this._page&&(this._page.setAttribute(`icon`,this.args.iconName.replace(/-symbolic$/,``)),this._page.setAttribute(`title`,this.args.title),this._page.setAttribute(`description`,this.args.description))}}]},hc={Pictures:[`Holiday`,`Screenshots`],Music:[`Albums`],Notes:[]},gc={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:t.BOOLEAN,defaultValue:!0},{name:`hideExpander`,label:`Hide the arrow`,type:t.BOOLEAN,defaultValue:!1},{name:`indentForIcon`,label:`Indent leaves by an arrow`,type:t.BOOLEAN,defaultValue:!0}]},_c=Object.entries(hc).flatMap(([e,t])=>[{label:e,depth:0,expandable:t.length>0},...t.map(e=>({label:e,depth:1,expandable:!1}))]),vc={stories:[class TreeExpanderWebStory extends StoryElement{_expanders=[];constructor(){super(TreeExpanderWebStory.getMetadata(),`Default`)}static getMetadata(){return gc}initialize(){let e=document.createElement(`gtk-box`);e.setAttribute(`orientation`,`vertical`),e.setAttribute(`spacing`,`6`);for(let t of _c){let n=document.createElement(`gtk-tree-expander`);n.setAttribute(`depth`,String(t.depth)),n.toggleAttribute(`expandable`,t.expandable);let r=document.createElement(`gtk-label`);r.setAttribute(`label`,t.label),n.appendChild(r),e.appendChild(n),this._expanders.push(n)}this._apply(),this.addContent(e)}updateArgs(e){this._apply()}_apply(){let e=this.args.expanded;this._expanders.forEach((t,n)=>{t.toggleAttribute(`expanded`,e),t.toggleAttribute(`hide-expander`,this.args.hideExpander),t.setAttribute(`indent-for-icon`,String(this.args.indentForIcon)),_c[n].depth>0&&(t.hidden=!e)})}}]},yc={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:t.SELECT,options:[{label:`Toggle maximize`,value:`toggle-maximize`},{label:`Minimize`,value:`minimize`},{label:`Menu`,value:`menu`},{label:`None`,value:`none`}],defaultValue:`toggle-maximize`}]},bc={stories:[class WindowHandleWebStory extends StoryElement{_handle=null;constructor(){super(WindowHandleWebStory.getMetadata(),`Default`)}static getMetadata(){return yc}initialize(){let e=document.createElement(`gtk-window-handle`),t=document.createElement(`adw-header-bar`),n=document.createElement(`adw-window-title`);n.setAttribute(`title`,`Notes`),t.appendChild(n),e.appendChild(t),this._handle=e,this._apply(),this.addContent(e)}updateArgs(e){this._apply()}_apply(){let e=this._handle;e&&e.setAttribute(`double-click-action`,this.args.action)}}]},xc={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:t.TEXT,defaultValue:`Inbox`},{name:`subtitle`,label:`Subtitle`,type:t.TEXT,defaultValue:`3 unread messages`}]},Sc={stories:[class WindowTitleWebStory extends StoryElement{_windowTitle=null;constructor(){super(WindowTitleWebStory.getMetadata(),`Default`)}static getMetadata(){return xc}initialize(){this._windowTitle=document.createElement(`adw-window-title`),this._sync(),this.addContent(this._windowTitle)}updateArgs(e){this._sync()}_sync(){this._windowTitle&&(this._windowTitle.setAttribute(`title`,this.args.title),this._windowTitle.setAttribute(`subtitle`,this.args.subtitle))}}]},Cc={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:t.TEXT,defaultValue:`Wi-Fi`},{name:`subtitle`,label:`Subtitle`,type:t.TEXT,defaultValue:`Connected to Highgarden 5GHz`},{name:`iconName`,label:`Prefix icon`,type:t.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:t.BOOLEAN,defaultValue:!0}]};function iconClass$2(e){return`gtk-image adw-icon--${e.replace(/-symbolic$/,``)}`}__name(iconClass$2,`iconClass`);const wc={stories:[class ActionRowWebStory extends StoryElement{_row=null;_icon=null;constructor(){super(ActionRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Cc}initialize(){this._row=document.createElement(`adw-action-row`),this._icon=document.createElement(`span`),this._icon.setAttribute(`slot`,`prefix`),this._icon.className=iconClass$2(this.args.iconName);let e=document.createElement(`gtk-button`);e.setAttribute(`slot`,`suffix`),e.setAttribute(`icon`,`go-next`),e.setAttribute(`flat`,``),this._row.append(this._icon,e),this._syncRow();let t=document.createElement(`adw-preferences-group`);t.append(this._row);let n=document.createElement(`adw-clamp`);n.setAttribute(`maximum-size`,`400`),n.append(t),this.addContent(n)}updateArgs(e){this._syncRow(),this._icon&&(this._icon.className=iconClass$2(this.args.iconName))}_syncRow(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.setAttribute(`subtitle`,this.args.subtitle),this._row.toggleAttribute(`activatable`,this.args.activatable))}}]},Tc={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:t.TEXT,defaultValue:`Add account`},{name:`startIconName`,label:`Start icon`,type:t.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:t.SELECT,options:[{label:`None`,value:`none`},{label:`Suggested`,value:`suggested-action`},{label:`Destructive`,value:`destructive-action`}],defaultValue:`suggested-action`}]},Ec=[`suggested-action`,`destructive-action`];function iconName$1(e){return e.replace(/-symbolic$/,``)}__name(iconName$1,`iconName`);const Dc={stories:[class ButtonRowWebStory extends StoryElement{_row=null;constructor(){super(ButtonRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Tc}initialize(){this._row=document.createElement(`adw-button-row`),this._syncRow();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._syncRow()}_syncRow(){if(!this._row)return;this._row.setAttribute(`title`,this.args.title);let e=iconName$1(this.args.startIconName);e?this._row.setAttribute(`start-icon-name`,e):this._row.removeAttribute(`start-icon-name`),this._applyStyle(this.args.style)}_applyStyle(e){if(this._row){for(let e of Ec)this._row.classList.remove(e);e!==`none`&&this._row.classList.add(e)}}}]},Oc=[`Blue`,`Teal`,`Green`,`Orange`,`Purple`],kc={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:t.TEXT,defaultValue:`Accent colour`},{name:`subtitle`,label:`Subtitle`,type:t.TEXT,defaultValue:`Used to highlight selected items`},{name:`selected`,label:`Selected`,type:t.NUMBER,min:0,max:4,step:1,defaultValue:1}]},Ac={stories:[class ComboRowWebStory extends StoryElement{_row=null;constructor(){super(ComboRowWebStory.getMetadata(),`Default`)}static getMetadata(){return kc}initialize(){this._row=document.createElement(`adw-combo-row`),this._row.setAttribute(`model`,JSON.stringify([...Oc])),this._syncRow();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._syncRow()}_syncRow(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.setAttribute(`subtitle`,this.args.subtitle),this._row.setAttribute(`selected`,String(this.args.selected)))}}]},jc={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:t.TEXT,defaultValue:`Display name`},{name:`text`,label:`Text`,type:t.TEXT,defaultValue:`Ada Lovelace`},{name:`showApplyButton`,label:`Show apply button`,type:t.BOOLEAN,defaultValue:!0}]},Mc={stories:[class EntryRowWebStory extends StoryElement{_row=null;constructor(){super(EntryRowWebStory.getMetadata(),`Default`)}static getMetadata(){return jc}initialize(){this._row=document.createElement(`adw-entry-row`),this._syncRow();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._syncRow()}_syncRow(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.setAttribute(`text`,this.args.text),this._row.toggleAttribute(`show-apply-button`,this.args.showApplyButton))}}]},Nc={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:t.TEXT,defaultValue:`Proxy settings`},{name:`subtitle`,label:`Subtitle`,type:t.TEXT,defaultValue:`Route traffic through a custom proxy`},{name:`expanded`,label:`Expanded`,type:t.BOOLEAN,defaultValue:!0},{name:`showEnableSwitch`,label:`Show enable switch`,type:t.BOOLEAN,defaultValue:!1}]},Pc={stories:[class ExpanderRowWebStory extends StoryElement{_row=null;constructor(){super(ExpanderRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Nc}initialize(){this._row=document.createElement(`adw-expander-row`);let e=document.createElement(`adw-entry-row`);e.setAttribute(`title`,`Host`),e.setAttribute(`text`,`proxy.example.com`);let t=document.createElement(`adw-switch-row`);t.setAttribute(`title`,`Use authentication`),this._row.append(e,t),this._syncRow();let n=document.createElement(`adw-preferences-group`);n.append(this._row);let r=document.createElement(`adw-clamp`);r.setAttribute(`maximum-size`,`400`),r.append(n),this.addContent(r)}updateArgs(e){this._syncRow()}_syncRow(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.setAttribute(`subtitle`,this.args.subtitle),this._row.toggleAttribute(`expanded`,this.args.expanded),this._row.toggleAttribute(`show-enable-switch`,this.args.showEnableSwitch))}}]},Fc={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:t.TEXT,defaultValue:`Password`},{name:`text`,label:`Text`,type:t.TEXT,defaultValue:`correct-horse-battery`}]},Ic={stories:[class PasswordEntryRowWebStory extends StoryElement{_row=null;constructor(){super(PasswordEntryRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Fc}initialize(){this._row=document.createElement(`adw-password-entry-row`),this._syncRow();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._syncRow()}_syncRow(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.setAttribute(`text`,this.args.text))}}]},Lc={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:t.TEXT,defaultValue:`Account`},{name:`description`,label:`Description`,type:t.TEXT,defaultValue:`Manage how this device signs in and syncs.`}]},Rc=[`Europe`,`Americas`,`Asia`,`Oceania`],zc={stories:[class PreferencesGroupWebStory extends StoryElement{_group=null;constructor(){super(PreferencesGroupWebStory.getMetadata(),`Default`)}static getMetadata(){return Lc}initialize(){this._group=document.createElement(`adw-preferences-group`);let e=document.createElement(`button`);e.className=`adw-button flat`,e.textContent=`Sign out`,e.setAttribute(`slot`,`header-suffix`),this._group.append(e);let t=document.createElement(`adw-entry-row`);t.setAttribute(`title`,`Display name`),t.setAttribute(`text`,`Grace Hopper`),this._group.append(t);let n=document.createElement(`adw-switch-row`);n.setAttribute(`title`,`Sync over Wi-Fi only`),n.setAttribute(`subtitle`,`Avoid using mobile data for backups`),n.setAttribute(`active`,``),this._group.append(n);let r=document.createElement(`adw-combo-row`);r.setAttribute(`title`,`Region`),r.setAttribute(`model`,JSON.stringify(Rc)),r.setAttribute(`selected`,`0`),this._group.append(r),this._syncGroup();let i=document.createElement(`adw-clamp`);i.setAttribute(`maximum-size`,`400`),i.append(this._group),this.addContent(i)}updateArgs(e){this._syncGroup()}_syncGroup(){this._group&&(this._group.setAttribute(`title`,this.args.title),this._group.setAttribute(`description`,this.args.description))}}]},Bc={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:t.TEXT,defaultValue:`A <b>plain</b> preferences row`},{name:`useMarkup`,label:`Use markup`,type:t.BOOLEAN,defaultValue:!0},{name:`titleSelectable`,label:`Title selectable`,type:t.BOOLEAN,defaultValue:!1}]},Vc={stories:[class PreferencesRowWebStory extends StoryElement{_row=null;constructor(){super(PreferencesRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Bc}initialize(){this._row=document.createElement(`adw-preferences-row`),this._sync();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._sync()}_sync(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.toggleAttribute(`use-markup`,this.args.useMarkup),this._row.toggleAttribute(`title-selectable`,this.args.titleSelectable))}}]},Hc={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:t.TEXT,defaultValue:`Font size`},{name:`value`,label:`Value`,type:t.NUMBER,min:0,max:100,step:1,defaultValue:16},{name:`digits`,label:`Digits`,type:t.NUMBER,min:0,max:4,step:1,defaultValue:0}]},Uc={stories:[class SpinRowWebStory extends StoryElement{_row=null;constructor(){super(SpinRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Hc}initialize(){this._row=document.createElement(`adw-spin-row`),this._syncRow();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._syncRow()}_syncRow(){if(!this._row)return;this._row.setAttribute(`title`,this.args.title);let e=this.args.digits;this._row.setAttribute(`adjustment`,JSON.stringify({lower:0,upper:100,pageIncrement:10,stepIncrement:10**-e})),this._row.setAttribute(`value`,String(this.args.value))}}]},Wc={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:t.TEXT,defaultValue:`Automatic updates`},{name:`subtitle`,label:`Subtitle`,type:t.TEXT,defaultValue:`Download and install updates without asking`},{name:`active`,label:`Active`,type:t.BOOLEAN,defaultValue:!0}]},Gc={stories:[class SwitchRowWebStory extends StoryElement{_row=null;constructor(){super(SwitchRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Wc}initialize(){this._row=document.createElement(`adw-switch-row`),this._syncRow();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._syncRow()}_syncRow(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.setAttribute(`subtitle`,this.args.subtitle),this._row.toggleAttribute(`active`,this.args.active))}}]},Kc={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:t.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:t.SELECT,options:[{label:`Copy`,value:`copy`},{label:`Move`,value:`move`}],defaultValue:`copy`}]},qc={stories:[class DragIconWebStory extends StoryElement{_row=null;_hint=null;constructor(){super(DragIconWebStory.getMetadata(),`Default`)}static getMetadata(){return Kc}initialize(){let e=document.createElement(`div`);e.style.display=`flex`,e.style.flexDirection=`column`,e.style.alignItems=`center`,e.style.gap=`12px`;let t=document.createElement(`p`);t.className=`dim-label`,this._hint=t,e.append(t),this._row=document.createElement(`div`),this._row.className=`card`,this._row.draggable=!0,this._row.style.display=`flex`,this._row.style.alignItems=`center`,this._row.style.gap=`12px`,this._row.style.padding=`12px`;let n=document.createElement(`span`);n.className=`heading`,n.textContent=`Report.odt`,this._row.append(n),this._row.addEventListener(`dragstart`,e=>this._onDragStart(e)),e.append(this._row),this._apply(),this.addContent(e)}updateArgs(e){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`}}_onDragStart(e){e.dataTransfer!==null&&(e.dataTransfer.effectAllowed=this.args.actions===`move`?`move`:`copy`);let t=this._value();t!==null&&wa.getForDrag(e).setChild(wa.createWidgetForValue(t))}_apply(){this._hint===null||this._row===null||(this._hint.textContent=this.args.value===`none`?`Drag the row — no icon, because the value has no widget to show`:`Drag the row and watch the pointer`,this._row.title=`Draggable — the icon that follows the pointer is a <gtk-drag-icon>`)}}]},Jc={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:t.RANGE,min:0,max:320,step:16,defaultValue:160},{name:`contentHeight`,label:`Content height`,type:t.RANGE,min:0,max:320,step:16,defaultValue:120},{name:`shape`,label:`Shape`,type:t.SELECT,options:[{label:`Circle`,value:`circle`},{label:`Grid`,value:`grid`},{label:`Crosshair`,value:`crosshair`}],defaultValue:`circle`}]},Yc={stories:[class DrawingAreaWebStory extends StoryElement{_area=null;constructor(){super(DrawingAreaWebStory.getMetadata(),`Default`)}static getMetadata(){return Jc}initialize(){this._area=document.createElement(`gtk-drawing-area`),this._area.setDrawFunc((e,t,n,r)=>{switch(t.fillStyle=`currentColor`,t.globalCompositeOperation=`source-over`,t.fillRect(0,0,n,r),t.globalCompositeOperation=`difference`,this.args.shape){case`grid`:for(let e=0;e<n;e+=16)t.fillRect(e,0,8,r);break;case`crosshair`:t.fillRect(n/2-1,0,2,r),t.fillRect(0,r/2-1,n,2);break;default:t.beginPath(),t.arc(n/2,r/2,Math.min(n,r)/2,0,2*Math.PI),t.fill();break}t.globalCompositeOperation=`source-over`}),this._apply(),this.addContent(this._area)}updateArgs(e){this._apply()}_apply(){this._area&&(this._area.setAttribute(`content-width`,String(this.args.contentWidth)),this._area.setAttribute(`content-height`,String(this.args.contentHeight)))}}]},Xc={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:t.BOOLEAN,defaultValue:!0},{name:`hasDepthBuffer`,label:`Depth buffer`,type:t.BOOLEAN,defaultValue:!1},{name:`allowedApis`,label:`Allowed APIs`,type:t.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:t.BOOLEAN,defaultValue:!0}]},Zc={stories:[class GLAreaWebStory extends StoryElement{_area=null;_readout=null;_frame=0;_program=null;_buffer=null;_angle=0;_renders=0;_viewport=`—`;constructor(){super(GLAreaWebStory.getMetadata(),`Default`)}static getMetadata(){return Xc}initialize(){this._area=document.createElement(`gtk-gl-area`),this._area.style.width=`240px`,this._area.style.height=`160px`,this._readout=document.createElement(`div`),this._readout.className=`adw-gl-area-story-readout`,this._area.addEventListener(`resize`,e=>{let{width:t,height:n}=e.detail;this._viewport=`${t} × ${n}`,this._refresh()}),this._area.addEventListener(`render`,e=>{let{context:t}=e.detail;t&&this._draw(t),this._renders+=1,this._refresh()}),this._apply(),this._start();let e=document.createElement(`div`);e.style.display=`flex`,e.style.flexDirection=`column`,e.style.gap=`6px`,e.style.alignItems=`center`,e.append(this._area,this._readout),this.addContent(e)}updateArgs(e){this._stop(),this._apply(),this._start()}_apply(){this._area&&(this._area.setAttribute(`auto-render`,String(this.args.autoRender)),this._area.setAttribute(`has-depth-buffer`,String(this.args.hasDepthBuffer)),this._area.setAttribute(`allowed-apis`,this.args.allowedApis))}_start(){if(!this.args.spinning)return;let step=()=>{this._angle+=.05,this._area?.queueRender(),this._frame=requestAnimationFrame(step)};this._frame=requestAnimationFrame(step)}_stop(){this._frame!==0&&cancelAnimationFrame(this._frame),this._frame=0}_draw(e){if(!(e instanceof WebGLRenderingContext))return;this._program||this._build(e);let t=this._program;t!==null&&(e.clearColor(.15,.16,.18,1),e.clear(e.COLOR_BUFFER_BIT),e.useProgram(t),e.uniform1f(e.getUniformLocation(t,`angle`),this._angle),e.bindBuffer(e.ARRAY_BUFFER,this._buffer),e.enableVertexAttribArray(0),e.vertexAttribPointer(0,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,3))}_build(e){let compile=(t,n)=>{let r=e.createShader(t);return r?(e.shaderSource(r,n),e.compileShader(r),r):null},t=e.createProgram(),n=compile(e.VERTEX_SHADER,`
|
|
11257
|
+
`,document.head.appendChild(e),As=!0}function h(e,t={},n=[]){let r=document.createElement(e);for(let[e,n]of Object.entries(t))r.setAttribute(e,n);for(let e of n)r.append(e);return r}var StorybookWebApp=class{_controller=new StorybookController(this,e=>this._buildControls(e));_options;_container;_window=null;_appearance;_listEl;_previewEl;_previewTitle;_controlsGroup;_navSplit;_controlsSplit;_backBtn;_rowByTitle=new Map;constructor(e,t){this._container=e,this._options=t,this._appearance=new StorybookWebAppearance(e)}mount(){injectStorybookStyles(),this._buildUI(),this._observeBreakpoint(),this._exposeGlobal(),this._controller.mount(this._options.stories,this._options.openFirst!==!1)}_observeBreakpoint(){let apply=()=>this._applyBreakpoint();typeof ResizeObserver<`u`?new ResizeObserver(apply).observe(this._navSplit):globalThis.addEventListener?.(`resize`,apply),apply()}_applyBreakpoint(){let e=this._navSplit.clientWidth;if(e===0)return;let t=e<620,n=e<1e3,r=this._navSplit,i=this._controlsSplit;r.collapsed!==t&&(r.collapsed=t),i.collapsed!==n&&(i.collapsed=n),this._navSplit.removeAttribute(`show-content`),this._backBtn.hidden=!0,i.showSidebar=!n}get activeStory(){return this._controller.activeStory}listStories(){return this._controller.listStories()}openStoryByTitle(e){return this._controller.openStoryByTitle(e)}getCurrentStory(){return this._controller.getCurrentStory()}setActiveArg(e,t){return this._controller.setActiveArg(e,t)}renderSidebar(e,t){this._listEl.replaceChildren(),this._rowByTitle.clear();for(let{category:n,stories:r}of e){this._listEl.append(h(`div`,{class:`sb-category`},[n]));for(let{instance:e,name:n}of r){let r=h(`div`,{class:`sb-story-row`,role:`button`,tabindex:`0`},[n]);r.addEventListener(`click`,()=>t(e)),r.addEventListener(`keydown`,n=>{(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),t(e))}),this._listEl.append(r),this._rowByTitle.set(e.meta.title,r)}}}markSelected(e){for(let[t,n]of this._rowByTitle)n.classList.toggle(`selected`,t===e)}setPreviewTitle(e){this._previewTitle.setAttribute(`title`,e)}showPreview(e){this._previewEl.replaceChildren(e.element),this._navSplit.collapsed&&this._navSplit.setAttribute(`show-content`,``)}renderControls(e){let t=this._controlsGroup.querySelector(`.adw-preferences-group-listbox`);if(t){t.replaceChildren();for(let n of e)t.append(n.view)}}_buildControls(e){let t=[],n=e.meta.controls;if(Array.isArray(n))for(let r of n){if(!r?.name||!r?.type){console.warn(`Invalid control configuration:`,r);continue}let n=createControlRow(e,r);n&&t.push(n)}return t}_buildUI(){this._listEl=h(`div`,{class:`sb-sidebar-list navigation-sidebar`});let e=h(`div`,{class:`sb-sidebar-scroll`},[this._listEl]),t=h(`div`,{slot:`sidebar`,class:`sb-sidebar-pane`},[h(`adw-toolbar-view`,{},[h(`adw-header-bar`,{slot:`top`},[h(`adw-window-title`,{slot:`center`,title:this._options.title??`Stories`})]),e])]);this._previewEl=h(`div`,{class:`sb-preview-scroll`}),this._controlsGroup=h(`adw-preferences-group`,{title:`Controls`});let n=h(`div`,{slot:`sidebar`,class:`sb-controls-scroll`},[h(`div`,{class:`sb-controls-page`},[this._controlsGroup])]),r=h(`adw-overlay-split-view`,{"sidebar-position":`end`,"show-sidebar":``,"min-sidebar-width":`280`,"max-sidebar-width":`360`},[h(`div`,{slot:`content`,class:`sb-preview-pane`},[this._previewEl]),n]);this._controlsSplit=r,this._backBtn=h(`button`,{class:`adw-header-btn sb-back-btn`,slot:`start`,title:`Back to stories`,"aria-label":`Back to stories`}),this._backBtn.append(h(`span`,{class:`adw-icon adw-icon--go-previous`})),this._backBtn.hidden=!0,this._backBtn.addEventListener(`click`,()=>this._navSplit.removeAttribute(`show-content`)),this._previewTitle=h(`adw-window-title`,{slot:`center`,title:`Preview`});let i=h(`button`,{class:`adw-header-btn sb-toggle-controls`,title:`Toggle Controls`,"aria-label":`Toggle Controls`});i.append(h(`span`,{class:`adw-icon adw-icon--sidebar-show`})),i.setAttribute(`slot`,`end`),i.addEventListener(`click`,()=>{r.showSidebar=!r.showSidebar});let a=h(`button`,{class:`adw-header-btn sb-appearance-btn`,slot:`end`,title:`Appearance`,"aria-label":`Appearance`});a.append(h(`span`,{class:`adw-icon adw-icon--preferences-system`}));let o=buildAppearanceDialog(this._appearance);a.addEventListener(`click`,()=>{o.isConnected||this._window?.append(o),o.toggleAttribute(`open`,!0)});let s=h(`div`,{slot:`content`,class:`sb-content-pane`},[h(`adw-toolbar-view`,{},[h(`adw-header-bar`,{slot:`top`},[this._backBtn,this._previewTitle,a,i]),r])]);this._navSplit=h(`adw-navigation-split-view`,{"min-sidebar-width":`220`,"max-sidebar-width":`320`},[t,s]);let c=h(`adw-window`,{class:`sb-window`},[this._navSplit]);this._window=c,this._container.replaceChildren(c),c.style.width=`100%`,c.style.height=`100%`,c.style.minWidth=`0`,c.style.minHeight=`0`}_exposeGlobal(){globalThis.__storybook={listStories:()=>this.listStories(),openStory:e=>this.openStoryByTitle(e),getCurrentStory:()=>this.getCurrentStory(),setArg:(e,t)=>this.setActiveArg(e,t),getArgs:()=>this.activeStory?.args??null}}};function mountStorybook(e,t){let n=new StorybookWebApp(e,t);return n.mount(),n}const js=[{title:`Sync`,kind:`switch`,active:!0},{title:`Export`,kind:`action`}],Ms=[`Blue`,`Teal`,`Green`,`Orange`],Ns={appearance:`Appearance`,account:`Account`,shortcuts:`Shortcuts`,actions:`Actions`},$={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`},Ps={value:3,lower:1,upper:10,step:1},Fs=[{title:`Copy`,accelerator:`<Control>C`},{title:`Select all`,accelerator:`<Shift><Control>a`},{title:`Switch tab`,accelerator:`<Alt>1...9`}],Is={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:t.BOOLEAN,description:`Adw.Banner:revealed — animates in and out`,defaultValue:!0}]};function el(e,t={}){let n=document.createElement(e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}const Ls={stories:[class OverviewWidgetsWebStory extends StoryElement{_banner=null;constructor(){super(OverviewWidgetsWebStory.getMetadata(),`Default`)}static getMetadata(){return Is}initialize(){let e=document.createElement(`div`);e.style.display=`flex`,e.style.flexDirection=`column`,e.style.width=`100%`,this._banner=el(`adw-banner`,{title:$.bannerTitle,"button-label":$.bannerButton}),this._syncBanner(),e.append(this._banner);let t=el(`adw-preferences-page`),n=el(`adw-preferences-group`,{title:Ns.appearance});n.append(el(`adw-switch-row`,{title:$.darkMode,subtitle:$.darkModeSubtitle}),el(`adw-switch-row`,{title:$.notifications,subtitle:$.notificationsSubtitle,active:``}),el(`adw-combo-row`,{title:$.accentColor,model:JSON.stringify([...Ms]),selected:`0`})),t.append(n);let r=el(`adw-preferences-group`,{title:Ns.account});r.append(el(`adw-entry-row`,{title:$.name,text:$.nameValue}),el(`adw-entry-row`,{title:$.email,text:$.emailValue}),el(`adw-spin-row`,{title:$.devices,min:String(Ps.lower),max:String(Ps.upper),step:String(Ps.step),value:String(Ps.value)}));let i=el(`adw-expander-row`,{title:$.advanced,subtitle:$.advancedSubtitle});i.toggleAttribute(`expanded`,!0);for(let e of js)i.append(e.kind===`switch`?el(`adw-switch-row`,e.active?{title:e.title,active:``}:{title:e.title}):el(`adw-action-row`,{title:e.title}));r.append(i),t.append(r);let a=el(`adw-preferences-group`,{title:Ns.shortcuts});for(let e of Fs){let t=el(`adw-action-row`,{title:e.title}),n=el(`adw-shortcut-label`,{accelerator:e.accelerator,slot:`suffix`});t.append(n),a.append(t)}t.append(a);let o=el(`adw-preferences-group`,{title:Ns.actions}),s=document.createElement(`div`);s.style.display=`flex`,s.style.gap=`12px`,s.style.margin=`6px 0`;let c=document.createElement(`button`);c.className=`adw-button suggested-action`,c.textContent=$.save;let l=document.createElement(`button`);l.className=`adw-button destructive-action`,l.textContent=$.delete,s.append(c,l),o.append(s),t.append(o),e.append(t),this.addContent(e)}updateArgs(e){this._syncBanner()}_syncBanner(){this._banner?.toggleAttribute(`revealed`,this.args.revealed)}}]},Rs={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:t.TEXT,defaultValue:`Ada Lovelace`},{name:`size`,label:`Size`,type:t.RANGE,min:24,max:160,step:8,defaultValue:96},{name:`showInitials`,label:`Show initials`,type:t.BOOLEAN,defaultValue:!0},{name:`iconName`,label:`Fallback icon`,type:t.SELECT,options:[{label:`Person`,value:`avatar-default-symbolic`},{label:`Contact`,value:`contact-new-symbolic`},{label:`Camera`,value:`camera-photo-symbolic`}],defaultValue:`avatar-default-symbolic`}]},zs={stories:[class AvatarWebStory extends StoryElement{_avatar=null;constructor(){super(AvatarWebStory.getMetadata(),`Default`)}static getMetadata(){return Rs}initialize(){this._avatar=document.createElement(`adw-avatar`),this._sync(),this.addContent(this._avatar)}updateArgs(e){this._sync()}_sync(){this._avatar&&(this._avatar.setAttribute(`text`,this.args.text),this._avatar.setAttribute(`size`,String(this.args.size)),this._avatar.toggleAttribute(`show-initials`,this.args.showInitials),this._avatar.setAttribute(`icon`,this.args.iconName.replace(/-symbolic$/,``)))}}]},Bs={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:t.TEXT,defaultValue:`Metered connection — updates paused`},{name:`buttonLabel`,label:`Button label`,type:t.TEXT,defaultValue:`Resume`},{name:`revealed`,label:`Revealed`,type:t.BOOLEAN,defaultValue:!0},{name:`useMarkup`,label:`Use markup`,type:t.BOOLEAN,defaultValue:!1}]},Vs={stories:[class BannerWebStory extends StoryElement{_banner=null;constructor(){super(BannerWebStory.getMetadata(),`Default`)}static getMetadata(){return Bs}initialize(){this._banner=document.createElement(`adw-banner`),this._sync();let e=document.createElement(`div`);e.style.cssText=`width:460px;max-width:100%;`,e.append(this._banner),this.addContent(e)}updateArgs(e){this._sync()}_sync(){this._banner&&(this._banner.setAttribute(`title`,this.args.title),this._banner.setAttribute(`button-label`,this.args.buttonLabel),this._banner.toggleAttribute(`revealed`,this.args.revealed),this._banner.toggleAttribute(`use-markup`,this.args.useMarkup))}}]},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:t.BOOLEAN,defaultValue:!0},{name:`showDayNames`,label:`Day names`,type:t.BOOLEAN,defaultValue:!0},{name:`showWeekNumbers`,label:`Week numbers`,type:t.BOOLEAN,defaultValue:!0}]},Ws={stories:[class CalendarWebStory extends StoryElement{_calendar=null;_marked=!1;constructor(){super(CalendarWebStory.getMetadata(),`Default`)}static getMetadata(){return Us}initialize(){this._calendar=document.createElement(`gtk-calendar`),this._calendar.setAttribute(`date`,`2026-10-02`),this._apply(),this.addContent(this._calendar)}updateArgs(e){this._apply()}_apply(){if(!this._calendar)return;this._calendar.setAttribute(`show-heading`,String(this.args.showHeading)),this._calendar.setAttribute(`show-day-names`,String(this.args.showDayNames)),this._calendar.toggleAttribute(`show-week-numbers`,this.args.showWeekNumbers);let e=this._calendar;this._marked&&e.clearMarks();for(let t of Hs)e.markDay(t);this._marked=!0}}]},Gs=[{value:`de`,label:`German`},{value:`fr`,label:`French`},{value:`nl`,label:`Dutch`},{value:`pt`,label:`Portuguese`}],Ks={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:t.BOOLEAN,defaultValue:!0},{name:`showColumnSeparators`,label:`Column separators`,type:t.BOOLEAN,defaultValue:!1},{name:`reorderable`,label:`Drag columns to reorder`,type:t.BOOLEAN,defaultValue:!1}]},qs={stories:[class ColumnViewWebStory extends StoryElement{_view=null;constructor(){super(ColumnViewWebStory.getMetadata(),`Default`)}static getMetadata(){return Ks}initialize(){this._view=document.createElement(`gtk-column-view`),this._view.setAttribute(`model`,JSON.stringify(Gs)),this._view.setAttribute(`columns`,JSON.stringify([{key:`label`,id:`name`,title:`Name`,expand:!0,sortable:!0},{key:`value`,id:`code`,title:`Code`}])),this._apply(),this.addContent(this._view)}updateArgs(e){this._apply()}_apply(){this._view&&(this._view.toggleAttribute(`show-row-separators`,this.args.showRowSeparators),this._view.toggleAttribute(`show-column-separators`,this.args.showColumnSeparators),this._view.toggleAttribute(`reorderable`,this.args.reorderable))}}]},Js=[`Red`,`Orange`,`Yellow`,`Green`,`Blue`,`Purple`,`Teal`,`Grey`],Ys={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:t.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:t.SELECT,options:[{label:`Horizontal`,value:`horizontal`},{label:`Vertical`,value:`vertical`}],defaultValue:`horizontal`},{name:`maxChildrenPerLine`,label:`Max children per line`,type:t.NUMBER,defaultValue:3},{name:`homogeneous`,label:`Homogeneous`,type:t.BOOLEAN,defaultValue:!1},{name:`rowSpacing`,label:`Row spacing`,type:t.NUMBER,defaultValue:6}]},Xs={stories:[class FlowBoxWebStory extends StoryElement{_box=null;constructor(){super(FlowBoxWebStory.getMetadata(),`Default`)}static getMetadata(){return Ys}initialize(){this._box=document.createElement(`gtk-flow-box`),this._box.style.width=`100%`;for(let e of Js){let t=document.createElement(`gtk-flow-box-child`),n=document.createElement(`gtk-label`);n.setAttribute(`label`,e),t.appendChild(n),this._box.appendChild(t)}this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){this._box&&(this._box.setAttribute(`selection-mode`,this.args.selectionMode),this._box.setAttribute(`orientation`,this.args.orientation),this._box.setAttribute(`max-children-per-line`,String(Math.max(1,Math.trunc(this.args.maxChildrenPerLine)))),this._box.toggleAttribute(`homogeneous`,this.args.homogeneous),this._box.setAttribute(`row-spacing`,String(Math.max(0,Math.trunc(this.args.rowSpacing)))))}}]},Zs=[`Documents`,`Downloads`,`Music`,`Pictures`,`Videos`],Qs=[{label:`Single`,value:`single`},{label:`Multiple`,value:`multiple`},{label:`None`,value:`none`}],$s={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:t.SELECT,options:Qs,defaultValue:`single`},{name:`showSeparators`,label:`Separators`,type:t.BOOLEAN,defaultValue:!0},{name:`singleClickActivate`,label:`Activate on single click`,type:t.BOOLEAN,defaultValue:!1}]},ec=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`],tc={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:t.NUMBER,defaultValue:4},{name:`minColumns`,label:`Min columns`,type:t.NUMBER,defaultValue:1},{name:`selectionMode`,label:`Selection`,type:t.SELECT,options:Qs,defaultValue:`single`}]},nc={stories:[class GridViewWebStory extends StoryElement{_view=null;constructor(){super(GridViewWebStory.getMetadata(),`Default`)}static getMetadata(){return tc}initialize(){this._view=document.createElement(`gtk-grid-view`),this._view.setAttribute(`model`,JSON.stringify(ec)),this._apply(),this.addContent(this._view)}updateArgs(e){this._apply()}_apply(){if(!this._view)return;let e=Math.max(1,this.args.minColumns);this._view.setAttribute(`min-columns`,String(e)),this._view.setAttribute(`max-columns`,String(Math.max(e,this.args.maxColumns))),this._view.setAttribute(`selection-mode`,this.args.selectionMode)}}]},rc=[`Documents`,`Downloads`,`Music`,`Pictures`,`Videos`],ic={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:t.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:t.BOOLEAN,defaultValue:!0},{name:`activateOnSingleClick`,label:`Activate on single click`,type:t.BOOLEAN,defaultValue:!0},{name:`tabBehavior`,label:`Tab behaviour`,type:t.SELECT,options:[{label:`All`,value:`all`},{label:`Item`,value:`item`},{label:`Cell`,value:`cell`}],defaultValue:`all`}]},ac={stories:[class ListBoxWebStory extends StoryElement{_box=null;constructor(){super(ListBoxWebStory.getMetadata(),`Default`)}static getMetadata(){return ic}initialize(){this._box=document.createElement(`gtk-list-box`),this._box.style.width=`100%`;for(let e of rc){let t=document.createElement(`gtk-list-box-row`),n=document.createElement(`gtk-label`);n.setAttribute(`label`,e),t.appendChild(n),this._box.appendChild(t)}this._apply(),this.addContent(this._box)}updateArgs(e){this._apply()}_apply(){this._box&&(this._box.setAttribute(`selection-mode`,this.args.selectionMode),this._box.toggleAttribute(`show-separators`,this.args.showSeparators),this._box.setAttribute(`activate-on-single-click`,String(this.args.activateOnSingleClick)),this._box.setAttribute(`tab-behavior`,this.args.tabBehavior))}}]},oc={stories:[class ListViewWebStory extends StoryElement{_view=null;constructor(){super(ListViewWebStory.getMetadata(),`Default`)}static getMetadata(){return $s}initialize(){this._view=document.createElement(`gtk-list-view`),this._view.setAttribute(`model`,JSON.stringify(Zs)),this._apply(),this.addContent(this._view)}updateArgs(e){this._apply()}_apply(){this._view&&(this._view.setAttribute(`selection-mode`,this.args.selectionMode),this._view.toggleAttribute(`show-separators`,this.args.showSeparators),this._view.toggleAttribute(`single-click-activate`,this.args.singleClickActivate))}}]},sc=[{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:``}],cc={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:t.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:t.TEXT,defaultValue:`Disabled`}]},lc={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:t.TEXT,defaultValue:`Disabled`}]},uc={stories:[class ShortcutLabelWebStory extends StoryElement{_widget=null;constructor(){super(ShortcutLabelWebStory.getMetadata(),`Default`)}static getMetadata(){return cc}initialize(){this._widget=document.createElement(`adw-shortcut-label`),this._sync(),this.addContent(this._widget)}updateArgs(e){this._sync()}_sync(){this._widget&&(this._widget.setAttribute(`disabled-text`,this.args.disabledText),this._widget.setAttribute(`accelerator`,this.args.accelerator))}},class ShortcutLabelLevelsWebStory extends StoryElement{_widgets=[];constructor(){super(ShortcutLabelLevelsWebStory.getMetadata(),`Default`)}static getMetadata(){return lc}initialize(){let e=document.createElement(`div`);e.style.display=`grid`,e.style.gridTemplateColumns=`auto auto`,e.style.rowGap=`12px`,e.style.columnGap=`24px`,e.style.alignItems=`center`;for(let t of sc){let n=document.createElement(`span`);n.className=`dimmed`,n.textContent=t.label,e.append(n);let r=document.createElement(`adw-shortcut-label`);r.style.justifySelf=`end`,r.setAttribute(`disabled-text`,this.args.disabledText),r.setAttribute(`accelerator`,t.accelerator),e.append(r),this._widgets.push(r)}this.addContent(e)}updateArgs(e){for(let e of this._widgets)e.setAttribute(`disabled-text`,this.args.disabledText)}}]},dc={title:`Presentation/Spinner`,description:`Adw.Spinner — a lightweight loading indicator that spins continuously while visible.`,controls:[{name:`size`,label:`Size`,type:t.RANGE,min:16,max:64,step:4,defaultValue:48}]},fc={stories:[class SpinnerWebStory extends StoryElement{_spinner=null;constructor(){super(SpinnerWebStory.getMetadata(),`Default`)}static getMetadata(){return dc}initialize(){this._spinner=document.createElement(`adw-spinner`),this._spinner.setAttribute(`size`,String(this.args.size)),this.addContent(this._spinner)}updateArgs(e){this._spinner&&this._spinner.setAttribute(`size`,String(this.args.size))}}]},pc={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:t.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:t.TEXT,defaultValue:`No Documents`},{name:`description`,label:`Description`,type:t.TEXT,defaultValue:`Documents you create or open will appear here.`}]},mc={stories:[class StatusPageWebStory extends StoryElement{_page=null;constructor(){super(StatusPageWebStory.getMetadata(),`Default`)}static getMetadata(){return pc}initialize(){this._page=document.createElement(`adw-status-page`);let e=document.createElement(`gtk-button`);e.setAttribute(`label`,`New Document`),e.setAttribute(`pill`,``),e.setAttribute(`suggested`,``),this._page.appendChild(e),this._sync(),this.addContent(this._page)}updateArgs(e){this._sync()}_sync(){this._page&&(this._page.setAttribute(`icon`,this.args.iconName.replace(/-symbolic$/,``)),this._page.setAttribute(`title`,this.args.title),this._page.setAttribute(`description`,this.args.description))}}]},hc={Pictures:[`Holiday`,`Screenshots`],Music:[`Albums`],Notes:[]},gc={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:t.BOOLEAN,defaultValue:!0},{name:`hideExpander`,label:`Hide the arrow`,type:t.BOOLEAN,defaultValue:!1},{name:`indentForIcon`,label:`Indent leaves by an arrow`,type:t.BOOLEAN,defaultValue:!0}]},_c=Object.entries(hc).flatMap(([e,t])=>[{label:e,depth:0,expandable:t.length>0},...t.map(e=>({label:e,depth:1,expandable:!1}))]),vc={stories:[class TreeExpanderWebStory extends StoryElement{_expanders=[];constructor(){super(TreeExpanderWebStory.getMetadata(),`Default`)}static getMetadata(){return gc}initialize(){let e=document.createElement(`gtk-box`);e.setAttribute(`orientation`,`vertical`),e.setAttribute(`spacing`,`6`);for(let t of _c){let n=document.createElement(`gtk-tree-expander`);n.setAttribute(`depth`,String(t.depth)),n.toggleAttribute(`expandable`,t.expandable);let r=document.createElement(`gtk-label`);r.setAttribute(`label`,t.label),n.appendChild(r),e.appendChild(n),this._expanders.push(n)}this._apply(),this.addContent(e)}updateArgs(e){this._apply()}_apply(){let e=this.args.expanded;this._expanders.forEach((t,n)=>{t.toggleAttribute(`expanded`,e),t.toggleAttribute(`hide-expander`,this.args.hideExpander),t.setAttribute(`indent-for-icon`,String(this.args.indentForIcon)),_c[n].depth>0&&(t.hidden=!e)})}}]},yc={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:t.SELECT,options:[{label:`Toggle maximize`,value:`toggle-maximize`},{label:`Minimize`,value:`minimize`},{label:`Menu`,value:`menu`},{label:`None`,value:`none`}],defaultValue:`toggle-maximize`}]},bc={stories:[class WindowHandleWebStory extends StoryElement{_handle=null;constructor(){super(WindowHandleWebStory.getMetadata(),`Default`)}static getMetadata(){return yc}initialize(){let e=document.createElement(`gtk-window-handle`),t=document.createElement(`adw-header-bar`),n=document.createElement(`adw-window-title`);n.setAttribute(`title`,`Notes`),t.appendChild(n),e.appendChild(t),this._handle=e,this._apply(),this.addContent(e)}updateArgs(e){this._apply()}_apply(){let e=this._handle;e&&e.setAttribute(`double-click-action`,this.args.action)}}]},xc={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:t.TEXT,defaultValue:`Inbox`},{name:`subtitle`,label:`Subtitle`,type:t.TEXT,defaultValue:`3 unread messages`}]},Sc={stories:[class WindowTitleWebStory extends StoryElement{_windowTitle=null;constructor(){super(WindowTitleWebStory.getMetadata(),`Default`)}static getMetadata(){return xc}initialize(){this._windowTitle=document.createElement(`adw-window-title`),this._sync(),this.addContent(this._windowTitle)}updateArgs(e){this._sync()}_sync(){this._windowTitle&&(this._windowTitle.setAttribute(`title`,this.args.title),this._windowTitle.setAttribute(`subtitle`,this.args.subtitle))}}]},Cc={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:t.TEXT,defaultValue:`Wi-Fi`},{name:`subtitle`,label:`Subtitle`,type:t.TEXT,defaultValue:`Connected to Highgarden 5GHz`},{name:`iconName`,label:`Prefix icon`,type:t.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:t.BOOLEAN,defaultValue:!0}]};function iconClass$2(e){return`gtk-image adw-icon--${e.replace(/-symbolic$/,``)}`}__name(iconClass$2,`iconClass`);const wc={stories:[class ActionRowWebStory extends StoryElement{_row=null;_icon=null;constructor(){super(ActionRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Cc}initialize(){this._row=document.createElement(`adw-action-row`),this._icon=document.createElement(`span`),this._icon.setAttribute(`slot`,`prefix`),this._icon.className=iconClass$2(this.args.iconName);let e=document.createElement(`gtk-button`);e.setAttribute(`slot`,`suffix`),e.setAttribute(`icon`,`go-next`),e.setAttribute(`flat`,``),this._row.append(this._icon,e),this._syncRow();let t=document.createElement(`adw-preferences-group`);t.append(this._row);let n=document.createElement(`adw-clamp`);n.setAttribute(`maximum-size`,`400`),n.append(t),this.addContent(n)}updateArgs(e){this._syncRow(),this._icon&&(this._icon.className=iconClass$2(this.args.iconName))}_syncRow(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.setAttribute(`subtitle`,this.args.subtitle),this._row.toggleAttribute(`activatable`,this.args.activatable))}}]},Tc={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:t.TEXT,defaultValue:`Add account`},{name:`startIconName`,label:`Start icon`,type:t.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:t.SELECT,options:[{label:`None`,value:`none`},{label:`Suggested`,value:`suggested-action`},{label:`Destructive`,value:`destructive-action`}],defaultValue:`suggested-action`}]},Ec=[`suggested-action`,`destructive-action`];function iconName$1(e){return e.replace(/-symbolic$/,``)}__name(iconName$1,`iconName`);const Dc={stories:[class ButtonRowWebStory extends StoryElement{_row=null;constructor(){super(ButtonRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Tc}initialize(){this._row=document.createElement(`adw-button-row`),this._syncRow();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._syncRow()}_syncRow(){if(!this._row)return;this._row.setAttribute(`title`,this.args.title);let e=iconName$1(this.args.startIconName);e?this._row.setAttribute(`start-icon-name`,e):this._row.removeAttribute(`start-icon-name`),this._applyStyle(this.args.style)}_applyStyle(e){if(this._row){for(let e of Ec)this._row.classList.remove(e);e!==`none`&&this._row.classList.add(e)}}}]},Oc=[`Blue`,`Teal`,`Green`,`Orange`,`Purple`],kc={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:t.TEXT,defaultValue:`Accent colour`},{name:`subtitle`,label:`Subtitle`,type:t.TEXT,defaultValue:`Used to highlight selected items`},{name:`selected`,label:`Selected`,type:t.NUMBER,min:0,max:4,step:1,defaultValue:1}]},Ac={stories:[class ComboRowWebStory extends StoryElement{_row=null;constructor(){super(ComboRowWebStory.getMetadata(),`Default`)}static getMetadata(){return kc}initialize(){this._row=document.createElement(`adw-combo-row`),this._row.setAttribute(`model`,JSON.stringify([...Oc])),this._syncRow();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._syncRow()}_syncRow(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.setAttribute(`subtitle`,this.args.subtitle),this._row.setAttribute(`selected`,String(this.args.selected)))}}]},jc={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:t.TEXT,defaultValue:`Display name`},{name:`text`,label:`Text`,type:t.TEXT,defaultValue:`Ada Lovelace`},{name:`showApplyButton`,label:`Show apply button`,type:t.BOOLEAN,defaultValue:!0}]},Mc={stories:[class EntryRowWebStory extends StoryElement{_row=null;constructor(){super(EntryRowWebStory.getMetadata(),`Default`)}static getMetadata(){return jc}initialize(){this._row=document.createElement(`adw-entry-row`),this._syncRow();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._syncRow()}_syncRow(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.setAttribute(`text`,this.args.text),this._row.toggleAttribute(`show-apply-button`,this.args.showApplyButton))}}]},Nc={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:t.TEXT,defaultValue:`Proxy settings`},{name:`subtitle`,label:`Subtitle`,type:t.TEXT,defaultValue:`Route traffic through a custom proxy`},{name:`expanded`,label:`Expanded`,type:t.BOOLEAN,defaultValue:!0},{name:`showEnableSwitch`,label:`Show enable switch`,type:t.BOOLEAN,defaultValue:!1}]},Pc={stories:[class ExpanderRowWebStory extends StoryElement{_row=null;constructor(){super(ExpanderRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Nc}initialize(){this._row=document.createElement(`adw-expander-row`);let e=document.createElement(`adw-entry-row`);e.setAttribute(`title`,`Host`),e.setAttribute(`text`,`proxy.example.com`);let t=document.createElement(`adw-switch-row`);t.setAttribute(`title`,`Use authentication`),this._row.append(e,t),this._syncRow();let n=document.createElement(`adw-preferences-group`);n.append(this._row);let r=document.createElement(`adw-clamp`);r.setAttribute(`maximum-size`,`400`),r.append(n),this.addContent(r)}updateArgs(e){this._syncRow()}_syncRow(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.setAttribute(`subtitle`,this.args.subtitle),this._row.toggleAttribute(`expanded`,this.args.expanded),this._row.toggleAttribute(`show-enable-switch`,this.args.showEnableSwitch))}}]},Fc={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:t.TEXT,defaultValue:`Password`},{name:`text`,label:`Text`,type:t.TEXT,defaultValue:`correct-horse-battery`}]},Ic={stories:[class PasswordEntryRowWebStory extends StoryElement{_row=null;constructor(){super(PasswordEntryRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Fc}initialize(){this._row=document.createElement(`adw-password-entry-row`),this._syncRow();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._syncRow()}_syncRow(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.setAttribute(`text`,this.args.text))}}]},Lc={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:t.TEXT,defaultValue:`Account`},{name:`description`,label:`Description`,type:t.TEXT,defaultValue:`Manage how this device signs in and syncs.`}]},Rc=[`Europe`,`Americas`,`Asia`,`Oceania`],zc={stories:[class PreferencesGroupWebStory extends StoryElement{_group=null;constructor(){super(PreferencesGroupWebStory.getMetadata(),`Default`)}static getMetadata(){return Lc}initialize(){this._group=document.createElement(`adw-preferences-group`);let e=document.createElement(`button`);e.className=`adw-button flat`,e.textContent=`Sign out`,e.setAttribute(`slot`,`header-suffix`),this._group.append(e);let t=document.createElement(`adw-entry-row`);t.setAttribute(`title`,`Display name`),t.setAttribute(`text`,`Grace Hopper`),this._group.append(t);let n=document.createElement(`adw-switch-row`);n.setAttribute(`title`,`Sync over Wi-Fi only`),n.setAttribute(`subtitle`,`Avoid using mobile data for backups`),n.setAttribute(`active`,``),this._group.append(n);let r=document.createElement(`adw-combo-row`);r.setAttribute(`title`,`Region`),r.setAttribute(`model`,JSON.stringify(Rc)),r.setAttribute(`selected`,`0`),this._group.append(r),this._syncGroup();let i=document.createElement(`adw-clamp`);i.setAttribute(`maximum-size`,`400`),i.append(this._group),this.addContent(i)}updateArgs(e){this._syncGroup()}_syncGroup(){this._group&&(this._group.setAttribute(`title`,this.args.title),this._group.setAttribute(`description`,this.args.description))}}]},Bc={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:t.TEXT,defaultValue:`A <b>plain</b> preferences row`},{name:`useMarkup`,label:`Use markup`,type:t.BOOLEAN,defaultValue:!0},{name:`titleSelectable`,label:`Title selectable`,type:t.BOOLEAN,defaultValue:!1}]},Vc={stories:[class PreferencesRowWebStory extends StoryElement{_row=null;constructor(){super(PreferencesRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Bc}initialize(){this._row=document.createElement(`adw-preferences-row`),this._sync();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._sync()}_sync(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.toggleAttribute(`use-markup`,this.args.useMarkup),this._row.toggleAttribute(`title-selectable`,this.args.titleSelectable))}}]},Hc={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:t.TEXT,defaultValue:`Font size`},{name:`value`,label:`Value`,type:t.NUMBER,min:0,max:100,step:1,defaultValue:16},{name:`digits`,label:`Digits`,type:t.NUMBER,min:0,max:4,step:1,defaultValue:0}]},Uc={stories:[class SpinRowWebStory extends StoryElement{_row=null;constructor(){super(SpinRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Hc}initialize(){this._row=document.createElement(`adw-spin-row`),this._syncRow();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._syncRow()}_syncRow(){if(!this._row)return;this._row.setAttribute(`title`,this.args.title);let e=this.args.digits;this._row.setAttribute(`adjustment`,JSON.stringify({lower:0,upper:100,pageIncrement:10,stepIncrement:10**-e})),this._row.setAttribute(`value`,String(this.args.value))}}]},Wc={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:t.TEXT,defaultValue:`Automatic updates`},{name:`subtitle`,label:`Subtitle`,type:t.TEXT,defaultValue:`Download and install updates without asking`},{name:`active`,label:`Active`,type:t.BOOLEAN,defaultValue:!0}]},Gc={stories:[class SwitchRowWebStory extends StoryElement{_row=null;constructor(){super(SwitchRowWebStory.getMetadata(),`Default`)}static getMetadata(){return Wc}initialize(){this._row=document.createElement(`adw-switch-row`),this._syncRow();let e=document.createElement(`adw-preferences-group`);e.append(this._row);let t=document.createElement(`adw-clamp`);t.setAttribute(`maximum-size`,`400`),t.append(e),this.addContent(t)}updateArgs(e){this._syncRow()}_syncRow(){this._row&&(this._row.setAttribute(`title`,this.args.title),this._row.setAttribute(`subtitle`,this.args.subtitle),this._row.toggleAttribute(`active`,this.args.active))}}]},Kc={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:t.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:t.SELECT,options:[{label:`Copy`,value:`copy`},{label:`Move`,value:`move`}],defaultValue:`copy`}]},qc={stories:[class DragIconWebStory extends StoryElement{_row=null;_hint=null;constructor(){super(DragIconWebStory.getMetadata(),`Default`)}static getMetadata(){return Kc}initialize(){let e=document.createElement(`div`);e.style.display=`flex`,e.style.flexDirection=`column`,e.style.alignItems=`center`,e.style.gap=`12px`;let t=document.createElement(`p`);t.className=`dim-label`,this._hint=t,e.append(t),this._row=document.createElement(`div`),this._row.className=`card`,this._row.draggable=!0,this._row.style.display=`flex`,this._row.style.alignItems=`center`,this._row.style.gap=`12px`,this._row.style.padding=`12px`;let n=document.createElement(`span`);n.className=`heading`,n.textContent=`Report.odt`,this._row.append(n),this._row.addEventListener(`dragstart`,e=>this._onDragStart(e)),e.append(this._row),this._apply(),this.addContent(e)}updateArgs(e){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`}}_onDragStart(e){e.dataTransfer!==null&&(e.dataTransfer.effectAllowed=this.args.actions===`move`?`move`:`copy`);let t=this._value();t!==null&&wa.getForDrag(e).setChild(wa.createWidgetForValue(t))}_apply(){this._hint===null||this._row===null||(this._hint.textContent=this.args.value===`none`?`Drag the row — no icon, because the value has no widget to show`:`Drag the row and watch the pointer`,this._row.title=`Draggable — the icon that follows the pointer is a <gtk-drag-icon>`)}}]},Jc={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:t.RANGE,min:0,max:320,step:16,defaultValue:160},{name:`contentHeight`,label:`Content height`,type:t.RANGE,min:0,max:320,step:16,defaultValue:120},{name:`shape`,label:`Shape`,type:t.SELECT,options:[{label:`Circle`,value:`circle`},{label:`Grid`,value:`grid`},{label:`Crosshair`,value:`crosshair`}],defaultValue:`circle`}]},Yc={stories:[class DrawingAreaWebStory extends StoryElement{_area=null;constructor(){super(DrawingAreaWebStory.getMetadata(),`Default`)}static getMetadata(){return Jc}initialize(){this._area=document.createElement(`gtk-drawing-area`),this._area.setDrawFunc((e,t,n,r)=>{switch(t.fillStyle=`currentColor`,t.globalCompositeOperation=`source-over`,t.fillRect(0,0,n,r),t.globalCompositeOperation=`difference`,this.args.shape){case`grid`:for(let e=0;e<n;e+=16)t.fillRect(e,0,8,r);break;case`crosshair`:t.fillRect(n/2-1,0,2,r),t.fillRect(0,r/2-1,n,2);break;default:t.beginPath(),t.arc(n/2,r/2,Math.min(n,r)/2,0,2*Math.PI),t.fill();break}t.globalCompositeOperation=`source-over`}),this._apply(),this.addContent(this._area)}updateArgs(e){this._apply()}_apply(){this._area&&(this._area.setAttribute(`content-width`,String(this.args.contentWidth)),this._area.setAttribute(`content-height`,String(this.args.contentHeight)))}}]},Xc={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:t.BOOLEAN,defaultValue:!0},{name:`hasDepthBuffer`,label:`Depth buffer`,type:t.BOOLEAN,defaultValue:!1},{name:`allowedApis`,label:`Allowed APIs`,type:t.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:t.BOOLEAN,defaultValue:!0}]},Zc={stories:[class GLAreaWebStory extends StoryElement{_area=null;_readout=null;_frame=0;_program=null;_buffer=null;_angle=0;_renders=0;_viewport=`—`;constructor(){super(GLAreaWebStory.getMetadata(),`Default`)}static getMetadata(){return Xc}initialize(){this._area=document.createElement(`gtk-gl-area`),this._area.style.width=`240px`,this._area.style.height=`160px`,this._readout=document.createElement(`div`),this._readout.className=`adw-gl-area-story-readout`,this._area.addEventListener(`resize`,e=>{let{width:t,height:n}=e.detail;this._viewport=`${t} × ${n}`,this._refresh()}),this._area.addEventListener(`render`,e=>{let{context:t}=e.detail;t&&this._draw(t),this._renders+=1,this._refresh()}),this._apply(),this._start();let e=document.createElement(`div`);e.style.display=`flex`,e.style.flexDirection=`column`,e.style.gap=`6px`,e.style.alignItems=`center`,e.append(this._area,this._readout),this.addContent(e)}updateArgs(e){this._stop(),this._apply(),this._start()}_apply(){this._area&&(this._area.setAttribute(`auto-render`,String(this.args.autoRender)),this._area.setAttribute(`has-depth-buffer`,String(this.args.hasDepthBuffer)),this._area.setAttribute(`allowed-apis`,this.args.allowedApis))}_start(){if(!this.args.spinning)return;let step=()=>{this._angle+=.05,this._area?.queueRender(),this._frame=requestAnimationFrame(step)};this._frame=requestAnimationFrame(step)}_stop(){this._frame!==0&&cancelAnimationFrame(this._frame),this._frame=0}_draw(e){if(!(e instanceof WebGLRenderingContext))return;this._program||this._build(e);let t=this._program;t!==null&&(e.clearColor(.15,.16,.18,1),e.clear(e.COLOR_BUFFER_BIT),e.useProgram(t),e.uniform1f(e.getUniformLocation(t,`angle`),this._angle),e.bindBuffer(e.ARRAY_BUFFER,this._buffer),e.enableVertexAttribArray(0),e.vertexAttribPointer(0,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLES,0,3))}_build(e){let compile=(t,n)=>{let r=e.createShader(t);return r?(e.shaderSource(r,n),e.compileShader(r),r):null},t=e.createProgram(),n=compile(e.VERTEX_SHADER,`
|
|
11208
11258
|
attribute vec2 position;
|
|
11209
11259
|
uniform float angle;
|
|
11210
11260
|
void main () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/example-gtk-adwaita-storybook",
|
|
3
|
-
"version": "0.64.
|
|
3
|
+
"version": "0.64.53",
|
|
4
4
|
"description": "Interactive component browser for Libadwaita widgets — a native Adwaita storybook built on @gjsify/storybook, debuggable over DBus/MCP via @gjsify/devtools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/gjs.js",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
"@girs/glib-2.0": "5.4.0",
|
|
55
55
|
"@girs/gobject-2.0": "5.4.0",
|
|
56
56
|
"@girs/gtk-4.0": "5.4.0",
|
|
57
|
-
"@gjsify/adwaita-web": "0.64.
|
|
58
|
-
"@gjsify/cli": "0.64.
|
|
57
|
+
"@gjsify/adwaita-web": "0.64.53",
|
|
58
|
+
"@gjsify/cli": "0.64.53",
|
|
59
59
|
"@gjsify/node-gi": "file:../../../packages/node-gi/node-gi",
|
|
60
|
-
"@gjsify/storybook": "0.64.
|
|
61
|
-
"@gjsify/adwaita-storybook": "0.64.
|
|
60
|
+
"@gjsify/storybook": "0.64.53",
|
|
61
|
+
"@gjsify/adwaita-storybook": "0.64.53",
|
|
62
62
|
"@types/node": "^25.9.2",
|
|
63
63
|
"typescript": "^6.0.3"
|
|
64
64
|
},
|