@gjsify/adwaita-core 0.31.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/about-dialog.js +3 -0
- package/lib/esm/action-row.js +1 -0
- package/lib/esm/avatar.js +1 -0
- package/lib/esm/banner.js +1 -0
- package/lib/esm/button-content.js +1 -0
- package/lib/esm/carousel.js +1 -0
- package/lib/esm/checks.js +1 -0
- package/lib/esm/chrome.js +1 -0
- package/lib/esm/conformance/about-dialog.js +6 -0
- package/lib/esm/conformance/action-row.js +1 -0
- package/lib/esm/conformance/avatar.js +1 -0
- package/lib/esm/conformance/banner.js +1 -0
- package/lib/esm/conformance/button-content.js +1 -0
- package/lib/esm/conformance/carousel.js +1 -0
- package/lib/esm/conformance/checks.js +1 -0
- package/lib/esm/conformance/chrome.js +1 -0
- package/lib/esm/conformance/data-grid.js +1 -0
- package/lib/esm/conformance/dialog.js +1 -0
- package/lib/esm/conformance/entry-row.js +1 -0
- package/lib/esm/conformance/index.js +1 -0
- package/lib/esm/conformance/navigation-view.js +1 -0
- package/lib/esm/conformance/popover.js +1 -0
- package/lib/esm/conformance/preferences.js +1 -0
- package/lib/esm/conformance/rows.js +1 -0
- package/lib/esm/conformance/sidebar.js +1 -0
- package/lib/esm/conformance/split-button.js +1 -0
- package/lib/esm/conformance/split-view.js +1 -0
- package/lib/esm/conformance/tab-view.js +1 -0
- package/lib/esm/conformance/view-stack.js +1 -0
- package/lib/esm/conformance/view-switcher.js +1 -0
- package/lib/esm/conformance/wrap-box.js +1 -0
- package/lib/esm/data-grid.js +1 -0
- package/lib/esm/dialog.js +1 -1
- package/lib/esm/entry-row.js +1 -0
- package/lib/esm/glib.js +1 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/navigation-view.js +1 -0
- package/lib/esm/popover.js +1 -0
- package/lib/esm/preferences.js +1 -0
- package/lib/esm/rows.js +1 -1
- package/lib/esm/sidebar.js +1 -0
- package/lib/esm/split-button.js +1 -0
- package/lib/esm/split-view.js +1 -0
- package/lib/esm/tab-view.js +1 -0
- package/lib/esm/view-stack.js +1 -0
- package/lib/esm/view-switcher.js +1 -0
- package/lib/types/about-dialog.d.ts +391 -0
- package/lib/types/about-dialog.spec.d.ts +2 -0
- package/lib/types/action-row.d.ts +270 -0
- package/lib/types/action-row.spec.d.ts +2 -0
- package/lib/types/avatar.d.ts +112 -0
- package/lib/types/avatar.spec.d.ts +2 -0
- package/lib/types/banner.d.ts +104 -0
- package/lib/types/banner.spec.d.ts +2 -0
- package/lib/types/button-content.d.ts +141 -0
- package/lib/types/button-content.spec.d.ts +2 -0
- package/lib/types/carousel.d.ts +535 -0
- package/lib/types/carousel.spec.d.ts +2 -0
- package/lib/types/checks.d.ts +63 -0
- package/lib/types/checks.spec.d.ts +2 -0
- package/lib/types/chrome.d.ts +355 -0
- package/lib/types/chrome.spec.d.ts +2 -0
- package/lib/types/conformance/about-dialog.d.ts +300 -0
- package/lib/types/conformance/action-row.d.ts +186 -0
- package/lib/types/conformance/avatar.d.ts +61 -0
- package/lib/types/conformance/banner.d.ts +91 -0
- package/lib/types/conformance/button-content.d.ts +110 -0
- package/lib/types/conformance/carousel.d.ts +284 -0
- package/lib/types/conformance/checks.d.ts +29 -0
- package/lib/types/conformance/chrome.d.ts +195 -0
- package/lib/types/conformance/data-grid.d.ts +134 -0
- package/lib/types/conformance/dialog.d.ts +97 -0
- package/lib/types/conformance/entry-row.d.ts +185 -0
- package/lib/types/conformance/index.d.ts +44 -0
- package/lib/types/conformance/navigation-view.d.ts +235 -0
- package/lib/types/conformance/popover.d.ts +56 -0
- package/lib/types/conformance/preferences.d.ts +170 -0
- package/lib/types/conformance/rows.d.ts +51 -0
- package/lib/types/conformance/sidebar.d.ts +182 -0
- package/lib/types/conformance/split-button.d.ts +189 -0
- package/lib/types/conformance/split-view.d.ts +290 -0
- package/lib/types/conformance/tab-view.d.ts +441 -0
- package/lib/types/conformance/view-stack.d.ts +121 -0
- package/lib/types/conformance/view-switcher.d.ts +443 -0
- package/lib/types/conformance/wrap-box.d.ts +134 -0
- package/lib/types/data-grid.d.ts +140 -0
- package/lib/types/data-grid.spec.d.ts +2 -0
- package/lib/types/dialog.d.ts +144 -0
- package/lib/types/entry-row.d.ts +308 -0
- package/lib/types/entry-row.spec.d.ts +2 -0
- package/lib/types/glib.d.ts +49 -0
- package/lib/types/index.d.ts +43 -4
- package/lib/types/navigation-view.d.ts +343 -0
- package/lib/types/navigation-view.spec.d.ts +2 -0
- package/lib/types/popover.d.ts +155 -0
- package/lib/types/popover.spec.d.ts +2 -0
- package/lib/types/preferences.d.ts +349 -0
- package/lib/types/preferences.spec.d.ts +2 -0
- package/lib/types/rows.d.ts +49 -2
- package/lib/types/sidebar.d.ts +308 -0
- package/lib/types/sidebar.spec.d.ts +2 -0
- package/lib/types/split-button.d.ts +316 -0
- package/lib/types/split-button.spec.d.ts +2 -0
- package/lib/types/split-view.d.ts +714 -0
- package/lib/types/split-view.spec.d.ts +2 -0
- package/lib/types/tab-view.d.ts +616 -0
- package/lib/types/tab-view.spec.d.ts +2 -0
- package/lib/types/view-stack.d.ts +266 -0
- package/lib/types/view-stack.spec.d.ts +2 -0
- package/lib/types/view-switcher.d.ts +521 -0
- package/lib/types/view-switcher.spec.d.ts +2 -0
- package/package.json +8 -4
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{gStrStrip as e}from"./glib.js";const t={UNKNOWN:0,CUSTOM:1,GPL_2_0:2,GPL_3_0:3,LGPL_2_1:4,LGPL_3_0:5,BSD:6,MIT_X11:7,ARTISTIC:8,GPL_2_0_ONLY:9,GPL_3_0_ONLY:10,LGPL_2_1_ONLY:11,LGPL_3_0_ONLY:12,AGPL_3_0:13,AGPL_3_0_ONLY:14,BSD_3:15,APACHE_2_0:16,MPL_2_0:17,"0BSD":18},n=[{name:null,url:null,spdxId:null},{name:null,url:null,spdxId:null},{name:`GNU General Public License, version 2 or later`,url:`https://www.gnu.org/licenses/old-licenses/gpl-2.0.html`,spdxId:`GPL-2.0-or-later`},{name:`GNU General Public License, version 3 or later`,url:`https://www.gnu.org/licenses/gpl-3.0.html`,spdxId:`GPL-3.0-or-later`},{name:`GNU Lesser General Public License, version 2.1 or later`,url:`https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html`,spdxId:`LGPL-2.1-or-later`},{name:`GNU Lesser General Public License, version 3 or later`,url:`https://www.gnu.org/licenses/lgpl-3.0.html`,spdxId:`LGPL-3.0-or-later`},{name:`BSD 2-Clause License`,url:`https://opensource.org/licenses/bsd-license.php`,spdxId:`BSD-2-Clause`},{name:`The MIT License (MIT)`,url:`https://opensource.org/licenses/mit-license.php`,spdxId:`MIT`},{name:`Artistic License 2.0`,url:`https://opensource.org/licenses/artistic-license-2.0.php`,spdxId:`Artistic-2.0`},{name:`GNU General Public License, version 2 only`,url:`https://www.gnu.org/licenses/old-licenses/gpl-2.0.html`,spdxId:`GPL-2.0-only`},{name:`GNU General Public License, version 3 only`,url:`https://www.gnu.org/licenses/gpl-3.0.html`,spdxId:`GPL-3.0-only`},{name:`GNU Lesser General Public License, version 2.1 only`,url:`https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html`,spdxId:`LGPL-2.1-only`},{name:`GNU Lesser General Public License, version 3 only`,url:`https://www.gnu.org/licenses/lgpl-3.0.html`,spdxId:`LGPL-3.0-only`},{name:`GNU Affero General Public License, version 3 or later`,url:`https://www.gnu.org/licenses/agpl-3.0.html`,spdxId:`AGPL-3.0-or-later`},{name:`GNU Affero General Public License, version 3 only`,url:`https://www.gnu.org/licenses/agpl-3.0.html`,spdxId:`AGPL-3.0-only`},{name:`BSD 3-Clause License`,url:`https://opensource.org/licenses/BSD-3-Clause`,spdxId:`BSD-3-Clause`},{name:`Apache License, Version 2.0`,url:`https://opensource.org/licenses/Apache-2.0`,spdxId:`Apache-2.0`},{name:`Mozilla Public License 2.0`,url:`https://opensource.org/licenses/MPL-2.0`,spdxId:`MPL-2.0`},{name:`BSD Zero-Clause License`,url:`https://opensource.org/license/0bsd`,spdxId:`0BSD`}],r=[{spdxId:`GPL-2.0`,licenseType:t.GPL_2_0_ONLY},{spdxId:`GPL-3.0`,licenseType:t.GPL_3_0_ONLY}],i=`This application comes with absolutely no warranty. See the <a href="%s">%s</a> for details.`;function isLicenseType(e){return Number.isInteger(e)&&e>=t.UNKNOWN&&e<n.length}function licenseTypeForSpdxId(e){for(let t=0;t<n.length;t++)if(n[t].spdxId===e)return t;for(let t of r)if(t.spdxId===e)return t.licenseType;return null}function licenseText(e,r){if(e===t.UNKNOWN)return null;if(e===t.CUSTOM)return r;let a=n[e];return i.replace(`%s`,()=>a.url??``).replace(`%s`,()=>a.name??``)}const a={license:``,licenseType:t.UNKNOWN},UNCHANGED=e=>({state:e,changed:!1,notify:[]});function setLicenseType(e,n){return!isLicenseType(n)||e.licenseType===n?UNCHANGED(e):{state:{license:n===t.CUSTOM?e.license:``,licenseType:n},changed:!0,notify:[`license`,`license-type`]}}function setLicense(e,n){return e.license===n?UNCHANGED(e):{state:{license:n,licenseType:t.CUSTOM},changed:!0,notify:[`license`,`license-type`]}}function indexOfUrlEnd(e,t){for(let n=t;n<e.length;n++)if(`
|
|
2
|
+
>`.includes(e[n]))return n;return-1}function parseCreditPerson(t){let n=t.indexOf(`<`),r=n<0?-1:t.indexOf(`>`,n),i=t.indexOf(`http://`),a=t.indexOf(`https://`),o=i;(i<0||a>=0&&a<i)&&(o=a);let s=-1;o>=0&&(s=indexOfUrlEnd(t,o),s<0&&(s=t.length)),o>=0&&(n<0||r<0||o<=n+1)&&(n=o,r=s);let c,l,u;return n>=0&&r>=0?(c=t.slice(0,n),u=t[n]===`<`,l=u?t.slice(n+1,r):t.slice(n,r)):(c=t,l=null,u=!1),c=e(c),{name:c,link:l,isEmail:u,uri:l===null?null:u?`mailto:${l}`:l}}const o=[`translator_credits`,`translator-credits`];function translatorCreditsPeople(e){return e==null||o.includes(e)||e.length===0?[]:e.split(`
|
|
3
|
+
`)}const s={developers:`Code by`,designers:`Design by`,artists:`Artwork by`,documenters:`Documentation by`,translators:`Translated by`};function creditsSections(e={}){return[{title:s.developers,people:e.developers??[]},{title:s.designers,people:e.designers??[]},{title:s.artists,people:e.artists??[]},{title:s.documenters,people:e.documenters??[]},{title:s.translators,people:translatorCreditsPeople(e.translatorCredits)},...e.creditSections??[]].filter(e=>e.people.length>0).map(e=>({title:e.title,people:e.people.map(parseCreditPerson)}))}const c={dialogTitle:`About`,whatsNewRow:`What’s _New`,detailsRow:`_Details`,websiteRow:`_Website`,supportRow:`_Support Questions`,issueRow:`_Report an Issue`,troubleshootingRow:`_Troubleshooting`,creditsRow:`_Credits`,legalRow:`_Legal`,acknowledgementsRow:`_Acknowledgements`,whatsNewPage:`What’s New`,detailsPage:`Details`,troubleshootingPage:`Troubleshooting`,creditsPage:`Credits`,legalPage:`Legal`,acknowledgementsPage:`Acknowledgements`};function aboutDialogVisibility(e={}){let t=(e.website??``).length>0,n=(e.comments??``).length>0,r=(e.releaseNotes??``).length>0,i=e.hasCustomLinks??!1,a=n||i,o=t&&n||i,s=(e.supportUrl??``).length>0,c=(e.issueUrl??``).length>0,l=(e.debugInfo??``).length>0,u=e.hasCredits??!1,d=e.hasLegal??!1,f=e.hasAcknowledgements??!1;return{appIcon:(e.applicationIcon??``).length>0,appName:(e.applicationName??``).length>0,developerName:(e.developerName??``).length>0,version:(e.version??``).length>0,detailsGroup:t||n||o||r,whatsNewRow:r,detailsRow:n||o,websiteRow:t&&!a,supportGroup:s||c||l,supportRow:s,issueRow:c,troubleshootingRow:l,creditsLegalGroup:u||d||f,creditsRow:u,legalRow:d,acknowledgementsRow:f,commentsLabel:n,linksGroup:o,detailsWebsiteRow:t&&a}}function legalSectionVisible(e,t,n){let r=licenseText(t,n);return e.length>0||r!==null&&r.length>0}export{c as ADW_ABOUT_DIALOG_LABELS,s as ADW_CREDITS_SECTION_TITLES,n as ADW_LICENSES,r as ADW_LICENSE_ALIASES,a as ADW_LICENSE_DEFAULTS,i as ADW_LICENSE_WARRANTY_TEMPLATE,o as ADW_TRANSLATOR_CREDITS_SENTINELS,t as GTK_LICENSE,aboutDialogVisibility,creditsSections,isLicenseType,legalSectionVisible,licenseText,licenseTypeForSpdxId,parseCreditPerson,setLicense,setLicenseType,translatorCreditsPeople};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{stringIsNotEmpty as e}from"./glib.js";function deriveRowLabels(t){let n=t.title??``,r=t.subtitle??``;return{title:n,titleVisible:e(n),subtitle:r,subtitleVisible:e(r)}}var ActionRowState=class{constructor(){this._title=``,this._subtitle=``,this._activatableWidget=null,this._activatable=!1,this._widgetSensitive=!0}get state(){return{...deriveRowLabels({title:this._title,subtitle:this._subtitle}),activatable:this._activatable}}get title(){return this._title}setTitle(e){let t=e??``;return t===this._title?!1:(this._title=t,!0)}get subtitle(){return this._subtitle}setSubtitle(e){let t=e??``;return t===this._subtitle?!1:(this._subtitle=t,!0)}get activatableWidget(){return this._activatableWidget}setActivatableWidget(e,t=!0){return e===this._activatableWidget?!1:(this._activatableWidget=e,this._widgetSensitive=t,e!==null&&(this._activatable=t),!0)}setActivatableWidgetSensitive(e){if(this._activatableWidget===null)return!1;let t=!!e;return t===this._widgetSensitive?!1:(this._widgetSensitive=t,this.setActivatable(t))}get activatable(){return this._activatable}setActivatable(e){let t=!!e;return t===this._activatable?!1:(this._activatable=t,!0)}activate(){return this._activatableWidget}},SwitchRowState=class{constructor(){this._active=!1}get active(){return this._active}setActive(e){let t=!!e;return t===this._active?!1:(this._active=t,!0)}activate(){return this.setActive(!this._active)}};const t=!0;var ButtonRowState=class{constructor(){this._title=``,this._startIconName=``,this._endIconName=``}get state(){return{title:this._title,titleVisible:e(this._title),startIconName:this._startIconName,startIconVisible:e(this._startIconName),endIconName:this._endIconName,endIconVisible:e(this._endIconName),activatable:!0}}get title(){return this._title}setTitle(e){let t=e??``;return t===this._title?!1:(this._title=t,!0)}get startIconName(){return this._startIconName}setStartIconName(e){let t=e??``;return t===this._startIconName?!1:(this._startIconName=t,!0)}get endIconName(){return this._endIconName}setEndIconName(e){let t=e??``;return t===this._endIconName?!1:(this._endIconName=t,!0)}},WindowTitleState=class{constructor(){this._title=``,this._subtitle=``}get state(){return deriveRowLabels({title:this._title,subtitle:this._subtitle})}get title(){return this._title}setTitle(e){let t=e??``;return t===this._title?!1:(this._title=t,!0)}get subtitle(){return this._subtitle}setSubtitle(e){let t=e??``;return t===this._subtitle?!1:(this._subtitle=t,!0)}};export{ActionRowState,t as BUTTON_ROW_ACTIVATABLE,ButtonRowState,SwitchRowState,WindowTitleState,deriveRowLabels};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{gStrStrip as e,glibClamp as t}from"./glib.js";const n=14,r=[{fg:`#cfe1f5`,start:`#83b6ec`,stop:`#337fdc`},{fg:`#caeaf2`,start:`#7ad9f1`,stop:`#0f9ac8`},{fg:`#cef8d8`,start:`#8de6b1`,stop:`#29ae74`},{fg:`#e6f9d7`,start:`#b5e98a`,stop:`#6ab85b`},{fg:`#f9f4e1`,start:`#f8e359`,stop:`#d29d09`},{fg:`#ffead1`,start:`#ffcb62`,stop:`#d68400`},{fg:`#ffe5c5`,start:`#ffa95a`,stop:`#ed5b00`},{fg:`#f8d2ce`,start:`#f78773`,stop:`#e62d42`},{fg:`#fac7de`,start:`#e973ab`,stop:`#e33b6a`},{fg:`#e7c2e8`,start:`#cb78d4`,stop:`#9945b5`},{fg:`#d5d2f5`,start:`#9e91e8`,stop:`#7a59ca`},{fg:`#f2eade`,start:`#e3cf9c`,stop:`#b08952`},{fg:`#e5d6ca`,start:`#be916d`,stop:`#785336`},{fg:`#d8d7d3`,start:`#c0bfbc`,stop:`#6e6d71`}];function*utf8Bytes(e){for(let t of e){let e=t.codePointAt(0)??0;e>=55296&&e<=57343&&(e=65533),e<128?yield e:e<2048?(yield 192|e>>6,yield 128|e&63):e<65536?(yield 224|e>>12,yield 128|e>>6&63,yield 128|e&63):(yield 240|e>>18,yield 128|e>>12&63,yield 128|e>>6&63,yield 128|e&63)}}function gStrHash(e){let t=5381;for(let n of utf8Bytes(e)){if(n===0)break;t=Math.imul(t,33)+(n>127?n-256:n)>>>0}return t>>>0}function avatarInitials(t){let n=e((t??``).toUpperCase()).normalize(`NFC`);if(n.length===0)return``;let r=firstCodePoint(n),i=n.lastIndexOf(` `);return i<0?r:r+firstCodePoint(n.slice(i+1))}function firstCodePoint(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function avatarColorClass(e){return e?gStrHash(e)%14+1:null}function randomAvatarColorClass(e=Math.random){return 1+Math.floor(e()*13)}function avatarColor(e){let t=avatarColorClass(e);return r[(t??1)-1]}function avatarMode(e){return e.hasCustomImage?`image`:e.showInitials&&e.text.length>0?`initials`:`icon`}function avatarMaxFontSize(e){return e/1.4142-Math.max(e*.4-5,0)}function avatarFontSize(e,n){let r=avatarMaxFontSize(e);return n.width>0?t(n.height*(r/n.width),0,r):r}function flattenAvatarGradient(e){let t=Number.parseInt(e.start.slice(1),16),n=Number.parseInt(e.stop.slice(1),16),mix=e=>Math.round(((t>>e&255)+(n>>e&255))/2).toString(16).padStart(2,`0`);return`#${mix(16)}${mix(8)}${mix(0)}`}export{r as AVATAR_COLORS,n as AVATAR_COLOR_COUNT,avatarColor,avatarColorClass,avatarFontSize,avatarInitials,avatarMaxFontSize,avatarMode,flattenAvatarGradient,gStrHash,randomAvatarColorClass};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{stripMnemonic as e}from"./glib.js";const t=[`default`,`suggested`],n=[`suggested-action`],r={title:``,buttonLabel:``,revealed:!1,useMarkup:!0,buttonStyle:`default`};function isBannerButtonStyle(e){return e==="default"||e===`suggested`}function parseBannerButtonStyle(e){return isBannerButtonStyle(e)?e:r.buttonStyle}function bannerButtonStyleClasses(e){return e===`suggested`?n:[]}function bannerButtonVisible(e){return typeof e==`string`&&e.length>0}function bannerButtonText(t){return e(t)}function bannerRenderState(e={}){let t={...r,...e};return{revealed:t.revealed,useMarkup:t.useMarkup,buttonVisible:bannerButtonVisible(t.buttonLabel),buttonText:bannerButtonText(t.buttonLabel),buttonClasses:bannerButtonStyleClasses(t.buttonStyle)}}export{t as ADW_BANNER_BUTTON_STYLES,n as ADW_BANNER_BUTTON_STYLE_CLASSES,r as ADW_BANNER_DEFAULTS,bannerButtonStyleClasses,bannerButtonText,bannerButtonVisible,bannerRenderState,isBannerButtonStyle,parseBannerButtonStyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{stripMnemonic as e}from"./glib.js";const t=`image-text-button`,n=`image-missing`,r={iconName:``,label:``,useUnderline:!1,canShrink:!1};function buttonContentIconIsEmpty(e){return e.length===0}function buttonContentIconName(e){return buttonContentIconIsEmpty(e)?n:e}function buttonContentLabelVisible(e){return e.length>0}function buttonContentIconExpands(e){return!buttonContentLabelVisible(e)}function buttonContentLabelText(t,n){return n?e(t):t}function buttonContentEllipsize(e){return e?`end`:`none`}function buttonContentStyleTargetIndex(e){let t=e.indexOf(`button`);return t<0?null:e[t+1]===`split-button`?t+1:t}function buttonContentRenderState(e={}){let n={...r,...e};return{iconName:buttonContentIconName(n.iconName),iconIsFallback:buttonContentIconIsEmpty(n.iconName),iconExpands:buttonContentIconExpands(n.label),labelVisible:buttonContentLabelVisible(n.label),labelText:buttonContentLabelText(n.label,n.useUnderline),ellipsize:buttonContentEllipsize(n.canShrink),parentClass:t}}export{r as ADW_BUTTON_CONTENT_DEFAULTS,n as BUTTON_CONTENT_FALLBACK_ICON,t as BUTTON_CONTENT_STYLE_CLASS,buttonContentEllipsize,buttonContentIconExpands,buttonContentIconIsEmpty,buttonContentIconName,buttonContentLabelText,buttonContentLabelVisible,buttonContentRenderState,buttonContentStyleTargetIndex};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{glibClamp as e}from"./glib.js";const t=150,n=.01;function approx(e,t){return Math.abs(e-t)<2**-52}function carouselSnapPoints(e){let t=0;return e.map(e=>{let n=t+e-1;return t+=e,n})}function carouselSizesFromSnapPoints(e){if(e.length===0)return[];let t=[e[0]+1];for(let n=1;n<e.length;n++)t.push(e[n]-e[n-1]);return t}function carouselRange(e,t=0){let n=e.length>0?e[e.length-1]:0;return{lower:0,upper:Math.max(0,t+n)}}function carouselClampPosition(t,n,r=0){let i=carouselRange(n,r);return e(t,i.lower,i.upper)}function carouselClosestSnapPoint(e,t){if(t.length===0)return-1;let n=0;for(let r=1;r<t.length;r++)Math.abs(t[n]-e)>Math.abs(t[r]-e)&&(n=r);return n}function carouselPageAtPosition(e,t){return carouselClosestSnapPoint(carouselClampPosition(e,t),t)}function cRound(e){return Math.sign(e)*Math.round(Math.abs(e))}function carouselNavigateTarget(e,t,n){if(t<=0)return null;let r=cRound(e);return n===`back`?r>0?r-1:null:r<t-1?r+1:null}function carouselWheelStep(e){if(e.source===`touchpad`)return 0;let t=e.source===`mouse`,n=0;return(e.orientation===`vertical`||t)&&(e.deltaY>0?n=1:e.deltaY<0&&(n=-1)),e.orientation===`horizontal`&&n===0&&(e.deltaX>0?n=1:e.deltaX<0&&(n=-1)),n}function carouselReorderShift(e){let{closestPoint:t,oldPoint:n,newPoint:r,size:i}=e;return approx(t,n)?r-n:(approx(n,t)||n>t)&&(approx(t,r)||t>r)?i:(approx(r,t)||r>t)&&(approx(t,n)||t>n)?-i:0}function nthPageDiagnostic(e,t){return`adw_carousel_get_nth_page: assertion 'n < adw_carousel_get_n_pages (self)' failed (n = ${e}, n_pages = ${t})`}function positionDiagnostic(e,t){return`${e}: assertion 'position >= -1' failed (position = ${t})`}function unknownPageDiagnostic(e){return`AdwCarousel: no page with id '${e}'`}function nonFiniteDiagnostic(e,t){return`AdwCarousel: ${e} must be a finite double (got ${t})`}var CarouselState=class{constructor(e={}){this._children=[],this._position=0,this._wheelLockedAt=null,this._settledPage=null,this._listeners=new Set,this._pageChangedListeners=new Set,this._diagnostics=[],this._orientation=e.orientation??`horizontal`,this._interactive=e.interactive??!0,this._allowScrollWheel=e.allowScrollWheel??!0,this._allowLongSwipes=e.allowLongSwipes??!1,this._spacing=e.spacing??0,this._revealDuration=e.revealDuration??0,this._now=e.now??(()=>Date.now()),this._onScrollTo=e.onScrollTo,this._animateScroll=e.animateScroll??!1}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}onPageChanged(e){return this._pageChangedListeners.add(e),()=>{this._pageChangedListeners.delete(e)}}_emit(e,t){let n={position:this._position,nPages:this.nPages,page:this.pageAt(this._position),interactive:t,reason:e};for(let e of[...this._listeners])e(n)}get nPages(){let e=0;for(let t of this._children)t.removing||e++;return e}get ids(){return this._children.filter(e=>!e.removing).map(e=>e.id)}get position(){return this._position}get sizes(){return this._children.map(e=>e.size)}get snapPoints(){return carouselSnapPoints(this.sizes)}get range(){return carouselRange(this.snapPoints)}_visibleSnapPoints(){return this.snapPoints.filter((e,t)=>!this._children[t].removing)}pageAt(e){return carouselPageAtPosition(e,this._visibleSnapPoints())}indexOf(e){let t=0;for(let n of this._children)if(!n.removing){if(n.id===e)return t;t++}return-1}snapPointOf(e){let t=this._nthLink(e);return t<0?void 0:this.snapPoints[t]}_nthLink(e){let t=e;for(let e=0;e<this._children.length;e++)if(!this._children[e].removing&&t--===0)return e;return-1}_closestChildIndex(e,t,n){let r=this.snapPoints,i=[],a=[];this._children.forEach((e,o)=>{e.adding&&!t||e.removing&&!n||(i.push(o),a.push(r[o]))});let o=carouselClosestSnapPoint(e,a);return o<0?-1:i[o]}_updateShiftPositionFlag(e){let t=this._closestChildIndex(this._position,!1,!0);t<0||(this._children[e].shiftPosition=t>=e)}_updateShiftFlags(){this._children.forEach((e,t)=>{(e.adding||e.removing)&&this._updateShiftPositionFlag(t)})}setPosition(e,t=!1){if(!Number.isFinite(e))return this._diagnostics.push(nonFiniteDiagnostic(`position`,e)),!1;let n=carouselClampPosition(e,this.snapPoints),r=n!==this._position;return this._position=n,this._updateShiftFlags(),this._emit(`position`,t),r}scrollTo(e,t={}){let n=this.nPages;if(!Number.isInteger(e)||e<0||e>=n)return this._diagnostics.push(nthPageDiagnostic(e,n)),!1;let r=t.interactive??!1,i=t.animate??this._animateScroll,a=this.snapPointOf(e);return this._onScrollTo?.({index:e,position:a,interactive:r,animate:i}),i||(this.setPosition(a,r),this.settle()),!0}settle(){let e=this.pageAt(this._position);this._settledPage=e;for(let t of[...this._pageChangedListeners])t(e)}settleIfArrived(e=n){let t=this.pageAt(this._position),r=this.snapPointOf(t);return r===void 0||Math.abs(this._position-r)>=e?(this._settledPage=null,!1):this._settledPage===t?!1:(this.settle(),!0)}navigate(e){if(!this._interactive)return!1;let t=carouselNavigateTarget(this._position,this.nPages,e);return t===null?!1:this.scrollTo(t,{interactive:!0})}handleWheel(t){if(!this._allowScrollWheel||this._wheelLockedAt!==null&&this._now()-this._wheelLockedAt<150||!this._interactive)return 0;let n=this.nPages;if(n===0)return 0;let r=carouselWheelStep({...t,orientation:this._orientation});if(r===0)return 0;let i=e(this.pageAt(this._position)+r,0,n-1);return this.scrollTo(i,{interactive:!0}),this._wheelLockedAt=this._now(),r}insertPage(e,t=-1){if(!Number.isInteger(t)||t<-1)return this._diagnostics.push(positionDiagnostic(`adw_carousel_insert`,t)),!1;let n={id:e,size:0,adding:!0,removing:!1,shiftPosition:!1},r=t>=0?this._nthLink(t):-1,i=r<0?this._children.length:r;return this._children.splice(i,0,n),this._updateShiftPositionFlag(i),this._emit(`n-pages`,!1),!0}removePage(e){let t=this._children.findIndex(t=>t.id===e&&!t.removing);if(t<0)return this._diagnostics.push(unknownPageDiagnostic(e)),!1;let n=this._children[t];return n.removing=!0,this._updateShiftPositionFlag(t),n.adding&&this._children.splice(t,1),this._emit(`n-pages`,!1),!0}reorderPage(e,t){if(!Number.isInteger(t)||t<-1)return this._diagnostics.push(positionDiagnostic(`adw_carousel_reorder`,t)),!1;let n=this._children.findIndex(t=>t.id===e);if(n<0)return this._diagnostics.push(unknownPageDiagnostic(e)),!1;if(t===n)return!1;let r=this._closestChildIndex(this._position,!0,!0),i=this.snapPoints,a=r<0?0:i[r],o=i[n],s=this.nPages,c=t<0||t>s?s:t;if(n===s-1&&c===s)return!1;let l;l=c===s?-1:c>n?this._nthLink(c+1):this._nthLink(c);let u;u=l>=0?c>n?i[l-1]:i[l]:i[i.length-1];let[d]=this._children.splice(n,1);l<0?this._children.push(d):this._children.splice(l>n?l-1:l,0,d);let f=carouselReorderShift({closestPoint:a,oldPoint:o,newPoint:u,size:d.size});return f===0?(this._emit(`geometry`,!1),!0):(this._position=carouselClampPosition(this._position+f,this.snapPoints),this._updateShiftFlags(),this._emit(`position`,!1),!0)}setPageSize(e,t){if(!Number.isFinite(t))return this._diagnostics.push(nonFiniteDiagnostic(`size of page '${e}'`,t)),!1;let n=this._children.findIndex(t=>t.id===e);if(n<0)return this._diagnostics.push(unknownPageDiagnostic(e)),!1;let r=this._children[n],i=t-r.size,a=r.shiftPosition&&i!==0;return r.size=t,r.removing&&t<=0?this._children.splice(n,1):r.adding&&t>=1&&(r.adding=!1),a?(this._position=carouselClampPosition(this._position+i,this.snapPoints),this._updateShiftFlags(),this._emit(`position`,!1),!0):(this._emit(`geometry`,!1),!0)}skipReveal(e){let t=this._children.find(t=>t.id===e);return!t||!t.adding&&!t.removing?!1:this.setPageSize(e,+!t.removing)}get orientation(){return this._orientation}setOrientation(e){return e===this._orientation?!1:(this._orientation=e,this._emit(`geometry`,!1),!0)}get interactive(){return this._interactive}setInteractive(e){let t=!!e;return t===this._interactive?!1:(this._interactive=t,!0)}get allowScrollWheel(){return this._allowScrollWheel}setAllowScrollWheel(e){let t=!!e;return t===this._allowScrollWheel?!1:(this._allowScrollWheel=t,!0)}get allowLongSwipes(){return this._allowLongSwipes}setAllowLongSwipes(e){let t=!!e;return t===this._allowLongSwipes?!1:(this._allowLongSwipes=t,!0)}get spacing(){return this._spacing}setSpacing(e){return!Number.isFinite(e)||e<0?(this._diagnostics.push(nonFiniteDiagnostic(`spacing`,e)),!1):e===this._spacing?!1:(this._spacing=e,this._emit(`geometry`,!1),!0)}get revealDuration(){return this._revealDuration}setRevealDuration(e){return!Number.isFinite(e)||e<0?(this._diagnostics.push(nonFiniteDiagnostic(`reveal-duration`,e)),!1):e===this._revealDuration?!1:(this._revealDuration=e,!0)}pageDistance(e){return e+this._spacing}get diagnostics(){return this._diagnostics}};export{t as CAROUSEL_SCROLL_TIMEOUT_MS,n as CAROUSEL_SETTLE_EPSILON,CarouselState,carouselClampPosition,carouselClosestSnapPoint,carouselNavigateTarget,carouselPageAtPosition,carouselRange,carouselReorderShift,carouselSizesFromSnapPoints,carouselSnapPoints,carouselWheelStep};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";function resolveCheckState(e,t){return t?`indeterminate`:e?`checked`:`unchecked`}var RadioGroupState=class{constructor(){this._selected=new Map,this._listeners=new Set}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}_emit(e){for(let t of[...this._listeners])t(e)}selected(e){return this._selected.get(e)??null}select(e,t){let n=this._selected.get(e);return n===t?!1:(this._selected.set(e,t),this._emit({name:e,selected:t,deselected:n??null}),!0)}};export{RadioGroupState,resolveCheckState};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{glibClamp as e}from"./glib.js";function adwLerp(e,t,n){return e*(1-n)+t*n}function inverseLerp(e,t,n){return(n-e)/(t-e)}function easeOutCubic(e){let t=e-1;return t*t*t+1}const t={maximumSize:600,tighteningThreshold:400};function clampThresholds(e){let t=Math.max(Math.min(e.tighteningThreshold,e.maximumSize),e.childMin),n=Math.max(t,e.maximumSize);return{lower:t,max:n,upper:t+3*(n-t)}}function childSizeFrom(e,t,n){let{lower:r,max:i,upper:a}=t;return e<0?Math.min(n,Math.ceil(i)):e<=r?e:e>=a?Math.ceil(i):Math.floor(adwLerp(r,i,easeOutCubic(inverseLerp(r,a,e))))}function clampChildSize(e,t){return childSizeFrom(e,clampThresholds(t),t.childNat)}function clampSizeFromChild(e,t){let{lower:n,max:r,upper:i}=clampThresholds(t);if(e<=n)return e;if(e>=r)return Math.trunc(i);let a=1+Math.cbrt(inverseLerp(n,r,e)-1);return Math.ceil(adwLerp(n,i,a))}const n=[`small`,`medium`,`large`];function clampAllocate(e,t){let n=clampThresholds(t),r=Math.ceil(n.max),i=Math.ceil(n.lower),a=childSizeFrom(e,n,t.childNat);return{childSize:a,childMaximum:r,lowerThreshold:i,sizeClass:a>=r?`large`:a<=i?`small`:`medium`,offset:Math.trunc((e-a)/2)}}function normalizeClampSize(e,t){let n=typeof e==`string`?Number.parseFloat(e):e??NaN;return Number.isFinite(n)?Math.max(0,Math.trunc(n)):t}const r={topBarStyle:`flat`,bottomBarStyle:`flat`,extendContentToTopEdge:!1,extendContentToBottomEdge:!1};function parseToolbarStyle(e){return e===`raised`||e===`raised-border`?e:r.topBarStyle}function toolbarBarStyleClasses(e){switch(e){case`raised`:return[`raised`];case`raised-border`:return[`raised`,`border`];default:return[]}}const i=[`undershoot-top`,`undershoot-bottom`],a=[`raised`,`border`];function toolbarViewClasses(e){let t=[];return e.topBarStyle===`flat`&&!e.extendContentToTopEdge&&e.topBarHeight>0&&t.push(`undershoot-top`),e.bottomBarStyle===`flat`&&!e.extendContentToBottomEdge&&e.bottomBarHeight>0&&t.push(`undershoot-bottom`),{view:t,topBar:toolbarBarStyleClasses(e.topBarStyle),bottomBar:toolbarBarStyleClasses(e.bottomBarStyle)}}function toolbarViewAllocate(t){let n=t.contentMin;t.extendContentToTopEdge&&(n-=t.topMin),t.extendContentToBottomEdge&&(n-=t.bottomMin),n=Math.max(n,0);let r=e(t.height-n-t.bottomMin,t.topMin,t.topNat),i=e(t.height-n-r,t.bottomMin,t.bottomNat),a=t.height,o=0;return t.extendContentToTopEdge||(a-=r,o=r),t.extendContentToBottomEdge||(a-=i),{topBarHeight:r,bottomBarHeight:i,contentHeight:a,contentOffset:o}}function toolbarViewMeasure(e){return e.orientation===`horizontal`?{minimum:Math.max(e.contentMin,Math.max(e.topMin,e.bottomMin)),natural:Math.max(e.contentNat,Math.max(e.topNat,e.bottomNat))}:e.extendContentToTopEdge&&e.extendContentToBottomEdge?{minimum:Math.max(e.contentMin,e.topMin+e.bottomMin),natural:Math.max(e.contentNat,e.topNat+e.bottomNat)}:e.extendContentToTopEdge?{minimum:Math.max(e.contentMin,e.topMin)+e.bottomMin,natural:Math.max(e.contentNat,e.topNat)+e.bottomNat}:e.extendContentToBottomEdge?{minimum:Math.max(e.contentMin,e.bottomMin)+e.topMin,natural:Math.max(e.contentNat,e.bottomNat)+e.topNat}:{minimum:e.contentMin+e.topMin+e.bottomMin,natural:e.contentNat+e.topNat+e.bottomNat}}function toolbarViewContentForSize(e,t){let n=e,r=e;return t.extendContentToTopEdge||(n-=t.topMinHeight,r-=t.topNatHeight),t.extendContentToBottomEdge||(n-=t.bottomMinHeight,r-=t.bottomNatHeight),{forSizeMin:n,forSizeNat:r}}const o=16,s=64;function spinnerGeometry(e,t){let n=Math.min(Math.floor(Math.min(e,t)/2),64/2),r=n*2;return{radius:n,diameter:r,lineWidth:r/8,centerX:Math.round(e/2),centerY:Math.round(t/2)}}function resolveSpinnerSize(e){let t=typeof e==`string`?Number.parseFloat(e):e??NaN;return Number.isFinite(t)?Math.max(t,16):16}export{t as ADW_CLAMP_DEFAULTS,n as ADW_CLAMP_SIZE_CLASSES,s as ADW_SPINNER_MAX_SIZE,o as ADW_SPINNER_MIN_SIZE,a as ADW_TOOLBAR_BAR_CLASSES,i as ADW_TOOLBAR_VIEW_CLASSES,r as ADW_TOOLBAR_VIEW_DEFAULTS,clampAllocate,clampChildSize,clampSizeFromChild,clampThresholds,normalizeClampSize,parseToolbarStyle,resolveSpinnerSize,spinnerGeometry,toolbarBarStyleClasses,toolbarViewAllocate,toolbarViewClasses,toolbarViewContentForSize,toolbarViewMeasure};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const e=[{input:`Ada Lovelace`,name:`Ada Lovelace`,link:null,isEmail:!1,uri:null,rule:`a bare name is an action row, not a link row`},{input:`Ada Lovelace <ada@lovelace.org>`,name:`Ada Lovelace`,link:`ada@lovelace.org`,isEmail:!0,uri:`mailto:ada@lovelace.org`,rule:"the documented `Name <email>` form"},{input:`Ada Lovelace<ada@lovelace.org>`,name:`Ada Lovelace`,link:`ada@lovelace.org`,isEmail:!0,uri:`mailto:ada@lovelace.org`,rule:"no space is required before the `<` — strchr scans, it does not match a pattern"},{input:`Ada Lovelace <ada@lovelace.org> and friends`,name:`Ada Lovelace`,link:`ada@lovelace.org`,isEmail:!0,uri:`mailto:ada@lovelace.org`,rule:`the pair is NOT anchored at the end (:499-500); trailing text is dropped from the title`},{input:`Ada Lovelace <ada>`,name:`Ada Lovelace`,link:`ada`,isEmail:!0,uri:`mailto:ada`,rule:"is_email is `*q1 == '<'` and nothing else (:521) — there is no `@` test"},{input:`Ada Lovelace <>`,name:`Ada Lovelace`,link:``,isEmail:!0,uri:`mailto:`,rule:'g_strndup of zero bytes is "" and `if (link)` is a POINTER test — still a link row'},{input:`Ada Lovelace <ada@lovelace.org`,name:`Ada Lovelace <ada@lovelace.org`,link:null,isEmail:!1,uri:null,rule:"no closing `>` means no pair at all (:500), and the whole line becomes the title"},{input:`Ada Lovelace https://lovelace.org`,name:`Ada Lovelace`,link:`https://lovelace.org`,isEmail:!1,uri:`https://lovelace.org`,rule:`a bare https URL is a non-email link`},{input:`Ada Lovelace http://lovelace.org`,name:`Ada Lovelace`,link:`http://lovelace.org`,isEmail:!1,uri:`http://lovelace.org`,rule:`plain http is recognised too (:501)`},{input:`Ada Lovelace(https://lovelace.org)`,name:`Ada Lovelace(`,link:`https://lovelace.org)`,isEmail:!1,uri:`https://lovelace.org)`,rule:"strstr needs no leading space and `)` is not a terminator — both halves keep their bracket"},{input:`https://lovelace.org`,name:``,link:`https://lovelace.org`,isEmail:!1,uri:`https://lovelace.org`,rule:`a URL at index 0 is a valid non-NULL pointer; a truthiness port drops it`},{input:`Ada Lovelace <https://lovelace.org>`,name:`Ada Lovelace <`,link:`https://lovelace.org`,isEmail:!1,uri:`https://lovelace.org`,rule:"r1 <= q1 + 1 (:514): the URL wins, is NOT an email, and the `<` stays in the name"},{input:`Ada Lovelace <ada@lovelace.org> https://lovelace.org`,name:`Ada Lovelace`,link:`ada@lovelace.org`,isEmail:!0,uri:`mailto:ada@lovelace.org`,rule:`a URL AFTER a complete pair loses — r1 > q1 + 1 (:514)`},{input:`Ada Lovelace https://lovelace.org <ada@lovelace.org>`,name:`Ada Lovelace`,link:`https://lovelace.org`,isEmail:!1,uri:`https://lovelace.org`,rule:`a URL BEFORE the pair wins, and its end is the space (:507)`},{input:`See http://a.example and https://b.example`,name:`See`,link:`http://a.example`,isEmail:!1,uri:`http://a.example`,rule:`with both schemes present the EARLIER one wins (:504)`},{input:`See https://a.example and http://b.example`,name:`See`,link:`https://a.example`,isEmail:!1,uri:`https://a.example`,rule:`the same rule the other way round — https first, so https wins`},{input:`Ada Lovelace mailto:ada@lovelace.org`,name:`Ada Lovelace mailto:ada@lovelace.org`,link:null,isEmail:!1,uri:null,rule:"`mailto:` is NOT a recognised bare scheme (:501-502) — the line stays one plain title"},{input:`Ada Lovelace ftp://lovelace.org`,name:`Ada Lovelace ftp://lovelace.org`,link:null,isEmail:!1,uri:null,rule:`nor is any other scheme; only http:// and https:// are searched for`},{input:`Ada Lovelace https://lovelace.org more`,name:`Ada Lovelace`,link:`https://lovelace.org`,isEmail:!1,uri:`https://lovelace.org`,rule:`a tab ends the URL (:507)`},{input:`Ada Lovelace https://lovelace.org
|
|
2
|
+
more`,name:`Ada Lovelace`,link:`https://lovelace.org`,isEmail:!1,uri:`https://lovelace.org`,rule:`a newline ends the URL (:507)`},{input:`Ada Lovelace https://lovelace.org\rmore`,name:`Ada Lovelace`,link:`https://lovelace.org\rmore`,isEmail:!1,uri:`https://lovelace.org\rmore`,rule:`but \\r is NOT in the strpbrk set (:507) — it is swallowed into the URI`},{input:` Ada Lovelace `,name:`Ada Lovelace`,link:null,isEmail:!1,uri:null,rule:`g_strstrip removes surrounding ASCII space (:533)`},{input:`\xA0Ada Lovelace\xA0`,name:`\xA0Ada Lovelace\xA0`,link:null,isEmail:!1,uri:null,rule:`and ONLY ASCII space — String.trim() would eat the NBSP`},{input:` Ada <ada@lovelace.org>`,name:`Ada`,link:`ada@lovelace.org`,isEmail:!0,uri:`mailto:ada@lovelace.org`,rule:"the strip runs after the split, so the space before the `<` goes too"},{input:``,name:``,link:null,isEmail:!1,uri:null,rule:`an empty line is an empty title`},{input:` `,name:``,link:null,isEmail:!1,uri:null,rule:`a blank line strips to an empty title — the row still exists`},{input:`<ada@lovelace.org>`,name:``,link:`ada@lovelace.org`,isEmail:!0,uri:`mailto:ada@lovelace.org`,rule:"a `<` at index 0 is a valid pointer — an email with no name"},{input:`Ada <ADA@LOVELACE.ORG>`,name:`Ada`,link:`ADA@LOVELACE.ORG`,isEmail:!0,uri:`mailto:ADA@LOVELACE.ORG`,rule:`nothing is case-folded on this path`},{input:`Ada Lovelace <mailto:ada@lovelace.org>`,name:`Ada Lovelace`,link:`mailto:ada@lovelace.org`,isEmail:!0,uri:`mailto:mailto:ada@lovelace.org`,rule:`the prefix is unconditional (:573), so a mailto: inside brackets is doubled — faithfully`},{input:`Jörg Schröder <joerg@example.org>`,name:`Jörg Schröder`,link:`joerg@example.org`,isEmail:!0,uri:`mailto:joerg@example.org`,rule:`the offsets are byte offsets in C and code-unit offsets here; ASCII delimiters make them agree`},{input:`Ada Lovelace <ada@lovelace.org>`,name:`Ada Lovelace`,link:`ada@lovelace.org`,isEmail:!0,uri:`mailto:ada@lovelace.org`,rule:`an INTERIOR tab survives — g_strstrip only touches the ends`},{input:`Ada Lovelace <ada@lovelace.org><bob@example.org>`,name:`Ada Lovelace`,link:`ada@lovelace.org`,isEmail:!0,uri:`mailto:ada@lovelace.org`,rule:"the FIRST `<` and the first `>` after it — one link per person, ever"},{input:`Ada > Lovelace`,name:`Ada > Lovelace`,link:null,isEmail:!1,uri:null,rule:"a `>` with no `<` before it is just text (q1 is NULL, so q2 is never looked for)"},{input:`Ada Lovelace <ada@lovelace.org> <bob@example.org>`,name:`Ada Lovelace`,link:`ada@lovelace.org`,isEmail:!0,uri:`mailto:ada@lovelace.org`,rule:`the same, spaced out — a second address is silently dropped from the title too`},{input:`httpss://lovelace.org`,name:`httpss://lovelace.org`,link:null,isEmail:!1,uri:null,rule:`neither literal occurs — "https://" needs the colon right after the s`},{input:`xhttps://lovelace.org`,name:`x`,link:`https://lovelace.org`,isEmail:!1,uri:`https://lovelace.org`,rule:`strstr does not care what precedes the match — the name becomes the single leading char`}],t=[{value:`Ada Lovelace`,people:[`Ada Lovelace`],rule:`one translator, one row`},{value:`Ada
|
|
3
|
+
Bob`,people:[`Ada`,`Bob`],rule:`newline-separated, in order`},{value:`translator-credits`,people:[],rule:`the untranslated gettext sentinel is suppressed (:605)`},{value:`translator_credits`,people:[],rule:`the older underscore spelling is checked too (:604)`},{value:``,people:[],rule:`g_strsplit("") is a ZERO-length vector, not [""] — no section at all`},{value:null,people:[],rule:`unset behaves as unset (:603)`},{value:`Ada
|
|
4
|
+
|
|
5
|
+
Bob`,people:[`Ada`,``,`Bob`],rule:`an interior blank line IS a token and IS a row — only NULL pointers are skipped (:557)`},{value:`Ada
|
|
6
|
+
`,people:[`Ada`,``],rule:`a trailing newline produces a trailing empty row`},{value:`Translator-Credits`,people:[`Translator-Credits`],rule:`the sentinel test is g_strcmp0, i.e. case-SENSITIVE`}],n=[{input:{},sections:[],rule:`nothing set — the Credits page has no groups, so its row is hidden (:629-630)`},{input:{developers:[`Ada Lovelace <ada@lovelace.org>`]},sections:[{title:`Code by`,people:[{name:`Ada Lovelace`,uri:`mailto:ada@lovelace.org`}]}],rule:`developers is titled "Code by", not "Developers" (:611)`},{input:{designers:[],artists:[`Bob`],documenters:[]},sections:[{title:`Artwork by`,people:[{name:`Bob`,uri:null}]}],rule:`empty arrays contribute NO group at all (:545-546)`},{input:{documenters:[`Dee`],developers:[`Ada`],artists:[`Art`],designers:[`Des`],translatorCredits:`Tra`},sections:[{title:`Code by`,people:[{name:`Ada`,uri:null}]},{title:`Design by`,people:[{name:`Des`,uri:null}]},{title:`Artwork by`,people:[{name:`Art`,uri:null}]},{title:`Documentation by`,people:[{name:`Dee`,uri:null}]},{title:`Translated by`,people:[{name:`Tra`,uri:null}]}],rule:`the five built-ins keep source order regardless of the order they were set (:611-619)`},{input:{developers:[`Ada`],translatorCredits:`translator-credits`},sections:[{title:`Code by`,people:[{name:`Ada`,uri:null}]}],rule:`the sentinel drops the Translated by group entirely`},{input:{developers:[`Ada`],creditSections:[{title:`Backers`,people:[`Bob https://bob.example`]},{title:null,people:[`Anonymous`]}]},sections:[{title:`Code by`,people:[{name:`Ada`,uri:null}]},{title:`Backers`,people:[{name:`Bob`,uri:`https://bob.example`}]},{title:null,people:[{name:`Anonymous`,uri:null}]}],rule:`extra sections come LAST, in call order, and their title may be NULL (:3240, :3252)`}],r=[{website:!1,comments:!1,customLinks:!1,releaseNotes:!1,visible:{detailsGroup:!1,whatsNewRow:!1,detailsRow:!1,websiteRow:!1,commentsLabel:!1,linksGroup:!1,detailsWebsiteRow:!1},rule:`nothing set — the whole first group is gone`},{website:!0,comments:!1,customLinks:!1,releaseNotes:!1,visible:{detailsGroup:!0,whatsNewRow:!1,detailsRow:!1,websiteRow:!0,commentsLabel:!1,linksGroup:!1,detailsWebsiteRow:!1},rule:`website ALONE stays on the main page and offers no Details row (:1112 with :1108)`},{website:!1,comments:!0,customLinks:!1,releaseNotes:!1,visible:{detailsGroup:!0,whatsNewRow:!1,detailsRow:!0,websiteRow:!1,commentsLabel:!0,linksGroup:!1,detailsWebsiteRow:!1},rule:`comments open the Details page; with no website there is no links group (:1109)`},{website:!0,comments:!0,customLinks:!1,releaseNotes:!1,visible:{detailsGroup:!0,whatsNewRow:!1,detailsRow:!0,websiteRow:!1,commentsLabel:!0,linksGroup:!0,detailsWebsiteRow:!0},rule:`website MOVES to the Details page as soon as the page has other content (:1112-1113)`},{website:!1,comments:!1,customLinks:!0,releaseNotes:!1,visible:{detailsGroup:!0,whatsNewRow:!1,detailsRow:!0,websiteRow:!1,commentsLabel:!1,linksGroup:!0,detailsWebsiteRow:!1},rule:`a custom link alone is enough to open the Details page (:1108-1109)`},{website:!0,comments:!1,customLinks:!0,releaseNotes:!1,visible:{detailsGroup:!0,whatsNewRow:!1,detailsRow:!0,websiteRow:!1,commentsLabel:!1,linksGroup:!0,detailsWebsiteRow:!0},rule:`custom links move the website even without comments`},{website:!1,comments:!0,customLinks:!0,releaseNotes:!1,visible:{detailsGroup:!0,whatsNewRow:!1,detailsRow:!0,websiteRow:!1,commentsLabel:!0,linksGroup:!0,detailsWebsiteRow:!1},rule:`the links group exists for the custom links even with no website row in it`},{website:!0,comments:!0,customLinks:!0,releaseNotes:!1,visible:{detailsGroup:!0,whatsNewRow:!1,detailsRow:!0,websiteRow:!1,commentsLabel:!0,linksGroup:!0,detailsWebsiteRow:!0},rule:`everything set — the main-page website row is still hidden, never both`},{website:!1,comments:!1,customLinks:!1,releaseNotes:!0,visible:{detailsGroup:!0,whatsNewRow:!0,detailsRow:!1,websiteRow:!1,commentsLabel:!1,linksGroup:!1,detailsWebsiteRow:!1},rule:`release notes alone keep the GROUP alive for the What’s New row (:1116-1118)`},{website:!0,comments:!0,customLinks:!0,releaseNotes:!0,visible:{detailsGroup:!0,whatsNewRow:!0,detailsRow:!0,websiteRow:!1,commentsLabel:!0,linksGroup:!0,detailsWebsiteRow:!0},rule:`release notes are orthogonal to the rest of the group`}],i=[{supportUrl:!1,issueUrl:!1,debugInfo:!1,visible:{supportGroup:!1,supportRow:!1,issueRow:!1,troubleshootingRow:!1},rule:`nothing set — no support group`},{supportUrl:!0,issueUrl:!1,debugInfo:!1,visible:{supportGroup:!0,supportRow:!0,issueRow:!1,troubleshootingRow:!1},rule:`support-url draws its row on the MAIN page (:1128)`},{supportUrl:!1,issueUrl:!0,debugInfo:!1,visible:{supportGroup:!0,supportRow:!1,issueRow:!0,troubleshootingRow:!1},rule:`issue-url likewise (:1129)`},{supportUrl:!0,issueUrl:!0,debugInfo:!1,visible:{supportGroup:!0,supportRow:!0,issueRow:!0,troubleshootingRow:!1},rule:`both links, no Troubleshooting row without debug info`},{supportUrl:!1,issueUrl:!1,debugInfo:!0,visible:{supportGroup:!0,supportRow:!1,issueRow:!1,troubleshootingRow:!0},rule:`debug-info alone opens the group for the Troubleshooting row (:1130)`},{supportUrl:!0,issueUrl:!1,debugInfo:!0,visible:{supportGroup:!0,supportRow:!0,issueRow:!1,troubleshootingRow:!0},rule:`the three are independent`},{supportUrl:!1,issueUrl:!0,debugInfo:!0,visible:{supportGroup:!0,supportRow:!1,issueRow:!0,troubleshootingRow:!0},rule:`the three are independent`},{supportUrl:!0,issueUrl:!0,debugInfo:!0,visible:{supportGroup:!0,supportRow:!0,issueRow:!0,troubleshootingRow:!0},rule:`everything set`}],a=[{hasCredits:!1,hasLegal:!1,hasAcknowledgements:!1,visible:{creditsLegalGroup:!1,creditsRow:!1,legalRow:!1,acknowledgementsRow:!1},rule:`no page has content — the group is gone`},{hasCredits:!0,hasLegal:!1,hasAcknowledgements:!1,visible:{creditsLegalGroup:!0,creditsRow:!0,legalRow:!1,acknowledgementsRow:!1},rule:`credits only`},{hasCredits:!1,hasLegal:!0,hasAcknowledgements:!1,visible:{creditsLegalGroup:!0,creditsRow:!1,legalRow:!0,acknowledgementsRow:!1},rule:`legal only`},{hasCredits:!0,hasLegal:!0,hasAcknowledgements:!1,visible:{creditsLegalGroup:!0,creditsRow:!0,legalRow:!0,acknowledgementsRow:!1},rule:`credits + legal`},{hasCredits:!1,hasLegal:!1,hasAcknowledgements:!0,visible:{creditsLegalGroup:!0,creditsRow:!1,legalRow:!1,acknowledgementsRow:!0},rule:`acknowledgements alone open the group (:486) — neither renderer has this page`},{hasCredits:!0,hasLegal:!1,hasAcknowledgements:!0,visible:{creditsLegalGroup:!0,creditsRow:!0,legalRow:!1,acknowledgementsRow:!0},rule:`independent`},{hasCredits:!1,hasLegal:!0,hasAcknowledgements:!0,visible:{creditsLegalGroup:!0,creditsRow:!1,legalRow:!0,acknowledgementsRow:!0},rule:`independent`},{hasCredits:!0,hasLegal:!0,hasAcknowledgements:!0,visible:{creditsLegalGroup:!0,creditsRow:!0,legalRow:!0,acknowledgementsRow:!0},rule:`all three`}],o=[{property:`application-icon`,value:`org.gnome.Builder`,visible:!0,rule:`an icon name shows the image`},{property:`application-icon`,value:``,visible:!1,rule:`unset hides the image — there is no application-x-executable fallback (:2313-2314)`},{property:`application-name`,value:`Builder`,visible:!0,rule:`a name shows the title-1 label`},{property:`application-name`,value:``,visible:!1,rule:`unset hides the label — there is no "Application" fallback (:2376-2377)`},{property:`application-name`,value:` `,visible:!0,rule:`a single space is a first character, so the label IS shown (no trimming)`},{property:`developer-name`,value:`The GNOME Project`,visible:!0,rule:`a developer line is shown`},{property:`developer-name`,value:``,visible:!1,rule:`unset hides it (:2426-2427)`},{property:`version`,value:`48.0`,visible:!0,rule:`a version shows the pill`},{property:`version`,value:``,visible:!1,rule:`unset hides it (:2476)`}],s=[{label:`dialogTitle`,text:`About`,plain:`About`,rule:`the bare word (.ui:6) — never "About <app name>", which is the header revealer’s job (.ui:29-31)`},{label:`detailsRow`,text:`_Details`,plain:`Details`,rule:`row titles carry mnemonics (.ui:119-120)`},{label:`websiteRow`,text:`_Website`,plain:`Website`,rule:`the same title on both pages (.ui:136, :350)`},{label:`supportRow`,text:`_Support Questions`,plain:`Support Questions`,rule:`a main-page row (.ui:152)`},{label:`issueRow`,text:`_Report an Issue`,plain:`Report an Issue`,rule:`a main-page row (.ui:162)`},{label:`troubleshootingRow`,text:`_Troubleshooting`,plain:`Troubleshooting`,rule:`a main-page row (.ui:172)`},{label:`creditsRow`,text:`_Credits`,plain:`Credits`,rule:`.ui:193`},{label:`legalRow`,text:`_Legal`,plain:`Legal`,rule:`.ui:210`},{label:`acknowledgementsRow`,text:`_Acknowledgements`,plain:`Acknowledgements`,rule:`.ui:228`},{label:`whatsNewRow`,text:`What’s _New`,plain:`What’s New`,rule:`U+2019, not an ASCII apostrophe, and the marker is mid-string (.ui:102)`},{label:`detailsPage`,text:`Details`,plain:`Details`,rule:`PAGE titles carry no marker (.ui:311)`},{label:`creditsPage`,text:`Credits`,plain:`Credits`,rule:`.ui:507`},{label:`legalPage`,text:`Legal`,plain:`Legal`,rule:`.ui:539`}],c=[{licenseType:0,spdxId:null,url:null,rule:`unknown carries nothing (:216)`},{licenseType:1,spdxId:null,url:null,rule:`custom carries nothing either — the text comes from the property (:217)`},{licenseType:2,spdxId:`GPL-2.0-or-later`,url:`https://www.gnu.org/licenses/old-licenses/gpl-2.0.html`,rule:`the first real row, at index 2 — a table that skipped the two nulls shifts everything`},{licenseType:7,spdxId:`MIT`,url:`https://opensource.org/licenses/mit-license.php`,rule:`MIT_X11 (:229)`},{licenseType:18,spdxId:`0BSD`,url:`https://opensource.org/license/0bsd`,rule:`the last row — G_STATIC_ASSERT pins it to GTK_LICENSE_0BSD (:253-256)`}],l=[{spdxId:`MIT`,licenseType:7,rule:`an exact table match (:1227)`},{spdxId:`GPL-3.0-or-later`,licenseType:3,rule:`the -or-later variant is its own row`},{spdxId:`GPL-3.0-only`,licenseType:10,rule:`and so is -only`},{spdxId:`GPL-2.0`,licenseType:9,rule:`the deprecated bare id aliases to -ONLY, not -or-later (:265)`},{spdxId:`GPL-3.0`,licenseType:10,rule:`the second alias (:266)`},{spdxId:`0BSD`,licenseType:18,rule:`the last row is reachable by id`},{spdxId:`WTFPL`,licenseType:null,rule:`no match; the caller falls back to custom (:1241-1242)`},{spdxId:`mit`,licenseType:null,rule:`g_strcmp0 is case-sensitive`},{spdxId:``,licenseType:null,rule:`the empty id matches nothing — indices 0/1 hold NULL, not ""`}],u=[{licenseType:0,license:`ignored`,text:null,rule:`unknown returns NULL and the custom text is not consulted (:639-640)`},{licenseType:1,license:`All rights reserved.`,text:`All rights reserved.`,rule:`custom passes through (:642-643)`},{licenseType:1,license:``,text:``,rule:`custom + empty is "" — NOT null; the difference decides whether a legal section exists`},{licenseType:7,license:``,text:`This application comes with absolutely no warranty. See the <a href="https://opensource.org/licenses/mit-license.php">The MIT License (MIT)</a> for details.`,rule:`the preamble takes the URL first, then the name (:648-650), and contains Pango markup`},{licenseType:18,license:`ignored`,text:`This application comes with absolutely no warranty. See the <a href="https://opensource.org/license/0bsd">BSD Zero-Clause License</a> for details.`,rule:`a non-custom type ignores the license string entirely`}],d=[{steps:[],license:``,licenseType:0,notify:[],rule:`the defaults: "" (:2044) and unknown (:2032)`},{steps:[{property:`license`,value:`All rights reserved.`}],license:`All rights reserved.`,licenseType:1,notify:[`license`,`license-type`],rule:`setting a text forces custom and notifies both (:3471-3477)`},{steps:[{property:`license-type`,value:3}],license:``,licenseType:3,notify:[`license`,`license-type`],rule:`a non-custom type notifies license too, even though it was already "" (:3414)`},{steps:[{property:`license`,value:`Custom text`},{property:`license-type`,value:3}],license:``,licenseType:3,notify:[`license`,`license-type`,`license`,`license-type`],rule:`choosing a stock licence CLEARS the custom text (:3407-3408) — the two are one state`},{steps:[{property:`license`,value:`Custom text`},{property:`license-type`,value:1}],license:`Custom text`,licenseType:1,notify:[`license`,`license-type`],rule:`setting custom when already custom is an early-out (:3404-3405) — nothing notified`},{steps:[{property:`license`,value:`Custom text`},{property:`license-type`,value:3},{property:`license`,value:`Custom text`}],license:`Custom text`,licenseType:1,notify:[`license`,`license-type`,`license`,`license-type`,`license`,`license-type`],rule:`the SAME text again does switch back to custom, because the string did change (:3466)`},{steps:[{property:`license-type`,value:3},{property:`license`,value:``}],license:``,licenseType:3,notify:[`license`,`license-type`],rule:`but assigning "" to an already-empty licence bails first — the GPL text STAYS on screen`},{steps:[{property:`license-type`,value:19}],license:``,licenseType:0,notify:[],rule:`out of range is rejected outright (:3401-3402), not clamped`},{steps:[{property:`license-type`,value:-1}],license:``,licenseType:0,notify:[],rule:`below GTK_LICENSE_UNKNOWN likewise`}],f=[{copyright:``,licenseType:0,license:``,visible:!1,rule:`nothing set — no Legal page, no Legal row`},{copyright:`© 2026 Ada`,licenseType:0,license:``,visible:!0,rule:`a copyright alone is enough`},{copyright:``,licenseType:7,license:``,visible:!0,rule:`a stock licence alone is enough`},{copyright:``,licenseType:1,license:``,visible:!1,rule:'custom with an EMPTY text contributes nothing — the trap `licenseText` returning "" sets'},{copyright:``,licenseType:1,license:`All rights reserved.`,visible:!0,rule:`custom with text does`},{copyright:` `,licenseType:0,license:``,visible:!0,rule:`a single space is a first character (:666) — the section exists and looks empty`}];export{a as ABOUT_DIALOG_CREDITS_LEGAL_VECTORS,r as ABOUT_DIALOG_DETAILS_VECTORS,o as ABOUT_DIALOG_HEADER_VECTORS,s as ABOUT_DIALOG_LABEL_VECTORS,i as ABOUT_DIALOG_SUPPORT_VECTORS,n as CREDITS_SECTIONS_VECTORS,e as CREDIT_PERSON_VECTORS,f as LEGAL_SECTION_VECTORS,c as LICENSE_INFO_VECTORS,d as LICENSE_SETTER_VECTORS,l as LICENSE_SPDX_VECTORS,u as LICENSE_TEXT_VECTORS,t as TRANSLATOR_CREDITS_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{text:`Wi-Fi`,visible:!0,rule:`an ordinary label shows`},{text:``,visible:!1,rule:`the EMPTY string hides the label — the half both ports dropped for titles`},{text:null,visible:!1,rule:"an unset property hides it too (`string &&` guards the NULL)"},{text:` `,visible:!0,rule:"ONE SPACE IS VISIBLE — `string[0]` reads a byte, it never trims"},{text:` `,visible:!0,rule:`any non-NUL first byte counts, tabs included`},{text:`0`,visible:!0,rule:`a falsy-looking string is still a string`},{text:`Ελληνικά`,visible:!0,rule:`non-ASCII is not special — the check is on the first byte`}],t=[{name:`default`,steps:[],activatable:!1,activatableWidget:null,rule:`the template starts unactivatable (adw-action-row.ui:5)`},{name:`sensitive-widget-activates`,steps:[{op:`set-activatable-widget`,widget:`switch`}],activatable:!0,activatableWidget:`switch`,rule:`SYNC_CREATE copies the widget’s sensitive (TRUE) into activatable`},{name:`insensitive-widget-does-not-activate`,steps:[{op:`set-activatable-widget`,widget:`switch`,sensitive:!1}],activatable:!1,activatableWidget:`switch`,rule:`the bind reads sensitive — an insensitive widget leaves the row unactivatable`},{name:`sensitive-flip-follows`,steps:[{op:`set-activatable-widget`,widget:`switch`},{op:`set-widget-sensitive`,sensitive:!1}],activatable:!1,activatableWidget:`switch`,rule:`the binding is LIVE — desensitising the widget deactivates the row`},{name:`unsetting-keeps-activatable`,steps:[{op:`set-activatable-widget`,widget:`switch`},{op:`set-activatable-widget`,widget:null}],activatable:!0,activatableWidget:null,rule:`clearing only unbinds (C:709) — “unsetting it won’t change the row’s activatability”`},{name:`unbound-sensitivity-is-inert`,steps:[{op:`set-activatable-widget`,widget:`switch`},{op:`set-activatable-widget`,widget:null},{op:`set-widget-sensitive`,sensitive:!1}],activatable:!0,activatableWidget:null,rule:`with no widget there is no binding left to carry a sensitive change`},{name:`rebinding-resyncs`,steps:[{op:`set-activatable-widget`,widget:`switch`},{op:`set-activatable-widget`,widget:null},{op:`set-activatable-widget`,widget:`button`,sensitive:!1}],activatable:!1,activatableWidget:`button`,rule:`a new binding re-syncs from the NEW widget, sticky value and all`},{name:`direct-write-lands`,steps:[{op:`set-activatable-widget`,widget:`switch`},{op:`set-activatable`,activatable:!1}],activatable:!1,activatableWidget:`switch`,rule:`the binding is one-way, so a direct write is not refused`},{name:`direct-write-is-overwritten`,steps:[{op:`set-activatable-widget`,widget:`switch`},{op:`set-activatable`,activatable:!1},{op:`set-widget-sensitive`,sensitive:!1},{op:`set-widget-sensitive`,sensitive:!0}],activatable:!0,activatableWidget:`switch`,rule:`…and the next sensitive CHANGE overwrites it, because the source wins`},{name:`unchanged-sensitive-does-not-re-assert`,steps:[{op:`set-activatable-widget`,widget:`switch`},{op:`set-activatable`,activatable:!1},{op:`set-widget-sensitive`,sensitive:!0}],activatable:!1,activatableWidget:`switch`,rule:`a re-write of the sensitive it already had emits no notify, so the binding carries nothing`}],n=[{name:`default`,steps:[],active:!1,emitted:[],rule:`the pspec default is FALSE (C:141-143)`},{name:`programmatic-set-notifies`,steps:[{op:`set-active`,active:!0}],active:!0,emitted:[!0],rule:`a programmatic set reaches the slider, whose notify is the row’s notify`},{name:`unchanged-set-is-silent`,steps:[{op:`set-active`,active:!1}],active:!1,emitted:[],rule:`the equality early-return at C:224-225 fires before anything is written`},{name:`repeat-set-is-silent`,steps:[{op:`set-active`,active:!0},{op:`set-active`,active:!0}],active:!0,emitted:[!0],rule:`only the first of two identical sets changes anything`},{name:`activate-row-toggles`,steps:[{op:`activate-row`}],active:!0,emitted:[!0],rule:`activating the row inverts the state — the row IS the switch’s label`},{name:`activate-row-toggles-back`,steps:[{op:`activate-row`},{op:`activate-row`}],active:!1,emitted:[!0,!1],rule:`and it inverts again, notifying each time`},{name:`mixed-paths-notify-alike`,steps:[{op:`set-active`,active:!0},{op:`activate-row`},{op:`set-active`,active:!0}],active:!0,emitted:[!0,!1,!0],rule:"one notify path for both origins — no `interactive` flag exists here"}],r=[{startIconName:null,endIconName:null,startIconVisible:!1,endIconVisible:!1,rule:`both default to "" (C:255-256) and both images stay hidden`},{startIconName:`list-add-symbolic`,endIconName:null,startIconVisible:!0,endIconVisible:!1,rule:`a leading icon alone`},{startIconName:null,endIconName:`go-next-symbolic`,startIconVisible:!1,endIconVisible:!0,rule:`a TRAILING icon alone — the property neither renderer had`},{startIconName:`document-open-symbolic`,endIconName:`external-link-symbolic`,startIconVisible:!0,endIconVisible:!0,rule:`both at once, the "Open in Files ›" shape the property exists for`},{startIconName:``,endIconName:``,startIconVisible:!1,endIconVisible:!1,rule:`the empty string hides an icon exactly like an unset one`}],i=[{declared:null,activatable:!0,rule:`nothing declared — the template value stands`},{declared:``,activatable:!0,rule:`a bare attribute changes nothing, there is nothing to change`},{declared:`false`,activatable:!0,rule:`THE INVENTED OPT-OUT: libadwaita has no such switch`},{declared:`true`,activatable:!0,rule:`and no such switch in the other direction either`}],a=[{name:`default`,steps:[],title:``,titleVisible:!1,subtitle:``,subtitleVisible:!1,notified:[],rule:"both labels start `visible=False` (adw-window-title.ui:15, :26)"},{name:`title-only`,steps:[{op:`set-title`,value:`Documents`}],title:`Documents`,titleVisible:!0,subtitle:``,subtitleVisible:!1,notified:[`title`],rule:`a header bar with no subtitle must not reserve a subtitle line`},{name:`subtitle-only`,steps:[{op:`set-subtitle`,value:`3 selected`}],title:``,titleVisible:!1,subtitle:`3 selected`,subtitleVisible:!0,notified:[`subtitle`],rule:`THE TITLE HIDES TOO — the rule neither renderer applied to the title`},{name:`both`,steps:[{op:`set-title`,value:`Documents`},{op:`set-subtitle`,value:`3 selected`}],title:`Documents`,titleVisible:!0,subtitle:`3 selected`,subtitleVisible:!0,notified:[`title`,`subtitle`],rule:`the ordinary two-line case`},{name:`cleared-title-hides-again`,steps:[{op:`set-title`,value:`Documents`},{op:`set-title`,value:``}],title:``,titleVisible:!1,subtitle:``,subtitleVisible:!1,notified:[`title`,`title`],rule:`clearing is a change, so it hides AND notifies`},{name:`unchanged-set-is-silent`,steps:[{op:`set-title`,value:`Documents`},{op:`set-title`,value:`Documents`}],title:`Documents`,titleVisible:!0,subtitle:``,subtitleVisible:!1,notified:[`title`],rule:"the `g_strcmp0` early-return at C:203-204 drops the second set"},{name:`space-title-stays-visible`,steps:[{op:`set-title`,value:` `}],title:` `,titleVisible:!0,subtitle:``,subtitleVisible:!1,notified:[`title`],rule:"`title && title[0]` reads one byte — a space is a visible title"},{name:`null-over-empty-is-silent`,steps:[{op:`set-title`,value:null}],title:``,titleVisible:!1,subtitle:``,subtitleVisible:!1,notified:[],rule:'DIVERGENCE: libadwaita notifies here, via `g_strcmp0 ("", NULL) == 1`'}];export{t as ACTION_ROW_ACTIVATION_VECTORS,i as BUTTON_ROW_ACTIVATABLE_VECTORS,r as BUTTON_ROW_ICON_VECTORS,e as LABEL_VISIBILITY_VECTORS,n as SWITCH_ROW_NOTIFY_VECTORS,a as WINDOW_TITLE_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{text:`Ada Lovelace`,initials:`AL`,rule:`first char + char after the last space`},{text:`Ada`,initials:`A`,rule:`ONE letter for a single word — never the first two`},{text:`GNOME`,initials:`G`,rule:`single word, already uppercase`},{text:`ada lovelace`,initials:`AL`,rule:`g_utf8_strup upcases both initials`},{text:`Jean-Luc Picard`,initials:`JP`,rule:`a hyphen is not a separator`},{text:` Ada Lovelace `,initials:`AL`,rule:`g_strstrip removes surrounding ASCII space`},{text:`Ada Lovelace`,initials:`AL`,rule:`g_utf8_strrchr finds the LAST of a run of spaces`},{text:`Ada Lovelace`,initials:`A`,rule:`only a literal space separates — a tab does not`},{text:`Ada Lovelace King`,initials:`AK`,rule:`the LAST space wins, not the second word`},{text:`Jörg Schröder`,initials:`JS`,rule:`non-ASCII name, ASCII initials`},{text:`Müller`,initials:`M`,rule:`single non-ASCII word`},{text:`Ł ódź`,initials:`ŁÓ`,rule:`both initials stay non-ASCII and are upcased`},{text:`日本語`,initials:`日`,rule:`a script without case is passed through`},{text:`A`,initials:`A`,rule:`one character`},{text:``,initials:``,rule:`empty name renders no initials`},{text:` `,initials:``,rule:`blank-only name strips to empty`}],t=[{size:12,maxFontSize:8.49,legacyWebGuess:6},{size:16,maxFontSize:9.91,legacyWebGuess:8},{size:24,maxFontSize:12.37,legacyWebGuess:12},{size:28,maxFontSize:13.6,legacyWebGuess:14},{size:31,maxFontSize:14.52,legacyWebGuess:16},{size:32,maxFontSize:14.83,legacyWebGuess:13},{size:48,maxFontSize:19.74,legacyWebGuess:19},{size:64,maxFontSize:24.66,legacyWebGuess:26},{size:128,maxFontSize:44.31,legacyWebGuess:51}],n=[{hasCustomImage:!0,showInitials:!0,text:`Ada`,mode:`image`,rule:`a custom image wins outright`},{hasCustomImage:!1,showInitials:!0,text:`Ada`,mode:`initials`,rule:`asked for, and a name to derive from`},{hasCustomImage:!1,showInitials:!1,text:`Ada`,mode:`icon`,rule:`a name alone is not enough`},{hasCustomImage:!1,showInitials:!0,text:` `,mode:`initials`,rule:`the gate is TEXT length, so a blank name still shows an (empty) label`},{hasCustomImage:!1,showInitials:!0,text:``,mode:`icon`,rule:`an empty name falls back to the icon`}],r=[{text:`Ada Lovelace`,hash:2497722230,colorClass:11},{text:`Ada`,hash:193451179,colorClass:6},{text:`GNOME`,hash:221244347,colorClass:10},{text:`A`,hash:177638,colorClass:7},{text:` `,hash:193412933,colorClass:8},{text:`Jörg Schröder`,hash:518987909,colorClass:14},{text:`Müller`,hash:2552743072,colorClass:13},{text:`Ł ódź`,hash:512736292,colorClass:13},{text:`日本語`,hash:2510222213,colorClass:10}];export{r as AVATAR_COLOR_VECTORS,t as AVATAR_FONT_SIZE_VECTORS,e as AVATAR_INITIALS_VECTORS,n as AVATAR_MODE_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{property:`title`,value:``,rule:`empty string, not NULL — the setter rejects NULL (:612)`},{property:`button-label`,value:``,rule:`empty label, so no button (:408-411 with :663)`},{property:`revealed`,value:!1,rule:`FALSE (:456-459) — "Banners are hidden by default" (:47); NS started at true`},{property:`use-markup`,value:!0,rule:`TRUE (:422-425) — markup is ON unless disabled; both ports had it opt-in`},{property:`button-style`,value:`default`,rule:`ADW_BANNER_BUTTON_DEFAULT (:443-447), i.e. the grey button (Since 1.7)`}],t=[{label:`Resume`,visible:!0,rule:`an ordinary label shows the button`},{label:``,visible:!1,rule:`the empty string is the documented "no button" value (:401)`},{label:null,visible:!1,rule:`NULL is accepted by the setter and is also "no button" (:647)`},{label:` `,visible:!0,rule:`label[0] is a space — a character, so the button IS shown`},{label:` `,visible:!0,rule:`no trimming happens anywhere on this path`},{label:`_R`,visible:!0,rule:`the mnemonic marker is a character like any other here`},{label:`0`,visible:!0,rule:`a C string test, not a JS truthiness one`}],n=[{label:`_Resume`,text:`Resume`,rule:`the marker is removed and marks the R (adw-banner.ui:33)`},{label:`Resume`,text:`Resume`,rule:`a label without markers is painted verbatim`},{label:`Save __As`,text:`Save _As`,rule:`a doubled marker is one literal underscore`},{label:`Update_`,text:`Update`,rule:`a trailing lone marker marks nothing and is dropped`},{label:``,text:``,rule:`empty in, empty out`},{label:`Ü_bersicht`,text:`Übersicht`,rule:`non-ASCII text is untouched; only the marker goes`}],r=[{style:`default`,classes:[],rule:`ADW_BANNER_BUTTON_DEFAULT removes .suggested-action (:766)`},{style:`suggested`,classes:[`suggested-action`],rule:`ADW_BANNER_BUTTON_SUGGESTED adds it (:769)`}],i=[{input:`suggested`,style:`suggested`,rule:`the enum nick, as GObject spells it`},{input:`default`,style:`default`,rule:`the other nick, spelled explicitly`},{input:null,style:`default`,rule:`attribute absent → the property default`},{input:``,style:`default`,rule:`attribute present but empty is not a nick`},{input:`SUGGESTED`,style:`default`,rule:`nicks are lowercase; GObject parsing is case-sensitive`},{input:`destructive`,style:`default`,rule:`the enum has exactly two members (:23-35)`}];export{i as BANNER_BUTTON_STYLE_PARSE_VECTORS,r as BANNER_BUTTON_STYLE_VECTORS,n as BANNER_BUTTON_TEXT_VECTORS,t as BANNER_BUTTON_VISIBLE_VECTORS,e as BANNER_DEFAULT_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{property:`icon-name`,value:``,rule:'empty string (:229-232), matching `g_strdup ("")` in init (:284)'},{property:`label`,value:``,rule:`empty (:239-242), so the label node starts hidden (:300)`},{property:`use-underline`,value:!1,rule:`FALSE (:253-256) — the OPPOSITE of the banner button`},{property:`can-shrink`,value:!1,rule:`FALSE (:269-272), i.e. PANGO_ELLIPSIZE_NONE (Since 1.4)`}],t=[{iconName:`folder-download-symbolic`,resolved:`folder-download-symbolic`,isFallback:!1,rule:`a real theme name is passed straight to gtk_image_set_from_icon_name (:358)`},{iconName:``,resolved:`image-missing`,isFallback:!0,rule:`empty → image-missing (:355-356). The docs at :228/:343 say the icon is HIDDEN; the code never hides it, and both ports believed the docs`},{iconName:` `,resolved:` `,isFallback:!1,rule:`icon_name[0] is a space, so the fallback does not fire — GTK then draws a missing icon by lookup failure, not by this branch`},{iconName:`image-missing`,resolved:`image-missing`,isFallback:!1,rule:`asking for the fallback by name is not the empty case — it is an app value`}],n=[{label:`Open`,visible:!0,iconExpands:!1,rule:`a label shows and the icon stops expanding`},{label:``,visible:!1,iconExpands:!0,rule:`no label: node hidden, icon takes the space (:296 too)`},{label:` `,visible:!0,iconExpands:!1,rule:`label[0] is a space — a character, so the node shows`},{label:`0`,visible:!0,iconExpands:!1,rule:`a C string test, not a JS truthiness one`},{label:`_O`,visible:!0,iconExpands:!1,rule:`the mnemonic marker is a character here`}],r=[{label:`_Open`,useUnderline:!0,text:`Open`,rule:`the marker is removed and marks the O`},{label:`_Open`,useUnderline:!1,text:`_Open`,rule:`the DEFAULT — an underscore is a literal (:253-256)`},{label:`Save __As`,useUnderline:!0,text:`Save _As`,rule:`a doubled marker is one literal underscore`},{label:`Save __As`,useUnderline:!1,text:`Save __As`,rule:`both survive when mnemonics are off`},{label:`Open_`,useUnderline:!0,text:`Open`,rule:`a trailing lone marker marks nothing and is dropped`},{label:``,useUnderline:!0,text:``,rule:`empty in, empty out`}],i=[{canShrink:!1,ellipsize:`none`,rule:`the default — the label forces the button wider (:269-272)`},{canShrink:!0,ellipsize:`end`,rule:`PANGO_ELLIPSIZE_END, so the label truncates instead (:490)`}],a=[{ancestors:[`button`],target:0,rule:`a plain Gtk.Button takes the class itself (:115)`},{ancestors:[`button`,`split-button`],target:1,rule:`retargeted to the AdwSplitButton (:112-113) — the node the stylesheet styles (:499-507)`},{ancestors:[`button`,`menu-button`],target:0,rule:`no substitution for a GtkMenuButton: its INTERNAL button keeps it (:56-59)`},{ancestors:[`button`,`other`,`split-button`],target:0,rule:`the substitution tests gtk_widget_get_parent, so anything between defeats it (:112)`},{ancestors:[`other`,`button`],target:1,rule:`gtk_widget_get_ancestor skips non-button ancestors (:95)`},{ancestors:[`split-button`],target:null,rule:`AdwSplitButton derives from GTK_TYPE_WIDGET (adw-split-button.c:112), so get_ancestor never finds it — only the retarget reaches it`},{ancestors:[`other`],target:null,rule:`no button ancestor: the C would pass NULL to get_parent/add_css_class (:112-115), two CRITICALs — a port has nothing to style`},{ancestors:[],target:null,rule:`an unparented content is the same "nothing to style" case`}];export{e as BUTTON_CONTENT_DEFAULT_VECTORS,i as BUTTON_CONTENT_ELLIPSIZE_VECTORS,t as BUTTON_CONTENT_ICON_VECTORS,n as BUTTON_CONTENT_LABEL_VECTORS,a as BUTTON_CONTENT_STYLE_TARGET_VECTORS,r as BUTTON_CONTENT_TEXT_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{sizes:[1,1,1],snapPoints:[0,1,2],rule:`settled pages sit one unit apart, starting at 0`},{sizes:[1],snapPoints:[0],rule:`a single page is always at position 0`},{sizes:[1,.5,1],snapPoints:[0,.5,1.5],rule:`a half-revealed page makes the snap points fractional`},{sizes:[0,1,1],snapPoints:[-1,0,1],rule:`a page inserted at 0 starts at size 0 (:1385), so its snap point is NEGATIVE — which is what keeps the pages behind it in place`},{sizes:[1,1,0],snapPoints:[0,1,1],rule:`a trailing size-0 page shares its predecessor’s snap point`},{sizes:[],snapPoints:[],rule:`no pages, no snap points — the swipeable view pads this to [0] (:1269)`}],t=[{snapPoints:[0,1,2],sizes:[1,1,1],rule:`settled pages round-trip to size 1`},{snapPoints:[0,.5,1.5],sizes:[1,.5,1],rule:`a mid-reveal page is recovered as a fraction`},{snapPoints:[-1,0,1],sizes:[0,1,1],rule:`the +1 offset recovers a just-inserted page as size 0`},{snapPoints:[0],sizes:[1],rule:`an EMPTY carousel still measures as one page (:1269 pads to a single 0)`},{snapPoints:[],sizes:[],rule:`nothing in, nothing out`}],n=[{snapPoints:[0,1,2],positionShift:0,lower:0,upper:2,rule:`the last snap point is the upper bound`},{snapPoints:[],positionShift:0,lower:0,upper:0,rule:`an empty carousel cannot scroll (:212-219)`},{snapPoints:[0],positionShift:0,lower:0,upper:0,rule:`one page cannot scroll either`},{snapPoints:[0,1,2],positionShift:-5,lower:0,upper:0,rule:`MAX(0, …) floors the bound — a large pending shift collapses the range instead of inverting it`},{snapPoints:[-1,0,1],positionShift:0,lower:0,upper:1,rule:`a negative FIRST snap point does not lower the bound; only the last one is read`}],r=[{position:5,snapPoints:[0,1,2],clamped:2,rule:`past the end clamps to the last snap point`},{position:-3,snapPoints:[0,1,2],clamped:0,rule:`below the start clamps to 0`},{position:1.7,snapPoints:[0,1,2],clamped:1.7,rule:`the clamp BOUNDS the scroll, it does not snap — a fractional position passes through`},{position:5,snapPoints:[],clamped:0,rule:`an empty carousel clamps everything to 0`},{position:0,snapPoints:[0,1,2],clamped:0,rule:`an in-range position is untouched`}],i=[{position:0,snapPoints:[0,1,2],page:0,rule:`exactly on a snap point`},{position:2,snapPoints:[0,1,2],page:2,rule:`exactly on the last snap point`},{position:.5,snapPoints:[0,1,2],page:0,rule:`an exact tie resolves to the LOWER page — Math.round would answer 1 here, and both ports did`},{position:.5000001,snapPoints:[0,1,2],page:1,rule:`a hair past the tie flips to the later page`},{position:.4999999,snapPoints:[0,1,2],page:0,rule:`a hair before the tie stays on the earlier page`},{position:1.5,snapPoints:[0,1,2],page:1,rule:`the tie-break is the same at every boundary`},{position:9,snapPoints:[0,1,2],page:2,rule:`the position is clamped into the range BEFORE the search`},{position:-1,snapPoints:[0,1,2],page:0,rule:`clamped from below the same way`},{position:0,snapPoints:[],page:-1,rule:"an empty carousel has no current page — the -1 `page-changed` documents (:1150-1151)"},{position:.5,snapPoints:[-1,0,1],page:1,rule:`mid-insert geometry: the search runs on snap points, not on indices`}],a=[{position:0,nPages:3,direction:`back`,target:null,rule:`already at the first page (:489-494)`},{position:2,nPages:3,direction:`forward`,target:null,rule:`already at the last page (:495-499)`},{position:0,nPages:3,direction:`forward`,target:1,rule:`one page forward`},{position:2,nPages:3,direction:`back`,target:1,rule:`one page back`},{position:.5,nPages:3,direction:`forward`,target:2,rule:`round(0.5) = 1 — half AWAY FROM ZERO, where the page lookup would have answered 0`},{position:.5,nPages:3,direction:`back`,target:0,rule:`the same rounding backwards: 1 − 1`},{position:1.4,nPages:3,direction:`back`,target:0,rule:`round(1.4) = 1, then −1`},{position:1.6,nPages:3,direction:`forward`,target:null,rule:`round(1.6) = 2, already the last page`},{position:0,nPages:0,direction:`forward`,target:null,rule:`an empty carousel never navigates (:482-484)`},{position:0,nPages:1,direction:`forward`,target:null,rule:`a single page is both bounds`}],o=[{deltaX:0,deltaY:53,orientation:`horizontal`,source:`mouse`,step:1,rule:`a mouse wheel pages a HORIZONTAL carousel — mice rarely have a horizontal wheel (:540-542)`},{deltaX:0,deltaY:-53,orientation:`horizontal`,source:`mouse`,step:-1,rule:`the same, backwards`},{deltaX:-30,deltaY:0,orientation:`horizontal`,source:`mouse`,step:-1,rule:`the dx FALLBACK the web port dropped: it returned early on |dy| <= |dx|, so this did nothing`},{deltaX:30,deltaY:-53,orientation:`horizontal`,source:`mouse`,step:-1,rule:`dx is only consulted when the vertical branch produced nothing (:554)`},{deltaX:-30,deltaY:0,orientation:`horizontal`,source:`touchpad`,step:0,rule:`a touchpad always propagates — its kinetic scroll drives the swipe tracker (:537-538)`},{deltaX:0,deltaY:53,orientation:`horizontal`,source:`other`,step:0,rule:`a non-mouse device may only scroll ALONG the carousel’s axis`},{deltaX:53,deltaY:0,orientation:`horizontal`,source:`other`,step:1,rule:`and along the axis it works for any source`},{deltaX:0,deltaY:-10,orientation:`vertical`,source:`other`,step:-1,rule:`a vertical carousel reads dy`},{deltaX:53,deltaY:0,orientation:`vertical`,source:`mouse`,step:0,rule:`a vertical carousel NEVER reads dx — the fallback branch requires GTK_ORIENTATION_HORIZONTAL (:554)`},{deltaX:0,deltaY:0,orientation:`horizontal`,source:`mouse`,step:0,rule:`a null event propagates`}],s=[{pages:3,steps:[{at:1e3,deltaY:53,step:1,position:1},{at:1100,deltaY:53,step:0,position:1},{at:1150,deltaY:53,step:1,position:2}],rule:`a notch 100 ms later propagates; at exactly 150 ms the lockout has expired (g_timeout_add_once fires AT the duration)`},{pages:3,steps:[{at:0,deltaY:30,step:1,position:1},{at:200,deltaY:-30,step:-1,position:0}],rule:`opposite notches page BOTH ways — the accumulator the web port used cancelled them out instead`},{pages:2,steps:[{at:0,deltaY:53,step:1,position:1},{at:500,deltaY:53,step:1,position:1}],rule:`a notch at the last page still consumes the event and still arms the lockout (:561-576, :567)`}],c=[{closestPoint:1,oldPoint:2,newPoint:0,size:1,shift:1,rule:`a page from AFTER the current one moved BEFORE it: one page of content appeared ahead (:1490-1492)`},{closestPoint:1,oldPoint:0,newPoint:2,size:1,shift:-1,rule:`a page from BEFORE moved AFTER: one page of content disappeared ahead (:1493-1495)`},{closestPoint:1,oldPoint:1,newPoint:2,size:1,shift:1,rule:`the CURRENT page is the one moved, so the position follows it (:1488-1489)`},{closestPoint:0,oldPoint:1,newPoint:2,size:1,shift:0,rule:`a move entirely on one side of the position changes nothing`},{closestPoint:1,oldPoint:2,newPoint:0,size:.5,shift:.5,rule:`the shift is the moved page’s SIZE, so a half-revealed page shifts by half`}],l=[{pages:[`a`,`b`,`c`],ops:[],opResults:[],pageChanged:[],expected:{ids:[`a`,`b`,`c`],nPages:3,sizes:[1,1,1],snapPoints:[0,1,2],position:0,page:0},rule:`three settled pages sit one unit apart and start on page 0`},{pages:[`a`,`b`,`c`],ops:[{kind:`insert`,id:`d`}],opResults:[!0],pageChanged:[],expected:{ids:[`a`,`b`,`c`,`d`],nPages:4,sizes:[1,1,1,1],snapPoints:[0,1,2,3],position:0,page:0},rule:"append — `adw_carousel_append` is insert at -1 (:1349-1357)"},{pages:[`a`,`b`,`c`],ops:[{kind:`insert`,id:`d`,position:7}],opResults:[!0],pageChanged:[],expected:{ids:[`a`,`b`,`c`,`d`],nPages:4,sizes:[1,1,1,1],snapPoints:[0,1,2,3],position:0,page:0},rule:"a position past the end appends — `get_nth_link` returns NULL there (:1388-1391)"},{pages:[`a`,`b`,`c`],ops:[{kind:`insert`,id:`d`,position:0}],opResults:[!0],pageChanged:[],expected:{ids:[`d`,`a`,`b`,`c`],nPages:4,sizes:[1,1,1,1],snapPoints:[0,1,2,3],position:1,page:1},rule:"prepend — `adw_carousel_prepend` is insert at 0 (:1330-1339). The position moves to 1 so the page on screen is still `a`: a page revealed AT OR BEFORE the current one drags the position with it (`shift_position`, :241-258, :293-294)"},{pages:[`a`,`b`,`c`],ops:[{kind:`insert`,id:`d`,position:-2}],opResults:[!1],pageChanged:[],expected:{ids:[`a`,`b`,`c`],nPages:3,sizes:[1,1,1],snapPoints:[0,1,2],position:0,page:0},rule:`below -1 fails C’s own precondition (:1381) and adds nothing`},{pages:[`a`,`b`,`c`],ops:[{kind:`setPosition`,position:2},{kind:`insert`,id:`d`,position:0}],opResults:[!0,!0],pageChanged:[],expected:{ids:[`d`,`a`,`b`,`c`],nPages:4,sizes:[1,1,1,1],snapPoints:[0,1,2,3],position:3,page:3},rule:"inserting BEFORE the current page moves the position with it, so the same page stays on screen (`shift_position`, :241-258)"},{pages:[`a`,`b`,`c`],ops:[{kind:`insert`,id:`d`,position:2}],opResults:[!0],pageChanged:[],expected:{ids:[`a`,`b`,`d`,`c`],nPages:4,sizes:[1,1,1,1],snapPoints:[0,1,2,3],position:0,page:0},rule:`inserting AFTER the current page leaves the position alone`},{pages:[`a`,`b`,`c`],ops:[{kind:`setPosition`,position:2},{kind:`remove`,id:`a`}],opResults:[!0,!0],pageChanged:[],expected:{ids:[`b`,`c`],nPages:2,sizes:[1,1],snapPoints:[0,1],position:1,page:1},rule:"removing a page BEFORE the current one pulls the position back so `c` stays on screen"},{pages:[`a`,`b`,`c`],ops:[{kind:`remove`,id:`c`}],opResults:[!0],pageChanged:[],expected:{ids:[`a`,`b`],nPages:2,sizes:[1,1],snapPoints:[0,1],position:0,page:0},rule:`removing a page AFTER the current one leaves the position alone`},{pages:[`a`,`b`,`c`],ops:[{kind:`remove`,id:`zz`}],opResults:[!1],pageChanged:[],expected:{ids:[`a`,`b`,`c`],nPages:3,sizes:[1,1,1],snapPoints:[0,1,2],position:0,page:0},rule:`removing a page that is not there changes nothing`},{pages:[`a`,`b`,`c`],ops:[{kind:`setPosition`,position:1},{kind:`reorder`,id:`c`,position:0}],opResults:[!0,!0],pageChanged:[],expected:{ids:[`c`,`a`,`b`],nPages:3,sizes:[1,1,1],snapPoints:[0,1,2],position:2,page:2},rule:"a page from after the current one moved before it shifts the position +size, so `b` is still shown (:1490-1492)"},{pages:[`a`,`b`,`c`],ops:[{kind:`setPosition`,position:1},{kind:`reorder`,id:`a`,position:2}],opResults:[!0,!0],pageChanged:[],expected:{ids:[`b`,`c`,`a`],nPages:3,sizes:[1,1,1],snapPoints:[0,1,2],position:0,page:0},rule:"a page from before the current one moved after it shifts −size, so `b` is still shown (:1493-1495)"},{pages:[`a`,`b`,`c`],ops:[{kind:`setPosition`,position:1},{kind:`reorder`,id:`b`,position:2}],opResults:[!0,!0],pageChanged:[],expected:{ids:[`a`,`c`,`b`],nPages:3,sizes:[1,1,1],snapPoints:[0,1,2],position:2,page:2},rule:`moving the CURRENT page carries the position along with it (:1488-1489)`},{pages:[`a`,`b`,`c`],ops:[{kind:`reorder`,id:`a`,position:0}],opResults:[!1],pageChanged:[],expected:{ids:[`a`,`b`,`c`],nPages:3,sizes:[1,1,1],snapPoints:[0,1,2],position:0,page:0},rule:`reordering a page to where it already is returns before doing anything (:1439-1440)`},{pages:[`a`,`b`,`c`],ops:[{kind:`reorder`,id:`c`,position:-1}],opResults:[!1],pageChanged:[],expected:{ids:[`a`,`b`,`c`],nPages:3,sizes:[1,1,1],snapPoints:[0,1,2],position:0,page:0},rule:`moving the LAST page to the end is the second early-out, checked after normalisation (:1448-1449)`},{pages:[`a`,`b`,`c`],ops:[{kind:`scrollTo`,index:2}],opResults:[!0],pageChanged:[2],expected:{ids:[`a`,`b`,`c`],nPages:3,sizes:[1,1,1],snapPoints:[0,1,2],position:2,page:2},rule:"a completed scroll emits `page-changed` (:363-376)"},{pages:[`a`,`b`,`c`],ops:[{kind:`scrollTo`,index:1},{kind:`scrollTo`,index:1}],opResults:[!0,!0],pageChanged:[1,1],expected:{ids:[`a`,`b`,`c`],nPages:3,sizes:[1,1,1],snapPoints:[0,1,2],position:1,page:1},rule:`settling back onto the SAME page emits again — the web port’s index-change gate swallowed this`},{pages:[`a`,`b`,`c`],ops:[{kind:`scrollTo`,index:99},{kind:`scrollTo`,index:-1},{kind:`scrollTo`,index:1.5},{kind:`scrollTo`,index:NaN}],opResults:[!1,!1,!1,!1],pageChanged:[],expected:{ids:[`a`,`b`,`c`],nPages:3,sizes:[1,1,1],snapPoints:[0,1,2],position:0,page:0},rule:"out-of-range, fractional and NaN targets are REFUSED, not clamped — `get_nth_page` fails its precondition and `scroll_to` returns on the NULL widget (:1616, :385-386). NaN used to set the NS position to NaN"},{pages:[],ops:[{kind:`settle`}],opResults:[!0],pageChanged:[-1],expected:{ids:[],nPages:0,sizes:[],snapPoints:[],position:0,page:-1},rule:`an empty carousel reports index -1, the case the signal documents (:1150-1151) and neither port could produce`},{pages:[`a`,`b`,`c`],ops:[{kind:`setPosition`,position:.5},{kind:`settle`}],opResults:[!0,!0],pageChanged:[0],expected:{ids:[`a`,`b`,`c`],nPages:3,sizes:[1,1,1],snapPoints:[0,1,2],position:.5,page:0},rule:`settling half-way reports the LOWER page; both ports reported 1`}],u=[{pages:[`a`,`b`,`c`],ops:[{kind:`insert`,id:`d`,position:0}],expected:{ids:[`d`,`a`,`b`,`c`],nPages:4,sizes:[0,1,1,1],snapPoints:[-1,0,1,2],position:0,page:1},rule:"immediately after the insert the page has size 0 and a NEGATIVE snap point, and the carousel still shows `a` (:1385-1386, :782)"},{pages:[`a`,`b`,`c`],ops:[{kind:`setPosition`,position:1},{kind:`insert`,id:`d`,position:0},{kind:`size`,id:`d`,size:.5}],expected:{ids:[`d`,`a`,`b`,`c`],nPages:4,sizes:[.5,1,1,1],snapPoints:[-.5,.5,1.5,2.5],position:1.5,page:2},rule:"half-way through the reveal the position has moved half a page, so `b` has not slid sideways (`resize_animation_value_cb`, :284-297)"},{pages:[`a`,`b`,`c`],ops:[{kind:`setPosition`,position:1},{kind:`insert`,id:`d`,position:0},{kind:`reveal`,id:`d`}],expected:{ids:[`d`,`a`,`b`,`c`],nPages:4,sizes:[1,1,1,1],snapPoints:[0,1,2,3],position:2,page:2},rule:"once revealed the shift has moved a full page and `b` is still the current one"},{pages:[`a`,`b`,`c`],ops:[{kind:`setPosition`,position:2},{kind:`remove`,id:`b`}],expected:{ids:[`a`,`c`],nPages:2,sizes:[1,1,1],snapPoints:[0,1,2],position:2,page:1},rule:`a removed page leaves n-pages at once (:1522, :1640-1645) but keeps its geometry, so the pages after it have not moved yet`},{pages:[`a`,`b`,`c`],ops:[{kind:`setPosition`,position:2},{kind:`remove`,id:`b`},{kind:`size`,id:`b`,size:.5}],expected:{ids:[`a`,`c`],nPages:2,sizes:[1,.5,1],snapPoints:[0,.5,1.5],position:1.5,page:1},rule:"while it shrinks the position follows, keeping `c` on screen"},{pages:[`a`,`b`,`c`],ops:[{kind:`setPosition`,position:2},{kind:`remove`,id:`b`},{kind:`reveal`,id:`b`}],expected:{ids:[`a`,`c`],nPages:2,sizes:[1,1],snapPoints:[0,1],position:1,page:1},rule:"reaching size 0 drops the entry from the geometry entirely (`resize_animation_done_cb`, :309-313)"},{pages:[`a`,`b`],ops:[{kind:`insert`,id:`c`},{kind:`remove`,id:`c`}],expected:{ids:[`a`,`b`],nPages:2,sizes:[1,1],snapPoints:[0,1],position:0,page:0},rule:`removing a page that is still revealing frees it on the spot — the skip finishes the animation, which runs the done handler (:329-337 → :309-313)`},{pages:[`a`,`b`,`c`],ops:[{kind:`setPosition`,position:1},{kind:`remove`,id:`b`},{kind:`reveal`,id:`b`}],expected:{ids:[`a`,`c`],nPages:2,sizes:[1,1],snapPoints:[0,1],position:0,page:0},rule:"removing the CURRENT page shifts too — `update_shift_position_flag` counts removing children on purpose (:248-249)"}],d=[{property:`orientation`,value:`horizontal`,rule:`adw_carousel_init (:1205)`},{property:`interactive`,value:!0,rule:`AdwCarousel:interactive defaults TRUE (:1051-1054)`},{property:`allowScrollWheel`,value:!0,rule:`AdwCarousel:allow-scroll-wheel defaults TRUE (:1103-1106, :1201) — the web port defaulted it FALSE`},{property:`allowLongSwipes`,value:!1,rule:`AdwCarousel:allow-long-swipes defaults FALSE (:1115-1118) — one flick, one page`},{property:`spacing`,value:0,rule:`AdwCarousel:spacing defaults 0 (:1061-1066)`},{property:`revealDuration`,value:0,rule:`AdwCarousel:reveal-duration defaults 0 (:1127-1132, :1206)`}];export{r as CAROUSEL_CLAMP_VECTORS,a as CAROUSEL_NAVIGATE_VECTORS,i as CAROUSEL_PAGE_AT_POSITION_VECTORS,l as CAROUSEL_PAGE_LIST_VECTORS,d as CAROUSEL_PROPERTY_DEFAULT_VECTORS,n as CAROUSEL_RANGE_VECTORS,c as CAROUSEL_REORDER_SHIFT_VECTORS,u as CAROUSEL_REVEAL_VECTORS,t as CAROUSEL_SIZES_FROM_SNAP_POINTS_VECTORS,e as CAROUSEL_SNAP_POINT_VECTORS,s as CAROUSEL_WHEEL_LOCKOUT_VECTORS,o as CAROUSEL_WHEEL_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{name:`a group nobody has picked in`,members:[[`colour`,`red`],[`colour`,`green`]],steps:[],selected:[[`colour`,null]],emitted:[],rule:`reports nothing selected rather than defaulting to the first member — whether GTK activates one is not verifiable in this tree (refs/gtk is empty)`},{name:`the first pick`,members:[[`colour`,`red`],[`colour`,`green`]],steps:[{op:`select`,name:`colour`,value:`red`}],selected:[[`colour`,`red`]],emitted:[{name:`colour`,selected:`red`,deselected:null}],rule:"nothing held the selection, so `deselected` is null — the renderer has no second member to repaint"},{name:`a second pick deselects the first`,members:[[`colour`,`red`],[`colour`,`green`]],steps:[{op:`select`,name:`colour`,value:`red`},{op:`select`,name:`colour`,value:`green`}],selected:[[`colour`,`green`]],emitted:[{name:`colour`,selected:`red`,deselected:null},{name:`colour`,selected:`green`,deselected:`red`}],rule:"ONE notification carries both halves — this is the event the browser does not give the host element, which keeps a stale `checked` attribute otherwise"},{name:`picking the member already selected`,members:[[`colour`,`red`],[`colour`,`green`]],steps:[{op:`select`,name:`colour`,value:`red`},{op:`select`,name:`colour`,value:`red`}],selected:[[`colour`,`red`]],emitted:[{name:`colour`,selected:`red`,deselected:null}],rule:`idempotent: a user clicking a checked radio twice notifies once and stays checked — an HTML radio cannot be unchecked by clicking it either`},{name:`switching back`,members:[[`colour`,`red`],[`colour`,`green`]],steps:[{op:`select`,name:`colour`,value:`red`},{op:`select`,name:`colour`,value:`green`},{op:`select`,name:`colour`,value:`red`}],selected:[[`colour`,`red`]],emitted:[{name:`colour`,selected:`red`,deselected:null},{name:`colour`,selected:`green`,deselected:`red`},{name:`colour`,selected:`red`,deselected:`green`}],rule:`the deselected half is always the value that was held, never the first-ever one — a renderer that remembers the original loses the middle repaint`},{name:`two groups are independent`,members:[[`colour`,`red`],[`size`,`red`]],steps:[{op:`select`,name:`colour`,value:`red`},{op:`select`,name:`size`,value:`red`}],selected:[[`colour`,`red`],[`size`,`red`]],emitted:[{name:`colour`,selected:`red`,deselected:null},{name:`size`,selected:`red`,deselected:null}],rule:"the group NAME scopes exclusivity exactly as `name` does in HTML; the same VALUE in two groups is not a conflict, and neither deselects the other"}];export{e as RADIO_GROUP_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{params:{maximumSize:600,tighteningThreshold:400,childMin:0,childNat:1e3},lower:400,max:600,upper:1e3,rule:`the property defaults — a 200px tightening region reached at 1000px available`},{params:{maximumSize:600,tighteningThreshold:800,childMin:0,childNat:1e3},lower:600,max:600,upper:600,rule:`threshold ABOVE the maximum collapses the tightening region entirely`},{params:{maximumSize:600,tighteningThreshold:400,childMin:800,childNat:900},lower:800,max:800,upper:800,rule:`a child minimum above the maximum raises all three — the clamp cannot squeeze below the child's min`},{params:{maximumSize:0,tighteningThreshold:400,childMin:150,childNat:400},lower:150,max:150,upper:150,rule:`maximum-size 0 means "the child's own minimum", not "nothing"`},{params:{maximumSize:600,tighteningThreshold:400,childMin:500,childNat:700},lower:500,max:600,upper:800,rule:`a child minimum BETWEEN the threshold and the maximum shortens the tightening region`}],t={maximumSize:600,tighteningThreshold:400,childMin:0,childNat:1e3},n=[{forSize:-1,params:t,childSize:600,rule:`unconstrained: MIN (nat, ceil (max)) — the cap wins over a larger natural`},{forSize:-1,params:{maximumSize:600,tighteningThreshold:400,childMin:0,childNat:320},childSize:320,rule:`unconstrained: a natural below the cap wins over the cap`},{forSize:360,params:t,childSize:360,rule:`the phone case — a 360 DIP viewport gets a 360 DIP child, never a 600 DIP one`},{forSize:300,params:t,childSize:300,rule:`below the threshold the child gets it all`},{forSize:400,params:t,childSize:400,rule:"the `<= lower` boundary is inclusive"},{forSize:500,params:t,childSize:484,rule:`inside the tightening region: floor(lerp(400, 600, easeOutCubic(1/6)))`},{forSize:700,params:t,childSize:575,rule:`mid-region: easeOutCubic(0.5) = 0.875`},{forSize:800,params:t,childSize:592,rule:`late region — still short of the cap`},{forSize:1e3,params:t,childSize:600,rule:"at `upper` the child finally reaches the cap"},{forSize:1500,params:t,childSize:600,rule:"past `upper` nothing changes"},{forSize:800,params:{maximumSize:0,tighteningThreshold:400,childMin:150,childNat:400},childSize:150,rule:`maximum-size 0 — NOT 0 (what the browser port rendered) and NOT 600 (what the NS port substituted)`},{forSize:500,params:{maximumSize:600,tighteningThreshold:800,childMin:0,childNat:1e3},childSize:500,rule:`threshold above the maximum: everything below the cap passes straight through`},{forSize:900,params:{maximumSize:600,tighteningThreshold:800,childMin:0,childNat:1e3},childSize:600,rule:`threshold above the maximum: the cap applies with no easing at all`}],r=[{childSize:300,params:t,clampSize:300,rule:`below the threshold it is the identity`},{childSize:400,params:t,clampSize:400,rule:"the `<= lower` boundary is inclusive"},{childSize:450,params:t,clampSize:455,rule:`inverse ease: progress = 1 + cbrt(0.25 - 1), then ceil`},{childSize:500,params:t,clampSize:524,rule:`the mid-region inverse — 523.78 rounds UP where the forward direction rounds down`},{childSize:600,params:t,clampSize:1e3,rule:"a child at the cap needs the full `upper` to be reached"},{childSize:700,params:t,clampSize:1e3,rule:"a child ABOVE the cap still only ever reports `upper`"}],i=[{availableSize:300,params:t,childSize:300,childMaximum:600,lowerThreshold:400,sizeClass:`small`,offset:0,rule:"narrow: the child fills the clamp and is `small`"},{availableSize:400,params:t,childSize:400,childMaximum:600,lowerThreshold:400,sizeClass:`small`,offset:0,rule:"exactly at the lower threshold — `<=` keeps it `small`"},{availableSize:700,params:t,childSize:575,childMaximum:600,lowerThreshold:400,sizeClass:`medium`,offset:62,rule:"the tightening region is `medium`; the offset is C integer division, so 62.5 truncates"},{availableSize:1e3,params:t,childSize:600,childMaximum:600,lowerThreshold:400,sizeClass:`large`,offset:200,rule:"at the cap the child becomes `large`"},{availableSize:1500,params:t,childSize:600,childMaximum:600,lowerThreshold:400,sizeClass:`large`,offset:450,rule:`a very wide clamp only widens the margins`},{availableSize:800,params:{maximumSize:0,tighteningThreshold:400,childMin:150,childNat:400},childSize:150,childMaximum:150,lowerThreshold:150,sizeClass:`large`,offset:325,rule:"maximum-size 0: the child sits at its own minimum, and `>=` wins the tie so it is `large`"}],a=[{value:`600`,fallback:600,size:600,rule:`the ordinary case`},{value:`400`,fallback:600,size:400,rule:`an explicit narrower cap`},{value:`0`,fallback:600,size:0,rule:`"0" is IN RANGE — the browser port rendered max-width: 0px`},{value:0,fallback:600,size:0,rule:`numeric 0 likewise — the NS port silently substituted 600`},{value:`abc`,fallback:600,size:600,rule:`unparsable: the browser port assigned NaNpx and kept the old cap`},{value:``,fallback:600,size:600,rule:`an empty attribute is an unset property`},{value:null,fallback:600,size:600,rule:`an absent attribute is an unset property`},{value:void 0,fallback:400,size:400,rule:`the fallback is the PROPERTY default, not a constant 600`},{value:NaN,fallback:600,size:600,rule:`NaN is not an int GObject would accept`},{value:1/0,fallback:600,size:600,rule:`nor is Infinity`},{value:-5,fallback:600,size:0,rule:`below the range floor clamps to 0, it does not fall back`},{value:600.7,fallback:600,size:600,rule:`an int property truncates a fractional assignment`},{value:`420px`,fallback:600,size:420,rule:`a CSS-flavoured attribute still yields its number`}],o=[{input:{height:600,topMin:46,topNat:46,bottomMin:0,bottomNat:0,contentMin:200,extendContentToTopEdge:!1,extendContentToBottomEdge:!1},topBarHeight:46,bottomBarHeight:0,contentHeight:554,contentOffset:46,rule:`the ordinary case — one rigid header bar over the content`},{input:{height:100,topMin:46,topNat:46,bottomMin:30,bottomNat:30,contentMin:200,extendContentToTopEdge:!1,extendContentToBottomEdge:!1},topBarHeight:46,bottomBarHeight:30,contentHeight:24,contentOffset:46,rule:`squeezed below the content minimum: CLAMP(-130, 46, 46) keeps the BARS whole and shortens the content`},{input:{height:600,topMin:46,topNat:100,bottomMin:0,bottomNat:0,contentMin:200,extendContentToTopEdge:!1,extendContentToBottomEdge:!1},topBarHeight:100,bottomBarHeight:0,contentHeight:500,contentOffset:100,rule:`a STRETCHY top bar takes its natural height while there is room — CLAMP(400, 46, 100)`},{input:{height:230,topMin:46,topNat:100,bottomMin:0,bottomNat:0,contentMin:200,extendContentToTopEdge:!1,extendContentToBottomEdge:!1},topBarHeight:46,bottomBarHeight:0,contentHeight:184,contentOffset:46,rule:`and shrinks back to its minimum as the content's minimum claims the space — CLAMP(30, 46, 100)`},{input:{height:250,topMin:0,topNat:0,bottomMin:30,bottomNat:80,contentMin:200,extendContentToTopEdge:!1,extendContentToBottomEdge:!1},topBarHeight:0,bottomBarHeight:50,contentHeight:200,contentOffset:0,rule:`the same shrink on the BOTTOM bar, which is clamped against the top bar’s actual height`},{input:{height:600,topMin:46,topNat:46,bottomMin:0,bottomNat:0,contentMin:200,extendContentToTopEdge:!0,extendContentToBottomEdge:!1},topBarHeight:46,bottomBarHeight:0,contentHeight:600,contentOffset:0,rule:`extend-to-top: the content spans the full height and the bar overlays it`},{input:{height:600,topMin:46,topNat:46,bottomMin:30,bottomNat:30,contentMin:40,extendContentToTopEdge:!0,extendContentToBottomEdge:!0},topBarHeight:46,bottomBarHeight:30,contentHeight:600,contentOffset:0,rule:`both extends with a small content: MAX(40 - 46 - 30, 0) floors the reserved minimum at 0`}],s=[{input:{orientation:`vertical`,topMin:46,topNat:46,bottomMin:30,bottomNat:30,contentMin:200,contentNat:200,extendContentToTopEdge:!1,extendContentToBottomEdge:!1},minimum:276,natural:276,rule:`no extends: the three slots simply add up`},{input:{orientation:`vertical`,topMin:46,topNat:46,bottomMin:30,bottomNat:30,contentMin:200,contentNat:200,extendContentToTopEdge:!0,extendContentToBottomEdge:!1},minimum:230,natural:230,rule:`extend-to-top: the top bar is MAXed with the content, the bottom bar still added`},{input:{orientation:`vertical`,topMin:46,topNat:46,bottomMin:30,bottomNat:30,contentMin:200,contentNat:200,extendContentToTopEdge:!1,extendContentToBottomEdge:!0},minimum:246,natural:246,rule:`extend-to-bottom is the mirror image`},{input:{orientation:`vertical`,topMin:46,topNat:46,bottomMin:30,bottomNat:30,contentMin:50,contentNat:50,extendContentToTopEdge:!0,extendContentToBottomEdge:!0},minimum:76,natural:76,rule:`both extends: the bars are summed FIRST (they still cannot overlap) and MAXed as a pair`},{input:{orientation:`vertical`,topMin:46,topNat:60,bottomMin:30,bottomNat:30,contentMin:200,contentNat:300,extendContentToTopEdge:!1,extendContentToBottomEdge:!1},minimum:276,natural:390,rule:`minimum and natural are independent sums — a stretchy bar only moves the natural`},{input:{orientation:`horizontal`,topMin:360,topNat:360,bottomMin:100,bottomNat:100,contentMin:200,contentNat:200,extendContentToTopEdge:!1,extendContentToBottomEdge:!1},minimum:360,natural:360,rule:`horizontally the three slots overlap, so it is MAX and the extend flags do not matter`},{input:{orientation:`horizontal`,topMin:100,topNat:100,bottomMin:100,bottomNat:400,contentMin:200,contentNat:200,extendContentToTopEdge:!0,extendContentToBottomEdge:!0},minimum:200,natural:400,rule:`the horizontal form ignores the extend flags entirely`}],c=[{forSize:600,input:{extendContentToTopEdge:!1,extendContentToBottomEdge:!1,topMinHeight:46,topNatHeight:60,bottomMinHeight:30,bottomNatHeight:30},forSizeMin:524,forSizeNat:510,rule:`a stretchy top bar leaves the content two DIFFERENT heights to be measured against`},{forSize:600,input:{extendContentToTopEdge:!1,extendContentToBottomEdge:!1,topMinHeight:46,topNatHeight:46,bottomMinHeight:30,bottomNatHeight:30},forSizeMin:524,forSizeNat:524,rule:`rigid bars make the two coincide — which is why one value looked sufficient`},{forSize:600,input:{extendContentToTopEdge:!0,extendContentToBottomEdge:!1,topMinHeight:46,topNatHeight:60,bottomMinHeight:30,bottomNatHeight:30},forSizeMin:570,forSizeNat:570,rule:`a bar the content extends under costs it nothing`},{forSize:600,input:{extendContentToTopEdge:!0,extendContentToBottomEdge:!0,topMinHeight:46,topNatHeight:60,bottomMinHeight:30,bottomNatHeight:30},forSizeMin:600,forSizeNat:600,rule:`both extends: the content is measured against the whole view`}],l={topBarStyle:`flat`,bottomBarStyle:`flat`,extendContentToTopEdge:!1,extendContentToBottomEdge:!1},u=[{input:{...l,topBarHeight:46,bottomBarHeight:30},view:[`undershoot-top`,`undershoot-bottom`],topBar:[],bottomBar:[],rule:`flat bars with a height on both sides: the scroll fade appears under each`},{input:{...l,topBarHeight:0,bottomBarHeight:30},view:[`undershoot-bottom`],topBar:[],bottomBar:[],rule:`no top bar was allocated, so there is nothing for the content to fade under`},{input:{...l,topBarHeight:46,bottomBarHeight:0},view:[`undershoot-top`],topBar:[],bottomBar:[],rule:`the mirror case`},{input:{...l,extendContentToTopEdge:!0,topBarHeight:46,bottomBarHeight:30},view:[`undershoot-bottom`],topBar:[],bottomBar:[],rule:`content extending UNDER the bar has nothing to fade into`},{input:{...l,topBarStyle:`raised`,topBarHeight:46,bottomBarHeight:30},view:[`undershoot-bottom`],topBar:[`raised`],bottomBar:[],rule:`a raised bar carries its own shadow, so it suppresses the undershoot`},{input:{...l,topBarStyle:`raised-border`,topBarHeight:46,bottomBarHeight:0},view:[],topBar:[`raised`,`border`],bottomBar:[],rule:`raised-border is raised PLUS border — the border replaces the SHADOW, not the background`},{input:{topBarStyle:`raised`,bottomBarStyle:`raised-border`,extendContentToTopEdge:!1,extendContentToBottomEdge:!0,topBarHeight:46,bottomBarHeight:30},view:[],topBar:[`raised`],bottomBar:[`raised`,`border`],rule:`the two bars are styled independently`}],d=[{width:16,height:16,radius:8,diameter:16,lineWidth:2,centerX:8,centerY:8,legacyWebLineWidth:2,rule:`the measured minimum, and the documented "2px for 16px" — the one size both agreed on`},{width:24,height:24,radius:12,diameter:24,lineWidth:3,centerX:12,centerY:12,legacyWebLineWidth:2,rule:`the browser element drew 2px here`},{width:48,height:48,radius:24,diameter:48,lineWidth:6,centerX:24,centerY:24,legacyWebLineWidth:4,rule:`the storybook default size — the browser element drew 4px`},{width:64,height:64,radius:32,diameter:64,lineWidth:8,centerX:32,centerY:32,legacyWebLineWidth:5,rule:`exactly at MAX_RADIUS — the largest ring Adwaita draws`},{width:200,height:200,radius:32,diameter:64,lineWidth:8,centerX:100,centerY:100,legacyWebLineWidth:17,rule:`the ring is capped at 64 but stays CENTRED in the oversized box`},{width:100,height:40,radius:20,diameter:40,lineWidth:5,centerX:50,centerY:20,legacyWebLineWidth:null,rule:`the SHORTER side decides the radius; the centre follows the box on both axes`},{width:31,height:31,radius:15,diameter:30,lineWidth:3.75,centerX:16,centerY:16,legacyWebLineWidth:3,rule:`floorf(15.5) = 15, so an odd box draws a 30px ring — and the line width is fractional`},{width:12,height:12,radius:6,diameter:12,lineWidth:1.5,centerX:6,centerY:6,legacyWebLineWidth:2,rule:`below the measured minimum the geometry is still defined — which is why resolveSpinnerSize exists`}],f=[{value:48,size:48,rule:`an explicit size above the minimum is honoured`},{value:`24`,size:24,rule:`read off an attribute`},{value:16,size:16,rule:`exactly the minimum`},{value:`8`,size:16,rule:`below the minimum is not representable — the browser element rendered 8px`},{value:0,size:16,rule:`zero likewise — the browser element rendered a 0×0 box with a 2px border`},{value:-5,size:16,rule:`and a negative`},{value:null,size:16,rule:`unset falls back to the measured NATURAL, which equals the minimum`},{value:void 0,size:16,rule:`so does an absent property`},{value:``,size:16,rule:`and an empty attribute`},{value:`abc`,size:16,rule:`and an unparsable one`},{value:NaN,size:16,rule:`NaN is not a size`},{value:200,size:200,rule:`an oversized box stays oversized — spinnerGeometry caps the RING, not the box`}];export{i as CLAMP_ALLOCATE_VECTORS,n as CLAMP_CHILD_SIZE_VECTORS,a as CLAMP_PROPERTY_VECTORS,r as CLAMP_SIZE_FROM_CHILD_VECTORS,e as CLAMP_THRESHOLD_VECTORS,d as SPINNER_GEOMETRY_VECTORS,f as SPINNER_SIZE_VECTORS,o as TOOLBAR_VIEW_ALLOCATE_VECTORS,u as TOOLBAR_VIEW_CLASS_VECTORS,c as TOOLBAR_VIEW_CONTENT_FOR_SIZE_VECTORS,s as TOOLBAR_VIEW_MEASURE_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{name:`no columns`,columns:[],tracks:[],template:``,rule:`an empty column list derives an empty template, not a stray separator`},{name:`the statement default`,columns:[{key:`position`},{key:`total`,numeric:!0}],tracks:[{kind:`slack`},{kind:`auto`}],template:`minmax(0px, 1fr) auto`,rule:`nothing declared anywhere: column 0 absorbs the slack so the figures hug the right edge`},{name:`a lone column`,columns:[{key:`position`}],tracks:[{kind:`slack`}],template:`minmax(0px, 1fr)`,rule:`the slack rule keys on index 0, so a single column is the slack column`},{name:`flex and width together`,columns:[{key:`a`,flex:2},{key:`b`,width:`80px`}],tracks:[{kind:`flex`,weight:2},{kind:`fixed`,css:`80px`}],template:`2fr 80px`,rule:`width pins, flex weights — each on its own column`},{name:`one explicit size turns the slack rule off`,columns:[{key:`a`},{key:`b`,width:`80px`}],tracks:[{kind:`auto`},{kind:`fixed`,css:`80px`}],template:`auto 80px`,rule:`column 0 is content-sized here, NOT slack — pinning one column must not leave an implicit flexible one`},{name:`width wins over flex on the same column`,columns:[{key:`a`,width:`120px`,flex:3}],tracks:[{kind:`fixed`,css:`120px`}],template:`120px`,rule:`the two are checked in order; a column declaring both is pinned, not weighted`},{name:`a non-px unit stays unparsed`,columns:[{key:`a`,width:`6rem`},{key:`b`}],tracks:[{kind:`fixed`,css:`6rem`},{kind:`auto`}],template:`6rem auto`,rule:`the fixed track carries the CSS text verbatim — resolving the unit is the renderer's problem, not the derivation's`},{name:`a zero weight`,columns:[{key:`a`,flex:0},{key:`b`,flex:1}],tracks:[{kind:`flex`,weight:0},{kind:`flex`,weight:1}],template:`0fr 1fr`,rule:`flex 0 is a declared size (it collapses the column), so it counts as explicit and is passed through`}],t=[{name:`a plain column`,column:{key:`position`},align:`start`,classes:[`adw-data-grid-cell`,`align-start`],rule:`the default is start — labels read left`},{name:`a numeric column`,column:{key:`total`,numeric:!0},align:`end`,classes:[`adw-data-grid-cell`,`align-end`,`numeric`],rule:`numeric right-aligns AND asks for tabular figures (_labels.scss:86-88)`},{name:`an explicit align beats the numeric default`,column:{key:`total`,numeric:!0,align:`start`},align:`start`,classes:[`adw-data-grid-cell`,`align-start`,`numeric`],rule:`align is the property, numeric only supplies its default`},{name:`a monospace column`,column:{key:`code`,monospace:!0},align:`start`,classes:[`adw-data-grid-cell`,`align-start`,`mono`],rule:`monospace does NOT imply right alignment — an account code reads left`},{name:`numeric and monospace stack`,column:{key:`amount`,numeric:!0,monospace:!0},align:`end`,classes:[`adw-data-grid-cell`,`align-end`,`numeric`,`mono`],rule:`both classes, numeric first — the two are independent opt-ins`},{name:`centered`,column:{key:`flag`,align:`center`},align:`center`,classes:[`adw-data-grid-cell`,`align-center`],rule:`the third alignment reaches the class list unchanged`},{name:`an alignment outside the union`,column:{key:`x`,align:`middle`},align:`middle`,classes:[`adw-data-grid-cell`,`align-middle`],rule:`NOT clamped: an unknown alignment yields a class no stylesheet claims, so the base rule wins`}],n=[{input:`normal`,variant:`normal`,rule:`the explicit default`},{input:`section`,variant:`section`,rule:`a spanning group title`},{input:`subtotal`,variant:`subtotal`,rule:`bold with a hairline rule above`},{input:`total`,variant:`total`,rule:`bold with a stronger rule above`},{input:void 0,variant:`normal`,rule:`absent — the overwhelmingly common case`},{input:`bogus`,variant:`normal`,rule:`an unknown string falls back rather than picking no emphasis`},{input:`Section`,variant:`normal`,rule:`the set is case-sensitive, like every other Adwaita enum spelling`},{input:0,variant:`normal`,rule:`a non-string is rejected by the typeof guard before the set lookup`},{input:null,variant:`normal`,rule:`null likewise — typeof null is object`}],r=[{input:`120.000,00 €`,text:`120.000,00 €`,rule:`a pre-formatted string passes through untouched`},{input:3,text:`3`,rule:`a number is stringified, not formatted`},{input:0,text:`0`,rule:`zero is a figure — a truthiness test would blank it`},{input:!1,text:`false`,rule:`likewise false: only undefined and null are empty`},{input:``,text:``,rule:`an empty string stays empty`},{input:void 0,text:``,rule:`a missing key paints nothing, not the word undefined`},{input:null,text:``,rule:`null reaches this from JSON and is the other empty`}],i=[{variant:`normal`,rowFlag:void 0,gridInteractive:!1,interactive:!1,rule:`the default grid is inert — a statement is not a list`},{variant:`normal`,rowFlag:void 0,gridInteractive:!0,interactive:!0,rule:`the grid-level flag opts every plain data row in`},{variant:`normal`,rowFlag:!0,gridInteractive:!1,interactive:!0,rule:`a row opts ITSELF in without the grid flag`},{variant:`normal`,rowFlag:!1,gridInteractive:!0,interactive:!1,rule:`and opts itself OUT of an interactive grid — the direction a single || loses`},{variant:`section`,rowFlag:!0,gridInteractive:!0,interactive:!1,rule:`a section title spans the columns and has no record behind it`},{variant:`subtotal`,rowFlag:!0,gridInteractive:!0,interactive:!1,rule:`a subtotal is computed from the rows above it`},{variant:`total`,rowFlag:!0,gridInteractive:!0,interactive:!1,rule:`so is the total — the variant gate runs before either flag`},{variant:`normal`,rowFlag:`yes`,gridInteractive:!0,interactive:!0,rule:`a value that is neither boolean defers to the grid instead of being read as truthy`},{variant:`normal`,rowFlag:`yes`,gridInteractive:!1,interactive:!1,rule:`the same value with the grid inert — proof it deferred rather than opted in`}],a=[{name:`not an array`,input:{key:`a`},columns:[],rule:`a bare object is not a column list — the attribute parsed, the shape did not`},{name:`undefined`,input:void 0,columns:[],rule:`the no-attribute path lands here too`},{name:`entries without a key`,input:[{label:`A`},null,`b`,{key:`ok`}],columns:[{key:`ok`,label:void 0,align:void 0,width:void 0,flex:void 0,monospace:!1,numeric:!1}],rule:`no key means nothing to read off a row, so the entry is dropped — malformed neighbours do not take the list down`},{name:`key and label coerced`,input:[{key:3,label:0}],columns:[{key:`3`,label:`0`,align:void 0,width:void 0,flex:void 0,monospace:!1,numeric:!1}],rule:`both are stringified, so a numeric key still matches a numeric row key after JSON`},{name:`a numeric width`,input:[{key:`a`,width:80}],columns:[{key:`a`,label:void 0,align:void 0,width:`80`,flex:void 0,monospace:!1,numeric:!1}],rule:`width is CSS text, so a number becomes "80" — which is NOT a valid CSS length, and stays the author's problem`},{name:`a non-numeric flex`,input:[{key:`a`,flex:`2`}],columns:[{key:`a`,label:void 0,align:void 0,width:void 0,flex:void 0,monospace:!1,numeric:!1}],rule:`flex is dropped rather than coerced — "2fr" built from a string is one typo away from an invalid template`},{name:`the two flags are strict`,input:[{key:`a`,numeric:`true`,monospace:1}],columns:[{key:`a`,label:void 0,align:void 0,width:void 0,flex:void 0,monospace:!1,numeric:!1}],rule:`=== true, so a truthy non-boolean does not silently right-align a text column`}];export{r as DATA_GRID_CELL_TEXT_VECTORS,t as DATA_GRID_COLUMN_CLASS_VECTORS,a as DATA_GRID_COLUMN_NORMALIZE_VECTORS,i as DATA_GRID_INTERACTIVE_VECTORS,e as DATA_GRID_TRACK_VECTORS,n as DATA_GRID_VARIANT_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const e=[{source:`dimming`,open:!0,canClose:!0,outcome:`close`,rule:`a scrim click on an unlocked open sheet closes it`,derivedFrom:`released_cb, adw-bottom-sheet.c:236-240`},{source:`dimming`,open:!0,canClose:!1,outcome:`close-attempt`,rule:`a locked sheet SIGNALS the scrim click instead of swallowing it`,derivedFrom:`released_cb, adw-bottom-sheet.c:237-238`},{source:`dimming`,open:!1,canClose:!0,outcome:`ignored`,rule:`the scrim is not an event target while the sheet is closed, so nothing happens and nothing is signalled`,derivedFrom:`gtk_widget_set_can_target (self->dimming, open), adw-bottom-sheet.c:1148 + 1692`},{source:`dimming`,open:!1,canClose:!1,outcome:`ignored`,rule:`unreachable-while-closed beats the can-close signal — a locked CLOSED sheet says nothing`,derivedFrom:`adw-bottom-sheet.c:1692 (reachability) before released_cb:237`},{source:`escape`,open:!0,canClose:!0,outcome:`close`,rule:`Escape closes an unlocked open sheet`,derivedFrom:`maybe_close_cb, adw-bottom-sheet.c:393-395`},{source:`escape`,open:!0,canClose:!1,outcome:`close-attempt`,rule:`Escape on a locked sheet signals`,derivedFrom:`maybe_close_cb, adw-bottom-sheet.c:398`},{source:`escape`,open:!1,canClose:!0,outcome:`close-attempt`,rule:`THE SURPRISING ONE: Escape on a closed-but-focused sheet still signals, because the emit is the fallthrough for every case that is not (can_close && open). The sheet bin stays focusable while it shows a bottom bar. Both ports returned nothing here`,derivedFrom:`maybe_close_cb, adw-bottom-sheet.c:393-399`},{source:`escape`,open:!1,canClose:!1,outcome:`close-attempt`,rule:`the fallthrough covers this corner too`,derivedFrom:`maybe_close_cb, adw-bottom-sheet.c:398`},{source:`close-button`,open:!0,canClose:!0,outcome:`close`,rule:`the sheet.close action closes an unlocked open sheet`,derivedFrom:`sheet_close_cb, adw-bottom-sheet.c:377-380`},{source:`close-button`,open:!0,canClose:!1,outcome:`close-attempt`,rule:`can_close is tested FIRST, before the open check`,derivedFrom:`sheet_close_cb, adw-bottom-sheet.c:372-375`},{source:`close-button`,open:!1,canClose:!0,outcome:`delegate`,rule:`sheet.close on an already-closed sheet forwards the action to the PARENT (a sheet inside a sheet closes the outer one) rather than doing nothing`,derivedFrom:`sheet_close_cb, adw-bottom-sheet.c:382-385`},{source:`close-button`,open:!1,canClose:!1,outcome:`close-attempt`,rule:`a locked sheet never reaches the delegation branch — the can_close guard returns first`,derivedFrom:`sheet_close_cb, adw-bottom-sheet.c:372-375`},{source:`drag-handle`,open:!0,canClose:!0,outcome:`ignored`,rule:`THE SHARED MISTAKE: the drag handle is not an event target in libadwaita, so it closes nothing. Both ports had wired it to close the sheet`,derivedFrom:`gtk_widget_set_can_focus/can_target (self->drag_handle, FALSE), adw-bottom-sheet.c:1197-1198`},{source:`drag-handle`,open:!0,canClose:!1,outcome:`ignored`,rule:`not a can-close question at all — a decorative widget cannot attempt anything`,derivedFrom:`adw-bottom-sheet.c:1197-1198`},{source:`drag-handle`,open:!1,canClose:!0,outcome:`ignored`,rule:`its only behavioural role is elsewhere: allow_mouse_drag = show_drag_handle || bottom_bar`,derivedFrom:`adw-bottom-sheet.c:1197-1198 + update_swipe_tracker:455-457`},{source:`swipe`,open:!0,canClose:!0,outcome:`close`,rule:`a downward swipe past the midpoint closes an unlocked open sheet`,derivedFrom:`prepare_cb adw-bottom-sheet.c:1050 → end_swipe_cb adw-bottom-sheet.c:1099-1103`},{source:`swipe`,open:!0,canClose:!1,outcome:`ignored`,rule:`a locked sheet swallows the swipe SILENTLY — prepare_cb refuses to detect it, so unlike the scrim and Escape there is no close-attempt`,derivedFrom:`prepare_cb, adw-bottom-sheet.c:1050-1051`},{source:`swipe`,open:!1,canClose:!0,outcome:`ignored`,rule:`a swipe on a closed sheet is an OPEN gesture (gated by can-open), never a close one`,derivedFrom:`prepare_cb, adw-bottom-sheet.c:1052-1053`}];function runBottomSheetSteps(e,t){let n=[];for(let r of t)switch(r.kind){case`setOpen`:e.setOpen(r.open);break;case`setCanClose`:e.setCanClose(r.canClose);break;case`requestClose`:n.push(e.requestClose(r.source));break}return n}const t=[{steps:[],outcomes:[],notifications:[],callbacks:[],open:!1,hasBeenOpen:!1,rule:`a fresh sheet is closed, unlocked and has never been open`,derivedFrom:`adw_bottom_sheet_init adw-bottom-sheet.c:1125-1133 + the open pspec default at :852-855`},{steps:[{kind:`setOpen`,open:!0}],outcomes:[],notifications:[!0],callbacks:[],open:!0,hasBeenOpen:!0,rule:`opening notifies once and latches has_been_open`,derivedFrom:`adw-bottom-sheet.c:1684-1689 + the notify at :1777`},{steps:[{kind:`setOpen`,open:!0},{kind:`setOpen`,open:!0}],outcomes:[],notifications:[!0],callbacks:[],open:!0,hasBeenOpen:!0,rule:`setting the current value again is a no-op — no second notification`,derivedFrom:`adw-bottom-sheet.c:1672-1682`},{steps:[{kind:`setOpen`,open:!1}],outcomes:[],notifications:[],callbacks:[`closing`,`closed`],open:!1,hasBeenOpen:!1,rule:`THE REPLAY: closing a sheet that was NEVER open changes nothing and notifies nothing, but still fires closing+closed — this is how a dialog dismissed before it ever animated in gets torn down`,derivedFrom:`adw-bottom-sheet.c:1672-1682`},{steps:[{kind:`setOpen`,open:!0},{kind:`setOpen`,open:!1},{kind:`setOpen`,open:!1}],outcomes:[],notifications:[!0,!1],callbacks:[`closing`],open:!1,hasBeenOpen:!0,rule:`once has_been_open is set the replay branch is skipped: the third call fires NOTHING`,derivedFrom:`adw-bottom-sheet.c:1673 (the !has_been_open guard) + :1689`},{steps:[{kind:`setCanClose`,canClose:!1},{kind:`setOpen`,open:!0},{kind:`setOpen`,open:!1}],outcomes:[],notifications:[!0,!1],callbacks:[`closing`],open:!1,hasBeenOpen:!0,rule:`can-close does NOT gate the programmatic path — "Bottom sheet can still be closed using [property@BottomSheet:open]"`,derivedFrom:`adw_bottom_sheet_set_open adw-bottom-sheet.c:1661-1778 (never reads can_close) + the doc at :2071`},{steps:[{kind:`setOpen`,open:!0},{kind:`requestClose`,source:`dimming`}],outcomes:[`close`],notifications:[!0,!1],callbacks:[`closing`],open:!1,hasBeenOpen:!0,rule:`an accepted dismissal runs the same close path as the programmatic one`,derivedFrom:`released_cb adw-bottom-sheet.c:239 → adw_bottom_sheet_set_open`},{steps:[{kind:`setOpen`,open:!0},{kind:`setCanClose`,canClose:!1},{kind:`requestClose`,source:`dimming`},{kind:`requestClose`,source:`escape`},{kind:`requestClose`,source:`swipe`}],outcomes:[`close-attempt`,`close-attempt`,`ignored`],notifications:[!0],callbacks:[],open:!0,hasBeenOpen:!0,rule:`a locked sheet signals the scrim and Escape but swallows the swipe — three affordances, two different answers`,derivedFrom:`released_cb:237-238 + maybe_close_cb:398 + prepare_cb:1050-1051`},{steps:[{kind:`setOpen`,open:!0},{kind:`requestClose`,source:`drag-handle`}],outcomes:[`ignored`],notifications:[!0],callbacks:[],open:!0,hasBeenOpen:!0,rule:`REGRESSION PIN: tapping the drag handle leaves an open sheet open. Both ports closed it here`,derivedFrom:`adw-bottom-sheet.c:1197-1198`},{steps:[{kind:`setOpen`,open:!0},{kind:`setOpen`,open:!1},{kind:`requestClose`,source:`escape`},{kind:`requestClose`,source:`close-button`}],outcomes:[`close-attempt`,`delegate`],notifications:[!0,!1],callbacks:[`closing`],open:!1,hasBeenOpen:!0,rule:`REGRESSION PIN: on a closed sheet Escape still signals and sheet.close delegates upward — neither port did either`,derivedFrom:`maybe_close_cb:393-399 + sheet_close_cb:382-385`},{steps:[{kind:`setOpen`,open:!0},{kind:`setCanClose`,canClose:!1},{kind:`requestClose`,source:`escape`},{kind:`setCanClose`,canClose:!0},{kind:`requestClose`,source:`escape`}],outcomes:[`close-attempt`,`close`],notifications:[!0,!1],callbacks:[`closing`],open:!1,hasBeenOpen:!0,rule:`unlocking mid-life makes the same affordance start closing`,derivedFrom:`adw_bottom_sheet_set_can_close adw-bottom-sheet.c:2076-2091`}];export{e as BOTTOM_SHEET_CLOSE_VECTORS,t as BOTTOM_SHEET_PRESENTATION_VECTORS,runBottomSheetSteps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{text:``,length:0,rule:`an empty entry has no characters`},{text:`Ada`,length:3,rule:`ASCII, one unit per character`},{text:`Ada Lovelace`,length:12,rule:`the space counts too`},{text:`Grüße`,length:5,rule:`precomposed Latin-1 letters are one character each`},{text:`🔒é`,length:2,rule:`'🔒é'.length is 3 in JS — the correct answer is 2 characters`},{text:`日本語`,length:3,rule:`CJK is one character per code point`},{text:`👩💻`,length:3,rule:`a ZWJ sequence is three code points — g_utf8_strlen counts characters, not graphemes`}],t=[{text:`Ada Lovelace`,maxLength:5,clamped:`Ada L`,length:5,rule:`truncate to five characters`},{text:`Ada`,maxLength:5,clamped:`Ada`,length:3,rule:`shorter than the limit is untouched`},{text:`Ada Lovelace`,maxLength:0,clamped:`Ada Lovelace`,length:12,rule:`0 means UNLIMITED, never "truncate to empty"`},{text:`🔒é🔑`,maxLength:2,clamped:`🔒é`,length:2,rule:`characters, not units — slice(0,2) would yield the lone high surrogate '\\uD83D'`},{text:`Grüße`,maxLength:3,clamped:`Grü`,length:3,rule:`non-ASCII truncation stays on character boundaries`},{text:`Ada`,maxLength:3,clamped:`Ada`,length:3,rule:`exactly at the limit is untouched`}],n=[{name:`a fresh row is empty, with a visible sensitive pencil`,steps:[],expected:{text:``,textLength:0,empty:!0,editing:!1,editable:!0,textChanged:!1,editIconVisible:!0,editIconSensitive:!0,indicatorVisible:!1,applyButtonVisible:!1,emptyTarget:0},rule:`update_empty C:147-161 over the init defaults + C:764-765 (indicator/apply start hidden)`},{name:`focusing an empty row leaves the empty state and hides the pencil`,steps:[{op:`setEditing`,value:!0}],expected:{text:``,textLength:0,empty:!1,editing:!0,editable:!0,textChanged:!1,editIconVisible:!1,editIconSensitive:!0,indicatorVisible:!1,applyButtonVisible:!1,emptyTarget:1},rule:"C:154 the `!(focused && editable)` term — the placeholder title shrinks on focus even with no text; C:149 hides the pencil"},{name:`focusing a NON-editable row keeps the empty state, pencil visible but insensitive`,steps:[{op:`setEditable`,value:!1},{op:`setEditing`,value:!0}],expected:{text:``,textLength:0,empty:!0,editing:!0,editable:!1,textChanged:!1,editIconVisible:!0,editIconSensitive:!1,indicatorVisible:!1,applyButtonVisible:!1,emptyTarget:0},rule:"C:154 `!(focused && editable)` survives focus when editable is FALSE; C:149 `(!editing || !editable)` keeps the icon; C:150 desensitizes it"},{name:`typing while unfocused fills the row`,steps:[{op:`setText`,value:`Ada`}],expected:{text:`Ada`,textLength:3,empty:!1,editing:!1,editable:!0,textChanged:!1,editIconVisible:!0,editIconSensitive:!0,indicatorVisible:!1,applyButtonVisible:!1,emptyTarget:1},rule:"C:147 `empty = length == 0`; the latch at C:170 does not fire because editing is false"},{name:`apply button armed + focused + edited reveals the apply button`,steps:[{op:`setShowApplyButton`,value:!0},{op:`setEditing`,value:!0},{op:`setText`,value:`A`}],expected:{text:`A`,textLength:1,empty:!1,editing:!0,editable:!0,textChanged:!0,editIconVisible:!1,editIconSensitive:!0,indicatorVisible:!1,applyButtonVisible:!0,emptyTarget:1},rule:`text_changed_cb C:170-171 latches, C:152 shows the apply button, C:149 hides the pencil behind it`},{name:`an edit while UNFOCUSED never arms the apply button`,steps:[{op:`setShowApplyButton`,value:!0},{op:`setText`,value:`A`}],expected:{text:`A`,textLength:1,empty:!1,editing:!1,editable:!0,textChanged:!1,editIconVisible:!0,editIconSensitive:!0,indicatorVisible:!1,applyButtonVisible:!1,emptyTarget:1},rule:"C:170 — the latch requires `editing`, so a programmatic set on an unfocused row reveals nothing"},{name:`editing without the apply property still hides the pencil on focus`,steps:[{op:`setShowApplyButton`,value:!1},{op:`setEditing`,value:!0},{op:`setText`,value:`A`}],expected:{text:`A`,textLength:1,empty:!1,editing:!0,editable:!0,textChanged:!1,editIconVisible:!1,editIconSensitive:!0,indicatorVisible:!1,applyButtonVisible:!1,emptyTarget:1},rule:`C:170 no latch without the property; C:149 the pencil still hides on focus, independently of the apply button`},{name:"a read-only row still latches — `editable` is not a latch input",steps:[{op:`setShowApplyButton`,value:!0},{op:`setEditable`,value:!1},{op:`setEditing`,value:!0},{op:`setText`,value:`A`}],expected:{text:`A`,textLength:1,empty:!1,editing:!0,editable:!1,textChanged:!0,editIconVisible:!1,editIconSensitive:!1,indicatorVisible:!1,applyButtonVisible:!0,emptyTarget:1},rule:"C:170 tests only `show_apply_button && editing`; C:149 `!text_changed` alone hides the pencil, C:150 keeps it insensitive"},{name:`applying clears the latch and puts the apply button away`,steps:[{op:`setShowApplyButton`,value:!0},{op:`setEditing`,value:!0},{op:`setText`,value:`A`},{op:`apply`}],expected:{text:`A`,textLength:1,empty:!1,editing:!0,editable:!0,textChanged:!1,editIconVisible:!1,editIconSensitive:!0,indicatorVisible:!1,applyButtonVisible:!1,emptyTarget:1},rule:`apply_button_clicked_cb C:237-238 — and the pencil stays hidden because the row is still focused (C:149)`},{name:`turning the apply property off RETRACTS a pending apply`,steps:[{op:`setShowApplyButton`,value:!0},{op:`setEditing`,value:!0},{op:`setText`,value:`A`},{op:`setShowApplyButton`,value:!1}],expected:{text:`A`,textLength:1,empty:!1,editing:!0,editable:!0,textChanged:!1,editIconVisible:!1,editIconSensitive:!0,indicatorVisible:!1,applyButtonVisible:!1,emptyTarget:1},rule:"C:989-992 `if (!show_apply_button && text_changed) { text_changed = FALSE; update_empty (self); }`"},{name:`an emptied row with a pending apply is NOT in the empty state after blur`,steps:[{op:`setShowApplyButton`,value:!0},{op:`setEditing`,value:!0},{op:`setText`,value:`A`},{op:`setText`,value:``},{op:`setEditing`,value:!1}],expected:{text:``,textLength:0,empty:!1,editing:!1,editable:!0,textChanged:!0,editIconVisible:!1,editIconSensitive:!0,indicatorVisible:!1,applyButtonVisible:!0,emptyTarget:1},rule:"C:154 the THIRD term `&& !priv->text_changed` — the corner both ports would get wrong by hand"},{name:`the indicator stays hidden while the row is unfocused`,steps:[{op:`setShowIndicator`,value:!0}],expected:{text:``,textLength:0,empty:!0,editing:!1,editable:!0,textChanged:!1,editIconVisible:!0,editIconSensitive:!0,indicatorVisible:!1,applyButtonVisible:!1,emptyTarget:0},rule:"C:151 `gtk_widget_set_child_visible (priv->indicator, priv->editing && priv->show_indicator)`"},{name:`the indicator appears once the row takes focus`,steps:[{op:`setShowIndicator`,value:!0},{op:`setEditing`,value:!0}],expected:{text:``,textLength:0,empty:!1,editing:!0,editable:!0,textChanged:!1,editIconVisible:!1,editIconSensitive:!0,indicatorVisible:!0,applyButtonVisible:!1,emptyTarget:1},rule:`C:151 — the second half of the caps-lock suppression rule`},{name:`max-length truncates the text that is set into it`,steps:[{op:`setMaxLength`,value:5},{op:`setText`,value:`Ada Lovelace`}],expected:{text:`Ada L`,textLength:5,empty:!1,editing:!1,editable:!0,textChanged:!1,editIconVisible:!0,editIconSensitive:!0,indicatorVisible:!1,applyButtonVisible:!1,emptyTarget:1},rule:`C:1329-1343 + the "Maximum number of characters" property doc (C:674)`},{name:`lowering max-length truncates the text already there`,steps:[{op:`setText`,value:`Ada Lovelace`},{op:`setMaxLength`,value:5}],expected:{text:`Ada L`,textLength:5,empty:!1,editing:!1,editable:!0,textChanged:!1,editIconVisible:!0,editIconSensitive:!0,indicatorVisible:!1,applyButtonVisible:!1,emptyTarget:1},rule:`the buffer cannot hold more than the maximum (C:674, :678-682) — the truncation goes through the same changed→update_empty path`},{name:`max-length 0 is unlimited`,steps:[{op:`setMaxLength`,value:0},{op:`setText`,value:`Ada Lovelace`}],expected:{text:`Ada Lovelace`,textLength:12,empty:!1,editing:!1,editable:!0,textChanged:!1,editIconVisible:!0,editIconSensitive:!0,indicatorVisible:!1,applyButtonVisible:!1,emptyTarget:1},rule:"C:678-682 — the range floor AND the default are both 0, and adw-entry-row.ui sets `max-length 0` on the GtkText"},{name:`a filled read-only row keeps the pencil, insensitive`,steps:[{op:`setEditable`,value:!1},{op:`setText`,value:`Ada`},{op:`setEditing`,value:!0}],expected:{text:`Ada`,textLength:3,empty:!1,editing:!0,editable:!1,textChanged:!1,editIconVisible:!0,editIconSensitive:!1,indicatorVisible:!1,applyButtonVisible:!1,emptyTarget:1},rule:`C:149-150 — visibility and sensitivity are two separate outputs and disagree here`}],r=[{name:`Enter applies when the apply button is showing`,steps:[{op:`setShowApplyButton`,value:!0},{op:`setEditing`,value:!0},{op:`setText`,value:`A`}],activation:{signal:`apply`},textChangedAfter:!1,rule:"C:248-249 — `apply` is emitted, `entry-activated` is NOT"},{name:`Enter emits entry-activated when there is nothing to apply`,steps:[{op:`setText`,value:`A`}],activation:{signal:`entry-activated`,activateDefault:!1},textChangedAfter:!1,rule:"C:250-256 — `apply` is NOT emitted; activates-default defaults to FALSE (C:654-657)"},{name:`Enter activates the default widget FIRST when activates-default is set`,steps:[{op:`setActivatesDefault`,value:!0},{op:`setText`,value:`A`}],activation:{signal:`entry-activated`,activateDefault:!0},textChangedAfter:!1,rule:`C:253-256 — gtk_widget_activate_default on line 254, g_signal_emit on line 256: the default runs BEFORE the signal`},{name:`Enter on an untouched empty row still emits entry-activated`,steps:[],activation:{signal:`entry-activated`,activateDefault:!1},textChangedAfter:!1,rule:`C:243-266 has no content guard — Enter always resolves to exactly one of the two signals`},{name:`Enter with the apply property armed but nothing typed emits entry-activated`,steps:[{op:`setShowApplyButton`,value:!0},{op:`setEditing`,value:!0}],activation:{signal:`entry-activated`,activateDefault:!1},textChangedAfter:!1,rule:`C:248 branches on the apply button being CHILD-VISIBLE (i.e. the latch), not on the property`}],i=[{name:`setShowApplyButton early-outs on an unchanged value`,steps:[{op:`setShowApplyButton`,value:!0},{op:`setShowApplyButton`,value:!0}],returns:[!0,!1],notifications:0,rule:`C:982-985 — and arming the button re-derives NOTHING, so the C only calls update_empty in the retract branch (C:989-992)`},{name:`setShowIndicator does NOT early-out — it always re-derives`,steps:[{op:`setShowIndicator`,value:!1}],returns:[null],notifications:1,rule:`C:1281-1296 assigns and calls update_empty unconditionally, with no equality guard — deliberately unlike setShowApplyButton`},{name:`setShowIndicator re-derives on every call, redundant or not`,steps:[{op:`setShowIndicator`,value:!1},{op:`setShowIndicator`,value:!1}],returns:[null,null],notifications:2,rule:`C:1281-1296 — two calls, two update_empty runs`},{name:`setText early-outs on an identical value`,steps:[{op:`setText`,value:`Ada`},{op:`setText`,value:`Ada`}],returns:[!0,!1],notifications:1,rule:`text_changed_cb C:166-174 runs off the buffer CHANGE; neither renderer fires an edit event without a real edit`},{name:`setEditing early-outs on an unchanged focus state`,steps:[{op:`setEditing`,value:!0},{op:`setEditing`,value:!0}],returns:[!0,!1],notifications:1,rule:"text_state_flags_changed_cb C:176-189 — `priv->editing` only moves when focus actually crosses the widget"},{name:`setEditable early-outs when already editable`,steps:[{op:`setEditable`,value:!0}],returns:[!1],notifications:0,rule:"the `notify::editable` → update_empty binding in adw-entry-row.ui only fires on a real property change"},{name:`setMaxLength early-outs on an unchanged limit and notifies nothing`,steps:[{op:`setMaxLength`,value:5},{op:`setMaxLength`,value:5}],returns:[!0,!1],notifications:0,rule:`C:1339-1340 is the equality early-out; C:1329-1343 contains NO g_object_notify_by_pspec for PROP_MAX_LENGTH — pinned so a port does not "helpfully" add one`}],a=[{name:`a fresh password row is masked and offers to show the password`,steps:[],expected:{revealed:!1,capsLockOn:!1,peekIconName:`view-reveal-symbolic`,peekLabel:`Show Password`,indicatorIconName:`caps-lock-symbolic`,indicatorTooltip:`Caps Lock is on`},entryIndicatorVisible:!1,rule:`adw_password_entry_row_init C:158 (visibility FALSE), :169-171 (indicator icon + tooltip), :175 → :73-76`},{name:`peeking swaps the eye to conceal and offers to hide`,steps:[{op:`togglePeek`}],expected:{revealed:!0,capsLockOn:!1,peekIconName:`view-conceal-symbolic`,peekLabel:`Hide Password`,indicatorIconName:`caps-lock-symbolic`,indicatorTooltip:`Caps Lock is on`},entryIndicatorVisible:!1,rule:`show_text_clicked_cb C:94-96 flips visibility → notify_visibility_cb C:67-71`},{name:`caps lock while focused and masked shows the warning`,steps:[{op:`entry`,step:{op:`setEditing`,value:!0}},{op:`setCapsLockOn`,value:!0}],expected:{revealed:!1,capsLockOn:!0,peekIconName:`view-reveal-symbolic`,peekLabel:`Show Password`,indicatorIconName:`caps-lock-symbolic`,indicatorTooltip:`Caps Lock is on`},entryIndicatorVisible:!0,rule:"update_caps_lock C:57-59 `!visibility && caps_lock_state` → adw-entry-row.c:151 `editing && show_indicator`"},{name:`peeking suppresses the caps-lock warning without clearing caps lock`,steps:[{op:`entry`,step:{op:`setEditing`,value:!0}},{op:`setCapsLockOn`,value:!0},{op:`togglePeek`}],expected:{revealed:!0,capsLockOn:!0,peekIconName:`view-conceal-symbolic`,peekLabel:`Hide Password`,indicatorIconName:`caps-lock-symbolic`,indicatorTooltip:`Caps Lock is on`},entryIndicatorVisible:!1,rule:"C:58 the `!gtk_text_get_visibility(...)` term, re-evaluated by the visibility notify at C:79-80"},{name:`caps lock while UNFOCUSED shows nothing`,steps:[{op:`setCapsLockOn`,value:!0}],expected:{revealed:!1,capsLockOn:!0,peekIconName:`view-reveal-symbolic`,peekLabel:`Show Password`,indicatorIconName:`caps-lock-symbolic`,indicatorTooltip:`Caps Lock is on`},entryIndicatorVisible:!1,rule:`adw-entry-row.c:151, with adw-password-entry-row.c:83-88 re-evaluating caps lock on the focus notify`},{name:`concealing again brings the caps-lock warning back`,steps:[{op:`entry`,step:{op:`setEditing`,value:!0}},{op:`setCapsLockOn`,value:!0},{op:`togglePeek`},{op:`togglePeek`}],expected:{revealed:!1,capsLockOn:!0,peekIconName:`view-reveal-symbolic`,peekLabel:`Show Password`,indicatorIconName:`caps-lock-symbolic`,indicatorTooltip:`Caps Lock is on`},entryIndicatorVisible:!0,rule:`C:79-80 re-runs update_caps_lock on EVERY visibility change, in both directions`},{name:`releasing caps lock while peeking leaves the warning off`,steps:[{op:`entry`,step:{op:`setEditing`,value:!0}},{op:`setCapsLockOn`,value:!0},{op:`togglePeek`},{op:`setCapsLockOn`,value:!1}],expected:{revealed:!0,capsLockOn:!1,peekIconName:`view-conceal-symbolic`,peekLabel:`Hide Password`,indicatorIconName:`caps-lock-symbolic`,indicatorTooltip:`Caps Lock is on`},entryIndicatorVisible:!1,rule:`C:57-59 — both terms must hold; neither one alone shows the warning`}],o=[{name:`a redundant reveal is silent`,steps:[{op:`setRevealed`,value:!0},{op:`setRevealed`,value:!0}],notifications:1,rule:`adw-entry-row.c:984/:1198/:1247 — the family early-outs on an unchanged value`},{name:`concealing an already-masked row is silent`,steps:[{op:`setRevealed`,value:!1}],notifications:0,rule:`the same guard, from the other side — a fresh row is already masked (adw-password-entry-row.c:158)`},{name:`each peek toggle notifies exactly once`,steps:[{op:`togglePeek`},{op:`togglePeek`}],notifications:2,rule:`show_text_clicked_cb C:94-96 flips the value, so every tap is a real change`}];export{t as ENTRY_MAX_LENGTH_VECTORS,r as ENTRY_ROW_ACTIVATION_VECTORS,i as ENTRY_ROW_GUARD_VECTORS,n as ENTRY_ROW_STATE_VECTORS,e as ENTRY_TEXT_LENGTH_VECTORS,a as PASSWORD_ENTRY_ROW_VECTORS,o as PASSWORD_REVEAL_GUARD_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ABOUT_DIALOG_CREDITS_LEGAL_VECTORS as e,ABOUT_DIALOG_DETAILS_VECTORS as t,ABOUT_DIALOG_HEADER_VECTORS as n,ABOUT_DIALOG_LABEL_VECTORS as r,ABOUT_DIALOG_SUPPORT_VECTORS as i,CREDITS_SECTIONS_VECTORS as a,CREDIT_PERSON_VECTORS as o,LEGAL_SECTION_VECTORS as s,LICENSE_INFO_VECTORS as c,LICENSE_SETTER_VECTORS as l,LICENSE_SPDX_VECTORS as u,LICENSE_TEXT_VECTORS as d,TRANSLATOR_CREDITS_VECTORS as f}from"./about-dialog.js";import{ACTION_ROW_ACTIVATION_VECTORS as p,BUTTON_ROW_ACTIVATABLE_VECTORS as m,BUTTON_ROW_ICON_VECTORS as h,LABEL_VISIBILITY_VECTORS as g,SWITCH_ROW_NOTIFY_VECTORS as _,WINDOW_TITLE_VECTORS as v}from"./action-row.js";import{AVATAR_COLOR_VECTORS as y,AVATAR_FONT_SIZE_VECTORS as b,AVATAR_INITIALS_VECTORS as x,AVATAR_MODE_VECTORS as S}from"./avatar.js";import{BANNER_BUTTON_STYLE_PARSE_VECTORS as C,BANNER_BUTTON_STYLE_VECTORS as w,BANNER_BUTTON_TEXT_VECTORS as T,BANNER_BUTTON_VISIBLE_VECTORS as E,BANNER_DEFAULT_VECTORS as D}from"./banner.js";import{BUTTON_CONTENT_DEFAULT_VECTORS as O,BUTTON_CONTENT_ELLIPSIZE_VECTORS as k,BUTTON_CONTENT_ICON_VECTORS as A,BUTTON_CONTENT_LABEL_VECTORS as j,BUTTON_CONTENT_STYLE_TARGET_VECTORS as M,BUTTON_CONTENT_TEXT_VECTORS as N}from"./button-content.js";import{CAROUSEL_CLAMP_VECTORS as P,CAROUSEL_NAVIGATE_VECTORS as F,CAROUSEL_PAGE_AT_POSITION_VECTORS as I,CAROUSEL_PAGE_LIST_VECTORS as L,CAROUSEL_PROPERTY_DEFAULT_VECTORS as R,CAROUSEL_RANGE_VECTORS as z,CAROUSEL_REORDER_SHIFT_VECTORS as B,CAROUSEL_REVEAL_VECTORS as V,CAROUSEL_SIZES_FROM_SNAP_POINTS_VECTORS as H,CAROUSEL_SNAP_POINT_VECTORS as U,CAROUSEL_WHEEL_LOCKOUT_VECTORS as W,CAROUSEL_WHEEL_VECTORS as G}from"./carousel.js";import{RADIO_GROUP_VECTORS as K}from"./checks.js";import{CLAMP_ALLOCATE_VECTORS as q,CLAMP_CHILD_SIZE_VECTORS as J,CLAMP_PROPERTY_VECTORS as Y,CLAMP_SIZE_FROM_CHILD_VECTORS as X,CLAMP_THRESHOLD_VECTORS as Z,SPINNER_GEOMETRY_VECTORS as Q,SPINNER_SIZE_VECTORS as $,TOOLBAR_VIEW_ALLOCATE_VECTORS as ee,TOOLBAR_VIEW_CLASS_VECTORS as te,TOOLBAR_VIEW_CONTENT_FOR_SIZE_VECTORS as ne,TOOLBAR_VIEW_MEASURE_VECTORS as re}from"./chrome.js";import{DATA_GRID_CELL_TEXT_VECTORS as ie,DATA_GRID_COLUMN_CLASS_VECTORS as ae,DATA_GRID_COLUMN_NORMALIZE_VECTORS as oe,DATA_GRID_INTERACTIVE_VECTORS as se,DATA_GRID_TRACK_VECTORS as ce,DATA_GRID_VARIANT_VECTORS as le}from"./data-grid.js";import{BOTTOM_SHEET_CLOSE_VECTORS as ue,BOTTOM_SHEET_PRESENTATION_VECTORS as de,runBottomSheetSteps as fe}from"./dialog.js";import{ENTRY_MAX_LENGTH_VECTORS as pe,ENTRY_ROW_ACTIVATION_VECTORS as me,ENTRY_ROW_GUARD_VECTORS as he,ENTRY_ROW_STATE_VECTORS as ge,ENTRY_TEXT_LENGTH_VECTORS as _e,PASSWORD_ENTRY_ROW_VECTORS as ve,PASSWORD_REVEAL_GUARD_VECTORS as ye}from"./entry-row.js";import{COMBO_SELECTION_VECTORS as be}from"./rows.js";import{VIEW_STACK_ICON_NAME_VECTORS as xe,VIEW_STACK_PAGE_VECTORS as Se,VIEW_STACK_VECTORS as Ce}from"./view-stack.js";import{NAVIGATION_VIEW_VECTORS as we,collectNavigationState as Te,navigationEventLog as Ee,runNavigationSteps as De}from"./navigation-view.js";import{SIDEBAR_ACTIVATION_VECTORS as Oe,SIDEBAR_CLAMP_VECTORS as ke,SIDEBAR_FILTER_VECTORS as Ae,SIDEBAR_ITEMS_CHANGED_VECTORS as je,SIDEBAR_ITEM_FLAG_VECTORS as Me,SIDEBAR_MODEL_VECTORS as Ne,SIDEBAR_MODE_VECTORS as Pe}from"./sidebar.js";import{ADW_LENGTH_UNIT_VECTORS as Fe,GLIB_CLAMP_VECTORS as Ie,NATURAL_SIDEBAR_WIDTH_VECTORS as Le,NAVIGATION_ACTION_VECTORS as Re,NAVIGATION_SPLIT_VIEW_LAYOUT_VECTORS as ze,NAVIGATION_STACK_VECTORS as Be,OVERLAY_COLLAPSE_VECTORS as Ve,OVERLAY_SPLIT_VIEW_LAYOUT_VECTORS as He,OVERLAY_SWIPE_AREA_VECTORS as Ue,OVERLAY_SWIPE_CANCEL_VECTORS as We,OVERLAY_SWIPE_RELEASE_VECTORS as Ge,OVERLAY_SWIPE_SNAP_POINT_VECTORS as Ke,OVERLAY_SWIPE_START_VECTORS as qe,SIDEBAR_BOUNDS_VECTORS as Je,SIDEBAR_WIDTH_VECTORS as Ye,SPLIT_VIEW_MEASURE_VECTORS as Xe,TAGS_CONFLICT_VECTORS as Ze}from"./split-view.js";import{MENU_BUTTON_DIRECTION_VECTORS as Qe,SPLIT_BUTTON_CONTENT_VECTORS as $e,SPLIT_BUTTON_DIRECTION_VECTORS as et,SPLIT_BUTTON_DROPDOWN_VECTORS as tt,SPLIT_BUTTON_MENU_ACTIVATION_VECTORS as nt,SPLIT_BUTTON_MENU_PARSE_VECTORS as rt,SPLIT_BUTTON_ROOT_STATE_VECTORS as it,SPLIT_BUTTON_STYLE_CLASS_VECTORS as at,SPLIT_BUTTON_TOOLTIP_VECTORS as ot}from"./split-button.js";import{INLINE_TOGGLE_VECTORS as st,INLINE_TOOLTIP_VECTORS as ct,VIEW_SWITCHER_BADGE_VECTORS as lt,VIEW_SWITCHER_BAR_REVEAL_VECTORS as ut,VIEW_SWITCHER_BAR_VECTORS as dt,VIEW_SWITCHER_BUTTON_VECTORS as ft,VIEW_SWITCHER_BUTTON_VISIBILITY_VECTORS as pt,VIEW_SWITCHER_DRAG_VECTORS as mt,VIEW_SWITCHER_ICON_VECTORS as ht,VIEW_SWITCHER_MNEMONIC_VECTORS as gt,VIEW_SWITCHER_REBUILD_VECTORS as _t,VIEW_SWITCHER_SELECTION_VECTORS as vt,createViewSwitcherClock as yt}from"./view-switcher.js";import{TABS_REVEALED_VECTORS as bt,TAB_CLOSE_VISIBLE_VECTORS as xt,TAB_DESCENDANT_VECTORS as St,TAB_ICON_STATE_VECTORS as Ct,TAB_PAGE_DESCRIPTOR_VECTORS as wt,TAB_SUCCESSOR_VECTORS as Tt,TAB_TOOLTIP_VECTORS as Et,TAB_VIEW_VECTORS as Dt,applyTabViewOp as Ot,seedTabViewPages as kt,tabViewClosing as At,tabViewOrder as jt}from"./tab-view.js";import{CASE_FOLD_VECTORS as Mt,MAKE_COMPARABLE_VECTORS as Nt,PREFERENCES_GROUP_HEADER_VECTORS as Pt,PREFERENCES_SEARCH_PAGES as Ft,PREFERENCES_SEARCH_VECTORS as It,ROW_MATCH_VECTORS as Lt,SEARCH_CORPUS_VECTORS as Rt,SEARCH_ROW_SUBTITLE_VECTORS as zt,STRIP_MARKUP_VECTORS as Bt,STRIP_MNEMONIC_VECTORS as Vt}from"./preferences.js";import{POPOVER_KEY_VECTORS as Ht,POPOVER_SURFACE_VECTORS as Ut}from"./popover.js";import{ADW_WRAP_BOX_DEFAULT_ALIGN as Wt,ADW_WRAP_BOX_DEFAULT_JUSTIFY as Gt,ADW_WRAP_BOX_DEFAULT_JUSTIFY_LAST_LINE as Kt,ADW_WRAP_BOX_DEFAULT_SPACING as qt,WRAP_BOX_LINE_VECTORS as Jt,WRAP_BOX_SPACING_NOTIFY_VECTORS as Yt,WRAP_BOX_SPACING_VECTORS as Xt}from"./wrap-box.js";export{e as ABOUT_DIALOG_CREDITS_LEGAL_VECTORS,t as ABOUT_DIALOG_DETAILS_VECTORS,n as ABOUT_DIALOG_HEADER_VECTORS,r as ABOUT_DIALOG_LABEL_VECTORS,i as ABOUT_DIALOG_SUPPORT_VECTORS,p as ACTION_ROW_ACTIVATION_VECTORS,Fe as ADW_LENGTH_UNIT_VECTORS,Wt as ADW_WRAP_BOX_DEFAULT_ALIGN,Gt as ADW_WRAP_BOX_DEFAULT_JUSTIFY,Kt as ADW_WRAP_BOX_DEFAULT_JUSTIFY_LAST_LINE,qt as ADW_WRAP_BOX_DEFAULT_SPACING,y as AVATAR_COLOR_VECTORS,b as AVATAR_FONT_SIZE_VECTORS,x as AVATAR_INITIALS_VECTORS,S as AVATAR_MODE_VECTORS,C as BANNER_BUTTON_STYLE_PARSE_VECTORS,w as BANNER_BUTTON_STYLE_VECTORS,T as BANNER_BUTTON_TEXT_VECTORS,E as BANNER_BUTTON_VISIBLE_VECTORS,D as BANNER_DEFAULT_VECTORS,ue as BOTTOM_SHEET_CLOSE_VECTORS,de as BOTTOM_SHEET_PRESENTATION_VECTORS,O as BUTTON_CONTENT_DEFAULT_VECTORS,k as BUTTON_CONTENT_ELLIPSIZE_VECTORS,A as BUTTON_CONTENT_ICON_VECTORS,j as BUTTON_CONTENT_LABEL_VECTORS,M as BUTTON_CONTENT_STYLE_TARGET_VECTORS,N as BUTTON_CONTENT_TEXT_VECTORS,m as BUTTON_ROW_ACTIVATABLE_VECTORS,h as BUTTON_ROW_ICON_VECTORS,P as CAROUSEL_CLAMP_VECTORS,F as CAROUSEL_NAVIGATE_VECTORS,I as CAROUSEL_PAGE_AT_POSITION_VECTORS,L as CAROUSEL_PAGE_LIST_VECTORS,R as CAROUSEL_PROPERTY_DEFAULT_VECTORS,z as CAROUSEL_RANGE_VECTORS,B as CAROUSEL_REORDER_SHIFT_VECTORS,V as CAROUSEL_REVEAL_VECTORS,H as CAROUSEL_SIZES_FROM_SNAP_POINTS_VECTORS,U as CAROUSEL_SNAP_POINT_VECTORS,W as CAROUSEL_WHEEL_LOCKOUT_VECTORS,G as CAROUSEL_WHEEL_VECTORS,Mt as CASE_FOLD_VECTORS,q as CLAMP_ALLOCATE_VECTORS,J as CLAMP_CHILD_SIZE_VECTORS,Y as CLAMP_PROPERTY_VECTORS,X as CLAMP_SIZE_FROM_CHILD_VECTORS,Z as CLAMP_THRESHOLD_VECTORS,be as COMBO_SELECTION_VECTORS,a as CREDITS_SECTIONS_VECTORS,o as CREDIT_PERSON_VECTORS,ie as DATA_GRID_CELL_TEXT_VECTORS,ae as DATA_GRID_COLUMN_CLASS_VECTORS,oe as DATA_GRID_COLUMN_NORMALIZE_VECTORS,se as DATA_GRID_INTERACTIVE_VECTORS,ce as DATA_GRID_TRACK_VECTORS,le as DATA_GRID_VARIANT_VECTORS,pe as ENTRY_MAX_LENGTH_VECTORS,me as ENTRY_ROW_ACTIVATION_VECTORS,he as ENTRY_ROW_GUARD_VECTORS,ge as ENTRY_ROW_STATE_VECTORS,_e as ENTRY_TEXT_LENGTH_VECTORS,Ie as GLIB_CLAMP_VECTORS,st as INLINE_TOGGLE_VECTORS,ct as INLINE_TOOLTIP_VECTORS,g as LABEL_VISIBILITY_VECTORS,s as LEGAL_SECTION_VECTORS,c as LICENSE_INFO_VECTORS,l as LICENSE_SETTER_VECTORS,u as LICENSE_SPDX_VECTORS,d as LICENSE_TEXT_VECTORS,Nt as MAKE_COMPARABLE_VECTORS,Qe as MENU_BUTTON_DIRECTION_VECTORS,Le as NATURAL_SIDEBAR_WIDTH_VECTORS,Re as NAVIGATION_ACTION_VECTORS,ze as NAVIGATION_SPLIT_VIEW_LAYOUT_VECTORS,Be as NAVIGATION_STACK_VECTORS,we as NAVIGATION_VIEW_VECTORS,Ve as OVERLAY_COLLAPSE_VECTORS,He as OVERLAY_SPLIT_VIEW_LAYOUT_VECTORS,Ue as OVERLAY_SWIPE_AREA_VECTORS,We as OVERLAY_SWIPE_CANCEL_VECTORS,Ge as OVERLAY_SWIPE_RELEASE_VECTORS,Ke as OVERLAY_SWIPE_SNAP_POINT_VECTORS,qe as OVERLAY_SWIPE_START_VECTORS,ve as PASSWORD_ENTRY_ROW_VECTORS,ye as PASSWORD_REVEAL_GUARD_VECTORS,Ht as POPOVER_KEY_VECTORS,Ut as POPOVER_SURFACE_VECTORS,Pt as PREFERENCES_GROUP_HEADER_VECTORS,Ft as PREFERENCES_SEARCH_PAGES,It as PREFERENCES_SEARCH_VECTORS,K as RADIO_GROUP_VECTORS,Lt as ROW_MATCH_VECTORS,Rt as SEARCH_CORPUS_VECTORS,zt as SEARCH_ROW_SUBTITLE_VECTORS,Oe as SIDEBAR_ACTIVATION_VECTORS,Je as SIDEBAR_BOUNDS_VECTORS,ke as SIDEBAR_CLAMP_VECTORS,Ae as SIDEBAR_FILTER_VECTORS,je as SIDEBAR_ITEMS_CHANGED_VECTORS,Me as SIDEBAR_ITEM_FLAG_VECTORS,Ne as SIDEBAR_MODEL_VECTORS,Pe as SIDEBAR_MODE_VECTORS,Ye as SIDEBAR_WIDTH_VECTORS,Q as SPINNER_GEOMETRY_VECTORS,$ as SPINNER_SIZE_VECTORS,$e as SPLIT_BUTTON_CONTENT_VECTORS,et as SPLIT_BUTTON_DIRECTION_VECTORS,tt as SPLIT_BUTTON_DROPDOWN_VECTORS,nt as SPLIT_BUTTON_MENU_ACTIVATION_VECTORS,rt as SPLIT_BUTTON_MENU_PARSE_VECTORS,it as SPLIT_BUTTON_ROOT_STATE_VECTORS,at as SPLIT_BUTTON_STYLE_CLASS_VECTORS,ot as SPLIT_BUTTON_TOOLTIP_VECTORS,Xe as SPLIT_VIEW_MEASURE_VECTORS,Bt as STRIP_MARKUP_VECTORS,Vt as STRIP_MNEMONIC_VECTORS,_ as SWITCH_ROW_NOTIFY_VECTORS,bt as TABS_REVEALED_VECTORS,xt as TAB_CLOSE_VISIBLE_VECTORS,St as TAB_DESCENDANT_VECTORS,Ct as TAB_ICON_STATE_VECTORS,wt as TAB_PAGE_DESCRIPTOR_VECTORS,Tt as TAB_SUCCESSOR_VECTORS,Et as TAB_TOOLTIP_VECTORS,Dt as TAB_VIEW_VECTORS,Ze as TAGS_CONFLICT_VECTORS,ee as TOOLBAR_VIEW_ALLOCATE_VECTORS,te as TOOLBAR_VIEW_CLASS_VECTORS,ne as TOOLBAR_VIEW_CONTENT_FOR_SIZE_VECTORS,re as TOOLBAR_VIEW_MEASURE_VECTORS,f as TRANSLATOR_CREDITS_VECTORS,xe as VIEW_STACK_ICON_NAME_VECTORS,Se as VIEW_STACK_PAGE_VECTORS,Ce as VIEW_STACK_VECTORS,lt as VIEW_SWITCHER_BADGE_VECTORS,ut as VIEW_SWITCHER_BAR_REVEAL_VECTORS,dt as VIEW_SWITCHER_BAR_VECTORS,ft as VIEW_SWITCHER_BUTTON_VECTORS,pt as VIEW_SWITCHER_BUTTON_VISIBILITY_VECTORS,mt as VIEW_SWITCHER_DRAG_VECTORS,ht as VIEW_SWITCHER_ICON_VECTORS,gt as VIEW_SWITCHER_MNEMONIC_VECTORS,_t as VIEW_SWITCHER_REBUILD_VECTORS,vt as VIEW_SWITCHER_SELECTION_VECTORS,v as WINDOW_TITLE_VECTORS,Jt as WRAP_BOX_LINE_VECTORS,Yt as WRAP_BOX_SPACING_NOTIFY_VECTORS,Xt as WRAP_BOX_SPACING_VECTORS,Ot as applyTabViewOp,Te as collectNavigationState,yt as createViewSwitcherClock,Ee as navigationEventLog,fe as runBottomSheetSteps,De as runNavigationSteps,kt as seedTabViewPages,At as tabViewClosing,jt as tabViewOrder};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const e=[{name:`add-auto-pushes-into-an-empty-view`,rule:`the first added page becomes visible, without an animation`,steps:[{op:`add`,page:`A`,expect:!0}],expect:{stack:[`A`],pages:[`A`],visiblePage:`A`,visiblePageTag:null,depth:1,animateTransitions:!0,popOnEscape:!0,pageState:[{page:`A`,tag:null,title:``,canPop:!0,removeOnPop:!1}],changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1}]},derivedFrom:`adw_navigation_view_add:2732 → add_page:1284-1285 (push_to_stack with a hardcoded animate=FALSE); page defaults adw_navigation_page_init:794-795; view defaults adw_navigation_view_init:2142-2143`},{name:`add-does-not-push-onto-a-non-empty-stack`,rule:`only an EMPTY stack auto-pushes; a second add merely registers`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`}],expect:{stack:[`A`],pages:[`A`,`B`],visiblePage:`A`,depth:1,changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1}]},derivedFrom:`add_page:1284-1287 — the else branch only hides the page`},{name:`add-re-arms-the-auto-push-after-the-stack-is-emptied`,rule:`the auto-push condition is "the stack is empty", not "this is the first page ever"`,steps:[{op:`add`,page:`A`},{op:`replace`,pages:[]},{op:`add`,page:`B`}],expect:{stack:[`B`],pages:[`A`,`B`],visiblePage:`B`,depth:1},derivedFrom:`add_page:1284 (n_items == 0) + adw_navigation_view_replace:3048 g_list_store_remove_all`},{name:`add-rejects-a-duplicate-tag-and-registers-nothing`,rule:`a colliding tag aborts the whole add — the second page is not retained`,steps:[{op:`add`,page:`A`,props:{tag:`x`},expect:!0},{op:`add`,page:`B`,props:{tag:`x`},expect:!1}],expect:{stack:[`A`],pages:[`A`],findPage:[[`x`,`A`]],pageState:[{page:`B`,registered:!1}],diagnostics:[{code:`duplicate-tag`,tag:`x`}]},derivedFrom:`add_page:1272-1277 — the g_critical returns before gtk_widget_set_parent`},{name:`add-converts-a-pushed-page-into-a-permanent-one`,rule:`add() on a DYNAMIC page that is on the stack only clears remove-on-pop`,steps:[{op:`add`,page:`A`},{op:`push`,page:`C`},{op:`add`,page:`C`,expect:!0},{op:`pop`,expect:!0},{op:`finishTransition`,expect:[]}],expect:{stack:[`A`],pages:[`A`,`C`],pageState:[{page:`C`,registered:!0,removeOnPop:!1}],diagnostics:[]},derivedFrom:`adw_navigation_view_add:2725-2730 — the remove_on_pop + parent == self + in-stack shortcut`},{name:`find-page-accepts-the-empty-string-as-a-tag`,rule:`'' is a legal g_hash_table key; only a NULL tag is skipped`,steps:[{op:`add`,page:`A`,props:{tag:``}}],expect:{findPage:[[``,`A`]],visiblePageTag:``},derivedFrom:"add_page:1281-1282 (only `if (tag)` is skipped) + find_page:2780 g_hash_table_lookup"},{name:`an-untagged-page-does-not-answer-the-empty-tag`,rule:`a NULL tag is never inserted into the tag table`,steps:[{op:`add`,page:`A`,props:{tag:null}}],expect:{findPage:[[``,null]],visiblePageTag:null},derivedFrom:"add_page:1281 — `if (tag) g_hash_table_insert (...)`"},{name:`tags-are-byte-exact-and-not-unicode-normalised`,rule:`g_str_hash/g_str_equal compare bytes, so NFD and NFC are different tags`,steps:[{op:`add`,page:`A`,props:{tag:`café`}}],expect:{findPage:[[`café`,`A`],[`café`,null]]},derivedFrom:`adw_navigation_view_init:2147 (g_str_hash/g_str_equal) + find_page:2780`},{name:`push-registers-an-unknown-page-as-dynamic`,rule:`a page push() has to register is destroyed again when it is popped`,steps:[{op:`add`,page:`A`},{op:`push`,page:`C`,expect:!0}],expect:{stack:[`A`,`C`],pages:[`A`,`C`],depth:2,pageState:[{page:`A`,removeOnPop:!1},{page:`C`,removeOnPop:!0}],changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1},{reason:`push`,stack:[`A`,`C`],visiblePage:`C`,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[],removeAfterTransition:null,animate:!0,pop:!1,tagNotify:!1}]},derivedFrom:`adw_navigation_view_push:2806 → maybe_add_page:1307-1308 (set_remove_on_pop TRUE) → push_to_stack:2809`},{name:`push-keeps-an-added-page-permanent`,rule:`maybe_add_page returns early for a known page, so it never gains remove-on-pop`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`push`,page:`B`,expect:!0},{op:`pop`,expect:!0},{op:`finishTransition`,expect:[]}],expect:{stack:[`A`],pages:[`A`,`B`],pageState:[{page:`B`,registered:!0,removeOnPop:!1}]},derivedFrom:`maybe_add_page:1296-1297 — the early TRUE never reaches set_remove_on_pop at :1308`},{name:`repeated-push-never-duplicates-a-page`,rule:`the already-in-stack guard: pushing a stacked page appends nothing and emits nothing`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`,props:{title:`Detail`}},{op:`push`,page:`B`,expect:!0},{op:`push`,page:`B`,expect:!1}],expect:{stack:[`A`,`B`],depth:2,diagnostics:[{code:`already-in-stack`,title:`Detail`}]},derivedFrom:`push_to_stack:942-952 — g_list_store_find returns before the append and before ::pushed at :958`},{name:`push-rejects-the-visible-page`,rule:`pushing the page that is already visible is the same rejection`,steps:[{op:`add`,page:`A`,props:{title:`Home`}},{op:`push`,page:`A`,expect:!1}],expect:{stack:[`A`],diagnostics:[{code:`already-in-stack`,title:`Home`}]},derivedFrom:`push_to_stack:942-952`},{name:`push-by-an-unknown-tag-changes-nothing`,rule:`an unknown tag is rejected before any state moves`,steps:[{op:`add`,page:`A`},{op:`pushByTag`,tag:`nope`,expect:!1}],expect:{stack:[`A`],depth:1,diagnostics:[{code:`tag-not-found`,tag:`nope`}]},derivedFrom:`adw_navigation_view_push_by_tag:2837-2843`},{name:`push-by-tag-reports-an-already-stacked-page-by-its-tag`,rule:`push_to_stack picks the tag wording when it was reached through push_by_tag`,steps:[{op:`add`,page:`A`,props:{tag:`a`}},{op:`pushByTag`,tag:`a`,expect:!1}],expect:{stack:[`A`],diagnostics:[{code:`already-in-stack`,tag:`a`}]},derivedFrom:`push_to_stack:943-949 (use_tag_for_errors) ← adw_navigation_view_push_by_tag:2845`},{name:`pop-refuses-at-the-root-page`,rule:`the root page has no previous page, so there is nothing to pop to`,steps:[{op:`add`,page:`A`},{op:`pop`,expect:!1}],expect:{stack:[`A`],depth:1,diagnostics:[]},derivedFrom:`adw_navigation_view_pop:2881-2884 → get_previous_page:3240-3241 (pos == 0 → NULL)`},{name:`pop-on-an-empty-view-is-false`,rule:`no visible page, nothing to pop`,steps:[{op:`pop`,expect:!1}],expect:{stack:[],visiblePage:null,depth:0,changes:[]},derivedFrom:`adw_navigation_view_pop:2876-2879`},{name:`pop-ignores-can-pop`,rule:`can-pop gates SHORTCUTS and the back button, never a manual pop()`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`push`,page:`B`},{op:`setCanPop`,page:`B`,canPop:!1,expect:!0},{op:`pop`,expect:!0}],expect:{stack:[`A`],visiblePage:`A`,depth:1},derivedFrom:`adw_navigation_view_pop:2869-2889 has no can_pop test; the rule is documented at :2559-2561`},{name:`popping-a-dynamic-page-defers-its-destroy-to-the-transition`,rule:`the outgoing visible page is destroyed when the transition ends, not during the pop`,steps:[{op:`add`,page:`A`},{op:`push`,page:`C`},{op:`pop`,expect:!0},{op:`finishTransition`,expect:[`C`]}],expect:{stack:[`A`],pages:[`A`],pageState:[{page:`C`,registered:!1}],changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1},{reason:`push`,stack:[`A`,`C`],visiblePage:`C`,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[],removeAfterTransition:null,animate:!0,pop:!1,tagNotify:!1},{reason:`pop`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:`C`,popped:[`C`],removed:[],removeAfterTransition:`C`,animate:!0,pop:!0,tagNotify:!1}]},derivedFrom:"pop_from_stack:1007 skips the outgoing page (`c != old_page`); transition_done_cb:1042-1043 removes it"},{name:`finish-transition-is-idempotent`,rule:`settling an already-settled transition owes nothing`,steps:[{op:`add`,page:`A`},{op:`push`,page:`C`},{op:`pop`},{op:`finishTransition`,expect:[`C`]},{op:`finishTransition`,expect:[]}],expect:{pages:[`A`]},derivedFrom:"transition_done_cb:1032 — `if (self->hiding_page)`, and the pointer is stolen"},{name:`a-page-pushed-back-before-the-transition-ends-survives`,rule:`the deferred destroy goes through remove(), whose on-the-stack check spares it`,steps:[{op:`add`,page:`A`},{op:`push`,page:`C`},{op:`pop`},{op:`push`,page:`C`,expect:!0},{op:`finishTransition`,expect:[]}],expect:{stack:[`A`,`C`],pages:[`A`,`C`],pageState:[{page:`C`,registered:!0,removeOnPop:!0}]},derivedFrom:`switch_page:867-868 → adw_navigation_view_remove:2757 → remove_page:1323-1326 (check_stack)`},{name:`a-new-transition-settles-the-one-still-owed`,rule:`starting a transition on a different page flushes the pending destroy`,steps:[{op:`add`,page:`A`},{op:`push`,page:`C`},{op:`pop`},{op:`push`,page:`E`}],expect:{stack:[`A`,`E`],pages:[`A`,`E`],pageState:[{page:`C`,registered:!1}],changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1},{reason:`push`,stack:[`A`,`C`],visiblePage:`C`,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[],removeAfterTransition:null,animate:!0,pop:!1,tagNotify:!1},{reason:`pop`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:`C`,popped:[`C`],removed:[],removeAfterTransition:`C`,animate:!0,pop:!0,tagNotify:!1},{reason:`push`,stack:[`A`,`E`],visiblePage:`E`,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[`C`],removeAfterTransition:null,animate:!0,pop:!1,tagNotify:!1}]},derivedFrom:`switch_page:860-873 — the pending hiding_page is resolved when a new transition begins`},{name:`pop-to-page-pops-every-page-above-it-in-one-step`,rule:`ONE splice, ONE visible-page change, popped reported TOP-FIRST`,steps:[{op:`add`,page:`A`},{op:`push`,page:`B`},{op:`push`,page:`C`},{op:`push`,page:`D`},{op:`popToPage`,page:`B`,expect:!0},{op:`finishTransition`,expect:[`D`]}],expect:{stack:[`A`,`B`],pages:[`A`,`B`],visiblePage:`B`,depth:2,changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1},{reason:`push`,stack:[`A`,`B`],visiblePage:`B`,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[],removeAfterTransition:null,animate:!0,pop:!1,tagNotify:!1},{reason:`push`,stack:[`A`,`B`,`C`],visiblePage:`C`,visiblePageTag:null,previousVisiblePage:`B`,popped:[],removed:[],removeAfterTransition:null,animate:!0,pop:!1,tagNotify:!1},{reason:`push`,stack:[`A`,`B`,`C`,`D`],visiblePage:`D`,visiblePageTag:null,previousVisiblePage:`C`,popped:[],removed:[],removeAfterTransition:null,animate:!0,pop:!1,tagNotify:!1},{reason:`pop`,stack:[`A`,`B`],visiblePage:`B`,visiblePageTag:null,previousVisiblePage:`D`,popped:[`D`,`C`],removed:[`C`],removeAfterTransition:`D`,animate:!0,pop:!0,tagNotify:!1}]},derivedFrom:`pop_from_stack:989-1009 — prepend while walking up, one g_list_store_splice, one switch_page, then ::popped per page`},{name:`pop-to-tag-pops-atomically-past-a-can-pop-false-page`,rule:`a programmatic pop-to is not stopped by an intermediate can-pop=false page`,steps:[{op:`add`,page:`A`,props:{tag:`a`}},{op:`add`,page:`B`,props:{tag:`b`}},{op:`add`,page:`C`},{op:`push`,page:`B`},{op:`push`,page:`C`},{op:`setCanPop`,page:`B`,canPop:!1},{op:`popToTag`,tag:`a`,expect:!0}],expect:{stack:[`A`],visiblePage:`A`,visiblePageTag:`a`,depth:1,pages:[`A`,`B`,`C`],diagnostics:[]},derivedFrom:`adw_navigation_view_pop_to_tag:2974 → pop_to_page:2932 → pop_from_stack:996; can_pop appears nowhere on this path`},{name:`pop-to-the-visible-page-is-a-silent-no-op`,rule:`no diagnostic, no change — it is simply FALSE`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`push`,page:`B`},{op:`popToPage`,page:`B`,expect:!1}],expect:{stack:[`A`,`B`],diagnostics:[]},derivedFrom:`adw_navigation_view_pop_to_page:2923-2924`},{name:`pop-to-an-off-stack-page-reports-not-in-stack`,rule:`registered but not stacked is a DIFFERENT rejection from an unknown tag`,steps:[{op:`add`,page:`A`},{op:`add`,page:`X`,props:{title:`Extra`}},{op:`push`,page:`B`},{op:`popToPage`,page:`X`,expect:!1}],expect:{stack:[`A`,`B`],diagnostics:[{code:`not-in-stack`,title:`Extra`}]},derivedFrom:`adw_navigation_view_pop_to_page:2926-2930`},{name:`pop-to-an-unknown-tag-reports-tag-not-found`,rule:`pop_to_tag resolves first, so an unknown tag never reaches pop_to_page`,steps:[{op:`add`,page:`A`,props:{tag:`a`}},{op:`push`,page:`B`},{op:`popToTag`,tag:`nope`,expect:!1}],expect:{stack:[`A`,`B`],diagnostics:[{code:`tag-not-found`,tag:`nope`}]},derivedFrom:`adw_navigation_view_pop_to_tag:2966-2972`},{name:`replace-with-an-empty-array-empties-the-view`,rule:`n_pages == 0 leaves no visible page; the added pages stay registered`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`push`,page:`B`},{op:`replace`,pages:[]}],expect:{stack:[],pages:[`A`,`B`],visiblePage:null,visiblePageTag:null,depth:0,changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1},{reason:`push`,stack:[`A`,`B`],visiblePage:`B`,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[],removeAfterTransition:null,animate:!0,pop:!1,tagNotify:!1},{reason:`replace`,stack:[],visiblePage:null,visiblePageTag:null,previousVisiblePage:`B`,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!0,tagNotify:!1}]},derivedFrom:`adw_navigation_view_replace:3048 + :3076-3077 switch_page(visible, NULL, TRUE, FALSE, 0); doc at :2992-2993`},{name:`replace-rejects-a-page-listed-twice`,rule:`the second occurrence is dropped, not the whole call`,steps:[{op:`add`,page:`A`,props:{title:`Home`}},{op:`add`,page:`B`},{op:`replace`,pages:[`A`,`B`,`A`]}],expect:{stack:[`A`,`B`],diagnostics:[{code:`already-in-stack`,title:`Home`}]},derivedFrom:`adw_navigation_view_replace:3055-3059`},{name:`replace-skips-null-slots-silently`,rule:`a NULL entry is not an error — replace_with_tags relies on it`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`replace`,pages:[`A`,null,`B`]}],expect:{stack:[`A`,`B`],diagnostics:[]},derivedFrom:`adw_navigation_view_replace:3021-3022 and :3052-3053`},{name:`replace-with-tags-skips-an-unknown-tag-without-aborting`,rule:`every tag is resolved BEFORE any mutation; an unknown one becomes a null slot`,steps:[{op:`add`,page:`A`,props:{tag:`a`}},{op:`add`,page:`B`,props:{tag:`b`}},{op:`replaceWithTags`,tags:[`a`,`nope`,`b`]}],expect:{stack:[`A`,`B`],visiblePageTag:`b`,diagnostics:[{code:`tag-not-found`,tag:`nope`}]},derivedFrom:`adw_navigation_view_replace_with_tags:3136-3147`},{name:`replace-keeps-a-dynamic-page-in-the-new-stack`,rule:`the destroy loop spares pages the new stack keeps — replacing by the tag of a pushed page must not blank the view`,steps:[{op:`add`,page:`A`},{op:`push`,page:`C`,props:{tag:`c`}},{op:`replaceWithTags`,tags:[`c`]}],expect:{stack:[`C`],pages:[`A`,`C`],visiblePage:`C`,visiblePageTag:`c`,depth:1,diagnostics:[]},derivedFrom:"adw_navigation_view_replace:3033-3034 — `get_remove_on_pop (c) && !g_hash_table_contains (added_pages, c)`"},{name:`replace-destroys-the-dynamic-pages-the-new-stack-drops`,rule:`destroyed top-first and IMMEDIATELY — replace does not animate, so nothing is deferred`,steps:[{op:`add`,page:`A`},{op:`push`,page:`C`},{op:`push`,page:`D`},{op:`replace`,pages:[`A`]}],expect:{stack:[`A`],pages:[`A`],visiblePage:`A`,changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1},{reason:`push`,stack:[`A`,`C`],visiblePage:`C`,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[],removeAfterTransition:null,animate:!0,pop:!1,tagNotify:!1},{reason:`push`,stack:[`A`,`C`,`D`],visiblePage:`D`,visiblePageTag:null,previousVisiblePage:`C`,popped:[],removed:[],removeAfterTransition:null,animate:!0,pop:!1,tagNotify:!1},{reason:`replace`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:`D`,popped:[],removed:[`D`,`C`],removeAfterTransition:null,animate:!1,pop:!0,tagNotify:!1}]},derivedFrom:`adw_navigation_view_replace:3027-3046 (remove_page(self, c, FALSE)); SIGNAL_POPPED appears nowhere in replace`},{name:`replace-registers-a-fresh-page-as-dynamic`,rule:`replace routes new pages through maybe_add_page, so they are destroyed when dropped`,steps:[{op:`add`,page:`A`},{op:`replace`,pages:[`A`,`Z`],props:{Z:{tag:`z`}}}],expect:{stack:[`A`,`Z`],pages:[`A`,`Z`],visiblePageTag:`z`,pageState:[{page:`Z`,removeOnPop:!0}]},derivedFrom:`adw_navigation_view_replace:3061-3065 → maybe_add_page:1307-1308`},{name:`replace-never-animates`,rule:`replacing the stack has no animation, whatever animate-transitions says`,steps:[{op:`setAnimateTransitions`,value:!0},{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`replace`,pages:[`A`,`B`]}],expect:{stack:[`A`,`B`],changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1},{reason:`replace`,stack:[`A`,`B`],visiblePage:`B`,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!0,tagNotify:!1}]},derivedFrom:`adw_navigation_view_replace:3075 switch_page(..., animate = FALSE, 0); doc at :2987`},{name:`replace-that-keeps-the-visible-page-does-not-notify`,rule:`no switch_page when the top of the new stack is the page already shown`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`replace`,pages:[`B`,`A`]}],expect:{stack:[`B`,`A`],visiblePage:`A`,changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1},{reason:`replace`,stack:[`B`,`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!0,tagNotify:!1}]},derivedFrom:"adw_navigation_view_replace:3074 — `if (visible_page != new_visible_page)` guards the switch"},{name:`push-animates-by-default`,rule:`push forwards animate-transitions into push_to_stack`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`push`,page:`B`}],expect:{changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1},{reason:`push`,stack:[`A`,`B`],visiblePage:`B`,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[],removeAfterTransition:null,animate:!0,pop:!1,tagNotify:!1}]},derivedFrom:`adw_navigation_view_push:2809 forwards self->animate_transitions`},{name:`animate-transitions-false-suppresses-the-push-animation`,rule:`the property is read at push time, not at construction`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`setAnimateTransitions`,value:!1},{op:`push`,page:`B`}],expect:{animateTransitions:!1,changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1},{reason:`push`,stack:[`A`,`B`],visiblePage:`B`,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1}]},derivedFrom:`adw_navigation_view_push:2809 + adw_navigation_view_set_animate_transitions:3383`},{name:`a-push-into-an-empty-view-never-animates`,rule:`with no outgoing page there is nothing to slide away from`,steps:[{op:`add`,page:`A`},{op:`replace`,pages:[]},{op:`push`,page:`B`}],expect:{stack:[`B`],changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1},{reason:`replace`,stack:[],visiblePage:null,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!0,tagNotify:!1},{reason:`push`,stack:[`B`],visiblePage:`B`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1}]},derivedFrom:"switch_page:857-858 — `if (!prev_page) animate = FALSE;`"},{name:`remove-off-the-stack-is-immediate-and-frees-the-tag`,rule:`an unstacked page is unregistered at once and stops answering find_page`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`,props:{tag:`b`}},{op:`remove`,page:`B`,expect:!0}],expect:{pages:[`A`],findPage:[[`b`,null]],pageState:[{page:`B`,registered:!1}]},derivedFrom:`remove_page:1328-1333 — the tag is dropped, then gtk_widget_unparent`},{name:`remove-while-stacked-is-deferred-to-the-pop`,rule:`the page stays until it is popped, then it is destroyed`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`push`,page:`B`},{op:`remove`,page:`B`,expect:!0},{op:`pop`,expect:!0},{op:`finishTransition`,expect:[`B`]}],expect:{stack:[`A`],pages:[`A`],pageState:[{page:`B`,registered:!1}]},derivedFrom:`remove_page:1323-1326 (set_remove_on_pop, return) → transition_done_cb:1042`},{name:`remove-of-an-unknown-page-is-false`,rule:`the C guards on the page being parented to this view`,steps:[{op:`add`,page:`A`},{op:`remove`,page:`Z`,expect:!1}],expect:{pages:[`A`],diagnostics:[]},derivedFrom:`adw_navigation_view_remove:2755 g_return_if_fail (parent == self)`},{name:`set-tag-rejects-a-tag-another-page-owns`,rule:`the reject happens BEFORE the old tag is dropped, so the page keeps it`,steps:[{op:`add`,page:`A`,props:{tag:`x`}},{op:`add`,page:`B`,props:{tag:`y`}},{op:`setTag`,page:`B`,tag:`x`,expect:!1}],expect:{findPage:[[`x`,`A`],[`y`,`B`]],pageState:[{page:`B`,tag:`y`}],diagnostics:[{code:`duplicate-tag`,tag:`x`}]},derivedFrom:`adw_navigation_page_set_tag:2456-2460, before the g_hash_table_remove at :2462`},{name:`set-tag-to-the-same-value-is-a-silent-no-op`,rule:`g_strcmp0 short-circuits before any check or notification`,steps:[{op:`add`,page:`A`,props:{tag:`x`}},{op:`setTag`,page:`A`,tag:`x`,expect:!1}],expect:{findPage:[[`x`,`A`]],diagnostics:[]},derivedFrom:`adw_navigation_page_set_tag:2448-2449`},{name:`clearing-a-tag-drops-it-from-the-index`,rule:`the old key is removed and a NULL tag is not inserted`,steps:[{op:`add`,page:`A`,props:{tag:`x`}},{op:`setTag`,page:`A`,tag:null,expect:!0}],expect:{findPage:[[`x`,null]],visiblePageTag:null,pageState:[{page:`A`,tag:null}]},derivedFrom:`adw_navigation_page_set_tag:2462-2468`},{name:`retagging-frees-the-old-tag-for-another-page`,rule:`the index follows the rename, so the vacated tag becomes available`,steps:[{op:`add`,page:`A`,props:{tag:`x`}},{op:`setTag`,page:`A`,tag:`z`,expect:!0},{op:`add`,page:`B`,props:{tag:`x`},expect:!0}],expect:{findPage:[[`x`,`B`],[`z`,`A`]],diagnostics:[]},derivedFrom:`adw_navigation_page_set_tag:2462-2468`},{name:`set-title-is-idempotent`,rule:`g_set_str returns FALSE for an unchanged title, so nothing notifies`,steps:[{op:`add`,page:`A`,props:{title:`Home`}},{op:`setTitle`,page:`A`,title:`Home`,expect:!1},{op:`setTitle`,page:`A`,title:`Start`,expect:!0}],expect:{pageState:[{page:`A`,title:`Start`}]},derivedFrom:`adw_navigation_page_set_title:2518-2519`},{name:`set-can-pop-is-idempotent`,rule:`the value is coerced to a boolean and an unchanged one is dropped`,steps:[{op:`add`,page:`A`},{op:`setCanPop`,page:`A`,canPop:!0,expect:!1},{op:`setCanPop`,page:`A`,canPop:!1,expect:!0}],expect:{pageState:[{page:`A`,canPop:!1}]},derivedFrom:`adw_navigation_page_set_can_pop:2578-2581`},{name:`tag-notify-is-suppressed-when-neither-page-carries-a-tag`,rule:`visible-page-tag must not re-notify between two untagged pages`,steps:[{op:`add`,page:`A`,props:{tag:null}},{op:`push`,page:`B`,props:{tag:null}},{op:`pop`}],expect:{changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!1},{reason:`push`,stack:[`A`,`B`],visiblePage:`B`,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[],removeAfterTransition:null,animate:!0,pop:!1,tagNotify:!1},{reason:`pop`,stack:[`A`],visiblePage:`A`,visiblePageTag:null,previousVisiblePage:`B`,popped:[`B`],removed:[],removeAfterTransition:`B`,animate:!0,pop:!0,tagNotify:!1}]},derivedFrom:`switch_page:927-930`},{name:`tag-notify-fires-when-either-side-carries-a-tag`,rule:`the INCOMING page having a tag is enough, even with an untagged outgoing one`,steps:[{op:`add`,page:`A`,props:{tag:`a`}},{op:`push`,page:`B`,props:{tag:null}},{op:`pop`}],expect:{visiblePageTag:`a`,changes:[{reason:`add`,stack:[`A`],visiblePage:`A`,visiblePageTag:`a`,previousVisiblePage:null,popped:[],removed:[],removeAfterTransition:null,animate:!1,pop:!1,tagNotify:!0},{reason:`push`,stack:[`A`,`B`],visiblePage:`B`,visiblePageTag:null,previousVisiblePage:`A`,popped:[],removed:[],removeAfterTransition:null,animate:!0,pop:!1,tagNotify:!0},{reason:`pop`,stack:[`A`],visiblePage:`A`,visiblePageTag:`a`,previousVisiblePage:`B`,popped:[`B`],removed:[],removeAfterTransition:`B`,animate:!0,pop:!0,tagNotify:!0}]},derivedFrom:`switch_page:927-930 — either side is enough`},{name:`visible-page-tag-is-null-for-an-untagged-visible-page`,rule:`null, not '' and not the title`,steps:[{op:`add`,page:`A`,props:{tag:`a`}},{op:`push`,page:`B`,props:{title:`Detail`}}],expect:{visiblePageTag:null,visiblePage:`B`},derivedFrom:`adw_navigation_view_get_visible_page_tag:3203-3208`},{name:`previous-page-is-null-at-the-root-and-off-the-stack`,rule:`not-found and pos == 0 are both NULL`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`add`,page:`X`},{op:`push`,page:`B`}],expect:{previousPage:[[`B`,`A`],[`A`,null],[`X`,null],[`Z`,null]]},derivedFrom:`adw_navigation_view_get_previous_page:3237-3243`},{name:`no-back-button-on-the-root-page`,rule:`no previous page means no button and no tooltip`,steps:[{op:`add`,page:`A`,props:{title:`Home`}}],expect:{canGoBack:!1,backButtonTooltip:null},derivedFrom:`adw-back-button.c update_page:92-108 + query_tooltip:406-407`},{name:`the-back-button-tooltip-is-the-previous-page-title`,rule:`the title of the page the button would REVEAL, not the visible one`,steps:[{op:`add`,page:`A`,props:{title:`Home`}},{op:`push`,page:`B`,props:{title:`Detail`}}],expect:{canGoBack:!0,backButtonTooltip:`Home`},derivedFrom:`adw-back-button.c update_page:92 + query_tooltip:411-417`},{name:`the-back-button-tooltip-falls-back-when-the-previous-title-is-empty`,rule:`"Back" is a FALLBACK, not the default`,steps:[{op:`add`,page:`A`,props:{title:``}},{op:`push`,page:`B`}],expect:{canGoBack:!0,backButtonTooltip:`Back`},derivedFrom:'adw-back-button.c:417 — `(title && *title) ? title : _("Back")`'},{name:`can-pop-false-hides-the-back-button`,rule:`this is what can-pop is actually for`,steps:[{op:`add`,page:`A`,props:{title:`Home`}},{op:`add`,page:`B`},{op:`push`,page:`B`},{op:`setCanPop`,page:`B`,canPop:!1}],expect:{canGoBack:!1,backButtonTooltip:null},derivedFrom:`adw-back-button.c update_page:94-97 — !can_pop forces prev_page NULL`},{name:`the-back-button-re-appears-when-can-pop-is-turned-back-on`,rule:`the derivation is live, not a snapshot taken at the last stack mutation`,steps:[{op:`add`,page:`A`,props:{title:`Home`}},{op:`add`,page:`B`},{op:`push`,page:`B`},{op:`setCanPop`,page:`B`,canPop:!1},{op:`setCanPop`,page:`B`,canPop:!0}],expect:{canGoBack:!0,backButtonTooltip:`Home`},derivedFrom:`adw-back-button.c:446-450 connects update_page to the page notify::can-pop`},{name:`the-shortcut-pop-stops-without-popping-when-can-pop-is-false`,rule:`GDK_EVENT_STOP so the key is NOT forwarded to an enclosing navigation view`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`push`,page:`B`},{op:`setCanPop`,page:`B`,canPop:!1},{op:`popFromShortcut`,expect:`stop`}],expect:{stack:[`A`,`B`],depth:2},derivedFrom:`pop_shortcut_cb:1150-1152`},{name:`the-shortcut-pop-stops-at-the-root-when-can-pop-is-false`,rule:`can_pop is checked BEFORE the pop attempt, so even the root case stops`,steps:[{op:`add`,page:`A`},{op:`setCanPop`,page:`A`,canPop:!1},{op:`popFromShortcut`,expect:`stop`}],expect:{stack:[`A`]},derivedFrom:`pop_shortcut_cb:1145-1157`},{name:`the-shortcut-pop-propagates-at-the-root`,rule:`a poppable root that cannot pop lets the key reach an enclosing view`,steps:[{op:`add`,page:`A`},{op:`popFromShortcut`,expect:`propagate`}],expect:{stack:[`A`]},derivedFrom:`pop_shortcut_cb:1154-1157`},{name:`the-shortcut-pop-propagates-on-an-empty-view`,rule:`no visible page — the view has nothing to say about the key`,steps:[{op:`popFromShortcut`,expect:`propagate`}],expect:{stack:[]},derivedFrom:`pop_shortcut_cb:1147-1148`},{name:`escape-pops-by-default`,rule:`pop-on-escape defaults to TRUE`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`push`,page:`B`},{op:`popFromEscape`,expect:`stop`}],expect:{stack:[`A`],popOnEscape:!0},derivedFrom:`escape_shortcut_cb:1178-1179 + init:2143`},{name:`escape-propagates-when-pop-on-escape-is-off`,rule:`the gate is on the VIEW, not on the page`,steps:[{op:`add`,page:`A`},{op:`add`,page:`B`},{op:`push`,page:`B`},{op:`setPopOnEscape`,value:!1},{op:`popFromEscape`,expect:`propagate`}],expect:{stack:[`A`,`B`],popOnEscape:!1},derivedFrom:`escape_shortcut_cb:1178-1181`}];function runNavigationSteps(e,t){let n=[];for(let[r,i]of e.entries()){let e,a=`expect`in i?i.expect:void 0;switch(i.op){case`add`:e=t.add(t.page(i.page),i.props);break;case`remove`:e=t.remove(t.page(i.page));break;case`push`:e=t.push(t.page(i.page),i.props);break;case`pushByTag`:e=t.pushByTag(i.tag);break;case`pop`:e=t.pop();break;case`popToPage`:e=t.popToPage(t.page(i.page));break;case`popToTag`:e=t.popToTag(i.tag);break;case`replace`:{let e=i.props;t.replace(i.pages.map(e=>e===null?null:t.page(e)),e===void 0?void 0:n=>{let r=t.idOf(n);return r===null?void 0:e[r]});break}case`replaceWithTags`:t.replaceWithTags(i.tags);break;case`setTag`:e=t.setTag(t.page(i.page),i.tag);break;case`setTitle`:e=t.setTitle(t.page(i.page),i.title);break;case`setCanPop`:e=t.setCanPop(t.page(i.page),i.canPop);break;case`setAnimateTransitions`:t.setAnimateTransitions(i.value);break;case`setPopOnEscape`:t.setPopOnEscape(i.value);break;case`popFromShortcut`:e=t.popFromShortcut();break;case`popFromEscape`:e=t.popFromEscape();break;case`finishTransition`:e=t.finishTransition().map(e=>t.idOf(e)),t.defersTransition||(a=void 0);break}n.push({index:r,step:i,result:e,expected:a})}return n}function collectNavigationState(e,t){let ids=e=>e.map(e=>t.idOf(e)),n=[],add=(e,t,r)=>{n.push({label:e,actual:t,expected:r})};e.stack!==void 0&&add(`stack`,ids(t.stack()),[...e.stack]),e.pages!==void 0&&add(`pages`,ids(t.pages()),[...e.pages]),e.visiblePage!==void 0&&add(`visiblePage`,t.idOf(t.visiblePage()),e.visiblePage),e.visiblePageTag!==void 0&&add(`visiblePageTag`,t.visiblePageTag(),e.visiblePageTag),e.depth!==void 0&&add(`depth`,t.depth(),e.depth),e.animateTransitions!==void 0&&add(`animateTransitions`,t.animateTransitions(),e.animateTransitions),e.popOnEscape!==void 0&&add(`popOnEscape`,t.popOnEscape(),e.popOnEscape),e.canGoBack!==void 0&&add(`canGoBack`,t.canGoBack(),e.canGoBack),e.backButtonTooltip!==void 0&&add(`backButtonTooltip`,t.backButtonTooltip(),e.backButtonTooltip);for(let[n,r]of e.findPage??[])add(`findPage(${JSON.stringify(n)})`,t.idOf(t.findPage(n)),r);for(let[n,r]of e.previousPage??[])add(`getPreviousPage(${n})`,t.idOf(t.getPreviousPage(t.page(n))),r);for(let n of e.pageState??[]){let e=t.pageState(t.page(n.page));for(let t of[`registered`,`tag`,`title`,`canPop`,`removeOnPop`])n[t]===void 0||e[t]===void 0||add(`${n.page}.${t}`,e[t],n[t])}return n}function navigationEventLog(e){let t=[];for(let n of e){if(n.reason===`add`||n.reason===`push`)t.push({type:`pushed`,page:n.visiblePage});else if(n.reason===`pop`)for(let e of n.popped)t.push({type:`popped`,page:e});else t.push({type:`replaced`,page:null});n.previousVisiblePage!==n.visiblePage&&t.push({type:`notify::visible-page`,page:n.visiblePage})}return t}export{e as NAVIGATION_VIEW_VECTORS,collectNavigationState,navigationEventLog,runNavigationSteps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[`0px 0px 0px 1px`,`0px 1px 5px 1px`,`0px 2px 14px 3px`],t=[{variant:`plain`,padding:8,borderRadius:15,shadow:e,selector:`popover > contents`,source:`refs/libadwaita/src/stylesheet/widgets/_popovers.scss:13-21`,rule:`$popover_radius = $menu_radius + 6 = 15px (_common.scss:10,13) — NOT $card_radius (12px, what the menu button and drop-down used) and NOT $button_radius (9px, what the split button used)`},{variant:`menu`,padding:6,borderRadius:15,shadow:e,selector:"popover.menu > contents (padding) — beats `popover > contents`",source:`refs/libadwaita/src/stylesheet/widgets/_menus.scss:58-66`,rule:"a MENU popover zeroes the contents padding and puts $menu_margin (6px, _common.scss:11) on the item box — the same 6px inset all three copies already had. Only the radius and the shadow were ever wrong. NB `.menu` is a STYLE CLASS, not an a11y role: a GtkDropDown popover carries it (`dropdown { popover.menu { … } }`, _dropdowns.scss:22) while its rows are ARIA options, so a renderer that keys the surface off `role` pads the drop-down like a bare content popover."},{variant:`menu-item`,padding:12,borderRadius:9,shadow:[],selector:`popover.menu modelbutton`,source:`refs/libadwaita/src/stylesheet/widgets/_menus.scss:134-138`,rule:"a menu row is $menu_radius (9px), NOT `calc(var(--button-radius) - 2px)` (7px) as the menu button and split button each independently invented"}],n=[{key:`ArrowDown`,context:{itemCount:3,currentIndex:-1},expected:{action:`focus`,index:0},rule:`entering an unfocused list from the top`},{key:`ArrowDown`,context:{itemCount:3,currentIndex:0},expected:{action:`focus`,index:1},rule:`the plain step`},{key:`ArrowDown`,context:{itemCount:3,currentIndex:2},expected:{action:`focus`,index:0},rule:`wraps past the end`},{key:`ArrowDown`,context:{itemCount:1,currentIndex:0},expected:{action:`focus`,index:0},rule:"a one-item list wraps onto itself — `% 1` must not divide by zero or land on -1"},{key:`ArrowUp`,context:{itemCount:3,currentIndex:-1},expected:{action:`focus`,index:2},rule:"THE FIX: both copies computed (-1 - 1 + n) % n = n - 2, landing on the SECOND-TO-LAST item. Reachable on every `enable-search` open, which focuses the entry (currentIndex -1). ArrowUp from nothing enters at the END."},{key:`ArrowUp`,context:{itemCount:3,currentIndex:0},expected:{action:`focus`,index:2},rule:`wraps past the start`},{key:`ArrowUp`,context:{itemCount:3,currentIndex:2},expected:{action:`focus`,index:1},rule:`the plain step`},{key:`ArrowUp`,context:{itemCount:1,currentIndex:0},expected:{action:`focus`,index:0},rule:`a one-item list wraps onto itself`},{key:`Home`,context:{itemCount:4,currentIndex:2},expected:{action:`focus`,index:0},rule:`jumps to the first item`},{key:`End`,context:{itemCount:4,currentIndex:1},expected:{action:`focus`,index:3},rule:`jumps to the last item`},{key:`Home`,context:{itemCount:4,currentIndex:-1,hasSearch:!0},expected:{action:`none`,index:-1},rule:`the search entry owns the caret — the drop-down stole Home unconditionally, so you could not jump to the start of the query you were typing`},{key:`End`,context:{itemCount:4,currentIndex:-1,hasSearch:!0},expected:{action:`none`,index:-1},rule:`same for End — caret to end of query, not focus to last option`},{key:`Home`,context:{itemCount:4,currentIndex:2,hasSearch:!0},expected:{action:`focus`,index:0},rule:`once focus has LEFT the entry, a searchable popover navigates like any other`},{key:`Enter`,context:{itemCount:3,currentIndex:1},expected:{action:`activate`,index:1},rule:`Enter picks the focused item — the menu button had no case for it and leaned on the browser activating a focused <button>`},{key:` `,context:{itemCount:3,currentIndex:1},expected:{action:`activate`,index:1},rule:`Space picks the focused item`},{key:`Enter`,context:{itemCount:3,currentIndex:-1},expected:{action:`none`,index:-1},rule:`nothing focused, nothing to activate`},{key:` `,context:{itemCount:3,currentIndex:-1,hasSearch:!0},expected:{action:`none`,index:-1},rule:`Space in the search entry types a space; it must never activate an option`},{key:`Escape`,context:{itemCount:3,currentIndex:1},expected:{action:`close`,index:-1},rule:"Escape dismisses — `adw-split-button` had no Escape handling at all"},{key:`Escape`,context:{itemCount:0,currentIndex:-1},expected:{action:`close`,index:-1},rule:`Escape closes even an empty popover: it is the escape hatch, not a move, so it is resolved BEFORE the empty-list guard`},{key:`ArrowDown`,context:{itemCount:0,currentIndex:-1},expected:{action:`none`,index:-1},rule:`an empty list has nothing to move to — never returns index 0 for a list with no item 0`},{key:`ArrowDown`,context:{itemCount:3,currentIndex:7},expected:{action:`focus`,index:0},rule:`an out-of-range currentIndex (a stale index after a filter shrank the list) is treated as "nothing focused"`},{key:`Tab`,context:{itemCount:3,currentIndex:0},expected:{action:`none`,index:-1},rule:`Tab is deliberately unhandled — GTK traps focus in a popover, but doing that in the DOM is a renderer concern with no portable arithmetic`},{key:`a`,context:{itemCount:3,currentIndex:0},expected:{action:`none`,index:-1},rule:`a printable key belongs to the renderer (the drop-down type-ahead), not to this table`}];export{n as POPOVER_KEY_VECTORS,t as POPOVER_SURFACE_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{input:{title:``,description:``,hasHeaderSuffix:!1,rowCount:0},state:{titleVisible:!1,descriptionVisible:!1,headerVisible:!1,singleLine:!1,listboxVisible:!1},rule:`an empty group shows NOTHING — including no boxed-list card, which the web port used to keep painting`},{input:{title:`Appearance`,description:``,hasHeaderSuffix:!1,rowCount:3},state:{titleVisible:!0,descriptionVisible:!1,headerVisible:!0,singleLine:!0,listboxVisible:!0},rule:`title only is a SINGLE-LINE header (min-height: 34px), which neither port computed`},{input:{title:`Appearance`,description:`Control how the application looks.`,hasHeaderSuffix:!1,rowCount:3},state:{titleVisible:!0,descriptionVisible:!0,headerVisible:!0,singleLine:!1,listboxVisible:!0},rule:`a description forces two lines, so the header takes margin-bottom: 6px instead`},{input:{title:``,description:``,hasHeaderSuffix:!0,rowCount:1},state:{titleVisible:!1,descriptionVisible:!1,headerVisible:!0,singleLine:!0,listboxVisible:!0},rule:`a header suffix alone keeps the header alive and single-line`},{input:{title:``,description:`Signed out.`,hasHeaderSuffix:!1,rowCount:0},state:{titleVisible:!1,descriptionVisible:!0,headerVisible:!0,singleLine:!1,listboxVisible:!1},rule:`a description with no title still shows the header, and never single-line`},{input:{title:`Appearance`,description:`Control how it looks.`,hasHeaderSuffix:!0,rowCount:2},state:{titleVisible:!0,descriptionVisible:!0,headerVisible:!0,singleLine:!1,listboxVisible:!0},rule:`the description wins over the suffix — is_single_line returns FALSE before it looks at either`},{input:{title:` `,rowCount:1},state:{titleVisible:!0,descriptionVisible:!1,headerVisible:!0,singleLine:!0,listboxVisible:!0},rule:`only the EXACT empty string hides a label — g_strcmp0(text, "") does not trim`},{input:{title:null,description:null,rowCount:0},state:{titleVisible:!1,descriptionVisible:!1,headerVisible:!1,singleLine:!1,listboxVisible:!1},rule:`NULL is the empty string — adw_preferences_group_set_title normalises it (:508)`},{input:{title:`<b></b>`,rowCount:1},state:{titleVisible:!1,descriptionVisible:!1,headerVisible:!1,singleLine:!1,listboxVisible:!0},dependsOnMarkup:!0,rule:`visibility reads the DISPLAYED text (gtk_label_get_text), so markup-only is empty — the getter still returns the raw markup`},{input:{title:`<b>Sync</b>`,rowCount:1},state:{titleVisible:!0,descriptionVisible:!1,headerVisible:!0,singleLine:!0,listboxVisible:!0},rule:`markup around real text is still real text`},{input:{title:`Tom & Jerry`,rowCount:1},state:{titleVisible:!0,descriptionVisible:!1,headerVisible:!0,singleLine:!0,listboxVisible:!0},rule:`a title that does not parse as markup keeps its raw text — a bare & must not hide the label`},{input:{title:`<b></b>`,useMarkup:!1,rowCount:1},state:{titleVisible:!0,descriptionVisible:!1,headerVisible:!0,singleLine:!0,listboxVisible:!0},rule:`a renderer that paints the title verbatim opts out of the markup rule`},{input:{rowCount:12},state:{titleVisible:!1,descriptionVisible:!1,headerVisible:!1,singleLine:!1,listboxVisible:!0},rule:`rows with no header at all: the card shows, the header does not`}],t=[{text:`Dark Style`,folded:`dark style`,naiveLowerCase:`dark style`,rule:`ASCII is unaffected`},{text:`Straße`,folded:`strasse`,naiveLowerCase:`straße`,rule:`ß folds to ss, so "strasse" finds it`},{text:`STRASSE`,folded:`strasse`,naiveLowerCase:`strasse`,rule:`and the two spellings meet in the middle`},{text:`ẞ`,folded:`ss`,naiveLowerCase:`ß`,rule:`capital sharp s folds the same way`},{text:`ΟΔΟΣ`,folded:`οδοσ`,naiveLowerCase:`οδος`,rule:`final sigma folds to σ; toLowerCase gives ς`},{text:`ς`,folded:`σ`,naiveLowerCase:`ς`,rule:`a literal final sigma folds too`},{text:`file`,folded:`file`,naiveLowerCase:`file`,rule:`the fi ligature expands`},{text:`ffl`,folded:`ffl`,naiveLowerCase:`ffl`,rule:`three-character expansion`},{text:`DŽ`,folded:`dž`,naiveLowerCase:`dž`,rule:`ONE character — NFKC+toLowerCase would give the two-character "dž", so NFKC is not a substitute`},{text:`Müller`,folded:`müller`,naiveLowerCase:`müller`,rule:`an umlaut is not decomposed`},{text:`İ`,folded:`i̇`,naiveLowerCase:`i̇`,rule:`dotted capital I decomposes identically under both, so no extra rule is needed`},{text:`ꭰ`,folded:`Ꭰ`,naiveLowerCase:`ꭰ`,rule:`Cherokee folds UP to its capital — the reverse of every other script`}],n=[{markup:`Dark Style`,plain:`Dark Style`,rule:`plain text passes through`},{markup:`<b>Dark</b> Style`,plain:`Dark Style`,rule:`tags are dropped, their content kept`},{markup:`<b><i>Dark</i></b>`,plain:`Dark`,rule:`nesting`},{markup:`<b></b>`,plain:``,rule:`markup with no text is the EMPTY string — this is what hides a group title`},{markup:`<span foreground="red">Dark</span>`,plain:`Dark`,rule:`<span> is the one tag that takes attributes`},{markup:`<b class="x">Dark</b>`,plain:null,rule:`check_no_attributes: any other tag with an attribute fails`},{markup:`<div>Dark</div>`,plain:null,rule:`an unknown tag is a parse ERROR, not something to strip`},{markup:`i <3 gtk`,plain:null,rule:`so "<3" stays literal text and stays findable`},{markup:`<b>Dark`,plain:null,rule:`an unclosed tag fails at end_parse`},{markup:`<b>Dark</i>`,plain:null,rule:`a mismatched close tag fails`},{markup:`AT&T`,plain:`AT&T`,rule:`named entities resolve`},{markup:`a&b`,plain:`a&b`,rule:`decimal character references resolve`},{markup:`a&b`,plain:`a&b`,rule:`hex character references resolve`},{markup:`Tom & Jerry`,plain:null,rule:`a bare & is a parse error — the canonical failure case`},{markup:`a b`,plain:null,rule:`GMarkup knows five named entities; nbsp is not one`},{markup:`a<!-- note -->b`,plain:`ab`,rule:`comments are passthrough and contribute no text`},{markup:`a<b/>c`,plain:`ac`,rule:`a self-closing tag`},{markup:` `,plain:` `,rule:`whitespace is text — a single space is a VISIBLE title`},{markup:`a > b`,plain:`a > b`,rule:`a bare > is legal text, unlike a bare <`}],r=[{text:`Appearance`,stripped:`Appearance`,rule:`no marker, no change`},{text:`_Appearance`,stripped:`Appearance`,rule:`the marker is dropped, the marked character kept`},{text:`App_earance`,stripped:`Appearance`,rule:`a marker in the middle`},{text:`A__B`,stripped:`A_B`,rule:`a doubled marker collapses to ONE literal underscore`},{text:`___A`,stripped:`_A`,rule:`three markers: an escaped one, then a marking one`},{text:`A_B_C`,stripped:`ABC`,rule:`every marker is processed, not just the first`},{text:`A_`,stripped:`A`,rule:`a trailing marker has nothing to mark and is simply dropped`},{text:`_`,stripped:``,rule:`a lone marker`},{text:`<b>_A</b>`,stripped:`<b>A</b>`,rule:`the C escapes BEFORE parsing, so mnemonic stripping never eats real markup`}],i=[{source:`Straße`,options:{useMarkup:!1,useUnderline:!1,allowUnderline:!0},comparable:`strasse`,rule:`the fold runs first and always`},{source:`ΟΔΟΣ`,options:{},comparable:`οδοσ`,rule:`defaults: markup on, underline off`},{source:`file`,options:{},comparable:`file`,rule:`ligature expansion survives the markup parse`},{source:`DŽ`,options:{},comparable:`dž`,rule:`single-character fold`},{source:`<b>Dark</b> Style`,options:{useMarkup:!0},comparable:`dark style`,rule:`FOLD FIRST, PARSE SECOND — the lowercased tags still parse, which is what makes this order work`},{source:`AT&T`,options:{useMarkup:!0},comparable:`at&t`,rule:`the entity is resolved by the parse`},{source:`Tom & Jerry`,options:{useMarkup:!0},comparable:`tom & jerry`,rule:`the parse FAILS and the folded plaintext is kept — the row must not throw and must not leave the index`},{source:`<b>Dark</b> Style`,options:{useMarkup:!1},comparable:`<b>dark</b> style`,rule:`a row that opts out of markup is compared with its tags intact`},{source:`_Appearance`,options:{useMarkup:!1,useUnderline:!0,allowUnderline:!0},comparable:`appearance`,rule:`the TITLE path strips mnemonics`},{source:`_Appearance`,options:{useMarkup:!1,useUnderline:!0,allowUnderline:!1},comparable:`_appearance`,rule:`the SUBTITLE path passes allow_underline = FALSE, so subtitles keep their underscores`},{source:`_Appearance`,options:{useMarkup:!1,useUnderline:!1,allowUnderline:!0},comparable:`_appearance`,rule:`a row that does not use mnemonics keeps them as literal text`},{source:`A__B`,options:{useUnderline:!0,allowUnderline:!0},comparable:`a_b`,rule:`a doubled accel marker collapses to one literal underscore`}],a=[{row:{title:`Dark Style`},query:``,matches:!0,rule:`strstr(title, "") returns title — EVERY row matches an empty query, so the stack shows "results" before anything is typed`},{row:{title:`Dark Style`},query:`Dark`,matches:!0,rule:`a plain prefix`},{row:{title:`Dark Style`},query:`ARK`,matches:!0,rule:`case-insensitive SUBSTRING anywhere — not a prefix, not a word boundary`},{row:{title:`Dark Style`},query:`style dark`,matches:!1,rule:`the terms are one literal substring, not words`},{row:{title:`Dark Style`},query:`zzz`,matches:!1,rule:`no match`},{row:{title:`Sync`,subtitle:`Avoid using mobile data`,isActionRow:!0},query:`mobile`,matches:!0,rule:`an AdwActionRow also matches on its subtitle`},{row:{title:`Display name`,subtitle:`Grace Hopper`,isActionRow:!1},query:`grace`,matches:!1,rule:`AdwEntryRow derives from AdwPreferencesRow, NOT AdwActionRow — the typed text is deliberately not searchable`},{row:{title:`Straße`},query:`strasse`,matches:!0,rule:`the German canary: a toLowerCase() port returns false here`},{row:{title:`STRASSE`},query:`straße`,matches:!0,rule:`and the same in the other direction`},{row:{title:`<b>Dark</b> Style`},query:`dark style`,matches:!0,rule:`the query is matched against the markup-STRIPPED title, so a user never types tags`},{row:{title:`<b>Dark</b> Style`},query:`<b>`,matches:!1,rule:`and cannot find the tags either`},{row:{title:`Tom & Jerry`},query:`& jer`,matches:!0,rule:`the unparseable title stays searchable under its literal text`},{row:{title:`_Appearance`,useUnderline:!0},query:`appearance`,matches:!0,rule:`a mnemonic row is found without its underscore`},{row:{title:`Sync`,subtitle:`_Avoid mobile data`,useUnderline:!0,isActionRow:!0},query:`_avoid`,matches:!0,rule:`but the SUBTITLE keeps it, because that path passes allow_underline = FALSE`}],o=[{pages:[{title:`General`,groups:[{title:`Appearance`,rows:[{title:`Dark Style`,visible:!0},{title:``,visible:!0},{title:`Region`,visible:!1}]}]}],titles:[`Dark Style`],rule:`row_has_title: an EMPTY title and a hidden row are both excluded`},{pages:[{title:`General`,groups:[{title:`Hidden`,visible:!1,rows:[{title:`Dark Style`}]}]}],titles:[],rule:`is_visible_group: an invisible group contributes no rows`},{pages:[{title:`General`,visible:!1,groups:[{title:`Appearance`,rows:[{title:`Dark Style`}]}]}],titles:[],rule:`the page filter: an invisible page contributes no rows`},{pages:[{title:`A`,groups:[{title:`G1`,rows:[{title:`One`},{title:`Two`}]}]},{title:`B`,groups:[{title:`G2`,rows:[{title:`Three`}]},{title:`G3`,rows:[{title:`Four`}]}]}],titles:[`One`,`Two`,`Three`,`Four`],rule:`flatten order is page, then group, then row`},{pages:[{title:`General`,groups:[]}],titles:[],rule:`a page with no groups is legal and contributes nothing`}],s=[{input:{groupTitle:`Appearance`,pageTitle:`General`,nVisiblePages:1},subtitle:`Appearance`,rule:`one visible page: the group title alone, no page and no arrow`},{input:{groupTitle:`Appearance`,pageTitle:`General`,nVisiblePages:2},subtitle:`General → Appearance`,rule:`several visible pages: page → group, U+2192 with one space either side`},{input:{groupTitle:`Appearance`,pageTitle:``,nVisiblePages:2},subtitle:`Untitled page → Appearance`,rule:`an empty page title falls back to the translated placeholder`},{input:{groupTitle:``,pageTitle:`General`,nVisiblePages:2},subtitle:`General`,rule:`an empty GROUP title skips the join entirely — the bare page title, no arrow`},{input:{groupTitle:``,pageTitle:``,nVisiblePages:2},subtitle:null,rule:`nothing to show at all`},{input:{groupTitle:`Fonts`,pageTitle:`_General`,pageUseUnderline:!0,nVisiblePages:2},subtitle:`General → Fonts`,rule:`the PAGE property decides whether the page title is mnemonic-stripped`},{input:{groupTitle:`Fonts`,pageTitle:`_General`,pageUseUnderline:!1,nVisiblePages:2},subtitle:`_General → Fonts`,rule:`and without it the underscore is literal`},{input:{groupTitle:`Tom & Jerry`,pageTitle:`Tom & Jerry`,rowUseMarkup:!0,nVisiblePages:2},subtitle:`Tom & Jerry → Tom & Jerry`,rule:`the ROW property escapes the PAGE title only — the group title is passed through raw`},{input:{groupTitle:`Tom & Jerry`,pageTitle:`Tom & Jerry`,rowUseMarkup:!1,nVisiblePages:2},subtitle:`Tom & Jerry → Tom & Jerry`,rule:`a non-markup row escapes nothing`},{input:{groupTitle:`Appearance`,nVisiblePages:2},subtitle:`Untitled page → Appearance`,rule:`no page ancestor is indistinguishable from an untitled one — both reach the placeholder`},{input:{groupTitle:`Appearance`,pageTitle:`General`,nVisiblePages:0},subtitle:`Appearance`,rule:`zero visible pages behaves like one — the test is > 1`}],c=[{name:`general`,title:`General`,groups:[{title:`Appearance`,rows:[{title:`<b>Dark</b> Style`,isActionRow:!0,subtitle:`Follow the system setting`},{title:`Display name`,subtitle:`Grace Hopper`},{title:``}]},{title:`Hidden group`,visible:!1,rows:[{title:`Secret Option`}]}]},{name:`network`,title:`Network`,groups:[{title:`Sync`,rows:[{title:`Sync over Wi-Fi`,isActionRow:!0,subtitle:`Avoid using mobile data`},{title:`Straße`,visible:!0},{title:`Region`,visible:!1}]},{title:``,rows:[{title:`Reset`}]}]},{name:`developer`,title:`Developer`,visible:!1,groups:[{title:`Debug`,rows:[{title:`Verbose logging`}]}]}],l=[{query:``,results:[{title:`<b>Dark</b> Style`,subtitle:`General → Appearance`},{title:`Display name`,subtitle:`General → Appearance`},{title:`Sync over Wi-Fi`,subtitle:`Network → Sync`},{title:`Straße`,subtitle:`Network → Sync`},{title:`Reset`,subtitle:`Network`}],rule:`the empty query is the whole corpus: the untitled row, the hidden group, the hidden row and the hidden PAGE are all absent`},{query:`dark`,results:[{title:`<b>Dark</b> Style`,subtitle:`General → Appearance`}],rule:`the title is compared markup-stripped, but the RESULT keeps the original markup`},{query:`system`,results:[{title:`<b>Dark</b> Style`,subtitle:`General → Appearance`}],rule:`an action row matches through its subtitle`},{query:`grace`,results:[],rule:`the entry row does not — AdwEntryRow is not an AdwActionRow`},{query:`strasse`,results:[{title:`Straße`,subtitle:`Network → Sync`}],rule:`the German canary, end to end`},{query:`reset`,results:[{title:`Reset`,subtitle:`Network`}],rule:`an untitled GROUP drops the arrow and leaves the bare page title`},{query:`verbose`,results:[],rule:`the hidden page contributes nothing, so its rows are unreachable`},{query:`secret`,results:[],rule:`and neither does the hidden group`},{query:`zzz`,results:[],rule:`no match at all — this is the input that flips the stack to "no-results"`}];export{t as CASE_FOLD_VECTORS,i as MAKE_COMPARABLE_VECTORS,e as PREFERENCES_GROUP_HEADER_VECTORS,c as PREFERENCES_SEARCH_PAGES,l as PREFERENCES_SEARCH_VECTORS,a as ROW_MATCH_VECTORS,o as SEARCH_CORPUS_VECTORS,s as SEARCH_ROW_SUBTITLE_VECTORS,n as STRIP_MARKUP_VECTORS,r as STRIP_MNEMONIC_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{label:`One`,value:`a`},{label:`Two`,value:`b`}],t=[{name:`programmatic index set`,steps:[{op:`setOptions`,options:e},{op:`setSelectedIndex`,index:1}],selected:1,value:`b`,label:`Two`,emitted:[{selected:0,value:`a`,label:`One`,interactive:!1},{selected:1,value:`b`,label:`Two`,interactive:!1}],rule:"a changed position reaches the selection, whose notify becomes `notify::selected` (:788 → :154)"},{name:`setting the index already held`,steps:[{op:`setOptions`,options:e},{op:`setSelectedIndex`,index:1},{op:`setSelectedIndex`,index:1}],selected:1,value:`b`,label:`Two`,emitted:[{selected:0,value:`a`,label:`One`,interactive:!1},{selected:1,value:`b`,label:`Two`,interactive:!1}],rule:`the setter returns before touching the selection when the position holds (:785-786) — no notify`},{name:`the chooser pick`,steps:[{op:`setOptions`,options:e},{op:`select`,index:1}],selected:1,value:`b`,label:`Two`,emitted:[{selected:0,value:`a`,label:`One`,interactive:!1},{selected:1,value:`b`,label:`Two`,interactive:!0}],rule:"the popup routes its position through the SAME setter (:209); only the `interactive` tag differs, and that tag is ours"},{name:`picking the option already selected`,steps:[{op:`setOptions`,options:e},{op:`select`,index:0}],selected:0,value:`a`,label:`One`,emitted:[{selected:0,value:`a`,label:`One`,interactive:!1}],rule:`the same-position guard (:785-786) applies to the user path too — reopening and re-picking notifies nothing`},{name:`a dismissed chooser`,steps:[{op:`setOptions`,options:e},{op:`select`,index:-1}],selected:0,value:`a`,label:`One`,emitted:[{selected:0,value:`a`,label:`One`,interactive:!1}],rule:`no C equivalent: a dismissed native sheet resolves to the cancel label, so the renderer looks up -1 — the guard is the substitution's`},{name:`select by value`,steps:[{op:`setOptions`,options:e},{op:`setSelectedValue`,value:`b`}],selected:1,value:`b`,label:`Two`,emitted:[{selected:0,value:`a`,label:`One`,interactive:!1},{selected:1,value:`b`,label:`Two`,interactive:!1}],rule:`a value maps to the FIRST option carrying it; the port addition over the C, whose model is positional`},{name:`select by an unknown value`,steps:[{op:`setOptions`,options:e},{op:`setSelectedValue`,value:`zzz`}],selected:0,value:`a`,label:`One`,emitted:[{selected:0,value:`a`,label:`One`,interactive:!1}],rule:`an unknown value is a no-op, never a reset to 0 — a mistyped binding must not silently move the selection`},{name:`the model is replaced at the same index`,steps:[{op:`setOptions`,options:[{label:`First`,value:`a`}]},{op:`setOptions`,options:[{label:`Renamed`,value:`a`}]}],selected:0,value:`a`,label:`Renamed`,emitted:[{selected:0,value:`a`,label:`First`,interactive:!1},{selected:0,value:`a`,label:`Renamed`,interactive:!1}],rule:"the index did not move but the ITEM did — `selection_item_changed` (:157-185) repaints off the item, not the position"},{name:`the model shrinks past the selection`,steps:[{op:`setOptions`,options:e},{op:`setSelectedIndex`,index:1},{op:`setOptions`,options:[{label:`Only`,value:`a`}]}],selected:0,value:`a`,label:`Only`,emitted:[{selected:0,value:`a`,label:`One`,interactive:!1},{selected:1,value:`b`,label:`Two`,interactive:!1},{selected:0,value:`a`,label:`Only`,interactive:!1}],rule:`a selection past the end of the new model falls back to 0 — GtkSingleSelection autoselects upstream, whose C is not vendored here, so this row is the ports' shared answer`},{name:`an index past the end`,steps:[{op:`setOptions`,options:[{label:`Only`,value:`a`}]},{op:`setSelectedIndex`,index:5}],selected:5,value:``,label:``,emitted:[{selected:0,value:`a`,label:`Only`,interactive:!1},{selected:5,value:``,label:``,interactive:!1}],rule:`the index is NOT clamped (the C takes any guint); the empty value/label is how "nothing to draw" is expressed here`},{name:`an empty model`,steps:[{op:`setOptions`,options:[]}],selected:0,value:``,label:``,emitted:[{selected:0,value:``,label:``,interactive:!1}],rule:`GTK reports GTK_INVALID_LIST_POSITION here (:593-596, :809-810); the ports report index 0 with an empty value — see the module header`},{name:`picking from an empty model`,steps:[{op:`setOptions`,options:[]},{op:`select`,index:0}],selected:0,value:``,label:``,emitted:[{selected:0,value:``,label:``,interactive:!1}],rule:`index 0 is already held, so there is nothing to pick — the renderers never open a chooser over an empty model either`}];export{t as COMBO_SELECTION_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{index:0,count:3,selected:0,rule:`the first row is in range`},{index:2,count:3,selected:2,rule:`the last row is in range — in-range values pass through`},{index:3,count:3,selected:-1,rule:`one past the end is NO SELECTION, not the last row`},{index:5,count:3,selected:-1,rule:`far past the end is NO SELECTION — never clamped to 2`},{index:-1,count:3,selected:-1,rule:`the sentinel itself: -1 as a guint IS GTK_INVALID_LIST_POSITION`},{index:-7,count:3,selected:-1,rule:`any negative is 4294967289-ish as a guint, hence >= n_items`},{index:0,count:0,selected:-1,rule:`an EMPTY sidebar has no selection — 0 >= 0 (adw-sidebar.c:2862)`},{index:1.5,count:3,selected:-1,rule:`a fractional index is not a representable guint position`},{index:NaN,count:3,selected:-1,rule:`NaN is not a position`},{index:1/0,count:3,selected:-1,rule:`Infinity is not a position`}],t=[{selected:-1,oldCount:0,newCount:2,position:0,removed:0,added:2,expected:0,rule:`0 → n auto-selects index 0 (adw-sidebar.c:2270-2273)`},{selected:3,oldCount:5,newCount:4,position:3,removed:1,added:0,expected:-1,rule:`removing the selected item itself clears the selection (adw-sidebar.c:2275-2278)`},{selected:3,oldCount:5,newCount:4,position:1,removed:1,added:0,expected:2,rule:`a removal above the selection shifts it down by one (adw-sidebar.c:2280-2283)`},{selected:2,oldCount:5,newCount:7,position:0,removed:0,added:2,expected:4,rule:"an insertion above the selection shifts it up by `added`"},{selected:2,oldCount:5,newCount:6,position:4,removed:0,added:1,expected:2,rule:`a splice BELOW the selection is a no-op — neither branch applies`},{selected:0,oldCount:3,newCount:0,position:0,removed:3,added:0,expected:-1,rule:`removing everything clears the selection (0 <= 0 && 0 + 3 > 0)`},{selected:2,oldCount:3,newCount:3,position:2,removed:1,added:1,expected:-1,rule:`replacing the selected item in place still clears — the splice covers it`},{selected:-1,oldCount:3,newCount:5,position:0,removed:0,added:2,expected:1,rule:`guint wraparound: G_MAXUINT + 2 == 1, so a selection-less sidebar gains one`}],n=[{name:`untitled first section, then a titled and an untitled one`,sections:[{items:[{title:`A`},{title:`B`}]},{title:`Places`,items:[{title:`C`},{title:`D`},{title:`E`}]},{items:[{title:`F`}]}],count:6,sectionFirstIndex:[0,2,5],flat:[{index:0,sectionIndex:0,sectionItemIndex:0,title:`A`},{index:1,sectionIndex:0,sectionItemIndex:1,title:`B`},{index:2,sectionIndex:1,sectionItemIndex:0,title:`C`},{index:3,sectionIndex:1,sectionItemIndex:1,title:`D`},{index:4,sectionIndex:1,sectionItemIndex:2,title:`E`},{index:5,sectionIndex:2,sectionItemIndex:0,title:`F`}],headers:[{sectionIndex:1,kind:`title`,title:`Places`,first:!1},{sectionIndex:2,kind:`separator`,title:``,first:!1}],rule:`prefix-sum indices; the first section is untitled so its header is suppressed`},{name:`two titled sections`,sections:[{title:`Recent`,items:[{title:`A`}]},{title:`Places`,items:[{title:`B`}]}],count:2,sectionFirstIndex:[0,1],flat:[{index:0,sectionIndex:0,sectionItemIndex:0,title:`A`},{index:1,sectionIndex:1,sectionItemIndex:0,title:`B`}],headers:[{sectionIndex:0,kind:`title`,title:`Recent`,first:!0},{sectionIndex:1,kind:`title`,title:`Places`,first:!1}],rule:"a TITLED first section keeps its header and carries the `.first` class"},{name:`empty leading section`,sections:[{title:`Empty`,items:[]},{items:[{title:`A`},{title:`B`}]}],count:2,sectionFirstIndex:[0,0],flat:[{index:0,sectionIndex:1,sectionItemIndex:0,title:`A`},{index:1,sectionIndex:1,sectionItemIndex:1,title:`B`}],headers:[],rule:`a zero-item section advances the prefix sum by 0 and renders NOTHING — not even a header`},{name:`empty leading section makes the next one first`,sections:[{title:`Empty`,items:[]},{title:``,items:[{title:`A`}]},{title:`Places`,items:[{title:`B`}]}],count:2,sectionFirstIndex:[0,0,1],flat:[{index:0,sectionIndex:1,sectionItemIndex:0,title:`A`},{index:1,sectionIndex:2,sectionItemIndex:0,title:`B`}],headers:[{sectionIndex:2,kind:`title`,title:`Places`,first:!1}],rule:`section 1 owns the first rendered row and is untitled, so IT is the suppressed header`},{name:`single untitled section`,sections:[{items:[{title:`A`},{title:`B`},{title:`C`}]}],count:3,sectionFirstIndex:[0],flat:[{index:0,sectionIndex:0,sectionItemIndex:0,title:`A`},{index:1,sectionIndex:0,sectionItemIndex:1,title:`B`},{index:2,sectionIndex:0,sectionItemIndex:2,title:`C`}],headers:[],rule:`the flat NativeScript surface — one untitled section, no headers at all`},{name:`duplicate titles across sections`,sections:[{title:`Places`,items:[{title:`Music`}]},{title:`Bookmarks`,items:[{title:`Music`}]}],count:2,sectionFirstIndex:[0,1],flat:[{index:0,sectionIndex:0,sectionItemIndex:0,title:`Music`},{index:1,sectionIndex:1,sectionItemIndex:0,title:`Music`}],headers:[{sectionIndex:0,kind:`title`,title:`Places`,first:!0},{sectionIndex:1,kind:`title`,title:`Bookmarks`,first:!1}],rule:`AdwSidebar is purely positional — a repeated title addresses nothing`},{name:`markup-looking strings are carried verbatim`,sections:[{title:`A & B`,items:[{title:`Größe · 日本語 · 🎧`,subtitle:`A & B <b>c</b>`}]}],count:1,sectionFirstIndex:[0],flat:[{index:0,sectionIndex:0,sectionItemIndex:0,title:`Größe · 日本語 · 🎧`}],headers:[{sectionIndex:0,kind:`title`,title:`A & B`,first:!0}],rule:`no markup parsing and no escaping in the model — page mode explicitly disables markup (adw-sidebar.c:1685)`}],r=[{item:{title:`Music`,subtitle:``,iconName:`folder-music-symbolic`},titleVisible:!0,subtitleVisible:!1,iconVisible:!0,rule:`an empty subtitle hides its label, a set title and icon show`},{item:{title:``,subtitle:``,iconName:``},titleVisible:!1,subtitleVisible:!1,iconVisible:!1,rule:`all three empty — every label hidden`},{item:{title:`Inbox`},titleVisible:!0,subtitleVisible:!1,iconVisible:!1,rule:`absent and empty are the same thing (adw-sidebar-item.c:419 defaults to "")`},{item:{title:`Inbox`,subtitle:`3 unread`,iconName:`mail-unread-symbolic`},titleVisible:!0,subtitleVisible:!0,iconVisible:!0,rule:`the fully populated row`},{item:{title:`Odd`,iconName:`-symbolic`},titleVisible:!0,subtitleVisible:!1,iconVisible:!0,rule:`the RAW icon name decides visibility — stripping "-symbolic" must not blank it`},{item:{title:` `,subtitle:` `},titleVisible:!0,subtitleVisible:!0,iconVisible:!1,rule:"a single space is NOT empty — the C test is `*str`, not a trim"}],i=[{name:`clicking another row selects and activates it`,sections:[{items:[{title:`A`},{title:`B`},{title:`C`}]}],initialSelected:0,activate:2,activated:!0,selectionChanged:!0,selected:2,rule:`row-selected then row-activated`},{name:`re-clicking the selected row activates without notifying`,sections:[{items:[{title:`A`},{title:`B`},{title:`C`}]}],initialSelected:2,activate:2,activated:!0,selectionChanged:!1,selected:2,rule:`the activated signal is unconditional; set_selected early-returns on the same index`},{name:`clicking a row that does not exist does nothing`,sections:[{items:[{title:`A`},{title:`B`},{title:`C`}]}],initialSelected:0,activate:9,activated:!1,selectionChanged:!1,selected:0,rule:`both callbacks run off an existing GtkListBoxRow — there is none at index 9`},{name:`a disabled row cannot be activated`,sections:[{items:[{title:`A`},{title:`B`,enabled:!1},{title:`C`}]}],initialSelected:0,activate:1,activated:!1,selectionChanged:!1,selected:0,rule:"`enabled` is bound to `row:sensitive` (adw-sidebar.c:1383) — an insensitive row emits nothing"},{name:`a hidden row cannot be activated`,sections:[{items:[{title:`A`},{title:`B`,visible:!1},{title:`C`}]}],initialSelected:0,activate:1,activated:!1,selectionChanged:!1,selected:0,rule:"`visible` is bound to `row:visible` (adw-sidebar.c:1382) — there is nothing to click"},{name:`activation crosses sections by flat index`,sections:[{title:`Places`,items:[{title:`Music`}]},{title:`Bookmarks`,items:[{title:`Music`}]}],initialSelected:0,activate:1,activated:!0,selectionChanged:!0,selected:1,rule:`the second Music is index 1 — sections do not restart the index`}],a=[{name:`filtering keeps the unfiltered index space`,sections:[{items:[{title:`A`},{title:`B`},{title:`C`}]}],keepTitles:[`C`],count:3,visibleIndices:[2],headers:[],isEmpty:!1,rule:`C keeps flat index 2 even though it is the only rendered row`},{name:`a filter that matches nothing is the empty state`,sections:[{items:[{title:`A`}]}],keepTitles:[],count:1,visibleIndices:[],headers:[],isEmpty:!0,rule:"the `.empty` class / placeholder keys off the FILTERED count, which is 0"},{name:"filtering out a whole section re-attributes `.first`",sections:[{title:`Recent`,items:[{title:`A`}]},{title:`Places`,items:[{title:`B`}]}],keepTitles:[`B`],count:2,visibleIndices:[1],headers:[{sectionIndex:1,kind:`title`,title:`Places`,first:!0}],isEmpty:!1,rule:"Recent renders no row so it emits no header; Places owns the first row and takes `.first`"},{name:`a filter can move the suppression onto a later section`,sections:[{title:`Recent`,items:[{title:`A`}]},{items:[{title:`B`}]},{title:`Tags`,items:[{title:`C`}]}],keepTitles:[`B`,`C`],count:3,visibleIndices:[1,2],headers:[{sectionIndex:2,kind:`title`,title:`Tags`,first:!1}],isEmpty:!1,rule:`Recent is filtered away, so the UNTITLED section 1 becomes first — and a first untitled header is invisible`},{name:`an empty sidebar is empty`,sections:[],keepTitles:[],count:0,visibleIndices:[],headers:[],isEmpty:!0,rule:`no sections, no items, no selection (adw-sidebar.c:2862)`}],o=[{mode:`sidebar`,selectionVisible:!0,rule:`the default mode (adw-sidebar.c:2860) paints the selection`},{mode:`page`,selectionVisible:!1,rule:`page mode tracks the selection but never paints it`}];export{i as SIDEBAR_ACTIVATION_VECTORS,e as SIDEBAR_CLAMP_VECTORS,a as SIDEBAR_FILTER_VECTORS,t as SIDEBAR_ITEMS_CHANGED_VECTORS,r as SIDEBAR_ITEM_FLAG_VECTORS,n as SIDEBAR_MODEL_VECTORS,o as SIDEBAR_MODE_VECTORS};
|